openapi.json 264 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572
  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. "parts": {
  2052. "type": "array",
  2053. "items": {
  2054. "anyOf": [
  2055. {
  2056. "$ref": "#/components/schemas/TextPartInput"
  2057. },
  2058. {
  2059. "$ref": "#/components/schemas/FilePartInput"
  2060. },
  2061. {
  2062. "$ref": "#/components/schemas/AgentPartInput"
  2063. },
  2064. {
  2065. "$ref": "#/components/schemas/SubtaskPartInput"
  2066. }
  2067. ]
  2068. }
  2069. }
  2070. },
  2071. "required": ["parts"]
  2072. }
  2073. }
  2074. }
  2075. },
  2076. "x-codeSamples": [
  2077. {
  2078. "lang": "js",
  2079. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  2080. }
  2081. ]
  2082. }
  2083. },
  2084. "/session/{sessionID}/message/{messageID}": {
  2085. "get": {
  2086. "operationId": "session.message",
  2087. "parameters": [
  2088. {
  2089. "in": "query",
  2090. "name": "directory",
  2091. "schema": {
  2092. "type": "string"
  2093. }
  2094. },
  2095. {
  2096. "in": "path",
  2097. "name": "sessionID",
  2098. "schema": {
  2099. "type": "string"
  2100. },
  2101. "required": true,
  2102. "description": "Session ID"
  2103. },
  2104. {
  2105. "in": "path",
  2106. "name": "messageID",
  2107. "schema": {
  2108. "type": "string"
  2109. },
  2110. "required": true,
  2111. "description": "Message ID"
  2112. }
  2113. ],
  2114. "summary": "Get message",
  2115. "description": "Retrieve a specific message from a session by its message ID.",
  2116. "responses": {
  2117. "200": {
  2118. "description": "Message",
  2119. "content": {
  2120. "application/json": {
  2121. "schema": {
  2122. "type": "object",
  2123. "properties": {
  2124. "info": {
  2125. "$ref": "#/components/schemas/Message"
  2126. },
  2127. "parts": {
  2128. "type": "array",
  2129. "items": {
  2130. "$ref": "#/components/schemas/Part"
  2131. }
  2132. }
  2133. },
  2134. "required": ["info", "parts"]
  2135. }
  2136. }
  2137. }
  2138. },
  2139. "400": {
  2140. "description": "Bad request",
  2141. "content": {
  2142. "application/json": {
  2143. "schema": {
  2144. "$ref": "#/components/schemas/BadRequestError"
  2145. }
  2146. }
  2147. }
  2148. },
  2149. "404": {
  2150. "description": "Not found",
  2151. "content": {
  2152. "application/json": {
  2153. "schema": {
  2154. "$ref": "#/components/schemas/NotFoundError"
  2155. }
  2156. }
  2157. }
  2158. }
  2159. },
  2160. "x-codeSamples": [
  2161. {
  2162. "lang": "js",
  2163. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  2164. }
  2165. ]
  2166. }
  2167. },
  2168. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  2169. "delete": {
  2170. "operationId": "part.delete",
  2171. "parameters": [
  2172. {
  2173. "in": "query",
  2174. "name": "directory",
  2175. "schema": {
  2176. "type": "string"
  2177. }
  2178. },
  2179. {
  2180. "in": "path",
  2181. "name": "sessionID",
  2182. "schema": {
  2183. "type": "string"
  2184. },
  2185. "required": true,
  2186. "description": "Session ID"
  2187. },
  2188. {
  2189. "in": "path",
  2190. "name": "messageID",
  2191. "schema": {
  2192. "type": "string"
  2193. },
  2194. "required": true,
  2195. "description": "Message ID"
  2196. },
  2197. {
  2198. "in": "path",
  2199. "name": "partID",
  2200. "schema": {
  2201. "type": "string"
  2202. },
  2203. "required": true,
  2204. "description": "Part ID"
  2205. }
  2206. ],
  2207. "description": "Delete a part from a message",
  2208. "responses": {
  2209. "200": {
  2210. "description": "Successfully deleted part",
  2211. "content": {
  2212. "application/json": {
  2213. "schema": {
  2214. "type": "boolean"
  2215. }
  2216. }
  2217. }
  2218. },
  2219. "400": {
  2220. "description": "Bad request",
  2221. "content": {
  2222. "application/json": {
  2223. "schema": {
  2224. "$ref": "#/components/schemas/BadRequestError"
  2225. }
  2226. }
  2227. }
  2228. },
  2229. "404": {
  2230. "description": "Not found",
  2231. "content": {
  2232. "application/json": {
  2233. "schema": {
  2234. "$ref": "#/components/schemas/NotFoundError"
  2235. }
  2236. }
  2237. }
  2238. }
  2239. },
  2240. "x-codeSamples": [
  2241. {
  2242. "lang": "js",
  2243. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  2244. }
  2245. ]
  2246. },
  2247. "patch": {
  2248. "operationId": "part.update",
  2249. "parameters": [
  2250. {
  2251. "in": "query",
  2252. "name": "directory",
  2253. "schema": {
  2254. "type": "string"
  2255. }
  2256. },
  2257. {
  2258. "in": "path",
  2259. "name": "sessionID",
  2260. "schema": {
  2261. "type": "string"
  2262. },
  2263. "required": true,
  2264. "description": "Session ID"
  2265. },
  2266. {
  2267. "in": "path",
  2268. "name": "messageID",
  2269. "schema": {
  2270. "type": "string"
  2271. },
  2272. "required": true,
  2273. "description": "Message ID"
  2274. },
  2275. {
  2276. "in": "path",
  2277. "name": "partID",
  2278. "schema": {
  2279. "type": "string"
  2280. },
  2281. "required": true,
  2282. "description": "Part ID"
  2283. }
  2284. ],
  2285. "description": "Update a part in a message",
  2286. "responses": {
  2287. "200": {
  2288. "description": "Successfully updated part",
  2289. "content": {
  2290. "application/json": {
  2291. "schema": {
  2292. "$ref": "#/components/schemas/Part"
  2293. }
  2294. }
  2295. }
  2296. },
  2297. "400": {
  2298. "description": "Bad request",
  2299. "content": {
  2300. "application/json": {
  2301. "schema": {
  2302. "$ref": "#/components/schemas/BadRequestError"
  2303. }
  2304. }
  2305. }
  2306. },
  2307. "404": {
  2308. "description": "Not found",
  2309. "content": {
  2310. "application/json": {
  2311. "schema": {
  2312. "$ref": "#/components/schemas/NotFoundError"
  2313. }
  2314. }
  2315. }
  2316. }
  2317. },
  2318. "requestBody": {
  2319. "content": {
  2320. "application/json": {
  2321. "schema": {
  2322. "$ref": "#/components/schemas/Part"
  2323. }
  2324. }
  2325. }
  2326. },
  2327. "x-codeSamples": [
  2328. {
  2329. "lang": "js",
  2330. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  2331. }
  2332. ]
  2333. }
  2334. },
  2335. "/session/{sessionID}/prompt_async": {
  2336. "post": {
  2337. "operationId": "session.prompt_async",
  2338. "parameters": [
  2339. {
  2340. "in": "query",
  2341. "name": "directory",
  2342. "schema": {
  2343. "type": "string"
  2344. }
  2345. },
  2346. {
  2347. "in": "path",
  2348. "name": "sessionID",
  2349. "schema": {
  2350. "type": "string"
  2351. },
  2352. "required": true,
  2353. "description": "Session ID"
  2354. }
  2355. ],
  2356. "summary": "Send async message",
  2357. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  2358. "responses": {
  2359. "204": {
  2360. "description": "Prompt accepted"
  2361. },
  2362. "400": {
  2363. "description": "Bad request",
  2364. "content": {
  2365. "application/json": {
  2366. "schema": {
  2367. "$ref": "#/components/schemas/BadRequestError"
  2368. }
  2369. }
  2370. }
  2371. },
  2372. "404": {
  2373. "description": "Not found",
  2374. "content": {
  2375. "application/json": {
  2376. "schema": {
  2377. "$ref": "#/components/schemas/NotFoundError"
  2378. }
  2379. }
  2380. }
  2381. }
  2382. },
  2383. "requestBody": {
  2384. "content": {
  2385. "application/json": {
  2386. "schema": {
  2387. "type": "object",
  2388. "properties": {
  2389. "messageID": {
  2390. "type": "string",
  2391. "pattern": "^msg.*"
  2392. },
  2393. "model": {
  2394. "type": "object",
  2395. "properties": {
  2396. "providerID": {
  2397. "type": "string"
  2398. },
  2399. "modelID": {
  2400. "type": "string"
  2401. }
  2402. },
  2403. "required": ["providerID", "modelID"]
  2404. },
  2405. "agent": {
  2406. "type": "string"
  2407. },
  2408. "noReply": {
  2409. "type": "boolean"
  2410. },
  2411. "tools": {
  2412. "type": "object",
  2413. "propertyNames": {
  2414. "type": "string"
  2415. },
  2416. "additionalProperties": {
  2417. "type": "boolean"
  2418. }
  2419. },
  2420. "system": {
  2421. "type": "string"
  2422. },
  2423. "parts": {
  2424. "type": "array",
  2425. "items": {
  2426. "anyOf": [
  2427. {
  2428. "$ref": "#/components/schemas/TextPartInput"
  2429. },
  2430. {
  2431. "$ref": "#/components/schemas/FilePartInput"
  2432. },
  2433. {
  2434. "$ref": "#/components/schemas/AgentPartInput"
  2435. },
  2436. {
  2437. "$ref": "#/components/schemas/SubtaskPartInput"
  2438. }
  2439. ]
  2440. }
  2441. }
  2442. },
  2443. "required": ["parts"]
  2444. }
  2445. }
  2446. }
  2447. },
  2448. "x-codeSamples": [
  2449. {
  2450. "lang": "js",
  2451. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  2452. }
  2453. ]
  2454. }
  2455. },
  2456. "/session/{sessionID}/command": {
  2457. "post": {
  2458. "operationId": "session.command",
  2459. "parameters": [
  2460. {
  2461. "in": "query",
  2462. "name": "directory",
  2463. "schema": {
  2464. "type": "string"
  2465. }
  2466. },
  2467. {
  2468. "in": "path",
  2469. "name": "sessionID",
  2470. "schema": {
  2471. "type": "string"
  2472. },
  2473. "required": true,
  2474. "description": "Session ID"
  2475. }
  2476. ],
  2477. "summary": "Send command",
  2478. "description": "Send a new command to a session for execution by the AI assistant.",
  2479. "responses": {
  2480. "200": {
  2481. "description": "Created message",
  2482. "content": {
  2483. "application/json": {
  2484. "schema": {
  2485. "type": "object",
  2486. "properties": {
  2487. "info": {
  2488. "$ref": "#/components/schemas/AssistantMessage"
  2489. },
  2490. "parts": {
  2491. "type": "array",
  2492. "items": {
  2493. "$ref": "#/components/schemas/Part"
  2494. }
  2495. }
  2496. },
  2497. "required": ["info", "parts"]
  2498. }
  2499. }
  2500. }
  2501. },
  2502. "400": {
  2503. "description": "Bad request",
  2504. "content": {
  2505. "application/json": {
  2506. "schema": {
  2507. "$ref": "#/components/schemas/BadRequestError"
  2508. }
  2509. }
  2510. }
  2511. },
  2512. "404": {
  2513. "description": "Not found",
  2514. "content": {
  2515. "application/json": {
  2516. "schema": {
  2517. "$ref": "#/components/schemas/NotFoundError"
  2518. }
  2519. }
  2520. }
  2521. }
  2522. },
  2523. "requestBody": {
  2524. "content": {
  2525. "application/json": {
  2526. "schema": {
  2527. "type": "object",
  2528. "properties": {
  2529. "messageID": {
  2530. "type": "string",
  2531. "pattern": "^msg.*"
  2532. },
  2533. "agent": {
  2534. "type": "string"
  2535. },
  2536. "model": {
  2537. "type": "string"
  2538. },
  2539. "arguments": {
  2540. "type": "string"
  2541. },
  2542. "command": {
  2543. "type": "string"
  2544. }
  2545. },
  2546. "required": ["arguments", "command"]
  2547. }
  2548. }
  2549. }
  2550. },
  2551. "x-codeSamples": [
  2552. {
  2553. "lang": "js",
  2554. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  2555. }
  2556. ]
  2557. }
  2558. },
  2559. "/session/{sessionID}/shell": {
  2560. "post": {
  2561. "operationId": "session.shell",
  2562. "parameters": [
  2563. {
  2564. "in": "query",
  2565. "name": "directory",
  2566. "schema": {
  2567. "type": "string"
  2568. }
  2569. },
  2570. {
  2571. "in": "path",
  2572. "name": "sessionID",
  2573. "schema": {
  2574. "type": "string"
  2575. },
  2576. "required": true,
  2577. "description": "Session ID"
  2578. }
  2579. ],
  2580. "summary": "Run shell command",
  2581. "description": "Execute a shell command within the session context and return the AI's response.",
  2582. "responses": {
  2583. "200": {
  2584. "description": "Created message",
  2585. "content": {
  2586. "application/json": {
  2587. "schema": {
  2588. "$ref": "#/components/schemas/AssistantMessage"
  2589. }
  2590. }
  2591. }
  2592. },
  2593. "400": {
  2594. "description": "Bad request",
  2595. "content": {
  2596. "application/json": {
  2597. "schema": {
  2598. "$ref": "#/components/schemas/BadRequestError"
  2599. }
  2600. }
  2601. }
  2602. },
  2603. "404": {
  2604. "description": "Not found",
  2605. "content": {
  2606. "application/json": {
  2607. "schema": {
  2608. "$ref": "#/components/schemas/NotFoundError"
  2609. }
  2610. }
  2611. }
  2612. }
  2613. },
  2614. "requestBody": {
  2615. "content": {
  2616. "application/json": {
  2617. "schema": {
  2618. "type": "object",
  2619. "properties": {
  2620. "agent": {
  2621. "type": "string"
  2622. },
  2623. "model": {
  2624. "type": "object",
  2625. "properties": {
  2626. "providerID": {
  2627. "type": "string"
  2628. },
  2629. "modelID": {
  2630. "type": "string"
  2631. }
  2632. },
  2633. "required": ["providerID", "modelID"]
  2634. },
  2635. "command": {
  2636. "type": "string"
  2637. }
  2638. },
  2639. "required": ["agent", "command"]
  2640. }
  2641. }
  2642. }
  2643. },
  2644. "x-codeSamples": [
  2645. {
  2646. "lang": "js",
  2647. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  2648. }
  2649. ]
  2650. }
  2651. },
  2652. "/session/{sessionID}/revert": {
  2653. "post": {
  2654. "operationId": "session.revert",
  2655. "parameters": [
  2656. {
  2657. "in": "query",
  2658. "name": "directory",
  2659. "schema": {
  2660. "type": "string"
  2661. }
  2662. },
  2663. {
  2664. "in": "path",
  2665. "name": "sessionID",
  2666. "schema": {
  2667. "type": "string"
  2668. },
  2669. "required": true
  2670. }
  2671. ],
  2672. "summary": "Revert message",
  2673. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  2674. "responses": {
  2675. "200": {
  2676. "description": "Updated session",
  2677. "content": {
  2678. "application/json": {
  2679. "schema": {
  2680. "$ref": "#/components/schemas/Session"
  2681. }
  2682. }
  2683. }
  2684. },
  2685. "400": {
  2686. "description": "Bad request",
  2687. "content": {
  2688. "application/json": {
  2689. "schema": {
  2690. "$ref": "#/components/schemas/BadRequestError"
  2691. }
  2692. }
  2693. }
  2694. },
  2695. "404": {
  2696. "description": "Not found",
  2697. "content": {
  2698. "application/json": {
  2699. "schema": {
  2700. "$ref": "#/components/schemas/NotFoundError"
  2701. }
  2702. }
  2703. }
  2704. }
  2705. },
  2706. "requestBody": {
  2707. "content": {
  2708. "application/json": {
  2709. "schema": {
  2710. "type": "object",
  2711. "properties": {
  2712. "messageID": {
  2713. "type": "string",
  2714. "pattern": "^msg.*"
  2715. },
  2716. "partID": {
  2717. "type": "string",
  2718. "pattern": "^prt.*"
  2719. }
  2720. },
  2721. "required": ["messageID"]
  2722. }
  2723. }
  2724. }
  2725. },
  2726. "x-codeSamples": [
  2727. {
  2728. "lang": "js",
  2729. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  2730. }
  2731. ]
  2732. }
  2733. },
  2734. "/session/{sessionID}/unrevert": {
  2735. "post": {
  2736. "operationId": "session.unrevert",
  2737. "parameters": [
  2738. {
  2739. "in": "query",
  2740. "name": "directory",
  2741. "schema": {
  2742. "type": "string"
  2743. }
  2744. },
  2745. {
  2746. "in": "path",
  2747. "name": "sessionID",
  2748. "schema": {
  2749. "type": "string"
  2750. },
  2751. "required": true
  2752. }
  2753. ],
  2754. "summary": "Restore reverted messages",
  2755. "description": "Restore all previously reverted messages in a session.",
  2756. "responses": {
  2757. "200": {
  2758. "description": "Updated session",
  2759. "content": {
  2760. "application/json": {
  2761. "schema": {
  2762. "$ref": "#/components/schemas/Session"
  2763. }
  2764. }
  2765. }
  2766. },
  2767. "400": {
  2768. "description": "Bad request",
  2769. "content": {
  2770. "application/json": {
  2771. "schema": {
  2772. "$ref": "#/components/schemas/BadRequestError"
  2773. }
  2774. }
  2775. }
  2776. },
  2777. "404": {
  2778. "description": "Not found",
  2779. "content": {
  2780. "application/json": {
  2781. "schema": {
  2782. "$ref": "#/components/schemas/NotFoundError"
  2783. }
  2784. }
  2785. }
  2786. }
  2787. },
  2788. "x-codeSamples": [
  2789. {
  2790. "lang": "js",
  2791. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  2792. }
  2793. ]
  2794. }
  2795. },
  2796. "/session/{sessionID}/permissions/{permissionID}": {
  2797. "post": {
  2798. "operationId": "permission.respond",
  2799. "parameters": [
  2800. {
  2801. "in": "query",
  2802. "name": "directory",
  2803. "schema": {
  2804. "type": "string"
  2805. }
  2806. },
  2807. {
  2808. "in": "path",
  2809. "name": "sessionID",
  2810. "schema": {
  2811. "type": "string"
  2812. },
  2813. "required": true
  2814. },
  2815. {
  2816. "in": "path",
  2817. "name": "permissionID",
  2818. "schema": {
  2819. "type": "string"
  2820. },
  2821. "required": true
  2822. }
  2823. ],
  2824. "summary": "Respond to permission",
  2825. "description": "Approve or deny a permission request from the AI assistant.",
  2826. "responses": {
  2827. "200": {
  2828. "description": "Permission processed successfully",
  2829. "content": {
  2830. "application/json": {
  2831. "schema": {
  2832. "type": "boolean"
  2833. }
  2834. }
  2835. }
  2836. },
  2837. "400": {
  2838. "description": "Bad request",
  2839. "content": {
  2840. "application/json": {
  2841. "schema": {
  2842. "$ref": "#/components/schemas/BadRequestError"
  2843. }
  2844. }
  2845. }
  2846. },
  2847. "404": {
  2848. "description": "Not found",
  2849. "content": {
  2850. "application/json": {
  2851. "schema": {
  2852. "$ref": "#/components/schemas/NotFoundError"
  2853. }
  2854. }
  2855. }
  2856. }
  2857. },
  2858. "requestBody": {
  2859. "content": {
  2860. "application/json": {
  2861. "schema": {
  2862. "type": "object",
  2863. "properties": {
  2864. "response": {
  2865. "type": "string",
  2866. "enum": ["once", "always", "reject"]
  2867. }
  2868. },
  2869. "required": ["response"]
  2870. }
  2871. }
  2872. }
  2873. },
  2874. "x-codeSamples": [
  2875. {
  2876. "lang": "js",
  2877. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  2878. }
  2879. ]
  2880. }
  2881. },
  2882. "/command": {
  2883. "get": {
  2884. "operationId": "command.list",
  2885. "parameters": [
  2886. {
  2887. "in": "query",
  2888. "name": "directory",
  2889. "schema": {
  2890. "type": "string"
  2891. }
  2892. }
  2893. ],
  2894. "summary": "List commands",
  2895. "description": "Get a list of all available commands in the OpenCode system.",
  2896. "responses": {
  2897. "200": {
  2898. "description": "List of commands",
  2899. "content": {
  2900. "application/json": {
  2901. "schema": {
  2902. "type": "array",
  2903. "items": {
  2904. "$ref": "#/components/schemas/Command"
  2905. }
  2906. }
  2907. }
  2908. }
  2909. }
  2910. },
  2911. "x-codeSamples": [
  2912. {
  2913. "lang": "js",
  2914. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
  2915. }
  2916. ]
  2917. }
  2918. },
  2919. "/config/providers": {
  2920. "get": {
  2921. "operationId": "config.providers",
  2922. "parameters": [
  2923. {
  2924. "in": "query",
  2925. "name": "directory",
  2926. "schema": {
  2927. "type": "string"
  2928. }
  2929. }
  2930. ],
  2931. "summary": "List config providers",
  2932. "description": "Get a list of all configured AI providers and their default models.",
  2933. "responses": {
  2934. "200": {
  2935. "description": "List of providers",
  2936. "content": {
  2937. "application/json": {
  2938. "schema": {
  2939. "type": "object",
  2940. "properties": {
  2941. "providers": {
  2942. "type": "array",
  2943. "items": {
  2944. "$ref": "#/components/schemas/Provider"
  2945. }
  2946. },
  2947. "default": {
  2948. "type": "object",
  2949. "propertyNames": {
  2950. "type": "string"
  2951. },
  2952. "additionalProperties": {
  2953. "type": "string"
  2954. }
  2955. }
  2956. },
  2957. "required": ["providers", "default"]
  2958. }
  2959. }
  2960. }
  2961. }
  2962. },
  2963. "x-codeSamples": [
  2964. {
  2965. "lang": "js",
  2966. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.providers({\n ...\n})"
  2967. }
  2968. ]
  2969. }
  2970. },
  2971. "/provider": {
  2972. "get": {
  2973. "operationId": "provider.list",
  2974. "parameters": [
  2975. {
  2976. "in": "query",
  2977. "name": "directory",
  2978. "schema": {
  2979. "type": "string"
  2980. }
  2981. }
  2982. ],
  2983. "summary": "List providers",
  2984. "description": "Get a list of all available AI providers, including both available and connected ones.",
  2985. "responses": {
  2986. "200": {
  2987. "description": "List of providers",
  2988. "content": {
  2989. "application/json": {
  2990. "schema": {
  2991. "type": "object",
  2992. "properties": {
  2993. "all": {
  2994. "type": "array",
  2995. "items": {
  2996. "type": "object",
  2997. "properties": {
  2998. "api": {
  2999. "type": "string"
  3000. },
  3001. "name": {
  3002. "type": "string"
  3003. },
  3004. "env": {
  3005. "type": "array",
  3006. "items": {
  3007. "type": "string"
  3008. }
  3009. },
  3010. "id": {
  3011. "type": "string"
  3012. },
  3013. "npm": {
  3014. "type": "string"
  3015. },
  3016. "models": {
  3017. "type": "object",
  3018. "propertyNames": {
  3019. "type": "string"
  3020. },
  3021. "additionalProperties": {
  3022. "type": "object",
  3023. "properties": {
  3024. "id": {
  3025. "type": "string"
  3026. },
  3027. "name": {
  3028. "type": "string"
  3029. },
  3030. "family": {
  3031. "type": "string"
  3032. },
  3033. "release_date": {
  3034. "type": "string"
  3035. },
  3036. "attachment": {
  3037. "type": "boolean"
  3038. },
  3039. "reasoning": {
  3040. "type": "boolean"
  3041. },
  3042. "temperature": {
  3043. "type": "boolean"
  3044. },
  3045. "tool_call": {
  3046. "type": "boolean"
  3047. },
  3048. "interleaved": {
  3049. "anyOf": [
  3050. {
  3051. "type": "boolean",
  3052. "const": true
  3053. },
  3054. {
  3055. "type": "object",
  3056. "properties": {
  3057. "field": {
  3058. "type": "string",
  3059. "enum": ["reasoning_content", "reasoning_details"]
  3060. }
  3061. },
  3062. "required": ["field"],
  3063. "additionalProperties": false
  3064. }
  3065. ]
  3066. },
  3067. "cost": {
  3068. "type": "object",
  3069. "properties": {
  3070. "input": {
  3071. "type": "number"
  3072. },
  3073. "output": {
  3074. "type": "number"
  3075. },
  3076. "cache_read": {
  3077. "type": "number"
  3078. },
  3079. "cache_write": {
  3080. "type": "number"
  3081. },
  3082. "context_over_200k": {
  3083. "type": "object",
  3084. "properties": {
  3085. "input": {
  3086. "type": "number"
  3087. },
  3088. "output": {
  3089. "type": "number"
  3090. },
  3091. "cache_read": {
  3092. "type": "number"
  3093. },
  3094. "cache_write": {
  3095. "type": "number"
  3096. }
  3097. },
  3098. "required": ["input", "output"]
  3099. }
  3100. },
  3101. "required": ["input", "output"]
  3102. },
  3103. "limit": {
  3104. "type": "object",
  3105. "properties": {
  3106. "context": {
  3107. "type": "number"
  3108. },
  3109. "output": {
  3110. "type": "number"
  3111. }
  3112. },
  3113. "required": ["context", "output"]
  3114. },
  3115. "modalities": {
  3116. "type": "object",
  3117. "properties": {
  3118. "input": {
  3119. "type": "array",
  3120. "items": {
  3121. "type": "string",
  3122. "enum": ["text", "audio", "image", "video", "pdf"]
  3123. }
  3124. },
  3125. "output": {
  3126. "type": "array",
  3127. "items": {
  3128. "type": "string",
  3129. "enum": ["text", "audio", "image", "video", "pdf"]
  3130. }
  3131. }
  3132. },
  3133. "required": ["input", "output"]
  3134. },
  3135. "experimental": {
  3136. "type": "boolean"
  3137. },
  3138. "status": {
  3139. "type": "string",
  3140. "enum": ["alpha", "beta", "deprecated"]
  3141. },
  3142. "options": {
  3143. "type": "object",
  3144. "propertyNames": {
  3145. "type": "string"
  3146. },
  3147. "additionalProperties": {}
  3148. },
  3149. "headers": {
  3150. "type": "object",
  3151. "propertyNames": {
  3152. "type": "string"
  3153. },
  3154. "additionalProperties": {
  3155. "type": "string"
  3156. }
  3157. },
  3158. "provider": {
  3159. "type": "object",
  3160. "properties": {
  3161. "npm": {
  3162. "type": "string"
  3163. }
  3164. },
  3165. "required": ["npm"]
  3166. }
  3167. },
  3168. "required": [
  3169. "id",
  3170. "name",
  3171. "release_date",
  3172. "attachment",
  3173. "reasoning",
  3174. "temperature",
  3175. "tool_call",
  3176. "limit",
  3177. "options"
  3178. ]
  3179. }
  3180. }
  3181. },
  3182. "required": ["name", "env", "id", "models"]
  3183. }
  3184. },
  3185. "default": {
  3186. "type": "object",
  3187. "propertyNames": {
  3188. "type": "string"
  3189. },
  3190. "additionalProperties": {
  3191. "type": "string"
  3192. }
  3193. },
  3194. "connected": {
  3195. "type": "array",
  3196. "items": {
  3197. "type": "string"
  3198. }
  3199. }
  3200. },
  3201. "required": ["all", "default", "connected"]
  3202. }
  3203. }
  3204. }
  3205. }
  3206. },
  3207. "x-codeSamples": [
  3208. {
  3209. "lang": "js",
  3210. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  3211. }
  3212. ]
  3213. }
  3214. },
  3215. "/provider/auth": {
  3216. "get": {
  3217. "operationId": "provider.auth",
  3218. "parameters": [
  3219. {
  3220. "in": "query",
  3221. "name": "directory",
  3222. "schema": {
  3223. "type": "string"
  3224. }
  3225. }
  3226. ],
  3227. "summary": "Get provider auth methods",
  3228. "description": "Retrieve available authentication methods for all AI providers.",
  3229. "responses": {
  3230. "200": {
  3231. "description": "Provider auth methods",
  3232. "content": {
  3233. "application/json": {
  3234. "schema": {
  3235. "type": "object",
  3236. "propertyNames": {
  3237. "type": "string"
  3238. },
  3239. "additionalProperties": {
  3240. "type": "array",
  3241. "items": {
  3242. "$ref": "#/components/schemas/ProviderAuthMethod"
  3243. }
  3244. }
  3245. }
  3246. }
  3247. }
  3248. }
  3249. },
  3250. "x-codeSamples": [
  3251. {
  3252. "lang": "js",
  3253. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  3254. }
  3255. ]
  3256. }
  3257. },
  3258. "/provider/{providerID}/oauth/authorize": {
  3259. "post": {
  3260. "operationId": "provider.oauth.authorize",
  3261. "parameters": [
  3262. {
  3263. "in": "query",
  3264. "name": "directory",
  3265. "schema": {
  3266. "type": "string"
  3267. }
  3268. },
  3269. {
  3270. "in": "path",
  3271. "name": "providerID",
  3272. "schema": {
  3273. "type": "string"
  3274. },
  3275. "required": true,
  3276. "description": "Provider ID"
  3277. }
  3278. ],
  3279. "summary": "OAuth authorize",
  3280. "description": "Initiate OAuth authorization for a specific AI provider to get an authorization URL.",
  3281. "responses": {
  3282. "200": {
  3283. "description": "Authorization URL and method",
  3284. "content": {
  3285. "application/json": {
  3286. "schema": {
  3287. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  3288. }
  3289. }
  3290. }
  3291. },
  3292. "400": {
  3293. "description": "Bad request",
  3294. "content": {
  3295. "application/json": {
  3296. "schema": {
  3297. "$ref": "#/components/schemas/BadRequestError"
  3298. }
  3299. }
  3300. }
  3301. }
  3302. },
  3303. "requestBody": {
  3304. "content": {
  3305. "application/json": {
  3306. "schema": {
  3307. "type": "object",
  3308. "properties": {
  3309. "method": {
  3310. "description": "Auth method index",
  3311. "type": "number"
  3312. }
  3313. },
  3314. "required": ["method"]
  3315. }
  3316. }
  3317. }
  3318. },
  3319. "x-codeSamples": [
  3320. {
  3321. "lang": "js",
  3322. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  3323. }
  3324. ]
  3325. }
  3326. },
  3327. "/provider/{providerID}/oauth/callback": {
  3328. "post": {
  3329. "operationId": "provider.oauth.callback",
  3330. "parameters": [
  3331. {
  3332. "in": "query",
  3333. "name": "directory",
  3334. "schema": {
  3335. "type": "string"
  3336. }
  3337. },
  3338. {
  3339. "in": "path",
  3340. "name": "providerID",
  3341. "schema": {
  3342. "type": "string"
  3343. },
  3344. "required": true,
  3345. "description": "Provider ID"
  3346. }
  3347. ],
  3348. "summary": "OAuth callback",
  3349. "description": "Handle the OAuth callback from a provider after user authorization.",
  3350. "responses": {
  3351. "200": {
  3352. "description": "OAuth callback processed successfully",
  3353. "content": {
  3354. "application/json": {
  3355. "schema": {
  3356. "type": "boolean"
  3357. }
  3358. }
  3359. }
  3360. },
  3361. "400": {
  3362. "description": "Bad request",
  3363. "content": {
  3364. "application/json": {
  3365. "schema": {
  3366. "$ref": "#/components/schemas/BadRequestError"
  3367. }
  3368. }
  3369. }
  3370. }
  3371. },
  3372. "requestBody": {
  3373. "content": {
  3374. "application/json": {
  3375. "schema": {
  3376. "type": "object",
  3377. "properties": {
  3378. "method": {
  3379. "description": "Auth method index",
  3380. "type": "number"
  3381. },
  3382. "code": {
  3383. "description": "OAuth authorization code",
  3384. "type": "string"
  3385. }
  3386. },
  3387. "required": ["method"]
  3388. }
  3389. }
  3390. }
  3391. },
  3392. "x-codeSamples": [
  3393. {
  3394. "lang": "js",
  3395. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  3396. }
  3397. ]
  3398. }
  3399. },
  3400. "/find": {
  3401. "get": {
  3402. "operationId": "find.text",
  3403. "parameters": [
  3404. {
  3405. "in": "query",
  3406. "name": "directory",
  3407. "schema": {
  3408. "type": "string"
  3409. }
  3410. },
  3411. {
  3412. "in": "query",
  3413. "name": "pattern",
  3414. "schema": {
  3415. "type": "string"
  3416. },
  3417. "required": true
  3418. }
  3419. ],
  3420. "summary": "Find text",
  3421. "description": "Search for text patterns across files in the project using ripgrep.",
  3422. "responses": {
  3423. "200": {
  3424. "description": "Matches",
  3425. "content": {
  3426. "application/json": {
  3427. "schema": {
  3428. "type": "array",
  3429. "items": {
  3430. "type": "object",
  3431. "properties": {
  3432. "path": {
  3433. "type": "object",
  3434. "properties": {
  3435. "text": {
  3436. "type": "string"
  3437. }
  3438. },
  3439. "required": ["text"]
  3440. },
  3441. "lines": {
  3442. "type": "object",
  3443. "properties": {
  3444. "text": {
  3445. "type": "string"
  3446. }
  3447. },
  3448. "required": ["text"]
  3449. },
  3450. "line_number": {
  3451. "type": "number"
  3452. },
  3453. "absolute_offset": {
  3454. "type": "number"
  3455. },
  3456. "submatches": {
  3457. "type": "array",
  3458. "items": {
  3459. "type": "object",
  3460. "properties": {
  3461. "match": {
  3462. "type": "object",
  3463. "properties": {
  3464. "text": {
  3465. "type": "string"
  3466. }
  3467. },
  3468. "required": ["text"]
  3469. },
  3470. "start": {
  3471. "type": "number"
  3472. },
  3473. "end": {
  3474. "type": "number"
  3475. }
  3476. },
  3477. "required": ["match", "start", "end"]
  3478. }
  3479. }
  3480. },
  3481. "required": ["path", "lines", "line_number", "absolute_offset", "submatches"]
  3482. }
  3483. }
  3484. }
  3485. }
  3486. }
  3487. },
  3488. "x-codeSamples": [
  3489. {
  3490. "lang": "js",
  3491. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
  3492. }
  3493. ]
  3494. }
  3495. },
  3496. "/find/file": {
  3497. "get": {
  3498. "operationId": "find.files",
  3499. "parameters": [
  3500. {
  3501. "in": "query",
  3502. "name": "directory",
  3503. "schema": {
  3504. "type": "string"
  3505. }
  3506. },
  3507. {
  3508. "in": "query",
  3509. "name": "query",
  3510. "schema": {
  3511. "type": "string"
  3512. },
  3513. "required": true
  3514. },
  3515. {
  3516. "in": "query",
  3517. "name": "dirs",
  3518. "schema": {
  3519. "type": "string",
  3520. "enum": ["true", "false"]
  3521. }
  3522. }
  3523. ],
  3524. "summary": "Find files",
  3525. "description": "Search for files by name or pattern in the project directory.",
  3526. "responses": {
  3527. "200": {
  3528. "description": "File paths",
  3529. "content": {
  3530. "application/json": {
  3531. "schema": {
  3532. "type": "array",
  3533. "items": {
  3534. "type": "string"
  3535. }
  3536. }
  3537. }
  3538. }
  3539. }
  3540. },
  3541. "x-codeSamples": [
  3542. {
  3543. "lang": "js",
  3544. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
  3545. }
  3546. ]
  3547. }
  3548. },
  3549. "/find/symbol": {
  3550. "get": {
  3551. "operationId": "find.symbols",
  3552. "parameters": [
  3553. {
  3554. "in": "query",
  3555. "name": "directory",
  3556. "schema": {
  3557. "type": "string"
  3558. }
  3559. },
  3560. {
  3561. "in": "query",
  3562. "name": "query",
  3563. "schema": {
  3564. "type": "string"
  3565. },
  3566. "required": true
  3567. }
  3568. ],
  3569. "summary": "Find symbols",
  3570. "description": "Search for workspace symbols like functions, classes, and variables using LSP.",
  3571. "responses": {
  3572. "200": {
  3573. "description": "Symbols",
  3574. "content": {
  3575. "application/json": {
  3576. "schema": {
  3577. "type": "array",
  3578. "items": {
  3579. "$ref": "#/components/schemas/Symbol"
  3580. }
  3581. }
  3582. }
  3583. }
  3584. }
  3585. },
  3586. "x-codeSamples": [
  3587. {
  3588. "lang": "js",
  3589. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
  3590. }
  3591. ]
  3592. }
  3593. },
  3594. "/file": {
  3595. "get": {
  3596. "operationId": "file.list",
  3597. "parameters": [
  3598. {
  3599. "in": "query",
  3600. "name": "directory",
  3601. "schema": {
  3602. "type": "string"
  3603. }
  3604. },
  3605. {
  3606. "in": "query",
  3607. "name": "path",
  3608. "schema": {
  3609. "type": "string"
  3610. },
  3611. "required": true
  3612. }
  3613. ],
  3614. "summary": "List files",
  3615. "description": "List files and directories in a specified path.",
  3616. "responses": {
  3617. "200": {
  3618. "description": "Files and directories",
  3619. "content": {
  3620. "application/json": {
  3621. "schema": {
  3622. "type": "array",
  3623. "items": {
  3624. "$ref": "#/components/schemas/FileNode"
  3625. }
  3626. }
  3627. }
  3628. }
  3629. }
  3630. },
  3631. "x-codeSamples": [
  3632. {
  3633. "lang": "js",
  3634. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
  3635. }
  3636. ]
  3637. }
  3638. },
  3639. "/file/content": {
  3640. "get": {
  3641. "operationId": "file.read",
  3642. "parameters": [
  3643. {
  3644. "in": "query",
  3645. "name": "directory",
  3646. "schema": {
  3647. "type": "string"
  3648. }
  3649. },
  3650. {
  3651. "in": "query",
  3652. "name": "path",
  3653. "schema": {
  3654. "type": "string"
  3655. },
  3656. "required": true
  3657. }
  3658. ],
  3659. "summary": "Read file",
  3660. "description": "Read the content of a specified file.",
  3661. "responses": {
  3662. "200": {
  3663. "description": "File content",
  3664. "content": {
  3665. "application/json": {
  3666. "schema": {
  3667. "$ref": "#/components/schemas/FileContent"
  3668. }
  3669. }
  3670. }
  3671. }
  3672. },
  3673. "x-codeSamples": [
  3674. {
  3675. "lang": "js",
  3676. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
  3677. }
  3678. ]
  3679. }
  3680. },
  3681. "/file/status": {
  3682. "get": {
  3683. "operationId": "file.status",
  3684. "parameters": [
  3685. {
  3686. "in": "query",
  3687. "name": "directory",
  3688. "schema": {
  3689. "type": "string"
  3690. }
  3691. }
  3692. ],
  3693. "summary": "Get file status",
  3694. "description": "Get the git status of all files in the project.",
  3695. "responses": {
  3696. "200": {
  3697. "description": "File status",
  3698. "content": {
  3699. "application/json": {
  3700. "schema": {
  3701. "type": "array",
  3702. "items": {
  3703. "$ref": "#/components/schemas/File"
  3704. }
  3705. }
  3706. }
  3707. }
  3708. }
  3709. },
  3710. "x-codeSamples": [
  3711. {
  3712. "lang": "js",
  3713. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
  3714. }
  3715. ]
  3716. }
  3717. },
  3718. "/log": {
  3719. "post": {
  3720. "operationId": "app.log",
  3721. "parameters": [
  3722. {
  3723. "in": "query",
  3724. "name": "directory",
  3725. "schema": {
  3726. "type": "string"
  3727. }
  3728. }
  3729. ],
  3730. "summary": "Write log",
  3731. "description": "Write a log entry to the server logs with specified level and metadata.",
  3732. "responses": {
  3733. "200": {
  3734. "description": "Log entry written successfully",
  3735. "content": {
  3736. "application/json": {
  3737. "schema": {
  3738. "type": "boolean"
  3739. }
  3740. }
  3741. }
  3742. },
  3743. "400": {
  3744. "description": "Bad request",
  3745. "content": {
  3746. "application/json": {
  3747. "schema": {
  3748. "$ref": "#/components/schemas/BadRequestError"
  3749. }
  3750. }
  3751. }
  3752. }
  3753. },
  3754. "requestBody": {
  3755. "content": {
  3756. "application/json": {
  3757. "schema": {
  3758. "type": "object",
  3759. "properties": {
  3760. "service": {
  3761. "description": "Service name for the log entry",
  3762. "type": "string"
  3763. },
  3764. "level": {
  3765. "description": "Log level",
  3766. "type": "string",
  3767. "enum": ["debug", "info", "error", "warn"]
  3768. },
  3769. "message": {
  3770. "description": "Log message",
  3771. "type": "string"
  3772. },
  3773. "extra": {
  3774. "description": "Additional metadata for the log entry",
  3775. "type": "object",
  3776. "propertyNames": {
  3777. "type": "string"
  3778. },
  3779. "additionalProperties": {}
  3780. }
  3781. },
  3782. "required": ["service", "level", "message"]
  3783. }
  3784. }
  3785. }
  3786. },
  3787. "x-codeSamples": [
  3788. {
  3789. "lang": "js",
  3790. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.log({\n ...\n})"
  3791. }
  3792. ]
  3793. }
  3794. },
  3795. "/agent": {
  3796. "get": {
  3797. "operationId": "app.agents",
  3798. "parameters": [
  3799. {
  3800. "in": "query",
  3801. "name": "directory",
  3802. "schema": {
  3803. "type": "string"
  3804. }
  3805. }
  3806. ],
  3807. "summary": "List agents",
  3808. "description": "Get a list of all available AI agents in the OpenCode system.",
  3809. "responses": {
  3810. "200": {
  3811. "description": "List of agents",
  3812. "content": {
  3813. "application/json": {
  3814. "schema": {
  3815. "type": "array",
  3816. "items": {
  3817. "$ref": "#/components/schemas/Agent"
  3818. }
  3819. }
  3820. }
  3821. }
  3822. }
  3823. },
  3824. "x-codeSamples": [
  3825. {
  3826. "lang": "js",
  3827. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
  3828. }
  3829. ]
  3830. }
  3831. },
  3832. "/mcp": {
  3833. "get": {
  3834. "operationId": "mcp.status",
  3835. "parameters": [
  3836. {
  3837. "in": "query",
  3838. "name": "directory",
  3839. "schema": {
  3840. "type": "string"
  3841. }
  3842. }
  3843. ],
  3844. "summary": "Get MCP status",
  3845. "description": "Get the status of all Model Context Protocol (MCP) servers.",
  3846. "responses": {
  3847. "200": {
  3848. "description": "MCP server status",
  3849. "content": {
  3850. "application/json": {
  3851. "schema": {
  3852. "type": "object",
  3853. "propertyNames": {
  3854. "type": "string"
  3855. },
  3856. "additionalProperties": {
  3857. "$ref": "#/components/schemas/MCPStatus"
  3858. }
  3859. }
  3860. }
  3861. }
  3862. }
  3863. },
  3864. "x-codeSamples": [
  3865. {
  3866. "lang": "js",
  3867. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
  3868. }
  3869. ]
  3870. },
  3871. "post": {
  3872. "operationId": "mcp.add",
  3873. "parameters": [
  3874. {
  3875. "in": "query",
  3876. "name": "directory",
  3877. "schema": {
  3878. "type": "string"
  3879. }
  3880. }
  3881. ],
  3882. "summary": "Add MCP server",
  3883. "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
  3884. "responses": {
  3885. "200": {
  3886. "description": "MCP server added successfully",
  3887. "content": {
  3888. "application/json": {
  3889. "schema": {
  3890. "type": "object",
  3891. "propertyNames": {
  3892. "type": "string"
  3893. },
  3894. "additionalProperties": {
  3895. "$ref": "#/components/schemas/MCPStatus"
  3896. }
  3897. }
  3898. }
  3899. }
  3900. },
  3901. "400": {
  3902. "description": "Bad request",
  3903. "content": {
  3904. "application/json": {
  3905. "schema": {
  3906. "$ref": "#/components/schemas/BadRequestError"
  3907. }
  3908. }
  3909. }
  3910. }
  3911. },
  3912. "requestBody": {
  3913. "content": {
  3914. "application/json": {
  3915. "schema": {
  3916. "type": "object",
  3917. "properties": {
  3918. "name": {
  3919. "type": "string"
  3920. },
  3921. "config": {
  3922. "anyOf": [
  3923. {
  3924. "$ref": "#/components/schemas/McpLocalConfig"
  3925. },
  3926. {
  3927. "$ref": "#/components/schemas/McpRemoteConfig"
  3928. }
  3929. ]
  3930. }
  3931. },
  3932. "required": ["name", "config"]
  3933. }
  3934. }
  3935. }
  3936. },
  3937. "x-codeSamples": [
  3938. {
  3939. "lang": "js",
  3940. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
  3941. }
  3942. ]
  3943. }
  3944. },
  3945. "/mcp/{name}/auth": {
  3946. "post": {
  3947. "operationId": "mcp.auth.start",
  3948. "parameters": [
  3949. {
  3950. "in": "query",
  3951. "name": "directory",
  3952. "schema": {
  3953. "type": "string"
  3954. }
  3955. },
  3956. {
  3957. "schema": {
  3958. "type": "string"
  3959. },
  3960. "in": "path",
  3961. "name": "name",
  3962. "required": true
  3963. }
  3964. ],
  3965. "summary": "Start MCP OAuth",
  3966. "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
  3967. "responses": {
  3968. "200": {
  3969. "description": "OAuth flow started",
  3970. "content": {
  3971. "application/json": {
  3972. "schema": {
  3973. "type": "object",
  3974. "properties": {
  3975. "authorizationUrl": {
  3976. "description": "URL to open in browser for authorization",
  3977. "type": "string"
  3978. }
  3979. },
  3980. "required": ["authorizationUrl"]
  3981. }
  3982. }
  3983. }
  3984. },
  3985. "400": {
  3986. "description": "Bad request",
  3987. "content": {
  3988. "application/json": {
  3989. "schema": {
  3990. "$ref": "#/components/schemas/BadRequestError"
  3991. }
  3992. }
  3993. }
  3994. },
  3995. "404": {
  3996. "description": "Not found",
  3997. "content": {
  3998. "application/json": {
  3999. "schema": {
  4000. "$ref": "#/components/schemas/NotFoundError"
  4001. }
  4002. }
  4003. }
  4004. }
  4005. },
  4006. "x-codeSamples": [
  4007. {
  4008. "lang": "js",
  4009. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
  4010. }
  4011. ]
  4012. },
  4013. "delete": {
  4014. "operationId": "mcp.auth.remove",
  4015. "parameters": [
  4016. {
  4017. "in": "query",
  4018. "name": "directory",
  4019. "schema": {
  4020. "type": "string"
  4021. }
  4022. },
  4023. {
  4024. "schema": {
  4025. "type": "string"
  4026. },
  4027. "in": "path",
  4028. "name": "name",
  4029. "required": true
  4030. }
  4031. ],
  4032. "summary": "Remove MCP OAuth",
  4033. "description": "Remove OAuth credentials for an MCP server",
  4034. "responses": {
  4035. "200": {
  4036. "description": "OAuth credentials removed",
  4037. "content": {
  4038. "application/json": {
  4039. "schema": {
  4040. "type": "object",
  4041. "properties": {
  4042. "success": {
  4043. "type": "boolean",
  4044. "const": true
  4045. }
  4046. },
  4047. "required": ["success"]
  4048. }
  4049. }
  4050. }
  4051. },
  4052. "404": {
  4053. "description": "Not found",
  4054. "content": {
  4055. "application/json": {
  4056. "schema": {
  4057. "$ref": "#/components/schemas/NotFoundError"
  4058. }
  4059. }
  4060. }
  4061. }
  4062. },
  4063. "x-codeSamples": [
  4064. {
  4065. "lang": "js",
  4066. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
  4067. }
  4068. ]
  4069. }
  4070. },
  4071. "/mcp/{name}/auth/callback": {
  4072. "post": {
  4073. "operationId": "mcp.auth.callback",
  4074. "parameters": [
  4075. {
  4076. "in": "query",
  4077. "name": "directory",
  4078. "schema": {
  4079. "type": "string"
  4080. }
  4081. },
  4082. {
  4083. "schema": {
  4084. "type": "string"
  4085. },
  4086. "in": "path",
  4087. "name": "name",
  4088. "required": true
  4089. }
  4090. ],
  4091. "summary": "Complete MCP OAuth",
  4092. "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
  4093. "responses": {
  4094. "200": {
  4095. "description": "OAuth authentication completed",
  4096. "content": {
  4097. "application/json": {
  4098. "schema": {
  4099. "$ref": "#/components/schemas/MCPStatus"
  4100. }
  4101. }
  4102. }
  4103. },
  4104. "400": {
  4105. "description": "Bad request",
  4106. "content": {
  4107. "application/json": {
  4108. "schema": {
  4109. "$ref": "#/components/schemas/BadRequestError"
  4110. }
  4111. }
  4112. }
  4113. },
  4114. "404": {
  4115. "description": "Not found",
  4116. "content": {
  4117. "application/json": {
  4118. "schema": {
  4119. "$ref": "#/components/schemas/NotFoundError"
  4120. }
  4121. }
  4122. }
  4123. }
  4124. },
  4125. "requestBody": {
  4126. "content": {
  4127. "application/json": {
  4128. "schema": {
  4129. "type": "object",
  4130. "properties": {
  4131. "code": {
  4132. "description": "Authorization code from OAuth callback",
  4133. "type": "string"
  4134. }
  4135. },
  4136. "required": ["code"]
  4137. }
  4138. }
  4139. }
  4140. },
  4141. "x-codeSamples": [
  4142. {
  4143. "lang": "js",
  4144. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
  4145. }
  4146. ]
  4147. }
  4148. },
  4149. "/mcp/{name}/auth/authenticate": {
  4150. "post": {
  4151. "operationId": "mcp.auth.authenticate",
  4152. "parameters": [
  4153. {
  4154. "in": "query",
  4155. "name": "directory",
  4156. "schema": {
  4157. "type": "string"
  4158. }
  4159. },
  4160. {
  4161. "schema": {
  4162. "type": "string"
  4163. },
  4164. "in": "path",
  4165. "name": "name",
  4166. "required": true
  4167. }
  4168. ],
  4169. "summary": "Authenticate MCP OAuth",
  4170. "description": "Start OAuth flow and wait for callback (opens browser)",
  4171. "responses": {
  4172. "200": {
  4173. "description": "OAuth authentication completed",
  4174. "content": {
  4175. "application/json": {
  4176. "schema": {
  4177. "$ref": "#/components/schemas/MCPStatus"
  4178. }
  4179. }
  4180. }
  4181. },
  4182. "400": {
  4183. "description": "Bad request",
  4184. "content": {
  4185. "application/json": {
  4186. "schema": {
  4187. "$ref": "#/components/schemas/BadRequestError"
  4188. }
  4189. }
  4190. }
  4191. },
  4192. "404": {
  4193. "description": "Not found",
  4194. "content": {
  4195. "application/json": {
  4196. "schema": {
  4197. "$ref": "#/components/schemas/NotFoundError"
  4198. }
  4199. }
  4200. }
  4201. }
  4202. },
  4203. "x-codeSamples": [
  4204. {
  4205. "lang": "js",
  4206. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
  4207. }
  4208. ]
  4209. }
  4210. },
  4211. "/mcp/{name}/connect": {
  4212. "post": {
  4213. "operationId": "mcp.connect",
  4214. "parameters": [
  4215. {
  4216. "in": "query",
  4217. "name": "directory",
  4218. "schema": {
  4219. "type": "string"
  4220. }
  4221. },
  4222. {
  4223. "in": "path",
  4224. "name": "name",
  4225. "schema": {
  4226. "type": "string"
  4227. },
  4228. "required": true
  4229. }
  4230. ],
  4231. "description": "Connect an MCP server",
  4232. "responses": {
  4233. "200": {
  4234. "description": "MCP server connected successfully",
  4235. "content": {
  4236. "application/json": {
  4237. "schema": {
  4238. "type": "boolean"
  4239. }
  4240. }
  4241. }
  4242. }
  4243. },
  4244. "x-codeSamples": [
  4245. {
  4246. "lang": "js",
  4247. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
  4248. }
  4249. ]
  4250. }
  4251. },
  4252. "/mcp/{name}/disconnect": {
  4253. "post": {
  4254. "operationId": "mcp.disconnect",
  4255. "parameters": [
  4256. {
  4257. "in": "query",
  4258. "name": "directory",
  4259. "schema": {
  4260. "type": "string"
  4261. }
  4262. },
  4263. {
  4264. "in": "path",
  4265. "name": "name",
  4266. "schema": {
  4267. "type": "string"
  4268. },
  4269. "required": true
  4270. }
  4271. ],
  4272. "description": "Disconnect an MCP server",
  4273. "responses": {
  4274. "200": {
  4275. "description": "MCP server disconnected successfully",
  4276. "content": {
  4277. "application/json": {
  4278. "schema": {
  4279. "type": "boolean"
  4280. }
  4281. }
  4282. }
  4283. }
  4284. },
  4285. "x-codeSamples": [
  4286. {
  4287. "lang": "js",
  4288. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
  4289. }
  4290. ]
  4291. }
  4292. },
  4293. "/lsp": {
  4294. "get": {
  4295. "operationId": "lsp.status",
  4296. "parameters": [
  4297. {
  4298. "in": "query",
  4299. "name": "directory",
  4300. "schema": {
  4301. "type": "string"
  4302. }
  4303. }
  4304. ],
  4305. "summary": "Get LSP status",
  4306. "description": "Get LSP server status",
  4307. "responses": {
  4308. "200": {
  4309. "description": "LSP server status",
  4310. "content": {
  4311. "application/json": {
  4312. "schema": {
  4313. "type": "array",
  4314. "items": {
  4315. "$ref": "#/components/schemas/LSPStatus"
  4316. }
  4317. }
  4318. }
  4319. }
  4320. }
  4321. },
  4322. "x-codeSamples": [
  4323. {
  4324. "lang": "js",
  4325. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
  4326. }
  4327. ]
  4328. }
  4329. },
  4330. "/formatter": {
  4331. "get": {
  4332. "operationId": "formatter.status",
  4333. "parameters": [
  4334. {
  4335. "in": "query",
  4336. "name": "directory",
  4337. "schema": {
  4338. "type": "string"
  4339. }
  4340. }
  4341. ],
  4342. "summary": "Get formatter status",
  4343. "description": "Get formatter status",
  4344. "responses": {
  4345. "200": {
  4346. "description": "Formatter status",
  4347. "content": {
  4348. "application/json": {
  4349. "schema": {
  4350. "type": "array",
  4351. "items": {
  4352. "$ref": "#/components/schemas/FormatterStatus"
  4353. }
  4354. }
  4355. }
  4356. }
  4357. }
  4358. },
  4359. "x-codeSamples": [
  4360. {
  4361. "lang": "js",
  4362. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
  4363. }
  4364. ]
  4365. }
  4366. },
  4367. "/tui/append-prompt": {
  4368. "post": {
  4369. "operationId": "tui.appendPrompt",
  4370. "parameters": [
  4371. {
  4372. "in": "query",
  4373. "name": "directory",
  4374. "schema": {
  4375. "type": "string"
  4376. }
  4377. }
  4378. ],
  4379. "summary": "Append TUI prompt",
  4380. "description": "Append prompt to the TUI",
  4381. "responses": {
  4382. "200": {
  4383. "description": "Prompt processed successfully",
  4384. "content": {
  4385. "application/json": {
  4386. "schema": {
  4387. "type": "boolean"
  4388. }
  4389. }
  4390. }
  4391. },
  4392. "400": {
  4393. "description": "Bad request",
  4394. "content": {
  4395. "application/json": {
  4396. "schema": {
  4397. "$ref": "#/components/schemas/BadRequestError"
  4398. }
  4399. }
  4400. }
  4401. }
  4402. },
  4403. "requestBody": {
  4404. "content": {
  4405. "application/json": {
  4406. "schema": {
  4407. "type": "object",
  4408. "properties": {
  4409. "text": {
  4410. "type": "string"
  4411. }
  4412. },
  4413. "required": ["text"]
  4414. }
  4415. }
  4416. }
  4417. },
  4418. "x-codeSamples": [
  4419. {
  4420. "lang": "js",
  4421. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  4422. }
  4423. ]
  4424. }
  4425. },
  4426. "/tui/open-help": {
  4427. "post": {
  4428. "operationId": "tui.openHelp",
  4429. "parameters": [
  4430. {
  4431. "in": "query",
  4432. "name": "directory",
  4433. "schema": {
  4434. "type": "string"
  4435. }
  4436. }
  4437. ],
  4438. "summary": "Open help dialog",
  4439. "description": "Open the help dialog in the TUI to display user assistance information.",
  4440. "responses": {
  4441. "200": {
  4442. "description": "Help dialog opened successfully",
  4443. "content": {
  4444. "application/json": {
  4445. "schema": {
  4446. "type": "boolean"
  4447. }
  4448. }
  4449. }
  4450. }
  4451. },
  4452. "x-codeSamples": [
  4453. {
  4454. "lang": "js",
  4455. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  4456. }
  4457. ]
  4458. }
  4459. },
  4460. "/tui/open-sessions": {
  4461. "post": {
  4462. "operationId": "tui.openSessions",
  4463. "parameters": [
  4464. {
  4465. "in": "query",
  4466. "name": "directory",
  4467. "schema": {
  4468. "type": "string"
  4469. }
  4470. }
  4471. ],
  4472. "summary": "Open sessions dialog",
  4473. "description": "Open the session dialog",
  4474. "responses": {
  4475. "200": {
  4476. "description": "Session dialog opened successfully",
  4477. "content": {
  4478. "application/json": {
  4479. "schema": {
  4480. "type": "boolean"
  4481. }
  4482. }
  4483. }
  4484. }
  4485. },
  4486. "x-codeSamples": [
  4487. {
  4488. "lang": "js",
  4489. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  4490. }
  4491. ]
  4492. }
  4493. },
  4494. "/tui/open-themes": {
  4495. "post": {
  4496. "operationId": "tui.openThemes",
  4497. "parameters": [
  4498. {
  4499. "in": "query",
  4500. "name": "directory",
  4501. "schema": {
  4502. "type": "string"
  4503. }
  4504. }
  4505. ],
  4506. "summary": "Open themes dialog",
  4507. "description": "Open the theme dialog",
  4508. "responses": {
  4509. "200": {
  4510. "description": "Theme dialog opened successfully",
  4511. "content": {
  4512. "application/json": {
  4513. "schema": {
  4514. "type": "boolean"
  4515. }
  4516. }
  4517. }
  4518. }
  4519. },
  4520. "x-codeSamples": [
  4521. {
  4522. "lang": "js",
  4523. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  4524. }
  4525. ]
  4526. }
  4527. },
  4528. "/tui/open-models": {
  4529. "post": {
  4530. "operationId": "tui.openModels",
  4531. "parameters": [
  4532. {
  4533. "in": "query",
  4534. "name": "directory",
  4535. "schema": {
  4536. "type": "string"
  4537. }
  4538. }
  4539. ],
  4540. "summary": "Open models dialog",
  4541. "description": "Open the model dialog",
  4542. "responses": {
  4543. "200": {
  4544. "description": "Model dialog opened successfully",
  4545. "content": {
  4546. "application/json": {
  4547. "schema": {
  4548. "type": "boolean"
  4549. }
  4550. }
  4551. }
  4552. }
  4553. },
  4554. "x-codeSamples": [
  4555. {
  4556. "lang": "js",
  4557. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  4558. }
  4559. ]
  4560. }
  4561. },
  4562. "/tui/submit-prompt": {
  4563. "post": {
  4564. "operationId": "tui.submitPrompt",
  4565. "parameters": [
  4566. {
  4567. "in": "query",
  4568. "name": "directory",
  4569. "schema": {
  4570. "type": "string"
  4571. }
  4572. }
  4573. ],
  4574. "summary": "Submit TUI prompt",
  4575. "description": "Submit the prompt",
  4576. "responses": {
  4577. "200": {
  4578. "description": "Prompt submitted successfully",
  4579. "content": {
  4580. "application/json": {
  4581. "schema": {
  4582. "type": "boolean"
  4583. }
  4584. }
  4585. }
  4586. }
  4587. },
  4588. "x-codeSamples": [
  4589. {
  4590. "lang": "js",
  4591. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  4592. }
  4593. ]
  4594. }
  4595. },
  4596. "/tui/clear-prompt": {
  4597. "post": {
  4598. "operationId": "tui.clearPrompt",
  4599. "parameters": [
  4600. {
  4601. "in": "query",
  4602. "name": "directory",
  4603. "schema": {
  4604. "type": "string"
  4605. }
  4606. }
  4607. ],
  4608. "summary": "Clear TUI prompt",
  4609. "description": "Clear the prompt",
  4610. "responses": {
  4611. "200": {
  4612. "description": "Prompt cleared successfully",
  4613. "content": {
  4614. "application/json": {
  4615. "schema": {
  4616. "type": "boolean"
  4617. }
  4618. }
  4619. }
  4620. }
  4621. },
  4622. "x-codeSamples": [
  4623. {
  4624. "lang": "js",
  4625. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  4626. }
  4627. ]
  4628. }
  4629. },
  4630. "/tui/execute-command": {
  4631. "post": {
  4632. "operationId": "tui.executeCommand",
  4633. "parameters": [
  4634. {
  4635. "in": "query",
  4636. "name": "directory",
  4637. "schema": {
  4638. "type": "string"
  4639. }
  4640. }
  4641. ],
  4642. "summary": "Execute TUI command",
  4643. "description": "Execute a TUI command (e.g. agent_cycle)",
  4644. "responses": {
  4645. "200": {
  4646. "description": "Command executed successfully",
  4647. "content": {
  4648. "application/json": {
  4649. "schema": {
  4650. "type": "boolean"
  4651. }
  4652. }
  4653. }
  4654. },
  4655. "400": {
  4656. "description": "Bad request",
  4657. "content": {
  4658. "application/json": {
  4659. "schema": {
  4660. "$ref": "#/components/schemas/BadRequestError"
  4661. }
  4662. }
  4663. }
  4664. }
  4665. },
  4666. "requestBody": {
  4667. "content": {
  4668. "application/json": {
  4669. "schema": {
  4670. "type": "object",
  4671. "properties": {
  4672. "command": {
  4673. "type": "string"
  4674. }
  4675. },
  4676. "required": ["command"]
  4677. }
  4678. }
  4679. }
  4680. },
  4681. "x-codeSamples": [
  4682. {
  4683. "lang": "js",
  4684. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  4685. }
  4686. ]
  4687. }
  4688. },
  4689. "/tui/show-toast": {
  4690. "post": {
  4691. "operationId": "tui.showToast",
  4692. "parameters": [
  4693. {
  4694. "in": "query",
  4695. "name": "directory",
  4696. "schema": {
  4697. "type": "string"
  4698. }
  4699. }
  4700. ],
  4701. "summary": "Show TUI toast",
  4702. "description": "Show a toast notification in the TUI",
  4703. "responses": {
  4704. "200": {
  4705. "description": "Toast notification shown successfully",
  4706. "content": {
  4707. "application/json": {
  4708. "schema": {
  4709. "type": "boolean"
  4710. }
  4711. }
  4712. }
  4713. }
  4714. },
  4715. "requestBody": {
  4716. "content": {
  4717. "application/json": {
  4718. "schema": {
  4719. "type": "object",
  4720. "properties": {
  4721. "title": {
  4722. "type": "string"
  4723. },
  4724. "message": {
  4725. "type": "string"
  4726. },
  4727. "variant": {
  4728. "type": "string",
  4729. "enum": ["info", "success", "warning", "error"]
  4730. },
  4731. "duration": {
  4732. "description": "Duration in milliseconds",
  4733. "default": 5000,
  4734. "type": "number"
  4735. }
  4736. },
  4737. "required": ["message", "variant"]
  4738. }
  4739. }
  4740. }
  4741. },
  4742. "x-codeSamples": [
  4743. {
  4744. "lang": "js",
  4745. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  4746. }
  4747. ]
  4748. }
  4749. },
  4750. "/tui/publish": {
  4751. "post": {
  4752. "operationId": "tui.publish",
  4753. "parameters": [
  4754. {
  4755. "in": "query",
  4756. "name": "directory",
  4757. "schema": {
  4758. "type": "string"
  4759. }
  4760. }
  4761. ],
  4762. "summary": "Publish TUI event",
  4763. "description": "Publish a TUI event",
  4764. "responses": {
  4765. "200": {
  4766. "description": "Event published successfully",
  4767. "content": {
  4768. "application/json": {
  4769. "schema": {
  4770. "type": "boolean"
  4771. }
  4772. }
  4773. }
  4774. },
  4775. "400": {
  4776. "description": "Bad request",
  4777. "content": {
  4778. "application/json": {
  4779. "schema": {
  4780. "$ref": "#/components/schemas/BadRequestError"
  4781. }
  4782. }
  4783. }
  4784. }
  4785. },
  4786. "requestBody": {
  4787. "content": {
  4788. "application/json": {
  4789. "schema": {
  4790. "anyOf": [
  4791. {
  4792. "$ref": "#/components/schemas/Event.tui.prompt.append"
  4793. },
  4794. {
  4795. "$ref": "#/components/schemas/Event.tui.command.execute"
  4796. },
  4797. {
  4798. "$ref": "#/components/schemas/Event.tui.toast.show"
  4799. }
  4800. ]
  4801. }
  4802. }
  4803. }
  4804. },
  4805. "x-codeSamples": [
  4806. {
  4807. "lang": "js",
  4808. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  4809. }
  4810. ]
  4811. }
  4812. },
  4813. "/tui/control/next": {
  4814. "get": {
  4815. "operationId": "tui.control.next",
  4816. "parameters": [
  4817. {
  4818. "in": "query",
  4819. "name": "directory",
  4820. "schema": {
  4821. "type": "string"
  4822. }
  4823. }
  4824. ],
  4825. "summary": "Get next TUI request",
  4826. "description": "Retrieve the next TUI (Terminal User Interface) request from the queue for processing.",
  4827. "responses": {
  4828. "200": {
  4829. "description": "Next TUI request",
  4830. "content": {
  4831. "application/json": {
  4832. "schema": {
  4833. "type": "object",
  4834. "properties": {
  4835. "path": {
  4836. "type": "string"
  4837. },
  4838. "body": {}
  4839. },
  4840. "required": ["path", "body"]
  4841. }
  4842. }
  4843. }
  4844. }
  4845. },
  4846. "x-codeSamples": [
  4847. {
  4848. "lang": "js",
  4849. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  4850. }
  4851. ]
  4852. }
  4853. },
  4854. "/tui/control/response": {
  4855. "post": {
  4856. "operationId": "tui.control.response",
  4857. "parameters": [
  4858. {
  4859. "in": "query",
  4860. "name": "directory",
  4861. "schema": {
  4862. "type": "string"
  4863. }
  4864. }
  4865. ],
  4866. "summary": "Submit TUI response",
  4867. "description": "Submit a response to the TUI request queue to complete a pending request.",
  4868. "responses": {
  4869. "200": {
  4870. "description": "Response submitted successfully",
  4871. "content": {
  4872. "application/json": {
  4873. "schema": {
  4874. "type": "boolean"
  4875. }
  4876. }
  4877. }
  4878. }
  4879. },
  4880. "requestBody": {
  4881. "content": {
  4882. "application/json": {
  4883. "schema": {}
  4884. }
  4885. }
  4886. },
  4887. "x-codeSamples": [
  4888. {
  4889. "lang": "js",
  4890. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  4891. }
  4892. ]
  4893. }
  4894. },
  4895. "/auth/{providerID}": {
  4896. "put": {
  4897. "operationId": "auth.set",
  4898. "parameters": [
  4899. {
  4900. "in": "query",
  4901. "name": "directory",
  4902. "schema": {
  4903. "type": "string"
  4904. }
  4905. },
  4906. {
  4907. "in": "path",
  4908. "name": "providerID",
  4909. "schema": {
  4910. "type": "string"
  4911. },
  4912. "required": true
  4913. }
  4914. ],
  4915. "summary": "Set auth credentials",
  4916. "description": "Set authentication credentials",
  4917. "responses": {
  4918. "200": {
  4919. "description": "Successfully set authentication credentials",
  4920. "content": {
  4921. "application/json": {
  4922. "schema": {
  4923. "type": "boolean"
  4924. }
  4925. }
  4926. }
  4927. },
  4928. "400": {
  4929. "description": "Bad request",
  4930. "content": {
  4931. "application/json": {
  4932. "schema": {
  4933. "$ref": "#/components/schemas/BadRequestError"
  4934. }
  4935. }
  4936. }
  4937. }
  4938. },
  4939. "requestBody": {
  4940. "content": {
  4941. "application/json": {
  4942. "schema": {
  4943. "$ref": "#/components/schemas/Auth"
  4944. }
  4945. }
  4946. }
  4947. },
  4948. "x-codeSamples": [
  4949. {
  4950. "lang": "js",
  4951. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.set({\n ...\n})"
  4952. }
  4953. ]
  4954. }
  4955. },
  4956. "/event": {
  4957. "get": {
  4958. "operationId": "event.subscribe",
  4959. "parameters": [
  4960. {
  4961. "in": "query",
  4962. "name": "directory",
  4963. "schema": {
  4964. "type": "string"
  4965. }
  4966. }
  4967. ],
  4968. "summary": "Subscribe to events",
  4969. "description": "Get events",
  4970. "responses": {
  4971. "200": {
  4972. "description": "Event stream",
  4973. "content": {
  4974. "text/event-stream": {
  4975. "schema": {
  4976. "$ref": "#/components/schemas/Event"
  4977. }
  4978. }
  4979. }
  4980. }
  4981. },
  4982. "x-codeSamples": [
  4983. {
  4984. "lang": "js",
  4985. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.event.subscribe({\n ...\n})"
  4986. }
  4987. ]
  4988. }
  4989. }
  4990. },
  4991. "components": {
  4992. "schemas": {
  4993. "Event.installation.updated": {
  4994. "type": "object",
  4995. "properties": {
  4996. "type": {
  4997. "type": "string",
  4998. "const": "installation.updated"
  4999. },
  5000. "properties": {
  5001. "type": "object",
  5002. "properties": {
  5003. "version": {
  5004. "type": "string"
  5005. }
  5006. },
  5007. "required": ["version"]
  5008. }
  5009. },
  5010. "required": ["type", "properties"]
  5011. },
  5012. "Event.installation.update-available": {
  5013. "type": "object",
  5014. "properties": {
  5015. "type": {
  5016. "type": "string",
  5017. "const": "installation.update-available"
  5018. },
  5019. "properties": {
  5020. "type": "object",
  5021. "properties": {
  5022. "version": {
  5023. "type": "string"
  5024. }
  5025. },
  5026. "required": ["version"]
  5027. }
  5028. },
  5029. "required": ["type", "properties"]
  5030. },
  5031. "Project": {
  5032. "type": "object",
  5033. "properties": {
  5034. "id": {
  5035. "type": "string"
  5036. },
  5037. "worktree": {
  5038. "type": "string"
  5039. },
  5040. "vcs": {
  5041. "type": "string",
  5042. "const": "git"
  5043. },
  5044. "name": {
  5045. "type": "string"
  5046. },
  5047. "icon": {
  5048. "type": "object",
  5049. "properties": {
  5050. "url": {
  5051. "type": "string"
  5052. },
  5053. "color": {
  5054. "type": "string"
  5055. }
  5056. }
  5057. },
  5058. "time": {
  5059. "type": "object",
  5060. "properties": {
  5061. "created": {
  5062. "type": "number"
  5063. },
  5064. "updated": {
  5065. "type": "number"
  5066. },
  5067. "initialized": {
  5068. "type": "number"
  5069. }
  5070. },
  5071. "required": ["created", "updated"]
  5072. }
  5073. },
  5074. "required": ["id", "worktree", "time"]
  5075. },
  5076. "Event.project.updated": {
  5077. "type": "object",
  5078. "properties": {
  5079. "type": {
  5080. "type": "string",
  5081. "const": "project.updated"
  5082. },
  5083. "properties": {
  5084. "$ref": "#/components/schemas/Project"
  5085. }
  5086. },
  5087. "required": ["type", "properties"]
  5088. },
  5089. "Event.server.instance.disposed": {
  5090. "type": "object",
  5091. "properties": {
  5092. "type": {
  5093. "type": "string",
  5094. "const": "server.instance.disposed"
  5095. },
  5096. "properties": {
  5097. "type": "object",
  5098. "properties": {
  5099. "directory": {
  5100. "type": "string"
  5101. }
  5102. },
  5103. "required": ["directory"]
  5104. }
  5105. },
  5106. "required": ["type", "properties"]
  5107. },
  5108. "Event.lsp.client.diagnostics": {
  5109. "type": "object",
  5110. "properties": {
  5111. "type": {
  5112. "type": "string",
  5113. "const": "lsp.client.diagnostics"
  5114. },
  5115. "properties": {
  5116. "type": "object",
  5117. "properties": {
  5118. "serverID": {
  5119. "type": "string"
  5120. },
  5121. "path": {
  5122. "type": "string"
  5123. }
  5124. },
  5125. "required": ["serverID", "path"]
  5126. }
  5127. },
  5128. "required": ["type", "properties"]
  5129. },
  5130. "Event.lsp.updated": {
  5131. "type": "object",
  5132. "properties": {
  5133. "type": {
  5134. "type": "string",
  5135. "const": "lsp.updated"
  5136. },
  5137. "properties": {
  5138. "type": "object",
  5139. "properties": {}
  5140. }
  5141. },
  5142. "required": ["type", "properties"]
  5143. },
  5144. "FileDiff": {
  5145. "type": "object",
  5146. "properties": {
  5147. "file": {
  5148. "type": "string"
  5149. },
  5150. "before": {
  5151. "type": "string"
  5152. },
  5153. "after": {
  5154. "type": "string"
  5155. },
  5156. "additions": {
  5157. "type": "number"
  5158. },
  5159. "deletions": {
  5160. "type": "number"
  5161. }
  5162. },
  5163. "required": ["file", "before", "after", "additions", "deletions"]
  5164. },
  5165. "UserMessage": {
  5166. "type": "object",
  5167. "properties": {
  5168. "id": {
  5169. "type": "string"
  5170. },
  5171. "sessionID": {
  5172. "type": "string"
  5173. },
  5174. "role": {
  5175. "type": "string",
  5176. "const": "user"
  5177. },
  5178. "time": {
  5179. "type": "object",
  5180. "properties": {
  5181. "created": {
  5182. "type": "number"
  5183. }
  5184. },
  5185. "required": ["created"]
  5186. },
  5187. "summary": {
  5188. "type": "object",
  5189. "properties": {
  5190. "title": {
  5191. "type": "string"
  5192. },
  5193. "body": {
  5194. "type": "string"
  5195. },
  5196. "diffs": {
  5197. "type": "array",
  5198. "items": {
  5199. "$ref": "#/components/schemas/FileDiff"
  5200. }
  5201. }
  5202. },
  5203. "required": ["diffs"]
  5204. },
  5205. "agent": {
  5206. "type": "string"
  5207. },
  5208. "model": {
  5209. "type": "object",
  5210. "properties": {
  5211. "providerID": {
  5212. "type": "string"
  5213. },
  5214. "modelID": {
  5215. "type": "string"
  5216. }
  5217. },
  5218. "required": ["providerID", "modelID"]
  5219. },
  5220. "system": {
  5221. "type": "string"
  5222. },
  5223. "tools": {
  5224. "type": "object",
  5225. "propertyNames": {
  5226. "type": "string"
  5227. },
  5228. "additionalProperties": {
  5229. "type": "boolean"
  5230. }
  5231. }
  5232. },
  5233. "required": ["id", "sessionID", "role", "time", "agent", "model"]
  5234. },
  5235. "ProviderAuthError": {
  5236. "type": "object",
  5237. "properties": {
  5238. "name": {
  5239. "type": "string",
  5240. "const": "ProviderAuthError"
  5241. },
  5242. "data": {
  5243. "type": "object",
  5244. "properties": {
  5245. "providerID": {
  5246. "type": "string"
  5247. },
  5248. "message": {
  5249. "type": "string"
  5250. }
  5251. },
  5252. "required": ["providerID", "message"]
  5253. }
  5254. },
  5255. "required": ["name", "data"]
  5256. },
  5257. "UnknownError": {
  5258. "type": "object",
  5259. "properties": {
  5260. "name": {
  5261. "type": "string",
  5262. "const": "UnknownError"
  5263. },
  5264. "data": {
  5265. "type": "object",
  5266. "properties": {
  5267. "message": {
  5268. "type": "string"
  5269. }
  5270. },
  5271. "required": ["message"]
  5272. }
  5273. },
  5274. "required": ["name", "data"]
  5275. },
  5276. "MessageOutputLengthError": {
  5277. "type": "object",
  5278. "properties": {
  5279. "name": {
  5280. "type": "string",
  5281. "const": "MessageOutputLengthError"
  5282. },
  5283. "data": {
  5284. "type": "object",
  5285. "properties": {}
  5286. }
  5287. },
  5288. "required": ["name", "data"]
  5289. },
  5290. "MessageAbortedError": {
  5291. "type": "object",
  5292. "properties": {
  5293. "name": {
  5294. "type": "string",
  5295. "const": "MessageAbortedError"
  5296. },
  5297. "data": {
  5298. "type": "object",
  5299. "properties": {
  5300. "message": {
  5301. "type": "string"
  5302. }
  5303. },
  5304. "required": ["message"]
  5305. }
  5306. },
  5307. "required": ["name", "data"]
  5308. },
  5309. "APIError": {
  5310. "type": "object",
  5311. "properties": {
  5312. "name": {
  5313. "type": "string",
  5314. "const": "APIError"
  5315. },
  5316. "data": {
  5317. "type": "object",
  5318. "properties": {
  5319. "message": {
  5320. "type": "string"
  5321. },
  5322. "statusCode": {
  5323. "type": "number"
  5324. },
  5325. "isRetryable": {
  5326. "type": "boolean"
  5327. },
  5328. "responseHeaders": {
  5329. "type": "object",
  5330. "propertyNames": {
  5331. "type": "string"
  5332. },
  5333. "additionalProperties": {
  5334. "type": "string"
  5335. }
  5336. },
  5337. "responseBody": {
  5338. "type": "string"
  5339. },
  5340. "metadata": {
  5341. "type": "object",
  5342. "propertyNames": {
  5343. "type": "string"
  5344. },
  5345. "additionalProperties": {
  5346. "type": "string"
  5347. }
  5348. }
  5349. },
  5350. "required": ["message", "isRetryable"]
  5351. }
  5352. },
  5353. "required": ["name", "data"]
  5354. },
  5355. "AssistantMessage": {
  5356. "type": "object",
  5357. "properties": {
  5358. "id": {
  5359. "type": "string"
  5360. },
  5361. "sessionID": {
  5362. "type": "string"
  5363. },
  5364. "role": {
  5365. "type": "string",
  5366. "const": "assistant"
  5367. },
  5368. "time": {
  5369. "type": "object",
  5370. "properties": {
  5371. "created": {
  5372. "type": "number"
  5373. },
  5374. "completed": {
  5375. "type": "number"
  5376. }
  5377. },
  5378. "required": ["created"]
  5379. },
  5380. "error": {
  5381. "anyOf": [
  5382. {
  5383. "$ref": "#/components/schemas/ProviderAuthError"
  5384. },
  5385. {
  5386. "$ref": "#/components/schemas/UnknownError"
  5387. },
  5388. {
  5389. "$ref": "#/components/schemas/MessageOutputLengthError"
  5390. },
  5391. {
  5392. "$ref": "#/components/schemas/MessageAbortedError"
  5393. },
  5394. {
  5395. "$ref": "#/components/schemas/APIError"
  5396. }
  5397. ]
  5398. },
  5399. "parentID": {
  5400. "type": "string"
  5401. },
  5402. "modelID": {
  5403. "type": "string"
  5404. },
  5405. "providerID": {
  5406. "type": "string"
  5407. },
  5408. "mode": {
  5409. "type": "string"
  5410. },
  5411. "agent": {
  5412. "type": "string"
  5413. },
  5414. "path": {
  5415. "type": "object",
  5416. "properties": {
  5417. "cwd": {
  5418. "type": "string"
  5419. },
  5420. "root": {
  5421. "type": "string"
  5422. }
  5423. },
  5424. "required": ["cwd", "root"]
  5425. },
  5426. "summary": {
  5427. "type": "boolean"
  5428. },
  5429. "cost": {
  5430. "type": "number"
  5431. },
  5432. "tokens": {
  5433. "type": "object",
  5434. "properties": {
  5435. "input": {
  5436. "type": "number"
  5437. },
  5438. "output": {
  5439. "type": "number"
  5440. },
  5441. "reasoning": {
  5442. "type": "number"
  5443. },
  5444. "cache": {
  5445. "type": "object",
  5446. "properties": {
  5447. "read": {
  5448. "type": "number"
  5449. },
  5450. "write": {
  5451. "type": "number"
  5452. }
  5453. },
  5454. "required": ["read", "write"]
  5455. }
  5456. },
  5457. "required": ["input", "output", "reasoning", "cache"]
  5458. },
  5459. "finish": {
  5460. "type": "string"
  5461. }
  5462. },
  5463. "required": [
  5464. "id",
  5465. "sessionID",
  5466. "role",
  5467. "time",
  5468. "parentID",
  5469. "modelID",
  5470. "providerID",
  5471. "mode",
  5472. "agent",
  5473. "path",
  5474. "cost",
  5475. "tokens"
  5476. ]
  5477. },
  5478. "Message": {
  5479. "anyOf": [
  5480. {
  5481. "$ref": "#/components/schemas/UserMessage"
  5482. },
  5483. {
  5484. "$ref": "#/components/schemas/AssistantMessage"
  5485. }
  5486. ]
  5487. },
  5488. "Event.message.updated": {
  5489. "type": "object",
  5490. "properties": {
  5491. "type": {
  5492. "type": "string",
  5493. "const": "message.updated"
  5494. },
  5495. "properties": {
  5496. "type": "object",
  5497. "properties": {
  5498. "info": {
  5499. "$ref": "#/components/schemas/Message"
  5500. }
  5501. },
  5502. "required": ["info"]
  5503. }
  5504. },
  5505. "required": ["type", "properties"]
  5506. },
  5507. "Event.message.removed": {
  5508. "type": "object",
  5509. "properties": {
  5510. "type": {
  5511. "type": "string",
  5512. "const": "message.removed"
  5513. },
  5514. "properties": {
  5515. "type": "object",
  5516. "properties": {
  5517. "sessionID": {
  5518. "type": "string"
  5519. },
  5520. "messageID": {
  5521. "type": "string"
  5522. }
  5523. },
  5524. "required": ["sessionID", "messageID"]
  5525. }
  5526. },
  5527. "required": ["type", "properties"]
  5528. },
  5529. "TextPart": {
  5530. "type": "object",
  5531. "properties": {
  5532. "id": {
  5533. "type": "string"
  5534. },
  5535. "sessionID": {
  5536. "type": "string"
  5537. },
  5538. "messageID": {
  5539. "type": "string"
  5540. },
  5541. "type": {
  5542. "type": "string",
  5543. "const": "text"
  5544. },
  5545. "text": {
  5546. "type": "string"
  5547. },
  5548. "synthetic": {
  5549. "type": "boolean"
  5550. },
  5551. "ignored": {
  5552. "type": "boolean"
  5553. },
  5554. "time": {
  5555. "type": "object",
  5556. "properties": {
  5557. "start": {
  5558. "type": "number"
  5559. },
  5560. "end": {
  5561. "type": "number"
  5562. }
  5563. },
  5564. "required": ["start"]
  5565. },
  5566. "metadata": {
  5567. "type": "object",
  5568. "propertyNames": {
  5569. "type": "string"
  5570. },
  5571. "additionalProperties": {}
  5572. }
  5573. },
  5574. "required": ["id", "sessionID", "messageID", "type", "text"]
  5575. },
  5576. "ReasoningPart": {
  5577. "type": "object",
  5578. "properties": {
  5579. "id": {
  5580. "type": "string"
  5581. },
  5582. "sessionID": {
  5583. "type": "string"
  5584. },
  5585. "messageID": {
  5586. "type": "string"
  5587. },
  5588. "type": {
  5589. "type": "string",
  5590. "const": "reasoning"
  5591. },
  5592. "text": {
  5593. "type": "string"
  5594. },
  5595. "metadata": {
  5596. "type": "object",
  5597. "propertyNames": {
  5598. "type": "string"
  5599. },
  5600. "additionalProperties": {}
  5601. },
  5602. "time": {
  5603. "type": "object",
  5604. "properties": {
  5605. "start": {
  5606. "type": "number"
  5607. },
  5608. "end": {
  5609. "type": "number"
  5610. }
  5611. },
  5612. "required": ["start"]
  5613. }
  5614. },
  5615. "required": ["id", "sessionID", "messageID", "type", "text", "time"]
  5616. },
  5617. "FilePartSourceText": {
  5618. "type": "object",
  5619. "properties": {
  5620. "value": {
  5621. "type": "string"
  5622. },
  5623. "start": {
  5624. "type": "integer",
  5625. "minimum": -9007199254740991,
  5626. "maximum": 9007199254740991
  5627. },
  5628. "end": {
  5629. "type": "integer",
  5630. "minimum": -9007199254740991,
  5631. "maximum": 9007199254740991
  5632. }
  5633. },
  5634. "required": ["value", "start", "end"]
  5635. },
  5636. "FileSource": {
  5637. "type": "object",
  5638. "properties": {
  5639. "text": {
  5640. "$ref": "#/components/schemas/FilePartSourceText"
  5641. },
  5642. "type": {
  5643. "type": "string",
  5644. "const": "file"
  5645. },
  5646. "path": {
  5647. "type": "string"
  5648. }
  5649. },
  5650. "required": ["text", "type", "path"]
  5651. },
  5652. "Range": {
  5653. "type": "object",
  5654. "properties": {
  5655. "start": {
  5656. "type": "object",
  5657. "properties": {
  5658. "line": {
  5659. "type": "number"
  5660. },
  5661. "character": {
  5662. "type": "number"
  5663. }
  5664. },
  5665. "required": ["line", "character"]
  5666. },
  5667. "end": {
  5668. "type": "object",
  5669. "properties": {
  5670. "line": {
  5671. "type": "number"
  5672. },
  5673. "character": {
  5674. "type": "number"
  5675. }
  5676. },
  5677. "required": ["line", "character"]
  5678. }
  5679. },
  5680. "required": ["start", "end"]
  5681. },
  5682. "SymbolSource": {
  5683. "type": "object",
  5684. "properties": {
  5685. "text": {
  5686. "$ref": "#/components/schemas/FilePartSourceText"
  5687. },
  5688. "type": {
  5689. "type": "string",
  5690. "const": "symbol"
  5691. },
  5692. "path": {
  5693. "type": "string"
  5694. },
  5695. "range": {
  5696. "$ref": "#/components/schemas/Range"
  5697. },
  5698. "name": {
  5699. "type": "string"
  5700. },
  5701. "kind": {
  5702. "type": "integer",
  5703. "minimum": -9007199254740991,
  5704. "maximum": 9007199254740991
  5705. }
  5706. },
  5707. "required": ["text", "type", "path", "range", "name", "kind"]
  5708. },
  5709. "FilePartSource": {
  5710. "anyOf": [
  5711. {
  5712. "$ref": "#/components/schemas/FileSource"
  5713. },
  5714. {
  5715. "$ref": "#/components/schemas/SymbolSource"
  5716. }
  5717. ]
  5718. },
  5719. "FilePart": {
  5720. "type": "object",
  5721. "properties": {
  5722. "id": {
  5723. "type": "string"
  5724. },
  5725. "sessionID": {
  5726. "type": "string"
  5727. },
  5728. "messageID": {
  5729. "type": "string"
  5730. },
  5731. "type": {
  5732. "type": "string",
  5733. "const": "file"
  5734. },
  5735. "mime": {
  5736. "type": "string"
  5737. },
  5738. "filename": {
  5739. "type": "string"
  5740. },
  5741. "url": {
  5742. "type": "string"
  5743. },
  5744. "source": {
  5745. "$ref": "#/components/schemas/FilePartSource"
  5746. }
  5747. },
  5748. "required": ["id", "sessionID", "messageID", "type", "mime", "url"]
  5749. },
  5750. "ToolStatePending": {
  5751. "type": "object",
  5752. "properties": {
  5753. "status": {
  5754. "type": "string",
  5755. "const": "pending"
  5756. },
  5757. "input": {
  5758. "type": "object",
  5759. "propertyNames": {
  5760. "type": "string"
  5761. },
  5762. "additionalProperties": {}
  5763. },
  5764. "raw": {
  5765. "type": "string"
  5766. }
  5767. },
  5768. "required": ["status", "input", "raw"]
  5769. },
  5770. "ToolStateRunning": {
  5771. "type": "object",
  5772. "properties": {
  5773. "status": {
  5774. "type": "string",
  5775. "const": "running"
  5776. },
  5777. "input": {
  5778. "type": "object",
  5779. "propertyNames": {
  5780. "type": "string"
  5781. },
  5782. "additionalProperties": {}
  5783. },
  5784. "title": {
  5785. "type": "string"
  5786. },
  5787. "metadata": {
  5788. "type": "object",
  5789. "propertyNames": {
  5790. "type": "string"
  5791. },
  5792. "additionalProperties": {}
  5793. },
  5794. "time": {
  5795. "type": "object",
  5796. "properties": {
  5797. "start": {
  5798. "type": "number"
  5799. }
  5800. },
  5801. "required": ["start"]
  5802. }
  5803. },
  5804. "required": ["status", "input", "time"]
  5805. },
  5806. "ToolStateCompleted": {
  5807. "type": "object",
  5808. "properties": {
  5809. "status": {
  5810. "type": "string",
  5811. "const": "completed"
  5812. },
  5813. "input": {
  5814. "type": "object",
  5815. "propertyNames": {
  5816. "type": "string"
  5817. },
  5818. "additionalProperties": {}
  5819. },
  5820. "output": {
  5821. "type": "string"
  5822. },
  5823. "title": {
  5824. "type": "string"
  5825. },
  5826. "metadata": {
  5827. "type": "object",
  5828. "propertyNames": {
  5829. "type": "string"
  5830. },
  5831. "additionalProperties": {}
  5832. },
  5833. "time": {
  5834. "type": "object",
  5835. "properties": {
  5836. "start": {
  5837. "type": "number"
  5838. },
  5839. "end": {
  5840. "type": "number"
  5841. },
  5842. "compacted": {
  5843. "type": "number"
  5844. }
  5845. },
  5846. "required": ["start", "end"]
  5847. },
  5848. "attachments": {
  5849. "type": "array",
  5850. "items": {
  5851. "$ref": "#/components/schemas/FilePart"
  5852. }
  5853. }
  5854. },
  5855. "required": ["status", "input", "output", "title", "metadata", "time"]
  5856. },
  5857. "ToolStateError": {
  5858. "type": "object",
  5859. "properties": {
  5860. "status": {
  5861. "type": "string",
  5862. "const": "error"
  5863. },
  5864. "input": {
  5865. "type": "object",
  5866. "propertyNames": {
  5867. "type": "string"
  5868. },
  5869. "additionalProperties": {}
  5870. },
  5871. "error": {
  5872. "type": "string"
  5873. },
  5874. "metadata": {
  5875. "type": "object",
  5876. "propertyNames": {
  5877. "type": "string"
  5878. },
  5879. "additionalProperties": {}
  5880. },
  5881. "time": {
  5882. "type": "object",
  5883. "properties": {
  5884. "start": {
  5885. "type": "number"
  5886. },
  5887. "end": {
  5888. "type": "number"
  5889. }
  5890. },
  5891. "required": ["start", "end"]
  5892. }
  5893. },
  5894. "required": ["status", "input", "error", "time"]
  5895. },
  5896. "ToolState": {
  5897. "anyOf": [
  5898. {
  5899. "$ref": "#/components/schemas/ToolStatePending"
  5900. },
  5901. {
  5902. "$ref": "#/components/schemas/ToolStateRunning"
  5903. },
  5904. {
  5905. "$ref": "#/components/schemas/ToolStateCompleted"
  5906. },
  5907. {
  5908. "$ref": "#/components/schemas/ToolStateError"
  5909. }
  5910. ]
  5911. },
  5912. "ToolPart": {
  5913. "type": "object",
  5914. "properties": {
  5915. "id": {
  5916. "type": "string"
  5917. },
  5918. "sessionID": {
  5919. "type": "string"
  5920. },
  5921. "messageID": {
  5922. "type": "string"
  5923. },
  5924. "type": {
  5925. "type": "string",
  5926. "const": "tool"
  5927. },
  5928. "callID": {
  5929. "type": "string"
  5930. },
  5931. "tool": {
  5932. "type": "string"
  5933. },
  5934. "state": {
  5935. "$ref": "#/components/schemas/ToolState"
  5936. },
  5937. "metadata": {
  5938. "type": "object",
  5939. "propertyNames": {
  5940. "type": "string"
  5941. },
  5942. "additionalProperties": {}
  5943. }
  5944. },
  5945. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"]
  5946. },
  5947. "StepStartPart": {
  5948. "type": "object",
  5949. "properties": {
  5950. "id": {
  5951. "type": "string"
  5952. },
  5953. "sessionID": {
  5954. "type": "string"
  5955. },
  5956. "messageID": {
  5957. "type": "string"
  5958. },
  5959. "type": {
  5960. "type": "string",
  5961. "const": "step-start"
  5962. },
  5963. "snapshot": {
  5964. "type": "string"
  5965. }
  5966. },
  5967. "required": ["id", "sessionID", "messageID", "type"]
  5968. },
  5969. "StepFinishPart": {
  5970. "type": "object",
  5971. "properties": {
  5972. "id": {
  5973. "type": "string"
  5974. },
  5975. "sessionID": {
  5976. "type": "string"
  5977. },
  5978. "messageID": {
  5979. "type": "string"
  5980. },
  5981. "type": {
  5982. "type": "string",
  5983. "const": "step-finish"
  5984. },
  5985. "reason": {
  5986. "type": "string"
  5987. },
  5988. "snapshot": {
  5989. "type": "string"
  5990. },
  5991. "cost": {
  5992. "type": "number"
  5993. },
  5994. "tokens": {
  5995. "type": "object",
  5996. "properties": {
  5997. "input": {
  5998. "type": "number"
  5999. },
  6000. "output": {
  6001. "type": "number"
  6002. },
  6003. "reasoning": {
  6004. "type": "number"
  6005. },
  6006. "cache": {
  6007. "type": "object",
  6008. "properties": {
  6009. "read": {
  6010. "type": "number"
  6011. },
  6012. "write": {
  6013. "type": "number"
  6014. }
  6015. },
  6016. "required": ["read", "write"]
  6017. }
  6018. },
  6019. "required": ["input", "output", "reasoning", "cache"]
  6020. }
  6021. },
  6022. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"]
  6023. },
  6024. "SnapshotPart": {
  6025. "type": "object",
  6026. "properties": {
  6027. "id": {
  6028. "type": "string"
  6029. },
  6030. "sessionID": {
  6031. "type": "string"
  6032. },
  6033. "messageID": {
  6034. "type": "string"
  6035. },
  6036. "type": {
  6037. "type": "string",
  6038. "const": "snapshot"
  6039. },
  6040. "snapshot": {
  6041. "type": "string"
  6042. }
  6043. },
  6044. "required": ["id", "sessionID", "messageID", "type", "snapshot"]
  6045. },
  6046. "PatchPart": {
  6047. "type": "object",
  6048. "properties": {
  6049. "id": {
  6050. "type": "string"
  6051. },
  6052. "sessionID": {
  6053. "type": "string"
  6054. },
  6055. "messageID": {
  6056. "type": "string"
  6057. },
  6058. "type": {
  6059. "type": "string",
  6060. "const": "patch"
  6061. },
  6062. "hash": {
  6063. "type": "string"
  6064. },
  6065. "files": {
  6066. "type": "array",
  6067. "items": {
  6068. "type": "string"
  6069. }
  6070. }
  6071. },
  6072. "required": ["id", "sessionID", "messageID", "type", "hash", "files"]
  6073. },
  6074. "AgentPart": {
  6075. "type": "object",
  6076. "properties": {
  6077. "id": {
  6078. "type": "string"
  6079. },
  6080. "sessionID": {
  6081. "type": "string"
  6082. },
  6083. "messageID": {
  6084. "type": "string"
  6085. },
  6086. "type": {
  6087. "type": "string",
  6088. "const": "agent"
  6089. },
  6090. "name": {
  6091. "type": "string"
  6092. },
  6093. "source": {
  6094. "type": "object",
  6095. "properties": {
  6096. "value": {
  6097. "type": "string"
  6098. },
  6099. "start": {
  6100. "type": "integer",
  6101. "minimum": -9007199254740991,
  6102. "maximum": 9007199254740991
  6103. },
  6104. "end": {
  6105. "type": "integer",
  6106. "minimum": -9007199254740991,
  6107. "maximum": 9007199254740991
  6108. }
  6109. },
  6110. "required": ["value", "start", "end"]
  6111. }
  6112. },
  6113. "required": ["id", "sessionID", "messageID", "type", "name"]
  6114. },
  6115. "RetryPart": {
  6116. "type": "object",
  6117. "properties": {
  6118. "id": {
  6119. "type": "string"
  6120. },
  6121. "sessionID": {
  6122. "type": "string"
  6123. },
  6124. "messageID": {
  6125. "type": "string"
  6126. },
  6127. "type": {
  6128. "type": "string",
  6129. "const": "retry"
  6130. },
  6131. "attempt": {
  6132. "type": "number"
  6133. },
  6134. "error": {
  6135. "$ref": "#/components/schemas/APIError"
  6136. },
  6137. "time": {
  6138. "type": "object",
  6139. "properties": {
  6140. "created": {
  6141. "type": "number"
  6142. }
  6143. },
  6144. "required": ["created"]
  6145. }
  6146. },
  6147. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"]
  6148. },
  6149. "CompactionPart": {
  6150. "type": "object",
  6151. "properties": {
  6152. "id": {
  6153. "type": "string"
  6154. },
  6155. "sessionID": {
  6156. "type": "string"
  6157. },
  6158. "messageID": {
  6159. "type": "string"
  6160. },
  6161. "type": {
  6162. "type": "string",
  6163. "const": "compaction"
  6164. },
  6165. "auto": {
  6166. "type": "boolean"
  6167. }
  6168. },
  6169. "required": ["id", "sessionID", "messageID", "type", "auto"]
  6170. },
  6171. "Part": {
  6172. "anyOf": [
  6173. {
  6174. "$ref": "#/components/schemas/TextPart"
  6175. },
  6176. {
  6177. "type": "object",
  6178. "properties": {
  6179. "id": {
  6180. "type": "string"
  6181. },
  6182. "sessionID": {
  6183. "type": "string"
  6184. },
  6185. "messageID": {
  6186. "type": "string"
  6187. },
  6188. "type": {
  6189. "type": "string",
  6190. "const": "subtask"
  6191. },
  6192. "prompt": {
  6193. "type": "string"
  6194. },
  6195. "description": {
  6196. "type": "string"
  6197. },
  6198. "agent": {
  6199. "type": "string"
  6200. },
  6201. "command": {
  6202. "type": "string"
  6203. }
  6204. },
  6205. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"]
  6206. },
  6207. {
  6208. "$ref": "#/components/schemas/ReasoningPart"
  6209. },
  6210. {
  6211. "$ref": "#/components/schemas/FilePart"
  6212. },
  6213. {
  6214. "$ref": "#/components/schemas/ToolPart"
  6215. },
  6216. {
  6217. "$ref": "#/components/schemas/StepStartPart"
  6218. },
  6219. {
  6220. "$ref": "#/components/schemas/StepFinishPart"
  6221. },
  6222. {
  6223. "$ref": "#/components/schemas/SnapshotPart"
  6224. },
  6225. {
  6226. "$ref": "#/components/schemas/PatchPart"
  6227. },
  6228. {
  6229. "$ref": "#/components/schemas/AgentPart"
  6230. },
  6231. {
  6232. "$ref": "#/components/schemas/RetryPart"
  6233. },
  6234. {
  6235. "$ref": "#/components/schemas/CompactionPart"
  6236. }
  6237. ]
  6238. },
  6239. "Event.message.part.updated": {
  6240. "type": "object",
  6241. "properties": {
  6242. "type": {
  6243. "type": "string",
  6244. "const": "message.part.updated"
  6245. },
  6246. "properties": {
  6247. "type": "object",
  6248. "properties": {
  6249. "part": {
  6250. "$ref": "#/components/schemas/Part"
  6251. },
  6252. "delta": {
  6253. "type": "string"
  6254. }
  6255. },
  6256. "required": ["part"]
  6257. }
  6258. },
  6259. "required": ["type", "properties"]
  6260. },
  6261. "Event.message.part.removed": {
  6262. "type": "object",
  6263. "properties": {
  6264. "type": {
  6265. "type": "string",
  6266. "const": "message.part.removed"
  6267. },
  6268. "properties": {
  6269. "type": "object",
  6270. "properties": {
  6271. "sessionID": {
  6272. "type": "string"
  6273. },
  6274. "messageID": {
  6275. "type": "string"
  6276. },
  6277. "partID": {
  6278. "type": "string"
  6279. }
  6280. },
  6281. "required": ["sessionID", "messageID", "partID"]
  6282. }
  6283. },
  6284. "required": ["type", "properties"]
  6285. },
  6286. "Permission": {
  6287. "type": "object",
  6288. "properties": {
  6289. "id": {
  6290. "type": "string"
  6291. },
  6292. "type": {
  6293. "type": "string"
  6294. },
  6295. "pattern": {
  6296. "anyOf": [
  6297. {
  6298. "type": "string"
  6299. },
  6300. {
  6301. "type": "array",
  6302. "items": {
  6303. "type": "string"
  6304. }
  6305. }
  6306. ]
  6307. },
  6308. "sessionID": {
  6309. "type": "string"
  6310. },
  6311. "messageID": {
  6312. "type": "string"
  6313. },
  6314. "callID": {
  6315. "type": "string"
  6316. },
  6317. "title": {
  6318. "type": "string"
  6319. },
  6320. "metadata": {
  6321. "type": "object",
  6322. "propertyNames": {
  6323. "type": "string"
  6324. },
  6325. "additionalProperties": {}
  6326. },
  6327. "time": {
  6328. "type": "object",
  6329. "properties": {
  6330. "created": {
  6331. "type": "number"
  6332. }
  6333. },
  6334. "required": ["created"]
  6335. }
  6336. },
  6337. "required": ["id", "type", "sessionID", "messageID", "title", "metadata", "time"]
  6338. },
  6339. "Event.permission.updated": {
  6340. "type": "object",
  6341. "properties": {
  6342. "type": {
  6343. "type": "string",
  6344. "const": "permission.updated"
  6345. },
  6346. "properties": {
  6347. "$ref": "#/components/schemas/Permission"
  6348. }
  6349. },
  6350. "required": ["type", "properties"]
  6351. },
  6352. "Event.permission.replied": {
  6353. "type": "object",
  6354. "properties": {
  6355. "type": {
  6356. "type": "string",
  6357. "const": "permission.replied"
  6358. },
  6359. "properties": {
  6360. "type": "object",
  6361. "properties": {
  6362. "sessionID": {
  6363. "type": "string"
  6364. },
  6365. "permissionID": {
  6366. "type": "string"
  6367. },
  6368. "response": {
  6369. "type": "string"
  6370. }
  6371. },
  6372. "required": ["sessionID", "permissionID", "response"]
  6373. }
  6374. },
  6375. "required": ["type", "properties"]
  6376. },
  6377. "Event.file.edited": {
  6378. "type": "object",
  6379. "properties": {
  6380. "type": {
  6381. "type": "string",
  6382. "const": "file.edited"
  6383. },
  6384. "properties": {
  6385. "type": "object",
  6386. "properties": {
  6387. "file": {
  6388. "type": "string"
  6389. }
  6390. },
  6391. "required": ["file"]
  6392. }
  6393. },
  6394. "required": ["type", "properties"]
  6395. },
  6396. "Todo": {
  6397. "type": "object",
  6398. "properties": {
  6399. "content": {
  6400. "description": "Brief description of the task",
  6401. "type": "string"
  6402. },
  6403. "status": {
  6404. "description": "Current status of the task: pending, in_progress, completed, cancelled",
  6405. "type": "string"
  6406. },
  6407. "priority": {
  6408. "description": "Priority level of the task: high, medium, low",
  6409. "type": "string"
  6410. },
  6411. "id": {
  6412. "description": "Unique identifier for the todo item",
  6413. "type": "string"
  6414. }
  6415. },
  6416. "required": ["content", "status", "priority", "id"]
  6417. },
  6418. "Event.todo.updated": {
  6419. "type": "object",
  6420. "properties": {
  6421. "type": {
  6422. "type": "string",
  6423. "const": "todo.updated"
  6424. },
  6425. "properties": {
  6426. "type": "object",
  6427. "properties": {
  6428. "sessionID": {
  6429. "type": "string"
  6430. },
  6431. "todos": {
  6432. "type": "array",
  6433. "items": {
  6434. "$ref": "#/components/schemas/Todo"
  6435. }
  6436. }
  6437. },
  6438. "required": ["sessionID", "todos"]
  6439. }
  6440. },
  6441. "required": ["type", "properties"]
  6442. },
  6443. "SessionStatus": {
  6444. "anyOf": [
  6445. {
  6446. "type": "object",
  6447. "properties": {
  6448. "type": {
  6449. "type": "string",
  6450. "const": "idle"
  6451. }
  6452. },
  6453. "required": ["type"]
  6454. },
  6455. {
  6456. "type": "object",
  6457. "properties": {
  6458. "type": {
  6459. "type": "string",
  6460. "const": "retry"
  6461. },
  6462. "attempt": {
  6463. "type": "number"
  6464. },
  6465. "message": {
  6466. "type": "string"
  6467. },
  6468. "next": {
  6469. "type": "number"
  6470. }
  6471. },
  6472. "required": ["type", "attempt", "message", "next"]
  6473. },
  6474. {
  6475. "type": "object",
  6476. "properties": {
  6477. "type": {
  6478. "type": "string",
  6479. "const": "busy"
  6480. }
  6481. },
  6482. "required": ["type"]
  6483. }
  6484. ]
  6485. },
  6486. "Event.session.status": {
  6487. "type": "object",
  6488. "properties": {
  6489. "type": {
  6490. "type": "string",
  6491. "const": "session.status"
  6492. },
  6493. "properties": {
  6494. "type": "object",
  6495. "properties": {
  6496. "sessionID": {
  6497. "type": "string"
  6498. },
  6499. "status": {
  6500. "$ref": "#/components/schemas/SessionStatus"
  6501. }
  6502. },
  6503. "required": ["sessionID", "status"]
  6504. }
  6505. },
  6506. "required": ["type", "properties"]
  6507. },
  6508. "Event.session.idle": {
  6509. "type": "object",
  6510. "properties": {
  6511. "type": {
  6512. "type": "string",
  6513. "const": "session.idle"
  6514. },
  6515. "properties": {
  6516. "type": "object",
  6517. "properties": {
  6518. "sessionID": {
  6519. "type": "string"
  6520. }
  6521. },
  6522. "required": ["sessionID"]
  6523. }
  6524. },
  6525. "required": ["type", "properties"]
  6526. },
  6527. "Event.session.compacted": {
  6528. "type": "object",
  6529. "properties": {
  6530. "type": {
  6531. "type": "string",
  6532. "const": "session.compacted"
  6533. },
  6534. "properties": {
  6535. "type": "object",
  6536. "properties": {
  6537. "sessionID": {
  6538. "type": "string"
  6539. }
  6540. },
  6541. "required": ["sessionID"]
  6542. }
  6543. },
  6544. "required": ["type", "properties"]
  6545. },
  6546. "Event.tui.prompt.append": {
  6547. "type": "object",
  6548. "properties": {
  6549. "type": {
  6550. "type": "string",
  6551. "const": "tui.prompt.append"
  6552. },
  6553. "properties": {
  6554. "type": "object",
  6555. "properties": {
  6556. "text": {
  6557. "type": "string"
  6558. }
  6559. },
  6560. "required": ["text"]
  6561. }
  6562. },
  6563. "required": ["type", "properties"]
  6564. },
  6565. "Event.tui.command.execute": {
  6566. "type": "object",
  6567. "properties": {
  6568. "type": {
  6569. "type": "string",
  6570. "const": "tui.command.execute"
  6571. },
  6572. "properties": {
  6573. "type": "object",
  6574. "properties": {
  6575. "command": {
  6576. "anyOf": [
  6577. {
  6578. "type": "string",
  6579. "enum": [
  6580. "session.list",
  6581. "session.new",
  6582. "session.share",
  6583. "session.interrupt",
  6584. "session.compact",
  6585. "session.page.up",
  6586. "session.page.down",
  6587. "session.half.page.up",
  6588. "session.half.page.down",
  6589. "session.first",
  6590. "session.last",
  6591. "prompt.clear",
  6592. "prompt.submit",
  6593. "agent.cycle"
  6594. ]
  6595. },
  6596. {
  6597. "type": "string"
  6598. }
  6599. ]
  6600. }
  6601. },
  6602. "required": ["command"]
  6603. }
  6604. },
  6605. "required": ["type", "properties"]
  6606. },
  6607. "Event.tui.toast.show": {
  6608. "type": "object",
  6609. "properties": {
  6610. "type": {
  6611. "type": "string",
  6612. "const": "tui.toast.show"
  6613. },
  6614. "properties": {
  6615. "type": "object",
  6616. "properties": {
  6617. "title": {
  6618. "type": "string"
  6619. },
  6620. "message": {
  6621. "type": "string"
  6622. },
  6623. "variant": {
  6624. "type": "string",
  6625. "enum": ["info", "success", "warning", "error"]
  6626. },
  6627. "duration": {
  6628. "description": "Duration in milliseconds",
  6629. "default": 5000,
  6630. "type": "number"
  6631. }
  6632. },
  6633. "required": ["message", "variant"]
  6634. }
  6635. },
  6636. "required": ["type", "properties"]
  6637. },
  6638. "Event.mcp.tools.changed": {
  6639. "type": "object",
  6640. "properties": {
  6641. "type": {
  6642. "type": "string",
  6643. "const": "mcp.tools.changed"
  6644. },
  6645. "properties": {
  6646. "type": "object",
  6647. "properties": {
  6648. "server": {
  6649. "type": "string"
  6650. }
  6651. },
  6652. "required": ["server"]
  6653. }
  6654. },
  6655. "required": ["type", "properties"]
  6656. },
  6657. "Event.command.executed": {
  6658. "type": "object",
  6659. "properties": {
  6660. "type": {
  6661. "type": "string",
  6662. "const": "command.executed"
  6663. },
  6664. "properties": {
  6665. "type": "object",
  6666. "properties": {
  6667. "name": {
  6668. "type": "string"
  6669. },
  6670. "sessionID": {
  6671. "type": "string",
  6672. "pattern": "^ses.*"
  6673. },
  6674. "arguments": {
  6675. "type": "string"
  6676. },
  6677. "messageID": {
  6678. "type": "string",
  6679. "pattern": "^msg.*"
  6680. }
  6681. },
  6682. "required": ["name", "sessionID", "arguments", "messageID"]
  6683. }
  6684. },
  6685. "required": ["type", "properties"]
  6686. },
  6687. "Session": {
  6688. "type": "object",
  6689. "properties": {
  6690. "id": {
  6691. "type": "string",
  6692. "pattern": "^ses.*"
  6693. },
  6694. "projectID": {
  6695. "type": "string"
  6696. },
  6697. "directory": {
  6698. "type": "string"
  6699. },
  6700. "parentID": {
  6701. "type": "string",
  6702. "pattern": "^ses.*"
  6703. },
  6704. "summary": {
  6705. "type": "object",
  6706. "properties": {
  6707. "additions": {
  6708. "type": "number"
  6709. },
  6710. "deletions": {
  6711. "type": "number"
  6712. },
  6713. "files": {
  6714. "type": "number"
  6715. },
  6716. "diffs": {
  6717. "type": "array",
  6718. "items": {
  6719. "$ref": "#/components/schemas/FileDiff"
  6720. }
  6721. }
  6722. },
  6723. "required": ["additions", "deletions", "files"]
  6724. },
  6725. "share": {
  6726. "type": "object",
  6727. "properties": {
  6728. "url": {
  6729. "type": "string"
  6730. }
  6731. },
  6732. "required": ["url"]
  6733. },
  6734. "title": {
  6735. "type": "string"
  6736. },
  6737. "version": {
  6738. "type": "string"
  6739. },
  6740. "time": {
  6741. "type": "object",
  6742. "properties": {
  6743. "created": {
  6744. "type": "number"
  6745. },
  6746. "updated": {
  6747. "type": "number"
  6748. },
  6749. "compacting": {
  6750. "type": "number"
  6751. },
  6752. "archived": {
  6753. "type": "number"
  6754. }
  6755. },
  6756. "required": ["created", "updated"]
  6757. },
  6758. "revert": {
  6759. "type": "object",
  6760. "properties": {
  6761. "messageID": {
  6762. "type": "string"
  6763. },
  6764. "partID": {
  6765. "type": "string"
  6766. },
  6767. "snapshot": {
  6768. "type": "string"
  6769. },
  6770. "diff": {
  6771. "type": "string"
  6772. }
  6773. },
  6774. "required": ["messageID"]
  6775. }
  6776. },
  6777. "required": ["id", "projectID", "directory", "title", "version", "time"]
  6778. },
  6779. "Event.session.created": {
  6780. "type": "object",
  6781. "properties": {
  6782. "type": {
  6783. "type": "string",
  6784. "const": "session.created"
  6785. },
  6786. "properties": {
  6787. "type": "object",
  6788. "properties": {
  6789. "info": {
  6790. "$ref": "#/components/schemas/Session"
  6791. }
  6792. },
  6793. "required": ["info"]
  6794. }
  6795. },
  6796. "required": ["type", "properties"]
  6797. },
  6798. "Event.session.updated": {
  6799. "type": "object",
  6800. "properties": {
  6801. "type": {
  6802. "type": "string",
  6803. "const": "session.updated"
  6804. },
  6805. "properties": {
  6806. "type": "object",
  6807. "properties": {
  6808. "info": {
  6809. "$ref": "#/components/schemas/Session"
  6810. }
  6811. },
  6812. "required": ["info"]
  6813. }
  6814. },
  6815. "required": ["type", "properties"]
  6816. },
  6817. "Event.session.deleted": {
  6818. "type": "object",
  6819. "properties": {
  6820. "type": {
  6821. "type": "string",
  6822. "const": "session.deleted"
  6823. },
  6824. "properties": {
  6825. "type": "object",
  6826. "properties": {
  6827. "info": {
  6828. "$ref": "#/components/schemas/Session"
  6829. }
  6830. },
  6831. "required": ["info"]
  6832. }
  6833. },
  6834. "required": ["type", "properties"]
  6835. },
  6836. "Event.session.diff": {
  6837. "type": "object",
  6838. "properties": {
  6839. "type": {
  6840. "type": "string",
  6841. "const": "session.diff"
  6842. },
  6843. "properties": {
  6844. "type": "object",
  6845. "properties": {
  6846. "sessionID": {
  6847. "type": "string"
  6848. },
  6849. "diff": {
  6850. "type": "array",
  6851. "items": {
  6852. "$ref": "#/components/schemas/FileDiff"
  6853. }
  6854. }
  6855. },
  6856. "required": ["sessionID", "diff"]
  6857. }
  6858. },
  6859. "required": ["type", "properties"]
  6860. },
  6861. "Event.session.error": {
  6862. "type": "object",
  6863. "properties": {
  6864. "type": {
  6865. "type": "string",
  6866. "const": "session.error"
  6867. },
  6868. "properties": {
  6869. "type": "object",
  6870. "properties": {
  6871. "sessionID": {
  6872. "type": "string"
  6873. },
  6874. "error": {
  6875. "anyOf": [
  6876. {
  6877. "$ref": "#/components/schemas/ProviderAuthError"
  6878. },
  6879. {
  6880. "$ref": "#/components/schemas/UnknownError"
  6881. },
  6882. {
  6883. "$ref": "#/components/schemas/MessageOutputLengthError"
  6884. },
  6885. {
  6886. "$ref": "#/components/schemas/MessageAbortedError"
  6887. },
  6888. {
  6889. "$ref": "#/components/schemas/APIError"
  6890. }
  6891. ]
  6892. }
  6893. }
  6894. }
  6895. },
  6896. "required": ["type", "properties"]
  6897. },
  6898. "Event.file.watcher.updated": {
  6899. "type": "object",
  6900. "properties": {
  6901. "type": {
  6902. "type": "string",
  6903. "const": "file.watcher.updated"
  6904. },
  6905. "properties": {
  6906. "type": "object",
  6907. "properties": {
  6908. "file": {
  6909. "type": "string"
  6910. },
  6911. "event": {
  6912. "anyOf": [
  6913. {
  6914. "type": "string",
  6915. "const": "add"
  6916. },
  6917. {
  6918. "type": "string",
  6919. "const": "change"
  6920. },
  6921. {
  6922. "type": "string",
  6923. "const": "unlink"
  6924. }
  6925. ]
  6926. }
  6927. },
  6928. "required": ["file", "event"]
  6929. }
  6930. },
  6931. "required": ["type", "properties"]
  6932. },
  6933. "Event.vcs.branch.updated": {
  6934. "type": "object",
  6935. "properties": {
  6936. "type": {
  6937. "type": "string",
  6938. "const": "vcs.branch.updated"
  6939. },
  6940. "properties": {
  6941. "type": "object",
  6942. "properties": {
  6943. "branch": {
  6944. "type": "string"
  6945. }
  6946. }
  6947. }
  6948. },
  6949. "required": ["type", "properties"]
  6950. },
  6951. "Pty": {
  6952. "type": "object",
  6953. "properties": {
  6954. "id": {
  6955. "type": "string",
  6956. "pattern": "^pty.*"
  6957. },
  6958. "title": {
  6959. "type": "string"
  6960. },
  6961. "command": {
  6962. "type": "string"
  6963. },
  6964. "args": {
  6965. "type": "array",
  6966. "items": {
  6967. "type": "string"
  6968. }
  6969. },
  6970. "cwd": {
  6971. "type": "string"
  6972. },
  6973. "status": {
  6974. "type": "string",
  6975. "enum": ["running", "exited"]
  6976. },
  6977. "pid": {
  6978. "type": "number"
  6979. }
  6980. },
  6981. "required": ["id", "title", "command", "args", "cwd", "status", "pid"]
  6982. },
  6983. "Event.pty.created": {
  6984. "type": "object",
  6985. "properties": {
  6986. "type": {
  6987. "type": "string",
  6988. "const": "pty.created"
  6989. },
  6990. "properties": {
  6991. "type": "object",
  6992. "properties": {
  6993. "info": {
  6994. "$ref": "#/components/schemas/Pty"
  6995. }
  6996. },
  6997. "required": ["info"]
  6998. }
  6999. },
  7000. "required": ["type", "properties"]
  7001. },
  7002. "Event.pty.updated": {
  7003. "type": "object",
  7004. "properties": {
  7005. "type": {
  7006. "type": "string",
  7007. "const": "pty.updated"
  7008. },
  7009. "properties": {
  7010. "type": "object",
  7011. "properties": {
  7012. "info": {
  7013. "$ref": "#/components/schemas/Pty"
  7014. }
  7015. },
  7016. "required": ["info"]
  7017. }
  7018. },
  7019. "required": ["type", "properties"]
  7020. },
  7021. "Event.pty.exited": {
  7022. "type": "object",
  7023. "properties": {
  7024. "type": {
  7025. "type": "string",
  7026. "const": "pty.exited"
  7027. },
  7028. "properties": {
  7029. "type": "object",
  7030. "properties": {
  7031. "id": {
  7032. "type": "string",
  7033. "pattern": "^pty.*"
  7034. },
  7035. "exitCode": {
  7036. "type": "number"
  7037. }
  7038. },
  7039. "required": ["id", "exitCode"]
  7040. }
  7041. },
  7042. "required": ["type", "properties"]
  7043. },
  7044. "Event.pty.deleted": {
  7045. "type": "object",
  7046. "properties": {
  7047. "type": {
  7048. "type": "string",
  7049. "const": "pty.deleted"
  7050. },
  7051. "properties": {
  7052. "type": "object",
  7053. "properties": {
  7054. "id": {
  7055. "type": "string",
  7056. "pattern": "^pty.*"
  7057. }
  7058. },
  7059. "required": ["id"]
  7060. }
  7061. },
  7062. "required": ["type", "properties"]
  7063. },
  7064. "Event.server.connected": {
  7065. "type": "object",
  7066. "properties": {
  7067. "type": {
  7068. "type": "string",
  7069. "const": "server.connected"
  7070. },
  7071. "properties": {
  7072. "type": "object",
  7073. "properties": {}
  7074. }
  7075. },
  7076. "required": ["type", "properties"]
  7077. },
  7078. "Event.global.disposed": {
  7079. "type": "object",
  7080. "properties": {
  7081. "type": {
  7082. "type": "string",
  7083. "const": "global.disposed"
  7084. },
  7085. "properties": {
  7086. "type": "object",
  7087. "properties": {}
  7088. }
  7089. },
  7090. "required": ["type", "properties"]
  7091. },
  7092. "Event": {
  7093. "anyOf": [
  7094. {
  7095. "$ref": "#/components/schemas/Event.installation.updated"
  7096. },
  7097. {
  7098. "$ref": "#/components/schemas/Event.installation.update-available"
  7099. },
  7100. {
  7101. "$ref": "#/components/schemas/Event.project.updated"
  7102. },
  7103. {
  7104. "$ref": "#/components/schemas/Event.server.instance.disposed"
  7105. },
  7106. {
  7107. "$ref": "#/components/schemas/Event.lsp.client.diagnostics"
  7108. },
  7109. {
  7110. "$ref": "#/components/schemas/Event.lsp.updated"
  7111. },
  7112. {
  7113. "$ref": "#/components/schemas/Event.message.updated"
  7114. },
  7115. {
  7116. "$ref": "#/components/schemas/Event.message.removed"
  7117. },
  7118. {
  7119. "$ref": "#/components/schemas/Event.message.part.updated"
  7120. },
  7121. {
  7122. "$ref": "#/components/schemas/Event.message.part.removed"
  7123. },
  7124. {
  7125. "$ref": "#/components/schemas/Event.permission.updated"
  7126. },
  7127. {
  7128. "$ref": "#/components/schemas/Event.permission.replied"
  7129. },
  7130. {
  7131. "$ref": "#/components/schemas/Event.file.edited"
  7132. },
  7133. {
  7134. "$ref": "#/components/schemas/Event.todo.updated"
  7135. },
  7136. {
  7137. "$ref": "#/components/schemas/Event.session.status"
  7138. },
  7139. {
  7140. "$ref": "#/components/schemas/Event.session.idle"
  7141. },
  7142. {
  7143. "$ref": "#/components/schemas/Event.session.compacted"
  7144. },
  7145. {
  7146. "$ref": "#/components/schemas/Event.tui.prompt.append"
  7147. },
  7148. {
  7149. "$ref": "#/components/schemas/Event.tui.command.execute"
  7150. },
  7151. {
  7152. "$ref": "#/components/schemas/Event.tui.toast.show"
  7153. },
  7154. {
  7155. "$ref": "#/components/schemas/Event.mcp.tools.changed"
  7156. },
  7157. {
  7158. "$ref": "#/components/schemas/Event.command.executed"
  7159. },
  7160. {
  7161. "$ref": "#/components/schemas/Event.session.created"
  7162. },
  7163. {
  7164. "$ref": "#/components/schemas/Event.session.updated"
  7165. },
  7166. {
  7167. "$ref": "#/components/schemas/Event.session.deleted"
  7168. },
  7169. {
  7170. "$ref": "#/components/schemas/Event.session.diff"
  7171. },
  7172. {
  7173. "$ref": "#/components/schemas/Event.session.error"
  7174. },
  7175. {
  7176. "$ref": "#/components/schemas/Event.file.watcher.updated"
  7177. },
  7178. {
  7179. "$ref": "#/components/schemas/Event.vcs.branch.updated"
  7180. },
  7181. {
  7182. "$ref": "#/components/schemas/Event.pty.created"
  7183. },
  7184. {
  7185. "$ref": "#/components/schemas/Event.pty.updated"
  7186. },
  7187. {
  7188. "$ref": "#/components/schemas/Event.pty.exited"
  7189. },
  7190. {
  7191. "$ref": "#/components/schemas/Event.pty.deleted"
  7192. },
  7193. {
  7194. "$ref": "#/components/schemas/Event.server.connected"
  7195. },
  7196. {
  7197. "$ref": "#/components/schemas/Event.global.disposed"
  7198. }
  7199. ]
  7200. },
  7201. "GlobalEvent": {
  7202. "type": "object",
  7203. "properties": {
  7204. "directory": {
  7205. "type": "string"
  7206. },
  7207. "payload": {
  7208. "$ref": "#/components/schemas/Event"
  7209. }
  7210. },
  7211. "required": ["directory", "payload"]
  7212. },
  7213. "BadRequestError": {
  7214. "type": "object",
  7215. "properties": {
  7216. "data": {},
  7217. "errors": {
  7218. "type": "array",
  7219. "items": {
  7220. "type": "object",
  7221. "propertyNames": {
  7222. "type": "string"
  7223. },
  7224. "additionalProperties": {}
  7225. }
  7226. },
  7227. "success": {
  7228. "type": "boolean",
  7229. "const": false
  7230. }
  7231. },
  7232. "required": ["data", "errors", "success"]
  7233. },
  7234. "NotFoundError": {
  7235. "type": "object",
  7236. "properties": {
  7237. "name": {
  7238. "type": "string",
  7239. "const": "NotFoundError"
  7240. },
  7241. "data": {
  7242. "type": "object",
  7243. "properties": {
  7244. "message": {
  7245. "type": "string"
  7246. }
  7247. },
  7248. "required": ["message"]
  7249. }
  7250. },
  7251. "required": ["name", "data"]
  7252. },
  7253. "KeybindsConfig": {
  7254. "description": "Custom keybind configurations",
  7255. "type": "object",
  7256. "properties": {
  7257. "leader": {
  7258. "description": "Leader key for keybind combinations",
  7259. "default": "ctrl+x",
  7260. "type": "string"
  7261. },
  7262. "app_exit": {
  7263. "description": "Exit the application",
  7264. "default": "ctrl+c,ctrl+d,<leader>q",
  7265. "type": "string"
  7266. },
  7267. "editor_open": {
  7268. "description": "Open external editor",
  7269. "default": "<leader>e",
  7270. "type": "string"
  7271. },
  7272. "theme_list": {
  7273. "description": "List available themes",
  7274. "default": "<leader>t",
  7275. "type": "string"
  7276. },
  7277. "sidebar_toggle": {
  7278. "description": "Toggle sidebar",
  7279. "default": "<leader>b",
  7280. "type": "string"
  7281. },
  7282. "scrollbar_toggle": {
  7283. "description": "Toggle session scrollbar",
  7284. "default": "none",
  7285. "type": "string"
  7286. },
  7287. "username_toggle": {
  7288. "description": "Toggle username visibility",
  7289. "default": "none",
  7290. "type": "string"
  7291. },
  7292. "status_view": {
  7293. "description": "View status",
  7294. "default": "<leader>s",
  7295. "type": "string"
  7296. },
  7297. "session_export": {
  7298. "description": "Export session to editor",
  7299. "default": "<leader>x",
  7300. "type": "string"
  7301. },
  7302. "session_new": {
  7303. "description": "Create a new session",
  7304. "default": "<leader>n",
  7305. "type": "string"
  7306. },
  7307. "session_list": {
  7308. "description": "List all sessions",
  7309. "default": "<leader>l",
  7310. "type": "string"
  7311. },
  7312. "session_timeline": {
  7313. "description": "Show session timeline",
  7314. "default": "<leader>g",
  7315. "type": "string"
  7316. },
  7317. "session_fork": {
  7318. "description": "Fork session from message",
  7319. "default": "none",
  7320. "type": "string"
  7321. },
  7322. "session_rename": {
  7323. "description": "Rename session",
  7324. "default": "none",
  7325. "type": "string"
  7326. },
  7327. "session_share": {
  7328. "description": "Share current session",
  7329. "default": "none",
  7330. "type": "string"
  7331. },
  7332. "session_unshare": {
  7333. "description": "Unshare current session",
  7334. "default": "none",
  7335. "type": "string"
  7336. },
  7337. "session_interrupt": {
  7338. "description": "Interrupt current session",
  7339. "default": "escape",
  7340. "type": "string"
  7341. },
  7342. "session_compact": {
  7343. "description": "Compact the session",
  7344. "default": "<leader>c",
  7345. "type": "string"
  7346. },
  7347. "messages_page_up": {
  7348. "description": "Scroll messages up by one page",
  7349. "default": "pageup",
  7350. "type": "string"
  7351. },
  7352. "messages_page_down": {
  7353. "description": "Scroll messages down by one page",
  7354. "default": "pagedown",
  7355. "type": "string"
  7356. },
  7357. "messages_half_page_up": {
  7358. "description": "Scroll messages up by half page",
  7359. "default": "ctrl+alt+u",
  7360. "type": "string"
  7361. },
  7362. "messages_half_page_down": {
  7363. "description": "Scroll messages down by half page",
  7364. "default": "ctrl+alt+d",
  7365. "type": "string"
  7366. },
  7367. "messages_first": {
  7368. "description": "Navigate to first message",
  7369. "default": "ctrl+g,home",
  7370. "type": "string"
  7371. },
  7372. "messages_last": {
  7373. "description": "Navigate to last message",
  7374. "default": "ctrl+alt+g,end",
  7375. "type": "string"
  7376. },
  7377. "messages_next": {
  7378. "description": "Navigate to next message",
  7379. "default": "none",
  7380. "type": "string"
  7381. },
  7382. "messages_previous": {
  7383. "description": "Navigate to previous message",
  7384. "default": "none",
  7385. "type": "string"
  7386. },
  7387. "messages_last_user": {
  7388. "description": "Navigate to last user message",
  7389. "default": "none",
  7390. "type": "string"
  7391. },
  7392. "messages_copy": {
  7393. "description": "Copy message",
  7394. "default": "<leader>y",
  7395. "type": "string"
  7396. },
  7397. "messages_undo": {
  7398. "description": "Undo message",
  7399. "default": "<leader>u",
  7400. "type": "string"
  7401. },
  7402. "messages_redo": {
  7403. "description": "Redo message",
  7404. "default": "<leader>r",
  7405. "type": "string"
  7406. },
  7407. "messages_toggle_conceal": {
  7408. "description": "Toggle code block concealment in messages",
  7409. "default": "<leader>h",
  7410. "type": "string"
  7411. },
  7412. "tool_details": {
  7413. "description": "Toggle tool details visibility",
  7414. "default": "none",
  7415. "type": "string"
  7416. },
  7417. "model_list": {
  7418. "description": "List available models",
  7419. "default": "<leader>m",
  7420. "type": "string"
  7421. },
  7422. "model_cycle_recent": {
  7423. "description": "Next recently used model",
  7424. "default": "f2",
  7425. "type": "string"
  7426. },
  7427. "model_cycle_recent_reverse": {
  7428. "description": "Previous recently used model",
  7429. "default": "shift+f2",
  7430. "type": "string"
  7431. },
  7432. "model_cycle_favorite": {
  7433. "description": "Next favorite model",
  7434. "default": "none",
  7435. "type": "string"
  7436. },
  7437. "model_cycle_favorite_reverse": {
  7438. "description": "Previous favorite model",
  7439. "default": "none",
  7440. "type": "string"
  7441. },
  7442. "command_list": {
  7443. "description": "List available commands",
  7444. "default": "ctrl+p",
  7445. "type": "string"
  7446. },
  7447. "agent_list": {
  7448. "description": "List agents",
  7449. "default": "<leader>a",
  7450. "type": "string"
  7451. },
  7452. "agent_cycle": {
  7453. "description": "Next agent",
  7454. "default": "tab",
  7455. "type": "string"
  7456. },
  7457. "agent_cycle_reverse": {
  7458. "description": "Previous agent",
  7459. "default": "shift+tab",
  7460. "type": "string"
  7461. },
  7462. "input_clear": {
  7463. "description": "Clear input field",
  7464. "default": "ctrl+c",
  7465. "type": "string"
  7466. },
  7467. "input_paste": {
  7468. "description": "Paste from clipboard",
  7469. "default": "ctrl+v",
  7470. "type": "string"
  7471. },
  7472. "input_submit": {
  7473. "description": "Submit input",
  7474. "default": "return",
  7475. "type": "string"
  7476. },
  7477. "input_newline": {
  7478. "description": "Insert newline in input",
  7479. "default": "shift+return,ctrl+return,alt+return,ctrl+j",
  7480. "type": "string"
  7481. },
  7482. "input_move_left": {
  7483. "description": "Move cursor left in input",
  7484. "default": "left,ctrl+b",
  7485. "type": "string"
  7486. },
  7487. "input_move_right": {
  7488. "description": "Move cursor right in input",
  7489. "default": "right,ctrl+f",
  7490. "type": "string"
  7491. },
  7492. "input_move_up": {
  7493. "description": "Move cursor up in input",
  7494. "default": "up",
  7495. "type": "string"
  7496. },
  7497. "input_move_down": {
  7498. "description": "Move cursor down in input",
  7499. "default": "down",
  7500. "type": "string"
  7501. },
  7502. "input_select_left": {
  7503. "description": "Select left in input",
  7504. "default": "shift+left",
  7505. "type": "string"
  7506. },
  7507. "input_select_right": {
  7508. "description": "Select right in input",
  7509. "default": "shift+right",
  7510. "type": "string"
  7511. },
  7512. "input_select_up": {
  7513. "description": "Select up in input",
  7514. "default": "shift+up",
  7515. "type": "string"
  7516. },
  7517. "input_select_down": {
  7518. "description": "Select down in input",
  7519. "default": "shift+down",
  7520. "type": "string"
  7521. },
  7522. "input_line_home": {
  7523. "description": "Move to start of line in input",
  7524. "default": "ctrl+a",
  7525. "type": "string"
  7526. },
  7527. "input_line_end": {
  7528. "description": "Move to end of line in input",
  7529. "default": "ctrl+e",
  7530. "type": "string"
  7531. },
  7532. "input_select_line_home": {
  7533. "description": "Select to start of line in input",
  7534. "default": "ctrl+shift+a",
  7535. "type": "string"
  7536. },
  7537. "input_select_line_end": {
  7538. "description": "Select to end of line in input",
  7539. "default": "ctrl+shift+e",
  7540. "type": "string"
  7541. },
  7542. "input_visual_line_home": {
  7543. "description": "Move to start of visual line in input",
  7544. "default": "alt+a",
  7545. "type": "string"
  7546. },
  7547. "input_visual_line_end": {
  7548. "description": "Move to end of visual line in input",
  7549. "default": "alt+e",
  7550. "type": "string"
  7551. },
  7552. "input_select_visual_line_home": {
  7553. "description": "Select to start of visual line in input",
  7554. "default": "alt+shift+a",
  7555. "type": "string"
  7556. },
  7557. "input_select_visual_line_end": {
  7558. "description": "Select to end of visual line in input",
  7559. "default": "alt+shift+e",
  7560. "type": "string"
  7561. },
  7562. "input_buffer_home": {
  7563. "description": "Move to start of buffer in input",
  7564. "default": "home",
  7565. "type": "string"
  7566. },
  7567. "input_buffer_end": {
  7568. "description": "Move to end of buffer in input",
  7569. "default": "end",
  7570. "type": "string"
  7571. },
  7572. "input_select_buffer_home": {
  7573. "description": "Select to start of buffer in input",
  7574. "default": "shift+home",
  7575. "type": "string"
  7576. },
  7577. "input_select_buffer_end": {
  7578. "description": "Select to end of buffer in input",
  7579. "default": "shift+end",
  7580. "type": "string"
  7581. },
  7582. "input_delete_line": {
  7583. "description": "Delete line in input",
  7584. "default": "ctrl+shift+d",
  7585. "type": "string"
  7586. },
  7587. "input_delete_to_line_end": {
  7588. "description": "Delete to end of line in input",
  7589. "default": "ctrl+k",
  7590. "type": "string"
  7591. },
  7592. "input_delete_to_line_start": {
  7593. "description": "Delete to start of line in input",
  7594. "default": "ctrl+u",
  7595. "type": "string"
  7596. },
  7597. "input_backspace": {
  7598. "description": "Backspace in input",
  7599. "default": "backspace,shift+backspace",
  7600. "type": "string"
  7601. },
  7602. "input_delete": {
  7603. "description": "Delete character in input",
  7604. "default": "ctrl+d,delete,shift+delete",
  7605. "type": "string"
  7606. },
  7607. "input_undo": {
  7608. "description": "Undo in input",
  7609. "default": "ctrl+-,super+z",
  7610. "type": "string"
  7611. },
  7612. "input_redo": {
  7613. "description": "Redo in input",
  7614. "default": "ctrl+.,super+shift+z",
  7615. "type": "string"
  7616. },
  7617. "input_word_forward": {
  7618. "description": "Move word forward in input",
  7619. "default": "alt+f,alt+right,ctrl+right",
  7620. "type": "string"
  7621. },
  7622. "input_word_backward": {
  7623. "description": "Move word backward in input",
  7624. "default": "alt+b,alt+left,ctrl+left",
  7625. "type": "string"
  7626. },
  7627. "input_select_word_forward": {
  7628. "description": "Select word forward in input",
  7629. "default": "alt+shift+f,alt+shift+right",
  7630. "type": "string"
  7631. },
  7632. "input_select_word_backward": {
  7633. "description": "Select word backward in input",
  7634. "default": "alt+shift+b,alt+shift+left",
  7635. "type": "string"
  7636. },
  7637. "input_delete_word_forward": {
  7638. "description": "Delete word forward in input",
  7639. "default": "alt+d,alt+delete,ctrl+delete",
  7640. "type": "string"
  7641. },
  7642. "input_delete_word_backward": {
  7643. "description": "Delete word backward in input",
  7644. "default": "ctrl+w,ctrl+backspace,alt+backspace",
  7645. "type": "string"
  7646. },
  7647. "history_previous": {
  7648. "description": "Previous history item",
  7649. "default": "up",
  7650. "type": "string"
  7651. },
  7652. "history_next": {
  7653. "description": "Next history item",
  7654. "default": "down",
  7655. "type": "string"
  7656. },
  7657. "session_child_cycle": {
  7658. "description": "Next child session",
  7659. "default": "<leader>right",
  7660. "type": "string"
  7661. },
  7662. "session_child_cycle_reverse": {
  7663. "description": "Previous child session",
  7664. "default": "<leader>left",
  7665. "type": "string"
  7666. },
  7667. "session_parent": {
  7668. "description": "Go to parent session",
  7669. "default": "<leader>up",
  7670. "type": "string"
  7671. },
  7672. "terminal_suspend": {
  7673. "description": "Suspend terminal",
  7674. "default": "ctrl+z",
  7675. "type": "string"
  7676. },
  7677. "terminal_title_toggle": {
  7678. "description": "Toggle terminal title",
  7679. "default": "none",
  7680. "type": "string"
  7681. },
  7682. "tips_toggle": {
  7683. "description": "Toggle tips on home screen",
  7684. "default": "<leader>h",
  7685. "type": "string"
  7686. }
  7687. },
  7688. "additionalProperties": false
  7689. },
  7690. "LogLevel": {
  7691. "description": "Log level",
  7692. "type": "string",
  7693. "enum": ["DEBUG", "INFO", "WARN", "ERROR"]
  7694. },
  7695. "AgentConfig": {
  7696. "type": "object",
  7697. "properties": {
  7698. "model": {
  7699. "type": "string"
  7700. },
  7701. "temperature": {
  7702. "type": "number"
  7703. },
  7704. "top_p": {
  7705. "type": "number"
  7706. },
  7707. "prompt": {
  7708. "type": "string"
  7709. },
  7710. "tools": {
  7711. "type": "object",
  7712. "propertyNames": {
  7713. "type": "string"
  7714. },
  7715. "additionalProperties": {
  7716. "type": "boolean"
  7717. }
  7718. },
  7719. "disable": {
  7720. "type": "boolean"
  7721. },
  7722. "description": {
  7723. "description": "Description of when to use the agent",
  7724. "type": "string"
  7725. },
  7726. "mode": {
  7727. "type": "string",
  7728. "enum": ["subagent", "primary", "all"]
  7729. },
  7730. "color": {
  7731. "description": "Hex color code for the agent (e.g., #FF5733)",
  7732. "type": "string",
  7733. "pattern": "^#[0-9a-fA-F]{6}$"
  7734. },
  7735. "maxSteps": {
  7736. "description": "Maximum number of agentic iterations before forcing text-only response",
  7737. "type": "integer",
  7738. "exclusiveMinimum": 0,
  7739. "maximum": 9007199254740991
  7740. },
  7741. "permission": {
  7742. "type": "object",
  7743. "properties": {
  7744. "edit": {
  7745. "type": "string",
  7746. "enum": ["ask", "allow", "deny"]
  7747. },
  7748. "bash": {
  7749. "anyOf": [
  7750. {
  7751. "type": "string",
  7752. "enum": ["ask", "allow", "deny"]
  7753. },
  7754. {
  7755. "type": "object",
  7756. "propertyNames": {
  7757. "type": "string"
  7758. },
  7759. "additionalProperties": {
  7760. "type": "string",
  7761. "enum": ["ask", "allow", "deny"]
  7762. }
  7763. }
  7764. ]
  7765. },
  7766. "skill": {
  7767. "anyOf": [
  7768. {
  7769. "type": "string",
  7770. "enum": ["ask", "allow", "deny"]
  7771. },
  7772. {
  7773. "type": "object",
  7774. "propertyNames": {
  7775. "type": "string"
  7776. },
  7777. "additionalProperties": {
  7778. "type": "string",
  7779. "enum": ["ask", "allow", "deny"]
  7780. }
  7781. }
  7782. ]
  7783. },
  7784. "webfetch": {
  7785. "type": "string",
  7786. "enum": ["ask", "allow", "deny"]
  7787. },
  7788. "doom_loop": {
  7789. "type": "string",
  7790. "enum": ["ask", "allow", "deny"]
  7791. },
  7792. "external_directory": {
  7793. "type": "string",
  7794. "enum": ["ask", "allow", "deny"]
  7795. }
  7796. }
  7797. }
  7798. },
  7799. "additionalProperties": {}
  7800. },
  7801. "ProviderConfig": {
  7802. "type": "object",
  7803. "properties": {
  7804. "api": {
  7805. "type": "string"
  7806. },
  7807. "name": {
  7808. "type": "string"
  7809. },
  7810. "env": {
  7811. "type": "array",
  7812. "items": {
  7813. "type": "string"
  7814. }
  7815. },
  7816. "id": {
  7817. "type": "string"
  7818. },
  7819. "npm": {
  7820. "type": "string"
  7821. },
  7822. "models": {
  7823. "type": "object",
  7824. "propertyNames": {
  7825. "type": "string"
  7826. },
  7827. "additionalProperties": {
  7828. "type": "object",
  7829. "properties": {
  7830. "id": {
  7831. "type": "string"
  7832. },
  7833. "name": {
  7834. "type": "string"
  7835. },
  7836. "family": {
  7837. "type": "string"
  7838. },
  7839. "release_date": {
  7840. "type": "string"
  7841. },
  7842. "attachment": {
  7843. "type": "boolean"
  7844. },
  7845. "reasoning": {
  7846. "type": "boolean"
  7847. },
  7848. "temperature": {
  7849. "type": "boolean"
  7850. },
  7851. "tool_call": {
  7852. "type": "boolean"
  7853. },
  7854. "interleaved": {
  7855. "anyOf": [
  7856. {
  7857. "type": "boolean",
  7858. "const": true
  7859. },
  7860. {
  7861. "type": "object",
  7862. "properties": {
  7863. "field": {
  7864. "type": "string",
  7865. "enum": ["reasoning_content", "reasoning_details"]
  7866. }
  7867. },
  7868. "required": ["field"],
  7869. "additionalProperties": false
  7870. }
  7871. ]
  7872. },
  7873. "cost": {
  7874. "type": "object",
  7875. "properties": {
  7876. "input": {
  7877. "type": "number"
  7878. },
  7879. "output": {
  7880. "type": "number"
  7881. },
  7882. "cache_read": {
  7883. "type": "number"
  7884. },
  7885. "cache_write": {
  7886. "type": "number"
  7887. },
  7888. "context_over_200k": {
  7889. "type": "object",
  7890. "properties": {
  7891. "input": {
  7892. "type": "number"
  7893. },
  7894. "output": {
  7895. "type": "number"
  7896. },
  7897. "cache_read": {
  7898. "type": "number"
  7899. },
  7900. "cache_write": {
  7901. "type": "number"
  7902. }
  7903. },
  7904. "required": ["input", "output"]
  7905. }
  7906. },
  7907. "required": ["input", "output"]
  7908. },
  7909. "limit": {
  7910. "type": "object",
  7911. "properties": {
  7912. "context": {
  7913. "type": "number"
  7914. },
  7915. "output": {
  7916. "type": "number"
  7917. }
  7918. },
  7919. "required": ["context", "output"]
  7920. },
  7921. "modalities": {
  7922. "type": "object",
  7923. "properties": {
  7924. "input": {
  7925. "type": "array",
  7926. "items": {
  7927. "type": "string",
  7928. "enum": ["text", "audio", "image", "video", "pdf"]
  7929. }
  7930. },
  7931. "output": {
  7932. "type": "array",
  7933. "items": {
  7934. "type": "string",
  7935. "enum": ["text", "audio", "image", "video", "pdf"]
  7936. }
  7937. }
  7938. },
  7939. "required": ["input", "output"]
  7940. },
  7941. "experimental": {
  7942. "type": "boolean"
  7943. },
  7944. "status": {
  7945. "type": "string",
  7946. "enum": ["alpha", "beta", "deprecated"]
  7947. },
  7948. "options": {
  7949. "type": "object",
  7950. "propertyNames": {
  7951. "type": "string"
  7952. },
  7953. "additionalProperties": {}
  7954. },
  7955. "headers": {
  7956. "type": "object",
  7957. "propertyNames": {
  7958. "type": "string"
  7959. },
  7960. "additionalProperties": {
  7961. "type": "string"
  7962. }
  7963. },
  7964. "provider": {
  7965. "type": "object",
  7966. "properties": {
  7967. "npm": {
  7968. "type": "string"
  7969. }
  7970. },
  7971. "required": ["npm"]
  7972. }
  7973. }
  7974. }
  7975. },
  7976. "whitelist": {
  7977. "type": "array",
  7978. "items": {
  7979. "type": "string"
  7980. }
  7981. },
  7982. "blacklist": {
  7983. "type": "array",
  7984. "items": {
  7985. "type": "string"
  7986. }
  7987. },
  7988. "options": {
  7989. "type": "object",
  7990. "properties": {
  7991. "apiKey": {
  7992. "type": "string"
  7993. },
  7994. "baseURL": {
  7995. "type": "string"
  7996. },
  7997. "enterpriseUrl": {
  7998. "description": "GitHub Enterprise URL for copilot authentication",
  7999. "type": "string"
  8000. },
  8001. "setCacheKey": {
  8002. "description": "Enable promptCacheKey for this provider (default false)",
  8003. "type": "boolean"
  8004. },
  8005. "timeout": {
  8006. "description": "Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout.",
  8007. "anyOf": [
  8008. {
  8009. "description": "Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout.",
  8010. "type": "integer",
  8011. "exclusiveMinimum": 0,
  8012. "maximum": 9007199254740991
  8013. },
  8014. {
  8015. "description": "Disable timeout for this provider entirely.",
  8016. "type": "boolean",
  8017. "const": false
  8018. }
  8019. ]
  8020. }
  8021. },
  8022. "additionalProperties": {}
  8023. }
  8024. },
  8025. "additionalProperties": false
  8026. },
  8027. "McpLocalConfig": {
  8028. "type": "object",
  8029. "properties": {
  8030. "type": {
  8031. "description": "Type of MCP server connection",
  8032. "type": "string",
  8033. "const": "local"
  8034. },
  8035. "command": {
  8036. "description": "Command and arguments to run the MCP server",
  8037. "type": "array",
  8038. "items": {
  8039. "type": "string"
  8040. }
  8041. },
  8042. "environment": {
  8043. "description": "Environment variables to set when running the MCP server",
  8044. "type": "object",
  8045. "propertyNames": {
  8046. "type": "string"
  8047. },
  8048. "additionalProperties": {
  8049. "type": "string"
  8050. }
  8051. },
  8052. "enabled": {
  8053. "description": "Enable or disable the MCP server on startup",
  8054. "type": "boolean"
  8055. },
  8056. "timeout": {
  8057. "description": "Timeout in ms for fetching tools from the MCP server. Defaults to 5000 (5 seconds) if not specified.",
  8058. "type": "integer",
  8059. "exclusiveMinimum": 0,
  8060. "maximum": 9007199254740991
  8061. }
  8062. },
  8063. "required": ["type", "command"],
  8064. "additionalProperties": false
  8065. },
  8066. "McpOAuthConfig": {
  8067. "type": "object",
  8068. "properties": {
  8069. "clientId": {
  8070. "description": "OAuth client ID. If not provided, dynamic client registration (RFC 7591) will be attempted.",
  8071. "type": "string"
  8072. },
  8073. "clientSecret": {
  8074. "description": "OAuth client secret (if required by the authorization server)",
  8075. "type": "string"
  8076. },
  8077. "scope": {
  8078. "description": "OAuth scopes to request during authorization",
  8079. "type": "string"
  8080. }
  8081. },
  8082. "additionalProperties": false
  8083. },
  8084. "McpRemoteConfig": {
  8085. "type": "object",
  8086. "properties": {
  8087. "type": {
  8088. "description": "Type of MCP server connection",
  8089. "type": "string",
  8090. "const": "remote"
  8091. },
  8092. "url": {
  8093. "description": "URL of the remote MCP server",
  8094. "type": "string"
  8095. },
  8096. "enabled": {
  8097. "description": "Enable or disable the MCP server on startup",
  8098. "type": "boolean"
  8099. },
  8100. "headers": {
  8101. "description": "Headers to send with the request",
  8102. "type": "object",
  8103. "propertyNames": {
  8104. "type": "string"
  8105. },
  8106. "additionalProperties": {
  8107. "type": "string"
  8108. }
  8109. },
  8110. "oauth": {
  8111. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection.",
  8112. "anyOf": [
  8113. {
  8114. "$ref": "#/components/schemas/McpOAuthConfig"
  8115. },
  8116. {
  8117. "type": "boolean",
  8118. "const": false
  8119. }
  8120. ]
  8121. },
  8122. "timeout": {
  8123. "description": "Timeout in ms for fetching tools from the MCP server. Defaults to 5000 (5 seconds) if not specified.",
  8124. "type": "integer",
  8125. "exclusiveMinimum": 0,
  8126. "maximum": 9007199254740991
  8127. }
  8128. },
  8129. "required": ["type", "url"],
  8130. "additionalProperties": false
  8131. },
  8132. "LayoutConfig": {
  8133. "description": "@deprecated Always uses stretch layout.",
  8134. "type": "string",
  8135. "enum": ["auto", "stretch"]
  8136. },
  8137. "Config": {
  8138. "type": "object",
  8139. "properties": {
  8140. "$schema": {
  8141. "description": "JSON schema reference for configuration validation",
  8142. "type": "string"
  8143. },
  8144. "theme": {
  8145. "description": "Theme name to use for the interface",
  8146. "type": "string"
  8147. },
  8148. "keybinds": {
  8149. "$ref": "#/components/schemas/KeybindsConfig"
  8150. },
  8151. "logLevel": {
  8152. "$ref": "#/components/schemas/LogLevel"
  8153. },
  8154. "tui": {
  8155. "description": "TUI specific settings",
  8156. "type": "object",
  8157. "properties": {
  8158. "scroll_speed": {
  8159. "description": "TUI scroll speed",
  8160. "type": "number",
  8161. "minimum": 0.001
  8162. },
  8163. "scroll_acceleration": {
  8164. "description": "Scroll acceleration settings",
  8165. "type": "object",
  8166. "properties": {
  8167. "enabled": {
  8168. "description": "Enable scroll acceleration",
  8169. "type": "boolean"
  8170. }
  8171. },
  8172. "required": ["enabled"]
  8173. },
  8174. "diff_style": {
  8175. "description": "Control diff rendering style: 'auto' adapts to terminal width, 'stacked' always shows single column",
  8176. "type": "string",
  8177. "enum": ["auto", "stacked"]
  8178. }
  8179. }
  8180. },
  8181. "command": {
  8182. "description": "Command configuration, see https://opencode.ai/docs/commands",
  8183. "type": "object",
  8184. "propertyNames": {
  8185. "type": "string"
  8186. },
  8187. "additionalProperties": {
  8188. "type": "object",
  8189. "properties": {
  8190. "template": {
  8191. "type": "string"
  8192. },
  8193. "description": {
  8194. "type": "string"
  8195. },
  8196. "agent": {
  8197. "type": "string"
  8198. },
  8199. "model": {
  8200. "type": "string"
  8201. },
  8202. "subtask": {
  8203. "type": "boolean"
  8204. }
  8205. },
  8206. "required": ["template"]
  8207. }
  8208. },
  8209. "watcher": {
  8210. "type": "object",
  8211. "properties": {
  8212. "ignore": {
  8213. "type": "array",
  8214. "items": {
  8215. "type": "string"
  8216. }
  8217. }
  8218. }
  8219. },
  8220. "plugin": {
  8221. "type": "array",
  8222. "items": {
  8223. "type": "string"
  8224. }
  8225. },
  8226. "snapshot": {
  8227. "type": "boolean"
  8228. },
  8229. "share": {
  8230. "description": "Control sharing behavior:'manual' allows manual sharing via commands, 'auto' enables automatic sharing, 'disabled' disables all sharing",
  8231. "type": "string",
  8232. "enum": ["manual", "auto", "disabled"]
  8233. },
  8234. "autoshare": {
  8235. "description": "@deprecated Use 'share' field instead. Share newly created sessions automatically",
  8236. "type": "boolean"
  8237. },
  8238. "autoupdate": {
  8239. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications",
  8240. "anyOf": [
  8241. {
  8242. "type": "boolean"
  8243. },
  8244. {
  8245. "type": "string",
  8246. "const": "notify"
  8247. }
  8248. ]
  8249. },
  8250. "disabled_providers": {
  8251. "description": "Disable providers that are loaded automatically",
  8252. "type": "array",
  8253. "items": {
  8254. "type": "string"
  8255. }
  8256. },
  8257. "enabled_providers": {
  8258. "description": "When set, ONLY these providers will be enabled. All other providers will be ignored",
  8259. "type": "array",
  8260. "items": {
  8261. "type": "string"
  8262. }
  8263. },
  8264. "model": {
  8265. "description": "Model to use in the format of provider/model, eg anthropic/claude-2",
  8266. "type": "string"
  8267. },
  8268. "small_model": {
  8269. "description": "Small model to use for tasks like title generation in the format of provider/model",
  8270. "type": "string"
  8271. },
  8272. "default_agent": {
  8273. "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.",
  8274. "type": "string"
  8275. },
  8276. "username": {
  8277. "description": "Custom username to display in conversations instead of system username",
  8278. "type": "string"
  8279. },
  8280. "mode": {
  8281. "description": "@deprecated Use `agent` field instead.",
  8282. "type": "object",
  8283. "properties": {
  8284. "build": {
  8285. "$ref": "#/components/schemas/AgentConfig"
  8286. },
  8287. "plan": {
  8288. "$ref": "#/components/schemas/AgentConfig"
  8289. }
  8290. },
  8291. "additionalProperties": {
  8292. "$ref": "#/components/schemas/AgentConfig"
  8293. }
  8294. },
  8295. "agent": {
  8296. "description": "Agent configuration, see https://opencode.ai/docs/agent",
  8297. "type": "object",
  8298. "properties": {
  8299. "plan": {
  8300. "$ref": "#/components/schemas/AgentConfig"
  8301. },
  8302. "build": {
  8303. "$ref": "#/components/schemas/AgentConfig"
  8304. },
  8305. "general": {
  8306. "$ref": "#/components/schemas/AgentConfig"
  8307. },
  8308. "explore": {
  8309. "$ref": "#/components/schemas/AgentConfig"
  8310. },
  8311. "title": {
  8312. "$ref": "#/components/schemas/AgentConfig"
  8313. },
  8314. "summary": {
  8315. "$ref": "#/components/schemas/AgentConfig"
  8316. },
  8317. "compaction": {
  8318. "$ref": "#/components/schemas/AgentConfig"
  8319. }
  8320. },
  8321. "additionalProperties": {
  8322. "$ref": "#/components/schemas/AgentConfig"
  8323. }
  8324. },
  8325. "provider": {
  8326. "description": "Custom provider configurations and model overrides",
  8327. "type": "object",
  8328. "propertyNames": {
  8329. "type": "string"
  8330. },
  8331. "additionalProperties": {
  8332. "$ref": "#/components/schemas/ProviderConfig"
  8333. }
  8334. },
  8335. "mcp": {
  8336. "description": "MCP (Model Context Protocol) server configurations",
  8337. "type": "object",
  8338. "propertyNames": {
  8339. "type": "string"
  8340. },
  8341. "additionalProperties": {
  8342. "anyOf": [
  8343. {
  8344. "$ref": "#/components/schemas/McpLocalConfig"
  8345. },
  8346. {
  8347. "$ref": "#/components/schemas/McpRemoteConfig"
  8348. }
  8349. ]
  8350. }
  8351. },
  8352. "formatter": {
  8353. "anyOf": [
  8354. {
  8355. "type": "boolean",
  8356. "const": false
  8357. },
  8358. {
  8359. "type": "object",
  8360. "propertyNames": {
  8361. "type": "string"
  8362. },
  8363. "additionalProperties": {
  8364. "type": "object",
  8365. "properties": {
  8366. "disabled": {
  8367. "type": "boolean"
  8368. },
  8369. "command": {
  8370. "type": "array",
  8371. "items": {
  8372. "type": "string"
  8373. }
  8374. },
  8375. "environment": {
  8376. "type": "object",
  8377. "propertyNames": {
  8378. "type": "string"
  8379. },
  8380. "additionalProperties": {
  8381. "type": "string"
  8382. }
  8383. },
  8384. "extensions": {
  8385. "type": "array",
  8386. "items": {
  8387. "type": "string"
  8388. }
  8389. }
  8390. }
  8391. }
  8392. }
  8393. ]
  8394. },
  8395. "lsp": {
  8396. "anyOf": [
  8397. {
  8398. "type": "boolean",
  8399. "const": false
  8400. },
  8401. {
  8402. "type": "object",
  8403. "propertyNames": {
  8404. "type": "string"
  8405. },
  8406. "additionalProperties": {
  8407. "anyOf": [
  8408. {
  8409. "type": "object",
  8410. "properties": {
  8411. "disabled": {
  8412. "type": "boolean",
  8413. "const": true
  8414. }
  8415. },
  8416. "required": ["disabled"]
  8417. },
  8418. {
  8419. "type": "object",
  8420. "properties": {
  8421. "command": {
  8422. "type": "array",
  8423. "items": {
  8424. "type": "string"
  8425. }
  8426. },
  8427. "extensions": {
  8428. "type": "array",
  8429. "items": {
  8430. "type": "string"
  8431. }
  8432. },
  8433. "disabled": {
  8434. "type": "boolean"
  8435. },
  8436. "env": {
  8437. "type": "object",
  8438. "propertyNames": {
  8439. "type": "string"
  8440. },
  8441. "additionalProperties": {
  8442. "type": "string"
  8443. }
  8444. },
  8445. "initialization": {
  8446. "type": "object",
  8447. "propertyNames": {
  8448. "type": "string"
  8449. },
  8450. "additionalProperties": {}
  8451. }
  8452. },
  8453. "required": ["command"]
  8454. }
  8455. ]
  8456. }
  8457. }
  8458. ]
  8459. },
  8460. "instructions": {
  8461. "description": "Additional instruction files or patterns to include",
  8462. "type": "array",
  8463. "items": {
  8464. "type": "string"
  8465. }
  8466. },
  8467. "layout": {
  8468. "$ref": "#/components/schemas/LayoutConfig"
  8469. },
  8470. "permission": {
  8471. "type": "object",
  8472. "properties": {
  8473. "edit": {
  8474. "type": "string",
  8475. "enum": ["ask", "allow", "deny"]
  8476. },
  8477. "bash": {
  8478. "anyOf": [
  8479. {
  8480. "type": "string",
  8481. "enum": ["ask", "allow", "deny"]
  8482. },
  8483. {
  8484. "type": "object",
  8485. "propertyNames": {
  8486. "type": "string"
  8487. },
  8488. "additionalProperties": {
  8489. "type": "string",
  8490. "enum": ["ask", "allow", "deny"]
  8491. }
  8492. }
  8493. ]
  8494. },
  8495. "skill": {
  8496. "anyOf": [
  8497. {
  8498. "type": "string",
  8499. "enum": ["ask", "allow", "deny"]
  8500. },
  8501. {
  8502. "type": "object",
  8503. "propertyNames": {
  8504. "type": "string"
  8505. },
  8506. "additionalProperties": {
  8507. "type": "string",
  8508. "enum": ["ask", "allow", "deny"]
  8509. }
  8510. }
  8511. ]
  8512. },
  8513. "webfetch": {
  8514. "type": "string",
  8515. "enum": ["ask", "allow", "deny"]
  8516. },
  8517. "doom_loop": {
  8518. "type": "string",
  8519. "enum": ["ask", "allow", "deny"]
  8520. },
  8521. "external_directory": {
  8522. "type": "string",
  8523. "enum": ["ask", "allow", "deny"]
  8524. }
  8525. }
  8526. },
  8527. "tools": {
  8528. "type": "object",
  8529. "propertyNames": {
  8530. "type": "string"
  8531. },
  8532. "additionalProperties": {
  8533. "type": "boolean"
  8534. }
  8535. },
  8536. "enterprise": {
  8537. "type": "object",
  8538. "properties": {
  8539. "url": {
  8540. "description": "Enterprise URL",
  8541. "type": "string"
  8542. }
  8543. }
  8544. },
  8545. "experimental": {
  8546. "type": "object",
  8547. "properties": {
  8548. "hook": {
  8549. "type": "object",
  8550. "properties": {
  8551. "file_edited": {
  8552. "type": "object",
  8553. "propertyNames": {
  8554. "type": "string"
  8555. },
  8556. "additionalProperties": {
  8557. "type": "array",
  8558. "items": {
  8559. "type": "object",
  8560. "properties": {
  8561. "command": {
  8562. "type": "array",
  8563. "items": {
  8564. "type": "string"
  8565. }
  8566. },
  8567. "environment": {
  8568. "type": "object",
  8569. "propertyNames": {
  8570. "type": "string"
  8571. },
  8572. "additionalProperties": {
  8573. "type": "string"
  8574. }
  8575. }
  8576. },
  8577. "required": ["command"]
  8578. }
  8579. }
  8580. },
  8581. "session_completed": {
  8582. "type": "array",
  8583. "items": {
  8584. "type": "object",
  8585. "properties": {
  8586. "command": {
  8587. "type": "array",
  8588. "items": {
  8589. "type": "string"
  8590. }
  8591. },
  8592. "environment": {
  8593. "type": "object",
  8594. "propertyNames": {
  8595. "type": "string"
  8596. },
  8597. "additionalProperties": {
  8598. "type": "string"
  8599. }
  8600. }
  8601. },
  8602. "required": ["command"]
  8603. }
  8604. }
  8605. }
  8606. },
  8607. "chatMaxRetries": {
  8608. "description": "Number of retries for chat completions on failure",
  8609. "type": "number"
  8610. },
  8611. "disable_paste_summary": {
  8612. "type": "boolean"
  8613. },
  8614. "batch_tool": {
  8615. "description": "Enable the batch tool",
  8616. "type": "boolean"
  8617. },
  8618. "openTelemetry": {
  8619. "description": "Enable OpenTelemetry spans for AI SDK calls (using the 'experimental_telemetry' flag)",
  8620. "type": "boolean"
  8621. },
  8622. "primary_tools": {
  8623. "description": "Tools that should only be available to primary agents.",
  8624. "type": "array",
  8625. "items": {
  8626. "type": "string"
  8627. }
  8628. },
  8629. "continue_loop_on_deny": {
  8630. "description": "Continue the agent loop when a tool call is denied",
  8631. "type": "boolean"
  8632. }
  8633. }
  8634. }
  8635. },
  8636. "additionalProperties": false
  8637. },
  8638. "ToolIDs": {
  8639. "type": "array",
  8640. "items": {
  8641. "type": "string"
  8642. }
  8643. },
  8644. "ToolListItem": {
  8645. "type": "object",
  8646. "properties": {
  8647. "id": {
  8648. "type": "string"
  8649. },
  8650. "description": {
  8651. "type": "string"
  8652. },
  8653. "parameters": {}
  8654. },
  8655. "required": ["id", "description", "parameters"]
  8656. },
  8657. "ToolList": {
  8658. "type": "array",
  8659. "items": {
  8660. "$ref": "#/components/schemas/ToolListItem"
  8661. }
  8662. },
  8663. "Path": {
  8664. "type": "object",
  8665. "properties": {
  8666. "home": {
  8667. "type": "string"
  8668. },
  8669. "state": {
  8670. "type": "string"
  8671. },
  8672. "config": {
  8673. "type": "string"
  8674. },
  8675. "worktree": {
  8676. "type": "string"
  8677. },
  8678. "directory": {
  8679. "type": "string"
  8680. }
  8681. },
  8682. "required": ["home", "state", "config", "worktree", "directory"]
  8683. },
  8684. "VcsInfo": {
  8685. "type": "object",
  8686. "properties": {
  8687. "branch": {
  8688. "type": "string"
  8689. }
  8690. },
  8691. "required": ["branch"]
  8692. },
  8693. "TextPartInput": {
  8694. "type": "object",
  8695. "properties": {
  8696. "id": {
  8697. "type": "string"
  8698. },
  8699. "type": {
  8700. "type": "string",
  8701. "const": "text"
  8702. },
  8703. "text": {
  8704. "type": "string"
  8705. },
  8706. "synthetic": {
  8707. "type": "boolean"
  8708. },
  8709. "ignored": {
  8710. "type": "boolean"
  8711. },
  8712. "time": {
  8713. "type": "object",
  8714. "properties": {
  8715. "start": {
  8716. "type": "number"
  8717. },
  8718. "end": {
  8719. "type": "number"
  8720. }
  8721. },
  8722. "required": ["start"]
  8723. },
  8724. "metadata": {
  8725. "type": "object",
  8726. "propertyNames": {
  8727. "type": "string"
  8728. },
  8729. "additionalProperties": {}
  8730. }
  8731. },
  8732. "required": ["type", "text"]
  8733. },
  8734. "FilePartInput": {
  8735. "type": "object",
  8736. "properties": {
  8737. "id": {
  8738. "type": "string"
  8739. },
  8740. "type": {
  8741. "type": "string",
  8742. "const": "file"
  8743. },
  8744. "mime": {
  8745. "type": "string"
  8746. },
  8747. "filename": {
  8748. "type": "string"
  8749. },
  8750. "url": {
  8751. "type": "string"
  8752. },
  8753. "source": {
  8754. "$ref": "#/components/schemas/FilePartSource"
  8755. }
  8756. },
  8757. "required": ["type", "mime", "url"]
  8758. },
  8759. "AgentPartInput": {
  8760. "type": "object",
  8761. "properties": {
  8762. "id": {
  8763. "type": "string"
  8764. },
  8765. "type": {
  8766. "type": "string",
  8767. "const": "agent"
  8768. },
  8769. "name": {
  8770. "type": "string"
  8771. },
  8772. "source": {
  8773. "type": "object",
  8774. "properties": {
  8775. "value": {
  8776. "type": "string"
  8777. },
  8778. "start": {
  8779. "type": "integer",
  8780. "minimum": -9007199254740991,
  8781. "maximum": 9007199254740991
  8782. },
  8783. "end": {
  8784. "type": "integer",
  8785. "minimum": -9007199254740991,
  8786. "maximum": 9007199254740991
  8787. }
  8788. },
  8789. "required": ["value", "start", "end"]
  8790. }
  8791. },
  8792. "required": ["type", "name"]
  8793. },
  8794. "SubtaskPartInput": {
  8795. "type": "object",
  8796. "properties": {
  8797. "id": {
  8798. "type": "string"
  8799. },
  8800. "type": {
  8801. "type": "string",
  8802. "const": "subtask"
  8803. },
  8804. "prompt": {
  8805. "type": "string"
  8806. },
  8807. "description": {
  8808. "type": "string"
  8809. },
  8810. "agent": {
  8811. "type": "string"
  8812. },
  8813. "command": {
  8814. "type": "string"
  8815. }
  8816. },
  8817. "required": ["type", "prompt", "description", "agent"]
  8818. },
  8819. "Command": {
  8820. "type": "object",
  8821. "properties": {
  8822. "name": {
  8823. "type": "string"
  8824. },
  8825. "description": {
  8826. "type": "string"
  8827. },
  8828. "agent": {
  8829. "type": "string"
  8830. },
  8831. "model": {
  8832. "type": "string"
  8833. },
  8834. "template": {
  8835. "type": "string"
  8836. },
  8837. "subtask": {
  8838. "type": "boolean"
  8839. }
  8840. },
  8841. "required": ["name", "template"]
  8842. },
  8843. "Model": {
  8844. "type": "object",
  8845. "properties": {
  8846. "id": {
  8847. "type": "string"
  8848. },
  8849. "providerID": {
  8850. "type": "string"
  8851. },
  8852. "api": {
  8853. "type": "object",
  8854. "properties": {
  8855. "id": {
  8856. "type": "string"
  8857. },
  8858. "url": {
  8859. "type": "string"
  8860. },
  8861. "npm": {
  8862. "type": "string"
  8863. }
  8864. },
  8865. "required": ["id", "url", "npm"]
  8866. },
  8867. "name": {
  8868. "type": "string"
  8869. },
  8870. "family": {
  8871. "type": "string"
  8872. },
  8873. "capabilities": {
  8874. "type": "object",
  8875. "properties": {
  8876. "temperature": {
  8877. "type": "boolean"
  8878. },
  8879. "reasoning": {
  8880. "type": "boolean"
  8881. },
  8882. "attachment": {
  8883. "type": "boolean"
  8884. },
  8885. "toolcall": {
  8886. "type": "boolean"
  8887. },
  8888. "input": {
  8889. "type": "object",
  8890. "properties": {
  8891. "text": {
  8892. "type": "boolean"
  8893. },
  8894. "audio": {
  8895. "type": "boolean"
  8896. },
  8897. "image": {
  8898. "type": "boolean"
  8899. },
  8900. "video": {
  8901. "type": "boolean"
  8902. },
  8903. "pdf": {
  8904. "type": "boolean"
  8905. }
  8906. },
  8907. "required": ["text", "audio", "image", "video", "pdf"]
  8908. },
  8909. "output": {
  8910. "type": "object",
  8911. "properties": {
  8912. "text": {
  8913. "type": "boolean"
  8914. },
  8915. "audio": {
  8916. "type": "boolean"
  8917. },
  8918. "image": {
  8919. "type": "boolean"
  8920. },
  8921. "video": {
  8922. "type": "boolean"
  8923. },
  8924. "pdf": {
  8925. "type": "boolean"
  8926. }
  8927. },
  8928. "required": ["text", "audio", "image", "video", "pdf"]
  8929. },
  8930. "interleaved": {
  8931. "anyOf": [
  8932. {
  8933. "type": "boolean"
  8934. },
  8935. {
  8936. "type": "object",
  8937. "properties": {
  8938. "field": {
  8939. "type": "string",
  8940. "enum": ["reasoning_content", "reasoning_details"]
  8941. }
  8942. },
  8943. "required": ["field"]
  8944. }
  8945. ]
  8946. }
  8947. },
  8948. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"]
  8949. },
  8950. "cost": {
  8951. "type": "object",
  8952. "properties": {
  8953. "input": {
  8954. "type": "number"
  8955. },
  8956. "output": {
  8957. "type": "number"
  8958. },
  8959. "cache": {
  8960. "type": "object",
  8961. "properties": {
  8962. "read": {
  8963. "type": "number"
  8964. },
  8965. "write": {
  8966. "type": "number"
  8967. }
  8968. },
  8969. "required": ["read", "write"]
  8970. },
  8971. "experimentalOver200K": {
  8972. "type": "object",
  8973. "properties": {
  8974. "input": {
  8975. "type": "number"
  8976. },
  8977. "output": {
  8978. "type": "number"
  8979. },
  8980. "cache": {
  8981. "type": "object",
  8982. "properties": {
  8983. "read": {
  8984. "type": "number"
  8985. },
  8986. "write": {
  8987. "type": "number"
  8988. }
  8989. },
  8990. "required": ["read", "write"]
  8991. }
  8992. },
  8993. "required": ["input", "output", "cache"]
  8994. }
  8995. },
  8996. "required": ["input", "output", "cache"]
  8997. },
  8998. "limit": {
  8999. "type": "object",
  9000. "properties": {
  9001. "context": {
  9002. "type": "number"
  9003. },
  9004. "output": {
  9005. "type": "number"
  9006. }
  9007. },
  9008. "required": ["context", "output"]
  9009. },
  9010. "status": {
  9011. "type": "string",
  9012. "enum": ["alpha", "beta", "deprecated", "active"]
  9013. },
  9014. "options": {
  9015. "type": "object",
  9016. "propertyNames": {
  9017. "type": "string"
  9018. },
  9019. "additionalProperties": {}
  9020. },
  9021. "headers": {
  9022. "type": "object",
  9023. "propertyNames": {
  9024. "type": "string"
  9025. },
  9026. "additionalProperties": {
  9027. "type": "string"
  9028. }
  9029. },
  9030. "release_date": {
  9031. "type": "string"
  9032. }
  9033. },
  9034. "required": [
  9035. "id",
  9036. "providerID",
  9037. "api",
  9038. "name",
  9039. "capabilities",
  9040. "cost",
  9041. "limit",
  9042. "status",
  9043. "options",
  9044. "headers",
  9045. "release_date"
  9046. ]
  9047. },
  9048. "Provider": {
  9049. "type": "object",
  9050. "properties": {
  9051. "id": {
  9052. "type": "string"
  9053. },
  9054. "name": {
  9055. "type": "string"
  9056. },
  9057. "source": {
  9058. "type": "string",
  9059. "enum": ["env", "config", "custom", "api"]
  9060. },
  9061. "env": {
  9062. "type": "array",
  9063. "items": {
  9064. "type": "string"
  9065. }
  9066. },
  9067. "key": {
  9068. "type": "string"
  9069. },
  9070. "options": {
  9071. "type": "object",
  9072. "propertyNames": {
  9073. "type": "string"
  9074. },
  9075. "additionalProperties": {}
  9076. },
  9077. "models": {
  9078. "type": "object",
  9079. "propertyNames": {
  9080. "type": "string"
  9081. },
  9082. "additionalProperties": {
  9083. "$ref": "#/components/schemas/Model"
  9084. }
  9085. }
  9086. },
  9087. "required": ["id", "name", "source", "env", "options", "models"]
  9088. },
  9089. "ProviderAuthMethod": {
  9090. "type": "object",
  9091. "properties": {
  9092. "type": {
  9093. "anyOf": [
  9094. {
  9095. "type": "string",
  9096. "const": "oauth"
  9097. },
  9098. {
  9099. "type": "string",
  9100. "const": "api"
  9101. }
  9102. ]
  9103. },
  9104. "label": {
  9105. "type": "string"
  9106. }
  9107. },
  9108. "required": ["type", "label"]
  9109. },
  9110. "ProviderAuthAuthorization": {
  9111. "type": "object",
  9112. "properties": {
  9113. "url": {
  9114. "type": "string"
  9115. },
  9116. "method": {
  9117. "anyOf": [
  9118. {
  9119. "type": "string",
  9120. "const": "auto"
  9121. },
  9122. {
  9123. "type": "string",
  9124. "const": "code"
  9125. }
  9126. ]
  9127. },
  9128. "instructions": {
  9129. "type": "string"
  9130. }
  9131. },
  9132. "required": ["url", "method", "instructions"]
  9133. },
  9134. "Symbol": {
  9135. "type": "object",
  9136. "properties": {
  9137. "name": {
  9138. "type": "string"
  9139. },
  9140. "kind": {
  9141. "type": "number"
  9142. },
  9143. "location": {
  9144. "type": "object",
  9145. "properties": {
  9146. "uri": {
  9147. "type": "string"
  9148. },
  9149. "range": {
  9150. "$ref": "#/components/schemas/Range"
  9151. }
  9152. },
  9153. "required": ["uri", "range"]
  9154. }
  9155. },
  9156. "required": ["name", "kind", "location"]
  9157. },
  9158. "FileNode": {
  9159. "type": "object",
  9160. "properties": {
  9161. "name": {
  9162. "type": "string"
  9163. },
  9164. "path": {
  9165. "type": "string"
  9166. },
  9167. "absolute": {
  9168. "type": "string"
  9169. },
  9170. "type": {
  9171. "type": "string",
  9172. "enum": ["file", "directory"]
  9173. },
  9174. "ignored": {
  9175. "type": "boolean"
  9176. }
  9177. },
  9178. "required": ["name", "path", "absolute", "type", "ignored"]
  9179. },
  9180. "FileContent": {
  9181. "type": "object",
  9182. "properties": {
  9183. "type": {
  9184. "type": "string",
  9185. "const": "text"
  9186. },
  9187. "content": {
  9188. "type": "string"
  9189. },
  9190. "diff": {
  9191. "type": "string"
  9192. },
  9193. "patch": {
  9194. "type": "object",
  9195. "properties": {
  9196. "oldFileName": {
  9197. "type": "string"
  9198. },
  9199. "newFileName": {
  9200. "type": "string"
  9201. },
  9202. "oldHeader": {
  9203. "type": "string"
  9204. },
  9205. "newHeader": {
  9206. "type": "string"
  9207. },
  9208. "hunks": {
  9209. "type": "array",
  9210. "items": {
  9211. "type": "object",
  9212. "properties": {
  9213. "oldStart": {
  9214. "type": "number"
  9215. },
  9216. "oldLines": {
  9217. "type": "number"
  9218. },
  9219. "newStart": {
  9220. "type": "number"
  9221. },
  9222. "newLines": {
  9223. "type": "number"
  9224. },
  9225. "lines": {
  9226. "type": "array",
  9227. "items": {
  9228. "type": "string"
  9229. }
  9230. }
  9231. },
  9232. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"]
  9233. }
  9234. },
  9235. "index": {
  9236. "type": "string"
  9237. }
  9238. },
  9239. "required": ["oldFileName", "newFileName", "hunks"]
  9240. },
  9241. "encoding": {
  9242. "type": "string",
  9243. "const": "base64"
  9244. },
  9245. "mimeType": {
  9246. "type": "string"
  9247. }
  9248. },
  9249. "required": ["type", "content"]
  9250. },
  9251. "File": {
  9252. "type": "object",
  9253. "properties": {
  9254. "path": {
  9255. "type": "string"
  9256. },
  9257. "added": {
  9258. "type": "integer",
  9259. "minimum": -9007199254740991,
  9260. "maximum": 9007199254740991
  9261. },
  9262. "removed": {
  9263. "type": "integer",
  9264. "minimum": -9007199254740991,
  9265. "maximum": 9007199254740991
  9266. },
  9267. "status": {
  9268. "type": "string",
  9269. "enum": ["added", "deleted", "modified"]
  9270. }
  9271. },
  9272. "required": ["path", "added", "removed", "status"]
  9273. },
  9274. "Agent": {
  9275. "type": "object",
  9276. "properties": {
  9277. "name": {
  9278. "type": "string"
  9279. },
  9280. "description": {
  9281. "type": "string"
  9282. },
  9283. "mode": {
  9284. "type": "string",
  9285. "enum": ["subagent", "primary", "all"]
  9286. },
  9287. "native": {
  9288. "type": "boolean"
  9289. },
  9290. "hidden": {
  9291. "type": "boolean"
  9292. },
  9293. "default": {
  9294. "type": "boolean"
  9295. },
  9296. "topP": {
  9297. "type": "number"
  9298. },
  9299. "temperature": {
  9300. "type": "number"
  9301. },
  9302. "color": {
  9303. "type": "string"
  9304. },
  9305. "permission": {
  9306. "type": "object",
  9307. "properties": {
  9308. "edit": {
  9309. "type": "string",
  9310. "enum": ["ask", "allow", "deny"]
  9311. },
  9312. "bash": {
  9313. "type": "object",
  9314. "propertyNames": {
  9315. "type": "string"
  9316. },
  9317. "additionalProperties": {
  9318. "type": "string",
  9319. "enum": ["ask", "allow", "deny"]
  9320. }
  9321. },
  9322. "skill": {
  9323. "type": "object",
  9324. "propertyNames": {
  9325. "type": "string"
  9326. },
  9327. "additionalProperties": {
  9328. "type": "string",
  9329. "enum": ["ask", "allow", "deny"]
  9330. }
  9331. },
  9332. "webfetch": {
  9333. "type": "string",
  9334. "enum": ["ask", "allow", "deny"]
  9335. },
  9336. "doom_loop": {
  9337. "type": "string",
  9338. "enum": ["ask", "allow", "deny"]
  9339. },
  9340. "external_directory": {
  9341. "type": "string",
  9342. "enum": ["ask", "allow", "deny"]
  9343. }
  9344. },
  9345. "required": ["edit", "bash", "skill"]
  9346. },
  9347. "model": {
  9348. "type": "object",
  9349. "properties": {
  9350. "modelID": {
  9351. "type": "string"
  9352. },
  9353. "providerID": {
  9354. "type": "string"
  9355. }
  9356. },
  9357. "required": ["modelID", "providerID"]
  9358. },
  9359. "prompt": {
  9360. "type": "string"
  9361. },
  9362. "tools": {
  9363. "type": "object",
  9364. "propertyNames": {
  9365. "type": "string"
  9366. },
  9367. "additionalProperties": {
  9368. "type": "boolean"
  9369. }
  9370. },
  9371. "options": {
  9372. "type": "object",
  9373. "propertyNames": {
  9374. "type": "string"
  9375. },
  9376. "additionalProperties": {}
  9377. },
  9378. "maxSteps": {
  9379. "type": "integer",
  9380. "exclusiveMinimum": 0,
  9381. "maximum": 9007199254740991
  9382. }
  9383. },
  9384. "required": ["name", "mode", "permission", "tools", "options"]
  9385. },
  9386. "MCPStatusConnected": {
  9387. "type": "object",
  9388. "properties": {
  9389. "status": {
  9390. "type": "string",
  9391. "const": "connected"
  9392. }
  9393. },
  9394. "required": ["status"]
  9395. },
  9396. "MCPStatusDisabled": {
  9397. "type": "object",
  9398. "properties": {
  9399. "status": {
  9400. "type": "string",
  9401. "const": "disabled"
  9402. }
  9403. },
  9404. "required": ["status"]
  9405. },
  9406. "MCPStatusFailed": {
  9407. "type": "object",
  9408. "properties": {
  9409. "status": {
  9410. "type": "string",
  9411. "const": "failed"
  9412. },
  9413. "error": {
  9414. "type": "string"
  9415. }
  9416. },
  9417. "required": ["status", "error"]
  9418. },
  9419. "MCPStatusNeedsAuth": {
  9420. "type": "object",
  9421. "properties": {
  9422. "status": {
  9423. "type": "string",
  9424. "const": "needs_auth"
  9425. }
  9426. },
  9427. "required": ["status"]
  9428. },
  9429. "MCPStatusNeedsClientRegistration": {
  9430. "type": "object",
  9431. "properties": {
  9432. "status": {
  9433. "type": "string",
  9434. "const": "needs_client_registration"
  9435. },
  9436. "error": {
  9437. "type": "string"
  9438. }
  9439. },
  9440. "required": ["status", "error"]
  9441. },
  9442. "MCPStatus": {
  9443. "anyOf": [
  9444. {
  9445. "$ref": "#/components/schemas/MCPStatusConnected"
  9446. },
  9447. {
  9448. "$ref": "#/components/schemas/MCPStatusDisabled"
  9449. },
  9450. {
  9451. "$ref": "#/components/schemas/MCPStatusFailed"
  9452. },
  9453. {
  9454. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  9455. },
  9456. {
  9457. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  9458. }
  9459. ]
  9460. },
  9461. "LSPStatus": {
  9462. "type": "object",
  9463. "properties": {
  9464. "id": {
  9465. "type": "string"
  9466. },
  9467. "name": {
  9468. "type": "string"
  9469. },
  9470. "root": {
  9471. "type": "string"
  9472. },
  9473. "status": {
  9474. "anyOf": [
  9475. {
  9476. "type": "string",
  9477. "const": "connected"
  9478. },
  9479. {
  9480. "type": "string",
  9481. "const": "error"
  9482. }
  9483. ]
  9484. }
  9485. },
  9486. "required": ["id", "name", "root", "status"]
  9487. },
  9488. "FormatterStatus": {
  9489. "type": "object",
  9490. "properties": {
  9491. "name": {
  9492. "type": "string"
  9493. },
  9494. "extensions": {
  9495. "type": "array",
  9496. "items": {
  9497. "type": "string"
  9498. }
  9499. },
  9500. "enabled": {
  9501. "type": "boolean"
  9502. }
  9503. },
  9504. "required": ["name", "extensions", "enabled"]
  9505. },
  9506. "OAuth": {
  9507. "type": "object",
  9508. "properties": {
  9509. "type": {
  9510. "type": "string",
  9511. "const": "oauth"
  9512. },
  9513. "refresh": {
  9514. "type": "string"
  9515. },
  9516. "access": {
  9517. "type": "string"
  9518. },
  9519. "expires": {
  9520. "type": "number"
  9521. },
  9522. "enterpriseUrl": {
  9523. "type": "string"
  9524. }
  9525. },
  9526. "required": ["type", "refresh", "access", "expires"]
  9527. },
  9528. "ApiAuth": {
  9529. "type": "object",
  9530. "properties": {
  9531. "type": {
  9532. "type": "string",
  9533. "const": "api"
  9534. },
  9535. "key": {
  9536. "type": "string"
  9537. }
  9538. },
  9539. "required": ["type", "key"]
  9540. },
  9541. "WellKnownAuth": {
  9542. "type": "object",
  9543. "properties": {
  9544. "type": {
  9545. "type": "string",
  9546. "const": "wellknown"
  9547. },
  9548. "key": {
  9549. "type": "string"
  9550. },
  9551. "token": {
  9552. "type": "string"
  9553. }
  9554. },
  9555. "required": ["type", "key", "token"]
  9556. },
  9557. "Auth": {
  9558. "anyOf": [
  9559. {
  9560. "$ref": "#/components/schemas/OAuth"
  9561. },
  9562. {
  9563. "$ref": "#/components/schemas/ApiAuth"
  9564. },
  9565. {
  9566. "$ref": "#/components/schemas/WellKnownAuth"
  9567. }
  9568. ]
  9569. }
  9570. }
  9571. }
  9572. }