openapi.json 301 KB

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