openapi.json 363 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402
  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/health": {
  10. "get": {
  11. "operationId": "global.health",
  12. "summary": "Get health",
  13. "description": "Get health information about the OpenCode server.",
  14. "responses": {
  15. "200": {
  16. "description": "Health information",
  17. "content": {
  18. "application/json": {
  19. "schema": {
  20. "type": "object",
  21. "properties": {
  22. "healthy": {
  23. "type": "boolean",
  24. "const": true
  25. },
  26. "version": {
  27. "type": "string"
  28. }
  29. },
  30. "required": ["healthy", "version"]
  31. }
  32. }
  33. }
  34. }
  35. },
  36. "x-codeSamples": [
  37. {
  38. "lang": "js",
  39. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.health({\n ...\n})"
  40. }
  41. ]
  42. }
  43. },
  44. "/global/event": {
  45. "get": {
  46. "operationId": "global.event",
  47. "summary": "Get global events",
  48. "description": "Subscribe to global events from the OpenCode system using server-sent events.",
  49. "responses": {
  50. "200": {
  51. "description": "Event stream",
  52. "content": {
  53. "text/event-stream": {
  54. "schema": {
  55. "$ref": "#/components/schemas/GlobalEvent"
  56. }
  57. }
  58. }
  59. }
  60. },
  61. "x-codeSamples": [
  62. {
  63. "lang": "js",
  64. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.event({\n ...\n})"
  65. }
  66. ]
  67. }
  68. },
  69. "/global/config": {
  70. "get": {
  71. "operationId": "global.config.get",
  72. "summary": "Get global configuration",
  73. "description": "Retrieve the current global OpenCode configuration settings and preferences.",
  74. "responses": {
  75. "200": {
  76. "description": "Get global config info",
  77. "content": {
  78. "application/json": {
  79. "schema": {
  80. "$ref": "#/components/schemas/Config"
  81. }
  82. }
  83. }
  84. }
  85. },
  86. "x-codeSamples": [
  87. {
  88. "lang": "js",
  89. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.get({\n ...\n})"
  90. }
  91. ]
  92. },
  93. "patch": {
  94. "operationId": "global.config.update",
  95. "summary": "Update global configuration",
  96. "description": "Update global OpenCode configuration settings and preferences.",
  97. "responses": {
  98. "200": {
  99. "description": "Successfully updated global config",
  100. "content": {
  101. "application/json": {
  102. "schema": {
  103. "$ref": "#/components/schemas/Config"
  104. }
  105. }
  106. }
  107. },
  108. "400": {
  109. "description": "Bad request",
  110. "content": {
  111. "application/json": {
  112. "schema": {
  113. "$ref": "#/components/schemas/BadRequestError"
  114. }
  115. }
  116. }
  117. }
  118. },
  119. "requestBody": {
  120. "content": {
  121. "application/json": {
  122. "schema": {
  123. "$ref": "#/components/schemas/Config"
  124. }
  125. }
  126. }
  127. },
  128. "x-codeSamples": [
  129. {
  130. "lang": "js",
  131. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.update({\n ...\n})"
  132. }
  133. ]
  134. }
  135. },
  136. "/global/dispose": {
  137. "post": {
  138. "operationId": "global.dispose",
  139. "summary": "Dispose instance",
  140. "description": "Clean up and dispose all OpenCode instances, releasing all resources.",
  141. "responses": {
  142. "200": {
  143. "description": "Global disposed",
  144. "content": {
  145. "application/json": {
  146. "schema": {
  147. "type": "boolean"
  148. }
  149. }
  150. }
  151. }
  152. },
  153. "x-codeSamples": [
  154. {
  155. "lang": "js",
  156. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.dispose({\n ...\n})"
  157. }
  158. ]
  159. }
  160. },
  161. "/global/upgrade": {
  162. "post": {
  163. "operationId": "global.upgrade",
  164. "summary": "Upgrade opencode",
  165. "description": "Upgrade opencode to the specified version or latest if not specified.",
  166. "responses": {
  167. "200": {
  168. "description": "Upgrade result",
  169. "content": {
  170. "application/json": {
  171. "schema": {
  172. "anyOf": [
  173. {
  174. "type": "object",
  175. "properties": {
  176. "success": {
  177. "type": "boolean",
  178. "const": true
  179. },
  180. "version": {
  181. "type": "string"
  182. }
  183. },
  184. "required": ["success", "version"]
  185. },
  186. {
  187. "type": "object",
  188. "properties": {
  189. "success": {
  190. "type": "boolean",
  191. "const": false
  192. },
  193. "error": {
  194. "type": "string"
  195. }
  196. },
  197. "required": ["success", "error"]
  198. }
  199. ]
  200. }
  201. }
  202. }
  203. },
  204. "400": {
  205. "description": "Bad request",
  206. "content": {
  207. "application/json": {
  208. "schema": {
  209. "$ref": "#/components/schemas/BadRequestError"
  210. }
  211. }
  212. }
  213. }
  214. },
  215. "requestBody": {
  216. "content": {
  217. "application/json": {
  218. "schema": {
  219. "type": "object",
  220. "properties": {
  221. "target": {
  222. "type": "string"
  223. }
  224. }
  225. }
  226. }
  227. }
  228. },
  229. "x-codeSamples": [
  230. {
  231. "lang": "js",
  232. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.upgrade({\n ...\n})"
  233. }
  234. ]
  235. }
  236. },
  237. "/auth/{providerID}": {
  238. "put": {
  239. "operationId": "auth.set",
  240. "summary": "Set auth credentials",
  241. "description": "Set authentication credentials",
  242. "responses": {
  243. "200": {
  244. "description": "Successfully set authentication credentials",
  245. "content": {
  246. "application/json": {
  247. "schema": {
  248. "type": "boolean"
  249. }
  250. }
  251. }
  252. },
  253. "400": {
  254. "description": "Bad request",
  255. "content": {
  256. "application/json": {
  257. "schema": {
  258. "$ref": "#/components/schemas/BadRequestError"
  259. }
  260. }
  261. }
  262. }
  263. },
  264. "parameters": [
  265. {
  266. "in": "path",
  267. "name": "providerID",
  268. "schema": {
  269. "type": "string"
  270. },
  271. "required": true
  272. }
  273. ],
  274. "requestBody": {
  275. "content": {
  276. "application/json": {
  277. "schema": {
  278. "$ref": "#/components/schemas/Auth"
  279. }
  280. }
  281. }
  282. },
  283. "x-codeSamples": [
  284. {
  285. "lang": "js",
  286. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.set({\n ...\n})"
  287. }
  288. ]
  289. },
  290. "delete": {
  291. "operationId": "auth.remove",
  292. "summary": "Remove auth credentials",
  293. "description": "Remove authentication credentials",
  294. "responses": {
  295. "200": {
  296. "description": "Successfully removed authentication credentials",
  297. "content": {
  298. "application/json": {
  299. "schema": {
  300. "type": "boolean"
  301. }
  302. }
  303. }
  304. },
  305. "400": {
  306. "description": "Bad request",
  307. "content": {
  308. "application/json": {
  309. "schema": {
  310. "$ref": "#/components/schemas/BadRequestError"
  311. }
  312. }
  313. }
  314. }
  315. },
  316. "parameters": [
  317. {
  318. "in": "path",
  319. "name": "providerID",
  320. "schema": {
  321. "type": "string"
  322. },
  323. "required": true
  324. }
  325. ],
  326. "x-codeSamples": [
  327. {
  328. "lang": "js",
  329. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.remove({\n ...\n})"
  330. }
  331. ]
  332. }
  333. },
  334. "/log": {
  335. "post": {
  336. "operationId": "app.log",
  337. "parameters": [
  338. {
  339. "in": "query",
  340. "name": "directory",
  341. "schema": {
  342. "type": "string"
  343. }
  344. },
  345. {
  346. "in": "query",
  347. "name": "workspace",
  348. "schema": {
  349. "type": "string"
  350. }
  351. }
  352. ],
  353. "summary": "Write log",
  354. "description": "Write a log entry to the server logs with specified level and metadata.",
  355. "responses": {
  356. "200": {
  357. "description": "Log entry written successfully",
  358. "content": {
  359. "application/json": {
  360. "schema": {
  361. "type": "boolean"
  362. }
  363. }
  364. }
  365. },
  366. "400": {
  367. "description": "Bad request",
  368. "content": {
  369. "application/json": {
  370. "schema": {
  371. "$ref": "#/components/schemas/BadRequestError"
  372. }
  373. }
  374. }
  375. }
  376. },
  377. "requestBody": {
  378. "content": {
  379. "application/json": {
  380. "schema": {
  381. "type": "object",
  382. "properties": {
  383. "service": {
  384. "description": "Service name for the log entry",
  385. "type": "string"
  386. },
  387. "level": {
  388. "description": "Log level",
  389. "type": "string",
  390. "enum": ["debug", "info", "error", "warn"]
  391. },
  392. "message": {
  393. "description": "Log message",
  394. "type": "string"
  395. },
  396. "extra": {
  397. "description": "Additional metadata for the log entry",
  398. "type": "object",
  399. "propertyNames": {
  400. "type": "string"
  401. },
  402. "additionalProperties": {}
  403. }
  404. },
  405. "required": ["service", "level", "message"]
  406. }
  407. }
  408. }
  409. },
  410. "x-codeSamples": [
  411. {
  412. "lang": "js",
  413. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.log({\n ...\n})"
  414. }
  415. ]
  416. }
  417. },
  418. "/experimental/workspace/adaptor": {
  419. "get": {
  420. "operationId": "experimental.workspace.adaptor.list",
  421. "parameters": [
  422. {
  423. "in": "query",
  424. "name": "directory",
  425. "schema": {
  426. "type": "string"
  427. }
  428. },
  429. {
  430. "in": "query",
  431. "name": "workspace",
  432. "schema": {
  433. "type": "string"
  434. }
  435. }
  436. ],
  437. "summary": "List workspace adaptors",
  438. "description": "List all available workspace adaptors for the current project.",
  439. "responses": {
  440. "200": {
  441. "description": "Workspace adaptors",
  442. "content": {
  443. "application/json": {
  444. "schema": {
  445. "type": "array",
  446. "items": {
  447. "type": "object",
  448. "properties": {
  449. "type": {
  450. "type": "string"
  451. },
  452. "name": {
  453. "type": "string"
  454. },
  455. "description": {
  456. "type": "string"
  457. }
  458. },
  459. "required": ["type", "name", "description"]
  460. }
  461. }
  462. }
  463. }
  464. }
  465. },
  466. "x-codeSamples": [
  467. {
  468. "lang": "js",
  469. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adaptor.list({\n ...\n})"
  470. }
  471. ]
  472. }
  473. },
  474. "/experimental/workspace": {
  475. "post": {
  476. "operationId": "experimental.workspace.create",
  477. "parameters": [
  478. {
  479. "in": "query",
  480. "name": "directory",
  481. "schema": {
  482. "type": "string"
  483. }
  484. },
  485. {
  486. "in": "query",
  487. "name": "workspace",
  488. "schema": {
  489. "type": "string"
  490. }
  491. }
  492. ],
  493. "summary": "Create workspace",
  494. "description": "Create a workspace for the current project.",
  495. "responses": {
  496. "200": {
  497. "description": "Workspace created",
  498. "content": {
  499. "application/json": {
  500. "schema": {
  501. "$ref": "#/components/schemas/Workspace"
  502. }
  503. }
  504. }
  505. },
  506. "400": {
  507. "description": "Bad request",
  508. "content": {
  509. "application/json": {
  510. "schema": {
  511. "$ref": "#/components/schemas/BadRequestError"
  512. }
  513. }
  514. }
  515. }
  516. },
  517. "requestBody": {
  518. "content": {
  519. "application/json": {
  520. "schema": {
  521. "type": "object",
  522. "properties": {
  523. "id": {
  524. "type": "string",
  525. "pattern": "^wrk.*"
  526. },
  527. "type": {
  528. "type": "string"
  529. },
  530. "branch": {
  531. "anyOf": [
  532. {
  533. "type": "string"
  534. },
  535. {
  536. "type": "null"
  537. }
  538. ]
  539. },
  540. "extra": {
  541. "anyOf": [
  542. {},
  543. {
  544. "type": "null"
  545. }
  546. ]
  547. }
  548. },
  549. "required": ["type", "branch", "extra"]
  550. }
  551. }
  552. }
  553. },
  554. "x-codeSamples": [
  555. {
  556. "lang": "js",
  557. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  558. }
  559. ]
  560. },
  561. "get": {
  562. "operationId": "experimental.workspace.list",
  563. "parameters": [
  564. {
  565. "in": "query",
  566. "name": "directory",
  567. "schema": {
  568. "type": "string"
  569. }
  570. },
  571. {
  572. "in": "query",
  573. "name": "workspace",
  574. "schema": {
  575. "type": "string"
  576. }
  577. }
  578. ],
  579. "summary": "List workspaces",
  580. "description": "List all workspaces.",
  581. "responses": {
  582. "200": {
  583. "description": "Workspaces",
  584. "content": {
  585. "application/json": {
  586. "schema": {
  587. "type": "array",
  588. "items": {
  589. "$ref": "#/components/schemas/Workspace"
  590. }
  591. }
  592. }
  593. }
  594. }
  595. },
  596. "x-codeSamples": [
  597. {
  598. "lang": "js",
  599. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  600. }
  601. ]
  602. }
  603. },
  604. "/experimental/workspace/status": {
  605. "get": {
  606. "operationId": "experimental.workspace.status",
  607. "parameters": [
  608. {
  609. "in": "query",
  610. "name": "directory",
  611. "schema": {
  612. "type": "string"
  613. }
  614. },
  615. {
  616. "in": "query",
  617. "name": "workspace",
  618. "schema": {
  619. "type": "string"
  620. }
  621. }
  622. ],
  623. "summary": "Workspace status",
  624. "description": "Get connection status for workspaces in the current project.",
  625. "responses": {
  626. "200": {
  627. "description": "Workspace status",
  628. "content": {
  629. "application/json": {
  630. "schema": {
  631. "type": "array",
  632. "items": {
  633. "type": "object",
  634. "properties": {
  635. "workspaceID": {
  636. "type": "string",
  637. "pattern": "^wrk.*"
  638. },
  639. "status": {
  640. "type": "string",
  641. "enum": ["connected", "connecting", "disconnected", "error"]
  642. }
  643. },
  644. "required": ["workspaceID", "status"]
  645. }
  646. }
  647. }
  648. }
  649. }
  650. },
  651. "x-codeSamples": [
  652. {
  653. "lang": "js",
  654. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  655. }
  656. ]
  657. }
  658. },
  659. "/experimental/workspace/{id}": {
  660. "delete": {
  661. "operationId": "experimental.workspace.remove",
  662. "parameters": [
  663. {
  664. "in": "query",
  665. "name": "directory",
  666. "schema": {
  667. "type": "string"
  668. }
  669. },
  670. {
  671. "in": "query",
  672. "name": "workspace",
  673. "schema": {
  674. "type": "string"
  675. }
  676. },
  677. {
  678. "in": "path",
  679. "name": "id",
  680. "schema": {
  681. "type": "string",
  682. "pattern": "^wrk.*"
  683. },
  684. "required": true
  685. }
  686. ],
  687. "summary": "Remove workspace",
  688. "description": "Remove an existing workspace.",
  689. "responses": {
  690. "200": {
  691. "description": "Workspace removed",
  692. "content": {
  693. "application/json": {
  694. "schema": {
  695. "$ref": "#/components/schemas/Workspace"
  696. }
  697. }
  698. }
  699. },
  700. "400": {
  701. "description": "Bad request",
  702. "content": {
  703. "application/json": {
  704. "schema": {
  705. "$ref": "#/components/schemas/BadRequestError"
  706. }
  707. }
  708. }
  709. }
  710. },
  711. "x-codeSamples": [
  712. {
  713. "lang": "js",
  714. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  715. }
  716. ]
  717. }
  718. },
  719. "/experimental/workspace/{id}/session-restore": {
  720. "post": {
  721. "operationId": "experimental.workspace.sessionRestore",
  722. "parameters": [
  723. {
  724. "in": "query",
  725. "name": "directory",
  726. "schema": {
  727. "type": "string"
  728. }
  729. },
  730. {
  731. "in": "query",
  732. "name": "workspace",
  733. "schema": {
  734. "type": "string"
  735. }
  736. },
  737. {
  738. "in": "path",
  739. "name": "id",
  740. "schema": {
  741. "type": "string",
  742. "pattern": "^wrk.*"
  743. },
  744. "required": true
  745. }
  746. ],
  747. "summary": "Restore session into workspace",
  748. "description": "Replay a session's sync events into the target workspace in batches.",
  749. "responses": {
  750. "200": {
  751. "description": "Session replay started",
  752. "content": {
  753. "application/json": {
  754. "schema": {
  755. "type": "object",
  756. "properties": {
  757. "total": {
  758. "type": "integer",
  759. "minimum": 0,
  760. "maximum": 9007199254740991
  761. }
  762. },
  763. "required": ["total"]
  764. }
  765. }
  766. }
  767. },
  768. "400": {
  769. "description": "Bad request",
  770. "content": {
  771. "application/json": {
  772. "schema": {
  773. "$ref": "#/components/schemas/BadRequestError"
  774. }
  775. }
  776. }
  777. }
  778. },
  779. "requestBody": {
  780. "content": {
  781. "application/json": {
  782. "schema": {
  783. "type": "object",
  784. "properties": {
  785. "sessionID": {
  786. "type": "string",
  787. "pattern": "^ses.*"
  788. }
  789. },
  790. "required": ["sessionID"]
  791. }
  792. }
  793. }
  794. },
  795. "x-codeSamples": [
  796. {
  797. "lang": "js",
  798. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.sessionRestore({\n ...\n})"
  799. }
  800. ]
  801. }
  802. },
  803. "/project": {
  804. "get": {
  805. "operationId": "project.list",
  806. "parameters": [
  807. {
  808. "in": "query",
  809. "name": "directory",
  810. "schema": {
  811. "type": "string"
  812. }
  813. },
  814. {
  815. "in": "query",
  816. "name": "workspace",
  817. "schema": {
  818. "type": "string"
  819. }
  820. }
  821. ],
  822. "summary": "List all projects",
  823. "description": "Get a list of projects that have been opened with OpenCode.",
  824. "responses": {
  825. "200": {
  826. "description": "List of projects",
  827. "content": {
  828. "application/json": {
  829. "schema": {
  830. "type": "array",
  831. "items": {
  832. "$ref": "#/components/schemas/Project"
  833. }
  834. }
  835. }
  836. }
  837. }
  838. },
  839. "x-codeSamples": [
  840. {
  841. "lang": "js",
  842. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.list({\n ...\n})"
  843. }
  844. ]
  845. }
  846. },
  847. "/project/current": {
  848. "get": {
  849. "operationId": "project.current",
  850. "parameters": [
  851. {
  852. "in": "query",
  853. "name": "directory",
  854. "schema": {
  855. "type": "string"
  856. }
  857. },
  858. {
  859. "in": "query",
  860. "name": "workspace",
  861. "schema": {
  862. "type": "string"
  863. }
  864. }
  865. ],
  866. "summary": "Get current project",
  867. "description": "Retrieve the currently active project that OpenCode is working with.",
  868. "responses": {
  869. "200": {
  870. "description": "Current project information",
  871. "content": {
  872. "application/json": {
  873. "schema": {
  874. "$ref": "#/components/schemas/Project"
  875. }
  876. }
  877. }
  878. }
  879. },
  880. "x-codeSamples": [
  881. {
  882. "lang": "js",
  883. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.current({\n ...\n})"
  884. }
  885. ]
  886. }
  887. },
  888. "/project/git/init": {
  889. "post": {
  890. "operationId": "project.initGit",
  891. "parameters": [
  892. {
  893. "in": "query",
  894. "name": "directory",
  895. "schema": {
  896. "type": "string"
  897. }
  898. },
  899. {
  900. "in": "query",
  901. "name": "workspace",
  902. "schema": {
  903. "type": "string"
  904. }
  905. }
  906. ],
  907. "summary": "Initialize git repository",
  908. "description": "Create a git repository for the current project and return the refreshed project info.",
  909. "responses": {
  910. "200": {
  911. "description": "Project information after git initialization",
  912. "content": {
  913. "application/json": {
  914. "schema": {
  915. "$ref": "#/components/schemas/Project"
  916. }
  917. }
  918. }
  919. }
  920. },
  921. "x-codeSamples": [
  922. {
  923. "lang": "js",
  924. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.initGit({\n ...\n})"
  925. }
  926. ]
  927. }
  928. },
  929. "/project/{projectID}": {
  930. "patch": {
  931. "operationId": "project.update",
  932. "parameters": [
  933. {
  934. "in": "query",
  935. "name": "directory",
  936. "schema": {
  937. "type": "string"
  938. }
  939. },
  940. {
  941. "in": "query",
  942. "name": "workspace",
  943. "schema": {
  944. "type": "string"
  945. }
  946. },
  947. {
  948. "in": "path",
  949. "name": "projectID",
  950. "schema": {
  951. "type": "string"
  952. },
  953. "required": true
  954. }
  955. ],
  956. "summary": "Update project",
  957. "description": "Update project properties such as name, icon, and commands.",
  958. "responses": {
  959. "200": {
  960. "description": "Updated project information",
  961. "content": {
  962. "application/json": {
  963. "schema": {
  964. "$ref": "#/components/schemas/Project"
  965. }
  966. }
  967. }
  968. },
  969. "400": {
  970. "description": "Bad request",
  971. "content": {
  972. "application/json": {
  973. "schema": {
  974. "$ref": "#/components/schemas/BadRequestError"
  975. }
  976. }
  977. }
  978. },
  979. "404": {
  980. "description": "Not found",
  981. "content": {
  982. "application/json": {
  983. "schema": {
  984. "$ref": "#/components/schemas/NotFoundError"
  985. }
  986. }
  987. }
  988. }
  989. },
  990. "requestBody": {
  991. "content": {
  992. "application/json": {
  993. "schema": {
  994. "type": "object",
  995. "properties": {
  996. "name": {
  997. "type": "string"
  998. },
  999. "icon": {
  1000. "type": "object",
  1001. "properties": {
  1002. "url": {
  1003. "type": "string"
  1004. },
  1005. "override": {
  1006. "type": "string"
  1007. },
  1008. "color": {
  1009. "type": "string"
  1010. }
  1011. }
  1012. },
  1013. "commands": {
  1014. "type": "object",
  1015. "properties": {
  1016. "start": {
  1017. "description": "Startup script to run when creating a new workspace (worktree)",
  1018. "type": "string"
  1019. }
  1020. }
  1021. }
  1022. }
  1023. }
  1024. }
  1025. }
  1026. },
  1027. "x-codeSamples": [
  1028. {
  1029. "lang": "js",
  1030. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.update({\n ...\n})"
  1031. }
  1032. ]
  1033. }
  1034. },
  1035. "/pty": {
  1036. "get": {
  1037. "operationId": "pty.list",
  1038. "parameters": [
  1039. {
  1040. "in": "query",
  1041. "name": "directory",
  1042. "schema": {
  1043. "type": "string"
  1044. }
  1045. },
  1046. {
  1047. "in": "query",
  1048. "name": "workspace",
  1049. "schema": {
  1050. "type": "string"
  1051. }
  1052. }
  1053. ],
  1054. "summary": "List PTY sessions",
  1055. "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
  1056. "responses": {
  1057. "200": {
  1058. "description": "List of sessions",
  1059. "content": {
  1060. "application/json": {
  1061. "schema": {
  1062. "type": "array",
  1063. "items": {
  1064. "$ref": "#/components/schemas/Pty"
  1065. }
  1066. }
  1067. }
  1068. }
  1069. }
  1070. },
  1071. "x-codeSamples": [
  1072. {
  1073. "lang": "js",
  1074. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
  1075. }
  1076. ]
  1077. },
  1078. "post": {
  1079. "operationId": "pty.create",
  1080. "parameters": [
  1081. {
  1082. "in": "query",
  1083. "name": "directory",
  1084. "schema": {
  1085. "type": "string"
  1086. }
  1087. },
  1088. {
  1089. "in": "query",
  1090. "name": "workspace",
  1091. "schema": {
  1092. "type": "string"
  1093. }
  1094. }
  1095. ],
  1096. "summary": "Create PTY session",
  1097. "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
  1098. "responses": {
  1099. "200": {
  1100. "description": "Created session",
  1101. "content": {
  1102. "application/json": {
  1103. "schema": {
  1104. "$ref": "#/components/schemas/Pty"
  1105. }
  1106. }
  1107. }
  1108. },
  1109. "400": {
  1110. "description": "Bad request",
  1111. "content": {
  1112. "application/json": {
  1113. "schema": {
  1114. "$ref": "#/components/schemas/BadRequestError"
  1115. }
  1116. }
  1117. }
  1118. }
  1119. },
  1120. "requestBody": {
  1121. "content": {
  1122. "application/json": {
  1123. "schema": {
  1124. "type": "object",
  1125. "properties": {
  1126. "command": {
  1127. "type": "string"
  1128. },
  1129. "args": {
  1130. "type": "array",
  1131. "items": {
  1132. "type": "string"
  1133. }
  1134. },
  1135. "cwd": {
  1136. "type": "string"
  1137. },
  1138. "title": {
  1139. "type": "string"
  1140. },
  1141. "env": {
  1142. "type": "object",
  1143. "propertyNames": {
  1144. "type": "string"
  1145. },
  1146. "additionalProperties": {
  1147. "type": "string"
  1148. }
  1149. }
  1150. }
  1151. }
  1152. }
  1153. }
  1154. },
  1155. "x-codeSamples": [
  1156. {
  1157. "lang": "js",
  1158. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
  1159. }
  1160. ]
  1161. }
  1162. },
  1163. "/pty/{ptyID}": {
  1164. "get": {
  1165. "operationId": "pty.get",
  1166. "parameters": [
  1167. {
  1168. "in": "query",
  1169. "name": "directory",
  1170. "schema": {
  1171. "type": "string"
  1172. }
  1173. },
  1174. {
  1175. "in": "query",
  1176. "name": "workspace",
  1177. "schema": {
  1178. "type": "string"
  1179. }
  1180. },
  1181. {
  1182. "in": "path",
  1183. "name": "ptyID",
  1184. "schema": {
  1185. "type": "string",
  1186. "pattern": "^pty.*"
  1187. },
  1188. "required": true
  1189. }
  1190. ],
  1191. "summary": "Get PTY session",
  1192. "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
  1193. "responses": {
  1194. "200": {
  1195. "description": "Session info",
  1196. "content": {
  1197. "application/json": {
  1198. "schema": {
  1199. "$ref": "#/components/schemas/Pty"
  1200. }
  1201. }
  1202. }
  1203. },
  1204. "404": {
  1205. "description": "Not found",
  1206. "content": {
  1207. "application/json": {
  1208. "schema": {
  1209. "$ref": "#/components/schemas/NotFoundError"
  1210. }
  1211. }
  1212. }
  1213. }
  1214. },
  1215. "x-codeSamples": [
  1216. {
  1217. "lang": "js",
  1218. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
  1219. }
  1220. ]
  1221. },
  1222. "put": {
  1223. "operationId": "pty.update",
  1224. "parameters": [
  1225. {
  1226. "in": "query",
  1227. "name": "directory",
  1228. "schema": {
  1229. "type": "string"
  1230. }
  1231. },
  1232. {
  1233. "in": "query",
  1234. "name": "workspace",
  1235. "schema": {
  1236. "type": "string"
  1237. }
  1238. },
  1239. {
  1240. "in": "path",
  1241. "name": "ptyID",
  1242. "schema": {
  1243. "type": "string",
  1244. "pattern": "^pty.*"
  1245. },
  1246. "required": true
  1247. }
  1248. ],
  1249. "summary": "Update PTY session",
  1250. "description": "Update properties of an existing pseudo-terminal (PTY) session.",
  1251. "responses": {
  1252. "200": {
  1253. "description": "Updated session",
  1254. "content": {
  1255. "application/json": {
  1256. "schema": {
  1257. "$ref": "#/components/schemas/Pty"
  1258. }
  1259. }
  1260. }
  1261. },
  1262. "400": {
  1263. "description": "Bad request",
  1264. "content": {
  1265. "application/json": {
  1266. "schema": {
  1267. "$ref": "#/components/schemas/BadRequestError"
  1268. }
  1269. }
  1270. }
  1271. }
  1272. },
  1273. "requestBody": {
  1274. "content": {
  1275. "application/json": {
  1276. "schema": {
  1277. "type": "object",
  1278. "properties": {
  1279. "title": {
  1280. "type": "string"
  1281. },
  1282. "size": {
  1283. "type": "object",
  1284. "properties": {
  1285. "rows": {
  1286. "type": "number"
  1287. },
  1288. "cols": {
  1289. "type": "number"
  1290. }
  1291. },
  1292. "required": ["rows", "cols"]
  1293. }
  1294. }
  1295. }
  1296. }
  1297. }
  1298. },
  1299. "x-codeSamples": [
  1300. {
  1301. "lang": "js",
  1302. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
  1303. }
  1304. ]
  1305. },
  1306. "delete": {
  1307. "operationId": "pty.remove",
  1308. "parameters": [
  1309. {
  1310. "in": "query",
  1311. "name": "directory",
  1312. "schema": {
  1313. "type": "string"
  1314. }
  1315. },
  1316. {
  1317. "in": "query",
  1318. "name": "workspace",
  1319. "schema": {
  1320. "type": "string"
  1321. }
  1322. },
  1323. {
  1324. "in": "path",
  1325. "name": "ptyID",
  1326. "schema": {
  1327. "type": "string",
  1328. "pattern": "^pty.*"
  1329. },
  1330. "required": true
  1331. }
  1332. ],
  1333. "summary": "Remove PTY session",
  1334. "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
  1335. "responses": {
  1336. "200": {
  1337. "description": "Session removed",
  1338. "content": {
  1339. "application/json": {
  1340. "schema": {
  1341. "type": "boolean"
  1342. }
  1343. }
  1344. }
  1345. },
  1346. "404": {
  1347. "description": "Not found",
  1348. "content": {
  1349. "application/json": {
  1350. "schema": {
  1351. "$ref": "#/components/schemas/NotFoundError"
  1352. }
  1353. }
  1354. }
  1355. }
  1356. },
  1357. "x-codeSamples": [
  1358. {
  1359. "lang": "js",
  1360. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
  1361. }
  1362. ]
  1363. }
  1364. },
  1365. "/pty/{ptyID}/connect": {
  1366. "get": {
  1367. "operationId": "pty.connect",
  1368. "parameters": [
  1369. {
  1370. "in": "query",
  1371. "name": "directory",
  1372. "schema": {
  1373. "type": "string"
  1374. }
  1375. },
  1376. {
  1377. "in": "query",
  1378. "name": "workspace",
  1379. "schema": {
  1380. "type": "string"
  1381. }
  1382. },
  1383. {
  1384. "in": "path",
  1385. "name": "ptyID",
  1386. "schema": {
  1387. "type": "string",
  1388. "pattern": "^pty.*"
  1389. },
  1390. "required": true
  1391. }
  1392. ],
  1393. "summary": "Connect to PTY session",
  1394. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  1395. "responses": {
  1396. "200": {
  1397. "description": "Connected session",
  1398. "content": {
  1399. "application/json": {
  1400. "schema": {
  1401. "type": "boolean"
  1402. }
  1403. }
  1404. }
  1405. },
  1406. "404": {
  1407. "description": "Not found",
  1408. "content": {
  1409. "application/json": {
  1410. "schema": {
  1411. "$ref": "#/components/schemas/NotFoundError"
  1412. }
  1413. }
  1414. }
  1415. }
  1416. },
  1417. "x-codeSamples": [
  1418. {
  1419. "lang": "js",
  1420. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  1421. }
  1422. ]
  1423. }
  1424. },
  1425. "/config": {
  1426. "get": {
  1427. "operationId": "config.get",
  1428. "parameters": [
  1429. {
  1430. "in": "query",
  1431. "name": "directory",
  1432. "schema": {
  1433. "type": "string"
  1434. }
  1435. },
  1436. {
  1437. "in": "query",
  1438. "name": "workspace",
  1439. "schema": {
  1440. "type": "string"
  1441. }
  1442. }
  1443. ],
  1444. "summary": "Get configuration",
  1445. "description": "Retrieve the current OpenCode configuration settings and preferences.",
  1446. "responses": {
  1447. "200": {
  1448. "description": "Get config info",
  1449. "content": {
  1450. "application/json": {
  1451. "schema": {
  1452. "$ref": "#/components/schemas/Config"
  1453. }
  1454. }
  1455. }
  1456. }
  1457. },
  1458. "x-codeSamples": [
  1459. {
  1460. "lang": "js",
  1461. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.get({\n ...\n})"
  1462. }
  1463. ]
  1464. },
  1465. "patch": {
  1466. "operationId": "config.update",
  1467. "parameters": [
  1468. {
  1469. "in": "query",
  1470. "name": "directory",
  1471. "schema": {
  1472. "type": "string"
  1473. }
  1474. },
  1475. {
  1476. "in": "query",
  1477. "name": "workspace",
  1478. "schema": {
  1479. "type": "string"
  1480. }
  1481. }
  1482. ],
  1483. "summary": "Update configuration",
  1484. "description": "Update OpenCode configuration settings and preferences.",
  1485. "responses": {
  1486. "200": {
  1487. "description": "Successfully updated config",
  1488. "content": {
  1489. "application/json": {
  1490. "schema": {
  1491. "$ref": "#/components/schemas/Config"
  1492. }
  1493. }
  1494. }
  1495. },
  1496. "400": {
  1497. "description": "Bad request",
  1498. "content": {
  1499. "application/json": {
  1500. "schema": {
  1501. "$ref": "#/components/schemas/BadRequestError"
  1502. }
  1503. }
  1504. }
  1505. }
  1506. },
  1507. "requestBody": {
  1508. "content": {
  1509. "application/json": {
  1510. "schema": {
  1511. "$ref": "#/components/schemas/Config"
  1512. }
  1513. }
  1514. }
  1515. },
  1516. "x-codeSamples": [
  1517. {
  1518. "lang": "js",
  1519. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.update({\n ...\n})"
  1520. }
  1521. ]
  1522. }
  1523. },
  1524. "/config/providers": {
  1525. "get": {
  1526. "operationId": "config.providers",
  1527. "parameters": [
  1528. {
  1529. "in": "query",
  1530. "name": "directory",
  1531. "schema": {
  1532. "type": "string"
  1533. }
  1534. },
  1535. {
  1536. "in": "query",
  1537. "name": "workspace",
  1538. "schema": {
  1539. "type": "string"
  1540. }
  1541. }
  1542. ],
  1543. "summary": "List config providers",
  1544. "description": "Get a list of all configured AI providers and their default models.",
  1545. "responses": {
  1546. "200": {
  1547. "description": "List of providers",
  1548. "content": {
  1549. "application/json": {
  1550. "schema": {
  1551. "type": "object",
  1552. "properties": {
  1553. "providers": {
  1554. "type": "array",
  1555. "items": {
  1556. "$ref": "#/components/schemas/Provider"
  1557. }
  1558. },
  1559. "default": {
  1560. "type": "object",
  1561. "propertyNames": {
  1562. "type": "string"
  1563. },
  1564. "additionalProperties": {
  1565. "type": "string"
  1566. }
  1567. }
  1568. },
  1569. "required": ["providers", "default"]
  1570. }
  1571. }
  1572. }
  1573. }
  1574. },
  1575. "x-codeSamples": [
  1576. {
  1577. "lang": "js",
  1578. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.providers({\n ...\n})"
  1579. }
  1580. ]
  1581. }
  1582. },
  1583. "/experimental/console": {
  1584. "get": {
  1585. "operationId": "experimental.console.get",
  1586. "parameters": [
  1587. {
  1588. "in": "query",
  1589. "name": "directory",
  1590. "schema": {
  1591. "type": "string"
  1592. }
  1593. },
  1594. {
  1595. "in": "query",
  1596. "name": "workspace",
  1597. "schema": {
  1598. "type": "string"
  1599. }
  1600. }
  1601. ],
  1602. "summary": "Get active Console provider metadata",
  1603. "description": "Get the active Console org name and the set of provider IDs managed by that Console org.",
  1604. "responses": {
  1605. "200": {
  1606. "description": "Active Console provider metadata",
  1607. "content": {
  1608. "application/json": {
  1609. "schema": {
  1610. "$ref": "#/components/schemas/ConsoleState"
  1611. }
  1612. }
  1613. }
  1614. }
  1615. },
  1616. "x-codeSamples": [
  1617. {
  1618. "lang": "js",
  1619. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.get({\n ...\n})"
  1620. }
  1621. ]
  1622. }
  1623. },
  1624. "/experimental/console/orgs": {
  1625. "get": {
  1626. "operationId": "experimental.console.listOrgs",
  1627. "parameters": [
  1628. {
  1629. "in": "query",
  1630. "name": "directory",
  1631. "schema": {
  1632. "type": "string"
  1633. }
  1634. },
  1635. {
  1636. "in": "query",
  1637. "name": "workspace",
  1638. "schema": {
  1639. "type": "string"
  1640. }
  1641. }
  1642. ],
  1643. "summary": "List switchable Console orgs",
  1644. "description": "Get the available Console orgs across logged-in accounts, including the current active org.",
  1645. "responses": {
  1646. "200": {
  1647. "description": "Switchable Console orgs",
  1648. "content": {
  1649. "application/json": {
  1650. "schema": {
  1651. "type": "object",
  1652. "properties": {
  1653. "orgs": {
  1654. "type": "array",
  1655. "items": {
  1656. "type": "object",
  1657. "properties": {
  1658. "accountID": {
  1659. "type": "string"
  1660. },
  1661. "accountEmail": {
  1662. "type": "string"
  1663. },
  1664. "accountUrl": {
  1665. "type": "string"
  1666. },
  1667. "orgID": {
  1668. "type": "string"
  1669. },
  1670. "orgName": {
  1671. "type": "string"
  1672. },
  1673. "active": {
  1674. "type": "boolean"
  1675. }
  1676. },
  1677. "required": ["accountID", "accountEmail", "accountUrl", "orgID", "orgName", "active"]
  1678. }
  1679. }
  1680. },
  1681. "required": ["orgs"]
  1682. }
  1683. }
  1684. }
  1685. }
  1686. },
  1687. "x-codeSamples": [
  1688. {
  1689. "lang": "js",
  1690. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.listOrgs({\n ...\n})"
  1691. }
  1692. ]
  1693. }
  1694. },
  1695. "/experimental/console/switch": {
  1696. "post": {
  1697. "operationId": "experimental.console.switchOrg",
  1698. "parameters": [
  1699. {
  1700. "in": "query",
  1701. "name": "directory",
  1702. "schema": {
  1703. "type": "string"
  1704. }
  1705. },
  1706. {
  1707. "in": "query",
  1708. "name": "workspace",
  1709. "schema": {
  1710. "type": "string"
  1711. }
  1712. }
  1713. ],
  1714. "summary": "Switch active Console org",
  1715. "description": "Persist a new active Console account/org selection for the current local OpenCode state.",
  1716. "responses": {
  1717. "200": {
  1718. "description": "Switch success",
  1719. "content": {
  1720. "application/json": {
  1721. "schema": {
  1722. "type": "boolean"
  1723. }
  1724. }
  1725. }
  1726. }
  1727. },
  1728. "requestBody": {
  1729. "content": {
  1730. "application/json": {
  1731. "schema": {
  1732. "type": "object",
  1733. "properties": {
  1734. "accountID": {
  1735. "type": "string"
  1736. },
  1737. "orgID": {
  1738. "type": "string"
  1739. }
  1740. },
  1741. "required": ["accountID", "orgID"]
  1742. }
  1743. }
  1744. }
  1745. },
  1746. "x-codeSamples": [
  1747. {
  1748. "lang": "js",
  1749. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.switchOrg({\n ...\n})"
  1750. }
  1751. ]
  1752. }
  1753. },
  1754. "/experimental/tool/ids": {
  1755. "get": {
  1756. "operationId": "tool.ids",
  1757. "parameters": [
  1758. {
  1759. "in": "query",
  1760. "name": "directory",
  1761. "schema": {
  1762. "type": "string"
  1763. }
  1764. },
  1765. {
  1766. "in": "query",
  1767. "name": "workspace",
  1768. "schema": {
  1769. "type": "string"
  1770. }
  1771. }
  1772. ],
  1773. "summary": "List tool IDs",
  1774. "description": "Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.",
  1775. "responses": {
  1776. "200": {
  1777. "description": "Tool IDs",
  1778. "content": {
  1779. "application/json": {
  1780. "schema": {
  1781. "$ref": "#/components/schemas/ToolIDs"
  1782. }
  1783. }
  1784. }
  1785. },
  1786. "400": {
  1787. "description": "Bad request",
  1788. "content": {
  1789. "application/json": {
  1790. "schema": {
  1791. "$ref": "#/components/schemas/BadRequestError"
  1792. }
  1793. }
  1794. }
  1795. }
  1796. },
  1797. "x-codeSamples": [
  1798. {
  1799. "lang": "js",
  1800. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.ids({\n ...\n})"
  1801. }
  1802. ]
  1803. }
  1804. },
  1805. "/experimental/tool": {
  1806. "get": {
  1807. "operationId": "tool.list",
  1808. "parameters": [
  1809. {
  1810. "in": "query",
  1811. "name": "directory",
  1812. "schema": {
  1813. "type": "string"
  1814. }
  1815. },
  1816. {
  1817. "in": "query",
  1818. "name": "workspace",
  1819. "schema": {
  1820. "type": "string"
  1821. }
  1822. },
  1823. {
  1824. "in": "query",
  1825. "name": "provider",
  1826. "schema": {
  1827. "type": "string"
  1828. },
  1829. "required": true
  1830. },
  1831. {
  1832. "in": "query",
  1833. "name": "model",
  1834. "schema": {
  1835. "type": "string"
  1836. },
  1837. "required": true
  1838. }
  1839. ],
  1840. "summary": "List tools",
  1841. "description": "Get a list of available tools with their JSON schema parameters for a specific provider and model combination.",
  1842. "responses": {
  1843. "200": {
  1844. "description": "Tools",
  1845. "content": {
  1846. "application/json": {
  1847. "schema": {
  1848. "$ref": "#/components/schemas/ToolList"
  1849. }
  1850. }
  1851. }
  1852. },
  1853. "400": {
  1854. "description": "Bad request",
  1855. "content": {
  1856. "application/json": {
  1857. "schema": {
  1858. "$ref": "#/components/schemas/BadRequestError"
  1859. }
  1860. }
  1861. }
  1862. }
  1863. },
  1864. "x-codeSamples": [
  1865. {
  1866. "lang": "js",
  1867. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.list({\n ...\n})"
  1868. }
  1869. ]
  1870. }
  1871. },
  1872. "/experimental/worktree": {
  1873. "post": {
  1874. "operationId": "worktree.create",
  1875. "parameters": [
  1876. {
  1877. "in": "query",
  1878. "name": "directory",
  1879. "schema": {
  1880. "type": "string"
  1881. }
  1882. },
  1883. {
  1884. "in": "query",
  1885. "name": "workspace",
  1886. "schema": {
  1887. "type": "string"
  1888. }
  1889. }
  1890. ],
  1891. "summary": "Create worktree",
  1892. "description": "Create a new git worktree for the current project and run any configured startup scripts.",
  1893. "responses": {
  1894. "200": {
  1895. "description": "Worktree created",
  1896. "content": {
  1897. "application/json": {
  1898. "schema": {
  1899. "$ref": "#/components/schemas/Worktree"
  1900. }
  1901. }
  1902. }
  1903. },
  1904. "400": {
  1905. "description": "Bad request",
  1906. "content": {
  1907. "application/json": {
  1908. "schema": {
  1909. "$ref": "#/components/schemas/BadRequestError"
  1910. }
  1911. }
  1912. }
  1913. }
  1914. },
  1915. "requestBody": {
  1916. "content": {
  1917. "application/json": {
  1918. "schema": {
  1919. "$ref": "#/components/schemas/WorktreeCreateInput"
  1920. }
  1921. }
  1922. }
  1923. },
  1924. "x-codeSamples": [
  1925. {
  1926. "lang": "js",
  1927. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.create({\n ...\n})"
  1928. }
  1929. ]
  1930. },
  1931. "get": {
  1932. "operationId": "worktree.list",
  1933. "parameters": [
  1934. {
  1935. "in": "query",
  1936. "name": "directory",
  1937. "schema": {
  1938. "type": "string"
  1939. }
  1940. },
  1941. {
  1942. "in": "query",
  1943. "name": "workspace",
  1944. "schema": {
  1945. "type": "string"
  1946. }
  1947. }
  1948. ],
  1949. "summary": "List worktrees",
  1950. "description": "List all sandbox worktrees for the current project.",
  1951. "responses": {
  1952. "200": {
  1953. "description": "List of worktree directories",
  1954. "content": {
  1955. "application/json": {
  1956. "schema": {
  1957. "type": "array",
  1958. "items": {
  1959. "type": "string"
  1960. }
  1961. }
  1962. }
  1963. }
  1964. }
  1965. },
  1966. "x-codeSamples": [
  1967. {
  1968. "lang": "js",
  1969. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.list({\n ...\n})"
  1970. }
  1971. ]
  1972. },
  1973. "delete": {
  1974. "operationId": "worktree.remove",
  1975. "parameters": [
  1976. {
  1977. "in": "query",
  1978. "name": "directory",
  1979. "schema": {
  1980. "type": "string"
  1981. }
  1982. },
  1983. {
  1984. "in": "query",
  1985. "name": "workspace",
  1986. "schema": {
  1987. "type": "string"
  1988. }
  1989. }
  1990. ],
  1991. "summary": "Remove worktree",
  1992. "description": "Remove a git worktree and delete its branch.",
  1993. "responses": {
  1994. "200": {
  1995. "description": "Worktree removed",
  1996. "content": {
  1997. "application/json": {
  1998. "schema": {
  1999. "type": "boolean"
  2000. }
  2001. }
  2002. }
  2003. },
  2004. "400": {
  2005. "description": "Bad request",
  2006. "content": {
  2007. "application/json": {
  2008. "schema": {
  2009. "$ref": "#/components/schemas/BadRequestError"
  2010. }
  2011. }
  2012. }
  2013. }
  2014. },
  2015. "requestBody": {
  2016. "content": {
  2017. "application/json": {
  2018. "schema": {
  2019. "$ref": "#/components/schemas/WorktreeRemoveInput"
  2020. }
  2021. }
  2022. }
  2023. },
  2024. "x-codeSamples": [
  2025. {
  2026. "lang": "js",
  2027. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.remove({\n ...\n})"
  2028. }
  2029. ]
  2030. }
  2031. },
  2032. "/experimental/worktree/reset": {
  2033. "post": {
  2034. "operationId": "worktree.reset",
  2035. "parameters": [
  2036. {
  2037. "in": "query",
  2038. "name": "directory",
  2039. "schema": {
  2040. "type": "string"
  2041. }
  2042. },
  2043. {
  2044. "in": "query",
  2045. "name": "workspace",
  2046. "schema": {
  2047. "type": "string"
  2048. }
  2049. }
  2050. ],
  2051. "summary": "Reset worktree",
  2052. "description": "Reset a worktree branch to the primary default branch.",
  2053. "responses": {
  2054. "200": {
  2055. "description": "Worktree reset",
  2056. "content": {
  2057. "application/json": {
  2058. "schema": {
  2059. "type": "boolean"
  2060. }
  2061. }
  2062. }
  2063. },
  2064. "400": {
  2065. "description": "Bad request",
  2066. "content": {
  2067. "application/json": {
  2068. "schema": {
  2069. "$ref": "#/components/schemas/BadRequestError"
  2070. }
  2071. }
  2072. }
  2073. }
  2074. },
  2075. "requestBody": {
  2076. "content": {
  2077. "application/json": {
  2078. "schema": {
  2079. "$ref": "#/components/schemas/WorktreeResetInput"
  2080. }
  2081. }
  2082. }
  2083. },
  2084. "x-codeSamples": [
  2085. {
  2086. "lang": "js",
  2087. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.reset({\n ...\n})"
  2088. }
  2089. ]
  2090. }
  2091. },
  2092. "/experimental/session": {
  2093. "get": {
  2094. "operationId": "experimental.session.list",
  2095. "parameters": [
  2096. {
  2097. "in": "query",
  2098. "name": "directory",
  2099. "schema": {
  2100. "type": "string"
  2101. },
  2102. "description": "Filter sessions by project directory"
  2103. },
  2104. {
  2105. "in": "query",
  2106. "name": "workspace",
  2107. "schema": {
  2108. "type": "string"
  2109. }
  2110. },
  2111. {
  2112. "in": "query",
  2113. "name": "roots",
  2114. "schema": {
  2115. "type": "boolean"
  2116. },
  2117. "description": "Only return root sessions (no parentID)"
  2118. },
  2119. {
  2120. "in": "query",
  2121. "name": "start",
  2122. "schema": {
  2123. "type": "number"
  2124. },
  2125. "description": "Filter sessions updated on or after this timestamp (milliseconds since epoch)"
  2126. },
  2127. {
  2128. "in": "query",
  2129. "name": "cursor",
  2130. "schema": {
  2131. "type": "number"
  2132. },
  2133. "description": "Return sessions updated before this timestamp (milliseconds since epoch)"
  2134. },
  2135. {
  2136. "in": "query",
  2137. "name": "search",
  2138. "schema": {
  2139. "type": "string"
  2140. },
  2141. "description": "Filter sessions by title (case-insensitive)"
  2142. },
  2143. {
  2144. "in": "query",
  2145. "name": "limit",
  2146. "schema": {
  2147. "type": "number"
  2148. },
  2149. "description": "Maximum number of sessions to return"
  2150. },
  2151. {
  2152. "in": "query",
  2153. "name": "archived",
  2154. "schema": {
  2155. "type": "boolean"
  2156. },
  2157. "description": "Include archived sessions (default false)"
  2158. }
  2159. ],
  2160. "summary": "List sessions",
  2161. "description": "Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.",
  2162. "responses": {
  2163. "200": {
  2164. "description": "List of sessions",
  2165. "content": {
  2166. "application/json": {
  2167. "schema": {
  2168. "type": "array",
  2169. "items": {
  2170. "$ref": "#/components/schemas/GlobalSession"
  2171. }
  2172. }
  2173. }
  2174. }
  2175. }
  2176. },
  2177. "x-codeSamples": [
  2178. {
  2179. "lang": "js",
  2180. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.list({\n ...\n})"
  2181. }
  2182. ]
  2183. }
  2184. },
  2185. "/experimental/resource": {
  2186. "get": {
  2187. "operationId": "experimental.resource.list",
  2188. "parameters": [
  2189. {
  2190. "in": "query",
  2191. "name": "directory",
  2192. "schema": {
  2193. "type": "string"
  2194. }
  2195. },
  2196. {
  2197. "in": "query",
  2198. "name": "workspace",
  2199. "schema": {
  2200. "type": "string"
  2201. }
  2202. }
  2203. ],
  2204. "summary": "Get MCP resources",
  2205. "description": "Get all available MCP resources from connected servers. Optionally filter by name.",
  2206. "responses": {
  2207. "200": {
  2208. "description": "MCP resources",
  2209. "content": {
  2210. "application/json": {
  2211. "schema": {
  2212. "type": "object",
  2213. "propertyNames": {
  2214. "type": "string"
  2215. },
  2216. "additionalProperties": {
  2217. "$ref": "#/components/schemas/McpResource"
  2218. }
  2219. }
  2220. }
  2221. }
  2222. }
  2223. },
  2224. "x-codeSamples": [
  2225. {
  2226. "lang": "js",
  2227. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.resource.list({\n ...\n})"
  2228. }
  2229. ]
  2230. }
  2231. },
  2232. "/session": {
  2233. "get": {
  2234. "operationId": "session.list",
  2235. "parameters": [
  2236. {
  2237. "in": "query",
  2238. "name": "directory",
  2239. "schema": {
  2240. "type": "string"
  2241. },
  2242. "description": "Filter sessions by project directory"
  2243. },
  2244. {
  2245. "in": "query",
  2246. "name": "workspace",
  2247. "schema": {
  2248. "type": "string"
  2249. }
  2250. },
  2251. {
  2252. "in": "query",
  2253. "name": "roots",
  2254. "schema": {
  2255. "type": "boolean"
  2256. },
  2257. "description": "Only return root sessions (no parentID)"
  2258. },
  2259. {
  2260. "in": "query",
  2261. "name": "start",
  2262. "schema": {
  2263. "type": "number"
  2264. },
  2265. "description": "Filter sessions updated on or after this timestamp (milliseconds since epoch)"
  2266. },
  2267. {
  2268. "in": "query",
  2269. "name": "search",
  2270. "schema": {
  2271. "type": "string"
  2272. },
  2273. "description": "Filter sessions by title (case-insensitive)"
  2274. },
  2275. {
  2276. "in": "query",
  2277. "name": "limit",
  2278. "schema": {
  2279. "type": "number"
  2280. },
  2281. "description": "Maximum number of sessions to return"
  2282. }
  2283. ],
  2284. "summary": "List sessions",
  2285. "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
  2286. "responses": {
  2287. "200": {
  2288. "description": "List of sessions",
  2289. "content": {
  2290. "application/json": {
  2291. "schema": {
  2292. "type": "array",
  2293. "items": {
  2294. "$ref": "#/components/schemas/Session"
  2295. }
  2296. }
  2297. }
  2298. }
  2299. }
  2300. },
  2301. "x-codeSamples": [
  2302. {
  2303. "lang": "js",
  2304. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
  2305. }
  2306. ]
  2307. },
  2308. "post": {
  2309. "operationId": "session.create",
  2310. "parameters": [
  2311. {
  2312. "in": "query",
  2313. "name": "directory",
  2314. "schema": {
  2315. "type": "string"
  2316. }
  2317. },
  2318. {
  2319. "in": "query",
  2320. "name": "workspace",
  2321. "schema": {
  2322. "type": "string"
  2323. }
  2324. }
  2325. ],
  2326. "summary": "Create session",
  2327. "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
  2328. "responses": {
  2329. "200": {
  2330. "description": "Successfully created session",
  2331. "content": {
  2332. "application/json": {
  2333. "schema": {
  2334. "$ref": "#/components/schemas/Session"
  2335. }
  2336. }
  2337. }
  2338. },
  2339. "400": {
  2340. "description": "Bad request",
  2341. "content": {
  2342. "application/json": {
  2343. "schema": {
  2344. "$ref": "#/components/schemas/BadRequestError"
  2345. }
  2346. }
  2347. }
  2348. }
  2349. },
  2350. "requestBody": {
  2351. "content": {
  2352. "application/json": {
  2353. "schema": {
  2354. "type": "object",
  2355. "properties": {
  2356. "parentID": {
  2357. "type": "string",
  2358. "pattern": "^ses.*"
  2359. },
  2360. "title": {
  2361. "type": "string"
  2362. },
  2363. "permission": {
  2364. "$ref": "#/components/schemas/PermissionRuleset"
  2365. },
  2366. "workspaceID": {
  2367. "type": "string",
  2368. "pattern": "^wrk.*"
  2369. }
  2370. }
  2371. }
  2372. }
  2373. }
  2374. },
  2375. "x-codeSamples": [
  2376. {
  2377. "lang": "js",
  2378. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
  2379. }
  2380. ]
  2381. }
  2382. },
  2383. "/session/status": {
  2384. "get": {
  2385. "operationId": "session.status",
  2386. "parameters": [
  2387. {
  2388. "in": "query",
  2389. "name": "directory",
  2390. "schema": {
  2391. "type": "string"
  2392. }
  2393. },
  2394. {
  2395. "in": "query",
  2396. "name": "workspace",
  2397. "schema": {
  2398. "type": "string"
  2399. }
  2400. }
  2401. ],
  2402. "summary": "Get session status",
  2403. "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
  2404. "responses": {
  2405. "200": {
  2406. "description": "Get session status",
  2407. "content": {
  2408. "application/json": {
  2409. "schema": {
  2410. "type": "object",
  2411. "propertyNames": {
  2412. "type": "string"
  2413. },
  2414. "additionalProperties": {
  2415. "$ref": "#/components/schemas/SessionStatus"
  2416. }
  2417. }
  2418. }
  2419. }
  2420. },
  2421. "400": {
  2422. "description": "Bad request",
  2423. "content": {
  2424. "application/json": {
  2425. "schema": {
  2426. "$ref": "#/components/schemas/BadRequestError"
  2427. }
  2428. }
  2429. }
  2430. }
  2431. },
  2432. "x-codeSamples": [
  2433. {
  2434. "lang": "js",
  2435. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
  2436. }
  2437. ]
  2438. }
  2439. },
  2440. "/session/{sessionID}": {
  2441. "get": {
  2442. "operationId": "session.get",
  2443. "parameters": [
  2444. {
  2445. "in": "query",
  2446. "name": "directory",
  2447. "schema": {
  2448. "type": "string"
  2449. }
  2450. },
  2451. {
  2452. "in": "query",
  2453. "name": "workspace",
  2454. "schema": {
  2455. "type": "string"
  2456. }
  2457. },
  2458. {
  2459. "in": "path",
  2460. "name": "sessionID",
  2461. "schema": {
  2462. "type": "string",
  2463. "pattern": "^ses.*"
  2464. },
  2465. "required": true
  2466. }
  2467. ],
  2468. "summary": "Get session",
  2469. "description": "Retrieve detailed information about a specific OpenCode session.",
  2470. "tags": ["Session"],
  2471. "responses": {
  2472. "200": {
  2473. "description": "Get session",
  2474. "content": {
  2475. "application/json": {
  2476. "schema": {
  2477. "$ref": "#/components/schemas/Session"
  2478. }
  2479. }
  2480. }
  2481. },
  2482. "400": {
  2483. "description": "Bad request",
  2484. "content": {
  2485. "application/json": {
  2486. "schema": {
  2487. "$ref": "#/components/schemas/BadRequestError"
  2488. }
  2489. }
  2490. }
  2491. },
  2492. "404": {
  2493. "description": "Not found",
  2494. "content": {
  2495. "application/json": {
  2496. "schema": {
  2497. "$ref": "#/components/schemas/NotFoundError"
  2498. }
  2499. }
  2500. }
  2501. }
  2502. },
  2503. "x-codeSamples": [
  2504. {
  2505. "lang": "js",
  2506. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
  2507. }
  2508. ]
  2509. },
  2510. "delete": {
  2511. "operationId": "session.delete",
  2512. "parameters": [
  2513. {
  2514. "in": "query",
  2515. "name": "directory",
  2516. "schema": {
  2517. "type": "string"
  2518. }
  2519. },
  2520. {
  2521. "in": "query",
  2522. "name": "workspace",
  2523. "schema": {
  2524. "type": "string"
  2525. }
  2526. },
  2527. {
  2528. "in": "path",
  2529. "name": "sessionID",
  2530. "schema": {
  2531. "type": "string",
  2532. "pattern": "^ses.*"
  2533. },
  2534. "required": true
  2535. }
  2536. ],
  2537. "summary": "Delete session",
  2538. "description": "Delete a session and permanently remove all associated data, including messages and history.",
  2539. "responses": {
  2540. "200": {
  2541. "description": "Successfully deleted session",
  2542. "content": {
  2543. "application/json": {
  2544. "schema": {
  2545. "type": "boolean"
  2546. }
  2547. }
  2548. }
  2549. },
  2550. "400": {
  2551. "description": "Bad request",
  2552. "content": {
  2553. "application/json": {
  2554. "schema": {
  2555. "$ref": "#/components/schemas/BadRequestError"
  2556. }
  2557. }
  2558. }
  2559. },
  2560. "404": {
  2561. "description": "Not found",
  2562. "content": {
  2563. "application/json": {
  2564. "schema": {
  2565. "$ref": "#/components/schemas/NotFoundError"
  2566. }
  2567. }
  2568. }
  2569. }
  2570. },
  2571. "x-codeSamples": [
  2572. {
  2573. "lang": "js",
  2574. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
  2575. }
  2576. ]
  2577. },
  2578. "patch": {
  2579. "operationId": "session.update",
  2580. "parameters": [
  2581. {
  2582. "in": "query",
  2583. "name": "directory",
  2584. "schema": {
  2585. "type": "string"
  2586. }
  2587. },
  2588. {
  2589. "in": "query",
  2590. "name": "workspace",
  2591. "schema": {
  2592. "type": "string"
  2593. }
  2594. },
  2595. {
  2596. "in": "path",
  2597. "name": "sessionID",
  2598. "schema": {
  2599. "type": "string",
  2600. "pattern": "^ses.*"
  2601. },
  2602. "required": true
  2603. }
  2604. ],
  2605. "summary": "Update session",
  2606. "description": "Update properties of an existing session, such as title or other metadata.",
  2607. "responses": {
  2608. "200": {
  2609. "description": "Successfully updated session",
  2610. "content": {
  2611. "application/json": {
  2612. "schema": {
  2613. "$ref": "#/components/schemas/Session"
  2614. }
  2615. }
  2616. }
  2617. },
  2618. "400": {
  2619. "description": "Bad request",
  2620. "content": {
  2621. "application/json": {
  2622. "schema": {
  2623. "$ref": "#/components/schemas/BadRequestError"
  2624. }
  2625. }
  2626. }
  2627. },
  2628. "404": {
  2629. "description": "Not found",
  2630. "content": {
  2631. "application/json": {
  2632. "schema": {
  2633. "$ref": "#/components/schemas/NotFoundError"
  2634. }
  2635. }
  2636. }
  2637. }
  2638. },
  2639. "requestBody": {
  2640. "content": {
  2641. "application/json": {
  2642. "schema": {
  2643. "type": "object",
  2644. "properties": {
  2645. "title": {
  2646. "type": "string"
  2647. },
  2648. "permission": {
  2649. "$ref": "#/components/schemas/PermissionRuleset"
  2650. },
  2651. "time": {
  2652. "type": "object",
  2653. "properties": {
  2654. "archived": {
  2655. "type": "number"
  2656. }
  2657. }
  2658. }
  2659. }
  2660. }
  2661. }
  2662. }
  2663. },
  2664. "x-codeSamples": [
  2665. {
  2666. "lang": "js",
  2667. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
  2668. }
  2669. ]
  2670. }
  2671. },
  2672. "/session/{sessionID}/children": {
  2673. "get": {
  2674. "operationId": "session.children",
  2675. "parameters": [
  2676. {
  2677. "in": "query",
  2678. "name": "directory",
  2679. "schema": {
  2680. "type": "string"
  2681. }
  2682. },
  2683. {
  2684. "in": "query",
  2685. "name": "workspace",
  2686. "schema": {
  2687. "type": "string"
  2688. }
  2689. },
  2690. {
  2691. "in": "path",
  2692. "name": "sessionID",
  2693. "schema": {
  2694. "type": "string",
  2695. "pattern": "^ses.*"
  2696. },
  2697. "required": true
  2698. }
  2699. ],
  2700. "summary": "Get session children",
  2701. "tags": ["Session"],
  2702. "description": "Retrieve all child sessions that were forked from the specified parent session.",
  2703. "responses": {
  2704. "200": {
  2705. "description": "List of children",
  2706. "content": {
  2707. "application/json": {
  2708. "schema": {
  2709. "type": "array",
  2710. "items": {
  2711. "$ref": "#/components/schemas/Session"
  2712. }
  2713. }
  2714. }
  2715. }
  2716. },
  2717. "400": {
  2718. "description": "Bad request",
  2719. "content": {
  2720. "application/json": {
  2721. "schema": {
  2722. "$ref": "#/components/schemas/BadRequestError"
  2723. }
  2724. }
  2725. }
  2726. },
  2727. "404": {
  2728. "description": "Not found",
  2729. "content": {
  2730. "application/json": {
  2731. "schema": {
  2732. "$ref": "#/components/schemas/NotFoundError"
  2733. }
  2734. }
  2735. }
  2736. }
  2737. },
  2738. "x-codeSamples": [
  2739. {
  2740. "lang": "js",
  2741. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
  2742. }
  2743. ]
  2744. }
  2745. },
  2746. "/session/{sessionID}/todo": {
  2747. "get": {
  2748. "operationId": "session.todo",
  2749. "parameters": [
  2750. {
  2751. "in": "query",
  2752. "name": "directory",
  2753. "schema": {
  2754. "type": "string"
  2755. }
  2756. },
  2757. {
  2758. "in": "query",
  2759. "name": "workspace",
  2760. "schema": {
  2761. "type": "string"
  2762. }
  2763. },
  2764. {
  2765. "in": "path",
  2766. "name": "sessionID",
  2767. "schema": {
  2768. "type": "string",
  2769. "pattern": "^ses.*"
  2770. },
  2771. "required": true
  2772. }
  2773. ],
  2774. "summary": "Get session todos",
  2775. "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
  2776. "responses": {
  2777. "200": {
  2778. "description": "Todo list",
  2779. "content": {
  2780. "application/json": {
  2781. "schema": {
  2782. "type": "array",
  2783. "items": {
  2784. "$ref": "#/components/schemas/Todo"
  2785. }
  2786. }
  2787. }
  2788. }
  2789. },
  2790. "400": {
  2791. "description": "Bad request",
  2792. "content": {
  2793. "application/json": {
  2794. "schema": {
  2795. "$ref": "#/components/schemas/BadRequestError"
  2796. }
  2797. }
  2798. }
  2799. },
  2800. "404": {
  2801. "description": "Not found",
  2802. "content": {
  2803. "application/json": {
  2804. "schema": {
  2805. "$ref": "#/components/schemas/NotFoundError"
  2806. }
  2807. }
  2808. }
  2809. }
  2810. },
  2811. "x-codeSamples": [
  2812. {
  2813. "lang": "js",
  2814. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
  2815. }
  2816. ]
  2817. }
  2818. },
  2819. "/session/{sessionID}/init": {
  2820. "post": {
  2821. "operationId": "session.init",
  2822. "parameters": [
  2823. {
  2824. "in": "query",
  2825. "name": "directory",
  2826. "schema": {
  2827. "type": "string"
  2828. }
  2829. },
  2830. {
  2831. "in": "query",
  2832. "name": "workspace",
  2833. "schema": {
  2834. "type": "string"
  2835. }
  2836. },
  2837. {
  2838. "in": "path",
  2839. "name": "sessionID",
  2840. "schema": {
  2841. "type": "string",
  2842. "pattern": "^ses.*"
  2843. },
  2844. "required": true
  2845. }
  2846. ],
  2847. "summary": "Initialize session",
  2848. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  2849. "responses": {
  2850. "200": {
  2851. "description": "200",
  2852. "content": {
  2853. "application/json": {
  2854. "schema": {
  2855. "type": "boolean"
  2856. }
  2857. }
  2858. }
  2859. },
  2860. "400": {
  2861. "description": "Bad request",
  2862. "content": {
  2863. "application/json": {
  2864. "schema": {
  2865. "$ref": "#/components/schemas/BadRequestError"
  2866. }
  2867. }
  2868. }
  2869. },
  2870. "404": {
  2871. "description": "Not found",
  2872. "content": {
  2873. "application/json": {
  2874. "schema": {
  2875. "$ref": "#/components/schemas/NotFoundError"
  2876. }
  2877. }
  2878. }
  2879. }
  2880. },
  2881. "requestBody": {
  2882. "content": {
  2883. "application/json": {
  2884. "schema": {
  2885. "type": "object",
  2886. "properties": {
  2887. "modelID": {
  2888. "type": "string"
  2889. },
  2890. "providerID": {
  2891. "type": "string"
  2892. },
  2893. "messageID": {
  2894. "type": "string",
  2895. "pattern": "^msg.*"
  2896. }
  2897. },
  2898. "required": ["modelID", "providerID", "messageID"]
  2899. }
  2900. }
  2901. }
  2902. },
  2903. "x-codeSamples": [
  2904. {
  2905. "lang": "js",
  2906. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  2907. }
  2908. ]
  2909. }
  2910. },
  2911. "/session/{sessionID}/fork": {
  2912. "post": {
  2913. "operationId": "session.fork",
  2914. "parameters": [
  2915. {
  2916. "in": "query",
  2917. "name": "directory",
  2918. "schema": {
  2919. "type": "string"
  2920. }
  2921. },
  2922. {
  2923. "in": "query",
  2924. "name": "workspace",
  2925. "schema": {
  2926. "type": "string"
  2927. }
  2928. },
  2929. {
  2930. "in": "path",
  2931. "name": "sessionID",
  2932. "schema": {
  2933. "type": "string",
  2934. "pattern": "^ses.*"
  2935. },
  2936. "required": true
  2937. }
  2938. ],
  2939. "summary": "Fork session",
  2940. "description": "Create a new session by forking an existing session at a specific message point.",
  2941. "responses": {
  2942. "200": {
  2943. "description": "200",
  2944. "content": {
  2945. "application/json": {
  2946. "schema": {
  2947. "$ref": "#/components/schemas/Session"
  2948. }
  2949. }
  2950. }
  2951. }
  2952. },
  2953. "requestBody": {
  2954. "content": {
  2955. "application/json": {
  2956. "schema": {
  2957. "type": "object",
  2958. "properties": {
  2959. "messageID": {
  2960. "type": "string",
  2961. "pattern": "^msg.*"
  2962. }
  2963. }
  2964. }
  2965. }
  2966. }
  2967. },
  2968. "x-codeSamples": [
  2969. {
  2970. "lang": "js",
  2971. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  2972. }
  2973. ]
  2974. }
  2975. },
  2976. "/session/{sessionID}/abort": {
  2977. "post": {
  2978. "operationId": "session.abort",
  2979. "parameters": [
  2980. {
  2981. "in": "query",
  2982. "name": "directory",
  2983. "schema": {
  2984. "type": "string"
  2985. }
  2986. },
  2987. {
  2988. "in": "query",
  2989. "name": "workspace",
  2990. "schema": {
  2991. "type": "string"
  2992. }
  2993. },
  2994. {
  2995. "in": "path",
  2996. "name": "sessionID",
  2997. "schema": {
  2998. "type": "string",
  2999. "pattern": "^ses.*"
  3000. },
  3001. "required": true
  3002. }
  3003. ],
  3004. "summary": "Abort session",
  3005. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  3006. "responses": {
  3007. "200": {
  3008. "description": "Aborted session",
  3009. "content": {
  3010. "application/json": {
  3011. "schema": {
  3012. "type": "boolean"
  3013. }
  3014. }
  3015. }
  3016. },
  3017. "400": {
  3018. "description": "Bad request",
  3019. "content": {
  3020. "application/json": {
  3021. "schema": {
  3022. "$ref": "#/components/schemas/BadRequestError"
  3023. }
  3024. }
  3025. }
  3026. },
  3027. "404": {
  3028. "description": "Not found",
  3029. "content": {
  3030. "application/json": {
  3031. "schema": {
  3032. "$ref": "#/components/schemas/NotFoundError"
  3033. }
  3034. }
  3035. }
  3036. }
  3037. },
  3038. "x-codeSamples": [
  3039. {
  3040. "lang": "js",
  3041. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  3042. }
  3043. ]
  3044. }
  3045. },
  3046. "/session/{sessionID}/share": {
  3047. "post": {
  3048. "operationId": "session.share",
  3049. "parameters": [
  3050. {
  3051. "in": "query",
  3052. "name": "directory",
  3053. "schema": {
  3054. "type": "string"
  3055. }
  3056. },
  3057. {
  3058. "in": "query",
  3059. "name": "workspace",
  3060. "schema": {
  3061. "type": "string"
  3062. }
  3063. },
  3064. {
  3065. "in": "path",
  3066. "name": "sessionID",
  3067. "schema": {
  3068. "type": "string",
  3069. "pattern": "^ses.*"
  3070. },
  3071. "required": true
  3072. }
  3073. ],
  3074. "summary": "Share session",
  3075. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  3076. "responses": {
  3077. "200": {
  3078. "description": "Successfully shared session",
  3079. "content": {
  3080. "application/json": {
  3081. "schema": {
  3082. "$ref": "#/components/schemas/Session"
  3083. }
  3084. }
  3085. }
  3086. },
  3087. "400": {
  3088. "description": "Bad request",
  3089. "content": {
  3090. "application/json": {
  3091. "schema": {
  3092. "$ref": "#/components/schemas/BadRequestError"
  3093. }
  3094. }
  3095. }
  3096. },
  3097. "404": {
  3098. "description": "Not found",
  3099. "content": {
  3100. "application/json": {
  3101. "schema": {
  3102. "$ref": "#/components/schemas/NotFoundError"
  3103. }
  3104. }
  3105. }
  3106. }
  3107. },
  3108. "x-codeSamples": [
  3109. {
  3110. "lang": "js",
  3111. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  3112. }
  3113. ]
  3114. },
  3115. "delete": {
  3116. "operationId": "session.unshare",
  3117. "parameters": [
  3118. {
  3119. "in": "query",
  3120. "name": "directory",
  3121. "schema": {
  3122. "type": "string"
  3123. }
  3124. },
  3125. {
  3126. "in": "query",
  3127. "name": "workspace",
  3128. "schema": {
  3129. "type": "string"
  3130. }
  3131. },
  3132. {
  3133. "in": "path",
  3134. "name": "sessionID",
  3135. "schema": {
  3136. "type": "string",
  3137. "pattern": "^ses.*"
  3138. },
  3139. "required": true
  3140. }
  3141. ],
  3142. "summary": "Unshare session",
  3143. "description": "Remove the shareable link for a session, making it private again.",
  3144. "responses": {
  3145. "200": {
  3146. "description": "Successfully unshared session",
  3147. "content": {
  3148. "application/json": {
  3149. "schema": {
  3150. "$ref": "#/components/schemas/Session"
  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. "404": {
  3166. "description": "Not found",
  3167. "content": {
  3168. "application/json": {
  3169. "schema": {
  3170. "$ref": "#/components/schemas/NotFoundError"
  3171. }
  3172. }
  3173. }
  3174. }
  3175. },
  3176. "x-codeSamples": [
  3177. {
  3178. "lang": "js",
  3179. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  3180. }
  3181. ]
  3182. }
  3183. },
  3184. "/session/{sessionID}/diff": {
  3185. "get": {
  3186. "operationId": "session.diff",
  3187. "parameters": [
  3188. {
  3189. "in": "query",
  3190. "name": "directory",
  3191. "schema": {
  3192. "type": "string"
  3193. }
  3194. },
  3195. {
  3196. "in": "query",
  3197. "name": "workspace",
  3198. "schema": {
  3199. "type": "string"
  3200. }
  3201. },
  3202. {
  3203. "in": "path",
  3204. "name": "sessionID",
  3205. "schema": {
  3206. "type": "string",
  3207. "pattern": "^ses.*"
  3208. },
  3209. "required": true
  3210. },
  3211. {
  3212. "in": "query",
  3213. "name": "messageID",
  3214. "schema": {
  3215. "type": "string",
  3216. "pattern": "^msg.*"
  3217. }
  3218. }
  3219. ],
  3220. "summary": "Get message diff",
  3221. "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
  3222. "responses": {
  3223. "200": {
  3224. "description": "Successfully retrieved diff",
  3225. "content": {
  3226. "application/json": {
  3227. "schema": {
  3228. "type": "array",
  3229. "items": {
  3230. "$ref": "#/components/schemas/SnapshotFileDiff"
  3231. }
  3232. }
  3233. }
  3234. }
  3235. }
  3236. },
  3237. "x-codeSamples": [
  3238. {
  3239. "lang": "js",
  3240. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
  3241. }
  3242. ]
  3243. }
  3244. },
  3245. "/session/{sessionID}/summarize": {
  3246. "post": {
  3247. "operationId": "session.summarize",
  3248. "parameters": [
  3249. {
  3250. "in": "query",
  3251. "name": "directory",
  3252. "schema": {
  3253. "type": "string"
  3254. }
  3255. },
  3256. {
  3257. "in": "query",
  3258. "name": "workspace",
  3259. "schema": {
  3260. "type": "string"
  3261. }
  3262. },
  3263. {
  3264. "in": "path",
  3265. "name": "sessionID",
  3266. "schema": {
  3267. "type": "string",
  3268. "pattern": "^ses.*"
  3269. },
  3270. "required": true
  3271. }
  3272. ],
  3273. "summary": "Summarize session",
  3274. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  3275. "responses": {
  3276. "200": {
  3277. "description": "Summarized session",
  3278. "content": {
  3279. "application/json": {
  3280. "schema": {
  3281. "type": "boolean"
  3282. }
  3283. }
  3284. }
  3285. },
  3286. "400": {
  3287. "description": "Bad request",
  3288. "content": {
  3289. "application/json": {
  3290. "schema": {
  3291. "$ref": "#/components/schemas/BadRequestError"
  3292. }
  3293. }
  3294. }
  3295. },
  3296. "404": {
  3297. "description": "Not found",
  3298. "content": {
  3299. "application/json": {
  3300. "schema": {
  3301. "$ref": "#/components/schemas/NotFoundError"
  3302. }
  3303. }
  3304. }
  3305. }
  3306. },
  3307. "requestBody": {
  3308. "content": {
  3309. "application/json": {
  3310. "schema": {
  3311. "type": "object",
  3312. "properties": {
  3313. "providerID": {
  3314. "type": "string"
  3315. },
  3316. "modelID": {
  3317. "type": "string"
  3318. },
  3319. "auto": {
  3320. "default": false,
  3321. "type": "boolean"
  3322. }
  3323. },
  3324. "required": ["providerID", "modelID"]
  3325. }
  3326. }
  3327. }
  3328. },
  3329. "x-codeSamples": [
  3330. {
  3331. "lang": "js",
  3332. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  3333. }
  3334. ]
  3335. }
  3336. },
  3337. "/session/{sessionID}/message": {
  3338. "get": {
  3339. "operationId": "session.messages",
  3340. "parameters": [
  3341. {
  3342. "in": "query",
  3343. "name": "directory",
  3344. "schema": {
  3345. "type": "string"
  3346. }
  3347. },
  3348. {
  3349. "in": "query",
  3350. "name": "workspace",
  3351. "schema": {
  3352. "type": "string"
  3353. }
  3354. },
  3355. {
  3356. "in": "path",
  3357. "name": "sessionID",
  3358. "schema": {
  3359. "type": "string",
  3360. "pattern": "^ses.*"
  3361. },
  3362. "required": true
  3363. },
  3364. {
  3365. "in": "query",
  3366. "name": "limit",
  3367. "schema": {
  3368. "type": "integer",
  3369. "minimum": 0,
  3370. "maximum": 9007199254740991
  3371. },
  3372. "description": "Maximum number of messages to return"
  3373. },
  3374. {
  3375. "in": "query",
  3376. "name": "before",
  3377. "schema": {
  3378. "type": "string"
  3379. }
  3380. }
  3381. ],
  3382. "summary": "Get session messages",
  3383. "description": "Retrieve all messages in a session, including user prompts and AI responses.",
  3384. "responses": {
  3385. "200": {
  3386. "description": "List of messages",
  3387. "content": {
  3388. "application/json": {
  3389. "schema": {
  3390. "type": "array",
  3391. "items": {
  3392. "type": "object",
  3393. "properties": {
  3394. "info": {
  3395. "$ref": "#/components/schemas/Message"
  3396. },
  3397. "parts": {
  3398. "type": "array",
  3399. "items": {
  3400. "$ref": "#/components/schemas/Part"
  3401. }
  3402. }
  3403. },
  3404. "required": ["info", "parts"]
  3405. }
  3406. }
  3407. }
  3408. }
  3409. },
  3410. "400": {
  3411. "description": "Bad request",
  3412. "content": {
  3413. "application/json": {
  3414. "schema": {
  3415. "$ref": "#/components/schemas/BadRequestError"
  3416. }
  3417. }
  3418. }
  3419. },
  3420. "404": {
  3421. "description": "Not found",
  3422. "content": {
  3423. "application/json": {
  3424. "schema": {
  3425. "$ref": "#/components/schemas/NotFoundError"
  3426. }
  3427. }
  3428. }
  3429. }
  3430. },
  3431. "x-codeSamples": [
  3432. {
  3433. "lang": "js",
  3434. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
  3435. }
  3436. ]
  3437. },
  3438. "post": {
  3439. "operationId": "session.prompt",
  3440. "parameters": [
  3441. {
  3442. "in": "query",
  3443. "name": "directory",
  3444. "schema": {
  3445. "type": "string"
  3446. }
  3447. },
  3448. {
  3449. "in": "query",
  3450. "name": "workspace",
  3451. "schema": {
  3452. "type": "string"
  3453. }
  3454. },
  3455. {
  3456. "in": "path",
  3457. "name": "sessionID",
  3458. "schema": {
  3459. "type": "string",
  3460. "pattern": "^ses.*"
  3461. },
  3462. "required": true
  3463. }
  3464. ],
  3465. "summary": "Send message",
  3466. "description": "Create and send a new message to a session, streaming the AI response.",
  3467. "responses": {
  3468. "200": {
  3469. "description": "Created message",
  3470. "content": {
  3471. "application/json": {
  3472. "schema": {
  3473. "type": "object",
  3474. "properties": {
  3475. "info": {
  3476. "$ref": "#/components/schemas/AssistantMessage"
  3477. },
  3478. "parts": {
  3479. "type": "array",
  3480. "items": {
  3481. "$ref": "#/components/schemas/Part"
  3482. }
  3483. }
  3484. },
  3485. "required": ["info", "parts"]
  3486. }
  3487. }
  3488. }
  3489. },
  3490. "400": {
  3491. "description": "Bad request",
  3492. "content": {
  3493. "application/json": {
  3494. "schema": {
  3495. "$ref": "#/components/schemas/BadRequestError"
  3496. }
  3497. }
  3498. }
  3499. },
  3500. "404": {
  3501. "description": "Not found",
  3502. "content": {
  3503. "application/json": {
  3504. "schema": {
  3505. "$ref": "#/components/schemas/NotFoundError"
  3506. }
  3507. }
  3508. }
  3509. }
  3510. },
  3511. "requestBody": {
  3512. "content": {
  3513. "application/json": {
  3514. "schema": {
  3515. "type": "object",
  3516. "properties": {
  3517. "messageID": {
  3518. "type": "string",
  3519. "pattern": "^msg.*"
  3520. },
  3521. "model": {
  3522. "type": "object",
  3523. "properties": {
  3524. "providerID": {
  3525. "type": "string"
  3526. },
  3527. "modelID": {
  3528. "type": "string"
  3529. }
  3530. },
  3531. "required": ["providerID", "modelID"]
  3532. },
  3533. "agent": {
  3534. "type": "string"
  3535. },
  3536. "noReply": {
  3537. "type": "boolean"
  3538. },
  3539. "tools": {
  3540. "description": "@deprecated tools and permissions have been merged, you can set permissions on the session itself now",
  3541. "type": "object",
  3542. "propertyNames": {
  3543. "type": "string"
  3544. },
  3545. "additionalProperties": {
  3546. "type": "boolean"
  3547. }
  3548. },
  3549. "format": {
  3550. "$ref": "#/components/schemas/OutputFormat"
  3551. },
  3552. "system": {
  3553. "type": "string"
  3554. },
  3555. "variant": {
  3556. "type": "string"
  3557. },
  3558. "parts": {
  3559. "type": "array",
  3560. "items": {
  3561. "anyOf": [
  3562. {
  3563. "$ref": "#/components/schemas/TextPartInput"
  3564. },
  3565. {
  3566. "$ref": "#/components/schemas/FilePartInput"
  3567. },
  3568. {
  3569. "$ref": "#/components/schemas/AgentPartInput"
  3570. },
  3571. {
  3572. "$ref": "#/components/schemas/SubtaskPartInput"
  3573. }
  3574. ]
  3575. }
  3576. }
  3577. },
  3578. "required": ["parts"]
  3579. }
  3580. }
  3581. }
  3582. },
  3583. "x-codeSamples": [
  3584. {
  3585. "lang": "js",
  3586. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  3587. }
  3588. ]
  3589. }
  3590. },
  3591. "/session/{sessionID}/message/{messageID}": {
  3592. "get": {
  3593. "operationId": "session.message",
  3594. "parameters": [
  3595. {
  3596. "in": "query",
  3597. "name": "directory",
  3598. "schema": {
  3599. "type": "string"
  3600. }
  3601. },
  3602. {
  3603. "in": "query",
  3604. "name": "workspace",
  3605. "schema": {
  3606. "type": "string"
  3607. }
  3608. },
  3609. {
  3610. "in": "path",
  3611. "name": "sessionID",
  3612. "schema": {
  3613. "type": "string",
  3614. "pattern": "^ses.*"
  3615. },
  3616. "required": true
  3617. },
  3618. {
  3619. "in": "path",
  3620. "name": "messageID",
  3621. "schema": {
  3622. "type": "string",
  3623. "pattern": "^msg.*"
  3624. },
  3625. "required": true
  3626. }
  3627. ],
  3628. "summary": "Get message",
  3629. "description": "Retrieve a specific message from a session by its message ID.",
  3630. "responses": {
  3631. "200": {
  3632. "description": "Message",
  3633. "content": {
  3634. "application/json": {
  3635. "schema": {
  3636. "type": "object",
  3637. "properties": {
  3638. "info": {
  3639. "$ref": "#/components/schemas/Message"
  3640. },
  3641. "parts": {
  3642. "type": "array",
  3643. "items": {
  3644. "$ref": "#/components/schemas/Part"
  3645. }
  3646. }
  3647. },
  3648. "required": ["info", "parts"]
  3649. }
  3650. }
  3651. }
  3652. },
  3653. "400": {
  3654. "description": "Bad request",
  3655. "content": {
  3656. "application/json": {
  3657. "schema": {
  3658. "$ref": "#/components/schemas/BadRequestError"
  3659. }
  3660. }
  3661. }
  3662. },
  3663. "404": {
  3664. "description": "Not found",
  3665. "content": {
  3666. "application/json": {
  3667. "schema": {
  3668. "$ref": "#/components/schemas/NotFoundError"
  3669. }
  3670. }
  3671. }
  3672. }
  3673. },
  3674. "x-codeSamples": [
  3675. {
  3676. "lang": "js",
  3677. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  3678. }
  3679. ]
  3680. },
  3681. "delete": {
  3682. "operationId": "session.deleteMessage",
  3683. "parameters": [
  3684. {
  3685. "in": "query",
  3686. "name": "directory",
  3687. "schema": {
  3688. "type": "string"
  3689. }
  3690. },
  3691. {
  3692. "in": "query",
  3693. "name": "workspace",
  3694. "schema": {
  3695. "type": "string"
  3696. }
  3697. },
  3698. {
  3699. "in": "path",
  3700. "name": "sessionID",
  3701. "schema": {
  3702. "type": "string",
  3703. "pattern": "^ses.*"
  3704. },
  3705. "required": true
  3706. },
  3707. {
  3708. "in": "path",
  3709. "name": "messageID",
  3710. "schema": {
  3711. "type": "string",
  3712. "pattern": "^msg.*"
  3713. },
  3714. "required": true
  3715. }
  3716. ],
  3717. "summary": "Delete message",
  3718. "description": "Permanently delete a specific message (and all of its parts) from a session. This does not revert any file changes that may have been made while processing the message.",
  3719. "responses": {
  3720. "200": {
  3721. "description": "Successfully deleted message",
  3722. "content": {
  3723. "application/json": {
  3724. "schema": {
  3725. "type": "boolean"
  3726. }
  3727. }
  3728. }
  3729. },
  3730. "400": {
  3731. "description": "Bad request",
  3732. "content": {
  3733. "application/json": {
  3734. "schema": {
  3735. "$ref": "#/components/schemas/BadRequestError"
  3736. }
  3737. }
  3738. }
  3739. },
  3740. "404": {
  3741. "description": "Not found",
  3742. "content": {
  3743. "application/json": {
  3744. "schema": {
  3745. "$ref": "#/components/schemas/NotFoundError"
  3746. }
  3747. }
  3748. }
  3749. }
  3750. },
  3751. "x-codeSamples": [
  3752. {
  3753. "lang": "js",
  3754. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.deleteMessage({\n ...\n})"
  3755. }
  3756. ]
  3757. }
  3758. },
  3759. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  3760. "delete": {
  3761. "operationId": "part.delete",
  3762. "parameters": [
  3763. {
  3764. "in": "query",
  3765. "name": "directory",
  3766. "schema": {
  3767. "type": "string"
  3768. }
  3769. },
  3770. {
  3771. "in": "query",
  3772. "name": "workspace",
  3773. "schema": {
  3774. "type": "string"
  3775. }
  3776. },
  3777. {
  3778. "in": "path",
  3779. "name": "sessionID",
  3780. "schema": {
  3781. "type": "string",
  3782. "pattern": "^ses.*"
  3783. },
  3784. "required": true
  3785. },
  3786. {
  3787. "in": "path",
  3788. "name": "messageID",
  3789. "schema": {
  3790. "type": "string",
  3791. "pattern": "^msg.*"
  3792. },
  3793. "required": true
  3794. },
  3795. {
  3796. "in": "path",
  3797. "name": "partID",
  3798. "schema": {
  3799. "type": "string",
  3800. "pattern": "^prt.*"
  3801. },
  3802. "required": true
  3803. }
  3804. ],
  3805. "description": "Delete a part from a message",
  3806. "responses": {
  3807. "200": {
  3808. "description": "Successfully deleted part",
  3809. "content": {
  3810. "application/json": {
  3811. "schema": {
  3812. "type": "boolean"
  3813. }
  3814. }
  3815. }
  3816. },
  3817. "400": {
  3818. "description": "Bad request",
  3819. "content": {
  3820. "application/json": {
  3821. "schema": {
  3822. "$ref": "#/components/schemas/BadRequestError"
  3823. }
  3824. }
  3825. }
  3826. },
  3827. "404": {
  3828. "description": "Not found",
  3829. "content": {
  3830. "application/json": {
  3831. "schema": {
  3832. "$ref": "#/components/schemas/NotFoundError"
  3833. }
  3834. }
  3835. }
  3836. }
  3837. },
  3838. "x-codeSamples": [
  3839. {
  3840. "lang": "js",
  3841. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  3842. }
  3843. ]
  3844. },
  3845. "patch": {
  3846. "operationId": "part.update",
  3847. "parameters": [
  3848. {
  3849. "in": "query",
  3850. "name": "directory",
  3851. "schema": {
  3852. "type": "string"
  3853. }
  3854. },
  3855. {
  3856. "in": "query",
  3857. "name": "workspace",
  3858. "schema": {
  3859. "type": "string"
  3860. }
  3861. },
  3862. {
  3863. "in": "path",
  3864. "name": "sessionID",
  3865. "schema": {
  3866. "type": "string",
  3867. "pattern": "^ses.*"
  3868. },
  3869. "required": true
  3870. },
  3871. {
  3872. "in": "path",
  3873. "name": "messageID",
  3874. "schema": {
  3875. "type": "string",
  3876. "pattern": "^msg.*"
  3877. },
  3878. "required": true
  3879. },
  3880. {
  3881. "in": "path",
  3882. "name": "partID",
  3883. "schema": {
  3884. "type": "string",
  3885. "pattern": "^prt.*"
  3886. },
  3887. "required": true
  3888. }
  3889. ],
  3890. "description": "Update a part in a message",
  3891. "responses": {
  3892. "200": {
  3893. "description": "Successfully updated part",
  3894. "content": {
  3895. "application/json": {
  3896. "schema": {
  3897. "$ref": "#/components/schemas/Part"
  3898. }
  3899. }
  3900. }
  3901. },
  3902. "400": {
  3903. "description": "Bad request",
  3904. "content": {
  3905. "application/json": {
  3906. "schema": {
  3907. "$ref": "#/components/schemas/BadRequestError"
  3908. }
  3909. }
  3910. }
  3911. },
  3912. "404": {
  3913. "description": "Not found",
  3914. "content": {
  3915. "application/json": {
  3916. "schema": {
  3917. "$ref": "#/components/schemas/NotFoundError"
  3918. }
  3919. }
  3920. }
  3921. }
  3922. },
  3923. "requestBody": {
  3924. "content": {
  3925. "application/json": {
  3926. "schema": {
  3927. "$ref": "#/components/schemas/Part"
  3928. }
  3929. }
  3930. }
  3931. },
  3932. "x-codeSamples": [
  3933. {
  3934. "lang": "js",
  3935. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  3936. }
  3937. ]
  3938. }
  3939. },
  3940. "/session/{sessionID}/prompt_async": {
  3941. "post": {
  3942. "operationId": "session.prompt_async",
  3943. "parameters": [
  3944. {
  3945. "in": "query",
  3946. "name": "directory",
  3947. "schema": {
  3948. "type": "string"
  3949. }
  3950. },
  3951. {
  3952. "in": "query",
  3953. "name": "workspace",
  3954. "schema": {
  3955. "type": "string"
  3956. }
  3957. },
  3958. {
  3959. "in": "path",
  3960. "name": "sessionID",
  3961. "schema": {
  3962. "type": "string",
  3963. "pattern": "^ses.*"
  3964. },
  3965. "required": true
  3966. }
  3967. ],
  3968. "summary": "Send async message",
  3969. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  3970. "responses": {
  3971. "204": {
  3972. "description": "Prompt accepted"
  3973. },
  3974. "400": {
  3975. "description": "Bad request",
  3976. "content": {
  3977. "application/json": {
  3978. "schema": {
  3979. "$ref": "#/components/schemas/BadRequestError"
  3980. }
  3981. }
  3982. }
  3983. },
  3984. "404": {
  3985. "description": "Not found",
  3986. "content": {
  3987. "application/json": {
  3988. "schema": {
  3989. "$ref": "#/components/schemas/NotFoundError"
  3990. }
  3991. }
  3992. }
  3993. }
  3994. },
  3995. "requestBody": {
  3996. "content": {
  3997. "application/json": {
  3998. "schema": {
  3999. "type": "object",
  4000. "properties": {
  4001. "messageID": {
  4002. "type": "string",
  4003. "pattern": "^msg.*"
  4004. },
  4005. "model": {
  4006. "type": "object",
  4007. "properties": {
  4008. "providerID": {
  4009. "type": "string"
  4010. },
  4011. "modelID": {
  4012. "type": "string"
  4013. }
  4014. },
  4015. "required": ["providerID", "modelID"]
  4016. },
  4017. "agent": {
  4018. "type": "string"
  4019. },
  4020. "noReply": {
  4021. "type": "boolean"
  4022. },
  4023. "tools": {
  4024. "description": "@deprecated tools and permissions have been merged, you can set permissions on the session itself now",
  4025. "type": "object",
  4026. "propertyNames": {
  4027. "type": "string"
  4028. },
  4029. "additionalProperties": {
  4030. "type": "boolean"
  4031. }
  4032. },
  4033. "format": {
  4034. "$ref": "#/components/schemas/OutputFormat"
  4035. },
  4036. "system": {
  4037. "type": "string"
  4038. },
  4039. "variant": {
  4040. "type": "string"
  4041. },
  4042. "parts": {
  4043. "type": "array",
  4044. "items": {
  4045. "anyOf": [
  4046. {
  4047. "$ref": "#/components/schemas/TextPartInput"
  4048. },
  4049. {
  4050. "$ref": "#/components/schemas/FilePartInput"
  4051. },
  4052. {
  4053. "$ref": "#/components/schemas/AgentPartInput"
  4054. },
  4055. {
  4056. "$ref": "#/components/schemas/SubtaskPartInput"
  4057. }
  4058. ]
  4059. }
  4060. }
  4061. },
  4062. "required": ["parts"]
  4063. }
  4064. }
  4065. }
  4066. },
  4067. "x-codeSamples": [
  4068. {
  4069. "lang": "js",
  4070. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  4071. }
  4072. ]
  4073. }
  4074. },
  4075. "/session/{sessionID}/command": {
  4076. "post": {
  4077. "operationId": "session.command",
  4078. "parameters": [
  4079. {
  4080. "in": "query",
  4081. "name": "directory",
  4082. "schema": {
  4083. "type": "string"
  4084. }
  4085. },
  4086. {
  4087. "in": "query",
  4088. "name": "workspace",
  4089. "schema": {
  4090. "type": "string"
  4091. }
  4092. },
  4093. {
  4094. "in": "path",
  4095. "name": "sessionID",
  4096. "schema": {
  4097. "type": "string",
  4098. "pattern": "^ses.*"
  4099. },
  4100. "required": true
  4101. }
  4102. ],
  4103. "summary": "Send command",
  4104. "description": "Send a new command to a session for execution by the AI assistant.",
  4105. "responses": {
  4106. "200": {
  4107. "description": "Created message",
  4108. "content": {
  4109. "application/json": {
  4110. "schema": {
  4111. "type": "object",
  4112. "properties": {
  4113. "info": {
  4114. "$ref": "#/components/schemas/AssistantMessage"
  4115. },
  4116. "parts": {
  4117. "type": "array",
  4118. "items": {
  4119. "$ref": "#/components/schemas/Part"
  4120. }
  4121. }
  4122. },
  4123. "required": ["info", "parts"]
  4124. }
  4125. }
  4126. }
  4127. },
  4128. "400": {
  4129. "description": "Bad request",
  4130. "content": {
  4131. "application/json": {
  4132. "schema": {
  4133. "$ref": "#/components/schemas/BadRequestError"
  4134. }
  4135. }
  4136. }
  4137. },
  4138. "404": {
  4139. "description": "Not found",
  4140. "content": {
  4141. "application/json": {
  4142. "schema": {
  4143. "$ref": "#/components/schemas/NotFoundError"
  4144. }
  4145. }
  4146. }
  4147. }
  4148. },
  4149. "requestBody": {
  4150. "content": {
  4151. "application/json": {
  4152. "schema": {
  4153. "type": "object",
  4154. "properties": {
  4155. "messageID": {
  4156. "type": "string",
  4157. "pattern": "^msg.*"
  4158. },
  4159. "agent": {
  4160. "type": "string"
  4161. },
  4162. "model": {
  4163. "type": "string"
  4164. },
  4165. "arguments": {
  4166. "type": "string"
  4167. },
  4168. "command": {
  4169. "type": "string"
  4170. },
  4171. "variant": {
  4172. "type": "string"
  4173. },
  4174. "parts": {
  4175. "type": "array",
  4176. "items": {
  4177. "type": "object",
  4178. "properties": {
  4179. "id": {
  4180. "type": "string",
  4181. "pattern": "^prt.*"
  4182. },
  4183. "type": {
  4184. "type": "string",
  4185. "const": "file"
  4186. },
  4187. "mime": {
  4188. "type": "string"
  4189. },
  4190. "filename": {
  4191. "type": "string"
  4192. },
  4193. "url": {
  4194. "type": "string"
  4195. },
  4196. "source": {
  4197. "$ref": "#/components/schemas/FilePartSource"
  4198. }
  4199. },
  4200. "required": ["type", "mime", "url"]
  4201. }
  4202. }
  4203. },
  4204. "required": ["arguments", "command"]
  4205. }
  4206. }
  4207. }
  4208. },
  4209. "x-codeSamples": [
  4210. {
  4211. "lang": "js",
  4212. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  4213. }
  4214. ]
  4215. }
  4216. },
  4217. "/session/{sessionID}/shell": {
  4218. "post": {
  4219. "operationId": "session.shell",
  4220. "parameters": [
  4221. {
  4222. "in": "query",
  4223. "name": "directory",
  4224. "schema": {
  4225. "type": "string"
  4226. }
  4227. },
  4228. {
  4229. "in": "query",
  4230. "name": "workspace",
  4231. "schema": {
  4232. "type": "string"
  4233. }
  4234. },
  4235. {
  4236. "in": "path",
  4237. "name": "sessionID",
  4238. "schema": {
  4239. "type": "string",
  4240. "pattern": "^ses.*"
  4241. },
  4242. "required": true
  4243. }
  4244. ],
  4245. "summary": "Run shell command",
  4246. "description": "Execute a shell command within the session context and return the AI's response.",
  4247. "responses": {
  4248. "200": {
  4249. "description": "Created message",
  4250. "content": {
  4251. "application/json": {
  4252. "schema": {
  4253. "type": "object",
  4254. "properties": {
  4255. "info": {
  4256. "$ref": "#/components/schemas/Message"
  4257. },
  4258. "parts": {
  4259. "type": "array",
  4260. "items": {
  4261. "$ref": "#/components/schemas/Part"
  4262. }
  4263. }
  4264. },
  4265. "required": ["info", "parts"]
  4266. }
  4267. }
  4268. }
  4269. },
  4270. "400": {
  4271. "description": "Bad request",
  4272. "content": {
  4273. "application/json": {
  4274. "schema": {
  4275. "$ref": "#/components/schemas/BadRequestError"
  4276. }
  4277. }
  4278. }
  4279. },
  4280. "404": {
  4281. "description": "Not found",
  4282. "content": {
  4283. "application/json": {
  4284. "schema": {
  4285. "$ref": "#/components/schemas/NotFoundError"
  4286. }
  4287. }
  4288. }
  4289. }
  4290. },
  4291. "requestBody": {
  4292. "content": {
  4293. "application/json": {
  4294. "schema": {
  4295. "type": "object",
  4296. "properties": {
  4297. "messageID": {
  4298. "type": "string",
  4299. "pattern": "^msg.*"
  4300. },
  4301. "agent": {
  4302. "type": "string"
  4303. },
  4304. "model": {
  4305. "type": "object",
  4306. "properties": {
  4307. "providerID": {
  4308. "type": "string"
  4309. },
  4310. "modelID": {
  4311. "type": "string"
  4312. }
  4313. },
  4314. "required": ["providerID", "modelID"]
  4315. },
  4316. "command": {
  4317. "type": "string"
  4318. }
  4319. },
  4320. "required": ["agent", "command"]
  4321. }
  4322. }
  4323. }
  4324. },
  4325. "x-codeSamples": [
  4326. {
  4327. "lang": "js",
  4328. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  4329. }
  4330. ]
  4331. }
  4332. },
  4333. "/session/{sessionID}/revert": {
  4334. "post": {
  4335. "operationId": "session.revert",
  4336. "parameters": [
  4337. {
  4338. "in": "query",
  4339. "name": "directory",
  4340. "schema": {
  4341. "type": "string"
  4342. }
  4343. },
  4344. {
  4345. "in": "query",
  4346. "name": "workspace",
  4347. "schema": {
  4348. "type": "string"
  4349. }
  4350. },
  4351. {
  4352. "in": "path",
  4353. "name": "sessionID",
  4354. "schema": {
  4355. "type": "string",
  4356. "pattern": "^ses.*"
  4357. },
  4358. "required": true
  4359. }
  4360. ],
  4361. "summary": "Revert message",
  4362. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  4363. "responses": {
  4364. "200": {
  4365. "description": "Updated session",
  4366. "content": {
  4367. "application/json": {
  4368. "schema": {
  4369. "$ref": "#/components/schemas/Session"
  4370. }
  4371. }
  4372. }
  4373. },
  4374. "400": {
  4375. "description": "Bad request",
  4376. "content": {
  4377. "application/json": {
  4378. "schema": {
  4379. "$ref": "#/components/schemas/BadRequestError"
  4380. }
  4381. }
  4382. }
  4383. },
  4384. "404": {
  4385. "description": "Not found",
  4386. "content": {
  4387. "application/json": {
  4388. "schema": {
  4389. "$ref": "#/components/schemas/NotFoundError"
  4390. }
  4391. }
  4392. }
  4393. }
  4394. },
  4395. "requestBody": {
  4396. "content": {
  4397. "application/json": {
  4398. "schema": {
  4399. "type": "object",
  4400. "properties": {
  4401. "messageID": {
  4402. "type": "string",
  4403. "pattern": "^msg.*"
  4404. },
  4405. "partID": {
  4406. "type": "string",
  4407. "pattern": "^prt.*"
  4408. }
  4409. },
  4410. "required": ["messageID"]
  4411. }
  4412. }
  4413. }
  4414. },
  4415. "x-codeSamples": [
  4416. {
  4417. "lang": "js",
  4418. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  4419. }
  4420. ]
  4421. }
  4422. },
  4423. "/session/{sessionID}/unrevert": {
  4424. "post": {
  4425. "operationId": "session.unrevert",
  4426. "parameters": [
  4427. {
  4428. "in": "query",
  4429. "name": "directory",
  4430. "schema": {
  4431. "type": "string"
  4432. }
  4433. },
  4434. {
  4435. "in": "query",
  4436. "name": "workspace",
  4437. "schema": {
  4438. "type": "string"
  4439. }
  4440. },
  4441. {
  4442. "in": "path",
  4443. "name": "sessionID",
  4444. "schema": {
  4445. "type": "string",
  4446. "pattern": "^ses.*"
  4447. },
  4448. "required": true
  4449. }
  4450. ],
  4451. "summary": "Restore reverted messages",
  4452. "description": "Restore all previously reverted messages in a session.",
  4453. "responses": {
  4454. "200": {
  4455. "description": "Updated session",
  4456. "content": {
  4457. "application/json": {
  4458. "schema": {
  4459. "$ref": "#/components/schemas/Session"
  4460. }
  4461. }
  4462. }
  4463. },
  4464. "400": {
  4465. "description": "Bad request",
  4466. "content": {
  4467. "application/json": {
  4468. "schema": {
  4469. "$ref": "#/components/schemas/BadRequestError"
  4470. }
  4471. }
  4472. }
  4473. },
  4474. "404": {
  4475. "description": "Not found",
  4476. "content": {
  4477. "application/json": {
  4478. "schema": {
  4479. "$ref": "#/components/schemas/NotFoundError"
  4480. }
  4481. }
  4482. }
  4483. }
  4484. },
  4485. "x-codeSamples": [
  4486. {
  4487. "lang": "js",
  4488. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  4489. }
  4490. ]
  4491. }
  4492. },
  4493. "/session/{sessionID}/permissions/{permissionID}": {
  4494. "post": {
  4495. "operationId": "permission.respond",
  4496. "parameters": [
  4497. {
  4498. "in": "query",
  4499. "name": "directory",
  4500. "schema": {
  4501. "type": "string"
  4502. }
  4503. },
  4504. {
  4505. "in": "query",
  4506. "name": "workspace",
  4507. "schema": {
  4508. "type": "string"
  4509. }
  4510. },
  4511. {
  4512. "in": "path",
  4513. "name": "sessionID",
  4514. "schema": {
  4515. "type": "string",
  4516. "pattern": "^ses.*"
  4517. },
  4518. "required": true
  4519. },
  4520. {
  4521. "in": "path",
  4522. "name": "permissionID",
  4523. "schema": {
  4524. "type": "string",
  4525. "pattern": "^per.*"
  4526. },
  4527. "required": true
  4528. }
  4529. ],
  4530. "summary": "Respond to permission",
  4531. "deprecated": true,
  4532. "description": "Approve or deny a permission request from the AI assistant.",
  4533. "responses": {
  4534. "200": {
  4535. "description": "Permission processed successfully",
  4536. "content": {
  4537. "application/json": {
  4538. "schema": {
  4539. "type": "boolean"
  4540. }
  4541. }
  4542. }
  4543. },
  4544. "400": {
  4545. "description": "Bad request",
  4546. "content": {
  4547. "application/json": {
  4548. "schema": {
  4549. "$ref": "#/components/schemas/BadRequestError"
  4550. }
  4551. }
  4552. }
  4553. },
  4554. "404": {
  4555. "description": "Not found",
  4556. "content": {
  4557. "application/json": {
  4558. "schema": {
  4559. "$ref": "#/components/schemas/NotFoundError"
  4560. }
  4561. }
  4562. }
  4563. }
  4564. },
  4565. "requestBody": {
  4566. "content": {
  4567. "application/json": {
  4568. "schema": {
  4569. "type": "object",
  4570. "properties": {
  4571. "response": {
  4572. "type": "string",
  4573. "enum": ["once", "always", "reject"]
  4574. }
  4575. },
  4576. "required": ["response"]
  4577. }
  4578. }
  4579. }
  4580. },
  4581. "x-codeSamples": [
  4582. {
  4583. "lang": "js",
  4584. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  4585. }
  4586. ]
  4587. }
  4588. },
  4589. "/permission/{requestID}/reply": {
  4590. "post": {
  4591. "operationId": "permission.reply",
  4592. "parameters": [
  4593. {
  4594. "in": "query",
  4595. "name": "directory",
  4596. "schema": {
  4597. "type": "string"
  4598. }
  4599. },
  4600. {
  4601. "in": "query",
  4602. "name": "workspace",
  4603. "schema": {
  4604. "type": "string"
  4605. }
  4606. },
  4607. {
  4608. "in": "path",
  4609. "name": "requestID",
  4610. "schema": {
  4611. "type": "string",
  4612. "pattern": "^per.*"
  4613. },
  4614. "required": true
  4615. }
  4616. ],
  4617. "summary": "Respond to permission request",
  4618. "description": "Approve or deny a permission request from the AI assistant.",
  4619. "responses": {
  4620. "200": {
  4621. "description": "Permission processed successfully",
  4622. "content": {
  4623. "application/json": {
  4624. "schema": {
  4625. "type": "boolean"
  4626. }
  4627. }
  4628. }
  4629. },
  4630. "400": {
  4631. "description": "Bad request",
  4632. "content": {
  4633. "application/json": {
  4634. "schema": {
  4635. "$ref": "#/components/schemas/BadRequestError"
  4636. }
  4637. }
  4638. }
  4639. },
  4640. "404": {
  4641. "description": "Not found",
  4642. "content": {
  4643. "application/json": {
  4644. "schema": {
  4645. "$ref": "#/components/schemas/NotFoundError"
  4646. }
  4647. }
  4648. }
  4649. }
  4650. },
  4651. "requestBody": {
  4652. "content": {
  4653. "application/json": {
  4654. "schema": {
  4655. "type": "object",
  4656. "properties": {
  4657. "reply": {
  4658. "type": "string",
  4659. "enum": ["once", "always", "reject"]
  4660. },
  4661. "message": {
  4662. "type": "string"
  4663. }
  4664. },
  4665. "required": ["reply"]
  4666. }
  4667. }
  4668. }
  4669. },
  4670. "x-codeSamples": [
  4671. {
  4672. "lang": "js",
  4673. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
  4674. }
  4675. ]
  4676. }
  4677. },
  4678. "/permission": {
  4679. "get": {
  4680. "operationId": "permission.list",
  4681. "parameters": [
  4682. {
  4683. "in": "query",
  4684. "name": "directory",
  4685. "schema": {
  4686. "type": "string"
  4687. }
  4688. },
  4689. {
  4690. "in": "query",
  4691. "name": "workspace",
  4692. "schema": {
  4693. "type": "string"
  4694. }
  4695. }
  4696. ],
  4697. "summary": "List pending permissions",
  4698. "description": "Get all pending permission requests across all sessions.",
  4699. "responses": {
  4700. "200": {
  4701. "description": "List of pending permissions",
  4702. "content": {
  4703. "application/json": {
  4704. "schema": {
  4705. "type": "array",
  4706. "items": {
  4707. "$ref": "#/components/schemas/PermissionRequest"
  4708. }
  4709. }
  4710. }
  4711. }
  4712. }
  4713. },
  4714. "x-codeSamples": [
  4715. {
  4716. "lang": "js",
  4717. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
  4718. }
  4719. ]
  4720. }
  4721. },
  4722. "/question": {
  4723. "get": {
  4724. "operationId": "question.list",
  4725. "parameters": [
  4726. {
  4727. "in": "query",
  4728. "name": "directory",
  4729. "schema": {
  4730. "type": "string"
  4731. }
  4732. },
  4733. {
  4734. "in": "query",
  4735. "name": "workspace",
  4736. "schema": {
  4737. "type": "string"
  4738. }
  4739. }
  4740. ],
  4741. "summary": "List pending questions",
  4742. "description": "Get all pending question requests across all sessions.",
  4743. "responses": {
  4744. "200": {
  4745. "description": "List of pending questions",
  4746. "content": {
  4747. "application/json": {
  4748. "schema": {
  4749. "type": "array",
  4750. "items": {
  4751. "$ref": "#/components/schemas/QuestionRequest"
  4752. }
  4753. }
  4754. }
  4755. }
  4756. }
  4757. },
  4758. "x-codeSamples": [
  4759. {
  4760. "lang": "js",
  4761. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
  4762. }
  4763. ]
  4764. }
  4765. },
  4766. "/question/{requestID}/reply": {
  4767. "post": {
  4768. "operationId": "question.reply",
  4769. "parameters": [
  4770. {
  4771. "in": "query",
  4772. "name": "directory",
  4773. "schema": {
  4774. "type": "string"
  4775. }
  4776. },
  4777. {
  4778. "in": "query",
  4779. "name": "workspace",
  4780. "schema": {
  4781. "type": "string"
  4782. }
  4783. },
  4784. {
  4785. "in": "path",
  4786. "name": "requestID",
  4787. "schema": {
  4788. "type": "string",
  4789. "pattern": "^que.*"
  4790. },
  4791. "required": true
  4792. }
  4793. ],
  4794. "summary": "Reply to question request",
  4795. "description": "Provide answers to a question request from the AI assistant.",
  4796. "responses": {
  4797. "200": {
  4798. "description": "Question answered successfully",
  4799. "content": {
  4800. "application/json": {
  4801. "schema": {
  4802. "type": "boolean"
  4803. }
  4804. }
  4805. }
  4806. },
  4807. "400": {
  4808. "description": "Bad request",
  4809. "content": {
  4810. "application/json": {
  4811. "schema": {
  4812. "$ref": "#/components/schemas/BadRequestError"
  4813. }
  4814. }
  4815. }
  4816. },
  4817. "404": {
  4818. "description": "Not found",
  4819. "content": {
  4820. "application/json": {
  4821. "schema": {
  4822. "$ref": "#/components/schemas/NotFoundError"
  4823. }
  4824. }
  4825. }
  4826. }
  4827. },
  4828. "requestBody": {
  4829. "content": {
  4830. "application/json": {
  4831. "schema": {
  4832. "type": "object",
  4833. "properties": {
  4834. "answers": {
  4835. "description": "User answers in order of questions (each answer is an array of selected labels)",
  4836. "type": "array",
  4837. "items": {
  4838. "$ref": "#/components/schemas/QuestionAnswer"
  4839. }
  4840. }
  4841. },
  4842. "required": ["answers"]
  4843. }
  4844. }
  4845. }
  4846. },
  4847. "x-codeSamples": [
  4848. {
  4849. "lang": "js",
  4850. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
  4851. }
  4852. ]
  4853. }
  4854. },
  4855. "/question/{requestID}/reject": {
  4856. "post": {
  4857. "operationId": "question.reject",
  4858. "parameters": [
  4859. {
  4860. "in": "query",
  4861. "name": "directory",
  4862. "schema": {
  4863. "type": "string"
  4864. }
  4865. },
  4866. {
  4867. "in": "query",
  4868. "name": "workspace",
  4869. "schema": {
  4870. "type": "string"
  4871. }
  4872. },
  4873. {
  4874. "in": "path",
  4875. "name": "requestID",
  4876. "schema": {
  4877. "type": "string",
  4878. "pattern": "^que.*"
  4879. },
  4880. "required": true
  4881. }
  4882. ],
  4883. "summary": "Reject question request",
  4884. "description": "Reject a question request from the AI assistant.",
  4885. "responses": {
  4886. "200": {
  4887. "description": "Question rejected successfully",
  4888. "content": {
  4889. "application/json": {
  4890. "schema": {
  4891. "type": "boolean"
  4892. }
  4893. }
  4894. }
  4895. },
  4896. "400": {
  4897. "description": "Bad request",
  4898. "content": {
  4899. "application/json": {
  4900. "schema": {
  4901. "$ref": "#/components/schemas/BadRequestError"
  4902. }
  4903. }
  4904. }
  4905. },
  4906. "404": {
  4907. "description": "Not found",
  4908. "content": {
  4909. "application/json": {
  4910. "schema": {
  4911. "$ref": "#/components/schemas/NotFoundError"
  4912. }
  4913. }
  4914. }
  4915. }
  4916. },
  4917. "x-codeSamples": [
  4918. {
  4919. "lang": "js",
  4920. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
  4921. }
  4922. ]
  4923. }
  4924. },
  4925. "/provider": {
  4926. "get": {
  4927. "operationId": "provider.list",
  4928. "parameters": [
  4929. {
  4930. "in": "query",
  4931. "name": "directory",
  4932. "schema": {
  4933. "type": "string"
  4934. }
  4935. },
  4936. {
  4937. "in": "query",
  4938. "name": "workspace",
  4939. "schema": {
  4940. "type": "string"
  4941. }
  4942. }
  4943. ],
  4944. "summary": "List providers",
  4945. "description": "Get a list of all available AI providers, including both available and connected ones.",
  4946. "responses": {
  4947. "200": {
  4948. "description": "List of providers",
  4949. "content": {
  4950. "application/json": {
  4951. "schema": {
  4952. "type": "object",
  4953. "properties": {
  4954. "all": {
  4955. "type": "array",
  4956. "items": {
  4957. "$ref": "#/components/schemas/Provider"
  4958. }
  4959. },
  4960. "default": {
  4961. "type": "object",
  4962. "propertyNames": {
  4963. "type": "string"
  4964. },
  4965. "additionalProperties": {
  4966. "type": "string"
  4967. }
  4968. },
  4969. "connected": {
  4970. "type": "array",
  4971. "items": {
  4972. "type": "string"
  4973. }
  4974. }
  4975. },
  4976. "required": ["all", "default", "connected"]
  4977. }
  4978. }
  4979. }
  4980. }
  4981. },
  4982. "x-codeSamples": [
  4983. {
  4984. "lang": "js",
  4985. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  4986. }
  4987. ]
  4988. }
  4989. },
  4990. "/provider/auth": {
  4991. "get": {
  4992. "operationId": "provider.auth",
  4993. "parameters": [
  4994. {
  4995. "in": "query",
  4996. "name": "directory",
  4997. "schema": {
  4998. "type": "string"
  4999. }
  5000. },
  5001. {
  5002. "in": "query",
  5003. "name": "workspace",
  5004. "schema": {
  5005. "type": "string"
  5006. }
  5007. }
  5008. ],
  5009. "summary": "Get provider auth methods",
  5010. "description": "Retrieve available authentication methods for all AI providers.",
  5011. "responses": {
  5012. "200": {
  5013. "description": "Provider auth methods",
  5014. "content": {
  5015. "application/json": {
  5016. "schema": {
  5017. "type": "object",
  5018. "propertyNames": {
  5019. "type": "string"
  5020. },
  5021. "additionalProperties": {
  5022. "type": "array",
  5023. "items": {
  5024. "$ref": "#/components/schemas/ProviderAuthMethod"
  5025. }
  5026. }
  5027. }
  5028. }
  5029. }
  5030. }
  5031. },
  5032. "x-codeSamples": [
  5033. {
  5034. "lang": "js",
  5035. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  5036. }
  5037. ]
  5038. }
  5039. },
  5040. "/provider/{providerID}/oauth/authorize": {
  5041. "post": {
  5042. "operationId": "provider.oauth.authorize",
  5043. "parameters": [
  5044. {
  5045. "in": "query",
  5046. "name": "directory",
  5047. "schema": {
  5048. "type": "string"
  5049. }
  5050. },
  5051. {
  5052. "in": "query",
  5053. "name": "workspace",
  5054. "schema": {
  5055. "type": "string"
  5056. }
  5057. },
  5058. {
  5059. "in": "path",
  5060. "name": "providerID",
  5061. "schema": {
  5062. "type": "string"
  5063. },
  5064. "required": true,
  5065. "description": "Provider ID"
  5066. }
  5067. ],
  5068. "summary": "OAuth authorize",
  5069. "description": "Initiate OAuth authorization for a specific AI provider to get an authorization URL.",
  5070. "responses": {
  5071. "200": {
  5072. "description": "Authorization URL and method",
  5073. "content": {
  5074. "application/json": {
  5075. "schema": {
  5076. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  5077. }
  5078. }
  5079. }
  5080. },
  5081. "400": {
  5082. "description": "Bad request",
  5083. "content": {
  5084. "application/json": {
  5085. "schema": {
  5086. "$ref": "#/components/schemas/BadRequestError"
  5087. }
  5088. }
  5089. }
  5090. }
  5091. },
  5092. "requestBody": {
  5093. "content": {
  5094. "application/json": {
  5095. "schema": {
  5096. "type": "object",
  5097. "properties": {
  5098. "method": {
  5099. "description": "Auth method index",
  5100. "type": "number"
  5101. },
  5102. "inputs": {
  5103. "description": "Prompt inputs",
  5104. "type": "object",
  5105. "propertyNames": {
  5106. "type": "string"
  5107. },
  5108. "additionalProperties": {
  5109. "type": "string"
  5110. }
  5111. }
  5112. },
  5113. "required": ["method"]
  5114. }
  5115. }
  5116. }
  5117. },
  5118. "x-codeSamples": [
  5119. {
  5120. "lang": "js",
  5121. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  5122. }
  5123. ]
  5124. }
  5125. },
  5126. "/provider/{providerID}/oauth/callback": {
  5127. "post": {
  5128. "operationId": "provider.oauth.callback",
  5129. "parameters": [
  5130. {
  5131. "in": "query",
  5132. "name": "directory",
  5133. "schema": {
  5134. "type": "string"
  5135. }
  5136. },
  5137. {
  5138. "in": "query",
  5139. "name": "workspace",
  5140. "schema": {
  5141. "type": "string"
  5142. }
  5143. },
  5144. {
  5145. "in": "path",
  5146. "name": "providerID",
  5147. "schema": {
  5148. "type": "string"
  5149. },
  5150. "required": true,
  5151. "description": "Provider ID"
  5152. }
  5153. ],
  5154. "summary": "OAuth callback",
  5155. "description": "Handle the OAuth callback from a provider after user authorization.",
  5156. "responses": {
  5157. "200": {
  5158. "description": "OAuth callback processed successfully",
  5159. "content": {
  5160. "application/json": {
  5161. "schema": {
  5162. "type": "boolean"
  5163. }
  5164. }
  5165. }
  5166. },
  5167. "400": {
  5168. "description": "Bad request",
  5169. "content": {
  5170. "application/json": {
  5171. "schema": {
  5172. "$ref": "#/components/schemas/BadRequestError"
  5173. }
  5174. }
  5175. }
  5176. }
  5177. },
  5178. "requestBody": {
  5179. "content": {
  5180. "application/json": {
  5181. "schema": {
  5182. "type": "object",
  5183. "properties": {
  5184. "method": {
  5185. "description": "Auth method index",
  5186. "type": "number"
  5187. },
  5188. "code": {
  5189. "description": "OAuth authorization code",
  5190. "type": "string"
  5191. }
  5192. },
  5193. "required": ["method"]
  5194. }
  5195. }
  5196. }
  5197. },
  5198. "x-codeSamples": [
  5199. {
  5200. "lang": "js",
  5201. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  5202. }
  5203. ]
  5204. }
  5205. },
  5206. "/sync/start": {
  5207. "post": {
  5208. "operationId": "sync.start",
  5209. "parameters": [
  5210. {
  5211. "in": "query",
  5212. "name": "directory",
  5213. "schema": {
  5214. "type": "string"
  5215. }
  5216. },
  5217. {
  5218. "in": "query",
  5219. "name": "workspace",
  5220. "schema": {
  5221. "type": "string"
  5222. }
  5223. }
  5224. ],
  5225. "summary": "Start workspace sync",
  5226. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  5227. "responses": {
  5228. "200": {
  5229. "description": "Workspace sync started",
  5230. "content": {
  5231. "application/json": {
  5232. "schema": {
  5233. "type": "boolean"
  5234. }
  5235. }
  5236. }
  5237. }
  5238. },
  5239. "x-codeSamples": [
  5240. {
  5241. "lang": "js",
  5242. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  5243. }
  5244. ]
  5245. }
  5246. },
  5247. "/sync/replay": {
  5248. "post": {
  5249. "operationId": "sync.replay",
  5250. "parameters": [
  5251. {
  5252. "in": "query",
  5253. "name": "directory",
  5254. "schema": {
  5255. "type": "string"
  5256. }
  5257. },
  5258. {
  5259. "in": "query",
  5260. "name": "workspace",
  5261. "schema": {
  5262. "type": "string"
  5263. }
  5264. }
  5265. ],
  5266. "summary": "Replay sync events",
  5267. "description": "Validate and replay a complete sync event history.",
  5268. "responses": {
  5269. "200": {
  5270. "description": "Replayed sync events",
  5271. "content": {
  5272. "application/json": {
  5273. "schema": {
  5274. "type": "object",
  5275. "properties": {
  5276. "sessionID": {
  5277. "type": "string"
  5278. }
  5279. },
  5280. "required": ["sessionID"]
  5281. }
  5282. }
  5283. }
  5284. },
  5285. "400": {
  5286. "description": "Bad request",
  5287. "content": {
  5288. "application/json": {
  5289. "schema": {
  5290. "$ref": "#/components/schemas/BadRequestError"
  5291. }
  5292. }
  5293. }
  5294. }
  5295. },
  5296. "requestBody": {
  5297. "content": {
  5298. "application/json": {
  5299. "schema": {
  5300. "type": "object",
  5301. "properties": {
  5302. "directory": {
  5303. "type": "string"
  5304. },
  5305. "events": {
  5306. "minItems": 1,
  5307. "type": "array",
  5308. "items": {
  5309. "type": "object",
  5310. "properties": {
  5311. "id": {
  5312. "type": "string"
  5313. },
  5314. "aggregateID": {
  5315. "type": "string"
  5316. },
  5317. "seq": {
  5318. "type": "integer",
  5319. "minimum": 0,
  5320. "maximum": 9007199254740991
  5321. },
  5322. "type": {
  5323. "type": "string"
  5324. },
  5325. "data": {
  5326. "type": "object",
  5327. "propertyNames": {
  5328. "type": "string"
  5329. },
  5330. "additionalProperties": {}
  5331. }
  5332. },
  5333. "required": ["id", "aggregateID", "seq", "type", "data"]
  5334. }
  5335. }
  5336. },
  5337. "required": ["directory", "events"]
  5338. }
  5339. }
  5340. }
  5341. },
  5342. "x-codeSamples": [
  5343. {
  5344. "lang": "js",
  5345. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  5346. }
  5347. ]
  5348. }
  5349. },
  5350. "/sync/history": {
  5351. "post": {
  5352. "operationId": "sync.history.list",
  5353. "parameters": [
  5354. {
  5355. "in": "query",
  5356. "name": "directory",
  5357. "schema": {
  5358. "type": "string"
  5359. }
  5360. },
  5361. {
  5362. "in": "query",
  5363. "name": "workspace",
  5364. "schema": {
  5365. "type": "string"
  5366. }
  5367. }
  5368. ],
  5369. "summary": "List sync events",
  5370. "description": "List sync events for all aggregates. Keys are aggregate IDs the client already knows about, values are the last known sequence ID. Events with seq > value are returned for those aggregates. Aggregates not listed in the input get their full history.",
  5371. "responses": {
  5372. "200": {
  5373. "description": "Sync events",
  5374. "content": {
  5375. "application/json": {
  5376. "schema": {
  5377. "type": "array",
  5378. "items": {
  5379. "type": "object",
  5380. "properties": {
  5381. "id": {
  5382. "type": "string"
  5383. },
  5384. "aggregate_id": {
  5385. "type": "string"
  5386. },
  5387. "seq": {
  5388. "type": "number"
  5389. },
  5390. "type": {
  5391. "type": "string"
  5392. },
  5393. "data": {
  5394. "type": "object",
  5395. "propertyNames": {
  5396. "type": "string"
  5397. },
  5398. "additionalProperties": {}
  5399. }
  5400. },
  5401. "required": ["id", "aggregate_id", "seq", "type", "data"]
  5402. }
  5403. }
  5404. }
  5405. }
  5406. },
  5407. "400": {
  5408. "description": "Bad request",
  5409. "content": {
  5410. "application/json": {
  5411. "schema": {
  5412. "$ref": "#/components/schemas/BadRequestError"
  5413. }
  5414. }
  5415. }
  5416. }
  5417. },
  5418. "requestBody": {
  5419. "content": {
  5420. "application/json": {
  5421. "schema": {
  5422. "type": "object",
  5423. "propertyNames": {
  5424. "type": "string"
  5425. },
  5426. "additionalProperties": {
  5427. "type": "integer",
  5428. "minimum": 0,
  5429. "maximum": 9007199254740991
  5430. }
  5431. }
  5432. }
  5433. }
  5434. },
  5435. "x-codeSamples": [
  5436. {
  5437. "lang": "js",
  5438. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  5439. }
  5440. ]
  5441. }
  5442. },
  5443. "/find": {
  5444. "get": {
  5445. "operationId": "find.text",
  5446. "parameters": [
  5447. {
  5448. "in": "query",
  5449. "name": "directory",
  5450. "schema": {
  5451. "type": "string"
  5452. }
  5453. },
  5454. {
  5455. "in": "query",
  5456. "name": "workspace",
  5457. "schema": {
  5458. "type": "string"
  5459. }
  5460. },
  5461. {
  5462. "in": "query",
  5463. "name": "pattern",
  5464. "schema": {
  5465. "type": "string"
  5466. },
  5467. "required": true
  5468. }
  5469. ],
  5470. "summary": "Find text",
  5471. "description": "Search for text patterns across files in the project using ripgrep.",
  5472. "responses": {
  5473. "200": {
  5474. "description": "Matches",
  5475. "content": {
  5476. "application/json": {
  5477. "schema": {
  5478. "type": "array",
  5479. "items": {
  5480. "type": "object",
  5481. "properties": {
  5482. "path": {
  5483. "type": "object",
  5484. "properties": {
  5485. "text": {
  5486. "type": "string"
  5487. }
  5488. },
  5489. "required": ["text"]
  5490. },
  5491. "lines": {
  5492. "type": "object",
  5493. "properties": {
  5494. "text": {
  5495. "type": "string"
  5496. }
  5497. },
  5498. "required": ["text"]
  5499. },
  5500. "line_number": {
  5501. "type": "number"
  5502. },
  5503. "absolute_offset": {
  5504. "type": "number"
  5505. },
  5506. "submatches": {
  5507. "type": "array",
  5508. "items": {
  5509. "type": "object",
  5510. "properties": {
  5511. "match": {
  5512. "type": "object",
  5513. "properties": {
  5514. "text": {
  5515. "type": "string"
  5516. }
  5517. },
  5518. "required": ["text"]
  5519. },
  5520. "start": {
  5521. "type": "number"
  5522. },
  5523. "end": {
  5524. "type": "number"
  5525. }
  5526. },
  5527. "required": ["match", "start", "end"]
  5528. }
  5529. }
  5530. },
  5531. "required": ["path", "lines", "line_number", "absolute_offset", "submatches"]
  5532. }
  5533. }
  5534. }
  5535. }
  5536. }
  5537. },
  5538. "x-codeSamples": [
  5539. {
  5540. "lang": "js",
  5541. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
  5542. }
  5543. ]
  5544. }
  5545. },
  5546. "/find/file": {
  5547. "get": {
  5548. "operationId": "find.files",
  5549. "parameters": [
  5550. {
  5551. "in": "query",
  5552. "name": "directory",
  5553. "schema": {
  5554. "type": "string"
  5555. }
  5556. },
  5557. {
  5558. "in": "query",
  5559. "name": "workspace",
  5560. "schema": {
  5561. "type": "string"
  5562. }
  5563. },
  5564. {
  5565. "in": "query",
  5566. "name": "query",
  5567. "schema": {
  5568. "type": "string"
  5569. },
  5570. "required": true
  5571. },
  5572. {
  5573. "in": "query",
  5574. "name": "dirs",
  5575. "schema": {
  5576. "type": "string",
  5577. "enum": ["true", "false"]
  5578. }
  5579. },
  5580. {
  5581. "in": "query",
  5582. "name": "type",
  5583. "schema": {
  5584. "type": "string",
  5585. "enum": ["file", "directory"]
  5586. }
  5587. },
  5588. {
  5589. "in": "query",
  5590. "name": "limit",
  5591. "schema": {
  5592. "type": "integer",
  5593. "minimum": 1,
  5594. "maximum": 200
  5595. }
  5596. }
  5597. ],
  5598. "summary": "Find files",
  5599. "description": "Search for files or directories by name or pattern in the project directory.",
  5600. "responses": {
  5601. "200": {
  5602. "description": "File paths",
  5603. "content": {
  5604. "application/json": {
  5605. "schema": {
  5606. "type": "array",
  5607. "items": {
  5608. "type": "string"
  5609. }
  5610. }
  5611. }
  5612. }
  5613. }
  5614. },
  5615. "x-codeSamples": [
  5616. {
  5617. "lang": "js",
  5618. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
  5619. }
  5620. ]
  5621. }
  5622. },
  5623. "/find/symbol": {
  5624. "get": {
  5625. "operationId": "find.symbols",
  5626. "parameters": [
  5627. {
  5628. "in": "query",
  5629. "name": "directory",
  5630. "schema": {
  5631. "type": "string"
  5632. }
  5633. },
  5634. {
  5635. "in": "query",
  5636. "name": "workspace",
  5637. "schema": {
  5638. "type": "string"
  5639. }
  5640. },
  5641. {
  5642. "in": "query",
  5643. "name": "query",
  5644. "schema": {
  5645. "type": "string"
  5646. },
  5647. "required": true
  5648. }
  5649. ],
  5650. "summary": "Find symbols",
  5651. "description": "Search for workspace symbols like functions, classes, and variables using LSP.",
  5652. "responses": {
  5653. "200": {
  5654. "description": "Symbols",
  5655. "content": {
  5656. "application/json": {
  5657. "schema": {
  5658. "type": "array",
  5659. "items": {
  5660. "$ref": "#/components/schemas/Symbol"
  5661. }
  5662. }
  5663. }
  5664. }
  5665. }
  5666. },
  5667. "x-codeSamples": [
  5668. {
  5669. "lang": "js",
  5670. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
  5671. }
  5672. ]
  5673. }
  5674. },
  5675. "/file": {
  5676. "get": {
  5677. "operationId": "file.list",
  5678. "parameters": [
  5679. {
  5680. "in": "query",
  5681. "name": "directory",
  5682. "schema": {
  5683. "type": "string"
  5684. }
  5685. },
  5686. {
  5687. "in": "query",
  5688. "name": "workspace",
  5689. "schema": {
  5690. "type": "string"
  5691. }
  5692. },
  5693. {
  5694. "in": "query",
  5695. "name": "path",
  5696. "schema": {
  5697. "type": "string"
  5698. },
  5699. "required": true
  5700. }
  5701. ],
  5702. "summary": "List files",
  5703. "description": "List files and directories in a specified path.",
  5704. "responses": {
  5705. "200": {
  5706. "description": "Files and directories",
  5707. "content": {
  5708. "application/json": {
  5709. "schema": {
  5710. "type": "array",
  5711. "items": {
  5712. "$ref": "#/components/schemas/FileNode"
  5713. }
  5714. }
  5715. }
  5716. }
  5717. }
  5718. },
  5719. "x-codeSamples": [
  5720. {
  5721. "lang": "js",
  5722. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
  5723. }
  5724. ]
  5725. }
  5726. },
  5727. "/file/content": {
  5728. "get": {
  5729. "operationId": "file.read",
  5730. "parameters": [
  5731. {
  5732. "in": "query",
  5733. "name": "directory",
  5734. "schema": {
  5735. "type": "string"
  5736. }
  5737. },
  5738. {
  5739. "in": "query",
  5740. "name": "workspace",
  5741. "schema": {
  5742. "type": "string"
  5743. }
  5744. },
  5745. {
  5746. "in": "query",
  5747. "name": "path",
  5748. "schema": {
  5749. "type": "string"
  5750. },
  5751. "required": true
  5752. }
  5753. ],
  5754. "summary": "Read file",
  5755. "description": "Read the content of a specified file.",
  5756. "responses": {
  5757. "200": {
  5758. "description": "File content",
  5759. "content": {
  5760. "application/json": {
  5761. "schema": {
  5762. "$ref": "#/components/schemas/FileContent"
  5763. }
  5764. }
  5765. }
  5766. }
  5767. },
  5768. "x-codeSamples": [
  5769. {
  5770. "lang": "js",
  5771. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
  5772. }
  5773. ]
  5774. }
  5775. },
  5776. "/file/status": {
  5777. "get": {
  5778. "operationId": "file.status",
  5779. "parameters": [
  5780. {
  5781. "in": "query",
  5782. "name": "directory",
  5783. "schema": {
  5784. "type": "string"
  5785. }
  5786. },
  5787. {
  5788. "in": "query",
  5789. "name": "workspace",
  5790. "schema": {
  5791. "type": "string"
  5792. }
  5793. }
  5794. ],
  5795. "summary": "Get file status",
  5796. "description": "Get the git status of all files in the project.",
  5797. "responses": {
  5798. "200": {
  5799. "description": "File status",
  5800. "content": {
  5801. "application/json": {
  5802. "schema": {
  5803. "type": "array",
  5804. "items": {
  5805. "$ref": "#/components/schemas/File"
  5806. }
  5807. }
  5808. }
  5809. }
  5810. }
  5811. },
  5812. "x-codeSamples": [
  5813. {
  5814. "lang": "js",
  5815. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
  5816. }
  5817. ]
  5818. }
  5819. },
  5820. "/event": {
  5821. "get": {
  5822. "operationId": "event.subscribe",
  5823. "parameters": [
  5824. {
  5825. "in": "query",
  5826. "name": "directory",
  5827. "schema": {
  5828. "type": "string"
  5829. }
  5830. },
  5831. {
  5832. "in": "query",
  5833. "name": "workspace",
  5834. "schema": {
  5835. "type": "string"
  5836. }
  5837. }
  5838. ],
  5839. "summary": "Subscribe to events",
  5840. "description": "Get events",
  5841. "responses": {
  5842. "200": {
  5843. "description": "Event stream",
  5844. "content": {
  5845. "text/event-stream": {
  5846. "schema": {
  5847. "$ref": "#/components/schemas/Event"
  5848. }
  5849. }
  5850. }
  5851. }
  5852. },
  5853. "x-codeSamples": [
  5854. {
  5855. "lang": "js",
  5856. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.event.subscribe({\n ...\n})"
  5857. }
  5858. ]
  5859. }
  5860. },
  5861. "/mcp": {
  5862. "get": {
  5863. "operationId": "mcp.status",
  5864. "parameters": [
  5865. {
  5866. "in": "query",
  5867. "name": "directory",
  5868. "schema": {
  5869. "type": "string"
  5870. }
  5871. },
  5872. {
  5873. "in": "query",
  5874. "name": "workspace",
  5875. "schema": {
  5876. "type": "string"
  5877. }
  5878. }
  5879. ],
  5880. "summary": "Get MCP status",
  5881. "description": "Get the status of all Model Context Protocol (MCP) servers.",
  5882. "responses": {
  5883. "200": {
  5884. "description": "MCP server status",
  5885. "content": {
  5886. "application/json": {
  5887. "schema": {
  5888. "type": "object",
  5889. "propertyNames": {
  5890. "type": "string"
  5891. },
  5892. "additionalProperties": {
  5893. "$ref": "#/components/schemas/MCPStatus"
  5894. }
  5895. }
  5896. }
  5897. }
  5898. }
  5899. },
  5900. "x-codeSamples": [
  5901. {
  5902. "lang": "js",
  5903. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
  5904. }
  5905. ]
  5906. },
  5907. "post": {
  5908. "operationId": "mcp.add",
  5909. "parameters": [
  5910. {
  5911. "in": "query",
  5912. "name": "directory",
  5913. "schema": {
  5914. "type": "string"
  5915. }
  5916. },
  5917. {
  5918. "in": "query",
  5919. "name": "workspace",
  5920. "schema": {
  5921. "type": "string"
  5922. }
  5923. }
  5924. ],
  5925. "summary": "Add MCP server",
  5926. "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
  5927. "responses": {
  5928. "200": {
  5929. "description": "MCP server added successfully",
  5930. "content": {
  5931. "application/json": {
  5932. "schema": {
  5933. "type": "object",
  5934. "propertyNames": {
  5935. "type": "string"
  5936. },
  5937. "additionalProperties": {
  5938. "$ref": "#/components/schemas/MCPStatus"
  5939. }
  5940. }
  5941. }
  5942. }
  5943. },
  5944. "400": {
  5945. "description": "Bad request",
  5946. "content": {
  5947. "application/json": {
  5948. "schema": {
  5949. "$ref": "#/components/schemas/BadRequestError"
  5950. }
  5951. }
  5952. }
  5953. }
  5954. },
  5955. "requestBody": {
  5956. "content": {
  5957. "application/json": {
  5958. "schema": {
  5959. "type": "object",
  5960. "properties": {
  5961. "name": {
  5962. "type": "string"
  5963. },
  5964. "config": {
  5965. "anyOf": [
  5966. {
  5967. "$ref": "#/components/schemas/McpLocalConfig"
  5968. },
  5969. {
  5970. "$ref": "#/components/schemas/McpRemoteConfig"
  5971. }
  5972. ]
  5973. }
  5974. },
  5975. "required": ["name", "config"]
  5976. }
  5977. }
  5978. }
  5979. },
  5980. "x-codeSamples": [
  5981. {
  5982. "lang": "js",
  5983. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
  5984. }
  5985. ]
  5986. }
  5987. },
  5988. "/mcp/{name}/auth": {
  5989. "post": {
  5990. "operationId": "mcp.auth.start",
  5991. "parameters": [
  5992. {
  5993. "in": "query",
  5994. "name": "directory",
  5995. "schema": {
  5996. "type": "string"
  5997. }
  5998. },
  5999. {
  6000. "in": "query",
  6001. "name": "workspace",
  6002. "schema": {
  6003. "type": "string"
  6004. }
  6005. },
  6006. {
  6007. "schema": {
  6008. "type": "string"
  6009. },
  6010. "in": "path",
  6011. "name": "name",
  6012. "required": true
  6013. }
  6014. ],
  6015. "summary": "Start MCP OAuth",
  6016. "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
  6017. "responses": {
  6018. "200": {
  6019. "description": "OAuth flow started",
  6020. "content": {
  6021. "application/json": {
  6022. "schema": {
  6023. "type": "object",
  6024. "properties": {
  6025. "authorizationUrl": {
  6026. "description": "URL to open in browser for authorization",
  6027. "type": "string"
  6028. }
  6029. },
  6030. "required": ["authorizationUrl"]
  6031. }
  6032. }
  6033. }
  6034. },
  6035. "400": {
  6036. "description": "Bad request",
  6037. "content": {
  6038. "application/json": {
  6039. "schema": {
  6040. "$ref": "#/components/schemas/BadRequestError"
  6041. }
  6042. }
  6043. }
  6044. },
  6045. "404": {
  6046. "description": "Not found",
  6047. "content": {
  6048. "application/json": {
  6049. "schema": {
  6050. "$ref": "#/components/schemas/NotFoundError"
  6051. }
  6052. }
  6053. }
  6054. }
  6055. },
  6056. "x-codeSamples": [
  6057. {
  6058. "lang": "js",
  6059. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
  6060. }
  6061. ]
  6062. },
  6063. "delete": {
  6064. "operationId": "mcp.auth.remove",
  6065. "parameters": [
  6066. {
  6067. "in": "query",
  6068. "name": "directory",
  6069. "schema": {
  6070. "type": "string"
  6071. }
  6072. },
  6073. {
  6074. "in": "query",
  6075. "name": "workspace",
  6076. "schema": {
  6077. "type": "string"
  6078. }
  6079. },
  6080. {
  6081. "schema": {
  6082. "type": "string"
  6083. },
  6084. "in": "path",
  6085. "name": "name",
  6086. "required": true
  6087. }
  6088. ],
  6089. "summary": "Remove MCP OAuth",
  6090. "description": "Remove OAuth credentials for an MCP server",
  6091. "responses": {
  6092. "200": {
  6093. "description": "OAuth credentials removed",
  6094. "content": {
  6095. "application/json": {
  6096. "schema": {
  6097. "type": "object",
  6098. "properties": {
  6099. "success": {
  6100. "type": "boolean",
  6101. "const": true
  6102. }
  6103. },
  6104. "required": ["success"]
  6105. }
  6106. }
  6107. }
  6108. },
  6109. "404": {
  6110. "description": "Not found",
  6111. "content": {
  6112. "application/json": {
  6113. "schema": {
  6114. "$ref": "#/components/schemas/NotFoundError"
  6115. }
  6116. }
  6117. }
  6118. }
  6119. },
  6120. "x-codeSamples": [
  6121. {
  6122. "lang": "js",
  6123. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
  6124. }
  6125. ]
  6126. }
  6127. },
  6128. "/mcp/{name}/auth/callback": {
  6129. "post": {
  6130. "operationId": "mcp.auth.callback",
  6131. "parameters": [
  6132. {
  6133. "in": "query",
  6134. "name": "directory",
  6135. "schema": {
  6136. "type": "string"
  6137. }
  6138. },
  6139. {
  6140. "in": "query",
  6141. "name": "workspace",
  6142. "schema": {
  6143. "type": "string"
  6144. }
  6145. },
  6146. {
  6147. "schema": {
  6148. "type": "string"
  6149. },
  6150. "in": "path",
  6151. "name": "name",
  6152. "required": true
  6153. }
  6154. ],
  6155. "summary": "Complete MCP OAuth",
  6156. "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
  6157. "responses": {
  6158. "200": {
  6159. "description": "OAuth authentication completed",
  6160. "content": {
  6161. "application/json": {
  6162. "schema": {
  6163. "$ref": "#/components/schemas/MCPStatus"
  6164. }
  6165. }
  6166. }
  6167. },
  6168. "400": {
  6169. "description": "Bad request",
  6170. "content": {
  6171. "application/json": {
  6172. "schema": {
  6173. "$ref": "#/components/schemas/BadRequestError"
  6174. }
  6175. }
  6176. }
  6177. },
  6178. "404": {
  6179. "description": "Not found",
  6180. "content": {
  6181. "application/json": {
  6182. "schema": {
  6183. "$ref": "#/components/schemas/NotFoundError"
  6184. }
  6185. }
  6186. }
  6187. }
  6188. },
  6189. "requestBody": {
  6190. "content": {
  6191. "application/json": {
  6192. "schema": {
  6193. "type": "object",
  6194. "properties": {
  6195. "code": {
  6196. "description": "Authorization code from OAuth callback",
  6197. "type": "string"
  6198. }
  6199. },
  6200. "required": ["code"]
  6201. }
  6202. }
  6203. }
  6204. },
  6205. "x-codeSamples": [
  6206. {
  6207. "lang": "js",
  6208. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
  6209. }
  6210. ]
  6211. }
  6212. },
  6213. "/mcp/{name}/auth/authenticate": {
  6214. "post": {
  6215. "operationId": "mcp.auth.authenticate",
  6216. "parameters": [
  6217. {
  6218. "in": "query",
  6219. "name": "directory",
  6220. "schema": {
  6221. "type": "string"
  6222. }
  6223. },
  6224. {
  6225. "in": "query",
  6226. "name": "workspace",
  6227. "schema": {
  6228. "type": "string"
  6229. }
  6230. },
  6231. {
  6232. "schema": {
  6233. "type": "string"
  6234. },
  6235. "in": "path",
  6236. "name": "name",
  6237. "required": true
  6238. }
  6239. ],
  6240. "summary": "Authenticate MCP OAuth",
  6241. "description": "Start OAuth flow and wait for callback (opens browser)",
  6242. "responses": {
  6243. "200": {
  6244. "description": "OAuth authentication completed",
  6245. "content": {
  6246. "application/json": {
  6247. "schema": {
  6248. "$ref": "#/components/schemas/MCPStatus"
  6249. }
  6250. }
  6251. }
  6252. },
  6253. "400": {
  6254. "description": "Bad request",
  6255. "content": {
  6256. "application/json": {
  6257. "schema": {
  6258. "$ref": "#/components/schemas/BadRequestError"
  6259. }
  6260. }
  6261. }
  6262. },
  6263. "404": {
  6264. "description": "Not found",
  6265. "content": {
  6266. "application/json": {
  6267. "schema": {
  6268. "$ref": "#/components/schemas/NotFoundError"
  6269. }
  6270. }
  6271. }
  6272. }
  6273. },
  6274. "x-codeSamples": [
  6275. {
  6276. "lang": "js",
  6277. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
  6278. }
  6279. ]
  6280. }
  6281. },
  6282. "/mcp/{name}/connect": {
  6283. "post": {
  6284. "operationId": "mcp.connect",
  6285. "parameters": [
  6286. {
  6287. "in": "query",
  6288. "name": "directory",
  6289. "schema": {
  6290. "type": "string"
  6291. }
  6292. },
  6293. {
  6294. "in": "query",
  6295. "name": "workspace",
  6296. "schema": {
  6297. "type": "string"
  6298. }
  6299. },
  6300. {
  6301. "in": "path",
  6302. "name": "name",
  6303. "schema": {
  6304. "type": "string"
  6305. },
  6306. "required": true
  6307. }
  6308. ],
  6309. "description": "Connect an MCP server",
  6310. "responses": {
  6311. "200": {
  6312. "description": "MCP server connected successfully",
  6313. "content": {
  6314. "application/json": {
  6315. "schema": {
  6316. "type": "boolean"
  6317. }
  6318. }
  6319. }
  6320. }
  6321. },
  6322. "x-codeSamples": [
  6323. {
  6324. "lang": "js",
  6325. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
  6326. }
  6327. ]
  6328. }
  6329. },
  6330. "/mcp/{name}/disconnect": {
  6331. "post": {
  6332. "operationId": "mcp.disconnect",
  6333. "parameters": [
  6334. {
  6335. "in": "query",
  6336. "name": "directory",
  6337. "schema": {
  6338. "type": "string"
  6339. }
  6340. },
  6341. {
  6342. "in": "query",
  6343. "name": "workspace",
  6344. "schema": {
  6345. "type": "string"
  6346. }
  6347. },
  6348. {
  6349. "in": "path",
  6350. "name": "name",
  6351. "schema": {
  6352. "type": "string"
  6353. },
  6354. "required": true
  6355. }
  6356. ],
  6357. "description": "Disconnect an MCP server",
  6358. "responses": {
  6359. "200": {
  6360. "description": "MCP server disconnected successfully",
  6361. "content": {
  6362. "application/json": {
  6363. "schema": {
  6364. "type": "boolean"
  6365. }
  6366. }
  6367. }
  6368. }
  6369. },
  6370. "x-codeSamples": [
  6371. {
  6372. "lang": "js",
  6373. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
  6374. }
  6375. ]
  6376. }
  6377. },
  6378. "/tui/append-prompt": {
  6379. "post": {
  6380. "operationId": "tui.appendPrompt",
  6381. "parameters": [
  6382. {
  6383. "in": "query",
  6384. "name": "directory",
  6385. "schema": {
  6386. "type": "string"
  6387. }
  6388. },
  6389. {
  6390. "in": "query",
  6391. "name": "workspace",
  6392. "schema": {
  6393. "type": "string"
  6394. }
  6395. }
  6396. ],
  6397. "summary": "Append TUI prompt",
  6398. "description": "Append prompt to the TUI",
  6399. "responses": {
  6400. "200": {
  6401. "description": "Prompt processed successfully",
  6402. "content": {
  6403. "application/json": {
  6404. "schema": {
  6405. "type": "boolean"
  6406. }
  6407. }
  6408. }
  6409. },
  6410. "400": {
  6411. "description": "Bad request",
  6412. "content": {
  6413. "application/json": {
  6414. "schema": {
  6415. "$ref": "#/components/schemas/BadRequestError"
  6416. }
  6417. }
  6418. }
  6419. }
  6420. },
  6421. "requestBody": {
  6422. "content": {
  6423. "application/json": {
  6424. "schema": {
  6425. "type": "object",
  6426. "properties": {
  6427. "text": {
  6428. "type": "string"
  6429. }
  6430. },
  6431. "required": ["text"]
  6432. }
  6433. }
  6434. }
  6435. },
  6436. "x-codeSamples": [
  6437. {
  6438. "lang": "js",
  6439. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  6440. }
  6441. ]
  6442. }
  6443. },
  6444. "/tui/open-help": {
  6445. "post": {
  6446. "operationId": "tui.openHelp",
  6447. "parameters": [
  6448. {
  6449. "in": "query",
  6450. "name": "directory",
  6451. "schema": {
  6452. "type": "string"
  6453. }
  6454. },
  6455. {
  6456. "in": "query",
  6457. "name": "workspace",
  6458. "schema": {
  6459. "type": "string"
  6460. }
  6461. }
  6462. ],
  6463. "summary": "Open help dialog",
  6464. "description": "Open the help dialog in the TUI to display user assistance information.",
  6465. "responses": {
  6466. "200": {
  6467. "description": "Help dialog opened successfully",
  6468. "content": {
  6469. "application/json": {
  6470. "schema": {
  6471. "type": "boolean"
  6472. }
  6473. }
  6474. }
  6475. }
  6476. },
  6477. "x-codeSamples": [
  6478. {
  6479. "lang": "js",
  6480. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  6481. }
  6482. ]
  6483. }
  6484. },
  6485. "/tui/open-sessions": {
  6486. "post": {
  6487. "operationId": "tui.openSessions",
  6488. "parameters": [
  6489. {
  6490. "in": "query",
  6491. "name": "directory",
  6492. "schema": {
  6493. "type": "string"
  6494. }
  6495. },
  6496. {
  6497. "in": "query",
  6498. "name": "workspace",
  6499. "schema": {
  6500. "type": "string"
  6501. }
  6502. }
  6503. ],
  6504. "summary": "Open sessions dialog",
  6505. "description": "Open the session dialog",
  6506. "responses": {
  6507. "200": {
  6508. "description": "Session dialog opened successfully",
  6509. "content": {
  6510. "application/json": {
  6511. "schema": {
  6512. "type": "boolean"
  6513. }
  6514. }
  6515. }
  6516. }
  6517. },
  6518. "x-codeSamples": [
  6519. {
  6520. "lang": "js",
  6521. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  6522. }
  6523. ]
  6524. }
  6525. },
  6526. "/tui/open-themes": {
  6527. "post": {
  6528. "operationId": "tui.openThemes",
  6529. "parameters": [
  6530. {
  6531. "in": "query",
  6532. "name": "directory",
  6533. "schema": {
  6534. "type": "string"
  6535. }
  6536. },
  6537. {
  6538. "in": "query",
  6539. "name": "workspace",
  6540. "schema": {
  6541. "type": "string"
  6542. }
  6543. }
  6544. ],
  6545. "summary": "Open themes dialog",
  6546. "description": "Open the theme dialog",
  6547. "responses": {
  6548. "200": {
  6549. "description": "Theme dialog opened successfully",
  6550. "content": {
  6551. "application/json": {
  6552. "schema": {
  6553. "type": "boolean"
  6554. }
  6555. }
  6556. }
  6557. }
  6558. },
  6559. "x-codeSamples": [
  6560. {
  6561. "lang": "js",
  6562. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  6563. }
  6564. ]
  6565. }
  6566. },
  6567. "/tui/open-models": {
  6568. "post": {
  6569. "operationId": "tui.openModels",
  6570. "parameters": [
  6571. {
  6572. "in": "query",
  6573. "name": "directory",
  6574. "schema": {
  6575. "type": "string"
  6576. }
  6577. },
  6578. {
  6579. "in": "query",
  6580. "name": "workspace",
  6581. "schema": {
  6582. "type": "string"
  6583. }
  6584. }
  6585. ],
  6586. "summary": "Open models dialog",
  6587. "description": "Open the model dialog",
  6588. "responses": {
  6589. "200": {
  6590. "description": "Model dialog opened successfully",
  6591. "content": {
  6592. "application/json": {
  6593. "schema": {
  6594. "type": "boolean"
  6595. }
  6596. }
  6597. }
  6598. }
  6599. },
  6600. "x-codeSamples": [
  6601. {
  6602. "lang": "js",
  6603. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  6604. }
  6605. ]
  6606. }
  6607. },
  6608. "/tui/submit-prompt": {
  6609. "post": {
  6610. "operationId": "tui.submitPrompt",
  6611. "parameters": [
  6612. {
  6613. "in": "query",
  6614. "name": "directory",
  6615. "schema": {
  6616. "type": "string"
  6617. }
  6618. },
  6619. {
  6620. "in": "query",
  6621. "name": "workspace",
  6622. "schema": {
  6623. "type": "string"
  6624. }
  6625. }
  6626. ],
  6627. "summary": "Submit TUI prompt",
  6628. "description": "Submit the prompt",
  6629. "responses": {
  6630. "200": {
  6631. "description": "Prompt submitted successfully",
  6632. "content": {
  6633. "application/json": {
  6634. "schema": {
  6635. "type": "boolean"
  6636. }
  6637. }
  6638. }
  6639. }
  6640. },
  6641. "x-codeSamples": [
  6642. {
  6643. "lang": "js",
  6644. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  6645. }
  6646. ]
  6647. }
  6648. },
  6649. "/tui/clear-prompt": {
  6650. "post": {
  6651. "operationId": "tui.clearPrompt",
  6652. "parameters": [
  6653. {
  6654. "in": "query",
  6655. "name": "directory",
  6656. "schema": {
  6657. "type": "string"
  6658. }
  6659. },
  6660. {
  6661. "in": "query",
  6662. "name": "workspace",
  6663. "schema": {
  6664. "type": "string"
  6665. }
  6666. }
  6667. ],
  6668. "summary": "Clear TUI prompt",
  6669. "description": "Clear the prompt",
  6670. "responses": {
  6671. "200": {
  6672. "description": "Prompt cleared successfully",
  6673. "content": {
  6674. "application/json": {
  6675. "schema": {
  6676. "type": "boolean"
  6677. }
  6678. }
  6679. }
  6680. }
  6681. },
  6682. "x-codeSamples": [
  6683. {
  6684. "lang": "js",
  6685. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  6686. }
  6687. ]
  6688. }
  6689. },
  6690. "/tui/execute-command": {
  6691. "post": {
  6692. "operationId": "tui.executeCommand",
  6693. "parameters": [
  6694. {
  6695. "in": "query",
  6696. "name": "directory",
  6697. "schema": {
  6698. "type": "string"
  6699. }
  6700. },
  6701. {
  6702. "in": "query",
  6703. "name": "workspace",
  6704. "schema": {
  6705. "type": "string"
  6706. }
  6707. }
  6708. ],
  6709. "summary": "Execute TUI command",
  6710. "description": "Execute a TUI command (e.g. agent_cycle)",
  6711. "responses": {
  6712. "200": {
  6713. "description": "Command executed successfully",
  6714. "content": {
  6715. "application/json": {
  6716. "schema": {
  6717. "type": "boolean"
  6718. }
  6719. }
  6720. }
  6721. },
  6722. "400": {
  6723. "description": "Bad request",
  6724. "content": {
  6725. "application/json": {
  6726. "schema": {
  6727. "$ref": "#/components/schemas/BadRequestError"
  6728. }
  6729. }
  6730. }
  6731. }
  6732. },
  6733. "requestBody": {
  6734. "content": {
  6735. "application/json": {
  6736. "schema": {
  6737. "type": "object",
  6738. "properties": {
  6739. "command": {
  6740. "type": "string"
  6741. }
  6742. },
  6743. "required": ["command"]
  6744. }
  6745. }
  6746. }
  6747. },
  6748. "x-codeSamples": [
  6749. {
  6750. "lang": "js",
  6751. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  6752. }
  6753. ]
  6754. }
  6755. },
  6756. "/tui/show-toast": {
  6757. "post": {
  6758. "operationId": "tui.showToast",
  6759. "parameters": [
  6760. {
  6761. "in": "query",
  6762. "name": "directory",
  6763. "schema": {
  6764. "type": "string"
  6765. }
  6766. },
  6767. {
  6768. "in": "query",
  6769. "name": "workspace",
  6770. "schema": {
  6771. "type": "string"
  6772. }
  6773. }
  6774. ],
  6775. "summary": "Show TUI toast",
  6776. "description": "Show a toast notification in the TUI",
  6777. "responses": {
  6778. "200": {
  6779. "description": "Toast notification shown successfully",
  6780. "content": {
  6781. "application/json": {
  6782. "schema": {
  6783. "type": "boolean"
  6784. }
  6785. }
  6786. }
  6787. }
  6788. },
  6789. "requestBody": {
  6790. "content": {
  6791. "application/json": {
  6792. "schema": {
  6793. "type": "object",
  6794. "properties": {
  6795. "title": {
  6796. "type": "string"
  6797. },
  6798. "message": {
  6799. "type": "string"
  6800. },
  6801. "variant": {
  6802. "type": "string",
  6803. "enum": ["info", "success", "warning", "error"]
  6804. },
  6805. "duration": {
  6806. "description": "Duration in milliseconds",
  6807. "type": "number"
  6808. }
  6809. },
  6810. "required": ["message", "variant"]
  6811. }
  6812. }
  6813. }
  6814. },
  6815. "x-codeSamples": [
  6816. {
  6817. "lang": "js",
  6818. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  6819. }
  6820. ]
  6821. }
  6822. },
  6823. "/tui/publish": {
  6824. "post": {
  6825. "operationId": "tui.publish",
  6826. "parameters": [
  6827. {
  6828. "in": "query",
  6829. "name": "directory",
  6830. "schema": {
  6831. "type": "string"
  6832. }
  6833. },
  6834. {
  6835. "in": "query",
  6836. "name": "workspace",
  6837. "schema": {
  6838. "type": "string"
  6839. }
  6840. }
  6841. ],
  6842. "summary": "Publish TUI event",
  6843. "description": "Publish a TUI event",
  6844. "responses": {
  6845. "200": {
  6846. "description": "Event published successfully",
  6847. "content": {
  6848. "application/json": {
  6849. "schema": {
  6850. "type": "boolean"
  6851. }
  6852. }
  6853. }
  6854. },
  6855. "400": {
  6856. "description": "Bad request",
  6857. "content": {
  6858. "application/json": {
  6859. "schema": {
  6860. "$ref": "#/components/schemas/BadRequestError"
  6861. }
  6862. }
  6863. }
  6864. }
  6865. },
  6866. "requestBody": {
  6867. "content": {
  6868. "application/json": {
  6869. "schema": {
  6870. "anyOf": [
  6871. {
  6872. "$ref": "#/components/schemas/Event.tui.prompt.append"
  6873. },
  6874. {
  6875. "$ref": "#/components/schemas/Event.tui.command.execute"
  6876. },
  6877. {
  6878. "$ref": "#/components/schemas/Event.tui.toast.show"
  6879. },
  6880. {
  6881. "$ref": "#/components/schemas/Event.tui.session.select"
  6882. }
  6883. ]
  6884. }
  6885. }
  6886. }
  6887. },
  6888. "x-codeSamples": [
  6889. {
  6890. "lang": "js",
  6891. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  6892. }
  6893. ]
  6894. }
  6895. },
  6896. "/tui/select-session": {
  6897. "post": {
  6898. "operationId": "tui.selectSession",
  6899. "parameters": [
  6900. {
  6901. "in": "query",
  6902. "name": "directory",
  6903. "schema": {
  6904. "type": "string"
  6905. }
  6906. },
  6907. {
  6908. "in": "query",
  6909. "name": "workspace",
  6910. "schema": {
  6911. "type": "string"
  6912. }
  6913. }
  6914. ],
  6915. "summary": "Select session",
  6916. "description": "Navigate the TUI to display the specified session.",
  6917. "responses": {
  6918. "200": {
  6919. "description": "Session selected successfully",
  6920. "content": {
  6921. "application/json": {
  6922. "schema": {
  6923. "type": "boolean"
  6924. }
  6925. }
  6926. }
  6927. },
  6928. "400": {
  6929. "description": "Bad request",
  6930. "content": {
  6931. "application/json": {
  6932. "schema": {
  6933. "$ref": "#/components/schemas/BadRequestError"
  6934. }
  6935. }
  6936. }
  6937. },
  6938. "404": {
  6939. "description": "Not found",
  6940. "content": {
  6941. "application/json": {
  6942. "schema": {
  6943. "$ref": "#/components/schemas/NotFoundError"
  6944. }
  6945. }
  6946. }
  6947. }
  6948. },
  6949. "requestBody": {
  6950. "content": {
  6951. "application/json": {
  6952. "schema": {
  6953. "type": "object",
  6954. "properties": {
  6955. "sessionID": {
  6956. "description": "Session ID to navigate to",
  6957. "type": "string",
  6958. "pattern": "^ses.*"
  6959. }
  6960. },
  6961. "required": ["sessionID"]
  6962. }
  6963. }
  6964. }
  6965. },
  6966. "x-codeSamples": [
  6967. {
  6968. "lang": "js",
  6969. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  6970. }
  6971. ]
  6972. }
  6973. },
  6974. "/tui/control/next": {
  6975. "get": {
  6976. "operationId": "tui.control.next",
  6977. "parameters": [
  6978. {
  6979. "in": "query",
  6980. "name": "directory",
  6981. "schema": {
  6982. "type": "string"
  6983. }
  6984. },
  6985. {
  6986. "in": "query",
  6987. "name": "workspace",
  6988. "schema": {
  6989. "type": "string"
  6990. }
  6991. }
  6992. ],
  6993. "summary": "Get next TUI request",
  6994. "description": "Retrieve the next TUI (Terminal User Interface) request from the queue for processing.",
  6995. "responses": {
  6996. "200": {
  6997. "description": "Next TUI request",
  6998. "content": {
  6999. "application/json": {
  7000. "schema": {
  7001. "type": "object",
  7002. "properties": {
  7003. "path": {
  7004. "type": "string"
  7005. },
  7006. "body": {}
  7007. },
  7008. "required": ["path", "body"]
  7009. }
  7010. }
  7011. }
  7012. }
  7013. },
  7014. "x-codeSamples": [
  7015. {
  7016. "lang": "js",
  7017. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  7018. }
  7019. ]
  7020. }
  7021. },
  7022. "/tui/control/response": {
  7023. "post": {
  7024. "operationId": "tui.control.response",
  7025. "parameters": [
  7026. {
  7027. "in": "query",
  7028. "name": "directory",
  7029. "schema": {
  7030. "type": "string"
  7031. }
  7032. },
  7033. {
  7034. "in": "query",
  7035. "name": "workspace",
  7036. "schema": {
  7037. "type": "string"
  7038. }
  7039. }
  7040. ],
  7041. "summary": "Submit TUI response",
  7042. "description": "Submit a response to the TUI request queue to complete a pending request.",
  7043. "responses": {
  7044. "200": {
  7045. "description": "Response submitted successfully",
  7046. "content": {
  7047. "application/json": {
  7048. "schema": {
  7049. "type": "boolean"
  7050. }
  7051. }
  7052. }
  7053. }
  7054. },
  7055. "requestBody": {
  7056. "content": {
  7057. "application/json": {
  7058. "schema": {}
  7059. }
  7060. }
  7061. },
  7062. "x-codeSamples": [
  7063. {
  7064. "lang": "js",
  7065. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  7066. }
  7067. ]
  7068. }
  7069. },
  7070. "/instance/dispose": {
  7071. "post": {
  7072. "operationId": "instance.dispose",
  7073. "parameters": [
  7074. {
  7075. "in": "query",
  7076. "name": "directory",
  7077. "schema": {
  7078. "type": "string"
  7079. }
  7080. },
  7081. {
  7082. "in": "query",
  7083. "name": "workspace",
  7084. "schema": {
  7085. "type": "string"
  7086. }
  7087. }
  7088. ],
  7089. "summary": "Dispose instance",
  7090. "description": "Clean up and dispose the current OpenCode instance, releasing all resources.",
  7091. "responses": {
  7092. "200": {
  7093. "description": "Instance disposed",
  7094. "content": {
  7095. "application/json": {
  7096. "schema": {
  7097. "type": "boolean"
  7098. }
  7099. }
  7100. }
  7101. }
  7102. },
  7103. "x-codeSamples": [
  7104. {
  7105. "lang": "js",
  7106. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.instance.dispose({\n ...\n})"
  7107. }
  7108. ]
  7109. }
  7110. },
  7111. "/path": {
  7112. "get": {
  7113. "operationId": "path.get",
  7114. "parameters": [
  7115. {
  7116. "in": "query",
  7117. "name": "directory",
  7118. "schema": {
  7119. "type": "string"
  7120. }
  7121. },
  7122. {
  7123. "in": "query",
  7124. "name": "workspace",
  7125. "schema": {
  7126. "type": "string"
  7127. }
  7128. }
  7129. ],
  7130. "summary": "Get paths",
  7131. "description": "Retrieve the current working directory and related path information for the OpenCode instance.",
  7132. "responses": {
  7133. "200": {
  7134. "description": "Path",
  7135. "content": {
  7136. "application/json": {
  7137. "schema": {
  7138. "$ref": "#/components/schemas/Path"
  7139. }
  7140. }
  7141. }
  7142. }
  7143. },
  7144. "x-codeSamples": [
  7145. {
  7146. "lang": "js",
  7147. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.path.get({\n ...\n})"
  7148. }
  7149. ]
  7150. }
  7151. },
  7152. "/vcs": {
  7153. "get": {
  7154. "operationId": "vcs.get",
  7155. "parameters": [
  7156. {
  7157. "in": "query",
  7158. "name": "directory",
  7159. "schema": {
  7160. "type": "string"
  7161. }
  7162. },
  7163. {
  7164. "in": "query",
  7165. "name": "workspace",
  7166. "schema": {
  7167. "type": "string"
  7168. }
  7169. }
  7170. ],
  7171. "summary": "Get VCS info",
  7172. "description": "Retrieve version control system (VCS) information for the current project, such as git branch.",
  7173. "responses": {
  7174. "200": {
  7175. "description": "VCS info",
  7176. "content": {
  7177. "application/json": {
  7178. "schema": {
  7179. "$ref": "#/components/schemas/VcsInfo"
  7180. }
  7181. }
  7182. }
  7183. }
  7184. },
  7185. "x-codeSamples": [
  7186. {
  7187. "lang": "js",
  7188. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.get({\n ...\n})"
  7189. }
  7190. ]
  7191. }
  7192. },
  7193. "/vcs/diff": {
  7194. "get": {
  7195. "operationId": "vcs.diff",
  7196. "parameters": [
  7197. {
  7198. "in": "query",
  7199. "name": "directory",
  7200. "schema": {
  7201. "type": "string"
  7202. }
  7203. },
  7204. {
  7205. "in": "query",
  7206. "name": "workspace",
  7207. "schema": {
  7208. "type": "string"
  7209. }
  7210. },
  7211. {
  7212. "in": "query",
  7213. "name": "mode",
  7214. "schema": {
  7215. "type": "string",
  7216. "enum": ["git", "branch"]
  7217. },
  7218. "required": true
  7219. }
  7220. ],
  7221. "summary": "Get VCS diff",
  7222. "description": "Retrieve the current git diff for the working tree or against the default branch.",
  7223. "responses": {
  7224. "200": {
  7225. "description": "VCS diff",
  7226. "content": {
  7227. "application/json": {
  7228. "schema": {
  7229. "type": "array",
  7230. "items": {
  7231. "$ref": "#/components/schemas/VcsFileDiff"
  7232. }
  7233. }
  7234. }
  7235. }
  7236. }
  7237. },
  7238. "x-codeSamples": [
  7239. {
  7240. "lang": "js",
  7241. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff({\n ...\n})"
  7242. }
  7243. ]
  7244. }
  7245. },
  7246. "/command": {
  7247. "get": {
  7248. "operationId": "command.list",
  7249. "parameters": [
  7250. {
  7251. "in": "query",
  7252. "name": "directory",
  7253. "schema": {
  7254. "type": "string"
  7255. }
  7256. },
  7257. {
  7258. "in": "query",
  7259. "name": "workspace",
  7260. "schema": {
  7261. "type": "string"
  7262. }
  7263. }
  7264. ],
  7265. "summary": "List commands",
  7266. "description": "Get a list of all available commands in the OpenCode system.",
  7267. "responses": {
  7268. "200": {
  7269. "description": "List of commands",
  7270. "content": {
  7271. "application/json": {
  7272. "schema": {
  7273. "type": "array",
  7274. "items": {
  7275. "$ref": "#/components/schemas/Command"
  7276. }
  7277. }
  7278. }
  7279. }
  7280. }
  7281. },
  7282. "x-codeSamples": [
  7283. {
  7284. "lang": "js",
  7285. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
  7286. }
  7287. ]
  7288. }
  7289. },
  7290. "/agent": {
  7291. "get": {
  7292. "operationId": "app.agents",
  7293. "parameters": [
  7294. {
  7295. "in": "query",
  7296. "name": "directory",
  7297. "schema": {
  7298. "type": "string"
  7299. }
  7300. },
  7301. {
  7302. "in": "query",
  7303. "name": "workspace",
  7304. "schema": {
  7305. "type": "string"
  7306. }
  7307. }
  7308. ],
  7309. "summary": "List agents",
  7310. "description": "Get a list of all available AI agents in the OpenCode system.",
  7311. "responses": {
  7312. "200": {
  7313. "description": "List of agents",
  7314. "content": {
  7315. "application/json": {
  7316. "schema": {
  7317. "type": "array",
  7318. "items": {
  7319. "$ref": "#/components/schemas/Agent"
  7320. }
  7321. }
  7322. }
  7323. }
  7324. }
  7325. },
  7326. "x-codeSamples": [
  7327. {
  7328. "lang": "js",
  7329. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
  7330. }
  7331. ]
  7332. }
  7333. },
  7334. "/skill": {
  7335. "get": {
  7336. "operationId": "app.skills",
  7337. "parameters": [
  7338. {
  7339. "in": "query",
  7340. "name": "directory",
  7341. "schema": {
  7342. "type": "string"
  7343. }
  7344. },
  7345. {
  7346. "in": "query",
  7347. "name": "workspace",
  7348. "schema": {
  7349. "type": "string"
  7350. }
  7351. }
  7352. ],
  7353. "summary": "List skills",
  7354. "description": "Get a list of all available skills in the OpenCode system.",
  7355. "responses": {
  7356. "200": {
  7357. "description": "List of skills",
  7358. "content": {
  7359. "application/json": {
  7360. "schema": {
  7361. "type": "array",
  7362. "items": {
  7363. "type": "object",
  7364. "properties": {
  7365. "name": {
  7366. "type": "string"
  7367. },
  7368. "description": {
  7369. "type": "string"
  7370. },
  7371. "location": {
  7372. "type": "string"
  7373. },
  7374. "content": {
  7375. "type": "string"
  7376. }
  7377. },
  7378. "required": ["name", "description", "location", "content"]
  7379. }
  7380. }
  7381. }
  7382. }
  7383. }
  7384. },
  7385. "x-codeSamples": [
  7386. {
  7387. "lang": "js",
  7388. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.skills({\n ...\n})"
  7389. }
  7390. ]
  7391. }
  7392. },
  7393. "/lsp": {
  7394. "get": {
  7395. "operationId": "lsp.status",
  7396. "parameters": [
  7397. {
  7398. "in": "query",
  7399. "name": "directory",
  7400. "schema": {
  7401. "type": "string"
  7402. }
  7403. },
  7404. {
  7405. "in": "query",
  7406. "name": "workspace",
  7407. "schema": {
  7408. "type": "string"
  7409. }
  7410. }
  7411. ],
  7412. "summary": "Get LSP status",
  7413. "description": "Get LSP server status",
  7414. "responses": {
  7415. "200": {
  7416. "description": "LSP server status",
  7417. "content": {
  7418. "application/json": {
  7419. "schema": {
  7420. "type": "array",
  7421. "items": {
  7422. "$ref": "#/components/schemas/LSPStatus"
  7423. }
  7424. }
  7425. }
  7426. }
  7427. }
  7428. },
  7429. "x-codeSamples": [
  7430. {
  7431. "lang": "js",
  7432. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
  7433. }
  7434. ]
  7435. }
  7436. },
  7437. "/formatter": {
  7438. "get": {
  7439. "operationId": "formatter.status",
  7440. "parameters": [
  7441. {
  7442. "in": "query",
  7443. "name": "directory",
  7444. "schema": {
  7445. "type": "string"
  7446. }
  7447. },
  7448. {
  7449. "in": "query",
  7450. "name": "workspace",
  7451. "schema": {
  7452. "type": "string"
  7453. }
  7454. }
  7455. ],
  7456. "summary": "Get formatter status",
  7457. "description": "Get formatter status",
  7458. "responses": {
  7459. "200": {
  7460. "description": "Formatter status",
  7461. "content": {
  7462. "application/json": {
  7463. "schema": {
  7464. "type": "array",
  7465. "items": {
  7466. "$ref": "#/components/schemas/FormatterStatus"
  7467. }
  7468. }
  7469. }
  7470. }
  7471. }
  7472. },
  7473. "x-codeSamples": [
  7474. {
  7475. "lang": "js",
  7476. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
  7477. }
  7478. ]
  7479. }
  7480. }
  7481. },
  7482. "components": {
  7483. "schemas": {
  7484. "Project": {
  7485. "type": "object",
  7486. "properties": {
  7487. "id": {
  7488. "type": "string"
  7489. },
  7490. "worktree": {
  7491. "type": "string"
  7492. },
  7493. "vcs": {
  7494. "type": "string",
  7495. "const": "git"
  7496. },
  7497. "name": {
  7498. "type": "string"
  7499. },
  7500. "icon": {
  7501. "type": "object",
  7502. "properties": {
  7503. "url": {
  7504. "type": "string"
  7505. },
  7506. "override": {
  7507. "type": "string"
  7508. },
  7509. "color": {
  7510. "type": "string"
  7511. }
  7512. }
  7513. },
  7514. "commands": {
  7515. "type": "object",
  7516. "properties": {
  7517. "start": {
  7518. "description": "Startup script to run when creating a new workspace (worktree)",
  7519. "type": "string"
  7520. }
  7521. }
  7522. },
  7523. "time": {
  7524. "type": "object",
  7525. "properties": {
  7526. "created": {
  7527. "type": "number"
  7528. },
  7529. "updated": {
  7530. "type": "number"
  7531. },
  7532. "initialized": {
  7533. "type": "number"
  7534. }
  7535. },
  7536. "required": ["created", "updated"]
  7537. },
  7538. "sandboxes": {
  7539. "type": "array",
  7540. "items": {
  7541. "type": "string"
  7542. }
  7543. }
  7544. },
  7545. "required": ["id", "worktree", "time", "sandboxes"]
  7546. },
  7547. "Event.project.updated": {
  7548. "type": "object",
  7549. "properties": {
  7550. "type": {
  7551. "type": "string",
  7552. "const": "project.updated"
  7553. },
  7554. "properties": {
  7555. "$ref": "#/components/schemas/Project"
  7556. }
  7557. },
  7558. "required": ["type", "properties"]
  7559. },
  7560. "Event.server.instance.disposed": {
  7561. "type": "object",
  7562. "properties": {
  7563. "type": {
  7564. "type": "string",
  7565. "const": "server.instance.disposed"
  7566. },
  7567. "properties": {
  7568. "type": "object",
  7569. "properties": {
  7570. "directory": {
  7571. "type": "string"
  7572. }
  7573. },
  7574. "required": ["directory"]
  7575. }
  7576. },
  7577. "required": ["type", "properties"]
  7578. },
  7579. "Event.server.connected": {
  7580. "type": "object",
  7581. "properties": {
  7582. "type": {
  7583. "type": "string",
  7584. "const": "server.connected"
  7585. },
  7586. "properties": {
  7587. "type": "object",
  7588. "properties": {}
  7589. }
  7590. },
  7591. "required": ["type", "properties"]
  7592. },
  7593. "Event.global.disposed": {
  7594. "type": "object",
  7595. "properties": {
  7596. "type": {
  7597. "type": "string",
  7598. "const": "global.disposed"
  7599. },
  7600. "properties": {
  7601. "type": "object",
  7602. "properties": {}
  7603. }
  7604. },
  7605. "required": ["type", "properties"]
  7606. },
  7607. "Event.file.edited": {
  7608. "type": "object",
  7609. "properties": {
  7610. "type": {
  7611. "type": "string",
  7612. "const": "file.edited"
  7613. },
  7614. "properties": {
  7615. "type": "object",
  7616. "properties": {
  7617. "file": {
  7618. "type": "string"
  7619. }
  7620. },
  7621. "required": ["file"]
  7622. }
  7623. },
  7624. "required": ["type", "properties"]
  7625. },
  7626. "Event.file.watcher.updated": {
  7627. "type": "object",
  7628. "properties": {
  7629. "type": {
  7630. "type": "string",
  7631. "const": "file.watcher.updated"
  7632. },
  7633. "properties": {
  7634. "type": "object",
  7635. "properties": {
  7636. "file": {
  7637. "type": "string"
  7638. },
  7639. "event": {
  7640. "type": "string",
  7641. "enum": ["add", "change", "unlink"]
  7642. }
  7643. },
  7644. "required": ["file", "event"]
  7645. }
  7646. },
  7647. "required": ["type", "properties"]
  7648. },
  7649. "Event.lsp.client.diagnostics": {
  7650. "type": "object",
  7651. "properties": {
  7652. "type": {
  7653. "type": "string",
  7654. "const": "lsp.client.diagnostics"
  7655. },
  7656. "properties": {
  7657. "type": "object",
  7658. "properties": {
  7659. "serverID": {
  7660. "type": "string"
  7661. },
  7662. "path": {
  7663. "type": "string"
  7664. }
  7665. },
  7666. "required": ["serverID", "path"]
  7667. }
  7668. },
  7669. "required": ["type", "properties"]
  7670. },
  7671. "Event.lsp.updated": {
  7672. "type": "object",
  7673. "properties": {
  7674. "type": {
  7675. "type": "string",
  7676. "const": "lsp.updated"
  7677. },
  7678. "properties": {
  7679. "type": "object",
  7680. "properties": {}
  7681. }
  7682. },
  7683. "required": ["type", "properties"]
  7684. },
  7685. "Event.installation.updated": {
  7686. "type": "object",
  7687. "properties": {
  7688. "type": {
  7689. "type": "string",
  7690. "const": "installation.updated"
  7691. },
  7692. "properties": {
  7693. "type": "object",
  7694. "properties": {
  7695. "version": {
  7696. "type": "string"
  7697. }
  7698. },
  7699. "required": ["version"]
  7700. }
  7701. },
  7702. "required": ["type", "properties"]
  7703. },
  7704. "Event.installation.update-available": {
  7705. "type": "object",
  7706. "properties": {
  7707. "type": {
  7708. "type": "string",
  7709. "const": "installation.update-available"
  7710. },
  7711. "properties": {
  7712. "type": "object",
  7713. "properties": {
  7714. "version": {
  7715. "type": "string"
  7716. }
  7717. },
  7718. "required": ["version"]
  7719. }
  7720. },
  7721. "required": ["type", "properties"]
  7722. },
  7723. "Event.message.part.delta": {
  7724. "type": "object",
  7725. "properties": {
  7726. "type": {
  7727. "type": "string",
  7728. "const": "message.part.delta"
  7729. },
  7730. "properties": {
  7731. "type": "object",
  7732. "properties": {
  7733. "sessionID": {
  7734. "type": "string",
  7735. "pattern": "^ses.*"
  7736. },
  7737. "messageID": {
  7738. "type": "string",
  7739. "pattern": "^msg.*"
  7740. },
  7741. "partID": {
  7742. "type": "string",
  7743. "pattern": "^prt.*"
  7744. },
  7745. "field": {
  7746. "type": "string"
  7747. },
  7748. "delta": {
  7749. "type": "string"
  7750. }
  7751. },
  7752. "required": ["sessionID", "messageID", "partID", "field", "delta"]
  7753. }
  7754. },
  7755. "required": ["type", "properties"]
  7756. },
  7757. "PermissionRequest": {
  7758. "type": "object",
  7759. "properties": {
  7760. "id": {
  7761. "type": "string",
  7762. "pattern": "^per.*"
  7763. },
  7764. "sessionID": {
  7765. "type": "string",
  7766. "pattern": "^ses.*"
  7767. },
  7768. "permission": {
  7769. "type": "string"
  7770. },
  7771. "patterns": {
  7772. "type": "array",
  7773. "items": {
  7774. "type": "string"
  7775. }
  7776. },
  7777. "metadata": {
  7778. "type": "object",
  7779. "propertyNames": {
  7780. "type": "string"
  7781. },
  7782. "additionalProperties": {}
  7783. },
  7784. "always": {
  7785. "type": "array",
  7786. "items": {
  7787. "type": "string"
  7788. }
  7789. },
  7790. "tool": {
  7791. "type": "object",
  7792. "properties": {
  7793. "messageID": {
  7794. "type": "string",
  7795. "pattern": "^msg.*"
  7796. },
  7797. "callID": {
  7798. "type": "string"
  7799. }
  7800. },
  7801. "required": ["messageID", "callID"]
  7802. }
  7803. },
  7804. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"]
  7805. },
  7806. "Event.permission.asked": {
  7807. "type": "object",
  7808. "properties": {
  7809. "type": {
  7810. "type": "string",
  7811. "const": "permission.asked"
  7812. },
  7813. "properties": {
  7814. "$ref": "#/components/schemas/PermissionRequest"
  7815. }
  7816. },
  7817. "required": ["type", "properties"]
  7818. },
  7819. "Event.permission.replied": {
  7820. "type": "object",
  7821. "properties": {
  7822. "type": {
  7823. "type": "string",
  7824. "const": "permission.replied"
  7825. },
  7826. "properties": {
  7827. "type": "object",
  7828. "properties": {
  7829. "sessionID": {
  7830. "type": "string",
  7831. "pattern": "^ses.*"
  7832. },
  7833. "requestID": {
  7834. "type": "string",
  7835. "pattern": "^per.*"
  7836. },
  7837. "reply": {
  7838. "type": "string",
  7839. "enum": ["once", "always", "reject"]
  7840. }
  7841. },
  7842. "required": ["sessionID", "requestID", "reply"]
  7843. }
  7844. },
  7845. "required": ["type", "properties"]
  7846. },
  7847. "SnapshotFileDiff": {
  7848. "type": "object",
  7849. "properties": {
  7850. "file": {
  7851. "type": "string"
  7852. },
  7853. "patch": {
  7854. "type": "string"
  7855. },
  7856. "additions": {
  7857. "type": "number"
  7858. },
  7859. "deletions": {
  7860. "type": "number"
  7861. },
  7862. "status": {
  7863. "type": "string",
  7864. "enum": ["added", "deleted", "modified"]
  7865. }
  7866. },
  7867. "required": ["file", "patch", "additions", "deletions"]
  7868. },
  7869. "Event.session.diff": {
  7870. "type": "object",
  7871. "properties": {
  7872. "type": {
  7873. "type": "string",
  7874. "const": "session.diff"
  7875. },
  7876. "properties": {
  7877. "type": "object",
  7878. "properties": {
  7879. "sessionID": {
  7880. "type": "string",
  7881. "pattern": "^ses.*"
  7882. },
  7883. "diff": {
  7884. "type": "array",
  7885. "items": {
  7886. "$ref": "#/components/schemas/SnapshotFileDiff"
  7887. }
  7888. }
  7889. },
  7890. "required": ["sessionID", "diff"]
  7891. }
  7892. },
  7893. "required": ["type", "properties"]
  7894. },
  7895. "ProviderAuthError": {
  7896. "type": "object",
  7897. "properties": {
  7898. "name": {
  7899. "type": "string",
  7900. "const": "ProviderAuthError"
  7901. },
  7902. "data": {
  7903. "type": "object",
  7904. "properties": {
  7905. "providerID": {
  7906. "type": "string"
  7907. },
  7908. "message": {
  7909. "type": "string"
  7910. }
  7911. },
  7912. "required": ["providerID", "message"]
  7913. }
  7914. },
  7915. "required": ["name", "data"]
  7916. },
  7917. "UnknownError": {
  7918. "type": "object",
  7919. "properties": {
  7920. "name": {
  7921. "type": "string",
  7922. "const": "UnknownError"
  7923. },
  7924. "data": {
  7925. "type": "object",
  7926. "properties": {
  7927. "message": {
  7928. "type": "string"
  7929. }
  7930. },
  7931. "required": ["message"]
  7932. }
  7933. },
  7934. "required": ["name", "data"]
  7935. },
  7936. "MessageOutputLengthError": {
  7937. "type": "object",
  7938. "properties": {
  7939. "name": {
  7940. "type": "string",
  7941. "const": "MessageOutputLengthError"
  7942. },
  7943. "data": {
  7944. "type": "object",
  7945. "properties": {}
  7946. }
  7947. },
  7948. "required": ["name", "data"]
  7949. },
  7950. "MessageAbortedError": {
  7951. "type": "object",
  7952. "properties": {
  7953. "name": {
  7954. "type": "string",
  7955. "const": "MessageAbortedError"
  7956. },
  7957. "data": {
  7958. "type": "object",
  7959. "properties": {
  7960. "message": {
  7961. "type": "string"
  7962. }
  7963. },
  7964. "required": ["message"]
  7965. }
  7966. },
  7967. "required": ["name", "data"]
  7968. },
  7969. "StructuredOutputError": {
  7970. "type": "object",
  7971. "properties": {
  7972. "name": {
  7973. "type": "string",
  7974. "const": "StructuredOutputError"
  7975. },
  7976. "data": {
  7977. "type": "object",
  7978. "properties": {
  7979. "message": {
  7980. "type": "string"
  7981. },
  7982. "retries": {
  7983. "type": "number"
  7984. }
  7985. },
  7986. "required": ["message", "retries"]
  7987. }
  7988. },
  7989. "required": ["name", "data"]
  7990. },
  7991. "ContextOverflowError": {
  7992. "type": "object",
  7993. "properties": {
  7994. "name": {
  7995. "type": "string",
  7996. "const": "ContextOverflowError"
  7997. },
  7998. "data": {
  7999. "type": "object",
  8000. "properties": {
  8001. "message": {
  8002. "type": "string"
  8003. },
  8004. "responseBody": {
  8005. "type": "string"
  8006. }
  8007. },
  8008. "required": ["message"]
  8009. }
  8010. },
  8011. "required": ["name", "data"]
  8012. },
  8013. "APIError": {
  8014. "type": "object",
  8015. "properties": {
  8016. "name": {
  8017. "type": "string",
  8018. "const": "APIError"
  8019. },
  8020. "data": {
  8021. "type": "object",
  8022. "properties": {
  8023. "message": {
  8024. "type": "string"
  8025. },
  8026. "statusCode": {
  8027. "type": "number"
  8028. },
  8029. "isRetryable": {
  8030. "type": "boolean"
  8031. },
  8032. "responseHeaders": {
  8033. "type": "object",
  8034. "propertyNames": {
  8035. "type": "string"
  8036. },
  8037. "additionalProperties": {
  8038. "type": "string"
  8039. }
  8040. },
  8041. "responseBody": {
  8042. "type": "string"
  8043. },
  8044. "metadata": {
  8045. "type": "object",
  8046. "propertyNames": {
  8047. "type": "string"
  8048. },
  8049. "additionalProperties": {
  8050. "type": "string"
  8051. }
  8052. }
  8053. },
  8054. "required": ["message", "isRetryable"]
  8055. }
  8056. },
  8057. "required": ["name", "data"]
  8058. },
  8059. "Event.session.error": {
  8060. "type": "object",
  8061. "properties": {
  8062. "type": {
  8063. "type": "string",
  8064. "const": "session.error"
  8065. },
  8066. "properties": {
  8067. "type": "object",
  8068. "properties": {
  8069. "sessionID": {
  8070. "type": "string",
  8071. "pattern": "^ses.*"
  8072. },
  8073. "error": {
  8074. "anyOf": [
  8075. {
  8076. "$ref": "#/components/schemas/ProviderAuthError"
  8077. },
  8078. {
  8079. "$ref": "#/components/schemas/UnknownError"
  8080. },
  8081. {
  8082. "$ref": "#/components/schemas/MessageOutputLengthError"
  8083. },
  8084. {
  8085. "$ref": "#/components/schemas/MessageAbortedError"
  8086. },
  8087. {
  8088. "$ref": "#/components/schemas/StructuredOutputError"
  8089. },
  8090. {
  8091. "$ref": "#/components/schemas/ContextOverflowError"
  8092. },
  8093. {
  8094. "$ref": "#/components/schemas/APIError"
  8095. }
  8096. ]
  8097. }
  8098. }
  8099. }
  8100. },
  8101. "required": ["type", "properties"]
  8102. },
  8103. "QuestionOption": {
  8104. "type": "object",
  8105. "properties": {
  8106. "label": {
  8107. "description": "Display text (1-5 words, concise)",
  8108. "type": "string"
  8109. },
  8110. "description": {
  8111. "description": "Explanation of choice",
  8112. "type": "string"
  8113. }
  8114. },
  8115. "required": ["label", "description"]
  8116. },
  8117. "QuestionInfo": {
  8118. "type": "object",
  8119. "properties": {
  8120. "question": {
  8121. "description": "Complete question",
  8122. "type": "string"
  8123. },
  8124. "header": {
  8125. "description": "Very short label (max 30 chars)",
  8126. "type": "string"
  8127. },
  8128. "options": {
  8129. "description": "Available choices",
  8130. "type": "array",
  8131. "items": {
  8132. "$ref": "#/components/schemas/QuestionOption"
  8133. }
  8134. },
  8135. "multiple": {
  8136. "description": "Allow selecting multiple choices",
  8137. "type": "boolean"
  8138. },
  8139. "custom": {
  8140. "description": "Allow typing a custom answer (default: true)",
  8141. "type": "boolean"
  8142. }
  8143. },
  8144. "required": ["question", "header", "options"]
  8145. },
  8146. "QuestionTool": {
  8147. "type": "object",
  8148. "properties": {
  8149. "messageID": {
  8150. "type": "string",
  8151. "pattern": "^msg.*"
  8152. },
  8153. "callID": {
  8154. "type": "string"
  8155. }
  8156. },
  8157. "required": ["messageID", "callID"]
  8158. },
  8159. "QuestionRequest": {
  8160. "type": "object",
  8161. "properties": {
  8162. "id": {
  8163. "type": "string",
  8164. "pattern": "^que.*"
  8165. },
  8166. "sessionID": {
  8167. "type": "string",
  8168. "pattern": "^ses.*"
  8169. },
  8170. "questions": {
  8171. "description": "Questions to ask",
  8172. "type": "array",
  8173. "items": {
  8174. "$ref": "#/components/schemas/QuestionInfo"
  8175. }
  8176. },
  8177. "tool": {
  8178. "$ref": "#/components/schemas/QuestionTool"
  8179. }
  8180. },
  8181. "required": ["id", "sessionID", "questions"]
  8182. },
  8183. "Event.question.asked": {
  8184. "type": "object",
  8185. "properties": {
  8186. "type": {
  8187. "type": "string",
  8188. "const": "question.asked"
  8189. },
  8190. "properties": {
  8191. "$ref": "#/components/schemas/QuestionRequest"
  8192. }
  8193. },
  8194. "required": ["type", "properties"]
  8195. },
  8196. "QuestionAnswer": {
  8197. "type": "array",
  8198. "items": {
  8199. "type": "string"
  8200. }
  8201. },
  8202. "QuestionReplied": {
  8203. "type": "object",
  8204. "properties": {
  8205. "sessionID": {
  8206. "type": "string",
  8207. "pattern": "^ses.*"
  8208. },
  8209. "requestID": {
  8210. "type": "string",
  8211. "pattern": "^que.*"
  8212. },
  8213. "answers": {
  8214. "type": "array",
  8215. "items": {
  8216. "$ref": "#/components/schemas/QuestionAnswer"
  8217. }
  8218. }
  8219. },
  8220. "required": ["sessionID", "requestID", "answers"]
  8221. },
  8222. "Event.question.replied": {
  8223. "type": "object",
  8224. "properties": {
  8225. "type": {
  8226. "type": "string",
  8227. "const": "question.replied"
  8228. },
  8229. "properties": {
  8230. "$ref": "#/components/schemas/QuestionReplied"
  8231. }
  8232. },
  8233. "required": ["type", "properties"]
  8234. },
  8235. "QuestionRejected": {
  8236. "type": "object",
  8237. "properties": {
  8238. "sessionID": {
  8239. "type": "string",
  8240. "pattern": "^ses.*"
  8241. },
  8242. "requestID": {
  8243. "type": "string",
  8244. "pattern": "^que.*"
  8245. }
  8246. },
  8247. "required": ["sessionID", "requestID"]
  8248. },
  8249. "Event.question.rejected": {
  8250. "type": "object",
  8251. "properties": {
  8252. "type": {
  8253. "type": "string",
  8254. "const": "question.rejected"
  8255. },
  8256. "properties": {
  8257. "$ref": "#/components/schemas/QuestionRejected"
  8258. }
  8259. },
  8260. "required": ["type", "properties"]
  8261. },
  8262. "Todo": {
  8263. "type": "object",
  8264. "properties": {
  8265. "content": {
  8266. "description": "Brief description of the task",
  8267. "type": "string"
  8268. },
  8269. "status": {
  8270. "description": "Current status of the task: pending, in_progress, completed, cancelled",
  8271. "type": "string"
  8272. },
  8273. "priority": {
  8274. "description": "Priority level of the task: high, medium, low",
  8275. "type": "string"
  8276. }
  8277. },
  8278. "required": ["content", "status", "priority"]
  8279. },
  8280. "Event.todo.updated": {
  8281. "type": "object",
  8282. "properties": {
  8283. "type": {
  8284. "type": "string",
  8285. "const": "todo.updated"
  8286. },
  8287. "properties": {
  8288. "type": "object",
  8289. "properties": {
  8290. "sessionID": {
  8291. "type": "string",
  8292. "pattern": "^ses.*"
  8293. },
  8294. "todos": {
  8295. "type": "array",
  8296. "items": {
  8297. "$ref": "#/components/schemas/Todo"
  8298. }
  8299. }
  8300. },
  8301. "required": ["sessionID", "todos"]
  8302. }
  8303. },
  8304. "required": ["type", "properties"]
  8305. },
  8306. "SessionStatus": {
  8307. "anyOf": [
  8308. {
  8309. "type": "object",
  8310. "properties": {
  8311. "type": {
  8312. "type": "string",
  8313. "const": "idle"
  8314. }
  8315. },
  8316. "required": ["type"]
  8317. },
  8318. {
  8319. "type": "object",
  8320. "properties": {
  8321. "type": {
  8322. "type": "string",
  8323. "const": "retry"
  8324. },
  8325. "attempt": {
  8326. "type": "number"
  8327. },
  8328. "message": {
  8329. "type": "string"
  8330. },
  8331. "next": {
  8332. "type": "number"
  8333. }
  8334. },
  8335. "required": ["type", "attempt", "message", "next"]
  8336. },
  8337. {
  8338. "type": "object",
  8339. "properties": {
  8340. "type": {
  8341. "type": "string",
  8342. "const": "busy"
  8343. }
  8344. },
  8345. "required": ["type"]
  8346. }
  8347. ]
  8348. },
  8349. "Event.session.status": {
  8350. "type": "object",
  8351. "properties": {
  8352. "type": {
  8353. "type": "string",
  8354. "const": "session.status"
  8355. },
  8356. "properties": {
  8357. "type": "object",
  8358. "properties": {
  8359. "sessionID": {
  8360. "type": "string",
  8361. "pattern": "^ses.*"
  8362. },
  8363. "status": {
  8364. "$ref": "#/components/schemas/SessionStatus"
  8365. }
  8366. },
  8367. "required": ["sessionID", "status"]
  8368. }
  8369. },
  8370. "required": ["type", "properties"]
  8371. },
  8372. "Event.session.idle": {
  8373. "type": "object",
  8374. "properties": {
  8375. "type": {
  8376. "type": "string",
  8377. "const": "session.idle"
  8378. },
  8379. "properties": {
  8380. "type": "object",
  8381. "properties": {
  8382. "sessionID": {
  8383. "type": "string",
  8384. "pattern": "^ses.*"
  8385. }
  8386. },
  8387. "required": ["sessionID"]
  8388. }
  8389. },
  8390. "required": ["type", "properties"]
  8391. },
  8392. "Event.session.compacted": {
  8393. "type": "object",
  8394. "properties": {
  8395. "type": {
  8396. "type": "string",
  8397. "const": "session.compacted"
  8398. },
  8399. "properties": {
  8400. "type": "object",
  8401. "properties": {
  8402. "sessionID": {
  8403. "type": "string",
  8404. "pattern": "^ses.*"
  8405. }
  8406. },
  8407. "required": ["sessionID"]
  8408. }
  8409. },
  8410. "required": ["type", "properties"]
  8411. },
  8412. "Event.tui.prompt.append": {
  8413. "type": "object",
  8414. "properties": {
  8415. "type": {
  8416. "type": "string",
  8417. "const": "tui.prompt.append"
  8418. },
  8419. "properties": {
  8420. "type": "object",
  8421. "properties": {
  8422. "text": {
  8423. "type": "string"
  8424. }
  8425. },
  8426. "required": ["text"]
  8427. }
  8428. },
  8429. "required": ["type", "properties"]
  8430. },
  8431. "Event.tui.command.execute": {
  8432. "type": "object",
  8433. "properties": {
  8434. "type": {
  8435. "type": "string",
  8436. "const": "tui.command.execute"
  8437. },
  8438. "properties": {
  8439. "type": "object",
  8440. "properties": {
  8441. "command": {
  8442. "anyOf": [
  8443. {
  8444. "type": "string",
  8445. "enum": [
  8446. "session.list",
  8447. "session.new",
  8448. "session.share",
  8449. "session.interrupt",
  8450. "session.compact",
  8451. "session.page.up",
  8452. "session.page.down",
  8453. "session.line.up",
  8454. "session.line.down",
  8455. "session.half.page.up",
  8456. "session.half.page.down",
  8457. "session.first",
  8458. "session.last",
  8459. "prompt.clear",
  8460. "prompt.submit",
  8461. "agent.cycle"
  8462. ]
  8463. },
  8464. {
  8465. "type": "string"
  8466. }
  8467. ]
  8468. }
  8469. },
  8470. "required": ["command"]
  8471. }
  8472. },
  8473. "required": ["type", "properties"]
  8474. },
  8475. "Event.tui.toast.show": {
  8476. "type": "object",
  8477. "properties": {
  8478. "type": {
  8479. "type": "string",
  8480. "const": "tui.toast.show"
  8481. },
  8482. "properties": {
  8483. "type": "object",
  8484. "properties": {
  8485. "title": {
  8486. "type": "string"
  8487. },
  8488. "message": {
  8489. "type": "string"
  8490. },
  8491. "variant": {
  8492. "type": "string",
  8493. "enum": ["info", "success", "warning", "error"]
  8494. },
  8495. "duration": {
  8496. "description": "Duration in milliseconds",
  8497. "type": "number"
  8498. }
  8499. },
  8500. "required": ["message", "variant"]
  8501. }
  8502. },
  8503. "required": ["type", "properties"]
  8504. },
  8505. "Event.tui.session.select": {
  8506. "type": "object",
  8507. "properties": {
  8508. "type": {
  8509. "type": "string",
  8510. "const": "tui.session.select"
  8511. },
  8512. "properties": {
  8513. "type": "object",
  8514. "properties": {
  8515. "sessionID": {
  8516. "description": "Session ID to navigate to",
  8517. "type": "string",
  8518. "pattern": "^ses.*"
  8519. }
  8520. },
  8521. "required": ["sessionID"]
  8522. }
  8523. },
  8524. "required": ["type", "properties"]
  8525. },
  8526. "Event.mcp.tools.changed": {
  8527. "type": "object",
  8528. "properties": {
  8529. "type": {
  8530. "type": "string",
  8531. "const": "mcp.tools.changed"
  8532. },
  8533. "properties": {
  8534. "type": "object",
  8535. "properties": {
  8536. "server": {
  8537. "type": "string"
  8538. }
  8539. },
  8540. "required": ["server"]
  8541. }
  8542. },
  8543. "required": ["type", "properties"]
  8544. },
  8545. "Event.mcp.browser.open.failed": {
  8546. "type": "object",
  8547. "properties": {
  8548. "type": {
  8549. "type": "string",
  8550. "const": "mcp.browser.open.failed"
  8551. },
  8552. "properties": {
  8553. "type": "object",
  8554. "properties": {
  8555. "mcpName": {
  8556. "type": "string"
  8557. },
  8558. "url": {
  8559. "type": "string"
  8560. }
  8561. },
  8562. "required": ["mcpName", "url"]
  8563. }
  8564. },
  8565. "required": ["type", "properties"]
  8566. },
  8567. "Event.command.executed": {
  8568. "type": "object",
  8569. "properties": {
  8570. "type": {
  8571. "type": "string",
  8572. "const": "command.executed"
  8573. },
  8574. "properties": {
  8575. "type": "object",
  8576. "properties": {
  8577. "name": {
  8578. "type": "string"
  8579. },
  8580. "sessionID": {
  8581. "type": "string",
  8582. "pattern": "^ses.*"
  8583. },
  8584. "arguments": {
  8585. "type": "string"
  8586. },
  8587. "messageID": {
  8588. "type": "string",
  8589. "pattern": "^msg.*"
  8590. }
  8591. },
  8592. "required": ["name", "sessionID", "arguments", "messageID"]
  8593. }
  8594. },
  8595. "required": ["type", "properties"]
  8596. },
  8597. "Event.vcs.branch.updated": {
  8598. "type": "object",
  8599. "properties": {
  8600. "type": {
  8601. "type": "string",
  8602. "const": "vcs.branch.updated"
  8603. },
  8604. "properties": {
  8605. "type": "object",
  8606. "properties": {
  8607. "branch": {
  8608. "type": "string"
  8609. }
  8610. }
  8611. }
  8612. },
  8613. "required": ["type", "properties"]
  8614. },
  8615. "Event.worktree.ready": {
  8616. "type": "object",
  8617. "properties": {
  8618. "type": {
  8619. "type": "string",
  8620. "const": "worktree.ready"
  8621. },
  8622. "properties": {
  8623. "type": "object",
  8624. "properties": {
  8625. "name": {
  8626. "type": "string"
  8627. },
  8628. "branch": {
  8629. "type": "string"
  8630. }
  8631. },
  8632. "required": ["name", "branch"]
  8633. }
  8634. },
  8635. "required": ["type", "properties"]
  8636. },
  8637. "Event.worktree.failed": {
  8638. "type": "object",
  8639. "properties": {
  8640. "type": {
  8641. "type": "string",
  8642. "const": "worktree.failed"
  8643. },
  8644. "properties": {
  8645. "type": "object",
  8646. "properties": {
  8647. "message": {
  8648. "type": "string"
  8649. }
  8650. },
  8651. "required": ["message"]
  8652. }
  8653. },
  8654. "required": ["type", "properties"]
  8655. },
  8656. "Pty": {
  8657. "type": "object",
  8658. "properties": {
  8659. "id": {
  8660. "type": "string",
  8661. "pattern": "^pty.*"
  8662. },
  8663. "title": {
  8664. "type": "string"
  8665. },
  8666. "command": {
  8667. "type": "string"
  8668. },
  8669. "args": {
  8670. "type": "array",
  8671. "items": {
  8672. "type": "string"
  8673. }
  8674. },
  8675. "cwd": {
  8676. "type": "string"
  8677. },
  8678. "status": {
  8679. "type": "string",
  8680. "enum": ["running", "exited"]
  8681. },
  8682. "pid": {
  8683. "type": "number"
  8684. }
  8685. },
  8686. "required": ["id", "title", "command", "args", "cwd", "status", "pid"]
  8687. },
  8688. "Event.pty.created": {
  8689. "type": "object",
  8690. "properties": {
  8691. "type": {
  8692. "type": "string",
  8693. "const": "pty.created"
  8694. },
  8695. "properties": {
  8696. "type": "object",
  8697. "properties": {
  8698. "info": {
  8699. "$ref": "#/components/schemas/Pty"
  8700. }
  8701. },
  8702. "required": ["info"]
  8703. }
  8704. },
  8705. "required": ["type", "properties"]
  8706. },
  8707. "Event.pty.updated": {
  8708. "type": "object",
  8709. "properties": {
  8710. "type": {
  8711. "type": "string",
  8712. "const": "pty.updated"
  8713. },
  8714. "properties": {
  8715. "type": "object",
  8716. "properties": {
  8717. "info": {
  8718. "$ref": "#/components/schemas/Pty"
  8719. }
  8720. },
  8721. "required": ["info"]
  8722. }
  8723. },
  8724. "required": ["type", "properties"]
  8725. },
  8726. "Event.pty.exited": {
  8727. "type": "object",
  8728. "properties": {
  8729. "type": {
  8730. "type": "string",
  8731. "const": "pty.exited"
  8732. },
  8733. "properties": {
  8734. "type": "object",
  8735. "properties": {
  8736. "id": {
  8737. "type": "string",
  8738. "pattern": "^pty.*"
  8739. },
  8740. "exitCode": {
  8741. "type": "number"
  8742. }
  8743. },
  8744. "required": ["id", "exitCode"]
  8745. }
  8746. },
  8747. "required": ["type", "properties"]
  8748. },
  8749. "Event.pty.deleted": {
  8750. "type": "object",
  8751. "properties": {
  8752. "type": {
  8753. "type": "string",
  8754. "const": "pty.deleted"
  8755. },
  8756. "properties": {
  8757. "type": "object",
  8758. "properties": {
  8759. "id": {
  8760. "type": "string",
  8761. "pattern": "^pty.*"
  8762. }
  8763. },
  8764. "required": ["id"]
  8765. }
  8766. },
  8767. "required": ["type", "properties"]
  8768. },
  8769. "Event.workspace.ready": {
  8770. "type": "object",
  8771. "properties": {
  8772. "type": {
  8773. "type": "string",
  8774. "const": "workspace.ready"
  8775. },
  8776. "properties": {
  8777. "type": "object",
  8778. "properties": {
  8779. "name": {
  8780. "type": "string"
  8781. }
  8782. },
  8783. "required": ["name"]
  8784. }
  8785. },
  8786. "required": ["type", "properties"]
  8787. },
  8788. "Event.workspace.failed": {
  8789. "type": "object",
  8790. "properties": {
  8791. "type": {
  8792. "type": "string",
  8793. "const": "workspace.failed"
  8794. },
  8795. "properties": {
  8796. "type": "object",
  8797. "properties": {
  8798. "message": {
  8799. "type": "string"
  8800. }
  8801. },
  8802. "required": ["message"]
  8803. }
  8804. },
  8805. "required": ["type", "properties"]
  8806. },
  8807. "Event.workspace.restore": {
  8808. "type": "object",
  8809. "properties": {
  8810. "type": {
  8811. "type": "string",
  8812. "const": "workspace.restore"
  8813. },
  8814. "properties": {
  8815. "type": "object",
  8816. "properties": {
  8817. "workspaceID": {
  8818. "type": "string",
  8819. "pattern": "^wrk.*"
  8820. },
  8821. "sessionID": {
  8822. "type": "string",
  8823. "pattern": "^ses.*"
  8824. },
  8825. "total": {
  8826. "type": "integer",
  8827. "minimum": 0,
  8828. "maximum": 9007199254740991
  8829. },
  8830. "step": {
  8831. "type": "integer",
  8832. "minimum": 0,
  8833. "maximum": 9007199254740991
  8834. }
  8835. },
  8836. "required": ["workspaceID", "sessionID", "total", "step"]
  8837. }
  8838. },
  8839. "required": ["type", "properties"]
  8840. },
  8841. "Event.workspace.status": {
  8842. "type": "object",
  8843. "properties": {
  8844. "type": {
  8845. "type": "string",
  8846. "const": "workspace.status"
  8847. },
  8848. "properties": {
  8849. "type": "object",
  8850. "properties": {
  8851. "workspaceID": {
  8852. "type": "string",
  8853. "pattern": "^wrk.*"
  8854. },
  8855. "status": {
  8856. "type": "string",
  8857. "enum": ["connected", "connecting", "disconnected", "error"]
  8858. }
  8859. },
  8860. "required": ["workspaceID", "status"]
  8861. }
  8862. },
  8863. "required": ["type", "properties"]
  8864. },
  8865. "OutputFormatText": {
  8866. "type": "object",
  8867. "properties": {
  8868. "type": {
  8869. "type": "string",
  8870. "const": "text"
  8871. }
  8872. },
  8873. "required": ["type"]
  8874. },
  8875. "JSONSchema": {
  8876. "type": "object",
  8877. "propertyNames": {
  8878. "type": "string"
  8879. },
  8880. "additionalProperties": {}
  8881. },
  8882. "OutputFormatJsonSchema": {
  8883. "type": "object",
  8884. "properties": {
  8885. "type": {
  8886. "type": "string",
  8887. "const": "json_schema"
  8888. },
  8889. "schema": {
  8890. "$ref": "#/components/schemas/JSONSchema"
  8891. },
  8892. "retryCount": {
  8893. "default": 2,
  8894. "type": "integer",
  8895. "minimum": 0,
  8896. "maximum": 9007199254740991
  8897. }
  8898. },
  8899. "required": ["type", "schema"]
  8900. },
  8901. "OutputFormat": {
  8902. "anyOf": [
  8903. {
  8904. "$ref": "#/components/schemas/OutputFormatText"
  8905. },
  8906. {
  8907. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  8908. }
  8909. ]
  8910. },
  8911. "UserMessage": {
  8912. "type": "object",
  8913. "properties": {
  8914. "id": {
  8915. "type": "string",
  8916. "pattern": "^msg.*"
  8917. },
  8918. "sessionID": {
  8919. "type": "string",
  8920. "pattern": "^ses.*"
  8921. },
  8922. "role": {
  8923. "type": "string",
  8924. "const": "user"
  8925. },
  8926. "time": {
  8927. "type": "object",
  8928. "properties": {
  8929. "created": {
  8930. "type": "number"
  8931. }
  8932. },
  8933. "required": ["created"]
  8934. },
  8935. "format": {
  8936. "$ref": "#/components/schemas/OutputFormat"
  8937. },
  8938. "summary": {
  8939. "type": "object",
  8940. "properties": {
  8941. "title": {
  8942. "type": "string"
  8943. },
  8944. "body": {
  8945. "type": "string"
  8946. },
  8947. "diffs": {
  8948. "type": "array",
  8949. "items": {
  8950. "$ref": "#/components/schemas/SnapshotFileDiff"
  8951. }
  8952. }
  8953. },
  8954. "required": ["diffs"]
  8955. },
  8956. "agent": {
  8957. "type": "string"
  8958. },
  8959. "model": {
  8960. "type": "object",
  8961. "properties": {
  8962. "providerID": {
  8963. "type": "string"
  8964. },
  8965. "modelID": {
  8966. "type": "string"
  8967. },
  8968. "variant": {
  8969. "type": "string"
  8970. }
  8971. },
  8972. "required": ["providerID", "modelID"]
  8973. },
  8974. "system": {
  8975. "type": "string"
  8976. },
  8977. "tools": {
  8978. "type": "object",
  8979. "propertyNames": {
  8980. "type": "string"
  8981. },
  8982. "additionalProperties": {
  8983. "type": "boolean"
  8984. }
  8985. }
  8986. },
  8987. "required": ["id", "sessionID", "role", "time", "agent", "model"]
  8988. },
  8989. "AssistantMessage": {
  8990. "type": "object",
  8991. "properties": {
  8992. "id": {
  8993. "type": "string",
  8994. "pattern": "^msg.*"
  8995. },
  8996. "sessionID": {
  8997. "type": "string",
  8998. "pattern": "^ses.*"
  8999. },
  9000. "role": {
  9001. "type": "string",
  9002. "const": "assistant"
  9003. },
  9004. "time": {
  9005. "type": "object",
  9006. "properties": {
  9007. "created": {
  9008. "type": "number"
  9009. },
  9010. "completed": {
  9011. "type": "number"
  9012. }
  9013. },
  9014. "required": ["created"]
  9015. },
  9016. "error": {
  9017. "anyOf": [
  9018. {
  9019. "$ref": "#/components/schemas/ProviderAuthError"
  9020. },
  9021. {
  9022. "$ref": "#/components/schemas/UnknownError"
  9023. },
  9024. {
  9025. "$ref": "#/components/schemas/MessageOutputLengthError"
  9026. },
  9027. {
  9028. "$ref": "#/components/schemas/MessageAbortedError"
  9029. },
  9030. {
  9031. "$ref": "#/components/schemas/StructuredOutputError"
  9032. },
  9033. {
  9034. "$ref": "#/components/schemas/ContextOverflowError"
  9035. },
  9036. {
  9037. "$ref": "#/components/schemas/APIError"
  9038. }
  9039. ]
  9040. },
  9041. "parentID": {
  9042. "type": "string",
  9043. "pattern": "^msg.*"
  9044. },
  9045. "modelID": {
  9046. "type": "string"
  9047. },
  9048. "providerID": {
  9049. "type": "string"
  9050. },
  9051. "mode": {
  9052. "type": "string"
  9053. },
  9054. "agent": {
  9055. "type": "string"
  9056. },
  9057. "path": {
  9058. "type": "object",
  9059. "properties": {
  9060. "cwd": {
  9061. "type": "string"
  9062. },
  9063. "root": {
  9064. "type": "string"
  9065. }
  9066. },
  9067. "required": ["cwd", "root"]
  9068. },
  9069. "summary": {
  9070. "type": "boolean"
  9071. },
  9072. "cost": {
  9073. "type": "number"
  9074. },
  9075. "tokens": {
  9076. "type": "object",
  9077. "properties": {
  9078. "total": {
  9079. "type": "number"
  9080. },
  9081. "input": {
  9082. "type": "number"
  9083. },
  9084. "output": {
  9085. "type": "number"
  9086. },
  9087. "reasoning": {
  9088. "type": "number"
  9089. },
  9090. "cache": {
  9091. "type": "object",
  9092. "properties": {
  9093. "read": {
  9094. "type": "number"
  9095. },
  9096. "write": {
  9097. "type": "number"
  9098. }
  9099. },
  9100. "required": ["read", "write"]
  9101. }
  9102. },
  9103. "required": ["input", "output", "reasoning", "cache"]
  9104. },
  9105. "structured": {},
  9106. "variant": {
  9107. "type": "string"
  9108. },
  9109. "finish": {
  9110. "type": "string"
  9111. }
  9112. },
  9113. "required": [
  9114. "id",
  9115. "sessionID",
  9116. "role",
  9117. "time",
  9118. "parentID",
  9119. "modelID",
  9120. "providerID",
  9121. "mode",
  9122. "agent",
  9123. "path",
  9124. "cost",
  9125. "tokens"
  9126. ]
  9127. },
  9128. "Message": {
  9129. "anyOf": [
  9130. {
  9131. "$ref": "#/components/schemas/UserMessage"
  9132. },
  9133. {
  9134. "$ref": "#/components/schemas/AssistantMessage"
  9135. }
  9136. ]
  9137. },
  9138. "Event.message.updated": {
  9139. "type": "object",
  9140. "properties": {
  9141. "type": {
  9142. "type": "string",
  9143. "const": "message.updated"
  9144. },
  9145. "properties": {
  9146. "type": "object",
  9147. "properties": {
  9148. "sessionID": {
  9149. "type": "string",
  9150. "pattern": "^ses.*"
  9151. },
  9152. "info": {
  9153. "$ref": "#/components/schemas/Message"
  9154. }
  9155. },
  9156. "required": ["sessionID", "info"]
  9157. }
  9158. },
  9159. "required": ["type", "properties"]
  9160. },
  9161. "Event.message.removed": {
  9162. "type": "object",
  9163. "properties": {
  9164. "type": {
  9165. "type": "string",
  9166. "const": "message.removed"
  9167. },
  9168. "properties": {
  9169. "type": "object",
  9170. "properties": {
  9171. "sessionID": {
  9172. "type": "string",
  9173. "pattern": "^ses.*"
  9174. },
  9175. "messageID": {
  9176. "type": "string",
  9177. "pattern": "^msg.*"
  9178. }
  9179. },
  9180. "required": ["sessionID", "messageID"]
  9181. }
  9182. },
  9183. "required": ["type", "properties"]
  9184. },
  9185. "TextPart": {
  9186. "type": "object",
  9187. "properties": {
  9188. "id": {
  9189. "type": "string",
  9190. "pattern": "^prt.*"
  9191. },
  9192. "sessionID": {
  9193. "type": "string",
  9194. "pattern": "^ses.*"
  9195. },
  9196. "messageID": {
  9197. "type": "string",
  9198. "pattern": "^msg.*"
  9199. },
  9200. "type": {
  9201. "type": "string",
  9202. "const": "text"
  9203. },
  9204. "text": {
  9205. "type": "string"
  9206. },
  9207. "synthetic": {
  9208. "type": "boolean"
  9209. },
  9210. "ignored": {
  9211. "type": "boolean"
  9212. },
  9213. "time": {
  9214. "type": "object",
  9215. "properties": {
  9216. "start": {
  9217. "type": "number"
  9218. },
  9219. "end": {
  9220. "type": "number"
  9221. }
  9222. },
  9223. "required": ["start"]
  9224. },
  9225. "metadata": {
  9226. "type": "object",
  9227. "propertyNames": {
  9228. "type": "string"
  9229. },
  9230. "additionalProperties": {}
  9231. }
  9232. },
  9233. "required": ["id", "sessionID", "messageID", "type", "text"]
  9234. },
  9235. "SubtaskPart": {
  9236. "type": "object",
  9237. "properties": {
  9238. "id": {
  9239. "type": "string",
  9240. "pattern": "^prt.*"
  9241. },
  9242. "sessionID": {
  9243. "type": "string",
  9244. "pattern": "^ses.*"
  9245. },
  9246. "messageID": {
  9247. "type": "string",
  9248. "pattern": "^msg.*"
  9249. },
  9250. "type": {
  9251. "type": "string",
  9252. "const": "subtask"
  9253. },
  9254. "prompt": {
  9255. "type": "string"
  9256. },
  9257. "description": {
  9258. "type": "string"
  9259. },
  9260. "agent": {
  9261. "type": "string"
  9262. },
  9263. "model": {
  9264. "type": "object",
  9265. "properties": {
  9266. "providerID": {
  9267. "type": "string"
  9268. },
  9269. "modelID": {
  9270. "type": "string"
  9271. }
  9272. },
  9273. "required": ["providerID", "modelID"]
  9274. },
  9275. "command": {
  9276. "type": "string"
  9277. }
  9278. },
  9279. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"]
  9280. },
  9281. "ReasoningPart": {
  9282. "type": "object",
  9283. "properties": {
  9284. "id": {
  9285. "type": "string",
  9286. "pattern": "^prt.*"
  9287. },
  9288. "sessionID": {
  9289. "type": "string",
  9290. "pattern": "^ses.*"
  9291. },
  9292. "messageID": {
  9293. "type": "string",
  9294. "pattern": "^msg.*"
  9295. },
  9296. "type": {
  9297. "type": "string",
  9298. "const": "reasoning"
  9299. },
  9300. "text": {
  9301. "type": "string"
  9302. },
  9303. "metadata": {
  9304. "type": "object",
  9305. "propertyNames": {
  9306. "type": "string"
  9307. },
  9308. "additionalProperties": {}
  9309. },
  9310. "time": {
  9311. "type": "object",
  9312. "properties": {
  9313. "start": {
  9314. "type": "number"
  9315. },
  9316. "end": {
  9317. "type": "number"
  9318. }
  9319. },
  9320. "required": ["start"]
  9321. }
  9322. },
  9323. "required": ["id", "sessionID", "messageID", "type", "text", "time"]
  9324. },
  9325. "FilePartSourceText": {
  9326. "type": "object",
  9327. "properties": {
  9328. "value": {
  9329. "type": "string"
  9330. },
  9331. "start": {
  9332. "type": "integer",
  9333. "minimum": -9007199254740991,
  9334. "maximum": 9007199254740991
  9335. },
  9336. "end": {
  9337. "type": "integer",
  9338. "minimum": -9007199254740991,
  9339. "maximum": 9007199254740991
  9340. }
  9341. },
  9342. "required": ["value", "start", "end"]
  9343. },
  9344. "FileSource": {
  9345. "type": "object",
  9346. "properties": {
  9347. "text": {
  9348. "$ref": "#/components/schemas/FilePartSourceText"
  9349. },
  9350. "type": {
  9351. "type": "string",
  9352. "const": "file"
  9353. },
  9354. "path": {
  9355. "type": "string"
  9356. }
  9357. },
  9358. "required": ["text", "type", "path"]
  9359. },
  9360. "Range": {
  9361. "type": "object",
  9362. "properties": {
  9363. "start": {
  9364. "type": "object",
  9365. "properties": {
  9366. "line": {
  9367. "type": "number"
  9368. },
  9369. "character": {
  9370. "type": "number"
  9371. }
  9372. },
  9373. "required": ["line", "character"]
  9374. },
  9375. "end": {
  9376. "type": "object",
  9377. "properties": {
  9378. "line": {
  9379. "type": "number"
  9380. },
  9381. "character": {
  9382. "type": "number"
  9383. }
  9384. },
  9385. "required": ["line", "character"]
  9386. }
  9387. },
  9388. "required": ["start", "end"]
  9389. },
  9390. "SymbolSource": {
  9391. "type": "object",
  9392. "properties": {
  9393. "text": {
  9394. "$ref": "#/components/schemas/FilePartSourceText"
  9395. },
  9396. "type": {
  9397. "type": "string",
  9398. "const": "symbol"
  9399. },
  9400. "path": {
  9401. "type": "string"
  9402. },
  9403. "range": {
  9404. "$ref": "#/components/schemas/Range"
  9405. },
  9406. "name": {
  9407. "type": "string"
  9408. },
  9409. "kind": {
  9410. "type": "integer",
  9411. "minimum": -9007199254740991,
  9412. "maximum": 9007199254740991
  9413. }
  9414. },
  9415. "required": ["text", "type", "path", "range", "name", "kind"]
  9416. },
  9417. "ResourceSource": {
  9418. "type": "object",
  9419. "properties": {
  9420. "text": {
  9421. "$ref": "#/components/schemas/FilePartSourceText"
  9422. },
  9423. "type": {
  9424. "type": "string",
  9425. "const": "resource"
  9426. },
  9427. "clientName": {
  9428. "type": "string"
  9429. },
  9430. "uri": {
  9431. "type": "string"
  9432. }
  9433. },
  9434. "required": ["text", "type", "clientName", "uri"]
  9435. },
  9436. "FilePartSource": {
  9437. "anyOf": [
  9438. {
  9439. "$ref": "#/components/schemas/FileSource"
  9440. },
  9441. {
  9442. "$ref": "#/components/schemas/SymbolSource"
  9443. },
  9444. {
  9445. "$ref": "#/components/schemas/ResourceSource"
  9446. }
  9447. ]
  9448. },
  9449. "FilePart": {
  9450. "type": "object",
  9451. "properties": {
  9452. "id": {
  9453. "type": "string",
  9454. "pattern": "^prt.*"
  9455. },
  9456. "sessionID": {
  9457. "type": "string",
  9458. "pattern": "^ses.*"
  9459. },
  9460. "messageID": {
  9461. "type": "string",
  9462. "pattern": "^msg.*"
  9463. },
  9464. "type": {
  9465. "type": "string",
  9466. "const": "file"
  9467. },
  9468. "mime": {
  9469. "type": "string"
  9470. },
  9471. "filename": {
  9472. "type": "string"
  9473. },
  9474. "url": {
  9475. "type": "string"
  9476. },
  9477. "source": {
  9478. "$ref": "#/components/schemas/FilePartSource"
  9479. }
  9480. },
  9481. "required": ["id", "sessionID", "messageID", "type", "mime", "url"]
  9482. },
  9483. "ToolStatePending": {
  9484. "type": "object",
  9485. "properties": {
  9486. "status": {
  9487. "type": "string",
  9488. "const": "pending"
  9489. },
  9490. "input": {
  9491. "type": "object",
  9492. "propertyNames": {
  9493. "type": "string"
  9494. },
  9495. "additionalProperties": {}
  9496. },
  9497. "raw": {
  9498. "type": "string"
  9499. }
  9500. },
  9501. "required": ["status", "input", "raw"]
  9502. },
  9503. "ToolStateRunning": {
  9504. "type": "object",
  9505. "properties": {
  9506. "status": {
  9507. "type": "string",
  9508. "const": "running"
  9509. },
  9510. "input": {
  9511. "type": "object",
  9512. "propertyNames": {
  9513. "type": "string"
  9514. },
  9515. "additionalProperties": {}
  9516. },
  9517. "title": {
  9518. "type": "string"
  9519. },
  9520. "metadata": {
  9521. "type": "object",
  9522. "propertyNames": {
  9523. "type": "string"
  9524. },
  9525. "additionalProperties": {}
  9526. },
  9527. "time": {
  9528. "type": "object",
  9529. "properties": {
  9530. "start": {
  9531. "type": "number"
  9532. }
  9533. },
  9534. "required": ["start"]
  9535. }
  9536. },
  9537. "required": ["status", "input", "time"]
  9538. },
  9539. "ToolStateCompleted": {
  9540. "type": "object",
  9541. "properties": {
  9542. "status": {
  9543. "type": "string",
  9544. "const": "completed"
  9545. },
  9546. "input": {
  9547. "type": "object",
  9548. "propertyNames": {
  9549. "type": "string"
  9550. },
  9551. "additionalProperties": {}
  9552. },
  9553. "output": {
  9554. "type": "string"
  9555. },
  9556. "title": {
  9557. "type": "string"
  9558. },
  9559. "metadata": {
  9560. "type": "object",
  9561. "propertyNames": {
  9562. "type": "string"
  9563. },
  9564. "additionalProperties": {}
  9565. },
  9566. "time": {
  9567. "type": "object",
  9568. "properties": {
  9569. "start": {
  9570. "type": "number"
  9571. },
  9572. "end": {
  9573. "type": "number"
  9574. },
  9575. "compacted": {
  9576. "type": "number"
  9577. }
  9578. },
  9579. "required": ["start", "end"]
  9580. },
  9581. "attachments": {
  9582. "type": "array",
  9583. "items": {
  9584. "$ref": "#/components/schemas/FilePart"
  9585. }
  9586. }
  9587. },
  9588. "required": ["status", "input", "output", "title", "metadata", "time"]
  9589. },
  9590. "ToolStateError": {
  9591. "type": "object",
  9592. "properties": {
  9593. "status": {
  9594. "type": "string",
  9595. "const": "error"
  9596. },
  9597. "input": {
  9598. "type": "object",
  9599. "propertyNames": {
  9600. "type": "string"
  9601. },
  9602. "additionalProperties": {}
  9603. },
  9604. "error": {
  9605. "type": "string"
  9606. },
  9607. "metadata": {
  9608. "type": "object",
  9609. "propertyNames": {
  9610. "type": "string"
  9611. },
  9612. "additionalProperties": {}
  9613. },
  9614. "time": {
  9615. "type": "object",
  9616. "properties": {
  9617. "start": {
  9618. "type": "number"
  9619. },
  9620. "end": {
  9621. "type": "number"
  9622. }
  9623. },
  9624. "required": ["start", "end"]
  9625. }
  9626. },
  9627. "required": ["status", "input", "error", "time"]
  9628. },
  9629. "ToolState": {
  9630. "anyOf": [
  9631. {
  9632. "$ref": "#/components/schemas/ToolStatePending"
  9633. },
  9634. {
  9635. "$ref": "#/components/schemas/ToolStateRunning"
  9636. },
  9637. {
  9638. "$ref": "#/components/schemas/ToolStateCompleted"
  9639. },
  9640. {
  9641. "$ref": "#/components/schemas/ToolStateError"
  9642. }
  9643. ]
  9644. },
  9645. "ToolPart": {
  9646. "type": "object",
  9647. "properties": {
  9648. "id": {
  9649. "type": "string",
  9650. "pattern": "^prt.*"
  9651. },
  9652. "sessionID": {
  9653. "type": "string",
  9654. "pattern": "^ses.*"
  9655. },
  9656. "messageID": {
  9657. "type": "string",
  9658. "pattern": "^msg.*"
  9659. },
  9660. "type": {
  9661. "type": "string",
  9662. "const": "tool"
  9663. },
  9664. "callID": {
  9665. "type": "string"
  9666. },
  9667. "tool": {
  9668. "type": "string"
  9669. },
  9670. "state": {
  9671. "$ref": "#/components/schemas/ToolState"
  9672. },
  9673. "metadata": {
  9674. "type": "object",
  9675. "propertyNames": {
  9676. "type": "string"
  9677. },
  9678. "additionalProperties": {}
  9679. }
  9680. },
  9681. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"]
  9682. },
  9683. "StepStartPart": {
  9684. "type": "object",
  9685. "properties": {
  9686. "id": {
  9687. "type": "string",
  9688. "pattern": "^prt.*"
  9689. },
  9690. "sessionID": {
  9691. "type": "string",
  9692. "pattern": "^ses.*"
  9693. },
  9694. "messageID": {
  9695. "type": "string",
  9696. "pattern": "^msg.*"
  9697. },
  9698. "type": {
  9699. "type": "string",
  9700. "const": "step-start"
  9701. },
  9702. "snapshot": {
  9703. "type": "string"
  9704. }
  9705. },
  9706. "required": ["id", "sessionID", "messageID", "type"]
  9707. },
  9708. "StepFinishPart": {
  9709. "type": "object",
  9710. "properties": {
  9711. "id": {
  9712. "type": "string",
  9713. "pattern": "^prt.*"
  9714. },
  9715. "sessionID": {
  9716. "type": "string",
  9717. "pattern": "^ses.*"
  9718. },
  9719. "messageID": {
  9720. "type": "string",
  9721. "pattern": "^msg.*"
  9722. },
  9723. "type": {
  9724. "type": "string",
  9725. "const": "step-finish"
  9726. },
  9727. "reason": {
  9728. "type": "string"
  9729. },
  9730. "snapshot": {
  9731. "type": "string"
  9732. },
  9733. "cost": {
  9734. "type": "number"
  9735. },
  9736. "tokens": {
  9737. "type": "object",
  9738. "properties": {
  9739. "total": {
  9740. "type": "number"
  9741. },
  9742. "input": {
  9743. "type": "number"
  9744. },
  9745. "output": {
  9746. "type": "number"
  9747. },
  9748. "reasoning": {
  9749. "type": "number"
  9750. },
  9751. "cache": {
  9752. "type": "object",
  9753. "properties": {
  9754. "read": {
  9755. "type": "number"
  9756. },
  9757. "write": {
  9758. "type": "number"
  9759. }
  9760. },
  9761. "required": ["read", "write"]
  9762. }
  9763. },
  9764. "required": ["input", "output", "reasoning", "cache"]
  9765. }
  9766. },
  9767. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"]
  9768. },
  9769. "SnapshotPart": {
  9770. "type": "object",
  9771. "properties": {
  9772. "id": {
  9773. "type": "string",
  9774. "pattern": "^prt.*"
  9775. },
  9776. "sessionID": {
  9777. "type": "string",
  9778. "pattern": "^ses.*"
  9779. },
  9780. "messageID": {
  9781. "type": "string",
  9782. "pattern": "^msg.*"
  9783. },
  9784. "type": {
  9785. "type": "string",
  9786. "const": "snapshot"
  9787. },
  9788. "snapshot": {
  9789. "type": "string"
  9790. }
  9791. },
  9792. "required": ["id", "sessionID", "messageID", "type", "snapshot"]
  9793. },
  9794. "PatchPart": {
  9795. "type": "object",
  9796. "properties": {
  9797. "id": {
  9798. "type": "string",
  9799. "pattern": "^prt.*"
  9800. },
  9801. "sessionID": {
  9802. "type": "string",
  9803. "pattern": "^ses.*"
  9804. },
  9805. "messageID": {
  9806. "type": "string",
  9807. "pattern": "^msg.*"
  9808. },
  9809. "type": {
  9810. "type": "string",
  9811. "const": "patch"
  9812. },
  9813. "hash": {
  9814. "type": "string"
  9815. },
  9816. "files": {
  9817. "type": "array",
  9818. "items": {
  9819. "type": "string"
  9820. }
  9821. }
  9822. },
  9823. "required": ["id", "sessionID", "messageID", "type", "hash", "files"]
  9824. },
  9825. "AgentPart": {
  9826. "type": "object",
  9827. "properties": {
  9828. "id": {
  9829. "type": "string",
  9830. "pattern": "^prt.*"
  9831. },
  9832. "sessionID": {
  9833. "type": "string",
  9834. "pattern": "^ses.*"
  9835. },
  9836. "messageID": {
  9837. "type": "string",
  9838. "pattern": "^msg.*"
  9839. },
  9840. "type": {
  9841. "type": "string",
  9842. "const": "agent"
  9843. },
  9844. "name": {
  9845. "type": "string"
  9846. },
  9847. "source": {
  9848. "type": "object",
  9849. "properties": {
  9850. "value": {
  9851. "type": "string"
  9852. },
  9853. "start": {
  9854. "type": "integer",
  9855. "minimum": -9007199254740991,
  9856. "maximum": 9007199254740991
  9857. },
  9858. "end": {
  9859. "type": "integer",
  9860. "minimum": -9007199254740991,
  9861. "maximum": 9007199254740991
  9862. }
  9863. },
  9864. "required": ["value", "start", "end"]
  9865. }
  9866. },
  9867. "required": ["id", "sessionID", "messageID", "type", "name"]
  9868. },
  9869. "RetryPart": {
  9870. "type": "object",
  9871. "properties": {
  9872. "id": {
  9873. "type": "string",
  9874. "pattern": "^prt.*"
  9875. },
  9876. "sessionID": {
  9877. "type": "string",
  9878. "pattern": "^ses.*"
  9879. },
  9880. "messageID": {
  9881. "type": "string",
  9882. "pattern": "^msg.*"
  9883. },
  9884. "type": {
  9885. "type": "string",
  9886. "const": "retry"
  9887. },
  9888. "attempt": {
  9889. "type": "number"
  9890. },
  9891. "error": {
  9892. "$ref": "#/components/schemas/APIError"
  9893. },
  9894. "time": {
  9895. "type": "object",
  9896. "properties": {
  9897. "created": {
  9898. "type": "number"
  9899. }
  9900. },
  9901. "required": ["created"]
  9902. }
  9903. },
  9904. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"]
  9905. },
  9906. "CompactionPart": {
  9907. "type": "object",
  9908. "properties": {
  9909. "id": {
  9910. "type": "string",
  9911. "pattern": "^prt.*"
  9912. },
  9913. "sessionID": {
  9914. "type": "string",
  9915. "pattern": "^ses.*"
  9916. },
  9917. "messageID": {
  9918. "type": "string",
  9919. "pattern": "^msg.*"
  9920. },
  9921. "type": {
  9922. "type": "string",
  9923. "const": "compaction"
  9924. },
  9925. "auto": {
  9926. "type": "boolean"
  9927. },
  9928. "overflow": {
  9929. "type": "boolean"
  9930. },
  9931. "tail_start_id": {
  9932. "type": "string",
  9933. "pattern": "^msg.*"
  9934. }
  9935. },
  9936. "required": ["id", "sessionID", "messageID", "type", "auto"]
  9937. },
  9938. "Part": {
  9939. "anyOf": [
  9940. {
  9941. "$ref": "#/components/schemas/TextPart"
  9942. },
  9943. {
  9944. "$ref": "#/components/schemas/SubtaskPart"
  9945. },
  9946. {
  9947. "$ref": "#/components/schemas/ReasoningPart"
  9948. },
  9949. {
  9950. "$ref": "#/components/schemas/FilePart"
  9951. },
  9952. {
  9953. "$ref": "#/components/schemas/ToolPart"
  9954. },
  9955. {
  9956. "$ref": "#/components/schemas/StepStartPart"
  9957. },
  9958. {
  9959. "$ref": "#/components/schemas/StepFinishPart"
  9960. },
  9961. {
  9962. "$ref": "#/components/schemas/SnapshotPart"
  9963. },
  9964. {
  9965. "$ref": "#/components/schemas/PatchPart"
  9966. },
  9967. {
  9968. "$ref": "#/components/schemas/AgentPart"
  9969. },
  9970. {
  9971. "$ref": "#/components/schemas/RetryPart"
  9972. },
  9973. {
  9974. "$ref": "#/components/schemas/CompactionPart"
  9975. }
  9976. ]
  9977. },
  9978. "Event.message.part.updated": {
  9979. "type": "object",
  9980. "properties": {
  9981. "type": {
  9982. "type": "string",
  9983. "const": "message.part.updated"
  9984. },
  9985. "properties": {
  9986. "type": "object",
  9987. "properties": {
  9988. "sessionID": {
  9989. "type": "string",
  9990. "pattern": "^ses.*"
  9991. },
  9992. "part": {
  9993. "$ref": "#/components/schemas/Part"
  9994. },
  9995. "time": {
  9996. "type": "number"
  9997. }
  9998. },
  9999. "required": ["sessionID", "part", "time"]
  10000. }
  10001. },
  10002. "required": ["type", "properties"]
  10003. },
  10004. "Event.message.part.removed": {
  10005. "type": "object",
  10006. "properties": {
  10007. "type": {
  10008. "type": "string",
  10009. "const": "message.part.removed"
  10010. },
  10011. "properties": {
  10012. "type": "object",
  10013. "properties": {
  10014. "sessionID": {
  10015. "type": "string",
  10016. "pattern": "^ses.*"
  10017. },
  10018. "messageID": {
  10019. "type": "string",
  10020. "pattern": "^msg.*"
  10021. },
  10022. "partID": {
  10023. "type": "string",
  10024. "pattern": "^prt.*"
  10025. }
  10026. },
  10027. "required": ["sessionID", "messageID", "partID"]
  10028. }
  10029. },
  10030. "required": ["type", "properties"]
  10031. },
  10032. "PermissionAction": {
  10033. "type": "string",
  10034. "enum": ["allow", "deny", "ask"]
  10035. },
  10036. "PermissionRule": {
  10037. "type": "object",
  10038. "properties": {
  10039. "permission": {
  10040. "type": "string"
  10041. },
  10042. "pattern": {
  10043. "type": "string"
  10044. },
  10045. "action": {
  10046. "$ref": "#/components/schemas/PermissionAction"
  10047. }
  10048. },
  10049. "required": ["permission", "pattern", "action"]
  10050. },
  10051. "PermissionRuleset": {
  10052. "type": "array",
  10053. "items": {
  10054. "$ref": "#/components/schemas/PermissionRule"
  10055. }
  10056. },
  10057. "Session": {
  10058. "type": "object",
  10059. "properties": {
  10060. "id": {
  10061. "type": "string",
  10062. "pattern": "^ses.*"
  10063. },
  10064. "slug": {
  10065. "type": "string"
  10066. },
  10067. "projectID": {
  10068. "type": "string"
  10069. },
  10070. "workspaceID": {
  10071. "type": "string",
  10072. "pattern": "^wrk.*"
  10073. },
  10074. "directory": {
  10075. "type": "string"
  10076. },
  10077. "parentID": {
  10078. "type": "string",
  10079. "pattern": "^ses.*"
  10080. },
  10081. "summary": {
  10082. "type": "object",
  10083. "properties": {
  10084. "additions": {
  10085. "type": "number"
  10086. },
  10087. "deletions": {
  10088. "type": "number"
  10089. },
  10090. "files": {
  10091. "type": "number"
  10092. },
  10093. "diffs": {
  10094. "type": "array",
  10095. "items": {
  10096. "$ref": "#/components/schemas/SnapshotFileDiff"
  10097. }
  10098. }
  10099. },
  10100. "required": ["additions", "deletions", "files"]
  10101. },
  10102. "share": {
  10103. "type": "object",
  10104. "properties": {
  10105. "url": {
  10106. "type": "string"
  10107. }
  10108. },
  10109. "required": ["url"]
  10110. },
  10111. "title": {
  10112. "type": "string"
  10113. },
  10114. "version": {
  10115. "type": "string"
  10116. },
  10117. "time": {
  10118. "type": "object",
  10119. "properties": {
  10120. "created": {
  10121. "type": "number"
  10122. },
  10123. "updated": {
  10124. "type": "number"
  10125. },
  10126. "compacting": {
  10127. "type": "number"
  10128. },
  10129. "archived": {
  10130. "type": "number"
  10131. }
  10132. },
  10133. "required": ["created", "updated"]
  10134. },
  10135. "permission": {
  10136. "$ref": "#/components/schemas/PermissionRuleset"
  10137. },
  10138. "revert": {
  10139. "type": "object",
  10140. "properties": {
  10141. "messageID": {
  10142. "type": "string",
  10143. "pattern": "^msg.*"
  10144. },
  10145. "partID": {
  10146. "type": "string",
  10147. "pattern": "^prt.*"
  10148. },
  10149. "snapshot": {
  10150. "type": "string"
  10151. },
  10152. "diff": {
  10153. "type": "string"
  10154. }
  10155. },
  10156. "required": ["messageID"]
  10157. }
  10158. },
  10159. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"]
  10160. },
  10161. "Event.session.created": {
  10162. "type": "object",
  10163. "properties": {
  10164. "type": {
  10165. "type": "string",
  10166. "const": "session.created"
  10167. },
  10168. "properties": {
  10169. "type": "object",
  10170. "properties": {
  10171. "sessionID": {
  10172. "type": "string",
  10173. "pattern": "^ses.*"
  10174. },
  10175. "info": {
  10176. "$ref": "#/components/schemas/Session"
  10177. }
  10178. },
  10179. "required": ["sessionID", "info"]
  10180. }
  10181. },
  10182. "required": ["type", "properties"]
  10183. },
  10184. "Event.session.updated": {
  10185. "type": "object",
  10186. "properties": {
  10187. "type": {
  10188. "type": "string",
  10189. "const": "session.updated"
  10190. },
  10191. "properties": {
  10192. "type": "object",
  10193. "properties": {
  10194. "sessionID": {
  10195. "type": "string",
  10196. "pattern": "^ses.*"
  10197. },
  10198. "info": {
  10199. "$ref": "#/components/schemas/Session"
  10200. }
  10201. },
  10202. "required": ["sessionID", "info"]
  10203. }
  10204. },
  10205. "required": ["type", "properties"]
  10206. },
  10207. "Event.session.deleted": {
  10208. "type": "object",
  10209. "properties": {
  10210. "type": {
  10211. "type": "string",
  10212. "const": "session.deleted"
  10213. },
  10214. "properties": {
  10215. "type": "object",
  10216. "properties": {
  10217. "sessionID": {
  10218. "type": "string",
  10219. "pattern": "^ses.*"
  10220. },
  10221. "info": {
  10222. "$ref": "#/components/schemas/Session"
  10223. }
  10224. },
  10225. "required": ["sessionID", "info"]
  10226. }
  10227. },
  10228. "required": ["type", "properties"]
  10229. },
  10230. "SyncEvent.message.updated": {
  10231. "type": "object",
  10232. "properties": {
  10233. "type": {
  10234. "type": "string",
  10235. "const": "sync"
  10236. },
  10237. "name": {
  10238. "type": "string",
  10239. "const": "message.updated.1"
  10240. },
  10241. "id": {
  10242. "type": "string"
  10243. },
  10244. "seq": {
  10245. "type": "number"
  10246. },
  10247. "aggregateID": {
  10248. "type": "string",
  10249. "const": "sessionID"
  10250. },
  10251. "data": {
  10252. "type": "object",
  10253. "properties": {
  10254. "sessionID": {
  10255. "type": "string",
  10256. "pattern": "^ses.*"
  10257. },
  10258. "info": {
  10259. "$ref": "#/components/schemas/Message"
  10260. }
  10261. },
  10262. "required": ["sessionID", "info"]
  10263. }
  10264. },
  10265. "required": ["type", "name", "id", "seq", "aggregateID", "data"]
  10266. },
  10267. "SyncEvent.message.removed": {
  10268. "type": "object",
  10269. "properties": {
  10270. "type": {
  10271. "type": "string",
  10272. "const": "sync"
  10273. },
  10274. "name": {
  10275. "type": "string",
  10276. "const": "message.removed.1"
  10277. },
  10278. "id": {
  10279. "type": "string"
  10280. },
  10281. "seq": {
  10282. "type": "number"
  10283. },
  10284. "aggregateID": {
  10285. "type": "string",
  10286. "const": "sessionID"
  10287. },
  10288. "data": {
  10289. "type": "object",
  10290. "properties": {
  10291. "sessionID": {
  10292. "type": "string",
  10293. "pattern": "^ses.*"
  10294. },
  10295. "messageID": {
  10296. "type": "string",
  10297. "pattern": "^msg.*"
  10298. }
  10299. },
  10300. "required": ["sessionID", "messageID"]
  10301. }
  10302. },
  10303. "required": ["type", "name", "id", "seq", "aggregateID", "data"]
  10304. },
  10305. "SyncEvent.message.part.updated": {
  10306. "type": "object",
  10307. "properties": {
  10308. "type": {
  10309. "type": "string",
  10310. "const": "sync"
  10311. },
  10312. "name": {
  10313. "type": "string",
  10314. "const": "message.part.updated.1"
  10315. },
  10316. "id": {
  10317. "type": "string"
  10318. },
  10319. "seq": {
  10320. "type": "number"
  10321. },
  10322. "aggregateID": {
  10323. "type": "string",
  10324. "const": "sessionID"
  10325. },
  10326. "data": {
  10327. "type": "object",
  10328. "properties": {
  10329. "sessionID": {
  10330. "type": "string",
  10331. "pattern": "^ses.*"
  10332. },
  10333. "part": {
  10334. "$ref": "#/components/schemas/Part"
  10335. },
  10336. "time": {
  10337. "type": "number"
  10338. }
  10339. },
  10340. "required": ["sessionID", "part", "time"]
  10341. }
  10342. },
  10343. "required": ["type", "name", "id", "seq", "aggregateID", "data"]
  10344. },
  10345. "SyncEvent.message.part.removed": {
  10346. "type": "object",
  10347. "properties": {
  10348. "type": {
  10349. "type": "string",
  10350. "const": "sync"
  10351. },
  10352. "name": {
  10353. "type": "string",
  10354. "const": "message.part.removed.1"
  10355. },
  10356. "id": {
  10357. "type": "string"
  10358. },
  10359. "seq": {
  10360. "type": "number"
  10361. },
  10362. "aggregateID": {
  10363. "type": "string",
  10364. "const": "sessionID"
  10365. },
  10366. "data": {
  10367. "type": "object",
  10368. "properties": {
  10369. "sessionID": {
  10370. "type": "string",
  10371. "pattern": "^ses.*"
  10372. },
  10373. "messageID": {
  10374. "type": "string",
  10375. "pattern": "^msg.*"
  10376. },
  10377. "partID": {
  10378. "type": "string",
  10379. "pattern": "^prt.*"
  10380. }
  10381. },
  10382. "required": ["sessionID", "messageID", "partID"]
  10383. }
  10384. },
  10385. "required": ["type", "name", "id", "seq", "aggregateID", "data"]
  10386. },
  10387. "SyncEvent.session.created": {
  10388. "type": "object",
  10389. "properties": {
  10390. "type": {
  10391. "type": "string",
  10392. "const": "sync"
  10393. },
  10394. "name": {
  10395. "type": "string",
  10396. "const": "session.created.1"
  10397. },
  10398. "id": {
  10399. "type": "string"
  10400. },
  10401. "seq": {
  10402. "type": "number"
  10403. },
  10404. "aggregateID": {
  10405. "type": "string",
  10406. "const": "sessionID"
  10407. },
  10408. "data": {
  10409. "type": "object",
  10410. "properties": {
  10411. "sessionID": {
  10412. "type": "string",
  10413. "pattern": "^ses.*"
  10414. },
  10415. "info": {
  10416. "$ref": "#/components/schemas/Session"
  10417. }
  10418. },
  10419. "required": ["sessionID", "info"]
  10420. }
  10421. },
  10422. "required": ["type", "name", "id", "seq", "aggregateID", "data"]
  10423. },
  10424. "SyncEvent.session.updated": {
  10425. "type": "object",
  10426. "properties": {
  10427. "type": {
  10428. "type": "string",
  10429. "const": "sync"
  10430. },
  10431. "name": {
  10432. "type": "string",
  10433. "const": "session.updated.1"
  10434. },
  10435. "id": {
  10436. "type": "string"
  10437. },
  10438. "seq": {
  10439. "type": "number"
  10440. },
  10441. "aggregateID": {
  10442. "type": "string",
  10443. "const": "sessionID"
  10444. },
  10445. "data": {
  10446. "type": "object",
  10447. "properties": {
  10448. "sessionID": {
  10449. "type": "string",
  10450. "pattern": "^ses.*"
  10451. },
  10452. "info": {
  10453. "type": "object",
  10454. "properties": {
  10455. "id": {
  10456. "anyOf": [
  10457. {
  10458. "type": "string",
  10459. "pattern": "^ses.*"
  10460. },
  10461. {
  10462. "type": "null"
  10463. }
  10464. ]
  10465. },
  10466. "slug": {
  10467. "anyOf": [
  10468. {
  10469. "type": "string"
  10470. },
  10471. {
  10472. "type": "null"
  10473. }
  10474. ]
  10475. },
  10476. "projectID": {
  10477. "anyOf": [
  10478. {
  10479. "type": "string"
  10480. },
  10481. {
  10482. "type": "null"
  10483. }
  10484. ]
  10485. },
  10486. "workspaceID": {
  10487. "anyOf": [
  10488. {
  10489. "type": "string",
  10490. "pattern": "^wrk.*"
  10491. },
  10492. {
  10493. "type": "null"
  10494. }
  10495. ]
  10496. },
  10497. "directory": {
  10498. "anyOf": [
  10499. {
  10500. "type": "string"
  10501. },
  10502. {
  10503. "type": "null"
  10504. }
  10505. ]
  10506. },
  10507. "parentID": {
  10508. "anyOf": [
  10509. {
  10510. "type": "string",
  10511. "pattern": "^ses.*"
  10512. },
  10513. {
  10514. "type": "null"
  10515. }
  10516. ]
  10517. },
  10518. "summary": {
  10519. "anyOf": [
  10520. {
  10521. "type": "object",
  10522. "properties": {
  10523. "additions": {
  10524. "type": "number"
  10525. },
  10526. "deletions": {
  10527. "type": "number"
  10528. },
  10529. "files": {
  10530. "type": "number"
  10531. },
  10532. "diffs": {
  10533. "type": "array",
  10534. "items": {
  10535. "$ref": "#/components/schemas/SnapshotFileDiff"
  10536. }
  10537. }
  10538. },
  10539. "required": ["additions", "deletions", "files"]
  10540. },
  10541. {
  10542. "type": "null"
  10543. }
  10544. ]
  10545. },
  10546. "share": {
  10547. "type": "object",
  10548. "properties": {
  10549. "url": {
  10550. "anyOf": [
  10551. {
  10552. "type": "string"
  10553. },
  10554. {
  10555. "type": "null"
  10556. }
  10557. ]
  10558. }
  10559. }
  10560. },
  10561. "title": {
  10562. "anyOf": [
  10563. {
  10564. "type": "string"
  10565. },
  10566. {
  10567. "type": "null"
  10568. }
  10569. ]
  10570. },
  10571. "version": {
  10572. "anyOf": [
  10573. {
  10574. "type": "string"
  10575. },
  10576. {
  10577. "type": "null"
  10578. }
  10579. ]
  10580. },
  10581. "time": {
  10582. "type": "object",
  10583. "properties": {
  10584. "created": {
  10585. "anyOf": [
  10586. {
  10587. "type": "number"
  10588. },
  10589. {
  10590. "type": "null"
  10591. }
  10592. ]
  10593. },
  10594. "updated": {
  10595. "anyOf": [
  10596. {
  10597. "type": "number"
  10598. },
  10599. {
  10600. "type": "null"
  10601. }
  10602. ]
  10603. },
  10604. "compacting": {
  10605. "anyOf": [
  10606. {
  10607. "type": "number"
  10608. },
  10609. {
  10610. "type": "null"
  10611. }
  10612. ]
  10613. },
  10614. "archived": {
  10615. "anyOf": [
  10616. {
  10617. "type": "number"
  10618. },
  10619. {
  10620. "type": "null"
  10621. }
  10622. ]
  10623. }
  10624. }
  10625. },
  10626. "permission": {
  10627. "anyOf": [
  10628. {
  10629. "$ref": "#/components/schemas/PermissionRuleset"
  10630. },
  10631. {
  10632. "type": "null"
  10633. }
  10634. ]
  10635. },
  10636. "revert": {
  10637. "anyOf": [
  10638. {
  10639. "type": "object",
  10640. "properties": {
  10641. "messageID": {
  10642. "type": "string",
  10643. "pattern": "^msg.*"
  10644. },
  10645. "partID": {
  10646. "type": "string",
  10647. "pattern": "^prt.*"
  10648. },
  10649. "snapshot": {
  10650. "type": "string"
  10651. },
  10652. "diff": {
  10653. "type": "string"
  10654. }
  10655. },
  10656. "required": ["messageID"]
  10657. },
  10658. {
  10659. "type": "null"
  10660. }
  10661. ]
  10662. }
  10663. }
  10664. }
  10665. },
  10666. "required": ["sessionID", "info"]
  10667. }
  10668. },
  10669. "required": ["type", "name", "id", "seq", "aggregateID", "data"]
  10670. },
  10671. "SyncEvent.session.deleted": {
  10672. "type": "object",
  10673. "properties": {
  10674. "type": {
  10675. "type": "string",
  10676. "const": "sync"
  10677. },
  10678. "name": {
  10679. "type": "string",
  10680. "const": "session.deleted.1"
  10681. },
  10682. "id": {
  10683. "type": "string"
  10684. },
  10685. "seq": {
  10686. "type": "number"
  10687. },
  10688. "aggregateID": {
  10689. "type": "string",
  10690. "const": "sessionID"
  10691. },
  10692. "data": {
  10693. "type": "object",
  10694. "properties": {
  10695. "sessionID": {
  10696. "type": "string",
  10697. "pattern": "^ses.*"
  10698. },
  10699. "info": {
  10700. "$ref": "#/components/schemas/Session"
  10701. }
  10702. },
  10703. "required": ["sessionID", "info"]
  10704. }
  10705. },
  10706. "required": ["type", "name", "id", "seq", "aggregateID", "data"]
  10707. },
  10708. "GlobalEvent": {
  10709. "type": "object",
  10710. "properties": {
  10711. "directory": {
  10712. "type": "string"
  10713. },
  10714. "project": {
  10715. "type": "string"
  10716. },
  10717. "workspace": {
  10718. "type": "string"
  10719. },
  10720. "payload": {
  10721. "anyOf": [
  10722. {
  10723. "$ref": "#/components/schemas/Event.project.updated"
  10724. },
  10725. {
  10726. "$ref": "#/components/schemas/Event.server.instance.disposed"
  10727. },
  10728. {
  10729. "$ref": "#/components/schemas/Event.server.connected"
  10730. },
  10731. {
  10732. "$ref": "#/components/schemas/Event.global.disposed"
  10733. },
  10734. {
  10735. "$ref": "#/components/schemas/Event.file.edited"
  10736. },
  10737. {
  10738. "$ref": "#/components/schemas/Event.file.watcher.updated"
  10739. },
  10740. {
  10741. "$ref": "#/components/schemas/Event.lsp.client.diagnostics"
  10742. },
  10743. {
  10744. "$ref": "#/components/schemas/Event.lsp.updated"
  10745. },
  10746. {
  10747. "$ref": "#/components/schemas/Event.installation.updated"
  10748. },
  10749. {
  10750. "$ref": "#/components/schemas/Event.installation.update-available"
  10751. },
  10752. {
  10753. "$ref": "#/components/schemas/Event.message.part.delta"
  10754. },
  10755. {
  10756. "$ref": "#/components/schemas/Event.permission.asked"
  10757. },
  10758. {
  10759. "$ref": "#/components/schemas/Event.permission.replied"
  10760. },
  10761. {
  10762. "$ref": "#/components/schemas/Event.session.diff"
  10763. },
  10764. {
  10765. "$ref": "#/components/schemas/Event.session.error"
  10766. },
  10767. {
  10768. "$ref": "#/components/schemas/Event.question.asked"
  10769. },
  10770. {
  10771. "$ref": "#/components/schemas/Event.question.replied"
  10772. },
  10773. {
  10774. "$ref": "#/components/schemas/Event.question.rejected"
  10775. },
  10776. {
  10777. "$ref": "#/components/schemas/Event.todo.updated"
  10778. },
  10779. {
  10780. "$ref": "#/components/schemas/Event.session.status"
  10781. },
  10782. {
  10783. "$ref": "#/components/schemas/Event.session.idle"
  10784. },
  10785. {
  10786. "$ref": "#/components/schemas/Event.session.compacted"
  10787. },
  10788. {
  10789. "$ref": "#/components/schemas/Event.tui.prompt.append"
  10790. },
  10791. {
  10792. "$ref": "#/components/schemas/Event.tui.command.execute"
  10793. },
  10794. {
  10795. "$ref": "#/components/schemas/Event.tui.toast.show"
  10796. },
  10797. {
  10798. "$ref": "#/components/schemas/Event.tui.session.select"
  10799. },
  10800. {
  10801. "$ref": "#/components/schemas/Event.mcp.tools.changed"
  10802. },
  10803. {
  10804. "$ref": "#/components/schemas/Event.mcp.browser.open.failed"
  10805. },
  10806. {
  10807. "$ref": "#/components/schemas/Event.command.executed"
  10808. },
  10809. {
  10810. "$ref": "#/components/schemas/Event.vcs.branch.updated"
  10811. },
  10812. {
  10813. "$ref": "#/components/schemas/Event.worktree.ready"
  10814. },
  10815. {
  10816. "$ref": "#/components/schemas/Event.worktree.failed"
  10817. },
  10818. {
  10819. "$ref": "#/components/schemas/Event.pty.created"
  10820. },
  10821. {
  10822. "$ref": "#/components/schemas/Event.pty.updated"
  10823. },
  10824. {
  10825. "$ref": "#/components/schemas/Event.pty.exited"
  10826. },
  10827. {
  10828. "$ref": "#/components/schemas/Event.pty.deleted"
  10829. },
  10830. {
  10831. "$ref": "#/components/schemas/Event.workspace.ready"
  10832. },
  10833. {
  10834. "$ref": "#/components/schemas/Event.workspace.failed"
  10835. },
  10836. {
  10837. "$ref": "#/components/schemas/Event.workspace.restore"
  10838. },
  10839. {
  10840. "$ref": "#/components/schemas/Event.workspace.status"
  10841. },
  10842. {
  10843. "$ref": "#/components/schemas/Event.message.updated"
  10844. },
  10845. {
  10846. "$ref": "#/components/schemas/Event.message.removed"
  10847. },
  10848. {
  10849. "$ref": "#/components/schemas/Event.message.part.updated"
  10850. },
  10851. {
  10852. "$ref": "#/components/schemas/Event.message.part.removed"
  10853. },
  10854. {
  10855. "$ref": "#/components/schemas/Event.session.created"
  10856. },
  10857. {
  10858. "$ref": "#/components/schemas/Event.session.updated"
  10859. },
  10860. {
  10861. "$ref": "#/components/schemas/Event.session.deleted"
  10862. },
  10863. {
  10864. "$ref": "#/components/schemas/SyncEvent.message.updated"
  10865. },
  10866. {
  10867. "$ref": "#/components/schemas/SyncEvent.message.removed"
  10868. },
  10869. {
  10870. "$ref": "#/components/schemas/SyncEvent.message.part.updated"
  10871. },
  10872. {
  10873. "$ref": "#/components/schemas/SyncEvent.message.part.removed"
  10874. },
  10875. {
  10876. "$ref": "#/components/schemas/SyncEvent.session.created"
  10877. },
  10878. {
  10879. "$ref": "#/components/schemas/SyncEvent.session.updated"
  10880. },
  10881. {
  10882. "$ref": "#/components/schemas/SyncEvent.session.deleted"
  10883. }
  10884. ]
  10885. }
  10886. },
  10887. "required": ["directory", "payload"]
  10888. },
  10889. "LogLevel": {
  10890. "description": "Log level",
  10891. "type": "string",
  10892. "enum": ["DEBUG", "INFO", "WARN", "ERROR"]
  10893. },
  10894. "ServerConfig": {
  10895. "description": "Server configuration for opencode serve and web commands",
  10896. "type": "object",
  10897. "properties": {
  10898. "port": {
  10899. "description": "Port to listen on",
  10900. "type": "integer",
  10901. "exclusiveMinimum": 0,
  10902. "maximum": 9007199254740991
  10903. },
  10904. "hostname": {
  10905. "description": "Hostname to listen on",
  10906. "type": "string"
  10907. },
  10908. "mdns": {
  10909. "description": "Enable mDNS service discovery",
  10910. "type": "boolean"
  10911. },
  10912. "mdnsDomain": {
  10913. "description": "Custom domain name for mDNS service (default: opencode.local)",
  10914. "type": "string"
  10915. },
  10916. "cors": {
  10917. "description": "Additional domains to allow for CORS",
  10918. "type": "array",
  10919. "items": {
  10920. "type": "string"
  10921. }
  10922. }
  10923. }
  10924. },
  10925. "PermissionActionConfig": {
  10926. "type": "string",
  10927. "enum": ["ask", "allow", "deny"]
  10928. },
  10929. "PermissionObjectConfig": {
  10930. "type": "object",
  10931. "propertyNames": {
  10932. "type": "string"
  10933. },
  10934. "additionalProperties": {
  10935. "$ref": "#/components/schemas/PermissionActionConfig"
  10936. }
  10937. },
  10938. "PermissionRuleConfig": {
  10939. "anyOf": [
  10940. {
  10941. "$ref": "#/components/schemas/PermissionActionConfig"
  10942. },
  10943. {
  10944. "$ref": "#/components/schemas/PermissionObjectConfig"
  10945. }
  10946. ]
  10947. },
  10948. "PermissionConfig": {
  10949. "anyOf": [
  10950. {
  10951. "$ref": "#/components/schemas/PermissionActionConfig"
  10952. },
  10953. {
  10954. "type": "object",
  10955. "properties": {
  10956. "read": {
  10957. "$ref": "#/components/schemas/PermissionRuleConfig"
  10958. },
  10959. "edit": {
  10960. "$ref": "#/components/schemas/PermissionRuleConfig"
  10961. },
  10962. "glob": {
  10963. "$ref": "#/components/schemas/PermissionRuleConfig"
  10964. },
  10965. "grep": {
  10966. "$ref": "#/components/schemas/PermissionRuleConfig"
  10967. },
  10968. "list": {
  10969. "$ref": "#/components/schemas/PermissionRuleConfig"
  10970. },
  10971. "bash": {
  10972. "$ref": "#/components/schemas/PermissionRuleConfig"
  10973. },
  10974. "task": {
  10975. "$ref": "#/components/schemas/PermissionRuleConfig"
  10976. },
  10977. "external_directory": {
  10978. "$ref": "#/components/schemas/PermissionRuleConfig"
  10979. },
  10980. "todowrite": {
  10981. "$ref": "#/components/schemas/PermissionActionConfig"
  10982. },
  10983. "question": {
  10984. "$ref": "#/components/schemas/PermissionActionConfig"
  10985. },
  10986. "webfetch": {
  10987. "$ref": "#/components/schemas/PermissionActionConfig"
  10988. },
  10989. "websearch": {
  10990. "$ref": "#/components/schemas/PermissionActionConfig"
  10991. },
  10992. "codesearch": {
  10993. "$ref": "#/components/schemas/PermissionActionConfig"
  10994. },
  10995. "lsp": {
  10996. "$ref": "#/components/schemas/PermissionRuleConfig"
  10997. },
  10998. "doom_loop": {
  10999. "$ref": "#/components/schemas/PermissionActionConfig"
  11000. },
  11001. "skill": {
  11002. "$ref": "#/components/schemas/PermissionRuleConfig"
  11003. }
  11004. },
  11005. "additionalProperties": {
  11006. "$ref": "#/components/schemas/PermissionRuleConfig"
  11007. }
  11008. }
  11009. ]
  11010. },
  11011. "AgentConfig": {
  11012. "type": "object",
  11013. "properties": {
  11014. "model": {
  11015. "type": "string"
  11016. },
  11017. "variant": {
  11018. "description": "Default model variant for this agent (applies only when using the agent's configured model).",
  11019. "type": "string"
  11020. },
  11021. "temperature": {
  11022. "type": "number"
  11023. },
  11024. "top_p": {
  11025. "type": "number"
  11026. },
  11027. "prompt": {
  11028. "type": "string"
  11029. },
  11030. "tools": {
  11031. "description": "@deprecated Use 'permission' field instead",
  11032. "type": "object",
  11033. "propertyNames": {
  11034. "type": "string"
  11035. },
  11036. "additionalProperties": {
  11037. "type": "boolean"
  11038. }
  11039. },
  11040. "disable": {
  11041. "type": "boolean"
  11042. },
  11043. "description": {
  11044. "description": "Description of when to use the agent",
  11045. "type": "string"
  11046. },
  11047. "mode": {
  11048. "type": "string",
  11049. "enum": ["subagent", "primary", "all"]
  11050. },
  11051. "hidden": {
  11052. "description": "Hide this subagent from the @ autocomplete menu (default: false, only applies to mode: subagent)",
  11053. "type": "boolean"
  11054. },
  11055. "options": {
  11056. "type": "object",
  11057. "propertyNames": {
  11058. "type": "string"
  11059. },
  11060. "additionalProperties": {}
  11061. },
  11062. "color": {
  11063. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)",
  11064. "anyOf": [
  11065. {
  11066. "type": "string",
  11067. "pattern": "^#[0-9a-fA-F]{6}$"
  11068. },
  11069. {
  11070. "type": "string",
  11071. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  11072. }
  11073. ]
  11074. },
  11075. "steps": {
  11076. "description": "Maximum number of agentic iterations before forcing text-only response",
  11077. "type": "integer",
  11078. "exclusiveMinimum": 0,
  11079. "maximum": 9007199254740991
  11080. },
  11081. "maxSteps": {
  11082. "description": "@deprecated Use 'steps' field instead.",
  11083. "type": "integer",
  11084. "exclusiveMinimum": 0,
  11085. "maximum": 9007199254740991
  11086. },
  11087. "permission": {
  11088. "$ref": "#/components/schemas/PermissionConfig"
  11089. }
  11090. },
  11091. "additionalProperties": {}
  11092. },
  11093. "ProviderConfig": {
  11094. "type": "object",
  11095. "properties": {
  11096. "api": {
  11097. "type": "string"
  11098. },
  11099. "name": {
  11100. "type": "string"
  11101. },
  11102. "env": {
  11103. "type": "array",
  11104. "items": {
  11105. "type": "string"
  11106. }
  11107. },
  11108. "id": {
  11109. "type": "string"
  11110. },
  11111. "npm": {
  11112. "type": "string"
  11113. },
  11114. "whitelist": {
  11115. "type": "array",
  11116. "items": {
  11117. "type": "string"
  11118. }
  11119. },
  11120. "blacklist": {
  11121. "type": "array",
  11122. "items": {
  11123. "type": "string"
  11124. }
  11125. },
  11126. "options": {
  11127. "type": "object",
  11128. "properties": {
  11129. "apiKey": {
  11130. "type": "string"
  11131. },
  11132. "baseURL": {
  11133. "type": "string"
  11134. },
  11135. "enterpriseUrl": {
  11136. "description": "GitHub Enterprise URL for copilot authentication",
  11137. "type": "string"
  11138. },
  11139. "setCacheKey": {
  11140. "description": "Enable promptCacheKey for this provider (default false)",
  11141. "type": "boolean"
  11142. },
  11143. "timeout": {
  11144. "description": "Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout.",
  11145. "anyOf": [
  11146. {
  11147. "type": "integer",
  11148. "exclusiveMinimum": 0,
  11149. "maximum": 9007199254740991
  11150. },
  11151. {
  11152. "type": "boolean",
  11153. "const": false
  11154. }
  11155. ]
  11156. },
  11157. "chunkTimeout": {
  11158. "description": "Timeout in milliseconds between streamed SSE chunks for this provider. If no chunk arrives within this window, the request is aborted.",
  11159. "type": "integer",
  11160. "exclusiveMinimum": 0,
  11161. "maximum": 9007199254740991
  11162. }
  11163. },
  11164. "additionalProperties": {}
  11165. },
  11166. "models": {
  11167. "type": "object",
  11168. "propertyNames": {
  11169. "type": "string"
  11170. },
  11171. "additionalProperties": {
  11172. "type": "object",
  11173. "properties": {
  11174. "id": {
  11175. "type": "string"
  11176. },
  11177. "name": {
  11178. "type": "string"
  11179. },
  11180. "family": {
  11181. "type": "string"
  11182. },
  11183. "release_date": {
  11184. "type": "string"
  11185. },
  11186. "attachment": {
  11187. "type": "boolean"
  11188. },
  11189. "reasoning": {
  11190. "type": "boolean"
  11191. },
  11192. "temperature": {
  11193. "type": "boolean"
  11194. },
  11195. "tool_call": {
  11196. "type": "boolean"
  11197. },
  11198. "interleaved": {
  11199. "anyOf": [
  11200. {
  11201. "type": "boolean",
  11202. "const": true
  11203. },
  11204. {
  11205. "type": "object",
  11206. "properties": {
  11207. "field": {
  11208. "type": "string",
  11209. "enum": ["reasoning_content", "reasoning_details"]
  11210. }
  11211. },
  11212. "required": ["field"]
  11213. }
  11214. ]
  11215. },
  11216. "cost": {
  11217. "type": "object",
  11218. "properties": {
  11219. "input": {
  11220. "type": "number"
  11221. },
  11222. "output": {
  11223. "type": "number"
  11224. },
  11225. "cache_read": {
  11226. "type": "number"
  11227. },
  11228. "cache_write": {
  11229. "type": "number"
  11230. },
  11231. "context_over_200k": {
  11232. "type": "object",
  11233. "properties": {
  11234. "input": {
  11235. "type": "number"
  11236. },
  11237. "output": {
  11238. "type": "number"
  11239. },
  11240. "cache_read": {
  11241. "type": "number"
  11242. },
  11243. "cache_write": {
  11244. "type": "number"
  11245. }
  11246. },
  11247. "required": ["input", "output"]
  11248. }
  11249. },
  11250. "required": ["input", "output"]
  11251. },
  11252. "limit": {
  11253. "type": "object",
  11254. "properties": {
  11255. "context": {
  11256. "type": "number"
  11257. },
  11258. "input": {
  11259. "type": "number"
  11260. },
  11261. "output": {
  11262. "type": "number"
  11263. }
  11264. },
  11265. "required": ["context", "output"]
  11266. },
  11267. "modalities": {
  11268. "type": "object",
  11269. "properties": {
  11270. "input": {
  11271. "type": "array",
  11272. "items": {
  11273. "type": "string",
  11274. "enum": ["text", "audio", "image", "video", "pdf"]
  11275. }
  11276. },
  11277. "output": {
  11278. "type": "array",
  11279. "items": {
  11280. "type": "string",
  11281. "enum": ["text", "audio", "image", "video", "pdf"]
  11282. }
  11283. }
  11284. },
  11285. "required": ["input", "output"]
  11286. },
  11287. "experimental": {
  11288. "type": "boolean"
  11289. },
  11290. "status": {
  11291. "type": "string",
  11292. "enum": ["alpha", "beta", "deprecated"]
  11293. },
  11294. "provider": {
  11295. "type": "object",
  11296. "properties": {
  11297. "npm": {
  11298. "type": "string"
  11299. },
  11300. "api": {
  11301. "type": "string"
  11302. }
  11303. }
  11304. },
  11305. "options": {
  11306. "type": "object",
  11307. "propertyNames": {
  11308. "type": "string"
  11309. },
  11310. "additionalProperties": {}
  11311. },
  11312. "headers": {
  11313. "type": "object",
  11314. "propertyNames": {
  11315. "type": "string"
  11316. },
  11317. "additionalProperties": {
  11318. "type": "string"
  11319. }
  11320. },
  11321. "variants": {
  11322. "description": "Variant-specific configuration",
  11323. "type": "object",
  11324. "propertyNames": {
  11325. "type": "string"
  11326. },
  11327. "additionalProperties": {
  11328. "type": "object",
  11329. "properties": {
  11330. "disabled": {
  11331. "description": "Disable this variant for the model",
  11332. "type": "boolean"
  11333. }
  11334. },
  11335. "additionalProperties": {}
  11336. }
  11337. }
  11338. }
  11339. }
  11340. }
  11341. }
  11342. },
  11343. "McpLocalConfig": {
  11344. "type": "object",
  11345. "properties": {
  11346. "type": {
  11347. "description": "Type of MCP server connection",
  11348. "type": "string",
  11349. "const": "local"
  11350. },
  11351. "command": {
  11352. "description": "Command and arguments to run the MCP server",
  11353. "type": "array",
  11354. "items": {
  11355. "type": "string"
  11356. }
  11357. },
  11358. "environment": {
  11359. "description": "Environment variables to set when running the MCP server",
  11360. "type": "object",
  11361. "propertyNames": {
  11362. "type": "string"
  11363. },
  11364. "additionalProperties": {
  11365. "type": "string"
  11366. }
  11367. },
  11368. "enabled": {
  11369. "description": "Enable or disable the MCP server on startup",
  11370. "type": "boolean"
  11371. },
  11372. "timeout": {
  11373. "description": "Timeout in ms for MCP server requests. Defaults to 5000 (5 seconds) if not specified.",
  11374. "type": "number"
  11375. }
  11376. },
  11377. "required": ["type", "command"]
  11378. },
  11379. "McpOAuthConfig": {
  11380. "type": "object",
  11381. "properties": {
  11382. "clientId": {
  11383. "description": "OAuth client ID. If not provided, dynamic client registration (RFC 7591) will be attempted.",
  11384. "type": "string"
  11385. },
  11386. "clientSecret": {
  11387. "description": "OAuth client secret (if required by the authorization server)",
  11388. "type": "string"
  11389. },
  11390. "scope": {
  11391. "description": "OAuth scopes to request during authorization",
  11392. "type": "string"
  11393. },
  11394. "redirectUri": {
  11395. "description": "OAuth redirect URI (default: http://127.0.0.1:19876/mcp/oauth/callback).",
  11396. "type": "string"
  11397. }
  11398. }
  11399. },
  11400. "McpRemoteConfig": {
  11401. "type": "object",
  11402. "properties": {
  11403. "type": {
  11404. "description": "Type of MCP server connection",
  11405. "type": "string",
  11406. "const": "remote"
  11407. },
  11408. "url": {
  11409. "description": "URL of the remote MCP server",
  11410. "type": "string"
  11411. },
  11412. "enabled": {
  11413. "description": "Enable or disable the MCP server on startup",
  11414. "type": "boolean"
  11415. },
  11416. "headers": {
  11417. "description": "Headers to send with the request",
  11418. "type": "object",
  11419. "propertyNames": {
  11420. "type": "string"
  11421. },
  11422. "additionalProperties": {
  11423. "type": "string"
  11424. }
  11425. },
  11426. "oauth": {
  11427. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection.",
  11428. "anyOf": [
  11429. {
  11430. "$ref": "#/components/schemas/McpOAuthConfig"
  11431. },
  11432. {
  11433. "type": "boolean",
  11434. "const": false
  11435. }
  11436. ]
  11437. },
  11438. "timeout": {
  11439. "description": "Timeout in ms for MCP server requests. Defaults to 5000 (5 seconds) if not specified.",
  11440. "type": "number"
  11441. }
  11442. },
  11443. "required": ["type", "url"]
  11444. },
  11445. "LayoutConfig": {
  11446. "description": "@deprecated Always uses stretch layout.",
  11447. "type": "string",
  11448. "enum": ["auto", "stretch"]
  11449. },
  11450. "Config": {
  11451. "type": "object",
  11452. "properties": {
  11453. "$schema": {
  11454. "description": "JSON schema reference for configuration validation",
  11455. "type": "string"
  11456. },
  11457. "logLevel": {
  11458. "$ref": "#/components/schemas/LogLevel"
  11459. },
  11460. "server": {
  11461. "$ref": "#/components/schemas/ServerConfig"
  11462. },
  11463. "command": {
  11464. "description": "Command configuration, see https://opencode.ai/docs/commands",
  11465. "type": "object",
  11466. "propertyNames": {
  11467. "type": "string"
  11468. },
  11469. "additionalProperties": {
  11470. "type": "object",
  11471. "properties": {
  11472. "template": {
  11473. "type": "string"
  11474. },
  11475. "description": {
  11476. "type": "string"
  11477. },
  11478. "agent": {
  11479. "type": "string"
  11480. },
  11481. "model": {
  11482. "type": "string"
  11483. },
  11484. "subtask": {
  11485. "type": "boolean"
  11486. }
  11487. },
  11488. "required": ["template"]
  11489. }
  11490. },
  11491. "skills": {
  11492. "description": "Additional skill folder paths",
  11493. "type": "object",
  11494. "properties": {
  11495. "paths": {
  11496. "description": "Additional paths to skill folders",
  11497. "type": "array",
  11498. "items": {
  11499. "type": "string"
  11500. }
  11501. },
  11502. "urls": {
  11503. "description": "URLs to fetch skills from (e.g., https://example.com/.well-known/skills/)",
  11504. "type": "array",
  11505. "items": {
  11506. "type": "string"
  11507. }
  11508. }
  11509. }
  11510. },
  11511. "watcher": {
  11512. "type": "object",
  11513. "properties": {
  11514. "ignore": {
  11515. "type": "array",
  11516. "items": {
  11517. "type": "string"
  11518. }
  11519. }
  11520. }
  11521. },
  11522. "snapshot": {
  11523. "description": "Enable or disable snapshot tracking. When false, filesystem snapshots are not recorded and undoing or reverting will not undo/redo file changes. Defaults to true.",
  11524. "type": "boolean"
  11525. },
  11526. "plugin": {
  11527. "type": "array",
  11528. "items": {
  11529. "anyOf": [
  11530. {
  11531. "type": "string"
  11532. },
  11533. {
  11534. "type": "array",
  11535. "prefixItems": [
  11536. {
  11537. "type": "string"
  11538. },
  11539. {
  11540. "type": "object",
  11541. "propertyNames": {
  11542. "type": "string"
  11543. },
  11544. "additionalProperties": {}
  11545. }
  11546. ]
  11547. }
  11548. ]
  11549. }
  11550. },
  11551. "share": {
  11552. "description": "Control sharing behavior:'manual' allows manual sharing via commands, 'auto' enables automatic sharing, 'disabled' disables all sharing",
  11553. "type": "string",
  11554. "enum": ["manual", "auto", "disabled"]
  11555. },
  11556. "autoshare": {
  11557. "description": "@deprecated Use 'share' field instead. Share newly created sessions automatically",
  11558. "type": "boolean"
  11559. },
  11560. "autoupdate": {
  11561. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications",
  11562. "anyOf": [
  11563. {
  11564. "type": "boolean"
  11565. },
  11566. {
  11567. "type": "string",
  11568. "const": "notify"
  11569. }
  11570. ]
  11571. },
  11572. "disabled_providers": {
  11573. "description": "Disable providers that are loaded automatically",
  11574. "type": "array",
  11575. "items": {
  11576. "type": "string"
  11577. }
  11578. },
  11579. "enabled_providers": {
  11580. "description": "When set, ONLY these providers will be enabled. All other providers will be ignored",
  11581. "type": "array",
  11582. "items": {
  11583. "type": "string"
  11584. }
  11585. },
  11586. "model": {
  11587. "description": "Model to use in the format of provider/model, eg anthropic/claude-2",
  11588. "type": "string"
  11589. },
  11590. "small_model": {
  11591. "description": "Small model to use for tasks like title generation in the format of provider/model",
  11592. "type": "string"
  11593. },
  11594. "default_agent": {
  11595. "description": "Default agent to use when none is specified. Must be a primary agent. Falls back to 'build' if not set or if the specified agent is invalid.",
  11596. "type": "string"
  11597. },
  11598. "username": {
  11599. "description": "Custom username to display in conversations instead of system username",
  11600. "type": "string"
  11601. },
  11602. "mode": {
  11603. "description": "@deprecated Use `agent` field instead.",
  11604. "type": "object",
  11605. "properties": {
  11606. "build": {
  11607. "$ref": "#/components/schemas/AgentConfig"
  11608. },
  11609. "plan": {
  11610. "$ref": "#/components/schemas/AgentConfig"
  11611. }
  11612. },
  11613. "additionalProperties": {
  11614. "$ref": "#/components/schemas/AgentConfig"
  11615. }
  11616. },
  11617. "agent": {
  11618. "description": "Agent configuration, see https://opencode.ai/docs/agents",
  11619. "type": "object",
  11620. "properties": {
  11621. "plan": {
  11622. "$ref": "#/components/schemas/AgentConfig"
  11623. },
  11624. "build": {
  11625. "$ref": "#/components/schemas/AgentConfig"
  11626. },
  11627. "general": {
  11628. "$ref": "#/components/schemas/AgentConfig"
  11629. },
  11630. "explore": {
  11631. "$ref": "#/components/schemas/AgentConfig"
  11632. },
  11633. "title": {
  11634. "$ref": "#/components/schemas/AgentConfig"
  11635. },
  11636. "summary": {
  11637. "$ref": "#/components/schemas/AgentConfig"
  11638. },
  11639. "compaction": {
  11640. "$ref": "#/components/schemas/AgentConfig"
  11641. }
  11642. },
  11643. "additionalProperties": {
  11644. "$ref": "#/components/schemas/AgentConfig"
  11645. }
  11646. },
  11647. "provider": {
  11648. "description": "Custom provider configurations and model overrides",
  11649. "type": "object",
  11650. "propertyNames": {
  11651. "type": "string"
  11652. },
  11653. "additionalProperties": {
  11654. "$ref": "#/components/schemas/ProviderConfig"
  11655. }
  11656. },
  11657. "mcp": {
  11658. "description": "MCP (Model Context Protocol) server configurations",
  11659. "type": "object",
  11660. "propertyNames": {
  11661. "type": "string"
  11662. },
  11663. "additionalProperties": {
  11664. "anyOf": [
  11665. {
  11666. "anyOf": [
  11667. {
  11668. "$ref": "#/components/schemas/McpLocalConfig"
  11669. },
  11670. {
  11671. "$ref": "#/components/schemas/McpRemoteConfig"
  11672. }
  11673. ]
  11674. },
  11675. {
  11676. "type": "object",
  11677. "properties": {
  11678. "enabled": {
  11679. "type": "boolean"
  11680. }
  11681. },
  11682. "required": ["enabled"],
  11683. "additionalProperties": false
  11684. }
  11685. ]
  11686. }
  11687. },
  11688. "formatter": {
  11689. "anyOf": [
  11690. {
  11691. "type": "boolean"
  11692. },
  11693. {
  11694. "type": "object",
  11695. "propertyNames": {
  11696. "type": "string"
  11697. },
  11698. "additionalProperties": {
  11699. "type": "object",
  11700. "properties": {
  11701. "disabled": {
  11702. "type": "boolean"
  11703. },
  11704. "command": {
  11705. "type": "array",
  11706. "items": {
  11707. "type": "string"
  11708. }
  11709. },
  11710. "environment": {
  11711. "type": "object",
  11712. "propertyNames": {
  11713. "type": "string"
  11714. },
  11715. "additionalProperties": {
  11716. "type": "string"
  11717. }
  11718. },
  11719. "extensions": {
  11720. "type": "array",
  11721. "items": {
  11722. "type": "string"
  11723. }
  11724. }
  11725. }
  11726. }
  11727. }
  11728. ]
  11729. },
  11730. "lsp": {
  11731. "anyOf": [
  11732. {
  11733. "type": "boolean"
  11734. },
  11735. {
  11736. "type": "object",
  11737. "propertyNames": {
  11738. "type": "string"
  11739. },
  11740. "additionalProperties": {
  11741. "anyOf": [
  11742. {
  11743. "type": "object",
  11744. "properties": {
  11745. "disabled": {
  11746. "type": "boolean",
  11747. "const": true
  11748. }
  11749. },
  11750. "required": ["disabled"]
  11751. },
  11752. {
  11753. "type": "object",
  11754. "properties": {
  11755. "command": {
  11756. "type": "array",
  11757. "items": {
  11758. "type": "string"
  11759. }
  11760. },
  11761. "extensions": {
  11762. "type": "array",
  11763. "items": {
  11764. "type": "string"
  11765. }
  11766. },
  11767. "disabled": {
  11768. "type": "boolean"
  11769. },
  11770. "env": {
  11771. "type": "object",
  11772. "propertyNames": {
  11773. "type": "string"
  11774. },
  11775. "additionalProperties": {
  11776. "type": "string"
  11777. }
  11778. },
  11779. "initialization": {
  11780. "type": "object",
  11781. "propertyNames": {
  11782. "type": "string"
  11783. },
  11784. "additionalProperties": {}
  11785. }
  11786. },
  11787. "required": ["command"]
  11788. }
  11789. ]
  11790. }
  11791. }
  11792. ]
  11793. },
  11794. "instructions": {
  11795. "description": "Additional instruction files or patterns to include",
  11796. "type": "array",
  11797. "items": {
  11798. "type": "string"
  11799. }
  11800. },
  11801. "layout": {
  11802. "$ref": "#/components/schemas/LayoutConfig"
  11803. },
  11804. "permission": {
  11805. "$ref": "#/components/schemas/PermissionConfig"
  11806. },
  11807. "tools": {
  11808. "type": "object",
  11809. "propertyNames": {
  11810. "type": "string"
  11811. },
  11812. "additionalProperties": {
  11813. "type": "boolean"
  11814. }
  11815. },
  11816. "enterprise": {
  11817. "type": "object",
  11818. "properties": {
  11819. "url": {
  11820. "description": "Enterprise URL",
  11821. "type": "string"
  11822. }
  11823. }
  11824. },
  11825. "tool_output": {
  11826. "description": "Thresholds for truncating tool output. When output exceeds either limit, the full text is written to the truncation directory and a preview is returned.",
  11827. "type": "object",
  11828. "properties": {
  11829. "max_lines": {
  11830. "description": "Maximum lines of tool output before it is truncated and saved to disk (default: 2000)",
  11831. "type": "integer",
  11832. "exclusiveMinimum": 0,
  11833. "maximum": 9007199254740991
  11834. },
  11835. "max_bytes": {
  11836. "description": "Maximum bytes of tool output before it is truncated and saved to disk (default: 51200)",
  11837. "type": "integer",
  11838. "exclusiveMinimum": 0,
  11839. "maximum": 9007199254740991
  11840. }
  11841. }
  11842. },
  11843. "compaction": {
  11844. "type": "object",
  11845. "properties": {
  11846. "auto": {
  11847. "description": "Enable automatic compaction when context is full (default: true)",
  11848. "type": "boolean"
  11849. },
  11850. "prune": {
  11851. "description": "Enable pruning of old tool outputs (default: true)",
  11852. "type": "boolean"
  11853. },
  11854. "tail_turns": {
  11855. "description": "Number of recent user turns, including their following assistant/tool responses, to keep verbatim during compaction (default: 2)",
  11856. "type": "integer",
  11857. "minimum": 0,
  11858. "maximum": 9007199254740991
  11859. },
  11860. "preserve_recent_tokens": {
  11861. "description": "Maximum number of tokens from recent turns to preserve verbatim after compaction",
  11862. "type": "integer",
  11863. "minimum": 0,
  11864. "maximum": 9007199254740991
  11865. },
  11866. "reserved": {
  11867. "description": "Token buffer for compaction. Leaves enough window to avoid overflow during compaction.",
  11868. "type": "integer",
  11869. "minimum": 0,
  11870. "maximum": 9007199254740991
  11871. }
  11872. }
  11873. },
  11874. "experimental": {
  11875. "type": "object",
  11876. "properties": {
  11877. "disable_paste_summary": {
  11878. "type": "boolean"
  11879. },
  11880. "batch_tool": {
  11881. "description": "Enable the batch tool",
  11882. "type": "boolean"
  11883. },
  11884. "openTelemetry": {
  11885. "description": "Enable OpenTelemetry spans for AI SDK calls (using the 'experimental_telemetry' flag)",
  11886. "type": "boolean"
  11887. },
  11888. "primary_tools": {
  11889. "description": "Tools that should only be available to primary agents.",
  11890. "type": "array",
  11891. "items": {
  11892. "type": "string"
  11893. }
  11894. },
  11895. "continue_loop_on_deny": {
  11896. "description": "Continue the agent loop when a tool call is denied",
  11897. "type": "boolean"
  11898. },
  11899. "mcp_timeout": {
  11900. "description": "Timeout in milliseconds for model context protocol (MCP) requests",
  11901. "type": "integer",
  11902. "exclusiveMinimum": 0,
  11903. "maximum": 9007199254740991
  11904. }
  11905. }
  11906. }
  11907. },
  11908. "additionalProperties": false
  11909. },
  11910. "BadRequestError": {
  11911. "type": "object",
  11912. "properties": {
  11913. "data": {},
  11914. "errors": {
  11915. "type": "array",
  11916. "items": {
  11917. "type": "object",
  11918. "propertyNames": {
  11919. "type": "string"
  11920. },
  11921. "additionalProperties": {}
  11922. }
  11923. },
  11924. "success": {
  11925. "type": "boolean",
  11926. "const": false
  11927. }
  11928. },
  11929. "required": ["data", "errors", "success"]
  11930. },
  11931. "OAuth": {
  11932. "type": "object",
  11933. "properties": {
  11934. "type": {
  11935. "type": "string",
  11936. "const": "oauth"
  11937. },
  11938. "refresh": {
  11939. "type": "string"
  11940. },
  11941. "access": {
  11942. "type": "string"
  11943. },
  11944. "expires": {
  11945. "type": "number"
  11946. },
  11947. "accountId": {
  11948. "type": "string"
  11949. },
  11950. "enterpriseUrl": {
  11951. "type": "string"
  11952. }
  11953. },
  11954. "required": ["type", "refresh", "access", "expires"]
  11955. },
  11956. "ApiAuth": {
  11957. "type": "object",
  11958. "properties": {
  11959. "type": {
  11960. "type": "string",
  11961. "const": "api"
  11962. },
  11963. "key": {
  11964. "type": "string"
  11965. },
  11966. "metadata": {
  11967. "type": "object",
  11968. "propertyNames": {
  11969. "type": "string"
  11970. },
  11971. "additionalProperties": {
  11972. "type": "string"
  11973. }
  11974. }
  11975. },
  11976. "required": ["type", "key"]
  11977. },
  11978. "WellKnownAuth": {
  11979. "type": "object",
  11980. "properties": {
  11981. "type": {
  11982. "type": "string",
  11983. "const": "wellknown"
  11984. },
  11985. "key": {
  11986. "type": "string"
  11987. },
  11988. "token": {
  11989. "type": "string"
  11990. }
  11991. },
  11992. "required": ["type", "key", "token"]
  11993. },
  11994. "Auth": {
  11995. "anyOf": [
  11996. {
  11997. "$ref": "#/components/schemas/OAuth"
  11998. },
  11999. {
  12000. "$ref": "#/components/schemas/ApiAuth"
  12001. },
  12002. {
  12003. "$ref": "#/components/schemas/WellKnownAuth"
  12004. }
  12005. ]
  12006. },
  12007. "Workspace": {
  12008. "type": "object",
  12009. "properties": {
  12010. "id": {
  12011. "type": "string",
  12012. "pattern": "^wrk.*"
  12013. },
  12014. "type": {
  12015. "type": "string"
  12016. },
  12017. "name": {
  12018. "type": "string"
  12019. },
  12020. "branch": {
  12021. "anyOf": [
  12022. {
  12023. "type": "string"
  12024. },
  12025. {
  12026. "type": "null"
  12027. }
  12028. ]
  12029. },
  12030. "directory": {
  12031. "anyOf": [
  12032. {
  12033. "type": "string"
  12034. },
  12035. {
  12036. "type": "null"
  12037. }
  12038. ]
  12039. },
  12040. "extra": {
  12041. "anyOf": [
  12042. {},
  12043. {
  12044. "type": "null"
  12045. }
  12046. ]
  12047. },
  12048. "projectID": {
  12049. "type": "string"
  12050. }
  12051. },
  12052. "required": ["id", "type", "name", "branch", "directory", "extra", "projectID"]
  12053. },
  12054. "NotFoundError": {
  12055. "type": "object",
  12056. "properties": {
  12057. "name": {
  12058. "type": "string",
  12059. "const": "NotFoundError"
  12060. },
  12061. "data": {
  12062. "type": "object",
  12063. "properties": {
  12064. "message": {
  12065. "type": "string"
  12066. }
  12067. },
  12068. "required": ["message"]
  12069. }
  12070. },
  12071. "required": ["name", "data"]
  12072. },
  12073. "Model": {
  12074. "type": "object",
  12075. "properties": {
  12076. "id": {
  12077. "type": "string"
  12078. },
  12079. "providerID": {
  12080. "type": "string"
  12081. },
  12082. "api": {
  12083. "type": "object",
  12084. "properties": {
  12085. "id": {
  12086. "type": "string"
  12087. },
  12088. "url": {
  12089. "type": "string"
  12090. },
  12091. "npm": {
  12092. "type": "string"
  12093. }
  12094. },
  12095. "required": ["id", "url", "npm"]
  12096. },
  12097. "name": {
  12098. "type": "string"
  12099. },
  12100. "family": {
  12101. "type": "string"
  12102. },
  12103. "capabilities": {
  12104. "type": "object",
  12105. "properties": {
  12106. "temperature": {
  12107. "type": "boolean"
  12108. },
  12109. "reasoning": {
  12110. "type": "boolean"
  12111. },
  12112. "attachment": {
  12113. "type": "boolean"
  12114. },
  12115. "toolcall": {
  12116. "type": "boolean"
  12117. },
  12118. "input": {
  12119. "type": "object",
  12120. "properties": {
  12121. "text": {
  12122. "type": "boolean"
  12123. },
  12124. "audio": {
  12125. "type": "boolean"
  12126. },
  12127. "image": {
  12128. "type": "boolean"
  12129. },
  12130. "video": {
  12131. "type": "boolean"
  12132. },
  12133. "pdf": {
  12134. "type": "boolean"
  12135. }
  12136. },
  12137. "required": ["text", "audio", "image", "video", "pdf"]
  12138. },
  12139. "output": {
  12140. "type": "object",
  12141. "properties": {
  12142. "text": {
  12143. "type": "boolean"
  12144. },
  12145. "audio": {
  12146. "type": "boolean"
  12147. },
  12148. "image": {
  12149. "type": "boolean"
  12150. },
  12151. "video": {
  12152. "type": "boolean"
  12153. },
  12154. "pdf": {
  12155. "type": "boolean"
  12156. }
  12157. },
  12158. "required": ["text", "audio", "image", "video", "pdf"]
  12159. },
  12160. "interleaved": {
  12161. "anyOf": [
  12162. {
  12163. "type": "boolean"
  12164. },
  12165. {
  12166. "type": "object",
  12167. "properties": {
  12168. "field": {
  12169. "type": "string",
  12170. "enum": ["reasoning_content", "reasoning_details"]
  12171. }
  12172. },
  12173. "required": ["field"]
  12174. }
  12175. ]
  12176. }
  12177. },
  12178. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"]
  12179. },
  12180. "cost": {
  12181. "type": "object",
  12182. "properties": {
  12183. "input": {
  12184. "type": "number"
  12185. },
  12186. "output": {
  12187. "type": "number"
  12188. },
  12189. "cache": {
  12190. "type": "object",
  12191. "properties": {
  12192. "read": {
  12193. "type": "number"
  12194. },
  12195. "write": {
  12196. "type": "number"
  12197. }
  12198. },
  12199. "required": ["read", "write"]
  12200. },
  12201. "experimentalOver200K": {
  12202. "type": "object",
  12203. "properties": {
  12204. "input": {
  12205. "type": "number"
  12206. },
  12207. "output": {
  12208. "type": "number"
  12209. },
  12210. "cache": {
  12211. "type": "object",
  12212. "properties": {
  12213. "read": {
  12214. "type": "number"
  12215. },
  12216. "write": {
  12217. "type": "number"
  12218. }
  12219. },
  12220. "required": ["read", "write"]
  12221. }
  12222. },
  12223. "required": ["input", "output", "cache"]
  12224. }
  12225. },
  12226. "required": ["input", "output", "cache"]
  12227. },
  12228. "limit": {
  12229. "type": "object",
  12230. "properties": {
  12231. "context": {
  12232. "type": "number"
  12233. },
  12234. "input": {
  12235. "type": "number"
  12236. },
  12237. "output": {
  12238. "type": "number"
  12239. }
  12240. },
  12241. "required": ["context", "output"]
  12242. },
  12243. "status": {
  12244. "type": "string",
  12245. "enum": ["alpha", "beta", "deprecated", "active"]
  12246. },
  12247. "options": {
  12248. "type": "object",
  12249. "propertyNames": {
  12250. "type": "string"
  12251. },
  12252. "additionalProperties": {}
  12253. },
  12254. "headers": {
  12255. "type": "object",
  12256. "propertyNames": {
  12257. "type": "string"
  12258. },
  12259. "additionalProperties": {
  12260. "type": "string"
  12261. }
  12262. },
  12263. "release_date": {
  12264. "type": "string"
  12265. },
  12266. "variants": {
  12267. "type": "object",
  12268. "propertyNames": {
  12269. "type": "string"
  12270. },
  12271. "additionalProperties": {
  12272. "type": "object",
  12273. "propertyNames": {
  12274. "type": "string"
  12275. },
  12276. "additionalProperties": {}
  12277. }
  12278. }
  12279. },
  12280. "required": [
  12281. "id",
  12282. "providerID",
  12283. "api",
  12284. "name",
  12285. "capabilities",
  12286. "cost",
  12287. "limit",
  12288. "status",
  12289. "options",
  12290. "headers",
  12291. "release_date"
  12292. ]
  12293. },
  12294. "Provider": {
  12295. "type": "object",
  12296. "properties": {
  12297. "id": {
  12298. "type": "string"
  12299. },
  12300. "name": {
  12301. "type": "string"
  12302. },
  12303. "source": {
  12304. "type": "string",
  12305. "enum": ["env", "config", "custom", "api"]
  12306. },
  12307. "env": {
  12308. "type": "array",
  12309. "items": {
  12310. "type": "string"
  12311. }
  12312. },
  12313. "key": {
  12314. "type": "string"
  12315. },
  12316. "options": {
  12317. "type": "object",
  12318. "propertyNames": {
  12319. "type": "string"
  12320. },
  12321. "additionalProperties": {}
  12322. },
  12323. "models": {
  12324. "type": "object",
  12325. "propertyNames": {
  12326. "type": "string"
  12327. },
  12328. "additionalProperties": {
  12329. "$ref": "#/components/schemas/Model"
  12330. }
  12331. }
  12332. },
  12333. "required": ["id", "name", "source", "env", "options", "models"]
  12334. },
  12335. "ConsoleState": {
  12336. "type": "object",
  12337. "properties": {
  12338. "consoleManagedProviders": {
  12339. "type": "array",
  12340. "items": {
  12341. "type": "string"
  12342. }
  12343. },
  12344. "activeOrgName": {
  12345. "type": "string"
  12346. },
  12347. "switchableOrgCount": {
  12348. "type": "number"
  12349. }
  12350. },
  12351. "required": ["consoleManagedProviders", "switchableOrgCount"]
  12352. },
  12353. "ToolIDs": {
  12354. "type": "array",
  12355. "items": {
  12356. "type": "string"
  12357. }
  12358. },
  12359. "ToolListItem": {
  12360. "type": "object",
  12361. "properties": {
  12362. "id": {
  12363. "type": "string"
  12364. },
  12365. "description": {
  12366. "type": "string"
  12367. },
  12368. "parameters": {}
  12369. },
  12370. "required": ["id", "description", "parameters"]
  12371. },
  12372. "ToolList": {
  12373. "type": "array",
  12374. "items": {
  12375. "$ref": "#/components/schemas/ToolListItem"
  12376. }
  12377. },
  12378. "Worktree": {
  12379. "type": "object",
  12380. "properties": {
  12381. "name": {
  12382. "type": "string"
  12383. },
  12384. "branch": {
  12385. "type": "string"
  12386. },
  12387. "directory": {
  12388. "type": "string"
  12389. }
  12390. },
  12391. "required": ["name", "branch", "directory"]
  12392. },
  12393. "WorktreeCreateInput": {
  12394. "type": "object",
  12395. "properties": {
  12396. "name": {
  12397. "type": "string"
  12398. },
  12399. "startCommand": {
  12400. "description": "Additional startup script to run after the project's start command",
  12401. "type": "string"
  12402. }
  12403. }
  12404. },
  12405. "WorktreeRemoveInput": {
  12406. "type": "object",
  12407. "properties": {
  12408. "directory": {
  12409. "type": "string"
  12410. }
  12411. },
  12412. "required": ["directory"]
  12413. },
  12414. "WorktreeResetInput": {
  12415. "type": "object",
  12416. "properties": {
  12417. "directory": {
  12418. "type": "string"
  12419. }
  12420. },
  12421. "required": ["directory"]
  12422. },
  12423. "ProjectSummary": {
  12424. "type": "object",
  12425. "properties": {
  12426. "id": {
  12427. "type": "string"
  12428. },
  12429. "name": {
  12430. "type": "string"
  12431. },
  12432. "worktree": {
  12433. "type": "string"
  12434. }
  12435. },
  12436. "required": ["id", "worktree"]
  12437. },
  12438. "GlobalSession": {
  12439. "type": "object",
  12440. "properties": {
  12441. "id": {
  12442. "type": "string",
  12443. "pattern": "^ses.*"
  12444. },
  12445. "slug": {
  12446. "type": "string"
  12447. },
  12448. "projectID": {
  12449. "type": "string"
  12450. },
  12451. "workspaceID": {
  12452. "type": "string",
  12453. "pattern": "^wrk.*"
  12454. },
  12455. "directory": {
  12456. "type": "string"
  12457. },
  12458. "parentID": {
  12459. "type": "string",
  12460. "pattern": "^ses.*"
  12461. },
  12462. "summary": {
  12463. "type": "object",
  12464. "properties": {
  12465. "additions": {
  12466. "type": "number"
  12467. },
  12468. "deletions": {
  12469. "type": "number"
  12470. },
  12471. "files": {
  12472. "type": "number"
  12473. },
  12474. "diffs": {
  12475. "type": "array",
  12476. "items": {
  12477. "$ref": "#/components/schemas/SnapshotFileDiff"
  12478. }
  12479. }
  12480. },
  12481. "required": ["additions", "deletions", "files"]
  12482. },
  12483. "share": {
  12484. "type": "object",
  12485. "properties": {
  12486. "url": {
  12487. "type": "string"
  12488. }
  12489. },
  12490. "required": ["url"]
  12491. },
  12492. "title": {
  12493. "type": "string"
  12494. },
  12495. "version": {
  12496. "type": "string"
  12497. },
  12498. "time": {
  12499. "type": "object",
  12500. "properties": {
  12501. "created": {
  12502. "type": "number"
  12503. },
  12504. "updated": {
  12505. "type": "number"
  12506. },
  12507. "compacting": {
  12508. "type": "number"
  12509. },
  12510. "archived": {
  12511. "type": "number"
  12512. }
  12513. },
  12514. "required": ["created", "updated"]
  12515. },
  12516. "permission": {
  12517. "$ref": "#/components/schemas/PermissionRuleset"
  12518. },
  12519. "revert": {
  12520. "type": "object",
  12521. "properties": {
  12522. "messageID": {
  12523. "type": "string",
  12524. "pattern": "^msg.*"
  12525. },
  12526. "partID": {
  12527. "type": "string",
  12528. "pattern": "^prt.*"
  12529. },
  12530. "snapshot": {
  12531. "type": "string"
  12532. },
  12533. "diff": {
  12534. "type": "string"
  12535. }
  12536. },
  12537. "required": ["messageID"]
  12538. },
  12539. "project": {
  12540. "anyOf": [
  12541. {
  12542. "$ref": "#/components/schemas/ProjectSummary"
  12543. },
  12544. {
  12545. "type": "null"
  12546. }
  12547. ]
  12548. }
  12549. },
  12550. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"]
  12551. },
  12552. "McpResource": {
  12553. "type": "object",
  12554. "properties": {
  12555. "name": {
  12556. "type": "string"
  12557. },
  12558. "uri": {
  12559. "type": "string"
  12560. },
  12561. "description": {
  12562. "type": "string"
  12563. },
  12564. "mimeType": {
  12565. "type": "string"
  12566. },
  12567. "client": {
  12568. "type": "string"
  12569. }
  12570. },
  12571. "required": ["name", "uri", "client"]
  12572. },
  12573. "TextPartInput": {
  12574. "type": "object",
  12575. "properties": {
  12576. "id": {
  12577. "type": "string",
  12578. "pattern": "^prt.*"
  12579. },
  12580. "type": {
  12581. "type": "string",
  12582. "const": "text"
  12583. },
  12584. "text": {
  12585. "type": "string"
  12586. },
  12587. "synthetic": {
  12588. "type": "boolean"
  12589. },
  12590. "ignored": {
  12591. "type": "boolean"
  12592. },
  12593. "time": {
  12594. "type": "object",
  12595. "properties": {
  12596. "start": {
  12597. "type": "number"
  12598. },
  12599. "end": {
  12600. "type": "number"
  12601. }
  12602. },
  12603. "required": ["start"]
  12604. },
  12605. "metadata": {
  12606. "type": "object",
  12607. "propertyNames": {
  12608. "type": "string"
  12609. },
  12610. "additionalProperties": {}
  12611. }
  12612. },
  12613. "required": ["type", "text"]
  12614. },
  12615. "FilePartInput": {
  12616. "type": "object",
  12617. "properties": {
  12618. "id": {
  12619. "type": "string",
  12620. "pattern": "^prt.*"
  12621. },
  12622. "type": {
  12623. "type": "string",
  12624. "const": "file"
  12625. },
  12626. "mime": {
  12627. "type": "string"
  12628. },
  12629. "filename": {
  12630. "type": "string"
  12631. },
  12632. "url": {
  12633. "type": "string"
  12634. },
  12635. "source": {
  12636. "$ref": "#/components/schemas/FilePartSource"
  12637. }
  12638. },
  12639. "required": ["type", "mime", "url"]
  12640. },
  12641. "AgentPartInput": {
  12642. "type": "object",
  12643. "properties": {
  12644. "id": {
  12645. "type": "string",
  12646. "pattern": "^prt.*"
  12647. },
  12648. "type": {
  12649. "type": "string",
  12650. "const": "agent"
  12651. },
  12652. "name": {
  12653. "type": "string"
  12654. },
  12655. "source": {
  12656. "type": "object",
  12657. "properties": {
  12658. "value": {
  12659. "type": "string"
  12660. },
  12661. "start": {
  12662. "type": "integer",
  12663. "minimum": -9007199254740991,
  12664. "maximum": 9007199254740991
  12665. },
  12666. "end": {
  12667. "type": "integer",
  12668. "minimum": -9007199254740991,
  12669. "maximum": 9007199254740991
  12670. }
  12671. },
  12672. "required": ["value", "start", "end"]
  12673. }
  12674. },
  12675. "required": ["type", "name"]
  12676. },
  12677. "SubtaskPartInput": {
  12678. "type": "object",
  12679. "properties": {
  12680. "id": {
  12681. "type": "string",
  12682. "pattern": "^prt.*"
  12683. },
  12684. "type": {
  12685. "type": "string",
  12686. "const": "subtask"
  12687. },
  12688. "prompt": {
  12689. "type": "string"
  12690. },
  12691. "description": {
  12692. "type": "string"
  12693. },
  12694. "agent": {
  12695. "type": "string"
  12696. },
  12697. "model": {
  12698. "type": "object",
  12699. "properties": {
  12700. "providerID": {
  12701. "type": "string"
  12702. },
  12703. "modelID": {
  12704. "type": "string"
  12705. }
  12706. },
  12707. "required": ["providerID", "modelID"]
  12708. },
  12709. "command": {
  12710. "type": "string"
  12711. }
  12712. },
  12713. "required": ["type", "prompt", "description", "agent"]
  12714. },
  12715. "ProviderAuthMethod": {
  12716. "type": "object",
  12717. "properties": {
  12718. "type": {
  12719. "type": "string",
  12720. "enum": ["oauth", "api"]
  12721. },
  12722. "label": {
  12723. "type": "string"
  12724. },
  12725. "prompts": {
  12726. "type": "array",
  12727. "items": {
  12728. "anyOf": [
  12729. {
  12730. "type": "object",
  12731. "properties": {
  12732. "type": {
  12733. "type": "string",
  12734. "const": "text"
  12735. },
  12736. "key": {
  12737. "type": "string"
  12738. },
  12739. "message": {
  12740. "type": "string"
  12741. },
  12742. "placeholder": {
  12743. "type": "string"
  12744. },
  12745. "when": {
  12746. "type": "object",
  12747. "properties": {
  12748. "key": {
  12749. "type": "string"
  12750. },
  12751. "op": {
  12752. "type": "string",
  12753. "enum": ["eq", "neq"]
  12754. },
  12755. "value": {
  12756. "type": "string"
  12757. }
  12758. },
  12759. "required": ["key", "op", "value"]
  12760. }
  12761. },
  12762. "required": ["type", "key", "message"]
  12763. },
  12764. {
  12765. "type": "object",
  12766. "properties": {
  12767. "type": {
  12768. "type": "string",
  12769. "const": "select"
  12770. },
  12771. "key": {
  12772. "type": "string"
  12773. },
  12774. "message": {
  12775. "type": "string"
  12776. },
  12777. "options": {
  12778. "type": "array",
  12779. "items": {
  12780. "type": "object",
  12781. "properties": {
  12782. "label": {
  12783. "type": "string"
  12784. },
  12785. "value": {
  12786. "type": "string"
  12787. },
  12788. "hint": {
  12789. "type": "string"
  12790. }
  12791. },
  12792. "required": ["label", "value"]
  12793. }
  12794. },
  12795. "when": {
  12796. "type": "object",
  12797. "properties": {
  12798. "key": {
  12799. "type": "string"
  12800. },
  12801. "op": {
  12802. "type": "string",
  12803. "enum": ["eq", "neq"]
  12804. },
  12805. "value": {
  12806. "type": "string"
  12807. }
  12808. },
  12809. "required": ["key", "op", "value"]
  12810. }
  12811. },
  12812. "required": ["type", "key", "message", "options"]
  12813. }
  12814. ]
  12815. }
  12816. }
  12817. },
  12818. "required": ["type", "label"]
  12819. },
  12820. "ProviderAuthAuthorization": {
  12821. "type": "object",
  12822. "properties": {
  12823. "url": {
  12824. "type": "string"
  12825. },
  12826. "method": {
  12827. "type": "string",
  12828. "enum": ["auto", "code"]
  12829. },
  12830. "instructions": {
  12831. "type": "string"
  12832. }
  12833. },
  12834. "required": ["url", "method", "instructions"]
  12835. },
  12836. "Symbol": {
  12837. "type": "object",
  12838. "properties": {
  12839. "name": {
  12840. "type": "string"
  12841. },
  12842. "kind": {
  12843. "type": "number"
  12844. },
  12845. "location": {
  12846. "type": "object",
  12847. "properties": {
  12848. "uri": {
  12849. "type": "string"
  12850. },
  12851. "range": {
  12852. "$ref": "#/components/schemas/Range"
  12853. }
  12854. },
  12855. "required": ["uri", "range"]
  12856. }
  12857. },
  12858. "required": ["name", "kind", "location"]
  12859. },
  12860. "FileNode": {
  12861. "type": "object",
  12862. "properties": {
  12863. "name": {
  12864. "type": "string"
  12865. },
  12866. "path": {
  12867. "type": "string"
  12868. },
  12869. "absolute": {
  12870. "type": "string"
  12871. },
  12872. "type": {
  12873. "type": "string",
  12874. "enum": ["file", "directory"]
  12875. },
  12876. "ignored": {
  12877. "type": "boolean"
  12878. }
  12879. },
  12880. "required": ["name", "path", "absolute", "type", "ignored"]
  12881. },
  12882. "FileContent": {
  12883. "type": "object",
  12884. "properties": {
  12885. "type": {
  12886. "type": "string",
  12887. "enum": ["text", "binary"]
  12888. },
  12889. "content": {
  12890. "type": "string"
  12891. },
  12892. "diff": {
  12893. "type": "string"
  12894. },
  12895. "patch": {
  12896. "type": "object",
  12897. "properties": {
  12898. "oldFileName": {
  12899. "type": "string"
  12900. },
  12901. "newFileName": {
  12902. "type": "string"
  12903. },
  12904. "oldHeader": {
  12905. "type": "string"
  12906. },
  12907. "newHeader": {
  12908. "type": "string"
  12909. },
  12910. "hunks": {
  12911. "type": "array",
  12912. "items": {
  12913. "type": "object",
  12914. "properties": {
  12915. "oldStart": {
  12916. "type": "number"
  12917. },
  12918. "oldLines": {
  12919. "type": "number"
  12920. },
  12921. "newStart": {
  12922. "type": "number"
  12923. },
  12924. "newLines": {
  12925. "type": "number"
  12926. },
  12927. "lines": {
  12928. "type": "array",
  12929. "items": {
  12930. "type": "string"
  12931. }
  12932. }
  12933. },
  12934. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"]
  12935. }
  12936. },
  12937. "index": {
  12938. "type": "string"
  12939. }
  12940. },
  12941. "required": ["oldFileName", "newFileName", "hunks"]
  12942. },
  12943. "encoding": {
  12944. "type": "string",
  12945. "const": "base64"
  12946. },
  12947. "mimeType": {
  12948. "type": "string"
  12949. }
  12950. },
  12951. "required": ["type", "content"]
  12952. },
  12953. "File": {
  12954. "type": "object",
  12955. "properties": {
  12956. "path": {
  12957. "type": "string"
  12958. },
  12959. "added": {
  12960. "type": "integer",
  12961. "minimum": -9007199254740991,
  12962. "maximum": 9007199254740991
  12963. },
  12964. "removed": {
  12965. "type": "integer",
  12966. "minimum": -9007199254740991,
  12967. "maximum": 9007199254740991
  12968. },
  12969. "status": {
  12970. "type": "string",
  12971. "enum": ["added", "deleted", "modified"]
  12972. }
  12973. },
  12974. "required": ["path", "added", "removed", "status"]
  12975. },
  12976. "Event": {
  12977. "anyOf": [
  12978. {
  12979. "$ref": "#/components/schemas/Event.project.updated"
  12980. },
  12981. {
  12982. "$ref": "#/components/schemas/Event.server.instance.disposed"
  12983. },
  12984. {
  12985. "$ref": "#/components/schemas/Event.server.connected"
  12986. },
  12987. {
  12988. "$ref": "#/components/schemas/Event.global.disposed"
  12989. },
  12990. {
  12991. "$ref": "#/components/schemas/Event.file.edited"
  12992. },
  12993. {
  12994. "$ref": "#/components/schemas/Event.file.watcher.updated"
  12995. },
  12996. {
  12997. "$ref": "#/components/schemas/Event.lsp.client.diagnostics"
  12998. },
  12999. {
  13000. "$ref": "#/components/schemas/Event.lsp.updated"
  13001. },
  13002. {
  13003. "$ref": "#/components/schemas/Event.installation.updated"
  13004. },
  13005. {
  13006. "$ref": "#/components/schemas/Event.installation.update-available"
  13007. },
  13008. {
  13009. "$ref": "#/components/schemas/Event.message.part.delta"
  13010. },
  13011. {
  13012. "$ref": "#/components/schemas/Event.permission.asked"
  13013. },
  13014. {
  13015. "$ref": "#/components/schemas/Event.permission.replied"
  13016. },
  13017. {
  13018. "$ref": "#/components/schemas/Event.session.diff"
  13019. },
  13020. {
  13021. "$ref": "#/components/schemas/Event.session.error"
  13022. },
  13023. {
  13024. "$ref": "#/components/schemas/Event.question.asked"
  13025. },
  13026. {
  13027. "$ref": "#/components/schemas/Event.question.replied"
  13028. },
  13029. {
  13030. "$ref": "#/components/schemas/Event.question.rejected"
  13031. },
  13032. {
  13033. "$ref": "#/components/schemas/Event.todo.updated"
  13034. },
  13035. {
  13036. "$ref": "#/components/schemas/Event.session.status"
  13037. },
  13038. {
  13039. "$ref": "#/components/schemas/Event.session.idle"
  13040. },
  13041. {
  13042. "$ref": "#/components/schemas/Event.session.compacted"
  13043. },
  13044. {
  13045. "$ref": "#/components/schemas/Event.tui.prompt.append"
  13046. },
  13047. {
  13048. "$ref": "#/components/schemas/Event.tui.command.execute"
  13049. },
  13050. {
  13051. "$ref": "#/components/schemas/Event.tui.toast.show"
  13052. },
  13053. {
  13054. "$ref": "#/components/schemas/Event.tui.session.select"
  13055. },
  13056. {
  13057. "$ref": "#/components/schemas/Event.mcp.tools.changed"
  13058. },
  13059. {
  13060. "$ref": "#/components/schemas/Event.mcp.browser.open.failed"
  13061. },
  13062. {
  13063. "$ref": "#/components/schemas/Event.command.executed"
  13064. },
  13065. {
  13066. "$ref": "#/components/schemas/Event.vcs.branch.updated"
  13067. },
  13068. {
  13069. "$ref": "#/components/schemas/Event.worktree.ready"
  13070. },
  13071. {
  13072. "$ref": "#/components/schemas/Event.worktree.failed"
  13073. },
  13074. {
  13075. "$ref": "#/components/schemas/Event.pty.created"
  13076. },
  13077. {
  13078. "$ref": "#/components/schemas/Event.pty.updated"
  13079. },
  13080. {
  13081. "$ref": "#/components/schemas/Event.pty.exited"
  13082. },
  13083. {
  13084. "$ref": "#/components/schemas/Event.pty.deleted"
  13085. },
  13086. {
  13087. "$ref": "#/components/schemas/Event.workspace.ready"
  13088. },
  13089. {
  13090. "$ref": "#/components/schemas/Event.workspace.failed"
  13091. },
  13092. {
  13093. "$ref": "#/components/schemas/Event.workspace.restore"
  13094. },
  13095. {
  13096. "$ref": "#/components/schemas/Event.workspace.status"
  13097. },
  13098. {
  13099. "$ref": "#/components/schemas/Event.message.updated"
  13100. },
  13101. {
  13102. "$ref": "#/components/schemas/Event.message.removed"
  13103. },
  13104. {
  13105. "$ref": "#/components/schemas/Event.message.part.updated"
  13106. },
  13107. {
  13108. "$ref": "#/components/schemas/Event.message.part.removed"
  13109. },
  13110. {
  13111. "$ref": "#/components/schemas/Event.session.created"
  13112. },
  13113. {
  13114. "$ref": "#/components/schemas/Event.session.updated"
  13115. },
  13116. {
  13117. "$ref": "#/components/schemas/Event.session.deleted"
  13118. }
  13119. ]
  13120. },
  13121. "MCPStatusConnected": {
  13122. "type": "object",
  13123. "properties": {
  13124. "status": {
  13125. "type": "string",
  13126. "const": "connected"
  13127. }
  13128. },
  13129. "required": ["status"]
  13130. },
  13131. "MCPStatusDisabled": {
  13132. "type": "object",
  13133. "properties": {
  13134. "status": {
  13135. "type": "string",
  13136. "const": "disabled"
  13137. }
  13138. },
  13139. "required": ["status"]
  13140. },
  13141. "MCPStatusFailed": {
  13142. "type": "object",
  13143. "properties": {
  13144. "status": {
  13145. "type": "string",
  13146. "const": "failed"
  13147. },
  13148. "error": {
  13149. "type": "string"
  13150. }
  13151. },
  13152. "required": ["status", "error"]
  13153. },
  13154. "MCPStatusNeedsAuth": {
  13155. "type": "object",
  13156. "properties": {
  13157. "status": {
  13158. "type": "string",
  13159. "const": "needs_auth"
  13160. }
  13161. },
  13162. "required": ["status"]
  13163. },
  13164. "MCPStatusNeedsClientRegistration": {
  13165. "type": "object",
  13166. "properties": {
  13167. "status": {
  13168. "type": "string",
  13169. "const": "needs_client_registration"
  13170. },
  13171. "error": {
  13172. "type": "string"
  13173. }
  13174. },
  13175. "required": ["status", "error"]
  13176. },
  13177. "MCPStatus": {
  13178. "anyOf": [
  13179. {
  13180. "$ref": "#/components/schemas/MCPStatusConnected"
  13181. },
  13182. {
  13183. "$ref": "#/components/schemas/MCPStatusDisabled"
  13184. },
  13185. {
  13186. "$ref": "#/components/schemas/MCPStatusFailed"
  13187. },
  13188. {
  13189. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  13190. },
  13191. {
  13192. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  13193. }
  13194. ]
  13195. },
  13196. "Path": {
  13197. "type": "object",
  13198. "properties": {
  13199. "home": {
  13200. "type": "string"
  13201. },
  13202. "state": {
  13203. "type": "string"
  13204. },
  13205. "config": {
  13206. "type": "string"
  13207. },
  13208. "worktree": {
  13209. "type": "string"
  13210. },
  13211. "directory": {
  13212. "type": "string"
  13213. }
  13214. },
  13215. "required": ["home", "state", "config", "worktree", "directory"]
  13216. },
  13217. "VcsInfo": {
  13218. "type": "object",
  13219. "properties": {
  13220. "branch": {
  13221. "type": "string"
  13222. },
  13223. "default_branch": {
  13224. "type": "string"
  13225. }
  13226. }
  13227. },
  13228. "VcsFileDiff": {
  13229. "type": "object",
  13230. "properties": {
  13231. "file": {
  13232. "type": "string"
  13233. },
  13234. "patch": {
  13235. "type": "string"
  13236. },
  13237. "additions": {
  13238. "type": "number"
  13239. },
  13240. "deletions": {
  13241. "type": "number"
  13242. },
  13243. "status": {
  13244. "type": "string",
  13245. "enum": ["added", "deleted", "modified"]
  13246. }
  13247. },
  13248. "required": ["file", "patch", "additions", "deletions"]
  13249. },
  13250. "Command": {
  13251. "type": "object",
  13252. "properties": {
  13253. "name": {
  13254. "type": "string"
  13255. },
  13256. "description": {
  13257. "type": "string"
  13258. },
  13259. "agent": {
  13260. "type": "string"
  13261. },
  13262. "model": {
  13263. "type": "string"
  13264. },
  13265. "source": {
  13266. "type": "string",
  13267. "enum": ["command", "mcp", "skill"]
  13268. },
  13269. "template": {
  13270. "anyOf": [
  13271. {
  13272. "type": "string"
  13273. },
  13274. {
  13275. "type": "string"
  13276. }
  13277. ]
  13278. },
  13279. "subtask": {
  13280. "type": "boolean"
  13281. },
  13282. "hints": {
  13283. "type": "array",
  13284. "items": {
  13285. "type": "string"
  13286. }
  13287. }
  13288. },
  13289. "required": ["name", "template", "hints"]
  13290. },
  13291. "Agent": {
  13292. "type": "object",
  13293. "properties": {
  13294. "name": {
  13295. "type": "string"
  13296. },
  13297. "description": {
  13298. "type": "string"
  13299. },
  13300. "mode": {
  13301. "type": "string",
  13302. "enum": ["subagent", "primary", "all"]
  13303. },
  13304. "native": {
  13305. "type": "boolean"
  13306. },
  13307. "hidden": {
  13308. "type": "boolean"
  13309. },
  13310. "topP": {
  13311. "type": "number"
  13312. },
  13313. "temperature": {
  13314. "type": "number"
  13315. },
  13316. "color": {
  13317. "type": "string"
  13318. },
  13319. "permission": {
  13320. "$ref": "#/components/schemas/PermissionRuleset"
  13321. },
  13322. "model": {
  13323. "type": "object",
  13324. "properties": {
  13325. "modelID": {
  13326. "type": "string"
  13327. },
  13328. "providerID": {
  13329. "type": "string"
  13330. }
  13331. },
  13332. "required": ["modelID", "providerID"]
  13333. },
  13334. "variant": {
  13335. "type": "string"
  13336. },
  13337. "prompt": {
  13338. "type": "string"
  13339. },
  13340. "options": {
  13341. "type": "object",
  13342. "propertyNames": {
  13343. "type": "string"
  13344. },
  13345. "additionalProperties": {}
  13346. },
  13347. "steps": {
  13348. "type": "integer",
  13349. "exclusiveMinimum": 0,
  13350. "maximum": 9007199254740991
  13351. }
  13352. },
  13353. "required": ["name", "mode", "permission", "options"]
  13354. },
  13355. "LSPStatus": {
  13356. "type": "object",
  13357. "properties": {
  13358. "id": {
  13359. "type": "string"
  13360. },
  13361. "name": {
  13362. "type": "string"
  13363. },
  13364. "root": {
  13365. "type": "string"
  13366. },
  13367. "status": {
  13368. "anyOf": [
  13369. {
  13370. "type": "string",
  13371. "const": "connected"
  13372. },
  13373. {
  13374. "type": "string",
  13375. "const": "error"
  13376. }
  13377. ]
  13378. }
  13379. },
  13380. "required": ["id", "name", "root", "status"]
  13381. },
  13382. "FormatterStatus": {
  13383. "type": "object",
  13384. "properties": {
  13385. "name": {
  13386. "type": "string"
  13387. },
  13388. "extensions": {
  13389. "type": "array",
  13390. "items": {
  13391. "type": "string"
  13392. }
  13393. },
  13394. "enabled": {
  13395. "type": "boolean"
  13396. }
  13397. },
  13398. "required": ["name", "extensions", "enabled"]
  13399. }
  13400. }
  13401. }
  13402. }