openapi.json 257 KB

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