openapi.json 316 KB

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