openapi.json 346 KB

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