openapi.json 301 KB

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