1
0

openapi.json 609 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197
  1. {
  2. "openapi": "3.1.0",
  3. "info": {
  4. "title": "opencode",
  5. "version": "1.0.0",
  6. "description": "opencode api"
  7. },
  8. "paths": {
  9. "/auth/{providerID}": {
  10. "put": {
  11. "tags": ["control"],
  12. "operationId": "auth.set",
  13. "parameters": [
  14. {
  15. "name": "providerID",
  16. "in": "path",
  17. "schema": {
  18. "type": "string"
  19. },
  20. "required": true
  21. }
  22. ],
  23. "responses": {
  24. "200": {
  25. "description": "Successfully set authentication credentials",
  26. "content": {
  27. "application/json": {
  28. "schema": {
  29. "type": "boolean",
  30. "description": "Successfully set authentication credentials"
  31. }
  32. }
  33. }
  34. },
  35. "400": {
  36. "description": "BadRequest | InvalidRequestError",
  37. "content": {
  38. "application/json": {
  39. "schema": {
  40. "anyOf": [
  41. {
  42. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  43. },
  44. {
  45. "$ref": "#/components/schemas/InvalidRequestError"
  46. }
  47. ]
  48. }
  49. }
  50. }
  51. }
  52. },
  53. "description": "Set authentication credentials",
  54. "summary": "Set auth credentials",
  55. "requestBody": {
  56. "content": {
  57. "application/json": {
  58. "schema": {
  59. "$ref": "#/components/schemas/Auth"
  60. }
  61. }
  62. }
  63. },
  64. "x-codeSamples": [
  65. {
  66. "lang": "js",
  67. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.set({\n ...\n})"
  68. }
  69. ]
  70. },
  71. "delete": {
  72. "tags": ["control"],
  73. "operationId": "auth.remove",
  74. "parameters": [
  75. {
  76. "name": "providerID",
  77. "in": "path",
  78. "schema": {
  79. "type": "string"
  80. },
  81. "required": true
  82. }
  83. ],
  84. "responses": {
  85. "200": {
  86. "description": "Successfully removed authentication credentials",
  87. "content": {
  88. "application/json": {
  89. "schema": {
  90. "type": "boolean",
  91. "description": "Successfully removed authentication credentials"
  92. }
  93. }
  94. }
  95. },
  96. "400": {
  97. "description": "BadRequest | InvalidRequestError",
  98. "content": {
  99. "application/json": {
  100. "schema": {
  101. "anyOf": [
  102. {
  103. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  104. },
  105. {
  106. "$ref": "#/components/schemas/InvalidRequestError"
  107. }
  108. ]
  109. }
  110. }
  111. }
  112. }
  113. },
  114. "description": "Remove authentication credentials",
  115. "summary": "Remove auth credentials",
  116. "x-codeSamples": [
  117. {
  118. "lang": "js",
  119. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.remove({\n ...\n})"
  120. }
  121. ]
  122. }
  123. },
  124. "/log": {
  125. "post": {
  126. "tags": ["control"],
  127. "operationId": "app.log",
  128. "parameters": [
  129. {
  130. "name": "directory",
  131. "in": "query",
  132. "schema": {
  133. "type": "string"
  134. },
  135. "required": false
  136. },
  137. {
  138. "name": "workspace",
  139. "in": "query",
  140. "schema": {
  141. "type": "string"
  142. },
  143. "required": false
  144. }
  145. ],
  146. "responses": {
  147. "200": {
  148. "description": "Log entry written successfully",
  149. "content": {
  150. "application/json": {
  151. "schema": {
  152. "type": "boolean",
  153. "description": "Log entry written successfully"
  154. }
  155. }
  156. }
  157. },
  158. "400": {
  159. "description": "BadRequest | InvalidRequestError",
  160. "content": {
  161. "application/json": {
  162. "schema": {
  163. "anyOf": [
  164. {
  165. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  166. },
  167. {
  168. "$ref": "#/components/schemas/InvalidRequestError"
  169. }
  170. ]
  171. }
  172. }
  173. }
  174. }
  175. },
  176. "description": "Write a log entry to the server logs with specified level and metadata.",
  177. "summary": "Write log",
  178. "requestBody": {
  179. "content": {
  180. "application/json": {
  181. "schema": {
  182. "type": "object",
  183. "properties": {
  184. "service": {
  185. "type": "string",
  186. "description": "Service name for the log entry"
  187. },
  188. "level": {
  189. "type": "string",
  190. "enum": ["debug", "info", "error", "warn"],
  191. "description": "Log level"
  192. },
  193. "message": {
  194. "type": "string",
  195. "description": "Log message"
  196. },
  197. "extra": {
  198. "type": "object"
  199. }
  200. },
  201. "required": ["service", "level", "message"],
  202. "additionalProperties": false
  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.app.log({\n ...\n})"
  211. }
  212. ]
  213. }
  214. },
  215. "/global/health": {
  216. "get": {
  217. "tags": ["global"],
  218. "operationId": "global.health",
  219. "parameters": [],
  220. "responses": {
  221. "200": {
  222. "description": "Health information",
  223. "content": {
  224. "application/json": {
  225. "schema": {
  226. "type": "object",
  227. "properties": {
  228. "healthy": {
  229. "type": "boolean",
  230. "enum": [true]
  231. },
  232. "version": {
  233. "type": "string"
  234. }
  235. },
  236. "required": ["healthy", "version"],
  237. "additionalProperties": false,
  238. "description": "Health information"
  239. }
  240. }
  241. }
  242. },
  243. "400": {
  244. "description": "Bad request",
  245. "content": {
  246. "application/json": {
  247. "schema": {
  248. "$ref": "#/components/schemas/BadRequestError"
  249. }
  250. }
  251. }
  252. }
  253. },
  254. "description": "Get health information about the OpenCode server.",
  255. "summary": "Get health",
  256. "x-codeSamples": [
  257. {
  258. "lang": "js",
  259. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.health({\n ...\n})"
  260. }
  261. ]
  262. }
  263. },
  264. "/global/event": {
  265. "get": {
  266. "tags": ["global"],
  267. "operationId": "global.event",
  268. "parameters": [],
  269. "responses": {
  270. "200": {
  271. "description": "Event stream",
  272. "content": {
  273. "text/event-stream": {
  274. "schema": {
  275. "$ref": "#/components/schemas/GlobalEvent"
  276. }
  277. }
  278. }
  279. },
  280. "400": {
  281. "description": "Bad request",
  282. "content": {
  283. "application/json": {
  284. "schema": {
  285. "$ref": "#/components/schemas/BadRequestError"
  286. }
  287. }
  288. }
  289. }
  290. },
  291. "description": "Subscribe to global events from the OpenCode system using server-sent events.",
  292. "summary": "Get global events",
  293. "x-codeSamples": [
  294. {
  295. "lang": "js",
  296. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.event({\n ...\n})"
  297. }
  298. ]
  299. }
  300. },
  301. "/global/config": {
  302. "get": {
  303. "tags": ["global"],
  304. "operationId": "global.config.get",
  305. "parameters": [],
  306. "responses": {
  307. "200": {
  308. "description": "Get global config info",
  309. "content": {
  310. "application/json": {
  311. "schema": {
  312. "$ref": "#/components/schemas/Config"
  313. }
  314. }
  315. }
  316. },
  317. "400": {
  318. "description": "Bad request",
  319. "content": {
  320. "application/json": {
  321. "schema": {
  322. "$ref": "#/components/schemas/BadRequestError"
  323. }
  324. }
  325. }
  326. }
  327. },
  328. "description": "Retrieve the current global OpenCode configuration settings and preferences.",
  329. "summary": "Get global configuration",
  330. "x-codeSamples": [
  331. {
  332. "lang": "js",
  333. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.get({\n ...\n})"
  334. }
  335. ]
  336. },
  337. "patch": {
  338. "tags": ["global"],
  339. "operationId": "global.config.update",
  340. "parameters": [],
  341. "responses": {
  342. "200": {
  343. "description": "Successfully updated global config",
  344. "content": {
  345. "application/json": {
  346. "schema": {
  347. "$ref": "#/components/schemas/Config"
  348. }
  349. }
  350. }
  351. },
  352. "400": {
  353. "description": "BadRequest | InvalidRequestError",
  354. "content": {
  355. "application/json": {
  356. "schema": {
  357. "anyOf": [
  358. {
  359. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  360. },
  361. {
  362. "$ref": "#/components/schemas/InvalidRequestError"
  363. }
  364. ]
  365. }
  366. }
  367. }
  368. }
  369. },
  370. "description": "Update global OpenCode configuration settings and preferences.",
  371. "summary": "Update global configuration",
  372. "requestBody": {
  373. "content": {
  374. "application/json": {
  375. "schema": {
  376. "$ref": "#/components/schemas/Config"
  377. }
  378. }
  379. }
  380. },
  381. "x-codeSamples": [
  382. {
  383. "lang": "js",
  384. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.update({\n ...\n})"
  385. }
  386. ]
  387. }
  388. },
  389. "/global/dispose": {
  390. "post": {
  391. "tags": ["global"],
  392. "operationId": "global.dispose",
  393. "parameters": [],
  394. "responses": {
  395. "200": {
  396. "description": "Global disposed",
  397. "content": {
  398. "application/json": {
  399. "schema": {
  400. "type": "boolean",
  401. "description": "Global disposed"
  402. }
  403. }
  404. }
  405. },
  406. "400": {
  407. "description": "Bad request",
  408. "content": {
  409. "application/json": {
  410. "schema": {
  411. "$ref": "#/components/schemas/BadRequestError"
  412. }
  413. }
  414. }
  415. }
  416. },
  417. "description": "Clean up and dispose all OpenCode instances, releasing all resources.",
  418. "summary": "Dispose instance",
  419. "x-codeSamples": [
  420. {
  421. "lang": "js",
  422. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.dispose({\n ...\n})"
  423. }
  424. ]
  425. }
  426. },
  427. "/global/upgrade": {
  428. "post": {
  429. "tags": ["global"],
  430. "operationId": "global.upgrade",
  431. "parameters": [],
  432. "responses": {
  433. "200": {
  434. "description": "Upgrade result",
  435. "content": {
  436. "application/json": {
  437. "schema": {
  438. "anyOf": [
  439. {
  440. "type": "object",
  441. "properties": {
  442. "success": {
  443. "type": "boolean",
  444. "enum": [true]
  445. },
  446. "version": {
  447. "type": "string"
  448. }
  449. },
  450. "required": ["success", "version"],
  451. "additionalProperties": false
  452. },
  453. {
  454. "type": "object",
  455. "properties": {
  456. "success": {
  457. "type": "boolean",
  458. "enum": [false]
  459. },
  460. "error": {
  461. "type": "string"
  462. }
  463. },
  464. "required": ["success", "error"],
  465. "additionalProperties": false
  466. }
  467. ],
  468. "description": "Upgrade result"
  469. }
  470. }
  471. }
  472. },
  473. "400": {
  474. "description": "BadRequest | InvalidRequestError",
  475. "content": {
  476. "application/json": {
  477. "schema": {
  478. "anyOf": [
  479. {
  480. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  481. },
  482. {
  483. "$ref": "#/components/schemas/InvalidRequestError"
  484. }
  485. ]
  486. }
  487. }
  488. }
  489. }
  490. },
  491. "description": "Upgrade opencode to the specified version or latest if not specified.",
  492. "summary": "Upgrade opencode",
  493. "requestBody": {
  494. "content": {
  495. "application/json": {
  496. "schema": {
  497. "type": "object",
  498. "properties": {
  499. "target": {
  500. "type": "string"
  501. }
  502. },
  503. "additionalProperties": false
  504. }
  505. }
  506. }
  507. },
  508. "x-codeSamples": [
  509. {
  510. "lang": "js",
  511. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.upgrade({\n ...\n})"
  512. }
  513. ]
  514. }
  515. },
  516. "/event": {
  517. "get": {
  518. "tags": ["event"],
  519. "operationId": "event.subscribe",
  520. "parameters": [
  521. {
  522. "name": "directory",
  523. "in": "query",
  524. "schema": {
  525. "type": "string"
  526. },
  527. "required": false
  528. },
  529. {
  530. "name": "workspace",
  531. "in": "query",
  532. "schema": {
  533. "type": "string"
  534. },
  535. "required": false
  536. }
  537. ],
  538. "responses": {
  539. "200": {
  540. "description": "Event stream",
  541. "content": {
  542. "text/event-stream": {
  543. "schema": {
  544. "$ref": "#/components/schemas/Event"
  545. }
  546. }
  547. }
  548. }
  549. },
  550. "description": "Get events",
  551. "summary": "Subscribe to events",
  552. "x-codeSamples": [
  553. {
  554. "lang": "js",
  555. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.event.subscribe({\n ...\n})"
  556. }
  557. ]
  558. }
  559. },
  560. "/config": {
  561. "get": {
  562. "tags": ["config"],
  563. "operationId": "config.get",
  564. "parameters": [
  565. {
  566. "name": "directory",
  567. "in": "query",
  568. "schema": {
  569. "type": "string"
  570. },
  571. "required": false
  572. },
  573. {
  574. "name": "workspace",
  575. "in": "query",
  576. "schema": {
  577. "type": "string"
  578. },
  579. "required": false
  580. }
  581. ],
  582. "responses": {
  583. "200": {
  584. "description": "Get config info",
  585. "content": {
  586. "application/json": {
  587. "schema": {
  588. "$ref": "#/components/schemas/Config"
  589. }
  590. }
  591. }
  592. },
  593. "400": {
  594. "description": "Bad request",
  595. "content": {
  596. "application/json": {
  597. "schema": {
  598. "$ref": "#/components/schemas/BadRequestError"
  599. }
  600. }
  601. }
  602. }
  603. },
  604. "description": "Retrieve the current OpenCode configuration settings and preferences.",
  605. "summary": "Get configuration",
  606. "x-codeSamples": [
  607. {
  608. "lang": "js",
  609. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.get({\n ...\n})"
  610. }
  611. ]
  612. },
  613. "patch": {
  614. "tags": ["config"],
  615. "operationId": "config.update",
  616. "parameters": [
  617. {
  618. "name": "directory",
  619. "in": "query",
  620. "schema": {
  621. "type": "string"
  622. },
  623. "required": false
  624. },
  625. {
  626. "name": "workspace",
  627. "in": "query",
  628. "schema": {
  629. "type": "string"
  630. },
  631. "required": false
  632. }
  633. ],
  634. "responses": {
  635. "200": {
  636. "description": "Successfully updated config",
  637. "content": {
  638. "application/json": {
  639. "schema": {
  640. "$ref": "#/components/schemas/Config"
  641. }
  642. }
  643. }
  644. },
  645. "400": {
  646. "description": "BadRequest | InvalidRequestError",
  647. "content": {
  648. "application/json": {
  649. "schema": {
  650. "anyOf": [
  651. {
  652. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  653. },
  654. {
  655. "$ref": "#/components/schemas/InvalidRequestError"
  656. }
  657. ]
  658. }
  659. }
  660. }
  661. }
  662. },
  663. "description": "Update OpenCode configuration settings and preferences.",
  664. "summary": "Update configuration",
  665. "requestBody": {
  666. "content": {
  667. "application/json": {
  668. "schema": {
  669. "$ref": "#/components/schemas/Config"
  670. }
  671. }
  672. }
  673. },
  674. "x-codeSamples": [
  675. {
  676. "lang": "js",
  677. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.update({\n ...\n})"
  678. }
  679. ]
  680. }
  681. },
  682. "/config/providers": {
  683. "get": {
  684. "tags": ["config"],
  685. "operationId": "config.providers",
  686. "parameters": [
  687. {
  688. "name": "directory",
  689. "in": "query",
  690. "schema": {
  691. "type": "string"
  692. },
  693. "required": false
  694. },
  695. {
  696. "name": "workspace",
  697. "in": "query",
  698. "schema": {
  699. "type": "string"
  700. },
  701. "required": false
  702. }
  703. ],
  704. "responses": {
  705. "200": {
  706. "description": "List of providers",
  707. "content": {
  708. "application/json": {
  709. "schema": {
  710. "type": "object",
  711. "properties": {
  712. "providers": {
  713. "type": "array",
  714. "items": {
  715. "$ref": "#/components/schemas/Provider"
  716. }
  717. },
  718. "default": {
  719. "type": "object",
  720. "additionalProperties": {
  721. "type": "string"
  722. }
  723. }
  724. },
  725. "required": ["providers", "default"],
  726. "additionalProperties": false,
  727. "description": "List of providers"
  728. }
  729. }
  730. }
  731. },
  732. "400": {
  733. "description": "Bad request",
  734. "content": {
  735. "application/json": {
  736. "schema": {
  737. "$ref": "#/components/schemas/BadRequestError"
  738. }
  739. }
  740. }
  741. }
  742. },
  743. "description": "Get a list of all configured AI providers and their default models.",
  744. "summary": "List config providers",
  745. "x-codeSamples": [
  746. {
  747. "lang": "js",
  748. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.providers({\n ...\n})"
  749. }
  750. ]
  751. }
  752. },
  753. "/experimental/console": {
  754. "get": {
  755. "tags": ["experimental"],
  756. "operationId": "experimental.console.get",
  757. "parameters": [
  758. {
  759. "name": "directory",
  760. "in": "query",
  761. "schema": {
  762. "type": "string"
  763. },
  764. "required": false
  765. },
  766. {
  767. "name": "workspace",
  768. "in": "query",
  769. "schema": {
  770. "type": "string"
  771. },
  772. "required": false
  773. }
  774. ],
  775. "responses": {
  776. "200": {
  777. "description": "Active Console provider metadata",
  778. "content": {
  779. "application/json": {
  780. "schema": {
  781. "$ref": "#/components/schemas/ConsoleState"
  782. }
  783. }
  784. }
  785. },
  786. "400": {
  787. "description": "Bad request",
  788. "content": {
  789. "application/json": {
  790. "schema": {
  791. "$ref": "#/components/schemas/BadRequestError"
  792. }
  793. }
  794. }
  795. },
  796. "500": {
  797. "description": "InternalServerError",
  798. "content": {
  799. "application/json": {
  800. "schema": {
  801. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  802. }
  803. }
  804. }
  805. }
  806. },
  807. "description": "Get the active Console org name and the set of provider IDs managed by that Console org.",
  808. "summary": "Get active Console provider metadata",
  809. "x-codeSamples": [
  810. {
  811. "lang": "js",
  812. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.get({\n ...\n})"
  813. }
  814. ]
  815. }
  816. },
  817. "/experimental/console/orgs": {
  818. "get": {
  819. "tags": ["experimental"],
  820. "operationId": "experimental.console.listOrgs",
  821. "parameters": [
  822. {
  823. "name": "directory",
  824. "in": "query",
  825. "schema": {
  826. "type": "string"
  827. },
  828. "required": false
  829. },
  830. {
  831. "name": "workspace",
  832. "in": "query",
  833. "schema": {
  834. "type": "string"
  835. },
  836. "required": false
  837. }
  838. ],
  839. "responses": {
  840. "200": {
  841. "description": "Switchable Console orgs",
  842. "content": {
  843. "application/json": {
  844. "schema": {
  845. "type": "object",
  846. "properties": {
  847. "orgs": {
  848. "type": "array",
  849. "items": {
  850. "type": "object",
  851. "properties": {
  852. "accountID": {
  853. "type": "string"
  854. },
  855. "accountEmail": {
  856. "type": "string"
  857. },
  858. "accountUrl": {
  859. "type": "string"
  860. },
  861. "orgID": {
  862. "type": "string"
  863. },
  864. "orgName": {
  865. "type": "string"
  866. },
  867. "active": {
  868. "type": "boolean"
  869. }
  870. },
  871. "required": ["accountID", "accountEmail", "accountUrl", "orgID", "orgName", "active"],
  872. "additionalProperties": false
  873. }
  874. }
  875. },
  876. "required": ["orgs"],
  877. "additionalProperties": false,
  878. "description": "Switchable Console orgs"
  879. }
  880. }
  881. }
  882. },
  883. "400": {
  884. "description": "Bad request",
  885. "content": {
  886. "application/json": {
  887. "schema": {
  888. "$ref": "#/components/schemas/BadRequestError"
  889. }
  890. }
  891. }
  892. },
  893. "500": {
  894. "description": "InternalServerError",
  895. "content": {
  896. "application/json": {
  897. "schema": {
  898. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  899. }
  900. }
  901. }
  902. }
  903. },
  904. "description": "Get the available Console orgs across logged-in accounts, including the current active org.",
  905. "summary": "List switchable Console orgs",
  906. "x-codeSamples": [
  907. {
  908. "lang": "js",
  909. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.listOrgs({\n ...\n})"
  910. }
  911. ]
  912. }
  913. },
  914. "/experimental/console/switch": {
  915. "post": {
  916. "tags": ["experimental"],
  917. "operationId": "experimental.console.switchOrg",
  918. "parameters": [
  919. {
  920. "name": "directory",
  921. "in": "query",
  922. "schema": {
  923. "type": "string"
  924. },
  925. "required": false
  926. },
  927. {
  928. "name": "workspace",
  929. "in": "query",
  930. "schema": {
  931. "type": "string"
  932. },
  933. "required": false
  934. }
  935. ],
  936. "responses": {
  937. "200": {
  938. "description": "Switch success",
  939. "content": {
  940. "application/json": {
  941. "schema": {
  942. "type": "boolean",
  943. "description": "Switch success"
  944. }
  945. }
  946. }
  947. }
  948. },
  949. "description": "Persist a new active Console account/org selection for the current local OpenCode state.",
  950. "summary": "Switch active Console org",
  951. "requestBody": {
  952. "content": {
  953. "application/json": {
  954. "schema": {
  955. "type": "object",
  956. "properties": {
  957. "accountID": {
  958. "type": "string"
  959. },
  960. "orgID": {
  961. "type": "string"
  962. }
  963. },
  964. "required": ["accountID", "orgID"],
  965. "additionalProperties": false
  966. }
  967. }
  968. }
  969. },
  970. "x-codeSamples": [
  971. {
  972. "lang": "js",
  973. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.switchOrg({\n ...\n})"
  974. }
  975. ]
  976. }
  977. },
  978. "/experimental/tool": {
  979. "get": {
  980. "tags": ["experimental"],
  981. "operationId": "tool.list",
  982. "parameters": [
  983. {
  984. "name": "directory",
  985. "in": "query",
  986. "schema": {
  987. "type": "string"
  988. },
  989. "required": false
  990. },
  991. {
  992. "name": "workspace",
  993. "in": "query",
  994. "schema": {
  995. "type": "string"
  996. },
  997. "required": false
  998. },
  999. {
  1000. "name": "provider",
  1001. "in": "query",
  1002. "schema": {
  1003. "type": "string"
  1004. },
  1005. "required": true
  1006. },
  1007. {
  1008. "name": "model",
  1009. "in": "query",
  1010. "schema": {
  1011. "type": "string"
  1012. },
  1013. "required": true
  1014. }
  1015. ],
  1016. "responses": {
  1017. "200": {
  1018. "description": "Tools",
  1019. "content": {
  1020. "application/json": {
  1021. "schema": {
  1022. "$ref": "#/components/schemas/ToolList"
  1023. }
  1024. }
  1025. }
  1026. },
  1027. "400": {
  1028. "description": "BadRequest | InvalidRequestError",
  1029. "content": {
  1030. "application/json": {
  1031. "schema": {
  1032. "anyOf": [
  1033. {
  1034. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1035. },
  1036. {
  1037. "$ref": "#/components/schemas/InvalidRequestError"
  1038. }
  1039. ]
  1040. }
  1041. }
  1042. }
  1043. }
  1044. },
  1045. "description": "Get a list of available tools with their JSON schema parameters for a specific provider and model combination.",
  1046. "summary": "List tools",
  1047. "x-codeSamples": [
  1048. {
  1049. "lang": "js",
  1050. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.list({\n ...\n})"
  1051. }
  1052. ]
  1053. }
  1054. },
  1055. "/experimental/tool/ids": {
  1056. "get": {
  1057. "tags": ["experimental"],
  1058. "operationId": "tool.ids",
  1059. "parameters": [
  1060. {
  1061. "name": "directory",
  1062. "in": "query",
  1063. "schema": {
  1064. "type": "string"
  1065. },
  1066. "required": false
  1067. },
  1068. {
  1069. "name": "workspace",
  1070. "in": "query",
  1071. "schema": {
  1072. "type": "string"
  1073. },
  1074. "required": false
  1075. }
  1076. ],
  1077. "responses": {
  1078. "200": {
  1079. "description": "Tool IDs",
  1080. "content": {
  1081. "application/json": {
  1082. "schema": {
  1083. "$ref": "#/components/schemas/ToolIDs"
  1084. }
  1085. }
  1086. }
  1087. },
  1088. "400": {
  1089. "description": "BadRequest | InvalidRequestError",
  1090. "content": {
  1091. "application/json": {
  1092. "schema": {
  1093. "anyOf": [
  1094. {
  1095. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1096. },
  1097. {
  1098. "$ref": "#/components/schemas/InvalidRequestError"
  1099. }
  1100. ]
  1101. }
  1102. }
  1103. }
  1104. }
  1105. },
  1106. "description": "Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.",
  1107. "summary": "List tool IDs",
  1108. "x-codeSamples": [
  1109. {
  1110. "lang": "js",
  1111. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.ids({\n ...\n})"
  1112. }
  1113. ]
  1114. }
  1115. },
  1116. "/experimental/worktree": {
  1117. "get": {
  1118. "tags": ["experimental"],
  1119. "operationId": "worktree.list",
  1120. "parameters": [
  1121. {
  1122. "name": "directory",
  1123. "in": "query",
  1124. "schema": {
  1125. "type": "string"
  1126. },
  1127. "required": false
  1128. },
  1129. {
  1130. "name": "workspace",
  1131. "in": "query",
  1132. "schema": {
  1133. "type": "string"
  1134. },
  1135. "required": false
  1136. }
  1137. ],
  1138. "responses": {
  1139. "200": {
  1140. "description": "List of worktree directories",
  1141. "content": {
  1142. "application/json": {
  1143. "schema": {
  1144. "type": "array",
  1145. "items": {
  1146. "type": "string"
  1147. },
  1148. "description": "List of worktree directories"
  1149. }
  1150. }
  1151. }
  1152. },
  1153. "400": {
  1154. "description": "WorktreeError | InvalidRequestError",
  1155. "content": {
  1156. "application/json": {
  1157. "schema": {
  1158. "anyOf": [
  1159. {
  1160. "$ref": "#/components/schemas/WorktreeError"
  1161. },
  1162. {
  1163. "$ref": "#/components/schemas/InvalidRequestError"
  1164. }
  1165. ]
  1166. }
  1167. }
  1168. }
  1169. }
  1170. },
  1171. "description": "List all sandbox worktrees for the current project.",
  1172. "summary": "List worktrees",
  1173. "x-codeSamples": [
  1174. {
  1175. "lang": "js",
  1176. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.list({\n ...\n})"
  1177. }
  1178. ]
  1179. },
  1180. "post": {
  1181. "tags": ["experimental"],
  1182. "operationId": "worktree.create",
  1183. "parameters": [
  1184. {
  1185. "name": "directory",
  1186. "in": "query",
  1187. "schema": {
  1188. "type": "string"
  1189. },
  1190. "required": false
  1191. },
  1192. {
  1193. "name": "workspace",
  1194. "in": "query",
  1195. "schema": {
  1196. "type": "string"
  1197. },
  1198. "required": false
  1199. }
  1200. ],
  1201. "responses": {
  1202. "200": {
  1203. "description": "Worktree created",
  1204. "content": {
  1205. "application/json": {
  1206. "schema": {
  1207. "$ref": "#/components/schemas/Worktree"
  1208. }
  1209. }
  1210. }
  1211. },
  1212. "400": {
  1213. "description": "WorktreeError | InvalidRequestError",
  1214. "content": {
  1215. "application/json": {
  1216. "schema": {
  1217. "anyOf": [
  1218. {
  1219. "$ref": "#/components/schemas/WorktreeError"
  1220. },
  1221. {
  1222. "$ref": "#/components/schemas/InvalidRequestError"
  1223. }
  1224. ]
  1225. }
  1226. }
  1227. }
  1228. }
  1229. },
  1230. "description": "Create a new git worktree for the current project and run any configured startup scripts.",
  1231. "summary": "Create worktree",
  1232. "requestBody": {
  1233. "content": {
  1234. "application/json": {
  1235. "schema": {
  1236. "$ref": "#/components/schemas/WorktreeCreateInput"
  1237. }
  1238. }
  1239. }
  1240. },
  1241. "x-codeSamples": [
  1242. {
  1243. "lang": "js",
  1244. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.create({\n ...\n})"
  1245. }
  1246. ]
  1247. },
  1248. "delete": {
  1249. "tags": ["experimental"],
  1250. "operationId": "worktree.remove",
  1251. "parameters": [
  1252. {
  1253. "name": "directory",
  1254. "in": "query",
  1255. "schema": {
  1256. "type": "string"
  1257. },
  1258. "required": false
  1259. },
  1260. {
  1261. "name": "workspace",
  1262. "in": "query",
  1263. "schema": {
  1264. "type": "string"
  1265. },
  1266. "required": false
  1267. }
  1268. ],
  1269. "responses": {
  1270. "200": {
  1271. "description": "Worktree removed",
  1272. "content": {
  1273. "application/json": {
  1274. "schema": {
  1275. "type": "boolean",
  1276. "description": "Worktree removed"
  1277. }
  1278. }
  1279. }
  1280. },
  1281. "400": {
  1282. "description": "WorktreeError | InvalidRequestError",
  1283. "content": {
  1284. "application/json": {
  1285. "schema": {
  1286. "anyOf": [
  1287. {
  1288. "$ref": "#/components/schemas/WorktreeError"
  1289. },
  1290. {
  1291. "$ref": "#/components/schemas/InvalidRequestError"
  1292. }
  1293. ]
  1294. }
  1295. }
  1296. }
  1297. }
  1298. },
  1299. "description": "Remove a git worktree and delete its branch.",
  1300. "summary": "Remove worktree",
  1301. "requestBody": {
  1302. "content": {
  1303. "application/json": {
  1304. "schema": {
  1305. "$ref": "#/components/schemas/WorktreeRemoveInput"
  1306. }
  1307. }
  1308. }
  1309. },
  1310. "x-codeSamples": [
  1311. {
  1312. "lang": "js",
  1313. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.remove({\n ...\n})"
  1314. }
  1315. ]
  1316. }
  1317. },
  1318. "/experimental/worktree/reset": {
  1319. "post": {
  1320. "tags": ["experimental"],
  1321. "operationId": "worktree.reset",
  1322. "parameters": [
  1323. {
  1324. "name": "directory",
  1325. "in": "query",
  1326. "schema": {
  1327. "type": "string"
  1328. },
  1329. "required": false
  1330. },
  1331. {
  1332. "name": "workspace",
  1333. "in": "query",
  1334. "schema": {
  1335. "type": "string"
  1336. },
  1337. "required": false
  1338. }
  1339. ],
  1340. "responses": {
  1341. "200": {
  1342. "description": "Worktree reset",
  1343. "content": {
  1344. "application/json": {
  1345. "schema": {
  1346. "type": "boolean",
  1347. "description": "Worktree reset"
  1348. }
  1349. }
  1350. }
  1351. },
  1352. "400": {
  1353. "description": "WorktreeError | InvalidRequestError",
  1354. "content": {
  1355. "application/json": {
  1356. "schema": {
  1357. "anyOf": [
  1358. {
  1359. "$ref": "#/components/schemas/WorktreeError"
  1360. },
  1361. {
  1362. "$ref": "#/components/schemas/InvalidRequestError"
  1363. }
  1364. ]
  1365. }
  1366. }
  1367. }
  1368. }
  1369. },
  1370. "description": "Reset a worktree branch to the primary default branch.",
  1371. "summary": "Reset worktree",
  1372. "requestBody": {
  1373. "content": {
  1374. "application/json": {
  1375. "schema": {
  1376. "$ref": "#/components/schemas/WorktreeResetInput"
  1377. }
  1378. }
  1379. }
  1380. },
  1381. "x-codeSamples": [
  1382. {
  1383. "lang": "js",
  1384. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.reset({\n ...\n})"
  1385. }
  1386. ]
  1387. }
  1388. },
  1389. "/experimental/session": {
  1390. "get": {
  1391. "tags": ["experimental"],
  1392. "operationId": "experimental.session.list",
  1393. "parameters": [
  1394. {
  1395. "name": "directory",
  1396. "in": "query",
  1397. "schema": {
  1398. "type": "string"
  1399. },
  1400. "required": false
  1401. },
  1402. {
  1403. "name": "workspace",
  1404. "in": "query",
  1405. "schema": {
  1406. "type": "string"
  1407. },
  1408. "required": false
  1409. },
  1410. {
  1411. "name": "roots",
  1412. "in": "query",
  1413. "schema": {
  1414. "anyOf": [
  1415. {
  1416. "type": "boolean"
  1417. },
  1418. {
  1419. "type": "string",
  1420. "enum": ["true", "false"]
  1421. }
  1422. ]
  1423. },
  1424. "required": false
  1425. },
  1426. {
  1427. "name": "start",
  1428. "in": "query",
  1429. "schema": {
  1430. "type": "number"
  1431. },
  1432. "required": false
  1433. },
  1434. {
  1435. "name": "cursor",
  1436. "in": "query",
  1437. "schema": {
  1438. "type": "number"
  1439. },
  1440. "required": false
  1441. },
  1442. {
  1443. "name": "search",
  1444. "in": "query",
  1445. "schema": {
  1446. "type": "string"
  1447. },
  1448. "required": false
  1449. },
  1450. {
  1451. "name": "limit",
  1452. "in": "query",
  1453. "schema": {
  1454. "type": "number"
  1455. },
  1456. "required": false
  1457. },
  1458. {
  1459. "name": "archived",
  1460. "in": "query",
  1461. "schema": {
  1462. "anyOf": [
  1463. {
  1464. "type": "boolean"
  1465. },
  1466. {
  1467. "type": "string",
  1468. "enum": ["true", "false"]
  1469. }
  1470. ]
  1471. },
  1472. "required": false
  1473. }
  1474. ],
  1475. "responses": {
  1476. "200": {
  1477. "description": "List of sessions",
  1478. "content": {
  1479. "application/json": {
  1480. "schema": {
  1481. "type": "array",
  1482. "items": {
  1483. "$ref": "#/components/schemas/GlobalSession"
  1484. },
  1485. "description": "List of sessions"
  1486. }
  1487. }
  1488. }
  1489. },
  1490. "400": {
  1491. "description": "Bad request",
  1492. "content": {
  1493. "application/json": {
  1494. "schema": {
  1495. "$ref": "#/components/schemas/BadRequestError"
  1496. }
  1497. }
  1498. }
  1499. }
  1500. },
  1501. "description": "Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.",
  1502. "summary": "List sessions",
  1503. "x-codeSamples": [
  1504. {
  1505. "lang": "js",
  1506. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.list({\n ...\n})"
  1507. }
  1508. ]
  1509. }
  1510. },
  1511. "/experimental/resource": {
  1512. "get": {
  1513. "tags": ["experimental"],
  1514. "operationId": "experimental.resource.list",
  1515. "parameters": [
  1516. {
  1517. "name": "directory",
  1518. "in": "query",
  1519. "schema": {
  1520. "type": "string"
  1521. },
  1522. "required": false
  1523. },
  1524. {
  1525. "name": "workspace",
  1526. "in": "query",
  1527. "schema": {
  1528. "type": "string"
  1529. },
  1530. "required": false
  1531. }
  1532. ],
  1533. "responses": {
  1534. "200": {
  1535. "description": "MCP resources",
  1536. "content": {
  1537. "application/json": {
  1538. "schema": {
  1539. "type": "object",
  1540. "additionalProperties": {
  1541. "$ref": "#/components/schemas/McpResource"
  1542. },
  1543. "description": "MCP resources"
  1544. }
  1545. }
  1546. }
  1547. },
  1548. "400": {
  1549. "description": "Bad request",
  1550. "content": {
  1551. "application/json": {
  1552. "schema": {
  1553. "$ref": "#/components/schemas/BadRequestError"
  1554. }
  1555. }
  1556. }
  1557. }
  1558. },
  1559. "description": "Get all available MCP resources from connected servers. Optionally filter by name.",
  1560. "summary": "Get MCP resources",
  1561. "x-codeSamples": [
  1562. {
  1563. "lang": "js",
  1564. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.resource.list({\n ...\n})"
  1565. }
  1566. ]
  1567. }
  1568. },
  1569. "/find": {
  1570. "get": {
  1571. "tags": ["file"],
  1572. "operationId": "find.text",
  1573. "parameters": [
  1574. {
  1575. "name": "directory",
  1576. "in": "query",
  1577. "schema": {
  1578. "type": "string"
  1579. },
  1580. "required": false
  1581. },
  1582. {
  1583. "name": "workspace",
  1584. "in": "query",
  1585. "schema": {
  1586. "type": "string"
  1587. },
  1588. "required": false
  1589. },
  1590. {
  1591. "name": "pattern",
  1592. "in": "query",
  1593. "schema": {
  1594. "type": "string"
  1595. },
  1596. "required": true
  1597. }
  1598. ],
  1599. "responses": {
  1600. "200": {
  1601. "description": "Matches",
  1602. "content": {
  1603. "application/json": {
  1604. "schema": {
  1605. "type": "array",
  1606. "items": {
  1607. "type": "object",
  1608. "properties": {
  1609. "path": {
  1610. "type": "object",
  1611. "properties": {
  1612. "text": {
  1613. "type": "string"
  1614. }
  1615. },
  1616. "required": ["text"],
  1617. "additionalProperties": false
  1618. },
  1619. "lines": {
  1620. "type": "object",
  1621. "properties": {
  1622. "text": {
  1623. "type": "string"
  1624. }
  1625. },
  1626. "required": ["text"],
  1627. "additionalProperties": false
  1628. },
  1629. "line_number": {
  1630. "type": "integer",
  1631. "minimum": 0
  1632. },
  1633. "absolute_offset": {
  1634. "type": "integer",
  1635. "minimum": 0
  1636. },
  1637. "submatches": {
  1638. "type": "array",
  1639. "items": {
  1640. "type": "object",
  1641. "properties": {
  1642. "match": {
  1643. "type": "object",
  1644. "properties": {
  1645. "text": {
  1646. "type": "string"
  1647. }
  1648. },
  1649. "required": ["text"],
  1650. "additionalProperties": false
  1651. },
  1652. "start": {
  1653. "type": "integer",
  1654. "minimum": 0
  1655. },
  1656. "end": {
  1657. "type": "integer",
  1658. "minimum": 0
  1659. }
  1660. },
  1661. "required": ["match", "start", "end"],
  1662. "additionalProperties": false
  1663. }
  1664. }
  1665. },
  1666. "required": ["path", "lines", "line_number", "absolute_offset", "submatches"],
  1667. "additionalProperties": false
  1668. },
  1669. "description": "Matches"
  1670. }
  1671. }
  1672. }
  1673. },
  1674. "400": {
  1675. "description": "Bad request",
  1676. "content": {
  1677. "application/json": {
  1678. "schema": {
  1679. "$ref": "#/components/schemas/BadRequestError"
  1680. }
  1681. }
  1682. }
  1683. }
  1684. },
  1685. "description": "Search for text patterns across files in the project using ripgrep.",
  1686. "summary": "Find text",
  1687. "x-codeSamples": [
  1688. {
  1689. "lang": "js",
  1690. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
  1691. }
  1692. ]
  1693. }
  1694. },
  1695. "/find/file": {
  1696. "get": {
  1697. "tags": ["file"],
  1698. "operationId": "find.files",
  1699. "parameters": [
  1700. {
  1701. "name": "directory",
  1702. "in": "query",
  1703. "schema": {
  1704. "type": "string"
  1705. },
  1706. "required": false
  1707. },
  1708. {
  1709. "name": "workspace",
  1710. "in": "query",
  1711. "schema": {
  1712. "type": "string"
  1713. },
  1714. "required": false
  1715. },
  1716. {
  1717. "name": "query",
  1718. "in": "query",
  1719. "schema": {
  1720. "type": "string"
  1721. },
  1722. "required": true
  1723. },
  1724. {
  1725. "name": "dirs",
  1726. "in": "query",
  1727. "schema": {
  1728. "type": "string",
  1729. "enum": ["true", "false"]
  1730. },
  1731. "required": false
  1732. },
  1733. {
  1734. "name": "type",
  1735. "in": "query",
  1736. "schema": {
  1737. "type": "string",
  1738. "enum": ["file", "directory"]
  1739. },
  1740. "required": false
  1741. },
  1742. {
  1743. "name": "limit",
  1744. "in": "query",
  1745. "schema": {
  1746. "type": "integer",
  1747. "minimum": 1,
  1748. "maximum": 200
  1749. },
  1750. "required": false
  1751. }
  1752. ],
  1753. "responses": {
  1754. "200": {
  1755. "description": "File paths",
  1756. "content": {
  1757. "application/json": {
  1758. "schema": {
  1759. "type": "array",
  1760. "items": {
  1761. "type": "string"
  1762. },
  1763. "description": "File paths"
  1764. }
  1765. }
  1766. }
  1767. },
  1768. "400": {
  1769. "description": "Bad request",
  1770. "content": {
  1771. "application/json": {
  1772. "schema": {
  1773. "$ref": "#/components/schemas/BadRequestError"
  1774. }
  1775. }
  1776. }
  1777. }
  1778. },
  1779. "description": "Search for files or directories by name or pattern in the project directory.",
  1780. "summary": "Find files",
  1781. "x-codeSamples": [
  1782. {
  1783. "lang": "js",
  1784. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
  1785. }
  1786. ]
  1787. }
  1788. },
  1789. "/find/symbol": {
  1790. "get": {
  1791. "tags": ["file"],
  1792. "operationId": "find.symbols",
  1793. "parameters": [
  1794. {
  1795. "name": "directory",
  1796. "in": "query",
  1797. "schema": {
  1798. "type": "string"
  1799. },
  1800. "required": false
  1801. },
  1802. {
  1803. "name": "workspace",
  1804. "in": "query",
  1805. "schema": {
  1806. "type": "string"
  1807. },
  1808. "required": false
  1809. },
  1810. {
  1811. "name": "query",
  1812. "in": "query",
  1813. "schema": {
  1814. "type": "string"
  1815. },
  1816. "required": true
  1817. }
  1818. ],
  1819. "responses": {
  1820. "200": {
  1821. "description": "Symbols",
  1822. "content": {
  1823. "application/json": {
  1824. "schema": {
  1825. "type": "array",
  1826. "items": {
  1827. "$ref": "#/components/schemas/Symbol"
  1828. },
  1829. "description": "Symbols"
  1830. }
  1831. }
  1832. }
  1833. },
  1834. "400": {
  1835. "description": "Bad request",
  1836. "content": {
  1837. "application/json": {
  1838. "schema": {
  1839. "$ref": "#/components/schemas/BadRequestError"
  1840. }
  1841. }
  1842. }
  1843. }
  1844. },
  1845. "description": "Search for workspace symbols like functions, classes, and variables using LSP.",
  1846. "summary": "Find symbols",
  1847. "x-codeSamples": [
  1848. {
  1849. "lang": "js",
  1850. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
  1851. }
  1852. ]
  1853. }
  1854. },
  1855. "/file": {
  1856. "get": {
  1857. "tags": ["file"],
  1858. "operationId": "file.list",
  1859. "parameters": [
  1860. {
  1861. "name": "directory",
  1862. "in": "query",
  1863. "schema": {
  1864. "type": "string"
  1865. },
  1866. "required": false
  1867. },
  1868. {
  1869. "name": "workspace",
  1870. "in": "query",
  1871. "schema": {
  1872. "type": "string"
  1873. },
  1874. "required": false
  1875. },
  1876. {
  1877. "name": "path",
  1878. "in": "query",
  1879. "schema": {
  1880. "type": "string"
  1881. },
  1882. "required": true
  1883. }
  1884. ],
  1885. "responses": {
  1886. "200": {
  1887. "description": "Files and directories",
  1888. "content": {
  1889. "application/json": {
  1890. "schema": {
  1891. "type": "array",
  1892. "items": {
  1893. "$ref": "#/components/schemas/FileNode"
  1894. },
  1895. "description": "Files and directories"
  1896. }
  1897. }
  1898. }
  1899. },
  1900. "400": {
  1901. "description": "Bad request",
  1902. "content": {
  1903. "application/json": {
  1904. "schema": {
  1905. "$ref": "#/components/schemas/BadRequestError"
  1906. }
  1907. }
  1908. }
  1909. }
  1910. },
  1911. "description": "List files and directories in a specified path.",
  1912. "summary": "List files",
  1913. "x-codeSamples": [
  1914. {
  1915. "lang": "js",
  1916. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
  1917. }
  1918. ]
  1919. }
  1920. },
  1921. "/file/content": {
  1922. "get": {
  1923. "tags": ["file"],
  1924. "operationId": "file.read",
  1925. "parameters": [
  1926. {
  1927. "name": "directory",
  1928. "in": "query",
  1929. "schema": {
  1930. "type": "string"
  1931. },
  1932. "required": false
  1933. },
  1934. {
  1935. "name": "workspace",
  1936. "in": "query",
  1937. "schema": {
  1938. "type": "string"
  1939. },
  1940. "required": false
  1941. },
  1942. {
  1943. "name": "path",
  1944. "in": "query",
  1945. "schema": {
  1946. "type": "string"
  1947. },
  1948. "required": true
  1949. }
  1950. ],
  1951. "responses": {
  1952. "200": {
  1953. "description": "File content",
  1954. "content": {
  1955. "application/json": {
  1956. "schema": {
  1957. "$ref": "#/components/schemas/FileContent"
  1958. }
  1959. }
  1960. }
  1961. },
  1962. "400": {
  1963. "description": "Bad request",
  1964. "content": {
  1965. "application/json": {
  1966. "schema": {
  1967. "$ref": "#/components/schemas/BadRequestError"
  1968. }
  1969. }
  1970. }
  1971. }
  1972. },
  1973. "description": "Read the content of a specified file.",
  1974. "summary": "Read file",
  1975. "x-codeSamples": [
  1976. {
  1977. "lang": "js",
  1978. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
  1979. }
  1980. ]
  1981. }
  1982. },
  1983. "/file/status": {
  1984. "get": {
  1985. "tags": ["file"],
  1986. "operationId": "file.status",
  1987. "parameters": [
  1988. {
  1989. "name": "directory",
  1990. "in": "query",
  1991. "schema": {
  1992. "type": "string"
  1993. },
  1994. "required": false
  1995. },
  1996. {
  1997. "name": "workspace",
  1998. "in": "query",
  1999. "schema": {
  2000. "type": "string"
  2001. },
  2002. "required": false
  2003. }
  2004. ],
  2005. "responses": {
  2006. "200": {
  2007. "description": "File status",
  2008. "content": {
  2009. "application/json": {
  2010. "schema": {
  2011. "type": "array",
  2012. "items": {
  2013. "$ref": "#/components/schemas/File"
  2014. },
  2015. "description": "File status"
  2016. }
  2017. }
  2018. }
  2019. },
  2020. "400": {
  2021. "description": "Bad request",
  2022. "content": {
  2023. "application/json": {
  2024. "schema": {
  2025. "$ref": "#/components/schemas/BadRequestError"
  2026. }
  2027. }
  2028. }
  2029. }
  2030. },
  2031. "description": "Get the git status of all files in the project.",
  2032. "summary": "Get file status",
  2033. "x-codeSamples": [
  2034. {
  2035. "lang": "js",
  2036. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
  2037. }
  2038. ]
  2039. }
  2040. },
  2041. "/instance/dispose": {
  2042. "post": {
  2043. "tags": ["instance"],
  2044. "operationId": "instance.dispose",
  2045. "parameters": [
  2046. {
  2047. "name": "directory",
  2048. "in": "query",
  2049. "schema": {
  2050. "type": "string"
  2051. },
  2052. "required": false
  2053. },
  2054. {
  2055. "name": "workspace",
  2056. "in": "query",
  2057. "schema": {
  2058. "type": "string"
  2059. },
  2060. "required": false
  2061. }
  2062. ],
  2063. "responses": {
  2064. "200": {
  2065. "description": "Instance disposed",
  2066. "content": {
  2067. "application/json": {
  2068. "schema": {
  2069. "type": "boolean",
  2070. "description": "Instance disposed"
  2071. }
  2072. }
  2073. }
  2074. },
  2075. "400": {
  2076. "description": "Bad request",
  2077. "content": {
  2078. "application/json": {
  2079. "schema": {
  2080. "$ref": "#/components/schemas/BadRequestError"
  2081. }
  2082. }
  2083. }
  2084. }
  2085. },
  2086. "description": "Clean up and dispose the current OpenCode instance, releasing all resources.",
  2087. "summary": "Dispose instance",
  2088. "x-codeSamples": [
  2089. {
  2090. "lang": "js",
  2091. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.instance.dispose({\n ...\n})"
  2092. }
  2093. ]
  2094. }
  2095. },
  2096. "/path": {
  2097. "get": {
  2098. "tags": ["instance"],
  2099. "operationId": "path.get",
  2100. "parameters": [
  2101. {
  2102. "name": "directory",
  2103. "in": "query",
  2104. "schema": {
  2105. "type": "string"
  2106. },
  2107. "required": false
  2108. },
  2109. {
  2110. "name": "workspace",
  2111. "in": "query",
  2112. "schema": {
  2113. "type": "string"
  2114. },
  2115. "required": false
  2116. }
  2117. ],
  2118. "responses": {
  2119. "200": {
  2120. "description": "Path",
  2121. "content": {
  2122. "application/json": {
  2123. "schema": {
  2124. "$ref": "#/components/schemas/Path"
  2125. }
  2126. }
  2127. }
  2128. },
  2129. "400": {
  2130. "description": "Bad request",
  2131. "content": {
  2132. "application/json": {
  2133. "schema": {
  2134. "$ref": "#/components/schemas/BadRequestError"
  2135. }
  2136. }
  2137. }
  2138. }
  2139. },
  2140. "description": "Retrieve the current working directory and related path information for the OpenCode instance.",
  2141. "summary": "Get paths",
  2142. "x-codeSamples": [
  2143. {
  2144. "lang": "js",
  2145. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.path.get({\n ...\n})"
  2146. }
  2147. ]
  2148. }
  2149. },
  2150. "/vcs": {
  2151. "get": {
  2152. "tags": ["instance"],
  2153. "operationId": "vcs.get",
  2154. "parameters": [
  2155. {
  2156. "name": "directory",
  2157. "in": "query",
  2158. "schema": {
  2159. "type": "string"
  2160. },
  2161. "required": false
  2162. },
  2163. {
  2164. "name": "workspace",
  2165. "in": "query",
  2166. "schema": {
  2167. "type": "string"
  2168. },
  2169. "required": false
  2170. }
  2171. ],
  2172. "responses": {
  2173. "200": {
  2174. "description": "VCS info",
  2175. "content": {
  2176. "application/json": {
  2177. "schema": {
  2178. "$ref": "#/components/schemas/VcsInfo"
  2179. }
  2180. }
  2181. }
  2182. },
  2183. "400": {
  2184. "description": "Bad request",
  2185. "content": {
  2186. "application/json": {
  2187. "schema": {
  2188. "$ref": "#/components/schemas/BadRequestError"
  2189. }
  2190. }
  2191. }
  2192. }
  2193. },
  2194. "description": "Retrieve version control system (VCS) information for the current project, such as git branch.",
  2195. "summary": "Get VCS info",
  2196. "x-codeSamples": [
  2197. {
  2198. "lang": "js",
  2199. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.get({\n ...\n})"
  2200. }
  2201. ]
  2202. }
  2203. },
  2204. "/vcs/status": {
  2205. "get": {
  2206. "tags": ["instance"],
  2207. "operationId": "vcs.status",
  2208. "parameters": [
  2209. {
  2210. "name": "directory",
  2211. "in": "query",
  2212. "schema": {
  2213. "type": "string"
  2214. },
  2215. "required": false
  2216. },
  2217. {
  2218. "name": "workspace",
  2219. "in": "query",
  2220. "schema": {
  2221. "type": "string"
  2222. },
  2223. "required": false
  2224. }
  2225. ],
  2226. "responses": {
  2227. "200": {
  2228. "description": "VCS status",
  2229. "content": {
  2230. "application/json": {
  2231. "schema": {
  2232. "type": "array",
  2233. "items": {
  2234. "$ref": "#/components/schemas/VcsFileStatus"
  2235. },
  2236. "description": "VCS status"
  2237. }
  2238. }
  2239. }
  2240. },
  2241. "400": {
  2242. "description": "Bad request",
  2243. "content": {
  2244. "application/json": {
  2245. "schema": {
  2246. "$ref": "#/components/schemas/BadRequestError"
  2247. }
  2248. }
  2249. }
  2250. }
  2251. },
  2252. "description": "Retrieve changed files in the current working tree without patches.",
  2253. "summary": "Get VCS status",
  2254. "x-codeSamples": [
  2255. {
  2256. "lang": "js",
  2257. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.status({\n ...\n})"
  2258. }
  2259. ]
  2260. }
  2261. },
  2262. "/vcs/diff": {
  2263. "get": {
  2264. "tags": ["instance"],
  2265. "operationId": "vcs.diff",
  2266. "parameters": [
  2267. {
  2268. "name": "directory",
  2269. "in": "query",
  2270. "schema": {
  2271. "type": "string"
  2272. },
  2273. "required": false
  2274. },
  2275. {
  2276. "name": "workspace",
  2277. "in": "query",
  2278. "schema": {
  2279. "type": "string"
  2280. },
  2281. "required": false
  2282. },
  2283. {
  2284. "name": "mode",
  2285. "in": "query",
  2286. "schema": {
  2287. "type": "string",
  2288. "enum": ["git", "branch"]
  2289. },
  2290. "required": true
  2291. }
  2292. ],
  2293. "responses": {
  2294. "200": {
  2295. "description": "VCS diff",
  2296. "content": {
  2297. "application/json": {
  2298. "schema": {
  2299. "type": "array",
  2300. "items": {
  2301. "$ref": "#/components/schemas/VcsFileDiff"
  2302. },
  2303. "description": "VCS diff"
  2304. }
  2305. }
  2306. }
  2307. },
  2308. "400": {
  2309. "description": "Bad request",
  2310. "content": {
  2311. "application/json": {
  2312. "schema": {
  2313. "$ref": "#/components/schemas/BadRequestError"
  2314. }
  2315. }
  2316. }
  2317. }
  2318. },
  2319. "description": "Retrieve the current git diff for the working tree or against the default branch.",
  2320. "summary": "Get VCS diff",
  2321. "x-codeSamples": [
  2322. {
  2323. "lang": "js",
  2324. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff({\n ...\n})"
  2325. }
  2326. ]
  2327. }
  2328. },
  2329. "/vcs/diff/raw": {
  2330. "get": {
  2331. "tags": ["instance"],
  2332. "operationId": "vcs.diff.raw",
  2333. "parameters": [
  2334. {
  2335. "name": "directory",
  2336. "in": "query",
  2337. "schema": {
  2338. "type": "string"
  2339. },
  2340. "required": false
  2341. },
  2342. {
  2343. "name": "workspace",
  2344. "in": "query",
  2345. "schema": {
  2346. "type": "string"
  2347. },
  2348. "required": false
  2349. }
  2350. ],
  2351. "responses": {
  2352. "200": {
  2353. "description": "Raw VCS diff",
  2354. "content": {
  2355. "text/x-diff; charset=utf-8": {
  2356. "schema": {
  2357. "type": "string"
  2358. }
  2359. }
  2360. }
  2361. },
  2362. "400": {
  2363. "description": "Bad request",
  2364. "content": {
  2365. "application/json": {
  2366. "schema": {
  2367. "$ref": "#/components/schemas/BadRequestError"
  2368. }
  2369. }
  2370. }
  2371. }
  2372. },
  2373. "description": "Retrieve a raw patch for current uncommitted changes.",
  2374. "summary": "Get raw VCS diff",
  2375. "x-codeSamples": [
  2376. {
  2377. "lang": "js",
  2378. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff.raw({\n ...\n})"
  2379. }
  2380. ]
  2381. }
  2382. },
  2383. "/vcs/apply": {
  2384. "post": {
  2385. "tags": ["instance"],
  2386. "operationId": "vcs.apply",
  2387. "parameters": [
  2388. {
  2389. "name": "directory",
  2390. "in": "query",
  2391. "schema": {
  2392. "type": "string"
  2393. },
  2394. "required": false
  2395. },
  2396. {
  2397. "name": "workspace",
  2398. "in": "query",
  2399. "schema": {
  2400. "type": "string"
  2401. },
  2402. "required": false
  2403. }
  2404. ],
  2405. "responses": {
  2406. "200": {
  2407. "description": "VCS patch applied",
  2408. "content": {
  2409. "application/json": {
  2410. "schema": {
  2411. "type": "object",
  2412. "properties": {
  2413. "applied": {
  2414. "type": "boolean"
  2415. }
  2416. },
  2417. "required": ["applied"],
  2418. "additionalProperties": false,
  2419. "description": "VCS patch applied"
  2420. }
  2421. }
  2422. }
  2423. },
  2424. "400": {
  2425. "description": "VcsApplyError | InvalidRequestError",
  2426. "content": {
  2427. "application/json": {
  2428. "schema": {
  2429. "anyOf": [
  2430. {
  2431. "$ref": "#/components/schemas/VcsApplyError"
  2432. },
  2433. {
  2434. "$ref": "#/components/schemas/InvalidRequestError"
  2435. }
  2436. ]
  2437. }
  2438. }
  2439. }
  2440. }
  2441. },
  2442. "description": "Apply a raw patch to the current working tree.",
  2443. "summary": "Apply VCS patch",
  2444. "requestBody": {
  2445. "content": {
  2446. "application/json": {
  2447. "schema": {
  2448. "type": "object",
  2449. "properties": {
  2450. "patch": {
  2451. "type": "string"
  2452. }
  2453. },
  2454. "required": ["patch"],
  2455. "additionalProperties": false
  2456. }
  2457. }
  2458. }
  2459. },
  2460. "x-codeSamples": [
  2461. {
  2462. "lang": "js",
  2463. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.apply({\n ...\n})"
  2464. }
  2465. ]
  2466. }
  2467. },
  2468. "/command": {
  2469. "get": {
  2470. "tags": ["instance"],
  2471. "operationId": "command.list",
  2472. "parameters": [
  2473. {
  2474. "name": "directory",
  2475. "in": "query",
  2476. "schema": {
  2477. "type": "string"
  2478. },
  2479. "required": false
  2480. },
  2481. {
  2482. "name": "workspace",
  2483. "in": "query",
  2484. "schema": {
  2485. "type": "string"
  2486. },
  2487. "required": false
  2488. }
  2489. ],
  2490. "responses": {
  2491. "200": {
  2492. "description": "List of commands",
  2493. "content": {
  2494. "application/json": {
  2495. "schema": {
  2496. "type": "array",
  2497. "items": {
  2498. "$ref": "#/components/schemas/Command"
  2499. },
  2500. "description": "List of commands"
  2501. }
  2502. }
  2503. }
  2504. },
  2505. "400": {
  2506. "description": "Bad request",
  2507. "content": {
  2508. "application/json": {
  2509. "schema": {
  2510. "$ref": "#/components/schemas/BadRequestError"
  2511. }
  2512. }
  2513. }
  2514. }
  2515. },
  2516. "description": "Get a list of all available commands in the OpenCode system.",
  2517. "summary": "List commands",
  2518. "x-codeSamples": [
  2519. {
  2520. "lang": "js",
  2521. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
  2522. }
  2523. ]
  2524. }
  2525. },
  2526. "/agent": {
  2527. "get": {
  2528. "tags": ["instance"],
  2529. "operationId": "app.agents",
  2530. "parameters": [
  2531. {
  2532. "name": "directory",
  2533. "in": "query",
  2534. "schema": {
  2535. "type": "string"
  2536. },
  2537. "required": false
  2538. },
  2539. {
  2540. "name": "workspace",
  2541. "in": "query",
  2542. "schema": {
  2543. "type": "string"
  2544. },
  2545. "required": false
  2546. }
  2547. ],
  2548. "responses": {
  2549. "200": {
  2550. "description": "List of agents",
  2551. "content": {
  2552. "application/json": {
  2553. "schema": {
  2554. "type": "array",
  2555. "items": {
  2556. "$ref": "#/components/schemas/Agent"
  2557. },
  2558. "description": "List of agents"
  2559. }
  2560. }
  2561. }
  2562. },
  2563. "400": {
  2564. "description": "Bad request",
  2565. "content": {
  2566. "application/json": {
  2567. "schema": {
  2568. "$ref": "#/components/schemas/BadRequestError"
  2569. }
  2570. }
  2571. }
  2572. }
  2573. },
  2574. "description": "Get a list of all available AI agents in the OpenCode system.",
  2575. "summary": "List agents",
  2576. "x-codeSamples": [
  2577. {
  2578. "lang": "js",
  2579. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
  2580. }
  2581. ]
  2582. }
  2583. },
  2584. "/skill": {
  2585. "get": {
  2586. "tags": ["instance"],
  2587. "operationId": "app.skills",
  2588. "parameters": [
  2589. {
  2590. "name": "directory",
  2591. "in": "query",
  2592. "schema": {
  2593. "type": "string"
  2594. },
  2595. "required": false
  2596. },
  2597. {
  2598. "name": "workspace",
  2599. "in": "query",
  2600. "schema": {
  2601. "type": "string"
  2602. },
  2603. "required": false
  2604. }
  2605. ],
  2606. "responses": {
  2607. "200": {
  2608. "description": "List of skills",
  2609. "content": {
  2610. "application/json": {
  2611. "schema": {
  2612. "type": "array",
  2613. "items": {
  2614. "type": "object",
  2615. "properties": {
  2616. "name": {
  2617. "type": "string"
  2618. },
  2619. "description": {
  2620. "type": "string"
  2621. },
  2622. "location": {
  2623. "type": "string"
  2624. },
  2625. "content": {
  2626. "type": "string"
  2627. }
  2628. },
  2629. "required": ["name", "location", "content"],
  2630. "additionalProperties": false
  2631. },
  2632. "description": "List of skills"
  2633. }
  2634. }
  2635. }
  2636. },
  2637. "400": {
  2638. "description": "Bad request",
  2639. "content": {
  2640. "application/json": {
  2641. "schema": {
  2642. "$ref": "#/components/schemas/BadRequestError"
  2643. }
  2644. }
  2645. }
  2646. }
  2647. },
  2648. "description": "Get a list of all available skills in the OpenCode system.",
  2649. "summary": "List skills",
  2650. "x-codeSamples": [
  2651. {
  2652. "lang": "js",
  2653. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.skills({\n ...\n})"
  2654. }
  2655. ]
  2656. }
  2657. },
  2658. "/lsp": {
  2659. "get": {
  2660. "tags": ["instance"],
  2661. "operationId": "lsp.status",
  2662. "parameters": [
  2663. {
  2664. "name": "directory",
  2665. "in": "query",
  2666. "schema": {
  2667. "type": "string"
  2668. },
  2669. "required": false
  2670. },
  2671. {
  2672. "name": "workspace",
  2673. "in": "query",
  2674. "schema": {
  2675. "type": "string"
  2676. },
  2677. "required": false
  2678. }
  2679. ],
  2680. "responses": {
  2681. "200": {
  2682. "description": "LSP server status",
  2683. "content": {
  2684. "application/json": {
  2685. "schema": {
  2686. "type": "array",
  2687. "items": {
  2688. "$ref": "#/components/schemas/LSPStatus"
  2689. },
  2690. "description": "LSP server status"
  2691. }
  2692. }
  2693. }
  2694. },
  2695. "400": {
  2696. "description": "Bad request",
  2697. "content": {
  2698. "application/json": {
  2699. "schema": {
  2700. "$ref": "#/components/schemas/BadRequestError"
  2701. }
  2702. }
  2703. }
  2704. }
  2705. },
  2706. "description": "Get LSP server status",
  2707. "summary": "Get LSP status",
  2708. "x-codeSamples": [
  2709. {
  2710. "lang": "js",
  2711. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
  2712. }
  2713. ]
  2714. }
  2715. },
  2716. "/formatter": {
  2717. "get": {
  2718. "tags": ["instance"],
  2719. "operationId": "formatter.status",
  2720. "parameters": [
  2721. {
  2722. "name": "directory",
  2723. "in": "query",
  2724. "schema": {
  2725. "type": "string"
  2726. },
  2727. "required": false
  2728. },
  2729. {
  2730. "name": "workspace",
  2731. "in": "query",
  2732. "schema": {
  2733. "type": "string"
  2734. },
  2735. "required": false
  2736. }
  2737. ],
  2738. "responses": {
  2739. "200": {
  2740. "description": "Formatter status",
  2741. "content": {
  2742. "application/json": {
  2743. "schema": {
  2744. "type": "array",
  2745. "items": {
  2746. "$ref": "#/components/schemas/FormatterStatus"
  2747. },
  2748. "description": "Formatter status"
  2749. }
  2750. }
  2751. }
  2752. },
  2753. "400": {
  2754. "description": "Bad request",
  2755. "content": {
  2756. "application/json": {
  2757. "schema": {
  2758. "$ref": "#/components/schemas/BadRequestError"
  2759. }
  2760. }
  2761. }
  2762. }
  2763. },
  2764. "description": "Get formatter status",
  2765. "summary": "Get formatter status",
  2766. "x-codeSamples": [
  2767. {
  2768. "lang": "js",
  2769. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
  2770. }
  2771. ]
  2772. }
  2773. },
  2774. "/mcp": {
  2775. "get": {
  2776. "tags": ["mcp"],
  2777. "operationId": "mcp.status",
  2778. "parameters": [
  2779. {
  2780. "name": "directory",
  2781. "in": "query",
  2782. "schema": {
  2783. "type": "string"
  2784. },
  2785. "required": false
  2786. },
  2787. {
  2788. "name": "workspace",
  2789. "in": "query",
  2790. "schema": {
  2791. "type": "string"
  2792. },
  2793. "required": false
  2794. }
  2795. ],
  2796. "responses": {
  2797. "200": {
  2798. "description": "MCP server status",
  2799. "content": {
  2800. "application/json": {
  2801. "schema": {
  2802. "type": "object",
  2803. "additionalProperties": {
  2804. "$ref": "#/components/schemas/MCPStatus"
  2805. },
  2806. "description": "MCP server status"
  2807. }
  2808. }
  2809. }
  2810. },
  2811. "400": {
  2812. "description": "Bad request",
  2813. "content": {
  2814. "application/json": {
  2815. "schema": {
  2816. "$ref": "#/components/schemas/BadRequestError"
  2817. }
  2818. }
  2819. }
  2820. }
  2821. },
  2822. "description": "Get the status of all Model Context Protocol (MCP) servers.",
  2823. "summary": "Get MCP status",
  2824. "x-codeSamples": [
  2825. {
  2826. "lang": "js",
  2827. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
  2828. }
  2829. ]
  2830. },
  2831. "post": {
  2832. "tags": ["mcp"],
  2833. "operationId": "mcp.add",
  2834. "parameters": [
  2835. {
  2836. "name": "directory",
  2837. "in": "query",
  2838. "schema": {
  2839. "type": "string"
  2840. },
  2841. "required": false
  2842. },
  2843. {
  2844. "name": "workspace",
  2845. "in": "query",
  2846. "schema": {
  2847. "type": "string"
  2848. },
  2849. "required": false
  2850. }
  2851. ],
  2852. "responses": {
  2853. "200": {
  2854. "description": "MCP server added successfully",
  2855. "content": {
  2856. "application/json": {
  2857. "schema": {
  2858. "type": "object",
  2859. "additionalProperties": {
  2860. "$ref": "#/components/schemas/MCPStatus"
  2861. },
  2862. "description": "MCP server added successfully"
  2863. }
  2864. }
  2865. }
  2866. },
  2867. "400": {
  2868. "description": "BadRequest | InvalidRequestError",
  2869. "content": {
  2870. "application/json": {
  2871. "schema": {
  2872. "anyOf": [
  2873. {
  2874. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  2875. },
  2876. {
  2877. "$ref": "#/components/schemas/InvalidRequestError"
  2878. }
  2879. ]
  2880. }
  2881. }
  2882. }
  2883. }
  2884. },
  2885. "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
  2886. "summary": "Add MCP server",
  2887. "requestBody": {
  2888. "content": {
  2889. "application/json": {
  2890. "schema": {
  2891. "type": "object",
  2892. "properties": {
  2893. "name": {
  2894. "type": "string"
  2895. },
  2896. "config": {
  2897. "anyOf": [
  2898. {
  2899. "$ref": "#/components/schemas/McpLocalConfig"
  2900. },
  2901. {
  2902. "$ref": "#/components/schemas/McpRemoteConfig"
  2903. }
  2904. ]
  2905. }
  2906. },
  2907. "required": ["name", "config"],
  2908. "additionalProperties": false
  2909. }
  2910. }
  2911. }
  2912. },
  2913. "x-codeSamples": [
  2914. {
  2915. "lang": "js",
  2916. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
  2917. }
  2918. ]
  2919. }
  2920. },
  2921. "/mcp/{name}/auth": {
  2922. "post": {
  2923. "tags": ["mcp"],
  2924. "operationId": "mcp.auth.start",
  2925. "parameters": [
  2926. {
  2927. "name": "name",
  2928. "in": "path",
  2929. "schema": {
  2930. "type": "string"
  2931. },
  2932. "required": true
  2933. },
  2934. {
  2935. "name": "directory",
  2936. "in": "query",
  2937. "schema": {
  2938. "type": "string"
  2939. },
  2940. "required": false
  2941. },
  2942. {
  2943. "name": "workspace",
  2944. "in": "query",
  2945. "schema": {
  2946. "type": "string"
  2947. },
  2948. "required": false
  2949. }
  2950. ],
  2951. "responses": {
  2952. "200": {
  2953. "description": "OAuth flow started",
  2954. "content": {
  2955. "application/json": {
  2956. "schema": {
  2957. "type": "object",
  2958. "properties": {
  2959. "authorizationUrl": {
  2960. "type": "string"
  2961. },
  2962. "oauthState": {
  2963. "type": "string"
  2964. }
  2965. },
  2966. "required": ["authorizationUrl", "oauthState"],
  2967. "additionalProperties": false,
  2968. "description": "OAuth flow started"
  2969. }
  2970. }
  2971. }
  2972. },
  2973. "400": {
  2974. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  2975. "content": {
  2976. "application/json": {
  2977. "schema": {
  2978. "anyOf": [
  2979. {
  2980. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  2981. },
  2982. {
  2983. "$ref": "#/components/schemas/InvalidRequestError"
  2984. }
  2985. ]
  2986. }
  2987. }
  2988. }
  2989. },
  2990. "404": {
  2991. "description": "McpServerNotFoundError",
  2992. "content": {
  2993. "application/json": {
  2994. "schema": {
  2995. "$ref": "#/components/schemas/McpServerNotFoundError"
  2996. }
  2997. }
  2998. }
  2999. }
  3000. },
  3001. "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
  3002. "summary": "Start MCP OAuth",
  3003. "x-codeSamples": [
  3004. {
  3005. "lang": "js",
  3006. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
  3007. }
  3008. ]
  3009. },
  3010. "delete": {
  3011. "tags": ["mcp"],
  3012. "operationId": "mcp.auth.remove",
  3013. "parameters": [
  3014. {
  3015. "name": "name",
  3016. "in": "path",
  3017. "schema": {
  3018. "type": "string"
  3019. },
  3020. "required": true
  3021. },
  3022. {
  3023. "name": "directory",
  3024. "in": "query",
  3025. "schema": {
  3026. "type": "string"
  3027. },
  3028. "required": false
  3029. },
  3030. {
  3031. "name": "workspace",
  3032. "in": "query",
  3033. "schema": {
  3034. "type": "string"
  3035. },
  3036. "required": false
  3037. }
  3038. ],
  3039. "responses": {
  3040. "200": {
  3041. "description": "OAuth credentials removed",
  3042. "content": {
  3043. "application/json": {
  3044. "schema": {
  3045. "type": "object",
  3046. "properties": {
  3047. "success": {
  3048. "type": "boolean",
  3049. "enum": [true]
  3050. }
  3051. },
  3052. "required": ["success"],
  3053. "additionalProperties": false,
  3054. "description": "OAuth credentials removed"
  3055. }
  3056. }
  3057. }
  3058. },
  3059. "400": {
  3060. "description": "Bad request",
  3061. "content": {
  3062. "application/json": {
  3063. "schema": {
  3064. "$ref": "#/components/schemas/BadRequestError"
  3065. }
  3066. }
  3067. }
  3068. },
  3069. "404": {
  3070. "description": "McpServerNotFoundError",
  3071. "content": {
  3072. "application/json": {
  3073. "schema": {
  3074. "$ref": "#/components/schemas/McpServerNotFoundError"
  3075. }
  3076. }
  3077. }
  3078. }
  3079. },
  3080. "description": "Remove OAuth credentials for an MCP server.",
  3081. "summary": "Remove MCP OAuth",
  3082. "x-codeSamples": [
  3083. {
  3084. "lang": "js",
  3085. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
  3086. }
  3087. ]
  3088. }
  3089. },
  3090. "/mcp/{name}/auth/callback": {
  3091. "post": {
  3092. "tags": ["mcp"],
  3093. "operationId": "mcp.auth.callback",
  3094. "parameters": [
  3095. {
  3096. "name": "name",
  3097. "in": "path",
  3098. "schema": {
  3099. "type": "string"
  3100. },
  3101. "required": true
  3102. },
  3103. {
  3104. "name": "directory",
  3105. "in": "query",
  3106. "schema": {
  3107. "type": "string"
  3108. },
  3109. "required": false
  3110. },
  3111. {
  3112. "name": "workspace",
  3113. "in": "query",
  3114. "schema": {
  3115. "type": "string"
  3116. },
  3117. "required": false
  3118. }
  3119. ],
  3120. "responses": {
  3121. "200": {
  3122. "description": "OAuth authentication completed",
  3123. "content": {
  3124. "application/json": {
  3125. "schema": {
  3126. "$ref": "#/components/schemas/MCPStatus"
  3127. }
  3128. }
  3129. }
  3130. },
  3131. "400": {
  3132. "description": "BadRequest | InvalidRequestError",
  3133. "content": {
  3134. "application/json": {
  3135. "schema": {
  3136. "anyOf": [
  3137. {
  3138. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3139. },
  3140. {
  3141. "$ref": "#/components/schemas/InvalidRequestError"
  3142. }
  3143. ]
  3144. }
  3145. }
  3146. }
  3147. },
  3148. "404": {
  3149. "description": "McpServerNotFoundError",
  3150. "content": {
  3151. "application/json": {
  3152. "schema": {
  3153. "$ref": "#/components/schemas/McpServerNotFoundError"
  3154. }
  3155. }
  3156. }
  3157. }
  3158. },
  3159. "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
  3160. "summary": "Complete MCP OAuth",
  3161. "requestBody": {
  3162. "content": {
  3163. "application/json": {
  3164. "schema": {
  3165. "type": "object",
  3166. "properties": {
  3167. "code": {
  3168. "type": "string"
  3169. }
  3170. },
  3171. "required": ["code"],
  3172. "additionalProperties": false
  3173. }
  3174. }
  3175. }
  3176. },
  3177. "x-codeSamples": [
  3178. {
  3179. "lang": "js",
  3180. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
  3181. }
  3182. ]
  3183. }
  3184. },
  3185. "/mcp/{name}/auth/authenticate": {
  3186. "post": {
  3187. "tags": ["mcp"],
  3188. "operationId": "mcp.auth.authenticate",
  3189. "parameters": [
  3190. {
  3191. "name": "name",
  3192. "in": "path",
  3193. "schema": {
  3194. "type": "string"
  3195. },
  3196. "required": true
  3197. },
  3198. {
  3199. "name": "directory",
  3200. "in": "query",
  3201. "schema": {
  3202. "type": "string"
  3203. },
  3204. "required": false
  3205. },
  3206. {
  3207. "name": "workspace",
  3208. "in": "query",
  3209. "schema": {
  3210. "type": "string"
  3211. },
  3212. "required": false
  3213. }
  3214. ],
  3215. "responses": {
  3216. "200": {
  3217. "description": "OAuth authentication completed",
  3218. "content": {
  3219. "application/json": {
  3220. "schema": {
  3221. "$ref": "#/components/schemas/MCPStatus"
  3222. }
  3223. }
  3224. }
  3225. },
  3226. "400": {
  3227. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3228. "content": {
  3229. "application/json": {
  3230. "schema": {
  3231. "anyOf": [
  3232. {
  3233. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3234. },
  3235. {
  3236. "$ref": "#/components/schemas/InvalidRequestError"
  3237. }
  3238. ]
  3239. }
  3240. }
  3241. }
  3242. },
  3243. "404": {
  3244. "description": "McpServerNotFoundError",
  3245. "content": {
  3246. "application/json": {
  3247. "schema": {
  3248. "$ref": "#/components/schemas/McpServerNotFoundError"
  3249. }
  3250. }
  3251. }
  3252. }
  3253. },
  3254. "description": "Start OAuth flow and wait for callback (opens browser).",
  3255. "summary": "Authenticate MCP OAuth",
  3256. "x-codeSamples": [
  3257. {
  3258. "lang": "js",
  3259. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
  3260. }
  3261. ]
  3262. }
  3263. },
  3264. "/mcp/{name}/connect": {
  3265. "post": {
  3266. "tags": ["mcp"],
  3267. "operationId": "mcp.connect",
  3268. "parameters": [
  3269. {
  3270. "name": "name",
  3271. "in": "path",
  3272. "schema": {
  3273. "type": "string"
  3274. },
  3275. "required": true
  3276. },
  3277. {
  3278. "name": "directory",
  3279. "in": "query",
  3280. "schema": {
  3281. "type": "string"
  3282. },
  3283. "required": false
  3284. },
  3285. {
  3286. "name": "workspace",
  3287. "in": "query",
  3288. "schema": {
  3289. "type": "string"
  3290. },
  3291. "required": false
  3292. }
  3293. ],
  3294. "responses": {
  3295. "200": {
  3296. "description": "MCP server connected successfully",
  3297. "content": {
  3298. "application/json": {
  3299. "schema": {
  3300. "type": "boolean",
  3301. "description": "MCP server connected successfully"
  3302. }
  3303. }
  3304. }
  3305. },
  3306. "400": {
  3307. "description": "Bad request",
  3308. "content": {
  3309. "application/json": {
  3310. "schema": {
  3311. "$ref": "#/components/schemas/BadRequestError"
  3312. }
  3313. }
  3314. }
  3315. },
  3316. "404": {
  3317. "description": "McpServerNotFoundError",
  3318. "content": {
  3319. "application/json": {
  3320. "schema": {
  3321. "$ref": "#/components/schemas/McpServerNotFoundError"
  3322. }
  3323. }
  3324. }
  3325. }
  3326. },
  3327. "description": "Connect an MCP server.",
  3328. "x-codeSamples": [
  3329. {
  3330. "lang": "js",
  3331. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
  3332. }
  3333. ]
  3334. }
  3335. },
  3336. "/mcp/{name}/disconnect": {
  3337. "post": {
  3338. "tags": ["mcp"],
  3339. "operationId": "mcp.disconnect",
  3340. "parameters": [
  3341. {
  3342. "name": "name",
  3343. "in": "path",
  3344. "schema": {
  3345. "type": "string"
  3346. },
  3347. "required": true
  3348. },
  3349. {
  3350. "name": "directory",
  3351. "in": "query",
  3352. "schema": {
  3353. "type": "string"
  3354. },
  3355. "required": false
  3356. },
  3357. {
  3358. "name": "workspace",
  3359. "in": "query",
  3360. "schema": {
  3361. "type": "string"
  3362. },
  3363. "required": false
  3364. }
  3365. ],
  3366. "responses": {
  3367. "200": {
  3368. "description": "MCP server disconnected successfully",
  3369. "content": {
  3370. "application/json": {
  3371. "schema": {
  3372. "type": "boolean",
  3373. "description": "MCP server disconnected successfully"
  3374. }
  3375. }
  3376. }
  3377. },
  3378. "400": {
  3379. "description": "Bad request",
  3380. "content": {
  3381. "application/json": {
  3382. "schema": {
  3383. "$ref": "#/components/schemas/BadRequestError"
  3384. }
  3385. }
  3386. }
  3387. },
  3388. "404": {
  3389. "description": "McpServerNotFoundError",
  3390. "content": {
  3391. "application/json": {
  3392. "schema": {
  3393. "$ref": "#/components/schemas/McpServerNotFoundError"
  3394. }
  3395. }
  3396. }
  3397. }
  3398. },
  3399. "description": "Disconnect an MCP server.",
  3400. "x-codeSamples": [
  3401. {
  3402. "lang": "js",
  3403. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
  3404. }
  3405. ]
  3406. }
  3407. },
  3408. "/project": {
  3409. "get": {
  3410. "tags": ["project"],
  3411. "operationId": "project.list",
  3412. "parameters": [
  3413. {
  3414. "name": "directory",
  3415. "in": "query",
  3416. "schema": {
  3417. "type": "string"
  3418. },
  3419. "required": false
  3420. },
  3421. {
  3422. "name": "workspace",
  3423. "in": "query",
  3424. "schema": {
  3425. "type": "string"
  3426. },
  3427. "required": false
  3428. }
  3429. ],
  3430. "responses": {
  3431. "200": {
  3432. "description": "List of projects",
  3433. "content": {
  3434. "application/json": {
  3435. "schema": {
  3436. "type": "array",
  3437. "items": {
  3438. "$ref": "#/components/schemas/Project"
  3439. },
  3440. "description": "List of projects"
  3441. }
  3442. }
  3443. }
  3444. },
  3445. "400": {
  3446. "description": "Bad request",
  3447. "content": {
  3448. "application/json": {
  3449. "schema": {
  3450. "$ref": "#/components/schemas/BadRequestError"
  3451. }
  3452. }
  3453. }
  3454. }
  3455. },
  3456. "description": "Get a list of projects that have been opened with OpenCode.",
  3457. "summary": "List all projects",
  3458. "x-codeSamples": [
  3459. {
  3460. "lang": "js",
  3461. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.list({\n ...\n})"
  3462. }
  3463. ]
  3464. }
  3465. },
  3466. "/project/current": {
  3467. "get": {
  3468. "tags": ["project"],
  3469. "operationId": "project.current",
  3470. "parameters": [
  3471. {
  3472. "name": "directory",
  3473. "in": "query",
  3474. "schema": {
  3475. "type": "string"
  3476. },
  3477. "required": false
  3478. },
  3479. {
  3480. "name": "workspace",
  3481. "in": "query",
  3482. "schema": {
  3483. "type": "string"
  3484. },
  3485. "required": false
  3486. }
  3487. ],
  3488. "responses": {
  3489. "200": {
  3490. "description": "Current project information",
  3491. "content": {
  3492. "application/json": {
  3493. "schema": {
  3494. "$ref": "#/components/schemas/Project"
  3495. }
  3496. }
  3497. }
  3498. },
  3499. "400": {
  3500. "description": "Bad request",
  3501. "content": {
  3502. "application/json": {
  3503. "schema": {
  3504. "$ref": "#/components/schemas/BadRequestError"
  3505. }
  3506. }
  3507. }
  3508. }
  3509. },
  3510. "description": "Retrieve the currently active project that OpenCode is working with.",
  3511. "summary": "Get current project",
  3512. "x-codeSamples": [
  3513. {
  3514. "lang": "js",
  3515. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.current({\n ...\n})"
  3516. }
  3517. ]
  3518. }
  3519. },
  3520. "/project/git/init": {
  3521. "post": {
  3522. "tags": ["project"],
  3523. "operationId": "project.initGit",
  3524. "parameters": [
  3525. {
  3526. "name": "directory",
  3527. "in": "query",
  3528. "schema": {
  3529. "type": "string"
  3530. },
  3531. "required": false
  3532. },
  3533. {
  3534. "name": "workspace",
  3535. "in": "query",
  3536. "schema": {
  3537. "type": "string"
  3538. },
  3539. "required": false
  3540. }
  3541. ],
  3542. "responses": {
  3543. "200": {
  3544. "description": "Project information after git initialization",
  3545. "content": {
  3546. "application/json": {
  3547. "schema": {
  3548. "$ref": "#/components/schemas/Project"
  3549. }
  3550. }
  3551. }
  3552. },
  3553. "400": {
  3554. "description": "Bad request",
  3555. "content": {
  3556. "application/json": {
  3557. "schema": {
  3558. "$ref": "#/components/schemas/BadRequestError"
  3559. }
  3560. }
  3561. }
  3562. }
  3563. },
  3564. "description": "Create a git repository for the current project and return the refreshed project info.",
  3565. "summary": "Initialize git repository",
  3566. "x-codeSamples": [
  3567. {
  3568. "lang": "js",
  3569. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.initGit({\n ...\n})"
  3570. }
  3571. ]
  3572. }
  3573. },
  3574. "/project/{projectID}": {
  3575. "patch": {
  3576. "tags": ["project"],
  3577. "operationId": "project.update",
  3578. "parameters": [
  3579. {
  3580. "name": "projectID",
  3581. "in": "path",
  3582. "schema": {
  3583. "type": "string"
  3584. },
  3585. "required": true
  3586. },
  3587. {
  3588. "name": "directory",
  3589. "in": "query",
  3590. "schema": {
  3591. "type": "string"
  3592. },
  3593. "required": false
  3594. },
  3595. {
  3596. "name": "workspace",
  3597. "in": "query",
  3598. "schema": {
  3599. "type": "string"
  3600. },
  3601. "required": false
  3602. }
  3603. ],
  3604. "responses": {
  3605. "200": {
  3606. "description": "Updated project information",
  3607. "content": {
  3608. "application/json": {
  3609. "schema": {
  3610. "$ref": "#/components/schemas/Project"
  3611. }
  3612. }
  3613. }
  3614. },
  3615. "400": {
  3616. "description": "BadRequest | InvalidRequestError",
  3617. "content": {
  3618. "application/json": {
  3619. "schema": {
  3620. "anyOf": [
  3621. {
  3622. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3623. },
  3624. {
  3625. "$ref": "#/components/schemas/InvalidRequestError"
  3626. }
  3627. ]
  3628. }
  3629. }
  3630. }
  3631. },
  3632. "404": {
  3633. "description": "ProjectNotFoundError",
  3634. "content": {
  3635. "application/json": {
  3636. "schema": {
  3637. "$ref": "#/components/schemas/ProjectNotFoundError"
  3638. }
  3639. }
  3640. }
  3641. }
  3642. },
  3643. "description": "Update project properties such as name, icon, and commands.",
  3644. "summary": "Update project",
  3645. "requestBody": {
  3646. "content": {
  3647. "application/json": {
  3648. "schema": {
  3649. "type": "object",
  3650. "properties": {
  3651. "name": {
  3652. "type": "string"
  3653. },
  3654. "icon": {
  3655. "type": "object",
  3656. "properties": {
  3657. "url": {
  3658. "type": "string"
  3659. },
  3660. "override": {
  3661. "type": "string"
  3662. },
  3663. "color": {
  3664. "type": "string"
  3665. }
  3666. },
  3667. "additionalProperties": false
  3668. },
  3669. "commands": {
  3670. "type": "object",
  3671. "properties": {
  3672. "start": {
  3673. "type": "string",
  3674. "description": "Startup script to run when creating a new workspace (worktree)"
  3675. }
  3676. },
  3677. "additionalProperties": false
  3678. }
  3679. },
  3680. "additionalProperties": false
  3681. }
  3682. }
  3683. }
  3684. },
  3685. "x-codeSamples": [
  3686. {
  3687. "lang": "js",
  3688. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.update({\n ...\n})"
  3689. }
  3690. ]
  3691. }
  3692. },
  3693. "/pty/shells": {
  3694. "get": {
  3695. "tags": ["pty"],
  3696. "operationId": "pty.shells",
  3697. "parameters": [
  3698. {
  3699. "name": "directory",
  3700. "in": "query",
  3701. "schema": {
  3702. "type": "string"
  3703. },
  3704. "required": false
  3705. },
  3706. {
  3707. "name": "workspace",
  3708. "in": "query",
  3709. "schema": {
  3710. "type": "string"
  3711. },
  3712. "required": false
  3713. }
  3714. ],
  3715. "responses": {
  3716. "200": {
  3717. "description": "List of shells",
  3718. "content": {
  3719. "application/json": {
  3720. "schema": {
  3721. "type": "array",
  3722. "items": {
  3723. "type": "object",
  3724. "properties": {
  3725. "path": {
  3726. "type": "string"
  3727. },
  3728. "name": {
  3729. "type": "string"
  3730. },
  3731. "acceptable": {
  3732. "type": "boolean"
  3733. }
  3734. },
  3735. "required": ["path", "name", "acceptable"],
  3736. "additionalProperties": false
  3737. },
  3738. "description": "List of shells"
  3739. }
  3740. }
  3741. }
  3742. },
  3743. "400": {
  3744. "description": "Bad request",
  3745. "content": {
  3746. "application/json": {
  3747. "schema": {
  3748. "$ref": "#/components/schemas/BadRequestError"
  3749. }
  3750. }
  3751. }
  3752. }
  3753. },
  3754. "description": "Get a list of available shells on the system.",
  3755. "summary": "List available shells",
  3756. "x-codeSamples": [
  3757. {
  3758. "lang": "js",
  3759. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.shells({\n ...\n})"
  3760. }
  3761. ]
  3762. }
  3763. },
  3764. "/pty": {
  3765. "get": {
  3766. "tags": ["pty"],
  3767. "operationId": "pty.list",
  3768. "parameters": [
  3769. {
  3770. "name": "directory",
  3771. "in": "query",
  3772. "schema": {
  3773. "type": "string"
  3774. },
  3775. "required": false
  3776. },
  3777. {
  3778. "name": "workspace",
  3779. "in": "query",
  3780. "schema": {
  3781. "type": "string"
  3782. },
  3783. "required": false
  3784. }
  3785. ],
  3786. "responses": {
  3787. "200": {
  3788. "description": "List of sessions",
  3789. "content": {
  3790. "application/json": {
  3791. "schema": {
  3792. "type": "array",
  3793. "items": {
  3794. "$ref": "#/components/schemas/Pty"
  3795. },
  3796. "description": "List of sessions"
  3797. }
  3798. }
  3799. }
  3800. },
  3801. "400": {
  3802. "description": "Bad request",
  3803. "content": {
  3804. "application/json": {
  3805. "schema": {
  3806. "$ref": "#/components/schemas/BadRequestError"
  3807. }
  3808. }
  3809. }
  3810. }
  3811. },
  3812. "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
  3813. "summary": "List PTY sessions",
  3814. "x-codeSamples": [
  3815. {
  3816. "lang": "js",
  3817. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
  3818. }
  3819. ]
  3820. },
  3821. "post": {
  3822. "tags": ["pty"],
  3823. "operationId": "pty.create",
  3824. "parameters": [
  3825. {
  3826. "name": "directory",
  3827. "in": "query",
  3828. "schema": {
  3829. "type": "string"
  3830. },
  3831. "required": false
  3832. },
  3833. {
  3834. "name": "workspace",
  3835. "in": "query",
  3836. "schema": {
  3837. "type": "string"
  3838. },
  3839. "required": false
  3840. }
  3841. ],
  3842. "responses": {
  3843. "200": {
  3844. "description": "Created session",
  3845. "content": {
  3846. "application/json": {
  3847. "schema": {
  3848. "$ref": "#/components/schemas/Pty"
  3849. }
  3850. }
  3851. }
  3852. },
  3853. "400": {
  3854. "description": "BadRequest | InvalidRequestError",
  3855. "content": {
  3856. "application/json": {
  3857. "schema": {
  3858. "anyOf": [
  3859. {
  3860. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3861. },
  3862. {
  3863. "$ref": "#/components/schemas/InvalidRequestError"
  3864. }
  3865. ]
  3866. }
  3867. }
  3868. }
  3869. }
  3870. },
  3871. "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
  3872. "summary": "Create PTY session",
  3873. "requestBody": {
  3874. "content": {
  3875. "application/json": {
  3876. "schema": {
  3877. "type": "object",
  3878. "properties": {
  3879. "command": {
  3880. "type": "string"
  3881. },
  3882. "args": {
  3883. "type": "array",
  3884. "items": {
  3885. "type": "string"
  3886. }
  3887. },
  3888. "cwd": {
  3889. "type": "string"
  3890. },
  3891. "title": {
  3892. "type": "string"
  3893. },
  3894. "env": {
  3895. "type": "object",
  3896. "additionalProperties": {
  3897. "type": "string"
  3898. }
  3899. }
  3900. },
  3901. "additionalProperties": false
  3902. }
  3903. }
  3904. }
  3905. },
  3906. "x-codeSamples": [
  3907. {
  3908. "lang": "js",
  3909. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
  3910. }
  3911. ]
  3912. }
  3913. },
  3914. "/pty/{ptyID}": {
  3915. "get": {
  3916. "tags": ["pty"],
  3917. "operationId": "pty.get",
  3918. "parameters": [
  3919. {
  3920. "name": "ptyID",
  3921. "in": "path",
  3922. "schema": {
  3923. "type": "string",
  3924. "pattern": "^pty"
  3925. },
  3926. "required": true
  3927. },
  3928. {
  3929. "name": "directory",
  3930. "in": "query",
  3931. "schema": {
  3932. "type": "string"
  3933. },
  3934. "required": false
  3935. },
  3936. {
  3937. "name": "workspace",
  3938. "in": "query",
  3939. "schema": {
  3940. "type": "string"
  3941. },
  3942. "required": false
  3943. }
  3944. ],
  3945. "responses": {
  3946. "200": {
  3947. "description": "Session info",
  3948. "content": {
  3949. "application/json": {
  3950. "schema": {
  3951. "$ref": "#/components/schemas/Pty"
  3952. }
  3953. }
  3954. }
  3955. },
  3956. "400": {
  3957. "description": "Bad request",
  3958. "content": {
  3959. "application/json": {
  3960. "schema": {
  3961. "$ref": "#/components/schemas/BadRequestError"
  3962. }
  3963. }
  3964. }
  3965. },
  3966. "404": {
  3967. "description": "PtyNotFoundError",
  3968. "content": {
  3969. "application/json": {
  3970. "schema": {
  3971. "$ref": "#/components/schemas/PtyNotFoundError"
  3972. }
  3973. }
  3974. }
  3975. }
  3976. },
  3977. "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
  3978. "summary": "Get PTY session",
  3979. "x-codeSamples": [
  3980. {
  3981. "lang": "js",
  3982. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
  3983. }
  3984. ]
  3985. },
  3986. "put": {
  3987. "tags": ["pty"],
  3988. "operationId": "pty.update",
  3989. "parameters": [
  3990. {
  3991. "name": "ptyID",
  3992. "in": "path",
  3993. "schema": {
  3994. "type": "string",
  3995. "pattern": "^pty"
  3996. },
  3997. "required": true
  3998. },
  3999. {
  4000. "name": "directory",
  4001. "in": "query",
  4002. "schema": {
  4003. "type": "string"
  4004. },
  4005. "required": false
  4006. },
  4007. {
  4008. "name": "workspace",
  4009. "in": "query",
  4010. "schema": {
  4011. "type": "string"
  4012. },
  4013. "required": false
  4014. }
  4015. ],
  4016. "responses": {
  4017. "200": {
  4018. "description": "Updated session",
  4019. "content": {
  4020. "application/json": {
  4021. "schema": {
  4022. "$ref": "#/components/schemas/Pty"
  4023. }
  4024. }
  4025. }
  4026. },
  4027. "400": {
  4028. "description": "BadRequest | InvalidRequestError",
  4029. "content": {
  4030. "application/json": {
  4031. "schema": {
  4032. "anyOf": [
  4033. {
  4034. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4035. },
  4036. {
  4037. "$ref": "#/components/schemas/InvalidRequestError"
  4038. }
  4039. ]
  4040. }
  4041. }
  4042. }
  4043. },
  4044. "404": {
  4045. "description": "PtyNotFoundError",
  4046. "content": {
  4047. "application/json": {
  4048. "schema": {
  4049. "$ref": "#/components/schemas/PtyNotFoundError"
  4050. }
  4051. }
  4052. }
  4053. }
  4054. },
  4055. "description": "Update properties of an existing pseudo-terminal (PTY) session.",
  4056. "summary": "Update PTY session",
  4057. "requestBody": {
  4058. "content": {
  4059. "application/json": {
  4060. "schema": {
  4061. "type": "object",
  4062. "properties": {
  4063. "title": {
  4064. "type": "string"
  4065. },
  4066. "size": {
  4067. "type": "object",
  4068. "properties": {
  4069. "rows": {
  4070. "type": "integer",
  4071. "exclusiveMinimum": 0
  4072. },
  4073. "cols": {
  4074. "type": "integer",
  4075. "exclusiveMinimum": 0
  4076. }
  4077. },
  4078. "required": ["rows", "cols"],
  4079. "additionalProperties": false
  4080. }
  4081. },
  4082. "additionalProperties": false
  4083. }
  4084. }
  4085. }
  4086. },
  4087. "x-codeSamples": [
  4088. {
  4089. "lang": "js",
  4090. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
  4091. }
  4092. ]
  4093. },
  4094. "delete": {
  4095. "tags": ["pty"],
  4096. "operationId": "pty.remove",
  4097. "parameters": [
  4098. {
  4099. "name": "ptyID",
  4100. "in": "path",
  4101. "schema": {
  4102. "type": "string",
  4103. "pattern": "^pty"
  4104. },
  4105. "required": true
  4106. },
  4107. {
  4108. "name": "directory",
  4109. "in": "query",
  4110. "schema": {
  4111. "type": "string"
  4112. },
  4113. "required": false
  4114. },
  4115. {
  4116. "name": "workspace",
  4117. "in": "query",
  4118. "schema": {
  4119. "type": "string"
  4120. },
  4121. "required": false
  4122. }
  4123. ],
  4124. "responses": {
  4125. "200": {
  4126. "description": "Session removed",
  4127. "content": {
  4128. "application/json": {
  4129. "schema": {
  4130. "type": "boolean",
  4131. "description": "Session removed"
  4132. }
  4133. }
  4134. }
  4135. },
  4136. "400": {
  4137. "description": "Bad request",
  4138. "content": {
  4139. "application/json": {
  4140. "schema": {
  4141. "$ref": "#/components/schemas/BadRequestError"
  4142. }
  4143. }
  4144. }
  4145. },
  4146. "404": {
  4147. "description": "PtyNotFoundError",
  4148. "content": {
  4149. "application/json": {
  4150. "schema": {
  4151. "$ref": "#/components/schemas/PtyNotFoundError"
  4152. }
  4153. }
  4154. }
  4155. }
  4156. },
  4157. "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
  4158. "summary": "Remove PTY session",
  4159. "x-codeSamples": [
  4160. {
  4161. "lang": "js",
  4162. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
  4163. }
  4164. ]
  4165. }
  4166. },
  4167. "/pty/{ptyID}/connect-token": {
  4168. "post": {
  4169. "tags": ["pty"],
  4170. "operationId": "pty.connectToken",
  4171. "parameters": [
  4172. {
  4173. "name": "ptyID",
  4174. "in": "path",
  4175. "schema": {
  4176. "type": "string",
  4177. "pattern": "^pty"
  4178. },
  4179. "required": true
  4180. },
  4181. {
  4182. "name": "directory",
  4183. "in": "query",
  4184. "schema": {
  4185. "type": "string"
  4186. },
  4187. "required": false
  4188. },
  4189. {
  4190. "name": "workspace",
  4191. "in": "query",
  4192. "schema": {
  4193. "type": "string"
  4194. },
  4195. "required": false
  4196. }
  4197. ],
  4198. "responses": {
  4199. "200": {
  4200. "description": "WebSocket connect token",
  4201. "content": {
  4202. "application/json": {
  4203. "schema": {
  4204. "type": "object",
  4205. "properties": {
  4206. "ticket": {
  4207. "type": "string"
  4208. },
  4209. "expires_in": {
  4210. "type": "integer",
  4211. "exclusiveMinimum": 0
  4212. }
  4213. },
  4214. "required": ["ticket", "expires_in"],
  4215. "additionalProperties": false,
  4216. "description": "WebSocket connect token"
  4217. }
  4218. }
  4219. }
  4220. },
  4221. "400": {
  4222. "description": "Bad request",
  4223. "content": {
  4224. "application/json": {
  4225. "schema": {
  4226. "$ref": "#/components/schemas/BadRequestError"
  4227. }
  4228. }
  4229. }
  4230. },
  4231. "403": {
  4232. "description": "PtyForbiddenError",
  4233. "content": {
  4234. "application/json": {
  4235. "schema": {
  4236. "$ref": "#/components/schemas/PtyForbiddenError"
  4237. }
  4238. }
  4239. }
  4240. },
  4241. "404": {
  4242. "description": "PtyNotFoundError",
  4243. "content": {
  4244. "application/json": {
  4245. "schema": {
  4246. "$ref": "#/components/schemas/PtyNotFoundError"
  4247. }
  4248. }
  4249. }
  4250. }
  4251. },
  4252. "description": "Create a short-lived ticket for opening a PTY WebSocket connection.",
  4253. "summary": "Create PTY WebSocket token",
  4254. "x-codeSamples": [
  4255. {
  4256. "lang": "js",
  4257. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connectToken({\n ...\n})"
  4258. }
  4259. ]
  4260. }
  4261. },
  4262. "/question": {
  4263. "get": {
  4264. "tags": ["question"],
  4265. "operationId": "question.list",
  4266. "parameters": [
  4267. {
  4268. "name": "directory",
  4269. "in": "query",
  4270. "schema": {
  4271. "type": "string"
  4272. },
  4273. "required": false
  4274. },
  4275. {
  4276. "name": "workspace",
  4277. "in": "query",
  4278. "schema": {
  4279. "type": "string"
  4280. },
  4281. "required": false
  4282. }
  4283. ],
  4284. "responses": {
  4285. "200": {
  4286. "description": "List of pending questions",
  4287. "content": {
  4288. "application/json": {
  4289. "schema": {
  4290. "type": "array",
  4291. "items": {
  4292. "$ref": "#/components/schemas/QuestionRequest"
  4293. },
  4294. "description": "List of pending questions"
  4295. }
  4296. }
  4297. }
  4298. },
  4299. "400": {
  4300. "description": "Bad request",
  4301. "content": {
  4302. "application/json": {
  4303. "schema": {
  4304. "$ref": "#/components/schemas/BadRequestError"
  4305. }
  4306. }
  4307. }
  4308. }
  4309. },
  4310. "description": "Get all pending question requests across all sessions.",
  4311. "summary": "List pending questions",
  4312. "x-codeSamples": [
  4313. {
  4314. "lang": "js",
  4315. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
  4316. }
  4317. ]
  4318. }
  4319. },
  4320. "/question/{requestID}/reply": {
  4321. "post": {
  4322. "tags": ["question"],
  4323. "operationId": "question.reply",
  4324. "parameters": [
  4325. {
  4326. "name": "requestID",
  4327. "in": "path",
  4328. "schema": {
  4329. "type": "string",
  4330. "pattern": "^que"
  4331. },
  4332. "required": true
  4333. },
  4334. {
  4335. "name": "directory",
  4336. "in": "query",
  4337. "schema": {
  4338. "type": "string"
  4339. },
  4340. "required": false
  4341. },
  4342. {
  4343. "name": "workspace",
  4344. "in": "query",
  4345. "schema": {
  4346. "type": "string"
  4347. },
  4348. "required": false
  4349. }
  4350. ],
  4351. "responses": {
  4352. "200": {
  4353. "description": "Question answered successfully",
  4354. "content": {
  4355. "application/json": {
  4356. "schema": {
  4357. "type": "boolean",
  4358. "description": "Question answered successfully"
  4359. }
  4360. }
  4361. }
  4362. },
  4363. "400": {
  4364. "description": "BadRequest | InvalidRequestError",
  4365. "content": {
  4366. "application/json": {
  4367. "schema": {
  4368. "anyOf": [
  4369. {
  4370. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4371. },
  4372. {
  4373. "$ref": "#/components/schemas/InvalidRequestError"
  4374. }
  4375. ]
  4376. }
  4377. }
  4378. }
  4379. },
  4380. "404": {
  4381. "description": "QuestionNotFoundError",
  4382. "content": {
  4383. "application/json": {
  4384. "schema": {
  4385. "$ref": "#/components/schemas/QuestionNotFoundError"
  4386. }
  4387. }
  4388. }
  4389. }
  4390. },
  4391. "description": "Provide answers to a question request from the AI assistant.",
  4392. "summary": "Reply to question request",
  4393. "requestBody": {
  4394. "content": {
  4395. "application/json": {
  4396. "schema": {
  4397. "type": "object",
  4398. "properties": {
  4399. "answers": {
  4400. "type": "array",
  4401. "items": {
  4402. "$ref": "#/components/schemas/QuestionAnswer"
  4403. },
  4404. "description": "User answers in order of questions (each answer is an array of selected labels)"
  4405. }
  4406. },
  4407. "required": ["answers"],
  4408. "additionalProperties": false
  4409. }
  4410. }
  4411. }
  4412. },
  4413. "x-codeSamples": [
  4414. {
  4415. "lang": "js",
  4416. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
  4417. }
  4418. ]
  4419. }
  4420. },
  4421. "/question/{requestID}/reject": {
  4422. "post": {
  4423. "tags": ["question"],
  4424. "operationId": "question.reject",
  4425. "parameters": [
  4426. {
  4427. "name": "requestID",
  4428. "in": "path",
  4429. "schema": {
  4430. "type": "string",
  4431. "pattern": "^que"
  4432. },
  4433. "required": true
  4434. },
  4435. {
  4436. "name": "directory",
  4437. "in": "query",
  4438. "schema": {
  4439. "type": "string"
  4440. },
  4441. "required": false
  4442. },
  4443. {
  4444. "name": "workspace",
  4445. "in": "query",
  4446. "schema": {
  4447. "type": "string"
  4448. },
  4449. "required": false
  4450. }
  4451. ],
  4452. "responses": {
  4453. "200": {
  4454. "description": "Question rejected successfully",
  4455. "content": {
  4456. "application/json": {
  4457. "schema": {
  4458. "type": "boolean",
  4459. "description": "Question rejected successfully"
  4460. }
  4461. }
  4462. }
  4463. },
  4464. "400": {
  4465. "description": "BadRequest | InvalidRequestError",
  4466. "content": {
  4467. "application/json": {
  4468. "schema": {
  4469. "anyOf": [
  4470. {
  4471. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4472. },
  4473. {
  4474. "$ref": "#/components/schemas/InvalidRequestError"
  4475. }
  4476. ]
  4477. }
  4478. }
  4479. }
  4480. },
  4481. "404": {
  4482. "description": "QuestionNotFoundError",
  4483. "content": {
  4484. "application/json": {
  4485. "schema": {
  4486. "$ref": "#/components/schemas/QuestionNotFoundError"
  4487. }
  4488. }
  4489. }
  4490. }
  4491. },
  4492. "description": "Reject a question request from the AI assistant.",
  4493. "summary": "Reject question request",
  4494. "x-codeSamples": [
  4495. {
  4496. "lang": "js",
  4497. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
  4498. }
  4499. ]
  4500. }
  4501. },
  4502. "/permission": {
  4503. "get": {
  4504. "tags": ["permission"],
  4505. "operationId": "permission.list",
  4506. "parameters": [
  4507. {
  4508. "name": "directory",
  4509. "in": "query",
  4510. "schema": {
  4511. "type": "string"
  4512. },
  4513. "required": false
  4514. },
  4515. {
  4516. "name": "workspace",
  4517. "in": "query",
  4518. "schema": {
  4519. "type": "string"
  4520. },
  4521. "required": false
  4522. }
  4523. ],
  4524. "responses": {
  4525. "200": {
  4526. "description": "List of pending permissions",
  4527. "content": {
  4528. "application/json": {
  4529. "schema": {
  4530. "type": "array",
  4531. "items": {
  4532. "$ref": "#/components/schemas/PermissionRequest"
  4533. },
  4534. "description": "List of pending permissions"
  4535. }
  4536. }
  4537. }
  4538. },
  4539. "400": {
  4540. "description": "Bad request",
  4541. "content": {
  4542. "application/json": {
  4543. "schema": {
  4544. "$ref": "#/components/schemas/BadRequestError"
  4545. }
  4546. }
  4547. }
  4548. }
  4549. },
  4550. "description": "Get all pending permission requests across all sessions.",
  4551. "summary": "List pending permissions",
  4552. "x-codeSamples": [
  4553. {
  4554. "lang": "js",
  4555. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
  4556. }
  4557. ]
  4558. }
  4559. },
  4560. "/permission/{requestID}/reply": {
  4561. "post": {
  4562. "tags": ["permission"],
  4563. "operationId": "permission.reply",
  4564. "parameters": [
  4565. {
  4566. "name": "requestID",
  4567. "in": "path",
  4568. "schema": {
  4569. "type": "string",
  4570. "pattern": "^per"
  4571. },
  4572. "required": true
  4573. },
  4574. {
  4575. "name": "directory",
  4576. "in": "query",
  4577. "schema": {
  4578. "type": "string"
  4579. },
  4580. "required": false
  4581. },
  4582. {
  4583. "name": "workspace",
  4584. "in": "query",
  4585. "schema": {
  4586. "type": "string"
  4587. },
  4588. "required": false
  4589. }
  4590. ],
  4591. "responses": {
  4592. "200": {
  4593. "description": "Permission processed successfully",
  4594. "content": {
  4595. "application/json": {
  4596. "schema": {
  4597. "type": "boolean",
  4598. "description": "Permission processed successfully"
  4599. }
  4600. }
  4601. }
  4602. },
  4603. "400": {
  4604. "description": "BadRequest | InvalidRequestError",
  4605. "content": {
  4606. "application/json": {
  4607. "schema": {
  4608. "anyOf": [
  4609. {
  4610. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4611. },
  4612. {
  4613. "$ref": "#/components/schemas/InvalidRequestError"
  4614. }
  4615. ]
  4616. }
  4617. }
  4618. }
  4619. },
  4620. "404": {
  4621. "description": "PermissionNotFoundError",
  4622. "content": {
  4623. "application/json": {
  4624. "schema": {
  4625. "$ref": "#/components/schemas/PermissionNotFoundError"
  4626. }
  4627. }
  4628. }
  4629. }
  4630. },
  4631. "description": "Approve or deny a permission request from the AI assistant.",
  4632. "summary": "Respond to permission request",
  4633. "requestBody": {
  4634. "content": {
  4635. "application/json": {
  4636. "schema": {
  4637. "type": "object",
  4638. "properties": {
  4639. "reply": {
  4640. "type": "string",
  4641. "enum": ["once", "always", "reject"]
  4642. },
  4643. "message": {
  4644. "type": "string"
  4645. }
  4646. },
  4647. "required": ["reply"],
  4648. "additionalProperties": false
  4649. }
  4650. }
  4651. }
  4652. },
  4653. "x-codeSamples": [
  4654. {
  4655. "lang": "js",
  4656. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
  4657. }
  4658. ]
  4659. }
  4660. },
  4661. "/provider": {
  4662. "get": {
  4663. "tags": ["provider"],
  4664. "operationId": "provider.list",
  4665. "parameters": [
  4666. {
  4667. "name": "directory",
  4668. "in": "query",
  4669. "schema": {
  4670. "type": "string"
  4671. },
  4672. "required": false
  4673. },
  4674. {
  4675. "name": "workspace",
  4676. "in": "query",
  4677. "schema": {
  4678. "type": "string"
  4679. },
  4680. "required": false
  4681. }
  4682. ],
  4683. "responses": {
  4684. "200": {
  4685. "description": "List of providers",
  4686. "content": {
  4687. "application/json": {
  4688. "schema": {
  4689. "type": "object",
  4690. "properties": {
  4691. "all": {
  4692. "type": "array",
  4693. "items": {
  4694. "$ref": "#/components/schemas/Provider"
  4695. }
  4696. },
  4697. "default": {
  4698. "type": "object",
  4699. "additionalProperties": {
  4700. "type": "string"
  4701. }
  4702. },
  4703. "connected": {
  4704. "type": "array",
  4705. "items": {
  4706. "type": "string"
  4707. }
  4708. }
  4709. },
  4710. "required": ["all", "default", "connected"],
  4711. "additionalProperties": false,
  4712. "description": "List of providers"
  4713. }
  4714. }
  4715. }
  4716. },
  4717. "400": {
  4718. "description": "Bad request",
  4719. "content": {
  4720. "application/json": {
  4721. "schema": {
  4722. "$ref": "#/components/schemas/BadRequestError"
  4723. }
  4724. }
  4725. }
  4726. }
  4727. },
  4728. "description": "Get a list of all available AI providers, including both available and connected ones.",
  4729. "summary": "List providers",
  4730. "x-codeSamples": [
  4731. {
  4732. "lang": "js",
  4733. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  4734. }
  4735. ]
  4736. }
  4737. },
  4738. "/provider/auth": {
  4739. "get": {
  4740. "tags": ["provider"],
  4741. "operationId": "provider.auth",
  4742. "parameters": [
  4743. {
  4744. "name": "directory",
  4745. "in": "query",
  4746. "schema": {
  4747. "type": "string"
  4748. },
  4749. "required": false
  4750. },
  4751. {
  4752. "name": "workspace",
  4753. "in": "query",
  4754. "schema": {
  4755. "type": "string"
  4756. },
  4757. "required": false
  4758. }
  4759. ],
  4760. "responses": {
  4761. "200": {
  4762. "description": "Provider auth methods",
  4763. "content": {
  4764. "application/json": {
  4765. "schema": {
  4766. "type": "object",
  4767. "additionalProperties": {
  4768. "type": "array",
  4769. "items": {
  4770. "$ref": "#/components/schemas/ProviderAuthMethod"
  4771. }
  4772. },
  4773. "description": "Provider auth methods"
  4774. }
  4775. }
  4776. }
  4777. },
  4778. "400": {
  4779. "description": "Bad request",
  4780. "content": {
  4781. "application/json": {
  4782. "schema": {
  4783. "$ref": "#/components/schemas/BadRequestError"
  4784. }
  4785. }
  4786. }
  4787. }
  4788. },
  4789. "description": "Retrieve available authentication methods for all AI providers.",
  4790. "summary": "Get provider auth methods",
  4791. "x-codeSamples": [
  4792. {
  4793. "lang": "js",
  4794. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  4795. }
  4796. ]
  4797. }
  4798. },
  4799. "/provider/{providerID}/oauth/authorize": {
  4800. "post": {
  4801. "tags": ["provider"],
  4802. "operationId": "provider.oauth.authorize",
  4803. "parameters": [
  4804. {
  4805. "name": "providerID",
  4806. "in": "path",
  4807. "schema": {
  4808. "type": "string"
  4809. },
  4810. "required": true
  4811. },
  4812. {
  4813. "name": "directory",
  4814. "in": "query",
  4815. "schema": {
  4816. "type": "string"
  4817. },
  4818. "required": false
  4819. },
  4820. {
  4821. "name": "workspace",
  4822. "in": "query",
  4823. "schema": {
  4824. "type": "string"
  4825. },
  4826. "required": false
  4827. }
  4828. ],
  4829. "responses": {
  4830. "200": {
  4831. "description": "Authorization URL and method",
  4832. "content": {
  4833. "application/json": {
  4834. "schema": {
  4835. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  4836. }
  4837. }
  4838. }
  4839. },
  4840. "400": {
  4841. "description": "ProviderAuthError | InvalidRequestError",
  4842. "content": {
  4843. "application/json": {
  4844. "schema": {
  4845. "anyOf": [
  4846. {
  4847. "$ref": "#/components/schemas/ProviderAuthError1"
  4848. },
  4849. {
  4850. "$ref": "#/components/schemas/InvalidRequestError"
  4851. }
  4852. ]
  4853. }
  4854. }
  4855. }
  4856. }
  4857. },
  4858. "description": "Start the OAuth authorization flow for a provider.",
  4859. "summary": "Start OAuth authorization",
  4860. "requestBody": {
  4861. "content": {
  4862. "application/json": {
  4863. "schema": {
  4864. "type": "object",
  4865. "properties": {
  4866. "method": {
  4867. "type": "number",
  4868. "description": "Auth method index"
  4869. },
  4870. "inputs": {
  4871. "type": "object",
  4872. "additionalProperties": {
  4873. "type": "string"
  4874. }
  4875. }
  4876. },
  4877. "required": ["method"],
  4878. "additionalProperties": false
  4879. }
  4880. }
  4881. }
  4882. },
  4883. "x-codeSamples": [
  4884. {
  4885. "lang": "js",
  4886. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  4887. }
  4888. ]
  4889. }
  4890. },
  4891. "/provider/{providerID}/oauth/callback": {
  4892. "post": {
  4893. "tags": ["provider"],
  4894. "operationId": "provider.oauth.callback",
  4895. "parameters": [
  4896. {
  4897. "name": "providerID",
  4898. "in": "path",
  4899. "schema": {
  4900. "type": "string"
  4901. },
  4902. "required": true
  4903. },
  4904. {
  4905. "name": "directory",
  4906. "in": "query",
  4907. "schema": {
  4908. "type": "string"
  4909. },
  4910. "required": false
  4911. },
  4912. {
  4913. "name": "workspace",
  4914. "in": "query",
  4915. "schema": {
  4916. "type": "string"
  4917. },
  4918. "required": false
  4919. }
  4920. ],
  4921. "responses": {
  4922. "200": {
  4923. "description": "OAuth callback processed successfully",
  4924. "content": {
  4925. "application/json": {
  4926. "schema": {
  4927. "type": "boolean",
  4928. "description": "OAuth callback processed successfully"
  4929. }
  4930. }
  4931. }
  4932. },
  4933. "400": {
  4934. "description": "ProviderAuthError | InvalidRequestError",
  4935. "content": {
  4936. "application/json": {
  4937. "schema": {
  4938. "anyOf": [
  4939. {
  4940. "$ref": "#/components/schemas/ProviderAuthError1"
  4941. },
  4942. {
  4943. "$ref": "#/components/schemas/InvalidRequestError"
  4944. }
  4945. ]
  4946. }
  4947. }
  4948. }
  4949. }
  4950. },
  4951. "description": "Handle the OAuth callback from a provider after user authorization.",
  4952. "summary": "Handle OAuth callback",
  4953. "requestBody": {
  4954. "content": {
  4955. "application/json": {
  4956. "schema": {
  4957. "type": "object",
  4958. "properties": {
  4959. "method": {
  4960. "type": "number",
  4961. "description": "Auth method index"
  4962. },
  4963. "code": {
  4964. "type": "string"
  4965. }
  4966. },
  4967. "required": ["method"],
  4968. "additionalProperties": false
  4969. }
  4970. }
  4971. }
  4972. },
  4973. "x-codeSamples": [
  4974. {
  4975. "lang": "js",
  4976. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  4977. }
  4978. ]
  4979. }
  4980. },
  4981. "/session": {
  4982. "get": {
  4983. "tags": ["session"],
  4984. "operationId": "session.list",
  4985. "parameters": [
  4986. {
  4987. "name": "directory",
  4988. "in": "query",
  4989. "schema": {
  4990. "type": "string"
  4991. },
  4992. "required": false
  4993. },
  4994. {
  4995. "name": "workspace",
  4996. "in": "query",
  4997. "schema": {
  4998. "type": "string"
  4999. },
  5000. "required": false
  5001. },
  5002. {
  5003. "name": "scope",
  5004. "in": "query",
  5005. "schema": {
  5006. "type": "string",
  5007. "enum": ["project"]
  5008. },
  5009. "required": false
  5010. },
  5011. {
  5012. "name": "path",
  5013. "in": "query",
  5014. "schema": {
  5015. "type": "string"
  5016. },
  5017. "required": false
  5018. },
  5019. {
  5020. "name": "roots",
  5021. "in": "query",
  5022. "schema": {
  5023. "anyOf": [
  5024. {
  5025. "type": "boolean"
  5026. },
  5027. {
  5028. "type": "string",
  5029. "enum": ["true", "false"]
  5030. }
  5031. ]
  5032. },
  5033. "required": false
  5034. },
  5035. {
  5036. "name": "start",
  5037. "in": "query",
  5038. "schema": {
  5039. "type": "number"
  5040. },
  5041. "required": false
  5042. },
  5043. {
  5044. "name": "search",
  5045. "in": "query",
  5046. "schema": {
  5047. "type": "string"
  5048. },
  5049. "required": false
  5050. },
  5051. {
  5052. "name": "limit",
  5053. "in": "query",
  5054. "schema": {
  5055. "type": "number"
  5056. },
  5057. "required": false
  5058. }
  5059. ],
  5060. "responses": {
  5061. "200": {
  5062. "description": "List of sessions",
  5063. "content": {
  5064. "application/json": {
  5065. "schema": {
  5066. "type": "array",
  5067. "items": {
  5068. "$ref": "#/components/schemas/Session"
  5069. },
  5070. "description": "List of sessions"
  5071. }
  5072. }
  5073. }
  5074. },
  5075. "400": {
  5076. "description": "Bad request",
  5077. "content": {
  5078. "application/json": {
  5079. "schema": {
  5080. "$ref": "#/components/schemas/BadRequestError"
  5081. }
  5082. }
  5083. }
  5084. }
  5085. },
  5086. "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
  5087. "summary": "List sessions",
  5088. "x-codeSamples": [
  5089. {
  5090. "lang": "js",
  5091. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
  5092. }
  5093. ]
  5094. },
  5095. "post": {
  5096. "tags": ["session"],
  5097. "operationId": "session.create",
  5098. "parameters": [
  5099. {
  5100. "name": "directory",
  5101. "in": "query",
  5102. "schema": {
  5103. "type": "string"
  5104. },
  5105. "required": false
  5106. },
  5107. {
  5108. "name": "workspace",
  5109. "in": "query",
  5110. "schema": {
  5111. "type": "string"
  5112. },
  5113. "required": false
  5114. }
  5115. ],
  5116. "responses": {
  5117. "200": {
  5118. "description": "Successfully created session",
  5119. "content": {
  5120. "application/json": {
  5121. "schema": {
  5122. "$ref": "#/components/schemas/Session"
  5123. }
  5124. }
  5125. }
  5126. },
  5127. "400": {
  5128. "description": "BadRequest | InvalidRequestError",
  5129. "content": {
  5130. "application/json": {
  5131. "schema": {
  5132. "anyOf": [
  5133. {
  5134. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5135. },
  5136. {
  5137. "$ref": "#/components/schemas/InvalidRequestError"
  5138. }
  5139. ]
  5140. }
  5141. }
  5142. }
  5143. }
  5144. },
  5145. "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
  5146. "summary": "Create session",
  5147. "requestBody": {
  5148. "content": {
  5149. "application/json": {
  5150. "schema": {
  5151. "type": "object",
  5152. "properties": {
  5153. "parentID": {
  5154. "type": "string",
  5155. "pattern": "^ses"
  5156. },
  5157. "title": {
  5158. "type": "string"
  5159. },
  5160. "agent": {
  5161. "type": "string"
  5162. },
  5163. "model": {
  5164. "type": "object",
  5165. "properties": {
  5166. "id": {
  5167. "type": "string"
  5168. },
  5169. "providerID": {
  5170. "type": "string"
  5171. },
  5172. "variant": {
  5173. "type": "string"
  5174. }
  5175. },
  5176. "required": ["id", "providerID"],
  5177. "additionalProperties": false
  5178. },
  5179. "permission": {
  5180. "$ref": "#/components/schemas/PermissionRuleset"
  5181. },
  5182. "workspaceID": {
  5183. "type": "string",
  5184. "pattern": "^wrk"
  5185. }
  5186. },
  5187. "additionalProperties": false
  5188. }
  5189. }
  5190. }
  5191. },
  5192. "x-codeSamples": [
  5193. {
  5194. "lang": "js",
  5195. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
  5196. }
  5197. ]
  5198. }
  5199. },
  5200. "/session/status": {
  5201. "get": {
  5202. "tags": ["session"],
  5203. "operationId": "session.status",
  5204. "parameters": [
  5205. {
  5206. "name": "directory",
  5207. "in": "query",
  5208. "schema": {
  5209. "type": "string"
  5210. },
  5211. "required": false
  5212. },
  5213. {
  5214. "name": "workspace",
  5215. "in": "query",
  5216. "schema": {
  5217. "type": "string"
  5218. },
  5219. "required": false
  5220. }
  5221. ],
  5222. "responses": {
  5223. "200": {
  5224. "description": "Get session status",
  5225. "content": {
  5226. "application/json": {
  5227. "schema": {
  5228. "type": "object",
  5229. "additionalProperties": {
  5230. "$ref": "#/components/schemas/SessionStatus"
  5231. },
  5232. "description": "Get session status"
  5233. }
  5234. }
  5235. }
  5236. },
  5237. "400": {
  5238. "description": "BadRequest | InvalidRequestError",
  5239. "content": {
  5240. "application/json": {
  5241. "schema": {
  5242. "anyOf": [
  5243. {
  5244. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5245. },
  5246. {
  5247. "$ref": "#/components/schemas/InvalidRequestError"
  5248. }
  5249. ]
  5250. }
  5251. }
  5252. }
  5253. }
  5254. },
  5255. "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
  5256. "summary": "Get session status",
  5257. "x-codeSamples": [
  5258. {
  5259. "lang": "js",
  5260. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
  5261. }
  5262. ]
  5263. }
  5264. },
  5265. "/session/{sessionID}": {
  5266. "get": {
  5267. "tags": ["session"],
  5268. "operationId": "session.get",
  5269. "parameters": [
  5270. {
  5271. "name": "sessionID",
  5272. "in": "path",
  5273. "schema": {
  5274. "type": "string",
  5275. "pattern": "^ses"
  5276. },
  5277. "required": true
  5278. },
  5279. {
  5280. "name": "directory",
  5281. "in": "query",
  5282. "schema": {
  5283. "type": "string"
  5284. },
  5285. "required": false
  5286. },
  5287. {
  5288. "name": "workspace",
  5289. "in": "query",
  5290. "schema": {
  5291. "type": "string"
  5292. },
  5293. "required": false
  5294. }
  5295. ],
  5296. "responses": {
  5297. "200": {
  5298. "description": "Get session",
  5299. "content": {
  5300. "application/json": {
  5301. "schema": {
  5302. "$ref": "#/components/schemas/Session"
  5303. }
  5304. }
  5305. }
  5306. },
  5307. "400": {
  5308. "description": "BadRequest | InvalidRequestError",
  5309. "content": {
  5310. "application/json": {
  5311. "schema": {
  5312. "anyOf": [
  5313. {
  5314. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5315. },
  5316. {
  5317. "$ref": "#/components/schemas/InvalidRequestError"
  5318. }
  5319. ]
  5320. }
  5321. }
  5322. }
  5323. },
  5324. "404": {
  5325. "description": "NotFoundError",
  5326. "content": {
  5327. "application/json": {
  5328. "schema": {
  5329. "$ref": "#/components/schemas/NotFoundError"
  5330. }
  5331. }
  5332. }
  5333. }
  5334. },
  5335. "description": "Retrieve detailed information about a specific OpenCode session.",
  5336. "summary": "Get session",
  5337. "x-codeSamples": [
  5338. {
  5339. "lang": "js",
  5340. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
  5341. }
  5342. ]
  5343. },
  5344. "delete": {
  5345. "tags": ["session"],
  5346. "operationId": "session.delete",
  5347. "parameters": [
  5348. {
  5349. "name": "sessionID",
  5350. "in": "path",
  5351. "schema": {
  5352. "type": "string",
  5353. "pattern": "^ses"
  5354. },
  5355. "required": true
  5356. },
  5357. {
  5358. "name": "directory",
  5359. "in": "query",
  5360. "schema": {
  5361. "type": "string"
  5362. },
  5363. "required": false
  5364. },
  5365. {
  5366. "name": "workspace",
  5367. "in": "query",
  5368. "schema": {
  5369. "type": "string"
  5370. },
  5371. "required": false
  5372. }
  5373. ],
  5374. "responses": {
  5375. "200": {
  5376. "description": "Successfully deleted session",
  5377. "content": {
  5378. "application/json": {
  5379. "schema": {
  5380. "type": "boolean",
  5381. "description": "Successfully deleted session"
  5382. }
  5383. }
  5384. }
  5385. },
  5386. "400": {
  5387. "description": "BadRequest | InvalidRequestError",
  5388. "content": {
  5389. "application/json": {
  5390. "schema": {
  5391. "anyOf": [
  5392. {
  5393. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5394. },
  5395. {
  5396. "$ref": "#/components/schemas/InvalidRequestError"
  5397. }
  5398. ]
  5399. }
  5400. }
  5401. }
  5402. },
  5403. "404": {
  5404. "description": "NotFoundError",
  5405. "content": {
  5406. "application/json": {
  5407. "schema": {
  5408. "$ref": "#/components/schemas/NotFoundError"
  5409. }
  5410. }
  5411. }
  5412. }
  5413. },
  5414. "description": "Delete a session and permanently remove all associated data, including messages and history.",
  5415. "summary": "Delete session",
  5416. "x-codeSamples": [
  5417. {
  5418. "lang": "js",
  5419. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
  5420. }
  5421. ]
  5422. },
  5423. "patch": {
  5424. "tags": ["session"],
  5425. "operationId": "session.update",
  5426. "parameters": [
  5427. {
  5428. "name": "sessionID",
  5429. "in": "path",
  5430. "schema": {
  5431. "type": "string",
  5432. "pattern": "^ses"
  5433. },
  5434. "required": true
  5435. },
  5436. {
  5437. "name": "directory",
  5438. "in": "query",
  5439. "schema": {
  5440. "type": "string"
  5441. },
  5442. "required": false
  5443. },
  5444. {
  5445. "name": "workspace",
  5446. "in": "query",
  5447. "schema": {
  5448. "type": "string"
  5449. },
  5450. "required": false
  5451. }
  5452. ],
  5453. "responses": {
  5454. "200": {
  5455. "description": "Successfully updated session",
  5456. "content": {
  5457. "application/json": {
  5458. "schema": {
  5459. "$ref": "#/components/schemas/Session"
  5460. }
  5461. }
  5462. }
  5463. },
  5464. "400": {
  5465. "description": "BadRequest | InvalidRequestError",
  5466. "content": {
  5467. "application/json": {
  5468. "schema": {
  5469. "anyOf": [
  5470. {
  5471. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5472. },
  5473. {
  5474. "$ref": "#/components/schemas/InvalidRequestError"
  5475. }
  5476. ]
  5477. }
  5478. }
  5479. }
  5480. },
  5481. "404": {
  5482. "description": "NotFoundError",
  5483. "content": {
  5484. "application/json": {
  5485. "schema": {
  5486. "$ref": "#/components/schemas/NotFoundError"
  5487. }
  5488. }
  5489. }
  5490. }
  5491. },
  5492. "description": "Update properties of an existing session, such as title or other metadata.",
  5493. "summary": "Update session",
  5494. "requestBody": {
  5495. "content": {
  5496. "application/json": {
  5497. "schema": {
  5498. "type": "object",
  5499. "properties": {
  5500. "title": {
  5501. "type": "string"
  5502. },
  5503. "permission": {
  5504. "$ref": "#/components/schemas/PermissionRuleset"
  5505. },
  5506. "time": {
  5507. "type": "object",
  5508. "properties": {
  5509. "archived": {
  5510. "type": "number"
  5511. }
  5512. },
  5513. "additionalProperties": false
  5514. }
  5515. },
  5516. "additionalProperties": false
  5517. }
  5518. }
  5519. }
  5520. },
  5521. "x-codeSamples": [
  5522. {
  5523. "lang": "js",
  5524. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
  5525. }
  5526. ]
  5527. }
  5528. },
  5529. "/session/{sessionID}/children": {
  5530. "get": {
  5531. "tags": ["session"],
  5532. "operationId": "session.children",
  5533. "parameters": [
  5534. {
  5535. "name": "sessionID",
  5536. "in": "path",
  5537. "schema": {
  5538. "type": "string",
  5539. "pattern": "^ses"
  5540. },
  5541. "required": true
  5542. },
  5543. {
  5544. "name": "directory",
  5545. "in": "query",
  5546. "schema": {
  5547. "type": "string"
  5548. },
  5549. "required": false
  5550. },
  5551. {
  5552. "name": "workspace",
  5553. "in": "query",
  5554. "schema": {
  5555. "type": "string"
  5556. },
  5557. "required": false
  5558. }
  5559. ],
  5560. "responses": {
  5561. "200": {
  5562. "description": "List of children",
  5563. "content": {
  5564. "application/json": {
  5565. "schema": {
  5566. "type": "array",
  5567. "items": {
  5568. "$ref": "#/components/schemas/Session"
  5569. },
  5570. "description": "List of children"
  5571. }
  5572. }
  5573. }
  5574. },
  5575. "400": {
  5576. "description": "BadRequest | InvalidRequestError",
  5577. "content": {
  5578. "application/json": {
  5579. "schema": {
  5580. "anyOf": [
  5581. {
  5582. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5583. },
  5584. {
  5585. "$ref": "#/components/schemas/InvalidRequestError"
  5586. }
  5587. ]
  5588. }
  5589. }
  5590. }
  5591. },
  5592. "404": {
  5593. "description": "NotFoundError",
  5594. "content": {
  5595. "application/json": {
  5596. "schema": {
  5597. "$ref": "#/components/schemas/NotFoundError"
  5598. }
  5599. }
  5600. }
  5601. }
  5602. },
  5603. "description": "Retrieve all child sessions that were forked from the specified parent session.",
  5604. "summary": "Get session children",
  5605. "x-codeSamples": [
  5606. {
  5607. "lang": "js",
  5608. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
  5609. }
  5610. ]
  5611. }
  5612. },
  5613. "/session/{sessionID}/todo": {
  5614. "get": {
  5615. "tags": ["session"],
  5616. "operationId": "session.todo",
  5617. "parameters": [
  5618. {
  5619. "name": "sessionID",
  5620. "in": "path",
  5621. "schema": {
  5622. "type": "string",
  5623. "pattern": "^ses"
  5624. },
  5625. "required": true
  5626. },
  5627. {
  5628. "name": "directory",
  5629. "in": "query",
  5630. "schema": {
  5631. "type": "string"
  5632. },
  5633. "required": false
  5634. },
  5635. {
  5636. "name": "workspace",
  5637. "in": "query",
  5638. "schema": {
  5639. "type": "string"
  5640. },
  5641. "required": false
  5642. }
  5643. ],
  5644. "responses": {
  5645. "200": {
  5646. "description": "Todo list",
  5647. "content": {
  5648. "application/json": {
  5649. "schema": {
  5650. "type": "array",
  5651. "items": {
  5652. "$ref": "#/components/schemas/Todo"
  5653. },
  5654. "description": "Todo list"
  5655. }
  5656. }
  5657. }
  5658. },
  5659. "400": {
  5660. "description": "BadRequest | InvalidRequestError",
  5661. "content": {
  5662. "application/json": {
  5663. "schema": {
  5664. "anyOf": [
  5665. {
  5666. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5667. },
  5668. {
  5669. "$ref": "#/components/schemas/InvalidRequestError"
  5670. }
  5671. ]
  5672. }
  5673. }
  5674. }
  5675. },
  5676. "404": {
  5677. "description": "NotFoundError",
  5678. "content": {
  5679. "application/json": {
  5680. "schema": {
  5681. "$ref": "#/components/schemas/NotFoundError"
  5682. }
  5683. }
  5684. }
  5685. }
  5686. },
  5687. "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
  5688. "summary": "Get session todos",
  5689. "x-codeSamples": [
  5690. {
  5691. "lang": "js",
  5692. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
  5693. }
  5694. ]
  5695. }
  5696. },
  5697. "/session/{sessionID}/diff": {
  5698. "get": {
  5699. "tags": ["session"],
  5700. "operationId": "session.diff",
  5701. "parameters": [
  5702. {
  5703. "name": "sessionID",
  5704. "in": "path",
  5705. "schema": {
  5706. "type": "string",
  5707. "pattern": "^ses"
  5708. },
  5709. "required": true
  5710. },
  5711. {
  5712. "name": "directory",
  5713. "in": "query",
  5714. "schema": {
  5715. "type": "string"
  5716. },
  5717. "required": false
  5718. },
  5719. {
  5720. "name": "workspace",
  5721. "in": "query",
  5722. "schema": {
  5723. "type": "string"
  5724. },
  5725. "required": false
  5726. },
  5727. {
  5728. "name": "messageID",
  5729. "in": "query",
  5730. "schema": {
  5731. "type": "string",
  5732. "pattern": "^msg"
  5733. },
  5734. "required": false
  5735. }
  5736. ],
  5737. "responses": {
  5738. "200": {
  5739. "description": "Successfully retrieved diff",
  5740. "content": {
  5741. "application/json": {
  5742. "schema": {
  5743. "type": "array",
  5744. "items": {
  5745. "$ref": "#/components/schemas/SnapshotFileDiff"
  5746. },
  5747. "description": "Successfully retrieved diff"
  5748. }
  5749. }
  5750. }
  5751. },
  5752. "400": {
  5753. "description": "Bad request",
  5754. "content": {
  5755. "application/json": {
  5756. "schema": {
  5757. "$ref": "#/components/schemas/BadRequestError"
  5758. }
  5759. }
  5760. }
  5761. }
  5762. },
  5763. "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
  5764. "summary": "Get message diff",
  5765. "x-codeSamples": [
  5766. {
  5767. "lang": "js",
  5768. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
  5769. }
  5770. ]
  5771. }
  5772. },
  5773. "/session/{sessionID}/message": {
  5774. "get": {
  5775. "tags": ["session"],
  5776. "operationId": "session.messages",
  5777. "parameters": [
  5778. {
  5779. "name": "sessionID",
  5780. "in": "path",
  5781. "schema": {
  5782. "type": "string",
  5783. "pattern": "^ses"
  5784. },
  5785. "required": true
  5786. },
  5787. {
  5788. "name": "directory",
  5789. "in": "query",
  5790. "schema": {
  5791. "type": "string"
  5792. },
  5793. "required": false
  5794. },
  5795. {
  5796. "name": "workspace",
  5797. "in": "query",
  5798. "schema": {
  5799. "type": "string"
  5800. },
  5801. "required": false
  5802. },
  5803. {
  5804. "name": "limit",
  5805. "in": "query",
  5806. "schema": {
  5807. "type": "integer",
  5808. "minimum": 0,
  5809. "maximum": 9007199254740991
  5810. },
  5811. "required": false
  5812. },
  5813. {
  5814. "name": "before",
  5815. "in": "query",
  5816. "schema": {
  5817. "type": "string"
  5818. },
  5819. "required": false
  5820. }
  5821. ],
  5822. "responses": {
  5823. "200": {
  5824. "description": "List of messages",
  5825. "content": {
  5826. "application/json": {
  5827. "schema": {
  5828. "type": "array",
  5829. "items": {
  5830. "type": "object",
  5831. "properties": {
  5832. "info": {
  5833. "$ref": "#/components/schemas/Message"
  5834. },
  5835. "parts": {
  5836. "type": "array",
  5837. "items": {
  5838. "$ref": "#/components/schemas/Part"
  5839. }
  5840. }
  5841. },
  5842. "required": ["info", "parts"],
  5843. "additionalProperties": false
  5844. },
  5845. "description": "List of messages"
  5846. }
  5847. }
  5848. }
  5849. },
  5850. "400": {
  5851. "description": "BadRequest | InvalidRequestError",
  5852. "content": {
  5853. "application/json": {
  5854. "schema": {
  5855. "anyOf": [
  5856. {
  5857. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5858. },
  5859. {
  5860. "$ref": "#/components/schemas/InvalidRequestError"
  5861. }
  5862. ]
  5863. }
  5864. }
  5865. }
  5866. },
  5867. "404": {
  5868. "description": "NotFoundError",
  5869. "content": {
  5870. "application/json": {
  5871. "schema": {
  5872. "$ref": "#/components/schemas/NotFoundError"
  5873. }
  5874. }
  5875. }
  5876. }
  5877. },
  5878. "description": "Retrieve all messages in a session, including user prompts and AI responses.",
  5879. "summary": "Get session messages",
  5880. "x-codeSamples": [
  5881. {
  5882. "lang": "js",
  5883. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
  5884. }
  5885. ]
  5886. },
  5887. "post": {
  5888. "tags": ["session"],
  5889. "operationId": "session.prompt",
  5890. "parameters": [
  5891. {
  5892. "name": "sessionID",
  5893. "in": "path",
  5894. "schema": {
  5895. "type": "string",
  5896. "pattern": "^ses"
  5897. },
  5898. "required": true
  5899. },
  5900. {
  5901. "name": "directory",
  5902. "in": "query",
  5903. "schema": {
  5904. "type": "string"
  5905. },
  5906. "required": false
  5907. },
  5908. {
  5909. "name": "workspace",
  5910. "in": "query",
  5911. "schema": {
  5912. "type": "string"
  5913. },
  5914. "required": false
  5915. }
  5916. ],
  5917. "responses": {
  5918. "200": {
  5919. "description": "Created message",
  5920. "content": {
  5921. "application/json": {
  5922. "schema": {
  5923. "type": "object",
  5924. "required": ["info", "parts"],
  5925. "properties": {
  5926. "info": {
  5927. "$ref": "#/components/schemas/AssistantMessage"
  5928. },
  5929. "parts": {
  5930. "type": "array",
  5931. "items": {
  5932. "$ref": "#/components/schemas/Part"
  5933. }
  5934. }
  5935. }
  5936. }
  5937. }
  5938. }
  5939. },
  5940. "400": {
  5941. "description": "BadRequest | InvalidRequestError",
  5942. "content": {
  5943. "application/json": {
  5944. "schema": {
  5945. "anyOf": [
  5946. {
  5947. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5948. },
  5949. {
  5950. "$ref": "#/components/schemas/InvalidRequestError"
  5951. }
  5952. ]
  5953. }
  5954. }
  5955. }
  5956. },
  5957. "404": {
  5958. "description": "NotFoundError",
  5959. "content": {
  5960. "application/json": {
  5961. "schema": {
  5962. "$ref": "#/components/schemas/NotFoundError"
  5963. }
  5964. }
  5965. }
  5966. }
  5967. },
  5968. "description": "Create and send a new message to a session, streaming the AI response.",
  5969. "summary": "Send message",
  5970. "requestBody": {
  5971. "content": {
  5972. "application/json": {
  5973. "schema": {
  5974. "type": "object",
  5975. "properties": {
  5976. "messageID": {
  5977. "type": "string",
  5978. "pattern": "^msg"
  5979. },
  5980. "model": {
  5981. "type": "object",
  5982. "properties": {
  5983. "providerID": {
  5984. "type": "string"
  5985. },
  5986. "modelID": {
  5987. "type": "string"
  5988. }
  5989. },
  5990. "required": ["providerID", "modelID"],
  5991. "additionalProperties": false
  5992. },
  5993. "agent": {
  5994. "type": "string"
  5995. },
  5996. "noReply": {
  5997. "type": "boolean"
  5998. },
  5999. "tools": {
  6000. "type": "object",
  6001. "additionalProperties": {
  6002. "type": "boolean"
  6003. }
  6004. },
  6005. "format": {
  6006. "$ref": "#/components/schemas/OutputFormat"
  6007. },
  6008. "system": {
  6009. "type": "string"
  6010. },
  6011. "variant": {
  6012. "type": "string"
  6013. },
  6014. "parts": {
  6015. "type": "array",
  6016. "items": {
  6017. "anyOf": [
  6018. {
  6019. "$ref": "#/components/schemas/TextPartInput"
  6020. },
  6021. {
  6022. "$ref": "#/components/schemas/FilePartInput"
  6023. },
  6024. {
  6025. "$ref": "#/components/schemas/AgentPartInput"
  6026. },
  6027. {
  6028. "$ref": "#/components/schemas/SubtaskPartInput"
  6029. }
  6030. ]
  6031. }
  6032. }
  6033. },
  6034. "required": ["parts"],
  6035. "additionalProperties": false
  6036. }
  6037. }
  6038. }
  6039. },
  6040. "x-codeSamples": [
  6041. {
  6042. "lang": "js",
  6043. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  6044. }
  6045. ]
  6046. }
  6047. },
  6048. "/session/{sessionID}/message/{messageID}": {
  6049. "get": {
  6050. "tags": ["session"],
  6051. "operationId": "session.message",
  6052. "parameters": [
  6053. {
  6054. "name": "sessionID",
  6055. "in": "path",
  6056. "schema": {
  6057. "type": "string",
  6058. "pattern": "^ses"
  6059. },
  6060. "required": true
  6061. },
  6062. {
  6063. "name": "messageID",
  6064. "in": "path",
  6065. "schema": {
  6066. "type": "string",
  6067. "pattern": "^msg"
  6068. },
  6069. "required": true
  6070. },
  6071. {
  6072. "name": "directory",
  6073. "in": "query",
  6074. "schema": {
  6075. "type": "string"
  6076. },
  6077. "required": false
  6078. },
  6079. {
  6080. "name": "workspace",
  6081. "in": "query",
  6082. "schema": {
  6083. "type": "string"
  6084. },
  6085. "required": false
  6086. }
  6087. ],
  6088. "responses": {
  6089. "200": {
  6090. "description": "Message",
  6091. "content": {
  6092. "application/json": {
  6093. "schema": {
  6094. "type": "object",
  6095. "properties": {
  6096. "info": {
  6097. "$ref": "#/components/schemas/Message"
  6098. },
  6099. "parts": {
  6100. "type": "array",
  6101. "items": {
  6102. "$ref": "#/components/schemas/Part"
  6103. }
  6104. }
  6105. },
  6106. "required": ["info", "parts"],
  6107. "additionalProperties": false,
  6108. "description": "Message"
  6109. }
  6110. }
  6111. }
  6112. },
  6113. "400": {
  6114. "description": "BadRequest | InvalidRequestError",
  6115. "content": {
  6116. "application/json": {
  6117. "schema": {
  6118. "anyOf": [
  6119. {
  6120. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6121. },
  6122. {
  6123. "$ref": "#/components/schemas/InvalidRequestError"
  6124. }
  6125. ]
  6126. }
  6127. }
  6128. }
  6129. },
  6130. "404": {
  6131. "description": "NotFoundError",
  6132. "content": {
  6133. "application/json": {
  6134. "schema": {
  6135. "$ref": "#/components/schemas/NotFoundError"
  6136. }
  6137. }
  6138. }
  6139. }
  6140. },
  6141. "description": "Retrieve a specific message from a session by its message ID.",
  6142. "summary": "Get message",
  6143. "x-codeSamples": [
  6144. {
  6145. "lang": "js",
  6146. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  6147. }
  6148. ]
  6149. },
  6150. "delete": {
  6151. "tags": ["session"],
  6152. "operationId": "session.deleteMessage",
  6153. "parameters": [
  6154. {
  6155. "name": "sessionID",
  6156. "in": "path",
  6157. "schema": {
  6158. "type": "string",
  6159. "pattern": "^ses"
  6160. },
  6161. "required": true
  6162. },
  6163. {
  6164. "name": "messageID",
  6165. "in": "path",
  6166. "schema": {
  6167. "type": "string",
  6168. "pattern": "^msg"
  6169. },
  6170. "required": true
  6171. },
  6172. {
  6173. "name": "directory",
  6174. "in": "query",
  6175. "schema": {
  6176. "type": "string"
  6177. },
  6178. "required": false
  6179. },
  6180. {
  6181. "name": "workspace",
  6182. "in": "query",
  6183. "schema": {
  6184. "type": "string"
  6185. },
  6186. "required": false
  6187. }
  6188. ],
  6189. "responses": {
  6190. "200": {
  6191. "description": "Successfully deleted message",
  6192. "content": {
  6193. "application/json": {
  6194. "schema": {
  6195. "type": "boolean",
  6196. "description": "Successfully deleted message"
  6197. }
  6198. }
  6199. }
  6200. },
  6201. "400": {
  6202. "description": "BadRequest | InvalidRequestError",
  6203. "content": {
  6204. "application/json": {
  6205. "schema": {
  6206. "anyOf": [
  6207. {
  6208. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6209. },
  6210. {
  6211. "$ref": "#/components/schemas/InvalidRequestError"
  6212. }
  6213. ]
  6214. }
  6215. }
  6216. }
  6217. },
  6218. "404": {
  6219. "description": "NotFoundError",
  6220. "content": {
  6221. "application/json": {
  6222. "schema": {
  6223. "$ref": "#/components/schemas/NotFoundError"
  6224. }
  6225. }
  6226. }
  6227. },
  6228. "409": {
  6229. "description": "SessionBusyError",
  6230. "content": {
  6231. "application/json": {
  6232. "schema": {
  6233. "$ref": "#/components/schemas/SessionBusyError"
  6234. }
  6235. }
  6236. }
  6237. }
  6238. },
  6239. "description": "Permanently delete a specific message and all of its parts from a session without reverting file changes.",
  6240. "summary": "Delete message",
  6241. "x-codeSamples": [
  6242. {
  6243. "lang": "js",
  6244. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.deleteMessage({\n ...\n})"
  6245. }
  6246. ]
  6247. }
  6248. },
  6249. "/session/{sessionID}/fork": {
  6250. "post": {
  6251. "tags": ["session"],
  6252. "operationId": "session.fork",
  6253. "parameters": [
  6254. {
  6255. "name": "sessionID",
  6256. "in": "path",
  6257. "schema": {
  6258. "type": "string",
  6259. "pattern": "^ses"
  6260. },
  6261. "required": true
  6262. },
  6263. {
  6264. "name": "directory",
  6265. "in": "query",
  6266. "schema": {
  6267. "type": "string"
  6268. },
  6269. "required": false
  6270. },
  6271. {
  6272. "name": "workspace",
  6273. "in": "query",
  6274. "schema": {
  6275. "type": "string"
  6276. },
  6277. "required": false
  6278. }
  6279. ],
  6280. "responses": {
  6281. "200": {
  6282. "description": "200",
  6283. "content": {
  6284. "application/json": {
  6285. "schema": {
  6286. "$ref": "#/components/schemas/Session"
  6287. }
  6288. }
  6289. }
  6290. },
  6291. "400": {
  6292. "description": "BadRequest | InvalidRequestError",
  6293. "content": {
  6294. "application/json": {
  6295. "schema": {
  6296. "anyOf": [
  6297. {
  6298. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6299. },
  6300. {
  6301. "$ref": "#/components/schemas/InvalidRequestError"
  6302. }
  6303. ]
  6304. }
  6305. }
  6306. }
  6307. },
  6308. "404": {
  6309. "description": "NotFoundError",
  6310. "content": {
  6311. "application/json": {
  6312. "schema": {
  6313. "$ref": "#/components/schemas/NotFoundError"
  6314. }
  6315. }
  6316. }
  6317. }
  6318. },
  6319. "description": "Create a new session by forking an existing session at a specific message point.",
  6320. "summary": "Fork session",
  6321. "requestBody": {
  6322. "content": {
  6323. "application/json": {
  6324. "schema": {
  6325. "type": "object",
  6326. "properties": {
  6327. "messageID": {
  6328. "type": "string",
  6329. "pattern": "^msg"
  6330. }
  6331. },
  6332. "additionalProperties": false
  6333. }
  6334. }
  6335. }
  6336. },
  6337. "x-codeSamples": [
  6338. {
  6339. "lang": "js",
  6340. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  6341. }
  6342. ]
  6343. }
  6344. },
  6345. "/session/{sessionID}/abort": {
  6346. "post": {
  6347. "tags": ["session"],
  6348. "operationId": "session.abort",
  6349. "parameters": [
  6350. {
  6351. "name": "sessionID",
  6352. "in": "path",
  6353. "schema": {
  6354. "type": "string",
  6355. "pattern": "^ses"
  6356. },
  6357. "required": true
  6358. },
  6359. {
  6360. "name": "directory",
  6361. "in": "query",
  6362. "schema": {
  6363. "type": "string"
  6364. },
  6365. "required": false
  6366. },
  6367. {
  6368. "name": "workspace",
  6369. "in": "query",
  6370. "schema": {
  6371. "type": "string"
  6372. },
  6373. "required": false
  6374. }
  6375. ],
  6376. "responses": {
  6377. "200": {
  6378. "description": "Aborted session",
  6379. "content": {
  6380. "application/json": {
  6381. "schema": {
  6382. "type": "boolean",
  6383. "description": "Aborted session"
  6384. }
  6385. }
  6386. }
  6387. },
  6388. "400": {
  6389. "description": "BadRequest | InvalidRequestError",
  6390. "content": {
  6391. "application/json": {
  6392. "schema": {
  6393. "anyOf": [
  6394. {
  6395. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6396. },
  6397. {
  6398. "$ref": "#/components/schemas/InvalidRequestError"
  6399. }
  6400. ]
  6401. }
  6402. }
  6403. }
  6404. }
  6405. },
  6406. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  6407. "summary": "Abort session",
  6408. "x-codeSamples": [
  6409. {
  6410. "lang": "js",
  6411. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  6412. }
  6413. ]
  6414. }
  6415. },
  6416. "/session/{sessionID}/init": {
  6417. "post": {
  6418. "tags": ["session"],
  6419. "operationId": "session.init",
  6420. "parameters": [
  6421. {
  6422. "name": "sessionID",
  6423. "in": "path",
  6424. "schema": {
  6425. "type": "string",
  6426. "pattern": "^ses"
  6427. },
  6428. "required": true
  6429. },
  6430. {
  6431. "name": "directory",
  6432. "in": "query",
  6433. "schema": {
  6434. "type": "string"
  6435. },
  6436. "required": false
  6437. },
  6438. {
  6439. "name": "workspace",
  6440. "in": "query",
  6441. "schema": {
  6442. "type": "string"
  6443. },
  6444. "required": false
  6445. }
  6446. ],
  6447. "responses": {
  6448. "200": {
  6449. "description": "200",
  6450. "content": {
  6451. "application/json": {
  6452. "schema": {
  6453. "type": "boolean",
  6454. "description": "200"
  6455. }
  6456. }
  6457. }
  6458. },
  6459. "400": {
  6460. "description": "BadRequest | InvalidRequestError",
  6461. "content": {
  6462. "application/json": {
  6463. "schema": {
  6464. "anyOf": [
  6465. {
  6466. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6467. },
  6468. {
  6469. "$ref": "#/components/schemas/InvalidRequestError"
  6470. }
  6471. ]
  6472. }
  6473. }
  6474. }
  6475. },
  6476. "404": {
  6477. "description": "NotFoundError",
  6478. "content": {
  6479. "application/json": {
  6480. "schema": {
  6481. "$ref": "#/components/schemas/NotFoundError"
  6482. }
  6483. }
  6484. }
  6485. }
  6486. },
  6487. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  6488. "summary": "Initialize session",
  6489. "requestBody": {
  6490. "content": {
  6491. "application/json": {
  6492. "schema": {
  6493. "type": "object",
  6494. "properties": {
  6495. "modelID": {
  6496. "type": "string"
  6497. },
  6498. "providerID": {
  6499. "type": "string"
  6500. },
  6501. "messageID": {
  6502. "type": "string",
  6503. "pattern": "^msg"
  6504. }
  6505. },
  6506. "required": ["modelID", "providerID", "messageID"],
  6507. "additionalProperties": false
  6508. }
  6509. }
  6510. }
  6511. },
  6512. "x-codeSamples": [
  6513. {
  6514. "lang": "js",
  6515. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  6516. }
  6517. ]
  6518. }
  6519. },
  6520. "/session/{sessionID}/share": {
  6521. "post": {
  6522. "tags": ["session"],
  6523. "operationId": "session.share",
  6524. "parameters": [
  6525. {
  6526. "name": "sessionID",
  6527. "in": "path",
  6528. "schema": {
  6529. "type": "string",
  6530. "pattern": "^ses"
  6531. },
  6532. "required": true
  6533. },
  6534. {
  6535. "name": "directory",
  6536. "in": "query",
  6537. "schema": {
  6538. "type": "string"
  6539. },
  6540. "required": false
  6541. },
  6542. {
  6543. "name": "workspace",
  6544. "in": "query",
  6545. "schema": {
  6546. "type": "string"
  6547. },
  6548. "required": false
  6549. }
  6550. ],
  6551. "responses": {
  6552. "200": {
  6553. "description": "Successfully shared session",
  6554. "content": {
  6555. "application/json": {
  6556. "schema": {
  6557. "$ref": "#/components/schemas/Session"
  6558. }
  6559. }
  6560. }
  6561. },
  6562. "400": {
  6563. "description": "Bad request",
  6564. "content": {
  6565. "application/json": {
  6566. "schema": {
  6567. "$ref": "#/components/schemas/BadRequestError"
  6568. }
  6569. }
  6570. }
  6571. },
  6572. "404": {
  6573. "description": "NotFoundError",
  6574. "content": {
  6575. "application/json": {
  6576. "schema": {
  6577. "$ref": "#/components/schemas/NotFoundError"
  6578. }
  6579. }
  6580. }
  6581. },
  6582. "500": {
  6583. "description": "InternalServerError",
  6584. "content": {
  6585. "application/json": {
  6586. "schema": {
  6587. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6588. }
  6589. }
  6590. }
  6591. }
  6592. },
  6593. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  6594. "summary": "Share session",
  6595. "x-codeSamples": [
  6596. {
  6597. "lang": "js",
  6598. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  6599. }
  6600. ]
  6601. },
  6602. "delete": {
  6603. "tags": ["session"],
  6604. "operationId": "session.unshare",
  6605. "parameters": [
  6606. {
  6607. "name": "sessionID",
  6608. "in": "path",
  6609. "schema": {
  6610. "type": "string",
  6611. "pattern": "^ses"
  6612. },
  6613. "required": true
  6614. },
  6615. {
  6616. "name": "directory",
  6617. "in": "query",
  6618. "schema": {
  6619. "type": "string"
  6620. },
  6621. "required": false
  6622. },
  6623. {
  6624. "name": "workspace",
  6625. "in": "query",
  6626. "schema": {
  6627. "type": "string"
  6628. },
  6629. "required": false
  6630. }
  6631. ],
  6632. "responses": {
  6633. "200": {
  6634. "description": "Successfully unshared session",
  6635. "content": {
  6636. "application/json": {
  6637. "schema": {
  6638. "$ref": "#/components/schemas/Session"
  6639. }
  6640. }
  6641. }
  6642. },
  6643. "400": {
  6644. "description": "Bad request",
  6645. "content": {
  6646. "application/json": {
  6647. "schema": {
  6648. "$ref": "#/components/schemas/BadRequestError"
  6649. }
  6650. }
  6651. }
  6652. },
  6653. "404": {
  6654. "description": "NotFoundError",
  6655. "content": {
  6656. "application/json": {
  6657. "schema": {
  6658. "$ref": "#/components/schemas/NotFoundError"
  6659. }
  6660. }
  6661. }
  6662. },
  6663. "500": {
  6664. "description": "InternalServerError",
  6665. "content": {
  6666. "application/json": {
  6667. "schema": {
  6668. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6669. }
  6670. }
  6671. }
  6672. }
  6673. },
  6674. "description": "Remove the shareable link for a session, making it private again.",
  6675. "summary": "Unshare session",
  6676. "x-codeSamples": [
  6677. {
  6678. "lang": "js",
  6679. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  6680. }
  6681. ]
  6682. }
  6683. },
  6684. "/session/{sessionID}/summarize": {
  6685. "post": {
  6686. "tags": ["session"],
  6687. "operationId": "session.summarize",
  6688. "parameters": [
  6689. {
  6690. "name": "sessionID",
  6691. "in": "path",
  6692. "schema": {
  6693. "type": "string",
  6694. "pattern": "^ses"
  6695. },
  6696. "required": true
  6697. },
  6698. {
  6699. "name": "directory",
  6700. "in": "query",
  6701. "schema": {
  6702. "type": "string"
  6703. },
  6704. "required": false
  6705. },
  6706. {
  6707. "name": "workspace",
  6708. "in": "query",
  6709. "schema": {
  6710. "type": "string"
  6711. },
  6712. "required": false
  6713. }
  6714. ],
  6715. "responses": {
  6716. "200": {
  6717. "description": "Summarized session",
  6718. "content": {
  6719. "application/json": {
  6720. "schema": {
  6721. "type": "boolean",
  6722. "description": "Summarized session"
  6723. }
  6724. }
  6725. }
  6726. },
  6727. "400": {
  6728. "description": "BadRequest | InvalidRequestError",
  6729. "content": {
  6730. "application/json": {
  6731. "schema": {
  6732. "anyOf": [
  6733. {
  6734. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6735. },
  6736. {
  6737. "$ref": "#/components/schemas/InvalidRequestError"
  6738. }
  6739. ]
  6740. }
  6741. }
  6742. }
  6743. },
  6744. "404": {
  6745. "description": "NotFoundError",
  6746. "content": {
  6747. "application/json": {
  6748. "schema": {
  6749. "$ref": "#/components/schemas/NotFoundError"
  6750. }
  6751. }
  6752. }
  6753. }
  6754. },
  6755. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  6756. "summary": "Summarize session",
  6757. "requestBody": {
  6758. "content": {
  6759. "application/json": {
  6760. "schema": {
  6761. "type": "object",
  6762. "properties": {
  6763. "providerID": {
  6764. "type": "string"
  6765. },
  6766. "modelID": {
  6767. "type": "string"
  6768. },
  6769. "auto": {
  6770. "type": "boolean"
  6771. }
  6772. },
  6773. "required": ["providerID", "modelID"],
  6774. "additionalProperties": false
  6775. }
  6776. }
  6777. }
  6778. },
  6779. "x-codeSamples": [
  6780. {
  6781. "lang": "js",
  6782. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  6783. }
  6784. ]
  6785. }
  6786. },
  6787. "/session/{sessionID}/prompt_async": {
  6788. "post": {
  6789. "tags": ["session"],
  6790. "operationId": "session.prompt_async",
  6791. "parameters": [
  6792. {
  6793. "name": "sessionID",
  6794. "in": "path",
  6795. "schema": {
  6796. "type": "string",
  6797. "pattern": "^ses"
  6798. },
  6799. "required": true
  6800. },
  6801. {
  6802. "name": "directory",
  6803. "in": "query",
  6804. "schema": {
  6805. "type": "string"
  6806. },
  6807. "required": false
  6808. },
  6809. {
  6810. "name": "workspace",
  6811. "in": "query",
  6812. "schema": {
  6813. "type": "string"
  6814. },
  6815. "required": false
  6816. }
  6817. ],
  6818. "responses": {
  6819. "204": {
  6820. "description": "Prompt accepted"
  6821. },
  6822. "400": {
  6823. "description": "BadRequest | InvalidRequestError",
  6824. "content": {
  6825. "application/json": {
  6826. "schema": {
  6827. "anyOf": [
  6828. {
  6829. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6830. },
  6831. {
  6832. "$ref": "#/components/schemas/InvalidRequestError"
  6833. }
  6834. ]
  6835. }
  6836. }
  6837. }
  6838. },
  6839. "404": {
  6840. "description": "NotFoundError",
  6841. "content": {
  6842. "application/json": {
  6843. "schema": {
  6844. "$ref": "#/components/schemas/NotFoundError"
  6845. }
  6846. }
  6847. }
  6848. }
  6849. },
  6850. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  6851. "summary": "Send async message",
  6852. "requestBody": {
  6853. "content": {
  6854. "application/json": {
  6855. "schema": {
  6856. "type": "object",
  6857. "properties": {
  6858. "messageID": {
  6859. "type": "string",
  6860. "pattern": "^msg"
  6861. },
  6862. "model": {
  6863. "type": "object",
  6864. "properties": {
  6865. "providerID": {
  6866. "type": "string"
  6867. },
  6868. "modelID": {
  6869. "type": "string"
  6870. }
  6871. },
  6872. "required": ["providerID", "modelID"],
  6873. "additionalProperties": false
  6874. },
  6875. "agent": {
  6876. "type": "string"
  6877. },
  6878. "noReply": {
  6879. "type": "boolean"
  6880. },
  6881. "tools": {
  6882. "type": "object",
  6883. "additionalProperties": {
  6884. "type": "boolean"
  6885. }
  6886. },
  6887. "format": {
  6888. "$ref": "#/components/schemas/OutputFormat"
  6889. },
  6890. "system": {
  6891. "type": "string"
  6892. },
  6893. "variant": {
  6894. "type": "string"
  6895. },
  6896. "parts": {
  6897. "type": "array",
  6898. "items": {
  6899. "anyOf": [
  6900. {
  6901. "$ref": "#/components/schemas/TextPartInput"
  6902. },
  6903. {
  6904. "$ref": "#/components/schemas/FilePartInput"
  6905. },
  6906. {
  6907. "$ref": "#/components/schemas/AgentPartInput"
  6908. },
  6909. {
  6910. "$ref": "#/components/schemas/SubtaskPartInput"
  6911. }
  6912. ]
  6913. }
  6914. }
  6915. },
  6916. "required": ["parts"],
  6917. "additionalProperties": false
  6918. }
  6919. }
  6920. }
  6921. },
  6922. "x-codeSamples": [
  6923. {
  6924. "lang": "js",
  6925. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  6926. }
  6927. ]
  6928. }
  6929. },
  6930. "/session/{sessionID}/command": {
  6931. "post": {
  6932. "tags": ["session"],
  6933. "operationId": "session.command",
  6934. "parameters": [
  6935. {
  6936. "name": "sessionID",
  6937. "in": "path",
  6938. "schema": {
  6939. "type": "string",
  6940. "pattern": "^ses"
  6941. },
  6942. "required": true
  6943. },
  6944. {
  6945. "name": "directory",
  6946. "in": "query",
  6947. "schema": {
  6948. "type": "string"
  6949. },
  6950. "required": false
  6951. },
  6952. {
  6953. "name": "workspace",
  6954. "in": "query",
  6955. "schema": {
  6956. "type": "string"
  6957. },
  6958. "required": false
  6959. }
  6960. ],
  6961. "responses": {
  6962. "200": {
  6963. "description": "Created message",
  6964. "content": {
  6965. "application/json": {
  6966. "schema": {
  6967. "type": "object",
  6968. "required": ["info", "parts"],
  6969. "properties": {
  6970. "info": {
  6971. "$ref": "#/components/schemas/AssistantMessage"
  6972. },
  6973. "parts": {
  6974. "type": "array",
  6975. "items": {
  6976. "$ref": "#/components/schemas/Part"
  6977. }
  6978. }
  6979. }
  6980. }
  6981. }
  6982. }
  6983. },
  6984. "400": {
  6985. "description": "BadRequest | InvalidRequestError",
  6986. "content": {
  6987. "application/json": {
  6988. "schema": {
  6989. "anyOf": [
  6990. {
  6991. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6992. },
  6993. {
  6994. "$ref": "#/components/schemas/InvalidRequestError"
  6995. }
  6996. ]
  6997. }
  6998. }
  6999. }
  7000. },
  7001. "404": {
  7002. "description": "NotFoundError",
  7003. "content": {
  7004. "application/json": {
  7005. "schema": {
  7006. "$ref": "#/components/schemas/NotFoundError"
  7007. }
  7008. }
  7009. }
  7010. }
  7011. },
  7012. "description": "Send a new command to a session for execution by the AI assistant.",
  7013. "summary": "Send command",
  7014. "requestBody": {
  7015. "content": {
  7016. "application/json": {
  7017. "schema": {
  7018. "type": "object",
  7019. "properties": {
  7020. "messageID": {
  7021. "type": "string",
  7022. "pattern": "^msg"
  7023. },
  7024. "agent": {
  7025. "type": "string"
  7026. },
  7027. "model": {
  7028. "type": "string"
  7029. },
  7030. "arguments": {
  7031. "type": "string"
  7032. },
  7033. "command": {
  7034. "type": "string"
  7035. },
  7036. "variant": {
  7037. "type": "string"
  7038. },
  7039. "parts": {
  7040. "type": "array",
  7041. "items": {
  7042. "type": "object",
  7043. "properties": {
  7044. "id": {
  7045. "type": "string",
  7046. "pattern": "^prt"
  7047. },
  7048. "type": {
  7049. "type": "string",
  7050. "enum": ["file"]
  7051. },
  7052. "mime": {
  7053. "type": "string"
  7054. },
  7055. "filename": {
  7056. "type": "string"
  7057. },
  7058. "url": {
  7059. "type": "string"
  7060. },
  7061. "source": {
  7062. "$ref": "#/components/schemas/FilePartSource"
  7063. }
  7064. },
  7065. "required": ["type", "mime", "url"],
  7066. "additionalProperties": false
  7067. }
  7068. }
  7069. },
  7070. "required": ["arguments", "command"],
  7071. "additionalProperties": false
  7072. }
  7073. }
  7074. }
  7075. },
  7076. "x-codeSamples": [
  7077. {
  7078. "lang": "js",
  7079. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  7080. }
  7081. ]
  7082. }
  7083. },
  7084. "/session/{sessionID}/shell": {
  7085. "post": {
  7086. "tags": ["session"],
  7087. "operationId": "session.shell",
  7088. "parameters": [
  7089. {
  7090. "name": "sessionID",
  7091. "in": "path",
  7092. "schema": {
  7093. "type": "string",
  7094. "pattern": "^ses"
  7095. },
  7096. "required": true
  7097. },
  7098. {
  7099. "name": "directory",
  7100. "in": "query",
  7101. "schema": {
  7102. "type": "string"
  7103. },
  7104. "required": false
  7105. },
  7106. {
  7107. "name": "workspace",
  7108. "in": "query",
  7109. "schema": {
  7110. "type": "string"
  7111. },
  7112. "required": false
  7113. }
  7114. ],
  7115. "responses": {
  7116. "200": {
  7117. "description": "Created message",
  7118. "content": {
  7119. "application/json": {
  7120. "schema": {
  7121. "type": "object",
  7122. "properties": {
  7123. "info": {
  7124. "$ref": "#/components/schemas/Message"
  7125. },
  7126. "parts": {
  7127. "type": "array",
  7128. "items": {
  7129. "$ref": "#/components/schemas/Part"
  7130. }
  7131. }
  7132. },
  7133. "required": ["info", "parts"],
  7134. "additionalProperties": false,
  7135. "description": "Created message"
  7136. }
  7137. }
  7138. }
  7139. },
  7140. "400": {
  7141. "description": "BadRequest | InvalidRequestError",
  7142. "content": {
  7143. "application/json": {
  7144. "schema": {
  7145. "anyOf": [
  7146. {
  7147. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7148. },
  7149. {
  7150. "$ref": "#/components/schemas/InvalidRequestError"
  7151. }
  7152. ]
  7153. }
  7154. }
  7155. }
  7156. },
  7157. "404": {
  7158. "description": "NotFoundError",
  7159. "content": {
  7160. "application/json": {
  7161. "schema": {
  7162. "$ref": "#/components/schemas/NotFoundError"
  7163. }
  7164. }
  7165. }
  7166. },
  7167. "409": {
  7168. "description": "SessionBusyError",
  7169. "content": {
  7170. "application/json": {
  7171. "schema": {
  7172. "$ref": "#/components/schemas/SessionBusyError"
  7173. }
  7174. }
  7175. }
  7176. }
  7177. },
  7178. "description": "Execute a shell command within the session context and return the AI's response.",
  7179. "summary": "Run shell command",
  7180. "requestBody": {
  7181. "content": {
  7182. "application/json": {
  7183. "schema": {
  7184. "type": "object",
  7185. "properties": {
  7186. "messageID": {
  7187. "type": "string",
  7188. "pattern": "^msg"
  7189. },
  7190. "agent": {
  7191. "type": "string"
  7192. },
  7193. "model": {
  7194. "type": "object",
  7195. "properties": {
  7196. "providerID": {
  7197. "type": "string"
  7198. },
  7199. "modelID": {
  7200. "type": "string"
  7201. }
  7202. },
  7203. "required": ["providerID", "modelID"],
  7204. "additionalProperties": false
  7205. },
  7206. "command": {
  7207. "type": "string"
  7208. }
  7209. },
  7210. "required": ["agent", "command"],
  7211. "additionalProperties": false
  7212. }
  7213. }
  7214. }
  7215. },
  7216. "x-codeSamples": [
  7217. {
  7218. "lang": "js",
  7219. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  7220. }
  7221. ]
  7222. }
  7223. },
  7224. "/session/{sessionID}/revert": {
  7225. "post": {
  7226. "tags": ["session"],
  7227. "operationId": "session.revert",
  7228. "parameters": [
  7229. {
  7230. "name": "sessionID",
  7231. "in": "path",
  7232. "schema": {
  7233. "type": "string",
  7234. "pattern": "^ses"
  7235. },
  7236. "required": true
  7237. },
  7238. {
  7239. "name": "directory",
  7240. "in": "query",
  7241. "schema": {
  7242. "type": "string"
  7243. },
  7244. "required": false
  7245. },
  7246. {
  7247. "name": "workspace",
  7248. "in": "query",
  7249. "schema": {
  7250. "type": "string"
  7251. },
  7252. "required": false
  7253. }
  7254. ],
  7255. "responses": {
  7256. "200": {
  7257. "description": "Updated session",
  7258. "content": {
  7259. "application/json": {
  7260. "schema": {
  7261. "$ref": "#/components/schemas/Session"
  7262. }
  7263. }
  7264. }
  7265. },
  7266. "400": {
  7267. "description": "BadRequest | InvalidRequestError",
  7268. "content": {
  7269. "application/json": {
  7270. "schema": {
  7271. "anyOf": [
  7272. {
  7273. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7274. },
  7275. {
  7276. "$ref": "#/components/schemas/InvalidRequestError"
  7277. }
  7278. ]
  7279. }
  7280. }
  7281. }
  7282. },
  7283. "404": {
  7284. "description": "NotFoundError",
  7285. "content": {
  7286. "application/json": {
  7287. "schema": {
  7288. "$ref": "#/components/schemas/NotFoundError"
  7289. }
  7290. }
  7291. }
  7292. },
  7293. "409": {
  7294. "description": "SessionBusyError",
  7295. "content": {
  7296. "application/json": {
  7297. "schema": {
  7298. "$ref": "#/components/schemas/SessionBusyError"
  7299. }
  7300. }
  7301. }
  7302. }
  7303. },
  7304. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  7305. "summary": "Revert message",
  7306. "requestBody": {
  7307. "content": {
  7308. "application/json": {
  7309. "schema": {
  7310. "type": "object",
  7311. "properties": {
  7312. "messageID": {
  7313. "type": "string",
  7314. "pattern": "^msg"
  7315. },
  7316. "partID": {
  7317. "type": "string",
  7318. "pattern": "^prt"
  7319. }
  7320. },
  7321. "required": ["messageID"],
  7322. "additionalProperties": false
  7323. }
  7324. }
  7325. }
  7326. },
  7327. "x-codeSamples": [
  7328. {
  7329. "lang": "js",
  7330. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  7331. }
  7332. ]
  7333. }
  7334. },
  7335. "/session/{sessionID}/unrevert": {
  7336. "post": {
  7337. "tags": ["session"],
  7338. "operationId": "session.unrevert",
  7339. "parameters": [
  7340. {
  7341. "name": "sessionID",
  7342. "in": "path",
  7343. "schema": {
  7344. "type": "string",
  7345. "pattern": "^ses"
  7346. },
  7347. "required": true
  7348. },
  7349. {
  7350. "name": "directory",
  7351. "in": "query",
  7352. "schema": {
  7353. "type": "string"
  7354. },
  7355. "required": false
  7356. },
  7357. {
  7358. "name": "workspace",
  7359. "in": "query",
  7360. "schema": {
  7361. "type": "string"
  7362. },
  7363. "required": false
  7364. }
  7365. ],
  7366. "responses": {
  7367. "200": {
  7368. "description": "Updated session",
  7369. "content": {
  7370. "application/json": {
  7371. "schema": {
  7372. "$ref": "#/components/schemas/Session"
  7373. }
  7374. }
  7375. }
  7376. },
  7377. "400": {
  7378. "description": "BadRequest | InvalidRequestError",
  7379. "content": {
  7380. "application/json": {
  7381. "schema": {
  7382. "anyOf": [
  7383. {
  7384. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7385. },
  7386. {
  7387. "$ref": "#/components/schemas/InvalidRequestError"
  7388. }
  7389. ]
  7390. }
  7391. }
  7392. }
  7393. },
  7394. "404": {
  7395. "description": "NotFoundError",
  7396. "content": {
  7397. "application/json": {
  7398. "schema": {
  7399. "$ref": "#/components/schemas/NotFoundError"
  7400. }
  7401. }
  7402. }
  7403. },
  7404. "409": {
  7405. "description": "SessionBusyError",
  7406. "content": {
  7407. "application/json": {
  7408. "schema": {
  7409. "$ref": "#/components/schemas/SessionBusyError"
  7410. }
  7411. }
  7412. }
  7413. }
  7414. },
  7415. "description": "Restore all previously reverted messages in a session.",
  7416. "summary": "Restore reverted messages",
  7417. "x-codeSamples": [
  7418. {
  7419. "lang": "js",
  7420. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  7421. }
  7422. ]
  7423. }
  7424. },
  7425. "/session/{sessionID}/permissions/{permissionID}": {
  7426. "post": {
  7427. "tags": ["session"],
  7428. "operationId": "permission.respond",
  7429. "parameters": [
  7430. {
  7431. "name": "sessionID",
  7432. "in": "path",
  7433. "schema": {
  7434. "type": "string",
  7435. "pattern": "^ses"
  7436. },
  7437. "required": true
  7438. },
  7439. {
  7440. "name": "permissionID",
  7441. "in": "path",
  7442. "schema": {
  7443. "type": "string",
  7444. "pattern": "^per"
  7445. },
  7446. "required": true
  7447. },
  7448. {
  7449. "name": "directory",
  7450. "in": "query",
  7451. "schema": {
  7452. "type": "string"
  7453. },
  7454. "required": false
  7455. },
  7456. {
  7457. "name": "workspace",
  7458. "in": "query",
  7459. "schema": {
  7460. "type": "string"
  7461. },
  7462. "required": false
  7463. }
  7464. ],
  7465. "responses": {
  7466. "200": {
  7467. "description": "Permission processed successfully",
  7468. "content": {
  7469. "application/json": {
  7470. "schema": {
  7471. "type": "boolean",
  7472. "description": "Permission processed successfully"
  7473. }
  7474. }
  7475. }
  7476. },
  7477. "400": {
  7478. "description": "BadRequest | InvalidRequestError",
  7479. "content": {
  7480. "application/json": {
  7481. "schema": {
  7482. "anyOf": [
  7483. {
  7484. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7485. },
  7486. {
  7487. "$ref": "#/components/schemas/InvalidRequestError"
  7488. }
  7489. ]
  7490. }
  7491. }
  7492. }
  7493. },
  7494. "404": {
  7495. "description": "NotFoundError | PermissionNotFoundError",
  7496. "content": {
  7497. "application/json": {
  7498. "schema": {
  7499. "anyOf": [
  7500. {
  7501. "$ref": "#/components/schemas/NotFoundError"
  7502. },
  7503. {
  7504. "$ref": "#/components/schemas/PermissionNotFoundError"
  7505. }
  7506. ]
  7507. }
  7508. }
  7509. }
  7510. }
  7511. },
  7512. "description": "Approve or deny a permission request from the AI assistant.",
  7513. "summary": "Respond to permission",
  7514. "deprecated": true,
  7515. "requestBody": {
  7516. "content": {
  7517. "application/json": {
  7518. "schema": {
  7519. "type": "object",
  7520. "properties": {
  7521. "response": {
  7522. "type": "string",
  7523. "enum": ["once", "always", "reject"]
  7524. }
  7525. },
  7526. "required": ["response"],
  7527. "additionalProperties": false
  7528. }
  7529. }
  7530. }
  7531. },
  7532. "x-codeSamples": [
  7533. {
  7534. "lang": "js",
  7535. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  7536. }
  7537. ]
  7538. }
  7539. },
  7540. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  7541. "delete": {
  7542. "tags": ["session"],
  7543. "operationId": "part.delete",
  7544. "parameters": [
  7545. {
  7546. "name": "sessionID",
  7547. "in": "path",
  7548. "schema": {
  7549. "type": "string",
  7550. "pattern": "^ses"
  7551. },
  7552. "required": true
  7553. },
  7554. {
  7555. "name": "messageID",
  7556. "in": "path",
  7557. "schema": {
  7558. "type": "string",
  7559. "pattern": "^msg"
  7560. },
  7561. "required": true
  7562. },
  7563. {
  7564. "name": "partID",
  7565. "in": "path",
  7566. "schema": {
  7567. "type": "string",
  7568. "pattern": "^prt"
  7569. },
  7570. "required": true
  7571. },
  7572. {
  7573. "name": "directory",
  7574. "in": "query",
  7575. "schema": {
  7576. "type": "string"
  7577. },
  7578. "required": false
  7579. },
  7580. {
  7581. "name": "workspace",
  7582. "in": "query",
  7583. "schema": {
  7584. "type": "string"
  7585. },
  7586. "required": false
  7587. }
  7588. ],
  7589. "responses": {
  7590. "200": {
  7591. "description": "Successfully deleted part",
  7592. "content": {
  7593. "application/json": {
  7594. "schema": {
  7595. "type": "boolean",
  7596. "description": "Successfully deleted part"
  7597. }
  7598. }
  7599. }
  7600. },
  7601. "400": {
  7602. "description": "BadRequest | InvalidRequestError",
  7603. "content": {
  7604. "application/json": {
  7605. "schema": {
  7606. "anyOf": [
  7607. {
  7608. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7609. },
  7610. {
  7611. "$ref": "#/components/schemas/InvalidRequestError"
  7612. }
  7613. ]
  7614. }
  7615. }
  7616. }
  7617. },
  7618. "404": {
  7619. "description": "NotFoundError",
  7620. "content": {
  7621. "application/json": {
  7622. "schema": {
  7623. "$ref": "#/components/schemas/NotFoundError"
  7624. }
  7625. }
  7626. }
  7627. }
  7628. },
  7629. "description": "Delete a part from a message.",
  7630. "x-codeSamples": [
  7631. {
  7632. "lang": "js",
  7633. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  7634. }
  7635. ]
  7636. },
  7637. "patch": {
  7638. "tags": ["session"],
  7639. "operationId": "part.update",
  7640. "parameters": [
  7641. {
  7642. "name": "sessionID",
  7643. "in": "path",
  7644. "schema": {
  7645. "type": "string",
  7646. "pattern": "^ses"
  7647. },
  7648. "required": true
  7649. },
  7650. {
  7651. "name": "messageID",
  7652. "in": "path",
  7653. "schema": {
  7654. "type": "string",
  7655. "pattern": "^msg"
  7656. },
  7657. "required": true
  7658. },
  7659. {
  7660. "name": "partID",
  7661. "in": "path",
  7662. "schema": {
  7663. "type": "string",
  7664. "pattern": "^prt"
  7665. },
  7666. "required": true
  7667. },
  7668. {
  7669. "name": "directory",
  7670. "in": "query",
  7671. "schema": {
  7672. "type": "string"
  7673. },
  7674. "required": false
  7675. },
  7676. {
  7677. "name": "workspace",
  7678. "in": "query",
  7679. "schema": {
  7680. "type": "string"
  7681. },
  7682. "required": false
  7683. }
  7684. ],
  7685. "responses": {
  7686. "200": {
  7687. "description": "Successfully updated part",
  7688. "content": {
  7689. "application/json": {
  7690. "schema": {
  7691. "$ref": "#/components/schemas/Part"
  7692. }
  7693. }
  7694. }
  7695. },
  7696. "400": {
  7697. "description": "BadRequest | InvalidRequestError",
  7698. "content": {
  7699. "application/json": {
  7700. "schema": {
  7701. "anyOf": [
  7702. {
  7703. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7704. },
  7705. {
  7706. "$ref": "#/components/schemas/InvalidRequestError"
  7707. }
  7708. ]
  7709. }
  7710. }
  7711. }
  7712. },
  7713. "404": {
  7714. "description": "NotFoundError",
  7715. "content": {
  7716. "application/json": {
  7717. "schema": {
  7718. "$ref": "#/components/schemas/NotFoundError"
  7719. }
  7720. }
  7721. }
  7722. }
  7723. },
  7724. "description": "Update a part in a message.",
  7725. "requestBody": {
  7726. "content": {
  7727. "application/json": {
  7728. "schema": {
  7729. "$ref": "#/components/schemas/Part"
  7730. }
  7731. }
  7732. }
  7733. },
  7734. "x-codeSamples": [
  7735. {
  7736. "lang": "js",
  7737. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  7738. }
  7739. ]
  7740. }
  7741. },
  7742. "/sync/start": {
  7743. "post": {
  7744. "tags": ["sync"],
  7745. "operationId": "sync.start",
  7746. "parameters": [
  7747. {
  7748. "name": "directory",
  7749. "in": "query",
  7750. "schema": {
  7751. "type": "string"
  7752. },
  7753. "required": false
  7754. },
  7755. {
  7756. "name": "workspace",
  7757. "in": "query",
  7758. "schema": {
  7759. "type": "string"
  7760. },
  7761. "required": false
  7762. }
  7763. ],
  7764. "responses": {
  7765. "200": {
  7766. "description": "Workspace sync started",
  7767. "content": {
  7768. "application/json": {
  7769. "schema": {
  7770. "type": "boolean",
  7771. "description": "Workspace sync started"
  7772. }
  7773. }
  7774. }
  7775. },
  7776. "400": {
  7777. "description": "Bad request",
  7778. "content": {
  7779. "application/json": {
  7780. "schema": {
  7781. "$ref": "#/components/schemas/BadRequestError"
  7782. }
  7783. }
  7784. }
  7785. }
  7786. },
  7787. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  7788. "summary": "Start workspace sync",
  7789. "x-codeSamples": [
  7790. {
  7791. "lang": "js",
  7792. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  7793. }
  7794. ]
  7795. }
  7796. },
  7797. "/sync/replay": {
  7798. "post": {
  7799. "tags": ["sync"],
  7800. "operationId": "sync.replay",
  7801. "parameters": [
  7802. {
  7803. "name": "directory",
  7804. "in": "query",
  7805. "schema": {
  7806. "type": "string"
  7807. },
  7808. "required": false
  7809. },
  7810. {
  7811. "name": "workspace",
  7812. "in": "query",
  7813. "schema": {
  7814. "type": "string"
  7815. },
  7816. "required": false
  7817. }
  7818. ],
  7819. "responses": {
  7820. "200": {
  7821. "description": "Replayed sync events",
  7822. "content": {
  7823. "application/json": {
  7824. "schema": {
  7825. "type": "object",
  7826. "properties": {
  7827. "sessionID": {
  7828. "type": "string"
  7829. }
  7830. },
  7831. "required": ["sessionID"],
  7832. "additionalProperties": false,
  7833. "description": "Replayed sync events"
  7834. }
  7835. }
  7836. }
  7837. },
  7838. "400": {
  7839. "description": "BadRequest | InvalidRequestError",
  7840. "content": {
  7841. "application/json": {
  7842. "schema": {
  7843. "anyOf": [
  7844. {
  7845. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7846. },
  7847. {
  7848. "$ref": "#/components/schemas/InvalidRequestError"
  7849. }
  7850. ]
  7851. }
  7852. }
  7853. }
  7854. }
  7855. },
  7856. "description": "Validate and replay a complete sync event history.",
  7857. "summary": "Replay sync events",
  7858. "requestBody": {
  7859. "content": {
  7860. "application/json": {
  7861. "schema": {
  7862. "type": "object",
  7863. "properties": {
  7864. "directory": {
  7865. "type": "string"
  7866. },
  7867. "events": {
  7868. "type": "array",
  7869. "minItems": 1,
  7870. "items": {
  7871. "type": "object",
  7872. "properties": {
  7873. "id": {
  7874. "type": "string"
  7875. },
  7876. "aggregateID": {
  7877. "type": "string"
  7878. },
  7879. "seq": {
  7880. "type": "integer",
  7881. "minimum": 0
  7882. },
  7883. "type": {
  7884. "type": "string"
  7885. },
  7886. "data": {
  7887. "type": "object"
  7888. }
  7889. },
  7890. "required": ["id", "aggregateID", "seq", "type", "data"],
  7891. "additionalProperties": false
  7892. }
  7893. }
  7894. },
  7895. "required": ["directory", "events"],
  7896. "additionalProperties": false
  7897. }
  7898. }
  7899. }
  7900. },
  7901. "x-codeSamples": [
  7902. {
  7903. "lang": "js",
  7904. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  7905. }
  7906. ]
  7907. }
  7908. },
  7909. "/sync/steal": {
  7910. "post": {
  7911. "tags": ["sync"],
  7912. "operationId": "sync.steal",
  7913. "parameters": [
  7914. {
  7915. "name": "directory",
  7916. "in": "query",
  7917. "schema": {
  7918. "type": "string"
  7919. },
  7920. "required": false
  7921. },
  7922. {
  7923. "name": "workspace",
  7924. "in": "query",
  7925. "schema": {
  7926. "type": "string"
  7927. },
  7928. "required": false
  7929. }
  7930. ],
  7931. "responses": {
  7932. "200": {
  7933. "description": "Session stolen into workspace",
  7934. "content": {
  7935. "application/json": {
  7936. "schema": {
  7937. "type": "object",
  7938. "properties": {
  7939. "sessionID": {
  7940. "type": "string",
  7941. "pattern": "^ses"
  7942. }
  7943. },
  7944. "required": ["sessionID"],
  7945. "additionalProperties": false,
  7946. "description": "Session stolen into workspace"
  7947. }
  7948. }
  7949. }
  7950. },
  7951. "400": {
  7952. "description": "BadRequest | InvalidRequestError",
  7953. "content": {
  7954. "application/json": {
  7955. "schema": {
  7956. "anyOf": [
  7957. {
  7958. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7959. },
  7960. {
  7961. "$ref": "#/components/schemas/InvalidRequestError"
  7962. }
  7963. ]
  7964. }
  7965. }
  7966. }
  7967. }
  7968. },
  7969. "description": "Update a session to belong to the current workspace through the sync event system.",
  7970. "summary": "Steal session into workspace",
  7971. "requestBody": {
  7972. "content": {
  7973. "application/json": {
  7974. "schema": {
  7975. "type": "object",
  7976. "properties": {
  7977. "sessionID": {
  7978. "type": "string",
  7979. "pattern": "^ses"
  7980. }
  7981. },
  7982. "required": ["sessionID"],
  7983. "additionalProperties": false
  7984. }
  7985. }
  7986. }
  7987. },
  7988. "x-codeSamples": [
  7989. {
  7990. "lang": "js",
  7991. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.steal({\n ...\n})"
  7992. }
  7993. ]
  7994. }
  7995. },
  7996. "/sync/history": {
  7997. "post": {
  7998. "tags": ["sync"],
  7999. "operationId": "sync.history.list",
  8000. "parameters": [
  8001. {
  8002. "name": "directory",
  8003. "in": "query",
  8004. "schema": {
  8005. "type": "string"
  8006. },
  8007. "required": false
  8008. },
  8009. {
  8010. "name": "workspace",
  8011. "in": "query",
  8012. "schema": {
  8013. "type": "string"
  8014. },
  8015. "required": false
  8016. }
  8017. ],
  8018. "responses": {
  8019. "200": {
  8020. "description": "Sync events",
  8021. "content": {
  8022. "application/json": {
  8023. "schema": {
  8024. "type": "array",
  8025. "items": {
  8026. "type": "object",
  8027. "properties": {
  8028. "id": {
  8029. "type": "string"
  8030. },
  8031. "aggregate_id": {
  8032. "type": "string"
  8033. },
  8034. "seq": {
  8035. "type": "integer",
  8036. "minimum": 0
  8037. },
  8038. "type": {
  8039. "type": "string"
  8040. },
  8041. "data": {
  8042. "type": "object"
  8043. }
  8044. },
  8045. "required": ["id", "aggregate_id", "seq", "type", "data"],
  8046. "additionalProperties": false
  8047. },
  8048. "description": "Sync events"
  8049. }
  8050. }
  8051. }
  8052. },
  8053. "400": {
  8054. "description": "BadRequest | InvalidRequestError",
  8055. "content": {
  8056. "application/json": {
  8057. "schema": {
  8058. "anyOf": [
  8059. {
  8060. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8061. },
  8062. {
  8063. "$ref": "#/components/schemas/InvalidRequestError"
  8064. }
  8065. ]
  8066. }
  8067. }
  8068. }
  8069. }
  8070. },
  8071. "description": "List sync events for all aggregates. Keys are aggregate IDs the client already knows about, values are the last known sequence ID. Events with seq > value are returned for those aggregates. Aggregates not listed in the input get their full history.",
  8072. "summary": "List sync events",
  8073. "requestBody": {
  8074. "content": {
  8075. "application/json": {
  8076. "schema": {
  8077. "type": "object",
  8078. "additionalProperties": {
  8079. "type": "integer",
  8080. "minimum": 0
  8081. }
  8082. }
  8083. }
  8084. }
  8085. },
  8086. "x-codeSamples": [
  8087. {
  8088. "lang": "js",
  8089. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  8090. }
  8091. ]
  8092. }
  8093. },
  8094. "/api/session": {
  8095. "get": {
  8096. "tags": ["v2"],
  8097. "operationId": "v2.session.list",
  8098. "parameters": [
  8099. {
  8100. "name": "directory",
  8101. "in": "query",
  8102. "schema": {
  8103. "type": "string"
  8104. },
  8105. "required": false
  8106. },
  8107. {
  8108. "name": "workspace",
  8109. "in": "query",
  8110. "schema": {
  8111. "type": "string"
  8112. },
  8113. "required": false
  8114. },
  8115. {
  8116. "name": "limit",
  8117. "in": "query",
  8118. "schema": {
  8119. "type": "number"
  8120. },
  8121. "required": false
  8122. },
  8123. {
  8124. "name": "order",
  8125. "in": "query",
  8126. "schema": {
  8127. "type": "string",
  8128. "enum": ["asc", "desc"]
  8129. },
  8130. "required": false
  8131. },
  8132. {
  8133. "name": "path",
  8134. "in": "query",
  8135. "schema": {
  8136. "type": "string"
  8137. },
  8138. "required": false
  8139. },
  8140. {
  8141. "name": "roots",
  8142. "in": "query",
  8143. "schema": {
  8144. "anyOf": [
  8145. {
  8146. "type": "boolean"
  8147. },
  8148. {
  8149. "type": "string",
  8150. "enum": ["true", "false"]
  8151. }
  8152. ]
  8153. },
  8154. "required": false
  8155. },
  8156. {
  8157. "name": "start",
  8158. "in": "query",
  8159. "schema": {
  8160. "type": "number"
  8161. },
  8162. "required": false
  8163. },
  8164. {
  8165. "name": "search",
  8166. "in": "query",
  8167. "schema": {
  8168. "type": "string"
  8169. },
  8170. "required": false
  8171. },
  8172. {
  8173. "name": "cursor",
  8174. "in": "query",
  8175. "schema": {
  8176. "type": "string",
  8177. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order or filters."
  8178. },
  8179. "required": false
  8180. }
  8181. ],
  8182. "security": [],
  8183. "responses": {
  8184. "200": {
  8185. "description": "V2SessionsResponse",
  8186. "content": {
  8187. "application/json": {
  8188. "schema": {
  8189. "$ref": "#/components/schemas/V2SessionsResponse"
  8190. }
  8191. }
  8192. }
  8193. },
  8194. "400": {
  8195. "description": "InvalidCursorError | InvalidRequestError",
  8196. "content": {
  8197. "application/json": {
  8198. "schema": {
  8199. "anyOf": [
  8200. {
  8201. "$ref": "#/components/schemas/InvalidCursorError"
  8202. },
  8203. {
  8204. "$ref": "#/components/schemas/InvalidRequestError"
  8205. },
  8206. {
  8207. "$ref": "#/components/schemas/InvalidRequestError"
  8208. }
  8209. ]
  8210. }
  8211. }
  8212. }
  8213. },
  8214. "401": {
  8215. "description": "UnauthorizedError",
  8216. "content": {
  8217. "application/json": {
  8218. "schema": {
  8219. "$ref": "#/components/schemas/UnauthorizedError"
  8220. }
  8221. }
  8222. }
  8223. }
  8224. },
  8225. "description": "Retrieve sessions in the requested order. Items keep that order across pages; use cursor.next or cursor.previous to move through the ordered list.",
  8226. "summary": "List v2 sessions",
  8227. "x-codeSamples": [
  8228. {
  8229. "lang": "js",
  8230. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  8231. }
  8232. ]
  8233. }
  8234. },
  8235. "/api/session/{sessionID}/prompt": {
  8236. "post": {
  8237. "tags": ["v2"],
  8238. "operationId": "v2.session.prompt",
  8239. "parameters": [
  8240. {
  8241. "name": "sessionID",
  8242. "in": "path",
  8243. "schema": {
  8244. "type": "string",
  8245. "pattern": "^ses"
  8246. },
  8247. "required": true
  8248. },
  8249. {
  8250. "name": "directory",
  8251. "in": "query",
  8252. "schema": {
  8253. "type": "string"
  8254. },
  8255. "required": false
  8256. },
  8257. {
  8258. "name": "workspace",
  8259. "in": "query",
  8260. "schema": {
  8261. "type": "string"
  8262. },
  8263. "required": false
  8264. }
  8265. ],
  8266. "security": [],
  8267. "responses": {
  8268. "200": {
  8269. "description": "Session.Message",
  8270. "content": {
  8271. "application/json": {
  8272. "schema": {
  8273. "$ref": "#/components/schemas/SessionMessage"
  8274. }
  8275. }
  8276. }
  8277. },
  8278. "400": {
  8279. "description": "InvalidRequestError",
  8280. "content": {
  8281. "application/json": {
  8282. "schema": {
  8283. "$ref": "#/components/schemas/InvalidRequestError"
  8284. }
  8285. }
  8286. }
  8287. },
  8288. "401": {
  8289. "description": "UnauthorizedError",
  8290. "content": {
  8291. "application/json": {
  8292. "schema": {
  8293. "$ref": "#/components/schemas/UnauthorizedError"
  8294. }
  8295. }
  8296. }
  8297. },
  8298. "404": {
  8299. "description": "SessionNotFoundError",
  8300. "content": {
  8301. "application/json": {
  8302. "schema": {
  8303. "$ref": "#/components/schemas/SessionNotFoundError"
  8304. }
  8305. }
  8306. }
  8307. },
  8308. "503": {
  8309. "description": "ServiceUnavailableError",
  8310. "content": {
  8311. "application/json": {
  8312. "schema": {
  8313. "$ref": "#/components/schemas/ServiceUnavailableError"
  8314. }
  8315. }
  8316. }
  8317. }
  8318. },
  8319. "description": "Create a v2 session message and queue it for the agent loop.",
  8320. "summary": "Send v2 message",
  8321. "requestBody": {
  8322. "content": {
  8323. "application/json": {
  8324. "schema": {
  8325. "type": "object",
  8326. "properties": {
  8327. "prompt": {
  8328. "$ref": "#/components/schemas/Prompt"
  8329. },
  8330. "delivery": {
  8331. "$ref": "#/components/schemas/SessionDelivery"
  8332. }
  8333. },
  8334. "required": ["prompt"],
  8335. "additionalProperties": false
  8336. }
  8337. }
  8338. }
  8339. },
  8340. "x-codeSamples": [
  8341. {
  8342. "lang": "js",
  8343. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  8344. }
  8345. ]
  8346. }
  8347. },
  8348. "/api/session/{sessionID}/compact": {
  8349. "post": {
  8350. "tags": ["v2"],
  8351. "operationId": "v2.session.compact",
  8352. "parameters": [
  8353. {
  8354. "name": "sessionID",
  8355. "in": "path",
  8356. "schema": {
  8357. "type": "string",
  8358. "pattern": "^ses"
  8359. },
  8360. "required": true
  8361. },
  8362. {
  8363. "name": "directory",
  8364. "in": "query",
  8365. "schema": {
  8366. "type": "string"
  8367. },
  8368. "required": false
  8369. },
  8370. {
  8371. "name": "workspace",
  8372. "in": "query",
  8373. "schema": {
  8374. "type": "string"
  8375. },
  8376. "required": false
  8377. }
  8378. ],
  8379. "security": [],
  8380. "responses": {
  8381. "204": {
  8382. "description": "<No Content>"
  8383. },
  8384. "400": {
  8385. "description": "InvalidRequestError",
  8386. "content": {
  8387. "application/json": {
  8388. "schema": {
  8389. "$ref": "#/components/schemas/InvalidRequestError"
  8390. }
  8391. }
  8392. }
  8393. },
  8394. "401": {
  8395. "description": "UnauthorizedError",
  8396. "content": {
  8397. "application/json": {
  8398. "schema": {
  8399. "$ref": "#/components/schemas/UnauthorizedError"
  8400. }
  8401. }
  8402. }
  8403. },
  8404. "404": {
  8405. "description": "SessionNotFoundError",
  8406. "content": {
  8407. "application/json": {
  8408. "schema": {
  8409. "$ref": "#/components/schemas/SessionNotFoundError"
  8410. }
  8411. }
  8412. }
  8413. },
  8414. "503": {
  8415. "description": "ServiceUnavailableError",
  8416. "content": {
  8417. "application/json": {
  8418. "schema": {
  8419. "$ref": "#/components/schemas/ServiceUnavailableError"
  8420. }
  8421. }
  8422. }
  8423. }
  8424. },
  8425. "description": "Compact a v2 session conversation.",
  8426. "summary": "Compact v2 session",
  8427. "x-codeSamples": [
  8428. {
  8429. "lang": "js",
  8430. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  8431. }
  8432. ]
  8433. }
  8434. },
  8435. "/api/session/{sessionID}/wait": {
  8436. "post": {
  8437. "tags": ["v2"],
  8438. "operationId": "v2.session.wait",
  8439. "parameters": [
  8440. {
  8441. "name": "sessionID",
  8442. "in": "path",
  8443. "schema": {
  8444. "type": "string",
  8445. "pattern": "^ses"
  8446. },
  8447. "required": true
  8448. },
  8449. {
  8450. "name": "directory",
  8451. "in": "query",
  8452. "schema": {
  8453. "type": "string"
  8454. },
  8455. "required": false
  8456. },
  8457. {
  8458. "name": "workspace",
  8459. "in": "query",
  8460. "schema": {
  8461. "type": "string"
  8462. },
  8463. "required": false
  8464. }
  8465. ],
  8466. "security": [],
  8467. "responses": {
  8468. "204": {
  8469. "description": "<No Content>"
  8470. },
  8471. "400": {
  8472. "description": "InvalidRequestError",
  8473. "content": {
  8474. "application/json": {
  8475. "schema": {
  8476. "$ref": "#/components/schemas/InvalidRequestError"
  8477. }
  8478. }
  8479. }
  8480. },
  8481. "401": {
  8482. "description": "UnauthorizedError",
  8483. "content": {
  8484. "application/json": {
  8485. "schema": {
  8486. "$ref": "#/components/schemas/UnauthorizedError"
  8487. }
  8488. }
  8489. }
  8490. },
  8491. "404": {
  8492. "description": "SessionNotFoundError",
  8493. "content": {
  8494. "application/json": {
  8495. "schema": {
  8496. "$ref": "#/components/schemas/SessionNotFoundError"
  8497. }
  8498. }
  8499. }
  8500. },
  8501. "503": {
  8502. "description": "ServiceUnavailableError",
  8503. "content": {
  8504. "application/json": {
  8505. "schema": {
  8506. "$ref": "#/components/schemas/ServiceUnavailableError"
  8507. }
  8508. }
  8509. }
  8510. }
  8511. },
  8512. "description": "Wait for a v2 session agent loop to become idle.",
  8513. "summary": "Wait for v2 session",
  8514. "x-codeSamples": [
  8515. {
  8516. "lang": "js",
  8517. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  8518. }
  8519. ]
  8520. }
  8521. },
  8522. "/api/session/{sessionID}/context": {
  8523. "get": {
  8524. "tags": ["v2"],
  8525. "operationId": "v2.session.context",
  8526. "parameters": [
  8527. {
  8528. "name": "sessionID",
  8529. "in": "path",
  8530. "schema": {
  8531. "type": "string",
  8532. "pattern": "^ses"
  8533. },
  8534. "required": true
  8535. },
  8536. {
  8537. "name": "directory",
  8538. "in": "query",
  8539. "schema": {
  8540. "type": "string"
  8541. },
  8542. "required": false
  8543. },
  8544. {
  8545. "name": "workspace",
  8546. "in": "query",
  8547. "schema": {
  8548. "type": "string"
  8549. },
  8550. "required": false
  8551. }
  8552. ],
  8553. "security": [],
  8554. "responses": {
  8555. "200": {
  8556. "description": "Success",
  8557. "content": {
  8558. "application/json": {
  8559. "schema": {
  8560. "type": "array",
  8561. "items": {
  8562. "$ref": "#/components/schemas/SessionMessage"
  8563. }
  8564. }
  8565. }
  8566. }
  8567. },
  8568. "400": {
  8569. "description": "InvalidRequestError",
  8570. "content": {
  8571. "application/json": {
  8572. "schema": {
  8573. "$ref": "#/components/schemas/InvalidRequestError"
  8574. }
  8575. }
  8576. }
  8577. },
  8578. "401": {
  8579. "description": "UnauthorizedError",
  8580. "content": {
  8581. "application/json": {
  8582. "schema": {
  8583. "$ref": "#/components/schemas/UnauthorizedError"
  8584. }
  8585. }
  8586. }
  8587. },
  8588. "404": {
  8589. "description": "SessionNotFoundError",
  8590. "content": {
  8591. "application/json": {
  8592. "schema": {
  8593. "$ref": "#/components/schemas/SessionNotFoundError"
  8594. }
  8595. }
  8596. }
  8597. },
  8598. "500": {
  8599. "description": "UnknownError",
  8600. "content": {
  8601. "application/json": {
  8602. "schema": {
  8603. "$ref": "#/components/schemas/UnknownError1"
  8604. }
  8605. }
  8606. }
  8607. }
  8608. },
  8609. "description": "Retrieve the active context messages for a v2 session (all messages after the last compaction).",
  8610. "summary": "Get v2 session context",
  8611. "x-codeSamples": [
  8612. {
  8613. "lang": "js",
  8614. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  8615. }
  8616. ]
  8617. }
  8618. },
  8619. "/api/session/{sessionID}/message": {
  8620. "get": {
  8621. "tags": ["v2 messages"],
  8622. "operationId": "v2.session.messages",
  8623. "parameters": [
  8624. {
  8625. "name": "sessionID",
  8626. "in": "path",
  8627. "schema": {
  8628. "type": "string",
  8629. "pattern": "^ses"
  8630. },
  8631. "required": true
  8632. },
  8633. {
  8634. "name": "directory",
  8635. "in": "query",
  8636. "schema": {
  8637. "type": "string"
  8638. },
  8639. "required": false
  8640. },
  8641. {
  8642. "name": "workspace",
  8643. "in": "query",
  8644. "schema": {
  8645. "type": "string"
  8646. },
  8647. "required": false
  8648. },
  8649. {
  8650. "name": "limit",
  8651. "in": "query",
  8652. "schema": {
  8653. "type": "number"
  8654. },
  8655. "required": false
  8656. },
  8657. {
  8658. "name": "order",
  8659. "in": "query",
  8660. "schema": {
  8661. "type": "string",
  8662. "enum": ["asc", "desc"]
  8663. },
  8664. "required": false
  8665. },
  8666. {
  8667. "name": "cursor",
  8668. "in": "query",
  8669. "schema": {
  8670. "type": "string",
  8671. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."
  8672. },
  8673. "required": false
  8674. }
  8675. ],
  8676. "security": [],
  8677. "responses": {
  8678. "200": {
  8679. "description": "V2SessionMessagesResponse",
  8680. "content": {
  8681. "application/json": {
  8682. "schema": {
  8683. "$ref": "#/components/schemas/V2SessionMessagesResponse"
  8684. }
  8685. }
  8686. }
  8687. },
  8688. "400": {
  8689. "description": "InvalidCursorError | InvalidRequestError",
  8690. "content": {
  8691. "application/json": {
  8692. "schema": {
  8693. "anyOf": [
  8694. {
  8695. "$ref": "#/components/schemas/InvalidCursorError"
  8696. },
  8697. {
  8698. "$ref": "#/components/schemas/InvalidRequestError"
  8699. }
  8700. ]
  8701. }
  8702. }
  8703. }
  8704. },
  8705. "401": {
  8706. "description": "UnauthorizedError",
  8707. "content": {
  8708. "application/json": {
  8709. "schema": {
  8710. "$ref": "#/components/schemas/UnauthorizedError"
  8711. }
  8712. }
  8713. }
  8714. },
  8715. "404": {
  8716. "description": "SessionNotFoundError",
  8717. "content": {
  8718. "application/json": {
  8719. "schema": {
  8720. "$ref": "#/components/schemas/SessionNotFoundError"
  8721. }
  8722. }
  8723. }
  8724. },
  8725. "500": {
  8726. "description": "UnknownError",
  8727. "content": {
  8728. "application/json": {
  8729. "schema": {
  8730. "$ref": "#/components/schemas/UnknownError1"
  8731. }
  8732. }
  8733. }
  8734. }
  8735. },
  8736. "description": "Retrieve projected v2 messages for a session. Items keep the requested order across pages; use cursor.next or cursor.previous to move through the ordered timeline.",
  8737. "summary": "Get v2 session messages",
  8738. "x-codeSamples": [
  8739. {
  8740. "lang": "js",
  8741. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  8742. }
  8743. ]
  8744. }
  8745. },
  8746. "/api/model": {
  8747. "get": {
  8748. "tags": ["v2 models"],
  8749. "operationId": "v2.model.list",
  8750. "parameters": [
  8751. {
  8752. "name": "location",
  8753. "in": "query",
  8754. "schema": {
  8755. "type": "object",
  8756. "properties": {
  8757. "directory": {
  8758. "type": "string"
  8759. },
  8760. "workspace": {
  8761. "type": "string"
  8762. }
  8763. },
  8764. "additionalProperties": false
  8765. },
  8766. "required": false,
  8767. "style": "deepObject",
  8768. "explode": true
  8769. }
  8770. ],
  8771. "security": [],
  8772. "responses": {
  8773. "200": {
  8774. "description": "Success",
  8775. "content": {
  8776. "application/json": {
  8777. "schema": {
  8778. "type": "array",
  8779. "items": {
  8780. "$ref": "#/components/schemas/ModelV2Info"
  8781. }
  8782. }
  8783. }
  8784. }
  8785. },
  8786. "400": {
  8787. "description": "InvalidRequestError",
  8788. "content": {
  8789. "application/json": {
  8790. "schema": {
  8791. "$ref": "#/components/schemas/InvalidRequestError"
  8792. }
  8793. }
  8794. }
  8795. },
  8796. "401": {
  8797. "description": "UnauthorizedError",
  8798. "content": {
  8799. "application/json": {
  8800. "schema": {
  8801. "$ref": "#/components/schemas/UnauthorizedError"
  8802. }
  8803. }
  8804. }
  8805. },
  8806. "503": {
  8807. "description": "ServiceUnavailableError",
  8808. "content": {
  8809. "application/json": {
  8810. "schema": {
  8811. "$ref": "#/components/schemas/ServiceUnavailableError"
  8812. }
  8813. }
  8814. }
  8815. }
  8816. },
  8817. "description": "Retrieve available v2 models ordered by release date.",
  8818. "summary": "List v2 models",
  8819. "x-codeSamples": [
  8820. {
  8821. "lang": "js",
  8822. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.model.list({\n ...\n})"
  8823. }
  8824. ]
  8825. }
  8826. },
  8827. "/api/provider": {
  8828. "get": {
  8829. "tags": ["v2 providers"],
  8830. "operationId": "v2.provider.list",
  8831. "parameters": [
  8832. {
  8833. "name": "location",
  8834. "in": "query",
  8835. "schema": {
  8836. "type": "object",
  8837. "properties": {
  8838. "directory": {
  8839. "type": "string"
  8840. },
  8841. "workspace": {
  8842. "type": "string"
  8843. }
  8844. },
  8845. "additionalProperties": false
  8846. },
  8847. "required": false,
  8848. "style": "deepObject",
  8849. "explode": true
  8850. }
  8851. ],
  8852. "security": [],
  8853. "responses": {
  8854. "200": {
  8855. "description": "Success",
  8856. "content": {
  8857. "application/json": {
  8858. "schema": {
  8859. "type": "array",
  8860. "items": {
  8861. "$ref": "#/components/schemas/ProviderV2Info"
  8862. }
  8863. }
  8864. }
  8865. }
  8866. },
  8867. "400": {
  8868. "description": "InvalidRequestError",
  8869. "content": {
  8870. "application/json": {
  8871. "schema": {
  8872. "$ref": "#/components/schemas/InvalidRequestError"
  8873. }
  8874. }
  8875. }
  8876. },
  8877. "401": {
  8878. "description": "UnauthorizedError",
  8879. "content": {
  8880. "application/json": {
  8881. "schema": {
  8882. "$ref": "#/components/schemas/UnauthorizedError"
  8883. }
  8884. }
  8885. }
  8886. },
  8887. "503": {
  8888. "description": "ServiceUnavailableError",
  8889. "content": {
  8890. "application/json": {
  8891. "schema": {
  8892. "$ref": "#/components/schemas/ServiceUnavailableError"
  8893. }
  8894. }
  8895. }
  8896. }
  8897. },
  8898. "description": "Retrieve active v2 AI providers so clients can show provider availability and configuration.",
  8899. "summary": "List v2 providers",
  8900. "x-codeSamples": [
  8901. {
  8902. "lang": "js",
  8903. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.list({\n ...\n})"
  8904. }
  8905. ]
  8906. }
  8907. },
  8908. "/api/provider/{providerID}": {
  8909. "get": {
  8910. "tags": ["v2 providers"],
  8911. "operationId": "v2.provider.get",
  8912. "parameters": [
  8913. {
  8914. "name": "providerID",
  8915. "in": "path",
  8916. "schema": {
  8917. "type": "string"
  8918. },
  8919. "required": true
  8920. },
  8921. {
  8922. "name": "location",
  8923. "in": "query",
  8924. "schema": {
  8925. "type": "object",
  8926. "properties": {
  8927. "directory": {
  8928. "type": "string"
  8929. },
  8930. "workspace": {
  8931. "type": "string"
  8932. }
  8933. },
  8934. "additionalProperties": false
  8935. },
  8936. "required": false,
  8937. "style": "deepObject",
  8938. "explode": true
  8939. }
  8940. ],
  8941. "security": [],
  8942. "responses": {
  8943. "200": {
  8944. "description": "ProviderV2.Info",
  8945. "content": {
  8946. "application/json": {
  8947. "schema": {
  8948. "$ref": "#/components/schemas/ProviderV2Info"
  8949. }
  8950. }
  8951. }
  8952. },
  8953. "400": {
  8954. "description": "InvalidRequestError",
  8955. "content": {
  8956. "application/json": {
  8957. "schema": {
  8958. "$ref": "#/components/schemas/InvalidRequestError"
  8959. }
  8960. }
  8961. }
  8962. },
  8963. "401": {
  8964. "description": "UnauthorizedError",
  8965. "content": {
  8966. "application/json": {
  8967. "schema": {
  8968. "$ref": "#/components/schemas/UnauthorizedError"
  8969. }
  8970. }
  8971. }
  8972. },
  8973. "404": {
  8974. "description": "ProviderNotFoundError",
  8975. "content": {
  8976. "application/json": {
  8977. "schema": {
  8978. "$ref": "#/components/schemas/ProviderNotFoundError"
  8979. }
  8980. }
  8981. }
  8982. },
  8983. "503": {
  8984. "description": "ServiceUnavailableError",
  8985. "content": {
  8986. "application/json": {
  8987. "schema": {
  8988. "$ref": "#/components/schemas/ServiceUnavailableError"
  8989. }
  8990. }
  8991. }
  8992. }
  8993. },
  8994. "description": "Retrieve a single v2 AI provider so clients can inspect its availability and endpoint settings.",
  8995. "summary": "Get v2 provider",
  8996. "x-codeSamples": [
  8997. {
  8998. "lang": "js",
  8999. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.get({\n ...\n})"
  9000. }
  9001. ]
  9002. }
  9003. },
  9004. "/tui/append-prompt": {
  9005. "post": {
  9006. "tags": ["tui"],
  9007. "operationId": "tui.appendPrompt",
  9008. "parameters": [
  9009. {
  9010. "name": "directory",
  9011. "in": "query",
  9012. "schema": {
  9013. "type": "string"
  9014. },
  9015. "required": false
  9016. },
  9017. {
  9018. "name": "workspace",
  9019. "in": "query",
  9020. "schema": {
  9021. "type": "string"
  9022. },
  9023. "required": false
  9024. }
  9025. ],
  9026. "responses": {
  9027. "200": {
  9028. "description": "Prompt processed successfully",
  9029. "content": {
  9030. "application/json": {
  9031. "schema": {
  9032. "type": "boolean",
  9033. "description": "Prompt processed successfully"
  9034. }
  9035. }
  9036. }
  9037. },
  9038. "400": {
  9039. "description": "BadRequest | InvalidRequestError",
  9040. "content": {
  9041. "application/json": {
  9042. "schema": {
  9043. "anyOf": [
  9044. {
  9045. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9046. },
  9047. {
  9048. "$ref": "#/components/schemas/InvalidRequestError"
  9049. }
  9050. ]
  9051. }
  9052. }
  9053. }
  9054. }
  9055. },
  9056. "description": "Append prompt to the TUI.",
  9057. "summary": "Append TUI prompt",
  9058. "requestBody": {
  9059. "content": {
  9060. "application/json": {
  9061. "schema": {
  9062. "type": "object",
  9063. "properties": {
  9064. "text": {
  9065. "type": "string"
  9066. }
  9067. },
  9068. "required": ["text"],
  9069. "additionalProperties": false
  9070. }
  9071. }
  9072. }
  9073. },
  9074. "x-codeSamples": [
  9075. {
  9076. "lang": "js",
  9077. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  9078. }
  9079. ]
  9080. }
  9081. },
  9082. "/tui/open-help": {
  9083. "post": {
  9084. "tags": ["tui"],
  9085. "operationId": "tui.openHelp",
  9086. "parameters": [
  9087. {
  9088. "name": "directory",
  9089. "in": "query",
  9090. "schema": {
  9091. "type": "string"
  9092. },
  9093. "required": false
  9094. },
  9095. {
  9096. "name": "workspace",
  9097. "in": "query",
  9098. "schema": {
  9099. "type": "string"
  9100. },
  9101. "required": false
  9102. }
  9103. ],
  9104. "responses": {
  9105. "200": {
  9106. "description": "Help dialog opened successfully",
  9107. "content": {
  9108. "application/json": {
  9109. "schema": {
  9110. "type": "boolean",
  9111. "description": "Help dialog opened successfully"
  9112. }
  9113. }
  9114. }
  9115. },
  9116. "400": {
  9117. "description": "Bad request",
  9118. "content": {
  9119. "application/json": {
  9120. "schema": {
  9121. "$ref": "#/components/schemas/BadRequestError"
  9122. }
  9123. }
  9124. }
  9125. }
  9126. },
  9127. "description": "Open the help dialog in the TUI to display user assistance information.",
  9128. "summary": "Open help dialog",
  9129. "x-codeSamples": [
  9130. {
  9131. "lang": "js",
  9132. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  9133. }
  9134. ]
  9135. }
  9136. },
  9137. "/tui/open-sessions": {
  9138. "post": {
  9139. "tags": ["tui"],
  9140. "operationId": "tui.openSessions",
  9141. "parameters": [
  9142. {
  9143. "name": "directory",
  9144. "in": "query",
  9145. "schema": {
  9146. "type": "string"
  9147. },
  9148. "required": false
  9149. },
  9150. {
  9151. "name": "workspace",
  9152. "in": "query",
  9153. "schema": {
  9154. "type": "string"
  9155. },
  9156. "required": false
  9157. }
  9158. ],
  9159. "responses": {
  9160. "200": {
  9161. "description": "Session dialog opened successfully",
  9162. "content": {
  9163. "application/json": {
  9164. "schema": {
  9165. "type": "boolean",
  9166. "description": "Session dialog opened successfully"
  9167. }
  9168. }
  9169. }
  9170. },
  9171. "400": {
  9172. "description": "Bad request",
  9173. "content": {
  9174. "application/json": {
  9175. "schema": {
  9176. "$ref": "#/components/schemas/BadRequestError"
  9177. }
  9178. }
  9179. }
  9180. }
  9181. },
  9182. "description": "Open the session dialog.",
  9183. "summary": "Open sessions dialog",
  9184. "x-codeSamples": [
  9185. {
  9186. "lang": "js",
  9187. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  9188. }
  9189. ]
  9190. }
  9191. },
  9192. "/tui/open-themes": {
  9193. "post": {
  9194. "tags": ["tui"],
  9195. "operationId": "tui.openThemes",
  9196. "parameters": [
  9197. {
  9198. "name": "directory",
  9199. "in": "query",
  9200. "schema": {
  9201. "type": "string"
  9202. },
  9203. "required": false
  9204. },
  9205. {
  9206. "name": "workspace",
  9207. "in": "query",
  9208. "schema": {
  9209. "type": "string"
  9210. },
  9211. "required": false
  9212. }
  9213. ],
  9214. "responses": {
  9215. "200": {
  9216. "description": "Theme dialog opened successfully",
  9217. "content": {
  9218. "application/json": {
  9219. "schema": {
  9220. "type": "boolean",
  9221. "description": "Theme dialog opened successfully"
  9222. }
  9223. }
  9224. }
  9225. },
  9226. "400": {
  9227. "description": "Bad request",
  9228. "content": {
  9229. "application/json": {
  9230. "schema": {
  9231. "$ref": "#/components/schemas/BadRequestError"
  9232. }
  9233. }
  9234. }
  9235. }
  9236. },
  9237. "description": "Open the theme dialog.",
  9238. "summary": "Open themes dialog",
  9239. "x-codeSamples": [
  9240. {
  9241. "lang": "js",
  9242. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  9243. }
  9244. ]
  9245. }
  9246. },
  9247. "/tui/open-models": {
  9248. "post": {
  9249. "tags": ["tui"],
  9250. "operationId": "tui.openModels",
  9251. "parameters": [
  9252. {
  9253. "name": "directory",
  9254. "in": "query",
  9255. "schema": {
  9256. "type": "string"
  9257. },
  9258. "required": false
  9259. },
  9260. {
  9261. "name": "workspace",
  9262. "in": "query",
  9263. "schema": {
  9264. "type": "string"
  9265. },
  9266. "required": false
  9267. }
  9268. ],
  9269. "responses": {
  9270. "200": {
  9271. "description": "Model dialog opened successfully",
  9272. "content": {
  9273. "application/json": {
  9274. "schema": {
  9275. "type": "boolean",
  9276. "description": "Model dialog opened successfully"
  9277. }
  9278. }
  9279. }
  9280. },
  9281. "400": {
  9282. "description": "Bad request",
  9283. "content": {
  9284. "application/json": {
  9285. "schema": {
  9286. "$ref": "#/components/schemas/BadRequestError"
  9287. }
  9288. }
  9289. }
  9290. }
  9291. },
  9292. "description": "Open the model dialog.",
  9293. "summary": "Open models dialog",
  9294. "x-codeSamples": [
  9295. {
  9296. "lang": "js",
  9297. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  9298. }
  9299. ]
  9300. }
  9301. },
  9302. "/tui/submit-prompt": {
  9303. "post": {
  9304. "tags": ["tui"],
  9305. "operationId": "tui.submitPrompt",
  9306. "parameters": [
  9307. {
  9308. "name": "directory",
  9309. "in": "query",
  9310. "schema": {
  9311. "type": "string"
  9312. },
  9313. "required": false
  9314. },
  9315. {
  9316. "name": "workspace",
  9317. "in": "query",
  9318. "schema": {
  9319. "type": "string"
  9320. },
  9321. "required": false
  9322. }
  9323. ],
  9324. "responses": {
  9325. "200": {
  9326. "description": "Prompt submitted successfully",
  9327. "content": {
  9328. "application/json": {
  9329. "schema": {
  9330. "type": "boolean",
  9331. "description": "Prompt submitted successfully"
  9332. }
  9333. }
  9334. }
  9335. },
  9336. "400": {
  9337. "description": "Bad request",
  9338. "content": {
  9339. "application/json": {
  9340. "schema": {
  9341. "$ref": "#/components/schemas/BadRequestError"
  9342. }
  9343. }
  9344. }
  9345. }
  9346. },
  9347. "description": "Submit the prompt.",
  9348. "summary": "Submit TUI prompt",
  9349. "x-codeSamples": [
  9350. {
  9351. "lang": "js",
  9352. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  9353. }
  9354. ]
  9355. }
  9356. },
  9357. "/tui/clear-prompt": {
  9358. "post": {
  9359. "tags": ["tui"],
  9360. "operationId": "tui.clearPrompt",
  9361. "parameters": [
  9362. {
  9363. "name": "directory",
  9364. "in": "query",
  9365. "schema": {
  9366. "type": "string"
  9367. },
  9368. "required": false
  9369. },
  9370. {
  9371. "name": "workspace",
  9372. "in": "query",
  9373. "schema": {
  9374. "type": "string"
  9375. },
  9376. "required": false
  9377. }
  9378. ],
  9379. "responses": {
  9380. "200": {
  9381. "description": "Prompt cleared successfully",
  9382. "content": {
  9383. "application/json": {
  9384. "schema": {
  9385. "type": "boolean",
  9386. "description": "Prompt cleared successfully"
  9387. }
  9388. }
  9389. }
  9390. },
  9391. "400": {
  9392. "description": "Bad request",
  9393. "content": {
  9394. "application/json": {
  9395. "schema": {
  9396. "$ref": "#/components/schemas/BadRequestError"
  9397. }
  9398. }
  9399. }
  9400. }
  9401. },
  9402. "description": "Clear the prompt.",
  9403. "summary": "Clear TUI prompt",
  9404. "x-codeSamples": [
  9405. {
  9406. "lang": "js",
  9407. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  9408. }
  9409. ]
  9410. }
  9411. },
  9412. "/tui/execute-command": {
  9413. "post": {
  9414. "tags": ["tui"],
  9415. "operationId": "tui.executeCommand",
  9416. "parameters": [
  9417. {
  9418. "name": "directory",
  9419. "in": "query",
  9420. "schema": {
  9421. "type": "string"
  9422. },
  9423. "required": false
  9424. },
  9425. {
  9426. "name": "workspace",
  9427. "in": "query",
  9428. "schema": {
  9429. "type": "string"
  9430. },
  9431. "required": false
  9432. }
  9433. ],
  9434. "responses": {
  9435. "200": {
  9436. "description": "Command executed successfully",
  9437. "content": {
  9438. "application/json": {
  9439. "schema": {
  9440. "type": "boolean",
  9441. "description": "Command executed successfully"
  9442. }
  9443. }
  9444. }
  9445. },
  9446. "400": {
  9447. "description": "BadRequest | InvalidRequestError",
  9448. "content": {
  9449. "application/json": {
  9450. "schema": {
  9451. "anyOf": [
  9452. {
  9453. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9454. },
  9455. {
  9456. "$ref": "#/components/schemas/InvalidRequestError"
  9457. }
  9458. ]
  9459. }
  9460. }
  9461. }
  9462. }
  9463. },
  9464. "description": "Execute a TUI command.",
  9465. "summary": "Execute TUI command",
  9466. "requestBody": {
  9467. "content": {
  9468. "application/json": {
  9469. "schema": {
  9470. "type": "object",
  9471. "properties": {
  9472. "command": {
  9473. "type": "string"
  9474. }
  9475. },
  9476. "required": ["command"],
  9477. "additionalProperties": false
  9478. }
  9479. }
  9480. }
  9481. },
  9482. "x-codeSamples": [
  9483. {
  9484. "lang": "js",
  9485. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  9486. }
  9487. ]
  9488. }
  9489. },
  9490. "/tui/show-toast": {
  9491. "post": {
  9492. "tags": ["tui"],
  9493. "operationId": "tui.showToast",
  9494. "parameters": [
  9495. {
  9496. "name": "directory",
  9497. "in": "query",
  9498. "schema": {
  9499. "type": "string"
  9500. },
  9501. "required": false
  9502. },
  9503. {
  9504. "name": "workspace",
  9505. "in": "query",
  9506. "schema": {
  9507. "type": "string"
  9508. },
  9509. "required": false
  9510. }
  9511. ],
  9512. "responses": {
  9513. "200": {
  9514. "description": "Toast notification shown successfully",
  9515. "content": {
  9516. "application/json": {
  9517. "schema": {
  9518. "type": "boolean",
  9519. "description": "Toast notification shown successfully"
  9520. }
  9521. }
  9522. }
  9523. },
  9524. "400": {
  9525. "description": "Bad request",
  9526. "content": {
  9527. "application/json": {
  9528. "schema": {
  9529. "$ref": "#/components/schemas/BadRequestError"
  9530. }
  9531. }
  9532. }
  9533. }
  9534. },
  9535. "description": "Show a toast notification in the TUI.",
  9536. "summary": "Show TUI toast",
  9537. "requestBody": {
  9538. "content": {
  9539. "application/json": {
  9540. "schema": {
  9541. "type": "object",
  9542. "properties": {
  9543. "title": {
  9544. "type": "string"
  9545. },
  9546. "message": {
  9547. "type": "string"
  9548. },
  9549. "variant": {
  9550. "type": "string",
  9551. "enum": ["info", "success", "warning", "error"]
  9552. },
  9553. "duration": {
  9554. "type": "integer",
  9555. "exclusiveMinimum": 0
  9556. }
  9557. },
  9558. "required": ["message", "variant"],
  9559. "additionalProperties": false
  9560. }
  9561. }
  9562. }
  9563. },
  9564. "x-codeSamples": [
  9565. {
  9566. "lang": "js",
  9567. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  9568. }
  9569. ]
  9570. }
  9571. },
  9572. "/tui/publish": {
  9573. "post": {
  9574. "tags": ["tui"],
  9575. "operationId": "tui.publish",
  9576. "parameters": [
  9577. {
  9578. "name": "directory",
  9579. "in": "query",
  9580. "schema": {
  9581. "type": "string"
  9582. },
  9583. "required": false
  9584. },
  9585. {
  9586. "name": "workspace",
  9587. "in": "query",
  9588. "schema": {
  9589. "type": "string"
  9590. },
  9591. "required": false
  9592. }
  9593. ],
  9594. "responses": {
  9595. "200": {
  9596. "description": "Event published successfully",
  9597. "content": {
  9598. "application/json": {
  9599. "schema": {
  9600. "type": "boolean",
  9601. "description": "Event published successfully"
  9602. }
  9603. }
  9604. }
  9605. },
  9606. "400": {
  9607. "description": "BadRequest | InvalidRequestError",
  9608. "content": {
  9609. "application/json": {
  9610. "schema": {
  9611. "anyOf": [
  9612. {
  9613. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9614. },
  9615. {
  9616. "$ref": "#/components/schemas/InvalidRequestError"
  9617. }
  9618. ]
  9619. }
  9620. }
  9621. }
  9622. }
  9623. },
  9624. "description": "Publish a TUI event.",
  9625. "summary": "Publish TUI event",
  9626. "requestBody": {
  9627. "content": {
  9628. "application/json": {
  9629. "schema": {
  9630. "anyOf": [
  9631. {
  9632. "$ref": "#/components/schemas/EventTuiPromptAppend"
  9633. },
  9634. {
  9635. "$ref": "#/components/schemas/EventTuiCommandExecute"
  9636. },
  9637. {
  9638. "$ref": "#/components/schemas/EventTuiToastShow"
  9639. },
  9640. {
  9641. "$ref": "#/components/schemas/EventTuiSessionSelect"
  9642. }
  9643. ]
  9644. }
  9645. }
  9646. }
  9647. },
  9648. "x-codeSamples": [
  9649. {
  9650. "lang": "js",
  9651. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  9652. }
  9653. ]
  9654. }
  9655. },
  9656. "/tui/select-session": {
  9657. "post": {
  9658. "tags": ["tui"],
  9659. "operationId": "tui.selectSession",
  9660. "parameters": [
  9661. {
  9662. "name": "directory",
  9663. "in": "query",
  9664. "schema": {
  9665. "type": "string"
  9666. },
  9667. "required": false
  9668. },
  9669. {
  9670. "name": "workspace",
  9671. "in": "query",
  9672. "schema": {
  9673. "type": "string"
  9674. },
  9675. "required": false
  9676. }
  9677. ],
  9678. "responses": {
  9679. "200": {
  9680. "description": "Session selected successfully",
  9681. "content": {
  9682. "application/json": {
  9683. "schema": {
  9684. "type": "boolean",
  9685. "description": "Session selected successfully"
  9686. }
  9687. }
  9688. }
  9689. },
  9690. "400": {
  9691. "description": "BadRequest | InvalidRequestError",
  9692. "content": {
  9693. "application/json": {
  9694. "schema": {
  9695. "anyOf": [
  9696. {
  9697. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9698. },
  9699. {
  9700. "$ref": "#/components/schemas/InvalidRequestError"
  9701. }
  9702. ]
  9703. }
  9704. }
  9705. }
  9706. },
  9707. "404": {
  9708. "description": "NotFoundError",
  9709. "content": {
  9710. "application/json": {
  9711. "schema": {
  9712. "$ref": "#/components/schemas/NotFoundError"
  9713. }
  9714. }
  9715. }
  9716. }
  9717. },
  9718. "description": "Navigate the TUI to display the specified session.",
  9719. "summary": "Select session",
  9720. "requestBody": {
  9721. "content": {
  9722. "application/json": {
  9723. "schema": {
  9724. "type": "object",
  9725. "properties": {
  9726. "sessionID": {
  9727. "type": "string",
  9728. "pattern": "^ses",
  9729. "description": "Session ID to navigate to"
  9730. }
  9731. },
  9732. "required": ["sessionID"],
  9733. "additionalProperties": false
  9734. }
  9735. }
  9736. }
  9737. },
  9738. "x-codeSamples": [
  9739. {
  9740. "lang": "js",
  9741. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  9742. }
  9743. ]
  9744. }
  9745. },
  9746. "/tui/control/next": {
  9747. "get": {
  9748. "tags": ["tui"],
  9749. "operationId": "tui.control.next",
  9750. "parameters": [
  9751. {
  9752. "name": "directory",
  9753. "in": "query",
  9754. "schema": {
  9755. "type": "string"
  9756. },
  9757. "required": false
  9758. },
  9759. {
  9760. "name": "workspace",
  9761. "in": "query",
  9762. "schema": {
  9763. "type": "string"
  9764. },
  9765. "required": false
  9766. }
  9767. ],
  9768. "responses": {
  9769. "200": {
  9770. "description": "Next TUI request",
  9771. "content": {
  9772. "application/json": {
  9773. "schema": {
  9774. "type": "object",
  9775. "properties": {
  9776. "path": {
  9777. "type": "string"
  9778. },
  9779. "body": {}
  9780. },
  9781. "required": ["path", "body"],
  9782. "additionalProperties": false,
  9783. "description": "Next TUI request"
  9784. }
  9785. }
  9786. }
  9787. },
  9788. "400": {
  9789. "description": "Bad request",
  9790. "content": {
  9791. "application/json": {
  9792. "schema": {
  9793. "$ref": "#/components/schemas/BadRequestError"
  9794. }
  9795. }
  9796. }
  9797. }
  9798. },
  9799. "description": "Retrieve the next TUI request from the queue for processing.",
  9800. "summary": "Get next TUI request",
  9801. "x-codeSamples": [
  9802. {
  9803. "lang": "js",
  9804. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  9805. }
  9806. ]
  9807. }
  9808. },
  9809. "/tui/control/response": {
  9810. "post": {
  9811. "tags": ["tui"],
  9812. "operationId": "tui.control.response",
  9813. "parameters": [
  9814. {
  9815. "name": "directory",
  9816. "in": "query",
  9817. "schema": {
  9818. "type": "string"
  9819. },
  9820. "required": false
  9821. },
  9822. {
  9823. "name": "workspace",
  9824. "in": "query",
  9825. "schema": {
  9826. "type": "string"
  9827. },
  9828. "required": false
  9829. }
  9830. ],
  9831. "responses": {
  9832. "200": {
  9833. "description": "Response submitted successfully",
  9834. "content": {
  9835. "application/json": {
  9836. "schema": {
  9837. "type": "boolean",
  9838. "description": "Response submitted successfully"
  9839. }
  9840. }
  9841. }
  9842. },
  9843. "400": {
  9844. "description": "Bad request",
  9845. "content": {
  9846. "application/json": {
  9847. "schema": {
  9848. "$ref": "#/components/schemas/BadRequestError"
  9849. }
  9850. }
  9851. }
  9852. }
  9853. },
  9854. "description": "Submit a response to the TUI request queue to complete a pending request.",
  9855. "summary": "Submit TUI response",
  9856. "requestBody": {
  9857. "content": {
  9858. "application/json": {
  9859. "schema": {}
  9860. }
  9861. }
  9862. },
  9863. "x-codeSamples": [
  9864. {
  9865. "lang": "js",
  9866. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  9867. }
  9868. ]
  9869. }
  9870. },
  9871. "/experimental/workspace/adapter": {
  9872. "get": {
  9873. "tags": ["workspace"],
  9874. "operationId": "experimental.workspace.adapter.list",
  9875. "parameters": [
  9876. {
  9877. "name": "directory",
  9878. "in": "query",
  9879. "schema": {
  9880. "type": "string"
  9881. },
  9882. "required": false
  9883. },
  9884. {
  9885. "name": "workspace",
  9886. "in": "query",
  9887. "schema": {
  9888. "type": "string"
  9889. },
  9890. "required": false
  9891. }
  9892. ],
  9893. "responses": {
  9894. "200": {
  9895. "description": "Workspace adapters",
  9896. "content": {
  9897. "application/json": {
  9898. "schema": {
  9899. "type": "array",
  9900. "items": {
  9901. "type": "object",
  9902. "properties": {
  9903. "type": {
  9904. "type": "string"
  9905. },
  9906. "name": {
  9907. "type": "string"
  9908. },
  9909. "description": {
  9910. "type": "string"
  9911. }
  9912. },
  9913. "required": ["type", "name", "description"],
  9914. "additionalProperties": false
  9915. },
  9916. "description": "Workspace adapters"
  9917. }
  9918. }
  9919. }
  9920. },
  9921. "400": {
  9922. "description": "Bad request",
  9923. "content": {
  9924. "application/json": {
  9925. "schema": {
  9926. "$ref": "#/components/schemas/BadRequestError"
  9927. }
  9928. }
  9929. }
  9930. }
  9931. },
  9932. "description": "List all available workspace adapters for the current project.",
  9933. "summary": "List workspace adapters",
  9934. "x-codeSamples": [
  9935. {
  9936. "lang": "js",
  9937. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  9938. }
  9939. ]
  9940. }
  9941. },
  9942. "/experimental/workspace": {
  9943. "get": {
  9944. "tags": ["workspace"],
  9945. "operationId": "experimental.workspace.list",
  9946. "parameters": [
  9947. {
  9948. "name": "directory",
  9949. "in": "query",
  9950. "schema": {
  9951. "type": "string"
  9952. },
  9953. "required": false
  9954. },
  9955. {
  9956. "name": "workspace",
  9957. "in": "query",
  9958. "schema": {
  9959. "type": "string"
  9960. },
  9961. "required": false
  9962. }
  9963. ],
  9964. "responses": {
  9965. "200": {
  9966. "description": "Workspaces",
  9967. "content": {
  9968. "application/json": {
  9969. "schema": {
  9970. "type": "array",
  9971. "items": {
  9972. "$ref": "#/components/schemas/Workspace"
  9973. },
  9974. "description": "Workspaces"
  9975. }
  9976. }
  9977. }
  9978. },
  9979. "400": {
  9980. "description": "Bad request",
  9981. "content": {
  9982. "application/json": {
  9983. "schema": {
  9984. "$ref": "#/components/schemas/BadRequestError"
  9985. }
  9986. }
  9987. }
  9988. }
  9989. },
  9990. "description": "List all workspaces.",
  9991. "summary": "List workspaces",
  9992. "x-codeSamples": [
  9993. {
  9994. "lang": "js",
  9995. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  9996. }
  9997. ]
  9998. },
  9999. "post": {
  10000. "tags": ["workspace"],
  10001. "operationId": "experimental.workspace.create",
  10002. "parameters": [
  10003. {
  10004. "name": "directory",
  10005. "in": "query",
  10006. "schema": {
  10007. "type": "string"
  10008. },
  10009. "required": false
  10010. },
  10011. {
  10012. "name": "workspace",
  10013. "in": "query",
  10014. "schema": {
  10015. "type": "string"
  10016. },
  10017. "required": false
  10018. }
  10019. ],
  10020. "responses": {
  10021. "200": {
  10022. "description": "Workspace created",
  10023. "content": {
  10024. "application/json": {
  10025. "schema": {
  10026. "$ref": "#/components/schemas/Workspace"
  10027. }
  10028. }
  10029. }
  10030. },
  10031. "400": {
  10032. "description": "BadRequest | InvalidRequestError",
  10033. "content": {
  10034. "application/json": {
  10035. "schema": {
  10036. "anyOf": [
  10037. {
  10038. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  10039. },
  10040. {
  10041. "$ref": "#/components/schemas/InvalidRequestError"
  10042. }
  10043. ]
  10044. }
  10045. }
  10046. }
  10047. }
  10048. },
  10049. "description": "Create a workspace for the current project.",
  10050. "summary": "Create workspace",
  10051. "requestBody": {
  10052. "content": {
  10053. "application/json": {
  10054. "schema": {
  10055. "type": "object",
  10056. "properties": {
  10057. "id": {
  10058. "type": "string",
  10059. "pattern": "^wrk"
  10060. },
  10061. "type": {
  10062. "type": "string"
  10063. },
  10064. "branch": {
  10065. "anyOf": [
  10066. {
  10067. "type": "string"
  10068. },
  10069. {
  10070. "type": "null"
  10071. }
  10072. ]
  10073. },
  10074. "extra": {
  10075. "anyOf": [
  10076. {},
  10077. {
  10078. "type": "null"
  10079. }
  10080. ]
  10081. }
  10082. },
  10083. "required": ["type"],
  10084. "additionalProperties": false
  10085. }
  10086. }
  10087. }
  10088. },
  10089. "x-codeSamples": [
  10090. {
  10091. "lang": "js",
  10092. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  10093. }
  10094. ]
  10095. }
  10096. },
  10097. "/experimental/workspace/sync-list": {
  10098. "post": {
  10099. "tags": ["workspace"],
  10100. "operationId": "experimental.workspace.syncList",
  10101. "parameters": [
  10102. {
  10103. "name": "directory",
  10104. "in": "query",
  10105. "schema": {
  10106. "type": "string"
  10107. },
  10108. "required": false
  10109. },
  10110. {
  10111. "name": "workspace",
  10112. "in": "query",
  10113. "schema": {
  10114. "type": "string"
  10115. },
  10116. "required": false
  10117. }
  10118. ],
  10119. "responses": {
  10120. "204": {
  10121. "description": "Workspace list synced"
  10122. },
  10123. "400": {
  10124. "description": "Bad request",
  10125. "content": {
  10126. "application/json": {
  10127. "schema": {
  10128. "$ref": "#/components/schemas/BadRequestError"
  10129. }
  10130. }
  10131. }
  10132. }
  10133. },
  10134. "description": "Register missing workspaces returned by workspace adapters.",
  10135. "summary": "Sync workspace list",
  10136. "x-codeSamples": [
  10137. {
  10138. "lang": "js",
  10139. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.syncList({\n ...\n})"
  10140. }
  10141. ]
  10142. }
  10143. },
  10144. "/experimental/workspace/status": {
  10145. "get": {
  10146. "tags": ["workspace"],
  10147. "operationId": "experimental.workspace.status",
  10148. "parameters": [
  10149. {
  10150. "name": "directory",
  10151. "in": "query",
  10152. "schema": {
  10153. "type": "string"
  10154. },
  10155. "required": false
  10156. },
  10157. {
  10158. "name": "workspace",
  10159. "in": "query",
  10160. "schema": {
  10161. "type": "string"
  10162. },
  10163. "required": false
  10164. }
  10165. ],
  10166. "responses": {
  10167. "200": {
  10168. "description": "Workspace status",
  10169. "content": {
  10170. "application/json": {
  10171. "schema": {
  10172. "type": "array",
  10173. "items": {
  10174. "type": "object",
  10175. "properties": {
  10176. "workspaceID": {
  10177. "type": "string",
  10178. "pattern": "^wrk"
  10179. },
  10180. "status": {
  10181. "type": "string",
  10182. "enum": ["connected", "connecting", "disconnected", "error"]
  10183. }
  10184. },
  10185. "required": ["workspaceID", "status"],
  10186. "additionalProperties": false
  10187. },
  10188. "description": "Workspace status"
  10189. }
  10190. }
  10191. }
  10192. },
  10193. "400": {
  10194. "description": "Bad request",
  10195. "content": {
  10196. "application/json": {
  10197. "schema": {
  10198. "$ref": "#/components/schemas/BadRequestError"
  10199. }
  10200. }
  10201. }
  10202. }
  10203. },
  10204. "description": "Get connection status for workspaces in the current project.",
  10205. "summary": "Workspace status",
  10206. "x-codeSamples": [
  10207. {
  10208. "lang": "js",
  10209. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  10210. }
  10211. ]
  10212. }
  10213. },
  10214. "/experimental/workspace/{id}": {
  10215. "delete": {
  10216. "tags": ["workspace"],
  10217. "operationId": "experimental.workspace.remove",
  10218. "parameters": [
  10219. {
  10220. "name": "id",
  10221. "in": "path",
  10222. "schema": {
  10223. "type": "string",
  10224. "pattern": "^wrk"
  10225. },
  10226. "required": true
  10227. },
  10228. {
  10229. "name": "directory",
  10230. "in": "query",
  10231. "schema": {
  10232. "type": "string"
  10233. },
  10234. "required": false
  10235. },
  10236. {
  10237. "name": "workspace",
  10238. "in": "query",
  10239. "schema": {
  10240. "type": "string"
  10241. },
  10242. "required": false
  10243. }
  10244. ],
  10245. "responses": {
  10246. "200": {
  10247. "description": "Workspace removed",
  10248. "content": {
  10249. "application/json": {
  10250. "schema": {
  10251. "$ref": "#/components/schemas/Workspace"
  10252. }
  10253. }
  10254. }
  10255. },
  10256. "400": {
  10257. "description": "BadRequest | InvalidRequestError",
  10258. "content": {
  10259. "application/json": {
  10260. "schema": {
  10261. "anyOf": [
  10262. {
  10263. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  10264. },
  10265. {
  10266. "$ref": "#/components/schemas/InvalidRequestError"
  10267. }
  10268. ]
  10269. }
  10270. }
  10271. }
  10272. }
  10273. },
  10274. "description": "Remove an existing workspace.",
  10275. "summary": "Remove workspace",
  10276. "x-codeSamples": [
  10277. {
  10278. "lang": "js",
  10279. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  10280. }
  10281. ]
  10282. }
  10283. },
  10284. "/experimental/workspace/warp": {
  10285. "post": {
  10286. "tags": ["workspace"],
  10287. "operationId": "experimental.workspace.warp",
  10288. "parameters": [
  10289. {
  10290. "name": "directory",
  10291. "in": "query",
  10292. "schema": {
  10293. "type": "string"
  10294. },
  10295. "required": false
  10296. },
  10297. {
  10298. "name": "workspace",
  10299. "in": "query",
  10300. "schema": {
  10301. "type": "string"
  10302. },
  10303. "required": false
  10304. }
  10305. ],
  10306. "responses": {
  10307. "204": {
  10308. "description": "Session warped"
  10309. },
  10310. "400": {
  10311. "description": "WorkspaceWarpError | VcsApplyError | InvalidRequestError",
  10312. "content": {
  10313. "application/json": {
  10314. "schema": {
  10315. "anyOf": [
  10316. {
  10317. "$ref": "#/components/schemas/WorkspaceWarpError"
  10318. },
  10319. {
  10320. "$ref": "#/components/schemas/VcsApplyError"
  10321. },
  10322. {
  10323. "$ref": "#/components/schemas/InvalidRequestError"
  10324. }
  10325. ]
  10326. }
  10327. }
  10328. }
  10329. },
  10330. "404": {
  10331. "description": "NotFoundError",
  10332. "content": {
  10333. "application/json": {
  10334. "schema": {
  10335. "$ref": "#/components/schemas/NotFoundError"
  10336. }
  10337. }
  10338. }
  10339. }
  10340. },
  10341. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  10342. "summary": "Warp session into workspace",
  10343. "requestBody": {
  10344. "content": {
  10345. "application/json": {
  10346. "schema": {
  10347. "type": "object",
  10348. "properties": {
  10349. "id": {
  10350. "anyOf": [
  10351. {
  10352. "type": "string",
  10353. "pattern": "^wrk"
  10354. },
  10355. {
  10356. "type": "null"
  10357. }
  10358. ]
  10359. },
  10360. "sessionID": {
  10361. "type": "string",
  10362. "pattern": "^ses"
  10363. },
  10364. "copyChanges": {
  10365. "type": "boolean"
  10366. }
  10367. },
  10368. "required": ["id", "sessionID"],
  10369. "additionalProperties": false
  10370. }
  10371. }
  10372. }
  10373. },
  10374. "x-codeSamples": [
  10375. {
  10376. "lang": "js",
  10377. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  10378. }
  10379. ]
  10380. }
  10381. },
  10382. "/pty/{ptyID}/connect": {
  10383. "get": {
  10384. "tags": ["pty"],
  10385. "operationId": "pty.connect",
  10386. "parameters": [
  10387. {
  10388. "name": "ptyID",
  10389. "in": "path",
  10390. "schema": {
  10391. "type": "string",
  10392. "pattern": "^pty"
  10393. },
  10394. "required": true
  10395. },
  10396. {
  10397. "name": "directory",
  10398. "in": "query",
  10399. "schema": {
  10400. "type": "string"
  10401. },
  10402. "required": false
  10403. },
  10404. {
  10405. "name": "workspace",
  10406. "in": "query",
  10407. "schema": {
  10408. "type": "string"
  10409. },
  10410. "required": false
  10411. }
  10412. ],
  10413. "responses": {
  10414. "200": {
  10415. "description": "Connected session",
  10416. "content": {
  10417. "application/json": {
  10418. "schema": {
  10419. "type": "boolean",
  10420. "description": "Connected session"
  10421. }
  10422. }
  10423. }
  10424. },
  10425. "403": {
  10426. "description": "Forbidden",
  10427. "content": {
  10428. "application/json": {
  10429. "schema": {
  10430. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  10431. }
  10432. }
  10433. }
  10434. },
  10435. "404": {
  10436. "description": "Not found",
  10437. "content": {
  10438. "application/json": {
  10439. "schema": {
  10440. "$ref": "#/components/schemas/NotFoundError"
  10441. }
  10442. }
  10443. }
  10444. }
  10445. },
  10446. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  10447. "summary": "Connect to PTY session",
  10448. "x-codeSamples": [
  10449. {
  10450. "lang": "js",
  10451. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  10452. }
  10453. ]
  10454. }
  10455. }
  10456. },
  10457. "components": {
  10458. "schemas": {
  10459. "Event": {
  10460. "anyOf": [
  10461. {
  10462. "$ref": "#/components/schemas/Event.tui.prompt.append"
  10463. },
  10464. {
  10465. "$ref": "#/components/schemas/Event.tui.command.execute"
  10466. },
  10467. {
  10468. "$ref": "#/components/schemas/EventTuiToastShow1"
  10469. },
  10470. {
  10471. "$ref": "#/components/schemas/Event.tui.session.select"
  10472. },
  10473. {
  10474. "$ref": "#/components/schemas/EventServerConnected"
  10475. },
  10476. {
  10477. "$ref": "#/components/schemas/EventGlobalDisposed"
  10478. },
  10479. {
  10480. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  10481. },
  10482. {
  10483. "$ref": "#/components/schemas/EventFileEdited"
  10484. },
  10485. {
  10486. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  10487. },
  10488. {
  10489. "$ref": "#/components/schemas/EventLspClientDiagnostics"
  10490. },
  10491. {
  10492. "$ref": "#/components/schemas/EventLspUpdated"
  10493. },
  10494. {
  10495. "$ref": "#/components/schemas/EventMessagePartDelta"
  10496. },
  10497. {
  10498. "$ref": "#/components/schemas/EventPermissionAsked"
  10499. },
  10500. {
  10501. "$ref": "#/components/schemas/EventPermissionReplied"
  10502. },
  10503. {
  10504. "$ref": "#/components/schemas/EventSessionDiff"
  10505. },
  10506. {
  10507. "$ref": "#/components/schemas/EventSessionError"
  10508. },
  10509. {
  10510. "$ref": "#/components/schemas/EventQuestionAsked"
  10511. },
  10512. {
  10513. "$ref": "#/components/schemas/EventQuestionReplied"
  10514. },
  10515. {
  10516. "$ref": "#/components/schemas/EventQuestionRejected"
  10517. },
  10518. {
  10519. "$ref": "#/components/schemas/EventTodoUpdated"
  10520. },
  10521. {
  10522. "$ref": "#/components/schemas/EventSessionStatus"
  10523. },
  10524. {
  10525. "$ref": "#/components/schemas/EventSessionIdle"
  10526. },
  10527. {
  10528. "$ref": "#/components/schemas/EventMcpToolsChanged"
  10529. },
  10530. {
  10531. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  10532. },
  10533. {
  10534. "$ref": "#/components/schemas/EventCommandExecuted"
  10535. },
  10536. {
  10537. "$ref": "#/components/schemas/EventProjectUpdated"
  10538. },
  10539. {
  10540. "$ref": "#/components/schemas/EventSessionCompacted"
  10541. },
  10542. {
  10543. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  10544. },
  10545. {
  10546. "$ref": "#/components/schemas/EventWorkspaceReady"
  10547. },
  10548. {
  10549. "$ref": "#/components/schemas/EventWorkspaceFailed"
  10550. },
  10551. {
  10552. "$ref": "#/components/schemas/EventWorkspaceStatus"
  10553. },
  10554. {
  10555. "$ref": "#/components/schemas/EventWorktreeReady"
  10556. },
  10557. {
  10558. "$ref": "#/components/schemas/EventWorktreeFailed"
  10559. },
  10560. {
  10561. "$ref": "#/components/schemas/EventPtyCreated"
  10562. },
  10563. {
  10564. "$ref": "#/components/schemas/EventPtyUpdated"
  10565. },
  10566. {
  10567. "$ref": "#/components/schemas/EventPtyExited"
  10568. },
  10569. {
  10570. "$ref": "#/components/schemas/EventPtyDeleted"
  10571. },
  10572. {
  10573. "$ref": "#/components/schemas/EventInstallationUpdated"
  10574. },
  10575. {
  10576. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  10577. },
  10578. {
  10579. "$ref": "#/components/schemas/EventMessageUpdated"
  10580. },
  10581. {
  10582. "$ref": "#/components/schemas/EventMessageRemoved"
  10583. },
  10584. {
  10585. "$ref": "#/components/schemas/EventMessagePartUpdated"
  10586. },
  10587. {
  10588. "$ref": "#/components/schemas/EventMessagePartRemoved"
  10589. },
  10590. {
  10591. "$ref": "#/components/schemas/EventSessionCreated"
  10592. },
  10593. {
  10594. "$ref": "#/components/schemas/EventSessionUpdated"
  10595. },
  10596. {
  10597. "$ref": "#/components/schemas/EventSessionDeleted"
  10598. },
  10599. {
  10600. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  10601. },
  10602. {
  10603. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  10604. },
  10605. {
  10606. "$ref": "#/components/schemas/EventSessionNextPrompted"
  10607. },
  10608. {
  10609. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  10610. },
  10611. {
  10612. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  10613. },
  10614. {
  10615. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  10616. },
  10617. {
  10618. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  10619. },
  10620. {
  10621. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  10622. },
  10623. {
  10624. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  10625. },
  10626. {
  10627. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  10628. },
  10629. {
  10630. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  10631. },
  10632. {
  10633. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  10634. },
  10635. {
  10636. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  10637. },
  10638. {
  10639. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  10640. },
  10641. {
  10642. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  10643. },
  10644. {
  10645. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  10646. },
  10647. {
  10648. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  10649. },
  10650. {
  10651. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  10652. },
  10653. {
  10654. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  10655. },
  10656. {
  10657. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  10658. },
  10659. {
  10660. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  10661. },
  10662. {
  10663. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  10664. },
  10665. {
  10666. "$ref": "#/components/schemas/EventSessionNextRetried"
  10667. },
  10668. {
  10669. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  10670. },
  10671. {
  10672. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  10673. },
  10674. {
  10675. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  10676. },
  10677. {
  10678. "$ref": "#/components/schemas/EventCatalogModelUpdated"
  10679. },
  10680. {
  10681. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  10682. },
  10683. {
  10684. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  10685. },
  10686. {
  10687. "$ref": "#/components/schemas/EventSessionNextPrompted"
  10688. },
  10689. {
  10690. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  10691. },
  10692. {
  10693. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  10694. },
  10695. {
  10696. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  10697. },
  10698. {
  10699. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  10700. },
  10701. {
  10702. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  10703. },
  10704. {
  10705. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  10706. },
  10707. {
  10708. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  10709. },
  10710. {
  10711. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  10712. },
  10713. {
  10714. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  10715. },
  10716. {
  10717. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  10718. },
  10719. {
  10720. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  10721. },
  10722. {
  10723. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  10724. },
  10725. {
  10726. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  10727. },
  10728. {
  10729. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  10730. },
  10731. {
  10732. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  10733. },
  10734. {
  10735. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  10736. },
  10737. {
  10738. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  10739. },
  10740. {
  10741. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  10742. },
  10743. {
  10744. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  10745. },
  10746. {
  10747. "$ref": "#/components/schemas/EventSessionNextRetried"
  10748. },
  10749. {
  10750. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  10751. },
  10752. {
  10753. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  10754. },
  10755. {
  10756. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  10757. },
  10758. {
  10759. "$ref": "#/components/schemas/EventModels-devRefreshed"
  10760. },
  10761. {
  10762. "$ref": "#/components/schemas/EventAccountAdded"
  10763. },
  10764. {
  10765. "$ref": "#/components/schemas/EventAccountRemoved"
  10766. },
  10767. {
  10768. "$ref": "#/components/schemas/EventAccountSwitched"
  10769. }
  10770. ]
  10771. },
  10772. "OAuth": {
  10773. "type": "object",
  10774. "properties": {
  10775. "type": {
  10776. "type": "string",
  10777. "enum": ["oauth"]
  10778. },
  10779. "refresh": {
  10780. "type": "string"
  10781. },
  10782. "access": {
  10783. "type": "string"
  10784. },
  10785. "expires": {
  10786. "type": "integer",
  10787. "minimum": 0
  10788. },
  10789. "accountId": {
  10790. "type": "string"
  10791. },
  10792. "enterpriseUrl": {
  10793. "type": "string"
  10794. }
  10795. },
  10796. "required": ["type", "refresh", "access", "expires"],
  10797. "additionalProperties": false
  10798. },
  10799. "ApiAuth": {
  10800. "type": "object",
  10801. "properties": {
  10802. "type": {
  10803. "type": "string",
  10804. "enum": ["api"]
  10805. },
  10806. "key": {
  10807. "type": "string"
  10808. },
  10809. "metadata": {
  10810. "type": "object",
  10811. "additionalProperties": {
  10812. "type": "string"
  10813. }
  10814. }
  10815. },
  10816. "required": ["type", "key"],
  10817. "additionalProperties": false
  10818. },
  10819. "WellKnownAuth": {
  10820. "type": "object",
  10821. "properties": {
  10822. "type": {
  10823. "type": "string",
  10824. "enum": ["wellknown"]
  10825. },
  10826. "key": {
  10827. "type": "string"
  10828. },
  10829. "token": {
  10830. "type": "string"
  10831. }
  10832. },
  10833. "required": ["type", "key", "token"],
  10834. "additionalProperties": false
  10835. },
  10836. "Auth": {
  10837. "anyOf": [
  10838. {
  10839. "$ref": "#/components/schemas/OAuth"
  10840. },
  10841. {
  10842. "$ref": "#/components/schemas/ApiAuth"
  10843. },
  10844. {
  10845. "$ref": "#/components/schemas/WellKnownAuth"
  10846. }
  10847. ]
  10848. },
  10849. "effect_HttpApiError_BadRequest": {
  10850. "type": "object",
  10851. "properties": {
  10852. "_tag": {
  10853. "type": "string",
  10854. "enum": ["BadRequest"]
  10855. }
  10856. },
  10857. "required": ["_tag"],
  10858. "additionalProperties": false
  10859. },
  10860. "InvalidRequestError": {
  10861. "type": "object",
  10862. "properties": {
  10863. "_tag": {
  10864. "type": "string",
  10865. "enum": ["InvalidRequestError"]
  10866. },
  10867. "message": {
  10868. "type": "string"
  10869. },
  10870. "kind": {
  10871. "type": "string"
  10872. },
  10873. "field": {
  10874. "type": "string"
  10875. }
  10876. },
  10877. "required": ["_tag", "message"],
  10878. "additionalProperties": false
  10879. },
  10880. "Event.tui.prompt.append": {
  10881. "type": "object",
  10882. "properties": {
  10883. "id": {
  10884. "type": "string"
  10885. },
  10886. "type": {
  10887. "type": "string",
  10888. "enum": ["tui.prompt.append"]
  10889. },
  10890. "properties": {
  10891. "type": "object",
  10892. "properties": {
  10893. "text": {
  10894. "type": "string"
  10895. }
  10896. },
  10897. "required": ["text"],
  10898. "additionalProperties": false
  10899. }
  10900. },
  10901. "required": ["id", "type", "properties"],
  10902. "additionalProperties": false
  10903. },
  10904. "Event.tui.command.execute": {
  10905. "type": "object",
  10906. "properties": {
  10907. "id": {
  10908. "type": "string"
  10909. },
  10910. "type": {
  10911. "type": "string",
  10912. "enum": ["tui.command.execute"]
  10913. },
  10914. "properties": {
  10915. "type": "object",
  10916. "properties": {
  10917. "command": {
  10918. "anyOf": [
  10919. {
  10920. "type": "string",
  10921. "enum": [
  10922. "session.list",
  10923. "session.new",
  10924. "session.share",
  10925. "session.interrupt",
  10926. "session.compact",
  10927. "session.page.up",
  10928. "session.page.down",
  10929. "session.line.up",
  10930. "session.line.down",
  10931. "session.half.page.up",
  10932. "session.half.page.down",
  10933. "session.first",
  10934. "session.last",
  10935. "prompt.clear",
  10936. "prompt.submit",
  10937. "agent.cycle"
  10938. ]
  10939. },
  10940. {
  10941. "type": "string"
  10942. }
  10943. ]
  10944. }
  10945. },
  10946. "required": ["command"],
  10947. "additionalProperties": false
  10948. }
  10949. },
  10950. "required": ["id", "type", "properties"],
  10951. "additionalProperties": false
  10952. },
  10953. "Event.tui.toast.show": {
  10954. "type": "object",
  10955. "properties": {
  10956. "id": {
  10957. "type": "string"
  10958. },
  10959. "type": {
  10960. "type": "string",
  10961. "enum": ["tui.toast.show"]
  10962. },
  10963. "properties": {
  10964. "type": "object",
  10965. "properties": {
  10966. "title": {
  10967. "type": "string"
  10968. },
  10969. "message": {
  10970. "type": "string"
  10971. },
  10972. "variant": {
  10973. "type": "string",
  10974. "enum": ["info", "success", "warning", "error"]
  10975. },
  10976. "duration": {
  10977. "type": "integer",
  10978. "exclusiveMinimum": 0
  10979. }
  10980. },
  10981. "required": ["message", "variant"],
  10982. "additionalProperties": false
  10983. }
  10984. },
  10985. "required": ["id", "type", "properties"],
  10986. "additionalProperties": false
  10987. },
  10988. "Event.tui.session.select": {
  10989. "type": "object",
  10990. "properties": {
  10991. "id": {
  10992. "type": "string"
  10993. },
  10994. "type": {
  10995. "type": "string",
  10996. "enum": ["tui.session.select"]
  10997. },
  10998. "properties": {
  10999. "type": "object",
  11000. "properties": {
  11001. "sessionID": {
  11002. "type": "string",
  11003. "pattern": "^ses",
  11004. "description": "Session ID to navigate to"
  11005. }
  11006. },
  11007. "required": ["sessionID"],
  11008. "additionalProperties": false
  11009. }
  11010. },
  11011. "required": ["id", "type", "properties"],
  11012. "additionalProperties": false
  11013. },
  11014. "PermissionRequest": {
  11015. "type": "object",
  11016. "properties": {
  11017. "id": {
  11018. "type": "string",
  11019. "pattern": "^per"
  11020. },
  11021. "sessionID": {
  11022. "type": "string",
  11023. "pattern": "^ses"
  11024. },
  11025. "permission": {
  11026. "type": "string"
  11027. },
  11028. "patterns": {
  11029. "type": "array",
  11030. "items": {
  11031. "type": "string"
  11032. }
  11033. },
  11034. "metadata": {
  11035. "type": "object"
  11036. },
  11037. "always": {
  11038. "type": "array",
  11039. "items": {
  11040. "type": "string"
  11041. }
  11042. },
  11043. "tool": {
  11044. "type": "object",
  11045. "properties": {
  11046. "messageID": {
  11047. "type": "string",
  11048. "pattern": "^msg"
  11049. },
  11050. "callID": {
  11051. "type": "string"
  11052. }
  11053. },
  11054. "required": ["messageID", "callID"],
  11055. "additionalProperties": false
  11056. }
  11057. },
  11058. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  11059. "additionalProperties": false
  11060. },
  11061. "SnapshotFileDiff": {
  11062. "type": "object",
  11063. "properties": {
  11064. "file": {
  11065. "type": "string"
  11066. },
  11067. "patch": {
  11068. "type": "string"
  11069. },
  11070. "additions": {
  11071. "type": "number"
  11072. },
  11073. "deletions": {
  11074. "type": "number"
  11075. },
  11076. "status": {
  11077. "type": "string",
  11078. "enum": ["added", "deleted", "modified"]
  11079. }
  11080. },
  11081. "required": ["additions", "deletions"],
  11082. "additionalProperties": false
  11083. },
  11084. "ProviderAuthError": {
  11085. "type": "object",
  11086. "properties": {
  11087. "name": {
  11088. "type": "string",
  11089. "enum": ["ProviderAuthError"]
  11090. },
  11091. "data": {
  11092. "type": "object",
  11093. "properties": {
  11094. "providerID": {
  11095. "type": "string"
  11096. },
  11097. "message": {
  11098. "type": "string"
  11099. }
  11100. },
  11101. "required": ["providerID", "message"],
  11102. "additionalProperties": false
  11103. }
  11104. },
  11105. "required": ["name", "data"],
  11106. "additionalProperties": false
  11107. },
  11108. "UnknownError": {
  11109. "type": "object",
  11110. "properties": {
  11111. "name": {
  11112. "type": "string",
  11113. "enum": ["UnknownError"]
  11114. },
  11115. "data": {
  11116. "type": "object",
  11117. "properties": {
  11118. "message": {
  11119. "type": "string"
  11120. },
  11121. "ref": {
  11122. "type": "string"
  11123. }
  11124. },
  11125. "required": ["message"],
  11126. "additionalProperties": false
  11127. }
  11128. },
  11129. "required": ["name", "data"],
  11130. "additionalProperties": false
  11131. },
  11132. "MessageOutputLengthError": {
  11133. "type": "object",
  11134. "properties": {
  11135. "name": {
  11136. "type": "string",
  11137. "enum": ["MessageOutputLengthError"]
  11138. },
  11139. "data": {
  11140. "type": "object",
  11141. "properties": {}
  11142. }
  11143. },
  11144. "required": ["name", "data"],
  11145. "additionalProperties": false
  11146. },
  11147. "MessageAbortedError": {
  11148. "type": "object",
  11149. "properties": {
  11150. "name": {
  11151. "type": "string",
  11152. "enum": ["MessageAbortedError"]
  11153. },
  11154. "data": {
  11155. "type": "object",
  11156. "properties": {
  11157. "message": {
  11158. "type": "string"
  11159. }
  11160. },
  11161. "required": ["message"],
  11162. "additionalProperties": false
  11163. }
  11164. },
  11165. "required": ["name", "data"],
  11166. "additionalProperties": false
  11167. },
  11168. "StructuredOutputError": {
  11169. "type": "object",
  11170. "properties": {
  11171. "name": {
  11172. "type": "string",
  11173. "enum": ["StructuredOutputError"]
  11174. },
  11175. "data": {
  11176. "type": "object",
  11177. "properties": {
  11178. "message": {
  11179. "type": "string"
  11180. },
  11181. "retries": {
  11182. "type": "integer",
  11183. "minimum": 0
  11184. }
  11185. },
  11186. "required": ["message", "retries"],
  11187. "additionalProperties": false
  11188. }
  11189. },
  11190. "required": ["name", "data"],
  11191. "additionalProperties": false
  11192. },
  11193. "ContextOverflowError": {
  11194. "type": "object",
  11195. "properties": {
  11196. "name": {
  11197. "type": "string",
  11198. "enum": ["ContextOverflowError"]
  11199. },
  11200. "data": {
  11201. "type": "object",
  11202. "properties": {
  11203. "message": {
  11204. "type": "string"
  11205. },
  11206. "responseBody": {
  11207. "type": "string"
  11208. }
  11209. },
  11210. "required": ["message"],
  11211. "additionalProperties": false
  11212. }
  11213. },
  11214. "required": ["name", "data"],
  11215. "additionalProperties": false
  11216. },
  11217. "APIError": {
  11218. "type": "object",
  11219. "properties": {
  11220. "name": {
  11221. "type": "string",
  11222. "enum": ["APIError"]
  11223. },
  11224. "data": {
  11225. "type": "object",
  11226. "properties": {
  11227. "message": {
  11228. "type": "string"
  11229. },
  11230. "statusCode": {
  11231. "type": "integer",
  11232. "minimum": 0
  11233. },
  11234. "isRetryable": {
  11235. "type": "boolean"
  11236. },
  11237. "responseHeaders": {
  11238. "type": "object",
  11239. "additionalProperties": {
  11240. "type": "string"
  11241. }
  11242. },
  11243. "responseBody": {
  11244. "type": "string"
  11245. },
  11246. "metadata": {
  11247. "type": "object",
  11248. "additionalProperties": {
  11249. "type": "string"
  11250. }
  11251. }
  11252. },
  11253. "required": ["message", "isRetryable"],
  11254. "additionalProperties": false
  11255. }
  11256. },
  11257. "required": ["name", "data"],
  11258. "additionalProperties": false
  11259. },
  11260. "QuestionOption": {
  11261. "type": "object",
  11262. "properties": {
  11263. "label": {
  11264. "type": "string",
  11265. "description": "Display text (1-5 words, concise)"
  11266. },
  11267. "description": {
  11268. "type": "string",
  11269. "description": "Explanation of choice"
  11270. }
  11271. },
  11272. "required": ["label", "description"],
  11273. "additionalProperties": false
  11274. },
  11275. "QuestionInfo": {
  11276. "type": "object",
  11277. "properties": {
  11278. "question": {
  11279. "type": "string",
  11280. "description": "Complete question"
  11281. },
  11282. "header": {
  11283. "type": "string",
  11284. "description": "Very short label (max 30 chars)"
  11285. },
  11286. "options": {
  11287. "type": "array",
  11288. "items": {
  11289. "$ref": "#/components/schemas/QuestionOption"
  11290. },
  11291. "description": "Available choices"
  11292. },
  11293. "multiple": {
  11294. "type": "boolean"
  11295. },
  11296. "custom": {
  11297. "type": "boolean"
  11298. }
  11299. },
  11300. "required": ["question", "header", "options"],
  11301. "additionalProperties": false
  11302. },
  11303. "QuestionTool": {
  11304. "type": "object",
  11305. "properties": {
  11306. "messageID": {
  11307. "type": "string",
  11308. "pattern": "^msg"
  11309. },
  11310. "callID": {
  11311. "type": "string"
  11312. }
  11313. },
  11314. "required": ["messageID", "callID"],
  11315. "additionalProperties": false
  11316. },
  11317. "QuestionRequest": {
  11318. "type": "object",
  11319. "properties": {
  11320. "id": {
  11321. "type": "string",
  11322. "pattern": "^que"
  11323. },
  11324. "sessionID": {
  11325. "type": "string",
  11326. "pattern": "^ses"
  11327. },
  11328. "questions": {
  11329. "type": "array",
  11330. "items": {
  11331. "$ref": "#/components/schemas/QuestionInfo"
  11332. },
  11333. "description": "Questions to ask"
  11334. },
  11335. "tool": {
  11336. "$ref": "#/components/schemas/QuestionTool"
  11337. }
  11338. },
  11339. "required": ["id", "sessionID", "questions"],
  11340. "additionalProperties": false
  11341. },
  11342. "QuestionAnswer": {
  11343. "type": "array",
  11344. "items": {
  11345. "type": "string"
  11346. }
  11347. },
  11348. "QuestionReplied": {
  11349. "type": "object",
  11350. "properties": {
  11351. "sessionID": {
  11352. "type": "string",
  11353. "pattern": "^ses"
  11354. },
  11355. "requestID": {
  11356. "type": "string",
  11357. "pattern": "^que"
  11358. },
  11359. "answers": {
  11360. "type": "array",
  11361. "items": {
  11362. "$ref": "#/components/schemas/QuestionAnswer"
  11363. }
  11364. }
  11365. },
  11366. "required": ["sessionID", "requestID", "answers"],
  11367. "additionalProperties": false
  11368. },
  11369. "QuestionRejected": {
  11370. "type": "object",
  11371. "properties": {
  11372. "sessionID": {
  11373. "type": "string",
  11374. "pattern": "^ses"
  11375. },
  11376. "requestID": {
  11377. "type": "string",
  11378. "pattern": "^que"
  11379. }
  11380. },
  11381. "required": ["sessionID", "requestID"],
  11382. "additionalProperties": false
  11383. },
  11384. "Todo": {
  11385. "type": "object",
  11386. "properties": {
  11387. "content": {
  11388. "type": "string",
  11389. "description": "Brief description of the task"
  11390. },
  11391. "status": {
  11392. "type": "string",
  11393. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  11394. },
  11395. "priority": {
  11396. "type": "string",
  11397. "description": "Priority level of the task: high, medium, low"
  11398. }
  11399. },
  11400. "required": ["content", "status", "priority"],
  11401. "additionalProperties": false
  11402. },
  11403. "SessionStatus": {
  11404. "anyOf": [
  11405. {
  11406. "type": "object",
  11407. "properties": {
  11408. "type": {
  11409. "type": "string",
  11410. "enum": ["idle"]
  11411. }
  11412. },
  11413. "required": ["type"],
  11414. "additionalProperties": false
  11415. },
  11416. {
  11417. "type": "object",
  11418. "properties": {
  11419. "type": {
  11420. "type": "string",
  11421. "enum": ["retry"]
  11422. },
  11423. "attempt": {
  11424. "type": "integer",
  11425. "minimum": 0
  11426. },
  11427. "message": {
  11428. "type": "string"
  11429. },
  11430. "action": {
  11431. "type": "object",
  11432. "properties": {
  11433. "reason": {
  11434. "type": "string"
  11435. },
  11436. "provider": {
  11437. "type": "string"
  11438. },
  11439. "title": {
  11440. "type": "string"
  11441. },
  11442. "message": {
  11443. "type": "string"
  11444. },
  11445. "label": {
  11446. "type": "string"
  11447. },
  11448. "link": {
  11449. "type": "string"
  11450. }
  11451. },
  11452. "required": ["reason", "provider", "title", "message", "label"],
  11453. "additionalProperties": false
  11454. },
  11455. "next": {
  11456. "type": "integer",
  11457. "minimum": 0
  11458. }
  11459. },
  11460. "required": ["type", "attempt", "message", "next"],
  11461. "additionalProperties": false
  11462. },
  11463. {
  11464. "type": "object",
  11465. "properties": {
  11466. "type": {
  11467. "type": "string",
  11468. "enum": ["busy"]
  11469. }
  11470. },
  11471. "required": ["type"],
  11472. "additionalProperties": false
  11473. }
  11474. ]
  11475. },
  11476. "Project": {
  11477. "type": "object",
  11478. "properties": {
  11479. "id": {
  11480. "type": "string"
  11481. },
  11482. "worktree": {
  11483. "type": "string"
  11484. },
  11485. "vcs": {
  11486. "type": "string",
  11487. "enum": ["git"]
  11488. },
  11489. "name": {
  11490. "type": "string"
  11491. },
  11492. "icon": {
  11493. "type": "object",
  11494. "properties": {
  11495. "url": {
  11496. "type": "string"
  11497. },
  11498. "override": {
  11499. "type": "string"
  11500. },
  11501. "color": {
  11502. "type": "string"
  11503. }
  11504. },
  11505. "additionalProperties": false
  11506. },
  11507. "commands": {
  11508. "type": "object",
  11509. "properties": {
  11510. "start": {
  11511. "type": "string",
  11512. "description": "Startup script to run when creating a new workspace (worktree)"
  11513. }
  11514. },
  11515. "additionalProperties": false
  11516. },
  11517. "time": {
  11518. "type": "object",
  11519. "properties": {
  11520. "created": {
  11521. "type": "integer",
  11522. "minimum": 0
  11523. },
  11524. "updated": {
  11525. "type": "integer",
  11526. "minimum": 0
  11527. },
  11528. "initialized": {
  11529. "type": "integer",
  11530. "minimum": 0
  11531. }
  11532. },
  11533. "required": ["created", "updated"],
  11534. "additionalProperties": false
  11535. },
  11536. "sandboxes": {
  11537. "type": "array",
  11538. "items": {
  11539. "type": "string"
  11540. }
  11541. }
  11542. },
  11543. "required": ["id", "worktree", "time", "sandboxes"],
  11544. "additionalProperties": false
  11545. },
  11546. "Pty": {
  11547. "type": "object",
  11548. "properties": {
  11549. "id": {
  11550. "type": "string",
  11551. "pattern": "^pty"
  11552. },
  11553. "title": {
  11554. "type": "string"
  11555. },
  11556. "command": {
  11557. "type": "string"
  11558. },
  11559. "args": {
  11560. "type": "array",
  11561. "items": {
  11562. "type": "string"
  11563. }
  11564. },
  11565. "cwd": {
  11566. "type": "string"
  11567. },
  11568. "status": {
  11569. "type": "string",
  11570. "enum": ["running", "exited"]
  11571. },
  11572. "pid": {
  11573. "type": "integer",
  11574. "exclusiveMinimum": 0
  11575. }
  11576. },
  11577. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  11578. "additionalProperties": false
  11579. },
  11580. "OutputFormatText": {
  11581. "type": "object",
  11582. "properties": {
  11583. "type": {
  11584. "type": "string",
  11585. "enum": ["text"]
  11586. }
  11587. },
  11588. "required": ["type"],
  11589. "additionalProperties": false
  11590. },
  11591. "JSONSchema": {
  11592. "type": "object"
  11593. },
  11594. "OutputFormatJsonSchema": {
  11595. "type": "object",
  11596. "properties": {
  11597. "type": {
  11598. "type": "string",
  11599. "enum": ["json_schema"]
  11600. },
  11601. "schema": {
  11602. "$ref": "#/components/schemas/JSONSchema"
  11603. },
  11604. "retryCount": {
  11605. "type": "integer",
  11606. "minimum": 0
  11607. }
  11608. },
  11609. "required": ["type", "schema"],
  11610. "additionalProperties": false
  11611. },
  11612. "OutputFormat": {
  11613. "anyOf": [
  11614. {
  11615. "$ref": "#/components/schemas/OutputFormatText"
  11616. },
  11617. {
  11618. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  11619. }
  11620. ]
  11621. },
  11622. "UserMessage": {
  11623. "type": "object",
  11624. "properties": {
  11625. "id": {
  11626. "type": "string",
  11627. "pattern": "^msg"
  11628. },
  11629. "sessionID": {
  11630. "type": "string",
  11631. "pattern": "^ses"
  11632. },
  11633. "role": {
  11634. "type": "string",
  11635. "enum": ["user"]
  11636. },
  11637. "time": {
  11638. "type": "object",
  11639. "properties": {
  11640. "created": {
  11641. "type": "integer",
  11642. "minimum": 0
  11643. }
  11644. },
  11645. "required": ["created"],
  11646. "additionalProperties": false
  11647. },
  11648. "format": {
  11649. "$ref": "#/components/schemas/OutputFormat"
  11650. },
  11651. "summary": {
  11652. "type": "object",
  11653. "properties": {
  11654. "title": {
  11655. "type": "string"
  11656. },
  11657. "body": {
  11658. "type": "string"
  11659. },
  11660. "diffs": {
  11661. "type": "array",
  11662. "items": {
  11663. "$ref": "#/components/schemas/SnapshotFileDiff"
  11664. }
  11665. }
  11666. },
  11667. "required": ["diffs"],
  11668. "additionalProperties": false
  11669. },
  11670. "agent": {
  11671. "type": "string"
  11672. },
  11673. "model": {
  11674. "type": "object",
  11675. "properties": {
  11676. "providerID": {
  11677. "type": "string"
  11678. },
  11679. "modelID": {
  11680. "type": "string"
  11681. },
  11682. "variant": {
  11683. "type": "string"
  11684. }
  11685. },
  11686. "required": ["providerID", "modelID"],
  11687. "additionalProperties": false
  11688. },
  11689. "system": {
  11690. "type": "string"
  11691. },
  11692. "tools": {
  11693. "type": "object",
  11694. "additionalProperties": {
  11695. "type": "boolean"
  11696. }
  11697. }
  11698. },
  11699. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  11700. "additionalProperties": false
  11701. },
  11702. "AssistantMessage": {
  11703. "type": "object",
  11704. "properties": {
  11705. "id": {
  11706. "type": "string",
  11707. "pattern": "^msg"
  11708. },
  11709. "sessionID": {
  11710. "type": "string",
  11711. "pattern": "^ses"
  11712. },
  11713. "role": {
  11714. "type": "string",
  11715. "enum": ["assistant"]
  11716. },
  11717. "time": {
  11718. "type": "object",
  11719. "properties": {
  11720. "created": {
  11721. "type": "integer",
  11722. "minimum": 0
  11723. },
  11724. "completed": {
  11725. "type": "integer",
  11726. "minimum": 0
  11727. }
  11728. },
  11729. "required": ["created"],
  11730. "additionalProperties": false
  11731. },
  11732. "error": {
  11733. "anyOf": [
  11734. {
  11735. "$ref": "#/components/schemas/ProviderAuthError"
  11736. },
  11737. {
  11738. "$ref": "#/components/schemas/UnknownError"
  11739. },
  11740. {
  11741. "$ref": "#/components/schemas/MessageOutputLengthError"
  11742. },
  11743. {
  11744. "$ref": "#/components/schemas/MessageAbortedError"
  11745. },
  11746. {
  11747. "$ref": "#/components/schemas/StructuredOutputError"
  11748. },
  11749. {
  11750. "$ref": "#/components/schemas/ContextOverflowError"
  11751. },
  11752. {
  11753. "$ref": "#/components/schemas/APIError"
  11754. }
  11755. ]
  11756. },
  11757. "parentID": {
  11758. "type": "string",
  11759. "pattern": "^msg"
  11760. },
  11761. "modelID": {
  11762. "type": "string"
  11763. },
  11764. "providerID": {
  11765. "type": "string"
  11766. },
  11767. "mode": {
  11768. "type": "string"
  11769. },
  11770. "agent": {
  11771. "type": "string"
  11772. },
  11773. "path": {
  11774. "type": "object",
  11775. "properties": {
  11776. "cwd": {
  11777. "type": "string"
  11778. },
  11779. "root": {
  11780. "type": "string"
  11781. }
  11782. },
  11783. "required": ["cwd", "root"],
  11784. "additionalProperties": false
  11785. },
  11786. "summary": {
  11787. "type": "boolean"
  11788. },
  11789. "cost": {
  11790. "type": "number"
  11791. },
  11792. "tokens": {
  11793. "type": "object",
  11794. "properties": {
  11795. "total": {
  11796. "type": "number"
  11797. },
  11798. "input": {
  11799. "type": "number"
  11800. },
  11801. "output": {
  11802. "type": "number"
  11803. },
  11804. "reasoning": {
  11805. "type": "number"
  11806. },
  11807. "cache": {
  11808. "type": "object",
  11809. "properties": {
  11810. "read": {
  11811. "type": "number"
  11812. },
  11813. "write": {
  11814. "type": "number"
  11815. }
  11816. },
  11817. "required": ["read", "write"],
  11818. "additionalProperties": false
  11819. }
  11820. },
  11821. "required": ["input", "output", "reasoning", "cache"],
  11822. "additionalProperties": false
  11823. },
  11824. "structured": {},
  11825. "variant": {
  11826. "type": "string"
  11827. },
  11828. "finish": {
  11829. "type": "string"
  11830. }
  11831. },
  11832. "required": [
  11833. "id",
  11834. "sessionID",
  11835. "role",
  11836. "time",
  11837. "parentID",
  11838. "modelID",
  11839. "providerID",
  11840. "mode",
  11841. "agent",
  11842. "path",
  11843. "cost",
  11844. "tokens"
  11845. ],
  11846. "additionalProperties": false
  11847. },
  11848. "Message": {
  11849. "anyOf": [
  11850. {
  11851. "$ref": "#/components/schemas/UserMessage"
  11852. },
  11853. {
  11854. "$ref": "#/components/schemas/AssistantMessage"
  11855. }
  11856. ]
  11857. },
  11858. "TextPart": {
  11859. "type": "object",
  11860. "properties": {
  11861. "id": {
  11862. "type": "string",
  11863. "pattern": "^prt"
  11864. },
  11865. "sessionID": {
  11866. "type": "string",
  11867. "pattern": "^ses"
  11868. },
  11869. "messageID": {
  11870. "type": "string",
  11871. "pattern": "^msg"
  11872. },
  11873. "type": {
  11874. "type": "string",
  11875. "enum": ["text"]
  11876. },
  11877. "text": {
  11878. "type": "string"
  11879. },
  11880. "synthetic": {
  11881. "type": "boolean"
  11882. },
  11883. "ignored": {
  11884. "type": "boolean"
  11885. },
  11886. "time": {
  11887. "type": "object",
  11888. "properties": {
  11889. "start": {
  11890. "type": "integer",
  11891. "minimum": 0
  11892. },
  11893. "end": {
  11894. "type": "integer",
  11895. "minimum": 0
  11896. }
  11897. },
  11898. "required": ["start"],
  11899. "additionalProperties": false
  11900. },
  11901. "metadata": {
  11902. "type": "object"
  11903. }
  11904. },
  11905. "required": ["id", "sessionID", "messageID", "type", "text"],
  11906. "additionalProperties": false
  11907. },
  11908. "SubtaskPart": {
  11909. "type": "object",
  11910. "properties": {
  11911. "id": {
  11912. "type": "string",
  11913. "pattern": "^prt"
  11914. },
  11915. "sessionID": {
  11916. "type": "string",
  11917. "pattern": "^ses"
  11918. },
  11919. "messageID": {
  11920. "type": "string",
  11921. "pattern": "^msg"
  11922. },
  11923. "type": {
  11924. "type": "string",
  11925. "enum": ["subtask"]
  11926. },
  11927. "prompt": {
  11928. "type": "string"
  11929. },
  11930. "description": {
  11931. "type": "string"
  11932. },
  11933. "agent": {
  11934. "type": "string"
  11935. },
  11936. "model": {
  11937. "type": "object",
  11938. "properties": {
  11939. "providerID": {
  11940. "type": "string"
  11941. },
  11942. "modelID": {
  11943. "type": "string"
  11944. }
  11945. },
  11946. "required": ["providerID", "modelID"],
  11947. "additionalProperties": false
  11948. },
  11949. "command": {
  11950. "type": "string"
  11951. }
  11952. },
  11953. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  11954. "additionalProperties": false
  11955. },
  11956. "ReasoningPart": {
  11957. "type": "object",
  11958. "properties": {
  11959. "id": {
  11960. "type": "string",
  11961. "pattern": "^prt"
  11962. },
  11963. "sessionID": {
  11964. "type": "string",
  11965. "pattern": "^ses"
  11966. },
  11967. "messageID": {
  11968. "type": "string",
  11969. "pattern": "^msg"
  11970. },
  11971. "type": {
  11972. "type": "string",
  11973. "enum": ["reasoning"]
  11974. },
  11975. "text": {
  11976. "type": "string"
  11977. },
  11978. "metadata": {
  11979. "type": "object"
  11980. },
  11981. "time": {
  11982. "type": "object",
  11983. "properties": {
  11984. "start": {
  11985. "type": "integer",
  11986. "minimum": 0
  11987. },
  11988. "end": {
  11989. "type": "integer",
  11990. "minimum": 0
  11991. }
  11992. },
  11993. "required": ["start"],
  11994. "additionalProperties": false
  11995. }
  11996. },
  11997. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  11998. "additionalProperties": false
  11999. },
  12000. "FilePartSourceText": {
  12001. "type": "object",
  12002. "properties": {
  12003. "value": {
  12004. "type": "string"
  12005. },
  12006. "start": {
  12007. "type": "number"
  12008. },
  12009. "end": {
  12010. "type": "number"
  12011. }
  12012. },
  12013. "required": ["value", "start", "end"],
  12014. "additionalProperties": false
  12015. },
  12016. "FileSource": {
  12017. "type": "object",
  12018. "properties": {
  12019. "text": {
  12020. "$ref": "#/components/schemas/FilePartSourceText"
  12021. },
  12022. "type": {
  12023. "type": "string",
  12024. "enum": ["file"]
  12025. },
  12026. "path": {
  12027. "type": "string"
  12028. }
  12029. },
  12030. "required": ["text", "type", "path"],
  12031. "additionalProperties": false
  12032. },
  12033. "Range": {
  12034. "type": "object",
  12035. "properties": {
  12036. "start": {
  12037. "type": "object",
  12038. "properties": {
  12039. "line": {
  12040. "type": "integer",
  12041. "minimum": 0
  12042. },
  12043. "character": {
  12044. "type": "integer",
  12045. "minimum": 0
  12046. }
  12047. },
  12048. "required": ["line", "character"],
  12049. "additionalProperties": false
  12050. },
  12051. "end": {
  12052. "type": "object",
  12053. "properties": {
  12054. "line": {
  12055. "type": "integer",
  12056. "minimum": 0
  12057. },
  12058. "character": {
  12059. "type": "integer",
  12060. "minimum": 0
  12061. }
  12062. },
  12063. "required": ["line", "character"],
  12064. "additionalProperties": false
  12065. }
  12066. },
  12067. "required": ["start", "end"],
  12068. "additionalProperties": false
  12069. },
  12070. "SymbolSource": {
  12071. "type": "object",
  12072. "properties": {
  12073. "text": {
  12074. "$ref": "#/components/schemas/FilePartSourceText"
  12075. },
  12076. "type": {
  12077. "type": "string",
  12078. "enum": ["symbol"]
  12079. },
  12080. "path": {
  12081. "type": "string"
  12082. },
  12083. "range": {
  12084. "$ref": "#/components/schemas/Range"
  12085. },
  12086. "name": {
  12087. "type": "string"
  12088. },
  12089. "kind": {
  12090. "type": "integer",
  12091. "minimum": 0
  12092. }
  12093. },
  12094. "required": ["text", "type", "path", "range", "name", "kind"],
  12095. "additionalProperties": false
  12096. },
  12097. "ResourceSource": {
  12098. "type": "object",
  12099. "properties": {
  12100. "text": {
  12101. "$ref": "#/components/schemas/FilePartSourceText"
  12102. },
  12103. "type": {
  12104. "type": "string",
  12105. "enum": ["resource"]
  12106. },
  12107. "clientName": {
  12108. "type": "string"
  12109. },
  12110. "uri": {
  12111. "type": "string"
  12112. }
  12113. },
  12114. "required": ["text", "type", "clientName", "uri"],
  12115. "additionalProperties": false
  12116. },
  12117. "FilePartSource": {
  12118. "anyOf": [
  12119. {
  12120. "$ref": "#/components/schemas/FileSource"
  12121. },
  12122. {
  12123. "$ref": "#/components/schemas/SymbolSource"
  12124. },
  12125. {
  12126. "$ref": "#/components/schemas/ResourceSource"
  12127. }
  12128. ]
  12129. },
  12130. "FilePart": {
  12131. "type": "object",
  12132. "properties": {
  12133. "id": {
  12134. "type": "string",
  12135. "pattern": "^prt"
  12136. },
  12137. "sessionID": {
  12138. "type": "string",
  12139. "pattern": "^ses"
  12140. },
  12141. "messageID": {
  12142. "type": "string",
  12143. "pattern": "^msg"
  12144. },
  12145. "type": {
  12146. "type": "string",
  12147. "enum": ["file"]
  12148. },
  12149. "mime": {
  12150. "type": "string"
  12151. },
  12152. "filename": {
  12153. "type": "string"
  12154. },
  12155. "url": {
  12156. "type": "string"
  12157. },
  12158. "source": {
  12159. "$ref": "#/components/schemas/FilePartSource"
  12160. }
  12161. },
  12162. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  12163. "additionalProperties": false
  12164. },
  12165. "ToolStatePending": {
  12166. "type": "object",
  12167. "properties": {
  12168. "status": {
  12169. "type": "string",
  12170. "enum": ["pending"]
  12171. },
  12172. "input": {
  12173. "type": "object"
  12174. },
  12175. "raw": {
  12176. "type": "string"
  12177. }
  12178. },
  12179. "required": ["status", "input", "raw"],
  12180. "additionalProperties": false
  12181. },
  12182. "ToolStateRunning": {
  12183. "type": "object",
  12184. "properties": {
  12185. "status": {
  12186. "type": "string",
  12187. "enum": ["running"]
  12188. },
  12189. "input": {
  12190. "type": "object"
  12191. },
  12192. "title": {
  12193. "type": "string"
  12194. },
  12195. "metadata": {
  12196. "type": "object"
  12197. },
  12198. "time": {
  12199. "type": "object",
  12200. "properties": {
  12201. "start": {
  12202. "type": "integer",
  12203. "minimum": 0
  12204. }
  12205. },
  12206. "required": ["start"],
  12207. "additionalProperties": false
  12208. }
  12209. },
  12210. "required": ["status", "input", "time"],
  12211. "additionalProperties": false
  12212. },
  12213. "ToolStateCompleted": {
  12214. "type": "object",
  12215. "properties": {
  12216. "status": {
  12217. "type": "string",
  12218. "enum": ["completed"]
  12219. },
  12220. "input": {
  12221. "type": "object"
  12222. },
  12223. "output": {
  12224. "type": "string"
  12225. },
  12226. "title": {
  12227. "type": "string"
  12228. },
  12229. "metadata": {
  12230. "type": "object"
  12231. },
  12232. "time": {
  12233. "type": "object",
  12234. "properties": {
  12235. "start": {
  12236. "type": "integer",
  12237. "minimum": 0
  12238. },
  12239. "end": {
  12240. "type": "integer",
  12241. "minimum": 0
  12242. },
  12243. "compacted": {
  12244. "type": "integer",
  12245. "minimum": 0
  12246. }
  12247. },
  12248. "required": ["start", "end"],
  12249. "additionalProperties": false
  12250. },
  12251. "attachments": {
  12252. "type": "array",
  12253. "items": {
  12254. "$ref": "#/components/schemas/FilePart"
  12255. }
  12256. }
  12257. },
  12258. "required": ["status", "input", "output", "title", "metadata", "time"],
  12259. "additionalProperties": false
  12260. },
  12261. "ToolStateError": {
  12262. "type": "object",
  12263. "properties": {
  12264. "status": {
  12265. "type": "string",
  12266. "enum": ["error"]
  12267. },
  12268. "input": {
  12269. "type": "object"
  12270. },
  12271. "error": {
  12272. "type": "string"
  12273. },
  12274. "metadata": {
  12275. "type": "object"
  12276. },
  12277. "time": {
  12278. "type": "object",
  12279. "properties": {
  12280. "start": {
  12281. "type": "integer",
  12282. "minimum": 0
  12283. },
  12284. "end": {
  12285. "type": "integer",
  12286. "minimum": 0
  12287. }
  12288. },
  12289. "required": ["start", "end"],
  12290. "additionalProperties": false
  12291. }
  12292. },
  12293. "required": ["status", "input", "error", "time"],
  12294. "additionalProperties": false
  12295. },
  12296. "ToolState": {
  12297. "anyOf": [
  12298. {
  12299. "$ref": "#/components/schemas/ToolStatePending"
  12300. },
  12301. {
  12302. "$ref": "#/components/schemas/ToolStateRunning"
  12303. },
  12304. {
  12305. "$ref": "#/components/schemas/ToolStateCompleted"
  12306. },
  12307. {
  12308. "$ref": "#/components/schemas/ToolStateError"
  12309. }
  12310. ]
  12311. },
  12312. "ToolPart": {
  12313. "type": "object",
  12314. "properties": {
  12315. "id": {
  12316. "type": "string",
  12317. "pattern": "^prt"
  12318. },
  12319. "sessionID": {
  12320. "type": "string",
  12321. "pattern": "^ses"
  12322. },
  12323. "messageID": {
  12324. "type": "string",
  12325. "pattern": "^msg"
  12326. },
  12327. "type": {
  12328. "type": "string",
  12329. "enum": ["tool"]
  12330. },
  12331. "callID": {
  12332. "type": "string"
  12333. },
  12334. "tool": {
  12335. "type": "string"
  12336. },
  12337. "state": {
  12338. "$ref": "#/components/schemas/ToolState"
  12339. },
  12340. "metadata": {
  12341. "type": "object"
  12342. }
  12343. },
  12344. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  12345. "additionalProperties": false
  12346. },
  12347. "StepStartPart": {
  12348. "type": "object",
  12349. "properties": {
  12350. "id": {
  12351. "type": "string",
  12352. "pattern": "^prt"
  12353. },
  12354. "sessionID": {
  12355. "type": "string",
  12356. "pattern": "^ses"
  12357. },
  12358. "messageID": {
  12359. "type": "string",
  12360. "pattern": "^msg"
  12361. },
  12362. "type": {
  12363. "type": "string",
  12364. "enum": ["step-start"]
  12365. },
  12366. "snapshot": {
  12367. "type": "string"
  12368. }
  12369. },
  12370. "required": ["id", "sessionID", "messageID", "type"],
  12371. "additionalProperties": false
  12372. },
  12373. "StepFinishPart": {
  12374. "type": "object",
  12375. "properties": {
  12376. "id": {
  12377. "type": "string",
  12378. "pattern": "^prt"
  12379. },
  12380. "sessionID": {
  12381. "type": "string",
  12382. "pattern": "^ses"
  12383. },
  12384. "messageID": {
  12385. "type": "string",
  12386. "pattern": "^msg"
  12387. },
  12388. "type": {
  12389. "type": "string",
  12390. "enum": ["step-finish"]
  12391. },
  12392. "reason": {
  12393. "type": "string"
  12394. },
  12395. "snapshot": {
  12396. "type": "string"
  12397. },
  12398. "cost": {
  12399. "type": "number"
  12400. },
  12401. "tokens": {
  12402. "type": "object",
  12403. "properties": {
  12404. "total": {
  12405. "type": "number"
  12406. },
  12407. "input": {
  12408. "type": "number"
  12409. },
  12410. "output": {
  12411. "type": "number"
  12412. },
  12413. "reasoning": {
  12414. "type": "number"
  12415. },
  12416. "cache": {
  12417. "type": "object",
  12418. "properties": {
  12419. "read": {
  12420. "type": "number"
  12421. },
  12422. "write": {
  12423. "type": "number"
  12424. }
  12425. },
  12426. "required": ["read", "write"],
  12427. "additionalProperties": false
  12428. }
  12429. },
  12430. "required": ["input", "output", "reasoning", "cache"],
  12431. "additionalProperties": false
  12432. }
  12433. },
  12434. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  12435. "additionalProperties": false
  12436. },
  12437. "SnapshotPart": {
  12438. "type": "object",
  12439. "properties": {
  12440. "id": {
  12441. "type": "string",
  12442. "pattern": "^prt"
  12443. },
  12444. "sessionID": {
  12445. "type": "string",
  12446. "pattern": "^ses"
  12447. },
  12448. "messageID": {
  12449. "type": "string",
  12450. "pattern": "^msg"
  12451. },
  12452. "type": {
  12453. "type": "string",
  12454. "enum": ["snapshot"]
  12455. },
  12456. "snapshot": {
  12457. "type": "string"
  12458. }
  12459. },
  12460. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  12461. "additionalProperties": false
  12462. },
  12463. "PatchPart": {
  12464. "type": "object",
  12465. "properties": {
  12466. "id": {
  12467. "type": "string",
  12468. "pattern": "^prt"
  12469. },
  12470. "sessionID": {
  12471. "type": "string",
  12472. "pattern": "^ses"
  12473. },
  12474. "messageID": {
  12475. "type": "string",
  12476. "pattern": "^msg"
  12477. },
  12478. "type": {
  12479. "type": "string",
  12480. "enum": ["patch"]
  12481. },
  12482. "hash": {
  12483. "type": "string"
  12484. },
  12485. "files": {
  12486. "type": "array",
  12487. "items": {
  12488. "type": "string"
  12489. }
  12490. }
  12491. },
  12492. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  12493. "additionalProperties": false
  12494. },
  12495. "AgentPart": {
  12496. "type": "object",
  12497. "properties": {
  12498. "id": {
  12499. "type": "string",
  12500. "pattern": "^prt"
  12501. },
  12502. "sessionID": {
  12503. "type": "string",
  12504. "pattern": "^ses"
  12505. },
  12506. "messageID": {
  12507. "type": "string",
  12508. "pattern": "^msg"
  12509. },
  12510. "type": {
  12511. "type": "string",
  12512. "enum": ["agent"]
  12513. },
  12514. "name": {
  12515. "type": "string"
  12516. },
  12517. "source": {
  12518. "type": "object",
  12519. "properties": {
  12520. "value": {
  12521. "type": "string"
  12522. },
  12523. "start": {
  12524. "type": "integer",
  12525. "minimum": 0
  12526. },
  12527. "end": {
  12528. "type": "integer",
  12529. "minimum": 0
  12530. }
  12531. },
  12532. "required": ["value", "start", "end"],
  12533. "additionalProperties": false
  12534. }
  12535. },
  12536. "required": ["id", "sessionID", "messageID", "type", "name"],
  12537. "additionalProperties": false
  12538. },
  12539. "RetryPart": {
  12540. "type": "object",
  12541. "properties": {
  12542. "id": {
  12543. "type": "string",
  12544. "pattern": "^prt"
  12545. },
  12546. "sessionID": {
  12547. "type": "string",
  12548. "pattern": "^ses"
  12549. },
  12550. "messageID": {
  12551. "type": "string",
  12552. "pattern": "^msg"
  12553. },
  12554. "type": {
  12555. "type": "string",
  12556. "enum": ["retry"]
  12557. },
  12558. "attempt": {
  12559. "type": "integer",
  12560. "minimum": 0
  12561. },
  12562. "error": {
  12563. "$ref": "#/components/schemas/APIError"
  12564. },
  12565. "time": {
  12566. "type": "object",
  12567. "properties": {
  12568. "created": {
  12569. "type": "integer",
  12570. "minimum": 0
  12571. }
  12572. },
  12573. "required": ["created"],
  12574. "additionalProperties": false
  12575. }
  12576. },
  12577. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  12578. "additionalProperties": false
  12579. },
  12580. "CompactionPart": {
  12581. "type": "object",
  12582. "properties": {
  12583. "id": {
  12584. "type": "string",
  12585. "pattern": "^prt"
  12586. },
  12587. "sessionID": {
  12588. "type": "string",
  12589. "pattern": "^ses"
  12590. },
  12591. "messageID": {
  12592. "type": "string",
  12593. "pattern": "^msg"
  12594. },
  12595. "type": {
  12596. "type": "string",
  12597. "enum": ["compaction"]
  12598. },
  12599. "auto": {
  12600. "type": "boolean"
  12601. },
  12602. "overflow": {
  12603. "type": "boolean"
  12604. },
  12605. "tail_start_id": {
  12606. "type": "string",
  12607. "pattern": "^msg"
  12608. }
  12609. },
  12610. "required": ["id", "sessionID", "messageID", "type", "auto"],
  12611. "additionalProperties": false
  12612. },
  12613. "Part": {
  12614. "anyOf": [
  12615. {
  12616. "$ref": "#/components/schemas/TextPart"
  12617. },
  12618. {
  12619. "$ref": "#/components/schemas/SubtaskPart"
  12620. },
  12621. {
  12622. "$ref": "#/components/schemas/ReasoningPart"
  12623. },
  12624. {
  12625. "$ref": "#/components/schemas/FilePart"
  12626. },
  12627. {
  12628. "$ref": "#/components/schemas/ToolPart"
  12629. },
  12630. {
  12631. "$ref": "#/components/schemas/StepStartPart"
  12632. },
  12633. {
  12634. "$ref": "#/components/schemas/StepFinishPart"
  12635. },
  12636. {
  12637. "$ref": "#/components/schemas/SnapshotPart"
  12638. },
  12639. {
  12640. "$ref": "#/components/schemas/PatchPart"
  12641. },
  12642. {
  12643. "$ref": "#/components/schemas/AgentPart"
  12644. },
  12645. {
  12646. "$ref": "#/components/schemas/RetryPart"
  12647. },
  12648. {
  12649. "$ref": "#/components/schemas/CompactionPart"
  12650. }
  12651. ]
  12652. },
  12653. "PermissionAction": {
  12654. "type": "string",
  12655. "enum": ["allow", "deny", "ask"]
  12656. },
  12657. "PermissionRule": {
  12658. "type": "object",
  12659. "properties": {
  12660. "permission": {
  12661. "type": "string"
  12662. },
  12663. "pattern": {
  12664. "type": "string"
  12665. },
  12666. "action": {
  12667. "$ref": "#/components/schemas/PermissionAction"
  12668. }
  12669. },
  12670. "required": ["permission", "pattern", "action"],
  12671. "additionalProperties": false
  12672. },
  12673. "PermissionRuleset": {
  12674. "type": "array",
  12675. "items": {
  12676. "$ref": "#/components/schemas/PermissionRule"
  12677. }
  12678. },
  12679. "Session": {
  12680. "type": "object",
  12681. "properties": {
  12682. "id": {
  12683. "type": "string",
  12684. "pattern": "^ses"
  12685. },
  12686. "slug": {
  12687. "type": "string"
  12688. },
  12689. "projectID": {
  12690. "type": "string"
  12691. },
  12692. "workspaceID": {
  12693. "type": "string",
  12694. "pattern": "^wrk"
  12695. },
  12696. "directory": {
  12697. "type": "string"
  12698. },
  12699. "path": {
  12700. "type": "string"
  12701. },
  12702. "parentID": {
  12703. "type": "string",
  12704. "pattern": "^ses"
  12705. },
  12706. "summary": {
  12707. "type": "object",
  12708. "properties": {
  12709. "additions": {
  12710. "type": "number"
  12711. },
  12712. "deletions": {
  12713. "type": "number"
  12714. },
  12715. "files": {
  12716. "type": "number"
  12717. },
  12718. "diffs": {
  12719. "type": "array",
  12720. "items": {
  12721. "$ref": "#/components/schemas/SnapshotFileDiff"
  12722. }
  12723. }
  12724. },
  12725. "required": ["additions", "deletions", "files"],
  12726. "additionalProperties": false
  12727. },
  12728. "cost": {
  12729. "type": "number"
  12730. },
  12731. "tokens": {
  12732. "type": "object",
  12733. "properties": {
  12734. "input": {
  12735. "type": "number"
  12736. },
  12737. "output": {
  12738. "type": "number"
  12739. },
  12740. "reasoning": {
  12741. "type": "number"
  12742. },
  12743. "cache": {
  12744. "type": "object",
  12745. "properties": {
  12746. "read": {
  12747. "type": "number"
  12748. },
  12749. "write": {
  12750. "type": "number"
  12751. }
  12752. },
  12753. "required": ["read", "write"],
  12754. "additionalProperties": false
  12755. }
  12756. },
  12757. "required": ["input", "output", "reasoning", "cache"],
  12758. "additionalProperties": false
  12759. },
  12760. "share": {
  12761. "type": "object",
  12762. "properties": {
  12763. "url": {
  12764. "type": "string"
  12765. }
  12766. },
  12767. "required": ["url"],
  12768. "additionalProperties": false
  12769. },
  12770. "title": {
  12771. "type": "string"
  12772. },
  12773. "agent": {
  12774. "type": "string"
  12775. },
  12776. "model": {
  12777. "type": "object",
  12778. "properties": {
  12779. "id": {
  12780. "type": "string"
  12781. },
  12782. "providerID": {
  12783. "type": "string"
  12784. },
  12785. "variant": {
  12786. "type": "string"
  12787. }
  12788. },
  12789. "required": ["id", "providerID"],
  12790. "additionalProperties": false
  12791. },
  12792. "version": {
  12793. "type": "string"
  12794. },
  12795. "time": {
  12796. "type": "object",
  12797. "properties": {
  12798. "created": {
  12799. "type": "integer",
  12800. "minimum": 0
  12801. },
  12802. "updated": {
  12803. "type": "integer",
  12804. "minimum": 0
  12805. },
  12806. "compacting": {
  12807. "type": "integer",
  12808. "minimum": 0
  12809. },
  12810. "archived": {
  12811. "type": "number"
  12812. }
  12813. },
  12814. "required": ["created", "updated"],
  12815. "additionalProperties": false
  12816. },
  12817. "permission": {
  12818. "$ref": "#/components/schemas/PermissionRuleset"
  12819. },
  12820. "revert": {
  12821. "type": "object",
  12822. "properties": {
  12823. "messageID": {
  12824. "type": "string",
  12825. "pattern": "^msg"
  12826. },
  12827. "partID": {
  12828. "type": "string",
  12829. "pattern": "^prt"
  12830. },
  12831. "snapshot": {
  12832. "type": "string"
  12833. },
  12834. "diff": {
  12835. "type": "string"
  12836. }
  12837. },
  12838. "required": ["messageID"],
  12839. "additionalProperties": false
  12840. }
  12841. },
  12842. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  12843. "additionalProperties": false
  12844. },
  12845. "Prompt": {
  12846. "type": "object",
  12847. "properties": {
  12848. "text": {
  12849. "type": "string"
  12850. },
  12851. "files": {
  12852. "type": "array",
  12853. "items": {
  12854. "$ref": "#/components/schemas/PromptFileAttachment"
  12855. }
  12856. },
  12857. "agents": {
  12858. "type": "array",
  12859. "items": {
  12860. "$ref": "#/components/schemas/PromptAgentAttachment"
  12861. }
  12862. },
  12863. "references": {
  12864. "type": "array",
  12865. "items": {
  12866. "$ref": "#/components/schemas/PromptReferenceAttachment"
  12867. }
  12868. }
  12869. },
  12870. "required": ["text"],
  12871. "additionalProperties": false
  12872. },
  12873. "GlobalEvent": {
  12874. "type": "object",
  12875. "properties": {
  12876. "directory": {
  12877. "type": "string"
  12878. },
  12879. "project": {
  12880. "type": "string"
  12881. },
  12882. "workspace": {
  12883. "type": "string"
  12884. },
  12885. "payload": {
  12886. "anyOf": [
  12887. {
  12888. "$ref": "#/components/schemas/Event.tui.prompt.append"
  12889. },
  12890. {
  12891. "$ref": "#/components/schemas/Event.tui.command.execute"
  12892. },
  12893. {
  12894. "$ref": "#/components/schemas/Event.tui.toast.show"
  12895. },
  12896. {
  12897. "$ref": "#/components/schemas/Event.tui.session.select"
  12898. },
  12899. {
  12900. "$ref": "#/components/schemas/EventServerConnected"
  12901. },
  12902. {
  12903. "$ref": "#/components/schemas/EventGlobalDisposed"
  12904. },
  12905. {
  12906. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  12907. },
  12908. {
  12909. "$ref": "#/components/schemas/EventFileEdited"
  12910. },
  12911. {
  12912. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  12913. },
  12914. {
  12915. "$ref": "#/components/schemas/EventLspClientDiagnostics"
  12916. },
  12917. {
  12918. "$ref": "#/components/schemas/EventLspUpdated"
  12919. },
  12920. {
  12921. "$ref": "#/components/schemas/EventMessagePartDelta"
  12922. },
  12923. {
  12924. "$ref": "#/components/schemas/EventPermissionAsked"
  12925. },
  12926. {
  12927. "$ref": "#/components/schemas/EventPermissionReplied"
  12928. },
  12929. {
  12930. "$ref": "#/components/schemas/EventSessionDiff"
  12931. },
  12932. {
  12933. "$ref": "#/components/schemas/EventSessionError"
  12934. },
  12935. {
  12936. "$ref": "#/components/schemas/EventQuestionAsked"
  12937. },
  12938. {
  12939. "$ref": "#/components/schemas/EventQuestionReplied"
  12940. },
  12941. {
  12942. "$ref": "#/components/schemas/EventQuestionRejected"
  12943. },
  12944. {
  12945. "$ref": "#/components/schemas/EventTodoUpdated"
  12946. },
  12947. {
  12948. "$ref": "#/components/schemas/EventSessionStatus"
  12949. },
  12950. {
  12951. "$ref": "#/components/schemas/EventSessionIdle"
  12952. },
  12953. {
  12954. "$ref": "#/components/schemas/EventMcpToolsChanged"
  12955. },
  12956. {
  12957. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  12958. },
  12959. {
  12960. "$ref": "#/components/schemas/EventCommandExecuted"
  12961. },
  12962. {
  12963. "$ref": "#/components/schemas/EventProjectUpdated"
  12964. },
  12965. {
  12966. "$ref": "#/components/schemas/EventSessionCompacted"
  12967. },
  12968. {
  12969. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  12970. },
  12971. {
  12972. "$ref": "#/components/schemas/EventWorkspaceReady"
  12973. },
  12974. {
  12975. "$ref": "#/components/schemas/EventWorkspaceFailed"
  12976. },
  12977. {
  12978. "$ref": "#/components/schemas/EventWorkspaceStatus"
  12979. },
  12980. {
  12981. "$ref": "#/components/schemas/EventWorktreeReady"
  12982. },
  12983. {
  12984. "$ref": "#/components/schemas/EventWorktreeFailed"
  12985. },
  12986. {
  12987. "$ref": "#/components/schemas/EventPtyCreated"
  12988. },
  12989. {
  12990. "$ref": "#/components/schemas/EventPtyUpdated"
  12991. },
  12992. {
  12993. "$ref": "#/components/schemas/EventPtyExited"
  12994. },
  12995. {
  12996. "$ref": "#/components/schemas/EventPtyDeleted"
  12997. },
  12998. {
  12999. "$ref": "#/components/schemas/EventInstallationUpdated"
  13000. },
  13001. {
  13002. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  13003. },
  13004. {
  13005. "$ref": "#/components/schemas/EventMessageUpdated"
  13006. },
  13007. {
  13008. "$ref": "#/components/schemas/EventMessageRemoved"
  13009. },
  13010. {
  13011. "$ref": "#/components/schemas/EventMessagePartUpdated"
  13012. },
  13013. {
  13014. "$ref": "#/components/schemas/EventMessagePartRemoved"
  13015. },
  13016. {
  13017. "$ref": "#/components/schemas/EventSessionCreated"
  13018. },
  13019. {
  13020. "$ref": "#/components/schemas/EventSessionUpdated"
  13021. },
  13022. {
  13023. "$ref": "#/components/schemas/EventSessionDeleted"
  13024. },
  13025. {
  13026. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  13027. },
  13028. {
  13029. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  13030. },
  13031. {
  13032. "$ref": "#/components/schemas/EventSessionNextPrompted"
  13033. },
  13034. {
  13035. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  13036. },
  13037. {
  13038. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  13039. },
  13040. {
  13041. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  13042. },
  13043. {
  13044. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  13045. },
  13046. {
  13047. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  13048. },
  13049. {
  13050. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  13051. },
  13052. {
  13053. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  13054. },
  13055. {
  13056. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  13057. },
  13058. {
  13059. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  13060. },
  13061. {
  13062. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  13063. },
  13064. {
  13065. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  13066. },
  13067. {
  13068. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  13069. },
  13070. {
  13071. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  13072. },
  13073. {
  13074. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  13075. },
  13076. {
  13077. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  13078. },
  13079. {
  13080. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  13081. },
  13082. {
  13083. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  13084. },
  13085. {
  13086. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  13087. },
  13088. {
  13089. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  13090. },
  13091. {
  13092. "$ref": "#/components/schemas/EventSessionNextRetried"
  13093. },
  13094. {
  13095. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  13096. },
  13097. {
  13098. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  13099. },
  13100. {
  13101. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  13102. },
  13103. {
  13104. "$ref": "#/components/schemas/EventCatalogModelUpdated"
  13105. },
  13106. {
  13107. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  13108. },
  13109. {
  13110. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  13111. },
  13112. {
  13113. "$ref": "#/components/schemas/EventSessionNextPrompted"
  13114. },
  13115. {
  13116. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  13117. },
  13118. {
  13119. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  13120. },
  13121. {
  13122. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  13123. },
  13124. {
  13125. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  13126. },
  13127. {
  13128. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  13129. },
  13130. {
  13131. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  13132. },
  13133. {
  13134. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  13135. },
  13136. {
  13137. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  13138. },
  13139. {
  13140. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  13141. },
  13142. {
  13143. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  13144. },
  13145. {
  13146. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  13147. },
  13148. {
  13149. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  13150. },
  13151. {
  13152. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  13153. },
  13154. {
  13155. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  13156. },
  13157. {
  13158. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  13159. },
  13160. {
  13161. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  13162. },
  13163. {
  13164. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  13165. },
  13166. {
  13167. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  13168. },
  13169. {
  13170. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  13171. },
  13172. {
  13173. "$ref": "#/components/schemas/EventSessionNextRetried"
  13174. },
  13175. {
  13176. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  13177. },
  13178. {
  13179. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  13180. },
  13181. {
  13182. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  13183. },
  13184. {
  13185. "$ref": "#/components/schemas/EventModels-devRefreshed"
  13186. },
  13187. {
  13188. "$ref": "#/components/schemas/EventAccountAdded"
  13189. },
  13190. {
  13191. "$ref": "#/components/schemas/EventAccountRemoved"
  13192. },
  13193. {
  13194. "$ref": "#/components/schemas/EventAccountSwitched"
  13195. },
  13196. {
  13197. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  13198. },
  13199. {
  13200. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  13201. },
  13202. {
  13203. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  13204. },
  13205. {
  13206. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  13207. },
  13208. {
  13209. "$ref": "#/components/schemas/SyncEventSessionCreated"
  13210. },
  13211. {
  13212. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  13213. },
  13214. {
  13215. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  13216. },
  13217. {
  13218. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  13219. },
  13220. {
  13221. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  13222. },
  13223. {
  13224. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  13225. },
  13226. {
  13227. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  13228. },
  13229. {
  13230. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  13231. },
  13232. {
  13233. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  13234. },
  13235. {
  13236. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  13237. },
  13238. {
  13239. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  13240. },
  13241. {
  13242. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  13243. },
  13244. {
  13245. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  13246. },
  13247. {
  13248. "$ref": "#/components/schemas/SyncEventSessionNextTextDelta"
  13249. },
  13250. {
  13251. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  13252. },
  13253. {
  13254. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  13255. },
  13256. {
  13257. "$ref": "#/components/schemas/SyncEventSessionNextReasoningDelta"
  13258. },
  13259. {
  13260. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  13261. },
  13262. {
  13263. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  13264. },
  13265. {
  13266. "$ref": "#/components/schemas/SyncEventSessionNextToolInputDelta"
  13267. },
  13268. {
  13269. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  13270. },
  13271. {
  13272. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  13273. },
  13274. {
  13275. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  13276. },
  13277. {
  13278. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  13279. },
  13280. {
  13281. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  13282. },
  13283. {
  13284. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  13285. },
  13286. {
  13287. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  13288. },
  13289. {
  13290. "$ref": "#/components/schemas/SyncEventSessionNextCompactionDelta"
  13291. },
  13292. {
  13293. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  13294. }
  13295. ]
  13296. }
  13297. },
  13298. "required": ["directory", "payload"],
  13299. "additionalProperties": false
  13300. },
  13301. "LogLevel": {
  13302. "type": "string",
  13303. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  13304. "description": "Log level"
  13305. },
  13306. "ServerConfig": {
  13307. "type": "object",
  13308. "properties": {
  13309. "port": {
  13310. "type": "integer",
  13311. "exclusiveMinimum": 0
  13312. },
  13313. "hostname": {
  13314. "type": "string"
  13315. },
  13316. "mdns": {
  13317. "type": "boolean"
  13318. },
  13319. "mdnsDomain": {
  13320. "type": "string"
  13321. },
  13322. "cors": {
  13323. "type": "array",
  13324. "items": {
  13325. "type": "string"
  13326. }
  13327. }
  13328. },
  13329. "additionalProperties": false,
  13330. "description": "Server configuration for opencode serve and web commands"
  13331. },
  13332. "ReferenceConfigEntry": {
  13333. "anyOf": [
  13334. {
  13335. "type": "string"
  13336. },
  13337. {
  13338. "type": "object",
  13339. "properties": {
  13340. "repository": {
  13341. "type": "string",
  13342. "description": "Git repository URL, host/path reference, or GitHub owner/repo shorthand"
  13343. },
  13344. "branch": {
  13345. "type": "string"
  13346. }
  13347. },
  13348. "required": ["repository"],
  13349. "additionalProperties": false
  13350. },
  13351. {
  13352. "type": "object",
  13353. "properties": {
  13354. "path": {
  13355. "type": "string",
  13356. "description": "Absolute path, ~/ path, or workspace-relative path to a local reference directory"
  13357. }
  13358. },
  13359. "required": ["path"],
  13360. "additionalProperties": false
  13361. }
  13362. ]
  13363. },
  13364. "ReferenceConfig": {
  13365. "type": "object",
  13366. "additionalProperties": {
  13367. "$ref": "#/components/schemas/ReferenceConfigEntry"
  13368. }
  13369. },
  13370. "PermissionActionConfig": {
  13371. "type": "string",
  13372. "enum": ["ask", "allow", "deny"]
  13373. },
  13374. "PermissionObjectConfig": {
  13375. "type": "object",
  13376. "additionalProperties": {
  13377. "$ref": "#/components/schemas/PermissionActionConfig"
  13378. }
  13379. },
  13380. "PermissionRuleConfig": {
  13381. "anyOf": [
  13382. {
  13383. "$ref": "#/components/schemas/PermissionActionConfig"
  13384. },
  13385. {
  13386. "$ref": "#/components/schemas/PermissionObjectConfig"
  13387. }
  13388. ]
  13389. },
  13390. "PermissionConfig": {
  13391. "anyOf": [
  13392. {
  13393. "$ref": "#/components/schemas/PermissionActionConfig"
  13394. },
  13395. {
  13396. "type": "object",
  13397. "properties": {
  13398. "read": {
  13399. "$ref": "#/components/schemas/PermissionRuleConfig"
  13400. },
  13401. "edit": {
  13402. "$ref": "#/components/schemas/PermissionRuleConfig"
  13403. },
  13404. "glob": {
  13405. "$ref": "#/components/schemas/PermissionRuleConfig"
  13406. },
  13407. "grep": {
  13408. "$ref": "#/components/schemas/PermissionRuleConfig"
  13409. },
  13410. "list": {
  13411. "$ref": "#/components/schemas/PermissionRuleConfig"
  13412. },
  13413. "bash": {
  13414. "$ref": "#/components/schemas/PermissionRuleConfig"
  13415. },
  13416. "task": {
  13417. "$ref": "#/components/schemas/PermissionRuleConfig"
  13418. },
  13419. "external_directory": {
  13420. "$ref": "#/components/schemas/PermissionRuleConfig"
  13421. },
  13422. "todowrite": {
  13423. "$ref": "#/components/schemas/PermissionActionConfig"
  13424. },
  13425. "question": {
  13426. "$ref": "#/components/schemas/PermissionActionConfig"
  13427. },
  13428. "webfetch": {
  13429. "$ref": "#/components/schemas/PermissionActionConfig"
  13430. },
  13431. "websearch": {
  13432. "$ref": "#/components/schemas/PermissionActionConfig"
  13433. },
  13434. "repo_clone": {
  13435. "$ref": "#/components/schemas/PermissionRuleConfig"
  13436. },
  13437. "repo_overview": {
  13438. "$ref": "#/components/schemas/PermissionRuleConfig"
  13439. },
  13440. "lsp": {
  13441. "$ref": "#/components/schemas/PermissionRuleConfig"
  13442. },
  13443. "doom_loop": {
  13444. "$ref": "#/components/schemas/PermissionActionConfig"
  13445. },
  13446. "skill": {
  13447. "$ref": "#/components/schemas/PermissionRuleConfig"
  13448. }
  13449. },
  13450. "additionalProperties": {
  13451. "$ref": "#/components/schemas/PermissionRuleConfig"
  13452. }
  13453. }
  13454. ]
  13455. },
  13456. "AgentConfig": {
  13457. "type": "object",
  13458. "properties": {
  13459. "model": {
  13460. "type": "string"
  13461. },
  13462. "variant": {
  13463. "type": "string"
  13464. },
  13465. "temperature": {
  13466. "type": "number"
  13467. },
  13468. "top_p": {
  13469. "type": "number"
  13470. },
  13471. "prompt": {
  13472. "type": "string"
  13473. },
  13474. "tools": {
  13475. "type": "object",
  13476. "additionalProperties": {
  13477. "type": "boolean"
  13478. }
  13479. },
  13480. "disable": {
  13481. "type": "boolean"
  13482. },
  13483. "description": {
  13484. "type": "string"
  13485. },
  13486. "mode": {
  13487. "type": "string",
  13488. "enum": ["subagent", "primary", "all"]
  13489. },
  13490. "hidden": {
  13491. "type": "boolean"
  13492. },
  13493. "options": {
  13494. "type": "object"
  13495. },
  13496. "color": {
  13497. "anyOf": [
  13498. {
  13499. "type": "string",
  13500. "pattern": "^#[0-9a-fA-F]{6}$"
  13501. },
  13502. {
  13503. "type": "string",
  13504. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  13505. }
  13506. ],
  13507. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  13508. },
  13509. "steps": {
  13510. "type": "integer",
  13511. "exclusiveMinimum": 0
  13512. },
  13513. "maxSteps": {
  13514. "type": "integer",
  13515. "exclusiveMinimum": 0
  13516. },
  13517. "permission": {
  13518. "$ref": "#/components/schemas/PermissionConfig"
  13519. }
  13520. },
  13521. "additionalProperties": {}
  13522. },
  13523. "ProviderConfig": {
  13524. "type": "object",
  13525. "properties": {
  13526. "api": {
  13527. "type": "string"
  13528. },
  13529. "name": {
  13530. "type": "string"
  13531. },
  13532. "env": {
  13533. "type": "array",
  13534. "items": {
  13535. "type": "string"
  13536. }
  13537. },
  13538. "id": {
  13539. "type": "string"
  13540. },
  13541. "npm": {
  13542. "type": "string"
  13543. },
  13544. "whitelist": {
  13545. "type": "array",
  13546. "items": {
  13547. "type": "string"
  13548. }
  13549. },
  13550. "blacklist": {
  13551. "type": "array",
  13552. "items": {
  13553. "type": "string"
  13554. }
  13555. },
  13556. "options": {
  13557. "type": "object",
  13558. "properties": {
  13559. "apiKey": {
  13560. "type": "string"
  13561. },
  13562. "baseURL": {
  13563. "type": "string"
  13564. },
  13565. "enterpriseUrl": {
  13566. "type": "string"
  13567. },
  13568. "setCacheKey": {
  13569. "type": "boolean"
  13570. },
  13571. "timeout": {
  13572. "anyOf": [
  13573. {
  13574. "type": "integer",
  13575. "exclusiveMinimum": 0
  13576. },
  13577. {
  13578. "type": "boolean",
  13579. "enum": [false]
  13580. }
  13581. ],
  13582. "description": "Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout."
  13583. },
  13584. "chunkTimeout": {
  13585. "type": "integer",
  13586. "exclusiveMinimum": 0
  13587. }
  13588. },
  13589. "additionalProperties": {}
  13590. },
  13591. "models": {
  13592. "type": "object",
  13593. "additionalProperties": {
  13594. "type": "object",
  13595. "properties": {
  13596. "id": {
  13597. "type": "string"
  13598. },
  13599. "name": {
  13600. "type": "string"
  13601. },
  13602. "family": {
  13603. "type": "string"
  13604. },
  13605. "release_date": {
  13606. "type": "string"
  13607. },
  13608. "attachment": {
  13609. "type": "boolean"
  13610. },
  13611. "reasoning": {
  13612. "type": "boolean"
  13613. },
  13614. "temperature": {
  13615. "type": "boolean"
  13616. },
  13617. "tool_call": {
  13618. "type": "boolean"
  13619. },
  13620. "interleaved": {
  13621. "anyOf": [
  13622. {
  13623. "type": "boolean",
  13624. "enum": [true]
  13625. },
  13626. {
  13627. "type": "object",
  13628. "properties": {
  13629. "field": {
  13630. "type": "string",
  13631. "enum": ["reasoning_content", "reasoning_details"]
  13632. }
  13633. },
  13634. "required": ["field"],
  13635. "additionalProperties": false
  13636. }
  13637. ]
  13638. },
  13639. "cost": {
  13640. "type": "object",
  13641. "properties": {
  13642. "input": {
  13643. "type": "number"
  13644. },
  13645. "output": {
  13646. "type": "number"
  13647. },
  13648. "cache_read": {
  13649. "type": "number"
  13650. },
  13651. "cache_write": {
  13652. "type": "number"
  13653. },
  13654. "context_over_200k": {
  13655. "type": "object",
  13656. "properties": {
  13657. "input": {
  13658. "type": "number"
  13659. },
  13660. "output": {
  13661. "type": "number"
  13662. },
  13663. "cache_read": {
  13664. "type": "number"
  13665. },
  13666. "cache_write": {
  13667. "type": "number"
  13668. }
  13669. },
  13670. "required": ["input", "output"],
  13671. "additionalProperties": false
  13672. }
  13673. },
  13674. "required": ["input", "output"],
  13675. "additionalProperties": false
  13676. },
  13677. "limit": {
  13678. "type": "object",
  13679. "properties": {
  13680. "context": {
  13681. "type": "number"
  13682. },
  13683. "input": {
  13684. "type": "number"
  13685. },
  13686. "output": {
  13687. "type": "number"
  13688. }
  13689. },
  13690. "required": ["context", "output"],
  13691. "additionalProperties": false
  13692. },
  13693. "modalities": {
  13694. "type": "object",
  13695. "properties": {
  13696. "input": {
  13697. "type": "array",
  13698. "items": {
  13699. "type": "string",
  13700. "enum": ["text", "audio", "image", "video", "pdf"]
  13701. }
  13702. },
  13703. "output": {
  13704. "type": "array",
  13705. "items": {
  13706. "type": "string",
  13707. "enum": ["text", "audio", "image", "video", "pdf"]
  13708. }
  13709. }
  13710. },
  13711. "required": ["input", "output"],
  13712. "additionalProperties": false
  13713. },
  13714. "experimental": {
  13715. "type": "boolean"
  13716. },
  13717. "status": {
  13718. "type": "string",
  13719. "enum": ["alpha", "beta", "deprecated", "active"]
  13720. },
  13721. "provider": {
  13722. "type": "object",
  13723. "properties": {
  13724. "npm": {
  13725. "type": "string"
  13726. },
  13727. "api": {
  13728. "type": "string"
  13729. }
  13730. },
  13731. "additionalProperties": false
  13732. },
  13733. "options": {
  13734. "type": "object"
  13735. },
  13736. "headers": {
  13737. "type": "object",
  13738. "additionalProperties": {
  13739. "type": "string"
  13740. }
  13741. },
  13742. "variants": {
  13743. "type": "object",
  13744. "additionalProperties": {
  13745. "type": "object",
  13746. "properties": {
  13747. "disabled": {
  13748. "type": "boolean"
  13749. }
  13750. },
  13751. "additionalProperties": {}
  13752. },
  13753. "description": "Variant-specific configuration"
  13754. }
  13755. },
  13756. "additionalProperties": false
  13757. }
  13758. }
  13759. },
  13760. "additionalProperties": false
  13761. },
  13762. "McpLocalConfig": {
  13763. "type": "object",
  13764. "properties": {
  13765. "type": {
  13766. "type": "string",
  13767. "enum": ["local"],
  13768. "description": "Type of MCP server connection"
  13769. },
  13770. "command": {
  13771. "type": "array",
  13772. "items": {
  13773. "type": "string"
  13774. },
  13775. "description": "Command and arguments to run the MCP server"
  13776. },
  13777. "environment": {
  13778. "type": "object",
  13779. "additionalProperties": {
  13780. "type": "string"
  13781. }
  13782. },
  13783. "enabled": {
  13784. "type": "boolean"
  13785. },
  13786. "timeout": {
  13787. "type": "integer",
  13788. "exclusiveMinimum": 0
  13789. }
  13790. },
  13791. "required": ["type", "command"],
  13792. "additionalProperties": false
  13793. },
  13794. "McpOAuthConfig": {
  13795. "type": "object",
  13796. "properties": {
  13797. "clientId": {
  13798. "type": "string"
  13799. },
  13800. "clientSecret": {
  13801. "type": "string"
  13802. },
  13803. "scope": {
  13804. "type": "string"
  13805. },
  13806. "callbackPort": {
  13807. "type": "integer",
  13808. "minimum": 1,
  13809. "maximum": 65535
  13810. },
  13811. "redirectUri": {
  13812. "type": "string"
  13813. }
  13814. },
  13815. "additionalProperties": false
  13816. },
  13817. "McpRemoteConfig": {
  13818. "type": "object",
  13819. "properties": {
  13820. "type": {
  13821. "type": "string",
  13822. "enum": ["remote"],
  13823. "description": "Type of MCP server connection"
  13824. },
  13825. "url": {
  13826. "type": "string",
  13827. "description": "URL of the remote MCP server"
  13828. },
  13829. "enabled": {
  13830. "type": "boolean"
  13831. },
  13832. "headers": {
  13833. "type": "object",
  13834. "additionalProperties": {
  13835. "type": "string"
  13836. }
  13837. },
  13838. "oauth": {
  13839. "anyOf": [
  13840. {
  13841. "$ref": "#/components/schemas/McpOAuthConfig"
  13842. },
  13843. {
  13844. "type": "boolean",
  13845. "enum": [false]
  13846. }
  13847. ],
  13848. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  13849. },
  13850. "timeout": {
  13851. "type": "integer",
  13852. "exclusiveMinimum": 0
  13853. }
  13854. },
  13855. "required": ["type", "url"],
  13856. "additionalProperties": false
  13857. },
  13858. "LayoutConfig": {
  13859. "type": "string",
  13860. "enum": ["auto", "stretch"],
  13861. "description": "@deprecated Always uses stretch layout."
  13862. },
  13863. "ImageAttachmentConfig": {
  13864. "type": "object",
  13865. "properties": {
  13866. "auto_resize": {
  13867. "type": "boolean"
  13868. },
  13869. "max_width": {
  13870. "type": "integer",
  13871. "exclusiveMinimum": 0
  13872. },
  13873. "max_height": {
  13874. "type": "integer",
  13875. "exclusiveMinimum": 0
  13876. },
  13877. "max_base64_bytes": {
  13878. "type": "integer",
  13879. "exclusiveMinimum": 0
  13880. }
  13881. },
  13882. "additionalProperties": false
  13883. },
  13884. "AttachmentConfig": {
  13885. "type": "object",
  13886. "properties": {
  13887. "image": {
  13888. "$ref": "#/components/schemas/ImageAttachmentConfig"
  13889. }
  13890. },
  13891. "additionalProperties": false
  13892. },
  13893. "Config": {
  13894. "type": "object",
  13895. "properties": {
  13896. "$schema": {
  13897. "type": "string"
  13898. },
  13899. "shell": {
  13900. "type": "string"
  13901. },
  13902. "logLevel": {
  13903. "$ref": "#/components/schemas/LogLevel"
  13904. },
  13905. "server": {
  13906. "$ref": "#/components/schemas/ServerConfig"
  13907. },
  13908. "command": {
  13909. "type": "object",
  13910. "additionalProperties": {
  13911. "type": "object",
  13912. "properties": {
  13913. "template": {
  13914. "type": "string"
  13915. },
  13916. "description": {
  13917. "type": "string"
  13918. },
  13919. "agent": {
  13920. "type": "string"
  13921. },
  13922. "model": {
  13923. "type": "string"
  13924. },
  13925. "subtask": {
  13926. "type": "boolean"
  13927. }
  13928. },
  13929. "required": ["template"],
  13930. "additionalProperties": false
  13931. }
  13932. },
  13933. "skills": {
  13934. "type": "object",
  13935. "properties": {
  13936. "paths": {
  13937. "type": "array",
  13938. "items": {
  13939. "type": "string"
  13940. }
  13941. },
  13942. "urls": {
  13943. "type": "array",
  13944. "items": {
  13945. "type": "string"
  13946. }
  13947. }
  13948. },
  13949. "additionalProperties": false
  13950. },
  13951. "reference": {
  13952. "$ref": "#/components/schemas/ReferenceConfig"
  13953. },
  13954. "watcher": {
  13955. "type": "object",
  13956. "properties": {
  13957. "ignore": {
  13958. "type": "array",
  13959. "items": {
  13960. "type": "string"
  13961. }
  13962. }
  13963. },
  13964. "additionalProperties": false
  13965. },
  13966. "snapshot": {
  13967. "type": "boolean"
  13968. },
  13969. "plugin": {
  13970. "type": "array",
  13971. "items": {
  13972. "anyOf": [
  13973. {
  13974. "type": "string"
  13975. },
  13976. {
  13977. "type": "array",
  13978. "prefixItems": [
  13979. {
  13980. "type": "string"
  13981. },
  13982. {
  13983. "type": "object"
  13984. }
  13985. ],
  13986. "maxItems": 2,
  13987. "minItems": 2
  13988. }
  13989. ]
  13990. }
  13991. },
  13992. "share": {
  13993. "type": "string",
  13994. "enum": ["manual", "auto", "disabled"]
  13995. },
  13996. "autoshare": {
  13997. "type": "boolean"
  13998. },
  13999. "autoupdate": {
  14000. "anyOf": [
  14001. {
  14002. "type": "boolean"
  14003. },
  14004. {
  14005. "type": "string",
  14006. "enum": ["notify"]
  14007. }
  14008. ],
  14009. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  14010. },
  14011. "disabled_providers": {
  14012. "type": "array",
  14013. "items": {
  14014. "type": "string"
  14015. }
  14016. },
  14017. "enabled_providers": {
  14018. "type": "array",
  14019. "items": {
  14020. "type": "string"
  14021. }
  14022. },
  14023. "model": {
  14024. "type": "string"
  14025. },
  14026. "small_model": {
  14027. "type": "string"
  14028. },
  14029. "default_agent": {
  14030. "type": "string"
  14031. },
  14032. "username": {
  14033. "type": "string"
  14034. },
  14035. "mode": {
  14036. "type": "object",
  14037. "properties": {
  14038. "build": {
  14039. "$ref": "#/components/schemas/AgentConfig"
  14040. },
  14041. "plan": {
  14042. "$ref": "#/components/schemas/AgentConfig"
  14043. }
  14044. },
  14045. "additionalProperties": {
  14046. "$ref": "#/components/schemas/AgentConfig"
  14047. }
  14048. },
  14049. "agent": {
  14050. "type": "object",
  14051. "properties": {
  14052. "plan": {
  14053. "$ref": "#/components/schemas/AgentConfig"
  14054. },
  14055. "build": {
  14056. "$ref": "#/components/schemas/AgentConfig"
  14057. },
  14058. "general": {
  14059. "$ref": "#/components/schemas/AgentConfig"
  14060. },
  14061. "explore": {
  14062. "$ref": "#/components/schemas/AgentConfig"
  14063. },
  14064. "scout": {
  14065. "$ref": "#/components/schemas/AgentConfig"
  14066. },
  14067. "title": {
  14068. "$ref": "#/components/schemas/AgentConfig"
  14069. },
  14070. "summary": {
  14071. "$ref": "#/components/schemas/AgentConfig"
  14072. },
  14073. "compaction": {
  14074. "$ref": "#/components/schemas/AgentConfig"
  14075. }
  14076. },
  14077. "additionalProperties": {
  14078. "$ref": "#/components/schemas/AgentConfig"
  14079. }
  14080. },
  14081. "provider": {
  14082. "type": "object",
  14083. "additionalProperties": {
  14084. "$ref": "#/components/schemas/ProviderConfig"
  14085. }
  14086. },
  14087. "mcp": {
  14088. "type": "object",
  14089. "additionalProperties": {
  14090. "anyOf": [
  14091. {
  14092. "$ref": "#/components/schemas/McpLocalConfig"
  14093. },
  14094. {
  14095. "$ref": "#/components/schemas/McpRemoteConfig"
  14096. },
  14097. {
  14098. "type": "object",
  14099. "properties": {
  14100. "enabled": {
  14101. "type": "boolean"
  14102. }
  14103. },
  14104. "required": ["enabled"],
  14105. "additionalProperties": false
  14106. }
  14107. ]
  14108. }
  14109. },
  14110. "formatter": {
  14111. "anyOf": [
  14112. {
  14113. "type": "boolean"
  14114. },
  14115. {
  14116. "type": "object",
  14117. "additionalProperties": {
  14118. "type": "object",
  14119. "properties": {
  14120. "disabled": {
  14121. "type": "boolean"
  14122. },
  14123. "command": {
  14124. "type": "array",
  14125. "items": {
  14126. "type": "string"
  14127. }
  14128. },
  14129. "environment": {
  14130. "type": "object",
  14131. "additionalProperties": {
  14132. "type": "string"
  14133. }
  14134. },
  14135. "extensions": {
  14136. "type": "array",
  14137. "items": {
  14138. "type": "string"
  14139. }
  14140. }
  14141. },
  14142. "additionalProperties": false
  14143. }
  14144. }
  14145. ],
  14146. "description": "Enable or configure formatters. Omit or set to false to disable, true to enable built-ins, or an object to enable built-ins with overrides."
  14147. },
  14148. "lsp": {
  14149. "anyOf": [
  14150. {
  14151. "type": "boolean"
  14152. },
  14153. {
  14154. "type": "object",
  14155. "additionalProperties": {
  14156. "anyOf": [
  14157. {
  14158. "type": "object",
  14159. "properties": {
  14160. "disabled": {
  14161. "type": "boolean",
  14162. "enum": [true]
  14163. }
  14164. },
  14165. "required": ["disabled"],
  14166. "additionalProperties": false
  14167. },
  14168. {
  14169. "type": "object",
  14170. "properties": {
  14171. "command": {
  14172. "type": "array",
  14173. "items": {
  14174. "type": "string"
  14175. }
  14176. },
  14177. "extensions": {
  14178. "type": "array",
  14179. "items": {
  14180. "type": "string"
  14181. }
  14182. },
  14183. "disabled": {
  14184. "type": "boolean"
  14185. },
  14186. "env": {
  14187. "type": "object",
  14188. "additionalProperties": {
  14189. "type": "string"
  14190. }
  14191. },
  14192. "initialization": {
  14193. "type": "object"
  14194. }
  14195. },
  14196. "required": ["command"],
  14197. "additionalProperties": false
  14198. }
  14199. ]
  14200. }
  14201. }
  14202. ],
  14203. "description": "Enable or configure LSP servers. Omit or set to false to disable, true to enable built-ins, or an object to enable built-ins with overrides."
  14204. },
  14205. "instructions": {
  14206. "type": "array",
  14207. "items": {
  14208. "type": "string"
  14209. }
  14210. },
  14211. "layout": {
  14212. "$ref": "#/components/schemas/LayoutConfig"
  14213. },
  14214. "permission": {
  14215. "$ref": "#/components/schemas/PermissionConfig"
  14216. },
  14217. "tools": {
  14218. "type": "object",
  14219. "additionalProperties": {
  14220. "type": "boolean"
  14221. }
  14222. },
  14223. "attachment": {
  14224. "$ref": "#/components/schemas/AttachmentConfig"
  14225. },
  14226. "enterprise": {
  14227. "type": "object",
  14228. "properties": {
  14229. "url": {
  14230. "type": "string"
  14231. }
  14232. },
  14233. "additionalProperties": false
  14234. },
  14235. "tool_output": {
  14236. "type": "object",
  14237. "properties": {
  14238. "max_lines": {
  14239. "type": "integer",
  14240. "exclusiveMinimum": 0
  14241. },
  14242. "max_bytes": {
  14243. "type": "integer",
  14244. "exclusiveMinimum": 0
  14245. }
  14246. },
  14247. "additionalProperties": false
  14248. },
  14249. "compaction": {
  14250. "type": "object",
  14251. "properties": {
  14252. "auto": {
  14253. "type": "boolean"
  14254. },
  14255. "prune": {
  14256. "type": "boolean"
  14257. },
  14258. "tail_turns": {
  14259. "type": "integer",
  14260. "minimum": 0
  14261. },
  14262. "preserve_recent_tokens": {
  14263. "type": "integer",
  14264. "minimum": 0
  14265. },
  14266. "reserved": {
  14267. "type": "integer",
  14268. "minimum": 0
  14269. }
  14270. },
  14271. "additionalProperties": false
  14272. },
  14273. "experimental": {
  14274. "type": "object",
  14275. "properties": {
  14276. "disable_paste_summary": {
  14277. "type": "boolean"
  14278. },
  14279. "batch_tool": {
  14280. "type": "boolean"
  14281. },
  14282. "openTelemetry": {
  14283. "type": "boolean"
  14284. },
  14285. "primary_tools": {
  14286. "type": "array",
  14287. "items": {
  14288. "type": "string"
  14289. }
  14290. },
  14291. "continue_loop_on_deny": {
  14292. "type": "boolean"
  14293. },
  14294. "mcp_timeout": {
  14295. "type": "integer",
  14296. "exclusiveMinimum": 0
  14297. }
  14298. },
  14299. "additionalProperties": false
  14300. }
  14301. },
  14302. "additionalProperties": false
  14303. },
  14304. "Model": {
  14305. "type": "object",
  14306. "properties": {
  14307. "id": {
  14308. "type": "string"
  14309. },
  14310. "providerID": {
  14311. "type": "string"
  14312. },
  14313. "api": {
  14314. "type": "object",
  14315. "properties": {
  14316. "id": {
  14317. "type": "string"
  14318. },
  14319. "url": {
  14320. "type": "string"
  14321. },
  14322. "npm": {
  14323. "type": "string"
  14324. }
  14325. },
  14326. "required": ["id", "url", "npm"],
  14327. "additionalProperties": false
  14328. },
  14329. "name": {
  14330. "type": "string"
  14331. },
  14332. "family": {
  14333. "type": "string"
  14334. },
  14335. "capabilities": {
  14336. "type": "object",
  14337. "properties": {
  14338. "temperature": {
  14339. "type": "boolean"
  14340. },
  14341. "reasoning": {
  14342. "type": "boolean"
  14343. },
  14344. "attachment": {
  14345. "type": "boolean"
  14346. },
  14347. "toolcall": {
  14348. "type": "boolean"
  14349. },
  14350. "input": {
  14351. "type": "object",
  14352. "properties": {
  14353. "text": {
  14354. "type": "boolean"
  14355. },
  14356. "audio": {
  14357. "type": "boolean"
  14358. },
  14359. "image": {
  14360. "type": "boolean"
  14361. },
  14362. "video": {
  14363. "type": "boolean"
  14364. },
  14365. "pdf": {
  14366. "type": "boolean"
  14367. }
  14368. },
  14369. "required": ["text", "audio", "image", "video", "pdf"],
  14370. "additionalProperties": false
  14371. },
  14372. "output": {
  14373. "type": "object",
  14374. "properties": {
  14375. "text": {
  14376. "type": "boolean"
  14377. },
  14378. "audio": {
  14379. "type": "boolean"
  14380. },
  14381. "image": {
  14382. "type": "boolean"
  14383. },
  14384. "video": {
  14385. "type": "boolean"
  14386. },
  14387. "pdf": {
  14388. "type": "boolean"
  14389. }
  14390. },
  14391. "required": ["text", "audio", "image", "video", "pdf"],
  14392. "additionalProperties": false
  14393. },
  14394. "interleaved": {
  14395. "anyOf": [
  14396. {
  14397. "type": "boolean"
  14398. },
  14399. {
  14400. "type": "object",
  14401. "properties": {
  14402. "field": {
  14403. "type": "string",
  14404. "enum": ["reasoning_content", "reasoning_details"]
  14405. }
  14406. },
  14407. "required": ["field"],
  14408. "additionalProperties": false
  14409. }
  14410. ]
  14411. }
  14412. },
  14413. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  14414. "additionalProperties": false
  14415. },
  14416. "cost": {
  14417. "type": "object",
  14418. "properties": {
  14419. "input": {
  14420. "type": "number"
  14421. },
  14422. "output": {
  14423. "type": "number"
  14424. },
  14425. "cache": {
  14426. "type": "object",
  14427. "properties": {
  14428. "read": {
  14429. "type": "number"
  14430. },
  14431. "write": {
  14432. "type": "number"
  14433. }
  14434. },
  14435. "required": ["read", "write"],
  14436. "additionalProperties": false
  14437. },
  14438. "tiers": {
  14439. "type": "array",
  14440. "items": {
  14441. "type": "object",
  14442. "properties": {
  14443. "input": {
  14444. "type": "number"
  14445. },
  14446. "output": {
  14447. "type": "number"
  14448. },
  14449. "cache": {
  14450. "type": "object",
  14451. "properties": {
  14452. "read": {
  14453. "type": "number"
  14454. },
  14455. "write": {
  14456. "type": "number"
  14457. }
  14458. },
  14459. "required": ["read", "write"],
  14460. "additionalProperties": false
  14461. },
  14462. "tier": {
  14463. "type": "object",
  14464. "properties": {
  14465. "type": {
  14466. "type": "string",
  14467. "enum": ["context"]
  14468. },
  14469. "size": {
  14470. "type": "number"
  14471. }
  14472. },
  14473. "required": ["type", "size"],
  14474. "additionalProperties": false
  14475. }
  14476. },
  14477. "required": ["input", "output", "cache", "tier"],
  14478. "additionalProperties": false
  14479. }
  14480. },
  14481. "experimentalOver200K": {
  14482. "type": "object",
  14483. "properties": {
  14484. "input": {
  14485. "type": "number"
  14486. },
  14487. "output": {
  14488. "type": "number"
  14489. },
  14490. "cache": {
  14491. "type": "object",
  14492. "properties": {
  14493. "read": {
  14494. "type": "number"
  14495. },
  14496. "write": {
  14497. "type": "number"
  14498. }
  14499. },
  14500. "required": ["read", "write"],
  14501. "additionalProperties": false
  14502. }
  14503. },
  14504. "required": ["input", "output", "cache"],
  14505. "additionalProperties": false
  14506. }
  14507. },
  14508. "required": ["input", "output", "cache"],
  14509. "additionalProperties": false
  14510. },
  14511. "limit": {
  14512. "type": "object",
  14513. "properties": {
  14514. "context": {
  14515. "type": "number"
  14516. },
  14517. "input": {
  14518. "type": "number"
  14519. },
  14520. "output": {
  14521. "type": "number"
  14522. }
  14523. },
  14524. "required": ["context", "output"],
  14525. "additionalProperties": false
  14526. },
  14527. "status": {
  14528. "type": "string",
  14529. "enum": ["alpha", "beta", "deprecated", "active"]
  14530. },
  14531. "options": {
  14532. "type": "object"
  14533. },
  14534. "headers": {
  14535. "type": "object",
  14536. "additionalProperties": {
  14537. "type": "string"
  14538. }
  14539. },
  14540. "release_date": {
  14541. "type": "string"
  14542. },
  14543. "variants": {
  14544. "type": "object",
  14545. "additionalProperties": {
  14546. "type": "object"
  14547. }
  14548. }
  14549. },
  14550. "required": [
  14551. "id",
  14552. "providerID",
  14553. "api",
  14554. "name",
  14555. "capabilities",
  14556. "cost",
  14557. "limit",
  14558. "status",
  14559. "options",
  14560. "headers",
  14561. "release_date"
  14562. ],
  14563. "additionalProperties": false
  14564. },
  14565. "Provider": {
  14566. "type": "object",
  14567. "properties": {
  14568. "id": {
  14569. "type": "string"
  14570. },
  14571. "name": {
  14572. "type": "string"
  14573. },
  14574. "source": {
  14575. "type": "string",
  14576. "enum": ["env", "config", "custom", "api"]
  14577. },
  14578. "env": {
  14579. "type": "array",
  14580. "items": {
  14581. "type": "string"
  14582. }
  14583. },
  14584. "key": {
  14585. "type": "string"
  14586. },
  14587. "options": {
  14588. "type": "object"
  14589. },
  14590. "models": {
  14591. "type": "object",
  14592. "additionalProperties": {
  14593. "$ref": "#/components/schemas/Model"
  14594. }
  14595. }
  14596. },
  14597. "required": ["id", "name", "source", "env", "options", "models"],
  14598. "additionalProperties": false
  14599. },
  14600. "ConsoleState": {
  14601. "type": "object",
  14602. "properties": {
  14603. "consoleManagedProviders": {
  14604. "type": "array",
  14605. "items": {
  14606. "type": "string"
  14607. }
  14608. },
  14609. "activeOrgName": {
  14610. "type": "string"
  14611. },
  14612. "switchableOrgCount": {
  14613. "type": "integer",
  14614. "minimum": 0
  14615. }
  14616. },
  14617. "required": ["consoleManagedProviders", "switchableOrgCount"],
  14618. "additionalProperties": false
  14619. },
  14620. "effect_HttpApiError_InternalServerError": {
  14621. "type": "object",
  14622. "properties": {
  14623. "_tag": {
  14624. "type": "string",
  14625. "enum": ["InternalServerError"]
  14626. }
  14627. },
  14628. "required": ["_tag"],
  14629. "additionalProperties": false
  14630. },
  14631. "ToolListItem": {
  14632. "type": "object",
  14633. "properties": {
  14634. "id": {
  14635. "type": "string"
  14636. },
  14637. "description": {
  14638. "type": "string"
  14639. },
  14640. "parameters": {}
  14641. },
  14642. "required": ["id", "description", "parameters"],
  14643. "additionalProperties": false
  14644. },
  14645. "ToolList": {
  14646. "type": "array",
  14647. "items": {
  14648. "$ref": "#/components/schemas/ToolListItem"
  14649. }
  14650. },
  14651. "ToolIDs": {
  14652. "type": "array",
  14653. "items": {
  14654. "type": "string"
  14655. }
  14656. },
  14657. "WorktreeError": {
  14658. "type": "object",
  14659. "properties": {
  14660. "name": {
  14661. "type": "string",
  14662. "enum": [
  14663. "WorktreeNotGitError",
  14664. "WorktreeNameGenerationFailedError",
  14665. "WorktreeCreateFailedError",
  14666. "WorktreeStartCommandFailedError",
  14667. "WorktreeRemoveFailedError",
  14668. "WorktreeResetFailedError",
  14669. "WorktreeListFailedError"
  14670. ]
  14671. },
  14672. "data": {
  14673. "type": "object",
  14674. "properties": {
  14675. "message": {
  14676. "type": "string"
  14677. }
  14678. },
  14679. "required": ["message"],
  14680. "additionalProperties": false
  14681. }
  14682. },
  14683. "required": ["name", "data"],
  14684. "additionalProperties": false
  14685. },
  14686. "WorktreeCreateInput": {
  14687. "type": "object",
  14688. "properties": {
  14689. "name": {
  14690. "type": "string"
  14691. },
  14692. "startCommand": {
  14693. "type": "string",
  14694. "description": "Additional startup script to run after the project's start command"
  14695. }
  14696. },
  14697. "additionalProperties": false
  14698. },
  14699. "Worktree": {
  14700. "type": "object",
  14701. "properties": {
  14702. "name": {
  14703. "type": "string"
  14704. },
  14705. "branch": {
  14706. "type": "string"
  14707. },
  14708. "directory": {
  14709. "type": "string"
  14710. }
  14711. },
  14712. "required": ["name", "directory"],
  14713. "additionalProperties": false
  14714. },
  14715. "WorktreeRemoveInput": {
  14716. "type": "object",
  14717. "properties": {
  14718. "directory": {
  14719. "type": "string"
  14720. }
  14721. },
  14722. "required": ["directory"],
  14723. "additionalProperties": false
  14724. },
  14725. "WorktreeResetInput": {
  14726. "type": "object",
  14727. "properties": {
  14728. "directory": {
  14729. "type": "string"
  14730. }
  14731. },
  14732. "required": ["directory"],
  14733. "additionalProperties": false
  14734. },
  14735. "ProjectSummary": {
  14736. "type": "object",
  14737. "properties": {
  14738. "id": {
  14739. "type": "string"
  14740. },
  14741. "name": {
  14742. "type": "string"
  14743. },
  14744. "worktree": {
  14745. "type": "string"
  14746. }
  14747. },
  14748. "required": ["id", "worktree"],
  14749. "additionalProperties": false
  14750. },
  14751. "GlobalSession": {
  14752. "type": "object",
  14753. "properties": {
  14754. "id": {
  14755. "type": "string",
  14756. "pattern": "^ses"
  14757. },
  14758. "slug": {
  14759. "type": "string"
  14760. },
  14761. "projectID": {
  14762. "type": "string"
  14763. },
  14764. "workspaceID": {
  14765. "type": "string",
  14766. "pattern": "^wrk"
  14767. },
  14768. "directory": {
  14769. "type": "string"
  14770. },
  14771. "path": {
  14772. "type": "string"
  14773. },
  14774. "parentID": {
  14775. "type": "string",
  14776. "pattern": "^ses"
  14777. },
  14778. "summary": {
  14779. "type": "object",
  14780. "properties": {
  14781. "additions": {
  14782. "type": "number"
  14783. },
  14784. "deletions": {
  14785. "type": "number"
  14786. },
  14787. "files": {
  14788. "type": "number"
  14789. },
  14790. "diffs": {
  14791. "type": "array",
  14792. "items": {
  14793. "$ref": "#/components/schemas/SnapshotFileDiff"
  14794. }
  14795. }
  14796. },
  14797. "required": ["additions", "deletions", "files"],
  14798. "additionalProperties": false
  14799. },
  14800. "cost": {
  14801. "type": "number"
  14802. },
  14803. "tokens": {
  14804. "type": "object",
  14805. "properties": {
  14806. "input": {
  14807. "type": "number"
  14808. },
  14809. "output": {
  14810. "type": "number"
  14811. },
  14812. "reasoning": {
  14813. "type": "number"
  14814. },
  14815. "cache": {
  14816. "type": "object",
  14817. "properties": {
  14818. "read": {
  14819. "type": "number"
  14820. },
  14821. "write": {
  14822. "type": "number"
  14823. }
  14824. },
  14825. "required": ["read", "write"],
  14826. "additionalProperties": false
  14827. }
  14828. },
  14829. "required": ["input", "output", "reasoning", "cache"],
  14830. "additionalProperties": false
  14831. },
  14832. "share": {
  14833. "type": "object",
  14834. "properties": {
  14835. "url": {
  14836. "type": "string"
  14837. }
  14838. },
  14839. "required": ["url"],
  14840. "additionalProperties": false
  14841. },
  14842. "title": {
  14843. "type": "string"
  14844. },
  14845. "agent": {
  14846. "type": "string"
  14847. },
  14848. "model": {
  14849. "type": "object",
  14850. "properties": {
  14851. "id": {
  14852. "type": "string"
  14853. },
  14854. "providerID": {
  14855. "type": "string"
  14856. },
  14857. "variant": {
  14858. "type": "string"
  14859. }
  14860. },
  14861. "required": ["id", "providerID"],
  14862. "additionalProperties": false
  14863. },
  14864. "version": {
  14865. "type": "string"
  14866. },
  14867. "time": {
  14868. "type": "object",
  14869. "properties": {
  14870. "created": {
  14871. "type": "integer",
  14872. "minimum": 0
  14873. },
  14874. "updated": {
  14875. "type": "integer",
  14876. "minimum": 0
  14877. },
  14878. "compacting": {
  14879. "type": "integer",
  14880. "minimum": 0
  14881. },
  14882. "archived": {
  14883. "type": "number"
  14884. }
  14885. },
  14886. "required": ["created", "updated"],
  14887. "additionalProperties": false
  14888. },
  14889. "permission": {
  14890. "$ref": "#/components/schemas/PermissionRuleset"
  14891. },
  14892. "revert": {
  14893. "type": "object",
  14894. "properties": {
  14895. "messageID": {
  14896. "type": "string",
  14897. "pattern": "^msg"
  14898. },
  14899. "partID": {
  14900. "type": "string",
  14901. "pattern": "^prt"
  14902. },
  14903. "snapshot": {
  14904. "type": "string"
  14905. },
  14906. "diff": {
  14907. "type": "string"
  14908. }
  14909. },
  14910. "required": ["messageID"],
  14911. "additionalProperties": false
  14912. },
  14913. "project": {
  14914. "anyOf": [
  14915. {
  14916. "$ref": "#/components/schemas/ProjectSummary"
  14917. },
  14918. {
  14919. "type": "null"
  14920. }
  14921. ]
  14922. }
  14923. },
  14924. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  14925. "additionalProperties": false
  14926. },
  14927. "McpResource": {
  14928. "type": "object",
  14929. "properties": {
  14930. "name": {
  14931. "type": "string"
  14932. },
  14933. "uri": {
  14934. "type": "string"
  14935. },
  14936. "description": {
  14937. "type": "string"
  14938. },
  14939. "mimeType": {
  14940. "type": "string"
  14941. },
  14942. "client": {
  14943. "type": "string"
  14944. }
  14945. },
  14946. "required": ["name", "uri", "client"],
  14947. "additionalProperties": false
  14948. },
  14949. "Symbol": {
  14950. "type": "object",
  14951. "properties": {
  14952. "name": {
  14953. "type": "string"
  14954. },
  14955. "kind": {
  14956. "type": "integer",
  14957. "minimum": 0
  14958. },
  14959. "location": {
  14960. "type": "object",
  14961. "properties": {
  14962. "uri": {
  14963. "type": "string"
  14964. },
  14965. "range": {
  14966. "$ref": "#/components/schemas/Range"
  14967. }
  14968. },
  14969. "required": ["uri", "range"],
  14970. "additionalProperties": false
  14971. }
  14972. },
  14973. "required": ["name", "kind", "location"],
  14974. "additionalProperties": false
  14975. },
  14976. "FileNode": {
  14977. "type": "object",
  14978. "properties": {
  14979. "name": {
  14980. "type": "string"
  14981. },
  14982. "path": {
  14983. "type": "string"
  14984. },
  14985. "absolute": {
  14986. "type": "string"
  14987. },
  14988. "type": {
  14989. "type": "string",
  14990. "enum": ["file", "directory"]
  14991. },
  14992. "ignored": {
  14993. "type": "boolean"
  14994. }
  14995. },
  14996. "required": ["name", "path", "absolute", "type", "ignored"],
  14997. "additionalProperties": false
  14998. },
  14999. "FileContent": {
  15000. "type": "object",
  15001. "properties": {
  15002. "type": {
  15003. "type": "string",
  15004. "enum": ["text", "binary"]
  15005. },
  15006. "content": {
  15007. "type": "string"
  15008. },
  15009. "diff": {
  15010. "type": "string"
  15011. },
  15012. "patch": {
  15013. "type": "object",
  15014. "properties": {
  15015. "oldFileName": {
  15016. "type": "string"
  15017. },
  15018. "newFileName": {
  15019. "type": "string"
  15020. },
  15021. "oldHeader": {
  15022. "type": "string"
  15023. },
  15024. "newHeader": {
  15025. "type": "string"
  15026. },
  15027. "hunks": {
  15028. "type": "array",
  15029. "items": {
  15030. "type": "object",
  15031. "properties": {
  15032. "oldStart": {
  15033. "type": "integer",
  15034. "minimum": 0
  15035. },
  15036. "oldLines": {
  15037. "type": "integer",
  15038. "minimum": 0
  15039. },
  15040. "newStart": {
  15041. "type": "integer",
  15042. "minimum": 0
  15043. },
  15044. "newLines": {
  15045. "type": "integer",
  15046. "minimum": 0
  15047. },
  15048. "lines": {
  15049. "type": "array",
  15050. "items": {
  15051. "type": "string"
  15052. }
  15053. }
  15054. },
  15055. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  15056. "additionalProperties": false
  15057. }
  15058. },
  15059. "index": {
  15060. "type": "string"
  15061. }
  15062. },
  15063. "required": ["oldFileName", "newFileName", "hunks"],
  15064. "additionalProperties": false
  15065. },
  15066. "encoding": {
  15067. "type": "string",
  15068. "enum": ["base64"]
  15069. },
  15070. "mimeType": {
  15071. "type": "string"
  15072. }
  15073. },
  15074. "required": ["type", "content"],
  15075. "additionalProperties": false
  15076. },
  15077. "File": {
  15078. "type": "object",
  15079. "properties": {
  15080. "path": {
  15081. "type": "string"
  15082. },
  15083. "added": {
  15084. "type": "integer",
  15085. "minimum": 0
  15086. },
  15087. "removed": {
  15088. "type": "integer",
  15089. "minimum": 0
  15090. },
  15091. "status": {
  15092. "type": "string",
  15093. "enum": ["added", "deleted", "modified"]
  15094. }
  15095. },
  15096. "required": ["path", "added", "removed", "status"],
  15097. "additionalProperties": false
  15098. },
  15099. "Path": {
  15100. "type": "object",
  15101. "properties": {
  15102. "home": {
  15103. "type": "string"
  15104. },
  15105. "state": {
  15106. "type": "string"
  15107. },
  15108. "config": {
  15109. "type": "string"
  15110. },
  15111. "worktree": {
  15112. "type": "string"
  15113. },
  15114. "directory": {
  15115. "type": "string"
  15116. }
  15117. },
  15118. "required": ["home", "state", "config", "worktree", "directory"],
  15119. "additionalProperties": false
  15120. },
  15121. "VcsInfo": {
  15122. "type": "object",
  15123. "properties": {
  15124. "branch": {
  15125. "type": "string"
  15126. },
  15127. "default_branch": {
  15128. "type": "string"
  15129. }
  15130. },
  15131. "additionalProperties": false
  15132. },
  15133. "VcsFileStatus": {
  15134. "type": "object",
  15135. "properties": {
  15136. "file": {
  15137. "type": "string"
  15138. },
  15139. "additions": {
  15140. "type": "number"
  15141. },
  15142. "deletions": {
  15143. "type": "number"
  15144. },
  15145. "status": {
  15146. "type": "string",
  15147. "enum": ["added", "deleted", "modified"]
  15148. }
  15149. },
  15150. "required": ["file", "additions", "deletions", "status"],
  15151. "additionalProperties": false
  15152. },
  15153. "VcsFileDiff": {
  15154. "type": "object",
  15155. "properties": {
  15156. "file": {
  15157. "type": "string"
  15158. },
  15159. "patch": {
  15160. "type": "string"
  15161. },
  15162. "additions": {
  15163. "type": "number"
  15164. },
  15165. "deletions": {
  15166. "type": "number"
  15167. },
  15168. "status": {
  15169. "type": "string",
  15170. "enum": ["added", "deleted", "modified"]
  15171. }
  15172. },
  15173. "required": ["file", "additions", "deletions"],
  15174. "additionalProperties": false
  15175. },
  15176. "VcsApplyError": {
  15177. "type": "object",
  15178. "properties": {
  15179. "name": {
  15180. "type": "string",
  15181. "enum": ["VcsApplyError"]
  15182. },
  15183. "data": {
  15184. "type": "object",
  15185. "properties": {
  15186. "message": {
  15187. "type": "string"
  15188. },
  15189. "reason": {
  15190. "type": "string",
  15191. "enum": ["non-git", "not-clean"]
  15192. }
  15193. },
  15194. "required": ["message", "reason"],
  15195. "additionalProperties": false
  15196. }
  15197. },
  15198. "required": ["name", "data"],
  15199. "additionalProperties": false
  15200. },
  15201. "Command": {
  15202. "type": "object",
  15203. "properties": {
  15204. "name": {
  15205. "type": "string"
  15206. },
  15207. "description": {
  15208. "type": "string"
  15209. },
  15210. "agent": {
  15211. "type": "string"
  15212. },
  15213. "model": {
  15214. "type": "string"
  15215. },
  15216. "source": {
  15217. "type": "string",
  15218. "enum": ["command", "mcp", "skill"]
  15219. },
  15220. "template": {
  15221. "type": "string"
  15222. },
  15223. "subtask": {
  15224. "type": "boolean"
  15225. },
  15226. "hints": {
  15227. "type": "array",
  15228. "items": {
  15229. "type": "string"
  15230. }
  15231. }
  15232. },
  15233. "required": ["name", "template", "hints"],
  15234. "additionalProperties": false
  15235. },
  15236. "Agent": {
  15237. "type": "object",
  15238. "properties": {
  15239. "name": {
  15240. "type": "string"
  15241. },
  15242. "description": {
  15243. "type": "string"
  15244. },
  15245. "mode": {
  15246. "type": "string",
  15247. "enum": ["subagent", "primary", "all"]
  15248. },
  15249. "native": {
  15250. "type": "boolean"
  15251. },
  15252. "hidden": {
  15253. "type": "boolean"
  15254. },
  15255. "topP": {
  15256. "type": "number"
  15257. },
  15258. "temperature": {
  15259. "type": "number"
  15260. },
  15261. "color": {
  15262. "type": "string"
  15263. },
  15264. "permission": {
  15265. "$ref": "#/components/schemas/PermissionRuleset"
  15266. },
  15267. "model": {
  15268. "type": "object",
  15269. "properties": {
  15270. "modelID": {
  15271. "type": "string"
  15272. },
  15273. "providerID": {
  15274. "type": "string"
  15275. }
  15276. },
  15277. "required": ["modelID", "providerID"],
  15278. "additionalProperties": false
  15279. },
  15280. "variant": {
  15281. "type": "string"
  15282. },
  15283. "prompt": {
  15284. "type": "string"
  15285. },
  15286. "options": {
  15287. "type": "object"
  15288. },
  15289. "steps": {
  15290. "type": "number"
  15291. }
  15292. },
  15293. "required": ["name", "mode", "permission", "options"],
  15294. "additionalProperties": false
  15295. },
  15296. "LSPStatus": {
  15297. "type": "object",
  15298. "properties": {
  15299. "id": {
  15300. "type": "string"
  15301. },
  15302. "name": {
  15303. "type": "string"
  15304. },
  15305. "root": {
  15306. "type": "string"
  15307. },
  15308. "status": {
  15309. "type": "string",
  15310. "enum": ["connected", "error"]
  15311. }
  15312. },
  15313. "required": ["id", "name", "root", "status"],
  15314. "additionalProperties": false
  15315. },
  15316. "FormatterStatus": {
  15317. "type": "object",
  15318. "properties": {
  15319. "name": {
  15320. "type": "string"
  15321. },
  15322. "extensions": {
  15323. "type": "array",
  15324. "items": {
  15325. "type": "string"
  15326. }
  15327. },
  15328. "enabled": {
  15329. "type": "boolean"
  15330. }
  15331. },
  15332. "required": ["name", "extensions", "enabled"],
  15333. "additionalProperties": false
  15334. },
  15335. "MCPStatusConnected": {
  15336. "type": "object",
  15337. "properties": {
  15338. "status": {
  15339. "type": "string",
  15340. "enum": ["connected"]
  15341. }
  15342. },
  15343. "required": ["status"],
  15344. "additionalProperties": false
  15345. },
  15346. "MCPStatusDisabled": {
  15347. "type": "object",
  15348. "properties": {
  15349. "status": {
  15350. "type": "string",
  15351. "enum": ["disabled"]
  15352. }
  15353. },
  15354. "required": ["status"],
  15355. "additionalProperties": false
  15356. },
  15357. "MCPStatusFailed": {
  15358. "type": "object",
  15359. "properties": {
  15360. "status": {
  15361. "type": "string",
  15362. "enum": ["failed"]
  15363. },
  15364. "error": {
  15365. "type": "string"
  15366. }
  15367. },
  15368. "required": ["status", "error"],
  15369. "additionalProperties": false
  15370. },
  15371. "MCPStatusNeedsAuth": {
  15372. "type": "object",
  15373. "properties": {
  15374. "status": {
  15375. "type": "string",
  15376. "enum": ["needs_auth"]
  15377. }
  15378. },
  15379. "required": ["status"],
  15380. "additionalProperties": false
  15381. },
  15382. "MCPStatusNeedsClientRegistration": {
  15383. "type": "object",
  15384. "properties": {
  15385. "status": {
  15386. "type": "string",
  15387. "enum": ["needs_client_registration"]
  15388. },
  15389. "error": {
  15390. "type": "string"
  15391. }
  15392. },
  15393. "required": ["status", "error"],
  15394. "additionalProperties": false
  15395. },
  15396. "MCPStatus": {
  15397. "anyOf": [
  15398. {
  15399. "$ref": "#/components/schemas/MCPStatusConnected"
  15400. },
  15401. {
  15402. "$ref": "#/components/schemas/MCPStatusDisabled"
  15403. },
  15404. {
  15405. "$ref": "#/components/schemas/MCPStatusFailed"
  15406. },
  15407. {
  15408. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  15409. },
  15410. {
  15411. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  15412. }
  15413. ]
  15414. },
  15415. "McpUnsupportedOAuthError": {
  15416. "type": "object",
  15417. "properties": {
  15418. "error": {
  15419. "type": "string"
  15420. }
  15421. },
  15422. "required": ["error"],
  15423. "additionalProperties": false
  15424. },
  15425. "McpServerNotFoundError": {
  15426. "type": "object",
  15427. "properties": {
  15428. "_tag": {
  15429. "type": "string",
  15430. "enum": ["McpServerNotFoundError"]
  15431. },
  15432. "name": {
  15433. "type": "string"
  15434. },
  15435. "message": {
  15436. "type": "string"
  15437. }
  15438. },
  15439. "required": ["_tag", "name", "message"],
  15440. "additionalProperties": false
  15441. },
  15442. "ProjectNotFoundError": {
  15443. "type": "object",
  15444. "properties": {
  15445. "_tag": {
  15446. "type": "string",
  15447. "enum": ["ProjectNotFoundError"]
  15448. },
  15449. "projectID": {
  15450. "type": "string"
  15451. },
  15452. "message": {
  15453. "type": "string"
  15454. }
  15455. },
  15456. "required": ["_tag", "projectID", "message"],
  15457. "additionalProperties": false
  15458. },
  15459. "PtyNotFoundError": {
  15460. "type": "object",
  15461. "properties": {
  15462. "_tag": {
  15463. "type": "string",
  15464. "enum": ["PtyNotFoundError"]
  15465. },
  15466. "ptyID": {
  15467. "type": "string"
  15468. },
  15469. "message": {
  15470. "type": "string"
  15471. }
  15472. },
  15473. "required": ["_tag", "ptyID", "message"],
  15474. "additionalProperties": false
  15475. },
  15476. "PtyForbiddenError": {
  15477. "type": "object",
  15478. "properties": {
  15479. "_tag": {
  15480. "type": "string",
  15481. "enum": ["PtyForbiddenError"]
  15482. },
  15483. "message": {
  15484. "type": "string"
  15485. }
  15486. },
  15487. "required": ["_tag", "message"],
  15488. "additionalProperties": false
  15489. },
  15490. "QuestionNotFoundError": {
  15491. "type": "object",
  15492. "properties": {
  15493. "_tag": {
  15494. "type": "string",
  15495. "enum": ["QuestionNotFoundError"]
  15496. },
  15497. "requestID": {
  15498. "type": "string"
  15499. },
  15500. "message": {
  15501. "type": "string"
  15502. }
  15503. },
  15504. "required": ["_tag", "requestID", "message"],
  15505. "additionalProperties": false
  15506. },
  15507. "PermissionNotFoundError": {
  15508. "type": "object",
  15509. "properties": {
  15510. "_tag": {
  15511. "type": "string",
  15512. "enum": ["PermissionNotFoundError"]
  15513. },
  15514. "requestID": {
  15515. "type": "string"
  15516. },
  15517. "message": {
  15518. "type": "string"
  15519. }
  15520. },
  15521. "required": ["_tag", "requestID", "message"],
  15522. "additionalProperties": false
  15523. },
  15524. "ProviderAuthMethod": {
  15525. "type": "object",
  15526. "properties": {
  15527. "type": {
  15528. "type": "string",
  15529. "enum": ["oauth", "api"]
  15530. },
  15531. "label": {
  15532. "type": "string"
  15533. },
  15534. "prompts": {
  15535. "type": "array",
  15536. "items": {
  15537. "anyOf": [
  15538. {
  15539. "type": "object",
  15540. "properties": {
  15541. "type": {
  15542. "type": "string",
  15543. "enum": ["text"]
  15544. },
  15545. "key": {
  15546. "type": "string"
  15547. },
  15548. "message": {
  15549. "type": "string"
  15550. },
  15551. "placeholder": {
  15552. "type": "string"
  15553. },
  15554. "when": {
  15555. "type": "object",
  15556. "properties": {
  15557. "key": {
  15558. "type": "string"
  15559. },
  15560. "op": {
  15561. "type": "string",
  15562. "enum": ["eq", "neq"]
  15563. },
  15564. "value": {
  15565. "type": "string"
  15566. }
  15567. },
  15568. "required": ["key", "op", "value"],
  15569. "additionalProperties": false
  15570. }
  15571. },
  15572. "required": ["type", "key", "message"],
  15573. "additionalProperties": false
  15574. },
  15575. {
  15576. "type": "object",
  15577. "properties": {
  15578. "type": {
  15579. "type": "string",
  15580. "enum": ["select"]
  15581. },
  15582. "key": {
  15583. "type": "string"
  15584. },
  15585. "message": {
  15586. "type": "string"
  15587. },
  15588. "options": {
  15589. "type": "array",
  15590. "items": {
  15591. "type": "object",
  15592. "properties": {
  15593. "label": {
  15594. "type": "string"
  15595. },
  15596. "value": {
  15597. "type": "string"
  15598. },
  15599. "hint": {
  15600. "type": "string"
  15601. }
  15602. },
  15603. "required": ["label", "value"],
  15604. "additionalProperties": false
  15605. }
  15606. },
  15607. "when": {
  15608. "type": "object",
  15609. "properties": {
  15610. "key": {
  15611. "type": "string"
  15612. },
  15613. "op": {
  15614. "type": "string",
  15615. "enum": ["eq", "neq"]
  15616. },
  15617. "value": {
  15618. "type": "string"
  15619. }
  15620. },
  15621. "required": ["key", "op", "value"],
  15622. "additionalProperties": false
  15623. }
  15624. },
  15625. "required": ["type", "key", "message", "options"],
  15626. "additionalProperties": false
  15627. }
  15628. ]
  15629. }
  15630. }
  15631. },
  15632. "required": ["type", "label"],
  15633. "additionalProperties": false
  15634. },
  15635. "ProviderAuthAuthorization": {
  15636. "type": "object",
  15637. "properties": {
  15638. "url": {
  15639. "type": "string"
  15640. },
  15641. "method": {
  15642. "type": "string",
  15643. "enum": ["auto", "code"]
  15644. },
  15645. "instructions": {
  15646. "type": "string"
  15647. }
  15648. },
  15649. "required": ["url", "method", "instructions"],
  15650. "additionalProperties": false
  15651. },
  15652. "ProviderAuthError1": {
  15653. "type": "object",
  15654. "properties": {
  15655. "name": {
  15656. "type": "string",
  15657. "enum": [
  15658. "BadRequest",
  15659. "ProviderAuthOauthMissing",
  15660. "ProviderAuthOauthCodeMissing",
  15661. "ProviderAuthOauthCallbackFailed",
  15662. "ProviderAuthValidationFailed"
  15663. ]
  15664. },
  15665. "data": {
  15666. "type": "object",
  15667. "properties": {
  15668. "providerID": {
  15669. "type": "string"
  15670. },
  15671. "field": {
  15672. "type": "string"
  15673. },
  15674. "message": {
  15675. "type": "string"
  15676. },
  15677. "kind": {
  15678. "type": "string"
  15679. }
  15680. },
  15681. "additionalProperties": false
  15682. }
  15683. },
  15684. "required": ["name", "data"],
  15685. "additionalProperties": false
  15686. },
  15687. "NotFoundError": {
  15688. "type": "object",
  15689. "required": ["name", "data"],
  15690. "properties": {
  15691. "name": {
  15692. "type": "string",
  15693. "enum": ["NotFoundError"]
  15694. },
  15695. "data": {
  15696. "type": "object",
  15697. "required": ["message"],
  15698. "properties": {
  15699. "message": {
  15700. "type": "string"
  15701. }
  15702. }
  15703. }
  15704. }
  15705. },
  15706. "TextPartInput": {
  15707. "type": "object",
  15708. "properties": {
  15709. "id": {
  15710. "type": "string",
  15711. "pattern": "^prt"
  15712. },
  15713. "type": {
  15714. "type": "string",
  15715. "enum": ["text"]
  15716. },
  15717. "text": {
  15718. "type": "string"
  15719. },
  15720. "synthetic": {
  15721. "type": "boolean"
  15722. },
  15723. "ignored": {
  15724. "type": "boolean"
  15725. },
  15726. "time": {
  15727. "type": "object",
  15728. "properties": {
  15729. "start": {
  15730. "type": "integer",
  15731. "minimum": 0
  15732. },
  15733. "end": {
  15734. "type": "integer",
  15735. "minimum": 0
  15736. }
  15737. },
  15738. "required": ["start"],
  15739. "additionalProperties": false
  15740. },
  15741. "metadata": {
  15742. "type": "object"
  15743. }
  15744. },
  15745. "required": ["type", "text"],
  15746. "additionalProperties": false
  15747. },
  15748. "FilePartInput": {
  15749. "type": "object",
  15750. "properties": {
  15751. "id": {
  15752. "type": "string",
  15753. "pattern": "^prt"
  15754. },
  15755. "type": {
  15756. "type": "string",
  15757. "enum": ["file"]
  15758. },
  15759. "mime": {
  15760. "type": "string"
  15761. },
  15762. "filename": {
  15763. "type": "string"
  15764. },
  15765. "url": {
  15766. "type": "string"
  15767. },
  15768. "source": {
  15769. "$ref": "#/components/schemas/FilePartSource"
  15770. }
  15771. },
  15772. "required": ["type", "mime", "url"],
  15773. "additionalProperties": false
  15774. },
  15775. "AgentPartInput": {
  15776. "type": "object",
  15777. "properties": {
  15778. "id": {
  15779. "type": "string",
  15780. "pattern": "^prt"
  15781. },
  15782. "type": {
  15783. "type": "string",
  15784. "enum": ["agent"]
  15785. },
  15786. "name": {
  15787. "type": "string"
  15788. },
  15789. "source": {
  15790. "type": "object",
  15791. "properties": {
  15792. "value": {
  15793. "type": "string"
  15794. },
  15795. "start": {
  15796. "type": "integer",
  15797. "minimum": 0
  15798. },
  15799. "end": {
  15800. "type": "integer",
  15801. "minimum": 0
  15802. }
  15803. },
  15804. "required": ["value", "start", "end"],
  15805. "additionalProperties": false
  15806. }
  15807. },
  15808. "required": ["type", "name"],
  15809. "additionalProperties": false
  15810. },
  15811. "SubtaskPartInput": {
  15812. "type": "object",
  15813. "properties": {
  15814. "id": {
  15815. "type": "string",
  15816. "pattern": "^prt"
  15817. },
  15818. "type": {
  15819. "type": "string",
  15820. "enum": ["subtask"]
  15821. },
  15822. "prompt": {
  15823. "type": "string"
  15824. },
  15825. "description": {
  15826. "type": "string"
  15827. },
  15828. "agent": {
  15829. "type": "string"
  15830. },
  15831. "model": {
  15832. "type": "object",
  15833. "properties": {
  15834. "providerID": {
  15835. "type": "string"
  15836. },
  15837. "modelID": {
  15838. "type": "string"
  15839. }
  15840. },
  15841. "required": ["providerID", "modelID"],
  15842. "additionalProperties": false
  15843. },
  15844. "command": {
  15845. "type": "string"
  15846. }
  15847. },
  15848. "required": ["type", "prompt", "description", "agent"],
  15849. "additionalProperties": false
  15850. },
  15851. "SessionBusyError": {
  15852. "type": "object",
  15853. "properties": {
  15854. "_tag": {
  15855. "type": "string",
  15856. "enum": ["SessionBusyError"]
  15857. },
  15858. "sessionID": {
  15859. "type": "string"
  15860. },
  15861. "message": {
  15862. "type": "string"
  15863. }
  15864. },
  15865. "required": ["_tag", "sessionID", "message"],
  15866. "additionalProperties": false
  15867. },
  15868. "V2SessionsResponse": {
  15869. "type": "object",
  15870. "properties": {
  15871. "items": {
  15872. "type": "array",
  15873. "items": {
  15874. "$ref": "#/components/schemas/SessionInfo"
  15875. }
  15876. },
  15877. "cursor": {
  15878. "type": "object",
  15879. "properties": {
  15880. "previous": {
  15881. "type": "string"
  15882. },
  15883. "next": {
  15884. "type": "string"
  15885. }
  15886. },
  15887. "additionalProperties": false
  15888. }
  15889. },
  15890. "required": ["items", "cursor"],
  15891. "additionalProperties": false
  15892. },
  15893. "InvalidCursorError": {
  15894. "type": "object",
  15895. "properties": {
  15896. "_tag": {
  15897. "type": "string",
  15898. "enum": ["InvalidCursorError"]
  15899. },
  15900. "message": {
  15901. "type": "string"
  15902. }
  15903. },
  15904. "required": ["_tag", "message"],
  15905. "additionalProperties": false
  15906. },
  15907. "UnauthorizedError": {
  15908. "type": "object",
  15909. "properties": {
  15910. "_tag": {
  15911. "type": "string",
  15912. "enum": ["UnauthorizedError"]
  15913. },
  15914. "message": {
  15915. "type": "string"
  15916. }
  15917. },
  15918. "required": ["_tag", "message"],
  15919. "additionalProperties": false
  15920. },
  15921. "SessionNotFoundError": {
  15922. "type": "object",
  15923. "properties": {
  15924. "_tag": {
  15925. "type": "string",
  15926. "enum": ["SessionNotFoundError"]
  15927. },
  15928. "sessionID": {
  15929. "type": "string"
  15930. },
  15931. "message": {
  15932. "type": "string"
  15933. }
  15934. },
  15935. "required": ["_tag", "sessionID", "message"],
  15936. "additionalProperties": false
  15937. },
  15938. "ServiceUnavailableError": {
  15939. "type": "object",
  15940. "properties": {
  15941. "_tag": {
  15942. "type": "string",
  15943. "enum": ["ServiceUnavailableError"]
  15944. },
  15945. "message": {
  15946. "type": "string"
  15947. },
  15948. "service": {
  15949. "type": "string"
  15950. }
  15951. },
  15952. "required": ["_tag", "message"],
  15953. "additionalProperties": false
  15954. },
  15955. "UnknownError1": {
  15956. "type": "object",
  15957. "properties": {
  15958. "_tag": {
  15959. "type": "string",
  15960. "enum": ["UnknownError"]
  15961. },
  15962. "message": {
  15963. "type": "string"
  15964. },
  15965. "ref": {
  15966. "type": "string"
  15967. }
  15968. },
  15969. "required": ["_tag", "message"],
  15970. "additionalProperties": false
  15971. },
  15972. "V2SessionMessagesResponse": {
  15973. "type": "object",
  15974. "properties": {
  15975. "items": {
  15976. "type": "array",
  15977. "items": {
  15978. "$ref": "#/components/schemas/SessionMessage"
  15979. }
  15980. },
  15981. "cursor": {
  15982. "type": "object",
  15983. "properties": {
  15984. "previous": {
  15985. "type": "string"
  15986. },
  15987. "next": {
  15988. "type": "string"
  15989. }
  15990. },
  15991. "additionalProperties": false
  15992. }
  15993. },
  15994. "required": ["items", "cursor"],
  15995. "additionalProperties": false
  15996. },
  15997. "ProviderNotFoundError": {
  15998. "type": "object",
  15999. "properties": {
  16000. "_tag": {
  16001. "type": "string",
  16002. "enum": ["ProviderNotFoundError"]
  16003. },
  16004. "providerID": {
  16005. "type": "string"
  16006. },
  16007. "message": {
  16008. "type": "string"
  16009. }
  16010. },
  16011. "required": ["_tag", "providerID", "message"],
  16012. "additionalProperties": false
  16013. },
  16014. "EventTuiPromptAppend": {
  16015. "type": "object",
  16016. "properties": {
  16017. "type": {
  16018. "type": "string",
  16019. "enum": ["tui.prompt.append"]
  16020. },
  16021. "properties": {
  16022. "type": "object",
  16023. "properties": {
  16024. "text": {
  16025. "type": "string"
  16026. }
  16027. },
  16028. "required": ["text"],
  16029. "additionalProperties": false
  16030. }
  16031. },
  16032. "required": ["type", "properties"],
  16033. "additionalProperties": false
  16034. },
  16035. "EventTuiCommandExecute": {
  16036. "type": "object",
  16037. "properties": {
  16038. "type": {
  16039. "type": "string",
  16040. "enum": ["tui.command.execute"]
  16041. },
  16042. "properties": {
  16043. "type": "object",
  16044. "properties": {
  16045. "command": {
  16046. "anyOf": [
  16047. {
  16048. "type": "string",
  16049. "enum": [
  16050. "session.list",
  16051. "session.new",
  16052. "session.share",
  16053. "session.interrupt",
  16054. "session.compact",
  16055. "session.page.up",
  16056. "session.page.down",
  16057. "session.line.up",
  16058. "session.line.down",
  16059. "session.half.page.up",
  16060. "session.half.page.down",
  16061. "session.first",
  16062. "session.last",
  16063. "prompt.clear",
  16064. "prompt.submit",
  16065. "agent.cycle"
  16066. ]
  16067. },
  16068. {
  16069. "type": "string"
  16070. }
  16071. ]
  16072. }
  16073. },
  16074. "required": ["command"],
  16075. "additionalProperties": false
  16076. }
  16077. },
  16078. "required": ["type", "properties"],
  16079. "additionalProperties": false
  16080. },
  16081. "EventTuiToastShow": {
  16082. "type": "object",
  16083. "properties": {
  16084. "type": {
  16085. "type": "string",
  16086. "enum": ["tui.toast.show"]
  16087. },
  16088. "properties": {
  16089. "type": "object",
  16090. "properties": {
  16091. "title": {
  16092. "type": "string"
  16093. },
  16094. "message": {
  16095. "type": "string"
  16096. },
  16097. "variant": {
  16098. "type": "string",
  16099. "enum": ["info", "success", "warning", "error"]
  16100. },
  16101. "duration": {
  16102. "type": "integer",
  16103. "exclusiveMinimum": 0
  16104. }
  16105. },
  16106. "required": ["message", "variant"],
  16107. "additionalProperties": false
  16108. }
  16109. },
  16110. "required": ["type", "properties"],
  16111. "additionalProperties": false
  16112. },
  16113. "EventTuiSessionSelect": {
  16114. "type": "object",
  16115. "properties": {
  16116. "type": {
  16117. "type": "string",
  16118. "enum": ["tui.session.select"]
  16119. },
  16120. "properties": {
  16121. "type": "object",
  16122. "properties": {
  16123. "sessionID": {
  16124. "type": "string",
  16125. "pattern": "^ses",
  16126. "description": "Session ID to navigate to"
  16127. }
  16128. },
  16129. "required": ["sessionID"],
  16130. "additionalProperties": false
  16131. }
  16132. },
  16133. "required": ["type", "properties"],
  16134. "additionalProperties": false
  16135. },
  16136. "Workspace": {
  16137. "type": "object",
  16138. "properties": {
  16139. "id": {
  16140. "type": "string",
  16141. "pattern": "^wrk"
  16142. },
  16143. "type": {
  16144. "type": "string"
  16145. },
  16146. "name": {
  16147. "type": "string"
  16148. },
  16149. "branch": {
  16150. "anyOf": [
  16151. {
  16152. "type": "string"
  16153. },
  16154. {
  16155. "type": "null"
  16156. }
  16157. ]
  16158. },
  16159. "directory": {
  16160. "anyOf": [
  16161. {
  16162. "type": "string"
  16163. },
  16164. {
  16165. "type": "null"
  16166. }
  16167. ]
  16168. },
  16169. "extra": {
  16170. "anyOf": [
  16171. {},
  16172. {
  16173. "type": "null"
  16174. }
  16175. ]
  16176. },
  16177. "projectID": {
  16178. "type": "string"
  16179. },
  16180. "timeUsed": {
  16181. "anyOf": [
  16182. {
  16183. "type": "number"
  16184. },
  16185. {
  16186. "type": "string",
  16187. "enum": ["NaN"]
  16188. },
  16189. {
  16190. "type": "string",
  16191. "enum": ["Infinity"]
  16192. },
  16193. {
  16194. "type": "string",
  16195. "enum": ["-Infinity"]
  16196. },
  16197. {
  16198. "type": "string",
  16199. "enum": ["Infinity", "-Infinity", "NaN"]
  16200. }
  16201. ]
  16202. }
  16203. },
  16204. "required": ["id", "type", "name", "projectID", "timeUsed"],
  16205. "additionalProperties": false
  16206. },
  16207. "WorkspaceWarpError": {
  16208. "type": "object",
  16209. "properties": {
  16210. "name": {
  16211. "type": "string",
  16212. "enum": ["WorkspaceWarpError"]
  16213. },
  16214. "data": {
  16215. "type": "object",
  16216. "properties": {
  16217. "message": {
  16218. "type": "string"
  16219. }
  16220. },
  16221. "required": ["message"],
  16222. "additionalProperties": false
  16223. }
  16224. },
  16225. "required": ["name", "data"],
  16226. "additionalProperties": false
  16227. },
  16228. "effect_HttpApiError_Forbidden": {
  16229. "type": "object",
  16230. "properties": {
  16231. "_tag": {
  16232. "type": "string",
  16233. "enum": ["Forbidden"]
  16234. }
  16235. },
  16236. "required": ["_tag"],
  16237. "additionalProperties": false
  16238. },
  16239. "SyncEventMessageUpdated": {
  16240. "type": "object",
  16241. "properties": {
  16242. "type": {
  16243. "type": "string",
  16244. "enum": ["sync"]
  16245. },
  16246. "name": {
  16247. "type": "string",
  16248. "enum": ["message.updated.1"]
  16249. },
  16250. "id": {
  16251. "type": "string"
  16252. },
  16253. "seq": {
  16254. "type": "number"
  16255. },
  16256. "aggregateID": {
  16257. "type": "string",
  16258. "enum": ["sessionID"]
  16259. },
  16260. "data": {
  16261. "type": "object",
  16262. "properties": {
  16263. "sessionID": {
  16264. "type": "string",
  16265. "pattern": "^ses"
  16266. },
  16267. "info": {
  16268. "$ref": "#/components/schemas/Message"
  16269. }
  16270. },
  16271. "required": ["sessionID", "info"],
  16272. "additionalProperties": false
  16273. }
  16274. },
  16275. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16276. "additionalProperties": false
  16277. },
  16278. "SyncEventMessageRemoved": {
  16279. "type": "object",
  16280. "properties": {
  16281. "type": {
  16282. "type": "string",
  16283. "enum": ["sync"]
  16284. },
  16285. "name": {
  16286. "type": "string",
  16287. "enum": ["message.removed.1"]
  16288. },
  16289. "id": {
  16290. "type": "string"
  16291. },
  16292. "seq": {
  16293. "type": "number"
  16294. },
  16295. "aggregateID": {
  16296. "type": "string",
  16297. "enum": ["sessionID"]
  16298. },
  16299. "data": {
  16300. "type": "object",
  16301. "properties": {
  16302. "sessionID": {
  16303. "type": "string",
  16304. "pattern": "^ses"
  16305. },
  16306. "messageID": {
  16307. "type": "string",
  16308. "pattern": "^msg"
  16309. }
  16310. },
  16311. "required": ["sessionID", "messageID"],
  16312. "additionalProperties": false
  16313. }
  16314. },
  16315. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16316. "additionalProperties": false
  16317. },
  16318. "SyncEventMessagePartUpdated": {
  16319. "type": "object",
  16320. "properties": {
  16321. "type": {
  16322. "type": "string",
  16323. "enum": ["sync"]
  16324. },
  16325. "name": {
  16326. "type": "string",
  16327. "enum": ["message.part.updated.1"]
  16328. },
  16329. "id": {
  16330. "type": "string"
  16331. },
  16332. "seq": {
  16333. "type": "number"
  16334. },
  16335. "aggregateID": {
  16336. "type": "string",
  16337. "enum": ["sessionID"]
  16338. },
  16339. "data": {
  16340. "type": "object",
  16341. "properties": {
  16342. "sessionID": {
  16343. "type": "string",
  16344. "pattern": "^ses"
  16345. },
  16346. "part": {
  16347. "$ref": "#/components/schemas/Part"
  16348. },
  16349. "time": {
  16350. "type": "integer",
  16351. "minimum": 0
  16352. }
  16353. },
  16354. "required": ["sessionID", "part", "time"],
  16355. "additionalProperties": false
  16356. }
  16357. },
  16358. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16359. "additionalProperties": false
  16360. },
  16361. "SyncEventMessagePartRemoved": {
  16362. "type": "object",
  16363. "properties": {
  16364. "type": {
  16365. "type": "string",
  16366. "enum": ["sync"]
  16367. },
  16368. "name": {
  16369. "type": "string",
  16370. "enum": ["message.part.removed.1"]
  16371. },
  16372. "id": {
  16373. "type": "string"
  16374. },
  16375. "seq": {
  16376. "type": "number"
  16377. },
  16378. "aggregateID": {
  16379. "type": "string",
  16380. "enum": ["sessionID"]
  16381. },
  16382. "data": {
  16383. "type": "object",
  16384. "properties": {
  16385. "sessionID": {
  16386. "type": "string",
  16387. "pattern": "^ses"
  16388. },
  16389. "messageID": {
  16390. "type": "string",
  16391. "pattern": "^msg"
  16392. },
  16393. "partID": {
  16394. "type": "string",
  16395. "pattern": "^prt"
  16396. }
  16397. },
  16398. "required": ["sessionID", "messageID", "partID"],
  16399. "additionalProperties": false
  16400. }
  16401. },
  16402. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16403. "additionalProperties": false
  16404. },
  16405. "SyncEventSessionCreated": {
  16406. "type": "object",
  16407. "properties": {
  16408. "type": {
  16409. "type": "string",
  16410. "enum": ["sync"]
  16411. },
  16412. "name": {
  16413. "type": "string",
  16414. "enum": ["session.created.1"]
  16415. },
  16416. "id": {
  16417. "type": "string"
  16418. },
  16419. "seq": {
  16420. "type": "number"
  16421. },
  16422. "aggregateID": {
  16423. "type": "string",
  16424. "enum": ["sessionID"]
  16425. },
  16426. "data": {
  16427. "type": "object",
  16428. "properties": {
  16429. "sessionID": {
  16430. "type": "string",
  16431. "pattern": "^ses"
  16432. },
  16433. "info": {
  16434. "$ref": "#/components/schemas/Session"
  16435. }
  16436. },
  16437. "required": ["sessionID", "info"],
  16438. "additionalProperties": false
  16439. }
  16440. },
  16441. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16442. "additionalProperties": false
  16443. },
  16444. "SyncEventSessionUpdated": {
  16445. "type": "object",
  16446. "properties": {
  16447. "type": {
  16448. "type": "string",
  16449. "enum": ["sync"]
  16450. },
  16451. "name": {
  16452. "type": "string",
  16453. "enum": ["session.updated.1"]
  16454. },
  16455. "id": {
  16456. "type": "string"
  16457. },
  16458. "seq": {
  16459. "type": "number"
  16460. },
  16461. "aggregateID": {
  16462. "type": "string",
  16463. "enum": ["sessionID"]
  16464. },
  16465. "data": {
  16466. "type": "object",
  16467. "properties": {
  16468. "sessionID": {
  16469. "type": "string",
  16470. "pattern": "^ses"
  16471. },
  16472. "info": {
  16473. "type": "object",
  16474. "properties": {
  16475. "id": {
  16476. "anyOf": [
  16477. {
  16478. "type": "string",
  16479. "pattern": "^ses"
  16480. },
  16481. {
  16482. "type": "null"
  16483. }
  16484. ]
  16485. },
  16486. "slug": {
  16487. "anyOf": [
  16488. {
  16489. "type": "string"
  16490. },
  16491. {
  16492. "type": "null"
  16493. }
  16494. ]
  16495. },
  16496. "projectID": {
  16497. "anyOf": [
  16498. {
  16499. "type": "string"
  16500. },
  16501. {
  16502. "type": "null"
  16503. }
  16504. ]
  16505. },
  16506. "workspaceID": {
  16507. "anyOf": [
  16508. {
  16509. "type": "string",
  16510. "pattern": "^wrk"
  16511. },
  16512. {
  16513. "type": "null"
  16514. }
  16515. ]
  16516. },
  16517. "directory": {
  16518. "anyOf": [
  16519. {
  16520. "type": "string"
  16521. },
  16522. {
  16523. "type": "null"
  16524. }
  16525. ]
  16526. },
  16527. "path": {
  16528. "anyOf": [
  16529. {
  16530. "type": "string"
  16531. },
  16532. {
  16533. "type": "null"
  16534. }
  16535. ]
  16536. },
  16537. "parentID": {
  16538. "anyOf": [
  16539. {
  16540. "type": "string",
  16541. "pattern": "^ses"
  16542. },
  16543. {
  16544. "type": "null"
  16545. }
  16546. ]
  16547. },
  16548. "summary": {
  16549. "anyOf": [
  16550. {
  16551. "type": "object",
  16552. "properties": {
  16553. "additions": {
  16554. "type": "number"
  16555. },
  16556. "deletions": {
  16557. "type": "number"
  16558. },
  16559. "files": {
  16560. "type": "number"
  16561. },
  16562. "diffs": {
  16563. "type": "array",
  16564. "items": {
  16565. "$ref": "#/components/schemas/SnapshotFileDiff"
  16566. }
  16567. }
  16568. },
  16569. "required": ["additions", "deletions", "files"],
  16570. "additionalProperties": false
  16571. },
  16572. {
  16573. "type": "null"
  16574. }
  16575. ]
  16576. },
  16577. "cost": {
  16578. "anyOf": [
  16579. {
  16580. "type": "number"
  16581. },
  16582. {
  16583. "type": "null"
  16584. }
  16585. ]
  16586. },
  16587. "tokens": {
  16588. "anyOf": [
  16589. {
  16590. "type": "object",
  16591. "properties": {
  16592. "input": {
  16593. "type": "number"
  16594. },
  16595. "output": {
  16596. "type": "number"
  16597. },
  16598. "reasoning": {
  16599. "type": "number"
  16600. },
  16601. "cache": {
  16602. "type": "object",
  16603. "properties": {
  16604. "read": {
  16605. "type": "number"
  16606. },
  16607. "write": {
  16608. "type": "number"
  16609. }
  16610. },
  16611. "required": ["read", "write"],
  16612. "additionalProperties": false
  16613. }
  16614. },
  16615. "required": ["input", "output", "reasoning", "cache"],
  16616. "additionalProperties": false
  16617. },
  16618. {
  16619. "type": "null"
  16620. }
  16621. ]
  16622. },
  16623. "share": {
  16624. "type": "object",
  16625. "properties": {
  16626. "url": {
  16627. "anyOf": [
  16628. {
  16629. "type": "string"
  16630. },
  16631. {
  16632. "type": "null"
  16633. }
  16634. ]
  16635. }
  16636. },
  16637. "additionalProperties": false
  16638. },
  16639. "title": {
  16640. "anyOf": [
  16641. {
  16642. "type": "string"
  16643. },
  16644. {
  16645. "type": "null"
  16646. }
  16647. ]
  16648. },
  16649. "agent": {
  16650. "anyOf": [
  16651. {
  16652. "type": "string"
  16653. },
  16654. {
  16655. "type": "null"
  16656. }
  16657. ]
  16658. },
  16659. "model": {
  16660. "anyOf": [
  16661. {
  16662. "type": "object",
  16663. "properties": {
  16664. "id": {
  16665. "type": "string"
  16666. },
  16667. "providerID": {
  16668. "type": "string"
  16669. },
  16670. "variant": {
  16671. "type": "string"
  16672. }
  16673. },
  16674. "required": ["id", "providerID"],
  16675. "additionalProperties": false
  16676. },
  16677. {
  16678. "type": "null"
  16679. }
  16680. ]
  16681. },
  16682. "version": {
  16683. "anyOf": [
  16684. {
  16685. "type": "string"
  16686. },
  16687. {
  16688. "type": "null"
  16689. }
  16690. ]
  16691. },
  16692. "time": {
  16693. "type": "object",
  16694. "properties": {
  16695. "created": {
  16696. "anyOf": [
  16697. {
  16698. "type": "integer",
  16699. "minimum": 0
  16700. },
  16701. {
  16702. "type": "null"
  16703. }
  16704. ]
  16705. },
  16706. "updated": {
  16707. "anyOf": [
  16708. {
  16709. "type": "integer",
  16710. "minimum": 0
  16711. },
  16712. {
  16713. "type": "null"
  16714. }
  16715. ]
  16716. },
  16717. "compacting": {
  16718. "anyOf": [
  16719. {
  16720. "type": "integer",
  16721. "minimum": 0
  16722. },
  16723. {
  16724. "type": "null"
  16725. }
  16726. ]
  16727. },
  16728. "archived": {
  16729. "anyOf": [
  16730. {
  16731. "type": "number"
  16732. },
  16733. {
  16734. "type": "null"
  16735. }
  16736. ]
  16737. }
  16738. },
  16739. "additionalProperties": false
  16740. },
  16741. "permission": {
  16742. "anyOf": [
  16743. {
  16744. "$ref": "#/components/schemas/PermissionRuleset"
  16745. },
  16746. {
  16747. "type": "null"
  16748. }
  16749. ]
  16750. },
  16751. "revert": {
  16752. "anyOf": [
  16753. {
  16754. "type": "object",
  16755. "properties": {
  16756. "messageID": {
  16757. "type": "string",
  16758. "pattern": "^msg"
  16759. },
  16760. "partID": {
  16761. "type": "string",
  16762. "pattern": "^prt"
  16763. },
  16764. "snapshot": {
  16765. "type": "string"
  16766. },
  16767. "diff": {
  16768. "type": "string"
  16769. }
  16770. },
  16771. "required": ["messageID"],
  16772. "additionalProperties": false
  16773. },
  16774. {
  16775. "type": "null"
  16776. }
  16777. ]
  16778. }
  16779. },
  16780. "additionalProperties": false
  16781. }
  16782. },
  16783. "required": ["sessionID", "info"],
  16784. "additionalProperties": false
  16785. }
  16786. },
  16787. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16788. "additionalProperties": false
  16789. },
  16790. "SyncEventSessionDeleted": {
  16791. "type": "object",
  16792. "properties": {
  16793. "type": {
  16794. "type": "string",
  16795. "enum": ["sync"]
  16796. },
  16797. "name": {
  16798. "type": "string",
  16799. "enum": ["session.deleted.1"]
  16800. },
  16801. "id": {
  16802. "type": "string"
  16803. },
  16804. "seq": {
  16805. "type": "number"
  16806. },
  16807. "aggregateID": {
  16808. "type": "string",
  16809. "enum": ["sessionID"]
  16810. },
  16811. "data": {
  16812. "type": "object",
  16813. "properties": {
  16814. "sessionID": {
  16815. "type": "string",
  16816. "pattern": "^ses"
  16817. },
  16818. "info": {
  16819. "$ref": "#/components/schemas/Session"
  16820. }
  16821. },
  16822. "required": ["sessionID", "info"],
  16823. "additionalProperties": false
  16824. }
  16825. },
  16826. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16827. "additionalProperties": false
  16828. },
  16829. "SyncEventSessionNextAgentSwitched": {
  16830. "type": "object",
  16831. "properties": {
  16832. "type": {
  16833. "type": "string",
  16834. "enum": ["sync"]
  16835. },
  16836. "name": {
  16837. "type": "string",
  16838. "enum": ["session.next.agent.switched.1"]
  16839. },
  16840. "id": {
  16841. "type": "string"
  16842. },
  16843. "seq": {
  16844. "type": "number"
  16845. },
  16846. "aggregateID": {
  16847. "type": "string",
  16848. "enum": ["sessionID"]
  16849. },
  16850. "data": {
  16851. "type": "object",
  16852. "properties": {
  16853. "timestamp": {
  16854. "type": "number"
  16855. },
  16856. "sessionID": {
  16857. "type": "string",
  16858. "pattern": "^ses"
  16859. },
  16860. "agent": {
  16861. "type": "string"
  16862. }
  16863. },
  16864. "required": ["timestamp", "sessionID", "agent"],
  16865. "additionalProperties": false
  16866. }
  16867. },
  16868. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16869. "additionalProperties": false
  16870. },
  16871. "SyncEventSessionNextModelSwitched": {
  16872. "type": "object",
  16873. "properties": {
  16874. "type": {
  16875. "type": "string",
  16876. "enum": ["sync"]
  16877. },
  16878. "name": {
  16879. "type": "string",
  16880. "enum": ["session.next.model.switched.1"]
  16881. },
  16882. "id": {
  16883. "type": "string"
  16884. },
  16885. "seq": {
  16886. "type": "number"
  16887. },
  16888. "aggregateID": {
  16889. "type": "string",
  16890. "enum": ["sessionID"]
  16891. },
  16892. "data": {
  16893. "type": "object",
  16894. "properties": {
  16895. "timestamp": {
  16896. "type": "number"
  16897. },
  16898. "sessionID": {
  16899. "type": "string",
  16900. "pattern": "^ses"
  16901. },
  16902. "model": {
  16903. "type": "object",
  16904. "properties": {
  16905. "id": {
  16906. "type": "string"
  16907. },
  16908. "providerID": {
  16909. "type": "string"
  16910. },
  16911. "variant": {
  16912. "type": "string"
  16913. }
  16914. },
  16915. "required": ["id", "providerID", "variant"],
  16916. "additionalProperties": false
  16917. }
  16918. },
  16919. "required": ["timestamp", "sessionID", "model"],
  16920. "additionalProperties": false
  16921. }
  16922. },
  16923. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16924. "additionalProperties": false
  16925. },
  16926. "SyncEventSessionNextPrompted": {
  16927. "type": "object",
  16928. "properties": {
  16929. "type": {
  16930. "type": "string",
  16931. "enum": ["sync"]
  16932. },
  16933. "name": {
  16934. "type": "string",
  16935. "enum": ["session.next.prompted.1"]
  16936. },
  16937. "id": {
  16938. "type": "string"
  16939. },
  16940. "seq": {
  16941. "type": "number"
  16942. },
  16943. "aggregateID": {
  16944. "type": "string",
  16945. "enum": ["sessionID"]
  16946. },
  16947. "data": {
  16948. "type": "object",
  16949. "properties": {
  16950. "timestamp": {
  16951. "type": "number"
  16952. },
  16953. "sessionID": {
  16954. "type": "string",
  16955. "pattern": "^ses"
  16956. },
  16957. "prompt": {
  16958. "$ref": "#/components/schemas/Prompt"
  16959. }
  16960. },
  16961. "required": ["timestamp", "sessionID", "prompt"],
  16962. "additionalProperties": false
  16963. }
  16964. },
  16965. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16966. "additionalProperties": false
  16967. },
  16968. "SyncEventSessionNextSynthetic": {
  16969. "type": "object",
  16970. "properties": {
  16971. "type": {
  16972. "type": "string",
  16973. "enum": ["sync"]
  16974. },
  16975. "name": {
  16976. "type": "string",
  16977. "enum": ["session.next.synthetic.1"]
  16978. },
  16979. "id": {
  16980. "type": "string"
  16981. },
  16982. "seq": {
  16983. "type": "number"
  16984. },
  16985. "aggregateID": {
  16986. "type": "string",
  16987. "enum": ["sessionID"]
  16988. },
  16989. "data": {
  16990. "type": "object",
  16991. "properties": {
  16992. "timestamp": {
  16993. "type": "number"
  16994. },
  16995. "sessionID": {
  16996. "type": "string",
  16997. "pattern": "^ses"
  16998. },
  16999. "text": {
  17000. "type": "string"
  17001. }
  17002. },
  17003. "required": ["timestamp", "sessionID", "text"],
  17004. "additionalProperties": false
  17005. }
  17006. },
  17007. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17008. "additionalProperties": false
  17009. },
  17010. "SyncEventSessionNextShellStarted": {
  17011. "type": "object",
  17012. "properties": {
  17013. "type": {
  17014. "type": "string",
  17015. "enum": ["sync"]
  17016. },
  17017. "name": {
  17018. "type": "string",
  17019. "enum": ["session.next.shell.started.1"]
  17020. },
  17021. "id": {
  17022. "type": "string"
  17023. },
  17024. "seq": {
  17025. "type": "number"
  17026. },
  17027. "aggregateID": {
  17028. "type": "string",
  17029. "enum": ["sessionID"]
  17030. },
  17031. "data": {
  17032. "type": "object",
  17033. "properties": {
  17034. "timestamp": {
  17035. "type": "number"
  17036. },
  17037. "sessionID": {
  17038. "type": "string",
  17039. "pattern": "^ses"
  17040. },
  17041. "callID": {
  17042. "type": "string"
  17043. },
  17044. "command": {
  17045. "type": "string"
  17046. }
  17047. },
  17048. "required": ["timestamp", "sessionID", "callID", "command"],
  17049. "additionalProperties": false
  17050. }
  17051. },
  17052. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17053. "additionalProperties": false
  17054. },
  17055. "SyncEventSessionNextShellEnded": {
  17056. "type": "object",
  17057. "properties": {
  17058. "type": {
  17059. "type": "string",
  17060. "enum": ["sync"]
  17061. },
  17062. "name": {
  17063. "type": "string",
  17064. "enum": ["session.next.shell.ended.1"]
  17065. },
  17066. "id": {
  17067. "type": "string"
  17068. },
  17069. "seq": {
  17070. "type": "number"
  17071. },
  17072. "aggregateID": {
  17073. "type": "string",
  17074. "enum": ["sessionID"]
  17075. },
  17076. "data": {
  17077. "type": "object",
  17078. "properties": {
  17079. "timestamp": {
  17080. "type": "number"
  17081. },
  17082. "sessionID": {
  17083. "type": "string",
  17084. "pattern": "^ses"
  17085. },
  17086. "callID": {
  17087. "type": "string"
  17088. },
  17089. "output": {
  17090. "type": "string"
  17091. }
  17092. },
  17093. "required": ["timestamp", "sessionID", "callID", "output"],
  17094. "additionalProperties": false
  17095. }
  17096. },
  17097. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17098. "additionalProperties": false
  17099. },
  17100. "SyncEventSessionNextStepStarted": {
  17101. "type": "object",
  17102. "properties": {
  17103. "type": {
  17104. "type": "string",
  17105. "enum": ["sync"]
  17106. },
  17107. "name": {
  17108. "type": "string",
  17109. "enum": ["session.next.step.started.1"]
  17110. },
  17111. "id": {
  17112. "type": "string"
  17113. },
  17114. "seq": {
  17115. "type": "number"
  17116. },
  17117. "aggregateID": {
  17118. "type": "string",
  17119. "enum": ["sessionID"]
  17120. },
  17121. "data": {
  17122. "type": "object",
  17123. "properties": {
  17124. "timestamp": {
  17125. "type": "number"
  17126. },
  17127. "sessionID": {
  17128. "type": "string",
  17129. "pattern": "^ses"
  17130. },
  17131. "agent": {
  17132. "type": "string"
  17133. },
  17134. "model": {
  17135. "type": "object",
  17136. "properties": {
  17137. "id": {
  17138. "type": "string"
  17139. },
  17140. "providerID": {
  17141. "type": "string"
  17142. },
  17143. "variant": {
  17144. "type": "string"
  17145. }
  17146. },
  17147. "required": ["id", "providerID", "variant"],
  17148. "additionalProperties": false
  17149. },
  17150. "snapshot": {
  17151. "type": "string"
  17152. }
  17153. },
  17154. "required": ["timestamp", "sessionID", "agent", "model"],
  17155. "additionalProperties": false
  17156. }
  17157. },
  17158. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17159. "additionalProperties": false
  17160. },
  17161. "SyncEventSessionNextStepEnded": {
  17162. "type": "object",
  17163. "properties": {
  17164. "type": {
  17165. "type": "string",
  17166. "enum": ["sync"]
  17167. },
  17168. "name": {
  17169. "type": "string",
  17170. "enum": ["session.next.step.ended.1"]
  17171. },
  17172. "id": {
  17173. "type": "string"
  17174. },
  17175. "seq": {
  17176. "type": "number"
  17177. },
  17178. "aggregateID": {
  17179. "type": "string",
  17180. "enum": ["sessionID"]
  17181. },
  17182. "data": {
  17183. "type": "object",
  17184. "properties": {
  17185. "timestamp": {
  17186. "type": "number"
  17187. },
  17188. "sessionID": {
  17189. "type": "string",
  17190. "pattern": "^ses"
  17191. },
  17192. "finish": {
  17193. "type": "string"
  17194. },
  17195. "cost": {
  17196. "type": "number"
  17197. },
  17198. "tokens": {
  17199. "type": "object",
  17200. "properties": {
  17201. "input": {
  17202. "type": "number"
  17203. },
  17204. "output": {
  17205. "type": "number"
  17206. },
  17207. "reasoning": {
  17208. "type": "number"
  17209. },
  17210. "cache": {
  17211. "type": "object",
  17212. "properties": {
  17213. "read": {
  17214. "type": "number"
  17215. },
  17216. "write": {
  17217. "type": "number"
  17218. }
  17219. },
  17220. "required": ["read", "write"],
  17221. "additionalProperties": false
  17222. }
  17223. },
  17224. "required": ["input", "output", "reasoning", "cache"],
  17225. "additionalProperties": false
  17226. },
  17227. "snapshot": {
  17228. "type": "string"
  17229. }
  17230. },
  17231. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  17232. "additionalProperties": false
  17233. }
  17234. },
  17235. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17236. "additionalProperties": false
  17237. },
  17238. "SyncEventSessionNextStepFailed": {
  17239. "type": "object",
  17240. "properties": {
  17241. "type": {
  17242. "type": "string",
  17243. "enum": ["sync"]
  17244. },
  17245. "name": {
  17246. "type": "string",
  17247. "enum": ["session.next.step.failed.1"]
  17248. },
  17249. "id": {
  17250. "type": "string"
  17251. },
  17252. "seq": {
  17253. "type": "number"
  17254. },
  17255. "aggregateID": {
  17256. "type": "string",
  17257. "enum": ["sessionID"]
  17258. },
  17259. "data": {
  17260. "type": "object",
  17261. "properties": {
  17262. "timestamp": {
  17263. "type": "number"
  17264. },
  17265. "sessionID": {
  17266. "type": "string",
  17267. "pattern": "^ses"
  17268. },
  17269. "error": {
  17270. "$ref": "#/components/schemas/SessionErrorUnknown"
  17271. }
  17272. },
  17273. "required": ["timestamp", "sessionID", "error"],
  17274. "additionalProperties": false
  17275. }
  17276. },
  17277. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17278. "additionalProperties": false
  17279. },
  17280. "SyncEventSessionNextTextStarted": {
  17281. "type": "object",
  17282. "properties": {
  17283. "type": {
  17284. "type": "string",
  17285. "enum": ["sync"]
  17286. },
  17287. "name": {
  17288. "type": "string",
  17289. "enum": ["session.next.text.started.1"]
  17290. },
  17291. "id": {
  17292. "type": "string"
  17293. },
  17294. "seq": {
  17295. "type": "number"
  17296. },
  17297. "aggregateID": {
  17298. "type": "string",
  17299. "enum": ["sessionID"]
  17300. },
  17301. "data": {
  17302. "type": "object",
  17303. "properties": {
  17304. "timestamp": {
  17305. "type": "number"
  17306. },
  17307. "sessionID": {
  17308. "type": "string",
  17309. "pattern": "^ses"
  17310. }
  17311. },
  17312. "required": ["timestamp", "sessionID"],
  17313. "additionalProperties": false
  17314. }
  17315. },
  17316. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17317. "additionalProperties": false
  17318. },
  17319. "SyncEventSessionNextTextDelta": {
  17320. "type": "object",
  17321. "properties": {
  17322. "type": {
  17323. "type": "string",
  17324. "enum": ["sync"]
  17325. },
  17326. "name": {
  17327. "type": "string",
  17328. "enum": ["session.next.text.delta.1"]
  17329. },
  17330. "id": {
  17331. "type": "string"
  17332. },
  17333. "seq": {
  17334. "type": "number"
  17335. },
  17336. "aggregateID": {
  17337. "type": "string",
  17338. "enum": ["sessionID"]
  17339. },
  17340. "data": {
  17341. "type": "object",
  17342. "properties": {
  17343. "timestamp": {
  17344. "type": "number"
  17345. },
  17346. "sessionID": {
  17347. "type": "string",
  17348. "pattern": "^ses"
  17349. },
  17350. "delta": {
  17351. "type": "string"
  17352. }
  17353. },
  17354. "required": ["timestamp", "sessionID", "delta"],
  17355. "additionalProperties": false
  17356. }
  17357. },
  17358. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17359. "additionalProperties": false
  17360. },
  17361. "SyncEventSessionNextTextEnded": {
  17362. "type": "object",
  17363. "properties": {
  17364. "type": {
  17365. "type": "string",
  17366. "enum": ["sync"]
  17367. },
  17368. "name": {
  17369. "type": "string",
  17370. "enum": ["session.next.text.ended.1"]
  17371. },
  17372. "id": {
  17373. "type": "string"
  17374. },
  17375. "seq": {
  17376. "type": "number"
  17377. },
  17378. "aggregateID": {
  17379. "type": "string",
  17380. "enum": ["sessionID"]
  17381. },
  17382. "data": {
  17383. "type": "object",
  17384. "properties": {
  17385. "timestamp": {
  17386. "type": "number"
  17387. },
  17388. "sessionID": {
  17389. "type": "string",
  17390. "pattern": "^ses"
  17391. },
  17392. "text": {
  17393. "type": "string"
  17394. }
  17395. },
  17396. "required": ["timestamp", "sessionID", "text"],
  17397. "additionalProperties": false
  17398. }
  17399. },
  17400. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17401. "additionalProperties": false
  17402. },
  17403. "SyncEventSessionNextReasoningStarted": {
  17404. "type": "object",
  17405. "properties": {
  17406. "type": {
  17407. "type": "string",
  17408. "enum": ["sync"]
  17409. },
  17410. "name": {
  17411. "type": "string",
  17412. "enum": ["session.next.reasoning.started.1"]
  17413. },
  17414. "id": {
  17415. "type": "string"
  17416. },
  17417. "seq": {
  17418. "type": "number"
  17419. },
  17420. "aggregateID": {
  17421. "type": "string",
  17422. "enum": ["sessionID"]
  17423. },
  17424. "data": {
  17425. "type": "object",
  17426. "properties": {
  17427. "timestamp": {
  17428. "type": "number"
  17429. },
  17430. "sessionID": {
  17431. "type": "string",
  17432. "pattern": "^ses"
  17433. },
  17434. "reasoningID": {
  17435. "type": "string"
  17436. }
  17437. },
  17438. "required": ["timestamp", "sessionID", "reasoningID"],
  17439. "additionalProperties": false
  17440. }
  17441. },
  17442. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17443. "additionalProperties": false
  17444. },
  17445. "SyncEventSessionNextReasoningDelta": {
  17446. "type": "object",
  17447. "properties": {
  17448. "type": {
  17449. "type": "string",
  17450. "enum": ["sync"]
  17451. },
  17452. "name": {
  17453. "type": "string",
  17454. "enum": ["session.next.reasoning.delta.1"]
  17455. },
  17456. "id": {
  17457. "type": "string"
  17458. },
  17459. "seq": {
  17460. "type": "number"
  17461. },
  17462. "aggregateID": {
  17463. "type": "string",
  17464. "enum": ["sessionID"]
  17465. },
  17466. "data": {
  17467. "type": "object",
  17468. "properties": {
  17469. "timestamp": {
  17470. "type": "number"
  17471. },
  17472. "sessionID": {
  17473. "type": "string",
  17474. "pattern": "^ses"
  17475. },
  17476. "reasoningID": {
  17477. "type": "string"
  17478. },
  17479. "delta": {
  17480. "type": "string"
  17481. }
  17482. },
  17483. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  17484. "additionalProperties": false
  17485. }
  17486. },
  17487. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17488. "additionalProperties": false
  17489. },
  17490. "SyncEventSessionNextReasoningEnded": {
  17491. "type": "object",
  17492. "properties": {
  17493. "type": {
  17494. "type": "string",
  17495. "enum": ["sync"]
  17496. },
  17497. "name": {
  17498. "type": "string",
  17499. "enum": ["session.next.reasoning.ended.1"]
  17500. },
  17501. "id": {
  17502. "type": "string"
  17503. },
  17504. "seq": {
  17505. "type": "number"
  17506. },
  17507. "aggregateID": {
  17508. "type": "string",
  17509. "enum": ["sessionID"]
  17510. },
  17511. "data": {
  17512. "type": "object",
  17513. "properties": {
  17514. "timestamp": {
  17515. "type": "number"
  17516. },
  17517. "sessionID": {
  17518. "type": "string",
  17519. "pattern": "^ses"
  17520. },
  17521. "reasoningID": {
  17522. "type": "string"
  17523. },
  17524. "text": {
  17525. "type": "string"
  17526. }
  17527. },
  17528. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  17529. "additionalProperties": false
  17530. }
  17531. },
  17532. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17533. "additionalProperties": false
  17534. },
  17535. "SyncEventSessionNextToolInputStarted": {
  17536. "type": "object",
  17537. "properties": {
  17538. "type": {
  17539. "type": "string",
  17540. "enum": ["sync"]
  17541. },
  17542. "name": {
  17543. "type": "string",
  17544. "enum": ["session.next.tool.input.started.1"]
  17545. },
  17546. "id": {
  17547. "type": "string"
  17548. },
  17549. "seq": {
  17550. "type": "number"
  17551. },
  17552. "aggregateID": {
  17553. "type": "string",
  17554. "enum": ["sessionID"]
  17555. },
  17556. "data": {
  17557. "type": "object",
  17558. "properties": {
  17559. "timestamp": {
  17560. "type": "number"
  17561. },
  17562. "sessionID": {
  17563. "type": "string",
  17564. "pattern": "^ses"
  17565. },
  17566. "callID": {
  17567. "type": "string"
  17568. },
  17569. "name": {
  17570. "type": "string"
  17571. }
  17572. },
  17573. "required": ["timestamp", "sessionID", "callID", "name"],
  17574. "additionalProperties": false
  17575. }
  17576. },
  17577. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17578. "additionalProperties": false
  17579. },
  17580. "SyncEventSessionNextToolInputDelta": {
  17581. "type": "object",
  17582. "properties": {
  17583. "type": {
  17584. "type": "string",
  17585. "enum": ["sync"]
  17586. },
  17587. "name": {
  17588. "type": "string",
  17589. "enum": ["session.next.tool.input.delta.1"]
  17590. },
  17591. "id": {
  17592. "type": "string"
  17593. },
  17594. "seq": {
  17595. "type": "number"
  17596. },
  17597. "aggregateID": {
  17598. "type": "string",
  17599. "enum": ["sessionID"]
  17600. },
  17601. "data": {
  17602. "type": "object",
  17603. "properties": {
  17604. "timestamp": {
  17605. "type": "number"
  17606. },
  17607. "sessionID": {
  17608. "type": "string",
  17609. "pattern": "^ses"
  17610. },
  17611. "callID": {
  17612. "type": "string"
  17613. },
  17614. "delta": {
  17615. "type": "string"
  17616. }
  17617. },
  17618. "required": ["timestamp", "sessionID", "callID", "delta"],
  17619. "additionalProperties": false
  17620. }
  17621. },
  17622. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17623. "additionalProperties": false
  17624. },
  17625. "SyncEventSessionNextToolInputEnded": {
  17626. "type": "object",
  17627. "properties": {
  17628. "type": {
  17629. "type": "string",
  17630. "enum": ["sync"]
  17631. },
  17632. "name": {
  17633. "type": "string",
  17634. "enum": ["session.next.tool.input.ended.1"]
  17635. },
  17636. "id": {
  17637. "type": "string"
  17638. },
  17639. "seq": {
  17640. "type": "number"
  17641. },
  17642. "aggregateID": {
  17643. "type": "string",
  17644. "enum": ["sessionID"]
  17645. },
  17646. "data": {
  17647. "type": "object",
  17648. "properties": {
  17649. "timestamp": {
  17650. "type": "number"
  17651. },
  17652. "sessionID": {
  17653. "type": "string",
  17654. "pattern": "^ses"
  17655. },
  17656. "callID": {
  17657. "type": "string"
  17658. },
  17659. "text": {
  17660. "type": "string"
  17661. }
  17662. },
  17663. "required": ["timestamp", "sessionID", "callID", "text"],
  17664. "additionalProperties": false
  17665. }
  17666. },
  17667. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17668. "additionalProperties": false
  17669. },
  17670. "SyncEventSessionNextToolCalled": {
  17671. "type": "object",
  17672. "properties": {
  17673. "type": {
  17674. "type": "string",
  17675. "enum": ["sync"]
  17676. },
  17677. "name": {
  17678. "type": "string",
  17679. "enum": ["session.next.tool.called.1"]
  17680. },
  17681. "id": {
  17682. "type": "string"
  17683. },
  17684. "seq": {
  17685. "type": "number"
  17686. },
  17687. "aggregateID": {
  17688. "type": "string",
  17689. "enum": ["sessionID"]
  17690. },
  17691. "data": {
  17692. "type": "object",
  17693. "properties": {
  17694. "timestamp": {
  17695. "type": "number"
  17696. },
  17697. "sessionID": {
  17698. "type": "string",
  17699. "pattern": "^ses"
  17700. },
  17701. "callID": {
  17702. "type": "string"
  17703. },
  17704. "tool": {
  17705. "type": "string"
  17706. },
  17707. "input": {
  17708. "type": "object"
  17709. },
  17710. "provider": {
  17711. "type": "object",
  17712. "properties": {
  17713. "executed": {
  17714. "type": "boolean"
  17715. },
  17716. "metadata": {
  17717. "type": "object"
  17718. }
  17719. },
  17720. "required": ["executed"],
  17721. "additionalProperties": false
  17722. }
  17723. },
  17724. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  17725. "additionalProperties": false
  17726. }
  17727. },
  17728. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17729. "additionalProperties": false
  17730. },
  17731. "SyncEventSessionNextToolProgress": {
  17732. "type": "object",
  17733. "properties": {
  17734. "type": {
  17735. "type": "string",
  17736. "enum": ["sync"]
  17737. },
  17738. "name": {
  17739. "type": "string",
  17740. "enum": ["session.next.tool.progress.1"]
  17741. },
  17742. "id": {
  17743. "type": "string"
  17744. },
  17745. "seq": {
  17746. "type": "number"
  17747. },
  17748. "aggregateID": {
  17749. "type": "string",
  17750. "enum": ["sessionID"]
  17751. },
  17752. "data": {
  17753. "type": "object",
  17754. "properties": {
  17755. "timestamp": {
  17756. "type": "number"
  17757. },
  17758. "sessionID": {
  17759. "type": "string",
  17760. "pattern": "^ses"
  17761. },
  17762. "callID": {
  17763. "type": "string"
  17764. },
  17765. "structured": {
  17766. "type": "object"
  17767. },
  17768. "content": {
  17769. "type": "array",
  17770. "items": {
  17771. "anyOf": [
  17772. {
  17773. "$ref": "#/components/schemas/ToolTextContent"
  17774. },
  17775. {
  17776. "$ref": "#/components/schemas/ToolFileContent"
  17777. }
  17778. ]
  17779. }
  17780. }
  17781. },
  17782. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  17783. "additionalProperties": false
  17784. }
  17785. },
  17786. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17787. "additionalProperties": false
  17788. },
  17789. "SyncEventSessionNextToolSuccess": {
  17790. "type": "object",
  17791. "properties": {
  17792. "type": {
  17793. "type": "string",
  17794. "enum": ["sync"]
  17795. },
  17796. "name": {
  17797. "type": "string",
  17798. "enum": ["session.next.tool.success.1"]
  17799. },
  17800. "id": {
  17801. "type": "string"
  17802. },
  17803. "seq": {
  17804. "type": "number"
  17805. },
  17806. "aggregateID": {
  17807. "type": "string",
  17808. "enum": ["sessionID"]
  17809. },
  17810. "data": {
  17811. "type": "object",
  17812. "properties": {
  17813. "timestamp": {
  17814. "type": "number"
  17815. },
  17816. "sessionID": {
  17817. "type": "string",
  17818. "pattern": "^ses"
  17819. },
  17820. "callID": {
  17821. "type": "string"
  17822. },
  17823. "structured": {
  17824. "type": "object"
  17825. },
  17826. "content": {
  17827. "type": "array",
  17828. "items": {
  17829. "anyOf": [
  17830. {
  17831. "$ref": "#/components/schemas/ToolTextContent"
  17832. },
  17833. {
  17834. "$ref": "#/components/schemas/ToolFileContent"
  17835. }
  17836. ]
  17837. }
  17838. },
  17839. "provider": {
  17840. "type": "object",
  17841. "properties": {
  17842. "executed": {
  17843. "type": "boolean"
  17844. },
  17845. "metadata": {
  17846. "type": "object"
  17847. }
  17848. },
  17849. "required": ["executed"],
  17850. "additionalProperties": false
  17851. }
  17852. },
  17853. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  17854. "additionalProperties": false
  17855. }
  17856. },
  17857. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17858. "additionalProperties": false
  17859. },
  17860. "SyncEventSessionNextToolFailed": {
  17861. "type": "object",
  17862. "properties": {
  17863. "type": {
  17864. "type": "string",
  17865. "enum": ["sync"]
  17866. },
  17867. "name": {
  17868. "type": "string",
  17869. "enum": ["session.next.tool.failed.1"]
  17870. },
  17871. "id": {
  17872. "type": "string"
  17873. },
  17874. "seq": {
  17875. "type": "number"
  17876. },
  17877. "aggregateID": {
  17878. "type": "string",
  17879. "enum": ["sessionID"]
  17880. },
  17881. "data": {
  17882. "type": "object",
  17883. "properties": {
  17884. "timestamp": {
  17885. "type": "number"
  17886. },
  17887. "sessionID": {
  17888. "type": "string",
  17889. "pattern": "^ses"
  17890. },
  17891. "callID": {
  17892. "type": "string"
  17893. },
  17894. "error": {
  17895. "$ref": "#/components/schemas/SessionErrorUnknown"
  17896. },
  17897. "provider": {
  17898. "type": "object",
  17899. "properties": {
  17900. "executed": {
  17901. "type": "boolean"
  17902. },
  17903. "metadata": {
  17904. "type": "object"
  17905. }
  17906. },
  17907. "required": ["executed"],
  17908. "additionalProperties": false
  17909. }
  17910. },
  17911. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  17912. "additionalProperties": false
  17913. }
  17914. },
  17915. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17916. "additionalProperties": false
  17917. },
  17918. "SyncEventSessionNextRetried": {
  17919. "type": "object",
  17920. "properties": {
  17921. "type": {
  17922. "type": "string",
  17923. "enum": ["sync"]
  17924. },
  17925. "name": {
  17926. "type": "string",
  17927. "enum": ["session.next.retried.1"]
  17928. },
  17929. "id": {
  17930. "type": "string"
  17931. },
  17932. "seq": {
  17933. "type": "number"
  17934. },
  17935. "aggregateID": {
  17936. "type": "string",
  17937. "enum": ["sessionID"]
  17938. },
  17939. "data": {
  17940. "type": "object",
  17941. "properties": {
  17942. "timestamp": {
  17943. "type": "number"
  17944. },
  17945. "sessionID": {
  17946. "type": "string",
  17947. "pattern": "^ses"
  17948. },
  17949. "attempt": {
  17950. "type": "number"
  17951. },
  17952. "error": {
  17953. "$ref": "#/components/schemas/SessionNextRetry_error"
  17954. }
  17955. },
  17956. "required": ["timestamp", "sessionID", "attempt", "error"],
  17957. "additionalProperties": false
  17958. }
  17959. },
  17960. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17961. "additionalProperties": false
  17962. },
  17963. "SyncEventSessionNextCompactionStarted": {
  17964. "type": "object",
  17965. "properties": {
  17966. "type": {
  17967. "type": "string",
  17968. "enum": ["sync"]
  17969. },
  17970. "name": {
  17971. "type": "string",
  17972. "enum": ["session.next.compaction.started.1"]
  17973. },
  17974. "id": {
  17975. "type": "string"
  17976. },
  17977. "seq": {
  17978. "type": "number"
  17979. },
  17980. "aggregateID": {
  17981. "type": "string",
  17982. "enum": ["sessionID"]
  17983. },
  17984. "data": {
  17985. "type": "object",
  17986. "properties": {
  17987. "timestamp": {
  17988. "type": "number"
  17989. },
  17990. "sessionID": {
  17991. "type": "string",
  17992. "pattern": "^ses"
  17993. },
  17994. "reason": {
  17995. "type": "string",
  17996. "enum": ["auto", "manual"]
  17997. }
  17998. },
  17999. "required": ["timestamp", "sessionID", "reason"],
  18000. "additionalProperties": false
  18001. }
  18002. },
  18003. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  18004. "additionalProperties": false
  18005. },
  18006. "SyncEventSessionNextCompactionDelta": {
  18007. "type": "object",
  18008. "properties": {
  18009. "type": {
  18010. "type": "string",
  18011. "enum": ["sync"]
  18012. },
  18013. "name": {
  18014. "type": "string",
  18015. "enum": ["session.next.compaction.delta.1"]
  18016. },
  18017. "id": {
  18018. "type": "string"
  18019. },
  18020. "seq": {
  18021. "type": "number"
  18022. },
  18023. "aggregateID": {
  18024. "type": "string",
  18025. "enum": ["sessionID"]
  18026. },
  18027. "data": {
  18028. "type": "object",
  18029. "properties": {
  18030. "timestamp": {
  18031. "type": "number"
  18032. },
  18033. "sessionID": {
  18034. "type": "string",
  18035. "pattern": "^ses"
  18036. },
  18037. "text": {
  18038. "type": "string"
  18039. }
  18040. },
  18041. "required": ["timestamp", "sessionID", "text"],
  18042. "additionalProperties": false
  18043. }
  18044. },
  18045. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  18046. "additionalProperties": false
  18047. },
  18048. "SyncEventSessionNextCompactionEnded": {
  18049. "type": "object",
  18050. "properties": {
  18051. "type": {
  18052. "type": "string",
  18053. "enum": ["sync"]
  18054. },
  18055. "name": {
  18056. "type": "string",
  18057. "enum": ["session.next.compaction.ended.1"]
  18058. },
  18059. "id": {
  18060. "type": "string"
  18061. },
  18062. "seq": {
  18063. "type": "number"
  18064. },
  18065. "aggregateID": {
  18066. "type": "string",
  18067. "enum": ["sessionID"]
  18068. },
  18069. "data": {
  18070. "type": "object",
  18071. "properties": {
  18072. "timestamp": {
  18073. "type": "number"
  18074. },
  18075. "sessionID": {
  18076. "type": "string",
  18077. "pattern": "^ses"
  18078. },
  18079. "text": {
  18080. "type": "string"
  18081. },
  18082. "include": {
  18083. "type": "string"
  18084. }
  18085. },
  18086. "required": ["timestamp", "sessionID", "text"],
  18087. "additionalProperties": false
  18088. }
  18089. },
  18090. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  18091. "additionalProperties": false
  18092. },
  18093. "EventServerConnected": {
  18094. "type": "object",
  18095. "properties": {
  18096. "id": {
  18097. "type": "string"
  18098. },
  18099. "type": {
  18100. "type": "string",
  18101. "enum": ["server.connected"]
  18102. },
  18103. "properties": {
  18104. "type": "object",
  18105. "properties": {}
  18106. }
  18107. },
  18108. "required": ["id", "type", "properties"],
  18109. "additionalProperties": false
  18110. },
  18111. "EventGlobalDisposed": {
  18112. "type": "object",
  18113. "properties": {
  18114. "id": {
  18115. "type": "string"
  18116. },
  18117. "type": {
  18118. "type": "string",
  18119. "enum": ["global.disposed"]
  18120. },
  18121. "properties": {
  18122. "type": "object",
  18123. "properties": {}
  18124. }
  18125. },
  18126. "required": ["id", "type", "properties"],
  18127. "additionalProperties": false
  18128. },
  18129. "EventServerInstanceDisposed": {
  18130. "type": "object",
  18131. "properties": {
  18132. "id": {
  18133. "type": "string"
  18134. },
  18135. "type": {
  18136. "type": "string",
  18137. "enum": ["server.instance.disposed"]
  18138. },
  18139. "properties": {
  18140. "type": "object",
  18141. "properties": {
  18142. "directory": {
  18143. "type": "string"
  18144. }
  18145. },
  18146. "required": ["directory"],
  18147. "additionalProperties": false
  18148. }
  18149. },
  18150. "required": ["id", "type", "properties"],
  18151. "additionalProperties": false
  18152. },
  18153. "EventFileEdited": {
  18154. "type": "object",
  18155. "properties": {
  18156. "id": {
  18157. "type": "string"
  18158. },
  18159. "type": {
  18160. "type": "string",
  18161. "enum": ["file.edited"]
  18162. },
  18163. "properties": {
  18164. "type": "object",
  18165. "properties": {
  18166. "file": {
  18167. "type": "string"
  18168. }
  18169. },
  18170. "required": ["file"],
  18171. "additionalProperties": false
  18172. }
  18173. },
  18174. "required": ["id", "type", "properties"],
  18175. "additionalProperties": false
  18176. },
  18177. "EventFileWatcherUpdated": {
  18178. "type": "object",
  18179. "properties": {
  18180. "id": {
  18181. "type": "string"
  18182. },
  18183. "type": {
  18184. "type": "string",
  18185. "enum": ["file.watcher.updated"]
  18186. },
  18187. "properties": {
  18188. "type": "object",
  18189. "properties": {
  18190. "file": {
  18191. "type": "string"
  18192. },
  18193. "event": {
  18194. "type": "string",
  18195. "enum": ["add", "change", "unlink"]
  18196. }
  18197. },
  18198. "required": ["file", "event"],
  18199. "additionalProperties": false
  18200. }
  18201. },
  18202. "required": ["id", "type", "properties"],
  18203. "additionalProperties": false
  18204. },
  18205. "EventLspClientDiagnostics": {
  18206. "type": "object",
  18207. "properties": {
  18208. "id": {
  18209. "type": "string"
  18210. },
  18211. "type": {
  18212. "type": "string",
  18213. "enum": ["lsp.client.diagnostics"]
  18214. },
  18215. "properties": {
  18216. "type": "object",
  18217. "properties": {
  18218. "serverID": {
  18219. "type": "string"
  18220. },
  18221. "path": {
  18222. "type": "string"
  18223. }
  18224. },
  18225. "required": ["serverID", "path"],
  18226. "additionalProperties": false
  18227. }
  18228. },
  18229. "required": ["id", "type", "properties"],
  18230. "additionalProperties": false
  18231. },
  18232. "EventLspUpdated": {
  18233. "type": "object",
  18234. "properties": {
  18235. "id": {
  18236. "type": "string"
  18237. },
  18238. "type": {
  18239. "type": "string",
  18240. "enum": ["lsp.updated"]
  18241. },
  18242. "properties": {
  18243. "type": "object",
  18244. "properties": {}
  18245. }
  18246. },
  18247. "required": ["id", "type", "properties"],
  18248. "additionalProperties": false
  18249. },
  18250. "EventMessagePartDelta": {
  18251. "type": "object",
  18252. "properties": {
  18253. "id": {
  18254. "type": "string"
  18255. },
  18256. "type": {
  18257. "type": "string",
  18258. "enum": ["message.part.delta"]
  18259. },
  18260. "properties": {
  18261. "type": "object",
  18262. "properties": {
  18263. "sessionID": {
  18264. "type": "string",
  18265. "pattern": "^ses"
  18266. },
  18267. "messageID": {
  18268. "type": "string",
  18269. "pattern": "^msg"
  18270. },
  18271. "partID": {
  18272. "type": "string",
  18273. "pattern": "^prt"
  18274. },
  18275. "field": {
  18276. "type": "string"
  18277. },
  18278. "delta": {
  18279. "type": "string"
  18280. }
  18281. },
  18282. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  18283. "additionalProperties": false
  18284. }
  18285. },
  18286. "required": ["id", "type", "properties"],
  18287. "additionalProperties": false
  18288. },
  18289. "EventPermissionAsked": {
  18290. "type": "object",
  18291. "properties": {
  18292. "id": {
  18293. "type": "string"
  18294. },
  18295. "type": {
  18296. "type": "string",
  18297. "enum": ["permission.asked"]
  18298. },
  18299. "properties": {
  18300. "$ref": "#/components/schemas/PermissionRequest"
  18301. }
  18302. },
  18303. "required": ["id", "type", "properties"],
  18304. "additionalProperties": false
  18305. },
  18306. "EventPermissionReplied": {
  18307. "type": "object",
  18308. "properties": {
  18309. "id": {
  18310. "type": "string"
  18311. },
  18312. "type": {
  18313. "type": "string",
  18314. "enum": ["permission.replied"]
  18315. },
  18316. "properties": {
  18317. "type": "object",
  18318. "properties": {
  18319. "sessionID": {
  18320. "type": "string",
  18321. "pattern": "^ses"
  18322. },
  18323. "requestID": {
  18324. "type": "string",
  18325. "pattern": "^per"
  18326. },
  18327. "reply": {
  18328. "type": "string",
  18329. "enum": ["once", "always", "reject"]
  18330. }
  18331. },
  18332. "required": ["sessionID", "requestID", "reply"],
  18333. "additionalProperties": false
  18334. }
  18335. },
  18336. "required": ["id", "type", "properties"],
  18337. "additionalProperties": false
  18338. },
  18339. "EventSessionDiff": {
  18340. "type": "object",
  18341. "properties": {
  18342. "id": {
  18343. "type": "string"
  18344. },
  18345. "type": {
  18346. "type": "string",
  18347. "enum": ["session.diff"]
  18348. },
  18349. "properties": {
  18350. "type": "object",
  18351. "properties": {
  18352. "sessionID": {
  18353. "type": "string",
  18354. "pattern": "^ses"
  18355. },
  18356. "diff": {
  18357. "type": "array",
  18358. "items": {
  18359. "$ref": "#/components/schemas/SnapshotFileDiff"
  18360. }
  18361. }
  18362. },
  18363. "required": ["sessionID", "diff"],
  18364. "additionalProperties": false
  18365. }
  18366. },
  18367. "required": ["id", "type", "properties"],
  18368. "additionalProperties": false
  18369. },
  18370. "EventSessionError": {
  18371. "type": "object",
  18372. "properties": {
  18373. "id": {
  18374. "type": "string"
  18375. },
  18376. "type": {
  18377. "type": "string",
  18378. "enum": ["session.error"]
  18379. },
  18380. "properties": {
  18381. "type": "object",
  18382. "properties": {
  18383. "sessionID": {
  18384. "type": "string",
  18385. "pattern": "^ses"
  18386. },
  18387. "error": {
  18388. "anyOf": [
  18389. {
  18390. "$ref": "#/components/schemas/ProviderAuthError"
  18391. },
  18392. {
  18393. "$ref": "#/components/schemas/UnknownError"
  18394. },
  18395. {
  18396. "$ref": "#/components/schemas/MessageOutputLengthError"
  18397. },
  18398. {
  18399. "$ref": "#/components/schemas/MessageAbortedError"
  18400. },
  18401. {
  18402. "$ref": "#/components/schemas/StructuredOutputError"
  18403. },
  18404. {
  18405. "$ref": "#/components/schemas/ContextOverflowError"
  18406. },
  18407. {
  18408. "$ref": "#/components/schemas/APIError"
  18409. }
  18410. ]
  18411. }
  18412. },
  18413. "additionalProperties": false
  18414. }
  18415. },
  18416. "required": ["id", "type", "properties"],
  18417. "additionalProperties": false
  18418. },
  18419. "EventQuestionAsked": {
  18420. "type": "object",
  18421. "properties": {
  18422. "id": {
  18423. "type": "string"
  18424. },
  18425. "type": {
  18426. "type": "string",
  18427. "enum": ["question.asked"]
  18428. },
  18429. "properties": {
  18430. "$ref": "#/components/schemas/QuestionRequest"
  18431. }
  18432. },
  18433. "required": ["id", "type", "properties"],
  18434. "additionalProperties": false
  18435. },
  18436. "EventQuestionReplied": {
  18437. "type": "object",
  18438. "properties": {
  18439. "id": {
  18440. "type": "string"
  18441. },
  18442. "type": {
  18443. "type": "string",
  18444. "enum": ["question.replied"]
  18445. },
  18446. "properties": {
  18447. "$ref": "#/components/schemas/QuestionReplied"
  18448. }
  18449. },
  18450. "required": ["id", "type", "properties"],
  18451. "additionalProperties": false
  18452. },
  18453. "EventQuestionRejected": {
  18454. "type": "object",
  18455. "properties": {
  18456. "id": {
  18457. "type": "string"
  18458. },
  18459. "type": {
  18460. "type": "string",
  18461. "enum": ["question.rejected"]
  18462. },
  18463. "properties": {
  18464. "$ref": "#/components/schemas/QuestionRejected"
  18465. }
  18466. },
  18467. "required": ["id", "type", "properties"],
  18468. "additionalProperties": false
  18469. },
  18470. "EventTodoUpdated": {
  18471. "type": "object",
  18472. "properties": {
  18473. "id": {
  18474. "type": "string"
  18475. },
  18476. "type": {
  18477. "type": "string",
  18478. "enum": ["todo.updated"]
  18479. },
  18480. "properties": {
  18481. "type": "object",
  18482. "properties": {
  18483. "sessionID": {
  18484. "type": "string",
  18485. "pattern": "^ses"
  18486. },
  18487. "todos": {
  18488. "type": "array",
  18489. "items": {
  18490. "$ref": "#/components/schemas/Todo"
  18491. }
  18492. }
  18493. },
  18494. "required": ["sessionID", "todos"],
  18495. "additionalProperties": false
  18496. }
  18497. },
  18498. "required": ["id", "type", "properties"],
  18499. "additionalProperties": false
  18500. },
  18501. "EventSessionStatus": {
  18502. "type": "object",
  18503. "properties": {
  18504. "id": {
  18505. "type": "string"
  18506. },
  18507. "type": {
  18508. "type": "string",
  18509. "enum": ["session.status"]
  18510. },
  18511. "properties": {
  18512. "type": "object",
  18513. "properties": {
  18514. "sessionID": {
  18515. "type": "string",
  18516. "pattern": "^ses"
  18517. },
  18518. "status": {
  18519. "$ref": "#/components/schemas/SessionStatus"
  18520. }
  18521. },
  18522. "required": ["sessionID", "status"],
  18523. "additionalProperties": false
  18524. }
  18525. },
  18526. "required": ["id", "type", "properties"],
  18527. "additionalProperties": false
  18528. },
  18529. "EventSessionIdle": {
  18530. "type": "object",
  18531. "properties": {
  18532. "id": {
  18533. "type": "string"
  18534. },
  18535. "type": {
  18536. "type": "string",
  18537. "enum": ["session.idle"]
  18538. },
  18539. "properties": {
  18540. "type": "object",
  18541. "properties": {
  18542. "sessionID": {
  18543. "type": "string",
  18544. "pattern": "^ses"
  18545. }
  18546. },
  18547. "required": ["sessionID"],
  18548. "additionalProperties": false
  18549. }
  18550. },
  18551. "required": ["id", "type", "properties"],
  18552. "additionalProperties": false
  18553. },
  18554. "EventMcpToolsChanged": {
  18555. "type": "object",
  18556. "properties": {
  18557. "id": {
  18558. "type": "string"
  18559. },
  18560. "type": {
  18561. "type": "string",
  18562. "enum": ["mcp.tools.changed"]
  18563. },
  18564. "properties": {
  18565. "type": "object",
  18566. "properties": {
  18567. "server": {
  18568. "type": "string"
  18569. }
  18570. },
  18571. "required": ["server"],
  18572. "additionalProperties": false
  18573. }
  18574. },
  18575. "required": ["id", "type", "properties"],
  18576. "additionalProperties": false
  18577. },
  18578. "EventMcpBrowserOpenFailed": {
  18579. "type": "object",
  18580. "properties": {
  18581. "id": {
  18582. "type": "string"
  18583. },
  18584. "type": {
  18585. "type": "string",
  18586. "enum": ["mcp.browser.open.failed"]
  18587. },
  18588. "properties": {
  18589. "type": "object",
  18590. "properties": {
  18591. "mcpName": {
  18592. "type": "string"
  18593. },
  18594. "url": {
  18595. "type": "string"
  18596. }
  18597. },
  18598. "required": ["mcpName", "url"],
  18599. "additionalProperties": false
  18600. }
  18601. },
  18602. "required": ["id", "type", "properties"],
  18603. "additionalProperties": false
  18604. },
  18605. "EventCommandExecuted": {
  18606. "type": "object",
  18607. "properties": {
  18608. "id": {
  18609. "type": "string"
  18610. },
  18611. "type": {
  18612. "type": "string",
  18613. "enum": ["command.executed"]
  18614. },
  18615. "properties": {
  18616. "type": "object",
  18617. "properties": {
  18618. "name": {
  18619. "type": "string"
  18620. },
  18621. "sessionID": {
  18622. "type": "string",
  18623. "pattern": "^ses"
  18624. },
  18625. "arguments": {
  18626. "type": "string"
  18627. },
  18628. "messageID": {
  18629. "type": "string",
  18630. "pattern": "^msg"
  18631. }
  18632. },
  18633. "required": ["name", "sessionID", "arguments", "messageID"],
  18634. "additionalProperties": false
  18635. }
  18636. },
  18637. "required": ["id", "type", "properties"],
  18638. "additionalProperties": false
  18639. },
  18640. "EventProjectUpdated": {
  18641. "type": "object",
  18642. "properties": {
  18643. "id": {
  18644. "type": "string"
  18645. },
  18646. "type": {
  18647. "type": "string",
  18648. "enum": ["project.updated"]
  18649. },
  18650. "properties": {
  18651. "$ref": "#/components/schemas/Project"
  18652. }
  18653. },
  18654. "required": ["id", "type", "properties"],
  18655. "additionalProperties": false
  18656. },
  18657. "EventSessionCompacted": {
  18658. "type": "object",
  18659. "properties": {
  18660. "id": {
  18661. "type": "string"
  18662. },
  18663. "type": {
  18664. "type": "string",
  18665. "enum": ["session.compacted"]
  18666. },
  18667. "properties": {
  18668. "type": "object",
  18669. "properties": {
  18670. "sessionID": {
  18671. "type": "string",
  18672. "pattern": "^ses"
  18673. }
  18674. },
  18675. "required": ["sessionID"],
  18676. "additionalProperties": false
  18677. }
  18678. },
  18679. "required": ["id", "type", "properties"],
  18680. "additionalProperties": false
  18681. },
  18682. "EventVcsBranchUpdated": {
  18683. "type": "object",
  18684. "properties": {
  18685. "id": {
  18686. "type": "string"
  18687. },
  18688. "type": {
  18689. "type": "string",
  18690. "enum": ["vcs.branch.updated"]
  18691. },
  18692. "properties": {
  18693. "type": "object",
  18694. "properties": {
  18695. "branch": {
  18696. "type": "string"
  18697. }
  18698. },
  18699. "additionalProperties": false
  18700. }
  18701. },
  18702. "required": ["id", "type", "properties"],
  18703. "additionalProperties": false
  18704. },
  18705. "EventWorkspaceReady": {
  18706. "type": "object",
  18707. "properties": {
  18708. "id": {
  18709. "type": "string"
  18710. },
  18711. "type": {
  18712. "type": "string",
  18713. "enum": ["workspace.ready"]
  18714. },
  18715. "properties": {
  18716. "type": "object",
  18717. "properties": {
  18718. "name": {
  18719. "type": "string"
  18720. }
  18721. },
  18722. "required": ["name"],
  18723. "additionalProperties": false
  18724. }
  18725. },
  18726. "required": ["id", "type", "properties"],
  18727. "additionalProperties": false
  18728. },
  18729. "EventWorkspaceFailed": {
  18730. "type": "object",
  18731. "properties": {
  18732. "id": {
  18733. "type": "string"
  18734. },
  18735. "type": {
  18736. "type": "string",
  18737. "enum": ["workspace.failed"]
  18738. },
  18739. "properties": {
  18740. "type": "object",
  18741. "properties": {
  18742. "message": {
  18743. "type": "string"
  18744. }
  18745. },
  18746. "required": ["message"],
  18747. "additionalProperties": false
  18748. }
  18749. },
  18750. "required": ["id", "type", "properties"],
  18751. "additionalProperties": false
  18752. },
  18753. "EventWorkspaceStatus": {
  18754. "type": "object",
  18755. "properties": {
  18756. "id": {
  18757. "type": "string"
  18758. },
  18759. "type": {
  18760. "type": "string",
  18761. "enum": ["workspace.status"]
  18762. },
  18763. "properties": {
  18764. "type": "object",
  18765. "properties": {
  18766. "workspaceID": {
  18767. "type": "string",
  18768. "pattern": "^wrk"
  18769. },
  18770. "status": {
  18771. "type": "string",
  18772. "enum": ["connected", "connecting", "disconnected", "error"]
  18773. }
  18774. },
  18775. "required": ["workspaceID", "status"],
  18776. "additionalProperties": false
  18777. }
  18778. },
  18779. "required": ["id", "type", "properties"],
  18780. "additionalProperties": false
  18781. },
  18782. "EventWorktreeReady": {
  18783. "type": "object",
  18784. "properties": {
  18785. "id": {
  18786. "type": "string"
  18787. },
  18788. "type": {
  18789. "type": "string",
  18790. "enum": ["worktree.ready"]
  18791. },
  18792. "properties": {
  18793. "type": "object",
  18794. "properties": {
  18795. "name": {
  18796. "type": "string"
  18797. },
  18798. "branch": {
  18799. "type": "string"
  18800. }
  18801. },
  18802. "required": ["name"],
  18803. "additionalProperties": false
  18804. }
  18805. },
  18806. "required": ["id", "type", "properties"],
  18807. "additionalProperties": false
  18808. },
  18809. "EventWorktreeFailed": {
  18810. "type": "object",
  18811. "properties": {
  18812. "id": {
  18813. "type": "string"
  18814. },
  18815. "type": {
  18816. "type": "string",
  18817. "enum": ["worktree.failed"]
  18818. },
  18819. "properties": {
  18820. "type": "object",
  18821. "properties": {
  18822. "message": {
  18823. "type": "string"
  18824. }
  18825. },
  18826. "required": ["message"],
  18827. "additionalProperties": false
  18828. }
  18829. },
  18830. "required": ["id", "type", "properties"],
  18831. "additionalProperties": false
  18832. },
  18833. "EventPtyCreated": {
  18834. "type": "object",
  18835. "properties": {
  18836. "id": {
  18837. "type": "string"
  18838. },
  18839. "type": {
  18840. "type": "string",
  18841. "enum": ["pty.created"]
  18842. },
  18843. "properties": {
  18844. "type": "object",
  18845. "properties": {
  18846. "info": {
  18847. "$ref": "#/components/schemas/Pty"
  18848. }
  18849. },
  18850. "required": ["info"],
  18851. "additionalProperties": false
  18852. }
  18853. },
  18854. "required": ["id", "type", "properties"],
  18855. "additionalProperties": false
  18856. },
  18857. "EventPtyUpdated": {
  18858. "type": "object",
  18859. "properties": {
  18860. "id": {
  18861. "type": "string"
  18862. },
  18863. "type": {
  18864. "type": "string",
  18865. "enum": ["pty.updated"]
  18866. },
  18867. "properties": {
  18868. "type": "object",
  18869. "properties": {
  18870. "info": {
  18871. "$ref": "#/components/schemas/Pty"
  18872. }
  18873. },
  18874. "required": ["info"],
  18875. "additionalProperties": false
  18876. }
  18877. },
  18878. "required": ["id", "type", "properties"],
  18879. "additionalProperties": false
  18880. },
  18881. "EventPtyExited": {
  18882. "type": "object",
  18883. "properties": {
  18884. "id": {
  18885. "type": "string"
  18886. },
  18887. "type": {
  18888. "type": "string",
  18889. "enum": ["pty.exited"]
  18890. },
  18891. "properties": {
  18892. "type": "object",
  18893. "properties": {
  18894. "id": {
  18895. "type": "string",
  18896. "pattern": "^pty"
  18897. },
  18898. "exitCode": {
  18899. "type": "integer",
  18900. "minimum": 0
  18901. }
  18902. },
  18903. "required": ["id", "exitCode"],
  18904. "additionalProperties": false
  18905. }
  18906. },
  18907. "required": ["id", "type", "properties"],
  18908. "additionalProperties": false
  18909. },
  18910. "EventPtyDeleted": {
  18911. "type": "object",
  18912. "properties": {
  18913. "id": {
  18914. "type": "string"
  18915. },
  18916. "type": {
  18917. "type": "string",
  18918. "enum": ["pty.deleted"]
  18919. },
  18920. "properties": {
  18921. "type": "object",
  18922. "properties": {
  18923. "id": {
  18924. "type": "string",
  18925. "pattern": "^pty"
  18926. }
  18927. },
  18928. "required": ["id"],
  18929. "additionalProperties": false
  18930. }
  18931. },
  18932. "required": ["id", "type", "properties"],
  18933. "additionalProperties": false
  18934. },
  18935. "EventInstallationUpdated": {
  18936. "type": "object",
  18937. "properties": {
  18938. "id": {
  18939. "type": "string"
  18940. },
  18941. "type": {
  18942. "type": "string",
  18943. "enum": ["installation.updated"]
  18944. },
  18945. "properties": {
  18946. "type": "object",
  18947. "properties": {
  18948. "version": {
  18949. "type": "string"
  18950. }
  18951. },
  18952. "required": ["version"],
  18953. "additionalProperties": false
  18954. }
  18955. },
  18956. "required": ["id", "type", "properties"],
  18957. "additionalProperties": false
  18958. },
  18959. "EventInstallationUpdate-available": {
  18960. "type": "object",
  18961. "properties": {
  18962. "id": {
  18963. "type": "string"
  18964. },
  18965. "type": {
  18966. "type": "string",
  18967. "enum": ["installation.update-available"]
  18968. },
  18969. "properties": {
  18970. "type": "object",
  18971. "properties": {
  18972. "version": {
  18973. "type": "string"
  18974. }
  18975. },
  18976. "required": ["version"],
  18977. "additionalProperties": false
  18978. }
  18979. },
  18980. "required": ["id", "type", "properties"],
  18981. "additionalProperties": false
  18982. },
  18983. "EventMessageUpdated": {
  18984. "type": "object",
  18985. "properties": {
  18986. "id": {
  18987. "type": "string"
  18988. },
  18989. "type": {
  18990. "type": "string",
  18991. "enum": ["message.updated"]
  18992. },
  18993. "properties": {
  18994. "type": "object",
  18995. "properties": {
  18996. "sessionID": {
  18997. "type": "string",
  18998. "pattern": "^ses"
  18999. },
  19000. "info": {
  19001. "$ref": "#/components/schemas/Message"
  19002. }
  19003. },
  19004. "required": ["sessionID", "info"],
  19005. "additionalProperties": false
  19006. }
  19007. },
  19008. "required": ["id", "type", "properties"],
  19009. "additionalProperties": false
  19010. },
  19011. "EventMessageRemoved": {
  19012. "type": "object",
  19013. "properties": {
  19014. "id": {
  19015. "type": "string"
  19016. },
  19017. "type": {
  19018. "type": "string",
  19019. "enum": ["message.removed"]
  19020. },
  19021. "properties": {
  19022. "type": "object",
  19023. "properties": {
  19024. "sessionID": {
  19025. "type": "string",
  19026. "pattern": "^ses"
  19027. },
  19028. "messageID": {
  19029. "type": "string",
  19030. "pattern": "^msg"
  19031. }
  19032. },
  19033. "required": ["sessionID", "messageID"],
  19034. "additionalProperties": false
  19035. }
  19036. },
  19037. "required": ["id", "type", "properties"],
  19038. "additionalProperties": false
  19039. },
  19040. "EventMessagePartUpdated": {
  19041. "type": "object",
  19042. "properties": {
  19043. "id": {
  19044. "type": "string"
  19045. },
  19046. "type": {
  19047. "type": "string",
  19048. "enum": ["message.part.updated"]
  19049. },
  19050. "properties": {
  19051. "type": "object",
  19052. "properties": {
  19053. "sessionID": {
  19054. "type": "string",
  19055. "pattern": "^ses"
  19056. },
  19057. "part": {
  19058. "$ref": "#/components/schemas/Part"
  19059. },
  19060. "time": {
  19061. "type": "integer",
  19062. "minimum": 0
  19063. }
  19064. },
  19065. "required": ["sessionID", "part", "time"],
  19066. "additionalProperties": false
  19067. }
  19068. },
  19069. "required": ["id", "type", "properties"],
  19070. "additionalProperties": false
  19071. },
  19072. "EventMessagePartRemoved": {
  19073. "type": "object",
  19074. "properties": {
  19075. "id": {
  19076. "type": "string"
  19077. },
  19078. "type": {
  19079. "type": "string",
  19080. "enum": ["message.part.removed"]
  19081. },
  19082. "properties": {
  19083. "type": "object",
  19084. "properties": {
  19085. "sessionID": {
  19086. "type": "string",
  19087. "pattern": "^ses"
  19088. },
  19089. "messageID": {
  19090. "type": "string",
  19091. "pattern": "^msg"
  19092. },
  19093. "partID": {
  19094. "type": "string",
  19095. "pattern": "^prt"
  19096. }
  19097. },
  19098. "required": ["sessionID", "messageID", "partID"],
  19099. "additionalProperties": false
  19100. }
  19101. },
  19102. "required": ["id", "type", "properties"],
  19103. "additionalProperties": false
  19104. },
  19105. "EventSessionCreated": {
  19106. "type": "object",
  19107. "properties": {
  19108. "id": {
  19109. "type": "string"
  19110. },
  19111. "type": {
  19112. "type": "string",
  19113. "enum": ["session.created"]
  19114. },
  19115. "properties": {
  19116. "type": "object",
  19117. "properties": {
  19118. "sessionID": {
  19119. "type": "string",
  19120. "pattern": "^ses"
  19121. },
  19122. "info": {
  19123. "$ref": "#/components/schemas/Session"
  19124. }
  19125. },
  19126. "required": ["sessionID", "info"],
  19127. "additionalProperties": false
  19128. }
  19129. },
  19130. "required": ["id", "type", "properties"],
  19131. "additionalProperties": false
  19132. },
  19133. "EventSessionUpdated": {
  19134. "type": "object",
  19135. "properties": {
  19136. "id": {
  19137. "type": "string"
  19138. },
  19139. "type": {
  19140. "type": "string",
  19141. "enum": ["session.updated"]
  19142. },
  19143. "properties": {
  19144. "type": "object",
  19145. "properties": {
  19146. "sessionID": {
  19147. "type": "string",
  19148. "pattern": "^ses"
  19149. },
  19150. "info": {
  19151. "$ref": "#/components/schemas/Session"
  19152. }
  19153. },
  19154. "required": ["sessionID", "info"],
  19155. "additionalProperties": false
  19156. }
  19157. },
  19158. "required": ["id", "type", "properties"],
  19159. "additionalProperties": false
  19160. },
  19161. "EventSessionDeleted": {
  19162. "type": "object",
  19163. "properties": {
  19164. "id": {
  19165. "type": "string"
  19166. },
  19167. "type": {
  19168. "type": "string",
  19169. "enum": ["session.deleted"]
  19170. },
  19171. "properties": {
  19172. "type": "object",
  19173. "properties": {
  19174. "sessionID": {
  19175. "type": "string",
  19176. "pattern": "^ses"
  19177. },
  19178. "info": {
  19179. "$ref": "#/components/schemas/Session"
  19180. }
  19181. },
  19182. "required": ["sessionID", "info"],
  19183. "additionalProperties": false
  19184. }
  19185. },
  19186. "required": ["id", "type", "properties"],
  19187. "additionalProperties": false
  19188. },
  19189. "EventSessionNextAgentSwitched": {
  19190. "type": "object",
  19191. "properties": {
  19192. "id": {
  19193. "type": "string"
  19194. },
  19195. "type": {
  19196. "type": "string",
  19197. "enum": ["session.next.agent.switched"]
  19198. },
  19199. "properties": {
  19200. "type": "object",
  19201. "properties": {
  19202. "timestamp": {
  19203. "type": "number"
  19204. },
  19205. "sessionID": {
  19206. "type": "string",
  19207. "pattern": "^ses"
  19208. },
  19209. "agent": {
  19210. "type": "string"
  19211. }
  19212. },
  19213. "required": ["timestamp", "sessionID", "agent"],
  19214. "additionalProperties": false
  19215. }
  19216. },
  19217. "required": ["id", "type", "properties"],
  19218. "additionalProperties": false
  19219. },
  19220. "EventSessionNextModelSwitched": {
  19221. "type": "object",
  19222. "properties": {
  19223. "id": {
  19224. "type": "string"
  19225. },
  19226. "type": {
  19227. "type": "string",
  19228. "enum": ["session.next.model.switched"]
  19229. },
  19230. "properties": {
  19231. "type": "object",
  19232. "properties": {
  19233. "timestamp": {
  19234. "type": "number"
  19235. },
  19236. "sessionID": {
  19237. "type": "string",
  19238. "pattern": "^ses"
  19239. },
  19240. "model": {
  19241. "type": "object",
  19242. "properties": {
  19243. "id": {
  19244. "type": "string"
  19245. },
  19246. "providerID": {
  19247. "type": "string"
  19248. },
  19249. "variant": {
  19250. "type": "string"
  19251. }
  19252. },
  19253. "required": ["id", "providerID", "variant"],
  19254. "additionalProperties": false
  19255. }
  19256. },
  19257. "required": ["timestamp", "sessionID", "model"],
  19258. "additionalProperties": false
  19259. }
  19260. },
  19261. "required": ["id", "type", "properties"],
  19262. "additionalProperties": false
  19263. },
  19264. "PromptSource": {
  19265. "type": "object",
  19266. "properties": {
  19267. "start": {
  19268. "type": "number"
  19269. },
  19270. "end": {
  19271. "type": "number"
  19272. },
  19273. "text": {
  19274. "type": "string"
  19275. }
  19276. },
  19277. "required": ["start", "end", "text"],
  19278. "additionalProperties": false
  19279. },
  19280. "PromptFileAttachment": {
  19281. "type": "object",
  19282. "properties": {
  19283. "uri": {
  19284. "type": "string"
  19285. },
  19286. "mime": {
  19287. "type": "string"
  19288. },
  19289. "name": {
  19290. "type": "string"
  19291. },
  19292. "description": {
  19293. "type": "string"
  19294. },
  19295. "source": {
  19296. "$ref": "#/components/schemas/PromptSource"
  19297. }
  19298. },
  19299. "required": ["uri", "mime"],
  19300. "additionalProperties": false
  19301. },
  19302. "PromptAgentAttachment": {
  19303. "type": "object",
  19304. "properties": {
  19305. "name": {
  19306. "type": "string"
  19307. },
  19308. "source": {
  19309. "$ref": "#/components/schemas/PromptSource"
  19310. }
  19311. },
  19312. "required": ["name"],
  19313. "additionalProperties": false
  19314. },
  19315. "PromptReferenceAttachment": {
  19316. "type": "object",
  19317. "properties": {
  19318. "name": {
  19319. "type": "string"
  19320. },
  19321. "kind": {
  19322. "type": "string",
  19323. "enum": ["local", "git", "invalid"]
  19324. },
  19325. "uri": {
  19326. "type": "string"
  19327. },
  19328. "repository": {
  19329. "type": "string"
  19330. },
  19331. "branch": {
  19332. "type": "string"
  19333. },
  19334. "target": {
  19335. "type": "string"
  19336. },
  19337. "targetUri": {
  19338. "type": "string"
  19339. },
  19340. "problem": {
  19341. "type": "string"
  19342. },
  19343. "source": {
  19344. "$ref": "#/components/schemas/PromptSource"
  19345. }
  19346. },
  19347. "required": ["name", "kind"],
  19348. "additionalProperties": false
  19349. },
  19350. "EventSessionNextPrompted": {
  19351. "type": "object",
  19352. "properties": {
  19353. "id": {
  19354. "type": "string"
  19355. },
  19356. "type": {
  19357. "type": "string",
  19358. "enum": ["session.next.prompted"]
  19359. },
  19360. "properties": {
  19361. "type": "object",
  19362. "properties": {
  19363. "timestamp": {
  19364. "type": "number"
  19365. },
  19366. "sessionID": {
  19367. "type": "string",
  19368. "pattern": "^ses"
  19369. },
  19370. "prompt": {
  19371. "$ref": "#/components/schemas/Prompt"
  19372. }
  19373. },
  19374. "required": ["timestamp", "sessionID", "prompt"],
  19375. "additionalProperties": false
  19376. }
  19377. },
  19378. "required": ["id", "type", "properties"],
  19379. "additionalProperties": false
  19380. },
  19381. "EventSessionNextSynthetic": {
  19382. "type": "object",
  19383. "properties": {
  19384. "id": {
  19385. "type": "string"
  19386. },
  19387. "type": {
  19388. "type": "string",
  19389. "enum": ["session.next.synthetic"]
  19390. },
  19391. "properties": {
  19392. "type": "object",
  19393. "properties": {
  19394. "timestamp": {
  19395. "type": "number"
  19396. },
  19397. "sessionID": {
  19398. "type": "string",
  19399. "pattern": "^ses"
  19400. },
  19401. "text": {
  19402. "type": "string"
  19403. }
  19404. },
  19405. "required": ["timestamp", "sessionID", "text"],
  19406. "additionalProperties": false
  19407. }
  19408. },
  19409. "required": ["id", "type", "properties"],
  19410. "additionalProperties": false
  19411. },
  19412. "EventSessionNextShellStarted": {
  19413. "type": "object",
  19414. "properties": {
  19415. "id": {
  19416. "type": "string"
  19417. },
  19418. "type": {
  19419. "type": "string",
  19420. "enum": ["session.next.shell.started"]
  19421. },
  19422. "properties": {
  19423. "type": "object",
  19424. "properties": {
  19425. "timestamp": {
  19426. "type": "number"
  19427. },
  19428. "sessionID": {
  19429. "type": "string",
  19430. "pattern": "^ses"
  19431. },
  19432. "callID": {
  19433. "type": "string"
  19434. },
  19435. "command": {
  19436. "type": "string"
  19437. }
  19438. },
  19439. "required": ["timestamp", "sessionID", "callID", "command"],
  19440. "additionalProperties": false
  19441. }
  19442. },
  19443. "required": ["id", "type", "properties"],
  19444. "additionalProperties": false
  19445. },
  19446. "EventSessionNextShellEnded": {
  19447. "type": "object",
  19448. "properties": {
  19449. "id": {
  19450. "type": "string"
  19451. },
  19452. "type": {
  19453. "type": "string",
  19454. "enum": ["session.next.shell.ended"]
  19455. },
  19456. "properties": {
  19457. "type": "object",
  19458. "properties": {
  19459. "timestamp": {
  19460. "type": "number"
  19461. },
  19462. "sessionID": {
  19463. "type": "string",
  19464. "pattern": "^ses"
  19465. },
  19466. "callID": {
  19467. "type": "string"
  19468. },
  19469. "output": {
  19470. "type": "string"
  19471. }
  19472. },
  19473. "required": ["timestamp", "sessionID", "callID", "output"],
  19474. "additionalProperties": false
  19475. }
  19476. },
  19477. "required": ["id", "type", "properties"],
  19478. "additionalProperties": false
  19479. },
  19480. "EventSessionNextStepStarted": {
  19481. "type": "object",
  19482. "properties": {
  19483. "id": {
  19484. "type": "string"
  19485. },
  19486. "type": {
  19487. "type": "string",
  19488. "enum": ["session.next.step.started"]
  19489. },
  19490. "properties": {
  19491. "type": "object",
  19492. "properties": {
  19493. "timestamp": {
  19494. "type": "number"
  19495. },
  19496. "sessionID": {
  19497. "type": "string",
  19498. "pattern": "^ses"
  19499. },
  19500. "agent": {
  19501. "type": "string"
  19502. },
  19503. "model": {
  19504. "type": "object",
  19505. "properties": {
  19506. "id": {
  19507. "type": "string"
  19508. },
  19509. "providerID": {
  19510. "type": "string"
  19511. },
  19512. "variant": {
  19513. "type": "string"
  19514. }
  19515. },
  19516. "required": ["id", "providerID", "variant"],
  19517. "additionalProperties": false
  19518. },
  19519. "snapshot": {
  19520. "type": "string"
  19521. }
  19522. },
  19523. "required": ["timestamp", "sessionID", "agent", "model"],
  19524. "additionalProperties": false
  19525. }
  19526. },
  19527. "required": ["id", "type", "properties"],
  19528. "additionalProperties": false
  19529. },
  19530. "EventSessionNextStepEnded": {
  19531. "type": "object",
  19532. "properties": {
  19533. "id": {
  19534. "type": "string"
  19535. },
  19536. "type": {
  19537. "type": "string",
  19538. "enum": ["session.next.step.ended"]
  19539. },
  19540. "properties": {
  19541. "type": "object",
  19542. "properties": {
  19543. "timestamp": {
  19544. "type": "number"
  19545. },
  19546. "sessionID": {
  19547. "type": "string",
  19548. "pattern": "^ses"
  19549. },
  19550. "finish": {
  19551. "type": "string"
  19552. },
  19553. "cost": {
  19554. "type": "number"
  19555. },
  19556. "tokens": {
  19557. "type": "object",
  19558. "properties": {
  19559. "input": {
  19560. "type": "number"
  19561. },
  19562. "output": {
  19563. "type": "number"
  19564. },
  19565. "reasoning": {
  19566. "type": "number"
  19567. },
  19568. "cache": {
  19569. "type": "object",
  19570. "properties": {
  19571. "read": {
  19572. "type": "number"
  19573. },
  19574. "write": {
  19575. "type": "number"
  19576. }
  19577. },
  19578. "required": ["read", "write"],
  19579. "additionalProperties": false
  19580. }
  19581. },
  19582. "required": ["input", "output", "reasoning", "cache"],
  19583. "additionalProperties": false
  19584. },
  19585. "snapshot": {
  19586. "type": "string"
  19587. }
  19588. },
  19589. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  19590. "additionalProperties": false
  19591. }
  19592. },
  19593. "required": ["id", "type", "properties"],
  19594. "additionalProperties": false
  19595. },
  19596. "SessionErrorUnknown": {
  19597. "type": "object",
  19598. "properties": {
  19599. "type": {
  19600. "type": "string",
  19601. "enum": ["unknown"]
  19602. },
  19603. "message": {
  19604. "type": "string"
  19605. }
  19606. },
  19607. "required": ["type", "message"],
  19608. "additionalProperties": false
  19609. },
  19610. "EventSessionNextStepFailed": {
  19611. "type": "object",
  19612. "properties": {
  19613. "id": {
  19614. "type": "string"
  19615. },
  19616. "type": {
  19617. "type": "string",
  19618. "enum": ["session.next.step.failed"]
  19619. },
  19620. "properties": {
  19621. "type": "object",
  19622. "properties": {
  19623. "timestamp": {
  19624. "type": "number"
  19625. },
  19626. "sessionID": {
  19627. "type": "string",
  19628. "pattern": "^ses"
  19629. },
  19630. "error": {
  19631. "$ref": "#/components/schemas/SessionErrorUnknown"
  19632. }
  19633. },
  19634. "required": ["timestamp", "sessionID", "error"],
  19635. "additionalProperties": false
  19636. }
  19637. },
  19638. "required": ["id", "type", "properties"],
  19639. "additionalProperties": false
  19640. },
  19641. "EventSessionNextTextStarted": {
  19642. "type": "object",
  19643. "properties": {
  19644. "id": {
  19645. "type": "string"
  19646. },
  19647. "type": {
  19648. "type": "string",
  19649. "enum": ["session.next.text.started"]
  19650. },
  19651. "properties": {
  19652. "type": "object",
  19653. "properties": {
  19654. "timestamp": {
  19655. "type": "number"
  19656. },
  19657. "sessionID": {
  19658. "type": "string",
  19659. "pattern": "^ses"
  19660. }
  19661. },
  19662. "required": ["timestamp", "sessionID"],
  19663. "additionalProperties": false
  19664. }
  19665. },
  19666. "required": ["id", "type", "properties"],
  19667. "additionalProperties": false
  19668. },
  19669. "EventSessionNextTextDelta": {
  19670. "type": "object",
  19671. "properties": {
  19672. "id": {
  19673. "type": "string"
  19674. },
  19675. "type": {
  19676. "type": "string",
  19677. "enum": ["session.next.text.delta"]
  19678. },
  19679. "properties": {
  19680. "type": "object",
  19681. "properties": {
  19682. "timestamp": {
  19683. "type": "number"
  19684. },
  19685. "sessionID": {
  19686. "type": "string",
  19687. "pattern": "^ses"
  19688. },
  19689. "delta": {
  19690. "type": "string"
  19691. }
  19692. },
  19693. "required": ["timestamp", "sessionID", "delta"],
  19694. "additionalProperties": false
  19695. }
  19696. },
  19697. "required": ["id", "type", "properties"],
  19698. "additionalProperties": false
  19699. },
  19700. "EventSessionNextTextEnded": {
  19701. "type": "object",
  19702. "properties": {
  19703. "id": {
  19704. "type": "string"
  19705. },
  19706. "type": {
  19707. "type": "string",
  19708. "enum": ["session.next.text.ended"]
  19709. },
  19710. "properties": {
  19711. "type": "object",
  19712. "properties": {
  19713. "timestamp": {
  19714. "type": "number"
  19715. },
  19716. "sessionID": {
  19717. "type": "string",
  19718. "pattern": "^ses"
  19719. },
  19720. "text": {
  19721. "type": "string"
  19722. }
  19723. },
  19724. "required": ["timestamp", "sessionID", "text"],
  19725. "additionalProperties": false
  19726. }
  19727. },
  19728. "required": ["id", "type", "properties"],
  19729. "additionalProperties": false
  19730. },
  19731. "EventSessionNextReasoningStarted": {
  19732. "type": "object",
  19733. "properties": {
  19734. "id": {
  19735. "type": "string"
  19736. },
  19737. "type": {
  19738. "type": "string",
  19739. "enum": ["session.next.reasoning.started"]
  19740. },
  19741. "properties": {
  19742. "type": "object",
  19743. "properties": {
  19744. "timestamp": {
  19745. "type": "number"
  19746. },
  19747. "sessionID": {
  19748. "type": "string",
  19749. "pattern": "^ses"
  19750. },
  19751. "reasoningID": {
  19752. "type": "string"
  19753. }
  19754. },
  19755. "required": ["timestamp", "sessionID", "reasoningID"],
  19756. "additionalProperties": false
  19757. }
  19758. },
  19759. "required": ["id", "type", "properties"],
  19760. "additionalProperties": false
  19761. },
  19762. "EventSessionNextReasoningDelta": {
  19763. "type": "object",
  19764. "properties": {
  19765. "id": {
  19766. "type": "string"
  19767. },
  19768. "type": {
  19769. "type": "string",
  19770. "enum": ["session.next.reasoning.delta"]
  19771. },
  19772. "properties": {
  19773. "type": "object",
  19774. "properties": {
  19775. "timestamp": {
  19776. "type": "number"
  19777. },
  19778. "sessionID": {
  19779. "type": "string",
  19780. "pattern": "^ses"
  19781. },
  19782. "reasoningID": {
  19783. "type": "string"
  19784. },
  19785. "delta": {
  19786. "type": "string"
  19787. }
  19788. },
  19789. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  19790. "additionalProperties": false
  19791. }
  19792. },
  19793. "required": ["id", "type", "properties"],
  19794. "additionalProperties": false
  19795. },
  19796. "EventSessionNextReasoningEnded": {
  19797. "type": "object",
  19798. "properties": {
  19799. "id": {
  19800. "type": "string"
  19801. },
  19802. "type": {
  19803. "type": "string",
  19804. "enum": ["session.next.reasoning.ended"]
  19805. },
  19806. "properties": {
  19807. "type": "object",
  19808. "properties": {
  19809. "timestamp": {
  19810. "type": "number"
  19811. },
  19812. "sessionID": {
  19813. "type": "string",
  19814. "pattern": "^ses"
  19815. },
  19816. "reasoningID": {
  19817. "type": "string"
  19818. },
  19819. "text": {
  19820. "type": "string"
  19821. }
  19822. },
  19823. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  19824. "additionalProperties": false
  19825. }
  19826. },
  19827. "required": ["id", "type", "properties"],
  19828. "additionalProperties": false
  19829. },
  19830. "EventSessionNextToolInputStarted": {
  19831. "type": "object",
  19832. "properties": {
  19833. "id": {
  19834. "type": "string"
  19835. },
  19836. "type": {
  19837. "type": "string",
  19838. "enum": ["session.next.tool.input.started"]
  19839. },
  19840. "properties": {
  19841. "type": "object",
  19842. "properties": {
  19843. "timestamp": {
  19844. "type": "number"
  19845. },
  19846. "sessionID": {
  19847. "type": "string",
  19848. "pattern": "^ses"
  19849. },
  19850. "callID": {
  19851. "type": "string"
  19852. },
  19853. "name": {
  19854. "type": "string"
  19855. }
  19856. },
  19857. "required": ["timestamp", "sessionID", "callID", "name"],
  19858. "additionalProperties": false
  19859. }
  19860. },
  19861. "required": ["id", "type", "properties"],
  19862. "additionalProperties": false
  19863. },
  19864. "EventSessionNextToolInputDelta": {
  19865. "type": "object",
  19866. "properties": {
  19867. "id": {
  19868. "type": "string"
  19869. },
  19870. "type": {
  19871. "type": "string",
  19872. "enum": ["session.next.tool.input.delta"]
  19873. },
  19874. "properties": {
  19875. "type": "object",
  19876. "properties": {
  19877. "timestamp": {
  19878. "type": "number"
  19879. },
  19880. "sessionID": {
  19881. "type": "string",
  19882. "pattern": "^ses"
  19883. },
  19884. "callID": {
  19885. "type": "string"
  19886. },
  19887. "delta": {
  19888. "type": "string"
  19889. }
  19890. },
  19891. "required": ["timestamp", "sessionID", "callID", "delta"],
  19892. "additionalProperties": false
  19893. }
  19894. },
  19895. "required": ["id", "type", "properties"],
  19896. "additionalProperties": false
  19897. },
  19898. "EventSessionNextToolInputEnded": {
  19899. "type": "object",
  19900. "properties": {
  19901. "id": {
  19902. "type": "string"
  19903. },
  19904. "type": {
  19905. "type": "string",
  19906. "enum": ["session.next.tool.input.ended"]
  19907. },
  19908. "properties": {
  19909. "type": "object",
  19910. "properties": {
  19911. "timestamp": {
  19912. "type": "number"
  19913. },
  19914. "sessionID": {
  19915. "type": "string",
  19916. "pattern": "^ses"
  19917. },
  19918. "callID": {
  19919. "type": "string"
  19920. },
  19921. "text": {
  19922. "type": "string"
  19923. }
  19924. },
  19925. "required": ["timestamp", "sessionID", "callID", "text"],
  19926. "additionalProperties": false
  19927. }
  19928. },
  19929. "required": ["id", "type", "properties"],
  19930. "additionalProperties": false
  19931. },
  19932. "EventSessionNextToolCalled": {
  19933. "type": "object",
  19934. "properties": {
  19935. "id": {
  19936. "type": "string"
  19937. },
  19938. "type": {
  19939. "type": "string",
  19940. "enum": ["session.next.tool.called"]
  19941. },
  19942. "properties": {
  19943. "type": "object",
  19944. "properties": {
  19945. "timestamp": {
  19946. "type": "number"
  19947. },
  19948. "sessionID": {
  19949. "type": "string",
  19950. "pattern": "^ses"
  19951. },
  19952. "callID": {
  19953. "type": "string"
  19954. },
  19955. "tool": {
  19956. "type": "string"
  19957. },
  19958. "input": {
  19959. "type": "object"
  19960. },
  19961. "provider": {
  19962. "type": "object",
  19963. "properties": {
  19964. "executed": {
  19965. "type": "boolean"
  19966. },
  19967. "metadata": {
  19968. "type": "object"
  19969. }
  19970. },
  19971. "required": ["executed"],
  19972. "additionalProperties": false
  19973. }
  19974. },
  19975. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  19976. "additionalProperties": false
  19977. }
  19978. },
  19979. "required": ["id", "type", "properties"],
  19980. "additionalProperties": false
  19981. },
  19982. "ToolTextContent": {
  19983. "type": "object",
  19984. "properties": {
  19985. "type": {
  19986. "type": "string",
  19987. "enum": ["text"]
  19988. },
  19989. "text": {
  19990. "type": "string"
  19991. }
  19992. },
  19993. "required": ["type", "text"],
  19994. "additionalProperties": false
  19995. },
  19996. "ToolFileContent": {
  19997. "type": "object",
  19998. "properties": {
  19999. "type": {
  20000. "type": "string",
  20001. "enum": ["file"]
  20002. },
  20003. "uri": {
  20004. "type": "string"
  20005. },
  20006. "mime": {
  20007. "type": "string"
  20008. },
  20009. "name": {
  20010. "type": "string"
  20011. }
  20012. },
  20013. "required": ["type", "uri", "mime"],
  20014. "additionalProperties": false
  20015. },
  20016. "EventSessionNextToolProgress": {
  20017. "type": "object",
  20018. "properties": {
  20019. "id": {
  20020. "type": "string"
  20021. },
  20022. "type": {
  20023. "type": "string",
  20024. "enum": ["session.next.tool.progress"]
  20025. },
  20026. "properties": {
  20027. "type": "object",
  20028. "properties": {
  20029. "timestamp": {
  20030. "type": "number"
  20031. },
  20032. "sessionID": {
  20033. "type": "string",
  20034. "pattern": "^ses"
  20035. },
  20036. "callID": {
  20037. "type": "string"
  20038. },
  20039. "structured": {
  20040. "type": "object"
  20041. },
  20042. "content": {
  20043. "type": "array",
  20044. "items": {
  20045. "anyOf": [
  20046. {
  20047. "$ref": "#/components/schemas/ToolTextContent"
  20048. },
  20049. {
  20050. "$ref": "#/components/schemas/ToolFileContent"
  20051. }
  20052. ]
  20053. }
  20054. }
  20055. },
  20056. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  20057. "additionalProperties": false
  20058. }
  20059. },
  20060. "required": ["id", "type", "properties"],
  20061. "additionalProperties": false
  20062. },
  20063. "EventSessionNextToolSuccess": {
  20064. "type": "object",
  20065. "properties": {
  20066. "id": {
  20067. "type": "string"
  20068. },
  20069. "type": {
  20070. "type": "string",
  20071. "enum": ["session.next.tool.success"]
  20072. },
  20073. "properties": {
  20074. "type": "object",
  20075. "properties": {
  20076. "timestamp": {
  20077. "type": "number"
  20078. },
  20079. "sessionID": {
  20080. "type": "string",
  20081. "pattern": "^ses"
  20082. },
  20083. "callID": {
  20084. "type": "string"
  20085. },
  20086. "structured": {
  20087. "type": "object"
  20088. },
  20089. "content": {
  20090. "type": "array",
  20091. "items": {
  20092. "anyOf": [
  20093. {
  20094. "$ref": "#/components/schemas/ToolTextContent"
  20095. },
  20096. {
  20097. "$ref": "#/components/schemas/ToolFileContent"
  20098. }
  20099. ]
  20100. }
  20101. },
  20102. "provider": {
  20103. "type": "object",
  20104. "properties": {
  20105. "executed": {
  20106. "type": "boolean"
  20107. },
  20108. "metadata": {
  20109. "type": "object"
  20110. }
  20111. },
  20112. "required": ["executed"],
  20113. "additionalProperties": false
  20114. }
  20115. },
  20116. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  20117. "additionalProperties": false
  20118. }
  20119. },
  20120. "required": ["id", "type", "properties"],
  20121. "additionalProperties": false
  20122. },
  20123. "EventSessionNextToolFailed": {
  20124. "type": "object",
  20125. "properties": {
  20126. "id": {
  20127. "type": "string"
  20128. },
  20129. "type": {
  20130. "type": "string",
  20131. "enum": ["session.next.tool.failed"]
  20132. },
  20133. "properties": {
  20134. "type": "object",
  20135. "properties": {
  20136. "timestamp": {
  20137. "type": "number"
  20138. },
  20139. "sessionID": {
  20140. "type": "string",
  20141. "pattern": "^ses"
  20142. },
  20143. "callID": {
  20144. "type": "string"
  20145. },
  20146. "error": {
  20147. "$ref": "#/components/schemas/SessionErrorUnknown"
  20148. },
  20149. "provider": {
  20150. "type": "object",
  20151. "properties": {
  20152. "executed": {
  20153. "type": "boolean"
  20154. },
  20155. "metadata": {
  20156. "type": "object"
  20157. }
  20158. },
  20159. "required": ["executed"],
  20160. "additionalProperties": false
  20161. }
  20162. },
  20163. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  20164. "additionalProperties": false
  20165. }
  20166. },
  20167. "required": ["id", "type", "properties"],
  20168. "additionalProperties": false
  20169. },
  20170. "SessionNextRetry_error": {
  20171. "type": "object",
  20172. "properties": {
  20173. "message": {
  20174. "type": "string"
  20175. },
  20176. "statusCode": {
  20177. "type": "number"
  20178. },
  20179. "isRetryable": {
  20180. "type": "boolean"
  20181. },
  20182. "responseHeaders": {
  20183. "type": "object",
  20184. "additionalProperties": {
  20185. "type": "string"
  20186. }
  20187. },
  20188. "responseBody": {
  20189. "type": "string"
  20190. },
  20191. "metadata": {
  20192. "type": "object",
  20193. "additionalProperties": {
  20194. "type": "string"
  20195. }
  20196. }
  20197. },
  20198. "required": ["message", "isRetryable"],
  20199. "additionalProperties": false
  20200. },
  20201. "EventSessionNextRetried": {
  20202. "type": "object",
  20203. "properties": {
  20204. "id": {
  20205. "type": "string"
  20206. },
  20207. "type": {
  20208. "type": "string",
  20209. "enum": ["session.next.retried"]
  20210. },
  20211. "properties": {
  20212. "type": "object",
  20213. "properties": {
  20214. "timestamp": {
  20215. "type": "number"
  20216. },
  20217. "sessionID": {
  20218. "type": "string",
  20219. "pattern": "^ses"
  20220. },
  20221. "attempt": {
  20222. "type": "number"
  20223. },
  20224. "error": {
  20225. "$ref": "#/components/schemas/SessionNextRetry_error"
  20226. }
  20227. },
  20228. "required": ["timestamp", "sessionID", "attempt", "error"],
  20229. "additionalProperties": false
  20230. }
  20231. },
  20232. "required": ["id", "type", "properties"],
  20233. "additionalProperties": false
  20234. },
  20235. "EventSessionNextCompactionStarted": {
  20236. "type": "object",
  20237. "properties": {
  20238. "id": {
  20239. "type": "string"
  20240. },
  20241. "type": {
  20242. "type": "string",
  20243. "enum": ["session.next.compaction.started"]
  20244. },
  20245. "properties": {
  20246. "type": "object",
  20247. "properties": {
  20248. "timestamp": {
  20249. "type": "number"
  20250. },
  20251. "sessionID": {
  20252. "type": "string",
  20253. "pattern": "^ses"
  20254. },
  20255. "reason": {
  20256. "type": "string",
  20257. "enum": ["auto", "manual"]
  20258. }
  20259. },
  20260. "required": ["timestamp", "sessionID", "reason"],
  20261. "additionalProperties": false
  20262. }
  20263. },
  20264. "required": ["id", "type", "properties"],
  20265. "additionalProperties": false
  20266. },
  20267. "EventSessionNextCompactionDelta": {
  20268. "type": "object",
  20269. "properties": {
  20270. "id": {
  20271. "type": "string"
  20272. },
  20273. "type": {
  20274. "type": "string",
  20275. "enum": ["session.next.compaction.delta"]
  20276. },
  20277. "properties": {
  20278. "type": "object",
  20279. "properties": {
  20280. "timestamp": {
  20281. "type": "number"
  20282. },
  20283. "sessionID": {
  20284. "type": "string",
  20285. "pattern": "^ses"
  20286. },
  20287. "text": {
  20288. "type": "string"
  20289. }
  20290. },
  20291. "required": ["timestamp", "sessionID", "text"],
  20292. "additionalProperties": false
  20293. }
  20294. },
  20295. "required": ["id", "type", "properties"],
  20296. "additionalProperties": false
  20297. },
  20298. "EventSessionNextCompactionEnded": {
  20299. "type": "object",
  20300. "properties": {
  20301. "id": {
  20302. "type": "string"
  20303. },
  20304. "type": {
  20305. "type": "string",
  20306. "enum": ["session.next.compaction.ended"]
  20307. },
  20308. "properties": {
  20309. "type": "object",
  20310. "properties": {
  20311. "timestamp": {
  20312. "type": "number"
  20313. },
  20314. "sessionID": {
  20315. "type": "string",
  20316. "pattern": "^ses"
  20317. },
  20318. "text": {
  20319. "type": "string"
  20320. },
  20321. "include": {
  20322. "type": "string"
  20323. }
  20324. },
  20325. "required": ["timestamp", "sessionID", "text"],
  20326. "additionalProperties": false
  20327. }
  20328. },
  20329. "required": ["id", "type", "properties"],
  20330. "additionalProperties": false
  20331. },
  20332. "ModelV2Info": {
  20333. "type": "object",
  20334. "properties": {
  20335. "id": {
  20336. "type": "string"
  20337. },
  20338. "apiID": {
  20339. "type": "string"
  20340. },
  20341. "providerID": {
  20342. "type": "string"
  20343. },
  20344. "family": {
  20345. "type": "string"
  20346. },
  20347. "name": {
  20348. "type": "string"
  20349. },
  20350. "endpoint": {
  20351. "anyOf": [
  20352. {
  20353. "type": "object",
  20354. "properties": {
  20355. "type": {
  20356. "type": "string",
  20357. "enum": ["unknown"]
  20358. }
  20359. },
  20360. "required": ["type"],
  20361. "additionalProperties": false
  20362. },
  20363. {
  20364. "type": "object",
  20365. "properties": {
  20366. "type": {
  20367. "type": "string",
  20368. "enum": ["openai/responses"]
  20369. },
  20370. "url": {
  20371. "type": "string"
  20372. },
  20373. "websocket": {
  20374. "type": "boolean"
  20375. }
  20376. },
  20377. "required": ["type", "url"],
  20378. "additionalProperties": false
  20379. },
  20380. {
  20381. "type": "object",
  20382. "properties": {
  20383. "type": {
  20384. "type": "string",
  20385. "enum": ["openai/completions"]
  20386. },
  20387. "url": {
  20388. "type": "string"
  20389. },
  20390. "reasoning": {
  20391. "anyOf": [
  20392. {
  20393. "type": "object",
  20394. "properties": {
  20395. "type": {
  20396. "type": "string",
  20397. "enum": ["reasoning_content"]
  20398. }
  20399. },
  20400. "required": ["type"],
  20401. "additionalProperties": false
  20402. },
  20403. {
  20404. "type": "object",
  20405. "properties": {
  20406. "type": {
  20407. "type": "string",
  20408. "enum": ["reasoning_details"]
  20409. }
  20410. },
  20411. "required": ["type"],
  20412. "additionalProperties": false
  20413. }
  20414. ]
  20415. }
  20416. },
  20417. "required": ["type", "url"],
  20418. "additionalProperties": false
  20419. },
  20420. {
  20421. "type": "object",
  20422. "properties": {
  20423. "type": {
  20424. "type": "string",
  20425. "enum": ["anthropic/messages"]
  20426. },
  20427. "url": {
  20428. "type": "string"
  20429. }
  20430. },
  20431. "required": ["type", "url"],
  20432. "additionalProperties": false
  20433. },
  20434. {
  20435. "type": "object",
  20436. "properties": {
  20437. "type": {
  20438. "type": "string",
  20439. "enum": ["aisdk"]
  20440. },
  20441. "package": {
  20442. "type": "string"
  20443. },
  20444. "url": {
  20445. "type": "string"
  20446. }
  20447. },
  20448. "required": ["type", "package"],
  20449. "additionalProperties": false
  20450. }
  20451. ]
  20452. },
  20453. "capabilities": {
  20454. "type": "object",
  20455. "properties": {
  20456. "tools": {
  20457. "type": "boolean"
  20458. },
  20459. "input": {
  20460. "type": "array",
  20461. "items": {
  20462. "type": "string"
  20463. }
  20464. },
  20465. "output": {
  20466. "type": "array",
  20467. "items": {
  20468. "type": "string"
  20469. }
  20470. }
  20471. },
  20472. "required": ["tools", "input", "output"],
  20473. "additionalProperties": false
  20474. },
  20475. "options": {
  20476. "type": "object",
  20477. "properties": {
  20478. "headers": {
  20479. "type": "object",
  20480. "additionalProperties": {
  20481. "type": "string"
  20482. }
  20483. },
  20484. "body": {
  20485. "type": "object"
  20486. },
  20487. "aisdk": {
  20488. "type": "object",
  20489. "properties": {
  20490. "provider": {
  20491. "type": "object"
  20492. },
  20493. "request": {
  20494. "type": "object"
  20495. }
  20496. },
  20497. "required": ["provider", "request"],
  20498. "additionalProperties": false
  20499. },
  20500. "variant": {
  20501. "type": "string"
  20502. }
  20503. },
  20504. "required": ["headers", "body", "aisdk"],
  20505. "additionalProperties": false
  20506. },
  20507. "variants": {
  20508. "type": "array",
  20509. "items": {
  20510. "type": "object",
  20511. "properties": {
  20512. "id": {
  20513. "type": "string"
  20514. },
  20515. "headers": {
  20516. "type": "object",
  20517. "additionalProperties": {
  20518. "type": "string"
  20519. }
  20520. },
  20521. "body": {
  20522. "type": "object"
  20523. },
  20524. "aisdk": {
  20525. "type": "object",
  20526. "properties": {
  20527. "provider": {
  20528. "type": "object"
  20529. },
  20530. "request": {
  20531. "type": "object"
  20532. }
  20533. },
  20534. "required": ["provider", "request"],
  20535. "additionalProperties": false
  20536. }
  20537. },
  20538. "required": ["id", "headers", "body", "aisdk"],
  20539. "additionalProperties": false
  20540. }
  20541. },
  20542. "time": {
  20543. "type": "object",
  20544. "properties": {
  20545. "released": {
  20546. "anyOf": [
  20547. {
  20548. "type": "number"
  20549. },
  20550. {
  20551. "type": "string",
  20552. "enum": ["NaN"]
  20553. },
  20554. {
  20555. "type": "string",
  20556. "enum": ["Infinity"]
  20557. },
  20558. {
  20559. "type": "string",
  20560. "enum": ["-Infinity"]
  20561. },
  20562. {
  20563. "type": "string",
  20564. "enum": ["Infinity", "-Infinity", "NaN"]
  20565. }
  20566. ]
  20567. }
  20568. },
  20569. "required": ["released"],
  20570. "additionalProperties": false
  20571. },
  20572. "cost": {
  20573. "type": "array",
  20574. "items": {
  20575. "type": "object",
  20576. "properties": {
  20577. "tier": {
  20578. "type": "object",
  20579. "properties": {
  20580. "type": {
  20581. "type": "string",
  20582. "enum": ["context"]
  20583. },
  20584. "size": {
  20585. "type": "integer"
  20586. }
  20587. },
  20588. "required": ["type", "size"],
  20589. "additionalProperties": false
  20590. },
  20591. "input": {
  20592. "type": "number"
  20593. },
  20594. "output": {
  20595. "type": "number"
  20596. },
  20597. "cache": {
  20598. "type": "object",
  20599. "properties": {
  20600. "read": {
  20601. "type": "number"
  20602. },
  20603. "write": {
  20604. "type": "number"
  20605. }
  20606. },
  20607. "required": ["read", "write"],
  20608. "additionalProperties": false
  20609. }
  20610. },
  20611. "required": ["input", "output", "cache"],
  20612. "additionalProperties": false
  20613. }
  20614. },
  20615. "status": {
  20616. "type": "string",
  20617. "enum": ["alpha", "beta", "deprecated", "active"]
  20618. },
  20619. "enabled": {
  20620. "type": "boolean"
  20621. },
  20622. "limit": {
  20623. "type": "object",
  20624. "properties": {
  20625. "context": {
  20626. "type": "integer"
  20627. },
  20628. "input": {
  20629. "type": "integer"
  20630. },
  20631. "output": {
  20632. "type": "integer"
  20633. }
  20634. },
  20635. "required": ["context", "output"],
  20636. "additionalProperties": false
  20637. }
  20638. },
  20639. "required": [
  20640. "id",
  20641. "apiID",
  20642. "providerID",
  20643. "name",
  20644. "endpoint",
  20645. "capabilities",
  20646. "options",
  20647. "variants",
  20648. "time",
  20649. "cost",
  20650. "status",
  20651. "enabled",
  20652. "limit"
  20653. ],
  20654. "additionalProperties": false
  20655. },
  20656. "EventCatalogModelUpdated": {
  20657. "type": "object",
  20658. "properties": {
  20659. "id": {
  20660. "type": "string"
  20661. },
  20662. "type": {
  20663. "type": "string",
  20664. "enum": ["catalog.model.updated"]
  20665. },
  20666. "properties": {
  20667. "type": "object",
  20668. "properties": {
  20669. "model": {
  20670. "$ref": "#/components/schemas/ModelV2Info"
  20671. }
  20672. },
  20673. "required": ["model"],
  20674. "additionalProperties": false
  20675. }
  20676. },
  20677. "required": ["id", "type", "properties"],
  20678. "additionalProperties": false
  20679. },
  20680. "EventModels-devRefreshed": {
  20681. "type": "object",
  20682. "properties": {
  20683. "id": {
  20684. "type": "string"
  20685. },
  20686. "type": {
  20687. "type": "string",
  20688. "enum": ["models-dev.refreshed"]
  20689. },
  20690. "properties": {
  20691. "type": "object",
  20692. "properties": {}
  20693. }
  20694. },
  20695. "required": ["id", "type", "properties"],
  20696. "additionalProperties": false
  20697. },
  20698. "AccountV2OAuthCredential": {
  20699. "type": "object",
  20700. "properties": {
  20701. "type": {
  20702. "type": "string",
  20703. "enum": ["oauth"]
  20704. },
  20705. "refresh": {
  20706. "type": "string"
  20707. },
  20708. "access": {
  20709. "type": "string"
  20710. },
  20711. "expires": {
  20712. "type": "integer",
  20713. "minimum": 0
  20714. }
  20715. },
  20716. "required": ["type", "refresh", "access", "expires"],
  20717. "additionalProperties": false
  20718. },
  20719. "AccountV2ApiKeyCredential": {
  20720. "type": "object",
  20721. "properties": {
  20722. "type": {
  20723. "type": "string",
  20724. "enum": ["api"]
  20725. },
  20726. "key": {
  20727. "type": "string"
  20728. },
  20729. "metadata": {
  20730. "type": "object",
  20731. "additionalProperties": {
  20732. "type": "string"
  20733. }
  20734. }
  20735. },
  20736. "required": ["type", "key"],
  20737. "additionalProperties": false
  20738. },
  20739. "AccountV2Credential": {
  20740. "anyOf": [
  20741. {
  20742. "$ref": "#/components/schemas/AccountV2OAuthCredential"
  20743. },
  20744. {
  20745. "$ref": "#/components/schemas/AccountV2ApiKeyCredential"
  20746. }
  20747. ]
  20748. },
  20749. "AccountV2Info": {
  20750. "type": "object",
  20751. "properties": {
  20752. "id": {
  20753. "type": "string"
  20754. },
  20755. "serviceID": {
  20756. "type": "string"
  20757. },
  20758. "description": {
  20759. "type": "string"
  20760. },
  20761. "credential": {
  20762. "$ref": "#/components/schemas/AccountV2Credential"
  20763. }
  20764. },
  20765. "required": ["id", "serviceID", "description", "credential"],
  20766. "additionalProperties": false
  20767. },
  20768. "EventAccountAdded": {
  20769. "type": "object",
  20770. "properties": {
  20771. "id": {
  20772. "type": "string"
  20773. },
  20774. "type": {
  20775. "type": "string",
  20776. "enum": ["account.added"]
  20777. },
  20778. "properties": {
  20779. "type": "object",
  20780. "properties": {
  20781. "account": {
  20782. "$ref": "#/components/schemas/AccountV2Info"
  20783. }
  20784. },
  20785. "required": ["account"],
  20786. "additionalProperties": false
  20787. }
  20788. },
  20789. "required": ["id", "type", "properties"],
  20790. "additionalProperties": false
  20791. },
  20792. "EventAccountRemoved": {
  20793. "type": "object",
  20794. "properties": {
  20795. "id": {
  20796. "type": "string"
  20797. },
  20798. "type": {
  20799. "type": "string",
  20800. "enum": ["account.removed"]
  20801. },
  20802. "properties": {
  20803. "type": "object",
  20804. "properties": {
  20805. "account": {
  20806. "$ref": "#/components/schemas/AccountV2Info"
  20807. }
  20808. },
  20809. "required": ["account"],
  20810. "additionalProperties": false
  20811. }
  20812. },
  20813. "required": ["id", "type", "properties"],
  20814. "additionalProperties": false
  20815. },
  20816. "EventAccountSwitched": {
  20817. "type": "object",
  20818. "properties": {
  20819. "id": {
  20820. "type": "string"
  20821. },
  20822. "type": {
  20823. "type": "string",
  20824. "enum": ["account.switched"]
  20825. },
  20826. "properties": {
  20827. "type": "object",
  20828. "properties": {
  20829. "serviceID": {
  20830. "type": "string"
  20831. },
  20832. "from": {
  20833. "type": "string"
  20834. },
  20835. "to": {
  20836. "type": "string"
  20837. }
  20838. },
  20839. "required": ["serviceID"],
  20840. "additionalProperties": false
  20841. }
  20842. },
  20843. "required": ["id", "type", "properties"],
  20844. "additionalProperties": false
  20845. },
  20846. "SessionInfo": {
  20847. "type": "object",
  20848. "properties": {
  20849. "id": {
  20850. "type": "string",
  20851. "pattern": "^ses"
  20852. },
  20853. "parentID": {
  20854. "type": "string",
  20855. "pattern": "^ses"
  20856. },
  20857. "projectID": {
  20858. "type": "string"
  20859. },
  20860. "workspaceID": {
  20861. "type": "string",
  20862. "pattern": "^wrk"
  20863. },
  20864. "path": {
  20865. "type": "string"
  20866. },
  20867. "agent": {
  20868. "type": "string"
  20869. },
  20870. "model": {
  20871. "type": "object",
  20872. "properties": {
  20873. "id": {
  20874. "type": "string"
  20875. },
  20876. "providerID": {
  20877. "type": "string"
  20878. },
  20879. "variant": {
  20880. "type": "string"
  20881. }
  20882. },
  20883. "required": ["id", "providerID", "variant"],
  20884. "additionalProperties": false
  20885. },
  20886. "cost": {
  20887. "type": "number"
  20888. },
  20889. "tokens": {
  20890. "type": "object",
  20891. "properties": {
  20892. "input": {
  20893. "type": "number"
  20894. },
  20895. "output": {
  20896. "type": "number"
  20897. },
  20898. "reasoning": {
  20899. "type": "number"
  20900. },
  20901. "cache": {
  20902. "type": "object",
  20903. "properties": {
  20904. "read": {
  20905. "type": "number"
  20906. },
  20907. "write": {
  20908. "type": "number"
  20909. }
  20910. },
  20911. "required": ["read", "write"],
  20912. "additionalProperties": false
  20913. }
  20914. },
  20915. "required": ["input", "output", "reasoning", "cache"],
  20916. "additionalProperties": false
  20917. },
  20918. "time": {
  20919. "type": "object",
  20920. "properties": {
  20921. "created": {
  20922. "type": "number"
  20923. },
  20924. "updated": {
  20925. "type": "number"
  20926. },
  20927. "archived": {
  20928. "type": "number"
  20929. }
  20930. },
  20931. "required": ["created", "updated"],
  20932. "additionalProperties": false
  20933. },
  20934. "title": {
  20935. "type": "string"
  20936. }
  20937. },
  20938. "required": ["id", "projectID", "cost", "tokens", "time", "title"],
  20939. "additionalProperties": false
  20940. },
  20941. "SessionDelivery": {
  20942. "type": "string",
  20943. "enum": ["immediate", "deferred"]
  20944. },
  20945. "SessionMessageAgentSwitched": {
  20946. "type": "object",
  20947. "properties": {
  20948. "id": {
  20949. "type": "string"
  20950. },
  20951. "metadata": {
  20952. "type": "object"
  20953. },
  20954. "time": {
  20955. "type": "object",
  20956. "properties": {
  20957. "created": {
  20958. "type": "number"
  20959. }
  20960. },
  20961. "required": ["created"],
  20962. "additionalProperties": false
  20963. },
  20964. "type": {
  20965. "type": "string",
  20966. "enum": ["agent-switched"]
  20967. },
  20968. "agent": {
  20969. "type": "string"
  20970. }
  20971. },
  20972. "required": ["id", "time", "type", "agent"],
  20973. "additionalProperties": false
  20974. },
  20975. "SessionMessageModelSwitched": {
  20976. "type": "object",
  20977. "properties": {
  20978. "id": {
  20979. "type": "string"
  20980. },
  20981. "metadata": {
  20982. "type": "object"
  20983. },
  20984. "time": {
  20985. "type": "object",
  20986. "properties": {
  20987. "created": {
  20988. "type": "number"
  20989. }
  20990. },
  20991. "required": ["created"],
  20992. "additionalProperties": false
  20993. },
  20994. "type": {
  20995. "type": "string",
  20996. "enum": ["model-switched"]
  20997. },
  20998. "model": {
  20999. "type": "object",
  21000. "properties": {
  21001. "id": {
  21002. "type": "string"
  21003. },
  21004. "providerID": {
  21005. "type": "string"
  21006. },
  21007. "variant": {
  21008. "type": "string"
  21009. }
  21010. },
  21011. "required": ["id", "providerID", "variant"],
  21012. "additionalProperties": false
  21013. }
  21014. },
  21015. "required": ["id", "time", "type", "model"],
  21016. "additionalProperties": false
  21017. },
  21018. "SessionMessageUser": {
  21019. "type": "object",
  21020. "properties": {
  21021. "id": {
  21022. "type": "string"
  21023. },
  21024. "metadata": {
  21025. "type": "object"
  21026. },
  21027. "time": {
  21028. "type": "object",
  21029. "properties": {
  21030. "created": {
  21031. "type": "number"
  21032. }
  21033. },
  21034. "required": ["created"],
  21035. "additionalProperties": false
  21036. },
  21037. "text": {
  21038. "type": "string"
  21039. },
  21040. "files": {
  21041. "type": "array",
  21042. "items": {
  21043. "$ref": "#/components/schemas/PromptFileAttachment"
  21044. }
  21045. },
  21046. "agents": {
  21047. "type": "array",
  21048. "items": {
  21049. "$ref": "#/components/schemas/PromptAgentAttachment"
  21050. }
  21051. },
  21052. "references": {
  21053. "type": "array",
  21054. "items": {
  21055. "$ref": "#/components/schemas/PromptReferenceAttachment"
  21056. }
  21057. },
  21058. "type": {
  21059. "type": "string",
  21060. "enum": ["user"]
  21061. }
  21062. },
  21063. "required": ["id", "time", "text", "type"],
  21064. "additionalProperties": false
  21065. },
  21066. "SessionMessageSynthetic": {
  21067. "type": "object",
  21068. "properties": {
  21069. "id": {
  21070. "type": "string"
  21071. },
  21072. "metadata": {
  21073. "type": "object"
  21074. },
  21075. "time": {
  21076. "type": "object",
  21077. "properties": {
  21078. "created": {
  21079. "type": "number"
  21080. }
  21081. },
  21082. "required": ["created"],
  21083. "additionalProperties": false
  21084. },
  21085. "sessionID": {
  21086. "type": "string",
  21087. "pattern": "^ses"
  21088. },
  21089. "text": {
  21090. "type": "string"
  21091. },
  21092. "type": {
  21093. "type": "string",
  21094. "enum": ["synthetic"]
  21095. }
  21096. },
  21097. "required": ["id", "time", "sessionID", "text", "type"],
  21098. "additionalProperties": false
  21099. },
  21100. "SessionMessageShell": {
  21101. "type": "object",
  21102. "properties": {
  21103. "id": {
  21104. "type": "string"
  21105. },
  21106. "metadata": {
  21107. "type": "object"
  21108. },
  21109. "time": {
  21110. "type": "object",
  21111. "properties": {
  21112. "created": {
  21113. "type": "number"
  21114. },
  21115. "completed": {
  21116. "type": "number"
  21117. }
  21118. },
  21119. "required": ["created"],
  21120. "additionalProperties": false
  21121. },
  21122. "type": {
  21123. "type": "string",
  21124. "enum": ["shell"]
  21125. },
  21126. "callID": {
  21127. "type": "string"
  21128. },
  21129. "command": {
  21130. "type": "string"
  21131. },
  21132. "output": {
  21133. "type": "string"
  21134. }
  21135. },
  21136. "required": ["id", "time", "type", "callID", "command", "output"],
  21137. "additionalProperties": false
  21138. },
  21139. "SessionMessageAssistantText": {
  21140. "type": "object",
  21141. "properties": {
  21142. "type": {
  21143. "type": "string",
  21144. "enum": ["text"]
  21145. },
  21146. "text": {
  21147. "type": "string"
  21148. }
  21149. },
  21150. "required": ["type", "text"],
  21151. "additionalProperties": false
  21152. },
  21153. "SessionMessageAssistantReasoning": {
  21154. "type": "object",
  21155. "properties": {
  21156. "type": {
  21157. "type": "string",
  21158. "enum": ["reasoning"]
  21159. },
  21160. "id": {
  21161. "type": "string"
  21162. },
  21163. "text": {
  21164. "type": "string"
  21165. }
  21166. },
  21167. "required": ["type", "id", "text"],
  21168. "additionalProperties": false
  21169. },
  21170. "SessionMessageToolStatePending": {
  21171. "type": "object",
  21172. "properties": {
  21173. "status": {
  21174. "type": "string",
  21175. "enum": ["pending"]
  21176. },
  21177. "input": {
  21178. "type": "string"
  21179. }
  21180. },
  21181. "required": ["status", "input"],
  21182. "additionalProperties": false
  21183. },
  21184. "SessionMessageToolStateRunning": {
  21185. "type": "object",
  21186. "properties": {
  21187. "status": {
  21188. "type": "string",
  21189. "enum": ["running"]
  21190. },
  21191. "input": {
  21192. "type": "object"
  21193. },
  21194. "structured": {
  21195. "type": "object"
  21196. },
  21197. "content": {
  21198. "type": "array",
  21199. "items": {
  21200. "anyOf": [
  21201. {
  21202. "$ref": "#/components/schemas/ToolTextContent"
  21203. },
  21204. {
  21205. "$ref": "#/components/schemas/ToolFileContent"
  21206. }
  21207. ]
  21208. }
  21209. }
  21210. },
  21211. "required": ["status", "input", "structured", "content"],
  21212. "additionalProperties": false
  21213. },
  21214. "SessionMessageToolStateCompleted": {
  21215. "type": "object",
  21216. "properties": {
  21217. "status": {
  21218. "type": "string",
  21219. "enum": ["completed"]
  21220. },
  21221. "input": {
  21222. "type": "object"
  21223. },
  21224. "attachments": {
  21225. "type": "array",
  21226. "items": {
  21227. "$ref": "#/components/schemas/PromptFileAttachment"
  21228. }
  21229. },
  21230. "content": {
  21231. "type": "array",
  21232. "items": {
  21233. "anyOf": [
  21234. {
  21235. "$ref": "#/components/schemas/ToolTextContent"
  21236. },
  21237. {
  21238. "$ref": "#/components/schemas/ToolFileContent"
  21239. }
  21240. ]
  21241. }
  21242. },
  21243. "structured": {
  21244. "type": "object"
  21245. }
  21246. },
  21247. "required": ["status", "input", "content", "structured"],
  21248. "additionalProperties": false
  21249. },
  21250. "SessionMessageToolStateError": {
  21251. "type": "object",
  21252. "properties": {
  21253. "status": {
  21254. "type": "string",
  21255. "enum": ["error"]
  21256. },
  21257. "input": {
  21258. "type": "object"
  21259. },
  21260. "content": {
  21261. "type": "array",
  21262. "items": {
  21263. "anyOf": [
  21264. {
  21265. "$ref": "#/components/schemas/ToolTextContent"
  21266. },
  21267. {
  21268. "$ref": "#/components/schemas/ToolFileContent"
  21269. }
  21270. ]
  21271. }
  21272. },
  21273. "structured": {
  21274. "type": "object"
  21275. },
  21276. "error": {
  21277. "$ref": "#/components/schemas/SessionErrorUnknown"
  21278. }
  21279. },
  21280. "required": ["status", "input", "content", "structured", "error"],
  21281. "additionalProperties": false
  21282. },
  21283. "SessionMessageAssistantTool": {
  21284. "type": "object",
  21285. "properties": {
  21286. "type": {
  21287. "type": "string",
  21288. "enum": ["tool"]
  21289. },
  21290. "id": {
  21291. "type": "string"
  21292. },
  21293. "name": {
  21294. "type": "string"
  21295. },
  21296. "provider": {
  21297. "type": "object",
  21298. "properties": {
  21299. "executed": {
  21300. "type": "boolean"
  21301. },
  21302. "metadata": {
  21303. "type": "object"
  21304. }
  21305. },
  21306. "required": ["executed"],
  21307. "additionalProperties": false
  21308. },
  21309. "state": {
  21310. "anyOf": [
  21311. {
  21312. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  21313. },
  21314. {
  21315. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  21316. },
  21317. {
  21318. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  21319. },
  21320. {
  21321. "$ref": "#/components/schemas/SessionMessageToolStateError"
  21322. }
  21323. ]
  21324. },
  21325. "time": {
  21326. "type": "object",
  21327. "properties": {
  21328. "created": {
  21329. "type": "number"
  21330. },
  21331. "ran": {
  21332. "type": "number"
  21333. },
  21334. "completed": {
  21335. "type": "number"
  21336. },
  21337. "pruned": {
  21338. "type": "number"
  21339. }
  21340. },
  21341. "required": ["created"],
  21342. "additionalProperties": false
  21343. }
  21344. },
  21345. "required": ["type", "id", "name", "state", "time"],
  21346. "additionalProperties": false
  21347. },
  21348. "SessionMessageAssistant": {
  21349. "type": "object",
  21350. "properties": {
  21351. "id": {
  21352. "type": "string"
  21353. },
  21354. "metadata": {
  21355. "type": "object"
  21356. },
  21357. "time": {
  21358. "type": "object",
  21359. "properties": {
  21360. "created": {
  21361. "type": "number"
  21362. },
  21363. "completed": {
  21364. "type": "number"
  21365. }
  21366. },
  21367. "required": ["created"],
  21368. "additionalProperties": false
  21369. },
  21370. "type": {
  21371. "type": "string",
  21372. "enum": ["assistant"]
  21373. },
  21374. "agent": {
  21375. "type": "string"
  21376. },
  21377. "model": {
  21378. "type": "object",
  21379. "properties": {
  21380. "id": {
  21381. "type": "string"
  21382. },
  21383. "providerID": {
  21384. "type": "string"
  21385. },
  21386. "variant": {
  21387. "type": "string"
  21388. }
  21389. },
  21390. "required": ["id", "providerID", "variant"],
  21391. "additionalProperties": false
  21392. },
  21393. "content": {
  21394. "type": "array",
  21395. "items": {
  21396. "anyOf": [
  21397. {
  21398. "$ref": "#/components/schemas/SessionMessageAssistantText"
  21399. },
  21400. {
  21401. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  21402. },
  21403. {
  21404. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  21405. }
  21406. ]
  21407. }
  21408. },
  21409. "snapshot": {
  21410. "type": "object",
  21411. "properties": {
  21412. "start": {
  21413. "type": "string"
  21414. },
  21415. "end": {
  21416. "type": "string"
  21417. }
  21418. },
  21419. "additionalProperties": false
  21420. },
  21421. "finish": {
  21422. "type": "string"
  21423. },
  21424. "cost": {
  21425. "type": "number"
  21426. },
  21427. "tokens": {
  21428. "type": "object",
  21429. "properties": {
  21430. "input": {
  21431. "type": "number"
  21432. },
  21433. "output": {
  21434. "type": "number"
  21435. },
  21436. "reasoning": {
  21437. "type": "number"
  21438. },
  21439. "cache": {
  21440. "type": "object",
  21441. "properties": {
  21442. "read": {
  21443. "type": "number"
  21444. },
  21445. "write": {
  21446. "type": "number"
  21447. }
  21448. },
  21449. "required": ["read", "write"],
  21450. "additionalProperties": false
  21451. }
  21452. },
  21453. "required": ["input", "output", "reasoning", "cache"],
  21454. "additionalProperties": false
  21455. },
  21456. "error": {
  21457. "$ref": "#/components/schemas/SessionErrorUnknown"
  21458. }
  21459. },
  21460. "required": ["id", "time", "type", "agent", "model", "content"],
  21461. "additionalProperties": false
  21462. },
  21463. "SessionMessageCompaction": {
  21464. "type": "object",
  21465. "properties": {
  21466. "type": {
  21467. "type": "string",
  21468. "enum": ["compaction"]
  21469. },
  21470. "reason": {
  21471. "type": "string",
  21472. "enum": ["auto", "manual"]
  21473. },
  21474. "summary": {
  21475. "type": "string"
  21476. },
  21477. "include": {
  21478. "type": "string"
  21479. },
  21480. "id": {
  21481. "type": "string"
  21482. },
  21483. "metadata": {
  21484. "type": "object"
  21485. },
  21486. "time": {
  21487. "type": "object",
  21488. "properties": {
  21489. "created": {
  21490. "type": "number"
  21491. }
  21492. },
  21493. "required": ["created"],
  21494. "additionalProperties": false
  21495. }
  21496. },
  21497. "required": ["type", "reason", "summary", "id", "time"],
  21498. "additionalProperties": false
  21499. },
  21500. "SessionMessage": {
  21501. "anyOf": [
  21502. {
  21503. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  21504. },
  21505. {
  21506. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  21507. },
  21508. {
  21509. "$ref": "#/components/schemas/SessionMessageUser"
  21510. },
  21511. {
  21512. "$ref": "#/components/schemas/SessionMessageSynthetic"
  21513. },
  21514. {
  21515. "$ref": "#/components/schemas/SessionMessageShell"
  21516. },
  21517. {
  21518. "$ref": "#/components/schemas/SessionMessageAssistant"
  21519. },
  21520. {
  21521. "$ref": "#/components/schemas/SessionMessageCompaction"
  21522. }
  21523. ]
  21524. },
  21525. "ProviderV2Info": {
  21526. "type": "object",
  21527. "properties": {
  21528. "id": {
  21529. "type": "string"
  21530. },
  21531. "name": {
  21532. "type": "string"
  21533. },
  21534. "enabled": {
  21535. "anyOf": [
  21536. {
  21537. "type": "boolean",
  21538. "enum": [false]
  21539. },
  21540. {
  21541. "type": "object",
  21542. "properties": {
  21543. "via": {
  21544. "type": "string",
  21545. "enum": ["env"]
  21546. },
  21547. "name": {
  21548. "type": "string"
  21549. }
  21550. },
  21551. "required": ["via", "name"],
  21552. "additionalProperties": false
  21553. },
  21554. {
  21555. "type": "object",
  21556. "properties": {
  21557. "via": {
  21558. "type": "string",
  21559. "enum": ["account"]
  21560. },
  21561. "service": {
  21562. "type": "string"
  21563. }
  21564. },
  21565. "required": ["via", "service"],
  21566. "additionalProperties": false
  21567. },
  21568. {
  21569. "type": "object",
  21570. "properties": {
  21571. "via": {
  21572. "type": "string",
  21573. "enum": ["custom"]
  21574. },
  21575. "data": {
  21576. "type": "object"
  21577. }
  21578. },
  21579. "required": ["via", "data"],
  21580. "additionalProperties": false
  21581. }
  21582. ]
  21583. },
  21584. "env": {
  21585. "type": "array",
  21586. "items": {
  21587. "type": "string"
  21588. }
  21589. },
  21590. "endpoint": {
  21591. "anyOf": [
  21592. {
  21593. "type": "object",
  21594. "properties": {
  21595. "type": {
  21596. "type": "string",
  21597. "enum": ["unknown"]
  21598. }
  21599. },
  21600. "required": ["type"],
  21601. "additionalProperties": false
  21602. },
  21603. {
  21604. "type": "object",
  21605. "properties": {
  21606. "type": {
  21607. "type": "string",
  21608. "enum": ["openai/responses"]
  21609. },
  21610. "url": {
  21611. "type": "string"
  21612. },
  21613. "websocket": {
  21614. "type": "boolean"
  21615. }
  21616. },
  21617. "required": ["type", "url"],
  21618. "additionalProperties": false
  21619. },
  21620. {
  21621. "type": "object",
  21622. "properties": {
  21623. "type": {
  21624. "type": "string",
  21625. "enum": ["openai/completions"]
  21626. },
  21627. "url": {
  21628. "type": "string"
  21629. },
  21630. "reasoning": {
  21631. "anyOf": [
  21632. {
  21633. "type": "object",
  21634. "properties": {
  21635. "type": {
  21636. "type": "string",
  21637. "enum": ["reasoning_content"]
  21638. }
  21639. },
  21640. "required": ["type"],
  21641. "additionalProperties": false
  21642. },
  21643. {
  21644. "type": "object",
  21645. "properties": {
  21646. "type": {
  21647. "type": "string",
  21648. "enum": ["reasoning_details"]
  21649. }
  21650. },
  21651. "required": ["type"],
  21652. "additionalProperties": false
  21653. }
  21654. ]
  21655. }
  21656. },
  21657. "required": ["type", "url"],
  21658. "additionalProperties": false
  21659. },
  21660. {
  21661. "type": "object",
  21662. "properties": {
  21663. "type": {
  21664. "type": "string",
  21665. "enum": ["anthropic/messages"]
  21666. },
  21667. "url": {
  21668. "type": "string"
  21669. }
  21670. },
  21671. "required": ["type", "url"],
  21672. "additionalProperties": false
  21673. },
  21674. {
  21675. "type": "object",
  21676. "properties": {
  21677. "type": {
  21678. "type": "string",
  21679. "enum": ["aisdk"]
  21680. },
  21681. "package": {
  21682. "type": "string"
  21683. },
  21684. "url": {
  21685. "type": "string"
  21686. }
  21687. },
  21688. "required": ["type", "package"],
  21689. "additionalProperties": false
  21690. }
  21691. ]
  21692. },
  21693. "options": {
  21694. "type": "object",
  21695. "properties": {
  21696. "headers": {
  21697. "type": "object",
  21698. "additionalProperties": {
  21699. "type": "string"
  21700. }
  21701. },
  21702. "body": {
  21703. "type": "object"
  21704. },
  21705. "aisdk": {
  21706. "type": "object",
  21707. "properties": {
  21708. "provider": {
  21709. "type": "object"
  21710. },
  21711. "request": {
  21712. "type": "object"
  21713. }
  21714. },
  21715. "required": ["provider", "request"],
  21716. "additionalProperties": false
  21717. }
  21718. },
  21719. "required": ["headers", "body", "aisdk"],
  21720. "additionalProperties": false
  21721. }
  21722. },
  21723. "required": ["id", "name", "enabled", "env", "endpoint", "options"],
  21724. "additionalProperties": false
  21725. },
  21726. "EventTuiToastShow1": {
  21727. "type": "object",
  21728. "properties": {
  21729. "id": {
  21730. "type": "string"
  21731. },
  21732. "type": {
  21733. "type": "string",
  21734. "enum": ["tui.toast.show"]
  21735. },
  21736. "properties": {
  21737. "type": "object",
  21738. "properties": {
  21739. "title": {
  21740. "type": "string"
  21741. },
  21742. "message": {
  21743. "type": "string"
  21744. },
  21745. "variant": {
  21746. "type": "string",
  21747. "enum": ["info", "success", "warning", "error"]
  21748. },
  21749. "duration": {
  21750. "type": "integer",
  21751. "exclusiveMinimum": 0
  21752. }
  21753. },
  21754. "required": ["message", "variant"],
  21755. "additionalProperties": false
  21756. }
  21757. },
  21758. "required": ["id", "type", "properties"],
  21759. "additionalProperties": false
  21760. },
  21761. "ModelV2Info1": {
  21762. "type": "object",
  21763. "properties": {
  21764. "id": {
  21765. "type": "string"
  21766. },
  21767. "apiID": {
  21768. "type": "string"
  21769. },
  21770. "providerID": {
  21771. "type": "string"
  21772. },
  21773. "family": {
  21774. "type": "string"
  21775. },
  21776. "name": {
  21777. "type": "string"
  21778. },
  21779. "endpoint": {
  21780. "anyOf": [
  21781. {
  21782. "type": "object",
  21783. "properties": {
  21784. "type": {
  21785. "type": "string",
  21786. "enum": ["unknown"]
  21787. }
  21788. },
  21789. "required": ["type"],
  21790. "additionalProperties": false
  21791. },
  21792. {
  21793. "type": "object",
  21794. "properties": {
  21795. "type": {
  21796. "type": "string",
  21797. "enum": ["openai/responses"]
  21798. },
  21799. "url": {
  21800. "type": "string"
  21801. },
  21802. "websocket": {
  21803. "type": "boolean"
  21804. }
  21805. },
  21806. "required": ["type", "url"],
  21807. "additionalProperties": false
  21808. },
  21809. {
  21810. "type": "object",
  21811. "properties": {
  21812. "type": {
  21813. "type": "string",
  21814. "enum": ["openai/completions"]
  21815. },
  21816. "url": {
  21817. "type": "string"
  21818. },
  21819. "reasoning": {
  21820. "anyOf": [
  21821. {
  21822. "type": "object",
  21823. "properties": {
  21824. "type": {
  21825. "type": "string",
  21826. "enum": ["reasoning_content"]
  21827. }
  21828. },
  21829. "required": ["type"],
  21830. "additionalProperties": false
  21831. },
  21832. {
  21833. "type": "object",
  21834. "properties": {
  21835. "type": {
  21836. "type": "string",
  21837. "enum": ["reasoning_details"]
  21838. }
  21839. },
  21840. "required": ["type"],
  21841. "additionalProperties": false
  21842. }
  21843. ]
  21844. }
  21845. },
  21846. "required": ["type", "url"],
  21847. "additionalProperties": false
  21848. },
  21849. {
  21850. "type": "object",
  21851. "properties": {
  21852. "type": {
  21853. "type": "string",
  21854. "enum": ["anthropic/messages"]
  21855. },
  21856. "url": {
  21857. "type": "string"
  21858. }
  21859. },
  21860. "required": ["type", "url"],
  21861. "additionalProperties": false
  21862. },
  21863. {
  21864. "type": "object",
  21865. "properties": {
  21866. "type": {
  21867. "type": "string",
  21868. "enum": ["aisdk"]
  21869. },
  21870. "package": {
  21871. "type": "string"
  21872. },
  21873. "url": {
  21874. "type": "string"
  21875. }
  21876. },
  21877. "required": ["type", "package"],
  21878. "additionalProperties": false
  21879. }
  21880. ]
  21881. },
  21882. "capabilities": {
  21883. "type": "object",
  21884. "properties": {
  21885. "tools": {
  21886. "type": "boolean"
  21887. },
  21888. "input": {
  21889. "type": "array",
  21890. "items": {
  21891. "type": "string"
  21892. }
  21893. },
  21894. "output": {
  21895. "type": "array",
  21896. "items": {
  21897. "type": "string"
  21898. }
  21899. }
  21900. },
  21901. "required": ["tools", "input", "output"],
  21902. "additionalProperties": false
  21903. },
  21904. "options": {
  21905. "type": "object",
  21906. "properties": {
  21907. "headers": {
  21908. "type": "object",
  21909. "additionalProperties": {
  21910. "type": "string"
  21911. }
  21912. },
  21913. "body": {
  21914. "type": "object"
  21915. },
  21916. "aisdk": {
  21917. "type": "object",
  21918. "properties": {
  21919. "provider": {
  21920. "type": "object"
  21921. },
  21922. "request": {
  21923. "type": "object"
  21924. }
  21925. },
  21926. "required": ["provider", "request"],
  21927. "additionalProperties": false
  21928. },
  21929. "variant": {
  21930. "type": "string"
  21931. }
  21932. },
  21933. "required": ["headers", "body", "aisdk"],
  21934. "additionalProperties": false
  21935. },
  21936. "variants": {
  21937. "type": "array",
  21938. "items": {
  21939. "type": "object",
  21940. "properties": {
  21941. "id": {
  21942. "type": "string"
  21943. },
  21944. "headers": {
  21945. "type": "object",
  21946. "additionalProperties": {
  21947. "type": "string"
  21948. }
  21949. },
  21950. "body": {
  21951. "type": "object"
  21952. },
  21953. "aisdk": {
  21954. "type": "object",
  21955. "properties": {
  21956. "provider": {
  21957. "type": "object"
  21958. },
  21959. "request": {
  21960. "type": "object"
  21961. }
  21962. },
  21963. "required": ["provider", "request"],
  21964. "additionalProperties": false
  21965. }
  21966. },
  21967. "required": ["id", "headers", "body", "aisdk"],
  21968. "additionalProperties": false
  21969. }
  21970. },
  21971. "time": {
  21972. "type": "object",
  21973. "properties": {
  21974. "released": {
  21975. "anyOf": [
  21976. {
  21977. "type": "number"
  21978. },
  21979. {
  21980. "type": "string",
  21981. "enum": ["NaN"]
  21982. },
  21983. {
  21984. "type": "string",
  21985. "enum": ["Infinity"]
  21986. },
  21987. {
  21988. "type": "string",
  21989. "enum": ["-Infinity"]
  21990. }
  21991. ]
  21992. }
  21993. },
  21994. "required": ["released"],
  21995. "additionalProperties": false
  21996. },
  21997. "cost": {
  21998. "type": "array",
  21999. "items": {
  22000. "type": "object",
  22001. "properties": {
  22002. "tier": {
  22003. "type": "object",
  22004. "properties": {
  22005. "type": {
  22006. "type": "string",
  22007. "enum": ["context"]
  22008. },
  22009. "size": {
  22010. "type": "integer"
  22011. }
  22012. },
  22013. "required": ["type", "size"],
  22014. "additionalProperties": false
  22015. },
  22016. "input": {
  22017. "type": "number"
  22018. },
  22019. "output": {
  22020. "type": "number"
  22021. },
  22022. "cache": {
  22023. "type": "object",
  22024. "properties": {
  22025. "read": {
  22026. "type": "number"
  22027. },
  22028. "write": {
  22029. "type": "number"
  22030. }
  22031. },
  22032. "required": ["read", "write"],
  22033. "additionalProperties": false
  22034. }
  22035. },
  22036. "required": ["input", "output", "cache"],
  22037. "additionalProperties": false
  22038. }
  22039. },
  22040. "status": {
  22041. "type": "string",
  22042. "enum": ["alpha", "beta", "deprecated", "active"]
  22043. },
  22044. "enabled": {
  22045. "type": "boolean"
  22046. },
  22047. "limit": {
  22048. "type": "object",
  22049. "properties": {
  22050. "context": {
  22051. "type": "integer"
  22052. },
  22053. "input": {
  22054. "type": "integer"
  22055. },
  22056. "output": {
  22057. "type": "integer"
  22058. }
  22059. },
  22060. "required": ["context", "output"],
  22061. "additionalProperties": false
  22062. }
  22063. },
  22064. "required": [
  22065. "id",
  22066. "apiID",
  22067. "providerID",
  22068. "name",
  22069. "endpoint",
  22070. "capabilities",
  22071. "options",
  22072. "variants",
  22073. "time",
  22074. "cost",
  22075. "status",
  22076. "enabled",
  22077. "limit"
  22078. ],
  22079. "additionalProperties": false
  22080. },
  22081. "BadRequestError": {
  22082. "type": "object",
  22083. "required": ["name", "data"],
  22084. "properties": {
  22085. "name": {
  22086. "type": "string",
  22087. "enum": ["BadRequest"]
  22088. },
  22089. "data": {
  22090. "type": "object",
  22091. "required": ["message"],
  22092. "properties": {
  22093. "message": {
  22094. "type": "string"
  22095. },
  22096. "kind": {
  22097. "type": "string",
  22098. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  22099. }
  22100. }
  22101. }
  22102. }
  22103. }
  22104. }
  22105. },
  22106. "security": [],
  22107. "tags": [
  22108. {
  22109. "name": "control",
  22110. "description": "Control plane routes."
  22111. },
  22112. {
  22113. "name": "global",
  22114. "description": "Global server routes."
  22115. },
  22116. {
  22117. "name": "event",
  22118. "description": "Instance event stream route."
  22119. },
  22120. {
  22121. "name": "config",
  22122. "description": "Experimental HttpApi config routes."
  22123. },
  22124. {
  22125. "name": "experimental",
  22126. "description": "Experimental HttpApi read-only routes."
  22127. },
  22128. {
  22129. "name": "file",
  22130. "description": "Experimental HttpApi file routes."
  22131. },
  22132. {
  22133. "name": "instance",
  22134. "description": "Experimental HttpApi instance read routes."
  22135. },
  22136. {
  22137. "name": "mcp",
  22138. "description": "Experimental HttpApi MCP routes."
  22139. },
  22140. {
  22141. "name": "project",
  22142. "description": "Experimental HttpApi project routes."
  22143. },
  22144. {
  22145. "name": "pty",
  22146. "description": "Experimental HttpApi PTY routes."
  22147. },
  22148. {
  22149. "name": "question",
  22150. "description": "Question routes."
  22151. },
  22152. {
  22153. "name": "permission",
  22154. "description": "Experimental HttpApi permission routes."
  22155. },
  22156. {
  22157. "name": "provider",
  22158. "description": "Experimental HttpApi provider routes."
  22159. },
  22160. {
  22161. "name": "session",
  22162. "description": "Experimental HttpApi session routes."
  22163. },
  22164. {
  22165. "name": "sync",
  22166. "description": "Experimental HttpApi sync routes."
  22167. },
  22168. {
  22169. "name": "v2",
  22170. "description": "Experimental v2 routes."
  22171. },
  22172. {
  22173. "name": "v2 messages",
  22174. "description": "Experimental v2 message routes."
  22175. },
  22176. {
  22177. "name": "v2 models",
  22178. "description": "Experimental v2 model routes."
  22179. },
  22180. {
  22181. "name": "v2 providers",
  22182. "description": "Experimental v2 provider routes."
  22183. },
  22184. {
  22185. "name": "tui",
  22186. "description": "Experimental HttpApi TUI routes."
  22187. },
  22188. {
  22189. "name": "workspace",
  22190. "description": "Experimental HttpApi workspace routes."
  22191. },
  22192. {
  22193. "name": "pty",
  22194. "description": "PTY websocket route."
  22195. }
  22196. ]
  22197. }