openapi.json 256 KB

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