openapi.json 269 KB

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