openapi.json 302 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933
  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. "content": {
  5728. "type": "string"
  5729. }
  5730. },
  5731. "required": ["name", "description", "location", "content"]
  5732. }
  5733. }
  5734. }
  5735. }
  5736. }
  5737. },
  5738. "x-codeSamples": [
  5739. {
  5740. "lang": "js",
  5741. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.skills({\n ...\n})"
  5742. }
  5743. ]
  5744. }
  5745. },
  5746. "/lsp": {
  5747. "get": {
  5748. "operationId": "lsp.status",
  5749. "parameters": [
  5750. {
  5751. "in": "query",
  5752. "name": "directory",
  5753. "schema": {
  5754. "type": "string"
  5755. }
  5756. }
  5757. ],
  5758. "summary": "Get LSP status",
  5759. "description": "Get LSP server status",
  5760. "responses": {
  5761. "200": {
  5762. "description": "LSP server status",
  5763. "content": {
  5764. "application/json": {
  5765. "schema": {
  5766. "type": "array",
  5767. "items": {
  5768. "$ref": "#/components/schemas/LSPStatus"
  5769. }
  5770. }
  5771. }
  5772. }
  5773. }
  5774. },
  5775. "x-codeSamples": [
  5776. {
  5777. "lang": "js",
  5778. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
  5779. }
  5780. ]
  5781. }
  5782. },
  5783. "/formatter": {
  5784. "get": {
  5785. "operationId": "formatter.status",
  5786. "parameters": [
  5787. {
  5788. "in": "query",
  5789. "name": "directory",
  5790. "schema": {
  5791. "type": "string"
  5792. }
  5793. }
  5794. ],
  5795. "summary": "Get formatter status",
  5796. "description": "Get formatter status",
  5797. "responses": {
  5798. "200": {
  5799. "description": "Formatter status",
  5800. "content": {
  5801. "application/json": {
  5802. "schema": {
  5803. "type": "array",
  5804. "items": {
  5805. "$ref": "#/components/schemas/FormatterStatus"
  5806. }
  5807. }
  5808. }
  5809. }
  5810. }
  5811. },
  5812. "x-codeSamples": [
  5813. {
  5814. "lang": "js",
  5815. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
  5816. }
  5817. ]
  5818. }
  5819. },
  5820. "/event": {
  5821. "get": {
  5822. "operationId": "event.subscribe",
  5823. "parameters": [
  5824. {
  5825. "in": "query",
  5826. "name": "directory",
  5827. "schema": {
  5828. "type": "string"
  5829. }
  5830. }
  5831. ],
  5832. "summary": "Subscribe to events",
  5833. "description": "Get events",
  5834. "responses": {
  5835. "200": {
  5836. "description": "Event stream",
  5837. "content": {
  5838. "text/event-stream": {
  5839. "schema": {
  5840. "$ref": "#/components/schemas/Event"
  5841. }
  5842. }
  5843. }
  5844. }
  5845. },
  5846. "x-codeSamples": [
  5847. {
  5848. "lang": "js",
  5849. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.event.subscribe({\n ...\n})"
  5850. }
  5851. ]
  5852. }
  5853. }
  5854. },
  5855. "components": {
  5856. "schemas": {
  5857. "Event.installation.updated": {
  5858. "type": "object",
  5859. "properties": {
  5860. "type": {
  5861. "type": "string",
  5862. "const": "installation.updated"
  5863. },
  5864. "properties": {
  5865. "type": "object",
  5866. "properties": {
  5867. "version": {
  5868. "type": "string"
  5869. }
  5870. },
  5871. "required": ["version"]
  5872. }
  5873. },
  5874. "required": ["type", "properties"]
  5875. },
  5876. "Event.installation.update-available": {
  5877. "type": "object",
  5878. "properties": {
  5879. "type": {
  5880. "type": "string",
  5881. "const": "installation.update-available"
  5882. },
  5883. "properties": {
  5884. "type": "object",
  5885. "properties": {
  5886. "version": {
  5887. "type": "string"
  5888. }
  5889. },
  5890. "required": ["version"]
  5891. }
  5892. },
  5893. "required": ["type", "properties"]
  5894. },
  5895. "Project": {
  5896. "type": "object",
  5897. "properties": {
  5898. "id": {
  5899. "type": "string"
  5900. },
  5901. "worktree": {
  5902. "type": "string"
  5903. },
  5904. "vcs": {
  5905. "type": "string",
  5906. "const": "git"
  5907. },
  5908. "name": {
  5909. "type": "string"
  5910. },
  5911. "icon": {
  5912. "type": "object",
  5913. "properties": {
  5914. "url": {
  5915. "type": "string"
  5916. },
  5917. "override": {
  5918. "type": "string"
  5919. },
  5920. "color": {
  5921. "type": "string"
  5922. }
  5923. }
  5924. },
  5925. "commands": {
  5926. "type": "object",
  5927. "properties": {
  5928. "start": {
  5929. "description": "Startup script to run when creating a new workspace (worktree)",
  5930. "type": "string"
  5931. }
  5932. }
  5933. },
  5934. "time": {
  5935. "type": "object",
  5936. "properties": {
  5937. "created": {
  5938. "type": "number"
  5939. },
  5940. "updated": {
  5941. "type": "number"
  5942. },
  5943. "initialized": {
  5944. "type": "number"
  5945. }
  5946. },
  5947. "required": ["created", "updated"]
  5948. },
  5949. "sandboxes": {
  5950. "type": "array",
  5951. "items": {
  5952. "type": "string"
  5953. }
  5954. }
  5955. },
  5956. "required": ["id", "worktree", "time", "sandboxes"]
  5957. },
  5958. "Event.project.updated": {
  5959. "type": "object",
  5960. "properties": {
  5961. "type": {
  5962. "type": "string",
  5963. "const": "project.updated"
  5964. },
  5965. "properties": {
  5966. "$ref": "#/components/schemas/Project"
  5967. }
  5968. },
  5969. "required": ["type", "properties"]
  5970. },
  5971. "Event.server.instance.disposed": {
  5972. "type": "object",
  5973. "properties": {
  5974. "type": {
  5975. "type": "string",
  5976. "const": "server.instance.disposed"
  5977. },
  5978. "properties": {
  5979. "type": "object",
  5980. "properties": {
  5981. "directory": {
  5982. "type": "string"
  5983. }
  5984. },
  5985. "required": ["directory"]
  5986. }
  5987. },
  5988. "required": ["type", "properties"]
  5989. },
  5990. "Event.server.connected": {
  5991. "type": "object",
  5992. "properties": {
  5993. "type": {
  5994. "type": "string",
  5995. "const": "server.connected"
  5996. },
  5997. "properties": {
  5998. "type": "object",
  5999. "properties": {}
  6000. }
  6001. },
  6002. "required": ["type", "properties"]
  6003. },
  6004. "Event.global.disposed": {
  6005. "type": "object",
  6006. "properties": {
  6007. "type": {
  6008. "type": "string",
  6009. "const": "global.disposed"
  6010. },
  6011. "properties": {
  6012. "type": "object",
  6013. "properties": {}
  6014. }
  6015. },
  6016. "required": ["type", "properties"]
  6017. },
  6018. "Event.lsp.client.diagnostics": {
  6019. "type": "object",
  6020. "properties": {
  6021. "type": {
  6022. "type": "string",
  6023. "const": "lsp.client.diagnostics"
  6024. },
  6025. "properties": {
  6026. "type": "object",
  6027. "properties": {
  6028. "serverID": {
  6029. "type": "string"
  6030. },
  6031. "path": {
  6032. "type": "string"
  6033. }
  6034. },
  6035. "required": ["serverID", "path"]
  6036. }
  6037. },
  6038. "required": ["type", "properties"]
  6039. },
  6040. "Event.lsp.updated": {
  6041. "type": "object",
  6042. "properties": {
  6043. "type": {
  6044. "type": "string",
  6045. "const": "lsp.updated"
  6046. },
  6047. "properties": {
  6048. "type": "object",
  6049. "properties": {}
  6050. }
  6051. },
  6052. "required": ["type", "properties"]
  6053. },
  6054. "Event.file.edited": {
  6055. "type": "object",
  6056. "properties": {
  6057. "type": {
  6058. "type": "string",
  6059. "const": "file.edited"
  6060. },
  6061. "properties": {
  6062. "type": "object",
  6063. "properties": {
  6064. "file": {
  6065. "type": "string"
  6066. }
  6067. },
  6068. "required": ["file"]
  6069. }
  6070. },
  6071. "required": ["type", "properties"]
  6072. },
  6073. "FileDiff": {
  6074. "type": "object",
  6075. "properties": {
  6076. "file": {
  6077. "type": "string"
  6078. },
  6079. "before": {
  6080. "type": "string"
  6081. },
  6082. "after": {
  6083. "type": "string"
  6084. },
  6085. "additions": {
  6086. "type": "number"
  6087. },
  6088. "deletions": {
  6089. "type": "number"
  6090. },
  6091. "status": {
  6092. "type": "string",
  6093. "enum": ["added", "deleted", "modified"]
  6094. }
  6095. },
  6096. "required": ["file", "before", "after", "additions", "deletions"]
  6097. },
  6098. "UserMessage": {
  6099. "type": "object",
  6100. "properties": {
  6101. "id": {
  6102. "type": "string"
  6103. },
  6104. "sessionID": {
  6105. "type": "string"
  6106. },
  6107. "role": {
  6108. "type": "string",
  6109. "const": "user"
  6110. },
  6111. "time": {
  6112. "type": "object",
  6113. "properties": {
  6114. "created": {
  6115. "type": "number"
  6116. }
  6117. },
  6118. "required": ["created"]
  6119. },
  6120. "summary": {
  6121. "type": "object",
  6122. "properties": {
  6123. "title": {
  6124. "type": "string"
  6125. },
  6126. "body": {
  6127. "type": "string"
  6128. },
  6129. "diffs": {
  6130. "type": "array",
  6131. "items": {
  6132. "$ref": "#/components/schemas/FileDiff"
  6133. }
  6134. }
  6135. },
  6136. "required": ["diffs"]
  6137. },
  6138. "agent": {
  6139. "type": "string"
  6140. },
  6141. "model": {
  6142. "type": "object",
  6143. "properties": {
  6144. "providerID": {
  6145. "type": "string"
  6146. },
  6147. "modelID": {
  6148. "type": "string"
  6149. }
  6150. },
  6151. "required": ["providerID", "modelID"]
  6152. },
  6153. "system": {
  6154. "type": "string"
  6155. },
  6156. "tools": {
  6157. "type": "object",
  6158. "propertyNames": {
  6159. "type": "string"
  6160. },
  6161. "additionalProperties": {
  6162. "type": "boolean"
  6163. }
  6164. },
  6165. "variant": {
  6166. "type": "string"
  6167. }
  6168. },
  6169. "required": ["id", "sessionID", "role", "time", "agent", "model"]
  6170. },
  6171. "ProviderAuthError": {
  6172. "type": "object",
  6173. "properties": {
  6174. "name": {
  6175. "type": "string",
  6176. "const": "ProviderAuthError"
  6177. },
  6178. "data": {
  6179. "type": "object",
  6180. "properties": {
  6181. "providerID": {
  6182. "type": "string"
  6183. },
  6184. "message": {
  6185. "type": "string"
  6186. }
  6187. },
  6188. "required": ["providerID", "message"]
  6189. }
  6190. },
  6191. "required": ["name", "data"]
  6192. },
  6193. "UnknownError": {
  6194. "type": "object",
  6195. "properties": {
  6196. "name": {
  6197. "type": "string",
  6198. "const": "UnknownError"
  6199. },
  6200. "data": {
  6201. "type": "object",
  6202. "properties": {
  6203. "message": {
  6204. "type": "string"
  6205. }
  6206. },
  6207. "required": ["message"]
  6208. }
  6209. },
  6210. "required": ["name", "data"]
  6211. },
  6212. "MessageOutputLengthError": {
  6213. "type": "object",
  6214. "properties": {
  6215. "name": {
  6216. "type": "string",
  6217. "const": "MessageOutputLengthError"
  6218. },
  6219. "data": {
  6220. "type": "object",
  6221. "properties": {}
  6222. }
  6223. },
  6224. "required": ["name", "data"]
  6225. },
  6226. "MessageAbortedError": {
  6227. "type": "object",
  6228. "properties": {
  6229. "name": {
  6230. "type": "string",
  6231. "const": "MessageAbortedError"
  6232. },
  6233. "data": {
  6234. "type": "object",
  6235. "properties": {
  6236. "message": {
  6237. "type": "string"
  6238. }
  6239. },
  6240. "required": ["message"]
  6241. }
  6242. },
  6243. "required": ["name", "data"]
  6244. },
  6245. "APIError": {
  6246. "type": "object",
  6247. "properties": {
  6248. "name": {
  6249. "type": "string",
  6250. "const": "APIError"
  6251. },
  6252. "data": {
  6253. "type": "object",
  6254. "properties": {
  6255. "message": {
  6256. "type": "string"
  6257. },
  6258. "statusCode": {
  6259. "type": "number"
  6260. },
  6261. "isRetryable": {
  6262. "type": "boolean"
  6263. },
  6264. "responseHeaders": {
  6265. "type": "object",
  6266. "propertyNames": {
  6267. "type": "string"
  6268. },
  6269. "additionalProperties": {
  6270. "type": "string"
  6271. }
  6272. },
  6273. "responseBody": {
  6274. "type": "string"
  6275. },
  6276. "metadata": {
  6277. "type": "object",
  6278. "propertyNames": {
  6279. "type": "string"
  6280. },
  6281. "additionalProperties": {
  6282. "type": "string"
  6283. }
  6284. }
  6285. },
  6286. "required": ["message", "isRetryable"]
  6287. }
  6288. },
  6289. "required": ["name", "data"]
  6290. },
  6291. "AssistantMessage": {
  6292. "type": "object",
  6293. "properties": {
  6294. "id": {
  6295. "type": "string"
  6296. },
  6297. "sessionID": {
  6298. "type": "string"
  6299. },
  6300. "role": {
  6301. "type": "string",
  6302. "const": "assistant"
  6303. },
  6304. "time": {
  6305. "type": "object",
  6306. "properties": {
  6307. "created": {
  6308. "type": "number"
  6309. },
  6310. "completed": {
  6311. "type": "number"
  6312. }
  6313. },
  6314. "required": ["created"]
  6315. },
  6316. "error": {
  6317. "anyOf": [
  6318. {
  6319. "$ref": "#/components/schemas/ProviderAuthError"
  6320. },
  6321. {
  6322. "$ref": "#/components/schemas/UnknownError"
  6323. },
  6324. {
  6325. "$ref": "#/components/schemas/MessageOutputLengthError"
  6326. },
  6327. {
  6328. "$ref": "#/components/schemas/MessageAbortedError"
  6329. },
  6330. {
  6331. "$ref": "#/components/schemas/APIError"
  6332. }
  6333. ]
  6334. },
  6335. "parentID": {
  6336. "type": "string"
  6337. },
  6338. "modelID": {
  6339. "type": "string"
  6340. },
  6341. "providerID": {
  6342. "type": "string"
  6343. },
  6344. "mode": {
  6345. "type": "string"
  6346. },
  6347. "agent": {
  6348. "type": "string"
  6349. },
  6350. "path": {
  6351. "type": "object",
  6352. "properties": {
  6353. "cwd": {
  6354. "type": "string"
  6355. },
  6356. "root": {
  6357. "type": "string"
  6358. }
  6359. },
  6360. "required": ["cwd", "root"]
  6361. },
  6362. "summary": {
  6363. "type": "boolean"
  6364. },
  6365. "cost": {
  6366. "type": "number"
  6367. },
  6368. "tokens": {
  6369. "type": "object",
  6370. "properties": {
  6371. "input": {
  6372. "type": "number"
  6373. },
  6374. "output": {
  6375. "type": "number"
  6376. },
  6377. "reasoning": {
  6378. "type": "number"
  6379. },
  6380. "cache": {
  6381. "type": "object",
  6382. "properties": {
  6383. "read": {
  6384. "type": "number"
  6385. },
  6386. "write": {
  6387. "type": "number"
  6388. }
  6389. },
  6390. "required": ["read", "write"]
  6391. }
  6392. },
  6393. "required": ["input", "output", "reasoning", "cache"]
  6394. },
  6395. "finish": {
  6396. "type": "string"
  6397. }
  6398. },
  6399. "required": [
  6400. "id",
  6401. "sessionID",
  6402. "role",
  6403. "time",
  6404. "parentID",
  6405. "modelID",
  6406. "providerID",
  6407. "mode",
  6408. "agent",
  6409. "path",
  6410. "cost",
  6411. "tokens"
  6412. ]
  6413. },
  6414. "Message": {
  6415. "anyOf": [
  6416. {
  6417. "$ref": "#/components/schemas/UserMessage"
  6418. },
  6419. {
  6420. "$ref": "#/components/schemas/AssistantMessage"
  6421. }
  6422. ]
  6423. },
  6424. "Event.message.updated": {
  6425. "type": "object",
  6426. "properties": {
  6427. "type": {
  6428. "type": "string",
  6429. "const": "message.updated"
  6430. },
  6431. "properties": {
  6432. "type": "object",
  6433. "properties": {
  6434. "info": {
  6435. "$ref": "#/components/schemas/Message"
  6436. }
  6437. },
  6438. "required": ["info"]
  6439. }
  6440. },
  6441. "required": ["type", "properties"]
  6442. },
  6443. "Event.message.removed": {
  6444. "type": "object",
  6445. "properties": {
  6446. "type": {
  6447. "type": "string",
  6448. "const": "message.removed"
  6449. },
  6450. "properties": {
  6451. "type": "object",
  6452. "properties": {
  6453. "sessionID": {
  6454. "type": "string"
  6455. },
  6456. "messageID": {
  6457. "type": "string"
  6458. }
  6459. },
  6460. "required": ["sessionID", "messageID"]
  6461. }
  6462. },
  6463. "required": ["type", "properties"]
  6464. },
  6465. "TextPart": {
  6466. "type": "object",
  6467. "properties": {
  6468. "id": {
  6469. "type": "string"
  6470. },
  6471. "sessionID": {
  6472. "type": "string"
  6473. },
  6474. "messageID": {
  6475. "type": "string"
  6476. },
  6477. "type": {
  6478. "type": "string",
  6479. "const": "text"
  6480. },
  6481. "text": {
  6482. "type": "string"
  6483. },
  6484. "synthetic": {
  6485. "type": "boolean"
  6486. },
  6487. "ignored": {
  6488. "type": "boolean"
  6489. },
  6490. "time": {
  6491. "type": "object",
  6492. "properties": {
  6493. "start": {
  6494. "type": "number"
  6495. },
  6496. "end": {
  6497. "type": "number"
  6498. }
  6499. },
  6500. "required": ["start"]
  6501. },
  6502. "metadata": {
  6503. "type": "object",
  6504. "propertyNames": {
  6505. "type": "string"
  6506. },
  6507. "additionalProperties": {}
  6508. }
  6509. },
  6510. "required": ["id", "sessionID", "messageID", "type", "text"]
  6511. },
  6512. "SubtaskPart": {
  6513. "type": "object",
  6514. "properties": {
  6515. "id": {
  6516. "type": "string"
  6517. },
  6518. "sessionID": {
  6519. "type": "string"
  6520. },
  6521. "messageID": {
  6522. "type": "string"
  6523. },
  6524. "type": {
  6525. "type": "string",
  6526. "const": "subtask"
  6527. },
  6528. "prompt": {
  6529. "type": "string"
  6530. },
  6531. "description": {
  6532. "type": "string"
  6533. },
  6534. "agent": {
  6535. "type": "string"
  6536. },
  6537. "model": {
  6538. "type": "object",
  6539. "properties": {
  6540. "providerID": {
  6541. "type": "string"
  6542. },
  6543. "modelID": {
  6544. "type": "string"
  6545. }
  6546. },
  6547. "required": ["providerID", "modelID"]
  6548. },
  6549. "command": {
  6550. "type": "string"
  6551. }
  6552. },
  6553. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"]
  6554. },
  6555. "ReasoningPart": {
  6556. "type": "object",
  6557. "properties": {
  6558. "id": {
  6559. "type": "string"
  6560. },
  6561. "sessionID": {
  6562. "type": "string"
  6563. },
  6564. "messageID": {
  6565. "type": "string"
  6566. },
  6567. "type": {
  6568. "type": "string",
  6569. "const": "reasoning"
  6570. },
  6571. "text": {
  6572. "type": "string"
  6573. },
  6574. "metadata": {
  6575. "type": "object",
  6576. "propertyNames": {
  6577. "type": "string"
  6578. },
  6579. "additionalProperties": {}
  6580. },
  6581. "time": {
  6582. "type": "object",
  6583. "properties": {
  6584. "start": {
  6585. "type": "number"
  6586. },
  6587. "end": {
  6588. "type": "number"
  6589. }
  6590. },
  6591. "required": ["start"]
  6592. }
  6593. },
  6594. "required": ["id", "sessionID", "messageID", "type", "text", "time"]
  6595. },
  6596. "FilePartSourceText": {
  6597. "type": "object",
  6598. "properties": {
  6599. "value": {
  6600. "type": "string"
  6601. },
  6602. "start": {
  6603. "type": "integer",
  6604. "minimum": -9007199254740991,
  6605. "maximum": 9007199254740991
  6606. },
  6607. "end": {
  6608. "type": "integer",
  6609. "minimum": -9007199254740991,
  6610. "maximum": 9007199254740991
  6611. }
  6612. },
  6613. "required": ["value", "start", "end"]
  6614. },
  6615. "FileSource": {
  6616. "type": "object",
  6617. "properties": {
  6618. "text": {
  6619. "$ref": "#/components/schemas/FilePartSourceText"
  6620. },
  6621. "type": {
  6622. "type": "string",
  6623. "const": "file"
  6624. },
  6625. "path": {
  6626. "type": "string"
  6627. }
  6628. },
  6629. "required": ["text", "type", "path"]
  6630. },
  6631. "Range": {
  6632. "type": "object",
  6633. "properties": {
  6634. "start": {
  6635. "type": "object",
  6636. "properties": {
  6637. "line": {
  6638. "type": "number"
  6639. },
  6640. "character": {
  6641. "type": "number"
  6642. }
  6643. },
  6644. "required": ["line", "character"]
  6645. },
  6646. "end": {
  6647. "type": "object",
  6648. "properties": {
  6649. "line": {
  6650. "type": "number"
  6651. },
  6652. "character": {
  6653. "type": "number"
  6654. }
  6655. },
  6656. "required": ["line", "character"]
  6657. }
  6658. },
  6659. "required": ["start", "end"]
  6660. },
  6661. "SymbolSource": {
  6662. "type": "object",
  6663. "properties": {
  6664. "text": {
  6665. "$ref": "#/components/schemas/FilePartSourceText"
  6666. },
  6667. "type": {
  6668. "type": "string",
  6669. "const": "symbol"
  6670. },
  6671. "path": {
  6672. "type": "string"
  6673. },
  6674. "range": {
  6675. "$ref": "#/components/schemas/Range"
  6676. },
  6677. "name": {
  6678. "type": "string"
  6679. },
  6680. "kind": {
  6681. "type": "integer",
  6682. "minimum": -9007199254740991,
  6683. "maximum": 9007199254740991
  6684. }
  6685. },
  6686. "required": ["text", "type", "path", "range", "name", "kind"]
  6687. },
  6688. "ResourceSource": {
  6689. "type": "object",
  6690. "properties": {
  6691. "text": {
  6692. "$ref": "#/components/schemas/FilePartSourceText"
  6693. },
  6694. "type": {
  6695. "type": "string",
  6696. "const": "resource"
  6697. },
  6698. "clientName": {
  6699. "type": "string"
  6700. },
  6701. "uri": {
  6702. "type": "string"
  6703. }
  6704. },
  6705. "required": ["text", "type", "clientName", "uri"]
  6706. },
  6707. "FilePartSource": {
  6708. "anyOf": [
  6709. {
  6710. "$ref": "#/components/schemas/FileSource"
  6711. },
  6712. {
  6713. "$ref": "#/components/schemas/SymbolSource"
  6714. },
  6715. {
  6716. "$ref": "#/components/schemas/ResourceSource"
  6717. }
  6718. ]
  6719. },
  6720. "FilePart": {
  6721. "type": "object",
  6722. "properties": {
  6723. "id": {
  6724. "type": "string"
  6725. },
  6726. "sessionID": {
  6727. "type": "string"
  6728. },
  6729. "messageID": {
  6730. "type": "string"
  6731. },
  6732. "type": {
  6733. "type": "string",
  6734. "const": "file"
  6735. },
  6736. "mime": {
  6737. "type": "string"
  6738. },
  6739. "filename": {
  6740. "type": "string"
  6741. },
  6742. "url": {
  6743. "type": "string"
  6744. },
  6745. "source": {
  6746. "$ref": "#/components/schemas/FilePartSource"
  6747. }
  6748. },
  6749. "required": ["id", "sessionID", "messageID", "type", "mime", "url"]
  6750. },
  6751. "ToolStatePending": {
  6752. "type": "object",
  6753. "properties": {
  6754. "status": {
  6755. "type": "string",
  6756. "const": "pending"
  6757. },
  6758. "input": {
  6759. "type": "object",
  6760. "propertyNames": {
  6761. "type": "string"
  6762. },
  6763. "additionalProperties": {}
  6764. },
  6765. "raw": {
  6766. "type": "string"
  6767. }
  6768. },
  6769. "required": ["status", "input", "raw"]
  6770. },
  6771. "ToolStateRunning": {
  6772. "type": "object",
  6773. "properties": {
  6774. "status": {
  6775. "type": "string",
  6776. "const": "running"
  6777. },
  6778. "input": {
  6779. "type": "object",
  6780. "propertyNames": {
  6781. "type": "string"
  6782. },
  6783. "additionalProperties": {}
  6784. },
  6785. "title": {
  6786. "type": "string"
  6787. },
  6788. "metadata": {
  6789. "type": "object",
  6790. "propertyNames": {
  6791. "type": "string"
  6792. },
  6793. "additionalProperties": {}
  6794. },
  6795. "time": {
  6796. "type": "object",
  6797. "properties": {
  6798. "start": {
  6799. "type": "number"
  6800. }
  6801. },
  6802. "required": ["start"]
  6803. }
  6804. },
  6805. "required": ["status", "input", "time"]
  6806. },
  6807. "ToolStateCompleted": {
  6808. "type": "object",
  6809. "properties": {
  6810. "status": {
  6811. "type": "string",
  6812. "const": "completed"
  6813. },
  6814. "input": {
  6815. "type": "object",
  6816. "propertyNames": {
  6817. "type": "string"
  6818. },
  6819. "additionalProperties": {}
  6820. },
  6821. "output": {
  6822. "type": "string"
  6823. },
  6824. "title": {
  6825. "type": "string"
  6826. },
  6827. "metadata": {
  6828. "type": "object",
  6829. "propertyNames": {
  6830. "type": "string"
  6831. },
  6832. "additionalProperties": {}
  6833. },
  6834. "time": {
  6835. "type": "object",
  6836. "properties": {
  6837. "start": {
  6838. "type": "number"
  6839. },
  6840. "end": {
  6841. "type": "number"
  6842. },
  6843. "compacted": {
  6844. "type": "number"
  6845. }
  6846. },
  6847. "required": ["start", "end"]
  6848. },
  6849. "attachments": {
  6850. "type": "array",
  6851. "items": {
  6852. "$ref": "#/components/schemas/FilePart"
  6853. }
  6854. }
  6855. },
  6856. "required": ["status", "input", "output", "title", "metadata", "time"]
  6857. },
  6858. "ToolStateError": {
  6859. "type": "object",
  6860. "properties": {
  6861. "status": {
  6862. "type": "string",
  6863. "const": "error"
  6864. },
  6865. "input": {
  6866. "type": "object",
  6867. "propertyNames": {
  6868. "type": "string"
  6869. },
  6870. "additionalProperties": {}
  6871. },
  6872. "error": {
  6873. "type": "string"
  6874. },
  6875. "metadata": {
  6876. "type": "object",
  6877. "propertyNames": {
  6878. "type": "string"
  6879. },
  6880. "additionalProperties": {}
  6881. },
  6882. "time": {
  6883. "type": "object",
  6884. "properties": {
  6885. "start": {
  6886. "type": "number"
  6887. },
  6888. "end": {
  6889. "type": "number"
  6890. }
  6891. },
  6892. "required": ["start", "end"]
  6893. }
  6894. },
  6895. "required": ["status", "input", "error", "time"]
  6896. },
  6897. "ToolState": {
  6898. "anyOf": [
  6899. {
  6900. "$ref": "#/components/schemas/ToolStatePending"
  6901. },
  6902. {
  6903. "$ref": "#/components/schemas/ToolStateRunning"
  6904. },
  6905. {
  6906. "$ref": "#/components/schemas/ToolStateCompleted"
  6907. },
  6908. {
  6909. "$ref": "#/components/schemas/ToolStateError"
  6910. }
  6911. ]
  6912. },
  6913. "ToolPart": {
  6914. "type": "object",
  6915. "properties": {
  6916. "id": {
  6917. "type": "string"
  6918. },
  6919. "sessionID": {
  6920. "type": "string"
  6921. },
  6922. "messageID": {
  6923. "type": "string"
  6924. },
  6925. "type": {
  6926. "type": "string",
  6927. "const": "tool"
  6928. },
  6929. "callID": {
  6930. "type": "string"
  6931. },
  6932. "tool": {
  6933. "type": "string"
  6934. },
  6935. "state": {
  6936. "$ref": "#/components/schemas/ToolState"
  6937. },
  6938. "metadata": {
  6939. "type": "object",
  6940. "propertyNames": {
  6941. "type": "string"
  6942. },
  6943. "additionalProperties": {}
  6944. }
  6945. },
  6946. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"]
  6947. },
  6948. "StepStartPart": {
  6949. "type": "object",
  6950. "properties": {
  6951. "id": {
  6952. "type": "string"
  6953. },
  6954. "sessionID": {
  6955. "type": "string"
  6956. },
  6957. "messageID": {
  6958. "type": "string"
  6959. },
  6960. "type": {
  6961. "type": "string",
  6962. "const": "step-start"
  6963. },
  6964. "snapshot": {
  6965. "type": "string"
  6966. }
  6967. },
  6968. "required": ["id", "sessionID", "messageID", "type"]
  6969. },
  6970. "StepFinishPart": {
  6971. "type": "object",
  6972. "properties": {
  6973. "id": {
  6974. "type": "string"
  6975. },
  6976. "sessionID": {
  6977. "type": "string"
  6978. },
  6979. "messageID": {
  6980. "type": "string"
  6981. },
  6982. "type": {
  6983. "type": "string",
  6984. "const": "step-finish"
  6985. },
  6986. "reason": {
  6987. "type": "string"
  6988. },
  6989. "snapshot": {
  6990. "type": "string"
  6991. },
  6992. "cost": {
  6993. "type": "number"
  6994. },
  6995. "tokens": {
  6996. "type": "object",
  6997. "properties": {
  6998. "input": {
  6999. "type": "number"
  7000. },
  7001. "output": {
  7002. "type": "number"
  7003. },
  7004. "reasoning": {
  7005. "type": "number"
  7006. },
  7007. "cache": {
  7008. "type": "object",
  7009. "properties": {
  7010. "read": {
  7011. "type": "number"
  7012. },
  7013. "write": {
  7014. "type": "number"
  7015. }
  7016. },
  7017. "required": ["read", "write"]
  7018. }
  7019. },
  7020. "required": ["input", "output", "reasoning", "cache"]
  7021. }
  7022. },
  7023. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"]
  7024. },
  7025. "SnapshotPart": {
  7026. "type": "object",
  7027. "properties": {
  7028. "id": {
  7029. "type": "string"
  7030. },
  7031. "sessionID": {
  7032. "type": "string"
  7033. },
  7034. "messageID": {
  7035. "type": "string"
  7036. },
  7037. "type": {
  7038. "type": "string",
  7039. "const": "snapshot"
  7040. },
  7041. "snapshot": {
  7042. "type": "string"
  7043. }
  7044. },
  7045. "required": ["id", "sessionID", "messageID", "type", "snapshot"]
  7046. },
  7047. "PatchPart": {
  7048. "type": "object",
  7049. "properties": {
  7050. "id": {
  7051. "type": "string"
  7052. },
  7053. "sessionID": {
  7054. "type": "string"
  7055. },
  7056. "messageID": {
  7057. "type": "string"
  7058. },
  7059. "type": {
  7060. "type": "string",
  7061. "const": "patch"
  7062. },
  7063. "hash": {
  7064. "type": "string"
  7065. },
  7066. "files": {
  7067. "type": "array",
  7068. "items": {
  7069. "type": "string"
  7070. }
  7071. }
  7072. },
  7073. "required": ["id", "sessionID", "messageID", "type", "hash", "files"]
  7074. },
  7075. "AgentPart": {
  7076. "type": "object",
  7077. "properties": {
  7078. "id": {
  7079. "type": "string"
  7080. },
  7081. "sessionID": {
  7082. "type": "string"
  7083. },
  7084. "messageID": {
  7085. "type": "string"
  7086. },
  7087. "type": {
  7088. "type": "string",
  7089. "const": "agent"
  7090. },
  7091. "name": {
  7092. "type": "string"
  7093. },
  7094. "source": {
  7095. "type": "object",
  7096. "properties": {
  7097. "value": {
  7098. "type": "string"
  7099. },
  7100. "start": {
  7101. "type": "integer",
  7102. "minimum": -9007199254740991,
  7103. "maximum": 9007199254740991
  7104. },
  7105. "end": {
  7106. "type": "integer",
  7107. "minimum": -9007199254740991,
  7108. "maximum": 9007199254740991
  7109. }
  7110. },
  7111. "required": ["value", "start", "end"]
  7112. }
  7113. },
  7114. "required": ["id", "sessionID", "messageID", "type", "name"]
  7115. },
  7116. "RetryPart": {
  7117. "type": "object",
  7118. "properties": {
  7119. "id": {
  7120. "type": "string"
  7121. },
  7122. "sessionID": {
  7123. "type": "string"
  7124. },
  7125. "messageID": {
  7126. "type": "string"
  7127. },
  7128. "type": {
  7129. "type": "string",
  7130. "const": "retry"
  7131. },
  7132. "attempt": {
  7133. "type": "number"
  7134. },
  7135. "error": {
  7136. "$ref": "#/components/schemas/APIError"
  7137. },
  7138. "time": {
  7139. "type": "object",
  7140. "properties": {
  7141. "created": {
  7142. "type": "number"
  7143. }
  7144. },
  7145. "required": ["created"]
  7146. }
  7147. },
  7148. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"]
  7149. },
  7150. "CompactionPart": {
  7151. "type": "object",
  7152. "properties": {
  7153. "id": {
  7154. "type": "string"
  7155. },
  7156. "sessionID": {
  7157. "type": "string"
  7158. },
  7159. "messageID": {
  7160. "type": "string"
  7161. },
  7162. "type": {
  7163. "type": "string",
  7164. "const": "compaction"
  7165. },
  7166. "auto": {
  7167. "type": "boolean"
  7168. }
  7169. },
  7170. "required": ["id", "sessionID", "messageID", "type", "auto"]
  7171. },
  7172. "Part": {
  7173. "anyOf": [
  7174. {
  7175. "$ref": "#/components/schemas/TextPart"
  7176. },
  7177. {
  7178. "$ref": "#/components/schemas/SubtaskPart"
  7179. },
  7180. {
  7181. "$ref": "#/components/schemas/ReasoningPart"
  7182. },
  7183. {
  7184. "$ref": "#/components/schemas/FilePart"
  7185. },
  7186. {
  7187. "$ref": "#/components/schemas/ToolPart"
  7188. },
  7189. {
  7190. "$ref": "#/components/schemas/StepStartPart"
  7191. },
  7192. {
  7193. "$ref": "#/components/schemas/StepFinishPart"
  7194. },
  7195. {
  7196. "$ref": "#/components/schemas/SnapshotPart"
  7197. },
  7198. {
  7199. "$ref": "#/components/schemas/PatchPart"
  7200. },
  7201. {
  7202. "$ref": "#/components/schemas/AgentPart"
  7203. },
  7204. {
  7205. "$ref": "#/components/schemas/RetryPart"
  7206. },
  7207. {
  7208. "$ref": "#/components/schemas/CompactionPart"
  7209. }
  7210. ]
  7211. },
  7212. "Event.message.part.updated": {
  7213. "type": "object",
  7214. "properties": {
  7215. "type": {
  7216. "type": "string",
  7217. "const": "message.part.updated"
  7218. },
  7219. "properties": {
  7220. "type": "object",
  7221. "properties": {
  7222. "part": {
  7223. "$ref": "#/components/schemas/Part"
  7224. },
  7225. "delta": {
  7226. "type": "string"
  7227. }
  7228. },
  7229. "required": ["part"]
  7230. }
  7231. },
  7232. "required": ["type", "properties"]
  7233. },
  7234. "Event.message.part.removed": {
  7235. "type": "object",
  7236. "properties": {
  7237. "type": {
  7238. "type": "string",
  7239. "const": "message.part.removed"
  7240. },
  7241. "properties": {
  7242. "type": "object",
  7243. "properties": {
  7244. "sessionID": {
  7245. "type": "string"
  7246. },
  7247. "messageID": {
  7248. "type": "string"
  7249. },
  7250. "partID": {
  7251. "type": "string"
  7252. }
  7253. },
  7254. "required": ["sessionID", "messageID", "partID"]
  7255. }
  7256. },
  7257. "required": ["type", "properties"]
  7258. },
  7259. "PermissionRequest": {
  7260. "type": "object",
  7261. "properties": {
  7262. "id": {
  7263. "type": "string",
  7264. "pattern": "^per.*"
  7265. },
  7266. "sessionID": {
  7267. "type": "string",
  7268. "pattern": "^ses.*"
  7269. },
  7270. "permission": {
  7271. "type": "string"
  7272. },
  7273. "patterns": {
  7274. "type": "array",
  7275. "items": {
  7276. "type": "string"
  7277. }
  7278. },
  7279. "metadata": {
  7280. "type": "object",
  7281. "propertyNames": {
  7282. "type": "string"
  7283. },
  7284. "additionalProperties": {}
  7285. },
  7286. "always": {
  7287. "type": "array",
  7288. "items": {
  7289. "type": "string"
  7290. }
  7291. },
  7292. "tool": {
  7293. "type": "object",
  7294. "properties": {
  7295. "messageID": {
  7296. "type": "string"
  7297. },
  7298. "callID": {
  7299. "type": "string"
  7300. }
  7301. },
  7302. "required": ["messageID", "callID"]
  7303. }
  7304. },
  7305. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"]
  7306. },
  7307. "Event.permission.asked": {
  7308. "type": "object",
  7309. "properties": {
  7310. "type": {
  7311. "type": "string",
  7312. "const": "permission.asked"
  7313. },
  7314. "properties": {
  7315. "$ref": "#/components/schemas/PermissionRequest"
  7316. }
  7317. },
  7318. "required": ["type", "properties"]
  7319. },
  7320. "Event.permission.replied": {
  7321. "type": "object",
  7322. "properties": {
  7323. "type": {
  7324. "type": "string",
  7325. "const": "permission.replied"
  7326. },
  7327. "properties": {
  7328. "type": "object",
  7329. "properties": {
  7330. "sessionID": {
  7331. "type": "string"
  7332. },
  7333. "requestID": {
  7334. "type": "string"
  7335. },
  7336. "reply": {
  7337. "type": "string",
  7338. "enum": ["once", "always", "reject"]
  7339. }
  7340. },
  7341. "required": ["sessionID", "requestID", "reply"]
  7342. }
  7343. },
  7344. "required": ["type", "properties"]
  7345. },
  7346. "SessionStatus": {
  7347. "anyOf": [
  7348. {
  7349. "type": "object",
  7350. "properties": {
  7351. "type": {
  7352. "type": "string",
  7353. "const": "idle"
  7354. }
  7355. },
  7356. "required": ["type"]
  7357. },
  7358. {
  7359. "type": "object",
  7360. "properties": {
  7361. "type": {
  7362. "type": "string",
  7363. "const": "retry"
  7364. },
  7365. "attempt": {
  7366. "type": "number"
  7367. },
  7368. "message": {
  7369. "type": "string"
  7370. },
  7371. "next": {
  7372. "type": "number"
  7373. }
  7374. },
  7375. "required": ["type", "attempt", "message", "next"]
  7376. },
  7377. {
  7378. "type": "object",
  7379. "properties": {
  7380. "type": {
  7381. "type": "string",
  7382. "const": "busy"
  7383. }
  7384. },
  7385. "required": ["type"]
  7386. }
  7387. ]
  7388. },
  7389. "Event.session.status": {
  7390. "type": "object",
  7391. "properties": {
  7392. "type": {
  7393. "type": "string",
  7394. "const": "session.status"
  7395. },
  7396. "properties": {
  7397. "type": "object",
  7398. "properties": {
  7399. "sessionID": {
  7400. "type": "string"
  7401. },
  7402. "status": {
  7403. "$ref": "#/components/schemas/SessionStatus"
  7404. }
  7405. },
  7406. "required": ["sessionID", "status"]
  7407. }
  7408. },
  7409. "required": ["type", "properties"]
  7410. },
  7411. "Event.session.idle": {
  7412. "type": "object",
  7413. "properties": {
  7414. "type": {
  7415. "type": "string",
  7416. "const": "session.idle"
  7417. },
  7418. "properties": {
  7419. "type": "object",
  7420. "properties": {
  7421. "sessionID": {
  7422. "type": "string"
  7423. }
  7424. },
  7425. "required": ["sessionID"]
  7426. }
  7427. },
  7428. "required": ["type", "properties"]
  7429. },
  7430. "QuestionOption": {
  7431. "type": "object",
  7432. "properties": {
  7433. "label": {
  7434. "description": "Display text (1-5 words, concise)",
  7435. "type": "string"
  7436. },
  7437. "description": {
  7438. "description": "Explanation of choice",
  7439. "type": "string"
  7440. }
  7441. },
  7442. "required": ["label", "description"]
  7443. },
  7444. "QuestionInfo": {
  7445. "type": "object",
  7446. "properties": {
  7447. "question": {
  7448. "description": "Complete question",
  7449. "type": "string"
  7450. },
  7451. "header": {
  7452. "description": "Very short label (max 30 chars)",
  7453. "type": "string"
  7454. },
  7455. "options": {
  7456. "description": "Available choices",
  7457. "type": "array",
  7458. "items": {
  7459. "$ref": "#/components/schemas/QuestionOption"
  7460. }
  7461. },
  7462. "multiple": {
  7463. "description": "Allow selecting multiple choices",
  7464. "type": "boolean"
  7465. },
  7466. "custom": {
  7467. "description": "Allow typing a custom answer (default: true)",
  7468. "type": "boolean"
  7469. }
  7470. },
  7471. "required": ["question", "header", "options"]
  7472. },
  7473. "QuestionRequest": {
  7474. "type": "object",
  7475. "properties": {
  7476. "id": {
  7477. "type": "string",
  7478. "pattern": "^que.*"
  7479. },
  7480. "sessionID": {
  7481. "type": "string",
  7482. "pattern": "^ses.*"
  7483. },
  7484. "questions": {
  7485. "description": "Questions to ask",
  7486. "type": "array",
  7487. "items": {
  7488. "$ref": "#/components/schemas/QuestionInfo"
  7489. }
  7490. },
  7491. "tool": {
  7492. "type": "object",
  7493. "properties": {
  7494. "messageID": {
  7495. "type": "string"
  7496. },
  7497. "callID": {
  7498. "type": "string"
  7499. }
  7500. },
  7501. "required": ["messageID", "callID"]
  7502. }
  7503. },
  7504. "required": ["id", "sessionID", "questions"]
  7505. },
  7506. "Event.question.asked": {
  7507. "type": "object",
  7508. "properties": {
  7509. "type": {
  7510. "type": "string",
  7511. "const": "question.asked"
  7512. },
  7513. "properties": {
  7514. "$ref": "#/components/schemas/QuestionRequest"
  7515. }
  7516. },
  7517. "required": ["type", "properties"]
  7518. },
  7519. "QuestionAnswer": {
  7520. "type": "array",
  7521. "items": {
  7522. "type": "string"
  7523. }
  7524. },
  7525. "Event.question.replied": {
  7526. "type": "object",
  7527. "properties": {
  7528. "type": {
  7529. "type": "string",
  7530. "const": "question.replied"
  7531. },
  7532. "properties": {
  7533. "type": "object",
  7534. "properties": {
  7535. "sessionID": {
  7536. "type": "string"
  7537. },
  7538. "requestID": {
  7539. "type": "string"
  7540. },
  7541. "answers": {
  7542. "type": "array",
  7543. "items": {
  7544. "$ref": "#/components/schemas/QuestionAnswer"
  7545. }
  7546. }
  7547. },
  7548. "required": ["sessionID", "requestID", "answers"]
  7549. }
  7550. },
  7551. "required": ["type", "properties"]
  7552. },
  7553. "Event.question.rejected": {
  7554. "type": "object",
  7555. "properties": {
  7556. "type": {
  7557. "type": "string",
  7558. "const": "question.rejected"
  7559. },
  7560. "properties": {
  7561. "type": "object",
  7562. "properties": {
  7563. "sessionID": {
  7564. "type": "string"
  7565. },
  7566. "requestID": {
  7567. "type": "string"
  7568. }
  7569. },
  7570. "required": ["sessionID", "requestID"]
  7571. }
  7572. },
  7573. "required": ["type", "properties"]
  7574. },
  7575. "Event.session.compacted": {
  7576. "type": "object",
  7577. "properties": {
  7578. "type": {
  7579. "type": "string",
  7580. "const": "session.compacted"
  7581. },
  7582. "properties": {
  7583. "type": "object",
  7584. "properties": {
  7585. "sessionID": {
  7586. "type": "string"
  7587. }
  7588. },
  7589. "required": ["sessionID"]
  7590. }
  7591. },
  7592. "required": ["type", "properties"]
  7593. },
  7594. "Event.file.watcher.updated": {
  7595. "type": "object",
  7596. "properties": {
  7597. "type": {
  7598. "type": "string",
  7599. "const": "file.watcher.updated"
  7600. },
  7601. "properties": {
  7602. "type": "object",
  7603. "properties": {
  7604. "file": {
  7605. "type": "string"
  7606. },
  7607. "event": {
  7608. "anyOf": [
  7609. {
  7610. "type": "string",
  7611. "const": "add"
  7612. },
  7613. {
  7614. "type": "string",
  7615. "const": "change"
  7616. },
  7617. {
  7618. "type": "string",
  7619. "const": "unlink"
  7620. }
  7621. ]
  7622. }
  7623. },
  7624. "required": ["file", "event"]
  7625. }
  7626. },
  7627. "required": ["type", "properties"]
  7628. },
  7629. "Todo": {
  7630. "type": "object",
  7631. "properties": {
  7632. "content": {
  7633. "description": "Brief description of the task",
  7634. "type": "string"
  7635. },
  7636. "status": {
  7637. "description": "Current status of the task: pending, in_progress, completed, cancelled",
  7638. "type": "string"
  7639. },
  7640. "priority": {
  7641. "description": "Priority level of the task: high, medium, low",
  7642. "type": "string"
  7643. },
  7644. "id": {
  7645. "description": "Unique identifier for the todo item",
  7646. "type": "string"
  7647. }
  7648. },
  7649. "required": ["content", "status", "priority", "id"]
  7650. },
  7651. "Event.todo.updated": {
  7652. "type": "object",
  7653. "properties": {
  7654. "type": {
  7655. "type": "string",
  7656. "const": "todo.updated"
  7657. },
  7658. "properties": {
  7659. "type": "object",
  7660. "properties": {
  7661. "sessionID": {
  7662. "type": "string"
  7663. },
  7664. "todos": {
  7665. "type": "array",
  7666. "items": {
  7667. "$ref": "#/components/schemas/Todo"
  7668. }
  7669. }
  7670. },
  7671. "required": ["sessionID", "todos"]
  7672. }
  7673. },
  7674. "required": ["type", "properties"]
  7675. },
  7676. "Event.tui.prompt.append": {
  7677. "type": "object",
  7678. "properties": {
  7679. "type": {
  7680. "type": "string",
  7681. "const": "tui.prompt.append"
  7682. },
  7683. "properties": {
  7684. "type": "object",
  7685. "properties": {
  7686. "text": {
  7687. "type": "string"
  7688. }
  7689. },
  7690. "required": ["text"]
  7691. }
  7692. },
  7693. "required": ["type", "properties"]
  7694. },
  7695. "Event.tui.command.execute": {
  7696. "type": "object",
  7697. "properties": {
  7698. "type": {
  7699. "type": "string",
  7700. "const": "tui.command.execute"
  7701. },
  7702. "properties": {
  7703. "type": "object",
  7704. "properties": {
  7705. "command": {
  7706. "anyOf": [
  7707. {
  7708. "type": "string",
  7709. "enum": [
  7710. "session.list",
  7711. "session.new",
  7712. "session.share",
  7713. "session.interrupt",
  7714. "session.compact",
  7715. "session.page.up",
  7716. "session.page.down",
  7717. "session.line.up",
  7718. "session.line.down",
  7719. "session.half.page.up",
  7720. "session.half.page.down",
  7721. "session.first",
  7722. "session.last",
  7723. "prompt.clear",
  7724. "prompt.submit",
  7725. "agent.cycle"
  7726. ]
  7727. },
  7728. {
  7729. "type": "string"
  7730. }
  7731. ]
  7732. }
  7733. },
  7734. "required": ["command"]
  7735. }
  7736. },
  7737. "required": ["type", "properties"]
  7738. },
  7739. "Event.tui.toast.show": {
  7740. "type": "object",
  7741. "properties": {
  7742. "type": {
  7743. "type": "string",
  7744. "const": "tui.toast.show"
  7745. },
  7746. "properties": {
  7747. "type": "object",
  7748. "properties": {
  7749. "title": {
  7750. "type": "string"
  7751. },
  7752. "message": {
  7753. "type": "string"
  7754. },
  7755. "variant": {
  7756. "type": "string",
  7757. "enum": ["info", "success", "warning", "error"]
  7758. },
  7759. "duration": {
  7760. "description": "Duration in milliseconds",
  7761. "default": 5000,
  7762. "type": "number"
  7763. }
  7764. },
  7765. "required": ["message", "variant"]
  7766. }
  7767. },
  7768. "required": ["type", "properties"]
  7769. },
  7770. "Event.tui.session.select": {
  7771. "type": "object",
  7772. "properties": {
  7773. "type": {
  7774. "type": "string",
  7775. "const": "tui.session.select"
  7776. },
  7777. "properties": {
  7778. "type": "object",
  7779. "properties": {
  7780. "sessionID": {
  7781. "description": "Session ID to navigate to",
  7782. "type": "string",
  7783. "pattern": "^ses"
  7784. }
  7785. },
  7786. "required": ["sessionID"]
  7787. }
  7788. },
  7789. "required": ["type", "properties"]
  7790. },
  7791. "Event.mcp.tools.changed": {
  7792. "type": "object",
  7793. "properties": {
  7794. "type": {
  7795. "type": "string",
  7796. "const": "mcp.tools.changed"
  7797. },
  7798. "properties": {
  7799. "type": "object",
  7800. "properties": {
  7801. "server": {
  7802. "type": "string"
  7803. }
  7804. },
  7805. "required": ["server"]
  7806. }
  7807. },
  7808. "required": ["type", "properties"]
  7809. },
  7810. "Event.mcp.browser.open.failed": {
  7811. "type": "object",
  7812. "properties": {
  7813. "type": {
  7814. "type": "string",
  7815. "const": "mcp.browser.open.failed"
  7816. },
  7817. "properties": {
  7818. "type": "object",
  7819. "properties": {
  7820. "mcpName": {
  7821. "type": "string"
  7822. },
  7823. "url": {
  7824. "type": "string"
  7825. }
  7826. },
  7827. "required": ["mcpName", "url"]
  7828. }
  7829. },
  7830. "required": ["type", "properties"]
  7831. },
  7832. "Event.command.executed": {
  7833. "type": "object",
  7834. "properties": {
  7835. "type": {
  7836. "type": "string",
  7837. "const": "command.executed"
  7838. },
  7839. "properties": {
  7840. "type": "object",
  7841. "properties": {
  7842. "name": {
  7843. "type": "string"
  7844. },
  7845. "sessionID": {
  7846. "type": "string",
  7847. "pattern": "^ses.*"
  7848. },
  7849. "arguments": {
  7850. "type": "string"
  7851. },
  7852. "messageID": {
  7853. "type": "string",
  7854. "pattern": "^msg.*"
  7855. }
  7856. },
  7857. "required": ["name", "sessionID", "arguments", "messageID"]
  7858. }
  7859. },
  7860. "required": ["type", "properties"]
  7861. },
  7862. "PermissionAction": {
  7863. "type": "string",
  7864. "enum": ["allow", "deny", "ask"]
  7865. },
  7866. "PermissionRule": {
  7867. "type": "object",
  7868. "properties": {
  7869. "permission": {
  7870. "type": "string"
  7871. },
  7872. "pattern": {
  7873. "type": "string"
  7874. },
  7875. "action": {
  7876. "$ref": "#/components/schemas/PermissionAction"
  7877. }
  7878. },
  7879. "required": ["permission", "pattern", "action"]
  7880. },
  7881. "PermissionRuleset": {
  7882. "type": "array",
  7883. "items": {
  7884. "$ref": "#/components/schemas/PermissionRule"
  7885. }
  7886. },
  7887. "Session": {
  7888. "type": "object",
  7889. "properties": {
  7890. "id": {
  7891. "type": "string",
  7892. "pattern": "^ses.*"
  7893. },
  7894. "slug": {
  7895. "type": "string"
  7896. },
  7897. "projectID": {
  7898. "type": "string"
  7899. },
  7900. "directory": {
  7901. "type": "string"
  7902. },
  7903. "parentID": {
  7904. "type": "string",
  7905. "pattern": "^ses.*"
  7906. },
  7907. "summary": {
  7908. "type": "object",
  7909. "properties": {
  7910. "additions": {
  7911. "type": "number"
  7912. },
  7913. "deletions": {
  7914. "type": "number"
  7915. },
  7916. "files": {
  7917. "type": "number"
  7918. },
  7919. "diffs": {
  7920. "type": "array",
  7921. "items": {
  7922. "$ref": "#/components/schemas/FileDiff"
  7923. }
  7924. }
  7925. },
  7926. "required": ["additions", "deletions", "files"]
  7927. },
  7928. "share": {
  7929. "type": "object",
  7930. "properties": {
  7931. "url": {
  7932. "type": "string"
  7933. }
  7934. },
  7935. "required": ["url"]
  7936. },
  7937. "title": {
  7938. "type": "string"
  7939. },
  7940. "version": {
  7941. "type": "string"
  7942. },
  7943. "time": {
  7944. "type": "object",
  7945. "properties": {
  7946. "created": {
  7947. "type": "number"
  7948. },
  7949. "updated": {
  7950. "type": "number"
  7951. },
  7952. "compacting": {
  7953. "type": "number"
  7954. },
  7955. "archived": {
  7956. "type": "number"
  7957. }
  7958. },
  7959. "required": ["created", "updated"]
  7960. },
  7961. "permission": {
  7962. "$ref": "#/components/schemas/PermissionRuleset"
  7963. },
  7964. "revert": {
  7965. "type": "object",
  7966. "properties": {
  7967. "messageID": {
  7968. "type": "string"
  7969. },
  7970. "partID": {
  7971. "type": "string"
  7972. },
  7973. "snapshot": {
  7974. "type": "string"
  7975. },
  7976. "diff": {
  7977. "type": "string"
  7978. }
  7979. },
  7980. "required": ["messageID"]
  7981. }
  7982. },
  7983. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"]
  7984. },
  7985. "Event.session.created": {
  7986. "type": "object",
  7987. "properties": {
  7988. "type": {
  7989. "type": "string",
  7990. "const": "session.created"
  7991. },
  7992. "properties": {
  7993. "type": "object",
  7994. "properties": {
  7995. "info": {
  7996. "$ref": "#/components/schemas/Session"
  7997. }
  7998. },
  7999. "required": ["info"]
  8000. }
  8001. },
  8002. "required": ["type", "properties"]
  8003. },
  8004. "Event.session.updated": {
  8005. "type": "object",
  8006. "properties": {
  8007. "type": {
  8008. "type": "string",
  8009. "const": "session.updated"
  8010. },
  8011. "properties": {
  8012. "type": "object",
  8013. "properties": {
  8014. "info": {
  8015. "$ref": "#/components/schemas/Session"
  8016. }
  8017. },
  8018. "required": ["info"]
  8019. }
  8020. },
  8021. "required": ["type", "properties"]
  8022. },
  8023. "Event.session.deleted": {
  8024. "type": "object",
  8025. "properties": {
  8026. "type": {
  8027. "type": "string",
  8028. "const": "session.deleted"
  8029. },
  8030. "properties": {
  8031. "type": "object",
  8032. "properties": {
  8033. "info": {
  8034. "$ref": "#/components/schemas/Session"
  8035. }
  8036. },
  8037. "required": ["info"]
  8038. }
  8039. },
  8040. "required": ["type", "properties"]
  8041. },
  8042. "Event.session.diff": {
  8043. "type": "object",
  8044. "properties": {
  8045. "type": {
  8046. "type": "string",
  8047. "const": "session.diff"
  8048. },
  8049. "properties": {
  8050. "type": "object",
  8051. "properties": {
  8052. "sessionID": {
  8053. "type": "string"
  8054. },
  8055. "diff": {
  8056. "type": "array",
  8057. "items": {
  8058. "$ref": "#/components/schemas/FileDiff"
  8059. }
  8060. }
  8061. },
  8062. "required": ["sessionID", "diff"]
  8063. }
  8064. },
  8065. "required": ["type", "properties"]
  8066. },
  8067. "Event.session.error": {
  8068. "type": "object",
  8069. "properties": {
  8070. "type": {
  8071. "type": "string",
  8072. "const": "session.error"
  8073. },
  8074. "properties": {
  8075. "type": "object",
  8076. "properties": {
  8077. "sessionID": {
  8078. "type": "string"
  8079. },
  8080. "error": {
  8081. "anyOf": [
  8082. {
  8083. "$ref": "#/components/schemas/ProviderAuthError"
  8084. },
  8085. {
  8086. "$ref": "#/components/schemas/UnknownError"
  8087. },
  8088. {
  8089. "$ref": "#/components/schemas/MessageOutputLengthError"
  8090. },
  8091. {
  8092. "$ref": "#/components/schemas/MessageAbortedError"
  8093. },
  8094. {
  8095. "$ref": "#/components/schemas/APIError"
  8096. }
  8097. ]
  8098. }
  8099. }
  8100. }
  8101. },
  8102. "required": ["type", "properties"]
  8103. },
  8104. "Event.vcs.branch.updated": {
  8105. "type": "object",
  8106. "properties": {
  8107. "type": {
  8108. "type": "string",
  8109. "const": "vcs.branch.updated"
  8110. },
  8111. "properties": {
  8112. "type": "object",
  8113. "properties": {
  8114. "branch": {
  8115. "type": "string"
  8116. }
  8117. }
  8118. }
  8119. },
  8120. "required": ["type", "properties"]
  8121. },
  8122. "Pty": {
  8123. "type": "object",
  8124. "properties": {
  8125. "id": {
  8126. "type": "string",
  8127. "pattern": "^pty.*"
  8128. },
  8129. "title": {
  8130. "type": "string"
  8131. },
  8132. "command": {
  8133. "type": "string"
  8134. },
  8135. "args": {
  8136. "type": "array",
  8137. "items": {
  8138. "type": "string"
  8139. }
  8140. },
  8141. "cwd": {
  8142. "type": "string"
  8143. },
  8144. "status": {
  8145. "type": "string",
  8146. "enum": ["running", "exited"]
  8147. },
  8148. "pid": {
  8149. "type": "number"
  8150. }
  8151. },
  8152. "required": ["id", "title", "command", "args", "cwd", "status", "pid"]
  8153. },
  8154. "Event.pty.created": {
  8155. "type": "object",
  8156. "properties": {
  8157. "type": {
  8158. "type": "string",
  8159. "const": "pty.created"
  8160. },
  8161. "properties": {
  8162. "type": "object",
  8163. "properties": {
  8164. "info": {
  8165. "$ref": "#/components/schemas/Pty"
  8166. }
  8167. },
  8168. "required": ["info"]
  8169. }
  8170. },
  8171. "required": ["type", "properties"]
  8172. },
  8173. "Event.pty.updated": {
  8174. "type": "object",
  8175. "properties": {
  8176. "type": {
  8177. "type": "string",
  8178. "const": "pty.updated"
  8179. },
  8180. "properties": {
  8181. "type": "object",
  8182. "properties": {
  8183. "info": {
  8184. "$ref": "#/components/schemas/Pty"
  8185. }
  8186. },
  8187. "required": ["info"]
  8188. }
  8189. },
  8190. "required": ["type", "properties"]
  8191. },
  8192. "Event.pty.exited": {
  8193. "type": "object",
  8194. "properties": {
  8195. "type": {
  8196. "type": "string",
  8197. "const": "pty.exited"
  8198. },
  8199. "properties": {
  8200. "type": "object",
  8201. "properties": {
  8202. "id": {
  8203. "type": "string",
  8204. "pattern": "^pty.*"
  8205. },
  8206. "exitCode": {
  8207. "type": "number"
  8208. }
  8209. },
  8210. "required": ["id", "exitCode"]
  8211. }
  8212. },
  8213. "required": ["type", "properties"]
  8214. },
  8215. "Event.pty.deleted": {
  8216. "type": "object",
  8217. "properties": {
  8218. "type": {
  8219. "type": "string",
  8220. "const": "pty.deleted"
  8221. },
  8222. "properties": {
  8223. "type": "object",
  8224. "properties": {
  8225. "id": {
  8226. "type": "string",
  8227. "pattern": "^pty.*"
  8228. }
  8229. },
  8230. "required": ["id"]
  8231. }
  8232. },
  8233. "required": ["type", "properties"]
  8234. },
  8235. "Event.worktree.ready": {
  8236. "type": "object",
  8237. "properties": {
  8238. "type": {
  8239. "type": "string",
  8240. "const": "worktree.ready"
  8241. },
  8242. "properties": {
  8243. "type": "object",
  8244. "properties": {
  8245. "name": {
  8246. "type": "string"
  8247. },
  8248. "branch": {
  8249. "type": "string"
  8250. }
  8251. },
  8252. "required": ["name", "branch"]
  8253. }
  8254. },
  8255. "required": ["type", "properties"]
  8256. },
  8257. "Event.worktree.failed": {
  8258. "type": "object",
  8259. "properties": {
  8260. "type": {
  8261. "type": "string",
  8262. "const": "worktree.failed"
  8263. },
  8264. "properties": {
  8265. "type": "object",
  8266. "properties": {
  8267. "message": {
  8268. "type": "string"
  8269. }
  8270. },
  8271. "required": ["message"]
  8272. }
  8273. },
  8274. "required": ["type", "properties"]
  8275. },
  8276. "Event": {
  8277. "anyOf": [
  8278. {
  8279. "$ref": "#/components/schemas/Event.installation.updated"
  8280. },
  8281. {
  8282. "$ref": "#/components/schemas/Event.installation.update-available"
  8283. },
  8284. {
  8285. "$ref": "#/components/schemas/Event.project.updated"
  8286. },
  8287. {
  8288. "$ref": "#/components/schemas/Event.server.instance.disposed"
  8289. },
  8290. {
  8291. "$ref": "#/components/schemas/Event.server.connected"
  8292. },
  8293. {
  8294. "$ref": "#/components/schemas/Event.global.disposed"
  8295. },
  8296. {
  8297. "$ref": "#/components/schemas/Event.lsp.client.diagnostics"
  8298. },
  8299. {
  8300. "$ref": "#/components/schemas/Event.lsp.updated"
  8301. },
  8302. {
  8303. "$ref": "#/components/schemas/Event.file.edited"
  8304. },
  8305. {
  8306. "$ref": "#/components/schemas/Event.message.updated"
  8307. },
  8308. {
  8309. "$ref": "#/components/schemas/Event.message.removed"
  8310. },
  8311. {
  8312. "$ref": "#/components/schemas/Event.message.part.updated"
  8313. },
  8314. {
  8315. "$ref": "#/components/schemas/Event.message.part.removed"
  8316. },
  8317. {
  8318. "$ref": "#/components/schemas/Event.permission.asked"
  8319. },
  8320. {
  8321. "$ref": "#/components/schemas/Event.permission.replied"
  8322. },
  8323. {
  8324. "$ref": "#/components/schemas/Event.session.status"
  8325. },
  8326. {
  8327. "$ref": "#/components/schemas/Event.session.idle"
  8328. },
  8329. {
  8330. "$ref": "#/components/schemas/Event.question.asked"
  8331. },
  8332. {
  8333. "$ref": "#/components/schemas/Event.question.replied"
  8334. },
  8335. {
  8336. "$ref": "#/components/schemas/Event.question.rejected"
  8337. },
  8338. {
  8339. "$ref": "#/components/schemas/Event.session.compacted"
  8340. },
  8341. {
  8342. "$ref": "#/components/schemas/Event.file.watcher.updated"
  8343. },
  8344. {
  8345. "$ref": "#/components/schemas/Event.todo.updated"
  8346. },
  8347. {
  8348. "$ref": "#/components/schemas/Event.tui.prompt.append"
  8349. },
  8350. {
  8351. "$ref": "#/components/schemas/Event.tui.command.execute"
  8352. },
  8353. {
  8354. "$ref": "#/components/schemas/Event.tui.toast.show"
  8355. },
  8356. {
  8357. "$ref": "#/components/schemas/Event.tui.session.select"
  8358. },
  8359. {
  8360. "$ref": "#/components/schemas/Event.mcp.tools.changed"
  8361. },
  8362. {
  8363. "$ref": "#/components/schemas/Event.mcp.browser.open.failed"
  8364. },
  8365. {
  8366. "$ref": "#/components/schemas/Event.command.executed"
  8367. },
  8368. {
  8369. "$ref": "#/components/schemas/Event.session.created"
  8370. },
  8371. {
  8372. "$ref": "#/components/schemas/Event.session.updated"
  8373. },
  8374. {
  8375. "$ref": "#/components/schemas/Event.session.deleted"
  8376. },
  8377. {
  8378. "$ref": "#/components/schemas/Event.session.diff"
  8379. },
  8380. {
  8381. "$ref": "#/components/schemas/Event.session.error"
  8382. },
  8383. {
  8384. "$ref": "#/components/schemas/Event.vcs.branch.updated"
  8385. },
  8386. {
  8387. "$ref": "#/components/schemas/Event.pty.created"
  8388. },
  8389. {
  8390. "$ref": "#/components/schemas/Event.pty.updated"
  8391. },
  8392. {
  8393. "$ref": "#/components/schemas/Event.pty.exited"
  8394. },
  8395. {
  8396. "$ref": "#/components/schemas/Event.pty.deleted"
  8397. },
  8398. {
  8399. "$ref": "#/components/schemas/Event.worktree.ready"
  8400. },
  8401. {
  8402. "$ref": "#/components/schemas/Event.worktree.failed"
  8403. }
  8404. ]
  8405. },
  8406. "GlobalEvent": {
  8407. "type": "object",
  8408. "properties": {
  8409. "directory": {
  8410. "type": "string"
  8411. },
  8412. "payload": {
  8413. "$ref": "#/components/schemas/Event"
  8414. }
  8415. },
  8416. "required": ["directory", "payload"]
  8417. },
  8418. "KeybindsConfig": {
  8419. "description": "Custom keybind configurations",
  8420. "type": "object",
  8421. "properties": {
  8422. "leader": {
  8423. "description": "Leader key for keybind combinations",
  8424. "default": "ctrl+x",
  8425. "type": "string"
  8426. },
  8427. "app_exit": {
  8428. "description": "Exit the application",
  8429. "default": "ctrl+c,ctrl+d,<leader>q",
  8430. "type": "string"
  8431. },
  8432. "editor_open": {
  8433. "description": "Open external editor",
  8434. "default": "<leader>e",
  8435. "type": "string"
  8436. },
  8437. "theme_list": {
  8438. "description": "List available themes",
  8439. "default": "<leader>t",
  8440. "type": "string"
  8441. },
  8442. "sidebar_toggle": {
  8443. "description": "Toggle sidebar",
  8444. "default": "<leader>b",
  8445. "type": "string"
  8446. },
  8447. "scrollbar_toggle": {
  8448. "description": "Toggle session scrollbar",
  8449. "default": "none",
  8450. "type": "string"
  8451. },
  8452. "username_toggle": {
  8453. "description": "Toggle username visibility",
  8454. "default": "none",
  8455. "type": "string"
  8456. },
  8457. "status_view": {
  8458. "description": "View status",
  8459. "default": "<leader>s",
  8460. "type": "string"
  8461. },
  8462. "session_export": {
  8463. "description": "Export session to editor",
  8464. "default": "<leader>x",
  8465. "type": "string"
  8466. },
  8467. "session_new": {
  8468. "description": "Create a new session",
  8469. "default": "<leader>n",
  8470. "type": "string"
  8471. },
  8472. "session_list": {
  8473. "description": "List all sessions",
  8474. "default": "<leader>l",
  8475. "type": "string"
  8476. },
  8477. "session_timeline": {
  8478. "description": "Show session timeline",
  8479. "default": "<leader>g",
  8480. "type": "string"
  8481. },
  8482. "session_fork": {
  8483. "description": "Fork session from message",
  8484. "default": "none",
  8485. "type": "string"
  8486. },
  8487. "session_rename": {
  8488. "description": "Rename session",
  8489. "default": "ctrl+r",
  8490. "type": "string"
  8491. },
  8492. "session_delete": {
  8493. "description": "Delete session",
  8494. "default": "ctrl+d",
  8495. "type": "string"
  8496. },
  8497. "stash_delete": {
  8498. "description": "Delete stash entry",
  8499. "default": "ctrl+d",
  8500. "type": "string"
  8501. },
  8502. "model_provider_list": {
  8503. "description": "Open provider list from model dialog",
  8504. "default": "ctrl+a",
  8505. "type": "string"
  8506. },
  8507. "model_favorite_toggle": {
  8508. "description": "Toggle model favorite status",
  8509. "default": "ctrl+f",
  8510. "type": "string"
  8511. },
  8512. "session_share": {
  8513. "description": "Share current session",
  8514. "default": "none",
  8515. "type": "string"
  8516. },
  8517. "session_unshare": {
  8518. "description": "Unshare current session",
  8519. "default": "none",
  8520. "type": "string"
  8521. },
  8522. "session_interrupt": {
  8523. "description": "Interrupt current session",
  8524. "default": "escape",
  8525. "type": "string"
  8526. },
  8527. "session_compact": {
  8528. "description": "Compact the session",
  8529. "default": "<leader>c",
  8530. "type": "string"
  8531. },
  8532. "messages_page_up": {
  8533. "description": "Scroll messages up by one page",
  8534. "default": "pageup,ctrl+alt+b",
  8535. "type": "string"
  8536. },
  8537. "messages_page_down": {
  8538. "description": "Scroll messages down by one page",
  8539. "default": "pagedown,ctrl+alt+f",
  8540. "type": "string"
  8541. },
  8542. "messages_line_up": {
  8543. "description": "Scroll messages up by one line",
  8544. "default": "ctrl+alt+y",
  8545. "type": "string"
  8546. },
  8547. "messages_line_down": {
  8548. "description": "Scroll messages down by one line",
  8549. "default": "ctrl+alt+e",
  8550. "type": "string"
  8551. },
  8552. "messages_half_page_up": {
  8553. "description": "Scroll messages up by half page",
  8554. "default": "ctrl+alt+u",
  8555. "type": "string"
  8556. },
  8557. "messages_half_page_down": {
  8558. "description": "Scroll messages down by half page",
  8559. "default": "ctrl+alt+d",
  8560. "type": "string"
  8561. },
  8562. "messages_first": {
  8563. "description": "Navigate to first message",
  8564. "default": "ctrl+g,home",
  8565. "type": "string"
  8566. },
  8567. "messages_last": {
  8568. "description": "Navigate to last message",
  8569. "default": "ctrl+alt+g,end",
  8570. "type": "string"
  8571. },
  8572. "messages_next": {
  8573. "description": "Navigate to next message",
  8574. "default": "none",
  8575. "type": "string"
  8576. },
  8577. "messages_previous": {
  8578. "description": "Navigate to previous message",
  8579. "default": "none",
  8580. "type": "string"
  8581. },
  8582. "messages_last_user": {
  8583. "description": "Navigate to last user message",
  8584. "default": "none",
  8585. "type": "string"
  8586. },
  8587. "messages_copy": {
  8588. "description": "Copy message",
  8589. "default": "<leader>y",
  8590. "type": "string"
  8591. },
  8592. "messages_undo": {
  8593. "description": "Undo message",
  8594. "default": "<leader>u",
  8595. "type": "string"
  8596. },
  8597. "messages_redo": {
  8598. "description": "Redo message",
  8599. "default": "<leader>r",
  8600. "type": "string"
  8601. },
  8602. "messages_toggle_conceal": {
  8603. "description": "Toggle code block concealment in messages",
  8604. "default": "<leader>h",
  8605. "type": "string"
  8606. },
  8607. "tool_details": {
  8608. "description": "Toggle tool details visibility",
  8609. "default": "none",
  8610. "type": "string"
  8611. },
  8612. "model_list": {
  8613. "description": "List available models",
  8614. "default": "<leader>m",
  8615. "type": "string"
  8616. },
  8617. "model_cycle_recent": {
  8618. "description": "Next recently used model",
  8619. "default": "f2",
  8620. "type": "string"
  8621. },
  8622. "model_cycle_recent_reverse": {
  8623. "description": "Previous recently used model",
  8624. "default": "shift+f2",
  8625. "type": "string"
  8626. },
  8627. "model_cycle_favorite": {
  8628. "description": "Next favorite model",
  8629. "default": "none",
  8630. "type": "string"
  8631. },
  8632. "model_cycle_favorite_reverse": {
  8633. "description": "Previous favorite model",
  8634. "default": "none",
  8635. "type": "string"
  8636. },
  8637. "command_list": {
  8638. "description": "List available commands",
  8639. "default": "ctrl+p",
  8640. "type": "string"
  8641. },
  8642. "agent_list": {
  8643. "description": "List agents",
  8644. "default": "<leader>a",
  8645. "type": "string"
  8646. },
  8647. "agent_cycle": {
  8648. "description": "Next agent",
  8649. "default": "tab",
  8650. "type": "string"
  8651. },
  8652. "agent_cycle_reverse": {
  8653. "description": "Previous agent",
  8654. "default": "shift+tab",
  8655. "type": "string"
  8656. },
  8657. "variant_cycle": {
  8658. "description": "Cycle model variants",
  8659. "default": "ctrl+t",
  8660. "type": "string"
  8661. },
  8662. "input_clear": {
  8663. "description": "Clear input field",
  8664. "default": "ctrl+c",
  8665. "type": "string"
  8666. },
  8667. "input_paste": {
  8668. "description": "Paste from clipboard",
  8669. "default": "ctrl+v",
  8670. "type": "string"
  8671. },
  8672. "input_submit": {
  8673. "description": "Submit input",
  8674. "default": "return",
  8675. "type": "string"
  8676. },
  8677. "input_newline": {
  8678. "description": "Insert newline in input",
  8679. "default": "shift+return,ctrl+return,alt+return,ctrl+j",
  8680. "type": "string"
  8681. },
  8682. "input_move_left": {
  8683. "description": "Move cursor left in input",
  8684. "default": "left,ctrl+b",
  8685. "type": "string"
  8686. },
  8687. "input_move_right": {
  8688. "description": "Move cursor right in input",
  8689. "default": "right,ctrl+f",
  8690. "type": "string"
  8691. },
  8692. "input_move_up": {
  8693. "description": "Move cursor up in input",
  8694. "default": "up",
  8695. "type": "string"
  8696. },
  8697. "input_move_down": {
  8698. "description": "Move cursor down in input",
  8699. "default": "down",
  8700. "type": "string"
  8701. },
  8702. "input_select_left": {
  8703. "description": "Select left in input",
  8704. "default": "shift+left",
  8705. "type": "string"
  8706. },
  8707. "input_select_right": {
  8708. "description": "Select right in input",
  8709. "default": "shift+right",
  8710. "type": "string"
  8711. },
  8712. "input_select_up": {
  8713. "description": "Select up in input",
  8714. "default": "shift+up",
  8715. "type": "string"
  8716. },
  8717. "input_select_down": {
  8718. "description": "Select down in input",
  8719. "default": "shift+down",
  8720. "type": "string"
  8721. },
  8722. "input_line_home": {
  8723. "description": "Move to start of line in input",
  8724. "default": "ctrl+a",
  8725. "type": "string"
  8726. },
  8727. "input_line_end": {
  8728. "description": "Move to end of line in input",
  8729. "default": "ctrl+e",
  8730. "type": "string"
  8731. },
  8732. "input_select_line_home": {
  8733. "description": "Select to start of line in input",
  8734. "default": "ctrl+shift+a",
  8735. "type": "string"
  8736. },
  8737. "input_select_line_end": {
  8738. "description": "Select to end of line in input",
  8739. "default": "ctrl+shift+e",
  8740. "type": "string"
  8741. },
  8742. "input_visual_line_home": {
  8743. "description": "Move to start of visual line in input",
  8744. "default": "alt+a",
  8745. "type": "string"
  8746. },
  8747. "input_visual_line_end": {
  8748. "description": "Move to end of visual line in input",
  8749. "default": "alt+e",
  8750. "type": "string"
  8751. },
  8752. "input_select_visual_line_home": {
  8753. "description": "Select to start of visual line in input",
  8754. "default": "alt+shift+a",
  8755. "type": "string"
  8756. },
  8757. "input_select_visual_line_end": {
  8758. "description": "Select to end of visual line in input",
  8759. "default": "alt+shift+e",
  8760. "type": "string"
  8761. },
  8762. "input_buffer_home": {
  8763. "description": "Move to start of buffer in input",
  8764. "default": "home",
  8765. "type": "string"
  8766. },
  8767. "input_buffer_end": {
  8768. "description": "Move to end of buffer in input",
  8769. "default": "end",
  8770. "type": "string"
  8771. },
  8772. "input_select_buffer_home": {
  8773. "description": "Select to start of buffer in input",
  8774. "default": "shift+home",
  8775. "type": "string"
  8776. },
  8777. "input_select_buffer_end": {
  8778. "description": "Select to end of buffer in input",
  8779. "default": "shift+end",
  8780. "type": "string"
  8781. },
  8782. "input_delete_line": {
  8783. "description": "Delete line in input",
  8784. "default": "ctrl+shift+d",
  8785. "type": "string"
  8786. },
  8787. "input_delete_to_line_end": {
  8788. "description": "Delete to end of line in input",
  8789. "default": "ctrl+k",
  8790. "type": "string"
  8791. },
  8792. "input_delete_to_line_start": {
  8793. "description": "Delete to start of line in input",
  8794. "default": "ctrl+u",
  8795. "type": "string"
  8796. },
  8797. "input_backspace": {
  8798. "description": "Backspace in input",
  8799. "default": "backspace,shift+backspace",
  8800. "type": "string"
  8801. },
  8802. "input_delete": {
  8803. "description": "Delete character in input",
  8804. "default": "ctrl+d,delete,shift+delete",
  8805. "type": "string"
  8806. },
  8807. "input_undo": {
  8808. "description": "Undo in input",
  8809. "default": "ctrl+-,super+z",
  8810. "type": "string"
  8811. },
  8812. "input_redo": {
  8813. "description": "Redo in input",
  8814. "default": "ctrl+.,super+shift+z",
  8815. "type": "string"
  8816. },
  8817. "input_word_forward": {
  8818. "description": "Move word forward in input",
  8819. "default": "alt+f,alt+right,ctrl+right",
  8820. "type": "string"
  8821. },
  8822. "input_word_backward": {
  8823. "description": "Move word backward in input",
  8824. "default": "alt+b,alt+left,ctrl+left",
  8825. "type": "string"
  8826. },
  8827. "input_select_word_forward": {
  8828. "description": "Select word forward in input",
  8829. "default": "alt+shift+f,alt+shift+right",
  8830. "type": "string"
  8831. },
  8832. "input_select_word_backward": {
  8833. "description": "Select word backward in input",
  8834. "default": "alt+shift+b,alt+shift+left",
  8835. "type": "string"
  8836. },
  8837. "input_delete_word_forward": {
  8838. "description": "Delete word forward in input",
  8839. "default": "alt+d,alt+delete,ctrl+delete",
  8840. "type": "string"
  8841. },
  8842. "input_delete_word_backward": {
  8843. "description": "Delete word backward in input",
  8844. "default": "ctrl+w,ctrl+backspace,alt+backspace",
  8845. "type": "string"
  8846. },
  8847. "history_previous": {
  8848. "description": "Previous history item",
  8849. "default": "up",
  8850. "type": "string"
  8851. },
  8852. "history_next": {
  8853. "description": "Next history item",
  8854. "default": "down",
  8855. "type": "string"
  8856. },
  8857. "session_child_cycle": {
  8858. "description": "Next child session",
  8859. "default": "<leader>right",
  8860. "type": "string"
  8861. },
  8862. "session_child_cycle_reverse": {
  8863. "description": "Previous child session",
  8864. "default": "<leader>left",
  8865. "type": "string"
  8866. },
  8867. "session_parent": {
  8868. "description": "Go to parent session",
  8869. "default": "<leader>up",
  8870. "type": "string"
  8871. },
  8872. "terminal_suspend": {
  8873. "description": "Suspend terminal",
  8874. "default": "ctrl+z",
  8875. "type": "string"
  8876. },
  8877. "terminal_title_toggle": {
  8878. "description": "Toggle terminal title",
  8879. "default": "none",
  8880. "type": "string"
  8881. },
  8882. "tips_toggle": {
  8883. "description": "Toggle tips on home screen",
  8884. "default": "<leader>h",
  8885. "type": "string"
  8886. }
  8887. },
  8888. "additionalProperties": false
  8889. },
  8890. "LogLevel": {
  8891. "description": "Log level",
  8892. "type": "string",
  8893. "enum": ["DEBUG", "INFO", "WARN", "ERROR"]
  8894. },
  8895. "ServerConfig": {
  8896. "description": "Server configuration for opencode serve and web commands",
  8897. "type": "object",
  8898. "properties": {
  8899. "port": {
  8900. "description": "Port to listen on",
  8901. "type": "integer",
  8902. "exclusiveMinimum": 0,
  8903. "maximum": 9007199254740991
  8904. },
  8905. "hostname": {
  8906. "description": "Hostname to listen on",
  8907. "type": "string"
  8908. },
  8909. "mdns": {
  8910. "description": "Enable mDNS service discovery",
  8911. "type": "boolean"
  8912. },
  8913. "mdnsDomain": {
  8914. "description": "Custom domain name for mDNS service (default: opencode.local)",
  8915. "type": "string"
  8916. },
  8917. "cors": {
  8918. "description": "Additional domains to allow for CORS",
  8919. "type": "array",
  8920. "items": {
  8921. "type": "string"
  8922. }
  8923. }
  8924. },
  8925. "additionalProperties": false
  8926. },
  8927. "PermissionActionConfig": {
  8928. "type": "string",
  8929. "enum": ["ask", "allow", "deny"]
  8930. },
  8931. "PermissionObjectConfig": {
  8932. "type": "object",
  8933. "propertyNames": {
  8934. "type": "string"
  8935. },
  8936. "additionalProperties": {
  8937. "$ref": "#/components/schemas/PermissionActionConfig"
  8938. }
  8939. },
  8940. "PermissionRuleConfig": {
  8941. "anyOf": [
  8942. {
  8943. "$ref": "#/components/schemas/PermissionActionConfig"
  8944. },
  8945. {
  8946. "$ref": "#/components/schemas/PermissionObjectConfig"
  8947. }
  8948. ]
  8949. },
  8950. "PermissionConfig": {
  8951. "anyOf": [
  8952. {
  8953. "type": "object",
  8954. "properties": {
  8955. "__originalKeys": {
  8956. "type": "array",
  8957. "items": {
  8958. "type": "string"
  8959. }
  8960. },
  8961. "read": {
  8962. "$ref": "#/components/schemas/PermissionRuleConfig"
  8963. },
  8964. "edit": {
  8965. "$ref": "#/components/schemas/PermissionRuleConfig"
  8966. },
  8967. "glob": {
  8968. "$ref": "#/components/schemas/PermissionRuleConfig"
  8969. },
  8970. "grep": {
  8971. "$ref": "#/components/schemas/PermissionRuleConfig"
  8972. },
  8973. "list": {
  8974. "$ref": "#/components/schemas/PermissionRuleConfig"
  8975. },
  8976. "bash": {
  8977. "$ref": "#/components/schemas/PermissionRuleConfig"
  8978. },
  8979. "task": {
  8980. "$ref": "#/components/schemas/PermissionRuleConfig"
  8981. },
  8982. "external_directory": {
  8983. "$ref": "#/components/schemas/PermissionRuleConfig"
  8984. },
  8985. "todowrite": {
  8986. "$ref": "#/components/schemas/PermissionActionConfig"
  8987. },
  8988. "todoread": {
  8989. "$ref": "#/components/schemas/PermissionActionConfig"
  8990. },
  8991. "question": {
  8992. "$ref": "#/components/schemas/PermissionActionConfig"
  8993. },
  8994. "webfetch": {
  8995. "$ref": "#/components/schemas/PermissionActionConfig"
  8996. },
  8997. "websearch": {
  8998. "$ref": "#/components/schemas/PermissionActionConfig"
  8999. },
  9000. "codesearch": {
  9001. "$ref": "#/components/schemas/PermissionActionConfig"
  9002. },
  9003. "lsp": {
  9004. "$ref": "#/components/schemas/PermissionRuleConfig"
  9005. },
  9006. "doom_loop": {
  9007. "$ref": "#/components/schemas/PermissionActionConfig"
  9008. },
  9009. "skill": {
  9010. "$ref": "#/components/schemas/PermissionRuleConfig"
  9011. }
  9012. },
  9013. "additionalProperties": {
  9014. "$ref": "#/components/schemas/PermissionRuleConfig"
  9015. }
  9016. },
  9017. {
  9018. "$ref": "#/components/schemas/PermissionActionConfig"
  9019. }
  9020. ]
  9021. },
  9022. "AgentConfig": {
  9023. "type": "object",
  9024. "properties": {
  9025. "model": {
  9026. "type": "string"
  9027. },
  9028. "variant": {
  9029. "description": "Default model variant for this agent (applies only when using the agent's configured model).",
  9030. "type": "string"
  9031. },
  9032. "temperature": {
  9033. "type": "number"
  9034. },
  9035. "top_p": {
  9036. "type": "number"
  9037. },
  9038. "prompt": {
  9039. "type": "string"
  9040. },
  9041. "tools": {
  9042. "description": "@deprecated Use 'permission' field instead",
  9043. "type": "object",
  9044. "propertyNames": {
  9045. "type": "string"
  9046. },
  9047. "additionalProperties": {
  9048. "type": "boolean"
  9049. }
  9050. },
  9051. "disable": {
  9052. "type": "boolean"
  9053. },
  9054. "description": {
  9055. "description": "Description of when to use the agent",
  9056. "type": "string"
  9057. },
  9058. "mode": {
  9059. "type": "string",
  9060. "enum": ["subagent", "primary", "all"]
  9061. },
  9062. "hidden": {
  9063. "description": "Hide this subagent from the @ autocomplete menu (default: false, only applies to mode: subagent)",
  9064. "type": "boolean"
  9065. },
  9066. "options": {
  9067. "type": "object",
  9068. "propertyNames": {
  9069. "type": "string"
  9070. },
  9071. "additionalProperties": {}
  9072. },
  9073. "color": {
  9074. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)",
  9075. "anyOf": [
  9076. {
  9077. "type": "string",
  9078. "pattern": "^#[0-9a-fA-F]{6}$"
  9079. },
  9080. {
  9081. "type": "string",
  9082. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  9083. }
  9084. ]
  9085. },
  9086. "steps": {
  9087. "description": "Maximum number of agentic iterations before forcing text-only response",
  9088. "type": "integer",
  9089. "exclusiveMinimum": 0,
  9090. "maximum": 9007199254740991
  9091. },
  9092. "maxSteps": {
  9093. "description": "@deprecated Use 'steps' field instead.",
  9094. "type": "integer",
  9095. "exclusiveMinimum": 0,
  9096. "maximum": 9007199254740991
  9097. },
  9098. "permission": {
  9099. "$ref": "#/components/schemas/PermissionConfig"
  9100. }
  9101. },
  9102. "additionalProperties": {}
  9103. },
  9104. "ProviderConfig": {
  9105. "type": "object",
  9106. "properties": {
  9107. "api": {
  9108. "type": "string"
  9109. },
  9110. "name": {
  9111. "type": "string"
  9112. },
  9113. "env": {
  9114. "type": "array",
  9115. "items": {
  9116. "type": "string"
  9117. }
  9118. },
  9119. "id": {
  9120. "type": "string"
  9121. },
  9122. "npm": {
  9123. "type": "string"
  9124. },
  9125. "models": {
  9126. "type": "object",
  9127. "propertyNames": {
  9128. "type": "string"
  9129. },
  9130. "additionalProperties": {
  9131. "type": "object",
  9132. "properties": {
  9133. "id": {
  9134. "type": "string"
  9135. },
  9136. "name": {
  9137. "type": "string"
  9138. },
  9139. "family": {
  9140. "type": "string"
  9141. },
  9142. "release_date": {
  9143. "type": "string"
  9144. },
  9145. "attachment": {
  9146. "type": "boolean"
  9147. },
  9148. "reasoning": {
  9149. "type": "boolean"
  9150. },
  9151. "temperature": {
  9152. "type": "boolean"
  9153. },
  9154. "tool_call": {
  9155. "type": "boolean"
  9156. },
  9157. "interleaved": {
  9158. "anyOf": [
  9159. {
  9160. "type": "boolean",
  9161. "const": true
  9162. },
  9163. {
  9164. "type": "object",
  9165. "properties": {
  9166. "field": {
  9167. "type": "string",
  9168. "enum": ["reasoning_content", "reasoning_details"]
  9169. }
  9170. },
  9171. "required": ["field"],
  9172. "additionalProperties": false
  9173. }
  9174. ]
  9175. },
  9176. "cost": {
  9177. "type": "object",
  9178. "properties": {
  9179. "input": {
  9180. "type": "number"
  9181. },
  9182. "output": {
  9183. "type": "number"
  9184. },
  9185. "cache_read": {
  9186. "type": "number"
  9187. },
  9188. "cache_write": {
  9189. "type": "number"
  9190. },
  9191. "context_over_200k": {
  9192. "type": "object",
  9193. "properties": {
  9194. "input": {
  9195. "type": "number"
  9196. },
  9197. "output": {
  9198. "type": "number"
  9199. },
  9200. "cache_read": {
  9201. "type": "number"
  9202. },
  9203. "cache_write": {
  9204. "type": "number"
  9205. }
  9206. },
  9207. "required": ["input", "output"]
  9208. }
  9209. },
  9210. "required": ["input", "output"]
  9211. },
  9212. "limit": {
  9213. "type": "object",
  9214. "properties": {
  9215. "context": {
  9216. "type": "number"
  9217. },
  9218. "input": {
  9219. "type": "number"
  9220. },
  9221. "output": {
  9222. "type": "number"
  9223. }
  9224. },
  9225. "required": ["context", "output"]
  9226. },
  9227. "modalities": {
  9228. "type": "object",
  9229. "properties": {
  9230. "input": {
  9231. "type": "array",
  9232. "items": {
  9233. "type": "string",
  9234. "enum": ["text", "audio", "image", "video", "pdf"]
  9235. }
  9236. },
  9237. "output": {
  9238. "type": "array",
  9239. "items": {
  9240. "type": "string",
  9241. "enum": ["text", "audio", "image", "video", "pdf"]
  9242. }
  9243. }
  9244. },
  9245. "required": ["input", "output"]
  9246. },
  9247. "experimental": {
  9248. "type": "boolean"
  9249. },
  9250. "status": {
  9251. "type": "string",
  9252. "enum": ["alpha", "beta", "deprecated"]
  9253. },
  9254. "options": {
  9255. "type": "object",
  9256. "propertyNames": {
  9257. "type": "string"
  9258. },
  9259. "additionalProperties": {}
  9260. },
  9261. "headers": {
  9262. "type": "object",
  9263. "propertyNames": {
  9264. "type": "string"
  9265. },
  9266. "additionalProperties": {
  9267. "type": "string"
  9268. }
  9269. },
  9270. "provider": {
  9271. "type": "object",
  9272. "properties": {
  9273. "npm": {
  9274. "type": "string"
  9275. }
  9276. },
  9277. "required": ["npm"]
  9278. },
  9279. "variants": {
  9280. "description": "Variant-specific configuration",
  9281. "type": "object",
  9282. "propertyNames": {
  9283. "type": "string"
  9284. },
  9285. "additionalProperties": {
  9286. "type": "object",
  9287. "properties": {
  9288. "disabled": {
  9289. "description": "Disable this variant for the model",
  9290. "type": "boolean"
  9291. }
  9292. },
  9293. "additionalProperties": {}
  9294. }
  9295. }
  9296. }
  9297. }
  9298. },
  9299. "whitelist": {
  9300. "type": "array",
  9301. "items": {
  9302. "type": "string"
  9303. }
  9304. },
  9305. "blacklist": {
  9306. "type": "array",
  9307. "items": {
  9308. "type": "string"
  9309. }
  9310. },
  9311. "options": {
  9312. "type": "object",
  9313. "properties": {
  9314. "apiKey": {
  9315. "type": "string"
  9316. },
  9317. "baseURL": {
  9318. "type": "string"
  9319. },
  9320. "enterpriseUrl": {
  9321. "description": "GitHub Enterprise URL for copilot authentication",
  9322. "type": "string"
  9323. },
  9324. "setCacheKey": {
  9325. "description": "Enable promptCacheKey for this provider (default false)",
  9326. "type": "boolean"
  9327. },
  9328. "timeout": {
  9329. "description": "Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout.",
  9330. "anyOf": [
  9331. {
  9332. "description": "Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout.",
  9333. "type": "integer",
  9334. "exclusiveMinimum": 0,
  9335. "maximum": 9007199254740991
  9336. },
  9337. {
  9338. "description": "Disable timeout for this provider entirely.",
  9339. "type": "boolean",
  9340. "const": false
  9341. }
  9342. ]
  9343. }
  9344. },
  9345. "additionalProperties": {}
  9346. }
  9347. },
  9348. "additionalProperties": false
  9349. },
  9350. "McpLocalConfig": {
  9351. "type": "object",
  9352. "properties": {
  9353. "type": {
  9354. "description": "Type of MCP server connection",
  9355. "type": "string",
  9356. "const": "local"
  9357. },
  9358. "command": {
  9359. "description": "Command and arguments to run the MCP server",
  9360. "type": "array",
  9361. "items": {
  9362. "type": "string"
  9363. }
  9364. },
  9365. "environment": {
  9366. "description": "Environment variables to set when running the MCP server",
  9367. "type": "object",
  9368. "propertyNames": {
  9369. "type": "string"
  9370. },
  9371. "additionalProperties": {
  9372. "type": "string"
  9373. }
  9374. },
  9375. "enabled": {
  9376. "description": "Enable or disable the MCP server on startup",
  9377. "type": "boolean"
  9378. },
  9379. "timeout": {
  9380. "description": "Timeout in ms for MCP server requests. Defaults to 5000 (5 seconds) if not specified.",
  9381. "type": "integer",
  9382. "exclusiveMinimum": 0,
  9383. "maximum": 9007199254740991
  9384. }
  9385. },
  9386. "required": ["type", "command"],
  9387. "additionalProperties": false
  9388. },
  9389. "McpOAuthConfig": {
  9390. "type": "object",
  9391. "properties": {
  9392. "clientId": {
  9393. "description": "OAuth client ID. If not provided, dynamic client registration (RFC 7591) will be attempted.",
  9394. "type": "string"
  9395. },
  9396. "clientSecret": {
  9397. "description": "OAuth client secret (if required by the authorization server)",
  9398. "type": "string"
  9399. },
  9400. "scope": {
  9401. "description": "OAuth scopes to request during authorization",
  9402. "type": "string"
  9403. }
  9404. },
  9405. "additionalProperties": false
  9406. },
  9407. "McpRemoteConfig": {
  9408. "type": "object",
  9409. "properties": {
  9410. "type": {
  9411. "description": "Type of MCP server connection",
  9412. "type": "string",
  9413. "const": "remote"
  9414. },
  9415. "url": {
  9416. "description": "URL of the remote MCP server",
  9417. "type": "string"
  9418. },
  9419. "enabled": {
  9420. "description": "Enable or disable the MCP server on startup",
  9421. "type": "boolean"
  9422. },
  9423. "headers": {
  9424. "description": "Headers to send with the request",
  9425. "type": "object",
  9426. "propertyNames": {
  9427. "type": "string"
  9428. },
  9429. "additionalProperties": {
  9430. "type": "string"
  9431. }
  9432. },
  9433. "oauth": {
  9434. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection.",
  9435. "anyOf": [
  9436. {
  9437. "$ref": "#/components/schemas/McpOAuthConfig"
  9438. },
  9439. {
  9440. "type": "boolean",
  9441. "const": false
  9442. }
  9443. ]
  9444. },
  9445. "timeout": {
  9446. "description": "Timeout in ms for MCP server requests. Defaults to 5000 (5 seconds) if not specified.",
  9447. "type": "integer",
  9448. "exclusiveMinimum": 0,
  9449. "maximum": 9007199254740991
  9450. }
  9451. },
  9452. "required": ["type", "url"],
  9453. "additionalProperties": false
  9454. },
  9455. "LayoutConfig": {
  9456. "description": "@deprecated Always uses stretch layout.",
  9457. "type": "string",
  9458. "enum": ["auto", "stretch"]
  9459. },
  9460. "Config": {
  9461. "type": "object",
  9462. "properties": {
  9463. "$schema": {
  9464. "description": "JSON schema reference for configuration validation",
  9465. "type": "string"
  9466. },
  9467. "theme": {
  9468. "description": "Theme name to use for the interface",
  9469. "type": "string"
  9470. },
  9471. "keybinds": {
  9472. "$ref": "#/components/schemas/KeybindsConfig"
  9473. },
  9474. "logLevel": {
  9475. "$ref": "#/components/schemas/LogLevel"
  9476. },
  9477. "tui": {
  9478. "description": "TUI specific settings",
  9479. "type": "object",
  9480. "properties": {
  9481. "scroll_speed": {
  9482. "description": "TUI scroll speed",
  9483. "type": "number",
  9484. "minimum": 0.001
  9485. },
  9486. "scroll_acceleration": {
  9487. "description": "Scroll acceleration settings",
  9488. "type": "object",
  9489. "properties": {
  9490. "enabled": {
  9491. "description": "Enable scroll acceleration",
  9492. "type": "boolean"
  9493. }
  9494. },
  9495. "required": ["enabled"]
  9496. },
  9497. "diff_style": {
  9498. "description": "Control diff rendering style: 'auto' adapts to terminal width, 'stacked' always shows single column",
  9499. "type": "string",
  9500. "enum": ["auto", "stacked"]
  9501. }
  9502. }
  9503. },
  9504. "server": {
  9505. "$ref": "#/components/schemas/ServerConfig"
  9506. },
  9507. "command": {
  9508. "description": "Command configuration, see https://opencode.ai/docs/commands",
  9509. "type": "object",
  9510. "propertyNames": {
  9511. "type": "string"
  9512. },
  9513. "additionalProperties": {
  9514. "type": "object",
  9515. "properties": {
  9516. "template": {
  9517. "type": "string"
  9518. },
  9519. "description": {
  9520. "type": "string"
  9521. },
  9522. "agent": {
  9523. "type": "string"
  9524. },
  9525. "model": {
  9526. "type": "string"
  9527. },
  9528. "subtask": {
  9529. "type": "boolean"
  9530. }
  9531. },
  9532. "required": ["template"]
  9533. }
  9534. },
  9535. "skills": {
  9536. "description": "Additional skill folder paths",
  9537. "type": "object",
  9538. "properties": {
  9539. "paths": {
  9540. "description": "Additional paths to skill folders",
  9541. "type": "array",
  9542. "items": {
  9543. "type": "string"
  9544. }
  9545. }
  9546. }
  9547. },
  9548. "watcher": {
  9549. "type": "object",
  9550. "properties": {
  9551. "ignore": {
  9552. "type": "array",
  9553. "items": {
  9554. "type": "string"
  9555. }
  9556. }
  9557. }
  9558. },
  9559. "plugin": {
  9560. "type": "array",
  9561. "items": {
  9562. "type": "string"
  9563. }
  9564. },
  9565. "snapshot": {
  9566. "type": "boolean"
  9567. },
  9568. "share": {
  9569. "description": "Control sharing behavior:'manual' allows manual sharing via commands, 'auto' enables automatic sharing, 'disabled' disables all sharing",
  9570. "type": "string",
  9571. "enum": ["manual", "auto", "disabled"]
  9572. },
  9573. "autoshare": {
  9574. "description": "@deprecated Use 'share' field instead. Share newly created sessions automatically",
  9575. "type": "boolean"
  9576. },
  9577. "autoupdate": {
  9578. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications",
  9579. "anyOf": [
  9580. {
  9581. "type": "boolean"
  9582. },
  9583. {
  9584. "type": "string",
  9585. "const": "notify"
  9586. }
  9587. ]
  9588. },
  9589. "disabled_providers": {
  9590. "description": "Disable providers that are loaded automatically",
  9591. "type": "array",
  9592. "items": {
  9593. "type": "string"
  9594. }
  9595. },
  9596. "enabled_providers": {
  9597. "description": "When set, ONLY these providers will be enabled. All other providers will be ignored",
  9598. "type": "array",
  9599. "items": {
  9600. "type": "string"
  9601. }
  9602. },
  9603. "model": {
  9604. "description": "Model to use in the format of provider/model, eg anthropic/claude-2",
  9605. "type": "string"
  9606. },
  9607. "small_model": {
  9608. "description": "Small model to use for tasks like title generation in the format of provider/model",
  9609. "type": "string"
  9610. },
  9611. "default_agent": {
  9612. "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.",
  9613. "type": "string"
  9614. },
  9615. "username": {
  9616. "description": "Custom username to display in conversations instead of system username",
  9617. "type": "string"
  9618. },
  9619. "mode": {
  9620. "description": "@deprecated Use `agent` field instead.",
  9621. "type": "object",
  9622. "properties": {
  9623. "build": {
  9624. "$ref": "#/components/schemas/AgentConfig"
  9625. },
  9626. "plan": {
  9627. "$ref": "#/components/schemas/AgentConfig"
  9628. }
  9629. },
  9630. "additionalProperties": {
  9631. "$ref": "#/components/schemas/AgentConfig"
  9632. }
  9633. },
  9634. "agent": {
  9635. "description": "Agent configuration, see https://opencode.ai/docs/agents",
  9636. "type": "object",
  9637. "properties": {
  9638. "plan": {
  9639. "$ref": "#/components/schemas/AgentConfig"
  9640. },
  9641. "build": {
  9642. "$ref": "#/components/schemas/AgentConfig"
  9643. },
  9644. "general": {
  9645. "$ref": "#/components/schemas/AgentConfig"
  9646. },
  9647. "explore": {
  9648. "$ref": "#/components/schemas/AgentConfig"
  9649. },
  9650. "title": {
  9651. "$ref": "#/components/schemas/AgentConfig"
  9652. },
  9653. "summary": {
  9654. "$ref": "#/components/schemas/AgentConfig"
  9655. },
  9656. "compaction": {
  9657. "$ref": "#/components/schemas/AgentConfig"
  9658. }
  9659. },
  9660. "additionalProperties": {
  9661. "$ref": "#/components/schemas/AgentConfig"
  9662. }
  9663. },
  9664. "provider": {
  9665. "description": "Custom provider configurations and model overrides",
  9666. "type": "object",
  9667. "propertyNames": {
  9668. "type": "string"
  9669. },
  9670. "additionalProperties": {
  9671. "$ref": "#/components/schemas/ProviderConfig"
  9672. }
  9673. },
  9674. "mcp": {
  9675. "description": "MCP (Model Context Protocol) server configurations",
  9676. "type": "object",
  9677. "propertyNames": {
  9678. "type": "string"
  9679. },
  9680. "additionalProperties": {
  9681. "anyOf": [
  9682. {
  9683. "anyOf": [
  9684. {
  9685. "$ref": "#/components/schemas/McpLocalConfig"
  9686. },
  9687. {
  9688. "$ref": "#/components/schemas/McpRemoteConfig"
  9689. }
  9690. ]
  9691. },
  9692. {
  9693. "type": "object",
  9694. "properties": {
  9695. "enabled": {
  9696. "type": "boolean"
  9697. }
  9698. },
  9699. "required": ["enabled"],
  9700. "additionalProperties": false
  9701. }
  9702. ]
  9703. }
  9704. },
  9705. "formatter": {
  9706. "anyOf": [
  9707. {
  9708. "type": "boolean",
  9709. "const": false
  9710. },
  9711. {
  9712. "type": "object",
  9713. "propertyNames": {
  9714. "type": "string"
  9715. },
  9716. "additionalProperties": {
  9717. "type": "object",
  9718. "properties": {
  9719. "disabled": {
  9720. "type": "boolean"
  9721. },
  9722. "command": {
  9723. "type": "array",
  9724. "items": {
  9725. "type": "string"
  9726. }
  9727. },
  9728. "environment": {
  9729. "type": "object",
  9730. "propertyNames": {
  9731. "type": "string"
  9732. },
  9733. "additionalProperties": {
  9734. "type": "string"
  9735. }
  9736. },
  9737. "extensions": {
  9738. "type": "array",
  9739. "items": {
  9740. "type": "string"
  9741. }
  9742. }
  9743. }
  9744. }
  9745. }
  9746. ]
  9747. },
  9748. "lsp": {
  9749. "anyOf": [
  9750. {
  9751. "type": "boolean",
  9752. "const": false
  9753. },
  9754. {
  9755. "type": "object",
  9756. "propertyNames": {
  9757. "type": "string"
  9758. },
  9759. "additionalProperties": {
  9760. "anyOf": [
  9761. {
  9762. "type": "object",
  9763. "properties": {
  9764. "disabled": {
  9765. "type": "boolean",
  9766. "const": true
  9767. }
  9768. },
  9769. "required": ["disabled"]
  9770. },
  9771. {
  9772. "type": "object",
  9773. "properties": {
  9774. "command": {
  9775. "type": "array",
  9776. "items": {
  9777. "type": "string"
  9778. }
  9779. },
  9780. "extensions": {
  9781. "type": "array",
  9782. "items": {
  9783. "type": "string"
  9784. }
  9785. },
  9786. "disabled": {
  9787. "type": "boolean"
  9788. },
  9789. "env": {
  9790. "type": "object",
  9791. "propertyNames": {
  9792. "type": "string"
  9793. },
  9794. "additionalProperties": {
  9795. "type": "string"
  9796. }
  9797. },
  9798. "initialization": {
  9799. "type": "object",
  9800. "propertyNames": {
  9801. "type": "string"
  9802. },
  9803. "additionalProperties": {}
  9804. }
  9805. },
  9806. "required": ["command"]
  9807. }
  9808. ]
  9809. }
  9810. }
  9811. ]
  9812. },
  9813. "instructions": {
  9814. "description": "Additional instruction files or patterns to include",
  9815. "type": "array",
  9816. "items": {
  9817. "type": "string"
  9818. }
  9819. },
  9820. "layout": {
  9821. "$ref": "#/components/schemas/LayoutConfig"
  9822. },
  9823. "permission": {
  9824. "$ref": "#/components/schemas/PermissionConfig"
  9825. },
  9826. "tools": {
  9827. "type": "object",
  9828. "propertyNames": {
  9829. "type": "string"
  9830. },
  9831. "additionalProperties": {
  9832. "type": "boolean"
  9833. }
  9834. },
  9835. "enterprise": {
  9836. "type": "object",
  9837. "properties": {
  9838. "url": {
  9839. "description": "Enterprise URL",
  9840. "type": "string"
  9841. }
  9842. }
  9843. },
  9844. "compaction": {
  9845. "type": "object",
  9846. "properties": {
  9847. "auto": {
  9848. "description": "Enable automatic compaction when context is full (default: true)",
  9849. "type": "boolean"
  9850. },
  9851. "prune": {
  9852. "description": "Enable pruning of old tool outputs (default: true)",
  9853. "type": "boolean"
  9854. }
  9855. }
  9856. },
  9857. "experimental": {
  9858. "type": "object",
  9859. "properties": {
  9860. "disable_paste_summary": {
  9861. "type": "boolean"
  9862. },
  9863. "batch_tool": {
  9864. "description": "Enable the batch tool",
  9865. "type": "boolean"
  9866. },
  9867. "openTelemetry": {
  9868. "description": "Enable OpenTelemetry spans for AI SDK calls (using the 'experimental_telemetry' flag)",
  9869. "type": "boolean"
  9870. },
  9871. "primary_tools": {
  9872. "description": "Tools that should only be available to primary agents.",
  9873. "type": "array",
  9874. "items": {
  9875. "type": "string"
  9876. }
  9877. },
  9878. "continue_loop_on_deny": {
  9879. "description": "Continue the agent loop when a tool call is denied",
  9880. "type": "boolean"
  9881. },
  9882. "mcp_timeout": {
  9883. "description": "Timeout in milliseconds for model context protocol (MCP) requests",
  9884. "type": "integer",
  9885. "exclusiveMinimum": 0,
  9886. "maximum": 9007199254740991
  9887. }
  9888. }
  9889. }
  9890. },
  9891. "additionalProperties": false
  9892. },
  9893. "BadRequestError": {
  9894. "type": "object",
  9895. "properties": {
  9896. "data": {},
  9897. "errors": {
  9898. "type": "array",
  9899. "items": {
  9900. "type": "object",
  9901. "propertyNames": {
  9902. "type": "string"
  9903. },
  9904. "additionalProperties": {}
  9905. }
  9906. },
  9907. "success": {
  9908. "type": "boolean",
  9909. "const": false
  9910. }
  9911. },
  9912. "required": ["data", "errors", "success"]
  9913. },
  9914. "OAuth": {
  9915. "type": "object",
  9916. "properties": {
  9917. "type": {
  9918. "type": "string",
  9919. "const": "oauth"
  9920. },
  9921. "refresh": {
  9922. "type": "string"
  9923. },
  9924. "access": {
  9925. "type": "string"
  9926. },
  9927. "expires": {
  9928. "type": "number"
  9929. },
  9930. "accountId": {
  9931. "type": "string"
  9932. },
  9933. "enterpriseUrl": {
  9934. "type": "string"
  9935. }
  9936. },
  9937. "required": ["type", "refresh", "access", "expires"]
  9938. },
  9939. "ApiAuth": {
  9940. "type": "object",
  9941. "properties": {
  9942. "type": {
  9943. "type": "string",
  9944. "const": "api"
  9945. },
  9946. "key": {
  9947. "type": "string"
  9948. }
  9949. },
  9950. "required": ["type", "key"]
  9951. },
  9952. "WellKnownAuth": {
  9953. "type": "object",
  9954. "properties": {
  9955. "type": {
  9956. "type": "string",
  9957. "const": "wellknown"
  9958. },
  9959. "key": {
  9960. "type": "string"
  9961. },
  9962. "token": {
  9963. "type": "string"
  9964. }
  9965. },
  9966. "required": ["type", "key", "token"]
  9967. },
  9968. "Auth": {
  9969. "anyOf": [
  9970. {
  9971. "$ref": "#/components/schemas/OAuth"
  9972. },
  9973. {
  9974. "$ref": "#/components/schemas/ApiAuth"
  9975. },
  9976. {
  9977. "$ref": "#/components/schemas/WellKnownAuth"
  9978. }
  9979. ]
  9980. },
  9981. "NotFoundError": {
  9982. "type": "object",
  9983. "properties": {
  9984. "name": {
  9985. "type": "string",
  9986. "const": "NotFoundError"
  9987. },
  9988. "data": {
  9989. "type": "object",
  9990. "properties": {
  9991. "message": {
  9992. "type": "string"
  9993. }
  9994. },
  9995. "required": ["message"]
  9996. }
  9997. },
  9998. "required": ["name", "data"]
  9999. },
  10000. "Model": {
  10001. "type": "object",
  10002. "properties": {
  10003. "id": {
  10004. "type": "string"
  10005. },
  10006. "providerID": {
  10007. "type": "string"
  10008. },
  10009. "api": {
  10010. "type": "object",
  10011. "properties": {
  10012. "id": {
  10013. "type": "string"
  10014. },
  10015. "url": {
  10016. "type": "string"
  10017. },
  10018. "npm": {
  10019. "type": "string"
  10020. }
  10021. },
  10022. "required": ["id", "url", "npm"]
  10023. },
  10024. "name": {
  10025. "type": "string"
  10026. },
  10027. "family": {
  10028. "type": "string"
  10029. },
  10030. "capabilities": {
  10031. "type": "object",
  10032. "properties": {
  10033. "temperature": {
  10034. "type": "boolean"
  10035. },
  10036. "reasoning": {
  10037. "type": "boolean"
  10038. },
  10039. "attachment": {
  10040. "type": "boolean"
  10041. },
  10042. "toolcall": {
  10043. "type": "boolean"
  10044. },
  10045. "input": {
  10046. "type": "object",
  10047. "properties": {
  10048. "text": {
  10049. "type": "boolean"
  10050. },
  10051. "audio": {
  10052. "type": "boolean"
  10053. },
  10054. "image": {
  10055. "type": "boolean"
  10056. },
  10057. "video": {
  10058. "type": "boolean"
  10059. },
  10060. "pdf": {
  10061. "type": "boolean"
  10062. }
  10063. },
  10064. "required": ["text", "audio", "image", "video", "pdf"]
  10065. },
  10066. "output": {
  10067. "type": "object",
  10068. "properties": {
  10069. "text": {
  10070. "type": "boolean"
  10071. },
  10072. "audio": {
  10073. "type": "boolean"
  10074. },
  10075. "image": {
  10076. "type": "boolean"
  10077. },
  10078. "video": {
  10079. "type": "boolean"
  10080. },
  10081. "pdf": {
  10082. "type": "boolean"
  10083. }
  10084. },
  10085. "required": ["text", "audio", "image", "video", "pdf"]
  10086. },
  10087. "interleaved": {
  10088. "anyOf": [
  10089. {
  10090. "type": "boolean"
  10091. },
  10092. {
  10093. "type": "object",
  10094. "properties": {
  10095. "field": {
  10096. "type": "string",
  10097. "enum": ["reasoning_content", "reasoning_details"]
  10098. }
  10099. },
  10100. "required": ["field"]
  10101. }
  10102. ]
  10103. }
  10104. },
  10105. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"]
  10106. },
  10107. "cost": {
  10108. "type": "object",
  10109. "properties": {
  10110. "input": {
  10111. "type": "number"
  10112. },
  10113. "output": {
  10114. "type": "number"
  10115. },
  10116. "cache": {
  10117. "type": "object",
  10118. "properties": {
  10119. "read": {
  10120. "type": "number"
  10121. },
  10122. "write": {
  10123. "type": "number"
  10124. }
  10125. },
  10126. "required": ["read", "write"]
  10127. },
  10128. "experimentalOver200K": {
  10129. "type": "object",
  10130. "properties": {
  10131. "input": {
  10132. "type": "number"
  10133. },
  10134. "output": {
  10135. "type": "number"
  10136. },
  10137. "cache": {
  10138. "type": "object",
  10139. "properties": {
  10140. "read": {
  10141. "type": "number"
  10142. },
  10143. "write": {
  10144. "type": "number"
  10145. }
  10146. },
  10147. "required": ["read", "write"]
  10148. }
  10149. },
  10150. "required": ["input", "output", "cache"]
  10151. }
  10152. },
  10153. "required": ["input", "output", "cache"]
  10154. },
  10155. "limit": {
  10156. "type": "object",
  10157. "properties": {
  10158. "context": {
  10159. "type": "number"
  10160. },
  10161. "input": {
  10162. "type": "number"
  10163. },
  10164. "output": {
  10165. "type": "number"
  10166. }
  10167. },
  10168. "required": ["context", "output"]
  10169. },
  10170. "status": {
  10171. "type": "string",
  10172. "enum": ["alpha", "beta", "deprecated", "active"]
  10173. },
  10174. "options": {
  10175. "type": "object",
  10176. "propertyNames": {
  10177. "type": "string"
  10178. },
  10179. "additionalProperties": {}
  10180. },
  10181. "headers": {
  10182. "type": "object",
  10183. "propertyNames": {
  10184. "type": "string"
  10185. },
  10186. "additionalProperties": {
  10187. "type": "string"
  10188. }
  10189. },
  10190. "release_date": {
  10191. "type": "string"
  10192. },
  10193. "variants": {
  10194. "type": "object",
  10195. "propertyNames": {
  10196. "type": "string"
  10197. },
  10198. "additionalProperties": {
  10199. "type": "object",
  10200. "propertyNames": {
  10201. "type": "string"
  10202. },
  10203. "additionalProperties": {}
  10204. }
  10205. }
  10206. },
  10207. "required": [
  10208. "id",
  10209. "providerID",
  10210. "api",
  10211. "name",
  10212. "capabilities",
  10213. "cost",
  10214. "limit",
  10215. "status",
  10216. "options",
  10217. "headers",
  10218. "release_date"
  10219. ]
  10220. },
  10221. "Provider": {
  10222. "type": "object",
  10223. "properties": {
  10224. "id": {
  10225. "type": "string"
  10226. },
  10227. "name": {
  10228. "type": "string"
  10229. },
  10230. "source": {
  10231. "type": "string",
  10232. "enum": ["env", "config", "custom", "api"]
  10233. },
  10234. "env": {
  10235. "type": "array",
  10236. "items": {
  10237. "type": "string"
  10238. }
  10239. },
  10240. "key": {
  10241. "type": "string"
  10242. },
  10243. "options": {
  10244. "type": "object",
  10245. "propertyNames": {
  10246. "type": "string"
  10247. },
  10248. "additionalProperties": {}
  10249. },
  10250. "models": {
  10251. "type": "object",
  10252. "propertyNames": {
  10253. "type": "string"
  10254. },
  10255. "additionalProperties": {
  10256. "$ref": "#/components/schemas/Model"
  10257. }
  10258. }
  10259. },
  10260. "required": ["id", "name", "source", "env", "options", "models"]
  10261. },
  10262. "ToolIDs": {
  10263. "type": "array",
  10264. "items": {
  10265. "type": "string"
  10266. }
  10267. },
  10268. "ToolListItem": {
  10269. "type": "object",
  10270. "properties": {
  10271. "id": {
  10272. "type": "string"
  10273. },
  10274. "description": {
  10275. "type": "string"
  10276. },
  10277. "parameters": {}
  10278. },
  10279. "required": ["id", "description", "parameters"]
  10280. },
  10281. "ToolList": {
  10282. "type": "array",
  10283. "items": {
  10284. "$ref": "#/components/schemas/ToolListItem"
  10285. }
  10286. },
  10287. "Worktree": {
  10288. "type": "object",
  10289. "properties": {
  10290. "name": {
  10291. "type": "string"
  10292. },
  10293. "branch": {
  10294. "type": "string"
  10295. },
  10296. "directory": {
  10297. "type": "string"
  10298. }
  10299. },
  10300. "required": ["name", "branch", "directory"]
  10301. },
  10302. "WorktreeCreateInput": {
  10303. "type": "object",
  10304. "properties": {
  10305. "name": {
  10306. "type": "string"
  10307. },
  10308. "startCommand": {
  10309. "description": "Additional startup script to run after the project's start command",
  10310. "type": "string"
  10311. }
  10312. }
  10313. },
  10314. "WorktreeRemoveInput": {
  10315. "type": "object",
  10316. "properties": {
  10317. "directory": {
  10318. "type": "string"
  10319. }
  10320. },
  10321. "required": ["directory"]
  10322. },
  10323. "WorktreeResetInput": {
  10324. "type": "object",
  10325. "properties": {
  10326. "directory": {
  10327. "type": "string"
  10328. }
  10329. },
  10330. "required": ["directory"]
  10331. },
  10332. "McpResource": {
  10333. "type": "object",
  10334. "properties": {
  10335. "name": {
  10336. "type": "string"
  10337. },
  10338. "uri": {
  10339. "type": "string"
  10340. },
  10341. "description": {
  10342. "type": "string"
  10343. },
  10344. "mimeType": {
  10345. "type": "string"
  10346. },
  10347. "client": {
  10348. "type": "string"
  10349. }
  10350. },
  10351. "required": ["name", "uri", "client"]
  10352. },
  10353. "TextPartInput": {
  10354. "type": "object",
  10355. "properties": {
  10356. "id": {
  10357. "type": "string"
  10358. },
  10359. "type": {
  10360. "type": "string",
  10361. "const": "text"
  10362. },
  10363. "text": {
  10364. "type": "string"
  10365. },
  10366. "synthetic": {
  10367. "type": "boolean"
  10368. },
  10369. "ignored": {
  10370. "type": "boolean"
  10371. },
  10372. "time": {
  10373. "type": "object",
  10374. "properties": {
  10375. "start": {
  10376. "type": "number"
  10377. },
  10378. "end": {
  10379. "type": "number"
  10380. }
  10381. },
  10382. "required": ["start"]
  10383. },
  10384. "metadata": {
  10385. "type": "object",
  10386. "propertyNames": {
  10387. "type": "string"
  10388. },
  10389. "additionalProperties": {}
  10390. }
  10391. },
  10392. "required": ["type", "text"]
  10393. },
  10394. "FilePartInput": {
  10395. "type": "object",
  10396. "properties": {
  10397. "id": {
  10398. "type": "string"
  10399. },
  10400. "type": {
  10401. "type": "string",
  10402. "const": "file"
  10403. },
  10404. "mime": {
  10405. "type": "string"
  10406. },
  10407. "filename": {
  10408. "type": "string"
  10409. },
  10410. "url": {
  10411. "type": "string"
  10412. },
  10413. "source": {
  10414. "$ref": "#/components/schemas/FilePartSource"
  10415. }
  10416. },
  10417. "required": ["type", "mime", "url"]
  10418. },
  10419. "AgentPartInput": {
  10420. "type": "object",
  10421. "properties": {
  10422. "id": {
  10423. "type": "string"
  10424. },
  10425. "type": {
  10426. "type": "string",
  10427. "const": "agent"
  10428. },
  10429. "name": {
  10430. "type": "string"
  10431. },
  10432. "source": {
  10433. "type": "object",
  10434. "properties": {
  10435. "value": {
  10436. "type": "string"
  10437. },
  10438. "start": {
  10439. "type": "integer",
  10440. "minimum": -9007199254740991,
  10441. "maximum": 9007199254740991
  10442. },
  10443. "end": {
  10444. "type": "integer",
  10445. "minimum": -9007199254740991,
  10446. "maximum": 9007199254740991
  10447. }
  10448. },
  10449. "required": ["value", "start", "end"]
  10450. }
  10451. },
  10452. "required": ["type", "name"]
  10453. },
  10454. "SubtaskPartInput": {
  10455. "type": "object",
  10456. "properties": {
  10457. "id": {
  10458. "type": "string"
  10459. },
  10460. "type": {
  10461. "type": "string",
  10462. "const": "subtask"
  10463. },
  10464. "prompt": {
  10465. "type": "string"
  10466. },
  10467. "description": {
  10468. "type": "string"
  10469. },
  10470. "agent": {
  10471. "type": "string"
  10472. },
  10473. "model": {
  10474. "type": "object",
  10475. "properties": {
  10476. "providerID": {
  10477. "type": "string"
  10478. },
  10479. "modelID": {
  10480. "type": "string"
  10481. }
  10482. },
  10483. "required": ["providerID", "modelID"]
  10484. },
  10485. "command": {
  10486. "type": "string"
  10487. }
  10488. },
  10489. "required": ["type", "prompt", "description", "agent"]
  10490. },
  10491. "ProviderAuthMethod": {
  10492. "type": "object",
  10493. "properties": {
  10494. "type": {
  10495. "anyOf": [
  10496. {
  10497. "type": "string",
  10498. "const": "oauth"
  10499. },
  10500. {
  10501. "type": "string",
  10502. "const": "api"
  10503. }
  10504. ]
  10505. },
  10506. "label": {
  10507. "type": "string"
  10508. }
  10509. },
  10510. "required": ["type", "label"]
  10511. },
  10512. "ProviderAuthAuthorization": {
  10513. "type": "object",
  10514. "properties": {
  10515. "url": {
  10516. "type": "string"
  10517. },
  10518. "method": {
  10519. "anyOf": [
  10520. {
  10521. "type": "string",
  10522. "const": "auto"
  10523. },
  10524. {
  10525. "type": "string",
  10526. "const": "code"
  10527. }
  10528. ]
  10529. },
  10530. "instructions": {
  10531. "type": "string"
  10532. }
  10533. },
  10534. "required": ["url", "method", "instructions"]
  10535. },
  10536. "Symbol": {
  10537. "type": "object",
  10538. "properties": {
  10539. "name": {
  10540. "type": "string"
  10541. },
  10542. "kind": {
  10543. "type": "number"
  10544. },
  10545. "location": {
  10546. "type": "object",
  10547. "properties": {
  10548. "uri": {
  10549. "type": "string"
  10550. },
  10551. "range": {
  10552. "$ref": "#/components/schemas/Range"
  10553. }
  10554. },
  10555. "required": ["uri", "range"]
  10556. }
  10557. },
  10558. "required": ["name", "kind", "location"]
  10559. },
  10560. "FileNode": {
  10561. "type": "object",
  10562. "properties": {
  10563. "name": {
  10564. "type": "string"
  10565. },
  10566. "path": {
  10567. "type": "string"
  10568. },
  10569. "absolute": {
  10570. "type": "string"
  10571. },
  10572. "type": {
  10573. "type": "string",
  10574. "enum": ["file", "directory"]
  10575. },
  10576. "ignored": {
  10577. "type": "boolean"
  10578. }
  10579. },
  10580. "required": ["name", "path", "absolute", "type", "ignored"]
  10581. },
  10582. "FileContent": {
  10583. "type": "object",
  10584. "properties": {
  10585. "type": {
  10586. "type": "string",
  10587. "enum": ["text", "binary"]
  10588. },
  10589. "content": {
  10590. "type": "string"
  10591. },
  10592. "diff": {
  10593. "type": "string"
  10594. },
  10595. "patch": {
  10596. "type": "object",
  10597. "properties": {
  10598. "oldFileName": {
  10599. "type": "string"
  10600. },
  10601. "newFileName": {
  10602. "type": "string"
  10603. },
  10604. "oldHeader": {
  10605. "type": "string"
  10606. },
  10607. "newHeader": {
  10608. "type": "string"
  10609. },
  10610. "hunks": {
  10611. "type": "array",
  10612. "items": {
  10613. "type": "object",
  10614. "properties": {
  10615. "oldStart": {
  10616. "type": "number"
  10617. },
  10618. "oldLines": {
  10619. "type": "number"
  10620. },
  10621. "newStart": {
  10622. "type": "number"
  10623. },
  10624. "newLines": {
  10625. "type": "number"
  10626. },
  10627. "lines": {
  10628. "type": "array",
  10629. "items": {
  10630. "type": "string"
  10631. }
  10632. }
  10633. },
  10634. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"]
  10635. }
  10636. },
  10637. "index": {
  10638. "type": "string"
  10639. }
  10640. },
  10641. "required": ["oldFileName", "newFileName", "hunks"]
  10642. },
  10643. "encoding": {
  10644. "type": "string",
  10645. "const": "base64"
  10646. },
  10647. "mimeType": {
  10648. "type": "string"
  10649. }
  10650. },
  10651. "required": ["type", "content"]
  10652. },
  10653. "File": {
  10654. "type": "object",
  10655. "properties": {
  10656. "path": {
  10657. "type": "string"
  10658. },
  10659. "added": {
  10660. "type": "integer",
  10661. "minimum": -9007199254740991,
  10662. "maximum": 9007199254740991
  10663. },
  10664. "removed": {
  10665. "type": "integer",
  10666. "minimum": -9007199254740991,
  10667. "maximum": 9007199254740991
  10668. },
  10669. "status": {
  10670. "type": "string",
  10671. "enum": ["added", "deleted", "modified"]
  10672. }
  10673. },
  10674. "required": ["path", "added", "removed", "status"]
  10675. },
  10676. "MCPStatusConnected": {
  10677. "type": "object",
  10678. "properties": {
  10679. "status": {
  10680. "type": "string",
  10681. "const": "connected"
  10682. }
  10683. },
  10684. "required": ["status"]
  10685. },
  10686. "MCPStatusDisabled": {
  10687. "type": "object",
  10688. "properties": {
  10689. "status": {
  10690. "type": "string",
  10691. "const": "disabled"
  10692. }
  10693. },
  10694. "required": ["status"]
  10695. },
  10696. "MCPStatusFailed": {
  10697. "type": "object",
  10698. "properties": {
  10699. "status": {
  10700. "type": "string",
  10701. "const": "failed"
  10702. },
  10703. "error": {
  10704. "type": "string"
  10705. }
  10706. },
  10707. "required": ["status", "error"]
  10708. },
  10709. "MCPStatusNeedsAuth": {
  10710. "type": "object",
  10711. "properties": {
  10712. "status": {
  10713. "type": "string",
  10714. "const": "needs_auth"
  10715. }
  10716. },
  10717. "required": ["status"]
  10718. },
  10719. "MCPStatusNeedsClientRegistration": {
  10720. "type": "object",
  10721. "properties": {
  10722. "status": {
  10723. "type": "string",
  10724. "const": "needs_client_registration"
  10725. },
  10726. "error": {
  10727. "type": "string"
  10728. }
  10729. },
  10730. "required": ["status", "error"]
  10731. },
  10732. "MCPStatus": {
  10733. "anyOf": [
  10734. {
  10735. "$ref": "#/components/schemas/MCPStatusConnected"
  10736. },
  10737. {
  10738. "$ref": "#/components/schemas/MCPStatusDisabled"
  10739. },
  10740. {
  10741. "$ref": "#/components/schemas/MCPStatusFailed"
  10742. },
  10743. {
  10744. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  10745. },
  10746. {
  10747. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  10748. }
  10749. ]
  10750. },
  10751. "Path": {
  10752. "type": "object",
  10753. "properties": {
  10754. "home": {
  10755. "type": "string"
  10756. },
  10757. "state": {
  10758. "type": "string"
  10759. },
  10760. "config": {
  10761. "type": "string"
  10762. },
  10763. "worktree": {
  10764. "type": "string"
  10765. },
  10766. "directory": {
  10767. "type": "string"
  10768. }
  10769. },
  10770. "required": ["home", "state", "config", "worktree", "directory"]
  10771. },
  10772. "VcsInfo": {
  10773. "type": "object",
  10774. "properties": {
  10775. "branch": {
  10776. "type": "string"
  10777. }
  10778. },
  10779. "required": ["branch"]
  10780. },
  10781. "Command": {
  10782. "type": "object",
  10783. "properties": {
  10784. "name": {
  10785. "type": "string"
  10786. },
  10787. "description": {
  10788. "type": "string"
  10789. },
  10790. "agent": {
  10791. "type": "string"
  10792. },
  10793. "model": {
  10794. "type": "string"
  10795. },
  10796. "source": {
  10797. "type": "string",
  10798. "enum": ["command", "mcp", "skill"]
  10799. },
  10800. "template": {
  10801. "anyOf": [
  10802. {
  10803. "type": "string"
  10804. },
  10805. {
  10806. "type": "string"
  10807. }
  10808. ]
  10809. },
  10810. "subtask": {
  10811. "type": "boolean"
  10812. },
  10813. "hints": {
  10814. "type": "array",
  10815. "items": {
  10816. "type": "string"
  10817. }
  10818. }
  10819. },
  10820. "required": ["name", "template", "hints"]
  10821. },
  10822. "Agent": {
  10823. "type": "object",
  10824. "properties": {
  10825. "name": {
  10826. "type": "string"
  10827. },
  10828. "description": {
  10829. "type": "string"
  10830. },
  10831. "mode": {
  10832. "type": "string",
  10833. "enum": ["subagent", "primary", "all"]
  10834. },
  10835. "native": {
  10836. "type": "boolean"
  10837. },
  10838. "hidden": {
  10839. "type": "boolean"
  10840. },
  10841. "topP": {
  10842. "type": "number"
  10843. },
  10844. "temperature": {
  10845. "type": "number"
  10846. },
  10847. "color": {
  10848. "type": "string"
  10849. },
  10850. "permission": {
  10851. "$ref": "#/components/schemas/PermissionRuleset"
  10852. },
  10853. "model": {
  10854. "type": "object",
  10855. "properties": {
  10856. "modelID": {
  10857. "type": "string"
  10858. },
  10859. "providerID": {
  10860. "type": "string"
  10861. }
  10862. },
  10863. "required": ["modelID", "providerID"]
  10864. },
  10865. "variant": {
  10866. "type": "string"
  10867. },
  10868. "prompt": {
  10869. "type": "string"
  10870. },
  10871. "options": {
  10872. "type": "object",
  10873. "propertyNames": {
  10874. "type": "string"
  10875. },
  10876. "additionalProperties": {}
  10877. },
  10878. "steps": {
  10879. "type": "integer",
  10880. "exclusiveMinimum": 0,
  10881. "maximum": 9007199254740991
  10882. }
  10883. },
  10884. "required": ["name", "mode", "permission", "options"]
  10885. },
  10886. "LSPStatus": {
  10887. "type": "object",
  10888. "properties": {
  10889. "id": {
  10890. "type": "string"
  10891. },
  10892. "name": {
  10893. "type": "string"
  10894. },
  10895. "root": {
  10896. "type": "string"
  10897. },
  10898. "status": {
  10899. "anyOf": [
  10900. {
  10901. "type": "string",
  10902. "const": "connected"
  10903. },
  10904. {
  10905. "type": "string",
  10906. "const": "error"
  10907. }
  10908. ]
  10909. }
  10910. },
  10911. "required": ["id", "name", "root", "status"]
  10912. },
  10913. "FormatterStatus": {
  10914. "type": "object",
  10915. "properties": {
  10916. "name": {
  10917. "type": "string"
  10918. },
  10919. "extensions": {
  10920. "type": "array",
  10921. "items": {
  10922. "type": "string"
  10923. }
  10924. },
  10925. "enabled": {
  10926. "type": "boolean"
  10927. }
  10928. },
  10929. "required": ["name", "extensions", "enabled"]
  10930. }
  10931. }
  10932. }
  10933. }