openapi.json 363 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417
  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. "anyOf": [
  4178. {
  4179. "type": "object",
  4180. "properties": {
  4181. "id": {
  4182. "type": "string",
  4183. "pattern": "^prt.*"
  4184. },
  4185. "type": {
  4186. "type": "string",
  4187. "const": "file"
  4188. },
  4189. "mime": {
  4190. "type": "string"
  4191. },
  4192. "filename": {
  4193. "type": "string"
  4194. },
  4195. "url": {
  4196. "type": "string"
  4197. },
  4198. "source": {
  4199. "$ref": "#/components/schemas/FilePartSource"
  4200. }
  4201. },
  4202. "required": ["type", "mime", "url"]
  4203. }
  4204. ]
  4205. }
  4206. }
  4207. },
  4208. "required": ["arguments", "command"]
  4209. }
  4210. }
  4211. }
  4212. },
  4213. "x-codeSamples": [
  4214. {
  4215. "lang": "js",
  4216. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  4217. }
  4218. ]
  4219. }
  4220. },
  4221. "/session/{sessionID}/shell": {
  4222. "post": {
  4223. "operationId": "session.shell",
  4224. "parameters": [
  4225. {
  4226. "in": "query",
  4227. "name": "directory",
  4228. "schema": {
  4229. "type": "string"
  4230. }
  4231. },
  4232. {
  4233. "in": "query",
  4234. "name": "workspace",
  4235. "schema": {
  4236. "type": "string"
  4237. }
  4238. },
  4239. {
  4240. "in": "path",
  4241. "name": "sessionID",
  4242. "schema": {
  4243. "type": "string",
  4244. "pattern": "^ses.*"
  4245. },
  4246. "required": true
  4247. }
  4248. ],
  4249. "summary": "Run shell command",
  4250. "description": "Execute a shell command within the session context and return the AI's response.",
  4251. "responses": {
  4252. "200": {
  4253. "description": "Created message",
  4254. "content": {
  4255. "application/json": {
  4256. "schema": {
  4257. "type": "object",
  4258. "properties": {
  4259. "info": {
  4260. "$ref": "#/components/schemas/Message"
  4261. },
  4262. "parts": {
  4263. "type": "array",
  4264. "items": {
  4265. "$ref": "#/components/schemas/Part"
  4266. }
  4267. }
  4268. },
  4269. "required": ["info", "parts"]
  4270. }
  4271. }
  4272. }
  4273. },
  4274. "400": {
  4275. "description": "Bad request",
  4276. "content": {
  4277. "application/json": {
  4278. "schema": {
  4279. "$ref": "#/components/schemas/BadRequestError"
  4280. }
  4281. }
  4282. }
  4283. },
  4284. "404": {
  4285. "description": "Not found",
  4286. "content": {
  4287. "application/json": {
  4288. "schema": {
  4289. "$ref": "#/components/schemas/NotFoundError"
  4290. }
  4291. }
  4292. }
  4293. }
  4294. },
  4295. "requestBody": {
  4296. "content": {
  4297. "application/json": {
  4298. "schema": {
  4299. "type": "object",
  4300. "properties": {
  4301. "messageID": {
  4302. "type": "string",
  4303. "pattern": "^msg.*"
  4304. },
  4305. "agent": {
  4306. "type": "string"
  4307. },
  4308. "model": {
  4309. "type": "object",
  4310. "properties": {
  4311. "providerID": {
  4312. "type": "string"
  4313. },
  4314. "modelID": {
  4315. "type": "string"
  4316. }
  4317. },
  4318. "required": ["providerID", "modelID"]
  4319. },
  4320. "command": {
  4321. "type": "string"
  4322. }
  4323. },
  4324. "required": ["agent", "command"]
  4325. }
  4326. }
  4327. }
  4328. },
  4329. "x-codeSamples": [
  4330. {
  4331. "lang": "js",
  4332. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  4333. }
  4334. ]
  4335. }
  4336. },
  4337. "/session/{sessionID}/revert": {
  4338. "post": {
  4339. "operationId": "session.revert",
  4340. "parameters": [
  4341. {
  4342. "in": "query",
  4343. "name": "directory",
  4344. "schema": {
  4345. "type": "string"
  4346. }
  4347. },
  4348. {
  4349. "in": "query",
  4350. "name": "workspace",
  4351. "schema": {
  4352. "type": "string"
  4353. }
  4354. },
  4355. {
  4356. "in": "path",
  4357. "name": "sessionID",
  4358. "schema": {
  4359. "type": "string",
  4360. "pattern": "^ses.*"
  4361. },
  4362. "required": true
  4363. }
  4364. ],
  4365. "summary": "Revert message",
  4366. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  4367. "responses": {
  4368. "200": {
  4369. "description": "Updated session",
  4370. "content": {
  4371. "application/json": {
  4372. "schema": {
  4373. "$ref": "#/components/schemas/Session"
  4374. }
  4375. }
  4376. }
  4377. },
  4378. "400": {
  4379. "description": "Bad request",
  4380. "content": {
  4381. "application/json": {
  4382. "schema": {
  4383. "$ref": "#/components/schemas/BadRequestError"
  4384. }
  4385. }
  4386. }
  4387. },
  4388. "404": {
  4389. "description": "Not found",
  4390. "content": {
  4391. "application/json": {
  4392. "schema": {
  4393. "$ref": "#/components/schemas/NotFoundError"
  4394. }
  4395. }
  4396. }
  4397. }
  4398. },
  4399. "requestBody": {
  4400. "content": {
  4401. "application/json": {
  4402. "schema": {
  4403. "type": "object",
  4404. "properties": {
  4405. "messageID": {
  4406. "type": "string",
  4407. "pattern": "^msg.*"
  4408. },
  4409. "partID": {
  4410. "type": "string",
  4411. "pattern": "^prt.*"
  4412. }
  4413. },
  4414. "required": ["messageID"]
  4415. }
  4416. }
  4417. }
  4418. },
  4419. "x-codeSamples": [
  4420. {
  4421. "lang": "js",
  4422. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  4423. }
  4424. ]
  4425. }
  4426. },
  4427. "/session/{sessionID}/unrevert": {
  4428. "post": {
  4429. "operationId": "session.unrevert",
  4430. "parameters": [
  4431. {
  4432. "in": "query",
  4433. "name": "directory",
  4434. "schema": {
  4435. "type": "string"
  4436. }
  4437. },
  4438. {
  4439. "in": "query",
  4440. "name": "workspace",
  4441. "schema": {
  4442. "type": "string"
  4443. }
  4444. },
  4445. {
  4446. "in": "path",
  4447. "name": "sessionID",
  4448. "schema": {
  4449. "type": "string",
  4450. "pattern": "^ses.*"
  4451. },
  4452. "required": true
  4453. }
  4454. ],
  4455. "summary": "Restore reverted messages",
  4456. "description": "Restore all previously reverted messages in a session.",
  4457. "responses": {
  4458. "200": {
  4459. "description": "Updated session",
  4460. "content": {
  4461. "application/json": {
  4462. "schema": {
  4463. "$ref": "#/components/schemas/Session"
  4464. }
  4465. }
  4466. }
  4467. },
  4468. "400": {
  4469. "description": "Bad request",
  4470. "content": {
  4471. "application/json": {
  4472. "schema": {
  4473. "$ref": "#/components/schemas/BadRequestError"
  4474. }
  4475. }
  4476. }
  4477. },
  4478. "404": {
  4479. "description": "Not found",
  4480. "content": {
  4481. "application/json": {
  4482. "schema": {
  4483. "$ref": "#/components/schemas/NotFoundError"
  4484. }
  4485. }
  4486. }
  4487. }
  4488. },
  4489. "x-codeSamples": [
  4490. {
  4491. "lang": "js",
  4492. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  4493. }
  4494. ]
  4495. }
  4496. },
  4497. "/session/{sessionID}/permissions/{permissionID}": {
  4498. "post": {
  4499. "operationId": "permission.respond",
  4500. "parameters": [
  4501. {
  4502. "in": "query",
  4503. "name": "directory",
  4504. "schema": {
  4505. "type": "string"
  4506. }
  4507. },
  4508. {
  4509. "in": "query",
  4510. "name": "workspace",
  4511. "schema": {
  4512. "type": "string"
  4513. }
  4514. },
  4515. {
  4516. "in": "path",
  4517. "name": "sessionID",
  4518. "schema": {
  4519. "type": "string",
  4520. "pattern": "^ses.*"
  4521. },
  4522. "required": true
  4523. },
  4524. {
  4525. "in": "path",
  4526. "name": "permissionID",
  4527. "schema": {
  4528. "type": "string",
  4529. "pattern": "^per.*"
  4530. },
  4531. "required": true
  4532. }
  4533. ],
  4534. "summary": "Respond to permission",
  4535. "deprecated": true,
  4536. "description": "Approve or deny a permission request from the AI assistant.",
  4537. "responses": {
  4538. "200": {
  4539. "description": "Permission processed successfully",
  4540. "content": {
  4541. "application/json": {
  4542. "schema": {
  4543. "type": "boolean"
  4544. }
  4545. }
  4546. }
  4547. },
  4548. "400": {
  4549. "description": "Bad request",
  4550. "content": {
  4551. "application/json": {
  4552. "schema": {
  4553. "$ref": "#/components/schemas/BadRequestError"
  4554. }
  4555. }
  4556. }
  4557. },
  4558. "404": {
  4559. "description": "Not found",
  4560. "content": {
  4561. "application/json": {
  4562. "schema": {
  4563. "$ref": "#/components/schemas/NotFoundError"
  4564. }
  4565. }
  4566. }
  4567. }
  4568. },
  4569. "requestBody": {
  4570. "content": {
  4571. "application/json": {
  4572. "schema": {
  4573. "type": "object",
  4574. "properties": {
  4575. "response": {
  4576. "type": "string",
  4577. "enum": ["once", "always", "reject"]
  4578. }
  4579. },
  4580. "required": ["response"]
  4581. }
  4582. }
  4583. }
  4584. },
  4585. "x-codeSamples": [
  4586. {
  4587. "lang": "js",
  4588. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  4589. }
  4590. ]
  4591. }
  4592. },
  4593. "/permission/{requestID}/reply": {
  4594. "post": {
  4595. "operationId": "permission.reply",
  4596. "parameters": [
  4597. {
  4598. "in": "query",
  4599. "name": "directory",
  4600. "schema": {
  4601. "type": "string"
  4602. }
  4603. },
  4604. {
  4605. "in": "query",
  4606. "name": "workspace",
  4607. "schema": {
  4608. "type": "string"
  4609. }
  4610. },
  4611. {
  4612. "in": "path",
  4613. "name": "requestID",
  4614. "schema": {
  4615. "type": "string",
  4616. "pattern": "^per.*"
  4617. },
  4618. "required": true
  4619. }
  4620. ],
  4621. "summary": "Respond to permission request",
  4622. "description": "Approve or deny a permission request from the AI assistant.",
  4623. "responses": {
  4624. "200": {
  4625. "description": "Permission processed successfully",
  4626. "content": {
  4627. "application/json": {
  4628. "schema": {
  4629. "type": "boolean"
  4630. }
  4631. }
  4632. }
  4633. },
  4634. "400": {
  4635. "description": "Bad request",
  4636. "content": {
  4637. "application/json": {
  4638. "schema": {
  4639. "$ref": "#/components/schemas/BadRequestError"
  4640. }
  4641. }
  4642. }
  4643. },
  4644. "404": {
  4645. "description": "Not found",
  4646. "content": {
  4647. "application/json": {
  4648. "schema": {
  4649. "$ref": "#/components/schemas/NotFoundError"
  4650. }
  4651. }
  4652. }
  4653. }
  4654. },
  4655. "requestBody": {
  4656. "content": {
  4657. "application/json": {
  4658. "schema": {
  4659. "type": "object",
  4660. "properties": {
  4661. "reply": {
  4662. "type": "string",
  4663. "enum": ["once", "always", "reject"]
  4664. },
  4665. "message": {
  4666. "type": "string"
  4667. }
  4668. },
  4669. "required": ["reply"]
  4670. }
  4671. }
  4672. }
  4673. },
  4674. "x-codeSamples": [
  4675. {
  4676. "lang": "js",
  4677. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
  4678. }
  4679. ]
  4680. }
  4681. },
  4682. "/permission": {
  4683. "get": {
  4684. "operationId": "permission.list",
  4685. "parameters": [
  4686. {
  4687. "in": "query",
  4688. "name": "directory",
  4689. "schema": {
  4690. "type": "string"
  4691. }
  4692. },
  4693. {
  4694. "in": "query",
  4695. "name": "workspace",
  4696. "schema": {
  4697. "type": "string"
  4698. }
  4699. }
  4700. ],
  4701. "summary": "List pending permissions",
  4702. "description": "Get all pending permission requests across all sessions.",
  4703. "responses": {
  4704. "200": {
  4705. "description": "List of pending permissions",
  4706. "content": {
  4707. "application/json": {
  4708. "schema": {
  4709. "type": "array",
  4710. "items": {
  4711. "$ref": "#/components/schemas/PermissionRequest"
  4712. }
  4713. }
  4714. }
  4715. }
  4716. }
  4717. },
  4718. "x-codeSamples": [
  4719. {
  4720. "lang": "js",
  4721. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
  4722. }
  4723. ]
  4724. }
  4725. },
  4726. "/question": {
  4727. "get": {
  4728. "operationId": "question.list",
  4729. "parameters": [
  4730. {
  4731. "in": "query",
  4732. "name": "directory",
  4733. "schema": {
  4734. "type": "string"
  4735. }
  4736. },
  4737. {
  4738. "in": "query",
  4739. "name": "workspace",
  4740. "schema": {
  4741. "type": "string"
  4742. }
  4743. }
  4744. ],
  4745. "summary": "List pending questions",
  4746. "description": "Get all pending question requests across all sessions.",
  4747. "responses": {
  4748. "200": {
  4749. "description": "List of pending questions",
  4750. "content": {
  4751. "application/json": {
  4752. "schema": {
  4753. "type": "array",
  4754. "items": {
  4755. "$ref": "#/components/schemas/QuestionRequest"
  4756. }
  4757. }
  4758. }
  4759. }
  4760. }
  4761. },
  4762. "x-codeSamples": [
  4763. {
  4764. "lang": "js",
  4765. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
  4766. }
  4767. ]
  4768. }
  4769. },
  4770. "/question/{requestID}/reply": {
  4771. "post": {
  4772. "operationId": "question.reply",
  4773. "parameters": [
  4774. {
  4775. "in": "query",
  4776. "name": "directory",
  4777. "schema": {
  4778. "type": "string"
  4779. }
  4780. },
  4781. {
  4782. "in": "query",
  4783. "name": "workspace",
  4784. "schema": {
  4785. "type": "string"
  4786. }
  4787. },
  4788. {
  4789. "in": "path",
  4790. "name": "requestID",
  4791. "schema": {
  4792. "type": "string",
  4793. "pattern": "^que.*"
  4794. },
  4795. "required": true
  4796. }
  4797. ],
  4798. "summary": "Reply to question request",
  4799. "description": "Provide answers to a question request from the AI assistant.",
  4800. "responses": {
  4801. "200": {
  4802. "description": "Question answered successfully",
  4803. "content": {
  4804. "application/json": {
  4805. "schema": {
  4806. "type": "boolean"
  4807. }
  4808. }
  4809. }
  4810. },
  4811. "400": {
  4812. "description": "Bad request",
  4813. "content": {
  4814. "application/json": {
  4815. "schema": {
  4816. "$ref": "#/components/schemas/BadRequestError"
  4817. }
  4818. }
  4819. }
  4820. },
  4821. "404": {
  4822. "description": "Not found",
  4823. "content": {
  4824. "application/json": {
  4825. "schema": {
  4826. "$ref": "#/components/schemas/NotFoundError"
  4827. }
  4828. }
  4829. }
  4830. }
  4831. },
  4832. "requestBody": {
  4833. "content": {
  4834. "application/json": {
  4835. "schema": {
  4836. "type": "object",
  4837. "properties": {
  4838. "answers": {
  4839. "description": "User answers in order of questions (each answer is an array of selected labels)",
  4840. "type": "array",
  4841. "items": {
  4842. "$ref": "#/components/schemas/QuestionAnswer"
  4843. }
  4844. }
  4845. },
  4846. "required": ["answers"]
  4847. }
  4848. }
  4849. }
  4850. },
  4851. "x-codeSamples": [
  4852. {
  4853. "lang": "js",
  4854. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
  4855. }
  4856. ]
  4857. }
  4858. },
  4859. "/question/{requestID}/reject": {
  4860. "post": {
  4861. "operationId": "question.reject",
  4862. "parameters": [
  4863. {
  4864. "in": "query",
  4865. "name": "directory",
  4866. "schema": {
  4867. "type": "string"
  4868. }
  4869. },
  4870. {
  4871. "in": "query",
  4872. "name": "workspace",
  4873. "schema": {
  4874. "type": "string"
  4875. }
  4876. },
  4877. {
  4878. "in": "path",
  4879. "name": "requestID",
  4880. "schema": {
  4881. "type": "string",
  4882. "pattern": "^que.*"
  4883. },
  4884. "required": true
  4885. }
  4886. ],
  4887. "summary": "Reject question request",
  4888. "description": "Reject a question request from the AI assistant.",
  4889. "responses": {
  4890. "200": {
  4891. "description": "Question rejected successfully",
  4892. "content": {
  4893. "application/json": {
  4894. "schema": {
  4895. "type": "boolean"
  4896. }
  4897. }
  4898. }
  4899. },
  4900. "400": {
  4901. "description": "Bad request",
  4902. "content": {
  4903. "application/json": {
  4904. "schema": {
  4905. "$ref": "#/components/schemas/BadRequestError"
  4906. }
  4907. }
  4908. }
  4909. },
  4910. "404": {
  4911. "description": "Not found",
  4912. "content": {
  4913. "application/json": {
  4914. "schema": {
  4915. "$ref": "#/components/schemas/NotFoundError"
  4916. }
  4917. }
  4918. }
  4919. }
  4920. },
  4921. "x-codeSamples": [
  4922. {
  4923. "lang": "js",
  4924. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
  4925. }
  4926. ]
  4927. }
  4928. },
  4929. "/provider": {
  4930. "get": {
  4931. "operationId": "provider.list",
  4932. "parameters": [
  4933. {
  4934. "in": "query",
  4935. "name": "directory",
  4936. "schema": {
  4937. "type": "string"
  4938. }
  4939. },
  4940. {
  4941. "in": "query",
  4942. "name": "workspace",
  4943. "schema": {
  4944. "type": "string"
  4945. }
  4946. }
  4947. ],
  4948. "summary": "List providers",
  4949. "description": "Get a list of all available AI providers, including both available and connected ones.",
  4950. "responses": {
  4951. "200": {
  4952. "description": "List of providers",
  4953. "content": {
  4954. "application/json": {
  4955. "schema": {
  4956. "type": "object",
  4957. "properties": {
  4958. "all": {
  4959. "type": "array",
  4960. "items": {
  4961. "$ref": "#/components/schemas/Provider"
  4962. }
  4963. },
  4964. "default": {
  4965. "type": "object",
  4966. "propertyNames": {
  4967. "type": "string"
  4968. },
  4969. "additionalProperties": {
  4970. "type": "string"
  4971. }
  4972. },
  4973. "connected": {
  4974. "type": "array",
  4975. "items": {
  4976. "type": "string"
  4977. }
  4978. }
  4979. },
  4980. "required": ["all", "default", "connected"]
  4981. }
  4982. }
  4983. }
  4984. }
  4985. },
  4986. "x-codeSamples": [
  4987. {
  4988. "lang": "js",
  4989. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  4990. }
  4991. ]
  4992. }
  4993. },
  4994. "/provider/auth": {
  4995. "get": {
  4996. "operationId": "provider.auth",
  4997. "parameters": [
  4998. {
  4999. "in": "query",
  5000. "name": "directory",
  5001. "schema": {
  5002. "type": "string"
  5003. }
  5004. },
  5005. {
  5006. "in": "query",
  5007. "name": "workspace",
  5008. "schema": {
  5009. "type": "string"
  5010. }
  5011. }
  5012. ],
  5013. "summary": "Get provider auth methods",
  5014. "description": "Retrieve available authentication methods for all AI providers.",
  5015. "responses": {
  5016. "200": {
  5017. "description": "Provider auth methods",
  5018. "content": {
  5019. "application/json": {
  5020. "schema": {
  5021. "type": "object",
  5022. "propertyNames": {
  5023. "type": "string"
  5024. },
  5025. "additionalProperties": {
  5026. "type": "array",
  5027. "items": {
  5028. "$ref": "#/components/schemas/ProviderAuthMethod"
  5029. }
  5030. }
  5031. }
  5032. }
  5033. }
  5034. }
  5035. },
  5036. "x-codeSamples": [
  5037. {
  5038. "lang": "js",
  5039. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  5040. }
  5041. ]
  5042. }
  5043. },
  5044. "/provider/{providerID}/oauth/authorize": {
  5045. "post": {
  5046. "operationId": "provider.oauth.authorize",
  5047. "parameters": [
  5048. {
  5049. "in": "query",
  5050. "name": "directory",
  5051. "schema": {
  5052. "type": "string"
  5053. }
  5054. },
  5055. {
  5056. "in": "query",
  5057. "name": "workspace",
  5058. "schema": {
  5059. "type": "string"
  5060. }
  5061. },
  5062. {
  5063. "in": "path",
  5064. "name": "providerID",
  5065. "schema": {
  5066. "type": "string"
  5067. },
  5068. "required": true,
  5069. "description": "Provider ID"
  5070. }
  5071. ],
  5072. "summary": "OAuth authorize",
  5073. "description": "Initiate OAuth authorization for a specific AI provider to get an authorization URL.",
  5074. "responses": {
  5075. "200": {
  5076. "description": "Authorization URL and method",
  5077. "content": {
  5078. "application/json": {
  5079. "schema": {
  5080. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  5081. }
  5082. }
  5083. }
  5084. },
  5085. "400": {
  5086. "description": "Bad request",
  5087. "content": {
  5088. "application/json": {
  5089. "schema": {
  5090. "$ref": "#/components/schemas/BadRequestError"
  5091. }
  5092. }
  5093. }
  5094. }
  5095. },
  5096. "requestBody": {
  5097. "content": {
  5098. "application/json": {
  5099. "schema": {
  5100. "type": "object",
  5101. "properties": {
  5102. "method": {
  5103. "description": "Auth method index",
  5104. "type": "number"
  5105. },
  5106. "inputs": {
  5107. "description": "Prompt inputs",
  5108. "type": "object",
  5109. "propertyNames": {
  5110. "type": "string"
  5111. },
  5112. "additionalProperties": {
  5113. "type": "string"
  5114. }
  5115. }
  5116. },
  5117. "required": ["method"]
  5118. }
  5119. }
  5120. }
  5121. },
  5122. "x-codeSamples": [
  5123. {
  5124. "lang": "js",
  5125. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  5126. }
  5127. ]
  5128. }
  5129. },
  5130. "/provider/{providerID}/oauth/callback": {
  5131. "post": {
  5132. "operationId": "provider.oauth.callback",
  5133. "parameters": [
  5134. {
  5135. "in": "query",
  5136. "name": "directory",
  5137. "schema": {
  5138. "type": "string"
  5139. }
  5140. },
  5141. {
  5142. "in": "query",
  5143. "name": "workspace",
  5144. "schema": {
  5145. "type": "string"
  5146. }
  5147. },
  5148. {
  5149. "in": "path",
  5150. "name": "providerID",
  5151. "schema": {
  5152. "type": "string"
  5153. },
  5154. "required": true,
  5155. "description": "Provider ID"
  5156. }
  5157. ],
  5158. "summary": "OAuth callback",
  5159. "description": "Handle the OAuth callback from a provider after user authorization.",
  5160. "responses": {
  5161. "200": {
  5162. "description": "OAuth callback processed successfully",
  5163. "content": {
  5164. "application/json": {
  5165. "schema": {
  5166. "type": "boolean"
  5167. }
  5168. }
  5169. }
  5170. },
  5171. "400": {
  5172. "description": "Bad request",
  5173. "content": {
  5174. "application/json": {
  5175. "schema": {
  5176. "$ref": "#/components/schemas/BadRequestError"
  5177. }
  5178. }
  5179. }
  5180. }
  5181. },
  5182. "requestBody": {
  5183. "content": {
  5184. "application/json": {
  5185. "schema": {
  5186. "type": "object",
  5187. "properties": {
  5188. "method": {
  5189. "description": "Auth method index",
  5190. "type": "number"
  5191. },
  5192. "code": {
  5193. "description": "OAuth authorization code",
  5194. "type": "string"
  5195. }
  5196. },
  5197. "required": ["method"]
  5198. }
  5199. }
  5200. }
  5201. },
  5202. "x-codeSamples": [
  5203. {
  5204. "lang": "js",
  5205. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  5206. }
  5207. ]
  5208. }
  5209. },
  5210. "/sync/start": {
  5211. "post": {
  5212. "operationId": "sync.start",
  5213. "parameters": [
  5214. {
  5215. "in": "query",
  5216. "name": "directory",
  5217. "schema": {
  5218. "type": "string"
  5219. }
  5220. },
  5221. {
  5222. "in": "query",
  5223. "name": "workspace",
  5224. "schema": {
  5225. "type": "string"
  5226. }
  5227. }
  5228. ],
  5229. "summary": "Start workspace sync",
  5230. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  5231. "responses": {
  5232. "200": {
  5233. "description": "Workspace sync started",
  5234. "content": {
  5235. "application/json": {
  5236. "schema": {
  5237. "type": "boolean"
  5238. }
  5239. }
  5240. }
  5241. }
  5242. },
  5243. "x-codeSamples": [
  5244. {
  5245. "lang": "js",
  5246. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  5247. }
  5248. ]
  5249. }
  5250. },
  5251. "/sync/replay": {
  5252. "post": {
  5253. "operationId": "sync.replay",
  5254. "parameters": [
  5255. {
  5256. "in": "query",
  5257. "name": "directory",
  5258. "schema": {
  5259. "type": "string"
  5260. }
  5261. },
  5262. {
  5263. "in": "query",
  5264. "name": "workspace",
  5265. "schema": {
  5266. "type": "string"
  5267. }
  5268. }
  5269. ],
  5270. "summary": "Replay sync events",
  5271. "description": "Validate and replay a complete sync event history.",
  5272. "responses": {
  5273. "200": {
  5274. "description": "Replayed sync events",
  5275. "content": {
  5276. "application/json": {
  5277. "schema": {
  5278. "type": "object",
  5279. "properties": {
  5280. "sessionID": {
  5281. "type": "string"
  5282. }
  5283. },
  5284. "required": ["sessionID"]
  5285. }
  5286. }
  5287. }
  5288. },
  5289. "400": {
  5290. "description": "Bad request",
  5291. "content": {
  5292. "application/json": {
  5293. "schema": {
  5294. "$ref": "#/components/schemas/BadRequestError"
  5295. }
  5296. }
  5297. }
  5298. }
  5299. },
  5300. "requestBody": {
  5301. "content": {
  5302. "application/json": {
  5303. "schema": {
  5304. "type": "object",
  5305. "properties": {
  5306. "directory": {
  5307. "type": "string"
  5308. },
  5309. "events": {
  5310. "minItems": 1,
  5311. "type": "array",
  5312. "items": {
  5313. "type": "object",
  5314. "properties": {
  5315. "id": {
  5316. "type": "string"
  5317. },
  5318. "aggregateID": {
  5319. "type": "string"
  5320. },
  5321. "seq": {
  5322. "type": "integer",
  5323. "minimum": 0,
  5324. "maximum": 9007199254740991
  5325. },
  5326. "type": {
  5327. "type": "string"
  5328. },
  5329. "data": {
  5330. "type": "object",
  5331. "propertyNames": {
  5332. "type": "string"
  5333. },
  5334. "additionalProperties": {}
  5335. }
  5336. },
  5337. "required": ["id", "aggregateID", "seq", "type", "data"]
  5338. }
  5339. }
  5340. },
  5341. "required": ["directory", "events"]
  5342. }
  5343. }
  5344. }
  5345. },
  5346. "x-codeSamples": [
  5347. {
  5348. "lang": "js",
  5349. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  5350. }
  5351. ]
  5352. }
  5353. },
  5354. "/sync/history": {
  5355. "post": {
  5356. "operationId": "sync.history.list",
  5357. "parameters": [
  5358. {
  5359. "in": "query",
  5360. "name": "directory",
  5361. "schema": {
  5362. "type": "string"
  5363. }
  5364. },
  5365. {
  5366. "in": "query",
  5367. "name": "workspace",
  5368. "schema": {
  5369. "type": "string"
  5370. }
  5371. }
  5372. ],
  5373. "summary": "List sync events",
  5374. "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.",
  5375. "responses": {
  5376. "200": {
  5377. "description": "Sync events",
  5378. "content": {
  5379. "application/json": {
  5380. "schema": {
  5381. "type": "array",
  5382. "items": {
  5383. "type": "object",
  5384. "properties": {
  5385. "id": {
  5386. "type": "string"
  5387. },
  5388. "aggregate_id": {
  5389. "type": "string"
  5390. },
  5391. "seq": {
  5392. "type": "number"
  5393. },
  5394. "type": {
  5395. "type": "string"
  5396. },
  5397. "data": {
  5398. "type": "object",
  5399. "propertyNames": {
  5400. "type": "string"
  5401. },
  5402. "additionalProperties": {}
  5403. }
  5404. },
  5405. "required": ["id", "aggregate_id", "seq", "type", "data"]
  5406. }
  5407. }
  5408. }
  5409. }
  5410. },
  5411. "400": {
  5412. "description": "Bad request",
  5413. "content": {
  5414. "application/json": {
  5415. "schema": {
  5416. "$ref": "#/components/schemas/BadRequestError"
  5417. }
  5418. }
  5419. }
  5420. }
  5421. },
  5422. "requestBody": {
  5423. "content": {
  5424. "application/json": {
  5425. "schema": {
  5426. "type": "object",
  5427. "propertyNames": {
  5428. "type": "string"
  5429. },
  5430. "additionalProperties": {
  5431. "type": "integer",
  5432. "minimum": 0,
  5433. "maximum": 9007199254740991
  5434. }
  5435. }
  5436. }
  5437. }
  5438. },
  5439. "x-codeSamples": [
  5440. {
  5441. "lang": "js",
  5442. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  5443. }
  5444. ]
  5445. }
  5446. },
  5447. "/find": {
  5448. "get": {
  5449. "operationId": "find.text",
  5450. "parameters": [
  5451. {
  5452. "in": "query",
  5453. "name": "directory",
  5454. "schema": {
  5455. "type": "string"
  5456. }
  5457. },
  5458. {
  5459. "in": "query",
  5460. "name": "workspace",
  5461. "schema": {
  5462. "type": "string"
  5463. }
  5464. },
  5465. {
  5466. "in": "query",
  5467. "name": "pattern",
  5468. "schema": {
  5469. "type": "string"
  5470. },
  5471. "required": true
  5472. }
  5473. ],
  5474. "summary": "Find text",
  5475. "description": "Search for text patterns across files in the project using ripgrep.",
  5476. "responses": {
  5477. "200": {
  5478. "description": "Matches",
  5479. "content": {
  5480. "application/json": {
  5481. "schema": {
  5482. "type": "array",
  5483. "items": {
  5484. "type": "object",
  5485. "properties": {
  5486. "path": {
  5487. "type": "object",
  5488. "properties": {
  5489. "text": {
  5490. "type": "string"
  5491. }
  5492. },
  5493. "required": ["text"]
  5494. },
  5495. "lines": {
  5496. "type": "object",
  5497. "properties": {
  5498. "text": {
  5499. "type": "string"
  5500. }
  5501. },
  5502. "required": ["text"]
  5503. },
  5504. "line_number": {
  5505. "type": "number"
  5506. },
  5507. "absolute_offset": {
  5508. "type": "number"
  5509. },
  5510. "submatches": {
  5511. "type": "array",
  5512. "items": {
  5513. "type": "object",
  5514. "properties": {
  5515. "match": {
  5516. "type": "object",
  5517. "properties": {
  5518. "text": {
  5519. "type": "string"
  5520. }
  5521. },
  5522. "required": ["text"]
  5523. },
  5524. "start": {
  5525. "type": "number"
  5526. },
  5527. "end": {
  5528. "type": "number"
  5529. }
  5530. },
  5531. "required": ["match", "start", "end"]
  5532. }
  5533. }
  5534. },
  5535. "required": ["path", "lines", "line_number", "absolute_offset", "submatches"]
  5536. }
  5537. }
  5538. }
  5539. }
  5540. }
  5541. },
  5542. "x-codeSamples": [
  5543. {
  5544. "lang": "js",
  5545. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
  5546. }
  5547. ]
  5548. }
  5549. },
  5550. "/find/file": {
  5551. "get": {
  5552. "operationId": "find.files",
  5553. "parameters": [
  5554. {
  5555. "in": "query",
  5556. "name": "directory",
  5557. "schema": {
  5558. "type": "string"
  5559. }
  5560. },
  5561. {
  5562. "in": "query",
  5563. "name": "workspace",
  5564. "schema": {
  5565. "type": "string"
  5566. }
  5567. },
  5568. {
  5569. "in": "query",
  5570. "name": "query",
  5571. "schema": {
  5572. "type": "string"
  5573. },
  5574. "required": true
  5575. },
  5576. {
  5577. "in": "query",
  5578. "name": "dirs",
  5579. "schema": {
  5580. "type": "string",
  5581. "enum": ["true", "false"]
  5582. }
  5583. },
  5584. {
  5585. "in": "query",
  5586. "name": "type",
  5587. "schema": {
  5588. "type": "string",
  5589. "enum": ["file", "directory"]
  5590. }
  5591. },
  5592. {
  5593. "in": "query",
  5594. "name": "limit",
  5595. "schema": {
  5596. "type": "integer",
  5597. "minimum": 1,
  5598. "maximum": 200
  5599. }
  5600. }
  5601. ],
  5602. "summary": "Find files",
  5603. "description": "Search for files or directories by name or pattern in the project directory.",
  5604. "responses": {
  5605. "200": {
  5606. "description": "File paths",
  5607. "content": {
  5608. "application/json": {
  5609. "schema": {
  5610. "type": "array",
  5611. "items": {
  5612. "type": "string"
  5613. }
  5614. }
  5615. }
  5616. }
  5617. }
  5618. },
  5619. "x-codeSamples": [
  5620. {
  5621. "lang": "js",
  5622. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
  5623. }
  5624. ]
  5625. }
  5626. },
  5627. "/find/symbol": {
  5628. "get": {
  5629. "operationId": "find.symbols",
  5630. "parameters": [
  5631. {
  5632. "in": "query",
  5633. "name": "directory",
  5634. "schema": {
  5635. "type": "string"
  5636. }
  5637. },
  5638. {
  5639. "in": "query",
  5640. "name": "workspace",
  5641. "schema": {
  5642. "type": "string"
  5643. }
  5644. },
  5645. {
  5646. "in": "query",
  5647. "name": "query",
  5648. "schema": {
  5649. "type": "string"
  5650. },
  5651. "required": true
  5652. }
  5653. ],
  5654. "summary": "Find symbols",
  5655. "description": "Search for workspace symbols like functions, classes, and variables using LSP.",
  5656. "responses": {
  5657. "200": {
  5658. "description": "Symbols",
  5659. "content": {
  5660. "application/json": {
  5661. "schema": {
  5662. "type": "array",
  5663. "items": {
  5664. "$ref": "#/components/schemas/Symbol"
  5665. }
  5666. }
  5667. }
  5668. }
  5669. }
  5670. },
  5671. "x-codeSamples": [
  5672. {
  5673. "lang": "js",
  5674. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
  5675. }
  5676. ]
  5677. }
  5678. },
  5679. "/file": {
  5680. "get": {
  5681. "operationId": "file.list",
  5682. "parameters": [
  5683. {
  5684. "in": "query",
  5685. "name": "directory",
  5686. "schema": {
  5687. "type": "string"
  5688. }
  5689. },
  5690. {
  5691. "in": "query",
  5692. "name": "workspace",
  5693. "schema": {
  5694. "type": "string"
  5695. }
  5696. },
  5697. {
  5698. "in": "query",
  5699. "name": "path",
  5700. "schema": {
  5701. "type": "string"
  5702. },
  5703. "required": true
  5704. }
  5705. ],
  5706. "summary": "List files",
  5707. "description": "List files and directories in a specified path.",
  5708. "responses": {
  5709. "200": {
  5710. "description": "Files and directories",
  5711. "content": {
  5712. "application/json": {
  5713. "schema": {
  5714. "type": "array",
  5715. "items": {
  5716. "$ref": "#/components/schemas/FileNode"
  5717. }
  5718. }
  5719. }
  5720. }
  5721. }
  5722. },
  5723. "x-codeSamples": [
  5724. {
  5725. "lang": "js",
  5726. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
  5727. }
  5728. ]
  5729. }
  5730. },
  5731. "/file/content": {
  5732. "get": {
  5733. "operationId": "file.read",
  5734. "parameters": [
  5735. {
  5736. "in": "query",
  5737. "name": "directory",
  5738. "schema": {
  5739. "type": "string"
  5740. }
  5741. },
  5742. {
  5743. "in": "query",
  5744. "name": "workspace",
  5745. "schema": {
  5746. "type": "string"
  5747. }
  5748. },
  5749. {
  5750. "in": "query",
  5751. "name": "path",
  5752. "schema": {
  5753. "type": "string"
  5754. },
  5755. "required": true
  5756. }
  5757. ],
  5758. "summary": "Read file",
  5759. "description": "Read the content of a specified file.",
  5760. "responses": {
  5761. "200": {
  5762. "description": "File content",
  5763. "content": {
  5764. "application/json": {
  5765. "schema": {
  5766. "$ref": "#/components/schemas/FileContent"
  5767. }
  5768. }
  5769. }
  5770. }
  5771. },
  5772. "x-codeSamples": [
  5773. {
  5774. "lang": "js",
  5775. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
  5776. }
  5777. ]
  5778. }
  5779. },
  5780. "/file/status": {
  5781. "get": {
  5782. "operationId": "file.status",
  5783. "parameters": [
  5784. {
  5785. "in": "query",
  5786. "name": "directory",
  5787. "schema": {
  5788. "type": "string"
  5789. }
  5790. },
  5791. {
  5792. "in": "query",
  5793. "name": "workspace",
  5794. "schema": {
  5795. "type": "string"
  5796. }
  5797. }
  5798. ],
  5799. "summary": "Get file status",
  5800. "description": "Get the git status of all files in the project.",
  5801. "responses": {
  5802. "200": {
  5803. "description": "File status",
  5804. "content": {
  5805. "application/json": {
  5806. "schema": {
  5807. "type": "array",
  5808. "items": {
  5809. "$ref": "#/components/schemas/File"
  5810. }
  5811. }
  5812. }
  5813. }
  5814. }
  5815. },
  5816. "x-codeSamples": [
  5817. {
  5818. "lang": "js",
  5819. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
  5820. }
  5821. ]
  5822. }
  5823. },
  5824. "/event": {
  5825. "get": {
  5826. "operationId": "event.subscribe",
  5827. "parameters": [
  5828. {
  5829. "in": "query",
  5830. "name": "directory",
  5831. "schema": {
  5832. "type": "string"
  5833. }
  5834. },
  5835. {
  5836. "in": "query",
  5837. "name": "workspace",
  5838. "schema": {
  5839. "type": "string"
  5840. }
  5841. }
  5842. ],
  5843. "summary": "Subscribe to events",
  5844. "description": "Get events",
  5845. "responses": {
  5846. "200": {
  5847. "description": "Event stream",
  5848. "content": {
  5849. "text/event-stream": {
  5850. "schema": {
  5851. "$ref": "#/components/schemas/Event"
  5852. }
  5853. }
  5854. }
  5855. }
  5856. },
  5857. "x-codeSamples": [
  5858. {
  5859. "lang": "js",
  5860. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.event.subscribe({\n ...\n})"
  5861. }
  5862. ]
  5863. }
  5864. },
  5865. "/mcp": {
  5866. "get": {
  5867. "operationId": "mcp.status",
  5868. "parameters": [
  5869. {
  5870. "in": "query",
  5871. "name": "directory",
  5872. "schema": {
  5873. "type": "string"
  5874. }
  5875. },
  5876. {
  5877. "in": "query",
  5878. "name": "workspace",
  5879. "schema": {
  5880. "type": "string"
  5881. }
  5882. }
  5883. ],
  5884. "summary": "Get MCP status",
  5885. "description": "Get the status of all Model Context Protocol (MCP) servers.",
  5886. "responses": {
  5887. "200": {
  5888. "description": "MCP server status",
  5889. "content": {
  5890. "application/json": {
  5891. "schema": {
  5892. "type": "object",
  5893. "propertyNames": {
  5894. "type": "string"
  5895. },
  5896. "additionalProperties": {
  5897. "$ref": "#/components/schemas/MCPStatus"
  5898. }
  5899. }
  5900. }
  5901. }
  5902. }
  5903. },
  5904. "x-codeSamples": [
  5905. {
  5906. "lang": "js",
  5907. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
  5908. }
  5909. ]
  5910. },
  5911. "post": {
  5912. "operationId": "mcp.add",
  5913. "parameters": [
  5914. {
  5915. "in": "query",
  5916. "name": "directory",
  5917. "schema": {
  5918. "type": "string"
  5919. }
  5920. },
  5921. {
  5922. "in": "query",
  5923. "name": "workspace",
  5924. "schema": {
  5925. "type": "string"
  5926. }
  5927. }
  5928. ],
  5929. "summary": "Add MCP server",
  5930. "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
  5931. "responses": {
  5932. "200": {
  5933. "description": "MCP server added successfully",
  5934. "content": {
  5935. "application/json": {
  5936. "schema": {
  5937. "type": "object",
  5938. "propertyNames": {
  5939. "type": "string"
  5940. },
  5941. "additionalProperties": {
  5942. "$ref": "#/components/schemas/MCPStatus"
  5943. }
  5944. }
  5945. }
  5946. }
  5947. },
  5948. "400": {
  5949. "description": "Bad request",
  5950. "content": {
  5951. "application/json": {
  5952. "schema": {
  5953. "$ref": "#/components/schemas/BadRequestError"
  5954. }
  5955. }
  5956. }
  5957. }
  5958. },
  5959. "requestBody": {
  5960. "content": {
  5961. "application/json": {
  5962. "schema": {
  5963. "type": "object",
  5964. "properties": {
  5965. "name": {
  5966. "type": "string"
  5967. },
  5968. "config": {
  5969. "anyOf": [
  5970. {
  5971. "$ref": "#/components/schemas/McpLocalConfig"
  5972. },
  5973. {
  5974. "$ref": "#/components/schemas/McpRemoteConfig"
  5975. }
  5976. ]
  5977. }
  5978. },
  5979. "required": ["name", "config"]
  5980. }
  5981. }
  5982. }
  5983. },
  5984. "x-codeSamples": [
  5985. {
  5986. "lang": "js",
  5987. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
  5988. }
  5989. ]
  5990. }
  5991. },
  5992. "/mcp/{name}/auth": {
  5993. "post": {
  5994. "operationId": "mcp.auth.start",
  5995. "parameters": [
  5996. {
  5997. "in": "query",
  5998. "name": "directory",
  5999. "schema": {
  6000. "type": "string"
  6001. }
  6002. },
  6003. {
  6004. "in": "query",
  6005. "name": "workspace",
  6006. "schema": {
  6007. "type": "string"
  6008. }
  6009. },
  6010. {
  6011. "schema": {
  6012. "type": "string"
  6013. },
  6014. "in": "path",
  6015. "name": "name",
  6016. "required": true
  6017. }
  6018. ],
  6019. "summary": "Start MCP OAuth",
  6020. "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
  6021. "responses": {
  6022. "200": {
  6023. "description": "OAuth flow started",
  6024. "content": {
  6025. "application/json": {
  6026. "schema": {
  6027. "type": "object",
  6028. "properties": {
  6029. "authorizationUrl": {
  6030. "description": "URL to open in browser for authorization",
  6031. "type": "string"
  6032. }
  6033. },
  6034. "required": ["authorizationUrl"]
  6035. }
  6036. }
  6037. }
  6038. },
  6039. "400": {
  6040. "description": "Bad request",
  6041. "content": {
  6042. "application/json": {
  6043. "schema": {
  6044. "$ref": "#/components/schemas/BadRequestError"
  6045. }
  6046. }
  6047. }
  6048. },
  6049. "404": {
  6050. "description": "Not found",
  6051. "content": {
  6052. "application/json": {
  6053. "schema": {
  6054. "$ref": "#/components/schemas/NotFoundError"
  6055. }
  6056. }
  6057. }
  6058. }
  6059. },
  6060. "x-codeSamples": [
  6061. {
  6062. "lang": "js",
  6063. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
  6064. }
  6065. ]
  6066. },
  6067. "delete": {
  6068. "operationId": "mcp.auth.remove",
  6069. "parameters": [
  6070. {
  6071. "in": "query",
  6072. "name": "directory",
  6073. "schema": {
  6074. "type": "string"
  6075. }
  6076. },
  6077. {
  6078. "in": "query",
  6079. "name": "workspace",
  6080. "schema": {
  6081. "type": "string"
  6082. }
  6083. },
  6084. {
  6085. "schema": {
  6086. "type": "string"
  6087. },
  6088. "in": "path",
  6089. "name": "name",
  6090. "required": true
  6091. }
  6092. ],
  6093. "summary": "Remove MCP OAuth",
  6094. "description": "Remove OAuth credentials for an MCP server",
  6095. "responses": {
  6096. "200": {
  6097. "description": "OAuth credentials removed",
  6098. "content": {
  6099. "application/json": {
  6100. "schema": {
  6101. "type": "object",
  6102. "properties": {
  6103. "success": {
  6104. "type": "boolean",
  6105. "const": true
  6106. }
  6107. },
  6108. "required": ["success"]
  6109. }
  6110. }
  6111. }
  6112. },
  6113. "404": {
  6114. "description": "Not found",
  6115. "content": {
  6116. "application/json": {
  6117. "schema": {
  6118. "$ref": "#/components/schemas/NotFoundError"
  6119. }
  6120. }
  6121. }
  6122. }
  6123. },
  6124. "x-codeSamples": [
  6125. {
  6126. "lang": "js",
  6127. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
  6128. }
  6129. ]
  6130. }
  6131. },
  6132. "/mcp/{name}/auth/callback": {
  6133. "post": {
  6134. "operationId": "mcp.auth.callback",
  6135. "parameters": [
  6136. {
  6137. "in": "query",
  6138. "name": "directory",
  6139. "schema": {
  6140. "type": "string"
  6141. }
  6142. },
  6143. {
  6144. "in": "query",
  6145. "name": "workspace",
  6146. "schema": {
  6147. "type": "string"
  6148. }
  6149. },
  6150. {
  6151. "schema": {
  6152. "type": "string"
  6153. },
  6154. "in": "path",
  6155. "name": "name",
  6156. "required": true
  6157. }
  6158. ],
  6159. "summary": "Complete MCP OAuth",
  6160. "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
  6161. "responses": {
  6162. "200": {
  6163. "description": "OAuth authentication completed",
  6164. "content": {
  6165. "application/json": {
  6166. "schema": {
  6167. "$ref": "#/components/schemas/MCPStatus"
  6168. }
  6169. }
  6170. }
  6171. },
  6172. "400": {
  6173. "description": "Bad request",
  6174. "content": {
  6175. "application/json": {
  6176. "schema": {
  6177. "$ref": "#/components/schemas/BadRequestError"
  6178. }
  6179. }
  6180. }
  6181. },
  6182. "404": {
  6183. "description": "Not found",
  6184. "content": {
  6185. "application/json": {
  6186. "schema": {
  6187. "$ref": "#/components/schemas/NotFoundError"
  6188. }
  6189. }
  6190. }
  6191. }
  6192. },
  6193. "requestBody": {
  6194. "content": {
  6195. "application/json": {
  6196. "schema": {
  6197. "type": "object",
  6198. "properties": {
  6199. "code": {
  6200. "description": "Authorization code from OAuth callback",
  6201. "type": "string"
  6202. }
  6203. },
  6204. "required": ["code"]
  6205. }
  6206. }
  6207. }
  6208. },
  6209. "x-codeSamples": [
  6210. {
  6211. "lang": "js",
  6212. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
  6213. }
  6214. ]
  6215. }
  6216. },
  6217. "/mcp/{name}/auth/authenticate": {
  6218. "post": {
  6219. "operationId": "mcp.auth.authenticate",
  6220. "parameters": [
  6221. {
  6222. "in": "query",
  6223. "name": "directory",
  6224. "schema": {
  6225. "type": "string"
  6226. }
  6227. },
  6228. {
  6229. "in": "query",
  6230. "name": "workspace",
  6231. "schema": {
  6232. "type": "string"
  6233. }
  6234. },
  6235. {
  6236. "schema": {
  6237. "type": "string"
  6238. },
  6239. "in": "path",
  6240. "name": "name",
  6241. "required": true
  6242. }
  6243. ],
  6244. "summary": "Authenticate MCP OAuth",
  6245. "description": "Start OAuth flow and wait for callback (opens browser)",
  6246. "responses": {
  6247. "200": {
  6248. "description": "OAuth authentication completed",
  6249. "content": {
  6250. "application/json": {
  6251. "schema": {
  6252. "$ref": "#/components/schemas/MCPStatus"
  6253. }
  6254. }
  6255. }
  6256. },
  6257. "400": {
  6258. "description": "Bad request",
  6259. "content": {
  6260. "application/json": {
  6261. "schema": {
  6262. "$ref": "#/components/schemas/BadRequestError"
  6263. }
  6264. }
  6265. }
  6266. },
  6267. "404": {
  6268. "description": "Not found",
  6269. "content": {
  6270. "application/json": {
  6271. "schema": {
  6272. "$ref": "#/components/schemas/NotFoundError"
  6273. }
  6274. }
  6275. }
  6276. }
  6277. },
  6278. "x-codeSamples": [
  6279. {
  6280. "lang": "js",
  6281. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
  6282. }
  6283. ]
  6284. }
  6285. },
  6286. "/mcp/{name}/connect": {
  6287. "post": {
  6288. "operationId": "mcp.connect",
  6289. "parameters": [
  6290. {
  6291. "in": "query",
  6292. "name": "directory",
  6293. "schema": {
  6294. "type": "string"
  6295. }
  6296. },
  6297. {
  6298. "in": "query",
  6299. "name": "workspace",
  6300. "schema": {
  6301. "type": "string"
  6302. }
  6303. },
  6304. {
  6305. "in": "path",
  6306. "name": "name",
  6307. "schema": {
  6308. "type": "string"
  6309. },
  6310. "required": true
  6311. }
  6312. ],
  6313. "description": "Connect an MCP server",
  6314. "responses": {
  6315. "200": {
  6316. "description": "MCP server connected successfully",
  6317. "content": {
  6318. "application/json": {
  6319. "schema": {
  6320. "type": "boolean"
  6321. }
  6322. }
  6323. }
  6324. }
  6325. },
  6326. "x-codeSamples": [
  6327. {
  6328. "lang": "js",
  6329. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
  6330. }
  6331. ]
  6332. }
  6333. },
  6334. "/mcp/{name}/disconnect": {
  6335. "post": {
  6336. "operationId": "mcp.disconnect",
  6337. "parameters": [
  6338. {
  6339. "in": "query",
  6340. "name": "directory",
  6341. "schema": {
  6342. "type": "string"
  6343. }
  6344. },
  6345. {
  6346. "in": "query",
  6347. "name": "workspace",
  6348. "schema": {
  6349. "type": "string"
  6350. }
  6351. },
  6352. {
  6353. "in": "path",
  6354. "name": "name",
  6355. "schema": {
  6356. "type": "string"
  6357. },
  6358. "required": true
  6359. }
  6360. ],
  6361. "description": "Disconnect an MCP server",
  6362. "responses": {
  6363. "200": {
  6364. "description": "MCP server disconnected successfully",
  6365. "content": {
  6366. "application/json": {
  6367. "schema": {
  6368. "type": "boolean"
  6369. }
  6370. }
  6371. }
  6372. }
  6373. },
  6374. "x-codeSamples": [
  6375. {
  6376. "lang": "js",
  6377. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
  6378. }
  6379. ]
  6380. }
  6381. },
  6382. "/tui/append-prompt": {
  6383. "post": {
  6384. "operationId": "tui.appendPrompt",
  6385. "parameters": [
  6386. {
  6387. "in": "query",
  6388. "name": "directory",
  6389. "schema": {
  6390. "type": "string"
  6391. }
  6392. },
  6393. {
  6394. "in": "query",
  6395. "name": "workspace",
  6396. "schema": {
  6397. "type": "string"
  6398. }
  6399. }
  6400. ],
  6401. "summary": "Append TUI prompt",
  6402. "description": "Append prompt to the TUI",
  6403. "responses": {
  6404. "200": {
  6405. "description": "Prompt processed successfully",
  6406. "content": {
  6407. "application/json": {
  6408. "schema": {
  6409. "type": "boolean"
  6410. }
  6411. }
  6412. }
  6413. },
  6414. "400": {
  6415. "description": "Bad request",
  6416. "content": {
  6417. "application/json": {
  6418. "schema": {
  6419. "$ref": "#/components/schemas/BadRequestError"
  6420. }
  6421. }
  6422. }
  6423. }
  6424. },
  6425. "requestBody": {
  6426. "content": {
  6427. "application/json": {
  6428. "schema": {
  6429. "type": "object",
  6430. "properties": {
  6431. "text": {
  6432. "type": "string"
  6433. }
  6434. },
  6435. "required": ["text"]
  6436. }
  6437. }
  6438. }
  6439. },
  6440. "x-codeSamples": [
  6441. {
  6442. "lang": "js",
  6443. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  6444. }
  6445. ]
  6446. }
  6447. },
  6448. "/tui/open-help": {
  6449. "post": {
  6450. "operationId": "tui.openHelp",
  6451. "parameters": [
  6452. {
  6453. "in": "query",
  6454. "name": "directory",
  6455. "schema": {
  6456. "type": "string"
  6457. }
  6458. },
  6459. {
  6460. "in": "query",
  6461. "name": "workspace",
  6462. "schema": {
  6463. "type": "string"
  6464. }
  6465. }
  6466. ],
  6467. "summary": "Open help dialog",
  6468. "description": "Open the help dialog in the TUI to display user assistance information.",
  6469. "responses": {
  6470. "200": {
  6471. "description": "Help dialog opened successfully",
  6472. "content": {
  6473. "application/json": {
  6474. "schema": {
  6475. "type": "boolean"
  6476. }
  6477. }
  6478. }
  6479. }
  6480. },
  6481. "x-codeSamples": [
  6482. {
  6483. "lang": "js",
  6484. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  6485. }
  6486. ]
  6487. }
  6488. },
  6489. "/tui/open-sessions": {
  6490. "post": {
  6491. "operationId": "tui.openSessions",
  6492. "parameters": [
  6493. {
  6494. "in": "query",
  6495. "name": "directory",
  6496. "schema": {
  6497. "type": "string"
  6498. }
  6499. },
  6500. {
  6501. "in": "query",
  6502. "name": "workspace",
  6503. "schema": {
  6504. "type": "string"
  6505. }
  6506. }
  6507. ],
  6508. "summary": "Open sessions dialog",
  6509. "description": "Open the session dialog",
  6510. "responses": {
  6511. "200": {
  6512. "description": "Session dialog opened successfully",
  6513. "content": {
  6514. "application/json": {
  6515. "schema": {
  6516. "type": "boolean"
  6517. }
  6518. }
  6519. }
  6520. }
  6521. },
  6522. "x-codeSamples": [
  6523. {
  6524. "lang": "js",
  6525. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  6526. }
  6527. ]
  6528. }
  6529. },
  6530. "/tui/open-themes": {
  6531. "post": {
  6532. "operationId": "tui.openThemes",
  6533. "parameters": [
  6534. {
  6535. "in": "query",
  6536. "name": "directory",
  6537. "schema": {
  6538. "type": "string"
  6539. }
  6540. },
  6541. {
  6542. "in": "query",
  6543. "name": "workspace",
  6544. "schema": {
  6545. "type": "string"
  6546. }
  6547. }
  6548. ],
  6549. "summary": "Open themes dialog",
  6550. "description": "Open the theme dialog",
  6551. "responses": {
  6552. "200": {
  6553. "description": "Theme dialog opened successfully",
  6554. "content": {
  6555. "application/json": {
  6556. "schema": {
  6557. "type": "boolean"
  6558. }
  6559. }
  6560. }
  6561. }
  6562. },
  6563. "x-codeSamples": [
  6564. {
  6565. "lang": "js",
  6566. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  6567. }
  6568. ]
  6569. }
  6570. },
  6571. "/tui/open-models": {
  6572. "post": {
  6573. "operationId": "tui.openModels",
  6574. "parameters": [
  6575. {
  6576. "in": "query",
  6577. "name": "directory",
  6578. "schema": {
  6579. "type": "string"
  6580. }
  6581. },
  6582. {
  6583. "in": "query",
  6584. "name": "workspace",
  6585. "schema": {
  6586. "type": "string"
  6587. }
  6588. }
  6589. ],
  6590. "summary": "Open models dialog",
  6591. "description": "Open the model dialog",
  6592. "responses": {
  6593. "200": {
  6594. "description": "Model dialog opened successfully",
  6595. "content": {
  6596. "application/json": {
  6597. "schema": {
  6598. "type": "boolean"
  6599. }
  6600. }
  6601. }
  6602. }
  6603. },
  6604. "x-codeSamples": [
  6605. {
  6606. "lang": "js",
  6607. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  6608. }
  6609. ]
  6610. }
  6611. },
  6612. "/tui/submit-prompt": {
  6613. "post": {
  6614. "operationId": "tui.submitPrompt",
  6615. "parameters": [
  6616. {
  6617. "in": "query",
  6618. "name": "directory",
  6619. "schema": {
  6620. "type": "string"
  6621. }
  6622. },
  6623. {
  6624. "in": "query",
  6625. "name": "workspace",
  6626. "schema": {
  6627. "type": "string"
  6628. }
  6629. }
  6630. ],
  6631. "summary": "Submit TUI prompt",
  6632. "description": "Submit the prompt",
  6633. "responses": {
  6634. "200": {
  6635. "description": "Prompt submitted successfully",
  6636. "content": {
  6637. "application/json": {
  6638. "schema": {
  6639. "type": "boolean"
  6640. }
  6641. }
  6642. }
  6643. }
  6644. },
  6645. "x-codeSamples": [
  6646. {
  6647. "lang": "js",
  6648. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  6649. }
  6650. ]
  6651. }
  6652. },
  6653. "/tui/clear-prompt": {
  6654. "post": {
  6655. "operationId": "tui.clearPrompt",
  6656. "parameters": [
  6657. {
  6658. "in": "query",
  6659. "name": "directory",
  6660. "schema": {
  6661. "type": "string"
  6662. }
  6663. },
  6664. {
  6665. "in": "query",
  6666. "name": "workspace",
  6667. "schema": {
  6668. "type": "string"
  6669. }
  6670. }
  6671. ],
  6672. "summary": "Clear TUI prompt",
  6673. "description": "Clear the prompt",
  6674. "responses": {
  6675. "200": {
  6676. "description": "Prompt cleared successfully",
  6677. "content": {
  6678. "application/json": {
  6679. "schema": {
  6680. "type": "boolean"
  6681. }
  6682. }
  6683. }
  6684. }
  6685. },
  6686. "x-codeSamples": [
  6687. {
  6688. "lang": "js",
  6689. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  6690. }
  6691. ]
  6692. }
  6693. },
  6694. "/tui/execute-command": {
  6695. "post": {
  6696. "operationId": "tui.executeCommand",
  6697. "parameters": [
  6698. {
  6699. "in": "query",
  6700. "name": "directory",
  6701. "schema": {
  6702. "type": "string"
  6703. }
  6704. },
  6705. {
  6706. "in": "query",
  6707. "name": "workspace",
  6708. "schema": {
  6709. "type": "string"
  6710. }
  6711. }
  6712. ],
  6713. "summary": "Execute TUI command",
  6714. "description": "Execute a TUI command (e.g. agent_cycle)",
  6715. "responses": {
  6716. "200": {
  6717. "description": "Command executed successfully",
  6718. "content": {
  6719. "application/json": {
  6720. "schema": {
  6721. "type": "boolean"
  6722. }
  6723. }
  6724. }
  6725. },
  6726. "400": {
  6727. "description": "Bad request",
  6728. "content": {
  6729. "application/json": {
  6730. "schema": {
  6731. "$ref": "#/components/schemas/BadRequestError"
  6732. }
  6733. }
  6734. }
  6735. }
  6736. },
  6737. "requestBody": {
  6738. "content": {
  6739. "application/json": {
  6740. "schema": {
  6741. "type": "object",
  6742. "properties": {
  6743. "command": {
  6744. "type": "string"
  6745. }
  6746. },
  6747. "required": ["command"]
  6748. }
  6749. }
  6750. }
  6751. },
  6752. "x-codeSamples": [
  6753. {
  6754. "lang": "js",
  6755. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  6756. }
  6757. ]
  6758. }
  6759. },
  6760. "/tui/show-toast": {
  6761. "post": {
  6762. "operationId": "tui.showToast",
  6763. "parameters": [
  6764. {
  6765. "in": "query",
  6766. "name": "directory",
  6767. "schema": {
  6768. "type": "string"
  6769. }
  6770. },
  6771. {
  6772. "in": "query",
  6773. "name": "workspace",
  6774. "schema": {
  6775. "type": "string"
  6776. }
  6777. }
  6778. ],
  6779. "summary": "Show TUI toast",
  6780. "description": "Show a toast notification in the TUI",
  6781. "responses": {
  6782. "200": {
  6783. "description": "Toast notification shown successfully",
  6784. "content": {
  6785. "application/json": {
  6786. "schema": {
  6787. "type": "boolean"
  6788. }
  6789. }
  6790. }
  6791. }
  6792. },
  6793. "requestBody": {
  6794. "content": {
  6795. "application/json": {
  6796. "schema": {
  6797. "type": "object",
  6798. "properties": {
  6799. "title": {
  6800. "type": "string"
  6801. },
  6802. "message": {
  6803. "type": "string"
  6804. },
  6805. "variant": {
  6806. "type": "string",
  6807. "enum": ["info", "success", "warning", "error"]
  6808. },
  6809. "duration": {
  6810. "description": "Duration in milliseconds",
  6811. "default": 5000,
  6812. "type": "number"
  6813. }
  6814. },
  6815. "required": ["message", "variant"]
  6816. }
  6817. }
  6818. }
  6819. },
  6820. "x-codeSamples": [
  6821. {
  6822. "lang": "js",
  6823. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  6824. }
  6825. ]
  6826. }
  6827. },
  6828. "/tui/publish": {
  6829. "post": {
  6830. "operationId": "tui.publish",
  6831. "parameters": [
  6832. {
  6833. "in": "query",
  6834. "name": "directory",
  6835. "schema": {
  6836. "type": "string"
  6837. }
  6838. },
  6839. {
  6840. "in": "query",
  6841. "name": "workspace",
  6842. "schema": {
  6843. "type": "string"
  6844. }
  6845. }
  6846. ],
  6847. "summary": "Publish TUI event",
  6848. "description": "Publish a TUI event",
  6849. "responses": {
  6850. "200": {
  6851. "description": "Event published successfully",
  6852. "content": {
  6853. "application/json": {
  6854. "schema": {
  6855. "type": "boolean"
  6856. }
  6857. }
  6858. }
  6859. },
  6860. "400": {
  6861. "description": "Bad request",
  6862. "content": {
  6863. "application/json": {
  6864. "schema": {
  6865. "$ref": "#/components/schemas/BadRequestError"
  6866. }
  6867. }
  6868. }
  6869. }
  6870. },
  6871. "requestBody": {
  6872. "content": {
  6873. "application/json": {
  6874. "schema": {
  6875. "anyOf": [
  6876. {
  6877. "$ref": "#/components/schemas/Event.tui.prompt.append"
  6878. },
  6879. {
  6880. "$ref": "#/components/schemas/Event.tui.command.execute"
  6881. },
  6882. {
  6883. "$ref": "#/components/schemas/Event.tui.toast.show"
  6884. },
  6885. {
  6886. "$ref": "#/components/schemas/Event.tui.session.select"
  6887. }
  6888. ]
  6889. }
  6890. }
  6891. }
  6892. },
  6893. "x-codeSamples": [
  6894. {
  6895. "lang": "js",
  6896. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  6897. }
  6898. ]
  6899. }
  6900. },
  6901. "/tui/select-session": {
  6902. "post": {
  6903. "operationId": "tui.selectSession",
  6904. "parameters": [
  6905. {
  6906. "in": "query",
  6907. "name": "directory",
  6908. "schema": {
  6909. "type": "string"
  6910. }
  6911. },
  6912. {
  6913. "in": "query",
  6914. "name": "workspace",
  6915. "schema": {
  6916. "type": "string"
  6917. }
  6918. }
  6919. ],
  6920. "summary": "Select session",
  6921. "description": "Navigate the TUI to display the specified session.",
  6922. "responses": {
  6923. "200": {
  6924. "description": "Session selected successfully",
  6925. "content": {
  6926. "application/json": {
  6927. "schema": {
  6928. "type": "boolean"
  6929. }
  6930. }
  6931. }
  6932. },
  6933. "400": {
  6934. "description": "Bad request",
  6935. "content": {
  6936. "application/json": {
  6937. "schema": {
  6938. "$ref": "#/components/schemas/BadRequestError"
  6939. }
  6940. }
  6941. }
  6942. },
  6943. "404": {
  6944. "description": "Not found",
  6945. "content": {
  6946. "application/json": {
  6947. "schema": {
  6948. "$ref": "#/components/schemas/NotFoundError"
  6949. }
  6950. }
  6951. }
  6952. }
  6953. },
  6954. "requestBody": {
  6955. "content": {
  6956. "application/json": {
  6957. "schema": {
  6958. "type": "object",
  6959. "properties": {
  6960. "sessionID": {
  6961. "description": "Session ID to navigate to",
  6962. "type": "string",
  6963. "pattern": "^ses.*"
  6964. }
  6965. },
  6966. "required": ["sessionID"]
  6967. }
  6968. }
  6969. }
  6970. },
  6971. "x-codeSamples": [
  6972. {
  6973. "lang": "js",
  6974. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  6975. }
  6976. ]
  6977. }
  6978. },
  6979. "/tui/control/next": {
  6980. "get": {
  6981. "operationId": "tui.control.next",
  6982. "parameters": [
  6983. {
  6984. "in": "query",
  6985. "name": "directory",
  6986. "schema": {
  6987. "type": "string"
  6988. }
  6989. },
  6990. {
  6991. "in": "query",
  6992. "name": "workspace",
  6993. "schema": {
  6994. "type": "string"
  6995. }
  6996. }
  6997. ],
  6998. "summary": "Get next TUI request",
  6999. "description": "Retrieve the next TUI (Terminal User Interface) request from the queue for processing.",
  7000. "responses": {
  7001. "200": {
  7002. "description": "Next TUI request",
  7003. "content": {
  7004. "application/json": {
  7005. "schema": {
  7006. "type": "object",
  7007. "properties": {
  7008. "path": {
  7009. "type": "string"
  7010. },
  7011. "body": {}
  7012. },
  7013. "required": ["path", "body"]
  7014. }
  7015. }
  7016. }
  7017. }
  7018. },
  7019. "x-codeSamples": [
  7020. {
  7021. "lang": "js",
  7022. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  7023. }
  7024. ]
  7025. }
  7026. },
  7027. "/tui/control/response": {
  7028. "post": {
  7029. "operationId": "tui.control.response",
  7030. "parameters": [
  7031. {
  7032. "in": "query",
  7033. "name": "directory",
  7034. "schema": {
  7035. "type": "string"
  7036. }
  7037. },
  7038. {
  7039. "in": "query",
  7040. "name": "workspace",
  7041. "schema": {
  7042. "type": "string"
  7043. }
  7044. }
  7045. ],
  7046. "summary": "Submit TUI response",
  7047. "description": "Submit a response to the TUI request queue to complete a pending request.",
  7048. "responses": {
  7049. "200": {
  7050. "description": "Response submitted successfully",
  7051. "content": {
  7052. "application/json": {
  7053. "schema": {
  7054. "type": "boolean"
  7055. }
  7056. }
  7057. }
  7058. }
  7059. },
  7060. "requestBody": {
  7061. "content": {
  7062. "application/json": {
  7063. "schema": {}
  7064. }
  7065. }
  7066. },
  7067. "x-codeSamples": [
  7068. {
  7069. "lang": "js",
  7070. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  7071. }
  7072. ]
  7073. }
  7074. },
  7075. "/instance/dispose": {
  7076. "post": {
  7077. "operationId": "instance.dispose",
  7078. "parameters": [
  7079. {
  7080. "in": "query",
  7081. "name": "directory",
  7082. "schema": {
  7083. "type": "string"
  7084. }
  7085. },
  7086. {
  7087. "in": "query",
  7088. "name": "workspace",
  7089. "schema": {
  7090. "type": "string"
  7091. }
  7092. }
  7093. ],
  7094. "summary": "Dispose instance",
  7095. "description": "Clean up and dispose the current OpenCode instance, releasing all resources.",
  7096. "responses": {
  7097. "200": {
  7098. "description": "Instance disposed",
  7099. "content": {
  7100. "application/json": {
  7101. "schema": {
  7102. "type": "boolean"
  7103. }
  7104. }
  7105. }
  7106. }
  7107. },
  7108. "x-codeSamples": [
  7109. {
  7110. "lang": "js",
  7111. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.instance.dispose({\n ...\n})"
  7112. }
  7113. ]
  7114. }
  7115. },
  7116. "/path": {
  7117. "get": {
  7118. "operationId": "path.get",
  7119. "parameters": [
  7120. {
  7121. "in": "query",
  7122. "name": "directory",
  7123. "schema": {
  7124. "type": "string"
  7125. }
  7126. },
  7127. {
  7128. "in": "query",
  7129. "name": "workspace",
  7130. "schema": {
  7131. "type": "string"
  7132. }
  7133. }
  7134. ],
  7135. "summary": "Get paths",
  7136. "description": "Retrieve the current working directory and related path information for the OpenCode instance.",
  7137. "responses": {
  7138. "200": {
  7139. "description": "Path",
  7140. "content": {
  7141. "application/json": {
  7142. "schema": {
  7143. "$ref": "#/components/schemas/Path"
  7144. }
  7145. }
  7146. }
  7147. }
  7148. },
  7149. "x-codeSamples": [
  7150. {
  7151. "lang": "js",
  7152. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.path.get({\n ...\n})"
  7153. }
  7154. ]
  7155. }
  7156. },
  7157. "/vcs": {
  7158. "get": {
  7159. "operationId": "vcs.get",
  7160. "parameters": [
  7161. {
  7162. "in": "query",
  7163. "name": "directory",
  7164. "schema": {
  7165. "type": "string"
  7166. }
  7167. },
  7168. {
  7169. "in": "query",
  7170. "name": "workspace",
  7171. "schema": {
  7172. "type": "string"
  7173. }
  7174. }
  7175. ],
  7176. "summary": "Get VCS info",
  7177. "description": "Retrieve version control system (VCS) information for the current project, such as git branch.",
  7178. "responses": {
  7179. "200": {
  7180. "description": "VCS info",
  7181. "content": {
  7182. "application/json": {
  7183. "schema": {
  7184. "$ref": "#/components/schemas/VcsInfo"
  7185. }
  7186. }
  7187. }
  7188. }
  7189. },
  7190. "x-codeSamples": [
  7191. {
  7192. "lang": "js",
  7193. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.get({\n ...\n})"
  7194. }
  7195. ]
  7196. }
  7197. },
  7198. "/vcs/diff": {
  7199. "get": {
  7200. "operationId": "vcs.diff",
  7201. "parameters": [
  7202. {
  7203. "in": "query",
  7204. "name": "directory",
  7205. "schema": {
  7206. "type": "string"
  7207. }
  7208. },
  7209. {
  7210. "in": "query",
  7211. "name": "workspace",
  7212. "schema": {
  7213. "type": "string"
  7214. }
  7215. },
  7216. {
  7217. "in": "query",
  7218. "name": "mode",
  7219. "schema": {
  7220. "type": "string",
  7221. "enum": ["git", "branch"]
  7222. },
  7223. "required": true
  7224. }
  7225. ],
  7226. "summary": "Get VCS diff",
  7227. "description": "Retrieve the current git diff for the working tree or against the default branch.",
  7228. "responses": {
  7229. "200": {
  7230. "description": "VCS diff",
  7231. "content": {
  7232. "application/json": {
  7233. "schema": {
  7234. "type": "array",
  7235. "items": {
  7236. "$ref": "#/components/schemas/VcsFileDiff"
  7237. }
  7238. }
  7239. }
  7240. }
  7241. }
  7242. },
  7243. "x-codeSamples": [
  7244. {
  7245. "lang": "js",
  7246. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff({\n ...\n})"
  7247. }
  7248. ]
  7249. }
  7250. },
  7251. "/command": {
  7252. "get": {
  7253. "operationId": "command.list",
  7254. "parameters": [
  7255. {
  7256. "in": "query",
  7257. "name": "directory",
  7258. "schema": {
  7259. "type": "string"
  7260. }
  7261. },
  7262. {
  7263. "in": "query",
  7264. "name": "workspace",
  7265. "schema": {
  7266. "type": "string"
  7267. }
  7268. }
  7269. ],
  7270. "summary": "List commands",
  7271. "description": "Get a list of all available commands in the OpenCode system.",
  7272. "responses": {
  7273. "200": {
  7274. "description": "List of commands",
  7275. "content": {
  7276. "application/json": {
  7277. "schema": {
  7278. "type": "array",
  7279. "items": {
  7280. "$ref": "#/components/schemas/Command"
  7281. }
  7282. }
  7283. }
  7284. }
  7285. }
  7286. },
  7287. "x-codeSamples": [
  7288. {
  7289. "lang": "js",
  7290. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
  7291. }
  7292. ]
  7293. }
  7294. },
  7295. "/agent": {
  7296. "get": {
  7297. "operationId": "app.agents",
  7298. "parameters": [
  7299. {
  7300. "in": "query",
  7301. "name": "directory",
  7302. "schema": {
  7303. "type": "string"
  7304. }
  7305. },
  7306. {
  7307. "in": "query",
  7308. "name": "workspace",
  7309. "schema": {
  7310. "type": "string"
  7311. }
  7312. }
  7313. ],
  7314. "summary": "List agents",
  7315. "description": "Get a list of all available AI agents in the OpenCode system.",
  7316. "responses": {
  7317. "200": {
  7318. "description": "List of agents",
  7319. "content": {
  7320. "application/json": {
  7321. "schema": {
  7322. "type": "array",
  7323. "items": {
  7324. "$ref": "#/components/schemas/Agent"
  7325. }
  7326. }
  7327. }
  7328. }
  7329. }
  7330. },
  7331. "x-codeSamples": [
  7332. {
  7333. "lang": "js",
  7334. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
  7335. }
  7336. ]
  7337. }
  7338. },
  7339. "/skill": {
  7340. "get": {
  7341. "operationId": "app.skills",
  7342. "parameters": [
  7343. {
  7344. "in": "query",
  7345. "name": "directory",
  7346. "schema": {
  7347. "type": "string"
  7348. }
  7349. },
  7350. {
  7351. "in": "query",
  7352. "name": "workspace",
  7353. "schema": {
  7354. "type": "string"
  7355. }
  7356. }
  7357. ],
  7358. "summary": "List skills",
  7359. "description": "Get a list of all available skills in the OpenCode system.",
  7360. "responses": {
  7361. "200": {
  7362. "description": "List of skills",
  7363. "content": {
  7364. "application/json": {
  7365. "schema": {
  7366. "type": "array",
  7367. "items": {
  7368. "type": "object",
  7369. "properties": {
  7370. "name": {
  7371. "type": "string"
  7372. },
  7373. "description": {
  7374. "type": "string"
  7375. },
  7376. "location": {
  7377. "type": "string"
  7378. },
  7379. "content": {
  7380. "type": "string"
  7381. }
  7382. },
  7383. "required": ["name", "description", "location", "content"]
  7384. }
  7385. }
  7386. }
  7387. }
  7388. }
  7389. },
  7390. "x-codeSamples": [
  7391. {
  7392. "lang": "js",
  7393. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.skills({\n ...\n})"
  7394. }
  7395. ]
  7396. }
  7397. },
  7398. "/lsp": {
  7399. "get": {
  7400. "operationId": "lsp.status",
  7401. "parameters": [
  7402. {
  7403. "in": "query",
  7404. "name": "directory",
  7405. "schema": {
  7406. "type": "string"
  7407. }
  7408. },
  7409. {
  7410. "in": "query",
  7411. "name": "workspace",
  7412. "schema": {
  7413. "type": "string"
  7414. }
  7415. }
  7416. ],
  7417. "summary": "Get LSP status",
  7418. "description": "Get LSP server status",
  7419. "responses": {
  7420. "200": {
  7421. "description": "LSP server status",
  7422. "content": {
  7423. "application/json": {
  7424. "schema": {
  7425. "type": "array",
  7426. "items": {
  7427. "$ref": "#/components/schemas/LSPStatus"
  7428. }
  7429. }
  7430. }
  7431. }
  7432. }
  7433. },
  7434. "x-codeSamples": [
  7435. {
  7436. "lang": "js",
  7437. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
  7438. }
  7439. ]
  7440. }
  7441. },
  7442. "/formatter": {
  7443. "get": {
  7444. "operationId": "formatter.status",
  7445. "parameters": [
  7446. {
  7447. "in": "query",
  7448. "name": "directory",
  7449. "schema": {
  7450. "type": "string"
  7451. }
  7452. },
  7453. {
  7454. "in": "query",
  7455. "name": "workspace",
  7456. "schema": {
  7457. "type": "string"
  7458. }
  7459. }
  7460. ],
  7461. "summary": "Get formatter status",
  7462. "description": "Get formatter status",
  7463. "responses": {
  7464. "200": {
  7465. "description": "Formatter status",
  7466. "content": {
  7467. "application/json": {
  7468. "schema": {
  7469. "type": "array",
  7470. "items": {
  7471. "$ref": "#/components/schemas/FormatterStatus"
  7472. }
  7473. }
  7474. }
  7475. }
  7476. }
  7477. },
  7478. "x-codeSamples": [
  7479. {
  7480. "lang": "js",
  7481. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
  7482. }
  7483. ]
  7484. }
  7485. }
  7486. },
  7487. "components": {
  7488. "schemas": {
  7489. "Project": {
  7490. "type": "object",
  7491. "properties": {
  7492. "id": {
  7493. "type": "string"
  7494. },
  7495. "worktree": {
  7496. "type": "string"
  7497. },
  7498. "vcs": {
  7499. "type": "string",
  7500. "const": "git"
  7501. },
  7502. "name": {
  7503. "type": "string"
  7504. },
  7505. "icon": {
  7506. "type": "object",
  7507. "properties": {
  7508. "url": {
  7509. "type": "string"
  7510. },
  7511. "override": {
  7512. "type": "string"
  7513. },
  7514. "color": {
  7515. "type": "string"
  7516. }
  7517. }
  7518. },
  7519. "commands": {
  7520. "type": "object",
  7521. "properties": {
  7522. "start": {
  7523. "description": "Startup script to run when creating a new workspace (worktree)",
  7524. "type": "string"
  7525. }
  7526. }
  7527. },
  7528. "time": {
  7529. "type": "object",
  7530. "properties": {
  7531. "created": {
  7532. "type": "number"
  7533. },
  7534. "updated": {
  7535. "type": "number"
  7536. },
  7537. "initialized": {
  7538. "type": "number"
  7539. }
  7540. },
  7541. "required": ["created", "updated"]
  7542. },
  7543. "sandboxes": {
  7544. "type": "array",
  7545. "items": {
  7546. "type": "string"
  7547. }
  7548. }
  7549. },
  7550. "required": ["id", "worktree", "time", "sandboxes"]
  7551. },
  7552. "Event.project.updated": {
  7553. "type": "object",
  7554. "properties": {
  7555. "type": {
  7556. "type": "string",
  7557. "const": "project.updated"
  7558. },
  7559. "properties": {
  7560. "$ref": "#/components/schemas/Project"
  7561. }
  7562. },
  7563. "required": ["type", "properties"]
  7564. },
  7565. "Event.server.instance.disposed": {
  7566. "type": "object",
  7567. "properties": {
  7568. "type": {
  7569. "type": "string",
  7570. "const": "server.instance.disposed"
  7571. },
  7572. "properties": {
  7573. "type": "object",
  7574. "properties": {
  7575. "directory": {
  7576. "type": "string"
  7577. }
  7578. },
  7579. "required": ["directory"]
  7580. }
  7581. },
  7582. "required": ["type", "properties"]
  7583. },
  7584. "Event.server.connected": {
  7585. "type": "object",
  7586. "properties": {
  7587. "type": {
  7588. "type": "string",
  7589. "const": "server.connected"
  7590. },
  7591. "properties": {
  7592. "type": "object",
  7593. "properties": {}
  7594. }
  7595. },
  7596. "required": ["type", "properties"]
  7597. },
  7598. "Event.global.disposed": {
  7599. "type": "object",
  7600. "properties": {
  7601. "type": {
  7602. "type": "string",
  7603. "const": "global.disposed"
  7604. },
  7605. "properties": {
  7606. "type": "object",
  7607. "properties": {}
  7608. }
  7609. },
  7610. "required": ["type", "properties"]
  7611. },
  7612. "Event.file.edited": {
  7613. "type": "object",
  7614. "properties": {
  7615. "type": {
  7616. "type": "string",
  7617. "const": "file.edited"
  7618. },
  7619. "properties": {
  7620. "type": "object",
  7621. "properties": {
  7622. "file": {
  7623. "type": "string"
  7624. }
  7625. },
  7626. "required": ["file"]
  7627. }
  7628. },
  7629. "required": ["type", "properties"]
  7630. },
  7631. "Event.file.watcher.updated": {
  7632. "type": "object",
  7633. "properties": {
  7634. "type": {
  7635. "type": "string",
  7636. "const": "file.watcher.updated"
  7637. },
  7638. "properties": {
  7639. "type": "object",
  7640. "properties": {
  7641. "file": {
  7642. "type": "string"
  7643. },
  7644. "event": {
  7645. "anyOf": [
  7646. {
  7647. "type": "string",
  7648. "const": "add"
  7649. },
  7650. {
  7651. "type": "string",
  7652. "const": "change"
  7653. },
  7654. {
  7655. "type": "string",
  7656. "const": "unlink"
  7657. }
  7658. ]
  7659. }
  7660. },
  7661. "required": ["file", "event"]
  7662. }
  7663. },
  7664. "required": ["type", "properties"]
  7665. },
  7666. "Event.lsp.client.diagnostics": {
  7667. "type": "object",
  7668. "properties": {
  7669. "type": {
  7670. "type": "string",
  7671. "const": "lsp.client.diagnostics"
  7672. },
  7673. "properties": {
  7674. "type": "object",
  7675. "properties": {
  7676. "serverID": {
  7677. "type": "string"
  7678. },
  7679. "path": {
  7680. "type": "string"
  7681. }
  7682. },
  7683. "required": ["serverID", "path"]
  7684. }
  7685. },
  7686. "required": ["type", "properties"]
  7687. },
  7688. "Event.lsp.updated": {
  7689. "type": "object",
  7690. "properties": {
  7691. "type": {
  7692. "type": "string",
  7693. "const": "lsp.updated"
  7694. },
  7695. "properties": {
  7696. "type": "object",
  7697. "properties": {}
  7698. }
  7699. },
  7700. "required": ["type", "properties"]
  7701. },
  7702. "Event.installation.updated": {
  7703. "type": "object",
  7704. "properties": {
  7705. "type": {
  7706. "type": "string",
  7707. "const": "installation.updated"
  7708. },
  7709. "properties": {
  7710. "type": "object",
  7711. "properties": {
  7712. "version": {
  7713. "type": "string"
  7714. }
  7715. },
  7716. "required": ["version"]
  7717. }
  7718. },
  7719. "required": ["type", "properties"]
  7720. },
  7721. "Event.installation.update-available": {
  7722. "type": "object",
  7723. "properties": {
  7724. "type": {
  7725. "type": "string",
  7726. "const": "installation.update-available"
  7727. },
  7728. "properties": {
  7729. "type": "object",
  7730. "properties": {
  7731. "version": {
  7732. "type": "string"
  7733. }
  7734. },
  7735. "required": ["version"]
  7736. }
  7737. },
  7738. "required": ["type", "properties"]
  7739. },
  7740. "Event.message.part.delta": {
  7741. "type": "object",
  7742. "properties": {
  7743. "type": {
  7744. "type": "string",
  7745. "const": "message.part.delta"
  7746. },
  7747. "properties": {
  7748. "type": "object",
  7749. "properties": {
  7750. "sessionID": {
  7751. "type": "string",
  7752. "pattern": "^ses.*"
  7753. },
  7754. "messageID": {
  7755. "type": "string",
  7756. "pattern": "^msg.*"
  7757. },
  7758. "partID": {
  7759. "type": "string",
  7760. "pattern": "^prt.*"
  7761. },
  7762. "field": {
  7763. "type": "string"
  7764. },
  7765. "delta": {
  7766. "type": "string"
  7767. }
  7768. },
  7769. "required": ["sessionID", "messageID", "partID", "field", "delta"]
  7770. }
  7771. },
  7772. "required": ["type", "properties"]
  7773. },
  7774. "PermissionRequest": {
  7775. "type": "object",
  7776. "properties": {
  7777. "id": {
  7778. "type": "string",
  7779. "pattern": "^per.*"
  7780. },
  7781. "sessionID": {
  7782. "type": "string",
  7783. "pattern": "^ses.*"
  7784. },
  7785. "permission": {
  7786. "type": "string"
  7787. },
  7788. "patterns": {
  7789. "type": "array",
  7790. "items": {
  7791. "type": "string"
  7792. }
  7793. },
  7794. "metadata": {
  7795. "type": "object",
  7796. "propertyNames": {
  7797. "type": "string"
  7798. },
  7799. "additionalProperties": {}
  7800. },
  7801. "always": {
  7802. "type": "array",
  7803. "items": {
  7804. "type": "string"
  7805. }
  7806. },
  7807. "tool": {
  7808. "type": "object",
  7809. "properties": {
  7810. "messageID": {
  7811. "type": "string",
  7812. "pattern": "^msg.*"
  7813. },
  7814. "callID": {
  7815. "type": "string"
  7816. }
  7817. },
  7818. "required": ["messageID", "callID"]
  7819. }
  7820. },
  7821. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"]
  7822. },
  7823. "Event.permission.asked": {
  7824. "type": "object",
  7825. "properties": {
  7826. "type": {
  7827. "type": "string",
  7828. "const": "permission.asked"
  7829. },
  7830. "properties": {
  7831. "$ref": "#/components/schemas/PermissionRequest"
  7832. }
  7833. },
  7834. "required": ["type", "properties"]
  7835. },
  7836. "Event.permission.replied": {
  7837. "type": "object",
  7838. "properties": {
  7839. "type": {
  7840. "type": "string",
  7841. "const": "permission.replied"
  7842. },
  7843. "properties": {
  7844. "type": "object",
  7845. "properties": {
  7846. "sessionID": {
  7847. "type": "string",
  7848. "pattern": "^ses.*"
  7849. },
  7850. "requestID": {
  7851. "type": "string",
  7852. "pattern": "^per.*"
  7853. },
  7854. "reply": {
  7855. "type": "string",
  7856. "enum": ["once", "always", "reject"]
  7857. }
  7858. },
  7859. "required": ["sessionID", "requestID", "reply"]
  7860. }
  7861. },
  7862. "required": ["type", "properties"]
  7863. },
  7864. "SnapshotFileDiff": {
  7865. "type": "object",
  7866. "properties": {
  7867. "file": {
  7868. "type": "string"
  7869. },
  7870. "patch": {
  7871. "type": "string"
  7872. },
  7873. "additions": {
  7874. "type": "number"
  7875. },
  7876. "deletions": {
  7877. "type": "number"
  7878. },
  7879. "status": {
  7880. "type": "string",
  7881. "enum": ["added", "deleted", "modified"]
  7882. }
  7883. },
  7884. "required": ["file", "patch", "additions", "deletions"]
  7885. },
  7886. "Event.session.diff": {
  7887. "type": "object",
  7888. "properties": {
  7889. "type": {
  7890. "type": "string",
  7891. "const": "session.diff"
  7892. },
  7893. "properties": {
  7894. "type": "object",
  7895. "properties": {
  7896. "sessionID": {
  7897. "type": "string",
  7898. "pattern": "^ses.*"
  7899. },
  7900. "diff": {
  7901. "type": "array",
  7902. "items": {
  7903. "$ref": "#/components/schemas/SnapshotFileDiff"
  7904. }
  7905. }
  7906. },
  7907. "required": ["sessionID", "diff"]
  7908. }
  7909. },
  7910. "required": ["type", "properties"]
  7911. },
  7912. "ProviderAuthError": {
  7913. "type": "object",
  7914. "properties": {
  7915. "name": {
  7916. "type": "string",
  7917. "const": "ProviderAuthError"
  7918. },
  7919. "data": {
  7920. "type": "object",
  7921. "properties": {
  7922. "providerID": {
  7923. "type": "string"
  7924. },
  7925. "message": {
  7926. "type": "string"
  7927. }
  7928. },
  7929. "required": ["providerID", "message"]
  7930. }
  7931. },
  7932. "required": ["name", "data"]
  7933. },
  7934. "UnknownError": {
  7935. "type": "object",
  7936. "properties": {
  7937. "name": {
  7938. "type": "string",
  7939. "const": "UnknownError"
  7940. },
  7941. "data": {
  7942. "type": "object",
  7943. "properties": {
  7944. "message": {
  7945. "type": "string"
  7946. }
  7947. },
  7948. "required": ["message"]
  7949. }
  7950. },
  7951. "required": ["name", "data"]
  7952. },
  7953. "MessageOutputLengthError": {
  7954. "type": "object",
  7955. "properties": {
  7956. "name": {
  7957. "type": "string",
  7958. "const": "MessageOutputLengthError"
  7959. },
  7960. "data": {
  7961. "type": "object",
  7962. "properties": {}
  7963. }
  7964. },
  7965. "required": ["name", "data"]
  7966. },
  7967. "MessageAbortedError": {
  7968. "type": "object",
  7969. "properties": {
  7970. "name": {
  7971. "type": "string",
  7972. "const": "MessageAbortedError"
  7973. },
  7974. "data": {
  7975. "type": "object",
  7976. "properties": {
  7977. "message": {
  7978. "type": "string"
  7979. }
  7980. },
  7981. "required": ["message"]
  7982. }
  7983. },
  7984. "required": ["name", "data"]
  7985. },
  7986. "StructuredOutputError": {
  7987. "type": "object",
  7988. "properties": {
  7989. "name": {
  7990. "type": "string",
  7991. "const": "StructuredOutputError"
  7992. },
  7993. "data": {
  7994. "type": "object",
  7995. "properties": {
  7996. "message": {
  7997. "type": "string"
  7998. },
  7999. "retries": {
  8000. "type": "number"
  8001. }
  8002. },
  8003. "required": ["message", "retries"]
  8004. }
  8005. },
  8006. "required": ["name", "data"]
  8007. },
  8008. "ContextOverflowError": {
  8009. "type": "object",
  8010. "properties": {
  8011. "name": {
  8012. "type": "string",
  8013. "const": "ContextOverflowError"
  8014. },
  8015. "data": {
  8016. "type": "object",
  8017. "properties": {
  8018. "message": {
  8019. "type": "string"
  8020. },
  8021. "responseBody": {
  8022. "type": "string"
  8023. }
  8024. },
  8025. "required": ["message"]
  8026. }
  8027. },
  8028. "required": ["name", "data"]
  8029. },
  8030. "APIError": {
  8031. "type": "object",
  8032. "properties": {
  8033. "name": {
  8034. "type": "string",
  8035. "const": "APIError"
  8036. },
  8037. "data": {
  8038. "type": "object",
  8039. "properties": {
  8040. "message": {
  8041. "type": "string"
  8042. },
  8043. "statusCode": {
  8044. "type": "number"
  8045. },
  8046. "isRetryable": {
  8047. "type": "boolean"
  8048. },
  8049. "responseHeaders": {
  8050. "type": "object",
  8051. "propertyNames": {
  8052. "type": "string"
  8053. },
  8054. "additionalProperties": {
  8055. "type": "string"
  8056. }
  8057. },
  8058. "responseBody": {
  8059. "type": "string"
  8060. },
  8061. "metadata": {
  8062. "type": "object",
  8063. "propertyNames": {
  8064. "type": "string"
  8065. },
  8066. "additionalProperties": {
  8067. "type": "string"
  8068. }
  8069. }
  8070. },
  8071. "required": ["message", "isRetryable"]
  8072. }
  8073. },
  8074. "required": ["name", "data"]
  8075. },
  8076. "Event.session.error": {
  8077. "type": "object",
  8078. "properties": {
  8079. "type": {
  8080. "type": "string",
  8081. "const": "session.error"
  8082. },
  8083. "properties": {
  8084. "type": "object",
  8085. "properties": {
  8086. "sessionID": {
  8087. "type": "string",
  8088. "pattern": "^ses.*"
  8089. },
  8090. "error": {
  8091. "anyOf": [
  8092. {
  8093. "$ref": "#/components/schemas/ProviderAuthError"
  8094. },
  8095. {
  8096. "$ref": "#/components/schemas/UnknownError"
  8097. },
  8098. {
  8099. "$ref": "#/components/schemas/MessageOutputLengthError"
  8100. },
  8101. {
  8102. "$ref": "#/components/schemas/MessageAbortedError"
  8103. },
  8104. {
  8105. "$ref": "#/components/schemas/StructuredOutputError"
  8106. },
  8107. {
  8108. "$ref": "#/components/schemas/ContextOverflowError"
  8109. },
  8110. {
  8111. "$ref": "#/components/schemas/APIError"
  8112. }
  8113. ]
  8114. }
  8115. }
  8116. }
  8117. },
  8118. "required": ["type", "properties"]
  8119. },
  8120. "QuestionOption": {
  8121. "type": "object",
  8122. "properties": {
  8123. "label": {
  8124. "description": "Display text (1-5 words, concise)",
  8125. "type": "string"
  8126. },
  8127. "description": {
  8128. "description": "Explanation of choice",
  8129. "type": "string"
  8130. }
  8131. },
  8132. "required": ["label", "description"]
  8133. },
  8134. "QuestionInfo": {
  8135. "type": "object",
  8136. "properties": {
  8137. "question": {
  8138. "description": "Complete question",
  8139. "type": "string"
  8140. },
  8141. "header": {
  8142. "description": "Very short label (max 30 chars)",
  8143. "type": "string"
  8144. },
  8145. "options": {
  8146. "description": "Available choices",
  8147. "type": "array",
  8148. "items": {
  8149. "$ref": "#/components/schemas/QuestionOption"
  8150. }
  8151. },
  8152. "multiple": {
  8153. "description": "Allow selecting multiple choices",
  8154. "type": "boolean"
  8155. },
  8156. "custom": {
  8157. "description": "Allow typing a custom answer (default: true)",
  8158. "type": "boolean"
  8159. }
  8160. },
  8161. "required": ["question", "header", "options"]
  8162. },
  8163. "QuestionTool": {
  8164. "type": "object",
  8165. "properties": {
  8166. "messageID": {
  8167. "type": "string",
  8168. "pattern": "^msg.*"
  8169. },
  8170. "callID": {
  8171. "type": "string"
  8172. }
  8173. },
  8174. "required": ["messageID", "callID"]
  8175. },
  8176. "QuestionRequest": {
  8177. "type": "object",
  8178. "properties": {
  8179. "id": {
  8180. "type": "string",
  8181. "pattern": "^que.*"
  8182. },
  8183. "sessionID": {
  8184. "type": "string",
  8185. "pattern": "^ses.*"
  8186. },
  8187. "questions": {
  8188. "description": "Questions to ask",
  8189. "type": "array",
  8190. "items": {
  8191. "$ref": "#/components/schemas/QuestionInfo"
  8192. }
  8193. },
  8194. "tool": {
  8195. "$ref": "#/components/schemas/QuestionTool"
  8196. }
  8197. },
  8198. "required": ["id", "sessionID", "questions"]
  8199. },
  8200. "Event.question.asked": {
  8201. "type": "object",
  8202. "properties": {
  8203. "type": {
  8204. "type": "string",
  8205. "const": "question.asked"
  8206. },
  8207. "properties": {
  8208. "$ref": "#/components/schemas/QuestionRequest"
  8209. }
  8210. },
  8211. "required": ["type", "properties"]
  8212. },
  8213. "QuestionAnswer": {
  8214. "type": "array",
  8215. "items": {
  8216. "type": "string"
  8217. }
  8218. },
  8219. "QuestionReplied": {
  8220. "type": "object",
  8221. "properties": {
  8222. "sessionID": {
  8223. "type": "string",
  8224. "pattern": "^ses.*"
  8225. },
  8226. "requestID": {
  8227. "type": "string",
  8228. "pattern": "^que.*"
  8229. },
  8230. "answers": {
  8231. "type": "array",
  8232. "items": {
  8233. "$ref": "#/components/schemas/QuestionAnswer"
  8234. }
  8235. }
  8236. },
  8237. "required": ["sessionID", "requestID", "answers"]
  8238. },
  8239. "Event.question.replied": {
  8240. "type": "object",
  8241. "properties": {
  8242. "type": {
  8243. "type": "string",
  8244. "const": "question.replied"
  8245. },
  8246. "properties": {
  8247. "$ref": "#/components/schemas/QuestionReplied"
  8248. }
  8249. },
  8250. "required": ["type", "properties"]
  8251. },
  8252. "QuestionRejected": {
  8253. "type": "object",
  8254. "properties": {
  8255. "sessionID": {
  8256. "type": "string",
  8257. "pattern": "^ses.*"
  8258. },
  8259. "requestID": {
  8260. "type": "string",
  8261. "pattern": "^que.*"
  8262. }
  8263. },
  8264. "required": ["sessionID", "requestID"]
  8265. },
  8266. "Event.question.rejected": {
  8267. "type": "object",
  8268. "properties": {
  8269. "type": {
  8270. "type": "string",
  8271. "const": "question.rejected"
  8272. },
  8273. "properties": {
  8274. "$ref": "#/components/schemas/QuestionRejected"
  8275. }
  8276. },
  8277. "required": ["type", "properties"]
  8278. },
  8279. "Todo": {
  8280. "type": "object",
  8281. "properties": {
  8282. "content": {
  8283. "description": "Brief description of the task",
  8284. "type": "string"
  8285. },
  8286. "status": {
  8287. "description": "Current status of the task: pending, in_progress, completed, cancelled",
  8288. "type": "string"
  8289. },
  8290. "priority": {
  8291. "description": "Priority level of the task: high, medium, low",
  8292. "type": "string"
  8293. }
  8294. },
  8295. "required": ["content", "status", "priority"]
  8296. },
  8297. "Event.todo.updated": {
  8298. "type": "object",
  8299. "properties": {
  8300. "type": {
  8301. "type": "string",
  8302. "const": "todo.updated"
  8303. },
  8304. "properties": {
  8305. "type": "object",
  8306. "properties": {
  8307. "sessionID": {
  8308. "type": "string",
  8309. "pattern": "^ses.*"
  8310. },
  8311. "todos": {
  8312. "type": "array",
  8313. "items": {
  8314. "$ref": "#/components/schemas/Todo"
  8315. }
  8316. }
  8317. },
  8318. "required": ["sessionID", "todos"]
  8319. }
  8320. },
  8321. "required": ["type", "properties"]
  8322. },
  8323. "SessionStatus": {
  8324. "anyOf": [
  8325. {
  8326. "type": "object",
  8327. "properties": {
  8328. "type": {
  8329. "type": "string",
  8330. "const": "idle"
  8331. }
  8332. },
  8333. "required": ["type"]
  8334. },
  8335. {
  8336. "type": "object",
  8337. "properties": {
  8338. "type": {
  8339. "type": "string",
  8340. "const": "retry"
  8341. },
  8342. "attempt": {
  8343. "type": "number"
  8344. },
  8345. "message": {
  8346. "type": "string"
  8347. },
  8348. "next": {
  8349. "type": "number"
  8350. }
  8351. },
  8352. "required": ["type", "attempt", "message", "next"]
  8353. },
  8354. {
  8355. "type": "object",
  8356. "properties": {
  8357. "type": {
  8358. "type": "string",
  8359. "const": "busy"
  8360. }
  8361. },
  8362. "required": ["type"]
  8363. }
  8364. ]
  8365. },
  8366. "Event.session.status": {
  8367. "type": "object",
  8368. "properties": {
  8369. "type": {
  8370. "type": "string",
  8371. "const": "session.status"
  8372. },
  8373. "properties": {
  8374. "type": "object",
  8375. "properties": {
  8376. "sessionID": {
  8377. "type": "string",
  8378. "pattern": "^ses.*"
  8379. },
  8380. "status": {
  8381. "$ref": "#/components/schemas/SessionStatus"
  8382. }
  8383. },
  8384. "required": ["sessionID", "status"]
  8385. }
  8386. },
  8387. "required": ["type", "properties"]
  8388. },
  8389. "Event.session.idle": {
  8390. "type": "object",
  8391. "properties": {
  8392. "type": {
  8393. "type": "string",
  8394. "const": "session.idle"
  8395. },
  8396. "properties": {
  8397. "type": "object",
  8398. "properties": {
  8399. "sessionID": {
  8400. "type": "string",
  8401. "pattern": "^ses.*"
  8402. }
  8403. },
  8404. "required": ["sessionID"]
  8405. }
  8406. },
  8407. "required": ["type", "properties"]
  8408. },
  8409. "Event.session.compacted": {
  8410. "type": "object",
  8411. "properties": {
  8412. "type": {
  8413. "type": "string",
  8414. "const": "session.compacted"
  8415. },
  8416. "properties": {
  8417. "type": "object",
  8418. "properties": {
  8419. "sessionID": {
  8420. "type": "string",
  8421. "pattern": "^ses.*"
  8422. }
  8423. },
  8424. "required": ["sessionID"]
  8425. }
  8426. },
  8427. "required": ["type", "properties"]
  8428. },
  8429. "Event.tui.prompt.append": {
  8430. "type": "object",
  8431. "properties": {
  8432. "type": {
  8433. "type": "string",
  8434. "const": "tui.prompt.append"
  8435. },
  8436. "properties": {
  8437. "type": "object",
  8438. "properties": {
  8439. "text": {
  8440. "type": "string"
  8441. }
  8442. },
  8443. "required": ["text"]
  8444. }
  8445. },
  8446. "required": ["type", "properties"]
  8447. },
  8448. "Event.tui.command.execute": {
  8449. "type": "object",
  8450. "properties": {
  8451. "type": {
  8452. "type": "string",
  8453. "const": "tui.command.execute"
  8454. },
  8455. "properties": {
  8456. "type": "object",
  8457. "properties": {
  8458. "command": {
  8459. "anyOf": [
  8460. {
  8461. "type": "string",
  8462. "enum": [
  8463. "session.list",
  8464. "session.new",
  8465. "session.share",
  8466. "session.interrupt",
  8467. "session.compact",
  8468. "session.page.up",
  8469. "session.page.down",
  8470. "session.line.up",
  8471. "session.line.down",
  8472. "session.half.page.up",
  8473. "session.half.page.down",
  8474. "session.first",
  8475. "session.last",
  8476. "prompt.clear",
  8477. "prompt.submit",
  8478. "agent.cycle"
  8479. ]
  8480. },
  8481. {
  8482. "type": "string"
  8483. }
  8484. ]
  8485. }
  8486. },
  8487. "required": ["command"]
  8488. }
  8489. },
  8490. "required": ["type", "properties"]
  8491. },
  8492. "Event.tui.toast.show": {
  8493. "type": "object",
  8494. "properties": {
  8495. "type": {
  8496. "type": "string",
  8497. "const": "tui.toast.show"
  8498. },
  8499. "properties": {
  8500. "type": "object",
  8501. "properties": {
  8502. "title": {
  8503. "type": "string"
  8504. },
  8505. "message": {
  8506. "type": "string"
  8507. },
  8508. "variant": {
  8509. "type": "string",
  8510. "enum": ["info", "success", "warning", "error"]
  8511. },
  8512. "duration": {
  8513. "description": "Duration in milliseconds",
  8514. "default": 5000,
  8515. "type": "number"
  8516. }
  8517. },
  8518. "required": ["message", "variant"]
  8519. }
  8520. },
  8521. "required": ["type", "properties"]
  8522. },
  8523. "Event.tui.session.select": {
  8524. "type": "object",
  8525. "properties": {
  8526. "type": {
  8527. "type": "string",
  8528. "const": "tui.session.select"
  8529. },
  8530. "properties": {
  8531. "type": "object",
  8532. "properties": {
  8533. "sessionID": {
  8534. "description": "Session ID to navigate to",
  8535. "type": "string",
  8536. "pattern": "^ses.*"
  8537. }
  8538. },
  8539. "required": ["sessionID"]
  8540. }
  8541. },
  8542. "required": ["type", "properties"]
  8543. },
  8544. "Event.mcp.tools.changed": {
  8545. "type": "object",
  8546. "properties": {
  8547. "type": {
  8548. "type": "string",
  8549. "const": "mcp.tools.changed"
  8550. },
  8551. "properties": {
  8552. "type": "object",
  8553. "properties": {
  8554. "server": {
  8555. "type": "string"
  8556. }
  8557. },
  8558. "required": ["server"]
  8559. }
  8560. },
  8561. "required": ["type", "properties"]
  8562. },
  8563. "Event.mcp.browser.open.failed": {
  8564. "type": "object",
  8565. "properties": {
  8566. "type": {
  8567. "type": "string",
  8568. "const": "mcp.browser.open.failed"
  8569. },
  8570. "properties": {
  8571. "type": "object",
  8572. "properties": {
  8573. "mcpName": {
  8574. "type": "string"
  8575. },
  8576. "url": {
  8577. "type": "string"
  8578. }
  8579. },
  8580. "required": ["mcpName", "url"]
  8581. }
  8582. },
  8583. "required": ["type", "properties"]
  8584. },
  8585. "Event.command.executed": {
  8586. "type": "object",
  8587. "properties": {
  8588. "type": {
  8589. "type": "string",
  8590. "const": "command.executed"
  8591. },
  8592. "properties": {
  8593. "type": "object",
  8594. "properties": {
  8595. "name": {
  8596. "type": "string"
  8597. },
  8598. "sessionID": {
  8599. "type": "string",
  8600. "pattern": "^ses.*"
  8601. },
  8602. "arguments": {
  8603. "type": "string"
  8604. },
  8605. "messageID": {
  8606. "type": "string",
  8607. "pattern": "^msg.*"
  8608. }
  8609. },
  8610. "required": ["name", "sessionID", "arguments", "messageID"]
  8611. }
  8612. },
  8613. "required": ["type", "properties"]
  8614. },
  8615. "Event.vcs.branch.updated": {
  8616. "type": "object",
  8617. "properties": {
  8618. "type": {
  8619. "type": "string",
  8620. "const": "vcs.branch.updated"
  8621. },
  8622. "properties": {
  8623. "type": "object",
  8624. "properties": {
  8625. "branch": {
  8626. "type": "string"
  8627. }
  8628. }
  8629. }
  8630. },
  8631. "required": ["type", "properties"]
  8632. },
  8633. "Event.worktree.ready": {
  8634. "type": "object",
  8635. "properties": {
  8636. "type": {
  8637. "type": "string",
  8638. "const": "worktree.ready"
  8639. },
  8640. "properties": {
  8641. "type": "object",
  8642. "properties": {
  8643. "name": {
  8644. "type": "string"
  8645. },
  8646. "branch": {
  8647. "type": "string"
  8648. }
  8649. },
  8650. "required": ["name", "branch"]
  8651. }
  8652. },
  8653. "required": ["type", "properties"]
  8654. },
  8655. "Event.worktree.failed": {
  8656. "type": "object",
  8657. "properties": {
  8658. "type": {
  8659. "type": "string",
  8660. "const": "worktree.failed"
  8661. },
  8662. "properties": {
  8663. "type": "object",
  8664. "properties": {
  8665. "message": {
  8666. "type": "string"
  8667. }
  8668. },
  8669. "required": ["message"]
  8670. }
  8671. },
  8672. "required": ["type", "properties"]
  8673. },
  8674. "Pty": {
  8675. "type": "object",
  8676. "properties": {
  8677. "id": {
  8678. "type": "string",
  8679. "pattern": "^pty.*"
  8680. },
  8681. "title": {
  8682. "type": "string"
  8683. },
  8684. "command": {
  8685. "type": "string"
  8686. },
  8687. "args": {
  8688. "type": "array",
  8689. "items": {
  8690. "type": "string"
  8691. }
  8692. },
  8693. "cwd": {
  8694. "type": "string"
  8695. },
  8696. "status": {
  8697. "type": "string",
  8698. "enum": ["running", "exited"]
  8699. },
  8700. "pid": {
  8701. "type": "number"
  8702. }
  8703. },
  8704. "required": ["id", "title", "command", "args", "cwd", "status", "pid"]
  8705. },
  8706. "Event.pty.created": {
  8707. "type": "object",
  8708. "properties": {
  8709. "type": {
  8710. "type": "string",
  8711. "const": "pty.created"
  8712. },
  8713. "properties": {
  8714. "type": "object",
  8715. "properties": {
  8716. "info": {
  8717. "$ref": "#/components/schemas/Pty"
  8718. }
  8719. },
  8720. "required": ["info"]
  8721. }
  8722. },
  8723. "required": ["type", "properties"]
  8724. },
  8725. "Event.pty.updated": {
  8726. "type": "object",
  8727. "properties": {
  8728. "type": {
  8729. "type": "string",
  8730. "const": "pty.updated"
  8731. },
  8732. "properties": {
  8733. "type": "object",
  8734. "properties": {
  8735. "info": {
  8736. "$ref": "#/components/schemas/Pty"
  8737. }
  8738. },
  8739. "required": ["info"]
  8740. }
  8741. },
  8742. "required": ["type", "properties"]
  8743. },
  8744. "Event.pty.exited": {
  8745. "type": "object",
  8746. "properties": {
  8747. "type": {
  8748. "type": "string",
  8749. "const": "pty.exited"
  8750. },
  8751. "properties": {
  8752. "type": "object",
  8753. "properties": {
  8754. "id": {
  8755. "type": "string",
  8756. "pattern": "^pty.*"
  8757. },
  8758. "exitCode": {
  8759. "type": "number"
  8760. }
  8761. },
  8762. "required": ["id", "exitCode"]
  8763. }
  8764. },
  8765. "required": ["type", "properties"]
  8766. },
  8767. "Event.pty.deleted": {
  8768. "type": "object",
  8769. "properties": {
  8770. "type": {
  8771. "type": "string",
  8772. "const": "pty.deleted"
  8773. },
  8774. "properties": {
  8775. "type": "object",
  8776. "properties": {
  8777. "id": {
  8778. "type": "string",
  8779. "pattern": "^pty.*"
  8780. }
  8781. },
  8782. "required": ["id"]
  8783. }
  8784. },
  8785. "required": ["type", "properties"]
  8786. },
  8787. "Event.workspace.ready": {
  8788. "type": "object",
  8789. "properties": {
  8790. "type": {
  8791. "type": "string",
  8792. "const": "workspace.ready"
  8793. },
  8794. "properties": {
  8795. "type": "object",
  8796. "properties": {
  8797. "name": {
  8798. "type": "string"
  8799. }
  8800. },
  8801. "required": ["name"]
  8802. }
  8803. },
  8804. "required": ["type", "properties"]
  8805. },
  8806. "Event.workspace.failed": {
  8807. "type": "object",
  8808. "properties": {
  8809. "type": {
  8810. "type": "string",
  8811. "const": "workspace.failed"
  8812. },
  8813. "properties": {
  8814. "type": "object",
  8815. "properties": {
  8816. "message": {
  8817. "type": "string"
  8818. }
  8819. },
  8820. "required": ["message"]
  8821. }
  8822. },
  8823. "required": ["type", "properties"]
  8824. },
  8825. "Event.workspace.restore": {
  8826. "type": "object",
  8827. "properties": {
  8828. "type": {
  8829. "type": "string",
  8830. "const": "workspace.restore"
  8831. },
  8832. "properties": {
  8833. "type": "object",
  8834. "properties": {
  8835. "workspaceID": {
  8836. "type": "string",
  8837. "pattern": "^wrk.*"
  8838. },
  8839. "sessionID": {
  8840. "type": "string",
  8841. "pattern": "^ses.*"
  8842. },
  8843. "total": {
  8844. "type": "integer",
  8845. "minimum": 0,
  8846. "maximum": 9007199254740991
  8847. },
  8848. "step": {
  8849. "type": "integer",
  8850. "minimum": 0,
  8851. "maximum": 9007199254740991
  8852. }
  8853. },
  8854. "required": ["workspaceID", "sessionID", "total", "step"]
  8855. }
  8856. },
  8857. "required": ["type", "properties"]
  8858. },
  8859. "Event.workspace.status": {
  8860. "type": "object",
  8861. "properties": {
  8862. "type": {
  8863. "type": "string",
  8864. "const": "workspace.status"
  8865. },
  8866. "properties": {
  8867. "type": "object",
  8868. "properties": {
  8869. "workspaceID": {
  8870. "type": "string",
  8871. "pattern": "^wrk.*"
  8872. },
  8873. "status": {
  8874. "type": "string",
  8875. "enum": ["connected", "connecting", "disconnected", "error"]
  8876. }
  8877. },
  8878. "required": ["workspaceID", "status"]
  8879. }
  8880. },
  8881. "required": ["type", "properties"]
  8882. },
  8883. "OutputFormatText": {
  8884. "type": "object",
  8885. "properties": {
  8886. "type": {
  8887. "type": "string",
  8888. "const": "text"
  8889. }
  8890. },
  8891. "required": ["type"]
  8892. },
  8893. "JSONSchema": {
  8894. "type": "object",
  8895. "propertyNames": {
  8896. "type": "string"
  8897. },
  8898. "additionalProperties": {}
  8899. },
  8900. "OutputFormatJsonSchema": {
  8901. "type": "object",
  8902. "properties": {
  8903. "type": {
  8904. "type": "string",
  8905. "const": "json_schema"
  8906. },
  8907. "schema": {
  8908. "$ref": "#/components/schemas/JSONSchema"
  8909. },
  8910. "retryCount": {
  8911. "default": 2,
  8912. "type": "integer",
  8913. "minimum": 0,
  8914. "maximum": 9007199254740991
  8915. }
  8916. },
  8917. "required": ["type", "schema"]
  8918. },
  8919. "OutputFormat": {
  8920. "anyOf": [
  8921. {
  8922. "$ref": "#/components/schemas/OutputFormatText"
  8923. },
  8924. {
  8925. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  8926. }
  8927. ]
  8928. },
  8929. "UserMessage": {
  8930. "type": "object",
  8931. "properties": {
  8932. "id": {
  8933. "type": "string",
  8934. "pattern": "^msg.*"
  8935. },
  8936. "sessionID": {
  8937. "type": "string",
  8938. "pattern": "^ses.*"
  8939. },
  8940. "role": {
  8941. "type": "string",
  8942. "const": "user"
  8943. },
  8944. "time": {
  8945. "type": "object",
  8946. "properties": {
  8947. "created": {
  8948. "type": "number"
  8949. }
  8950. },
  8951. "required": ["created"]
  8952. },
  8953. "format": {
  8954. "$ref": "#/components/schemas/OutputFormat"
  8955. },
  8956. "summary": {
  8957. "type": "object",
  8958. "properties": {
  8959. "title": {
  8960. "type": "string"
  8961. },
  8962. "body": {
  8963. "type": "string"
  8964. },
  8965. "diffs": {
  8966. "type": "array",
  8967. "items": {
  8968. "$ref": "#/components/schemas/SnapshotFileDiff"
  8969. }
  8970. }
  8971. },
  8972. "required": ["diffs"]
  8973. },
  8974. "agent": {
  8975. "type": "string"
  8976. },
  8977. "model": {
  8978. "type": "object",
  8979. "properties": {
  8980. "providerID": {
  8981. "type": "string"
  8982. },
  8983. "modelID": {
  8984. "type": "string"
  8985. },
  8986. "variant": {
  8987. "type": "string"
  8988. }
  8989. },
  8990. "required": ["providerID", "modelID"]
  8991. },
  8992. "system": {
  8993. "type": "string"
  8994. },
  8995. "tools": {
  8996. "type": "object",
  8997. "propertyNames": {
  8998. "type": "string"
  8999. },
  9000. "additionalProperties": {
  9001. "type": "boolean"
  9002. }
  9003. }
  9004. },
  9005. "required": ["id", "sessionID", "role", "time", "agent", "model"]
  9006. },
  9007. "AssistantMessage": {
  9008. "type": "object",
  9009. "properties": {
  9010. "id": {
  9011. "type": "string",
  9012. "pattern": "^msg.*"
  9013. },
  9014. "sessionID": {
  9015. "type": "string",
  9016. "pattern": "^ses.*"
  9017. },
  9018. "role": {
  9019. "type": "string",
  9020. "const": "assistant"
  9021. },
  9022. "time": {
  9023. "type": "object",
  9024. "properties": {
  9025. "created": {
  9026. "type": "number"
  9027. },
  9028. "completed": {
  9029. "type": "number"
  9030. }
  9031. },
  9032. "required": ["created"]
  9033. },
  9034. "error": {
  9035. "anyOf": [
  9036. {
  9037. "$ref": "#/components/schemas/ProviderAuthError"
  9038. },
  9039. {
  9040. "$ref": "#/components/schemas/UnknownError"
  9041. },
  9042. {
  9043. "$ref": "#/components/schemas/MessageOutputLengthError"
  9044. },
  9045. {
  9046. "$ref": "#/components/schemas/MessageAbortedError"
  9047. },
  9048. {
  9049. "$ref": "#/components/schemas/StructuredOutputError"
  9050. },
  9051. {
  9052. "$ref": "#/components/schemas/ContextOverflowError"
  9053. },
  9054. {
  9055. "$ref": "#/components/schemas/APIError"
  9056. }
  9057. ]
  9058. },
  9059. "parentID": {
  9060. "type": "string",
  9061. "pattern": "^msg.*"
  9062. },
  9063. "modelID": {
  9064. "type": "string"
  9065. },
  9066. "providerID": {
  9067. "type": "string"
  9068. },
  9069. "mode": {
  9070. "type": "string"
  9071. },
  9072. "agent": {
  9073. "type": "string"
  9074. },
  9075. "path": {
  9076. "type": "object",
  9077. "properties": {
  9078. "cwd": {
  9079. "type": "string"
  9080. },
  9081. "root": {
  9082. "type": "string"
  9083. }
  9084. },
  9085. "required": ["cwd", "root"]
  9086. },
  9087. "summary": {
  9088. "type": "boolean"
  9089. },
  9090. "cost": {
  9091. "type": "number"
  9092. },
  9093. "tokens": {
  9094. "type": "object",
  9095. "properties": {
  9096. "total": {
  9097. "type": "number"
  9098. },
  9099. "input": {
  9100. "type": "number"
  9101. },
  9102. "output": {
  9103. "type": "number"
  9104. },
  9105. "reasoning": {
  9106. "type": "number"
  9107. },
  9108. "cache": {
  9109. "type": "object",
  9110. "properties": {
  9111. "read": {
  9112. "type": "number"
  9113. },
  9114. "write": {
  9115. "type": "number"
  9116. }
  9117. },
  9118. "required": ["read", "write"]
  9119. }
  9120. },
  9121. "required": ["input", "output", "reasoning", "cache"]
  9122. },
  9123. "structured": {},
  9124. "variant": {
  9125. "type": "string"
  9126. },
  9127. "finish": {
  9128. "type": "string"
  9129. }
  9130. },
  9131. "required": [
  9132. "id",
  9133. "sessionID",
  9134. "role",
  9135. "time",
  9136. "parentID",
  9137. "modelID",
  9138. "providerID",
  9139. "mode",
  9140. "agent",
  9141. "path",
  9142. "cost",
  9143. "tokens"
  9144. ]
  9145. },
  9146. "Message": {
  9147. "anyOf": [
  9148. {
  9149. "$ref": "#/components/schemas/UserMessage"
  9150. },
  9151. {
  9152. "$ref": "#/components/schemas/AssistantMessage"
  9153. }
  9154. ]
  9155. },
  9156. "Event.message.updated": {
  9157. "type": "object",
  9158. "properties": {
  9159. "type": {
  9160. "type": "string",
  9161. "const": "message.updated"
  9162. },
  9163. "properties": {
  9164. "type": "object",
  9165. "properties": {
  9166. "sessionID": {
  9167. "type": "string",
  9168. "pattern": "^ses.*"
  9169. },
  9170. "info": {
  9171. "$ref": "#/components/schemas/Message"
  9172. }
  9173. },
  9174. "required": ["sessionID", "info"]
  9175. }
  9176. },
  9177. "required": ["type", "properties"]
  9178. },
  9179. "Event.message.removed": {
  9180. "type": "object",
  9181. "properties": {
  9182. "type": {
  9183. "type": "string",
  9184. "const": "message.removed"
  9185. },
  9186. "properties": {
  9187. "type": "object",
  9188. "properties": {
  9189. "sessionID": {
  9190. "type": "string",
  9191. "pattern": "^ses.*"
  9192. },
  9193. "messageID": {
  9194. "type": "string",
  9195. "pattern": "^msg.*"
  9196. }
  9197. },
  9198. "required": ["sessionID", "messageID"]
  9199. }
  9200. },
  9201. "required": ["type", "properties"]
  9202. },
  9203. "TextPart": {
  9204. "type": "object",
  9205. "properties": {
  9206. "id": {
  9207. "type": "string",
  9208. "pattern": "^prt.*"
  9209. },
  9210. "sessionID": {
  9211. "type": "string",
  9212. "pattern": "^ses.*"
  9213. },
  9214. "messageID": {
  9215. "type": "string",
  9216. "pattern": "^msg.*"
  9217. },
  9218. "type": {
  9219. "type": "string",
  9220. "const": "text"
  9221. },
  9222. "text": {
  9223. "type": "string"
  9224. },
  9225. "synthetic": {
  9226. "type": "boolean"
  9227. },
  9228. "ignored": {
  9229. "type": "boolean"
  9230. },
  9231. "time": {
  9232. "type": "object",
  9233. "properties": {
  9234. "start": {
  9235. "type": "number"
  9236. },
  9237. "end": {
  9238. "type": "number"
  9239. }
  9240. },
  9241. "required": ["start"]
  9242. },
  9243. "metadata": {
  9244. "type": "object",
  9245. "propertyNames": {
  9246. "type": "string"
  9247. },
  9248. "additionalProperties": {}
  9249. }
  9250. },
  9251. "required": ["id", "sessionID", "messageID", "type", "text"]
  9252. },
  9253. "SubtaskPart": {
  9254. "type": "object",
  9255. "properties": {
  9256. "id": {
  9257. "type": "string",
  9258. "pattern": "^prt.*"
  9259. },
  9260. "sessionID": {
  9261. "type": "string",
  9262. "pattern": "^ses.*"
  9263. },
  9264. "messageID": {
  9265. "type": "string",
  9266. "pattern": "^msg.*"
  9267. },
  9268. "type": {
  9269. "type": "string",
  9270. "const": "subtask"
  9271. },
  9272. "prompt": {
  9273. "type": "string"
  9274. },
  9275. "description": {
  9276. "type": "string"
  9277. },
  9278. "agent": {
  9279. "type": "string"
  9280. },
  9281. "model": {
  9282. "type": "object",
  9283. "properties": {
  9284. "providerID": {
  9285. "type": "string"
  9286. },
  9287. "modelID": {
  9288. "type": "string"
  9289. }
  9290. },
  9291. "required": ["providerID", "modelID"]
  9292. },
  9293. "command": {
  9294. "type": "string"
  9295. }
  9296. },
  9297. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"]
  9298. },
  9299. "ReasoningPart": {
  9300. "type": "object",
  9301. "properties": {
  9302. "id": {
  9303. "type": "string",
  9304. "pattern": "^prt.*"
  9305. },
  9306. "sessionID": {
  9307. "type": "string",
  9308. "pattern": "^ses.*"
  9309. },
  9310. "messageID": {
  9311. "type": "string",
  9312. "pattern": "^msg.*"
  9313. },
  9314. "type": {
  9315. "type": "string",
  9316. "const": "reasoning"
  9317. },
  9318. "text": {
  9319. "type": "string"
  9320. },
  9321. "metadata": {
  9322. "type": "object",
  9323. "propertyNames": {
  9324. "type": "string"
  9325. },
  9326. "additionalProperties": {}
  9327. },
  9328. "time": {
  9329. "type": "object",
  9330. "properties": {
  9331. "start": {
  9332. "type": "number"
  9333. },
  9334. "end": {
  9335. "type": "number"
  9336. }
  9337. },
  9338. "required": ["start"]
  9339. }
  9340. },
  9341. "required": ["id", "sessionID", "messageID", "type", "text", "time"]
  9342. },
  9343. "FilePartSourceText": {
  9344. "type": "object",
  9345. "properties": {
  9346. "value": {
  9347. "type": "string"
  9348. },
  9349. "start": {
  9350. "type": "integer",
  9351. "minimum": -9007199254740991,
  9352. "maximum": 9007199254740991
  9353. },
  9354. "end": {
  9355. "type": "integer",
  9356. "minimum": -9007199254740991,
  9357. "maximum": 9007199254740991
  9358. }
  9359. },
  9360. "required": ["value", "start", "end"]
  9361. },
  9362. "FileSource": {
  9363. "type": "object",
  9364. "properties": {
  9365. "text": {
  9366. "$ref": "#/components/schemas/FilePartSourceText"
  9367. },
  9368. "type": {
  9369. "type": "string",
  9370. "const": "file"
  9371. },
  9372. "path": {
  9373. "type": "string"
  9374. }
  9375. },
  9376. "required": ["text", "type", "path"]
  9377. },
  9378. "Range": {
  9379. "type": "object",
  9380. "properties": {
  9381. "start": {
  9382. "type": "object",
  9383. "properties": {
  9384. "line": {
  9385. "type": "number"
  9386. },
  9387. "character": {
  9388. "type": "number"
  9389. }
  9390. },
  9391. "required": ["line", "character"]
  9392. },
  9393. "end": {
  9394. "type": "object",
  9395. "properties": {
  9396. "line": {
  9397. "type": "number"
  9398. },
  9399. "character": {
  9400. "type": "number"
  9401. }
  9402. },
  9403. "required": ["line", "character"]
  9404. }
  9405. },
  9406. "required": ["start", "end"]
  9407. },
  9408. "SymbolSource": {
  9409. "type": "object",
  9410. "properties": {
  9411. "text": {
  9412. "$ref": "#/components/schemas/FilePartSourceText"
  9413. },
  9414. "type": {
  9415. "type": "string",
  9416. "const": "symbol"
  9417. },
  9418. "path": {
  9419. "type": "string"
  9420. },
  9421. "range": {
  9422. "$ref": "#/components/schemas/Range"
  9423. },
  9424. "name": {
  9425. "type": "string"
  9426. },
  9427. "kind": {
  9428. "type": "integer",
  9429. "minimum": -9007199254740991,
  9430. "maximum": 9007199254740991
  9431. }
  9432. },
  9433. "required": ["text", "type", "path", "range", "name", "kind"]
  9434. },
  9435. "ResourceSource": {
  9436. "type": "object",
  9437. "properties": {
  9438. "text": {
  9439. "$ref": "#/components/schemas/FilePartSourceText"
  9440. },
  9441. "type": {
  9442. "type": "string",
  9443. "const": "resource"
  9444. },
  9445. "clientName": {
  9446. "type": "string"
  9447. },
  9448. "uri": {
  9449. "type": "string"
  9450. }
  9451. },
  9452. "required": ["text", "type", "clientName", "uri"]
  9453. },
  9454. "FilePartSource": {
  9455. "anyOf": [
  9456. {
  9457. "$ref": "#/components/schemas/FileSource"
  9458. },
  9459. {
  9460. "$ref": "#/components/schemas/SymbolSource"
  9461. },
  9462. {
  9463. "$ref": "#/components/schemas/ResourceSource"
  9464. }
  9465. ]
  9466. },
  9467. "FilePart": {
  9468. "type": "object",
  9469. "properties": {
  9470. "id": {
  9471. "type": "string",
  9472. "pattern": "^prt.*"
  9473. },
  9474. "sessionID": {
  9475. "type": "string",
  9476. "pattern": "^ses.*"
  9477. },
  9478. "messageID": {
  9479. "type": "string",
  9480. "pattern": "^msg.*"
  9481. },
  9482. "type": {
  9483. "type": "string",
  9484. "const": "file"
  9485. },
  9486. "mime": {
  9487. "type": "string"
  9488. },
  9489. "filename": {
  9490. "type": "string"
  9491. },
  9492. "url": {
  9493. "type": "string"
  9494. },
  9495. "source": {
  9496. "$ref": "#/components/schemas/FilePartSource"
  9497. }
  9498. },
  9499. "required": ["id", "sessionID", "messageID", "type", "mime", "url"]
  9500. },
  9501. "ToolStatePending": {
  9502. "type": "object",
  9503. "properties": {
  9504. "status": {
  9505. "type": "string",
  9506. "const": "pending"
  9507. },
  9508. "input": {
  9509. "type": "object",
  9510. "propertyNames": {
  9511. "type": "string"
  9512. },
  9513. "additionalProperties": {}
  9514. },
  9515. "raw": {
  9516. "type": "string"
  9517. }
  9518. },
  9519. "required": ["status", "input", "raw"]
  9520. },
  9521. "ToolStateRunning": {
  9522. "type": "object",
  9523. "properties": {
  9524. "status": {
  9525. "type": "string",
  9526. "const": "running"
  9527. },
  9528. "input": {
  9529. "type": "object",
  9530. "propertyNames": {
  9531. "type": "string"
  9532. },
  9533. "additionalProperties": {}
  9534. },
  9535. "title": {
  9536. "type": "string"
  9537. },
  9538. "metadata": {
  9539. "type": "object",
  9540. "propertyNames": {
  9541. "type": "string"
  9542. },
  9543. "additionalProperties": {}
  9544. },
  9545. "time": {
  9546. "type": "object",
  9547. "properties": {
  9548. "start": {
  9549. "type": "number"
  9550. }
  9551. },
  9552. "required": ["start"]
  9553. }
  9554. },
  9555. "required": ["status", "input", "time"]
  9556. },
  9557. "ToolStateCompleted": {
  9558. "type": "object",
  9559. "properties": {
  9560. "status": {
  9561. "type": "string",
  9562. "const": "completed"
  9563. },
  9564. "input": {
  9565. "type": "object",
  9566. "propertyNames": {
  9567. "type": "string"
  9568. },
  9569. "additionalProperties": {}
  9570. },
  9571. "output": {
  9572. "type": "string"
  9573. },
  9574. "title": {
  9575. "type": "string"
  9576. },
  9577. "metadata": {
  9578. "type": "object",
  9579. "propertyNames": {
  9580. "type": "string"
  9581. },
  9582. "additionalProperties": {}
  9583. },
  9584. "time": {
  9585. "type": "object",
  9586. "properties": {
  9587. "start": {
  9588. "type": "number"
  9589. },
  9590. "end": {
  9591. "type": "number"
  9592. },
  9593. "compacted": {
  9594. "type": "number"
  9595. }
  9596. },
  9597. "required": ["start", "end"]
  9598. },
  9599. "attachments": {
  9600. "type": "array",
  9601. "items": {
  9602. "$ref": "#/components/schemas/FilePart"
  9603. }
  9604. }
  9605. },
  9606. "required": ["status", "input", "output", "title", "metadata", "time"]
  9607. },
  9608. "ToolStateError": {
  9609. "type": "object",
  9610. "properties": {
  9611. "status": {
  9612. "type": "string",
  9613. "const": "error"
  9614. },
  9615. "input": {
  9616. "type": "object",
  9617. "propertyNames": {
  9618. "type": "string"
  9619. },
  9620. "additionalProperties": {}
  9621. },
  9622. "error": {
  9623. "type": "string"
  9624. },
  9625. "metadata": {
  9626. "type": "object",
  9627. "propertyNames": {
  9628. "type": "string"
  9629. },
  9630. "additionalProperties": {}
  9631. },
  9632. "time": {
  9633. "type": "object",
  9634. "properties": {
  9635. "start": {
  9636. "type": "number"
  9637. },
  9638. "end": {
  9639. "type": "number"
  9640. }
  9641. },
  9642. "required": ["start", "end"]
  9643. }
  9644. },
  9645. "required": ["status", "input", "error", "time"]
  9646. },
  9647. "ToolState": {
  9648. "anyOf": [
  9649. {
  9650. "$ref": "#/components/schemas/ToolStatePending"
  9651. },
  9652. {
  9653. "$ref": "#/components/schemas/ToolStateRunning"
  9654. },
  9655. {
  9656. "$ref": "#/components/schemas/ToolStateCompleted"
  9657. },
  9658. {
  9659. "$ref": "#/components/schemas/ToolStateError"
  9660. }
  9661. ]
  9662. },
  9663. "ToolPart": {
  9664. "type": "object",
  9665. "properties": {
  9666. "id": {
  9667. "type": "string",
  9668. "pattern": "^prt.*"
  9669. },
  9670. "sessionID": {
  9671. "type": "string",
  9672. "pattern": "^ses.*"
  9673. },
  9674. "messageID": {
  9675. "type": "string",
  9676. "pattern": "^msg.*"
  9677. },
  9678. "type": {
  9679. "type": "string",
  9680. "const": "tool"
  9681. },
  9682. "callID": {
  9683. "type": "string"
  9684. },
  9685. "tool": {
  9686. "type": "string"
  9687. },
  9688. "state": {
  9689. "$ref": "#/components/schemas/ToolState"
  9690. },
  9691. "metadata": {
  9692. "type": "object",
  9693. "propertyNames": {
  9694. "type": "string"
  9695. },
  9696. "additionalProperties": {}
  9697. }
  9698. },
  9699. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"]
  9700. },
  9701. "StepStartPart": {
  9702. "type": "object",
  9703. "properties": {
  9704. "id": {
  9705. "type": "string",
  9706. "pattern": "^prt.*"
  9707. },
  9708. "sessionID": {
  9709. "type": "string",
  9710. "pattern": "^ses.*"
  9711. },
  9712. "messageID": {
  9713. "type": "string",
  9714. "pattern": "^msg.*"
  9715. },
  9716. "type": {
  9717. "type": "string",
  9718. "const": "step-start"
  9719. },
  9720. "snapshot": {
  9721. "type": "string"
  9722. }
  9723. },
  9724. "required": ["id", "sessionID", "messageID", "type"]
  9725. },
  9726. "StepFinishPart": {
  9727. "type": "object",
  9728. "properties": {
  9729. "id": {
  9730. "type": "string",
  9731. "pattern": "^prt.*"
  9732. },
  9733. "sessionID": {
  9734. "type": "string",
  9735. "pattern": "^ses.*"
  9736. },
  9737. "messageID": {
  9738. "type": "string",
  9739. "pattern": "^msg.*"
  9740. },
  9741. "type": {
  9742. "type": "string",
  9743. "const": "step-finish"
  9744. },
  9745. "reason": {
  9746. "type": "string"
  9747. },
  9748. "snapshot": {
  9749. "type": "string"
  9750. },
  9751. "cost": {
  9752. "type": "number"
  9753. },
  9754. "tokens": {
  9755. "type": "object",
  9756. "properties": {
  9757. "total": {
  9758. "type": "number"
  9759. },
  9760. "input": {
  9761. "type": "number"
  9762. },
  9763. "output": {
  9764. "type": "number"
  9765. },
  9766. "reasoning": {
  9767. "type": "number"
  9768. },
  9769. "cache": {
  9770. "type": "object",
  9771. "properties": {
  9772. "read": {
  9773. "type": "number"
  9774. },
  9775. "write": {
  9776. "type": "number"
  9777. }
  9778. },
  9779. "required": ["read", "write"]
  9780. }
  9781. },
  9782. "required": ["input", "output", "reasoning", "cache"]
  9783. }
  9784. },
  9785. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"]
  9786. },
  9787. "SnapshotPart": {
  9788. "type": "object",
  9789. "properties": {
  9790. "id": {
  9791. "type": "string",
  9792. "pattern": "^prt.*"
  9793. },
  9794. "sessionID": {
  9795. "type": "string",
  9796. "pattern": "^ses.*"
  9797. },
  9798. "messageID": {
  9799. "type": "string",
  9800. "pattern": "^msg.*"
  9801. },
  9802. "type": {
  9803. "type": "string",
  9804. "const": "snapshot"
  9805. },
  9806. "snapshot": {
  9807. "type": "string"
  9808. }
  9809. },
  9810. "required": ["id", "sessionID", "messageID", "type", "snapshot"]
  9811. },
  9812. "PatchPart": {
  9813. "type": "object",
  9814. "properties": {
  9815. "id": {
  9816. "type": "string",
  9817. "pattern": "^prt.*"
  9818. },
  9819. "sessionID": {
  9820. "type": "string",
  9821. "pattern": "^ses.*"
  9822. },
  9823. "messageID": {
  9824. "type": "string",
  9825. "pattern": "^msg.*"
  9826. },
  9827. "type": {
  9828. "type": "string",
  9829. "const": "patch"
  9830. },
  9831. "hash": {
  9832. "type": "string"
  9833. },
  9834. "files": {
  9835. "type": "array",
  9836. "items": {
  9837. "type": "string"
  9838. }
  9839. }
  9840. },
  9841. "required": ["id", "sessionID", "messageID", "type", "hash", "files"]
  9842. },
  9843. "AgentPart": {
  9844. "type": "object",
  9845. "properties": {
  9846. "id": {
  9847. "type": "string",
  9848. "pattern": "^prt.*"
  9849. },
  9850. "sessionID": {
  9851. "type": "string",
  9852. "pattern": "^ses.*"
  9853. },
  9854. "messageID": {
  9855. "type": "string",
  9856. "pattern": "^msg.*"
  9857. },
  9858. "type": {
  9859. "type": "string",
  9860. "const": "agent"
  9861. },
  9862. "name": {
  9863. "type": "string"
  9864. },
  9865. "source": {
  9866. "type": "object",
  9867. "properties": {
  9868. "value": {
  9869. "type": "string"
  9870. },
  9871. "start": {
  9872. "type": "integer",
  9873. "minimum": -9007199254740991,
  9874. "maximum": 9007199254740991
  9875. },
  9876. "end": {
  9877. "type": "integer",
  9878. "minimum": -9007199254740991,
  9879. "maximum": 9007199254740991
  9880. }
  9881. },
  9882. "required": ["value", "start", "end"]
  9883. }
  9884. },
  9885. "required": ["id", "sessionID", "messageID", "type", "name"]
  9886. },
  9887. "RetryPart": {
  9888. "type": "object",
  9889. "properties": {
  9890. "id": {
  9891. "type": "string",
  9892. "pattern": "^prt.*"
  9893. },
  9894. "sessionID": {
  9895. "type": "string",
  9896. "pattern": "^ses.*"
  9897. },
  9898. "messageID": {
  9899. "type": "string",
  9900. "pattern": "^msg.*"
  9901. },
  9902. "type": {
  9903. "type": "string",
  9904. "const": "retry"
  9905. },
  9906. "attempt": {
  9907. "type": "number"
  9908. },
  9909. "error": {
  9910. "$ref": "#/components/schemas/APIError"
  9911. },
  9912. "time": {
  9913. "type": "object",
  9914. "properties": {
  9915. "created": {
  9916. "type": "number"
  9917. }
  9918. },
  9919. "required": ["created"]
  9920. }
  9921. },
  9922. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"]
  9923. },
  9924. "CompactionPart": {
  9925. "type": "object",
  9926. "properties": {
  9927. "id": {
  9928. "type": "string",
  9929. "pattern": "^prt.*"
  9930. },
  9931. "sessionID": {
  9932. "type": "string",
  9933. "pattern": "^ses.*"
  9934. },
  9935. "messageID": {
  9936. "type": "string",
  9937. "pattern": "^msg.*"
  9938. },
  9939. "type": {
  9940. "type": "string",
  9941. "const": "compaction"
  9942. },
  9943. "auto": {
  9944. "type": "boolean"
  9945. },
  9946. "overflow": {
  9947. "type": "boolean"
  9948. },
  9949. "tail_start_id": {
  9950. "type": "string",
  9951. "pattern": "^msg.*"
  9952. }
  9953. },
  9954. "required": ["id", "sessionID", "messageID", "type", "auto"]
  9955. },
  9956. "Part": {
  9957. "anyOf": [
  9958. {
  9959. "$ref": "#/components/schemas/TextPart"
  9960. },
  9961. {
  9962. "$ref": "#/components/schemas/SubtaskPart"
  9963. },
  9964. {
  9965. "$ref": "#/components/schemas/ReasoningPart"
  9966. },
  9967. {
  9968. "$ref": "#/components/schemas/FilePart"
  9969. },
  9970. {
  9971. "$ref": "#/components/schemas/ToolPart"
  9972. },
  9973. {
  9974. "$ref": "#/components/schemas/StepStartPart"
  9975. },
  9976. {
  9977. "$ref": "#/components/schemas/StepFinishPart"
  9978. },
  9979. {
  9980. "$ref": "#/components/schemas/SnapshotPart"
  9981. },
  9982. {
  9983. "$ref": "#/components/schemas/PatchPart"
  9984. },
  9985. {
  9986. "$ref": "#/components/schemas/AgentPart"
  9987. },
  9988. {
  9989. "$ref": "#/components/schemas/RetryPart"
  9990. },
  9991. {
  9992. "$ref": "#/components/schemas/CompactionPart"
  9993. }
  9994. ]
  9995. },
  9996. "Event.message.part.updated": {
  9997. "type": "object",
  9998. "properties": {
  9999. "type": {
  10000. "type": "string",
  10001. "const": "message.part.updated"
  10002. },
  10003. "properties": {
  10004. "type": "object",
  10005. "properties": {
  10006. "sessionID": {
  10007. "type": "string",
  10008. "pattern": "^ses.*"
  10009. },
  10010. "part": {
  10011. "$ref": "#/components/schemas/Part"
  10012. },
  10013. "time": {
  10014. "type": "number"
  10015. }
  10016. },
  10017. "required": ["sessionID", "part", "time"]
  10018. }
  10019. },
  10020. "required": ["type", "properties"]
  10021. },
  10022. "Event.message.part.removed": {
  10023. "type": "object",
  10024. "properties": {
  10025. "type": {
  10026. "type": "string",
  10027. "const": "message.part.removed"
  10028. },
  10029. "properties": {
  10030. "type": "object",
  10031. "properties": {
  10032. "sessionID": {
  10033. "type": "string",
  10034. "pattern": "^ses.*"
  10035. },
  10036. "messageID": {
  10037. "type": "string",
  10038. "pattern": "^msg.*"
  10039. },
  10040. "partID": {
  10041. "type": "string",
  10042. "pattern": "^prt.*"
  10043. }
  10044. },
  10045. "required": ["sessionID", "messageID", "partID"]
  10046. }
  10047. },
  10048. "required": ["type", "properties"]
  10049. },
  10050. "PermissionAction": {
  10051. "type": "string",
  10052. "enum": ["allow", "deny", "ask"]
  10053. },
  10054. "PermissionRule": {
  10055. "type": "object",
  10056. "properties": {
  10057. "permission": {
  10058. "type": "string"
  10059. },
  10060. "pattern": {
  10061. "type": "string"
  10062. },
  10063. "action": {
  10064. "$ref": "#/components/schemas/PermissionAction"
  10065. }
  10066. },
  10067. "required": ["permission", "pattern", "action"]
  10068. },
  10069. "PermissionRuleset": {
  10070. "type": "array",
  10071. "items": {
  10072. "$ref": "#/components/schemas/PermissionRule"
  10073. }
  10074. },
  10075. "Session": {
  10076. "type": "object",
  10077. "properties": {
  10078. "id": {
  10079. "type": "string",
  10080. "pattern": "^ses.*"
  10081. },
  10082. "slug": {
  10083. "type": "string"
  10084. },
  10085. "projectID": {
  10086. "type": "string"
  10087. },
  10088. "workspaceID": {
  10089. "type": "string",
  10090. "pattern": "^wrk.*"
  10091. },
  10092. "directory": {
  10093. "type": "string"
  10094. },
  10095. "parentID": {
  10096. "type": "string",
  10097. "pattern": "^ses.*"
  10098. },
  10099. "summary": {
  10100. "type": "object",
  10101. "properties": {
  10102. "additions": {
  10103. "type": "number"
  10104. },
  10105. "deletions": {
  10106. "type": "number"
  10107. },
  10108. "files": {
  10109. "type": "number"
  10110. },
  10111. "diffs": {
  10112. "type": "array",
  10113. "items": {
  10114. "$ref": "#/components/schemas/SnapshotFileDiff"
  10115. }
  10116. }
  10117. },
  10118. "required": ["additions", "deletions", "files"]
  10119. },
  10120. "share": {
  10121. "type": "object",
  10122. "properties": {
  10123. "url": {
  10124. "type": "string"
  10125. }
  10126. },
  10127. "required": ["url"]
  10128. },
  10129. "title": {
  10130. "type": "string"
  10131. },
  10132. "version": {
  10133. "type": "string"
  10134. },
  10135. "time": {
  10136. "type": "object",
  10137. "properties": {
  10138. "created": {
  10139. "type": "number"
  10140. },
  10141. "updated": {
  10142. "type": "number"
  10143. },
  10144. "compacting": {
  10145. "type": "number"
  10146. },
  10147. "archived": {
  10148. "type": "number"
  10149. }
  10150. },
  10151. "required": ["created", "updated"]
  10152. },
  10153. "permission": {
  10154. "$ref": "#/components/schemas/PermissionRuleset"
  10155. },
  10156. "revert": {
  10157. "type": "object",
  10158. "properties": {
  10159. "messageID": {
  10160. "type": "string",
  10161. "pattern": "^msg.*"
  10162. },
  10163. "partID": {
  10164. "type": "string",
  10165. "pattern": "^prt.*"
  10166. },
  10167. "snapshot": {
  10168. "type": "string"
  10169. },
  10170. "diff": {
  10171. "type": "string"
  10172. }
  10173. },
  10174. "required": ["messageID"]
  10175. }
  10176. },
  10177. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"]
  10178. },
  10179. "Event.session.created": {
  10180. "type": "object",
  10181. "properties": {
  10182. "type": {
  10183. "type": "string",
  10184. "const": "session.created"
  10185. },
  10186. "properties": {
  10187. "type": "object",
  10188. "properties": {
  10189. "sessionID": {
  10190. "type": "string",
  10191. "pattern": "^ses.*"
  10192. },
  10193. "info": {
  10194. "$ref": "#/components/schemas/Session"
  10195. }
  10196. },
  10197. "required": ["sessionID", "info"]
  10198. }
  10199. },
  10200. "required": ["type", "properties"]
  10201. },
  10202. "Event.session.updated": {
  10203. "type": "object",
  10204. "properties": {
  10205. "type": {
  10206. "type": "string",
  10207. "const": "session.updated"
  10208. },
  10209. "properties": {
  10210. "type": "object",
  10211. "properties": {
  10212. "sessionID": {
  10213. "type": "string",
  10214. "pattern": "^ses.*"
  10215. },
  10216. "info": {
  10217. "$ref": "#/components/schemas/Session"
  10218. }
  10219. },
  10220. "required": ["sessionID", "info"]
  10221. }
  10222. },
  10223. "required": ["type", "properties"]
  10224. },
  10225. "Event.session.deleted": {
  10226. "type": "object",
  10227. "properties": {
  10228. "type": {
  10229. "type": "string",
  10230. "const": "session.deleted"
  10231. },
  10232. "properties": {
  10233. "type": "object",
  10234. "properties": {
  10235. "sessionID": {
  10236. "type": "string",
  10237. "pattern": "^ses.*"
  10238. },
  10239. "info": {
  10240. "$ref": "#/components/schemas/Session"
  10241. }
  10242. },
  10243. "required": ["sessionID", "info"]
  10244. }
  10245. },
  10246. "required": ["type", "properties"]
  10247. },
  10248. "SyncEvent.message.updated": {
  10249. "type": "object",
  10250. "properties": {
  10251. "type": {
  10252. "type": "string",
  10253. "const": "sync"
  10254. },
  10255. "name": {
  10256. "type": "string",
  10257. "const": "message.updated.1"
  10258. },
  10259. "id": {
  10260. "type": "string"
  10261. },
  10262. "seq": {
  10263. "type": "number"
  10264. },
  10265. "aggregateID": {
  10266. "type": "string",
  10267. "const": "sessionID"
  10268. },
  10269. "data": {
  10270. "type": "object",
  10271. "properties": {
  10272. "sessionID": {
  10273. "type": "string",
  10274. "pattern": "^ses.*"
  10275. },
  10276. "info": {
  10277. "$ref": "#/components/schemas/Message"
  10278. }
  10279. },
  10280. "required": ["sessionID", "info"]
  10281. }
  10282. },
  10283. "required": ["type", "name", "id", "seq", "aggregateID", "data"]
  10284. },
  10285. "SyncEvent.message.removed": {
  10286. "type": "object",
  10287. "properties": {
  10288. "type": {
  10289. "type": "string",
  10290. "const": "sync"
  10291. },
  10292. "name": {
  10293. "type": "string",
  10294. "const": "message.removed.1"
  10295. },
  10296. "id": {
  10297. "type": "string"
  10298. },
  10299. "seq": {
  10300. "type": "number"
  10301. },
  10302. "aggregateID": {
  10303. "type": "string",
  10304. "const": "sessionID"
  10305. },
  10306. "data": {
  10307. "type": "object",
  10308. "properties": {
  10309. "sessionID": {
  10310. "type": "string",
  10311. "pattern": "^ses.*"
  10312. },
  10313. "messageID": {
  10314. "type": "string",
  10315. "pattern": "^msg.*"
  10316. }
  10317. },
  10318. "required": ["sessionID", "messageID"]
  10319. }
  10320. },
  10321. "required": ["type", "name", "id", "seq", "aggregateID", "data"]
  10322. },
  10323. "SyncEvent.message.part.updated": {
  10324. "type": "object",
  10325. "properties": {
  10326. "type": {
  10327. "type": "string",
  10328. "const": "sync"
  10329. },
  10330. "name": {
  10331. "type": "string",
  10332. "const": "message.part.updated.1"
  10333. },
  10334. "id": {
  10335. "type": "string"
  10336. },
  10337. "seq": {
  10338. "type": "number"
  10339. },
  10340. "aggregateID": {
  10341. "type": "string",
  10342. "const": "sessionID"
  10343. },
  10344. "data": {
  10345. "type": "object",
  10346. "properties": {
  10347. "sessionID": {
  10348. "type": "string",
  10349. "pattern": "^ses.*"
  10350. },
  10351. "part": {
  10352. "$ref": "#/components/schemas/Part"
  10353. },
  10354. "time": {
  10355. "type": "number"
  10356. }
  10357. },
  10358. "required": ["sessionID", "part", "time"]
  10359. }
  10360. },
  10361. "required": ["type", "name", "id", "seq", "aggregateID", "data"]
  10362. },
  10363. "SyncEvent.message.part.removed": {
  10364. "type": "object",
  10365. "properties": {
  10366. "type": {
  10367. "type": "string",
  10368. "const": "sync"
  10369. },
  10370. "name": {
  10371. "type": "string",
  10372. "const": "message.part.removed.1"
  10373. },
  10374. "id": {
  10375. "type": "string"
  10376. },
  10377. "seq": {
  10378. "type": "number"
  10379. },
  10380. "aggregateID": {
  10381. "type": "string",
  10382. "const": "sessionID"
  10383. },
  10384. "data": {
  10385. "type": "object",
  10386. "properties": {
  10387. "sessionID": {
  10388. "type": "string",
  10389. "pattern": "^ses.*"
  10390. },
  10391. "messageID": {
  10392. "type": "string",
  10393. "pattern": "^msg.*"
  10394. },
  10395. "partID": {
  10396. "type": "string",
  10397. "pattern": "^prt.*"
  10398. }
  10399. },
  10400. "required": ["sessionID", "messageID", "partID"]
  10401. }
  10402. },
  10403. "required": ["type", "name", "id", "seq", "aggregateID", "data"]
  10404. },
  10405. "SyncEvent.session.created": {
  10406. "type": "object",
  10407. "properties": {
  10408. "type": {
  10409. "type": "string",
  10410. "const": "sync"
  10411. },
  10412. "name": {
  10413. "type": "string",
  10414. "const": "session.created.1"
  10415. },
  10416. "id": {
  10417. "type": "string"
  10418. },
  10419. "seq": {
  10420. "type": "number"
  10421. },
  10422. "aggregateID": {
  10423. "type": "string",
  10424. "const": "sessionID"
  10425. },
  10426. "data": {
  10427. "type": "object",
  10428. "properties": {
  10429. "sessionID": {
  10430. "type": "string",
  10431. "pattern": "^ses.*"
  10432. },
  10433. "info": {
  10434. "$ref": "#/components/schemas/Session"
  10435. }
  10436. },
  10437. "required": ["sessionID", "info"]
  10438. }
  10439. },
  10440. "required": ["type", "name", "id", "seq", "aggregateID", "data"]
  10441. },
  10442. "SyncEvent.session.updated": {
  10443. "type": "object",
  10444. "properties": {
  10445. "type": {
  10446. "type": "string",
  10447. "const": "sync"
  10448. },
  10449. "name": {
  10450. "type": "string",
  10451. "const": "session.updated.1"
  10452. },
  10453. "id": {
  10454. "type": "string"
  10455. },
  10456. "seq": {
  10457. "type": "number"
  10458. },
  10459. "aggregateID": {
  10460. "type": "string",
  10461. "const": "sessionID"
  10462. },
  10463. "data": {
  10464. "type": "object",
  10465. "properties": {
  10466. "sessionID": {
  10467. "type": "string",
  10468. "pattern": "^ses.*"
  10469. },
  10470. "info": {
  10471. "type": "object",
  10472. "properties": {
  10473. "id": {
  10474. "anyOf": [
  10475. {
  10476. "type": "string",
  10477. "pattern": "^ses.*"
  10478. },
  10479. {
  10480. "type": "null"
  10481. }
  10482. ]
  10483. },
  10484. "slug": {
  10485. "anyOf": [
  10486. {
  10487. "type": "string"
  10488. },
  10489. {
  10490. "type": "null"
  10491. }
  10492. ]
  10493. },
  10494. "projectID": {
  10495. "anyOf": [
  10496. {
  10497. "type": "string"
  10498. },
  10499. {
  10500. "type": "null"
  10501. }
  10502. ]
  10503. },
  10504. "workspaceID": {
  10505. "anyOf": [
  10506. {
  10507. "type": "string",
  10508. "pattern": "^wrk.*"
  10509. },
  10510. {
  10511. "type": "null"
  10512. }
  10513. ]
  10514. },
  10515. "directory": {
  10516. "anyOf": [
  10517. {
  10518. "type": "string"
  10519. },
  10520. {
  10521. "type": "null"
  10522. }
  10523. ]
  10524. },
  10525. "parentID": {
  10526. "anyOf": [
  10527. {
  10528. "type": "string",
  10529. "pattern": "^ses.*"
  10530. },
  10531. {
  10532. "type": "null"
  10533. }
  10534. ]
  10535. },
  10536. "summary": {
  10537. "anyOf": [
  10538. {
  10539. "type": "object",
  10540. "properties": {
  10541. "additions": {
  10542. "type": "number"
  10543. },
  10544. "deletions": {
  10545. "type": "number"
  10546. },
  10547. "files": {
  10548. "type": "number"
  10549. },
  10550. "diffs": {
  10551. "type": "array",
  10552. "items": {
  10553. "$ref": "#/components/schemas/SnapshotFileDiff"
  10554. }
  10555. }
  10556. },
  10557. "required": ["additions", "deletions", "files"]
  10558. },
  10559. {
  10560. "type": "null"
  10561. }
  10562. ]
  10563. },
  10564. "share": {
  10565. "type": "object",
  10566. "properties": {
  10567. "url": {
  10568. "anyOf": [
  10569. {
  10570. "type": "string"
  10571. },
  10572. {
  10573. "type": "null"
  10574. }
  10575. ]
  10576. }
  10577. },
  10578. "required": ["url"]
  10579. },
  10580. "title": {
  10581. "anyOf": [
  10582. {
  10583. "type": "string"
  10584. },
  10585. {
  10586. "type": "null"
  10587. }
  10588. ]
  10589. },
  10590. "version": {
  10591. "anyOf": [
  10592. {
  10593. "type": "string"
  10594. },
  10595. {
  10596. "type": "null"
  10597. }
  10598. ]
  10599. },
  10600. "time": {
  10601. "type": "object",
  10602. "properties": {
  10603. "created": {
  10604. "anyOf": [
  10605. {
  10606. "type": "number"
  10607. },
  10608. {
  10609. "type": "null"
  10610. }
  10611. ]
  10612. },
  10613. "updated": {
  10614. "anyOf": [
  10615. {
  10616. "type": "number"
  10617. },
  10618. {
  10619. "type": "null"
  10620. }
  10621. ]
  10622. },
  10623. "compacting": {
  10624. "anyOf": [
  10625. {
  10626. "type": "number"
  10627. },
  10628. {
  10629. "type": "null"
  10630. }
  10631. ]
  10632. },
  10633. "archived": {
  10634. "anyOf": [
  10635. {
  10636. "type": "number"
  10637. },
  10638. {
  10639. "type": "null"
  10640. }
  10641. ]
  10642. }
  10643. },
  10644. "required": ["created", "updated", "compacting", "archived"]
  10645. },
  10646. "permission": {
  10647. "anyOf": [
  10648. {
  10649. "$ref": "#/components/schemas/PermissionRuleset"
  10650. },
  10651. {
  10652. "type": "null"
  10653. }
  10654. ]
  10655. },
  10656. "revert": {
  10657. "anyOf": [
  10658. {
  10659. "type": "object",
  10660. "properties": {
  10661. "messageID": {
  10662. "type": "string",
  10663. "pattern": "^msg.*"
  10664. },
  10665. "partID": {
  10666. "type": "string",
  10667. "pattern": "^prt.*"
  10668. },
  10669. "snapshot": {
  10670. "type": "string"
  10671. },
  10672. "diff": {
  10673. "type": "string"
  10674. }
  10675. },
  10676. "required": ["messageID"]
  10677. },
  10678. {
  10679. "type": "null"
  10680. }
  10681. ]
  10682. }
  10683. },
  10684. "required": [
  10685. "id",
  10686. "slug",
  10687. "projectID",
  10688. "workspaceID",
  10689. "directory",
  10690. "parentID",
  10691. "summary",
  10692. "title",
  10693. "version",
  10694. "permission",
  10695. "revert"
  10696. ]
  10697. }
  10698. },
  10699. "required": ["sessionID", "info"]
  10700. }
  10701. },
  10702. "required": ["type", "name", "id", "seq", "aggregateID", "data"]
  10703. },
  10704. "SyncEvent.session.deleted": {
  10705. "type": "object",
  10706. "properties": {
  10707. "type": {
  10708. "type": "string",
  10709. "const": "sync"
  10710. },
  10711. "name": {
  10712. "type": "string",
  10713. "const": "session.deleted.1"
  10714. },
  10715. "id": {
  10716. "type": "string"
  10717. },
  10718. "seq": {
  10719. "type": "number"
  10720. },
  10721. "aggregateID": {
  10722. "type": "string",
  10723. "const": "sessionID"
  10724. },
  10725. "data": {
  10726. "type": "object",
  10727. "properties": {
  10728. "sessionID": {
  10729. "type": "string",
  10730. "pattern": "^ses.*"
  10731. },
  10732. "info": {
  10733. "$ref": "#/components/schemas/Session"
  10734. }
  10735. },
  10736. "required": ["sessionID", "info"]
  10737. }
  10738. },
  10739. "required": ["type", "name", "id", "seq", "aggregateID", "data"]
  10740. },
  10741. "GlobalEvent": {
  10742. "type": "object",
  10743. "properties": {
  10744. "directory": {
  10745. "type": "string"
  10746. },
  10747. "project": {
  10748. "type": "string"
  10749. },
  10750. "workspace": {
  10751. "type": "string"
  10752. },
  10753. "payload": {
  10754. "anyOf": [
  10755. {
  10756. "$ref": "#/components/schemas/Event.project.updated"
  10757. },
  10758. {
  10759. "$ref": "#/components/schemas/Event.server.instance.disposed"
  10760. },
  10761. {
  10762. "$ref": "#/components/schemas/Event.server.connected"
  10763. },
  10764. {
  10765. "$ref": "#/components/schemas/Event.global.disposed"
  10766. },
  10767. {
  10768. "$ref": "#/components/schemas/Event.file.edited"
  10769. },
  10770. {
  10771. "$ref": "#/components/schemas/Event.file.watcher.updated"
  10772. },
  10773. {
  10774. "$ref": "#/components/schemas/Event.lsp.client.diagnostics"
  10775. },
  10776. {
  10777. "$ref": "#/components/schemas/Event.lsp.updated"
  10778. },
  10779. {
  10780. "$ref": "#/components/schemas/Event.installation.updated"
  10781. },
  10782. {
  10783. "$ref": "#/components/schemas/Event.installation.update-available"
  10784. },
  10785. {
  10786. "$ref": "#/components/schemas/Event.message.part.delta"
  10787. },
  10788. {
  10789. "$ref": "#/components/schemas/Event.permission.asked"
  10790. },
  10791. {
  10792. "$ref": "#/components/schemas/Event.permission.replied"
  10793. },
  10794. {
  10795. "$ref": "#/components/schemas/Event.session.diff"
  10796. },
  10797. {
  10798. "$ref": "#/components/schemas/Event.session.error"
  10799. },
  10800. {
  10801. "$ref": "#/components/schemas/Event.question.asked"
  10802. },
  10803. {
  10804. "$ref": "#/components/schemas/Event.question.replied"
  10805. },
  10806. {
  10807. "$ref": "#/components/schemas/Event.question.rejected"
  10808. },
  10809. {
  10810. "$ref": "#/components/schemas/Event.todo.updated"
  10811. },
  10812. {
  10813. "$ref": "#/components/schemas/Event.session.status"
  10814. },
  10815. {
  10816. "$ref": "#/components/schemas/Event.session.idle"
  10817. },
  10818. {
  10819. "$ref": "#/components/schemas/Event.session.compacted"
  10820. },
  10821. {
  10822. "$ref": "#/components/schemas/Event.tui.prompt.append"
  10823. },
  10824. {
  10825. "$ref": "#/components/schemas/Event.tui.command.execute"
  10826. },
  10827. {
  10828. "$ref": "#/components/schemas/Event.tui.toast.show"
  10829. },
  10830. {
  10831. "$ref": "#/components/schemas/Event.tui.session.select"
  10832. },
  10833. {
  10834. "$ref": "#/components/schemas/Event.mcp.tools.changed"
  10835. },
  10836. {
  10837. "$ref": "#/components/schemas/Event.mcp.browser.open.failed"
  10838. },
  10839. {
  10840. "$ref": "#/components/schemas/Event.command.executed"
  10841. },
  10842. {
  10843. "$ref": "#/components/schemas/Event.vcs.branch.updated"
  10844. },
  10845. {
  10846. "$ref": "#/components/schemas/Event.worktree.ready"
  10847. },
  10848. {
  10849. "$ref": "#/components/schemas/Event.worktree.failed"
  10850. },
  10851. {
  10852. "$ref": "#/components/schemas/Event.pty.created"
  10853. },
  10854. {
  10855. "$ref": "#/components/schemas/Event.pty.updated"
  10856. },
  10857. {
  10858. "$ref": "#/components/schemas/Event.pty.exited"
  10859. },
  10860. {
  10861. "$ref": "#/components/schemas/Event.pty.deleted"
  10862. },
  10863. {
  10864. "$ref": "#/components/schemas/Event.workspace.ready"
  10865. },
  10866. {
  10867. "$ref": "#/components/schemas/Event.workspace.failed"
  10868. },
  10869. {
  10870. "$ref": "#/components/schemas/Event.workspace.restore"
  10871. },
  10872. {
  10873. "$ref": "#/components/schemas/Event.workspace.status"
  10874. },
  10875. {
  10876. "$ref": "#/components/schemas/Event.message.updated"
  10877. },
  10878. {
  10879. "$ref": "#/components/schemas/Event.message.removed"
  10880. },
  10881. {
  10882. "$ref": "#/components/schemas/Event.message.part.updated"
  10883. },
  10884. {
  10885. "$ref": "#/components/schemas/Event.message.part.removed"
  10886. },
  10887. {
  10888. "$ref": "#/components/schemas/Event.session.created"
  10889. },
  10890. {
  10891. "$ref": "#/components/schemas/Event.session.updated"
  10892. },
  10893. {
  10894. "$ref": "#/components/schemas/Event.session.deleted"
  10895. },
  10896. {
  10897. "$ref": "#/components/schemas/SyncEvent.message.updated"
  10898. },
  10899. {
  10900. "$ref": "#/components/schemas/SyncEvent.message.removed"
  10901. },
  10902. {
  10903. "$ref": "#/components/schemas/SyncEvent.message.part.updated"
  10904. },
  10905. {
  10906. "$ref": "#/components/schemas/SyncEvent.message.part.removed"
  10907. },
  10908. {
  10909. "$ref": "#/components/schemas/SyncEvent.session.created"
  10910. },
  10911. {
  10912. "$ref": "#/components/schemas/SyncEvent.session.updated"
  10913. },
  10914. {
  10915. "$ref": "#/components/schemas/SyncEvent.session.deleted"
  10916. }
  10917. ]
  10918. }
  10919. },
  10920. "required": ["directory", "payload"]
  10921. },
  10922. "LogLevel": {
  10923. "description": "Log level",
  10924. "type": "string",
  10925. "enum": ["DEBUG", "INFO", "WARN", "ERROR"]
  10926. },
  10927. "ServerConfig": {
  10928. "description": "Server configuration for opencode serve and web commands",
  10929. "type": "object",
  10930. "properties": {
  10931. "port": {
  10932. "description": "Port to listen on",
  10933. "type": "integer",
  10934. "exclusiveMinimum": 0,
  10935. "maximum": 9007199254740991
  10936. },
  10937. "hostname": {
  10938. "description": "Hostname to listen on",
  10939. "type": "string"
  10940. },
  10941. "mdns": {
  10942. "description": "Enable mDNS service discovery",
  10943. "type": "boolean"
  10944. },
  10945. "mdnsDomain": {
  10946. "description": "Custom domain name for mDNS service (default: opencode.local)",
  10947. "type": "string"
  10948. },
  10949. "cors": {
  10950. "description": "Additional domains to allow for CORS",
  10951. "type": "array",
  10952. "items": {
  10953. "type": "string"
  10954. }
  10955. }
  10956. }
  10957. },
  10958. "PermissionActionConfig": {
  10959. "type": "string",
  10960. "enum": ["ask", "allow", "deny"]
  10961. },
  10962. "PermissionObjectConfig": {
  10963. "type": "object",
  10964. "propertyNames": {
  10965. "type": "string"
  10966. },
  10967. "additionalProperties": {
  10968. "$ref": "#/components/schemas/PermissionActionConfig"
  10969. }
  10970. },
  10971. "PermissionRuleConfig": {
  10972. "anyOf": [
  10973. {
  10974. "$ref": "#/components/schemas/PermissionActionConfig"
  10975. },
  10976. {
  10977. "$ref": "#/components/schemas/PermissionObjectConfig"
  10978. }
  10979. ]
  10980. },
  10981. "PermissionConfig": {
  10982. "anyOf": [
  10983. {
  10984. "$ref": "#/components/schemas/PermissionActionConfig"
  10985. },
  10986. {
  10987. "type": "object",
  10988. "properties": {
  10989. "read": {
  10990. "$ref": "#/components/schemas/PermissionRuleConfig"
  10991. },
  10992. "edit": {
  10993. "$ref": "#/components/schemas/PermissionRuleConfig"
  10994. },
  10995. "glob": {
  10996. "$ref": "#/components/schemas/PermissionRuleConfig"
  10997. },
  10998. "grep": {
  10999. "$ref": "#/components/schemas/PermissionRuleConfig"
  11000. },
  11001. "list": {
  11002. "$ref": "#/components/schemas/PermissionRuleConfig"
  11003. },
  11004. "bash": {
  11005. "$ref": "#/components/schemas/PermissionRuleConfig"
  11006. },
  11007. "task": {
  11008. "$ref": "#/components/schemas/PermissionRuleConfig"
  11009. },
  11010. "external_directory": {
  11011. "$ref": "#/components/schemas/PermissionRuleConfig"
  11012. },
  11013. "todowrite": {
  11014. "$ref": "#/components/schemas/PermissionActionConfig"
  11015. },
  11016. "question": {
  11017. "$ref": "#/components/schemas/PermissionActionConfig"
  11018. },
  11019. "webfetch": {
  11020. "$ref": "#/components/schemas/PermissionActionConfig"
  11021. },
  11022. "websearch": {
  11023. "$ref": "#/components/schemas/PermissionActionConfig"
  11024. },
  11025. "codesearch": {
  11026. "$ref": "#/components/schemas/PermissionActionConfig"
  11027. },
  11028. "lsp": {
  11029. "$ref": "#/components/schemas/PermissionRuleConfig"
  11030. },
  11031. "doom_loop": {
  11032. "$ref": "#/components/schemas/PermissionActionConfig"
  11033. },
  11034. "skill": {
  11035. "$ref": "#/components/schemas/PermissionRuleConfig"
  11036. }
  11037. },
  11038. "additionalProperties": {
  11039. "$ref": "#/components/schemas/PermissionRuleConfig"
  11040. }
  11041. }
  11042. ]
  11043. },
  11044. "AgentConfig": {
  11045. "type": "object",
  11046. "properties": {
  11047. "model": {
  11048. "type": "string"
  11049. },
  11050. "variant": {
  11051. "description": "Default model variant for this agent (applies only when using the agent's configured model).",
  11052. "type": "string"
  11053. },
  11054. "temperature": {
  11055. "type": "number"
  11056. },
  11057. "top_p": {
  11058. "type": "number"
  11059. },
  11060. "prompt": {
  11061. "type": "string"
  11062. },
  11063. "tools": {
  11064. "description": "@deprecated Use 'permission' field instead",
  11065. "type": "object",
  11066. "propertyNames": {
  11067. "type": "string"
  11068. },
  11069. "additionalProperties": {
  11070. "type": "boolean"
  11071. }
  11072. },
  11073. "disable": {
  11074. "type": "boolean"
  11075. },
  11076. "description": {
  11077. "description": "Description of when to use the agent",
  11078. "type": "string"
  11079. },
  11080. "mode": {
  11081. "type": "string",
  11082. "enum": ["subagent", "primary", "all"]
  11083. },
  11084. "hidden": {
  11085. "description": "Hide this subagent from the @ autocomplete menu (default: false, only applies to mode: subagent)",
  11086. "type": "boolean"
  11087. },
  11088. "options": {
  11089. "type": "object",
  11090. "propertyNames": {
  11091. "type": "string"
  11092. },
  11093. "additionalProperties": {}
  11094. },
  11095. "color": {
  11096. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)",
  11097. "anyOf": [
  11098. {
  11099. "type": "string",
  11100. "pattern": "^#[0-9a-fA-F]{6}$"
  11101. },
  11102. {
  11103. "type": "string",
  11104. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  11105. }
  11106. ]
  11107. },
  11108. "steps": {
  11109. "description": "Maximum number of agentic iterations before forcing text-only response",
  11110. "type": "integer",
  11111. "exclusiveMinimum": 0,
  11112. "maximum": 9007199254740991
  11113. },
  11114. "maxSteps": {
  11115. "description": "@deprecated Use 'steps' field instead.",
  11116. "type": "integer",
  11117. "exclusiveMinimum": 0,
  11118. "maximum": 9007199254740991
  11119. },
  11120. "permission": {
  11121. "$ref": "#/components/schemas/PermissionConfig"
  11122. }
  11123. },
  11124. "additionalProperties": {}
  11125. },
  11126. "ProviderConfig": {
  11127. "type": "object",
  11128. "properties": {
  11129. "api": {
  11130. "type": "string"
  11131. },
  11132. "name": {
  11133. "type": "string"
  11134. },
  11135. "env": {
  11136. "type": "array",
  11137. "items": {
  11138. "type": "string"
  11139. }
  11140. },
  11141. "id": {
  11142. "type": "string"
  11143. },
  11144. "npm": {
  11145. "type": "string"
  11146. },
  11147. "whitelist": {
  11148. "type": "array",
  11149. "items": {
  11150. "type": "string"
  11151. }
  11152. },
  11153. "blacklist": {
  11154. "type": "array",
  11155. "items": {
  11156. "type": "string"
  11157. }
  11158. },
  11159. "options": {
  11160. "type": "object",
  11161. "properties": {
  11162. "apiKey": {
  11163. "type": "string"
  11164. },
  11165. "baseURL": {
  11166. "type": "string"
  11167. },
  11168. "enterpriseUrl": {
  11169. "description": "GitHub Enterprise URL for copilot authentication",
  11170. "type": "string"
  11171. },
  11172. "setCacheKey": {
  11173. "description": "Enable promptCacheKey for this provider (default false)",
  11174. "type": "boolean"
  11175. },
  11176. "timeout": {
  11177. "description": "Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout.",
  11178. "anyOf": [
  11179. {
  11180. "type": "integer",
  11181. "exclusiveMinimum": 0,
  11182. "maximum": 9007199254740991
  11183. },
  11184. {
  11185. "type": "boolean",
  11186. "const": false
  11187. }
  11188. ]
  11189. },
  11190. "chunkTimeout": {
  11191. "description": "Timeout in milliseconds between streamed SSE chunks for this provider. If no chunk arrives within this window, the request is aborted.",
  11192. "type": "integer",
  11193. "exclusiveMinimum": 0,
  11194. "maximum": 9007199254740991
  11195. }
  11196. },
  11197. "additionalProperties": {}
  11198. },
  11199. "models": {
  11200. "type": "object",
  11201. "propertyNames": {
  11202. "type": "string"
  11203. },
  11204. "additionalProperties": {
  11205. "type": "object",
  11206. "properties": {
  11207. "id": {
  11208. "type": "string"
  11209. },
  11210. "name": {
  11211. "type": "string"
  11212. },
  11213. "family": {
  11214. "type": "string"
  11215. },
  11216. "release_date": {
  11217. "type": "string"
  11218. },
  11219. "attachment": {
  11220. "type": "boolean"
  11221. },
  11222. "reasoning": {
  11223. "type": "boolean"
  11224. },
  11225. "temperature": {
  11226. "type": "boolean"
  11227. },
  11228. "tool_call": {
  11229. "type": "boolean"
  11230. },
  11231. "interleaved": {
  11232. "anyOf": [
  11233. {
  11234. "type": "boolean",
  11235. "const": true
  11236. },
  11237. {
  11238. "type": "object",
  11239. "properties": {
  11240. "field": {
  11241. "type": "string",
  11242. "enum": ["reasoning_content", "reasoning_details"]
  11243. }
  11244. },
  11245. "required": ["field"]
  11246. }
  11247. ]
  11248. },
  11249. "cost": {
  11250. "type": "object",
  11251. "properties": {
  11252. "input": {
  11253. "type": "number"
  11254. },
  11255. "output": {
  11256. "type": "number"
  11257. },
  11258. "cache_read": {
  11259. "type": "number"
  11260. },
  11261. "cache_write": {
  11262. "type": "number"
  11263. },
  11264. "context_over_200k": {
  11265. "type": "object",
  11266. "properties": {
  11267. "input": {
  11268. "type": "number"
  11269. },
  11270. "output": {
  11271. "type": "number"
  11272. },
  11273. "cache_read": {
  11274. "type": "number"
  11275. },
  11276. "cache_write": {
  11277. "type": "number"
  11278. }
  11279. },
  11280. "required": ["input", "output"]
  11281. }
  11282. },
  11283. "required": ["input", "output"]
  11284. },
  11285. "limit": {
  11286. "type": "object",
  11287. "properties": {
  11288. "context": {
  11289. "type": "number"
  11290. },
  11291. "input": {
  11292. "type": "number"
  11293. },
  11294. "output": {
  11295. "type": "number"
  11296. }
  11297. },
  11298. "required": ["context", "output"]
  11299. },
  11300. "modalities": {
  11301. "type": "object",
  11302. "properties": {
  11303. "input": {
  11304. "type": "array",
  11305. "items": {
  11306. "type": "string",
  11307. "enum": ["text", "audio", "image", "video", "pdf"]
  11308. }
  11309. },
  11310. "output": {
  11311. "type": "array",
  11312. "items": {
  11313. "type": "string",
  11314. "enum": ["text", "audio", "image", "video", "pdf"]
  11315. }
  11316. }
  11317. },
  11318. "required": ["input", "output"]
  11319. },
  11320. "experimental": {
  11321. "type": "boolean"
  11322. },
  11323. "status": {
  11324. "type": "string",
  11325. "enum": ["alpha", "beta", "deprecated"]
  11326. },
  11327. "provider": {
  11328. "type": "object",
  11329. "properties": {
  11330. "npm": {
  11331. "type": "string"
  11332. },
  11333. "api": {
  11334. "type": "string"
  11335. }
  11336. }
  11337. },
  11338. "options": {
  11339. "type": "object",
  11340. "propertyNames": {
  11341. "type": "string"
  11342. },
  11343. "additionalProperties": {}
  11344. },
  11345. "headers": {
  11346. "type": "object",
  11347. "propertyNames": {
  11348. "type": "string"
  11349. },
  11350. "additionalProperties": {
  11351. "type": "string"
  11352. }
  11353. },
  11354. "variants": {
  11355. "description": "Variant-specific configuration",
  11356. "type": "object",
  11357. "propertyNames": {
  11358. "type": "string"
  11359. },
  11360. "additionalProperties": {
  11361. "type": "object",
  11362. "properties": {
  11363. "disabled": {
  11364. "description": "Disable this variant for the model",
  11365. "type": "boolean"
  11366. }
  11367. },
  11368. "additionalProperties": {}
  11369. }
  11370. }
  11371. }
  11372. }
  11373. }
  11374. }
  11375. },
  11376. "McpLocalConfig": {
  11377. "type": "object",
  11378. "properties": {
  11379. "type": {
  11380. "description": "Type of MCP server connection",
  11381. "type": "string",
  11382. "const": "local"
  11383. },
  11384. "command": {
  11385. "description": "Command and arguments to run the MCP server",
  11386. "type": "array",
  11387. "items": {
  11388. "type": "string"
  11389. }
  11390. },
  11391. "environment": {
  11392. "description": "Environment variables to set when running the MCP server",
  11393. "type": "object",
  11394. "propertyNames": {
  11395. "type": "string"
  11396. },
  11397. "additionalProperties": {
  11398. "type": "string"
  11399. }
  11400. },
  11401. "enabled": {
  11402. "description": "Enable or disable the MCP server on startup",
  11403. "type": "boolean"
  11404. },
  11405. "timeout": {
  11406. "description": "Timeout in ms for MCP server requests. Defaults to 5000 (5 seconds) if not specified.",
  11407. "type": "number"
  11408. }
  11409. },
  11410. "required": ["type", "command"]
  11411. },
  11412. "McpOAuthConfig": {
  11413. "type": "object",
  11414. "properties": {
  11415. "clientId": {
  11416. "description": "OAuth client ID. If not provided, dynamic client registration (RFC 7591) will be attempted.",
  11417. "type": "string"
  11418. },
  11419. "clientSecret": {
  11420. "description": "OAuth client secret (if required by the authorization server)",
  11421. "type": "string"
  11422. },
  11423. "scope": {
  11424. "description": "OAuth scopes to request during authorization",
  11425. "type": "string"
  11426. },
  11427. "redirectUri": {
  11428. "description": "OAuth redirect URI (default: http://127.0.0.1:19876/mcp/oauth/callback).",
  11429. "type": "string"
  11430. }
  11431. }
  11432. },
  11433. "McpRemoteConfig": {
  11434. "type": "object",
  11435. "properties": {
  11436. "type": {
  11437. "description": "Type of MCP server connection",
  11438. "type": "string",
  11439. "const": "remote"
  11440. },
  11441. "url": {
  11442. "description": "URL of the remote MCP server",
  11443. "type": "string"
  11444. },
  11445. "enabled": {
  11446. "description": "Enable or disable the MCP server on startup",
  11447. "type": "boolean"
  11448. },
  11449. "headers": {
  11450. "description": "Headers to send with the request",
  11451. "type": "object",
  11452. "propertyNames": {
  11453. "type": "string"
  11454. },
  11455. "additionalProperties": {
  11456. "type": "string"
  11457. }
  11458. },
  11459. "oauth": {
  11460. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection.",
  11461. "anyOf": [
  11462. {
  11463. "$ref": "#/components/schemas/McpOAuthConfig"
  11464. },
  11465. {
  11466. "type": "boolean",
  11467. "const": false
  11468. }
  11469. ]
  11470. },
  11471. "timeout": {
  11472. "description": "Timeout in ms for MCP server requests. Defaults to 5000 (5 seconds) if not specified.",
  11473. "type": "number"
  11474. }
  11475. },
  11476. "required": ["type", "url"]
  11477. },
  11478. "LayoutConfig": {
  11479. "description": "@deprecated Always uses stretch layout.",
  11480. "type": "string",
  11481. "enum": ["auto", "stretch"]
  11482. },
  11483. "Config": {
  11484. "type": "object",
  11485. "properties": {
  11486. "$schema": {
  11487. "description": "JSON schema reference for configuration validation",
  11488. "type": "string"
  11489. },
  11490. "logLevel": {
  11491. "$ref": "#/components/schemas/LogLevel"
  11492. },
  11493. "server": {
  11494. "$ref": "#/components/schemas/ServerConfig"
  11495. },
  11496. "command": {
  11497. "description": "Command configuration, see https://opencode.ai/docs/commands",
  11498. "type": "object",
  11499. "propertyNames": {
  11500. "type": "string"
  11501. },
  11502. "additionalProperties": {
  11503. "type": "object",
  11504. "properties": {
  11505. "template": {
  11506. "type": "string"
  11507. },
  11508. "description": {
  11509. "type": "string"
  11510. },
  11511. "agent": {
  11512. "type": "string"
  11513. },
  11514. "model": {
  11515. "type": "string"
  11516. },
  11517. "subtask": {
  11518. "type": "boolean"
  11519. }
  11520. },
  11521. "required": ["template"]
  11522. }
  11523. },
  11524. "skills": {
  11525. "description": "Additional skill folder paths",
  11526. "type": "object",
  11527. "properties": {
  11528. "paths": {
  11529. "description": "Additional paths to skill folders",
  11530. "type": "array",
  11531. "items": {
  11532. "type": "string"
  11533. }
  11534. },
  11535. "urls": {
  11536. "description": "URLs to fetch skills from (e.g., https://example.com/.well-known/skills/)",
  11537. "type": "array",
  11538. "items": {
  11539. "type": "string"
  11540. }
  11541. }
  11542. }
  11543. },
  11544. "watcher": {
  11545. "type": "object",
  11546. "properties": {
  11547. "ignore": {
  11548. "type": "array",
  11549. "items": {
  11550. "type": "string"
  11551. }
  11552. }
  11553. }
  11554. },
  11555. "snapshot": {
  11556. "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.",
  11557. "type": "boolean"
  11558. },
  11559. "plugin": {
  11560. "type": "array",
  11561. "items": {
  11562. "anyOf": [
  11563. {
  11564. "type": "string"
  11565. },
  11566. {
  11567. "type": "array",
  11568. "prefixItems": [
  11569. {
  11570. "type": "string"
  11571. },
  11572. {
  11573. "type": "object",
  11574. "propertyNames": {
  11575. "type": "string"
  11576. },
  11577. "additionalProperties": {}
  11578. }
  11579. ]
  11580. }
  11581. ]
  11582. }
  11583. },
  11584. "share": {
  11585. "description": "Control sharing behavior:'manual' allows manual sharing via commands, 'auto' enables automatic sharing, 'disabled' disables all sharing",
  11586. "type": "string",
  11587. "enum": ["manual", "auto", "disabled"]
  11588. },
  11589. "autoshare": {
  11590. "description": "@deprecated Use 'share' field instead. Share newly created sessions automatically",
  11591. "type": "boolean"
  11592. },
  11593. "autoupdate": {
  11594. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications",
  11595. "anyOf": [
  11596. {
  11597. "type": "boolean"
  11598. },
  11599. {
  11600. "type": "string",
  11601. "const": "notify"
  11602. }
  11603. ]
  11604. },
  11605. "disabled_providers": {
  11606. "description": "Disable providers that are loaded automatically",
  11607. "type": "array",
  11608. "items": {
  11609. "type": "string"
  11610. }
  11611. },
  11612. "enabled_providers": {
  11613. "description": "When set, ONLY these providers will be enabled. All other providers will be ignored",
  11614. "type": "array",
  11615. "items": {
  11616. "type": "string"
  11617. }
  11618. },
  11619. "model": {
  11620. "description": "Model to use in the format of provider/model, eg anthropic/claude-2",
  11621. "type": "string"
  11622. },
  11623. "small_model": {
  11624. "description": "Small model to use for tasks like title generation in the format of provider/model",
  11625. "type": "string"
  11626. },
  11627. "default_agent": {
  11628. "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.",
  11629. "type": "string"
  11630. },
  11631. "username": {
  11632. "description": "Custom username to display in conversations instead of system username",
  11633. "type": "string"
  11634. },
  11635. "mode": {
  11636. "description": "@deprecated Use `agent` field instead.",
  11637. "type": "object",
  11638. "properties": {
  11639. "build": {
  11640. "$ref": "#/components/schemas/AgentConfig"
  11641. },
  11642. "plan": {
  11643. "$ref": "#/components/schemas/AgentConfig"
  11644. }
  11645. },
  11646. "additionalProperties": {
  11647. "$ref": "#/components/schemas/AgentConfig"
  11648. }
  11649. },
  11650. "agent": {
  11651. "description": "Agent configuration, see https://opencode.ai/docs/agents",
  11652. "type": "object",
  11653. "properties": {
  11654. "plan": {
  11655. "$ref": "#/components/schemas/AgentConfig"
  11656. },
  11657. "build": {
  11658. "$ref": "#/components/schemas/AgentConfig"
  11659. },
  11660. "general": {
  11661. "$ref": "#/components/schemas/AgentConfig"
  11662. },
  11663. "explore": {
  11664. "$ref": "#/components/schemas/AgentConfig"
  11665. },
  11666. "title": {
  11667. "$ref": "#/components/schemas/AgentConfig"
  11668. },
  11669. "summary": {
  11670. "$ref": "#/components/schemas/AgentConfig"
  11671. },
  11672. "compaction": {
  11673. "$ref": "#/components/schemas/AgentConfig"
  11674. }
  11675. },
  11676. "additionalProperties": {
  11677. "$ref": "#/components/schemas/AgentConfig"
  11678. }
  11679. },
  11680. "provider": {
  11681. "description": "Custom provider configurations and model overrides",
  11682. "type": "object",
  11683. "propertyNames": {
  11684. "type": "string"
  11685. },
  11686. "additionalProperties": {
  11687. "$ref": "#/components/schemas/ProviderConfig"
  11688. }
  11689. },
  11690. "mcp": {
  11691. "description": "MCP (Model Context Protocol) server configurations",
  11692. "type": "object",
  11693. "propertyNames": {
  11694. "type": "string"
  11695. },
  11696. "additionalProperties": {
  11697. "anyOf": [
  11698. {
  11699. "anyOf": [
  11700. {
  11701. "$ref": "#/components/schemas/McpLocalConfig"
  11702. },
  11703. {
  11704. "$ref": "#/components/schemas/McpRemoteConfig"
  11705. }
  11706. ]
  11707. },
  11708. {
  11709. "type": "object",
  11710. "properties": {
  11711. "enabled": {
  11712. "type": "boolean"
  11713. }
  11714. },
  11715. "required": ["enabled"],
  11716. "additionalProperties": false
  11717. }
  11718. ]
  11719. }
  11720. },
  11721. "formatter": {
  11722. "anyOf": [
  11723. {
  11724. "type": "boolean"
  11725. },
  11726. {
  11727. "type": "object",
  11728. "propertyNames": {
  11729. "type": "string"
  11730. },
  11731. "additionalProperties": {
  11732. "type": "object",
  11733. "properties": {
  11734. "disabled": {
  11735. "type": "boolean"
  11736. },
  11737. "command": {
  11738. "type": "array",
  11739. "items": {
  11740. "type": "string"
  11741. }
  11742. },
  11743. "environment": {
  11744. "type": "object",
  11745. "propertyNames": {
  11746. "type": "string"
  11747. },
  11748. "additionalProperties": {
  11749. "type": "string"
  11750. }
  11751. },
  11752. "extensions": {
  11753. "type": "array",
  11754. "items": {
  11755. "type": "string"
  11756. }
  11757. }
  11758. }
  11759. }
  11760. }
  11761. ]
  11762. },
  11763. "lsp": {
  11764. "anyOf": [
  11765. {
  11766. "type": "boolean"
  11767. },
  11768. {
  11769. "type": "object",
  11770. "propertyNames": {
  11771. "type": "string"
  11772. },
  11773. "additionalProperties": {
  11774. "anyOf": [
  11775. {
  11776. "type": "object",
  11777. "properties": {
  11778. "disabled": {
  11779. "type": "boolean",
  11780. "const": true
  11781. }
  11782. },
  11783. "required": ["disabled"]
  11784. },
  11785. {
  11786. "type": "object",
  11787. "properties": {
  11788. "command": {
  11789. "type": "array",
  11790. "items": {
  11791. "type": "string"
  11792. }
  11793. },
  11794. "extensions": {
  11795. "type": "array",
  11796. "items": {
  11797. "type": "string"
  11798. }
  11799. },
  11800. "disabled": {
  11801. "type": "boolean"
  11802. },
  11803. "env": {
  11804. "type": "object",
  11805. "propertyNames": {
  11806. "type": "string"
  11807. },
  11808. "additionalProperties": {
  11809. "type": "string"
  11810. }
  11811. },
  11812. "initialization": {
  11813. "type": "object",
  11814. "propertyNames": {
  11815. "type": "string"
  11816. },
  11817. "additionalProperties": {}
  11818. }
  11819. },
  11820. "required": ["command"]
  11821. }
  11822. ]
  11823. }
  11824. }
  11825. ]
  11826. },
  11827. "instructions": {
  11828. "description": "Additional instruction files or patterns to include",
  11829. "type": "array",
  11830. "items": {
  11831. "type": "string"
  11832. }
  11833. },
  11834. "layout": {
  11835. "$ref": "#/components/schemas/LayoutConfig"
  11836. },
  11837. "permission": {
  11838. "$ref": "#/components/schemas/PermissionConfig"
  11839. },
  11840. "tools": {
  11841. "type": "object",
  11842. "propertyNames": {
  11843. "type": "string"
  11844. },
  11845. "additionalProperties": {
  11846. "type": "boolean"
  11847. }
  11848. },
  11849. "enterprise": {
  11850. "type": "object",
  11851. "properties": {
  11852. "url": {
  11853. "description": "Enterprise URL",
  11854. "type": "string"
  11855. }
  11856. }
  11857. },
  11858. "compaction": {
  11859. "type": "object",
  11860. "properties": {
  11861. "auto": {
  11862. "description": "Enable automatic compaction when context is full (default: true)",
  11863. "type": "boolean"
  11864. },
  11865. "prune": {
  11866. "description": "Enable pruning of old tool outputs (default: true)",
  11867. "type": "boolean"
  11868. },
  11869. "tail_turns": {
  11870. "description": "Number of recent user turns, including their following assistant/tool responses, to keep verbatim during compaction (default: 2)",
  11871. "type": "integer",
  11872. "minimum": 0,
  11873. "maximum": 9007199254740991
  11874. },
  11875. "preserve_recent_tokens": {
  11876. "description": "Maximum number of tokens from recent turns to preserve verbatim after compaction",
  11877. "type": "integer",
  11878. "minimum": 0,
  11879. "maximum": 9007199254740991
  11880. },
  11881. "reserved": {
  11882. "description": "Token buffer for compaction. Leaves enough window to avoid overflow during compaction.",
  11883. "type": "integer",
  11884. "minimum": 0,
  11885. "maximum": 9007199254740991
  11886. }
  11887. }
  11888. },
  11889. "experimental": {
  11890. "type": "object",
  11891. "properties": {
  11892. "disable_paste_summary": {
  11893. "type": "boolean"
  11894. },
  11895. "batch_tool": {
  11896. "description": "Enable the batch tool",
  11897. "type": "boolean"
  11898. },
  11899. "openTelemetry": {
  11900. "description": "Enable OpenTelemetry spans for AI SDK calls (using the 'experimental_telemetry' flag)",
  11901. "type": "boolean"
  11902. },
  11903. "primary_tools": {
  11904. "description": "Tools that should only be available to primary agents.",
  11905. "type": "array",
  11906. "items": {
  11907. "type": "string"
  11908. }
  11909. },
  11910. "continue_loop_on_deny": {
  11911. "description": "Continue the agent loop when a tool call is denied",
  11912. "type": "boolean"
  11913. },
  11914. "mcp_timeout": {
  11915. "description": "Timeout in milliseconds for model context protocol (MCP) requests",
  11916. "type": "integer",
  11917. "exclusiveMinimum": 0,
  11918. "maximum": 9007199254740991
  11919. }
  11920. }
  11921. }
  11922. },
  11923. "additionalProperties": false
  11924. },
  11925. "BadRequestError": {
  11926. "type": "object",
  11927. "properties": {
  11928. "data": {},
  11929. "errors": {
  11930. "type": "array",
  11931. "items": {
  11932. "type": "object",
  11933. "propertyNames": {
  11934. "type": "string"
  11935. },
  11936. "additionalProperties": {}
  11937. }
  11938. },
  11939. "success": {
  11940. "type": "boolean",
  11941. "const": false
  11942. }
  11943. },
  11944. "required": ["data", "errors", "success"]
  11945. },
  11946. "OAuth": {
  11947. "type": "object",
  11948. "properties": {
  11949. "type": {
  11950. "type": "string",
  11951. "const": "oauth"
  11952. },
  11953. "refresh": {
  11954. "type": "string"
  11955. },
  11956. "access": {
  11957. "type": "string"
  11958. },
  11959. "expires": {
  11960. "type": "number"
  11961. },
  11962. "accountId": {
  11963. "type": "string"
  11964. },
  11965. "enterpriseUrl": {
  11966. "type": "string"
  11967. }
  11968. },
  11969. "required": ["type", "refresh", "access", "expires"]
  11970. },
  11971. "ApiAuth": {
  11972. "type": "object",
  11973. "properties": {
  11974. "type": {
  11975. "type": "string",
  11976. "const": "api"
  11977. },
  11978. "key": {
  11979. "type": "string"
  11980. },
  11981. "metadata": {
  11982. "type": "object",
  11983. "propertyNames": {
  11984. "type": "string"
  11985. },
  11986. "additionalProperties": {
  11987. "type": "string"
  11988. }
  11989. }
  11990. },
  11991. "required": ["type", "key"]
  11992. },
  11993. "WellKnownAuth": {
  11994. "type": "object",
  11995. "properties": {
  11996. "type": {
  11997. "type": "string",
  11998. "const": "wellknown"
  11999. },
  12000. "key": {
  12001. "type": "string"
  12002. },
  12003. "token": {
  12004. "type": "string"
  12005. }
  12006. },
  12007. "required": ["type", "key", "token"]
  12008. },
  12009. "Auth": {
  12010. "anyOf": [
  12011. {
  12012. "$ref": "#/components/schemas/OAuth"
  12013. },
  12014. {
  12015. "$ref": "#/components/schemas/ApiAuth"
  12016. },
  12017. {
  12018. "$ref": "#/components/schemas/WellKnownAuth"
  12019. }
  12020. ]
  12021. },
  12022. "Workspace": {
  12023. "type": "object",
  12024. "properties": {
  12025. "id": {
  12026. "type": "string",
  12027. "pattern": "^wrk.*"
  12028. },
  12029. "type": {
  12030. "type": "string"
  12031. },
  12032. "name": {
  12033. "type": "string"
  12034. },
  12035. "branch": {
  12036. "anyOf": [
  12037. {
  12038. "type": "string"
  12039. },
  12040. {
  12041. "type": "null"
  12042. }
  12043. ]
  12044. },
  12045. "directory": {
  12046. "anyOf": [
  12047. {
  12048. "type": "string"
  12049. },
  12050. {
  12051. "type": "null"
  12052. }
  12053. ]
  12054. },
  12055. "extra": {
  12056. "anyOf": [
  12057. {},
  12058. {
  12059. "type": "null"
  12060. }
  12061. ]
  12062. },
  12063. "projectID": {
  12064. "type": "string"
  12065. }
  12066. },
  12067. "required": ["id", "type", "name", "branch", "directory", "extra", "projectID"]
  12068. },
  12069. "NotFoundError": {
  12070. "type": "object",
  12071. "properties": {
  12072. "name": {
  12073. "type": "string",
  12074. "const": "NotFoundError"
  12075. },
  12076. "data": {
  12077. "type": "object",
  12078. "properties": {
  12079. "message": {
  12080. "type": "string"
  12081. }
  12082. },
  12083. "required": ["message"]
  12084. }
  12085. },
  12086. "required": ["name", "data"]
  12087. },
  12088. "Model": {
  12089. "type": "object",
  12090. "properties": {
  12091. "id": {
  12092. "type": "string"
  12093. },
  12094. "providerID": {
  12095. "type": "string"
  12096. },
  12097. "api": {
  12098. "type": "object",
  12099. "properties": {
  12100. "id": {
  12101. "type": "string"
  12102. },
  12103. "url": {
  12104. "type": "string"
  12105. },
  12106. "npm": {
  12107. "type": "string"
  12108. }
  12109. },
  12110. "required": ["id", "url", "npm"]
  12111. },
  12112. "name": {
  12113. "type": "string"
  12114. },
  12115. "family": {
  12116. "type": "string"
  12117. },
  12118. "capabilities": {
  12119. "type": "object",
  12120. "properties": {
  12121. "temperature": {
  12122. "type": "boolean"
  12123. },
  12124. "reasoning": {
  12125. "type": "boolean"
  12126. },
  12127. "attachment": {
  12128. "type": "boolean"
  12129. },
  12130. "toolcall": {
  12131. "type": "boolean"
  12132. },
  12133. "input": {
  12134. "type": "object",
  12135. "properties": {
  12136. "text": {
  12137. "type": "boolean"
  12138. },
  12139. "audio": {
  12140. "type": "boolean"
  12141. },
  12142. "image": {
  12143. "type": "boolean"
  12144. },
  12145. "video": {
  12146. "type": "boolean"
  12147. },
  12148. "pdf": {
  12149. "type": "boolean"
  12150. }
  12151. },
  12152. "required": ["text", "audio", "image", "video", "pdf"]
  12153. },
  12154. "output": {
  12155. "type": "object",
  12156. "properties": {
  12157. "text": {
  12158. "type": "boolean"
  12159. },
  12160. "audio": {
  12161. "type": "boolean"
  12162. },
  12163. "image": {
  12164. "type": "boolean"
  12165. },
  12166. "video": {
  12167. "type": "boolean"
  12168. },
  12169. "pdf": {
  12170. "type": "boolean"
  12171. }
  12172. },
  12173. "required": ["text", "audio", "image", "video", "pdf"]
  12174. },
  12175. "interleaved": {
  12176. "anyOf": [
  12177. {
  12178. "type": "boolean"
  12179. },
  12180. {
  12181. "type": "object",
  12182. "properties": {
  12183. "field": {
  12184. "type": "string",
  12185. "enum": ["reasoning_content", "reasoning_details"]
  12186. }
  12187. },
  12188. "required": ["field"]
  12189. }
  12190. ]
  12191. }
  12192. },
  12193. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"]
  12194. },
  12195. "cost": {
  12196. "type": "object",
  12197. "properties": {
  12198. "input": {
  12199. "type": "number"
  12200. },
  12201. "output": {
  12202. "type": "number"
  12203. },
  12204. "cache": {
  12205. "type": "object",
  12206. "properties": {
  12207. "read": {
  12208. "type": "number"
  12209. },
  12210. "write": {
  12211. "type": "number"
  12212. }
  12213. },
  12214. "required": ["read", "write"]
  12215. },
  12216. "experimentalOver200K": {
  12217. "type": "object",
  12218. "properties": {
  12219. "input": {
  12220. "type": "number"
  12221. },
  12222. "output": {
  12223. "type": "number"
  12224. },
  12225. "cache": {
  12226. "type": "object",
  12227. "properties": {
  12228. "read": {
  12229. "type": "number"
  12230. },
  12231. "write": {
  12232. "type": "number"
  12233. }
  12234. },
  12235. "required": ["read", "write"]
  12236. }
  12237. },
  12238. "required": ["input", "output", "cache"]
  12239. }
  12240. },
  12241. "required": ["input", "output", "cache"]
  12242. },
  12243. "limit": {
  12244. "type": "object",
  12245. "properties": {
  12246. "context": {
  12247. "type": "number"
  12248. },
  12249. "input": {
  12250. "type": "number"
  12251. },
  12252. "output": {
  12253. "type": "number"
  12254. }
  12255. },
  12256. "required": ["context", "output"]
  12257. },
  12258. "status": {
  12259. "type": "string",
  12260. "enum": ["alpha", "beta", "deprecated", "active"]
  12261. },
  12262. "options": {
  12263. "type": "object",
  12264. "propertyNames": {
  12265. "type": "string"
  12266. },
  12267. "additionalProperties": {}
  12268. },
  12269. "headers": {
  12270. "type": "object",
  12271. "propertyNames": {
  12272. "type": "string"
  12273. },
  12274. "additionalProperties": {
  12275. "type": "string"
  12276. }
  12277. },
  12278. "release_date": {
  12279. "type": "string"
  12280. },
  12281. "variants": {
  12282. "type": "object",
  12283. "propertyNames": {
  12284. "type": "string"
  12285. },
  12286. "additionalProperties": {
  12287. "type": "object",
  12288. "propertyNames": {
  12289. "type": "string"
  12290. },
  12291. "additionalProperties": {}
  12292. }
  12293. }
  12294. },
  12295. "required": [
  12296. "id",
  12297. "providerID",
  12298. "api",
  12299. "name",
  12300. "capabilities",
  12301. "cost",
  12302. "limit",
  12303. "status",
  12304. "options",
  12305. "headers",
  12306. "release_date"
  12307. ]
  12308. },
  12309. "Provider": {
  12310. "type": "object",
  12311. "properties": {
  12312. "id": {
  12313. "type": "string"
  12314. },
  12315. "name": {
  12316. "type": "string"
  12317. },
  12318. "source": {
  12319. "type": "string",
  12320. "enum": ["env", "config", "custom", "api"]
  12321. },
  12322. "env": {
  12323. "type": "array",
  12324. "items": {
  12325. "type": "string"
  12326. }
  12327. },
  12328. "key": {
  12329. "type": "string"
  12330. },
  12331. "options": {
  12332. "type": "object",
  12333. "propertyNames": {
  12334. "type": "string"
  12335. },
  12336. "additionalProperties": {}
  12337. },
  12338. "models": {
  12339. "type": "object",
  12340. "propertyNames": {
  12341. "type": "string"
  12342. },
  12343. "additionalProperties": {
  12344. "$ref": "#/components/schemas/Model"
  12345. }
  12346. }
  12347. },
  12348. "required": ["id", "name", "source", "env", "options", "models"]
  12349. },
  12350. "ConsoleState": {
  12351. "type": "object",
  12352. "properties": {
  12353. "consoleManagedProviders": {
  12354. "type": "array",
  12355. "items": {
  12356. "type": "string"
  12357. }
  12358. },
  12359. "activeOrgName": {
  12360. "type": "string"
  12361. },
  12362. "switchableOrgCount": {
  12363. "type": "number"
  12364. }
  12365. },
  12366. "required": ["consoleManagedProviders", "switchableOrgCount"]
  12367. },
  12368. "ToolIDs": {
  12369. "type": "array",
  12370. "items": {
  12371. "type": "string"
  12372. }
  12373. },
  12374. "ToolListItem": {
  12375. "type": "object",
  12376. "properties": {
  12377. "id": {
  12378. "type": "string"
  12379. },
  12380. "description": {
  12381. "type": "string"
  12382. },
  12383. "parameters": {}
  12384. },
  12385. "required": ["id", "description", "parameters"]
  12386. },
  12387. "ToolList": {
  12388. "type": "array",
  12389. "items": {
  12390. "$ref": "#/components/schemas/ToolListItem"
  12391. }
  12392. },
  12393. "Worktree": {
  12394. "type": "object",
  12395. "properties": {
  12396. "name": {
  12397. "type": "string"
  12398. },
  12399. "branch": {
  12400. "type": "string"
  12401. },
  12402. "directory": {
  12403. "type": "string"
  12404. }
  12405. },
  12406. "required": ["name", "branch", "directory"]
  12407. },
  12408. "WorktreeCreateInput": {
  12409. "type": "object",
  12410. "properties": {
  12411. "name": {
  12412. "type": "string"
  12413. },
  12414. "startCommand": {
  12415. "description": "Additional startup script to run after the project's start command",
  12416. "type": "string"
  12417. }
  12418. }
  12419. },
  12420. "WorktreeRemoveInput": {
  12421. "type": "object",
  12422. "properties": {
  12423. "directory": {
  12424. "type": "string"
  12425. }
  12426. },
  12427. "required": ["directory"]
  12428. },
  12429. "WorktreeResetInput": {
  12430. "type": "object",
  12431. "properties": {
  12432. "directory": {
  12433. "type": "string"
  12434. }
  12435. },
  12436. "required": ["directory"]
  12437. },
  12438. "ProjectSummary": {
  12439. "type": "object",
  12440. "properties": {
  12441. "id": {
  12442. "type": "string"
  12443. },
  12444. "name": {
  12445. "type": "string"
  12446. },
  12447. "worktree": {
  12448. "type": "string"
  12449. }
  12450. },
  12451. "required": ["id", "worktree"]
  12452. },
  12453. "GlobalSession": {
  12454. "type": "object",
  12455. "properties": {
  12456. "id": {
  12457. "type": "string",
  12458. "pattern": "^ses.*"
  12459. },
  12460. "slug": {
  12461. "type": "string"
  12462. },
  12463. "projectID": {
  12464. "type": "string"
  12465. },
  12466. "workspaceID": {
  12467. "type": "string",
  12468. "pattern": "^wrk.*"
  12469. },
  12470. "directory": {
  12471. "type": "string"
  12472. },
  12473. "parentID": {
  12474. "type": "string",
  12475. "pattern": "^ses.*"
  12476. },
  12477. "summary": {
  12478. "type": "object",
  12479. "properties": {
  12480. "additions": {
  12481. "type": "number"
  12482. },
  12483. "deletions": {
  12484. "type": "number"
  12485. },
  12486. "files": {
  12487. "type": "number"
  12488. },
  12489. "diffs": {
  12490. "type": "array",
  12491. "items": {
  12492. "$ref": "#/components/schemas/SnapshotFileDiff"
  12493. }
  12494. }
  12495. },
  12496. "required": ["additions", "deletions", "files"]
  12497. },
  12498. "share": {
  12499. "type": "object",
  12500. "properties": {
  12501. "url": {
  12502. "type": "string"
  12503. }
  12504. },
  12505. "required": ["url"]
  12506. },
  12507. "title": {
  12508. "type": "string"
  12509. },
  12510. "version": {
  12511. "type": "string"
  12512. },
  12513. "time": {
  12514. "type": "object",
  12515. "properties": {
  12516. "created": {
  12517. "type": "number"
  12518. },
  12519. "updated": {
  12520. "type": "number"
  12521. },
  12522. "compacting": {
  12523. "type": "number"
  12524. },
  12525. "archived": {
  12526. "type": "number"
  12527. }
  12528. },
  12529. "required": ["created", "updated"]
  12530. },
  12531. "permission": {
  12532. "$ref": "#/components/schemas/PermissionRuleset"
  12533. },
  12534. "revert": {
  12535. "type": "object",
  12536. "properties": {
  12537. "messageID": {
  12538. "type": "string",
  12539. "pattern": "^msg.*"
  12540. },
  12541. "partID": {
  12542. "type": "string",
  12543. "pattern": "^prt.*"
  12544. },
  12545. "snapshot": {
  12546. "type": "string"
  12547. },
  12548. "diff": {
  12549. "type": "string"
  12550. }
  12551. },
  12552. "required": ["messageID"]
  12553. },
  12554. "project": {
  12555. "anyOf": [
  12556. {
  12557. "$ref": "#/components/schemas/ProjectSummary"
  12558. },
  12559. {
  12560. "type": "null"
  12561. }
  12562. ]
  12563. }
  12564. },
  12565. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"]
  12566. },
  12567. "McpResource": {
  12568. "type": "object",
  12569. "properties": {
  12570. "name": {
  12571. "type": "string"
  12572. },
  12573. "uri": {
  12574. "type": "string"
  12575. },
  12576. "description": {
  12577. "type": "string"
  12578. },
  12579. "mimeType": {
  12580. "type": "string"
  12581. },
  12582. "client": {
  12583. "type": "string"
  12584. }
  12585. },
  12586. "required": ["name", "uri", "client"]
  12587. },
  12588. "TextPartInput": {
  12589. "type": "object",
  12590. "properties": {
  12591. "id": {
  12592. "type": "string",
  12593. "pattern": "^prt.*"
  12594. },
  12595. "type": {
  12596. "type": "string",
  12597. "const": "text"
  12598. },
  12599. "text": {
  12600. "type": "string"
  12601. },
  12602. "synthetic": {
  12603. "type": "boolean"
  12604. },
  12605. "ignored": {
  12606. "type": "boolean"
  12607. },
  12608. "time": {
  12609. "type": "object",
  12610. "properties": {
  12611. "start": {
  12612. "type": "number"
  12613. },
  12614. "end": {
  12615. "type": "number"
  12616. }
  12617. },
  12618. "required": ["start"]
  12619. },
  12620. "metadata": {
  12621. "type": "object",
  12622. "propertyNames": {
  12623. "type": "string"
  12624. },
  12625. "additionalProperties": {}
  12626. }
  12627. },
  12628. "required": ["type", "text"]
  12629. },
  12630. "FilePartInput": {
  12631. "type": "object",
  12632. "properties": {
  12633. "id": {
  12634. "type": "string",
  12635. "pattern": "^prt.*"
  12636. },
  12637. "type": {
  12638. "type": "string",
  12639. "const": "file"
  12640. },
  12641. "mime": {
  12642. "type": "string"
  12643. },
  12644. "filename": {
  12645. "type": "string"
  12646. },
  12647. "url": {
  12648. "type": "string"
  12649. },
  12650. "source": {
  12651. "$ref": "#/components/schemas/FilePartSource"
  12652. }
  12653. },
  12654. "required": ["type", "mime", "url"]
  12655. },
  12656. "AgentPartInput": {
  12657. "type": "object",
  12658. "properties": {
  12659. "id": {
  12660. "type": "string",
  12661. "pattern": "^prt.*"
  12662. },
  12663. "type": {
  12664. "type": "string",
  12665. "const": "agent"
  12666. },
  12667. "name": {
  12668. "type": "string"
  12669. },
  12670. "source": {
  12671. "type": "object",
  12672. "properties": {
  12673. "value": {
  12674. "type": "string"
  12675. },
  12676. "start": {
  12677. "type": "integer",
  12678. "minimum": -9007199254740991,
  12679. "maximum": 9007199254740991
  12680. },
  12681. "end": {
  12682. "type": "integer",
  12683. "minimum": -9007199254740991,
  12684. "maximum": 9007199254740991
  12685. }
  12686. },
  12687. "required": ["value", "start", "end"]
  12688. }
  12689. },
  12690. "required": ["type", "name"]
  12691. },
  12692. "SubtaskPartInput": {
  12693. "type": "object",
  12694. "properties": {
  12695. "id": {
  12696. "type": "string",
  12697. "pattern": "^prt.*"
  12698. },
  12699. "type": {
  12700. "type": "string",
  12701. "const": "subtask"
  12702. },
  12703. "prompt": {
  12704. "type": "string"
  12705. },
  12706. "description": {
  12707. "type": "string"
  12708. },
  12709. "agent": {
  12710. "type": "string"
  12711. },
  12712. "model": {
  12713. "type": "object",
  12714. "properties": {
  12715. "providerID": {
  12716. "type": "string"
  12717. },
  12718. "modelID": {
  12719. "type": "string"
  12720. }
  12721. },
  12722. "required": ["providerID", "modelID"]
  12723. },
  12724. "command": {
  12725. "type": "string"
  12726. }
  12727. },
  12728. "required": ["type", "prompt", "description", "agent"]
  12729. },
  12730. "ProviderAuthMethod": {
  12731. "type": "object",
  12732. "properties": {
  12733. "type": {
  12734. "type": "string",
  12735. "enum": ["oauth", "api"]
  12736. },
  12737. "label": {
  12738. "type": "string"
  12739. },
  12740. "prompts": {
  12741. "type": "array",
  12742. "items": {
  12743. "anyOf": [
  12744. {
  12745. "type": "object",
  12746. "properties": {
  12747. "type": {
  12748. "type": "string",
  12749. "const": "text"
  12750. },
  12751. "key": {
  12752. "type": "string"
  12753. },
  12754. "message": {
  12755. "type": "string"
  12756. },
  12757. "placeholder": {
  12758. "type": "string"
  12759. },
  12760. "when": {
  12761. "type": "object",
  12762. "properties": {
  12763. "key": {
  12764. "type": "string"
  12765. },
  12766. "op": {
  12767. "type": "string",
  12768. "enum": ["eq", "neq"]
  12769. },
  12770. "value": {
  12771. "type": "string"
  12772. }
  12773. },
  12774. "required": ["key", "op", "value"]
  12775. }
  12776. },
  12777. "required": ["type", "key", "message"]
  12778. },
  12779. {
  12780. "type": "object",
  12781. "properties": {
  12782. "type": {
  12783. "type": "string",
  12784. "const": "select"
  12785. },
  12786. "key": {
  12787. "type": "string"
  12788. },
  12789. "message": {
  12790. "type": "string"
  12791. },
  12792. "options": {
  12793. "type": "array",
  12794. "items": {
  12795. "type": "object",
  12796. "properties": {
  12797. "label": {
  12798. "type": "string"
  12799. },
  12800. "value": {
  12801. "type": "string"
  12802. },
  12803. "hint": {
  12804. "type": "string"
  12805. }
  12806. },
  12807. "required": ["label", "value"]
  12808. }
  12809. },
  12810. "when": {
  12811. "type": "object",
  12812. "properties": {
  12813. "key": {
  12814. "type": "string"
  12815. },
  12816. "op": {
  12817. "type": "string",
  12818. "enum": ["eq", "neq"]
  12819. },
  12820. "value": {
  12821. "type": "string"
  12822. }
  12823. },
  12824. "required": ["key", "op", "value"]
  12825. }
  12826. },
  12827. "required": ["type", "key", "message", "options"]
  12828. }
  12829. ]
  12830. }
  12831. }
  12832. },
  12833. "required": ["type", "label"]
  12834. },
  12835. "ProviderAuthAuthorization": {
  12836. "type": "object",
  12837. "properties": {
  12838. "url": {
  12839. "type": "string"
  12840. },
  12841. "method": {
  12842. "type": "string",
  12843. "enum": ["auto", "code"]
  12844. },
  12845. "instructions": {
  12846. "type": "string"
  12847. }
  12848. },
  12849. "required": ["url", "method", "instructions"]
  12850. },
  12851. "Symbol": {
  12852. "type": "object",
  12853. "properties": {
  12854. "name": {
  12855. "type": "string"
  12856. },
  12857. "kind": {
  12858. "type": "number"
  12859. },
  12860. "location": {
  12861. "type": "object",
  12862. "properties": {
  12863. "uri": {
  12864. "type": "string"
  12865. },
  12866. "range": {
  12867. "$ref": "#/components/schemas/Range"
  12868. }
  12869. },
  12870. "required": ["uri", "range"]
  12871. }
  12872. },
  12873. "required": ["name", "kind", "location"]
  12874. },
  12875. "FileNode": {
  12876. "type": "object",
  12877. "properties": {
  12878. "name": {
  12879. "type": "string"
  12880. },
  12881. "path": {
  12882. "type": "string"
  12883. },
  12884. "absolute": {
  12885. "type": "string"
  12886. },
  12887. "type": {
  12888. "type": "string",
  12889. "enum": ["file", "directory"]
  12890. },
  12891. "ignored": {
  12892. "type": "boolean"
  12893. }
  12894. },
  12895. "required": ["name", "path", "absolute", "type", "ignored"]
  12896. },
  12897. "FileContent": {
  12898. "type": "object",
  12899. "properties": {
  12900. "type": {
  12901. "type": "string",
  12902. "enum": ["text", "binary"]
  12903. },
  12904. "content": {
  12905. "type": "string"
  12906. },
  12907. "diff": {
  12908. "type": "string"
  12909. },
  12910. "patch": {
  12911. "type": "object",
  12912. "properties": {
  12913. "oldFileName": {
  12914. "type": "string"
  12915. },
  12916. "newFileName": {
  12917. "type": "string"
  12918. },
  12919. "oldHeader": {
  12920. "type": "string"
  12921. },
  12922. "newHeader": {
  12923. "type": "string"
  12924. },
  12925. "hunks": {
  12926. "type": "array",
  12927. "items": {
  12928. "type": "object",
  12929. "properties": {
  12930. "oldStart": {
  12931. "type": "number"
  12932. },
  12933. "oldLines": {
  12934. "type": "number"
  12935. },
  12936. "newStart": {
  12937. "type": "number"
  12938. },
  12939. "newLines": {
  12940. "type": "number"
  12941. },
  12942. "lines": {
  12943. "type": "array",
  12944. "items": {
  12945. "type": "string"
  12946. }
  12947. }
  12948. },
  12949. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"]
  12950. }
  12951. },
  12952. "index": {
  12953. "type": "string"
  12954. }
  12955. },
  12956. "required": ["oldFileName", "newFileName", "hunks"]
  12957. },
  12958. "encoding": {
  12959. "type": "string",
  12960. "const": "base64"
  12961. },
  12962. "mimeType": {
  12963. "type": "string"
  12964. }
  12965. },
  12966. "required": ["type", "content"]
  12967. },
  12968. "File": {
  12969. "type": "object",
  12970. "properties": {
  12971. "path": {
  12972. "type": "string"
  12973. },
  12974. "added": {
  12975. "type": "integer",
  12976. "minimum": -9007199254740991,
  12977. "maximum": 9007199254740991
  12978. },
  12979. "removed": {
  12980. "type": "integer",
  12981. "minimum": -9007199254740991,
  12982. "maximum": 9007199254740991
  12983. },
  12984. "status": {
  12985. "type": "string",
  12986. "enum": ["added", "deleted", "modified"]
  12987. }
  12988. },
  12989. "required": ["path", "added", "removed", "status"]
  12990. },
  12991. "Event": {
  12992. "anyOf": [
  12993. {
  12994. "$ref": "#/components/schemas/Event.project.updated"
  12995. },
  12996. {
  12997. "$ref": "#/components/schemas/Event.server.instance.disposed"
  12998. },
  12999. {
  13000. "$ref": "#/components/schemas/Event.server.connected"
  13001. },
  13002. {
  13003. "$ref": "#/components/schemas/Event.global.disposed"
  13004. },
  13005. {
  13006. "$ref": "#/components/schemas/Event.file.edited"
  13007. },
  13008. {
  13009. "$ref": "#/components/schemas/Event.file.watcher.updated"
  13010. },
  13011. {
  13012. "$ref": "#/components/schemas/Event.lsp.client.diagnostics"
  13013. },
  13014. {
  13015. "$ref": "#/components/schemas/Event.lsp.updated"
  13016. },
  13017. {
  13018. "$ref": "#/components/schemas/Event.installation.updated"
  13019. },
  13020. {
  13021. "$ref": "#/components/schemas/Event.installation.update-available"
  13022. },
  13023. {
  13024. "$ref": "#/components/schemas/Event.message.part.delta"
  13025. },
  13026. {
  13027. "$ref": "#/components/schemas/Event.permission.asked"
  13028. },
  13029. {
  13030. "$ref": "#/components/schemas/Event.permission.replied"
  13031. },
  13032. {
  13033. "$ref": "#/components/schemas/Event.session.diff"
  13034. },
  13035. {
  13036. "$ref": "#/components/schemas/Event.session.error"
  13037. },
  13038. {
  13039. "$ref": "#/components/schemas/Event.question.asked"
  13040. },
  13041. {
  13042. "$ref": "#/components/schemas/Event.question.replied"
  13043. },
  13044. {
  13045. "$ref": "#/components/schemas/Event.question.rejected"
  13046. },
  13047. {
  13048. "$ref": "#/components/schemas/Event.todo.updated"
  13049. },
  13050. {
  13051. "$ref": "#/components/schemas/Event.session.status"
  13052. },
  13053. {
  13054. "$ref": "#/components/schemas/Event.session.idle"
  13055. },
  13056. {
  13057. "$ref": "#/components/schemas/Event.session.compacted"
  13058. },
  13059. {
  13060. "$ref": "#/components/schemas/Event.tui.prompt.append"
  13061. },
  13062. {
  13063. "$ref": "#/components/schemas/Event.tui.command.execute"
  13064. },
  13065. {
  13066. "$ref": "#/components/schemas/Event.tui.toast.show"
  13067. },
  13068. {
  13069. "$ref": "#/components/schemas/Event.tui.session.select"
  13070. },
  13071. {
  13072. "$ref": "#/components/schemas/Event.mcp.tools.changed"
  13073. },
  13074. {
  13075. "$ref": "#/components/schemas/Event.mcp.browser.open.failed"
  13076. },
  13077. {
  13078. "$ref": "#/components/schemas/Event.command.executed"
  13079. },
  13080. {
  13081. "$ref": "#/components/schemas/Event.vcs.branch.updated"
  13082. },
  13083. {
  13084. "$ref": "#/components/schemas/Event.worktree.ready"
  13085. },
  13086. {
  13087. "$ref": "#/components/schemas/Event.worktree.failed"
  13088. },
  13089. {
  13090. "$ref": "#/components/schemas/Event.pty.created"
  13091. },
  13092. {
  13093. "$ref": "#/components/schemas/Event.pty.updated"
  13094. },
  13095. {
  13096. "$ref": "#/components/schemas/Event.pty.exited"
  13097. },
  13098. {
  13099. "$ref": "#/components/schemas/Event.pty.deleted"
  13100. },
  13101. {
  13102. "$ref": "#/components/schemas/Event.workspace.ready"
  13103. },
  13104. {
  13105. "$ref": "#/components/schemas/Event.workspace.failed"
  13106. },
  13107. {
  13108. "$ref": "#/components/schemas/Event.workspace.restore"
  13109. },
  13110. {
  13111. "$ref": "#/components/schemas/Event.workspace.status"
  13112. },
  13113. {
  13114. "$ref": "#/components/schemas/Event.message.updated"
  13115. },
  13116. {
  13117. "$ref": "#/components/schemas/Event.message.removed"
  13118. },
  13119. {
  13120. "$ref": "#/components/schemas/Event.message.part.updated"
  13121. },
  13122. {
  13123. "$ref": "#/components/schemas/Event.message.part.removed"
  13124. },
  13125. {
  13126. "$ref": "#/components/schemas/Event.session.created"
  13127. },
  13128. {
  13129. "$ref": "#/components/schemas/Event.session.updated"
  13130. },
  13131. {
  13132. "$ref": "#/components/schemas/Event.session.deleted"
  13133. }
  13134. ]
  13135. },
  13136. "MCPStatusConnected": {
  13137. "type": "object",
  13138. "properties": {
  13139. "status": {
  13140. "type": "string",
  13141. "const": "connected"
  13142. }
  13143. },
  13144. "required": ["status"]
  13145. },
  13146. "MCPStatusDisabled": {
  13147. "type": "object",
  13148. "properties": {
  13149. "status": {
  13150. "type": "string",
  13151. "const": "disabled"
  13152. }
  13153. },
  13154. "required": ["status"]
  13155. },
  13156. "MCPStatusFailed": {
  13157. "type": "object",
  13158. "properties": {
  13159. "status": {
  13160. "type": "string",
  13161. "const": "failed"
  13162. },
  13163. "error": {
  13164. "type": "string"
  13165. }
  13166. },
  13167. "required": ["status", "error"]
  13168. },
  13169. "MCPStatusNeedsAuth": {
  13170. "type": "object",
  13171. "properties": {
  13172. "status": {
  13173. "type": "string",
  13174. "const": "needs_auth"
  13175. }
  13176. },
  13177. "required": ["status"]
  13178. },
  13179. "MCPStatusNeedsClientRegistration": {
  13180. "type": "object",
  13181. "properties": {
  13182. "status": {
  13183. "type": "string",
  13184. "const": "needs_client_registration"
  13185. },
  13186. "error": {
  13187. "type": "string"
  13188. }
  13189. },
  13190. "required": ["status", "error"]
  13191. },
  13192. "MCPStatus": {
  13193. "anyOf": [
  13194. {
  13195. "$ref": "#/components/schemas/MCPStatusConnected"
  13196. },
  13197. {
  13198. "$ref": "#/components/schemas/MCPStatusDisabled"
  13199. },
  13200. {
  13201. "$ref": "#/components/schemas/MCPStatusFailed"
  13202. },
  13203. {
  13204. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  13205. },
  13206. {
  13207. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  13208. }
  13209. ]
  13210. },
  13211. "Path": {
  13212. "type": "object",
  13213. "properties": {
  13214. "home": {
  13215. "type": "string"
  13216. },
  13217. "state": {
  13218. "type": "string"
  13219. },
  13220. "config": {
  13221. "type": "string"
  13222. },
  13223. "worktree": {
  13224. "type": "string"
  13225. },
  13226. "directory": {
  13227. "type": "string"
  13228. }
  13229. },
  13230. "required": ["home", "state", "config", "worktree", "directory"]
  13231. },
  13232. "VcsInfo": {
  13233. "type": "object",
  13234. "properties": {
  13235. "branch": {
  13236. "type": "string"
  13237. },
  13238. "default_branch": {
  13239. "type": "string"
  13240. }
  13241. }
  13242. },
  13243. "VcsFileDiff": {
  13244. "type": "object",
  13245. "properties": {
  13246. "file": {
  13247. "type": "string"
  13248. },
  13249. "patch": {
  13250. "type": "string"
  13251. },
  13252. "additions": {
  13253. "type": "number"
  13254. },
  13255. "deletions": {
  13256. "type": "number"
  13257. },
  13258. "status": {
  13259. "type": "string",
  13260. "enum": ["added", "deleted", "modified"]
  13261. }
  13262. },
  13263. "required": ["file", "patch", "additions", "deletions"]
  13264. },
  13265. "Command": {
  13266. "type": "object",
  13267. "properties": {
  13268. "name": {
  13269. "type": "string"
  13270. },
  13271. "description": {
  13272. "type": "string"
  13273. },
  13274. "agent": {
  13275. "type": "string"
  13276. },
  13277. "model": {
  13278. "type": "string"
  13279. },
  13280. "source": {
  13281. "type": "string",
  13282. "enum": ["command", "mcp", "skill"]
  13283. },
  13284. "template": {
  13285. "anyOf": [
  13286. {
  13287. "type": "string"
  13288. },
  13289. {
  13290. "type": "string"
  13291. }
  13292. ]
  13293. },
  13294. "subtask": {
  13295. "type": "boolean"
  13296. },
  13297. "hints": {
  13298. "type": "array",
  13299. "items": {
  13300. "type": "string"
  13301. }
  13302. }
  13303. },
  13304. "required": ["name", "template", "hints"]
  13305. },
  13306. "Agent": {
  13307. "type": "object",
  13308. "properties": {
  13309. "name": {
  13310. "type": "string"
  13311. },
  13312. "description": {
  13313. "type": "string"
  13314. },
  13315. "mode": {
  13316. "type": "string",
  13317. "enum": ["subagent", "primary", "all"]
  13318. },
  13319. "native": {
  13320. "type": "boolean"
  13321. },
  13322. "hidden": {
  13323. "type": "boolean"
  13324. },
  13325. "topP": {
  13326. "type": "number"
  13327. },
  13328. "temperature": {
  13329. "type": "number"
  13330. },
  13331. "color": {
  13332. "type": "string"
  13333. },
  13334. "permission": {
  13335. "$ref": "#/components/schemas/PermissionRuleset"
  13336. },
  13337. "model": {
  13338. "type": "object",
  13339. "properties": {
  13340. "modelID": {
  13341. "type": "string"
  13342. },
  13343. "providerID": {
  13344. "type": "string"
  13345. }
  13346. },
  13347. "required": ["modelID", "providerID"]
  13348. },
  13349. "variant": {
  13350. "type": "string"
  13351. },
  13352. "prompt": {
  13353. "type": "string"
  13354. },
  13355. "options": {
  13356. "type": "object",
  13357. "propertyNames": {
  13358. "type": "string"
  13359. },
  13360. "additionalProperties": {}
  13361. },
  13362. "steps": {
  13363. "type": "integer",
  13364. "exclusiveMinimum": 0,
  13365. "maximum": 9007199254740991
  13366. }
  13367. },
  13368. "required": ["name", "mode", "permission", "options"]
  13369. },
  13370. "LSPStatus": {
  13371. "type": "object",
  13372. "properties": {
  13373. "id": {
  13374. "type": "string"
  13375. },
  13376. "name": {
  13377. "type": "string"
  13378. },
  13379. "root": {
  13380. "type": "string"
  13381. },
  13382. "status": {
  13383. "anyOf": [
  13384. {
  13385. "type": "string",
  13386. "const": "connected"
  13387. },
  13388. {
  13389. "type": "string",
  13390. "const": "error"
  13391. }
  13392. ]
  13393. }
  13394. },
  13395. "required": ["id", "name", "root", "status"]
  13396. },
  13397. "FormatterStatus": {
  13398. "type": "object",
  13399. "properties": {
  13400. "name": {
  13401. "type": "string"
  13402. },
  13403. "extensions": {
  13404. "type": "array",
  13405. "items": {
  13406. "type": "string"
  13407. }
  13408. },
  13409. "enabled": {
  13410. "type": "boolean"
  13411. }
  13412. },
  13413. "required": ["name", "extensions", "enabled"]
  13414. }
  13415. }
  13416. }
  13417. }