openapi.json 322 KB

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