openapi.json 1007 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077280782807928080280812808228083280842808528086280872808828089280902809128092280932809428095280962809728098280992810028101281022810328104281052810628107281082810928110281112811228113281142811528116281172811828119281202812128122281232812428125281262812728128281292813028131281322813328134281352813628137281382813928140281412814228143281442814528146281472814828149281502815128152281532815428155281562815728158281592816028161281622816328164281652816628167281682816928170281712817228173281742817528176281772817828179281802818128182281832818428185281862818728188281892819028191281922819328194281952819628197281982819928200282012820228203282042820528206282072820828209282102821128212282132821428215282162821728218282192822028221282222822328224282252822628227282282822928230282312823228233282342823528236282372823828239282402824128242282432824428245282462824728248282492825028251282522825328254282552825628257282582825928260282612826228263282642826528266282672826828269282702827128272282732827428275282762827728278282792828028281282822828328284282852828628287282882828928290282912829228293282942829528296282972829828299283002830128302283032830428305283062830728308283092831028311283122831328314283152831628317283182831928320283212832228323283242832528326283272832828329283302833128332283332833428335283362833728338283392834028341283422834328344283452834628347283482834928350283512835228353283542835528356283572835828359283602836128362283632836428365283662836728368283692837028371283722837328374283752837628377283782837928380283812838228383283842838528386283872838828389283902839128392283932839428395283962839728398283992840028401284022840328404284052840628407284082840928410284112841228413284142841528416284172841828419284202842128422284232842428425284262842728428284292843028431284322843328434284352843628437284382843928440284412844228443284442844528446284472844828449284502845128452284532845428455284562845728458284592846028461284622846328464284652846628467284682846928470284712847228473284742847528476284772847828479284802848128482284832848428485284862848728488284892849028491284922849328494284952849628497284982849928500285012850228503285042850528506285072850828509285102851128512285132851428515285162851728518285192852028521285222852328524285252852628527285282852928530285312853228533285342853528536285372853828539285402854128542285432854428545285462854728548285492855028551285522855328554285552855628557285582855928560285612856228563285642856528566285672856828569285702857128572285732857428575285762857728578285792858028581285822858328584285852858628587285882858928590285912859228593285942859528596285972859828599286002860128602286032860428605286062860728608286092861028611286122861328614286152861628617286182861928620286212862228623286242862528626286272862828629286302863128632286332863428635286362863728638286392864028641286422864328644286452864628647286482864928650286512865228653286542865528656286572865828659286602866128662286632866428665286662866728668286692867028671286722867328674286752867628677286782867928680286812868228683286842868528686286872868828689286902869128692286932869428695286962869728698286992870028701287022870328704287052870628707287082870928710287112871228713287142871528716287172871828719287202872128722287232872428725287262872728728287292873028731287322873328734287352873628737287382873928740287412874228743287442874528746287472874828749287502875128752287532875428755287562875728758287592876028761287622876328764287652876628767287682876928770287712877228773287742877528776287772877828779287802878128782287832878428785287862878728788287892879028791287922879328794287952879628797287982879928800288012880228803288042880528806288072880828809288102881128812288132881428815288162881728818288192882028821288222882328824288252882628827288282882928830288312883228833288342883528836288372883828839288402884128842288432884428845288462884728848288492885028851288522885328854288552885628857288582885928860288612886228863288642886528866288672886828869288702887128872288732887428875288762887728878288792888028881288822888328884288852888628887288882888928890288912889228893288942889528896288972889828899289002890128902289032890428905289062890728908289092891028911289122891328914289152891628917289182891928920289212892228923289242892528926289272892828929289302893128932289332893428935289362893728938289392894028941289422894328944289452894628947289482894928950289512895228953289542895528956289572895828959289602896128962289632896428965289662896728968289692897028971289722897328974289752897628977289782897928980289812898228983289842898528986289872898828989289902899128992289932899428995289962899728998289992900029001290022900329004290052900629007290082900929010290112901229013290142901529016290172901829019290202902129022290232902429025290262902729028290292903029031290322903329034290352903629037290382903929040290412904229043290442904529046290472904829049290502905129052290532905429055290562905729058290592906029061290622906329064290652906629067290682906929070290712907229073290742907529076290772907829079290802908129082290832908429085290862908729088290892909029091290922909329094290952909629097290982909929100291012910229103291042910529106291072910829109291102911129112291132911429115291162911729118291192912029121291222912329124291252912629127291282912929130291312913229133291342913529136291372913829139291402914129142291432914429145291462914729148291492915029151291522915329154291552915629157291582915929160291612916229163291642916529166291672916829169291702917129172291732917429175291762917729178291792918029181291822918329184291852918629187291882918929190291912919229193291942919529196291972919829199292002920129202292032920429205292062920729208292092921029211292122921329214292152921629217292182921929220292212922229223292242922529226292272922829229292302923129232292332923429235292362923729238292392924029241292422924329244292452924629247292482924929250292512925229253292542925529256292572925829259292602926129262292632926429265292662926729268292692927029271292722927329274292752927629277292782927929280292812928229283292842928529286292872928829289292902929129292292932929429295292962929729298292992930029301293022930329304293052930629307293082930929310293112931229313293142931529316293172931829319293202932129322293232932429325293262932729328293292933029331293322933329334293352933629337293382933929340293412934229343293442934529346293472934829349293502935129352293532935429355293562935729358293592936029361293622936329364293652936629367293682936929370293712937229373293742937529376293772937829379293802938129382293832938429385293862938729388293892939029391293922939329394293952939629397293982939929400294012940229403294042940529406294072940829409294102941129412294132941429415294162941729418294192942029421294222942329424294252942629427294282942929430294312943229433294342943529436294372943829439294402944129442294432944429445294462944729448294492945029451294522945329454294552945629457294582945929460294612946229463294642946529466294672946829469294702947129472294732947429475294762947729478294792948029481294822948329484294852948629487294882948929490294912949229493294942949529496294972949829499295002950129502295032950429505295062950729508295092951029511295122951329514295152951629517295182951929520295212952229523295242952529526295272952829529295302953129532295332953429535295362953729538295392954029541295422954329544295452954629547295482954929550295512955229553295542955529556295572955829559295602956129562295632956429565295662956729568295692957029571295722957329574295752957629577295782957929580295812958229583295842958529586295872958829589295902959129592295932959429595295962959729598295992960029601296022960329604296052960629607296082960929610296112961229613296142961529616296172961829619296202962129622296232962429625296262962729628296292963029631296322963329634296352963629637296382963929640296412964229643296442964529646296472964829649296502965129652296532965429655296562965729658296592966029661296622966329664296652966629667296682966929670296712967229673296742967529676296772967829679296802968129682296832968429685296862968729688296892969029691296922969329694296952969629697296982969929700297012970229703297042970529706297072970829709297102971129712297132971429715297162971729718297192972029721297222972329724297252972629727297282972929730297312973229733297342973529736297372973829739297402974129742297432974429745297462974729748297492975029751297522975329754297552975629757297582975929760297612976229763297642976529766297672976829769297702977129772297732977429775297762977729778297792978029781297822978329784297852978629787297882978929790297912979229793297942979529796297972979829799298002980129802298032980429805298062980729808298092981029811298122981329814298152981629817298182981929820298212982229823298242982529826298272982829829298302983129832298332983429835298362983729838298392984029841298422984329844298452984629847298482984929850298512985229853298542985529856298572985829859298602986129862298632986429865298662986729868298692987029871298722987329874298752987629877298782987929880298812988229883298842988529886298872988829889298902989129892298932989429895298962989729898298992990029901299022990329904299052990629907299082990929910299112991229913299142991529916299172991829919299202992129922299232992429925299262992729928299292993029931299322993329934299352993629937299382993929940299412994229943299442994529946299472994829949299502995129952299532995429955299562995729958299592996029961299622996329964299652996629967299682996929970299712997229973299742997529976299772997829979299802998129982299832998429985299862998729988299892999029991299922999329994299952999629997299982999930000300013000230003300043000530006300073000830009300103001130012300133001430015300163001730018300193002030021300223002330024300253002630027300283002930030300313003230033300343003530036300373003830039300403004130042300433004430045300463004730048300493005030051300523005330054300553005630057300583005930060300613006230063300643006530066300673006830069300703007130072300733007430075300763007730078300793008030081300823008330084300853008630087300883008930090300913009230093300943009530096300973009830099301003010130102301033010430105301063010730108301093011030111301123011330114301153011630117301183011930120301213012230123301243012530126301273012830129301303013130132301333013430135301363013730138301393014030141301423014330144301453014630147301483014930150301513015230153301543015530156301573015830159301603016130162301633016430165301663016730168301693017030171301723017330174301753017630177301783017930180301813018230183301843018530186301873018830189301903019130192301933019430195301963019730198301993020030201302023020330204302053020630207302083020930210302113021230213302143021530216302173021830219302203022130222302233022430225302263022730228302293023030231302323023330234302353023630237302383023930240302413024230243302443024530246302473024830249302503025130252302533025430255302563025730258302593026030261302623026330264302653026630267302683026930270302713027230273302743027530276302773027830279302803028130282302833028430285302863028730288302893029030291302923029330294302953029630297302983029930300303013030230303303043030530306303073030830309303103031130312303133031430315303163031730318303193032030321303223032330324303253032630327303283032930330303313033230333303343033530336303373033830339303403034130342303433034430345303463034730348303493035030351303523035330354303553035630357303583035930360303613036230363303643036530366303673036830369303703037130372303733037430375303763037730378303793038030381303823038330384303853038630387303883038930390303913039230393303943039530396303973039830399304003040130402304033040430405304063040730408304093041030411304123041330414304153041630417304183041930420304213042230423304243042530426304273042830429304303043130432304333043430435304363043730438304393044030441304423044330444304453044630447304483044930450304513045230453304543045530456304573045830459304603046130462304633046430465304663046730468304693047030471304723047330474304753047630477304783047930480304813048230483304843048530486304873048830489304903049130492304933049430495304963049730498304993050030501305023050330504305053050630507305083050930510305113051230513305143051530516305173051830519305203052130522305233052430525305263052730528305293053030531305323053330534305353053630537305383053930540305413054230543305443054530546305473054830549305503055130552305533055430555305563055730558305593056030561305623056330564305653056630567305683056930570305713057230573305743057530576305773057830579305803058130582305833058430585305863058730588305893059030591305923059330594305953059630597305983059930600306013060230603306043060530606306073060830609306103061130612306133061430615306163061730618306193062030621306223062330624306253062630627306283062930630306313063230633306343063530636306373063830639306403064130642306433064430645306463064730648306493065030651306523065330654306553065630657306583065930660306613066230663306643066530666306673066830669306703067130672306733067430675306763067730678306793068030681306823068330684306853068630687306883068930690306913069230693306943069530696306973069830699307003070130702307033070430705307063070730708307093071030711307123071330714307153071630717307183071930720307213072230723307243072530726307273072830729307303073130732307333073430735307363073730738307393074030741307423074330744307453074630747307483074930750307513075230753307543075530756307573075830759307603076130762307633076430765307663076730768307693077030771307723077330774307753077630777307783077930780307813078230783307843078530786307873078830789307903079130792307933079430795307963079730798307993080030801308023080330804308053080630807308083080930810308113081230813308143081530816308173081830819308203082130822308233082430825308263082730828308293083030831308323083330834308353083630837308383083930840308413084230843308443084530846308473084830849308503085130852308533085430855308563085730858308593086030861308623086330864308653086630867308683086930870308713087230873308743087530876308773087830879308803088130882308833088430885308863088730888308893089030891308923089330894308953089630897308983089930900309013090230903309043090530906309073090830909309103091130912309133091430915309163091730918309193092030921309223092330924309253092630927309283092930930309313093230933309343093530936309373093830939309403094130942309433094430945309463094730948309493095030951309523095330954309553095630957309583095930960309613096230963309643096530966309673096830969309703097130972309733097430975309763097730978309793098030981309823098330984309853098630987309883098930990309913099230993309943099530996309973099830999310003100131002310033100431005310063100731008310093101031011310123101331014310153101631017310183101931020310213102231023310243102531026310273102831029310303103131032310333103431035310363103731038310393104031041310423104331044310453104631047310483104931050310513105231053310543105531056310573105831059310603106131062310633106431065310663106731068310693107031071310723107331074310753107631077310783107931080310813108231083310843108531086310873108831089310903109131092310933109431095310963109731098310993110031101311023110331104311053110631107311083110931110311113111231113311143111531116311173111831119311203112131122311233112431125311263112731128311293113031131311323113331134311353113631137311383113931140311413114231143311443114531146311473114831149311503115131152311533115431155311563115731158311593116031161311623116331164311653116631167311683116931170311713117231173311743117531176311773117831179311803118131182311833118431185311863118731188311893119031191311923119331194311953119631197311983119931200312013120231203312043120531206312073120831209312103121131212312133121431215312163121731218312193122031221312223122331224312253122631227312283122931230312313123231233312343123531236312373123831239312403124131242312433124431245312463124731248312493125031251312523125331254312553125631257312583125931260312613126231263312643126531266312673126831269312703127131272312733127431275312763127731278312793128031281312823128331284312853128631287312883128931290312913129231293312943129531296312973129831299313003130131302313033130431305313063130731308313093131031311313123131331314313153131631317313183131931320313213132231323313243132531326313273132831329313303133131332313333133431335313363133731338313393134031341313423134331344313453134631347313483134931350313513135231353313543135531356313573135831359313603136131362313633136431365313663136731368313693137031371313723137331374313753137631377313783137931380313813138231383313843138531386313873138831389313903139131392313933139431395313963139731398313993140031401314023140331404314053140631407314083140931410314113141231413314143141531416314173141831419314203142131422314233142431425314263142731428314293143031431314323143331434314353143631437314383143931440314413144231443314443144531446314473144831449314503145131452314533145431455314563145731458314593146031461314623146331464314653146631467314683146931470314713147231473314743147531476314773147831479314803148131482314833148431485314863148731488314893149031491314923149331494314953149631497314983149931500315013150231503315043150531506315073150831509315103151131512315133151431515315163151731518315193152031521315223152331524315253152631527315283152931530315313153231533315343153531536315373153831539315403154131542315433154431545315463154731548315493155031551315523155331554315553155631557315583155931560315613156231563315643156531566315673156831569315703157131572315733157431575315763157731578315793158031581315823158331584315853158631587315883158931590315913159231593315943159531596315973159831599316003160131602316033160431605316063160731608316093161031611316123161331614316153161631617316183161931620316213162231623316243162531626316273162831629316303163131632316333163431635316363163731638316393164031641316423164331644316453164631647316483164931650316513165231653316543165531656316573165831659316603166131662316633166431665316663166731668316693167031671316723167331674316753167631677316783167931680316813168231683316843168531686316873168831689316903169131692316933169431695316963169731698316993170031701317023170331704317053170631707317083170931710317113171231713317143171531716317173171831719317203172131722317233172431725317263172731728317293173031731317323173331734317353173631737317383173931740317413174231743317443174531746317473174831749317503175131752317533175431755317563175731758317593176031761317623176331764317653176631767317683176931770317713177231773317743177531776317773177831779317803178131782317833178431785317863178731788317893179031791317923179331794317953179631797317983179931800318013180231803318043180531806318073180831809318103181131812318133181431815318163181731818318193182031821318223182331824318253182631827318283182931830318313183231833318343183531836318373183831839318403184131842318433184431845318463184731848318493185031851318523185331854318553185631857318583185931860318613186231863318643186531866318673186831869318703187131872318733187431875318763187731878318793188031881318823188331884318853188631887318883188931890318913189231893318943189531896318973189831899319003190131902319033190431905319063190731908319093191031911319123191331914319153191631917319183191931920319213192231923319243192531926319273192831929319303193131932319333193431935319363193731938319393194031941319423194331944319453194631947319483194931950319513195231953319543195531956319573195831959319603196131962319633196431965319663196731968319693197031971319723197331974319753197631977319783197931980319813198231983319843198531986319873198831989319903199131992319933199431995319963199731998319993200032001320023200332004320053200632007320083200932010320113201232013320143201532016320173201832019320203202132022320233202432025320263202732028320293203032031320323203332034320353203632037320383203932040320413204232043320443204532046320473204832049320503205132052320533205432055320563205732058320593206032061320623206332064320653206632067320683206932070320713207232073320743207532076320773207832079320803208132082320833208432085320863208732088320893209032091320923209332094320953209632097320983209932100321013210232103321043210532106321073210832109321103211132112321133211432115321163211732118321193212032121321223212332124321253212632127321283212932130321313213232133321343213532136321373213832139321403214132142321433214432145321463214732148321493215032151321523215332154321553215632157321583215932160321613216232163321643216532166321673216832169321703217132172321733217432175321763217732178321793218032181321823218332184321853218632187321883218932190321913219232193321943219532196321973219832199322003220132202322033220432205322063220732208322093221032211322123221332214322153221632217322183221932220322213222232223322243222532226322273222832229322303223132232322333223432235322363223732238322393224032241322423224332244322453224632247322483224932250322513225232253322543225532256322573225832259322603226132262322633226432265322663226732268322693227032271322723227332274322753227632277322783227932280322813228232283322843228532286322873228832289322903229132292322933229432295322963229732298322993230032301323023230332304323053230632307323083230932310323113231232313323143231532316323173231832319323203232132322323233232432325323263232732328323293233032331323323233332334323353233632337323383233932340323413234232343323443234532346323473234832349323503235132352323533235432355323563235732358323593236032361323623236332364323653236632367323683236932370323713237232373323743237532376323773237832379323803238132382323833238432385323863238732388323893239032391323923239332394323953239632397323983239932400324013240232403324043240532406324073240832409324103241132412324133241432415324163241732418324193242032421324223242332424324253242632427324283242932430324313243232433324343243532436324373243832439324403244132442324433244432445324463244732448324493245032451324523245332454324553245632457324583245932460324613246232463324643246532466324673246832469324703247132472324733247432475324763247732478324793248032481324823248332484324853248632487324883248932490324913249232493324943249532496324973249832499325003250132502325033250432505325063250732508325093251032511325123251332514325153251632517325183251932520325213252232523325243252532526325273252832529325303253132532325333253432535325363253732538325393254032541325423254332544325453254632547325483254932550325513255232553325543255532556325573255832559325603256132562325633256432565325663256732568325693257032571325723257332574325753257632577325783257932580325813258232583325843258532586325873258832589325903259132592325933259432595325963259732598325993260032601326023260332604326053260632607326083260932610326113261232613326143261532616326173261832619326203262132622326233262432625326263262732628326293263032631326323263332634326353263632637326383263932640326413264232643326443264532646326473264832649326503265132652326533265432655326563265732658326593266032661326623266332664326653266632667326683266932670326713267232673326743267532676326773267832679326803268132682326833268432685326863268732688326893269032691326923269332694326953269632697326983269932700327013270232703327043270532706327073270832709327103271132712327133271432715327163271732718327193272032721327223272332724327253272632727327283272932730327313273232733327343273532736327373273832739327403274132742327433274432745327463274732748327493275032751327523275332754327553275632757327583275932760327613276232763327643276532766327673276832769327703277132772327733277432775327763277732778327793278032781327823278332784327853278632787327883278932790327913279232793327943279532796327973279832799328003280132802328033280432805328063280732808328093281032811328123281332814328153281632817328183281932820328213282232823328243282532826328273282832829328303283132832328333283432835328363283732838328393284032841328423284332844328453284632847328483284932850328513285232853328543285532856328573285832859328603286132862328633286432865328663286732868328693287032871328723287332874328753287632877328783287932880328813288232883328843288532886328873288832889328903289132892328933289432895328963289732898328993290032901329023290332904329053290632907329083290932910329113291232913329143291532916329173291832919329203292132922329233292432925329263292732928329293293032931329323293332934329353293632937329383293932940329413294232943329443294532946329473294832949329503295132952329533295432955329563295732958329593296032961329623296332964329653296632967329683296932970329713297232973329743297532976329773297832979329803298132982329833298432985329863298732988329893299032991329923299332994329953299632997329983299933000330013300233003330043300533006330073300833009330103301133012330133301433015330163301733018330193302033021330223302333024330253302633027330283302933030330313303233033330343303533036330373303833039330403304133042330433304433045330463304733048330493305033051330523305333054330553305633057330583305933060330613306233063330643306533066330673306833069330703307133072330733307433075330763307733078330793308033081330823308333084330853308633087330883308933090330913309233093330943309533096330973309833099331003310133102331033310433105331063310733108331093311033111331123311333114331153311633117331183311933120331213312233123331243312533126331273312833129331303313133132331333313433135331363313733138331393314033141331423314333144331453314633147331483314933150331513315233153331543315533156331573315833159331603316133162331633316433165331663316733168331693317033171331723317333174331753317633177331783317933180331813318233183331843318533186331873318833189331903319133192331933319433195331963319733198331993320033201332023320333204332053320633207332083320933210332113321233213332143321533216332173321833219332203322133222332233322433225332263322733228332293323033231332323323333234332353323633237332383323933240332413324233243332443324533246332473324833249332503325133252332533325433255332563325733258332593326033261332623326333264332653326633267332683326933270332713327233273332743327533276332773327833279332803328133282332833328433285332863328733288332893329033291332923329333294332953329633297332983329933300333013330233303333043330533306333073330833309333103331133312333133331433315333163331733318333193332033321333223332333324333253332633327333283332933330333313333233333333343333533336333373333833339333403334133342333433334433345333463334733348333493335033351333523335333354333553335633357333583335933360333613336233363333643336533366333673336833369333703337133372333733337433375333763337733378333793338033381333823338333384333853338633387333883338933390333913339233393333943339533396333973339833399334003340133402334033340433405334063340733408334093341033411334123341333414334153341633417334183341933420334213342233423334243342533426334273342833429334303343133432334333343433435334363343733438334393344033441334423344333444334453344633447334483344933450334513345233453334543345533456334573345833459334603346133462334633346433465334663346733468334693347033471334723347333474334753347633477334783347933480334813348233483334843348533486334873348833489334903349133492334933349433495334963349733498334993350033501335023350333504335053350633507335083350933510335113351233513335143351533516335173351833519335203352133522335233352433525335263352733528335293353033531335323353333534335353353633537335383353933540335413354233543335443354533546335473354833549335503355133552335533355433555335563355733558335593356033561335623356333564335653356633567335683356933570335713357233573335743357533576335773357833579335803358133582335833358433585335863358733588335893359033591335923359333594335953359633597335983359933600336013360233603336043360533606336073360833609336103361133612336133361433615336163361733618336193362033621336223362333624336253362633627336283362933630336313363233633336343363533636336373363833639336403364133642336433364433645336463364733648336493365033651336523365333654336553365633657336583365933660336613366233663336643366533666336673366833669336703367133672336733367433675336763367733678336793368033681336823368333684336853368633687336883368933690336913369233693336943369533696336973369833699337003370133702337033370433705337063370733708337093371033711337123371333714337153371633717337183371933720337213372233723337243372533726337273372833729337303373133732337333373433735337363373733738337393374033741337423374333744337453374633747337483374933750337513375233753337543375533756337573375833759337603376133762337633376433765337663376733768337693377033771337723377333774337753377633777337783377933780337813378233783337843378533786337873378833789337903379133792337933379433795337963379733798337993380033801338023380333804338053380633807338083380933810338113381233813338143381533816338173381833819338203382133822338233382433825338263382733828338293383033831338323383333834338353383633837338383383933840338413384233843338443384533846338473384833849338503385133852338533385433855338563385733858338593386033861338623386333864338653386633867338683386933870338713387233873338743387533876338773387833879338803388133882338833388433885338863388733888338893389033891338923389333894338953389633897338983389933900339013390233903339043390533906339073390833909339103391133912339133391433915339163391733918339193392033921339223392333924339253392633927339283392933930339313393233933339343393533936339373393833939339403394133942339433394433945339463394733948339493395033951339523395333954339553395633957339583395933960339613396233963339643396533966339673396833969339703397133972339733397433975339763397733978339793398033981339823398333984339853398633987339883398933990339913399233993339943399533996339973399833999340003400134002340033400434005340063400734008340093401034011340123401334014340153401634017340183401934020340213402234023340243402534026340273402834029340303403134032340333403434035340363403734038340393404034041340423404334044340453404634047340483404934050340513405234053340543405534056340573405834059340603406134062340633406434065340663406734068340693407034071340723407334074340753407634077340783407934080340813408234083340843408534086340873408834089340903409134092340933409434095340963409734098340993410034101341023410334104341053410634107341083410934110341113411234113341143411534116341173411834119341203412134122341233412434125341263412734128341293413034131341323413334134341353413634137341383413934140341413414234143341443414534146341473414834149341503415134152341533415434155341563415734158341593416034161341623416334164341653416634167341683416934170341713417234173341743417534176341773417834179341803418134182341833418434185341863418734188341893419034191341923419334194341953419634197341983419934200342013420234203342043420534206342073420834209342103421134212342133421434215342163421734218342193422034221342223422334224342253422634227342283422934230342313423234233342343423534236342373423834239342403424134242342433424434245342463424734248342493425034251342523425334254342553425634257342583425934260342613426234263342643426534266342673426834269342703427134272342733427434275342763427734278342793428034281342823428334284342853428634287342883428934290342913429234293342943429534296342973429834299343003430134302343033430434305343063430734308343093431034311343123431334314343153431634317343183431934320343213432234323343243432534326343273432834329343303433134332343333433434335343363433734338343393434034341343423434334344343453434634347343483434934350343513435234353343543435534356343573435834359343603436134362343633436434365343663436734368343693437034371343723437334374343753437634377343783437934380343813438234383343843438534386343873438834389343903439134392343933439434395343963439734398343993440034401344023440334404344053440634407344083440934410344113441234413344143441534416344173441834419344203442134422344233442434425344263442734428344293443034431344323443334434344353443634437344383443934440344413444234443344443444534446344473444834449344503445134452344533445434455344563445734458344593446034461344623446334464344653446634467344683446934470344713447234473344743447534476344773447834479344803448134482344833448434485344863448734488344893449034491344923449334494344953449634497344983449934500345013450234503345043450534506345073450834509345103451134512345133451434515345163451734518345193452034521345223452334524345253452634527345283452934530345313453234533345343453534536345373453834539345403454134542345433454434545345463454734548345493455034551345523455334554345553455634557345583455934560345613456234563345643456534566345673456834569345703457134572345733457434575345763457734578345793458034581345823458334584345853458634587345883458934590345913459234593345943459534596345973459834599346003460134602346033460434605346063460734608346093461034611346123461334614346153461634617346183461934620346213462234623346243462534626346273462834629346303463134632346333463434635346363463734638346393464034641346423464334644346453464634647346483464934650346513465234653346543465534656346573465834659346603466134662346633466434665346663466734668346693467034671346723467334674346753467634677346783467934680346813468234683346843468534686346873468834689346903469134692346933469434695346963469734698346993470034701347023470334704347053470634707347083470934710347113471234713347143471534716347173471834719347203472134722347233472434725347263472734728347293473034731347323473334734347353473634737347383473934740347413474234743347443474534746347473474834749347503475134752347533475434755347563475734758347593476034761347623476334764347653476634767347683476934770347713477234773347743477534776347773477834779347803478134782347833478434785347863478734788347893479034791347923479334794347953479634797347983479934800348013480234803348043480534806348073480834809348103481134812348133481434815348163481734818348193482034821348223482334824348253482634827348283482934830348313483234833348343483534836348373483834839348403484134842348433484434845348463484734848348493485034851348523485334854348553485634857348583485934860348613486234863348643486534866348673486834869348703487134872348733487434875348763487734878348793488034881348823488334884348853488634887348883488934890348913489234893348943489534896348973489834899349003490134902349033490434905349063490734908349093491034911349123491334914349153491634917349183491934920349213492234923349243492534926349273492834929349303493134932349333493434935349363493734938349393494034941349423494334944349453494634947349483494934950349513495234953349543495534956349573495834959349603496134962349633496434965349663496734968349693497034971349723497334974349753497634977349783497934980349813498234983349843498534986349873498834989349903499134992349933499434995349963499734998349993500035001350023500335004350053500635007350083500935010350113501235013350143501535016350173501835019350203502135022350233502435025350263502735028350293503035031350323503335034350353503635037350383503935040350413504235043350443504535046350473504835049350503505135052350533505435055350563505735058350593506035061350623506335064350653506635067350683506935070350713507235073350743507535076350773507835079350803508135082350833508435085350863508735088350893509035091350923509335094350953509635097350983509935100351013510235103351043510535106351073510835109351103511135112351133511435115351163511735118351193512035121351223512335124351253512635127351283512935130351313513235133351343513535136351373513835139351403514135142351433514435145351463514735148351493515035151351523515335154351553515635157351583515935160351613516235163351643516535166351673516835169351703517135172351733517435175351763517735178351793518035181351823518335184351853518635187351883518935190351913519235193351943519535196351973519835199352003520135202352033520435205352063520735208352093521035211352123521335214352153521635217352183521935220352213522235223352243522535226352273522835229352303523135232352333523435235352363523735238352393524035241352423524335244352453524635247352483524935250352513525235253352543525535256352573525835259352603526135262352633526435265352663526735268352693527035271352723527335274352753527635277352783527935280352813528235283352843528535286352873528835289352903529135292352933529435295352963529735298352993530035301353023530335304353053530635307353083530935310353113531235313353143531535316353173531835319353203532135322353233532435325353263532735328353293533035331353323533335334353353533635337353383533935340353413534235343353443534535346353473534835349353503535135352353533535435355353563535735358353593536035361353623536335364353653536635367353683536935370353713537235373353743537535376353773537835379353803538135382353833538435385353863538735388353893539035391353923539335394353953539635397353983539935400354013540235403354043540535406354073540835409354103541135412354133541435415354163541735418354193542035421354223542335424354253542635427354283542935430354313543235433354343543535436354373543835439354403544135442354433544435445354463544735448354493545035451354523545335454354553545635457354583545935460354613546235463354643546535466354673546835469354703547135472354733547435475354763547735478354793548035481354823548335484354853548635487354883548935490354913549235493354943549535496354973549835499355003550135502355033550435505355063550735508355093551035511355123551335514355153551635517355183551935520355213552235523355243552535526355273552835529355303553135532355333553435535355363553735538355393554035541355423554335544355453554635547355483554935550355513555235553355543555535556355573555835559355603556135562355633556435565355663556735568355693557035571355723557335574355753557635577355783557935580355813558235583355843558535586355873558835589355903559135592355933559435595355963559735598355993560035601356023560335604356053560635607356083560935610356113561235613356143561535616356173561835619356203562135622356233562435625356263562735628356293563035631356323563335634356353563635637356383563935640356413564235643356443564535646356473564835649
  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. "/experimental/control-plane/move-session": {
  216. "post": {
  217. "tags": ["controlPlane"],
  218. "operationId": "experimental.controlPlane.moveSession",
  219. "parameters": [],
  220. "responses": {
  221. "204": {
  222. "description": "Session moved"
  223. },
  224. "400": {
  225. "description": "MoveSessionError | InvalidRequestError",
  226. "content": {
  227. "application/json": {
  228. "schema": {
  229. "anyOf": [
  230. {
  231. "$ref": "#/components/schemas/MoveSessionError"
  232. },
  233. {
  234. "$ref": "#/components/schemas/InvalidRequestError"
  235. }
  236. ]
  237. }
  238. }
  239. }
  240. }
  241. },
  242. "description": "Move a session to another project directory, optionally transferring local changes.",
  243. "summary": "Move session",
  244. "requestBody": {
  245. "content": {
  246. "application/json": {
  247. "schema": {
  248. "type": "object",
  249. "properties": {
  250. "sessionID": {
  251. "type": "string",
  252. "pattern": "^ses"
  253. },
  254. "destination": {
  255. "$ref": "#/components/schemas/MoveSessionDestination"
  256. },
  257. "moveChanges": {
  258. "type": "boolean"
  259. }
  260. },
  261. "required": ["sessionID", "destination"],
  262. "additionalProperties": false
  263. }
  264. }
  265. }
  266. },
  267. "x-codeSamples": [
  268. {
  269. "lang": "js",
  270. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.controlPlane.moveSession({\n ...\n})"
  271. }
  272. ]
  273. }
  274. },
  275. "/global/health": {
  276. "get": {
  277. "tags": ["global"],
  278. "operationId": "global.health",
  279. "parameters": [],
  280. "responses": {
  281. "200": {
  282. "description": "Health information",
  283. "content": {
  284. "application/json": {
  285. "schema": {
  286. "type": "object",
  287. "properties": {
  288. "healthy": {
  289. "type": "boolean",
  290. "enum": [true]
  291. },
  292. "version": {
  293. "type": "string"
  294. }
  295. },
  296. "required": ["healthy", "version"],
  297. "additionalProperties": false,
  298. "description": "Health information"
  299. }
  300. }
  301. }
  302. },
  303. "400": {
  304. "description": "Bad request",
  305. "content": {
  306. "application/json": {
  307. "schema": {
  308. "$ref": "#/components/schemas/BadRequestError"
  309. }
  310. }
  311. }
  312. }
  313. },
  314. "description": "Get health information about the OpenCode server.",
  315. "summary": "Get health",
  316. "x-codeSamples": [
  317. {
  318. "lang": "js",
  319. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.health({\n ...\n})"
  320. }
  321. ]
  322. }
  323. },
  324. "/global/event": {
  325. "get": {
  326. "tags": ["global"],
  327. "operationId": "global.event",
  328. "parameters": [],
  329. "responses": {
  330. "200": {
  331. "description": "Event stream",
  332. "content": {
  333. "text/event-stream": {
  334. "schema": {
  335. "$ref": "#/components/schemas/GlobalEvent"
  336. }
  337. }
  338. }
  339. },
  340. "400": {
  341. "description": "Bad request",
  342. "content": {
  343. "application/json": {
  344. "schema": {
  345. "$ref": "#/components/schemas/BadRequestError"
  346. }
  347. }
  348. }
  349. }
  350. },
  351. "description": "Subscribe to global events from the OpenCode system using server-sent events.",
  352. "summary": "Get global events",
  353. "x-codeSamples": [
  354. {
  355. "lang": "js",
  356. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.event({\n ...\n})"
  357. }
  358. ]
  359. }
  360. },
  361. "/global/config": {
  362. "get": {
  363. "tags": ["global"],
  364. "operationId": "global.config.get",
  365. "parameters": [],
  366. "responses": {
  367. "200": {
  368. "description": "Get global config info",
  369. "content": {
  370. "application/json": {
  371. "schema": {
  372. "$ref": "#/components/schemas/Config"
  373. }
  374. }
  375. }
  376. },
  377. "400": {
  378. "description": "Bad request",
  379. "content": {
  380. "application/json": {
  381. "schema": {
  382. "$ref": "#/components/schemas/BadRequestError"
  383. }
  384. }
  385. }
  386. }
  387. },
  388. "description": "Retrieve the current global OpenCode configuration settings and preferences.",
  389. "summary": "Get global configuration",
  390. "x-codeSamples": [
  391. {
  392. "lang": "js",
  393. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.get({\n ...\n})"
  394. }
  395. ]
  396. },
  397. "patch": {
  398. "tags": ["global"],
  399. "operationId": "global.config.update",
  400. "parameters": [],
  401. "responses": {
  402. "200": {
  403. "description": "Successfully updated global config",
  404. "content": {
  405. "application/json": {
  406. "schema": {
  407. "$ref": "#/components/schemas/Config"
  408. }
  409. }
  410. }
  411. },
  412. "400": {
  413. "description": "BadRequest | InvalidRequestError",
  414. "content": {
  415. "application/json": {
  416. "schema": {
  417. "anyOf": [
  418. {
  419. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  420. },
  421. {
  422. "$ref": "#/components/schemas/InvalidRequestError"
  423. }
  424. ]
  425. }
  426. }
  427. }
  428. }
  429. },
  430. "description": "Update global OpenCode configuration settings and preferences.",
  431. "summary": "Update global configuration",
  432. "requestBody": {
  433. "content": {
  434. "application/json": {
  435. "schema": {
  436. "$ref": "#/components/schemas/Config"
  437. }
  438. }
  439. }
  440. },
  441. "x-codeSamples": [
  442. {
  443. "lang": "js",
  444. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.update({\n ...\n})"
  445. }
  446. ]
  447. }
  448. },
  449. "/global/dispose": {
  450. "post": {
  451. "tags": ["global"],
  452. "operationId": "global.dispose",
  453. "parameters": [],
  454. "responses": {
  455. "200": {
  456. "description": "Global disposed",
  457. "content": {
  458. "application/json": {
  459. "schema": {
  460. "type": "boolean",
  461. "description": "Global disposed"
  462. }
  463. }
  464. }
  465. },
  466. "400": {
  467. "description": "Bad request",
  468. "content": {
  469. "application/json": {
  470. "schema": {
  471. "$ref": "#/components/schemas/BadRequestError"
  472. }
  473. }
  474. }
  475. }
  476. },
  477. "description": "Clean up and dispose all OpenCode instances, releasing all resources.",
  478. "summary": "Dispose instance",
  479. "x-codeSamples": [
  480. {
  481. "lang": "js",
  482. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.dispose({\n ...\n})"
  483. }
  484. ]
  485. }
  486. },
  487. "/global/upgrade": {
  488. "post": {
  489. "tags": ["global"],
  490. "operationId": "global.upgrade",
  491. "parameters": [],
  492. "responses": {
  493. "200": {
  494. "description": "Upgrade result",
  495. "content": {
  496. "application/json": {
  497. "schema": {
  498. "anyOf": [
  499. {
  500. "type": "object",
  501. "properties": {
  502. "success": {
  503. "type": "boolean",
  504. "enum": [true]
  505. },
  506. "version": {
  507. "type": "string"
  508. }
  509. },
  510. "required": ["success", "version"],
  511. "additionalProperties": false
  512. },
  513. {
  514. "type": "object",
  515. "properties": {
  516. "success": {
  517. "type": "boolean",
  518. "enum": [false]
  519. },
  520. "error": {
  521. "type": "string"
  522. }
  523. },
  524. "required": ["success", "error"],
  525. "additionalProperties": false
  526. }
  527. ],
  528. "description": "Upgrade result"
  529. }
  530. }
  531. }
  532. },
  533. "400": {
  534. "description": "BadRequest | InvalidRequestError",
  535. "content": {
  536. "application/json": {
  537. "schema": {
  538. "anyOf": [
  539. {
  540. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  541. },
  542. {
  543. "$ref": "#/components/schemas/InvalidRequestError"
  544. }
  545. ]
  546. }
  547. }
  548. }
  549. }
  550. },
  551. "description": "Upgrade opencode to the specified version or latest if not specified.",
  552. "summary": "Upgrade opencode",
  553. "requestBody": {
  554. "content": {
  555. "application/json": {
  556. "schema": {
  557. "type": "object",
  558. "properties": {
  559. "target": {
  560. "type": "string"
  561. }
  562. },
  563. "additionalProperties": false
  564. }
  565. }
  566. }
  567. },
  568. "x-codeSamples": [
  569. {
  570. "lang": "js",
  571. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.upgrade({\n ...\n})"
  572. }
  573. ]
  574. }
  575. },
  576. "/event": {
  577. "get": {
  578. "tags": ["event"],
  579. "operationId": "event.subscribe",
  580. "parameters": [
  581. {
  582. "name": "directory",
  583. "in": "query",
  584. "schema": {
  585. "type": "string"
  586. },
  587. "required": false
  588. },
  589. {
  590. "name": "workspace",
  591. "in": "query",
  592. "schema": {
  593. "type": "string"
  594. },
  595. "required": false
  596. }
  597. ],
  598. "responses": {
  599. "200": {
  600. "description": "Event stream",
  601. "content": {
  602. "text/event-stream": {
  603. "schema": {
  604. "$ref": "#/components/schemas/Event"
  605. }
  606. }
  607. }
  608. }
  609. },
  610. "description": "Get events",
  611. "summary": "Subscribe to events",
  612. "x-codeSamples": [
  613. {
  614. "lang": "js",
  615. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.event.subscribe({\n ...\n})"
  616. }
  617. ]
  618. }
  619. },
  620. "/config": {
  621. "get": {
  622. "tags": ["config"],
  623. "operationId": "config.get",
  624. "parameters": [
  625. {
  626. "name": "directory",
  627. "in": "query",
  628. "schema": {
  629. "type": "string"
  630. },
  631. "required": false
  632. },
  633. {
  634. "name": "workspace",
  635. "in": "query",
  636. "schema": {
  637. "type": "string"
  638. },
  639. "required": false
  640. }
  641. ],
  642. "responses": {
  643. "200": {
  644. "description": "Get config info",
  645. "content": {
  646. "application/json": {
  647. "schema": {
  648. "$ref": "#/components/schemas/Config"
  649. }
  650. }
  651. }
  652. },
  653. "400": {
  654. "description": "Bad request",
  655. "content": {
  656. "application/json": {
  657. "schema": {
  658. "$ref": "#/components/schemas/BadRequestError"
  659. }
  660. }
  661. }
  662. }
  663. },
  664. "description": "Retrieve the current OpenCode configuration settings and preferences.",
  665. "summary": "Get configuration",
  666. "x-codeSamples": [
  667. {
  668. "lang": "js",
  669. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.get({\n ...\n})"
  670. }
  671. ]
  672. },
  673. "patch": {
  674. "tags": ["config"],
  675. "operationId": "config.update",
  676. "parameters": [
  677. {
  678. "name": "directory",
  679. "in": "query",
  680. "schema": {
  681. "type": "string"
  682. },
  683. "required": false
  684. },
  685. {
  686. "name": "workspace",
  687. "in": "query",
  688. "schema": {
  689. "type": "string"
  690. },
  691. "required": false
  692. }
  693. ],
  694. "responses": {
  695. "200": {
  696. "description": "Successfully updated config",
  697. "content": {
  698. "application/json": {
  699. "schema": {
  700. "$ref": "#/components/schemas/Config"
  701. }
  702. }
  703. }
  704. },
  705. "400": {
  706. "description": "BadRequest | InvalidRequestError",
  707. "content": {
  708. "application/json": {
  709. "schema": {
  710. "anyOf": [
  711. {
  712. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  713. },
  714. {
  715. "$ref": "#/components/schemas/InvalidRequestError"
  716. }
  717. ]
  718. }
  719. }
  720. }
  721. }
  722. },
  723. "description": "Update OpenCode configuration settings and preferences.",
  724. "summary": "Update configuration",
  725. "requestBody": {
  726. "content": {
  727. "application/json": {
  728. "schema": {
  729. "$ref": "#/components/schemas/Config"
  730. }
  731. }
  732. }
  733. },
  734. "x-codeSamples": [
  735. {
  736. "lang": "js",
  737. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.update({\n ...\n})"
  738. }
  739. ]
  740. }
  741. },
  742. "/config/providers": {
  743. "get": {
  744. "tags": ["config"],
  745. "operationId": "config.providers",
  746. "parameters": [
  747. {
  748. "name": "directory",
  749. "in": "query",
  750. "schema": {
  751. "type": "string"
  752. },
  753. "required": false
  754. },
  755. {
  756. "name": "workspace",
  757. "in": "query",
  758. "schema": {
  759. "type": "string"
  760. },
  761. "required": false
  762. }
  763. ],
  764. "responses": {
  765. "200": {
  766. "description": "List of providers",
  767. "content": {
  768. "application/json": {
  769. "schema": {
  770. "type": "object",
  771. "properties": {
  772. "providers": {
  773. "type": "array",
  774. "items": {
  775. "$ref": "#/components/schemas/Provider"
  776. }
  777. },
  778. "default": {
  779. "type": "object",
  780. "additionalProperties": {
  781. "type": "string"
  782. }
  783. }
  784. },
  785. "required": ["providers", "default"],
  786. "additionalProperties": false,
  787. "description": "List of providers"
  788. }
  789. }
  790. }
  791. },
  792. "400": {
  793. "description": "Bad request",
  794. "content": {
  795. "application/json": {
  796. "schema": {
  797. "$ref": "#/components/schemas/BadRequestError"
  798. }
  799. }
  800. }
  801. }
  802. },
  803. "description": "Get a list of all configured AI providers and their default models.",
  804. "summary": "List config providers",
  805. "x-codeSamples": [
  806. {
  807. "lang": "js",
  808. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.providers({\n ...\n})"
  809. }
  810. ]
  811. }
  812. },
  813. "/experimental/capabilities": {
  814. "get": {
  815. "tags": ["experimental"],
  816. "operationId": "experimental.capabilities.get",
  817. "parameters": [
  818. {
  819. "name": "directory",
  820. "in": "query",
  821. "schema": {
  822. "type": "string"
  823. },
  824. "required": false
  825. },
  826. {
  827. "name": "workspace",
  828. "in": "query",
  829. "schema": {
  830. "type": "string"
  831. },
  832. "required": false
  833. }
  834. ],
  835. "responses": {
  836. "200": {
  837. "description": "Experimental capabilities",
  838. "content": {
  839. "application/json": {
  840. "schema": {
  841. "$ref": "#/components/schemas/ExperimentalCapabilities"
  842. }
  843. }
  844. }
  845. },
  846. "400": {
  847. "description": "Bad request",
  848. "content": {
  849. "application/json": {
  850. "schema": {
  851. "$ref": "#/components/schemas/BadRequestError"
  852. }
  853. }
  854. }
  855. }
  856. },
  857. "description": "Get experimental features enabled on the OpenCode server.",
  858. "summary": "Get experimental capabilities",
  859. "x-codeSamples": [
  860. {
  861. "lang": "js",
  862. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.capabilities.get({\n ...\n})"
  863. }
  864. ]
  865. }
  866. },
  867. "/experimental/console": {
  868. "get": {
  869. "tags": ["experimental"],
  870. "operationId": "experimental.console.get",
  871. "parameters": [
  872. {
  873. "name": "directory",
  874. "in": "query",
  875. "schema": {
  876. "type": "string"
  877. },
  878. "required": false
  879. },
  880. {
  881. "name": "workspace",
  882. "in": "query",
  883. "schema": {
  884. "type": "string"
  885. },
  886. "required": false
  887. }
  888. ],
  889. "responses": {
  890. "200": {
  891. "description": "Active Console provider metadata",
  892. "content": {
  893. "application/json": {
  894. "schema": {
  895. "$ref": "#/components/schemas/ConsoleState"
  896. }
  897. }
  898. }
  899. },
  900. "400": {
  901. "description": "Bad request",
  902. "content": {
  903. "application/json": {
  904. "schema": {
  905. "$ref": "#/components/schemas/BadRequestError"
  906. }
  907. }
  908. }
  909. },
  910. "500": {
  911. "description": "InternalServerError",
  912. "content": {
  913. "application/json": {
  914. "schema": {
  915. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  916. }
  917. }
  918. }
  919. }
  920. },
  921. "description": "Get the active Console org name and the set of provider IDs managed by that Console org.",
  922. "summary": "Get active Console provider metadata",
  923. "x-codeSamples": [
  924. {
  925. "lang": "js",
  926. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.get({\n ...\n})"
  927. }
  928. ]
  929. }
  930. },
  931. "/experimental/console/orgs": {
  932. "get": {
  933. "tags": ["experimental"],
  934. "operationId": "experimental.console.listOrgs",
  935. "parameters": [
  936. {
  937. "name": "directory",
  938. "in": "query",
  939. "schema": {
  940. "type": "string"
  941. },
  942. "required": false
  943. },
  944. {
  945. "name": "workspace",
  946. "in": "query",
  947. "schema": {
  948. "type": "string"
  949. },
  950. "required": false
  951. }
  952. ],
  953. "responses": {
  954. "200": {
  955. "description": "Switchable Console orgs",
  956. "content": {
  957. "application/json": {
  958. "schema": {
  959. "type": "object",
  960. "properties": {
  961. "orgs": {
  962. "type": "array",
  963. "items": {
  964. "type": "object",
  965. "properties": {
  966. "accountID": {
  967. "type": "string"
  968. },
  969. "accountEmail": {
  970. "type": "string"
  971. },
  972. "accountUrl": {
  973. "type": "string"
  974. },
  975. "orgID": {
  976. "type": "string"
  977. },
  978. "orgName": {
  979. "type": "string"
  980. },
  981. "active": {
  982. "type": "boolean"
  983. }
  984. },
  985. "required": ["accountID", "accountEmail", "accountUrl", "orgID", "orgName", "active"],
  986. "additionalProperties": false
  987. }
  988. }
  989. },
  990. "required": ["orgs"],
  991. "additionalProperties": false,
  992. "description": "Switchable Console orgs"
  993. }
  994. }
  995. }
  996. },
  997. "400": {
  998. "description": "Bad request",
  999. "content": {
  1000. "application/json": {
  1001. "schema": {
  1002. "$ref": "#/components/schemas/BadRequestError"
  1003. }
  1004. }
  1005. }
  1006. },
  1007. "500": {
  1008. "description": "InternalServerError",
  1009. "content": {
  1010. "application/json": {
  1011. "schema": {
  1012. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  1013. }
  1014. }
  1015. }
  1016. }
  1017. },
  1018. "description": "Get the available Console orgs across logged-in accounts, including the current active org.",
  1019. "summary": "List switchable Console orgs",
  1020. "x-codeSamples": [
  1021. {
  1022. "lang": "js",
  1023. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.listOrgs({\n ...\n})"
  1024. }
  1025. ]
  1026. }
  1027. },
  1028. "/experimental/console/switch": {
  1029. "post": {
  1030. "tags": ["experimental"],
  1031. "operationId": "experimental.console.switchOrg",
  1032. "parameters": [
  1033. {
  1034. "name": "directory",
  1035. "in": "query",
  1036. "schema": {
  1037. "type": "string"
  1038. },
  1039. "required": false
  1040. },
  1041. {
  1042. "name": "workspace",
  1043. "in": "query",
  1044. "schema": {
  1045. "type": "string"
  1046. },
  1047. "required": false
  1048. }
  1049. ],
  1050. "responses": {
  1051. "200": {
  1052. "description": "Switch success",
  1053. "content": {
  1054. "application/json": {
  1055. "schema": {
  1056. "type": "boolean",
  1057. "description": "Switch success"
  1058. }
  1059. }
  1060. }
  1061. }
  1062. },
  1063. "description": "Persist a new active Console account/org selection for the current local OpenCode state.",
  1064. "summary": "Switch active Console org",
  1065. "requestBody": {
  1066. "content": {
  1067. "application/json": {
  1068. "schema": {
  1069. "type": "object",
  1070. "properties": {
  1071. "accountID": {
  1072. "type": "string"
  1073. },
  1074. "orgID": {
  1075. "type": "string"
  1076. }
  1077. },
  1078. "required": ["accountID", "orgID"],
  1079. "additionalProperties": false
  1080. }
  1081. }
  1082. }
  1083. },
  1084. "x-codeSamples": [
  1085. {
  1086. "lang": "js",
  1087. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.switchOrg({\n ...\n})"
  1088. }
  1089. ]
  1090. }
  1091. },
  1092. "/experimental/tool": {
  1093. "get": {
  1094. "tags": ["experimental"],
  1095. "operationId": "tool.list",
  1096. "parameters": [
  1097. {
  1098. "name": "directory",
  1099. "in": "query",
  1100. "schema": {
  1101. "type": "string"
  1102. },
  1103. "required": false
  1104. },
  1105. {
  1106. "name": "workspace",
  1107. "in": "query",
  1108. "schema": {
  1109. "type": "string"
  1110. },
  1111. "required": false
  1112. },
  1113. {
  1114. "name": "provider",
  1115. "in": "query",
  1116. "schema": {
  1117. "type": "string"
  1118. },
  1119. "required": true
  1120. },
  1121. {
  1122. "name": "model",
  1123. "in": "query",
  1124. "schema": {
  1125. "type": "string"
  1126. },
  1127. "required": true
  1128. }
  1129. ],
  1130. "responses": {
  1131. "200": {
  1132. "description": "Tools",
  1133. "content": {
  1134. "application/json": {
  1135. "schema": {
  1136. "$ref": "#/components/schemas/ToolList"
  1137. }
  1138. }
  1139. }
  1140. },
  1141. "400": {
  1142. "description": "BadRequest | InvalidRequestError",
  1143. "content": {
  1144. "application/json": {
  1145. "schema": {
  1146. "anyOf": [
  1147. {
  1148. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1149. },
  1150. {
  1151. "$ref": "#/components/schemas/InvalidRequestError"
  1152. }
  1153. ]
  1154. }
  1155. }
  1156. }
  1157. }
  1158. },
  1159. "description": "Get a list of available tools with their JSON schema parameters for a specific provider and model combination.",
  1160. "summary": "List tools",
  1161. "x-codeSamples": [
  1162. {
  1163. "lang": "js",
  1164. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.list({\n ...\n})"
  1165. }
  1166. ]
  1167. }
  1168. },
  1169. "/experimental/tool/ids": {
  1170. "get": {
  1171. "tags": ["experimental"],
  1172. "operationId": "tool.ids",
  1173. "parameters": [
  1174. {
  1175. "name": "directory",
  1176. "in": "query",
  1177. "schema": {
  1178. "type": "string"
  1179. },
  1180. "required": false
  1181. },
  1182. {
  1183. "name": "workspace",
  1184. "in": "query",
  1185. "schema": {
  1186. "type": "string"
  1187. },
  1188. "required": false
  1189. }
  1190. ],
  1191. "responses": {
  1192. "200": {
  1193. "description": "Tool IDs",
  1194. "content": {
  1195. "application/json": {
  1196. "schema": {
  1197. "$ref": "#/components/schemas/ToolIDs"
  1198. }
  1199. }
  1200. }
  1201. },
  1202. "400": {
  1203. "description": "BadRequest | InvalidRequestError",
  1204. "content": {
  1205. "application/json": {
  1206. "schema": {
  1207. "anyOf": [
  1208. {
  1209. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1210. },
  1211. {
  1212. "$ref": "#/components/schemas/InvalidRequestError"
  1213. }
  1214. ]
  1215. }
  1216. }
  1217. }
  1218. }
  1219. },
  1220. "description": "Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.",
  1221. "summary": "List tool IDs",
  1222. "x-codeSamples": [
  1223. {
  1224. "lang": "js",
  1225. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.ids({\n ...\n})"
  1226. }
  1227. ]
  1228. }
  1229. },
  1230. "/experimental/worktree": {
  1231. "get": {
  1232. "tags": ["experimental"],
  1233. "operationId": "worktree.list",
  1234. "parameters": [
  1235. {
  1236. "name": "directory",
  1237. "in": "query",
  1238. "schema": {
  1239. "type": "string"
  1240. },
  1241. "required": false
  1242. },
  1243. {
  1244. "name": "workspace",
  1245. "in": "query",
  1246. "schema": {
  1247. "type": "string"
  1248. },
  1249. "required": false
  1250. }
  1251. ],
  1252. "responses": {
  1253. "200": {
  1254. "description": "List of worktree directories",
  1255. "content": {
  1256. "application/json": {
  1257. "schema": {
  1258. "type": "array",
  1259. "items": {
  1260. "type": "string"
  1261. },
  1262. "description": "List of worktree directories"
  1263. }
  1264. }
  1265. }
  1266. },
  1267. "400": {
  1268. "description": "WorktreeError | InvalidRequestError",
  1269. "content": {
  1270. "application/json": {
  1271. "schema": {
  1272. "anyOf": [
  1273. {
  1274. "$ref": "#/components/schemas/WorktreeError"
  1275. },
  1276. {
  1277. "$ref": "#/components/schemas/InvalidRequestError"
  1278. }
  1279. ]
  1280. }
  1281. }
  1282. }
  1283. }
  1284. },
  1285. "description": "List all sandbox worktrees for the current project.",
  1286. "summary": "List worktrees",
  1287. "x-codeSamples": [
  1288. {
  1289. "lang": "js",
  1290. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.list({\n ...\n})"
  1291. }
  1292. ]
  1293. },
  1294. "post": {
  1295. "tags": ["experimental"],
  1296. "operationId": "worktree.create",
  1297. "parameters": [
  1298. {
  1299. "name": "directory",
  1300. "in": "query",
  1301. "schema": {
  1302. "type": "string"
  1303. },
  1304. "required": false
  1305. },
  1306. {
  1307. "name": "workspace",
  1308. "in": "query",
  1309. "schema": {
  1310. "type": "string"
  1311. },
  1312. "required": false
  1313. }
  1314. ],
  1315. "responses": {
  1316. "200": {
  1317. "description": "Worktree created",
  1318. "content": {
  1319. "application/json": {
  1320. "schema": {
  1321. "$ref": "#/components/schemas/Worktree"
  1322. }
  1323. }
  1324. }
  1325. },
  1326. "400": {
  1327. "description": "WorktreeError | InvalidRequestError",
  1328. "content": {
  1329. "application/json": {
  1330. "schema": {
  1331. "anyOf": [
  1332. {
  1333. "$ref": "#/components/schemas/WorktreeError"
  1334. },
  1335. {
  1336. "$ref": "#/components/schemas/InvalidRequestError"
  1337. }
  1338. ]
  1339. }
  1340. }
  1341. }
  1342. }
  1343. },
  1344. "description": "Create a new git worktree for the current project and run any configured startup scripts.",
  1345. "summary": "Create worktree",
  1346. "requestBody": {
  1347. "content": {
  1348. "application/json": {
  1349. "schema": {
  1350. "$ref": "#/components/schemas/WorktreeCreateInput"
  1351. }
  1352. }
  1353. }
  1354. },
  1355. "x-codeSamples": [
  1356. {
  1357. "lang": "js",
  1358. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.create({\n ...\n})"
  1359. }
  1360. ]
  1361. },
  1362. "delete": {
  1363. "tags": ["experimental"],
  1364. "operationId": "worktree.remove",
  1365. "parameters": [
  1366. {
  1367. "name": "directory",
  1368. "in": "query",
  1369. "schema": {
  1370. "type": "string"
  1371. },
  1372. "required": false
  1373. },
  1374. {
  1375. "name": "workspace",
  1376. "in": "query",
  1377. "schema": {
  1378. "type": "string"
  1379. },
  1380. "required": false
  1381. }
  1382. ],
  1383. "responses": {
  1384. "200": {
  1385. "description": "Worktree removed",
  1386. "content": {
  1387. "application/json": {
  1388. "schema": {
  1389. "type": "boolean",
  1390. "description": "Worktree removed"
  1391. }
  1392. }
  1393. }
  1394. },
  1395. "400": {
  1396. "description": "WorktreeError | InvalidRequestError",
  1397. "content": {
  1398. "application/json": {
  1399. "schema": {
  1400. "anyOf": [
  1401. {
  1402. "$ref": "#/components/schemas/WorktreeError"
  1403. },
  1404. {
  1405. "$ref": "#/components/schemas/InvalidRequestError"
  1406. }
  1407. ]
  1408. }
  1409. }
  1410. }
  1411. }
  1412. },
  1413. "description": "Remove a git worktree and delete its branch.",
  1414. "summary": "Remove worktree",
  1415. "requestBody": {
  1416. "content": {
  1417. "application/json": {
  1418. "schema": {
  1419. "$ref": "#/components/schemas/WorktreeRemoveInput"
  1420. }
  1421. }
  1422. }
  1423. },
  1424. "x-codeSamples": [
  1425. {
  1426. "lang": "js",
  1427. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.remove({\n ...\n})"
  1428. }
  1429. ]
  1430. }
  1431. },
  1432. "/experimental/worktree/reset": {
  1433. "post": {
  1434. "tags": ["experimental"],
  1435. "operationId": "worktree.reset",
  1436. "parameters": [
  1437. {
  1438. "name": "directory",
  1439. "in": "query",
  1440. "schema": {
  1441. "type": "string"
  1442. },
  1443. "required": false
  1444. },
  1445. {
  1446. "name": "workspace",
  1447. "in": "query",
  1448. "schema": {
  1449. "type": "string"
  1450. },
  1451. "required": false
  1452. }
  1453. ],
  1454. "responses": {
  1455. "200": {
  1456. "description": "Worktree reset",
  1457. "content": {
  1458. "application/json": {
  1459. "schema": {
  1460. "type": "boolean",
  1461. "description": "Worktree reset"
  1462. }
  1463. }
  1464. }
  1465. },
  1466. "400": {
  1467. "description": "WorktreeError | InvalidRequestError",
  1468. "content": {
  1469. "application/json": {
  1470. "schema": {
  1471. "anyOf": [
  1472. {
  1473. "$ref": "#/components/schemas/WorktreeError"
  1474. },
  1475. {
  1476. "$ref": "#/components/schemas/InvalidRequestError"
  1477. }
  1478. ]
  1479. }
  1480. }
  1481. }
  1482. }
  1483. },
  1484. "description": "Reset a worktree branch to the primary default branch.",
  1485. "summary": "Reset worktree",
  1486. "requestBody": {
  1487. "content": {
  1488. "application/json": {
  1489. "schema": {
  1490. "$ref": "#/components/schemas/WorktreeResetInput"
  1491. }
  1492. }
  1493. }
  1494. },
  1495. "x-codeSamples": [
  1496. {
  1497. "lang": "js",
  1498. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.reset({\n ...\n})"
  1499. }
  1500. ]
  1501. }
  1502. },
  1503. "/experimental/session": {
  1504. "get": {
  1505. "tags": ["experimental"],
  1506. "operationId": "experimental.session.list",
  1507. "parameters": [
  1508. {
  1509. "name": "directory",
  1510. "in": "query",
  1511. "schema": {
  1512. "type": "string"
  1513. },
  1514. "required": false
  1515. },
  1516. {
  1517. "name": "workspace",
  1518. "in": "query",
  1519. "schema": {
  1520. "type": "string"
  1521. },
  1522. "required": false
  1523. },
  1524. {
  1525. "name": "roots",
  1526. "in": "query",
  1527. "schema": {
  1528. "anyOf": [
  1529. {
  1530. "type": "boolean"
  1531. },
  1532. {
  1533. "type": "string",
  1534. "enum": ["true", "false"]
  1535. }
  1536. ]
  1537. },
  1538. "required": false
  1539. },
  1540. {
  1541. "name": "start",
  1542. "in": "query",
  1543. "schema": {
  1544. "type": "number"
  1545. },
  1546. "required": false
  1547. },
  1548. {
  1549. "name": "cursor",
  1550. "in": "query",
  1551. "schema": {
  1552. "type": "number"
  1553. },
  1554. "required": false
  1555. },
  1556. {
  1557. "name": "search",
  1558. "in": "query",
  1559. "schema": {
  1560. "type": "string"
  1561. },
  1562. "required": false
  1563. },
  1564. {
  1565. "name": "limit",
  1566. "in": "query",
  1567. "schema": {
  1568. "type": "number"
  1569. },
  1570. "required": false
  1571. },
  1572. {
  1573. "name": "archived",
  1574. "in": "query",
  1575. "schema": {
  1576. "anyOf": [
  1577. {
  1578. "type": "boolean"
  1579. },
  1580. {
  1581. "type": "string",
  1582. "enum": ["true", "false"]
  1583. }
  1584. ]
  1585. },
  1586. "required": false
  1587. }
  1588. ],
  1589. "responses": {
  1590. "200": {
  1591. "description": "List of sessions",
  1592. "content": {
  1593. "application/json": {
  1594. "schema": {
  1595. "type": "array",
  1596. "items": {
  1597. "$ref": "#/components/schemas/GlobalSession"
  1598. },
  1599. "description": "List of sessions"
  1600. }
  1601. }
  1602. }
  1603. },
  1604. "400": {
  1605. "description": "Bad request",
  1606. "content": {
  1607. "application/json": {
  1608. "schema": {
  1609. "$ref": "#/components/schemas/BadRequestError"
  1610. }
  1611. }
  1612. }
  1613. }
  1614. },
  1615. "description": "Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.",
  1616. "summary": "List sessions",
  1617. "x-codeSamples": [
  1618. {
  1619. "lang": "js",
  1620. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.list({\n ...\n})"
  1621. }
  1622. ]
  1623. }
  1624. },
  1625. "/experimental/session/{sessionID}/background": {
  1626. "post": {
  1627. "tags": ["experimental"],
  1628. "operationId": "experimental.session.background",
  1629. "parameters": [
  1630. {
  1631. "name": "sessionID",
  1632. "in": "path",
  1633. "schema": {
  1634. "type": "string",
  1635. "pattern": "^ses"
  1636. },
  1637. "required": true
  1638. },
  1639. {
  1640. "name": "directory",
  1641. "in": "query",
  1642. "schema": {
  1643. "type": "string"
  1644. },
  1645. "required": false
  1646. },
  1647. {
  1648. "name": "workspace",
  1649. "in": "query",
  1650. "schema": {
  1651. "type": "string"
  1652. },
  1653. "required": false
  1654. }
  1655. ],
  1656. "responses": {
  1657. "200": {
  1658. "description": "Backgrounded subagents",
  1659. "content": {
  1660. "application/json": {
  1661. "schema": {
  1662. "type": "boolean",
  1663. "description": "Backgrounded subagents"
  1664. }
  1665. }
  1666. }
  1667. },
  1668. "400": {
  1669. "description": "BadRequest | InvalidRequestError",
  1670. "content": {
  1671. "application/json": {
  1672. "schema": {
  1673. "anyOf": [
  1674. {
  1675. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1676. },
  1677. {
  1678. "$ref": "#/components/schemas/InvalidRequestError"
  1679. }
  1680. ]
  1681. }
  1682. }
  1683. }
  1684. }
  1685. },
  1686. "description": "Detach any synchronous subagents currently blocking the session and continue them in the background.",
  1687. "summary": "Background subagents",
  1688. "x-codeSamples": [
  1689. {
  1690. "lang": "js",
  1691. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.background({\n ...\n})"
  1692. }
  1693. ]
  1694. }
  1695. },
  1696. "/experimental/resource": {
  1697. "get": {
  1698. "tags": ["experimental"],
  1699. "operationId": "experimental.resource.list",
  1700. "parameters": [
  1701. {
  1702. "name": "directory",
  1703. "in": "query",
  1704. "schema": {
  1705. "type": "string"
  1706. },
  1707. "required": false
  1708. },
  1709. {
  1710. "name": "workspace",
  1711. "in": "query",
  1712. "schema": {
  1713. "type": "string"
  1714. },
  1715. "required": false
  1716. }
  1717. ],
  1718. "responses": {
  1719. "200": {
  1720. "description": "MCP resources",
  1721. "content": {
  1722. "application/json": {
  1723. "schema": {
  1724. "type": "object",
  1725. "additionalProperties": {
  1726. "$ref": "#/components/schemas/McpResource"
  1727. },
  1728. "description": "MCP resources"
  1729. }
  1730. }
  1731. }
  1732. },
  1733. "400": {
  1734. "description": "Bad request",
  1735. "content": {
  1736. "application/json": {
  1737. "schema": {
  1738. "$ref": "#/components/schemas/BadRequestError"
  1739. }
  1740. }
  1741. }
  1742. }
  1743. },
  1744. "description": "Get all available MCP resources from connected servers. Optionally filter by name.",
  1745. "summary": "Get MCP resources",
  1746. "x-codeSamples": [
  1747. {
  1748. "lang": "js",
  1749. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.resource.list({\n ...\n})"
  1750. }
  1751. ]
  1752. }
  1753. },
  1754. "/find": {
  1755. "get": {
  1756. "tags": ["file"],
  1757. "operationId": "find.text",
  1758. "parameters": [
  1759. {
  1760. "name": "directory",
  1761. "in": "query",
  1762. "schema": {
  1763. "type": "string"
  1764. },
  1765. "required": false
  1766. },
  1767. {
  1768. "name": "workspace",
  1769. "in": "query",
  1770. "schema": {
  1771. "type": "string"
  1772. },
  1773. "required": false
  1774. },
  1775. {
  1776. "name": "pattern",
  1777. "in": "query",
  1778. "schema": {
  1779. "type": "string"
  1780. },
  1781. "required": true
  1782. }
  1783. ],
  1784. "responses": {
  1785. "200": {
  1786. "description": "Matches",
  1787. "content": {
  1788. "application/json": {
  1789. "schema": {
  1790. "type": "array",
  1791. "items": {
  1792. "type": "object",
  1793. "properties": {
  1794. "path": {
  1795. "type": "object",
  1796. "properties": {
  1797. "text": {
  1798. "type": "string"
  1799. }
  1800. },
  1801. "required": ["text"],
  1802. "additionalProperties": false
  1803. },
  1804. "lines": {
  1805. "type": "object",
  1806. "properties": {
  1807. "text": {
  1808. "type": "string"
  1809. }
  1810. },
  1811. "required": ["text"],
  1812. "additionalProperties": false
  1813. },
  1814. "line_number": {
  1815. "type": "integer",
  1816. "minimum": 0
  1817. },
  1818. "absolute_offset": {
  1819. "type": "integer",
  1820. "minimum": 0
  1821. },
  1822. "submatches": {
  1823. "type": "array",
  1824. "items": {
  1825. "type": "object",
  1826. "properties": {
  1827. "match": {
  1828. "type": "object",
  1829. "properties": {
  1830. "text": {
  1831. "type": "string"
  1832. }
  1833. },
  1834. "required": ["text"],
  1835. "additionalProperties": false
  1836. },
  1837. "start": {
  1838. "type": "integer",
  1839. "minimum": 0
  1840. },
  1841. "end": {
  1842. "type": "integer",
  1843. "minimum": 0
  1844. }
  1845. },
  1846. "required": ["match", "start", "end"],
  1847. "additionalProperties": false
  1848. }
  1849. }
  1850. },
  1851. "required": ["path", "lines", "line_number", "absolute_offset", "submatches"],
  1852. "additionalProperties": false
  1853. },
  1854. "description": "Matches"
  1855. }
  1856. }
  1857. }
  1858. },
  1859. "400": {
  1860. "description": "Bad request",
  1861. "content": {
  1862. "application/json": {
  1863. "schema": {
  1864. "$ref": "#/components/schemas/BadRequestError"
  1865. }
  1866. }
  1867. }
  1868. }
  1869. },
  1870. "description": "Search for text patterns across files in the project using ripgrep.",
  1871. "summary": "Find text",
  1872. "x-codeSamples": [
  1873. {
  1874. "lang": "js",
  1875. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
  1876. }
  1877. ]
  1878. }
  1879. },
  1880. "/find/file": {
  1881. "get": {
  1882. "tags": ["file"],
  1883. "operationId": "find.files",
  1884. "parameters": [
  1885. {
  1886. "name": "directory",
  1887. "in": "query",
  1888. "schema": {
  1889. "type": "string"
  1890. },
  1891. "required": false
  1892. },
  1893. {
  1894. "name": "workspace",
  1895. "in": "query",
  1896. "schema": {
  1897. "type": "string"
  1898. },
  1899. "required": false
  1900. },
  1901. {
  1902. "name": "query",
  1903. "in": "query",
  1904. "schema": {
  1905. "type": "string"
  1906. },
  1907. "required": true
  1908. },
  1909. {
  1910. "name": "dirs",
  1911. "in": "query",
  1912. "schema": {
  1913. "type": "string",
  1914. "enum": ["true", "false"]
  1915. },
  1916. "required": false
  1917. },
  1918. {
  1919. "name": "type",
  1920. "in": "query",
  1921. "schema": {
  1922. "type": "string",
  1923. "enum": ["file", "directory"]
  1924. },
  1925. "required": false
  1926. },
  1927. {
  1928. "name": "limit",
  1929. "in": "query",
  1930. "schema": {
  1931. "type": "integer",
  1932. "minimum": 1,
  1933. "maximum": 200
  1934. },
  1935. "required": false
  1936. }
  1937. ],
  1938. "responses": {
  1939. "200": {
  1940. "description": "File paths",
  1941. "content": {
  1942. "application/json": {
  1943. "schema": {
  1944. "type": "array",
  1945. "items": {
  1946. "type": "string"
  1947. },
  1948. "description": "File paths"
  1949. }
  1950. }
  1951. }
  1952. },
  1953. "400": {
  1954. "description": "Bad request",
  1955. "content": {
  1956. "application/json": {
  1957. "schema": {
  1958. "$ref": "#/components/schemas/BadRequestError"
  1959. }
  1960. }
  1961. }
  1962. }
  1963. },
  1964. "description": "Search for files or directories by name or pattern in the project directory.",
  1965. "summary": "Find files",
  1966. "x-codeSamples": [
  1967. {
  1968. "lang": "js",
  1969. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
  1970. }
  1971. ]
  1972. }
  1973. },
  1974. "/find/symbol": {
  1975. "get": {
  1976. "tags": ["file"],
  1977. "operationId": "find.symbols",
  1978. "parameters": [
  1979. {
  1980. "name": "directory",
  1981. "in": "query",
  1982. "schema": {
  1983. "type": "string"
  1984. },
  1985. "required": false
  1986. },
  1987. {
  1988. "name": "workspace",
  1989. "in": "query",
  1990. "schema": {
  1991. "type": "string"
  1992. },
  1993. "required": false
  1994. },
  1995. {
  1996. "name": "query",
  1997. "in": "query",
  1998. "schema": {
  1999. "type": "string"
  2000. },
  2001. "required": true
  2002. }
  2003. ],
  2004. "responses": {
  2005. "200": {
  2006. "description": "Symbols",
  2007. "content": {
  2008. "application/json": {
  2009. "schema": {
  2010. "type": "array",
  2011. "items": {
  2012. "$ref": "#/components/schemas/Symbol"
  2013. },
  2014. "description": "Symbols"
  2015. }
  2016. }
  2017. }
  2018. },
  2019. "400": {
  2020. "description": "Bad request",
  2021. "content": {
  2022. "application/json": {
  2023. "schema": {
  2024. "$ref": "#/components/schemas/BadRequestError"
  2025. }
  2026. }
  2027. }
  2028. }
  2029. },
  2030. "description": "Search for workspace symbols like functions, classes, and variables using LSP.",
  2031. "summary": "Find symbols",
  2032. "x-codeSamples": [
  2033. {
  2034. "lang": "js",
  2035. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
  2036. }
  2037. ]
  2038. }
  2039. },
  2040. "/file": {
  2041. "get": {
  2042. "tags": ["file"],
  2043. "operationId": "file.list",
  2044. "parameters": [
  2045. {
  2046. "name": "directory",
  2047. "in": "query",
  2048. "schema": {
  2049. "type": "string"
  2050. },
  2051. "required": false
  2052. },
  2053. {
  2054. "name": "workspace",
  2055. "in": "query",
  2056. "schema": {
  2057. "type": "string"
  2058. },
  2059. "required": false
  2060. },
  2061. {
  2062. "name": "path",
  2063. "in": "query",
  2064. "schema": {
  2065. "type": "string"
  2066. },
  2067. "required": true
  2068. }
  2069. ],
  2070. "responses": {
  2071. "200": {
  2072. "description": "Files and directories",
  2073. "content": {
  2074. "application/json": {
  2075. "schema": {
  2076. "type": "array",
  2077. "items": {
  2078. "$ref": "#/components/schemas/FileNode"
  2079. },
  2080. "description": "Files and directories"
  2081. }
  2082. }
  2083. }
  2084. },
  2085. "400": {
  2086. "description": "Bad request",
  2087. "content": {
  2088. "application/json": {
  2089. "schema": {
  2090. "$ref": "#/components/schemas/BadRequestError"
  2091. }
  2092. }
  2093. }
  2094. }
  2095. },
  2096. "description": "List files and directories in a specified path.",
  2097. "summary": "List files",
  2098. "x-codeSamples": [
  2099. {
  2100. "lang": "js",
  2101. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
  2102. }
  2103. ]
  2104. }
  2105. },
  2106. "/file/content": {
  2107. "get": {
  2108. "tags": ["file"],
  2109. "operationId": "file.read",
  2110. "parameters": [
  2111. {
  2112. "name": "directory",
  2113. "in": "query",
  2114. "schema": {
  2115. "type": "string"
  2116. },
  2117. "required": false
  2118. },
  2119. {
  2120. "name": "workspace",
  2121. "in": "query",
  2122. "schema": {
  2123. "type": "string"
  2124. },
  2125. "required": false
  2126. },
  2127. {
  2128. "name": "path",
  2129. "in": "query",
  2130. "schema": {
  2131. "type": "string"
  2132. },
  2133. "required": true
  2134. }
  2135. ],
  2136. "responses": {
  2137. "200": {
  2138. "description": "File content",
  2139. "content": {
  2140. "application/json": {
  2141. "schema": {
  2142. "$ref": "#/components/schemas/FileContent"
  2143. }
  2144. }
  2145. }
  2146. },
  2147. "400": {
  2148. "description": "Bad request",
  2149. "content": {
  2150. "application/json": {
  2151. "schema": {
  2152. "$ref": "#/components/schemas/BadRequestError"
  2153. }
  2154. }
  2155. }
  2156. }
  2157. },
  2158. "description": "Read the content of a specified file.",
  2159. "summary": "Read file",
  2160. "x-codeSamples": [
  2161. {
  2162. "lang": "js",
  2163. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
  2164. }
  2165. ]
  2166. }
  2167. },
  2168. "/file/status": {
  2169. "get": {
  2170. "tags": ["file"],
  2171. "operationId": "file.status",
  2172. "parameters": [
  2173. {
  2174. "name": "directory",
  2175. "in": "query",
  2176. "schema": {
  2177. "type": "string"
  2178. },
  2179. "required": false
  2180. },
  2181. {
  2182. "name": "workspace",
  2183. "in": "query",
  2184. "schema": {
  2185. "type": "string"
  2186. },
  2187. "required": false
  2188. }
  2189. ],
  2190. "responses": {
  2191. "200": {
  2192. "description": "File status",
  2193. "content": {
  2194. "application/json": {
  2195. "schema": {
  2196. "type": "array",
  2197. "items": {
  2198. "$ref": "#/components/schemas/File"
  2199. },
  2200. "description": "File status"
  2201. }
  2202. }
  2203. }
  2204. },
  2205. "400": {
  2206. "description": "Bad request",
  2207. "content": {
  2208. "application/json": {
  2209. "schema": {
  2210. "$ref": "#/components/schemas/BadRequestError"
  2211. }
  2212. }
  2213. }
  2214. }
  2215. },
  2216. "description": "Get the git status of all files in the project.",
  2217. "summary": "Get file status",
  2218. "x-codeSamples": [
  2219. {
  2220. "lang": "js",
  2221. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
  2222. }
  2223. ]
  2224. }
  2225. },
  2226. "/instance/dispose": {
  2227. "post": {
  2228. "tags": ["instance"],
  2229. "operationId": "instance.dispose",
  2230. "parameters": [
  2231. {
  2232. "name": "directory",
  2233. "in": "query",
  2234. "schema": {
  2235. "type": "string"
  2236. },
  2237. "required": false
  2238. },
  2239. {
  2240. "name": "workspace",
  2241. "in": "query",
  2242. "schema": {
  2243. "type": "string"
  2244. },
  2245. "required": false
  2246. }
  2247. ],
  2248. "responses": {
  2249. "200": {
  2250. "description": "Instance disposed",
  2251. "content": {
  2252. "application/json": {
  2253. "schema": {
  2254. "type": "boolean",
  2255. "description": "Instance disposed"
  2256. }
  2257. }
  2258. }
  2259. },
  2260. "400": {
  2261. "description": "Bad request",
  2262. "content": {
  2263. "application/json": {
  2264. "schema": {
  2265. "$ref": "#/components/schemas/BadRequestError"
  2266. }
  2267. }
  2268. }
  2269. }
  2270. },
  2271. "description": "Clean up and dispose the current OpenCode instance, releasing all resources.",
  2272. "summary": "Dispose instance",
  2273. "x-codeSamples": [
  2274. {
  2275. "lang": "js",
  2276. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.instance.dispose({\n ...\n})"
  2277. }
  2278. ]
  2279. }
  2280. },
  2281. "/path": {
  2282. "get": {
  2283. "tags": ["instance"],
  2284. "operationId": "path.get",
  2285. "parameters": [
  2286. {
  2287. "name": "directory",
  2288. "in": "query",
  2289. "schema": {
  2290. "type": "string"
  2291. },
  2292. "required": false
  2293. },
  2294. {
  2295. "name": "workspace",
  2296. "in": "query",
  2297. "schema": {
  2298. "type": "string"
  2299. },
  2300. "required": false
  2301. }
  2302. ],
  2303. "responses": {
  2304. "200": {
  2305. "description": "Path",
  2306. "content": {
  2307. "application/json": {
  2308. "schema": {
  2309. "$ref": "#/components/schemas/Path"
  2310. }
  2311. }
  2312. }
  2313. },
  2314. "400": {
  2315. "description": "Bad request",
  2316. "content": {
  2317. "application/json": {
  2318. "schema": {
  2319. "$ref": "#/components/schemas/BadRequestError"
  2320. }
  2321. }
  2322. }
  2323. }
  2324. },
  2325. "description": "Retrieve the current working directory and related path information for the OpenCode instance.",
  2326. "summary": "Get paths",
  2327. "x-codeSamples": [
  2328. {
  2329. "lang": "js",
  2330. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.path.get({\n ...\n})"
  2331. }
  2332. ]
  2333. }
  2334. },
  2335. "/vcs": {
  2336. "get": {
  2337. "tags": ["instance"],
  2338. "operationId": "vcs.get",
  2339. "parameters": [
  2340. {
  2341. "name": "directory",
  2342. "in": "query",
  2343. "schema": {
  2344. "type": "string"
  2345. },
  2346. "required": false
  2347. },
  2348. {
  2349. "name": "workspace",
  2350. "in": "query",
  2351. "schema": {
  2352. "type": "string"
  2353. },
  2354. "required": false
  2355. }
  2356. ],
  2357. "responses": {
  2358. "200": {
  2359. "description": "VCS info",
  2360. "content": {
  2361. "application/json": {
  2362. "schema": {
  2363. "$ref": "#/components/schemas/VcsInfo"
  2364. }
  2365. }
  2366. }
  2367. },
  2368. "400": {
  2369. "description": "Bad request",
  2370. "content": {
  2371. "application/json": {
  2372. "schema": {
  2373. "$ref": "#/components/schemas/BadRequestError"
  2374. }
  2375. }
  2376. }
  2377. }
  2378. },
  2379. "description": "Retrieve version control system (VCS) information for the current project, such as git branch.",
  2380. "summary": "Get VCS info",
  2381. "x-codeSamples": [
  2382. {
  2383. "lang": "js",
  2384. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.get({\n ...\n})"
  2385. }
  2386. ]
  2387. }
  2388. },
  2389. "/vcs/status": {
  2390. "get": {
  2391. "tags": ["instance"],
  2392. "operationId": "vcs.status",
  2393. "parameters": [
  2394. {
  2395. "name": "directory",
  2396. "in": "query",
  2397. "schema": {
  2398. "type": "string"
  2399. },
  2400. "required": false
  2401. },
  2402. {
  2403. "name": "workspace",
  2404. "in": "query",
  2405. "schema": {
  2406. "type": "string"
  2407. },
  2408. "required": false
  2409. }
  2410. ],
  2411. "responses": {
  2412. "200": {
  2413. "description": "VCS status",
  2414. "content": {
  2415. "application/json": {
  2416. "schema": {
  2417. "type": "array",
  2418. "items": {
  2419. "$ref": "#/components/schemas/VcsFileStatus"
  2420. },
  2421. "description": "VCS status"
  2422. }
  2423. }
  2424. }
  2425. },
  2426. "400": {
  2427. "description": "Bad request",
  2428. "content": {
  2429. "application/json": {
  2430. "schema": {
  2431. "$ref": "#/components/schemas/BadRequestError"
  2432. }
  2433. }
  2434. }
  2435. }
  2436. },
  2437. "description": "Retrieve changed files in the current working tree without patches.",
  2438. "summary": "Get VCS status",
  2439. "x-codeSamples": [
  2440. {
  2441. "lang": "js",
  2442. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.status({\n ...\n})"
  2443. }
  2444. ]
  2445. }
  2446. },
  2447. "/vcs/diff": {
  2448. "get": {
  2449. "tags": ["instance"],
  2450. "operationId": "vcs.diff",
  2451. "parameters": [
  2452. {
  2453. "name": "directory",
  2454. "in": "query",
  2455. "schema": {
  2456. "type": "string"
  2457. },
  2458. "required": false
  2459. },
  2460. {
  2461. "name": "workspace",
  2462. "in": "query",
  2463. "schema": {
  2464. "type": "string"
  2465. },
  2466. "required": false
  2467. },
  2468. {
  2469. "name": "mode",
  2470. "in": "query",
  2471. "schema": {
  2472. "type": "string",
  2473. "enum": ["git", "branch"]
  2474. },
  2475. "required": true
  2476. },
  2477. {
  2478. "name": "context",
  2479. "in": "query",
  2480. "schema": {
  2481. "type": "integer",
  2482. "minimum": 0
  2483. },
  2484. "required": false
  2485. }
  2486. ],
  2487. "responses": {
  2488. "200": {
  2489. "description": "VCS diff",
  2490. "content": {
  2491. "application/json": {
  2492. "schema": {
  2493. "type": "array",
  2494. "items": {
  2495. "$ref": "#/components/schemas/VcsFileDiff"
  2496. },
  2497. "description": "VCS diff"
  2498. }
  2499. }
  2500. }
  2501. },
  2502. "400": {
  2503. "description": "Bad request",
  2504. "content": {
  2505. "application/json": {
  2506. "schema": {
  2507. "$ref": "#/components/schemas/BadRequestError"
  2508. }
  2509. }
  2510. }
  2511. }
  2512. },
  2513. "description": "Retrieve the current git diff for the working tree or against the default branch.",
  2514. "summary": "Get VCS diff",
  2515. "x-codeSamples": [
  2516. {
  2517. "lang": "js",
  2518. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff({\n ...\n})"
  2519. }
  2520. ]
  2521. }
  2522. },
  2523. "/vcs/diff/raw": {
  2524. "get": {
  2525. "tags": ["instance"],
  2526. "operationId": "vcs.diff.raw",
  2527. "parameters": [
  2528. {
  2529. "name": "directory",
  2530. "in": "query",
  2531. "schema": {
  2532. "type": "string"
  2533. },
  2534. "required": false
  2535. },
  2536. {
  2537. "name": "workspace",
  2538. "in": "query",
  2539. "schema": {
  2540. "type": "string"
  2541. },
  2542. "required": false
  2543. }
  2544. ],
  2545. "responses": {
  2546. "200": {
  2547. "description": "Raw VCS diff",
  2548. "content": {
  2549. "text/x-diff; charset=utf-8": {
  2550. "schema": {
  2551. "type": "string"
  2552. }
  2553. }
  2554. }
  2555. },
  2556. "400": {
  2557. "description": "Bad request",
  2558. "content": {
  2559. "application/json": {
  2560. "schema": {
  2561. "$ref": "#/components/schemas/BadRequestError"
  2562. }
  2563. }
  2564. }
  2565. }
  2566. },
  2567. "description": "Retrieve a raw patch for current uncommitted changes.",
  2568. "summary": "Get raw VCS diff",
  2569. "x-codeSamples": [
  2570. {
  2571. "lang": "js",
  2572. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff.raw({\n ...\n})"
  2573. }
  2574. ]
  2575. }
  2576. },
  2577. "/vcs/apply": {
  2578. "post": {
  2579. "tags": ["instance"],
  2580. "operationId": "vcs.apply",
  2581. "parameters": [
  2582. {
  2583. "name": "directory",
  2584. "in": "query",
  2585. "schema": {
  2586. "type": "string"
  2587. },
  2588. "required": false
  2589. },
  2590. {
  2591. "name": "workspace",
  2592. "in": "query",
  2593. "schema": {
  2594. "type": "string"
  2595. },
  2596. "required": false
  2597. }
  2598. ],
  2599. "responses": {
  2600. "200": {
  2601. "description": "VCS patch applied",
  2602. "content": {
  2603. "application/json": {
  2604. "schema": {
  2605. "type": "object",
  2606. "properties": {
  2607. "applied": {
  2608. "type": "boolean"
  2609. }
  2610. },
  2611. "required": ["applied"],
  2612. "additionalProperties": false,
  2613. "description": "VCS patch applied"
  2614. }
  2615. }
  2616. }
  2617. },
  2618. "400": {
  2619. "description": "VcsApplyError | InvalidRequestError",
  2620. "content": {
  2621. "application/json": {
  2622. "schema": {
  2623. "anyOf": [
  2624. {
  2625. "$ref": "#/components/schemas/VcsApplyError"
  2626. },
  2627. {
  2628. "$ref": "#/components/schemas/InvalidRequestError"
  2629. }
  2630. ]
  2631. }
  2632. }
  2633. }
  2634. }
  2635. },
  2636. "description": "Apply a raw patch to the current working tree.",
  2637. "summary": "Apply VCS patch",
  2638. "requestBody": {
  2639. "content": {
  2640. "application/json": {
  2641. "schema": {
  2642. "type": "object",
  2643. "properties": {
  2644. "patch": {
  2645. "type": "string"
  2646. }
  2647. },
  2648. "required": ["patch"],
  2649. "additionalProperties": false
  2650. }
  2651. }
  2652. }
  2653. },
  2654. "x-codeSamples": [
  2655. {
  2656. "lang": "js",
  2657. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.apply({\n ...\n})"
  2658. }
  2659. ]
  2660. }
  2661. },
  2662. "/command": {
  2663. "get": {
  2664. "tags": ["instance"],
  2665. "operationId": "command.list",
  2666. "parameters": [
  2667. {
  2668. "name": "directory",
  2669. "in": "query",
  2670. "schema": {
  2671. "type": "string"
  2672. },
  2673. "required": false
  2674. },
  2675. {
  2676. "name": "workspace",
  2677. "in": "query",
  2678. "schema": {
  2679. "type": "string"
  2680. },
  2681. "required": false
  2682. }
  2683. ],
  2684. "responses": {
  2685. "200": {
  2686. "description": "List of commands",
  2687. "content": {
  2688. "application/json": {
  2689. "schema": {
  2690. "type": "array",
  2691. "items": {
  2692. "$ref": "#/components/schemas/Command"
  2693. },
  2694. "description": "List of commands"
  2695. }
  2696. }
  2697. }
  2698. },
  2699. "400": {
  2700. "description": "Bad request",
  2701. "content": {
  2702. "application/json": {
  2703. "schema": {
  2704. "$ref": "#/components/schemas/BadRequestError"
  2705. }
  2706. }
  2707. }
  2708. }
  2709. },
  2710. "description": "Get a list of all available commands in the OpenCode system.",
  2711. "summary": "List commands",
  2712. "x-codeSamples": [
  2713. {
  2714. "lang": "js",
  2715. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
  2716. }
  2717. ]
  2718. }
  2719. },
  2720. "/agent": {
  2721. "get": {
  2722. "tags": ["instance"],
  2723. "operationId": "app.agents",
  2724. "parameters": [
  2725. {
  2726. "name": "directory",
  2727. "in": "query",
  2728. "schema": {
  2729. "type": "string"
  2730. },
  2731. "required": false
  2732. },
  2733. {
  2734. "name": "workspace",
  2735. "in": "query",
  2736. "schema": {
  2737. "type": "string"
  2738. },
  2739. "required": false
  2740. }
  2741. ],
  2742. "responses": {
  2743. "200": {
  2744. "description": "List of agents",
  2745. "content": {
  2746. "application/json": {
  2747. "schema": {
  2748. "type": "array",
  2749. "items": {
  2750. "$ref": "#/components/schemas/Agent"
  2751. },
  2752. "description": "List of agents"
  2753. }
  2754. }
  2755. }
  2756. },
  2757. "400": {
  2758. "description": "Bad request",
  2759. "content": {
  2760. "application/json": {
  2761. "schema": {
  2762. "$ref": "#/components/schemas/BadRequestError"
  2763. }
  2764. }
  2765. }
  2766. }
  2767. },
  2768. "description": "Get a list of all available AI agents in the OpenCode system.",
  2769. "summary": "List agents",
  2770. "x-codeSamples": [
  2771. {
  2772. "lang": "js",
  2773. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
  2774. }
  2775. ]
  2776. }
  2777. },
  2778. "/skill": {
  2779. "get": {
  2780. "tags": ["instance"],
  2781. "operationId": "app.skills",
  2782. "parameters": [
  2783. {
  2784. "name": "directory",
  2785. "in": "query",
  2786. "schema": {
  2787. "type": "string"
  2788. },
  2789. "required": false
  2790. },
  2791. {
  2792. "name": "workspace",
  2793. "in": "query",
  2794. "schema": {
  2795. "type": "string"
  2796. },
  2797. "required": false
  2798. }
  2799. ],
  2800. "responses": {
  2801. "200": {
  2802. "description": "List of skills",
  2803. "content": {
  2804. "application/json": {
  2805. "schema": {
  2806. "type": "array",
  2807. "items": {
  2808. "type": "object",
  2809. "properties": {
  2810. "name": {
  2811. "type": "string"
  2812. },
  2813. "description": {
  2814. "type": "string"
  2815. },
  2816. "location": {
  2817. "type": "string"
  2818. },
  2819. "content": {
  2820. "type": "string"
  2821. }
  2822. },
  2823. "required": ["name", "location", "content"],
  2824. "additionalProperties": false
  2825. },
  2826. "description": "List of skills"
  2827. }
  2828. }
  2829. }
  2830. },
  2831. "400": {
  2832. "description": "Bad request",
  2833. "content": {
  2834. "application/json": {
  2835. "schema": {
  2836. "$ref": "#/components/schemas/BadRequestError"
  2837. }
  2838. }
  2839. }
  2840. }
  2841. },
  2842. "description": "Get a list of all available skills in the OpenCode system.",
  2843. "summary": "List skills",
  2844. "x-codeSamples": [
  2845. {
  2846. "lang": "js",
  2847. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.skills({\n ...\n})"
  2848. }
  2849. ]
  2850. }
  2851. },
  2852. "/lsp": {
  2853. "get": {
  2854. "tags": ["instance"],
  2855. "operationId": "lsp.status",
  2856. "parameters": [
  2857. {
  2858. "name": "directory",
  2859. "in": "query",
  2860. "schema": {
  2861. "type": "string"
  2862. },
  2863. "required": false
  2864. },
  2865. {
  2866. "name": "workspace",
  2867. "in": "query",
  2868. "schema": {
  2869. "type": "string"
  2870. },
  2871. "required": false
  2872. }
  2873. ],
  2874. "responses": {
  2875. "200": {
  2876. "description": "LSP server status",
  2877. "content": {
  2878. "application/json": {
  2879. "schema": {
  2880. "type": "array",
  2881. "items": {
  2882. "$ref": "#/components/schemas/LSPStatus"
  2883. },
  2884. "description": "LSP server status"
  2885. }
  2886. }
  2887. }
  2888. },
  2889. "400": {
  2890. "description": "Bad request",
  2891. "content": {
  2892. "application/json": {
  2893. "schema": {
  2894. "$ref": "#/components/schemas/BadRequestError"
  2895. }
  2896. }
  2897. }
  2898. }
  2899. },
  2900. "description": "Get LSP server status",
  2901. "summary": "Get LSP status",
  2902. "x-codeSamples": [
  2903. {
  2904. "lang": "js",
  2905. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
  2906. }
  2907. ]
  2908. }
  2909. },
  2910. "/formatter": {
  2911. "get": {
  2912. "tags": ["instance"],
  2913. "operationId": "formatter.status",
  2914. "parameters": [
  2915. {
  2916. "name": "directory",
  2917. "in": "query",
  2918. "schema": {
  2919. "type": "string"
  2920. },
  2921. "required": false
  2922. },
  2923. {
  2924. "name": "workspace",
  2925. "in": "query",
  2926. "schema": {
  2927. "type": "string"
  2928. },
  2929. "required": false
  2930. }
  2931. ],
  2932. "responses": {
  2933. "200": {
  2934. "description": "Formatter status",
  2935. "content": {
  2936. "application/json": {
  2937. "schema": {
  2938. "type": "array",
  2939. "items": {
  2940. "$ref": "#/components/schemas/FormatterStatus"
  2941. },
  2942. "description": "Formatter status"
  2943. }
  2944. }
  2945. }
  2946. },
  2947. "400": {
  2948. "description": "Bad request",
  2949. "content": {
  2950. "application/json": {
  2951. "schema": {
  2952. "$ref": "#/components/schemas/BadRequestError"
  2953. }
  2954. }
  2955. }
  2956. }
  2957. },
  2958. "description": "Get formatter status",
  2959. "summary": "Get formatter status",
  2960. "x-codeSamples": [
  2961. {
  2962. "lang": "js",
  2963. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
  2964. }
  2965. ]
  2966. }
  2967. },
  2968. "/mcp": {
  2969. "get": {
  2970. "tags": ["mcp"],
  2971. "operationId": "mcp.status",
  2972. "parameters": [
  2973. {
  2974. "name": "directory",
  2975. "in": "query",
  2976. "schema": {
  2977. "type": "string"
  2978. },
  2979. "required": false
  2980. },
  2981. {
  2982. "name": "workspace",
  2983. "in": "query",
  2984. "schema": {
  2985. "type": "string"
  2986. },
  2987. "required": false
  2988. }
  2989. ],
  2990. "responses": {
  2991. "200": {
  2992. "description": "MCP server status",
  2993. "content": {
  2994. "application/json": {
  2995. "schema": {
  2996. "type": "object",
  2997. "additionalProperties": {
  2998. "$ref": "#/components/schemas/MCPStatus"
  2999. },
  3000. "description": "MCP server status"
  3001. }
  3002. }
  3003. }
  3004. },
  3005. "400": {
  3006. "description": "Bad request",
  3007. "content": {
  3008. "application/json": {
  3009. "schema": {
  3010. "$ref": "#/components/schemas/BadRequestError"
  3011. }
  3012. }
  3013. }
  3014. }
  3015. },
  3016. "description": "Get the status of all Model Context Protocol (MCP) servers.",
  3017. "summary": "Get MCP status",
  3018. "x-codeSamples": [
  3019. {
  3020. "lang": "js",
  3021. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
  3022. }
  3023. ]
  3024. },
  3025. "post": {
  3026. "tags": ["mcp"],
  3027. "operationId": "mcp.add",
  3028. "parameters": [
  3029. {
  3030. "name": "directory",
  3031. "in": "query",
  3032. "schema": {
  3033. "type": "string"
  3034. },
  3035. "required": false
  3036. },
  3037. {
  3038. "name": "workspace",
  3039. "in": "query",
  3040. "schema": {
  3041. "type": "string"
  3042. },
  3043. "required": false
  3044. }
  3045. ],
  3046. "responses": {
  3047. "200": {
  3048. "description": "MCP server added successfully",
  3049. "content": {
  3050. "application/json": {
  3051. "schema": {
  3052. "type": "object",
  3053. "additionalProperties": {
  3054. "$ref": "#/components/schemas/MCPStatus"
  3055. },
  3056. "description": "MCP server added successfully"
  3057. }
  3058. }
  3059. }
  3060. },
  3061. "400": {
  3062. "description": "BadRequest | InvalidRequestError",
  3063. "content": {
  3064. "application/json": {
  3065. "schema": {
  3066. "anyOf": [
  3067. {
  3068. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3069. },
  3070. {
  3071. "$ref": "#/components/schemas/InvalidRequestError"
  3072. }
  3073. ]
  3074. }
  3075. }
  3076. }
  3077. }
  3078. },
  3079. "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
  3080. "summary": "Add MCP server",
  3081. "requestBody": {
  3082. "content": {
  3083. "application/json": {
  3084. "schema": {
  3085. "type": "object",
  3086. "properties": {
  3087. "name": {
  3088. "type": "string"
  3089. },
  3090. "config": {
  3091. "anyOf": [
  3092. {
  3093. "$ref": "#/components/schemas/McpLocalConfig"
  3094. },
  3095. {
  3096. "$ref": "#/components/schemas/McpRemoteConfig"
  3097. }
  3098. ]
  3099. }
  3100. },
  3101. "required": ["name", "config"],
  3102. "additionalProperties": false
  3103. }
  3104. }
  3105. }
  3106. },
  3107. "x-codeSamples": [
  3108. {
  3109. "lang": "js",
  3110. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
  3111. }
  3112. ]
  3113. }
  3114. },
  3115. "/mcp/{name}/auth": {
  3116. "post": {
  3117. "tags": ["mcp"],
  3118. "operationId": "mcp.auth.start",
  3119. "parameters": [
  3120. {
  3121. "name": "name",
  3122. "in": "path",
  3123. "schema": {
  3124. "type": "string"
  3125. },
  3126. "required": true
  3127. },
  3128. {
  3129. "name": "directory",
  3130. "in": "query",
  3131. "schema": {
  3132. "type": "string"
  3133. },
  3134. "required": false
  3135. },
  3136. {
  3137. "name": "workspace",
  3138. "in": "query",
  3139. "schema": {
  3140. "type": "string"
  3141. },
  3142. "required": false
  3143. }
  3144. ],
  3145. "responses": {
  3146. "200": {
  3147. "description": "OAuth flow started",
  3148. "content": {
  3149. "application/json": {
  3150. "schema": {
  3151. "type": "object",
  3152. "properties": {
  3153. "authorizationUrl": {
  3154. "type": "string"
  3155. },
  3156. "oauthState": {
  3157. "type": "string"
  3158. }
  3159. },
  3160. "required": ["authorizationUrl", "oauthState"],
  3161. "additionalProperties": false,
  3162. "description": "OAuth flow started"
  3163. }
  3164. }
  3165. }
  3166. },
  3167. "400": {
  3168. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3169. "content": {
  3170. "application/json": {
  3171. "schema": {
  3172. "anyOf": [
  3173. {
  3174. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3175. },
  3176. {
  3177. "$ref": "#/components/schemas/InvalidRequestError"
  3178. }
  3179. ]
  3180. }
  3181. }
  3182. }
  3183. },
  3184. "404": {
  3185. "description": "McpServerNotFoundError",
  3186. "content": {
  3187. "application/json": {
  3188. "schema": {
  3189. "$ref": "#/components/schemas/McpServerNotFoundError"
  3190. }
  3191. }
  3192. }
  3193. }
  3194. },
  3195. "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
  3196. "summary": "Start MCP OAuth",
  3197. "x-codeSamples": [
  3198. {
  3199. "lang": "js",
  3200. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
  3201. }
  3202. ]
  3203. },
  3204. "delete": {
  3205. "tags": ["mcp"],
  3206. "operationId": "mcp.auth.remove",
  3207. "parameters": [
  3208. {
  3209. "name": "name",
  3210. "in": "path",
  3211. "schema": {
  3212. "type": "string"
  3213. },
  3214. "required": true
  3215. },
  3216. {
  3217. "name": "directory",
  3218. "in": "query",
  3219. "schema": {
  3220. "type": "string"
  3221. },
  3222. "required": false
  3223. },
  3224. {
  3225. "name": "workspace",
  3226. "in": "query",
  3227. "schema": {
  3228. "type": "string"
  3229. },
  3230. "required": false
  3231. }
  3232. ],
  3233. "responses": {
  3234. "200": {
  3235. "description": "OAuth credentials removed",
  3236. "content": {
  3237. "application/json": {
  3238. "schema": {
  3239. "type": "object",
  3240. "properties": {
  3241. "success": {
  3242. "type": "boolean",
  3243. "enum": [true]
  3244. }
  3245. },
  3246. "required": ["success"],
  3247. "additionalProperties": false,
  3248. "description": "OAuth credentials removed"
  3249. }
  3250. }
  3251. }
  3252. },
  3253. "400": {
  3254. "description": "Bad request",
  3255. "content": {
  3256. "application/json": {
  3257. "schema": {
  3258. "$ref": "#/components/schemas/BadRequestError"
  3259. }
  3260. }
  3261. }
  3262. },
  3263. "404": {
  3264. "description": "McpServerNotFoundError",
  3265. "content": {
  3266. "application/json": {
  3267. "schema": {
  3268. "$ref": "#/components/schemas/McpServerNotFoundError"
  3269. }
  3270. }
  3271. }
  3272. }
  3273. },
  3274. "description": "Remove OAuth credentials for an MCP server.",
  3275. "summary": "Remove MCP OAuth",
  3276. "x-codeSamples": [
  3277. {
  3278. "lang": "js",
  3279. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
  3280. }
  3281. ]
  3282. }
  3283. },
  3284. "/mcp/{name}/auth/callback": {
  3285. "post": {
  3286. "tags": ["mcp"],
  3287. "operationId": "mcp.auth.callback",
  3288. "parameters": [
  3289. {
  3290. "name": "name",
  3291. "in": "path",
  3292. "schema": {
  3293. "type": "string"
  3294. },
  3295. "required": true
  3296. },
  3297. {
  3298. "name": "directory",
  3299. "in": "query",
  3300. "schema": {
  3301. "type": "string"
  3302. },
  3303. "required": false
  3304. },
  3305. {
  3306. "name": "workspace",
  3307. "in": "query",
  3308. "schema": {
  3309. "type": "string"
  3310. },
  3311. "required": false
  3312. }
  3313. ],
  3314. "responses": {
  3315. "200": {
  3316. "description": "OAuth authentication completed",
  3317. "content": {
  3318. "application/json": {
  3319. "schema": {
  3320. "$ref": "#/components/schemas/MCPStatus"
  3321. }
  3322. }
  3323. }
  3324. },
  3325. "400": {
  3326. "description": "BadRequest | InvalidRequestError",
  3327. "content": {
  3328. "application/json": {
  3329. "schema": {
  3330. "anyOf": [
  3331. {
  3332. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3333. },
  3334. {
  3335. "$ref": "#/components/schemas/InvalidRequestError"
  3336. }
  3337. ]
  3338. }
  3339. }
  3340. }
  3341. },
  3342. "404": {
  3343. "description": "McpServerNotFoundError",
  3344. "content": {
  3345. "application/json": {
  3346. "schema": {
  3347. "$ref": "#/components/schemas/McpServerNotFoundError"
  3348. }
  3349. }
  3350. }
  3351. }
  3352. },
  3353. "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
  3354. "summary": "Complete MCP OAuth",
  3355. "requestBody": {
  3356. "content": {
  3357. "application/json": {
  3358. "schema": {
  3359. "type": "object",
  3360. "properties": {
  3361. "code": {
  3362. "type": "string"
  3363. }
  3364. },
  3365. "required": ["code"],
  3366. "additionalProperties": false
  3367. }
  3368. }
  3369. }
  3370. },
  3371. "x-codeSamples": [
  3372. {
  3373. "lang": "js",
  3374. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
  3375. }
  3376. ]
  3377. }
  3378. },
  3379. "/mcp/{name}/auth/authenticate": {
  3380. "post": {
  3381. "tags": ["mcp"],
  3382. "operationId": "mcp.auth.authenticate",
  3383. "parameters": [
  3384. {
  3385. "name": "name",
  3386. "in": "path",
  3387. "schema": {
  3388. "type": "string"
  3389. },
  3390. "required": true
  3391. },
  3392. {
  3393. "name": "directory",
  3394. "in": "query",
  3395. "schema": {
  3396. "type": "string"
  3397. },
  3398. "required": false
  3399. },
  3400. {
  3401. "name": "workspace",
  3402. "in": "query",
  3403. "schema": {
  3404. "type": "string"
  3405. },
  3406. "required": false
  3407. }
  3408. ],
  3409. "responses": {
  3410. "200": {
  3411. "description": "OAuth authentication completed",
  3412. "content": {
  3413. "application/json": {
  3414. "schema": {
  3415. "$ref": "#/components/schemas/MCPStatus"
  3416. }
  3417. }
  3418. }
  3419. },
  3420. "400": {
  3421. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3422. "content": {
  3423. "application/json": {
  3424. "schema": {
  3425. "anyOf": [
  3426. {
  3427. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3428. },
  3429. {
  3430. "$ref": "#/components/schemas/InvalidRequestError"
  3431. }
  3432. ]
  3433. }
  3434. }
  3435. }
  3436. },
  3437. "404": {
  3438. "description": "McpServerNotFoundError",
  3439. "content": {
  3440. "application/json": {
  3441. "schema": {
  3442. "$ref": "#/components/schemas/McpServerNotFoundError"
  3443. }
  3444. }
  3445. }
  3446. }
  3447. },
  3448. "description": "Start OAuth flow and wait for callback (opens browser).",
  3449. "summary": "Authenticate MCP OAuth",
  3450. "x-codeSamples": [
  3451. {
  3452. "lang": "js",
  3453. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
  3454. }
  3455. ]
  3456. }
  3457. },
  3458. "/mcp/{name}/connect": {
  3459. "post": {
  3460. "tags": ["mcp"],
  3461. "operationId": "mcp.connect",
  3462. "parameters": [
  3463. {
  3464. "name": "name",
  3465. "in": "path",
  3466. "schema": {
  3467. "type": "string"
  3468. },
  3469. "required": true
  3470. },
  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": "MCP server connected successfully",
  3491. "content": {
  3492. "application/json": {
  3493. "schema": {
  3494. "type": "boolean",
  3495. "description": "MCP server connected successfully"
  3496. }
  3497. }
  3498. }
  3499. },
  3500. "400": {
  3501. "description": "Bad request",
  3502. "content": {
  3503. "application/json": {
  3504. "schema": {
  3505. "$ref": "#/components/schemas/BadRequestError"
  3506. }
  3507. }
  3508. }
  3509. },
  3510. "404": {
  3511. "description": "McpServerNotFoundError",
  3512. "content": {
  3513. "application/json": {
  3514. "schema": {
  3515. "$ref": "#/components/schemas/McpServerNotFoundError"
  3516. }
  3517. }
  3518. }
  3519. }
  3520. },
  3521. "description": "Connect an MCP server.",
  3522. "x-codeSamples": [
  3523. {
  3524. "lang": "js",
  3525. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
  3526. }
  3527. ]
  3528. }
  3529. },
  3530. "/mcp/{name}/disconnect": {
  3531. "post": {
  3532. "tags": ["mcp"],
  3533. "operationId": "mcp.disconnect",
  3534. "parameters": [
  3535. {
  3536. "name": "name",
  3537. "in": "path",
  3538. "schema": {
  3539. "type": "string"
  3540. },
  3541. "required": true
  3542. },
  3543. {
  3544. "name": "directory",
  3545. "in": "query",
  3546. "schema": {
  3547. "type": "string"
  3548. },
  3549. "required": false
  3550. },
  3551. {
  3552. "name": "workspace",
  3553. "in": "query",
  3554. "schema": {
  3555. "type": "string"
  3556. },
  3557. "required": false
  3558. }
  3559. ],
  3560. "responses": {
  3561. "200": {
  3562. "description": "MCP server disconnected successfully",
  3563. "content": {
  3564. "application/json": {
  3565. "schema": {
  3566. "type": "boolean",
  3567. "description": "MCP server disconnected successfully"
  3568. }
  3569. }
  3570. }
  3571. },
  3572. "400": {
  3573. "description": "Bad request",
  3574. "content": {
  3575. "application/json": {
  3576. "schema": {
  3577. "$ref": "#/components/schemas/BadRequestError"
  3578. }
  3579. }
  3580. }
  3581. },
  3582. "404": {
  3583. "description": "McpServerNotFoundError",
  3584. "content": {
  3585. "application/json": {
  3586. "schema": {
  3587. "$ref": "#/components/schemas/McpServerNotFoundError"
  3588. }
  3589. }
  3590. }
  3591. }
  3592. },
  3593. "description": "Disconnect an MCP server.",
  3594. "x-codeSamples": [
  3595. {
  3596. "lang": "js",
  3597. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
  3598. }
  3599. ]
  3600. }
  3601. },
  3602. "/project": {
  3603. "get": {
  3604. "tags": ["project"],
  3605. "operationId": "project.list",
  3606. "parameters": [
  3607. {
  3608. "name": "directory",
  3609. "in": "query",
  3610. "schema": {
  3611. "type": "string"
  3612. },
  3613. "required": false
  3614. },
  3615. {
  3616. "name": "workspace",
  3617. "in": "query",
  3618. "schema": {
  3619. "type": "string"
  3620. },
  3621. "required": false
  3622. }
  3623. ],
  3624. "responses": {
  3625. "200": {
  3626. "description": "List of projects",
  3627. "content": {
  3628. "application/json": {
  3629. "schema": {
  3630. "type": "array",
  3631. "items": {
  3632. "$ref": "#/components/schemas/Project"
  3633. },
  3634. "description": "List of projects"
  3635. }
  3636. }
  3637. }
  3638. },
  3639. "400": {
  3640. "description": "Bad request",
  3641. "content": {
  3642. "application/json": {
  3643. "schema": {
  3644. "$ref": "#/components/schemas/BadRequestError"
  3645. }
  3646. }
  3647. }
  3648. }
  3649. },
  3650. "description": "Get a list of projects that have been opened with OpenCode.",
  3651. "summary": "List all projects",
  3652. "x-codeSamples": [
  3653. {
  3654. "lang": "js",
  3655. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.list({\n ...\n})"
  3656. }
  3657. ]
  3658. }
  3659. },
  3660. "/project/current": {
  3661. "get": {
  3662. "tags": ["project"],
  3663. "operationId": "project.current",
  3664. "parameters": [
  3665. {
  3666. "name": "directory",
  3667. "in": "query",
  3668. "schema": {
  3669. "type": "string"
  3670. },
  3671. "required": false
  3672. },
  3673. {
  3674. "name": "workspace",
  3675. "in": "query",
  3676. "schema": {
  3677. "type": "string"
  3678. },
  3679. "required": false
  3680. }
  3681. ],
  3682. "responses": {
  3683. "200": {
  3684. "description": "Current project information",
  3685. "content": {
  3686. "application/json": {
  3687. "schema": {
  3688. "$ref": "#/components/schemas/Project"
  3689. }
  3690. }
  3691. }
  3692. },
  3693. "400": {
  3694. "description": "Bad request",
  3695. "content": {
  3696. "application/json": {
  3697. "schema": {
  3698. "$ref": "#/components/schemas/BadRequestError"
  3699. }
  3700. }
  3701. }
  3702. }
  3703. },
  3704. "description": "Retrieve the currently active project that OpenCode is working with.",
  3705. "summary": "Get current project",
  3706. "x-codeSamples": [
  3707. {
  3708. "lang": "js",
  3709. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.current({\n ...\n})"
  3710. }
  3711. ]
  3712. }
  3713. },
  3714. "/project/git/init": {
  3715. "post": {
  3716. "tags": ["project"],
  3717. "operationId": "project.initGit",
  3718. "parameters": [
  3719. {
  3720. "name": "directory",
  3721. "in": "query",
  3722. "schema": {
  3723. "type": "string"
  3724. },
  3725. "required": false
  3726. },
  3727. {
  3728. "name": "workspace",
  3729. "in": "query",
  3730. "schema": {
  3731. "type": "string"
  3732. },
  3733. "required": false
  3734. }
  3735. ],
  3736. "responses": {
  3737. "200": {
  3738. "description": "Project information after git initialization",
  3739. "content": {
  3740. "application/json": {
  3741. "schema": {
  3742. "$ref": "#/components/schemas/Project"
  3743. }
  3744. }
  3745. }
  3746. },
  3747. "400": {
  3748. "description": "Bad request",
  3749. "content": {
  3750. "application/json": {
  3751. "schema": {
  3752. "$ref": "#/components/schemas/BadRequestError"
  3753. }
  3754. }
  3755. }
  3756. }
  3757. },
  3758. "description": "Create a git repository for the current project and return the refreshed project info.",
  3759. "summary": "Initialize git repository",
  3760. "x-codeSamples": [
  3761. {
  3762. "lang": "js",
  3763. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.initGit({\n ...\n})"
  3764. }
  3765. ]
  3766. }
  3767. },
  3768. "/project/{projectID}": {
  3769. "patch": {
  3770. "tags": ["project"],
  3771. "operationId": "project.update",
  3772. "parameters": [
  3773. {
  3774. "name": "projectID",
  3775. "in": "path",
  3776. "schema": {
  3777. "type": "string"
  3778. },
  3779. "required": true
  3780. },
  3781. {
  3782. "name": "directory",
  3783. "in": "query",
  3784. "schema": {
  3785. "type": "string"
  3786. },
  3787. "required": false
  3788. },
  3789. {
  3790. "name": "workspace",
  3791. "in": "query",
  3792. "schema": {
  3793. "type": "string"
  3794. },
  3795. "required": false
  3796. }
  3797. ],
  3798. "responses": {
  3799. "200": {
  3800. "description": "Updated project information",
  3801. "content": {
  3802. "application/json": {
  3803. "schema": {
  3804. "$ref": "#/components/schemas/Project"
  3805. }
  3806. }
  3807. }
  3808. },
  3809. "400": {
  3810. "description": "BadRequest | InvalidRequestError",
  3811. "content": {
  3812. "application/json": {
  3813. "schema": {
  3814. "anyOf": [
  3815. {
  3816. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3817. },
  3818. {
  3819. "$ref": "#/components/schemas/InvalidRequestError"
  3820. }
  3821. ]
  3822. }
  3823. }
  3824. }
  3825. },
  3826. "404": {
  3827. "description": "ProjectNotFoundError",
  3828. "content": {
  3829. "application/json": {
  3830. "schema": {
  3831. "$ref": "#/components/schemas/ProjectNotFoundError"
  3832. }
  3833. }
  3834. }
  3835. }
  3836. },
  3837. "description": "Update project properties such as name, icon, and commands.",
  3838. "summary": "Update project",
  3839. "requestBody": {
  3840. "content": {
  3841. "application/json": {
  3842. "schema": {
  3843. "type": "object",
  3844. "properties": {
  3845. "name": {
  3846. "type": "string"
  3847. },
  3848. "icon": {
  3849. "type": "object",
  3850. "properties": {
  3851. "url": {
  3852. "type": "string"
  3853. },
  3854. "override": {
  3855. "type": "string"
  3856. },
  3857. "color": {
  3858. "type": "string"
  3859. }
  3860. },
  3861. "additionalProperties": false
  3862. },
  3863. "commands": {
  3864. "type": "object",
  3865. "properties": {
  3866. "start": {
  3867. "type": "string",
  3868. "description": "Startup script to run when creating a new workspace (worktree)"
  3869. }
  3870. },
  3871. "additionalProperties": false
  3872. }
  3873. },
  3874. "additionalProperties": false
  3875. }
  3876. }
  3877. }
  3878. },
  3879. "x-codeSamples": [
  3880. {
  3881. "lang": "js",
  3882. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.update({\n ...\n})"
  3883. }
  3884. ]
  3885. }
  3886. },
  3887. "/project/{projectID}/directories": {
  3888. "get": {
  3889. "tags": ["project"],
  3890. "operationId": "project.directories",
  3891. "parameters": [
  3892. {
  3893. "name": "projectID",
  3894. "in": "path",
  3895. "schema": {
  3896. "type": "string"
  3897. },
  3898. "required": true
  3899. },
  3900. {
  3901. "name": "directory",
  3902. "in": "query",
  3903. "schema": {
  3904. "type": "string"
  3905. },
  3906. "required": false
  3907. },
  3908. {
  3909. "name": "workspace",
  3910. "in": "query",
  3911. "schema": {
  3912. "type": "string"
  3913. },
  3914. "required": false
  3915. }
  3916. ],
  3917. "responses": {
  3918. "200": {
  3919. "description": "Project directories",
  3920. "content": {
  3921. "application/json": {
  3922. "schema": {
  3923. "$ref": "#/components/schemas/ProjectDirectories"
  3924. }
  3925. }
  3926. }
  3927. },
  3928. "400": {
  3929. "description": "Bad request",
  3930. "content": {
  3931. "application/json": {
  3932. "schema": {
  3933. "$ref": "#/components/schemas/BadRequestError"
  3934. }
  3935. }
  3936. }
  3937. }
  3938. },
  3939. "description": "List known local absolute directories for a project.",
  3940. "summary": "List project directories",
  3941. "x-codeSamples": [
  3942. {
  3943. "lang": "js",
  3944. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.directories({\n ...\n})"
  3945. }
  3946. ]
  3947. }
  3948. },
  3949. "/experimental/project/{projectID}/copy/generate-name": {
  3950. "post": {
  3951. "tags": ["projectCopy"],
  3952. "operationId": "experimental.projectCopy.generateName",
  3953. "parameters": [
  3954. {
  3955. "name": "projectID",
  3956. "in": "path",
  3957. "schema": {
  3958. "type": "string"
  3959. },
  3960. "required": true
  3961. },
  3962. {
  3963. "name": "directory",
  3964. "in": "query",
  3965. "schema": {
  3966. "type": "string"
  3967. },
  3968. "required": false
  3969. },
  3970. {
  3971. "name": "workspace",
  3972. "in": "query",
  3973. "schema": {
  3974. "type": "string"
  3975. },
  3976. "required": false
  3977. }
  3978. ],
  3979. "responses": {
  3980. "200": {
  3981. "description": "Success",
  3982. "content": {
  3983. "application/json": {
  3984. "schema": {
  3985. "type": "object",
  3986. "properties": {
  3987. "name": {
  3988. "type": "string"
  3989. }
  3990. },
  3991. "required": ["name"],
  3992. "additionalProperties": false
  3993. }
  3994. }
  3995. }
  3996. },
  3997. "400": {
  3998. "description": "Bad request",
  3999. "content": {
  4000. "application/json": {
  4001. "schema": {
  4002. "$ref": "#/components/schemas/BadRequestError"
  4003. }
  4004. }
  4005. }
  4006. }
  4007. },
  4008. "description": "Generate a short name for a project copy from task context.",
  4009. "summary": "Generate project copy name",
  4010. "requestBody": {
  4011. "content": {
  4012. "application/json": {
  4013. "schema": {
  4014. "type": "object",
  4015. "properties": {
  4016. "context": {
  4017. "type": "string"
  4018. }
  4019. },
  4020. "additionalProperties": false
  4021. }
  4022. }
  4023. }
  4024. },
  4025. "x-codeSamples": [
  4026. {
  4027. "lang": "js",
  4028. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.projectCopy.generateName({\n ...\n})"
  4029. }
  4030. ]
  4031. }
  4032. },
  4033. "/pty/shells": {
  4034. "get": {
  4035. "tags": ["pty"],
  4036. "operationId": "pty.shells",
  4037. "parameters": [
  4038. {
  4039. "name": "directory",
  4040. "in": "query",
  4041. "schema": {
  4042. "type": "string"
  4043. },
  4044. "required": false
  4045. },
  4046. {
  4047. "name": "workspace",
  4048. "in": "query",
  4049. "schema": {
  4050. "type": "string"
  4051. },
  4052. "required": false
  4053. }
  4054. ],
  4055. "responses": {
  4056. "200": {
  4057. "description": "List of shells",
  4058. "content": {
  4059. "application/json": {
  4060. "schema": {
  4061. "type": "array",
  4062. "items": {
  4063. "type": "object",
  4064. "properties": {
  4065. "path": {
  4066. "type": "string"
  4067. },
  4068. "name": {
  4069. "type": "string"
  4070. },
  4071. "acceptable": {
  4072. "type": "boolean"
  4073. }
  4074. },
  4075. "required": ["path", "name", "acceptable"],
  4076. "additionalProperties": false
  4077. },
  4078. "description": "List of shells"
  4079. }
  4080. }
  4081. }
  4082. },
  4083. "400": {
  4084. "description": "Bad request",
  4085. "content": {
  4086. "application/json": {
  4087. "schema": {
  4088. "$ref": "#/components/schemas/BadRequestError"
  4089. }
  4090. }
  4091. }
  4092. }
  4093. },
  4094. "description": "Get a list of available shells on the system.",
  4095. "summary": "List available shells",
  4096. "x-codeSamples": [
  4097. {
  4098. "lang": "js",
  4099. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.shells({\n ...\n})"
  4100. }
  4101. ]
  4102. }
  4103. },
  4104. "/pty": {
  4105. "get": {
  4106. "tags": ["pty"],
  4107. "operationId": "pty.list",
  4108. "parameters": [
  4109. {
  4110. "name": "directory",
  4111. "in": "query",
  4112. "schema": {
  4113. "type": "string"
  4114. },
  4115. "required": false
  4116. },
  4117. {
  4118. "name": "workspace",
  4119. "in": "query",
  4120. "schema": {
  4121. "type": "string"
  4122. },
  4123. "required": false
  4124. }
  4125. ],
  4126. "responses": {
  4127. "200": {
  4128. "description": "List of sessions",
  4129. "content": {
  4130. "application/json": {
  4131. "schema": {
  4132. "type": "array",
  4133. "items": {
  4134. "$ref": "#/components/schemas/Pty"
  4135. },
  4136. "description": "List of sessions"
  4137. }
  4138. }
  4139. }
  4140. },
  4141. "400": {
  4142. "description": "Bad request",
  4143. "content": {
  4144. "application/json": {
  4145. "schema": {
  4146. "$ref": "#/components/schemas/BadRequestError"
  4147. }
  4148. }
  4149. }
  4150. }
  4151. },
  4152. "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
  4153. "summary": "List PTY sessions",
  4154. "x-codeSamples": [
  4155. {
  4156. "lang": "js",
  4157. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
  4158. }
  4159. ]
  4160. },
  4161. "post": {
  4162. "tags": ["pty"],
  4163. "operationId": "pty.create",
  4164. "parameters": [
  4165. {
  4166. "name": "directory",
  4167. "in": "query",
  4168. "schema": {
  4169. "type": "string"
  4170. },
  4171. "required": false
  4172. },
  4173. {
  4174. "name": "workspace",
  4175. "in": "query",
  4176. "schema": {
  4177. "type": "string"
  4178. },
  4179. "required": false
  4180. }
  4181. ],
  4182. "responses": {
  4183. "200": {
  4184. "description": "Created session",
  4185. "content": {
  4186. "application/json": {
  4187. "schema": {
  4188. "$ref": "#/components/schemas/Pty"
  4189. }
  4190. }
  4191. }
  4192. },
  4193. "400": {
  4194. "description": "BadRequest | InvalidRequestError",
  4195. "content": {
  4196. "application/json": {
  4197. "schema": {
  4198. "anyOf": [
  4199. {
  4200. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4201. },
  4202. {
  4203. "$ref": "#/components/schemas/InvalidRequestError"
  4204. }
  4205. ]
  4206. }
  4207. }
  4208. }
  4209. }
  4210. },
  4211. "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
  4212. "summary": "Create PTY session",
  4213. "requestBody": {
  4214. "content": {
  4215. "application/json": {
  4216. "schema": {
  4217. "type": "object",
  4218. "properties": {
  4219. "command": {
  4220. "type": "string"
  4221. },
  4222. "args": {
  4223. "type": "array",
  4224. "items": {
  4225. "type": "string"
  4226. }
  4227. },
  4228. "cwd": {
  4229. "type": "string"
  4230. },
  4231. "title": {
  4232. "type": "string"
  4233. },
  4234. "env": {
  4235. "type": "object",
  4236. "additionalProperties": {
  4237. "type": "string"
  4238. }
  4239. }
  4240. },
  4241. "additionalProperties": false
  4242. }
  4243. }
  4244. }
  4245. },
  4246. "x-codeSamples": [
  4247. {
  4248. "lang": "js",
  4249. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
  4250. }
  4251. ]
  4252. }
  4253. },
  4254. "/pty/{ptyID}": {
  4255. "get": {
  4256. "tags": ["pty"],
  4257. "operationId": "pty.get",
  4258. "parameters": [
  4259. {
  4260. "name": "ptyID",
  4261. "in": "path",
  4262. "schema": {
  4263. "type": "string",
  4264. "pattern": "^pty"
  4265. },
  4266. "required": true
  4267. },
  4268. {
  4269. "name": "directory",
  4270. "in": "query",
  4271. "schema": {
  4272. "type": "string"
  4273. },
  4274. "required": false
  4275. },
  4276. {
  4277. "name": "workspace",
  4278. "in": "query",
  4279. "schema": {
  4280. "type": "string"
  4281. },
  4282. "required": false
  4283. }
  4284. ],
  4285. "responses": {
  4286. "200": {
  4287. "description": "Session info",
  4288. "content": {
  4289. "application/json": {
  4290. "schema": {
  4291. "$ref": "#/components/schemas/Pty"
  4292. }
  4293. }
  4294. }
  4295. },
  4296. "400": {
  4297. "description": "Bad request",
  4298. "content": {
  4299. "application/json": {
  4300. "schema": {
  4301. "$ref": "#/components/schemas/BadRequestError"
  4302. }
  4303. }
  4304. }
  4305. },
  4306. "404": {
  4307. "description": "PtyNotFoundError",
  4308. "content": {
  4309. "application/json": {
  4310. "schema": {
  4311. "$ref": "#/components/schemas/PtyNotFoundError"
  4312. }
  4313. }
  4314. }
  4315. }
  4316. },
  4317. "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
  4318. "summary": "Get PTY session",
  4319. "x-codeSamples": [
  4320. {
  4321. "lang": "js",
  4322. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
  4323. }
  4324. ]
  4325. },
  4326. "put": {
  4327. "tags": ["pty"],
  4328. "operationId": "pty.update",
  4329. "parameters": [
  4330. {
  4331. "name": "ptyID",
  4332. "in": "path",
  4333. "schema": {
  4334. "type": "string",
  4335. "pattern": "^pty"
  4336. },
  4337. "required": true
  4338. },
  4339. {
  4340. "name": "directory",
  4341. "in": "query",
  4342. "schema": {
  4343. "type": "string"
  4344. },
  4345. "required": false
  4346. },
  4347. {
  4348. "name": "workspace",
  4349. "in": "query",
  4350. "schema": {
  4351. "type": "string"
  4352. },
  4353. "required": false
  4354. }
  4355. ],
  4356. "responses": {
  4357. "200": {
  4358. "description": "Updated session",
  4359. "content": {
  4360. "application/json": {
  4361. "schema": {
  4362. "$ref": "#/components/schemas/Pty"
  4363. }
  4364. }
  4365. }
  4366. },
  4367. "400": {
  4368. "description": "BadRequest | InvalidRequestError",
  4369. "content": {
  4370. "application/json": {
  4371. "schema": {
  4372. "anyOf": [
  4373. {
  4374. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4375. },
  4376. {
  4377. "$ref": "#/components/schemas/InvalidRequestError"
  4378. }
  4379. ]
  4380. }
  4381. }
  4382. }
  4383. },
  4384. "404": {
  4385. "description": "PtyNotFoundError",
  4386. "content": {
  4387. "application/json": {
  4388. "schema": {
  4389. "$ref": "#/components/schemas/PtyNotFoundError"
  4390. }
  4391. }
  4392. }
  4393. }
  4394. },
  4395. "description": "Update properties of an existing pseudo-terminal (PTY) session.",
  4396. "summary": "Update PTY session",
  4397. "requestBody": {
  4398. "content": {
  4399. "application/json": {
  4400. "schema": {
  4401. "type": "object",
  4402. "properties": {
  4403. "title": {
  4404. "type": "string"
  4405. },
  4406. "size": {
  4407. "type": "object",
  4408. "properties": {
  4409. "rows": {
  4410. "type": "integer",
  4411. "exclusiveMinimum": 0
  4412. },
  4413. "cols": {
  4414. "type": "integer",
  4415. "exclusiveMinimum": 0
  4416. }
  4417. },
  4418. "required": ["rows", "cols"],
  4419. "additionalProperties": false
  4420. }
  4421. },
  4422. "additionalProperties": false
  4423. }
  4424. }
  4425. }
  4426. },
  4427. "x-codeSamples": [
  4428. {
  4429. "lang": "js",
  4430. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
  4431. }
  4432. ]
  4433. },
  4434. "delete": {
  4435. "tags": ["pty"],
  4436. "operationId": "pty.remove",
  4437. "parameters": [
  4438. {
  4439. "name": "ptyID",
  4440. "in": "path",
  4441. "schema": {
  4442. "type": "string",
  4443. "pattern": "^pty"
  4444. },
  4445. "required": true
  4446. },
  4447. {
  4448. "name": "directory",
  4449. "in": "query",
  4450. "schema": {
  4451. "type": "string"
  4452. },
  4453. "required": false
  4454. },
  4455. {
  4456. "name": "workspace",
  4457. "in": "query",
  4458. "schema": {
  4459. "type": "string"
  4460. },
  4461. "required": false
  4462. }
  4463. ],
  4464. "responses": {
  4465. "200": {
  4466. "description": "Session removed",
  4467. "content": {
  4468. "application/json": {
  4469. "schema": {
  4470. "type": "boolean",
  4471. "description": "Session removed"
  4472. }
  4473. }
  4474. }
  4475. },
  4476. "400": {
  4477. "description": "Bad request",
  4478. "content": {
  4479. "application/json": {
  4480. "schema": {
  4481. "$ref": "#/components/schemas/BadRequestError"
  4482. }
  4483. }
  4484. }
  4485. },
  4486. "404": {
  4487. "description": "PtyNotFoundError",
  4488. "content": {
  4489. "application/json": {
  4490. "schema": {
  4491. "$ref": "#/components/schemas/PtyNotFoundError"
  4492. }
  4493. }
  4494. }
  4495. }
  4496. },
  4497. "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
  4498. "summary": "Remove PTY session",
  4499. "x-codeSamples": [
  4500. {
  4501. "lang": "js",
  4502. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
  4503. }
  4504. ]
  4505. }
  4506. },
  4507. "/pty/{ptyID}/connect-token": {
  4508. "post": {
  4509. "tags": ["pty"],
  4510. "operationId": "pty.connectToken",
  4511. "parameters": [
  4512. {
  4513. "name": "ptyID",
  4514. "in": "path",
  4515. "schema": {
  4516. "type": "string",
  4517. "pattern": "^pty"
  4518. },
  4519. "required": true
  4520. },
  4521. {
  4522. "name": "directory",
  4523. "in": "query",
  4524. "schema": {
  4525. "type": "string"
  4526. },
  4527. "required": false
  4528. },
  4529. {
  4530. "name": "workspace",
  4531. "in": "query",
  4532. "schema": {
  4533. "type": "string"
  4534. },
  4535. "required": false
  4536. }
  4537. ],
  4538. "responses": {
  4539. "200": {
  4540. "description": "WebSocket connect token",
  4541. "content": {
  4542. "application/json": {
  4543. "schema": {
  4544. "type": "object",
  4545. "properties": {
  4546. "ticket": {
  4547. "type": "string"
  4548. },
  4549. "expires_in": {
  4550. "type": "integer",
  4551. "exclusiveMinimum": 0
  4552. }
  4553. },
  4554. "required": ["ticket", "expires_in"],
  4555. "additionalProperties": false,
  4556. "description": "WebSocket connect token"
  4557. }
  4558. }
  4559. }
  4560. },
  4561. "400": {
  4562. "description": "Bad request",
  4563. "content": {
  4564. "application/json": {
  4565. "schema": {
  4566. "$ref": "#/components/schemas/BadRequestError"
  4567. }
  4568. }
  4569. }
  4570. },
  4571. "403": {
  4572. "description": "PtyForbiddenError",
  4573. "content": {
  4574. "application/json": {
  4575. "schema": {
  4576. "$ref": "#/components/schemas/PtyForbiddenError"
  4577. }
  4578. }
  4579. }
  4580. },
  4581. "404": {
  4582. "description": "PtyNotFoundError",
  4583. "content": {
  4584. "application/json": {
  4585. "schema": {
  4586. "$ref": "#/components/schemas/PtyNotFoundError"
  4587. }
  4588. }
  4589. }
  4590. }
  4591. },
  4592. "description": "Create a short-lived ticket for opening a PTY WebSocket connection.",
  4593. "summary": "Create PTY WebSocket token",
  4594. "x-codeSamples": [
  4595. {
  4596. "lang": "js",
  4597. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connectToken({\n ...\n})"
  4598. }
  4599. ]
  4600. }
  4601. },
  4602. "/question": {
  4603. "get": {
  4604. "tags": ["question"],
  4605. "operationId": "question.list",
  4606. "parameters": [
  4607. {
  4608. "name": "directory",
  4609. "in": "query",
  4610. "schema": {
  4611. "type": "string"
  4612. },
  4613. "required": false
  4614. },
  4615. {
  4616. "name": "workspace",
  4617. "in": "query",
  4618. "schema": {
  4619. "type": "string"
  4620. },
  4621. "required": false
  4622. }
  4623. ],
  4624. "responses": {
  4625. "200": {
  4626. "description": "List of pending questions",
  4627. "content": {
  4628. "application/json": {
  4629. "schema": {
  4630. "type": "array",
  4631. "items": {
  4632. "$ref": "#/components/schemas/QuestionRequest"
  4633. },
  4634. "description": "List of pending questions"
  4635. }
  4636. }
  4637. }
  4638. },
  4639. "400": {
  4640. "description": "Bad request",
  4641. "content": {
  4642. "application/json": {
  4643. "schema": {
  4644. "$ref": "#/components/schemas/BadRequestError"
  4645. }
  4646. }
  4647. }
  4648. }
  4649. },
  4650. "description": "Get all pending question requests across all sessions.",
  4651. "summary": "List pending questions",
  4652. "x-codeSamples": [
  4653. {
  4654. "lang": "js",
  4655. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
  4656. }
  4657. ]
  4658. }
  4659. },
  4660. "/question/{requestID}/reply": {
  4661. "post": {
  4662. "tags": ["question"],
  4663. "operationId": "question.reply",
  4664. "parameters": [
  4665. {
  4666. "name": "requestID",
  4667. "in": "path",
  4668. "schema": {
  4669. "type": "string",
  4670. "pattern": "^que"
  4671. },
  4672. "required": true
  4673. },
  4674. {
  4675. "name": "directory",
  4676. "in": "query",
  4677. "schema": {
  4678. "type": "string"
  4679. },
  4680. "required": false
  4681. },
  4682. {
  4683. "name": "workspace",
  4684. "in": "query",
  4685. "schema": {
  4686. "type": "string"
  4687. },
  4688. "required": false
  4689. }
  4690. ],
  4691. "responses": {
  4692. "200": {
  4693. "description": "Question answered successfully",
  4694. "content": {
  4695. "application/json": {
  4696. "schema": {
  4697. "type": "boolean",
  4698. "description": "Question answered successfully"
  4699. }
  4700. }
  4701. }
  4702. },
  4703. "400": {
  4704. "description": "BadRequest | InvalidRequestError",
  4705. "content": {
  4706. "application/json": {
  4707. "schema": {
  4708. "anyOf": [
  4709. {
  4710. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4711. },
  4712. {
  4713. "$ref": "#/components/schemas/InvalidRequestError"
  4714. }
  4715. ]
  4716. }
  4717. }
  4718. }
  4719. },
  4720. "404": {
  4721. "description": "QuestionNotFoundError",
  4722. "content": {
  4723. "application/json": {
  4724. "schema": {
  4725. "$ref": "#/components/schemas/QuestionNotFoundError"
  4726. }
  4727. }
  4728. }
  4729. }
  4730. },
  4731. "description": "Provide answers to a question request from the AI assistant.",
  4732. "summary": "Reply to question request",
  4733. "requestBody": {
  4734. "content": {
  4735. "application/json": {
  4736. "schema": {
  4737. "type": "object",
  4738. "properties": {
  4739. "answers": {
  4740. "type": "array",
  4741. "items": {
  4742. "$ref": "#/components/schemas/QuestionAnswer"
  4743. },
  4744. "description": "User answers in order of questions (each answer is an array of selected labels)"
  4745. }
  4746. },
  4747. "required": ["answers"],
  4748. "additionalProperties": false
  4749. }
  4750. }
  4751. }
  4752. },
  4753. "x-codeSamples": [
  4754. {
  4755. "lang": "js",
  4756. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
  4757. }
  4758. ]
  4759. }
  4760. },
  4761. "/question/{requestID}/reject": {
  4762. "post": {
  4763. "tags": ["question"],
  4764. "operationId": "question.reject",
  4765. "parameters": [
  4766. {
  4767. "name": "requestID",
  4768. "in": "path",
  4769. "schema": {
  4770. "type": "string",
  4771. "pattern": "^que"
  4772. },
  4773. "required": true
  4774. },
  4775. {
  4776. "name": "directory",
  4777. "in": "query",
  4778. "schema": {
  4779. "type": "string"
  4780. },
  4781. "required": false
  4782. },
  4783. {
  4784. "name": "workspace",
  4785. "in": "query",
  4786. "schema": {
  4787. "type": "string"
  4788. },
  4789. "required": false
  4790. }
  4791. ],
  4792. "responses": {
  4793. "200": {
  4794. "description": "Question rejected successfully",
  4795. "content": {
  4796. "application/json": {
  4797. "schema": {
  4798. "type": "boolean",
  4799. "description": "Question rejected successfully"
  4800. }
  4801. }
  4802. }
  4803. },
  4804. "400": {
  4805. "description": "BadRequest | InvalidRequestError",
  4806. "content": {
  4807. "application/json": {
  4808. "schema": {
  4809. "anyOf": [
  4810. {
  4811. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4812. },
  4813. {
  4814. "$ref": "#/components/schemas/InvalidRequestError"
  4815. }
  4816. ]
  4817. }
  4818. }
  4819. }
  4820. },
  4821. "404": {
  4822. "description": "QuestionNotFoundError",
  4823. "content": {
  4824. "application/json": {
  4825. "schema": {
  4826. "$ref": "#/components/schemas/QuestionNotFoundError"
  4827. }
  4828. }
  4829. }
  4830. }
  4831. },
  4832. "description": "Reject a question request from the AI assistant.",
  4833. "summary": "Reject question request",
  4834. "x-codeSamples": [
  4835. {
  4836. "lang": "js",
  4837. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
  4838. }
  4839. ]
  4840. }
  4841. },
  4842. "/permission": {
  4843. "get": {
  4844. "tags": ["permission"],
  4845. "operationId": "permission.list",
  4846. "parameters": [
  4847. {
  4848. "name": "directory",
  4849. "in": "query",
  4850. "schema": {
  4851. "type": "string"
  4852. },
  4853. "required": false
  4854. },
  4855. {
  4856. "name": "workspace",
  4857. "in": "query",
  4858. "schema": {
  4859. "type": "string"
  4860. },
  4861. "required": false
  4862. }
  4863. ],
  4864. "responses": {
  4865. "200": {
  4866. "description": "List of pending permissions",
  4867. "content": {
  4868. "application/json": {
  4869. "schema": {
  4870. "type": "array",
  4871. "items": {
  4872. "$ref": "#/components/schemas/PermissionRequest"
  4873. },
  4874. "description": "List of pending permissions"
  4875. }
  4876. }
  4877. }
  4878. },
  4879. "400": {
  4880. "description": "Bad request",
  4881. "content": {
  4882. "application/json": {
  4883. "schema": {
  4884. "$ref": "#/components/schemas/BadRequestError"
  4885. }
  4886. }
  4887. }
  4888. }
  4889. },
  4890. "description": "Get all pending permission requests across all sessions.",
  4891. "summary": "List pending permissions",
  4892. "x-codeSamples": [
  4893. {
  4894. "lang": "js",
  4895. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
  4896. }
  4897. ]
  4898. }
  4899. },
  4900. "/permission/{requestID}/reply": {
  4901. "post": {
  4902. "tags": ["permission"],
  4903. "operationId": "permission.reply",
  4904. "parameters": [
  4905. {
  4906. "name": "requestID",
  4907. "in": "path",
  4908. "schema": {
  4909. "type": "string",
  4910. "pattern": "^per"
  4911. },
  4912. "required": true
  4913. },
  4914. {
  4915. "name": "directory",
  4916. "in": "query",
  4917. "schema": {
  4918. "type": "string"
  4919. },
  4920. "required": false
  4921. },
  4922. {
  4923. "name": "workspace",
  4924. "in": "query",
  4925. "schema": {
  4926. "type": "string"
  4927. },
  4928. "required": false
  4929. }
  4930. ],
  4931. "responses": {
  4932. "200": {
  4933. "description": "Permission processed successfully",
  4934. "content": {
  4935. "application/json": {
  4936. "schema": {
  4937. "type": "boolean",
  4938. "description": "Permission processed successfully"
  4939. }
  4940. }
  4941. }
  4942. },
  4943. "400": {
  4944. "description": "BadRequest | InvalidRequestError",
  4945. "content": {
  4946. "application/json": {
  4947. "schema": {
  4948. "anyOf": [
  4949. {
  4950. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4951. },
  4952. {
  4953. "$ref": "#/components/schemas/InvalidRequestError"
  4954. }
  4955. ]
  4956. }
  4957. }
  4958. }
  4959. },
  4960. "404": {
  4961. "description": "PermissionNotFoundError",
  4962. "content": {
  4963. "application/json": {
  4964. "schema": {
  4965. "$ref": "#/components/schemas/PermissionNotFoundError"
  4966. }
  4967. }
  4968. }
  4969. }
  4970. },
  4971. "description": "Approve or deny a permission request from the AI assistant.",
  4972. "summary": "Respond to permission request",
  4973. "requestBody": {
  4974. "content": {
  4975. "application/json": {
  4976. "schema": {
  4977. "type": "object",
  4978. "properties": {
  4979. "reply": {
  4980. "type": "string",
  4981. "enum": ["once", "always", "reject"]
  4982. },
  4983. "message": {
  4984. "type": "string"
  4985. }
  4986. },
  4987. "required": ["reply"],
  4988. "additionalProperties": false
  4989. }
  4990. }
  4991. }
  4992. },
  4993. "x-codeSamples": [
  4994. {
  4995. "lang": "js",
  4996. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
  4997. }
  4998. ]
  4999. }
  5000. },
  5001. "/provider": {
  5002. "get": {
  5003. "tags": ["provider"],
  5004. "operationId": "provider.list",
  5005. "parameters": [
  5006. {
  5007. "name": "directory",
  5008. "in": "query",
  5009. "schema": {
  5010. "type": "string"
  5011. },
  5012. "required": false
  5013. },
  5014. {
  5015. "name": "workspace",
  5016. "in": "query",
  5017. "schema": {
  5018. "type": "string"
  5019. },
  5020. "required": false
  5021. }
  5022. ],
  5023. "responses": {
  5024. "200": {
  5025. "description": "List of providers",
  5026. "content": {
  5027. "application/json": {
  5028. "schema": {
  5029. "type": "object",
  5030. "properties": {
  5031. "all": {
  5032. "type": "array",
  5033. "items": {
  5034. "$ref": "#/components/schemas/Provider"
  5035. }
  5036. },
  5037. "default": {
  5038. "type": "object",
  5039. "additionalProperties": {
  5040. "type": "string"
  5041. }
  5042. },
  5043. "connected": {
  5044. "type": "array",
  5045. "items": {
  5046. "type": "string"
  5047. }
  5048. }
  5049. },
  5050. "required": ["all", "default", "connected"],
  5051. "additionalProperties": false,
  5052. "description": "List of providers"
  5053. }
  5054. }
  5055. }
  5056. },
  5057. "400": {
  5058. "description": "Bad request",
  5059. "content": {
  5060. "application/json": {
  5061. "schema": {
  5062. "$ref": "#/components/schemas/BadRequestError"
  5063. }
  5064. }
  5065. }
  5066. }
  5067. },
  5068. "description": "Get a list of all available AI providers, including both available and connected ones.",
  5069. "summary": "List providers",
  5070. "x-codeSamples": [
  5071. {
  5072. "lang": "js",
  5073. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  5074. }
  5075. ]
  5076. }
  5077. },
  5078. "/provider/auth": {
  5079. "get": {
  5080. "tags": ["provider"],
  5081. "operationId": "provider.auth",
  5082. "parameters": [
  5083. {
  5084. "name": "directory",
  5085. "in": "query",
  5086. "schema": {
  5087. "type": "string"
  5088. },
  5089. "required": false
  5090. },
  5091. {
  5092. "name": "workspace",
  5093. "in": "query",
  5094. "schema": {
  5095. "type": "string"
  5096. },
  5097. "required": false
  5098. }
  5099. ],
  5100. "responses": {
  5101. "200": {
  5102. "description": "Provider auth methods",
  5103. "content": {
  5104. "application/json": {
  5105. "schema": {
  5106. "type": "object",
  5107. "additionalProperties": {
  5108. "type": "array",
  5109. "items": {
  5110. "$ref": "#/components/schemas/ProviderAuthMethod"
  5111. }
  5112. },
  5113. "description": "Provider auth methods"
  5114. }
  5115. }
  5116. }
  5117. },
  5118. "400": {
  5119. "description": "Bad request",
  5120. "content": {
  5121. "application/json": {
  5122. "schema": {
  5123. "$ref": "#/components/schemas/BadRequestError"
  5124. }
  5125. }
  5126. }
  5127. }
  5128. },
  5129. "description": "Retrieve available authentication methods for all AI providers.",
  5130. "summary": "Get provider auth methods",
  5131. "x-codeSamples": [
  5132. {
  5133. "lang": "js",
  5134. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  5135. }
  5136. ]
  5137. }
  5138. },
  5139. "/provider/{providerID}/oauth/authorize": {
  5140. "post": {
  5141. "tags": ["provider"],
  5142. "operationId": "provider.oauth.authorize",
  5143. "parameters": [
  5144. {
  5145. "name": "providerID",
  5146. "in": "path",
  5147. "schema": {
  5148. "type": "string"
  5149. },
  5150. "required": true
  5151. },
  5152. {
  5153. "name": "directory",
  5154. "in": "query",
  5155. "schema": {
  5156. "type": "string"
  5157. },
  5158. "required": false
  5159. },
  5160. {
  5161. "name": "workspace",
  5162. "in": "query",
  5163. "schema": {
  5164. "type": "string"
  5165. },
  5166. "required": false
  5167. }
  5168. ],
  5169. "responses": {
  5170. "200": {
  5171. "description": "Authorization URL and method",
  5172. "content": {
  5173. "application/json": {
  5174. "schema": {
  5175. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  5176. }
  5177. }
  5178. }
  5179. },
  5180. "400": {
  5181. "description": "ProviderAuthError | InvalidRequestError",
  5182. "content": {
  5183. "application/json": {
  5184. "schema": {
  5185. "anyOf": [
  5186. {
  5187. "$ref": "#/components/schemas/ProviderAuthError1"
  5188. },
  5189. {
  5190. "$ref": "#/components/schemas/InvalidRequestError"
  5191. }
  5192. ]
  5193. }
  5194. }
  5195. }
  5196. }
  5197. },
  5198. "description": "Start the OAuth authorization flow for a provider.",
  5199. "summary": "Start OAuth authorization",
  5200. "requestBody": {
  5201. "content": {
  5202. "application/json": {
  5203. "schema": {
  5204. "type": "object",
  5205. "properties": {
  5206. "method": {
  5207. "type": "number",
  5208. "description": "Auth method index"
  5209. },
  5210. "inputs": {
  5211. "type": "object",
  5212. "additionalProperties": {
  5213. "type": "string"
  5214. }
  5215. }
  5216. },
  5217. "required": ["method"],
  5218. "additionalProperties": false
  5219. }
  5220. }
  5221. }
  5222. },
  5223. "x-codeSamples": [
  5224. {
  5225. "lang": "js",
  5226. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  5227. }
  5228. ]
  5229. }
  5230. },
  5231. "/provider/{providerID}/oauth/callback": {
  5232. "post": {
  5233. "tags": ["provider"],
  5234. "operationId": "provider.oauth.callback",
  5235. "parameters": [
  5236. {
  5237. "name": "providerID",
  5238. "in": "path",
  5239. "schema": {
  5240. "type": "string"
  5241. },
  5242. "required": true
  5243. },
  5244. {
  5245. "name": "directory",
  5246. "in": "query",
  5247. "schema": {
  5248. "type": "string"
  5249. },
  5250. "required": false
  5251. },
  5252. {
  5253. "name": "workspace",
  5254. "in": "query",
  5255. "schema": {
  5256. "type": "string"
  5257. },
  5258. "required": false
  5259. }
  5260. ],
  5261. "responses": {
  5262. "200": {
  5263. "description": "OAuth callback processed successfully",
  5264. "content": {
  5265. "application/json": {
  5266. "schema": {
  5267. "type": "boolean",
  5268. "description": "OAuth callback processed successfully"
  5269. }
  5270. }
  5271. }
  5272. },
  5273. "400": {
  5274. "description": "ProviderAuthError | InvalidRequestError",
  5275. "content": {
  5276. "application/json": {
  5277. "schema": {
  5278. "anyOf": [
  5279. {
  5280. "$ref": "#/components/schemas/ProviderAuthError1"
  5281. },
  5282. {
  5283. "$ref": "#/components/schemas/InvalidRequestError"
  5284. }
  5285. ]
  5286. }
  5287. }
  5288. }
  5289. }
  5290. },
  5291. "description": "Handle the OAuth callback from a provider after user authorization.",
  5292. "summary": "Handle OAuth callback",
  5293. "requestBody": {
  5294. "content": {
  5295. "application/json": {
  5296. "schema": {
  5297. "type": "object",
  5298. "properties": {
  5299. "method": {
  5300. "type": "number",
  5301. "description": "Auth method index"
  5302. },
  5303. "code": {
  5304. "type": "string"
  5305. }
  5306. },
  5307. "required": ["method"],
  5308. "additionalProperties": false
  5309. }
  5310. }
  5311. }
  5312. },
  5313. "x-codeSamples": [
  5314. {
  5315. "lang": "js",
  5316. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  5317. }
  5318. ]
  5319. }
  5320. },
  5321. "/session": {
  5322. "get": {
  5323. "tags": ["session"],
  5324. "operationId": "session.list",
  5325. "parameters": [
  5326. {
  5327. "name": "directory",
  5328. "in": "query",
  5329. "schema": {
  5330. "type": "string"
  5331. },
  5332. "required": false
  5333. },
  5334. {
  5335. "name": "workspace",
  5336. "in": "query",
  5337. "schema": {
  5338. "type": "string"
  5339. },
  5340. "required": false
  5341. },
  5342. {
  5343. "name": "scope",
  5344. "in": "query",
  5345. "schema": {
  5346. "type": "string",
  5347. "enum": ["project"]
  5348. },
  5349. "required": false
  5350. },
  5351. {
  5352. "name": "path",
  5353. "in": "query",
  5354. "schema": {
  5355. "type": "string"
  5356. },
  5357. "required": false
  5358. },
  5359. {
  5360. "name": "roots",
  5361. "in": "query",
  5362. "schema": {
  5363. "anyOf": [
  5364. {
  5365. "type": "boolean"
  5366. },
  5367. {
  5368. "type": "string",
  5369. "enum": ["true", "false"]
  5370. }
  5371. ]
  5372. },
  5373. "required": false
  5374. },
  5375. {
  5376. "name": "start",
  5377. "in": "query",
  5378. "schema": {
  5379. "type": "number"
  5380. },
  5381. "required": false
  5382. },
  5383. {
  5384. "name": "search",
  5385. "in": "query",
  5386. "schema": {
  5387. "type": "string"
  5388. },
  5389. "required": false
  5390. },
  5391. {
  5392. "name": "limit",
  5393. "in": "query",
  5394. "schema": {
  5395. "type": "number"
  5396. },
  5397. "required": false
  5398. }
  5399. ],
  5400. "responses": {
  5401. "200": {
  5402. "description": "List of sessions",
  5403. "content": {
  5404. "application/json": {
  5405. "schema": {
  5406. "type": "array",
  5407. "items": {
  5408. "$ref": "#/components/schemas/Session"
  5409. },
  5410. "description": "List of sessions"
  5411. }
  5412. }
  5413. }
  5414. },
  5415. "400": {
  5416. "description": "Bad request",
  5417. "content": {
  5418. "application/json": {
  5419. "schema": {
  5420. "$ref": "#/components/schemas/BadRequestError"
  5421. }
  5422. }
  5423. }
  5424. }
  5425. },
  5426. "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
  5427. "summary": "List sessions",
  5428. "x-codeSamples": [
  5429. {
  5430. "lang": "js",
  5431. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
  5432. }
  5433. ]
  5434. },
  5435. "post": {
  5436. "tags": ["session"],
  5437. "operationId": "session.create",
  5438. "parameters": [
  5439. {
  5440. "name": "directory",
  5441. "in": "query",
  5442. "schema": {
  5443. "type": "string"
  5444. },
  5445. "required": false
  5446. },
  5447. {
  5448. "name": "workspace",
  5449. "in": "query",
  5450. "schema": {
  5451. "type": "string"
  5452. },
  5453. "required": false
  5454. }
  5455. ],
  5456. "responses": {
  5457. "200": {
  5458. "description": "Successfully created session",
  5459. "content": {
  5460. "application/json": {
  5461. "schema": {
  5462. "$ref": "#/components/schemas/Session"
  5463. }
  5464. }
  5465. }
  5466. },
  5467. "400": {
  5468. "description": "BadRequest | InvalidRequestError",
  5469. "content": {
  5470. "application/json": {
  5471. "schema": {
  5472. "anyOf": [
  5473. {
  5474. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5475. },
  5476. {
  5477. "$ref": "#/components/schemas/InvalidRequestError"
  5478. }
  5479. ]
  5480. }
  5481. }
  5482. }
  5483. }
  5484. },
  5485. "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
  5486. "summary": "Create session",
  5487. "requestBody": {
  5488. "content": {
  5489. "application/json": {
  5490. "schema": {
  5491. "type": "object",
  5492. "properties": {
  5493. "parentID": {
  5494. "type": "string",
  5495. "pattern": "^ses"
  5496. },
  5497. "title": {
  5498. "type": "string"
  5499. },
  5500. "agent": {
  5501. "type": "string"
  5502. },
  5503. "model": {
  5504. "type": "object",
  5505. "properties": {
  5506. "id": {
  5507. "type": "string"
  5508. },
  5509. "providerID": {
  5510. "type": "string"
  5511. },
  5512. "variant": {
  5513. "type": "string"
  5514. }
  5515. },
  5516. "required": ["id", "providerID"],
  5517. "additionalProperties": false
  5518. },
  5519. "metadata": {
  5520. "type": "object"
  5521. },
  5522. "permission": {
  5523. "$ref": "#/components/schemas/PermissionRuleset"
  5524. },
  5525. "workspaceID": {
  5526. "type": "string",
  5527. "pattern": "^wrk"
  5528. }
  5529. },
  5530. "additionalProperties": false
  5531. }
  5532. }
  5533. }
  5534. },
  5535. "x-codeSamples": [
  5536. {
  5537. "lang": "js",
  5538. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
  5539. }
  5540. ]
  5541. }
  5542. },
  5543. "/session/status": {
  5544. "get": {
  5545. "tags": ["session"],
  5546. "operationId": "session.status",
  5547. "parameters": [
  5548. {
  5549. "name": "directory",
  5550. "in": "query",
  5551. "schema": {
  5552. "type": "string"
  5553. },
  5554. "required": false
  5555. },
  5556. {
  5557. "name": "workspace",
  5558. "in": "query",
  5559. "schema": {
  5560. "type": "string"
  5561. },
  5562. "required": false
  5563. }
  5564. ],
  5565. "responses": {
  5566. "200": {
  5567. "description": "Get session status",
  5568. "content": {
  5569. "application/json": {
  5570. "schema": {
  5571. "type": "object",
  5572. "additionalProperties": {
  5573. "$ref": "#/components/schemas/SessionStatus"
  5574. },
  5575. "description": "Get session status"
  5576. }
  5577. }
  5578. }
  5579. },
  5580. "400": {
  5581. "description": "BadRequest | InvalidRequestError",
  5582. "content": {
  5583. "application/json": {
  5584. "schema": {
  5585. "anyOf": [
  5586. {
  5587. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5588. },
  5589. {
  5590. "$ref": "#/components/schemas/InvalidRequestError"
  5591. }
  5592. ]
  5593. }
  5594. }
  5595. }
  5596. }
  5597. },
  5598. "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
  5599. "summary": "Get session status",
  5600. "x-codeSamples": [
  5601. {
  5602. "lang": "js",
  5603. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
  5604. }
  5605. ]
  5606. }
  5607. },
  5608. "/session/{sessionID}": {
  5609. "get": {
  5610. "tags": ["session"],
  5611. "operationId": "session.get",
  5612. "parameters": [
  5613. {
  5614. "name": "sessionID",
  5615. "in": "path",
  5616. "schema": {
  5617. "type": "string",
  5618. "pattern": "^ses"
  5619. },
  5620. "required": true
  5621. },
  5622. {
  5623. "name": "directory",
  5624. "in": "query",
  5625. "schema": {
  5626. "type": "string"
  5627. },
  5628. "required": false
  5629. },
  5630. {
  5631. "name": "workspace",
  5632. "in": "query",
  5633. "schema": {
  5634. "type": "string"
  5635. },
  5636. "required": false
  5637. }
  5638. ],
  5639. "responses": {
  5640. "200": {
  5641. "description": "Get session",
  5642. "content": {
  5643. "application/json": {
  5644. "schema": {
  5645. "$ref": "#/components/schemas/Session"
  5646. }
  5647. }
  5648. }
  5649. },
  5650. "400": {
  5651. "description": "BadRequest | InvalidRequestError",
  5652. "content": {
  5653. "application/json": {
  5654. "schema": {
  5655. "anyOf": [
  5656. {
  5657. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5658. },
  5659. {
  5660. "$ref": "#/components/schemas/InvalidRequestError"
  5661. }
  5662. ]
  5663. }
  5664. }
  5665. }
  5666. },
  5667. "404": {
  5668. "description": "NotFoundError",
  5669. "content": {
  5670. "application/json": {
  5671. "schema": {
  5672. "$ref": "#/components/schemas/NotFoundError"
  5673. }
  5674. }
  5675. }
  5676. }
  5677. },
  5678. "description": "Retrieve detailed information about a specific OpenCode session.",
  5679. "summary": "Get session",
  5680. "x-codeSamples": [
  5681. {
  5682. "lang": "js",
  5683. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
  5684. }
  5685. ]
  5686. },
  5687. "delete": {
  5688. "tags": ["session"],
  5689. "operationId": "session.delete",
  5690. "parameters": [
  5691. {
  5692. "name": "sessionID",
  5693. "in": "path",
  5694. "schema": {
  5695. "type": "string",
  5696. "pattern": "^ses"
  5697. },
  5698. "required": true
  5699. },
  5700. {
  5701. "name": "directory",
  5702. "in": "query",
  5703. "schema": {
  5704. "type": "string"
  5705. },
  5706. "required": false
  5707. },
  5708. {
  5709. "name": "workspace",
  5710. "in": "query",
  5711. "schema": {
  5712. "type": "string"
  5713. },
  5714. "required": false
  5715. }
  5716. ],
  5717. "responses": {
  5718. "200": {
  5719. "description": "Successfully deleted session",
  5720. "content": {
  5721. "application/json": {
  5722. "schema": {
  5723. "type": "boolean",
  5724. "description": "Successfully deleted session"
  5725. }
  5726. }
  5727. }
  5728. },
  5729. "400": {
  5730. "description": "BadRequest | InvalidRequestError",
  5731. "content": {
  5732. "application/json": {
  5733. "schema": {
  5734. "anyOf": [
  5735. {
  5736. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5737. },
  5738. {
  5739. "$ref": "#/components/schemas/InvalidRequestError"
  5740. }
  5741. ]
  5742. }
  5743. }
  5744. }
  5745. },
  5746. "404": {
  5747. "description": "NotFoundError",
  5748. "content": {
  5749. "application/json": {
  5750. "schema": {
  5751. "$ref": "#/components/schemas/NotFoundError"
  5752. }
  5753. }
  5754. }
  5755. }
  5756. },
  5757. "description": "Delete a session and permanently remove all associated data, including messages and history.",
  5758. "summary": "Delete session",
  5759. "x-codeSamples": [
  5760. {
  5761. "lang": "js",
  5762. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
  5763. }
  5764. ]
  5765. },
  5766. "patch": {
  5767. "tags": ["session"],
  5768. "operationId": "session.update",
  5769. "parameters": [
  5770. {
  5771. "name": "sessionID",
  5772. "in": "path",
  5773. "schema": {
  5774. "type": "string",
  5775. "pattern": "^ses"
  5776. },
  5777. "required": true
  5778. },
  5779. {
  5780. "name": "directory",
  5781. "in": "query",
  5782. "schema": {
  5783. "type": "string"
  5784. },
  5785. "required": false
  5786. },
  5787. {
  5788. "name": "workspace",
  5789. "in": "query",
  5790. "schema": {
  5791. "type": "string"
  5792. },
  5793. "required": false
  5794. }
  5795. ],
  5796. "responses": {
  5797. "200": {
  5798. "description": "Successfully updated session",
  5799. "content": {
  5800. "application/json": {
  5801. "schema": {
  5802. "$ref": "#/components/schemas/Session"
  5803. }
  5804. }
  5805. }
  5806. },
  5807. "400": {
  5808. "description": "BadRequest | InvalidRequestError",
  5809. "content": {
  5810. "application/json": {
  5811. "schema": {
  5812. "anyOf": [
  5813. {
  5814. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5815. },
  5816. {
  5817. "$ref": "#/components/schemas/InvalidRequestError"
  5818. }
  5819. ]
  5820. }
  5821. }
  5822. }
  5823. },
  5824. "404": {
  5825. "description": "NotFoundError",
  5826. "content": {
  5827. "application/json": {
  5828. "schema": {
  5829. "$ref": "#/components/schemas/NotFoundError"
  5830. }
  5831. }
  5832. }
  5833. }
  5834. },
  5835. "description": "Update properties of an existing session, such as title or other metadata.",
  5836. "summary": "Update session",
  5837. "requestBody": {
  5838. "content": {
  5839. "application/json": {
  5840. "schema": {
  5841. "type": "object",
  5842. "properties": {
  5843. "title": {
  5844. "type": "string"
  5845. },
  5846. "metadata": {
  5847. "type": "object"
  5848. },
  5849. "permission": {
  5850. "$ref": "#/components/schemas/PermissionRuleset"
  5851. },
  5852. "time": {
  5853. "type": "object",
  5854. "properties": {
  5855. "archived": {
  5856. "type": "number"
  5857. }
  5858. },
  5859. "additionalProperties": false
  5860. }
  5861. },
  5862. "additionalProperties": false
  5863. }
  5864. }
  5865. }
  5866. },
  5867. "x-codeSamples": [
  5868. {
  5869. "lang": "js",
  5870. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
  5871. }
  5872. ]
  5873. }
  5874. },
  5875. "/session/{sessionID}/children": {
  5876. "get": {
  5877. "tags": ["session"],
  5878. "operationId": "session.children",
  5879. "parameters": [
  5880. {
  5881. "name": "sessionID",
  5882. "in": "path",
  5883. "schema": {
  5884. "type": "string",
  5885. "pattern": "^ses"
  5886. },
  5887. "required": true
  5888. },
  5889. {
  5890. "name": "directory",
  5891. "in": "query",
  5892. "schema": {
  5893. "type": "string"
  5894. },
  5895. "required": false
  5896. },
  5897. {
  5898. "name": "workspace",
  5899. "in": "query",
  5900. "schema": {
  5901. "type": "string"
  5902. },
  5903. "required": false
  5904. }
  5905. ],
  5906. "responses": {
  5907. "200": {
  5908. "description": "List of children",
  5909. "content": {
  5910. "application/json": {
  5911. "schema": {
  5912. "type": "array",
  5913. "items": {
  5914. "$ref": "#/components/schemas/Session"
  5915. },
  5916. "description": "List of children"
  5917. }
  5918. }
  5919. }
  5920. },
  5921. "400": {
  5922. "description": "BadRequest | InvalidRequestError",
  5923. "content": {
  5924. "application/json": {
  5925. "schema": {
  5926. "anyOf": [
  5927. {
  5928. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5929. },
  5930. {
  5931. "$ref": "#/components/schemas/InvalidRequestError"
  5932. }
  5933. ]
  5934. }
  5935. }
  5936. }
  5937. },
  5938. "404": {
  5939. "description": "NotFoundError",
  5940. "content": {
  5941. "application/json": {
  5942. "schema": {
  5943. "$ref": "#/components/schemas/NotFoundError"
  5944. }
  5945. }
  5946. }
  5947. }
  5948. },
  5949. "description": "Retrieve all child sessions that were forked from the specified parent session.",
  5950. "summary": "Get session children",
  5951. "x-codeSamples": [
  5952. {
  5953. "lang": "js",
  5954. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
  5955. }
  5956. ]
  5957. }
  5958. },
  5959. "/session/{sessionID}/todo": {
  5960. "get": {
  5961. "tags": ["session"],
  5962. "operationId": "session.todo",
  5963. "parameters": [
  5964. {
  5965. "name": "sessionID",
  5966. "in": "path",
  5967. "schema": {
  5968. "type": "string",
  5969. "pattern": "^ses"
  5970. },
  5971. "required": true
  5972. },
  5973. {
  5974. "name": "directory",
  5975. "in": "query",
  5976. "schema": {
  5977. "type": "string"
  5978. },
  5979. "required": false
  5980. },
  5981. {
  5982. "name": "workspace",
  5983. "in": "query",
  5984. "schema": {
  5985. "type": "string"
  5986. },
  5987. "required": false
  5988. }
  5989. ],
  5990. "responses": {
  5991. "200": {
  5992. "description": "Todo list",
  5993. "content": {
  5994. "application/json": {
  5995. "schema": {
  5996. "type": "array",
  5997. "items": {
  5998. "$ref": "#/components/schemas/Todo"
  5999. },
  6000. "description": "Todo list"
  6001. }
  6002. }
  6003. }
  6004. },
  6005. "400": {
  6006. "description": "BadRequest | InvalidRequestError",
  6007. "content": {
  6008. "application/json": {
  6009. "schema": {
  6010. "anyOf": [
  6011. {
  6012. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6013. },
  6014. {
  6015. "$ref": "#/components/schemas/InvalidRequestError"
  6016. }
  6017. ]
  6018. }
  6019. }
  6020. }
  6021. },
  6022. "404": {
  6023. "description": "NotFoundError",
  6024. "content": {
  6025. "application/json": {
  6026. "schema": {
  6027. "$ref": "#/components/schemas/NotFoundError"
  6028. }
  6029. }
  6030. }
  6031. }
  6032. },
  6033. "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
  6034. "summary": "Get session todos",
  6035. "x-codeSamples": [
  6036. {
  6037. "lang": "js",
  6038. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
  6039. }
  6040. ]
  6041. }
  6042. },
  6043. "/session/{sessionID}/diff": {
  6044. "get": {
  6045. "tags": ["session"],
  6046. "operationId": "session.diff",
  6047. "parameters": [
  6048. {
  6049. "name": "sessionID",
  6050. "in": "path",
  6051. "schema": {
  6052. "type": "string",
  6053. "pattern": "^ses"
  6054. },
  6055. "required": true
  6056. },
  6057. {
  6058. "name": "directory",
  6059. "in": "query",
  6060. "schema": {
  6061. "type": "string"
  6062. },
  6063. "required": false
  6064. },
  6065. {
  6066. "name": "workspace",
  6067. "in": "query",
  6068. "schema": {
  6069. "type": "string"
  6070. },
  6071. "required": false
  6072. },
  6073. {
  6074. "name": "messageID",
  6075. "in": "query",
  6076. "schema": {
  6077. "type": "string",
  6078. "pattern": "^msg"
  6079. },
  6080. "required": false
  6081. }
  6082. ],
  6083. "responses": {
  6084. "200": {
  6085. "description": "Successfully retrieved diff",
  6086. "content": {
  6087. "application/json": {
  6088. "schema": {
  6089. "type": "array",
  6090. "items": {
  6091. "$ref": "#/components/schemas/SnapshotFileDiff"
  6092. },
  6093. "description": "Successfully retrieved diff"
  6094. }
  6095. }
  6096. }
  6097. },
  6098. "400": {
  6099. "description": "Bad request",
  6100. "content": {
  6101. "application/json": {
  6102. "schema": {
  6103. "$ref": "#/components/schemas/BadRequestError"
  6104. }
  6105. }
  6106. }
  6107. }
  6108. },
  6109. "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
  6110. "summary": "Get message diff",
  6111. "x-codeSamples": [
  6112. {
  6113. "lang": "js",
  6114. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
  6115. }
  6116. ]
  6117. }
  6118. },
  6119. "/session/{sessionID}/message": {
  6120. "get": {
  6121. "tags": ["session"],
  6122. "operationId": "session.messages",
  6123. "parameters": [
  6124. {
  6125. "name": "sessionID",
  6126. "in": "path",
  6127. "schema": {
  6128. "type": "string",
  6129. "pattern": "^ses"
  6130. },
  6131. "required": true
  6132. },
  6133. {
  6134. "name": "directory",
  6135. "in": "query",
  6136. "schema": {
  6137. "type": "string"
  6138. },
  6139. "required": false
  6140. },
  6141. {
  6142. "name": "workspace",
  6143. "in": "query",
  6144. "schema": {
  6145. "type": "string"
  6146. },
  6147. "required": false
  6148. },
  6149. {
  6150. "name": "limit",
  6151. "in": "query",
  6152. "schema": {
  6153. "type": "integer",
  6154. "minimum": 0,
  6155. "maximum": 9007199254740991
  6156. },
  6157. "required": false
  6158. },
  6159. {
  6160. "name": "before",
  6161. "in": "query",
  6162. "schema": {
  6163. "type": "string"
  6164. },
  6165. "required": false
  6166. }
  6167. ],
  6168. "responses": {
  6169. "200": {
  6170. "description": "List of messages",
  6171. "content": {
  6172. "application/json": {
  6173. "schema": {
  6174. "type": "array",
  6175. "items": {
  6176. "type": "object",
  6177. "properties": {
  6178. "info": {
  6179. "$ref": "#/components/schemas/Message"
  6180. },
  6181. "parts": {
  6182. "type": "array",
  6183. "items": {
  6184. "$ref": "#/components/schemas/Part"
  6185. }
  6186. }
  6187. },
  6188. "required": ["info", "parts"],
  6189. "additionalProperties": false
  6190. },
  6191. "description": "List of messages"
  6192. }
  6193. }
  6194. }
  6195. },
  6196. "400": {
  6197. "description": "BadRequest | InvalidRequestError",
  6198. "content": {
  6199. "application/json": {
  6200. "schema": {
  6201. "anyOf": [
  6202. {
  6203. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6204. },
  6205. {
  6206. "$ref": "#/components/schemas/InvalidRequestError"
  6207. }
  6208. ]
  6209. }
  6210. }
  6211. }
  6212. },
  6213. "404": {
  6214. "description": "NotFoundError",
  6215. "content": {
  6216. "application/json": {
  6217. "schema": {
  6218. "$ref": "#/components/schemas/NotFoundError"
  6219. }
  6220. }
  6221. }
  6222. }
  6223. },
  6224. "description": "Retrieve all messages in a session, including user prompts and AI responses.",
  6225. "summary": "Get session messages",
  6226. "x-codeSamples": [
  6227. {
  6228. "lang": "js",
  6229. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
  6230. }
  6231. ]
  6232. },
  6233. "post": {
  6234. "tags": ["session"],
  6235. "operationId": "session.prompt",
  6236. "parameters": [
  6237. {
  6238. "name": "sessionID",
  6239. "in": "path",
  6240. "schema": {
  6241. "type": "string",
  6242. "pattern": "^ses"
  6243. },
  6244. "required": true
  6245. },
  6246. {
  6247. "name": "directory",
  6248. "in": "query",
  6249. "schema": {
  6250. "type": "string"
  6251. },
  6252. "required": false
  6253. },
  6254. {
  6255. "name": "workspace",
  6256. "in": "query",
  6257. "schema": {
  6258. "type": "string"
  6259. },
  6260. "required": false
  6261. }
  6262. ],
  6263. "responses": {
  6264. "200": {
  6265. "description": "Created message",
  6266. "content": {
  6267. "application/json": {
  6268. "schema": {
  6269. "type": "object",
  6270. "required": ["info", "parts"],
  6271. "properties": {
  6272. "info": {
  6273. "$ref": "#/components/schemas/AssistantMessage"
  6274. },
  6275. "parts": {
  6276. "type": "array",
  6277. "items": {
  6278. "$ref": "#/components/schemas/Part"
  6279. }
  6280. }
  6281. }
  6282. }
  6283. }
  6284. }
  6285. },
  6286. "400": {
  6287. "description": "BadRequest | InvalidRequestError",
  6288. "content": {
  6289. "application/json": {
  6290. "schema": {
  6291. "anyOf": [
  6292. {
  6293. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6294. },
  6295. {
  6296. "$ref": "#/components/schemas/InvalidRequestError"
  6297. }
  6298. ]
  6299. }
  6300. }
  6301. }
  6302. },
  6303. "404": {
  6304. "description": "NotFoundError",
  6305. "content": {
  6306. "application/json": {
  6307. "schema": {
  6308. "$ref": "#/components/schemas/NotFoundError"
  6309. }
  6310. }
  6311. }
  6312. }
  6313. },
  6314. "description": "Create and send a new message to a session, streaming the AI response.",
  6315. "summary": "Send message",
  6316. "requestBody": {
  6317. "content": {
  6318. "application/json": {
  6319. "schema": {
  6320. "type": "object",
  6321. "properties": {
  6322. "messageID": {
  6323. "type": "string",
  6324. "pattern": "^msg"
  6325. },
  6326. "model": {
  6327. "type": "object",
  6328. "properties": {
  6329. "providerID": {
  6330. "type": "string"
  6331. },
  6332. "modelID": {
  6333. "type": "string"
  6334. }
  6335. },
  6336. "required": ["providerID", "modelID"],
  6337. "additionalProperties": false
  6338. },
  6339. "agent": {
  6340. "type": "string"
  6341. },
  6342. "noReply": {
  6343. "type": "boolean"
  6344. },
  6345. "tools": {
  6346. "type": "object",
  6347. "additionalProperties": {
  6348. "type": "boolean"
  6349. }
  6350. },
  6351. "format": {
  6352. "$ref": "#/components/schemas/OutputFormat"
  6353. },
  6354. "system": {
  6355. "type": "string"
  6356. },
  6357. "variant": {
  6358. "type": "string"
  6359. },
  6360. "parts": {
  6361. "type": "array",
  6362. "items": {
  6363. "anyOf": [
  6364. {
  6365. "$ref": "#/components/schemas/TextPartInput"
  6366. },
  6367. {
  6368. "$ref": "#/components/schemas/FilePartInput"
  6369. },
  6370. {
  6371. "$ref": "#/components/schemas/AgentPartInput"
  6372. },
  6373. {
  6374. "$ref": "#/components/schemas/SubtaskPartInput"
  6375. }
  6376. ]
  6377. }
  6378. }
  6379. },
  6380. "required": ["parts"],
  6381. "additionalProperties": false
  6382. }
  6383. }
  6384. }
  6385. },
  6386. "x-codeSamples": [
  6387. {
  6388. "lang": "js",
  6389. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  6390. }
  6391. ]
  6392. }
  6393. },
  6394. "/session/{sessionID}/message/{messageID}": {
  6395. "get": {
  6396. "tags": ["session"],
  6397. "operationId": "session.message",
  6398. "parameters": [
  6399. {
  6400. "name": "sessionID",
  6401. "in": "path",
  6402. "schema": {
  6403. "type": "string",
  6404. "pattern": "^ses"
  6405. },
  6406. "required": true
  6407. },
  6408. {
  6409. "name": "messageID",
  6410. "in": "path",
  6411. "schema": {
  6412. "type": "string",
  6413. "pattern": "^msg"
  6414. },
  6415. "required": true
  6416. },
  6417. {
  6418. "name": "directory",
  6419. "in": "query",
  6420. "schema": {
  6421. "type": "string"
  6422. },
  6423. "required": false
  6424. },
  6425. {
  6426. "name": "workspace",
  6427. "in": "query",
  6428. "schema": {
  6429. "type": "string"
  6430. },
  6431. "required": false
  6432. }
  6433. ],
  6434. "responses": {
  6435. "200": {
  6436. "description": "Message",
  6437. "content": {
  6438. "application/json": {
  6439. "schema": {
  6440. "type": "object",
  6441. "properties": {
  6442. "info": {
  6443. "$ref": "#/components/schemas/Message"
  6444. },
  6445. "parts": {
  6446. "type": "array",
  6447. "items": {
  6448. "$ref": "#/components/schemas/Part"
  6449. }
  6450. }
  6451. },
  6452. "required": ["info", "parts"],
  6453. "additionalProperties": false,
  6454. "description": "Message"
  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": "Retrieve a specific message from a session by its message ID.",
  6488. "summary": "Get message",
  6489. "x-codeSamples": [
  6490. {
  6491. "lang": "js",
  6492. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  6493. }
  6494. ]
  6495. },
  6496. "delete": {
  6497. "tags": ["session"],
  6498. "operationId": "session.deleteMessage",
  6499. "parameters": [
  6500. {
  6501. "name": "sessionID",
  6502. "in": "path",
  6503. "schema": {
  6504. "type": "string",
  6505. "pattern": "^ses"
  6506. },
  6507. "required": true
  6508. },
  6509. {
  6510. "name": "messageID",
  6511. "in": "path",
  6512. "schema": {
  6513. "type": "string",
  6514. "pattern": "^msg"
  6515. },
  6516. "required": true
  6517. },
  6518. {
  6519. "name": "directory",
  6520. "in": "query",
  6521. "schema": {
  6522. "type": "string"
  6523. },
  6524. "required": false
  6525. },
  6526. {
  6527. "name": "workspace",
  6528. "in": "query",
  6529. "schema": {
  6530. "type": "string"
  6531. },
  6532. "required": false
  6533. }
  6534. ],
  6535. "responses": {
  6536. "200": {
  6537. "description": "Successfully deleted message",
  6538. "content": {
  6539. "application/json": {
  6540. "schema": {
  6541. "type": "boolean",
  6542. "description": "Successfully deleted message"
  6543. }
  6544. }
  6545. }
  6546. },
  6547. "400": {
  6548. "description": "BadRequest | InvalidRequestError",
  6549. "content": {
  6550. "application/json": {
  6551. "schema": {
  6552. "anyOf": [
  6553. {
  6554. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6555. },
  6556. {
  6557. "$ref": "#/components/schemas/InvalidRequestError"
  6558. }
  6559. ]
  6560. }
  6561. }
  6562. }
  6563. },
  6564. "404": {
  6565. "description": "NotFoundError",
  6566. "content": {
  6567. "application/json": {
  6568. "schema": {
  6569. "$ref": "#/components/schemas/NotFoundError"
  6570. }
  6571. }
  6572. }
  6573. },
  6574. "409": {
  6575. "description": "SessionBusyError",
  6576. "content": {
  6577. "application/json": {
  6578. "schema": {
  6579. "$ref": "#/components/schemas/SessionBusyError"
  6580. }
  6581. }
  6582. }
  6583. }
  6584. },
  6585. "description": "Permanently delete a specific message and all of its parts from a session without reverting file changes.",
  6586. "summary": "Delete message",
  6587. "x-codeSamples": [
  6588. {
  6589. "lang": "js",
  6590. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.deleteMessage({\n ...\n})"
  6591. }
  6592. ]
  6593. }
  6594. },
  6595. "/session/{sessionID}/fork": {
  6596. "post": {
  6597. "tags": ["session"],
  6598. "operationId": "session.fork",
  6599. "parameters": [
  6600. {
  6601. "name": "sessionID",
  6602. "in": "path",
  6603. "schema": {
  6604. "type": "string",
  6605. "pattern": "^ses"
  6606. },
  6607. "required": true
  6608. },
  6609. {
  6610. "name": "directory",
  6611. "in": "query",
  6612. "schema": {
  6613. "type": "string"
  6614. },
  6615. "required": false
  6616. },
  6617. {
  6618. "name": "workspace",
  6619. "in": "query",
  6620. "schema": {
  6621. "type": "string"
  6622. },
  6623. "required": false
  6624. }
  6625. ],
  6626. "responses": {
  6627. "200": {
  6628. "description": "200",
  6629. "content": {
  6630. "application/json": {
  6631. "schema": {
  6632. "$ref": "#/components/schemas/Session"
  6633. }
  6634. }
  6635. }
  6636. },
  6637. "400": {
  6638. "description": "BadRequest | InvalidRequestError",
  6639. "content": {
  6640. "application/json": {
  6641. "schema": {
  6642. "anyOf": [
  6643. {
  6644. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6645. },
  6646. {
  6647. "$ref": "#/components/schemas/InvalidRequestError"
  6648. }
  6649. ]
  6650. }
  6651. }
  6652. }
  6653. },
  6654. "404": {
  6655. "description": "NotFoundError",
  6656. "content": {
  6657. "application/json": {
  6658. "schema": {
  6659. "$ref": "#/components/schemas/NotFoundError"
  6660. }
  6661. }
  6662. }
  6663. }
  6664. },
  6665. "description": "Create a new session by forking an existing session at a specific message point.",
  6666. "summary": "Fork session",
  6667. "requestBody": {
  6668. "content": {
  6669. "application/json": {
  6670. "schema": {
  6671. "type": "object",
  6672. "properties": {
  6673. "messageID": {
  6674. "type": "string",
  6675. "pattern": "^msg"
  6676. }
  6677. },
  6678. "additionalProperties": false
  6679. }
  6680. }
  6681. }
  6682. },
  6683. "x-codeSamples": [
  6684. {
  6685. "lang": "js",
  6686. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  6687. }
  6688. ]
  6689. }
  6690. },
  6691. "/session/{sessionID}/abort": {
  6692. "post": {
  6693. "tags": ["session"],
  6694. "operationId": "session.abort",
  6695. "parameters": [
  6696. {
  6697. "name": "sessionID",
  6698. "in": "path",
  6699. "schema": {
  6700. "type": "string",
  6701. "pattern": "^ses"
  6702. },
  6703. "required": true
  6704. },
  6705. {
  6706. "name": "directory",
  6707. "in": "query",
  6708. "schema": {
  6709. "type": "string"
  6710. },
  6711. "required": false
  6712. },
  6713. {
  6714. "name": "workspace",
  6715. "in": "query",
  6716. "schema": {
  6717. "type": "string"
  6718. },
  6719. "required": false
  6720. }
  6721. ],
  6722. "responses": {
  6723. "200": {
  6724. "description": "Aborted session",
  6725. "content": {
  6726. "application/json": {
  6727. "schema": {
  6728. "type": "boolean",
  6729. "description": "Aborted session"
  6730. }
  6731. }
  6732. }
  6733. },
  6734. "400": {
  6735. "description": "BadRequest | InvalidRequestError",
  6736. "content": {
  6737. "application/json": {
  6738. "schema": {
  6739. "anyOf": [
  6740. {
  6741. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6742. },
  6743. {
  6744. "$ref": "#/components/schemas/InvalidRequestError"
  6745. }
  6746. ]
  6747. }
  6748. }
  6749. }
  6750. }
  6751. },
  6752. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  6753. "summary": "Abort session",
  6754. "x-codeSamples": [
  6755. {
  6756. "lang": "js",
  6757. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  6758. }
  6759. ]
  6760. }
  6761. },
  6762. "/session/{sessionID}/init": {
  6763. "post": {
  6764. "tags": ["session"],
  6765. "operationId": "session.init",
  6766. "parameters": [
  6767. {
  6768. "name": "sessionID",
  6769. "in": "path",
  6770. "schema": {
  6771. "type": "string",
  6772. "pattern": "^ses"
  6773. },
  6774. "required": true
  6775. },
  6776. {
  6777. "name": "directory",
  6778. "in": "query",
  6779. "schema": {
  6780. "type": "string"
  6781. },
  6782. "required": false
  6783. },
  6784. {
  6785. "name": "workspace",
  6786. "in": "query",
  6787. "schema": {
  6788. "type": "string"
  6789. },
  6790. "required": false
  6791. }
  6792. ],
  6793. "responses": {
  6794. "200": {
  6795. "description": "200",
  6796. "content": {
  6797. "application/json": {
  6798. "schema": {
  6799. "type": "boolean",
  6800. "description": "200"
  6801. }
  6802. }
  6803. }
  6804. },
  6805. "400": {
  6806. "description": "BadRequest | InvalidRequestError",
  6807. "content": {
  6808. "application/json": {
  6809. "schema": {
  6810. "anyOf": [
  6811. {
  6812. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6813. },
  6814. {
  6815. "$ref": "#/components/schemas/InvalidRequestError"
  6816. }
  6817. ]
  6818. }
  6819. }
  6820. }
  6821. },
  6822. "404": {
  6823. "description": "NotFoundError",
  6824. "content": {
  6825. "application/json": {
  6826. "schema": {
  6827. "$ref": "#/components/schemas/NotFoundError"
  6828. }
  6829. }
  6830. }
  6831. }
  6832. },
  6833. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  6834. "summary": "Initialize session",
  6835. "requestBody": {
  6836. "content": {
  6837. "application/json": {
  6838. "schema": {
  6839. "type": "object",
  6840. "properties": {
  6841. "modelID": {
  6842. "type": "string"
  6843. },
  6844. "providerID": {
  6845. "type": "string"
  6846. },
  6847. "messageID": {
  6848. "type": "string",
  6849. "pattern": "^msg"
  6850. }
  6851. },
  6852. "required": ["modelID", "providerID", "messageID"],
  6853. "additionalProperties": false
  6854. }
  6855. }
  6856. }
  6857. },
  6858. "x-codeSamples": [
  6859. {
  6860. "lang": "js",
  6861. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  6862. }
  6863. ]
  6864. }
  6865. },
  6866. "/session/{sessionID}/share": {
  6867. "post": {
  6868. "tags": ["session"],
  6869. "operationId": "session.share",
  6870. "parameters": [
  6871. {
  6872. "name": "sessionID",
  6873. "in": "path",
  6874. "schema": {
  6875. "type": "string",
  6876. "pattern": "^ses"
  6877. },
  6878. "required": true
  6879. },
  6880. {
  6881. "name": "directory",
  6882. "in": "query",
  6883. "schema": {
  6884. "type": "string"
  6885. },
  6886. "required": false
  6887. },
  6888. {
  6889. "name": "workspace",
  6890. "in": "query",
  6891. "schema": {
  6892. "type": "string"
  6893. },
  6894. "required": false
  6895. }
  6896. ],
  6897. "responses": {
  6898. "200": {
  6899. "description": "Successfully shared session",
  6900. "content": {
  6901. "application/json": {
  6902. "schema": {
  6903. "$ref": "#/components/schemas/Session"
  6904. }
  6905. }
  6906. }
  6907. },
  6908. "400": {
  6909. "description": "Bad request",
  6910. "content": {
  6911. "application/json": {
  6912. "schema": {
  6913. "$ref": "#/components/schemas/BadRequestError"
  6914. }
  6915. }
  6916. }
  6917. },
  6918. "404": {
  6919. "description": "NotFoundError",
  6920. "content": {
  6921. "application/json": {
  6922. "schema": {
  6923. "$ref": "#/components/schemas/NotFoundError"
  6924. }
  6925. }
  6926. }
  6927. },
  6928. "500": {
  6929. "description": "InternalServerError",
  6930. "content": {
  6931. "application/json": {
  6932. "schema": {
  6933. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6934. }
  6935. }
  6936. }
  6937. }
  6938. },
  6939. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  6940. "summary": "Share session",
  6941. "x-codeSamples": [
  6942. {
  6943. "lang": "js",
  6944. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  6945. }
  6946. ]
  6947. },
  6948. "delete": {
  6949. "tags": ["session"],
  6950. "operationId": "session.unshare",
  6951. "parameters": [
  6952. {
  6953. "name": "sessionID",
  6954. "in": "path",
  6955. "schema": {
  6956. "type": "string",
  6957. "pattern": "^ses"
  6958. },
  6959. "required": true
  6960. },
  6961. {
  6962. "name": "directory",
  6963. "in": "query",
  6964. "schema": {
  6965. "type": "string"
  6966. },
  6967. "required": false
  6968. },
  6969. {
  6970. "name": "workspace",
  6971. "in": "query",
  6972. "schema": {
  6973. "type": "string"
  6974. },
  6975. "required": false
  6976. }
  6977. ],
  6978. "responses": {
  6979. "200": {
  6980. "description": "Successfully unshared session",
  6981. "content": {
  6982. "application/json": {
  6983. "schema": {
  6984. "$ref": "#/components/schemas/Session"
  6985. }
  6986. }
  6987. }
  6988. },
  6989. "400": {
  6990. "description": "Bad request",
  6991. "content": {
  6992. "application/json": {
  6993. "schema": {
  6994. "$ref": "#/components/schemas/BadRequestError"
  6995. }
  6996. }
  6997. }
  6998. },
  6999. "404": {
  7000. "description": "NotFoundError",
  7001. "content": {
  7002. "application/json": {
  7003. "schema": {
  7004. "$ref": "#/components/schemas/NotFoundError"
  7005. }
  7006. }
  7007. }
  7008. },
  7009. "500": {
  7010. "description": "InternalServerError",
  7011. "content": {
  7012. "application/json": {
  7013. "schema": {
  7014. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  7015. }
  7016. }
  7017. }
  7018. }
  7019. },
  7020. "description": "Remove the shareable link for a session, making it private again.",
  7021. "summary": "Unshare session",
  7022. "x-codeSamples": [
  7023. {
  7024. "lang": "js",
  7025. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  7026. }
  7027. ]
  7028. }
  7029. },
  7030. "/session/{sessionID}/summarize": {
  7031. "post": {
  7032. "tags": ["session"],
  7033. "operationId": "session.summarize",
  7034. "parameters": [
  7035. {
  7036. "name": "sessionID",
  7037. "in": "path",
  7038. "schema": {
  7039. "type": "string",
  7040. "pattern": "^ses"
  7041. },
  7042. "required": true
  7043. },
  7044. {
  7045. "name": "directory",
  7046. "in": "query",
  7047. "schema": {
  7048. "type": "string"
  7049. },
  7050. "required": false
  7051. },
  7052. {
  7053. "name": "workspace",
  7054. "in": "query",
  7055. "schema": {
  7056. "type": "string"
  7057. },
  7058. "required": false
  7059. }
  7060. ],
  7061. "responses": {
  7062. "200": {
  7063. "description": "Summarized session",
  7064. "content": {
  7065. "application/json": {
  7066. "schema": {
  7067. "type": "boolean",
  7068. "description": "Summarized session"
  7069. }
  7070. }
  7071. }
  7072. },
  7073. "400": {
  7074. "description": "BadRequest | InvalidRequestError",
  7075. "content": {
  7076. "application/json": {
  7077. "schema": {
  7078. "anyOf": [
  7079. {
  7080. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7081. },
  7082. {
  7083. "$ref": "#/components/schemas/InvalidRequestError"
  7084. }
  7085. ]
  7086. }
  7087. }
  7088. }
  7089. },
  7090. "404": {
  7091. "description": "NotFoundError",
  7092. "content": {
  7093. "application/json": {
  7094. "schema": {
  7095. "$ref": "#/components/schemas/NotFoundError"
  7096. }
  7097. }
  7098. }
  7099. }
  7100. },
  7101. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  7102. "summary": "Summarize session",
  7103. "requestBody": {
  7104. "content": {
  7105. "application/json": {
  7106. "schema": {
  7107. "type": "object",
  7108. "properties": {
  7109. "providerID": {
  7110. "type": "string"
  7111. },
  7112. "modelID": {
  7113. "type": "string"
  7114. },
  7115. "auto": {
  7116. "type": "boolean"
  7117. }
  7118. },
  7119. "required": ["providerID", "modelID"],
  7120. "additionalProperties": false
  7121. }
  7122. }
  7123. }
  7124. },
  7125. "x-codeSamples": [
  7126. {
  7127. "lang": "js",
  7128. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  7129. }
  7130. ]
  7131. }
  7132. },
  7133. "/session/{sessionID}/prompt_async": {
  7134. "post": {
  7135. "tags": ["session"],
  7136. "operationId": "session.prompt_async",
  7137. "parameters": [
  7138. {
  7139. "name": "sessionID",
  7140. "in": "path",
  7141. "schema": {
  7142. "type": "string",
  7143. "pattern": "^ses"
  7144. },
  7145. "required": true
  7146. },
  7147. {
  7148. "name": "directory",
  7149. "in": "query",
  7150. "schema": {
  7151. "type": "string"
  7152. },
  7153. "required": false
  7154. },
  7155. {
  7156. "name": "workspace",
  7157. "in": "query",
  7158. "schema": {
  7159. "type": "string"
  7160. },
  7161. "required": false
  7162. }
  7163. ],
  7164. "responses": {
  7165. "204": {
  7166. "description": "Prompt accepted"
  7167. },
  7168. "400": {
  7169. "description": "BadRequest | InvalidRequestError",
  7170. "content": {
  7171. "application/json": {
  7172. "schema": {
  7173. "anyOf": [
  7174. {
  7175. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7176. },
  7177. {
  7178. "$ref": "#/components/schemas/InvalidRequestError"
  7179. }
  7180. ]
  7181. }
  7182. }
  7183. }
  7184. },
  7185. "404": {
  7186. "description": "NotFoundError",
  7187. "content": {
  7188. "application/json": {
  7189. "schema": {
  7190. "$ref": "#/components/schemas/NotFoundError"
  7191. }
  7192. }
  7193. }
  7194. }
  7195. },
  7196. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  7197. "summary": "Send async message",
  7198. "requestBody": {
  7199. "content": {
  7200. "application/json": {
  7201. "schema": {
  7202. "type": "object",
  7203. "properties": {
  7204. "messageID": {
  7205. "type": "string",
  7206. "pattern": "^msg"
  7207. },
  7208. "model": {
  7209. "type": "object",
  7210. "properties": {
  7211. "providerID": {
  7212. "type": "string"
  7213. },
  7214. "modelID": {
  7215. "type": "string"
  7216. }
  7217. },
  7218. "required": ["providerID", "modelID"],
  7219. "additionalProperties": false
  7220. },
  7221. "agent": {
  7222. "type": "string"
  7223. },
  7224. "noReply": {
  7225. "type": "boolean"
  7226. },
  7227. "tools": {
  7228. "type": "object",
  7229. "additionalProperties": {
  7230. "type": "boolean"
  7231. }
  7232. },
  7233. "format": {
  7234. "$ref": "#/components/schemas/OutputFormat"
  7235. },
  7236. "system": {
  7237. "type": "string"
  7238. },
  7239. "variant": {
  7240. "type": "string"
  7241. },
  7242. "parts": {
  7243. "type": "array",
  7244. "items": {
  7245. "anyOf": [
  7246. {
  7247. "$ref": "#/components/schemas/TextPartInput"
  7248. },
  7249. {
  7250. "$ref": "#/components/schemas/FilePartInput"
  7251. },
  7252. {
  7253. "$ref": "#/components/schemas/AgentPartInput"
  7254. },
  7255. {
  7256. "$ref": "#/components/schemas/SubtaskPartInput"
  7257. }
  7258. ]
  7259. }
  7260. }
  7261. },
  7262. "required": ["parts"],
  7263. "additionalProperties": false
  7264. }
  7265. }
  7266. }
  7267. },
  7268. "x-codeSamples": [
  7269. {
  7270. "lang": "js",
  7271. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  7272. }
  7273. ]
  7274. }
  7275. },
  7276. "/session/{sessionID}/command": {
  7277. "post": {
  7278. "tags": ["session"],
  7279. "operationId": "session.command",
  7280. "parameters": [
  7281. {
  7282. "name": "sessionID",
  7283. "in": "path",
  7284. "schema": {
  7285. "type": "string",
  7286. "pattern": "^ses"
  7287. },
  7288. "required": true
  7289. },
  7290. {
  7291. "name": "directory",
  7292. "in": "query",
  7293. "schema": {
  7294. "type": "string"
  7295. },
  7296. "required": false
  7297. },
  7298. {
  7299. "name": "workspace",
  7300. "in": "query",
  7301. "schema": {
  7302. "type": "string"
  7303. },
  7304. "required": false
  7305. }
  7306. ],
  7307. "responses": {
  7308. "200": {
  7309. "description": "Created message",
  7310. "content": {
  7311. "application/json": {
  7312. "schema": {
  7313. "type": "object",
  7314. "required": ["info", "parts"],
  7315. "properties": {
  7316. "info": {
  7317. "$ref": "#/components/schemas/AssistantMessage"
  7318. },
  7319. "parts": {
  7320. "type": "array",
  7321. "items": {
  7322. "$ref": "#/components/schemas/Part"
  7323. }
  7324. }
  7325. }
  7326. }
  7327. }
  7328. }
  7329. },
  7330. "400": {
  7331. "description": "BadRequest | InvalidRequestError",
  7332. "content": {
  7333. "application/json": {
  7334. "schema": {
  7335. "anyOf": [
  7336. {
  7337. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7338. },
  7339. {
  7340. "$ref": "#/components/schemas/InvalidRequestError"
  7341. }
  7342. ]
  7343. }
  7344. }
  7345. }
  7346. },
  7347. "404": {
  7348. "description": "NotFoundError",
  7349. "content": {
  7350. "application/json": {
  7351. "schema": {
  7352. "$ref": "#/components/schemas/NotFoundError"
  7353. }
  7354. }
  7355. }
  7356. }
  7357. },
  7358. "description": "Send a new command to a session for execution by the AI assistant.",
  7359. "summary": "Send command",
  7360. "requestBody": {
  7361. "content": {
  7362. "application/json": {
  7363. "schema": {
  7364. "type": "object",
  7365. "properties": {
  7366. "messageID": {
  7367. "type": "string",
  7368. "pattern": "^msg"
  7369. },
  7370. "agent": {
  7371. "type": "string"
  7372. },
  7373. "model": {
  7374. "type": "string"
  7375. },
  7376. "arguments": {
  7377. "type": "string"
  7378. },
  7379. "command": {
  7380. "type": "string"
  7381. },
  7382. "variant": {
  7383. "type": "string"
  7384. },
  7385. "parts": {
  7386. "type": "array",
  7387. "items": {
  7388. "type": "object",
  7389. "properties": {
  7390. "id": {
  7391. "type": "string",
  7392. "pattern": "^prt"
  7393. },
  7394. "type": {
  7395. "type": "string",
  7396. "enum": ["file"]
  7397. },
  7398. "mime": {
  7399. "type": "string"
  7400. },
  7401. "filename": {
  7402. "type": "string"
  7403. },
  7404. "url": {
  7405. "type": "string"
  7406. },
  7407. "source": {
  7408. "$ref": "#/components/schemas/FilePartSource"
  7409. }
  7410. },
  7411. "required": ["type", "mime", "url"],
  7412. "additionalProperties": false
  7413. }
  7414. }
  7415. },
  7416. "required": ["arguments", "command"],
  7417. "additionalProperties": false
  7418. }
  7419. }
  7420. }
  7421. },
  7422. "x-codeSamples": [
  7423. {
  7424. "lang": "js",
  7425. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  7426. }
  7427. ]
  7428. }
  7429. },
  7430. "/session/{sessionID}/shell": {
  7431. "post": {
  7432. "tags": ["session"],
  7433. "operationId": "session.shell",
  7434. "parameters": [
  7435. {
  7436. "name": "sessionID",
  7437. "in": "path",
  7438. "schema": {
  7439. "type": "string",
  7440. "pattern": "^ses"
  7441. },
  7442. "required": true
  7443. },
  7444. {
  7445. "name": "directory",
  7446. "in": "query",
  7447. "schema": {
  7448. "type": "string"
  7449. },
  7450. "required": false
  7451. },
  7452. {
  7453. "name": "workspace",
  7454. "in": "query",
  7455. "schema": {
  7456. "type": "string"
  7457. },
  7458. "required": false
  7459. }
  7460. ],
  7461. "responses": {
  7462. "200": {
  7463. "description": "Created message",
  7464. "content": {
  7465. "application/json": {
  7466. "schema": {
  7467. "type": "object",
  7468. "properties": {
  7469. "info": {
  7470. "$ref": "#/components/schemas/Message"
  7471. },
  7472. "parts": {
  7473. "type": "array",
  7474. "items": {
  7475. "$ref": "#/components/schemas/Part"
  7476. }
  7477. }
  7478. },
  7479. "required": ["info", "parts"],
  7480. "additionalProperties": false,
  7481. "description": "Created message"
  7482. }
  7483. }
  7484. }
  7485. },
  7486. "400": {
  7487. "description": "BadRequest | InvalidRequestError",
  7488. "content": {
  7489. "application/json": {
  7490. "schema": {
  7491. "anyOf": [
  7492. {
  7493. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7494. },
  7495. {
  7496. "$ref": "#/components/schemas/InvalidRequestError"
  7497. }
  7498. ]
  7499. }
  7500. }
  7501. }
  7502. },
  7503. "404": {
  7504. "description": "NotFoundError",
  7505. "content": {
  7506. "application/json": {
  7507. "schema": {
  7508. "$ref": "#/components/schemas/NotFoundError"
  7509. }
  7510. }
  7511. }
  7512. },
  7513. "409": {
  7514. "description": "SessionBusyError",
  7515. "content": {
  7516. "application/json": {
  7517. "schema": {
  7518. "$ref": "#/components/schemas/SessionBusyError"
  7519. }
  7520. }
  7521. }
  7522. }
  7523. },
  7524. "description": "Execute a shell command within the session context and return the AI's response.",
  7525. "summary": "Run shell command",
  7526. "requestBody": {
  7527. "content": {
  7528. "application/json": {
  7529. "schema": {
  7530. "type": "object",
  7531. "properties": {
  7532. "messageID": {
  7533. "type": "string",
  7534. "pattern": "^msg"
  7535. },
  7536. "agent": {
  7537. "type": "string"
  7538. },
  7539. "model": {
  7540. "type": "object",
  7541. "properties": {
  7542. "providerID": {
  7543. "type": "string"
  7544. },
  7545. "modelID": {
  7546. "type": "string"
  7547. }
  7548. },
  7549. "required": ["providerID", "modelID"],
  7550. "additionalProperties": false
  7551. },
  7552. "command": {
  7553. "type": "string"
  7554. }
  7555. },
  7556. "required": ["agent", "command"],
  7557. "additionalProperties": false
  7558. }
  7559. }
  7560. }
  7561. },
  7562. "x-codeSamples": [
  7563. {
  7564. "lang": "js",
  7565. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  7566. }
  7567. ]
  7568. }
  7569. },
  7570. "/session/{sessionID}/revert": {
  7571. "post": {
  7572. "tags": ["session"],
  7573. "operationId": "session.revert",
  7574. "parameters": [
  7575. {
  7576. "name": "sessionID",
  7577. "in": "path",
  7578. "schema": {
  7579. "type": "string",
  7580. "pattern": "^ses"
  7581. },
  7582. "required": true
  7583. },
  7584. {
  7585. "name": "directory",
  7586. "in": "query",
  7587. "schema": {
  7588. "type": "string"
  7589. },
  7590. "required": false
  7591. },
  7592. {
  7593. "name": "workspace",
  7594. "in": "query",
  7595. "schema": {
  7596. "type": "string"
  7597. },
  7598. "required": false
  7599. }
  7600. ],
  7601. "responses": {
  7602. "200": {
  7603. "description": "Updated session",
  7604. "content": {
  7605. "application/json": {
  7606. "schema": {
  7607. "$ref": "#/components/schemas/Session"
  7608. }
  7609. }
  7610. }
  7611. },
  7612. "400": {
  7613. "description": "BadRequest | InvalidRequestError",
  7614. "content": {
  7615. "application/json": {
  7616. "schema": {
  7617. "anyOf": [
  7618. {
  7619. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7620. },
  7621. {
  7622. "$ref": "#/components/schemas/InvalidRequestError"
  7623. }
  7624. ]
  7625. }
  7626. }
  7627. }
  7628. },
  7629. "404": {
  7630. "description": "NotFoundError",
  7631. "content": {
  7632. "application/json": {
  7633. "schema": {
  7634. "$ref": "#/components/schemas/NotFoundError"
  7635. }
  7636. }
  7637. }
  7638. },
  7639. "409": {
  7640. "description": "SessionBusyError",
  7641. "content": {
  7642. "application/json": {
  7643. "schema": {
  7644. "$ref": "#/components/schemas/SessionBusyError"
  7645. }
  7646. }
  7647. }
  7648. }
  7649. },
  7650. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  7651. "summary": "Revert message",
  7652. "requestBody": {
  7653. "content": {
  7654. "application/json": {
  7655. "schema": {
  7656. "type": "object",
  7657. "properties": {
  7658. "messageID": {
  7659. "type": "string",
  7660. "pattern": "^msg"
  7661. },
  7662. "partID": {
  7663. "type": "string",
  7664. "pattern": "^prt"
  7665. }
  7666. },
  7667. "required": ["messageID"],
  7668. "additionalProperties": false
  7669. }
  7670. }
  7671. }
  7672. },
  7673. "x-codeSamples": [
  7674. {
  7675. "lang": "js",
  7676. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  7677. }
  7678. ]
  7679. }
  7680. },
  7681. "/session/{sessionID}/unrevert": {
  7682. "post": {
  7683. "tags": ["session"],
  7684. "operationId": "session.unrevert",
  7685. "parameters": [
  7686. {
  7687. "name": "sessionID",
  7688. "in": "path",
  7689. "schema": {
  7690. "type": "string",
  7691. "pattern": "^ses"
  7692. },
  7693. "required": true
  7694. },
  7695. {
  7696. "name": "directory",
  7697. "in": "query",
  7698. "schema": {
  7699. "type": "string"
  7700. },
  7701. "required": false
  7702. },
  7703. {
  7704. "name": "workspace",
  7705. "in": "query",
  7706. "schema": {
  7707. "type": "string"
  7708. },
  7709. "required": false
  7710. }
  7711. ],
  7712. "responses": {
  7713. "200": {
  7714. "description": "Updated session",
  7715. "content": {
  7716. "application/json": {
  7717. "schema": {
  7718. "$ref": "#/components/schemas/Session"
  7719. }
  7720. }
  7721. }
  7722. },
  7723. "400": {
  7724. "description": "BadRequest | InvalidRequestError",
  7725. "content": {
  7726. "application/json": {
  7727. "schema": {
  7728. "anyOf": [
  7729. {
  7730. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7731. },
  7732. {
  7733. "$ref": "#/components/schemas/InvalidRequestError"
  7734. }
  7735. ]
  7736. }
  7737. }
  7738. }
  7739. },
  7740. "404": {
  7741. "description": "NotFoundError",
  7742. "content": {
  7743. "application/json": {
  7744. "schema": {
  7745. "$ref": "#/components/schemas/NotFoundError"
  7746. }
  7747. }
  7748. }
  7749. },
  7750. "409": {
  7751. "description": "SessionBusyError",
  7752. "content": {
  7753. "application/json": {
  7754. "schema": {
  7755. "$ref": "#/components/schemas/SessionBusyError"
  7756. }
  7757. }
  7758. }
  7759. }
  7760. },
  7761. "description": "Restore all previously reverted messages in a session.",
  7762. "summary": "Restore reverted messages",
  7763. "x-codeSamples": [
  7764. {
  7765. "lang": "js",
  7766. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  7767. }
  7768. ]
  7769. }
  7770. },
  7771. "/session/{sessionID}/permissions/{permissionID}": {
  7772. "post": {
  7773. "tags": ["session"],
  7774. "operationId": "permission.respond",
  7775. "parameters": [
  7776. {
  7777. "name": "sessionID",
  7778. "in": "path",
  7779. "schema": {
  7780. "type": "string",
  7781. "pattern": "^ses"
  7782. },
  7783. "required": true
  7784. },
  7785. {
  7786. "name": "permissionID",
  7787. "in": "path",
  7788. "schema": {
  7789. "type": "string",
  7790. "pattern": "^per"
  7791. },
  7792. "required": true
  7793. },
  7794. {
  7795. "name": "directory",
  7796. "in": "query",
  7797. "schema": {
  7798. "type": "string"
  7799. },
  7800. "required": false
  7801. },
  7802. {
  7803. "name": "workspace",
  7804. "in": "query",
  7805. "schema": {
  7806. "type": "string"
  7807. },
  7808. "required": false
  7809. }
  7810. ],
  7811. "responses": {
  7812. "200": {
  7813. "description": "Permission processed successfully",
  7814. "content": {
  7815. "application/json": {
  7816. "schema": {
  7817. "type": "boolean",
  7818. "description": "Permission processed successfully"
  7819. }
  7820. }
  7821. }
  7822. },
  7823. "400": {
  7824. "description": "BadRequest | InvalidRequestError",
  7825. "content": {
  7826. "application/json": {
  7827. "schema": {
  7828. "anyOf": [
  7829. {
  7830. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7831. },
  7832. {
  7833. "$ref": "#/components/schemas/InvalidRequestError"
  7834. }
  7835. ]
  7836. }
  7837. }
  7838. }
  7839. },
  7840. "404": {
  7841. "description": "NotFoundError | PermissionNotFoundError",
  7842. "content": {
  7843. "application/json": {
  7844. "schema": {
  7845. "anyOf": [
  7846. {
  7847. "$ref": "#/components/schemas/NotFoundError"
  7848. },
  7849. {
  7850. "$ref": "#/components/schemas/PermissionNotFoundError"
  7851. }
  7852. ]
  7853. }
  7854. }
  7855. }
  7856. }
  7857. },
  7858. "description": "Approve or deny a permission request from the AI assistant.",
  7859. "summary": "Respond to permission",
  7860. "deprecated": true,
  7861. "requestBody": {
  7862. "content": {
  7863. "application/json": {
  7864. "schema": {
  7865. "type": "object",
  7866. "properties": {
  7867. "response": {
  7868. "type": "string",
  7869. "enum": ["once", "always", "reject"]
  7870. }
  7871. },
  7872. "required": ["response"],
  7873. "additionalProperties": false
  7874. }
  7875. }
  7876. }
  7877. },
  7878. "x-codeSamples": [
  7879. {
  7880. "lang": "js",
  7881. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  7882. }
  7883. ]
  7884. }
  7885. },
  7886. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  7887. "delete": {
  7888. "tags": ["session"],
  7889. "operationId": "part.delete",
  7890. "parameters": [
  7891. {
  7892. "name": "sessionID",
  7893. "in": "path",
  7894. "schema": {
  7895. "type": "string",
  7896. "pattern": "^ses"
  7897. },
  7898. "required": true
  7899. },
  7900. {
  7901. "name": "messageID",
  7902. "in": "path",
  7903. "schema": {
  7904. "type": "string",
  7905. "pattern": "^msg"
  7906. },
  7907. "required": true
  7908. },
  7909. {
  7910. "name": "partID",
  7911. "in": "path",
  7912. "schema": {
  7913. "type": "string",
  7914. "pattern": "^prt"
  7915. },
  7916. "required": true
  7917. },
  7918. {
  7919. "name": "directory",
  7920. "in": "query",
  7921. "schema": {
  7922. "type": "string"
  7923. },
  7924. "required": false
  7925. },
  7926. {
  7927. "name": "workspace",
  7928. "in": "query",
  7929. "schema": {
  7930. "type": "string"
  7931. },
  7932. "required": false
  7933. }
  7934. ],
  7935. "responses": {
  7936. "200": {
  7937. "description": "Successfully deleted part",
  7938. "content": {
  7939. "application/json": {
  7940. "schema": {
  7941. "type": "boolean",
  7942. "description": "Successfully deleted part"
  7943. }
  7944. }
  7945. }
  7946. },
  7947. "400": {
  7948. "description": "BadRequest | InvalidRequestError",
  7949. "content": {
  7950. "application/json": {
  7951. "schema": {
  7952. "anyOf": [
  7953. {
  7954. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7955. },
  7956. {
  7957. "$ref": "#/components/schemas/InvalidRequestError"
  7958. }
  7959. ]
  7960. }
  7961. }
  7962. }
  7963. },
  7964. "404": {
  7965. "description": "NotFoundError",
  7966. "content": {
  7967. "application/json": {
  7968. "schema": {
  7969. "$ref": "#/components/schemas/NotFoundError"
  7970. }
  7971. }
  7972. }
  7973. }
  7974. },
  7975. "description": "Delete a part from a message.",
  7976. "x-codeSamples": [
  7977. {
  7978. "lang": "js",
  7979. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  7980. }
  7981. ]
  7982. },
  7983. "patch": {
  7984. "tags": ["session"],
  7985. "operationId": "part.update",
  7986. "parameters": [
  7987. {
  7988. "name": "sessionID",
  7989. "in": "path",
  7990. "schema": {
  7991. "type": "string",
  7992. "pattern": "^ses"
  7993. },
  7994. "required": true
  7995. },
  7996. {
  7997. "name": "messageID",
  7998. "in": "path",
  7999. "schema": {
  8000. "type": "string",
  8001. "pattern": "^msg"
  8002. },
  8003. "required": true
  8004. },
  8005. {
  8006. "name": "partID",
  8007. "in": "path",
  8008. "schema": {
  8009. "type": "string",
  8010. "pattern": "^prt"
  8011. },
  8012. "required": true
  8013. },
  8014. {
  8015. "name": "directory",
  8016. "in": "query",
  8017. "schema": {
  8018. "type": "string"
  8019. },
  8020. "required": false
  8021. },
  8022. {
  8023. "name": "workspace",
  8024. "in": "query",
  8025. "schema": {
  8026. "type": "string"
  8027. },
  8028. "required": false
  8029. }
  8030. ],
  8031. "responses": {
  8032. "200": {
  8033. "description": "Successfully updated part",
  8034. "content": {
  8035. "application/json": {
  8036. "schema": {
  8037. "$ref": "#/components/schemas/Part"
  8038. }
  8039. }
  8040. }
  8041. },
  8042. "400": {
  8043. "description": "BadRequest | InvalidRequestError",
  8044. "content": {
  8045. "application/json": {
  8046. "schema": {
  8047. "anyOf": [
  8048. {
  8049. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8050. },
  8051. {
  8052. "$ref": "#/components/schemas/InvalidRequestError"
  8053. }
  8054. ]
  8055. }
  8056. }
  8057. }
  8058. },
  8059. "404": {
  8060. "description": "NotFoundError",
  8061. "content": {
  8062. "application/json": {
  8063. "schema": {
  8064. "$ref": "#/components/schemas/NotFoundError"
  8065. }
  8066. }
  8067. }
  8068. }
  8069. },
  8070. "description": "Update a part in a message.",
  8071. "requestBody": {
  8072. "content": {
  8073. "application/json": {
  8074. "schema": {
  8075. "$ref": "#/components/schemas/Part"
  8076. }
  8077. }
  8078. }
  8079. },
  8080. "x-codeSamples": [
  8081. {
  8082. "lang": "js",
  8083. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  8084. }
  8085. ]
  8086. }
  8087. },
  8088. "/sync/start": {
  8089. "post": {
  8090. "tags": ["sync"],
  8091. "operationId": "sync.start",
  8092. "parameters": [
  8093. {
  8094. "name": "directory",
  8095. "in": "query",
  8096. "schema": {
  8097. "type": "string"
  8098. },
  8099. "required": false
  8100. },
  8101. {
  8102. "name": "workspace",
  8103. "in": "query",
  8104. "schema": {
  8105. "type": "string"
  8106. },
  8107. "required": false
  8108. }
  8109. ],
  8110. "responses": {
  8111. "200": {
  8112. "description": "Workspace sync started",
  8113. "content": {
  8114. "application/json": {
  8115. "schema": {
  8116. "type": "boolean",
  8117. "description": "Workspace sync started"
  8118. }
  8119. }
  8120. }
  8121. },
  8122. "400": {
  8123. "description": "Bad request",
  8124. "content": {
  8125. "application/json": {
  8126. "schema": {
  8127. "$ref": "#/components/schemas/BadRequestError"
  8128. }
  8129. }
  8130. }
  8131. }
  8132. },
  8133. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  8134. "summary": "Start workspace sync",
  8135. "x-codeSamples": [
  8136. {
  8137. "lang": "js",
  8138. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  8139. }
  8140. ]
  8141. }
  8142. },
  8143. "/sync/replay": {
  8144. "post": {
  8145. "tags": ["sync"],
  8146. "operationId": "sync.replay",
  8147. "parameters": [
  8148. {
  8149. "name": "directory",
  8150. "in": "query",
  8151. "schema": {
  8152. "type": "string"
  8153. },
  8154. "required": false
  8155. },
  8156. {
  8157. "name": "workspace",
  8158. "in": "query",
  8159. "schema": {
  8160. "type": "string"
  8161. },
  8162. "required": false
  8163. }
  8164. ],
  8165. "responses": {
  8166. "200": {
  8167. "description": "Replayed sync events",
  8168. "content": {
  8169. "application/json": {
  8170. "schema": {
  8171. "type": "object",
  8172. "properties": {
  8173. "sessionID": {
  8174. "type": "string"
  8175. }
  8176. },
  8177. "required": ["sessionID"],
  8178. "additionalProperties": false,
  8179. "description": "Replayed sync events"
  8180. }
  8181. }
  8182. }
  8183. },
  8184. "400": {
  8185. "description": "BadRequest | InvalidRequestError",
  8186. "content": {
  8187. "application/json": {
  8188. "schema": {
  8189. "anyOf": [
  8190. {
  8191. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8192. },
  8193. {
  8194. "$ref": "#/components/schemas/InvalidRequestError"
  8195. }
  8196. ]
  8197. }
  8198. }
  8199. }
  8200. }
  8201. },
  8202. "description": "Validate and replay a complete sync event history.",
  8203. "summary": "Replay sync events",
  8204. "requestBody": {
  8205. "content": {
  8206. "application/json": {
  8207. "schema": {
  8208. "type": "object",
  8209. "properties": {
  8210. "directory": {
  8211. "type": "string"
  8212. },
  8213. "events": {
  8214. "type": "array",
  8215. "minItems": 1,
  8216. "items": {
  8217. "type": "object",
  8218. "properties": {
  8219. "id": {
  8220. "type": "string",
  8221. "pattern": "^evt_"
  8222. },
  8223. "aggregateID": {
  8224. "type": "string"
  8225. },
  8226. "seq": {
  8227. "type": "integer",
  8228. "minimum": 0
  8229. },
  8230. "type": {
  8231. "type": "string"
  8232. },
  8233. "data": {
  8234. "type": "object"
  8235. }
  8236. },
  8237. "required": ["id", "aggregateID", "seq", "type", "data"],
  8238. "additionalProperties": false
  8239. }
  8240. }
  8241. },
  8242. "required": ["directory", "events"],
  8243. "additionalProperties": false
  8244. }
  8245. }
  8246. }
  8247. },
  8248. "x-codeSamples": [
  8249. {
  8250. "lang": "js",
  8251. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  8252. }
  8253. ]
  8254. }
  8255. },
  8256. "/sync/steal": {
  8257. "post": {
  8258. "tags": ["sync"],
  8259. "operationId": "sync.steal",
  8260. "parameters": [
  8261. {
  8262. "name": "directory",
  8263. "in": "query",
  8264. "schema": {
  8265. "type": "string"
  8266. },
  8267. "required": false
  8268. },
  8269. {
  8270. "name": "workspace",
  8271. "in": "query",
  8272. "schema": {
  8273. "type": "string"
  8274. },
  8275. "required": false
  8276. }
  8277. ],
  8278. "responses": {
  8279. "200": {
  8280. "description": "Session stolen into workspace",
  8281. "content": {
  8282. "application/json": {
  8283. "schema": {
  8284. "type": "object",
  8285. "properties": {
  8286. "sessionID": {
  8287. "type": "string",
  8288. "pattern": "^ses"
  8289. }
  8290. },
  8291. "required": ["sessionID"],
  8292. "additionalProperties": false,
  8293. "description": "Session stolen into workspace"
  8294. }
  8295. }
  8296. }
  8297. },
  8298. "400": {
  8299. "description": "BadRequest | InvalidRequestError",
  8300. "content": {
  8301. "application/json": {
  8302. "schema": {
  8303. "anyOf": [
  8304. {
  8305. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8306. },
  8307. {
  8308. "$ref": "#/components/schemas/InvalidRequestError"
  8309. }
  8310. ]
  8311. }
  8312. }
  8313. }
  8314. }
  8315. },
  8316. "description": "Update a session to belong to the current workspace through the sync event system.",
  8317. "summary": "Steal session into workspace",
  8318. "requestBody": {
  8319. "content": {
  8320. "application/json": {
  8321. "schema": {
  8322. "type": "object",
  8323. "properties": {
  8324. "sessionID": {
  8325. "type": "string",
  8326. "pattern": "^ses"
  8327. }
  8328. },
  8329. "required": ["sessionID"],
  8330. "additionalProperties": false
  8331. }
  8332. }
  8333. }
  8334. },
  8335. "x-codeSamples": [
  8336. {
  8337. "lang": "js",
  8338. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.steal({\n ...\n})"
  8339. }
  8340. ]
  8341. }
  8342. },
  8343. "/sync/history": {
  8344. "post": {
  8345. "tags": ["sync"],
  8346. "operationId": "sync.history.list",
  8347. "parameters": [
  8348. {
  8349. "name": "directory",
  8350. "in": "query",
  8351. "schema": {
  8352. "type": "string"
  8353. },
  8354. "required": false
  8355. },
  8356. {
  8357. "name": "workspace",
  8358. "in": "query",
  8359. "schema": {
  8360. "type": "string"
  8361. },
  8362. "required": false
  8363. }
  8364. ],
  8365. "responses": {
  8366. "200": {
  8367. "description": "Sync events",
  8368. "content": {
  8369. "application/json": {
  8370. "schema": {
  8371. "type": "array",
  8372. "items": {
  8373. "type": "object",
  8374. "properties": {
  8375. "id": {
  8376. "type": "string",
  8377. "pattern": "^evt_"
  8378. },
  8379. "aggregate_id": {
  8380. "type": "string"
  8381. },
  8382. "seq": {
  8383. "type": "integer",
  8384. "minimum": 0
  8385. },
  8386. "type": {
  8387. "type": "string"
  8388. },
  8389. "data": {
  8390. "type": "object"
  8391. }
  8392. },
  8393. "required": ["id", "aggregate_id", "seq", "type", "data"],
  8394. "additionalProperties": false
  8395. },
  8396. "description": "Sync events"
  8397. }
  8398. }
  8399. }
  8400. },
  8401. "400": {
  8402. "description": "BadRequest | InvalidRequestError",
  8403. "content": {
  8404. "application/json": {
  8405. "schema": {
  8406. "anyOf": [
  8407. {
  8408. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8409. },
  8410. {
  8411. "$ref": "#/components/schemas/InvalidRequestError"
  8412. }
  8413. ]
  8414. }
  8415. }
  8416. }
  8417. }
  8418. },
  8419. "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.",
  8420. "summary": "List sync events",
  8421. "requestBody": {
  8422. "content": {
  8423. "application/json": {
  8424. "schema": {
  8425. "type": "object",
  8426. "additionalProperties": {
  8427. "type": "integer",
  8428. "minimum": 0
  8429. }
  8430. }
  8431. }
  8432. }
  8433. },
  8434. "x-codeSamples": [
  8435. {
  8436. "lang": "js",
  8437. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  8438. }
  8439. ]
  8440. }
  8441. },
  8442. "/tui/append-prompt": {
  8443. "post": {
  8444. "tags": ["tui"],
  8445. "operationId": "tui.appendPrompt",
  8446. "parameters": [
  8447. {
  8448. "name": "directory",
  8449. "in": "query",
  8450. "schema": {
  8451. "type": "string"
  8452. },
  8453. "required": false
  8454. },
  8455. {
  8456. "name": "workspace",
  8457. "in": "query",
  8458. "schema": {
  8459. "type": "string"
  8460. },
  8461. "required": false
  8462. }
  8463. ],
  8464. "responses": {
  8465. "200": {
  8466. "description": "Prompt processed successfully",
  8467. "content": {
  8468. "application/json": {
  8469. "schema": {
  8470. "type": "boolean",
  8471. "description": "Prompt processed successfully"
  8472. }
  8473. }
  8474. }
  8475. },
  8476. "400": {
  8477. "description": "BadRequest | InvalidRequestError",
  8478. "content": {
  8479. "application/json": {
  8480. "schema": {
  8481. "anyOf": [
  8482. {
  8483. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8484. },
  8485. {
  8486. "$ref": "#/components/schemas/InvalidRequestError"
  8487. }
  8488. ]
  8489. }
  8490. }
  8491. }
  8492. }
  8493. },
  8494. "description": "Append prompt to the TUI.",
  8495. "summary": "Append TUI prompt",
  8496. "requestBody": {
  8497. "content": {
  8498. "application/json": {
  8499. "schema": {
  8500. "type": "object",
  8501. "properties": {
  8502. "text": {
  8503. "type": "string"
  8504. }
  8505. },
  8506. "required": ["text"],
  8507. "additionalProperties": false
  8508. }
  8509. }
  8510. }
  8511. },
  8512. "x-codeSamples": [
  8513. {
  8514. "lang": "js",
  8515. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  8516. }
  8517. ]
  8518. }
  8519. },
  8520. "/tui/open-help": {
  8521. "post": {
  8522. "tags": ["tui"],
  8523. "operationId": "tui.openHelp",
  8524. "parameters": [
  8525. {
  8526. "name": "directory",
  8527. "in": "query",
  8528. "schema": {
  8529. "type": "string"
  8530. },
  8531. "required": false
  8532. },
  8533. {
  8534. "name": "workspace",
  8535. "in": "query",
  8536. "schema": {
  8537. "type": "string"
  8538. },
  8539. "required": false
  8540. }
  8541. ],
  8542. "responses": {
  8543. "200": {
  8544. "description": "Help dialog opened successfully",
  8545. "content": {
  8546. "application/json": {
  8547. "schema": {
  8548. "type": "boolean",
  8549. "description": "Help dialog opened successfully"
  8550. }
  8551. }
  8552. }
  8553. },
  8554. "400": {
  8555. "description": "Bad request",
  8556. "content": {
  8557. "application/json": {
  8558. "schema": {
  8559. "$ref": "#/components/schemas/BadRequestError"
  8560. }
  8561. }
  8562. }
  8563. }
  8564. },
  8565. "description": "Open the help dialog in the TUI to display user assistance information.",
  8566. "summary": "Open help dialog",
  8567. "x-codeSamples": [
  8568. {
  8569. "lang": "js",
  8570. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  8571. }
  8572. ]
  8573. }
  8574. },
  8575. "/tui/open-sessions": {
  8576. "post": {
  8577. "tags": ["tui"],
  8578. "operationId": "tui.openSessions",
  8579. "parameters": [
  8580. {
  8581. "name": "directory",
  8582. "in": "query",
  8583. "schema": {
  8584. "type": "string"
  8585. },
  8586. "required": false
  8587. },
  8588. {
  8589. "name": "workspace",
  8590. "in": "query",
  8591. "schema": {
  8592. "type": "string"
  8593. },
  8594. "required": false
  8595. }
  8596. ],
  8597. "responses": {
  8598. "200": {
  8599. "description": "Session dialog opened successfully",
  8600. "content": {
  8601. "application/json": {
  8602. "schema": {
  8603. "type": "boolean",
  8604. "description": "Session dialog opened successfully"
  8605. }
  8606. }
  8607. }
  8608. },
  8609. "400": {
  8610. "description": "Bad request",
  8611. "content": {
  8612. "application/json": {
  8613. "schema": {
  8614. "$ref": "#/components/schemas/BadRequestError"
  8615. }
  8616. }
  8617. }
  8618. }
  8619. },
  8620. "description": "Open the session dialog.",
  8621. "summary": "Open sessions dialog",
  8622. "x-codeSamples": [
  8623. {
  8624. "lang": "js",
  8625. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  8626. }
  8627. ]
  8628. }
  8629. },
  8630. "/tui/open-themes": {
  8631. "post": {
  8632. "tags": ["tui"],
  8633. "operationId": "tui.openThemes",
  8634. "parameters": [
  8635. {
  8636. "name": "directory",
  8637. "in": "query",
  8638. "schema": {
  8639. "type": "string"
  8640. },
  8641. "required": false
  8642. },
  8643. {
  8644. "name": "workspace",
  8645. "in": "query",
  8646. "schema": {
  8647. "type": "string"
  8648. },
  8649. "required": false
  8650. }
  8651. ],
  8652. "responses": {
  8653. "200": {
  8654. "description": "Theme dialog opened successfully",
  8655. "content": {
  8656. "application/json": {
  8657. "schema": {
  8658. "type": "boolean",
  8659. "description": "Theme dialog opened successfully"
  8660. }
  8661. }
  8662. }
  8663. },
  8664. "400": {
  8665. "description": "Bad request",
  8666. "content": {
  8667. "application/json": {
  8668. "schema": {
  8669. "$ref": "#/components/schemas/BadRequestError"
  8670. }
  8671. }
  8672. }
  8673. }
  8674. },
  8675. "description": "Open the theme dialog.",
  8676. "summary": "Open themes dialog",
  8677. "x-codeSamples": [
  8678. {
  8679. "lang": "js",
  8680. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  8681. }
  8682. ]
  8683. }
  8684. },
  8685. "/tui/open-models": {
  8686. "post": {
  8687. "tags": ["tui"],
  8688. "operationId": "tui.openModels",
  8689. "parameters": [
  8690. {
  8691. "name": "directory",
  8692. "in": "query",
  8693. "schema": {
  8694. "type": "string"
  8695. },
  8696. "required": false
  8697. },
  8698. {
  8699. "name": "workspace",
  8700. "in": "query",
  8701. "schema": {
  8702. "type": "string"
  8703. },
  8704. "required": false
  8705. }
  8706. ],
  8707. "responses": {
  8708. "200": {
  8709. "description": "Model dialog opened successfully",
  8710. "content": {
  8711. "application/json": {
  8712. "schema": {
  8713. "type": "boolean",
  8714. "description": "Model dialog opened successfully"
  8715. }
  8716. }
  8717. }
  8718. },
  8719. "400": {
  8720. "description": "Bad request",
  8721. "content": {
  8722. "application/json": {
  8723. "schema": {
  8724. "$ref": "#/components/schemas/BadRequestError"
  8725. }
  8726. }
  8727. }
  8728. }
  8729. },
  8730. "description": "Open the model dialog.",
  8731. "summary": "Open models dialog",
  8732. "x-codeSamples": [
  8733. {
  8734. "lang": "js",
  8735. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  8736. }
  8737. ]
  8738. }
  8739. },
  8740. "/tui/submit-prompt": {
  8741. "post": {
  8742. "tags": ["tui"],
  8743. "operationId": "tui.submitPrompt",
  8744. "parameters": [
  8745. {
  8746. "name": "directory",
  8747. "in": "query",
  8748. "schema": {
  8749. "type": "string"
  8750. },
  8751. "required": false
  8752. },
  8753. {
  8754. "name": "workspace",
  8755. "in": "query",
  8756. "schema": {
  8757. "type": "string"
  8758. },
  8759. "required": false
  8760. }
  8761. ],
  8762. "responses": {
  8763. "200": {
  8764. "description": "Prompt submitted successfully",
  8765. "content": {
  8766. "application/json": {
  8767. "schema": {
  8768. "type": "boolean",
  8769. "description": "Prompt submitted successfully"
  8770. }
  8771. }
  8772. }
  8773. },
  8774. "400": {
  8775. "description": "Bad request",
  8776. "content": {
  8777. "application/json": {
  8778. "schema": {
  8779. "$ref": "#/components/schemas/BadRequestError"
  8780. }
  8781. }
  8782. }
  8783. }
  8784. },
  8785. "description": "Submit the prompt.",
  8786. "summary": "Submit TUI prompt",
  8787. "x-codeSamples": [
  8788. {
  8789. "lang": "js",
  8790. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  8791. }
  8792. ]
  8793. }
  8794. },
  8795. "/tui/clear-prompt": {
  8796. "post": {
  8797. "tags": ["tui"],
  8798. "operationId": "tui.clearPrompt",
  8799. "parameters": [
  8800. {
  8801. "name": "directory",
  8802. "in": "query",
  8803. "schema": {
  8804. "type": "string"
  8805. },
  8806. "required": false
  8807. },
  8808. {
  8809. "name": "workspace",
  8810. "in": "query",
  8811. "schema": {
  8812. "type": "string"
  8813. },
  8814. "required": false
  8815. }
  8816. ],
  8817. "responses": {
  8818. "200": {
  8819. "description": "Prompt cleared successfully",
  8820. "content": {
  8821. "application/json": {
  8822. "schema": {
  8823. "type": "boolean",
  8824. "description": "Prompt cleared successfully"
  8825. }
  8826. }
  8827. }
  8828. },
  8829. "400": {
  8830. "description": "Bad request",
  8831. "content": {
  8832. "application/json": {
  8833. "schema": {
  8834. "$ref": "#/components/schemas/BadRequestError"
  8835. }
  8836. }
  8837. }
  8838. }
  8839. },
  8840. "description": "Clear the prompt.",
  8841. "summary": "Clear TUI prompt",
  8842. "x-codeSamples": [
  8843. {
  8844. "lang": "js",
  8845. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  8846. }
  8847. ]
  8848. }
  8849. },
  8850. "/tui/execute-command": {
  8851. "post": {
  8852. "tags": ["tui"],
  8853. "operationId": "tui.executeCommand",
  8854. "parameters": [
  8855. {
  8856. "name": "directory",
  8857. "in": "query",
  8858. "schema": {
  8859. "type": "string"
  8860. },
  8861. "required": false
  8862. },
  8863. {
  8864. "name": "workspace",
  8865. "in": "query",
  8866. "schema": {
  8867. "type": "string"
  8868. },
  8869. "required": false
  8870. }
  8871. ],
  8872. "responses": {
  8873. "200": {
  8874. "description": "Command executed successfully",
  8875. "content": {
  8876. "application/json": {
  8877. "schema": {
  8878. "type": "boolean",
  8879. "description": "Command executed successfully"
  8880. }
  8881. }
  8882. }
  8883. },
  8884. "400": {
  8885. "description": "BadRequest | InvalidRequestError",
  8886. "content": {
  8887. "application/json": {
  8888. "schema": {
  8889. "anyOf": [
  8890. {
  8891. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8892. },
  8893. {
  8894. "$ref": "#/components/schemas/InvalidRequestError"
  8895. }
  8896. ]
  8897. }
  8898. }
  8899. }
  8900. }
  8901. },
  8902. "description": "Execute a TUI command.",
  8903. "summary": "Execute TUI command",
  8904. "requestBody": {
  8905. "content": {
  8906. "application/json": {
  8907. "schema": {
  8908. "type": "object",
  8909. "properties": {
  8910. "command": {
  8911. "type": "string"
  8912. }
  8913. },
  8914. "required": ["command"],
  8915. "additionalProperties": false
  8916. }
  8917. }
  8918. }
  8919. },
  8920. "x-codeSamples": [
  8921. {
  8922. "lang": "js",
  8923. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  8924. }
  8925. ]
  8926. }
  8927. },
  8928. "/tui/show-toast": {
  8929. "post": {
  8930. "tags": ["tui"],
  8931. "operationId": "tui.showToast",
  8932. "parameters": [
  8933. {
  8934. "name": "directory",
  8935. "in": "query",
  8936. "schema": {
  8937. "type": "string"
  8938. },
  8939. "required": false
  8940. },
  8941. {
  8942. "name": "workspace",
  8943. "in": "query",
  8944. "schema": {
  8945. "type": "string"
  8946. },
  8947. "required": false
  8948. }
  8949. ],
  8950. "responses": {
  8951. "200": {
  8952. "description": "Toast notification shown successfully",
  8953. "content": {
  8954. "application/json": {
  8955. "schema": {
  8956. "type": "boolean",
  8957. "description": "Toast notification shown successfully"
  8958. }
  8959. }
  8960. }
  8961. },
  8962. "400": {
  8963. "description": "Bad request",
  8964. "content": {
  8965. "application/json": {
  8966. "schema": {
  8967. "$ref": "#/components/schemas/BadRequestError"
  8968. }
  8969. }
  8970. }
  8971. }
  8972. },
  8973. "description": "Show a toast notification in the TUI.",
  8974. "summary": "Show TUI toast",
  8975. "requestBody": {
  8976. "content": {
  8977. "application/json": {
  8978. "schema": {
  8979. "type": "object",
  8980. "properties": {
  8981. "title": {
  8982. "type": "string"
  8983. },
  8984. "message": {
  8985. "type": "string"
  8986. },
  8987. "variant": {
  8988. "type": "string",
  8989. "enum": ["info", "success", "warning", "error"]
  8990. },
  8991. "duration": {
  8992. "type": "integer",
  8993. "exclusiveMinimum": 0
  8994. }
  8995. },
  8996. "required": ["message", "variant"],
  8997. "additionalProperties": false
  8998. }
  8999. }
  9000. }
  9001. },
  9002. "x-codeSamples": [
  9003. {
  9004. "lang": "js",
  9005. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  9006. }
  9007. ]
  9008. }
  9009. },
  9010. "/tui/publish": {
  9011. "post": {
  9012. "tags": ["tui"],
  9013. "operationId": "tui.publish",
  9014. "parameters": [
  9015. {
  9016. "name": "directory",
  9017. "in": "query",
  9018. "schema": {
  9019. "type": "string"
  9020. },
  9021. "required": false
  9022. },
  9023. {
  9024. "name": "workspace",
  9025. "in": "query",
  9026. "schema": {
  9027. "type": "string"
  9028. },
  9029. "required": false
  9030. }
  9031. ],
  9032. "responses": {
  9033. "200": {
  9034. "description": "Event published successfully",
  9035. "content": {
  9036. "application/json": {
  9037. "schema": {
  9038. "type": "boolean",
  9039. "description": "Event published successfully"
  9040. }
  9041. }
  9042. }
  9043. },
  9044. "400": {
  9045. "description": "BadRequest | InvalidRequestError",
  9046. "content": {
  9047. "application/json": {
  9048. "schema": {
  9049. "anyOf": [
  9050. {
  9051. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9052. },
  9053. {
  9054. "$ref": "#/components/schemas/InvalidRequestError"
  9055. }
  9056. ]
  9057. }
  9058. }
  9059. }
  9060. }
  9061. },
  9062. "description": "Publish a TUI event.",
  9063. "summary": "Publish TUI event",
  9064. "requestBody": {
  9065. "content": {
  9066. "application/json": {
  9067. "schema": {
  9068. "anyOf": [
  9069. {
  9070. "$ref": "#/components/schemas/EventTuiPromptAppend"
  9071. },
  9072. {
  9073. "$ref": "#/components/schemas/EventTuiCommandExecute"
  9074. },
  9075. {
  9076. "$ref": "#/components/schemas/EventTuiToastShow"
  9077. },
  9078. {
  9079. "$ref": "#/components/schemas/EventTuiSessionSelect"
  9080. }
  9081. ]
  9082. }
  9083. }
  9084. }
  9085. },
  9086. "x-codeSamples": [
  9087. {
  9088. "lang": "js",
  9089. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  9090. }
  9091. ]
  9092. }
  9093. },
  9094. "/tui/select-session": {
  9095. "post": {
  9096. "tags": ["tui"],
  9097. "operationId": "tui.selectSession",
  9098. "parameters": [
  9099. {
  9100. "name": "directory",
  9101. "in": "query",
  9102. "schema": {
  9103. "type": "string"
  9104. },
  9105. "required": false
  9106. },
  9107. {
  9108. "name": "workspace",
  9109. "in": "query",
  9110. "schema": {
  9111. "type": "string"
  9112. },
  9113. "required": false
  9114. }
  9115. ],
  9116. "responses": {
  9117. "200": {
  9118. "description": "Session selected successfully",
  9119. "content": {
  9120. "application/json": {
  9121. "schema": {
  9122. "type": "boolean",
  9123. "description": "Session selected successfully"
  9124. }
  9125. }
  9126. }
  9127. },
  9128. "400": {
  9129. "description": "BadRequest | InvalidRequestError",
  9130. "content": {
  9131. "application/json": {
  9132. "schema": {
  9133. "anyOf": [
  9134. {
  9135. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9136. },
  9137. {
  9138. "$ref": "#/components/schemas/InvalidRequestError"
  9139. }
  9140. ]
  9141. }
  9142. }
  9143. }
  9144. },
  9145. "404": {
  9146. "description": "NotFoundError",
  9147. "content": {
  9148. "application/json": {
  9149. "schema": {
  9150. "$ref": "#/components/schemas/NotFoundError"
  9151. }
  9152. }
  9153. }
  9154. }
  9155. },
  9156. "description": "Navigate the TUI to display the specified session.",
  9157. "summary": "Select session",
  9158. "requestBody": {
  9159. "content": {
  9160. "application/json": {
  9161. "schema": {
  9162. "type": "object",
  9163. "properties": {
  9164. "sessionID": {
  9165. "type": "string",
  9166. "pattern": "^ses",
  9167. "description": "Session ID to navigate to"
  9168. }
  9169. },
  9170. "required": ["sessionID"],
  9171. "additionalProperties": false
  9172. }
  9173. }
  9174. }
  9175. },
  9176. "x-codeSamples": [
  9177. {
  9178. "lang": "js",
  9179. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  9180. }
  9181. ]
  9182. }
  9183. },
  9184. "/tui/control/next": {
  9185. "get": {
  9186. "tags": ["tui"],
  9187. "operationId": "tui.control.next",
  9188. "parameters": [
  9189. {
  9190. "name": "directory",
  9191. "in": "query",
  9192. "schema": {
  9193. "type": "string"
  9194. },
  9195. "required": false
  9196. },
  9197. {
  9198. "name": "workspace",
  9199. "in": "query",
  9200. "schema": {
  9201. "type": "string"
  9202. },
  9203. "required": false
  9204. }
  9205. ],
  9206. "responses": {
  9207. "200": {
  9208. "description": "Next TUI request",
  9209. "content": {
  9210. "application/json": {
  9211. "schema": {
  9212. "type": "object",
  9213. "properties": {
  9214. "path": {
  9215. "type": "string"
  9216. },
  9217. "body": {}
  9218. },
  9219. "required": ["path", "body"],
  9220. "additionalProperties": false,
  9221. "description": "Next TUI request"
  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": "Retrieve the next TUI request from the queue for processing.",
  9238. "summary": "Get next TUI request",
  9239. "x-codeSamples": [
  9240. {
  9241. "lang": "js",
  9242. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  9243. }
  9244. ]
  9245. }
  9246. },
  9247. "/tui/control/response": {
  9248. "post": {
  9249. "tags": ["tui"],
  9250. "operationId": "tui.control.response",
  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": "Response submitted successfully",
  9272. "content": {
  9273. "application/json": {
  9274. "schema": {
  9275. "type": "boolean",
  9276. "description": "Response submitted 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": "Submit a response to the TUI request queue to complete a pending request.",
  9293. "summary": "Submit TUI response",
  9294. "requestBody": {
  9295. "content": {
  9296. "application/json": {
  9297. "schema": {}
  9298. }
  9299. }
  9300. },
  9301. "x-codeSamples": [
  9302. {
  9303. "lang": "js",
  9304. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  9305. }
  9306. ]
  9307. }
  9308. },
  9309. "/experimental/workspace/adapter": {
  9310. "get": {
  9311. "tags": ["workspace"],
  9312. "operationId": "experimental.workspace.adapter.list",
  9313. "parameters": [
  9314. {
  9315. "name": "directory",
  9316. "in": "query",
  9317. "schema": {
  9318. "type": "string"
  9319. },
  9320. "required": false
  9321. },
  9322. {
  9323. "name": "workspace",
  9324. "in": "query",
  9325. "schema": {
  9326. "type": "string"
  9327. },
  9328. "required": false
  9329. }
  9330. ],
  9331. "responses": {
  9332. "200": {
  9333. "description": "Workspace adapters",
  9334. "content": {
  9335. "application/json": {
  9336. "schema": {
  9337. "type": "array",
  9338. "items": {
  9339. "type": "object",
  9340. "properties": {
  9341. "type": {
  9342. "type": "string"
  9343. },
  9344. "name": {
  9345. "type": "string"
  9346. },
  9347. "description": {
  9348. "type": "string"
  9349. }
  9350. },
  9351. "required": ["type", "name", "description"],
  9352. "additionalProperties": false
  9353. },
  9354. "description": "Workspace adapters"
  9355. }
  9356. }
  9357. }
  9358. },
  9359. "400": {
  9360. "description": "Bad request",
  9361. "content": {
  9362. "application/json": {
  9363. "schema": {
  9364. "$ref": "#/components/schemas/BadRequestError"
  9365. }
  9366. }
  9367. }
  9368. }
  9369. },
  9370. "description": "List all available workspace adapters for the current project.",
  9371. "summary": "List workspace adapters",
  9372. "x-codeSamples": [
  9373. {
  9374. "lang": "js",
  9375. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  9376. }
  9377. ]
  9378. }
  9379. },
  9380. "/experimental/workspace": {
  9381. "get": {
  9382. "tags": ["workspace"],
  9383. "operationId": "experimental.workspace.list",
  9384. "parameters": [
  9385. {
  9386. "name": "directory",
  9387. "in": "query",
  9388. "schema": {
  9389. "type": "string"
  9390. },
  9391. "required": false
  9392. },
  9393. {
  9394. "name": "workspace",
  9395. "in": "query",
  9396. "schema": {
  9397. "type": "string"
  9398. },
  9399. "required": false
  9400. }
  9401. ],
  9402. "responses": {
  9403. "200": {
  9404. "description": "Workspaces",
  9405. "content": {
  9406. "application/json": {
  9407. "schema": {
  9408. "type": "array",
  9409. "items": {
  9410. "$ref": "#/components/schemas/Workspace"
  9411. },
  9412. "description": "Workspaces"
  9413. }
  9414. }
  9415. }
  9416. },
  9417. "400": {
  9418. "description": "Bad request",
  9419. "content": {
  9420. "application/json": {
  9421. "schema": {
  9422. "$ref": "#/components/schemas/BadRequestError"
  9423. }
  9424. }
  9425. }
  9426. }
  9427. },
  9428. "description": "List all workspaces.",
  9429. "summary": "List workspaces",
  9430. "x-codeSamples": [
  9431. {
  9432. "lang": "js",
  9433. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  9434. }
  9435. ]
  9436. },
  9437. "post": {
  9438. "tags": ["workspace"],
  9439. "operationId": "experimental.workspace.create",
  9440. "parameters": [
  9441. {
  9442. "name": "directory",
  9443. "in": "query",
  9444. "schema": {
  9445. "type": "string"
  9446. },
  9447. "required": false
  9448. },
  9449. {
  9450. "name": "workspace",
  9451. "in": "query",
  9452. "schema": {
  9453. "type": "string"
  9454. },
  9455. "required": false
  9456. }
  9457. ],
  9458. "responses": {
  9459. "200": {
  9460. "description": "Workspace created",
  9461. "content": {
  9462. "application/json": {
  9463. "schema": {
  9464. "$ref": "#/components/schemas/Workspace"
  9465. }
  9466. }
  9467. }
  9468. },
  9469. "400": {
  9470. "description": "WorkspaceCreateError | BadRequest | InvalidRequestError",
  9471. "content": {
  9472. "application/json": {
  9473. "schema": {
  9474. "anyOf": [
  9475. {
  9476. "$ref": "#/components/schemas/WorkspaceCreateError"
  9477. },
  9478. {
  9479. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9480. },
  9481. {
  9482. "$ref": "#/components/schemas/InvalidRequestError"
  9483. }
  9484. ]
  9485. }
  9486. }
  9487. }
  9488. }
  9489. },
  9490. "description": "Create a workspace for the current project.",
  9491. "summary": "Create workspace",
  9492. "requestBody": {
  9493. "content": {
  9494. "application/json": {
  9495. "schema": {
  9496. "type": "object",
  9497. "properties": {
  9498. "id": {
  9499. "type": "string",
  9500. "pattern": "^wrk"
  9501. },
  9502. "type": {
  9503. "type": "string"
  9504. },
  9505. "branch": {
  9506. "anyOf": [
  9507. {
  9508. "type": "string"
  9509. },
  9510. {
  9511. "type": "null"
  9512. }
  9513. ]
  9514. },
  9515. "extra": {
  9516. "anyOf": [
  9517. {},
  9518. {
  9519. "type": "null"
  9520. }
  9521. ]
  9522. }
  9523. },
  9524. "required": ["type"],
  9525. "additionalProperties": false
  9526. }
  9527. }
  9528. }
  9529. },
  9530. "x-codeSamples": [
  9531. {
  9532. "lang": "js",
  9533. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  9534. }
  9535. ]
  9536. }
  9537. },
  9538. "/experimental/workspace/sync-list": {
  9539. "post": {
  9540. "tags": ["workspace"],
  9541. "operationId": "experimental.workspace.syncList",
  9542. "parameters": [
  9543. {
  9544. "name": "directory",
  9545. "in": "query",
  9546. "schema": {
  9547. "type": "string"
  9548. },
  9549. "required": false
  9550. },
  9551. {
  9552. "name": "workspace",
  9553. "in": "query",
  9554. "schema": {
  9555. "type": "string"
  9556. },
  9557. "required": false
  9558. }
  9559. ],
  9560. "responses": {
  9561. "204": {
  9562. "description": "Workspace list synced"
  9563. },
  9564. "400": {
  9565. "description": "Bad request",
  9566. "content": {
  9567. "application/json": {
  9568. "schema": {
  9569. "$ref": "#/components/schemas/BadRequestError"
  9570. }
  9571. }
  9572. }
  9573. }
  9574. },
  9575. "description": "Register missing workspaces returned by workspace adapters.",
  9576. "summary": "Sync workspace list",
  9577. "x-codeSamples": [
  9578. {
  9579. "lang": "js",
  9580. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.syncList({\n ...\n})"
  9581. }
  9582. ]
  9583. }
  9584. },
  9585. "/experimental/workspace/status": {
  9586. "get": {
  9587. "tags": ["workspace"],
  9588. "operationId": "experimental.workspace.status",
  9589. "parameters": [
  9590. {
  9591. "name": "directory",
  9592. "in": "query",
  9593. "schema": {
  9594. "type": "string"
  9595. },
  9596. "required": false
  9597. },
  9598. {
  9599. "name": "workspace",
  9600. "in": "query",
  9601. "schema": {
  9602. "type": "string"
  9603. },
  9604. "required": false
  9605. }
  9606. ],
  9607. "responses": {
  9608. "200": {
  9609. "description": "Workspace status",
  9610. "content": {
  9611. "application/json": {
  9612. "schema": {
  9613. "type": "array",
  9614. "items": {
  9615. "type": "object",
  9616. "properties": {
  9617. "workspaceID": {
  9618. "type": "string",
  9619. "pattern": "^wrk"
  9620. },
  9621. "status": {
  9622. "type": "string",
  9623. "enum": ["connected", "connecting", "disconnected", "error"]
  9624. }
  9625. },
  9626. "required": ["workspaceID", "status"],
  9627. "additionalProperties": false
  9628. },
  9629. "description": "Workspace status"
  9630. }
  9631. }
  9632. }
  9633. },
  9634. "400": {
  9635. "description": "Bad request",
  9636. "content": {
  9637. "application/json": {
  9638. "schema": {
  9639. "$ref": "#/components/schemas/BadRequestError"
  9640. }
  9641. }
  9642. }
  9643. }
  9644. },
  9645. "description": "Get connection status for workspaces in the current project.",
  9646. "summary": "Workspace status",
  9647. "x-codeSamples": [
  9648. {
  9649. "lang": "js",
  9650. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  9651. }
  9652. ]
  9653. }
  9654. },
  9655. "/experimental/workspace/{id}": {
  9656. "delete": {
  9657. "tags": ["workspace"],
  9658. "operationId": "experimental.workspace.remove",
  9659. "parameters": [
  9660. {
  9661. "name": "id",
  9662. "in": "path",
  9663. "schema": {
  9664. "type": "string",
  9665. "pattern": "^wrk"
  9666. },
  9667. "required": true
  9668. },
  9669. {
  9670. "name": "directory",
  9671. "in": "query",
  9672. "schema": {
  9673. "type": "string"
  9674. },
  9675. "required": false
  9676. },
  9677. {
  9678. "name": "workspace",
  9679. "in": "query",
  9680. "schema": {
  9681. "type": "string"
  9682. },
  9683. "required": false
  9684. }
  9685. ],
  9686. "responses": {
  9687. "200": {
  9688. "description": "Workspace removed",
  9689. "content": {
  9690. "application/json": {
  9691. "schema": {
  9692. "$ref": "#/components/schemas/Workspace"
  9693. }
  9694. }
  9695. }
  9696. },
  9697. "400": {
  9698. "description": "BadRequest | InvalidRequestError",
  9699. "content": {
  9700. "application/json": {
  9701. "schema": {
  9702. "anyOf": [
  9703. {
  9704. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9705. },
  9706. {
  9707. "$ref": "#/components/schemas/InvalidRequestError"
  9708. }
  9709. ]
  9710. }
  9711. }
  9712. }
  9713. }
  9714. },
  9715. "description": "Remove an existing workspace.",
  9716. "summary": "Remove workspace",
  9717. "x-codeSamples": [
  9718. {
  9719. "lang": "js",
  9720. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  9721. }
  9722. ]
  9723. }
  9724. },
  9725. "/experimental/workspace/warp": {
  9726. "post": {
  9727. "tags": ["workspace"],
  9728. "operationId": "experimental.workspace.warp",
  9729. "parameters": [
  9730. {
  9731. "name": "directory",
  9732. "in": "query",
  9733. "schema": {
  9734. "type": "string"
  9735. },
  9736. "required": false
  9737. },
  9738. {
  9739. "name": "workspace",
  9740. "in": "query",
  9741. "schema": {
  9742. "type": "string"
  9743. },
  9744. "required": false
  9745. }
  9746. ],
  9747. "responses": {
  9748. "204": {
  9749. "description": "Session warped"
  9750. },
  9751. "400": {
  9752. "description": "WorkspaceWarpError | VcsApplyError | InvalidRequestError",
  9753. "content": {
  9754. "application/json": {
  9755. "schema": {
  9756. "anyOf": [
  9757. {
  9758. "$ref": "#/components/schemas/WorkspaceWarpError"
  9759. },
  9760. {
  9761. "$ref": "#/components/schemas/VcsApplyError"
  9762. },
  9763. {
  9764. "$ref": "#/components/schemas/InvalidRequestError"
  9765. }
  9766. ]
  9767. }
  9768. }
  9769. }
  9770. },
  9771. "404": {
  9772. "description": "NotFoundError",
  9773. "content": {
  9774. "application/json": {
  9775. "schema": {
  9776. "$ref": "#/components/schemas/NotFoundError"
  9777. }
  9778. }
  9779. }
  9780. }
  9781. },
  9782. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  9783. "summary": "Warp session into workspace",
  9784. "requestBody": {
  9785. "content": {
  9786. "application/json": {
  9787. "schema": {
  9788. "type": "object",
  9789. "properties": {
  9790. "id": {
  9791. "anyOf": [
  9792. {
  9793. "type": "string",
  9794. "pattern": "^wrk"
  9795. },
  9796. {
  9797. "type": "null"
  9798. }
  9799. ]
  9800. },
  9801. "sessionID": {
  9802. "type": "string",
  9803. "pattern": "^ses"
  9804. },
  9805. "copyChanges": {
  9806. "type": "boolean"
  9807. }
  9808. },
  9809. "required": ["id", "sessionID"],
  9810. "additionalProperties": false
  9811. }
  9812. }
  9813. }
  9814. },
  9815. "x-codeSamples": [
  9816. {
  9817. "lang": "js",
  9818. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  9819. }
  9820. ]
  9821. }
  9822. },
  9823. "/api/health": {
  9824. "get": {
  9825. "tags": ["opencode HttpApi"],
  9826. "operationId": "v2.health.get",
  9827. "parameters": [],
  9828. "security": [],
  9829. "responses": {
  9830. "200": {
  9831. "description": "Success",
  9832. "content": {
  9833. "application/json": {
  9834. "schema": {
  9835. "type": "object",
  9836. "properties": {
  9837. "healthy": {
  9838. "type": "boolean",
  9839. "enum": [true]
  9840. }
  9841. },
  9842. "required": ["healthy"],
  9843. "additionalProperties": false
  9844. }
  9845. }
  9846. }
  9847. },
  9848. "400": {
  9849. "description": "InvalidRequestError",
  9850. "content": {
  9851. "application/json": {
  9852. "schema": {
  9853. "$ref": "#/components/schemas/InvalidRequestError"
  9854. }
  9855. }
  9856. }
  9857. },
  9858. "401": {
  9859. "description": "UnauthorizedError",
  9860. "content": {
  9861. "application/json": {
  9862. "schema": {
  9863. "$ref": "#/components/schemas/UnauthorizedError"
  9864. }
  9865. }
  9866. }
  9867. }
  9868. },
  9869. "description": "Check whether the API server is ready to accept requests.",
  9870. "summary": "Check server health",
  9871. "x-codeSamples": [
  9872. {
  9873. "lang": "js",
  9874. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.health.get({\n ...\n})"
  9875. }
  9876. ]
  9877. }
  9878. },
  9879. "/api/location": {
  9880. "get": {
  9881. "tags": ["opencode HttpApi"],
  9882. "operationId": "v2.location.get",
  9883. "parameters": [
  9884. {
  9885. "name": "location",
  9886. "in": "query",
  9887. "schema": {
  9888. "type": "object",
  9889. "properties": {
  9890. "directory": {
  9891. "type": "string"
  9892. },
  9893. "workspace": {
  9894. "type": "string"
  9895. }
  9896. },
  9897. "additionalProperties": false
  9898. },
  9899. "required": false,
  9900. "style": "deepObject",
  9901. "explode": true
  9902. }
  9903. ],
  9904. "security": [],
  9905. "responses": {
  9906. "200": {
  9907. "description": "Location.Info",
  9908. "content": {
  9909. "application/json": {
  9910. "schema": {
  9911. "$ref": "#/components/schemas/LocationInfo"
  9912. }
  9913. }
  9914. }
  9915. },
  9916. "400": {
  9917. "description": "InvalidRequestError",
  9918. "content": {
  9919. "application/json": {
  9920. "schema": {
  9921. "$ref": "#/components/schemas/InvalidRequestError"
  9922. }
  9923. }
  9924. }
  9925. },
  9926. "401": {
  9927. "description": "UnauthorizedError",
  9928. "content": {
  9929. "application/json": {
  9930. "schema": {
  9931. "$ref": "#/components/schemas/UnauthorizedError"
  9932. }
  9933. }
  9934. }
  9935. }
  9936. },
  9937. "description": "Resolve the requested location or the server default location.",
  9938. "summary": "Get location",
  9939. "x-codeSamples": [
  9940. {
  9941. "lang": "js",
  9942. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.location.get({\n ...\n})"
  9943. }
  9944. ]
  9945. }
  9946. },
  9947. "/api/agent": {
  9948. "get": {
  9949. "tags": ["opencode HttpApi"],
  9950. "operationId": "v2.agent.list",
  9951. "parameters": [
  9952. {
  9953. "name": "location",
  9954. "in": "query",
  9955. "schema": {
  9956. "type": "object",
  9957. "properties": {
  9958. "directory": {
  9959. "type": "string"
  9960. },
  9961. "workspace": {
  9962. "type": "string"
  9963. }
  9964. },
  9965. "additionalProperties": false
  9966. },
  9967. "required": false,
  9968. "style": "deepObject",
  9969. "explode": true
  9970. }
  9971. ],
  9972. "security": [],
  9973. "responses": {
  9974. "200": {
  9975. "description": "Success",
  9976. "content": {
  9977. "application/json": {
  9978. "schema": {
  9979. "type": "object",
  9980. "properties": {
  9981. "location": {
  9982. "$ref": "#/components/schemas/LocationInfo"
  9983. },
  9984. "data": {
  9985. "type": "array",
  9986. "items": {
  9987. "$ref": "#/components/schemas/AgentV2Info"
  9988. }
  9989. }
  9990. },
  9991. "required": ["location", "data"],
  9992. "additionalProperties": false
  9993. }
  9994. }
  9995. }
  9996. },
  9997. "400": {
  9998. "description": "InvalidRequestError",
  9999. "content": {
  10000. "application/json": {
  10001. "schema": {
  10002. "$ref": "#/components/schemas/InvalidRequestError"
  10003. }
  10004. }
  10005. }
  10006. },
  10007. "401": {
  10008. "description": "UnauthorizedError",
  10009. "content": {
  10010. "application/json": {
  10011. "schema": {
  10012. "$ref": "#/components/schemas/UnauthorizedError"
  10013. }
  10014. }
  10015. }
  10016. }
  10017. },
  10018. "description": "Retrieve currently registered agents.",
  10019. "summary": "List agents",
  10020. "x-codeSamples": [
  10021. {
  10022. "lang": "js",
  10023. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.agent.list({\n ...\n})"
  10024. }
  10025. ]
  10026. }
  10027. },
  10028. "/api/session": {
  10029. "get": {
  10030. "tags": ["sessions"],
  10031. "operationId": "v2.session.list",
  10032. "parameters": [
  10033. {
  10034. "name": "workspace",
  10035. "in": "query",
  10036. "schema": {
  10037. "type": "string",
  10038. "pattern": "^wrk"
  10039. },
  10040. "required": false
  10041. },
  10042. {
  10043. "name": "limit",
  10044. "in": "query",
  10045. "schema": {
  10046. "type": "number"
  10047. },
  10048. "required": false
  10049. },
  10050. {
  10051. "name": "order",
  10052. "in": "query",
  10053. "schema": {
  10054. "type": "string",
  10055. "enum": ["asc", "desc"]
  10056. },
  10057. "required": false
  10058. },
  10059. {
  10060. "name": "search",
  10061. "in": "query",
  10062. "schema": {
  10063. "type": "string"
  10064. },
  10065. "required": false
  10066. },
  10067. {
  10068. "name": "directory",
  10069. "in": "query",
  10070. "schema": {
  10071. "type": "string"
  10072. },
  10073. "required": false
  10074. },
  10075. {
  10076. "name": "project",
  10077. "in": "query",
  10078. "schema": {
  10079. "type": "string"
  10080. },
  10081. "required": false
  10082. },
  10083. {
  10084. "name": "subpath",
  10085. "in": "query",
  10086. "schema": {
  10087. "type": "string"
  10088. },
  10089. "required": false
  10090. },
  10091. {
  10092. "name": "cursor",
  10093. "in": "query",
  10094. "schema": {
  10095. "type": "string",
  10096. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response."
  10097. },
  10098. "required": false
  10099. }
  10100. ],
  10101. "security": [],
  10102. "responses": {
  10103. "200": {
  10104. "description": "SessionsResponse",
  10105. "content": {
  10106. "application/json": {
  10107. "schema": {
  10108. "$ref": "#/components/schemas/SessionsResponse"
  10109. }
  10110. }
  10111. }
  10112. },
  10113. "400": {
  10114. "description": "InvalidCursorError | InvalidRequestError",
  10115. "content": {
  10116. "application/json": {
  10117. "schema": {
  10118. "anyOf": [
  10119. {
  10120. "$ref": "#/components/schemas/InvalidCursorError"
  10121. },
  10122. {
  10123. "$ref": "#/components/schemas/InvalidRequestError"
  10124. },
  10125. {
  10126. "$ref": "#/components/schemas/InvalidRequestError"
  10127. }
  10128. ]
  10129. }
  10130. }
  10131. }
  10132. },
  10133. "401": {
  10134. "description": "UnauthorizedError",
  10135. "content": {
  10136. "application/json": {
  10137. "schema": {
  10138. "$ref": "#/components/schemas/UnauthorizedError"
  10139. }
  10140. }
  10141. }
  10142. }
  10143. },
  10144. "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.",
  10145. "summary": "List sessions",
  10146. "x-codeSamples": [
  10147. {
  10148. "lang": "js",
  10149. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  10150. }
  10151. ]
  10152. },
  10153. "post": {
  10154. "tags": ["sessions"],
  10155. "operationId": "v2.session.create",
  10156. "parameters": [],
  10157. "security": [],
  10158. "responses": {
  10159. "200": {
  10160. "description": "Success",
  10161. "content": {
  10162. "application/json": {
  10163. "schema": {
  10164. "type": "object",
  10165. "properties": {
  10166. "data": {
  10167. "$ref": "#/components/schemas/SessionV2Info"
  10168. }
  10169. },
  10170. "required": ["data"],
  10171. "additionalProperties": false
  10172. }
  10173. }
  10174. }
  10175. },
  10176. "400": {
  10177. "description": "InvalidRequestError",
  10178. "content": {
  10179. "application/json": {
  10180. "schema": {
  10181. "$ref": "#/components/schemas/InvalidRequestError"
  10182. }
  10183. }
  10184. }
  10185. },
  10186. "401": {
  10187. "description": "UnauthorizedError",
  10188. "content": {
  10189. "application/json": {
  10190. "schema": {
  10191. "$ref": "#/components/schemas/UnauthorizedError"
  10192. }
  10193. }
  10194. }
  10195. }
  10196. },
  10197. "description": "Create a session at the requested location.",
  10198. "summary": "Create session",
  10199. "requestBody": {
  10200. "content": {
  10201. "application/json": {
  10202. "schema": {
  10203. "type": "object",
  10204. "properties": {
  10205. "id": {
  10206. "type": "string",
  10207. "pattern": "^ses"
  10208. },
  10209. "agent": {
  10210. "type": "string"
  10211. },
  10212. "model": {
  10213. "type": "object",
  10214. "properties": {
  10215. "id": {
  10216. "type": "string"
  10217. },
  10218. "providerID": {
  10219. "type": "string"
  10220. },
  10221. "variant": {
  10222. "type": "string"
  10223. }
  10224. },
  10225. "required": ["id", "providerID"],
  10226. "additionalProperties": false
  10227. },
  10228. "location": {
  10229. "$ref": "#/components/schemas/LocationRef"
  10230. }
  10231. },
  10232. "additionalProperties": false
  10233. }
  10234. }
  10235. },
  10236. "required": true
  10237. },
  10238. "x-codeSamples": [
  10239. {
  10240. "lang": "js",
  10241. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.create({\n ...\n})"
  10242. }
  10243. ]
  10244. }
  10245. },
  10246. "/api/session/{sessionID}": {
  10247. "get": {
  10248. "tags": ["sessions"],
  10249. "operationId": "v2.session.get",
  10250. "parameters": [
  10251. {
  10252. "name": "sessionID",
  10253. "in": "path",
  10254. "schema": {
  10255. "type": "string",
  10256. "pattern": "^ses"
  10257. },
  10258. "required": true
  10259. }
  10260. ],
  10261. "security": [],
  10262. "responses": {
  10263. "200": {
  10264. "description": "Success",
  10265. "content": {
  10266. "application/json": {
  10267. "schema": {
  10268. "type": "object",
  10269. "properties": {
  10270. "data": {
  10271. "$ref": "#/components/schemas/SessionV2Info"
  10272. }
  10273. },
  10274. "required": ["data"],
  10275. "additionalProperties": false
  10276. }
  10277. }
  10278. }
  10279. },
  10280. "400": {
  10281. "description": "InvalidRequestError",
  10282. "content": {
  10283. "application/json": {
  10284. "schema": {
  10285. "$ref": "#/components/schemas/InvalidRequestError"
  10286. }
  10287. }
  10288. }
  10289. },
  10290. "401": {
  10291. "description": "UnauthorizedError",
  10292. "content": {
  10293. "application/json": {
  10294. "schema": {
  10295. "$ref": "#/components/schemas/UnauthorizedError"
  10296. }
  10297. }
  10298. }
  10299. },
  10300. "404": {
  10301. "description": "SessionNotFoundError",
  10302. "content": {
  10303. "application/json": {
  10304. "schema": {
  10305. "anyOf": [
  10306. {
  10307. "$ref": "#/components/schemas/SessionNotFoundError"
  10308. },
  10309. {
  10310. "$ref": "#/components/schemas/SessionNotFoundError"
  10311. }
  10312. ]
  10313. }
  10314. }
  10315. }
  10316. }
  10317. },
  10318. "description": "Retrieve a session by ID.",
  10319. "summary": "Get session",
  10320. "x-codeSamples": [
  10321. {
  10322. "lang": "js",
  10323. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.get({\n ...\n})"
  10324. }
  10325. ]
  10326. }
  10327. },
  10328. "/api/session/{sessionID}/agent": {
  10329. "post": {
  10330. "tags": ["sessions"],
  10331. "operationId": "v2.session.switchAgent",
  10332. "parameters": [
  10333. {
  10334. "name": "sessionID",
  10335. "in": "path",
  10336. "schema": {
  10337. "type": "string",
  10338. "pattern": "^ses"
  10339. },
  10340. "required": true
  10341. }
  10342. ],
  10343. "security": [],
  10344. "responses": {
  10345. "204": {
  10346. "description": "<No Content>"
  10347. },
  10348. "400": {
  10349. "description": "InvalidRequestError",
  10350. "content": {
  10351. "application/json": {
  10352. "schema": {
  10353. "$ref": "#/components/schemas/InvalidRequestError"
  10354. }
  10355. }
  10356. }
  10357. },
  10358. "401": {
  10359. "description": "UnauthorizedError",
  10360. "content": {
  10361. "application/json": {
  10362. "schema": {
  10363. "$ref": "#/components/schemas/UnauthorizedError"
  10364. }
  10365. }
  10366. }
  10367. },
  10368. "404": {
  10369. "description": "SessionNotFoundError",
  10370. "content": {
  10371. "application/json": {
  10372. "schema": {
  10373. "anyOf": [
  10374. {
  10375. "$ref": "#/components/schemas/SessionNotFoundError"
  10376. },
  10377. {
  10378. "$ref": "#/components/schemas/SessionNotFoundError"
  10379. }
  10380. ]
  10381. }
  10382. }
  10383. }
  10384. }
  10385. },
  10386. "description": "Switch the agent used by subsequent provider turns.",
  10387. "summary": "Switch session agent",
  10388. "requestBody": {
  10389. "content": {
  10390. "application/json": {
  10391. "schema": {
  10392. "type": "object",
  10393. "properties": {
  10394. "agent": {
  10395. "type": "string"
  10396. }
  10397. },
  10398. "required": ["agent"],
  10399. "additionalProperties": false
  10400. }
  10401. }
  10402. },
  10403. "required": true
  10404. },
  10405. "x-codeSamples": [
  10406. {
  10407. "lang": "js",
  10408. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.switchAgent({\n ...\n})"
  10409. }
  10410. ]
  10411. }
  10412. },
  10413. "/api/session/{sessionID}/model": {
  10414. "post": {
  10415. "tags": ["sessions"],
  10416. "operationId": "v2.session.switchModel",
  10417. "parameters": [
  10418. {
  10419. "name": "sessionID",
  10420. "in": "path",
  10421. "schema": {
  10422. "type": "string",
  10423. "pattern": "^ses"
  10424. },
  10425. "required": true
  10426. }
  10427. ],
  10428. "security": [],
  10429. "responses": {
  10430. "204": {
  10431. "description": "<No Content>"
  10432. },
  10433. "400": {
  10434. "description": "InvalidRequestError",
  10435. "content": {
  10436. "application/json": {
  10437. "schema": {
  10438. "$ref": "#/components/schemas/InvalidRequestError"
  10439. }
  10440. }
  10441. }
  10442. },
  10443. "401": {
  10444. "description": "UnauthorizedError",
  10445. "content": {
  10446. "application/json": {
  10447. "schema": {
  10448. "$ref": "#/components/schemas/UnauthorizedError"
  10449. }
  10450. }
  10451. }
  10452. },
  10453. "404": {
  10454. "description": "SessionNotFoundError",
  10455. "content": {
  10456. "application/json": {
  10457. "schema": {
  10458. "anyOf": [
  10459. {
  10460. "$ref": "#/components/schemas/SessionNotFoundError"
  10461. },
  10462. {
  10463. "$ref": "#/components/schemas/SessionNotFoundError"
  10464. }
  10465. ]
  10466. }
  10467. }
  10468. }
  10469. }
  10470. },
  10471. "description": "Switch the model used by subsequent provider turns.",
  10472. "summary": "Switch session model",
  10473. "requestBody": {
  10474. "content": {
  10475. "application/json": {
  10476. "schema": {
  10477. "type": "object",
  10478. "properties": {
  10479. "model": {
  10480. "type": "object",
  10481. "properties": {
  10482. "id": {
  10483. "type": "string"
  10484. },
  10485. "providerID": {
  10486. "type": "string"
  10487. },
  10488. "variant": {
  10489. "type": "string"
  10490. }
  10491. },
  10492. "required": ["id", "providerID"],
  10493. "additionalProperties": false
  10494. }
  10495. },
  10496. "required": ["model"],
  10497. "additionalProperties": false
  10498. }
  10499. }
  10500. },
  10501. "required": true
  10502. },
  10503. "x-codeSamples": [
  10504. {
  10505. "lang": "js",
  10506. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.switchModel({\n ...\n})"
  10507. }
  10508. ]
  10509. }
  10510. },
  10511. "/api/session/{sessionID}/prompt": {
  10512. "post": {
  10513. "tags": ["sessions"],
  10514. "operationId": "v2.session.prompt",
  10515. "parameters": [
  10516. {
  10517. "name": "sessionID",
  10518. "in": "path",
  10519. "schema": {
  10520. "type": "string",
  10521. "pattern": "^ses"
  10522. },
  10523. "required": true
  10524. }
  10525. ],
  10526. "security": [],
  10527. "responses": {
  10528. "200": {
  10529. "description": "Success",
  10530. "content": {
  10531. "application/json": {
  10532. "schema": {
  10533. "type": "object",
  10534. "properties": {
  10535. "data": {
  10536. "$ref": "#/components/schemas/SessionInputAdmitted"
  10537. }
  10538. },
  10539. "required": ["data"],
  10540. "additionalProperties": false
  10541. }
  10542. }
  10543. }
  10544. },
  10545. "400": {
  10546. "description": "InvalidRequestError",
  10547. "content": {
  10548. "application/json": {
  10549. "schema": {
  10550. "$ref": "#/components/schemas/InvalidRequestError"
  10551. }
  10552. }
  10553. }
  10554. },
  10555. "401": {
  10556. "description": "UnauthorizedError",
  10557. "content": {
  10558. "application/json": {
  10559. "schema": {
  10560. "$ref": "#/components/schemas/UnauthorizedError"
  10561. }
  10562. }
  10563. }
  10564. },
  10565. "404": {
  10566. "description": "SessionNotFoundError",
  10567. "content": {
  10568. "application/json": {
  10569. "schema": {
  10570. "anyOf": [
  10571. {
  10572. "$ref": "#/components/schemas/SessionNotFoundError"
  10573. },
  10574. {
  10575. "$ref": "#/components/schemas/SessionNotFoundError"
  10576. }
  10577. ]
  10578. }
  10579. }
  10580. }
  10581. },
  10582. "409": {
  10583. "description": "ConflictError",
  10584. "content": {
  10585. "application/json": {
  10586. "schema": {
  10587. "$ref": "#/components/schemas/ConflictError"
  10588. }
  10589. }
  10590. }
  10591. }
  10592. },
  10593. "description": "Durably admit one session input and schedule agent-loop execution unless resume is false.",
  10594. "summary": "Send message",
  10595. "requestBody": {
  10596. "content": {
  10597. "application/json": {
  10598. "schema": {
  10599. "type": "object",
  10600. "properties": {
  10601. "id": {
  10602. "type": "string",
  10603. "pattern": "^msg_"
  10604. },
  10605. "prompt": {
  10606. "$ref": "#/components/schemas/Prompt"
  10607. },
  10608. "delivery": {
  10609. "type": "string",
  10610. "enum": ["steer", "queue"]
  10611. },
  10612. "resume": {
  10613. "type": "boolean"
  10614. }
  10615. },
  10616. "required": ["prompt"],
  10617. "additionalProperties": false
  10618. }
  10619. }
  10620. },
  10621. "required": true
  10622. },
  10623. "x-codeSamples": [
  10624. {
  10625. "lang": "js",
  10626. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  10627. }
  10628. ]
  10629. }
  10630. },
  10631. "/api/session/{sessionID}/compact": {
  10632. "post": {
  10633. "tags": ["sessions"],
  10634. "operationId": "v2.session.compact",
  10635. "parameters": [
  10636. {
  10637. "name": "sessionID",
  10638. "in": "path",
  10639. "schema": {
  10640. "type": "string",
  10641. "pattern": "^ses"
  10642. },
  10643. "required": true
  10644. }
  10645. ],
  10646. "security": [],
  10647. "responses": {
  10648. "204": {
  10649. "description": "<No Content>"
  10650. },
  10651. "400": {
  10652. "description": "InvalidRequestError",
  10653. "content": {
  10654. "application/json": {
  10655. "schema": {
  10656. "$ref": "#/components/schemas/InvalidRequestError"
  10657. }
  10658. }
  10659. }
  10660. },
  10661. "401": {
  10662. "description": "UnauthorizedError",
  10663. "content": {
  10664. "application/json": {
  10665. "schema": {
  10666. "$ref": "#/components/schemas/UnauthorizedError"
  10667. }
  10668. }
  10669. }
  10670. },
  10671. "404": {
  10672. "description": "SessionNotFoundError",
  10673. "content": {
  10674. "application/json": {
  10675. "schema": {
  10676. "anyOf": [
  10677. {
  10678. "$ref": "#/components/schemas/SessionNotFoundError"
  10679. },
  10680. {
  10681. "$ref": "#/components/schemas/SessionNotFoundError"
  10682. }
  10683. ]
  10684. }
  10685. }
  10686. }
  10687. },
  10688. "503": {
  10689. "description": "ServiceUnavailableError",
  10690. "content": {
  10691. "application/json": {
  10692. "schema": {
  10693. "$ref": "#/components/schemas/ServiceUnavailableError"
  10694. }
  10695. }
  10696. }
  10697. }
  10698. },
  10699. "description": "Compact a session conversation.",
  10700. "summary": "Compact session",
  10701. "x-codeSamples": [
  10702. {
  10703. "lang": "js",
  10704. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  10705. }
  10706. ]
  10707. }
  10708. },
  10709. "/api/session/{sessionID}/wait": {
  10710. "post": {
  10711. "tags": ["sessions"],
  10712. "operationId": "v2.session.wait",
  10713. "parameters": [
  10714. {
  10715. "name": "sessionID",
  10716. "in": "path",
  10717. "schema": {
  10718. "type": "string",
  10719. "pattern": "^ses"
  10720. },
  10721. "required": true
  10722. }
  10723. ],
  10724. "security": [],
  10725. "responses": {
  10726. "204": {
  10727. "description": "<No Content>"
  10728. },
  10729. "400": {
  10730. "description": "InvalidRequestError",
  10731. "content": {
  10732. "application/json": {
  10733. "schema": {
  10734. "$ref": "#/components/schemas/InvalidRequestError"
  10735. }
  10736. }
  10737. }
  10738. },
  10739. "401": {
  10740. "description": "UnauthorizedError",
  10741. "content": {
  10742. "application/json": {
  10743. "schema": {
  10744. "$ref": "#/components/schemas/UnauthorizedError"
  10745. }
  10746. }
  10747. }
  10748. },
  10749. "404": {
  10750. "description": "SessionNotFoundError",
  10751. "content": {
  10752. "application/json": {
  10753. "schema": {
  10754. "anyOf": [
  10755. {
  10756. "$ref": "#/components/schemas/SessionNotFoundError"
  10757. },
  10758. {
  10759. "$ref": "#/components/schemas/SessionNotFoundError"
  10760. }
  10761. ]
  10762. }
  10763. }
  10764. }
  10765. },
  10766. "503": {
  10767. "description": "ServiceUnavailableError",
  10768. "content": {
  10769. "application/json": {
  10770. "schema": {
  10771. "$ref": "#/components/schemas/ServiceUnavailableError"
  10772. }
  10773. }
  10774. }
  10775. }
  10776. },
  10777. "description": "Wait for a session agent loop to become idle.",
  10778. "summary": "Wait for session",
  10779. "x-codeSamples": [
  10780. {
  10781. "lang": "js",
  10782. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  10783. }
  10784. ]
  10785. }
  10786. },
  10787. "/api/session/{sessionID}/context": {
  10788. "get": {
  10789. "tags": ["sessions"],
  10790. "operationId": "v2.session.context",
  10791. "parameters": [
  10792. {
  10793. "name": "sessionID",
  10794. "in": "path",
  10795. "schema": {
  10796. "type": "string",
  10797. "pattern": "^ses"
  10798. },
  10799. "required": true
  10800. }
  10801. ],
  10802. "security": [],
  10803. "responses": {
  10804. "200": {
  10805. "description": "Success",
  10806. "content": {
  10807. "application/json": {
  10808. "schema": {
  10809. "type": "object",
  10810. "properties": {
  10811. "data": {
  10812. "type": "array",
  10813. "items": {
  10814. "$ref": "#/components/schemas/SessionMessage"
  10815. }
  10816. }
  10817. },
  10818. "required": ["data"],
  10819. "additionalProperties": false
  10820. }
  10821. }
  10822. }
  10823. },
  10824. "400": {
  10825. "description": "InvalidRequestError",
  10826. "content": {
  10827. "application/json": {
  10828. "schema": {
  10829. "$ref": "#/components/schemas/InvalidRequestError"
  10830. }
  10831. }
  10832. }
  10833. },
  10834. "401": {
  10835. "description": "UnauthorizedError",
  10836. "content": {
  10837. "application/json": {
  10838. "schema": {
  10839. "$ref": "#/components/schemas/UnauthorizedError"
  10840. }
  10841. }
  10842. }
  10843. },
  10844. "404": {
  10845. "description": "SessionNotFoundError",
  10846. "content": {
  10847. "application/json": {
  10848. "schema": {
  10849. "anyOf": [
  10850. {
  10851. "$ref": "#/components/schemas/SessionNotFoundError"
  10852. },
  10853. {
  10854. "$ref": "#/components/schemas/SessionNotFoundError"
  10855. }
  10856. ]
  10857. }
  10858. }
  10859. }
  10860. },
  10861. "500": {
  10862. "description": "UnknownError",
  10863. "content": {
  10864. "application/json": {
  10865. "schema": {
  10866. "$ref": "#/components/schemas/UnknownError1"
  10867. }
  10868. }
  10869. }
  10870. }
  10871. },
  10872. "description": "Retrieve the active context messages for a session (all messages after the last compaction).",
  10873. "summary": "Get session context",
  10874. "x-codeSamples": [
  10875. {
  10876. "lang": "js",
  10877. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  10878. }
  10879. ]
  10880. }
  10881. },
  10882. "/api/session/{sessionID}/message": {
  10883. "get": {
  10884. "tags": ["messages"],
  10885. "operationId": "v2.session.messages",
  10886. "parameters": [
  10887. {
  10888. "name": "sessionID",
  10889. "in": "path",
  10890. "schema": {
  10891. "type": "string",
  10892. "pattern": "^ses"
  10893. },
  10894. "required": true
  10895. },
  10896. {
  10897. "name": "limit",
  10898. "in": "query",
  10899. "schema": {
  10900. "type": "number"
  10901. },
  10902. "required": false
  10903. },
  10904. {
  10905. "name": "order",
  10906. "in": "query",
  10907. "schema": {
  10908. "type": "string",
  10909. "enum": ["asc", "desc"]
  10910. },
  10911. "required": false
  10912. },
  10913. {
  10914. "name": "cursor",
  10915. "in": "query",
  10916. "schema": {
  10917. "type": "string",
  10918. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."
  10919. },
  10920. "required": false
  10921. }
  10922. ],
  10923. "security": [],
  10924. "responses": {
  10925. "200": {
  10926. "description": "SessionMessagesResponse",
  10927. "content": {
  10928. "application/json": {
  10929. "schema": {
  10930. "$ref": "#/components/schemas/SessionMessagesResponse"
  10931. }
  10932. }
  10933. }
  10934. },
  10935. "400": {
  10936. "description": "InvalidCursorError | InvalidRequestError",
  10937. "content": {
  10938. "application/json": {
  10939. "schema": {
  10940. "anyOf": [
  10941. {
  10942. "$ref": "#/components/schemas/InvalidCursorError"
  10943. },
  10944. {
  10945. "$ref": "#/components/schemas/InvalidRequestError"
  10946. }
  10947. ]
  10948. }
  10949. }
  10950. }
  10951. },
  10952. "401": {
  10953. "description": "UnauthorizedError",
  10954. "content": {
  10955. "application/json": {
  10956. "schema": {
  10957. "$ref": "#/components/schemas/UnauthorizedError"
  10958. }
  10959. }
  10960. }
  10961. },
  10962. "404": {
  10963. "description": "SessionNotFoundError",
  10964. "content": {
  10965. "application/json": {
  10966. "schema": {
  10967. "anyOf": [
  10968. {
  10969. "$ref": "#/components/schemas/SessionNotFoundError"
  10970. },
  10971. {
  10972. "$ref": "#/components/schemas/SessionNotFoundError"
  10973. }
  10974. ]
  10975. }
  10976. }
  10977. }
  10978. },
  10979. "500": {
  10980. "description": "UnknownError",
  10981. "content": {
  10982. "application/json": {
  10983. "schema": {
  10984. "$ref": "#/components/schemas/UnknownError1"
  10985. }
  10986. }
  10987. }
  10988. }
  10989. },
  10990. "description": "Retrieve projected messages for a session. Items keep the requested order across pages; use cursor.next or cursor.previous to move through the ordered timeline.",
  10991. "summary": "Get session messages",
  10992. "x-codeSamples": [
  10993. {
  10994. "lang": "js",
  10995. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  10996. }
  10997. ]
  10998. }
  10999. },
  11000. "/api/model": {
  11001. "get": {
  11002. "tags": ["models"],
  11003. "operationId": "v2.model.list",
  11004. "parameters": [
  11005. {
  11006. "name": "location",
  11007. "in": "query",
  11008. "schema": {
  11009. "type": "object",
  11010. "properties": {
  11011. "directory": {
  11012. "type": "string"
  11013. },
  11014. "workspace": {
  11015. "type": "string"
  11016. }
  11017. },
  11018. "additionalProperties": false
  11019. },
  11020. "required": false,
  11021. "style": "deepObject",
  11022. "explode": true
  11023. }
  11024. ],
  11025. "security": [],
  11026. "responses": {
  11027. "200": {
  11028. "description": "Success",
  11029. "content": {
  11030. "application/json": {
  11031. "schema": {
  11032. "type": "object",
  11033. "properties": {
  11034. "location": {
  11035. "$ref": "#/components/schemas/LocationInfo"
  11036. },
  11037. "data": {
  11038. "type": "array",
  11039. "items": {
  11040. "$ref": "#/components/schemas/ModelV2Info"
  11041. }
  11042. }
  11043. },
  11044. "required": ["location", "data"],
  11045. "additionalProperties": false
  11046. }
  11047. }
  11048. }
  11049. },
  11050. "400": {
  11051. "description": "InvalidRequestError",
  11052. "content": {
  11053. "application/json": {
  11054. "schema": {
  11055. "$ref": "#/components/schemas/InvalidRequestError"
  11056. }
  11057. }
  11058. }
  11059. },
  11060. "401": {
  11061. "description": "UnauthorizedError",
  11062. "content": {
  11063. "application/json": {
  11064. "schema": {
  11065. "$ref": "#/components/schemas/UnauthorizedError"
  11066. }
  11067. }
  11068. }
  11069. },
  11070. "503": {
  11071. "description": "ServiceUnavailableError",
  11072. "content": {
  11073. "application/json": {
  11074. "schema": {
  11075. "$ref": "#/components/schemas/ServiceUnavailableError"
  11076. }
  11077. }
  11078. }
  11079. }
  11080. },
  11081. "description": "Retrieve available models ordered by release date.",
  11082. "summary": "List models",
  11083. "x-codeSamples": [
  11084. {
  11085. "lang": "js",
  11086. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.model.list({\n ...\n})"
  11087. }
  11088. ]
  11089. }
  11090. },
  11091. "/api/provider": {
  11092. "get": {
  11093. "tags": ["providers"],
  11094. "operationId": "v2.provider.list",
  11095. "parameters": [
  11096. {
  11097. "name": "location",
  11098. "in": "query",
  11099. "schema": {
  11100. "type": "object",
  11101. "properties": {
  11102. "directory": {
  11103. "type": "string"
  11104. },
  11105. "workspace": {
  11106. "type": "string"
  11107. }
  11108. },
  11109. "additionalProperties": false
  11110. },
  11111. "required": false,
  11112. "style": "deepObject",
  11113. "explode": true
  11114. }
  11115. ],
  11116. "security": [],
  11117. "responses": {
  11118. "200": {
  11119. "description": "Success",
  11120. "content": {
  11121. "application/json": {
  11122. "schema": {
  11123. "type": "object",
  11124. "properties": {
  11125. "location": {
  11126. "$ref": "#/components/schemas/LocationInfo"
  11127. },
  11128. "data": {
  11129. "type": "array",
  11130. "items": {
  11131. "$ref": "#/components/schemas/ProviderV2Info"
  11132. }
  11133. }
  11134. },
  11135. "required": ["location", "data"],
  11136. "additionalProperties": false
  11137. }
  11138. }
  11139. }
  11140. },
  11141. "400": {
  11142. "description": "InvalidRequestError",
  11143. "content": {
  11144. "application/json": {
  11145. "schema": {
  11146. "$ref": "#/components/schemas/InvalidRequestError"
  11147. }
  11148. }
  11149. }
  11150. },
  11151. "401": {
  11152. "description": "UnauthorizedError",
  11153. "content": {
  11154. "application/json": {
  11155. "schema": {
  11156. "$ref": "#/components/schemas/UnauthorizedError"
  11157. }
  11158. }
  11159. }
  11160. },
  11161. "503": {
  11162. "description": "ServiceUnavailableError",
  11163. "content": {
  11164. "application/json": {
  11165. "schema": {
  11166. "$ref": "#/components/schemas/ServiceUnavailableError"
  11167. }
  11168. }
  11169. }
  11170. }
  11171. },
  11172. "description": "Retrieve active AI providers so clients can show provider availability and configuration.",
  11173. "summary": "List providers",
  11174. "x-codeSamples": [
  11175. {
  11176. "lang": "js",
  11177. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.list({\n ...\n})"
  11178. }
  11179. ]
  11180. }
  11181. },
  11182. "/api/provider/{providerID}": {
  11183. "get": {
  11184. "tags": ["providers"],
  11185. "operationId": "v2.provider.get",
  11186. "parameters": [
  11187. {
  11188. "name": "providerID",
  11189. "in": "path",
  11190. "schema": {
  11191. "type": "string"
  11192. },
  11193. "required": true
  11194. },
  11195. {
  11196. "name": "location",
  11197. "in": "query",
  11198. "schema": {
  11199. "type": "object",
  11200. "properties": {
  11201. "directory": {
  11202. "type": "string"
  11203. },
  11204. "workspace": {
  11205. "type": "string"
  11206. }
  11207. },
  11208. "additionalProperties": false
  11209. },
  11210. "required": false,
  11211. "style": "deepObject",
  11212. "explode": true
  11213. }
  11214. ],
  11215. "security": [],
  11216. "responses": {
  11217. "200": {
  11218. "description": "Success",
  11219. "content": {
  11220. "application/json": {
  11221. "schema": {
  11222. "type": "object",
  11223. "properties": {
  11224. "location": {
  11225. "$ref": "#/components/schemas/LocationInfo"
  11226. },
  11227. "data": {
  11228. "$ref": "#/components/schemas/ProviderV2Info"
  11229. }
  11230. },
  11231. "required": ["location", "data"],
  11232. "additionalProperties": false
  11233. }
  11234. }
  11235. }
  11236. },
  11237. "400": {
  11238. "description": "InvalidRequestError",
  11239. "content": {
  11240. "application/json": {
  11241. "schema": {
  11242. "$ref": "#/components/schemas/InvalidRequestError"
  11243. }
  11244. }
  11245. }
  11246. },
  11247. "401": {
  11248. "description": "UnauthorizedError",
  11249. "content": {
  11250. "application/json": {
  11251. "schema": {
  11252. "$ref": "#/components/schemas/UnauthorizedError"
  11253. }
  11254. }
  11255. }
  11256. },
  11257. "404": {
  11258. "description": "ProviderNotFoundError",
  11259. "content": {
  11260. "application/json": {
  11261. "schema": {
  11262. "$ref": "#/components/schemas/ProviderNotFoundError"
  11263. }
  11264. }
  11265. }
  11266. },
  11267. "503": {
  11268. "description": "ServiceUnavailableError",
  11269. "content": {
  11270. "application/json": {
  11271. "schema": {
  11272. "$ref": "#/components/schemas/ServiceUnavailableError"
  11273. }
  11274. }
  11275. }
  11276. }
  11277. },
  11278. "description": "Retrieve a single AI provider so clients can inspect its availability and endpoint settings.",
  11279. "summary": "Get provider",
  11280. "x-codeSamples": [
  11281. {
  11282. "lang": "js",
  11283. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.get({\n ...\n})"
  11284. }
  11285. ]
  11286. }
  11287. },
  11288. "/api/integration": {
  11289. "get": {
  11290. "tags": ["integrations"],
  11291. "operationId": "v2.integration.list",
  11292. "parameters": [
  11293. {
  11294. "name": "location",
  11295. "in": "query",
  11296. "schema": {
  11297. "type": "object",
  11298. "properties": {
  11299. "directory": {
  11300. "type": "string"
  11301. },
  11302. "workspace": {
  11303. "type": "string"
  11304. }
  11305. },
  11306. "additionalProperties": false
  11307. },
  11308. "required": false,
  11309. "style": "deepObject",
  11310. "explode": true
  11311. }
  11312. ],
  11313. "security": [],
  11314. "responses": {
  11315. "200": {
  11316. "description": "Success",
  11317. "content": {
  11318. "application/json": {
  11319. "schema": {
  11320. "type": "object",
  11321. "properties": {
  11322. "location": {
  11323. "$ref": "#/components/schemas/LocationInfo"
  11324. },
  11325. "data": {
  11326. "type": "array",
  11327. "items": {
  11328. "$ref": "#/components/schemas/IntegrationInfo"
  11329. }
  11330. }
  11331. },
  11332. "required": ["location", "data"],
  11333. "additionalProperties": false
  11334. }
  11335. }
  11336. }
  11337. },
  11338. "400": {
  11339. "description": "InvalidRequestError",
  11340. "content": {
  11341. "application/json": {
  11342. "schema": {
  11343. "$ref": "#/components/schemas/InvalidRequestError"
  11344. }
  11345. }
  11346. }
  11347. },
  11348. "401": {
  11349. "description": "UnauthorizedError",
  11350. "content": {
  11351. "application/json": {
  11352. "schema": {
  11353. "$ref": "#/components/schemas/UnauthorizedError"
  11354. }
  11355. }
  11356. }
  11357. }
  11358. },
  11359. "description": "Retrieve available integrations and their authentication methods.",
  11360. "summary": "List integrations",
  11361. "x-codeSamples": [
  11362. {
  11363. "lang": "js",
  11364. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.list({\n ...\n})"
  11365. }
  11366. ]
  11367. }
  11368. },
  11369. "/api/integration/{integrationID}": {
  11370. "get": {
  11371. "tags": ["integrations"],
  11372. "operationId": "v2.integration.get",
  11373. "parameters": [
  11374. {
  11375. "name": "integrationID",
  11376. "in": "path",
  11377. "schema": {
  11378. "type": "string"
  11379. },
  11380. "required": true
  11381. },
  11382. {
  11383. "name": "location",
  11384. "in": "query",
  11385. "schema": {
  11386. "type": "object",
  11387. "properties": {
  11388. "directory": {
  11389. "type": "string"
  11390. },
  11391. "workspace": {
  11392. "type": "string"
  11393. }
  11394. },
  11395. "additionalProperties": false
  11396. },
  11397. "required": false,
  11398. "style": "deepObject",
  11399. "explode": true
  11400. }
  11401. ],
  11402. "security": [],
  11403. "responses": {
  11404. "200": {
  11405. "description": "Success",
  11406. "content": {
  11407. "application/json": {
  11408. "schema": {
  11409. "type": "object",
  11410. "properties": {
  11411. "location": {
  11412. "$ref": "#/components/schemas/LocationInfo"
  11413. },
  11414. "data": {
  11415. "$ref": "#/components/schemas/IntegrationInfo"
  11416. }
  11417. },
  11418. "required": ["location", "data"],
  11419. "additionalProperties": false
  11420. }
  11421. }
  11422. }
  11423. },
  11424. "400": {
  11425. "description": "InvalidRequestError",
  11426. "content": {
  11427. "application/json": {
  11428. "schema": {
  11429. "$ref": "#/components/schemas/InvalidRequestError"
  11430. }
  11431. }
  11432. }
  11433. },
  11434. "401": {
  11435. "description": "UnauthorizedError",
  11436. "content": {
  11437. "application/json": {
  11438. "schema": {
  11439. "$ref": "#/components/schemas/UnauthorizedError"
  11440. }
  11441. }
  11442. }
  11443. }
  11444. },
  11445. "description": "Retrieve one integration and its authentication methods.",
  11446. "summary": "Get integration",
  11447. "x-codeSamples": [
  11448. {
  11449. "lang": "js",
  11450. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.get({\n ...\n})"
  11451. }
  11452. ]
  11453. }
  11454. },
  11455. "/api/integration/{integrationID}/connect/key": {
  11456. "post": {
  11457. "tags": ["integrations"],
  11458. "operationId": "v2.integration.connect.key",
  11459. "parameters": [
  11460. {
  11461. "name": "integrationID",
  11462. "in": "path",
  11463. "schema": {
  11464. "type": "string"
  11465. },
  11466. "required": true
  11467. },
  11468. {
  11469. "name": "location",
  11470. "in": "query",
  11471. "schema": {
  11472. "type": "object",
  11473. "properties": {
  11474. "directory": {
  11475. "type": "string"
  11476. },
  11477. "workspace": {
  11478. "type": "string"
  11479. }
  11480. },
  11481. "additionalProperties": false
  11482. },
  11483. "required": false,
  11484. "style": "deepObject",
  11485. "explode": true
  11486. }
  11487. ],
  11488. "security": [],
  11489. "responses": {
  11490. "204": {
  11491. "description": "<No Content>"
  11492. },
  11493. "400": {
  11494. "description": "InvalidRequestError",
  11495. "content": {
  11496. "application/json": {
  11497. "schema": {
  11498. "anyOf": [
  11499. {
  11500. "$ref": "#/components/schemas/InvalidRequestError"
  11501. },
  11502. {
  11503. "$ref": "#/components/schemas/InvalidRequestError"
  11504. }
  11505. ]
  11506. }
  11507. }
  11508. }
  11509. },
  11510. "401": {
  11511. "description": "UnauthorizedError",
  11512. "content": {
  11513. "application/json": {
  11514. "schema": {
  11515. "$ref": "#/components/schemas/UnauthorizedError"
  11516. }
  11517. }
  11518. }
  11519. }
  11520. },
  11521. "description": "Run a key authentication method and store the resulting credential.",
  11522. "summary": "Connect with key",
  11523. "requestBody": {
  11524. "content": {
  11525. "application/json": {
  11526. "schema": {
  11527. "type": "object",
  11528. "properties": {
  11529. "key": {
  11530. "type": "string"
  11531. },
  11532. "label": {
  11533. "type": "string"
  11534. }
  11535. },
  11536. "required": ["key"],
  11537. "additionalProperties": false
  11538. }
  11539. }
  11540. },
  11541. "required": true
  11542. },
  11543. "x-codeSamples": [
  11544. {
  11545. "lang": "js",
  11546. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.connect.key({\n ...\n})"
  11547. }
  11548. ]
  11549. }
  11550. },
  11551. "/api/integration/{integrationID}/connect/oauth": {
  11552. "post": {
  11553. "tags": ["integrations"],
  11554. "operationId": "v2.integration.connect.oauth",
  11555. "parameters": [
  11556. {
  11557. "name": "integrationID",
  11558. "in": "path",
  11559. "schema": {
  11560. "type": "string"
  11561. },
  11562. "required": true
  11563. },
  11564. {
  11565. "name": "location",
  11566. "in": "query",
  11567. "schema": {
  11568. "type": "object",
  11569. "properties": {
  11570. "directory": {
  11571. "type": "string"
  11572. },
  11573. "workspace": {
  11574. "type": "string"
  11575. }
  11576. },
  11577. "additionalProperties": false
  11578. },
  11579. "required": false,
  11580. "style": "deepObject",
  11581. "explode": true
  11582. }
  11583. ],
  11584. "security": [],
  11585. "responses": {
  11586. "200": {
  11587. "description": "Success",
  11588. "content": {
  11589. "application/json": {
  11590. "schema": {
  11591. "type": "object",
  11592. "properties": {
  11593. "location": {
  11594. "$ref": "#/components/schemas/LocationInfo"
  11595. },
  11596. "data": {
  11597. "$ref": "#/components/schemas/IntegrationAttempt"
  11598. }
  11599. },
  11600. "required": ["location", "data"],
  11601. "additionalProperties": false
  11602. }
  11603. }
  11604. }
  11605. },
  11606. "400": {
  11607. "description": "InvalidRequestError",
  11608. "content": {
  11609. "application/json": {
  11610. "schema": {
  11611. "anyOf": [
  11612. {
  11613. "$ref": "#/components/schemas/InvalidRequestError"
  11614. },
  11615. {
  11616. "$ref": "#/components/schemas/InvalidRequestError"
  11617. }
  11618. ]
  11619. }
  11620. }
  11621. }
  11622. },
  11623. "401": {
  11624. "description": "UnauthorizedError",
  11625. "content": {
  11626. "application/json": {
  11627. "schema": {
  11628. "$ref": "#/components/schemas/UnauthorizedError"
  11629. }
  11630. }
  11631. }
  11632. }
  11633. },
  11634. "description": "Start an OAuth attempt and return the authorization details.",
  11635. "summary": "Begin OAuth connection",
  11636. "requestBody": {
  11637. "content": {
  11638. "application/json": {
  11639. "schema": {
  11640. "type": "object",
  11641. "properties": {
  11642. "methodID": {
  11643. "type": "string"
  11644. },
  11645. "inputs": {
  11646. "type": "object",
  11647. "additionalProperties": {
  11648. "type": "string"
  11649. }
  11650. },
  11651. "label": {
  11652. "type": "string"
  11653. }
  11654. },
  11655. "required": ["methodID", "inputs"],
  11656. "additionalProperties": false
  11657. }
  11658. }
  11659. },
  11660. "required": true
  11661. },
  11662. "x-codeSamples": [
  11663. {
  11664. "lang": "js",
  11665. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.connect.oauth({\n ...\n})"
  11666. }
  11667. ]
  11668. }
  11669. },
  11670. "/api/integration/attempt/{attemptID}": {
  11671. "get": {
  11672. "tags": ["integrations"],
  11673. "operationId": "v2.integration.attempt.status",
  11674. "parameters": [
  11675. {
  11676. "name": "attemptID",
  11677. "in": "path",
  11678. "schema": {
  11679. "type": "string"
  11680. },
  11681. "required": true
  11682. },
  11683. {
  11684. "name": "location",
  11685. "in": "query",
  11686. "schema": {
  11687. "type": "object",
  11688. "properties": {
  11689. "directory": {
  11690. "type": "string"
  11691. },
  11692. "workspace": {
  11693. "type": "string"
  11694. }
  11695. },
  11696. "additionalProperties": false
  11697. },
  11698. "required": false,
  11699. "style": "deepObject",
  11700. "explode": true
  11701. }
  11702. ],
  11703. "security": [],
  11704. "responses": {
  11705. "200": {
  11706. "description": "Success",
  11707. "content": {
  11708. "application/json": {
  11709. "schema": {
  11710. "type": "object",
  11711. "properties": {
  11712. "location": {
  11713. "$ref": "#/components/schemas/LocationInfo"
  11714. },
  11715. "data": {
  11716. "anyOf": [
  11717. {
  11718. "type": "object",
  11719. "properties": {
  11720. "status": {
  11721. "type": "string",
  11722. "enum": ["pending"]
  11723. },
  11724. "time": {
  11725. "type": "object",
  11726. "properties": {
  11727. "created": {
  11728. "anyOf": [
  11729. {
  11730. "type": "number"
  11731. },
  11732. {
  11733. "type": "string",
  11734. "enum": ["NaN"]
  11735. },
  11736. {
  11737. "type": "string",
  11738. "enum": ["Infinity"]
  11739. },
  11740. {
  11741. "type": "string",
  11742. "enum": ["-Infinity"]
  11743. },
  11744. {
  11745. "type": "string",
  11746. "enum": ["Infinity", "-Infinity", "NaN"]
  11747. }
  11748. ]
  11749. },
  11750. "expires": {
  11751. "anyOf": [
  11752. {
  11753. "type": "number"
  11754. },
  11755. {
  11756. "type": "string",
  11757. "enum": ["NaN"]
  11758. },
  11759. {
  11760. "type": "string",
  11761. "enum": ["Infinity"]
  11762. },
  11763. {
  11764. "type": "string",
  11765. "enum": ["-Infinity"]
  11766. },
  11767. {
  11768. "type": "string",
  11769. "enum": ["Infinity", "-Infinity", "NaN"]
  11770. }
  11771. ]
  11772. }
  11773. },
  11774. "required": ["created", "expires"],
  11775. "additionalProperties": false
  11776. }
  11777. },
  11778. "required": ["status", "time"],
  11779. "additionalProperties": false
  11780. },
  11781. {
  11782. "type": "object",
  11783. "properties": {
  11784. "status": {
  11785. "type": "string",
  11786. "enum": ["complete"]
  11787. },
  11788. "time": {
  11789. "type": "object",
  11790. "properties": {
  11791. "created": {
  11792. "anyOf": [
  11793. {
  11794. "type": "number"
  11795. },
  11796. {
  11797. "type": "string",
  11798. "enum": ["NaN"]
  11799. },
  11800. {
  11801. "type": "string",
  11802. "enum": ["Infinity"]
  11803. },
  11804. {
  11805. "type": "string",
  11806. "enum": ["-Infinity"]
  11807. },
  11808. {
  11809. "type": "string",
  11810. "enum": ["Infinity", "-Infinity", "NaN"]
  11811. }
  11812. ]
  11813. },
  11814. "expires": {
  11815. "anyOf": [
  11816. {
  11817. "type": "number"
  11818. },
  11819. {
  11820. "type": "string",
  11821. "enum": ["NaN"]
  11822. },
  11823. {
  11824. "type": "string",
  11825. "enum": ["Infinity"]
  11826. },
  11827. {
  11828. "type": "string",
  11829. "enum": ["-Infinity"]
  11830. },
  11831. {
  11832. "type": "string",
  11833. "enum": ["Infinity", "-Infinity", "NaN"]
  11834. }
  11835. ]
  11836. }
  11837. },
  11838. "required": ["created", "expires"],
  11839. "additionalProperties": false
  11840. }
  11841. },
  11842. "required": ["status", "time"],
  11843. "additionalProperties": false
  11844. },
  11845. {
  11846. "type": "object",
  11847. "properties": {
  11848. "status": {
  11849. "type": "string",
  11850. "enum": ["failed"]
  11851. },
  11852. "message": {
  11853. "type": "string"
  11854. },
  11855. "time": {
  11856. "type": "object",
  11857. "properties": {
  11858. "created": {
  11859. "anyOf": [
  11860. {
  11861. "type": "number"
  11862. },
  11863. {
  11864. "type": "string",
  11865. "enum": ["NaN"]
  11866. },
  11867. {
  11868. "type": "string",
  11869. "enum": ["Infinity"]
  11870. },
  11871. {
  11872. "type": "string",
  11873. "enum": ["-Infinity"]
  11874. },
  11875. {
  11876. "type": "string",
  11877. "enum": ["Infinity", "-Infinity", "NaN"]
  11878. }
  11879. ]
  11880. },
  11881. "expires": {
  11882. "anyOf": [
  11883. {
  11884. "type": "number"
  11885. },
  11886. {
  11887. "type": "string",
  11888. "enum": ["NaN"]
  11889. },
  11890. {
  11891. "type": "string",
  11892. "enum": ["Infinity"]
  11893. },
  11894. {
  11895. "type": "string",
  11896. "enum": ["-Infinity"]
  11897. },
  11898. {
  11899. "type": "string",
  11900. "enum": ["Infinity", "-Infinity", "NaN"]
  11901. }
  11902. ]
  11903. }
  11904. },
  11905. "required": ["created", "expires"],
  11906. "additionalProperties": false
  11907. }
  11908. },
  11909. "required": ["status", "message", "time"],
  11910. "additionalProperties": false
  11911. },
  11912. {
  11913. "type": "object",
  11914. "properties": {
  11915. "status": {
  11916. "type": "string",
  11917. "enum": ["expired"]
  11918. },
  11919. "time": {
  11920. "type": "object",
  11921. "properties": {
  11922. "created": {
  11923. "anyOf": [
  11924. {
  11925. "type": "number"
  11926. },
  11927. {
  11928. "type": "string",
  11929. "enum": ["NaN"]
  11930. },
  11931. {
  11932. "type": "string",
  11933. "enum": ["Infinity"]
  11934. },
  11935. {
  11936. "type": "string",
  11937. "enum": ["-Infinity"]
  11938. },
  11939. {
  11940. "type": "string",
  11941. "enum": ["Infinity", "-Infinity", "NaN"]
  11942. }
  11943. ]
  11944. },
  11945. "expires": {
  11946. "anyOf": [
  11947. {
  11948. "type": "number"
  11949. },
  11950. {
  11951. "type": "string",
  11952. "enum": ["NaN"]
  11953. },
  11954. {
  11955. "type": "string",
  11956. "enum": ["Infinity"]
  11957. },
  11958. {
  11959. "type": "string",
  11960. "enum": ["-Infinity"]
  11961. },
  11962. {
  11963. "type": "string",
  11964. "enum": ["Infinity", "-Infinity", "NaN"]
  11965. }
  11966. ]
  11967. }
  11968. },
  11969. "required": ["created", "expires"],
  11970. "additionalProperties": false
  11971. }
  11972. },
  11973. "required": ["status", "time"],
  11974. "additionalProperties": false
  11975. }
  11976. ]
  11977. }
  11978. },
  11979. "required": ["location", "data"],
  11980. "additionalProperties": false
  11981. }
  11982. }
  11983. }
  11984. },
  11985. "400": {
  11986. "description": "InvalidRequestError",
  11987. "content": {
  11988. "application/json": {
  11989. "schema": {
  11990. "$ref": "#/components/schemas/InvalidRequestError"
  11991. }
  11992. }
  11993. }
  11994. },
  11995. "401": {
  11996. "description": "UnauthorizedError",
  11997. "content": {
  11998. "application/json": {
  11999. "schema": {
  12000. "$ref": "#/components/schemas/UnauthorizedError"
  12001. }
  12002. }
  12003. }
  12004. }
  12005. },
  12006. "description": "Poll the current status of an OAuth attempt.",
  12007. "summary": "Get OAuth attempt status",
  12008. "x-codeSamples": [
  12009. {
  12010. "lang": "js",
  12011. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.attempt.status({\n ...\n})"
  12012. }
  12013. ]
  12014. },
  12015. "delete": {
  12016. "tags": ["integrations"],
  12017. "operationId": "v2.integration.attempt.cancel",
  12018. "parameters": [
  12019. {
  12020. "name": "attemptID",
  12021. "in": "path",
  12022. "schema": {
  12023. "type": "string"
  12024. },
  12025. "required": true
  12026. },
  12027. {
  12028. "name": "location",
  12029. "in": "query",
  12030. "schema": {
  12031. "type": "object",
  12032. "properties": {
  12033. "directory": {
  12034. "type": "string"
  12035. },
  12036. "workspace": {
  12037. "type": "string"
  12038. }
  12039. },
  12040. "additionalProperties": false
  12041. },
  12042. "required": false,
  12043. "style": "deepObject",
  12044. "explode": true
  12045. }
  12046. ],
  12047. "security": [],
  12048. "responses": {
  12049. "204": {
  12050. "description": "<No Content>"
  12051. },
  12052. "400": {
  12053. "description": "InvalidRequestError",
  12054. "content": {
  12055. "application/json": {
  12056. "schema": {
  12057. "$ref": "#/components/schemas/InvalidRequestError"
  12058. }
  12059. }
  12060. }
  12061. },
  12062. "401": {
  12063. "description": "UnauthorizedError",
  12064. "content": {
  12065. "application/json": {
  12066. "schema": {
  12067. "$ref": "#/components/schemas/UnauthorizedError"
  12068. }
  12069. }
  12070. }
  12071. }
  12072. },
  12073. "description": "Cancel an OAuth attempt and release its resources.",
  12074. "summary": "Cancel OAuth connection",
  12075. "x-codeSamples": [
  12076. {
  12077. "lang": "js",
  12078. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.attempt.cancel({\n ...\n})"
  12079. }
  12080. ]
  12081. }
  12082. },
  12083. "/api/integration/attempt/{attemptID}/complete": {
  12084. "post": {
  12085. "tags": ["integrations"],
  12086. "operationId": "v2.integration.attempt.complete",
  12087. "parameters": [
  12088. {
  12089. "name": "attemptID",
  12090. "in": "path",
  12091. "schema": {
  12092. "type": "string"
  12093. },
  12094. "required": true
  12095. },
  12096. {
  12097. "name": "location",
  12098. "in": "query",
  12099. "schema": {
  12100. "type": "object",
  12101. "properties": {
  12102. "directory": {
  12103. "type": "string"
  12104. },
  12105. "workspace": {
  12106. "type": "string"
  12107. }
  12108. },
  12109. "additionalProperties": false
  12110. },
  12111. "required": false,
  12112. "style": "deepObject",
  12113. "explode": true
  12114. }
  12115. ],
  12116. "security": [],
  12117. "responses": {
  12118. "204": {
  12119. "description": "<No Content>"
  12120. },
  12121. "400": {
  12122. "description": "InvalidRequestError",
  12123. "content": {
  12124. "application/json": {
  12125. "schema": {
  12126. "anyOf": [
  12127. {
  12128. "$ref": "#/components/schemas/InvalidRequestError"
  12129. },
  12130. {
  12131. "$ref": "#/components/schemas/InvalidRequestError"
  12132. }
  12133. ]
  12134. }
  12135. }
  12136. }
  12137. },
  12138. "401": {
  12139. "description": "UnauthorizedError",
  12140. "content": {
  12141. "application/json": {
  12142. "schema": {
  12143. "$ref": "#/components/schemas/UnauthorizedError"
  12144. }
  12145. }
  12146. }
  12147. }
  12148. },
  12149. "description": "Complete a code-based OAuth attempt and store the resulting credential.",
  12150. "summary": "Complete OAuth connection",
  12151. "requestBody": {
  12152. "content": {
  12153. "application/json": {
  12154. "schema": {
  12155. "type": "object",
  12156. "properties": {
  12157. "code": {
  12158. "type": "string"
  12159. }
  12160. },
  12161. "additionalProperties": false
  12162. }
  12163. }
  12164. },
  12165. "required": true
  12166. },
  12167. "x-codeSamples": [
  12168. {
  12169. "lang": "js",
  12170. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.attempt.complete({\n ...\n})"
  12171. }
  12172. ]
  12173. }
  12174. },
  12175. "/api/credential/{credentialID}": {
  12176. "patch": {
  12177. "tags": ["opencode HttpApi"],
  12178. "operationId": "v2.credential.update",
  12179. "parameters": [
  12180. {
  12181. "name": "credentialID",
  12182. "in": "path",
  12183. "schema": {
  12184. "type": "string"
  12185. },
  12186. "required": true
  12187. },
  12188. {
  12189. "name": "location",
  12190. "in": "query",
  12191. "schema": {
  12192. "type": "object",
  12193. "properties": {
  12194. "directory": {
  12195. "type": "string"
  12196. },
  12197. "workspace": {
  12198. "type": "string"
  12199. }
  12200. },
  12201. "additionalProperties": false
  12202. },
  12203. "required": false,
  12204. "style": "deepObject",
  12205. "explode": true
  12206. }
  12207. ],
  12208. "security": [],
  12209. "responses": {
  12210. "204": {
  12211. "description": "<No Content>"
  12212. },
  12213. "400": {
  12214. "description": "InvalidRequestError",
  12215. "content": {
  12216. "application/json": {
  12217. "schema": {
  12218. "$ref": "#/components/schemas/InvalidRequestError"
  12219. }
  12220. }
  12221. }
  12222. },
  12223. "401": {
  12224. "description": "UnauthorizedError",
  12225. "content": {
  12226. "application/json": {
  12227. "schema": {
  12228. "$ref": "#/components/schemas/UnauthorizedError"
  12229. }
  12230. }
  12231. }
  12232. }
  12233. },
  12234. "description": "Update a stored credential label.",
  12235. "summary": "Update credential",
  12236. "requestBody": {
  12237. "content": {
  12238. "application/json": {
  12239. "schema": {
  12240. "type": "object",
  12241. "properties": {
  12242. "label": {
  12243. "type": "string"
  12244. }
  12245. },
  12246. "required": ["label"],
  12247. "additionalProperties": false
  12248. }
  12249. }
  12250. },
  12251. "required": true
  12252. },
  12253. "x-codeSamples": [
  12254. {
  12255. "lang": "js",
  12256. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.credential.update({\n ...\n})"
  12257. }
  12258. ]
  12259. },
  12260. "delete": {
  12261. "tags": ["opencode HttpApi"],
  12262. "operationId": "v2.credential.remove",
  12263. "parameters": [
  12264. {
  12265. "name": "credentialID",
  12266. "in": "path",
  12267. "schema": {
  12268. "type": "string"
  12269. },
  12270. "required": true
  12271. },
  12272. {
  12273. "name": "location",
  12274. "in": "query",
  12275. "schema": {
  12276. "type": "object",
  12277. "properties": {
  12278. "directory": {
  12279. "type": "string"
  12280. },
  12281. "workspace": {
  12282. "type": "string"
  12283. }
  12284. },
  12285. "additionalProperties": false
  12286. },
  12287. "required": false,
  12288. "style": "deepObject",
  12289. "explode": true
  12290. }
  12291. ],
  12292. "security": [],
  12293. "responses": {
  12294. "204": {
  12295. "description": "<No Content>"
  12296. },
  12297. "400": {
  12298. "description": "InvalidRequestError",
  12299. "content": {
  12300. "application/json": {
  12301. "schema": {
  12302. "$ref": "#/components/schemas/InvalidRequestError"
  12303. }
  12304. }
  12305. }
  12306. },
  12307. "401": {
  12308. "description": "UnauthorizedError",
  12309. "content": {
  12310. "application/json": {
  12311. "schema": {
  12312. "$ref": "#/components/schemas/UnauthorizedError"
  12313. }
  12314. }
  12315. }
  12316. }
  12317. },
  12318. "description": "Remove a stored integration credential.",
  12319. "summary": "Remove credential",
  12320. "x-codeSamples": [
  12321. {
  12322. "lang": "js",
  12323. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.credential.remove({\n ...\n})"
  12324. }
  12325. ]
  12326. }
  12327. },
  12328. "/api/permission/request": {
  12329. "get": {
  12330. "tags": ["permissions"],
  12331. "operationId": "v2.permission.request.list",
  12332. "parameters": [
  12333. {
  12334. "name": "location",
  12335. "in": "query",
  12336. "schema": {
  12337. "type": "object",
  12338. "properties": {
  12339. "directory": {
  12340. "type": "string"
  12341. },
  12342. "workspace": {
  12343. "type": "string"
  12344. }
  12345. },
  12346. "additionalProperties": false
  12347. },
  12348. "required": false,
  12349. "style": "deepObject",
  12350. "explode": true
  12351. }
  12352. ],
  12353. "security": [],
  12354. "responses": {
  12355. "200": {
  12356. "description": "Success",
  12357. "content": {
  12358. "application/json": {
  12359. "schema": {
  12360. "type": "object",
  12361. "properties": {
  12362. "location": {
  12363. "$ref": "#/components/schemas/LocationInfo"
  12364. },
  12365. "data": {
  12366. "type": "array",
  12367. "items": {
  12368. "$ref": "#/components/schemas/PermissionV2Request"
  12369. }
  12370. }
  12371. },
  12372. "required": ["location", "data"],
  12373. "additionalProperties": false
  12374. }
  12375. }
  12376. }
  12377. },
  12378. "400": {
  12379. "description": "InvalidRequestError",
  12380. "content": {
  12381. "application/json": {
  12382. "schema": {
  12383. "$ref": "#/components/schemas/InvalidRequestError"
  12384. }
  12385. }
  12386. }
  12387. },
  12388. "401": {
  12389. "description": "UnauthorizedError",
  12390. "content": {
  12391. "application/json": {
  12392. "schema": {
  12393. "$ref": "#/components/schemas/UnauthorizedError"
  12394. }
  12395. }
  12396. }
  12397. }
  12398. },
  12399. "description": "Retrieve pending permission requests for a location.",
  12400. "summary": "List pending permission requests",
  12401. "x-codeSamples": [
  12402. {
  12403. "lang": "js",
  12404. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.request.list({\n ...\n})"
  12405. }
  12406. ]
  12407. }
  12408. },
  12409. "/api/permission/saved": {
  12410. "get": {
  12411. "tags": ["permissions"],
  12412. "operationId": "v2.permission.saved.list",
  12413. "parameters": [
  12414. {
  12415. "name": "projectID",
  12416. "in": "query",
  12417. "schema": {
  12418. "type": "string"
  12419. },
  12420. "required": false
  12421. }
  12422. ],
  12423. "security": [],
  12424. "responses": {
  12425. "200": {
  12426. "description": "Success",
  12427. "content": {
  12428. "application/json": {
  12429. "schema": {
  12430. "type": "object",
  12431. "properties": {
  12432. "data": {
  12433. "type": "array",
  12434. "items": {
  12435. "$ref": "#/components/schemas/PermissionSavedInfo"
  12436. }
  12437. }
  12438. },
  12439. "required": ["data"],
  12440. "additionalProperties": false
  12441. }
  12442. }
  12443. }
  12444. },
  12445. "400": {
  12446. "description": "InvalidRequestError",
  12447. "content": {
  12448. "application/json": {
  12449. "schema": {
  12450. "$ref": "#/components/schemas/InvalidRequestError"
  12451. }
  12452. }
  12453. }
  12454. },
  12455. "401": {
  12456. "description": "UnauthorizedError",
  12457. "content": {
  12458. "application/json": {
  12459. "schema": {
  12460. "$ref": "#/components/schemas/UnauthorizedError"
  12461. }
  12462. }
  12463. }
  12464. }
  12465. },
  12466. "description": "Retrieve saved permissions, optionally filtered by project.",
  12467. "summary": "List saved permissions",
  12468. "x-codeSamples": [
  12469. {
  12470. "lang": "js",
  12471. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.list({\n ...\n})"
  12472. }
  12473. ]
  12474. }
  12475. },
  12476. "/api/permission/saved/{id}": {
  12477. "delete": {
  12478. "tags": ["permissions"],
  12479. "operationId": "v2.permission.saved.remove",
  12480. "parameters": [
  12481. {
  12482. "name": "id",
  12483. "in": "path",
  12484. "schema": {
  12485. "type": "string"
  12486. },
  12487. "required": true
  12488. }
  12489. ],
  12490. "security": [],
  12491. "responses": {
  12492. "204": {
  12493. "description": "<No Content>"
  12494. },
  12495. "400": {
  12496. "description": "InvalidRequestError",
  12497. "content": {
  12498. "application/json": {
  12499. "schema": {
  12500. "$ref": "#/components/schemas/InvalidRequestError"
  12501. }
  12502. }
  12503. }
  12504. },
  12505. "401": {
  12506. "description": "UnauthorizedError",
  12507. "content": {
  12508. "application/json": {
  12509. "schema": {
  12510. "$ref": "#/components/schemas/UnauthorizedError"
  12511. }
  12512. }
  12513. }
  12514. }
  12515. },
  12516. "description": "Remove a saved permission by ID.",
  12517. "summary": "Remove saved permission",
  12518. "x-codeSamples": [
  12519. {
  12520. "lang": "js",
  12521. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.remove({\n ...\n})"
  12522. }
  12523. ]
  12524. }
  12525. },
  12526. "/api/session/{sessionID}/permission": {
  12527. "get": {
  12528. "tags": ["permissions"],
  12529. "operationId": "v2.session.permission.list",
  12530. "parameters": [
  12531. {
  12532. "name": "sessionID",
  12533. "in": "path",
  12534. "schema": {
  12535. "type": "string",
  12536. "pattern": "^ses"
  12537. },
  12538. "required": true
  12539. }
  12540. ],
  12541. "security": [],
  12542. "responses": {
  12543. "200": {
  12544. "description": "Success",
  12545. "content": {
  12546. "application/json": {
  12547. "schema": {
  12548. "type": "object",
  12549. "properties": {
  12550. "data": {
  12551. "type": "array",
  12552. "items": {
  12553. "$ref": "#/components/schemas/PermissionV2Request"
  12554. }
  12555. }
  12556. },
  12557. "required": ["data"],
  12558. "additionalProperties": false
  12559. }
  12560. }
  12561. }
  12562. },
  12563. "400": {
  12564. "description": "InvalidRequestError",
  12565. "content": {
  12566. "application/json": {
  12567. "schema": {
  12568. "$ref": "#/components/schemas/InvalidRequestError"
  12569. }
  12570. }
  12571. }
  12572. },
  12573. "401": {
  12574. "description": "UnauthorizedError",
  12575. "content": {
  12576. "application/json": {
  12577. "schema": {
  12578. "$ref": "#/components/schemas/UnauthorizedError"
  12579. }
  12580. }
  12581. }
  12582. },
  12583. "404": {
  12584. "description": "SessionNotFoundError",
  12585. "content": {
  12586. "application/json": {
  12587. "schema": {
  12588. "anyOf": [
  12589. {
  12590. "$ref": "#/components/schemas/SessionNotFoundError"
  12591. },
  12592. {
  12593. "$ref": "#/components/schemas/SessionNotFoundError"
  12594. }
  12595. ]
  12596. }
  12597. }
  12598. }
  12599. }
  12600. },
  12601. "description": "Retrieve pending permission requests owned by a session.",
  12602. "summary": "List session permission requests",
  12603. "x-codeSamples": [
  12604. {
  12605. "lang": "js",
  12606. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.list({\n ...\n})"
  12607. }
  12608. ]
  12609. }
  12610. },
  12611. "/api/session/{sessionID}/permission/{requestID}/reply": {
  12612. "post": {
  12613. "tags": ["permissions"],
  12614. "operationId": "v2.session.permission.reply",
  12615. "parameters": [
  12616. {
  12617. "name": "sessionID",
  12618. "in": "path",
  12619. "schema": {
  12620. "type": "string",
  12621. "pattern": "^ses"
  12622. },
  12623. "required": true
  12624. },
  12625. {
  12626. "name": "requestID",
  12627. "in": "path",
  12628. "schema": {
  12629. "type": "string",
  12630. "pattern": "^per"
  12631. },
  12632. "required": true
  12633. }
  12634. ],
  12635. "security": [],
  12636. "responses": {
  12637. "204": {
  12638. "description": "<No Content>"
  12639. },
  12640. "400": {
  12641. "description": "InvalidRequestError",
  12642. "content": {
  12643. "application/json": {
  12644. "schema": {
  12645. "$ref": "#/components/schemas/InvalidRequestError"
  12646. }
  12647. }
  12648. }
  12649. },
  12650. "401": {
  12651. "description": "UnauthorizedError",
  12652. "content": {
  12653. "application/json": {
  12654. "schema": {
  12655. "$ref": "#/components/schemas/UnauthorizedError"
  12656. }
  12657. }
  12658. }
  12659. },
  12660. "404": {
  12661. "description": "SessionNotFoundError | PermissionNotFoundError",
  12662. "content": {
  12663. "application/json": {
  12664. "schema": {
  12665. "anyOf": [
  12666. {
  12667. "$ref": "#/components/schemas/PermissionNotFoundError"
  12668. },
  12669. {
  12670. "$ref": "#/components/schemas/SessionNotFoundError"
  12671. },
  12672. {
  12673. "$ref": "#/components/schemas/SessionNotFoundError"
  12674. }
  12675. ]
  12676. }
  12677. }
  12678. }
  12679. }
  12680. },
  12681. "description": "Respond to a pending permission request owned by a session.",
  12682. "summary": "Reply to pending permission request",
  12683. "requestBody": {
  12684. "content": {
  12685. "application/json": {
  12686. "schema": {
  12687. "type": "object",
  12688. "properties": {
  12689. "reply": {
  12690. "$ref": "#/components/schemas/PermissionV2Reply"
  12691. },
  12692. "message": {
  12693. "type": "string"
  12694. }
  12695. },
  12696. "required": ["reply"],
  12697. "additionalProperties": false
  12698. }
  12699. }
  12700. },
  12701. "required": true
  12702. },
  12703. "x-codeSamples": [
  12704. {
  12705. "lang": "js",
  12706. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.reply({\n ...\n})"
  12707. }
  12708. ]
  12709. }
  12710. },
  12711. "/api/fs/read/*": {
  12712. "get": {
  12713. "tags": ["filesystem"],
  12714. "operationId": "v2.fs.read",
  12715. "parameters": [
  12716. {
  12717. "name": "location",
  12718. "in": "query",
  12719. "schema": {
  12720. "type": "object",
  12721. "properties": {
  12722. "directory": {
  12723. "type": "string"
  12724. },
  12725. "workspace": {
  12726. "type": "string"
  12727. }
  12728. },
  12729. "additionalProperties": false
  12730. },
  12731. "required": false,
  12732. "style": "deepObject",
  12733. "explode": true
  12734. }
  12735. ],
  12736. "security": [],
  12737. "responses": {
  12738. "200": {
  12739. "description": "Success",
  12740. "content": {
  12741. "application/octet-stream": {
  12742. "schema": {
  12743. "type": "string",
  12744. "format": "binary"
  12745. }
  12746. }
  12747. }
  12748. },
  12749. "400": {
  12750. "description": "InvalidRequestError",
  12751. "content": {
  12752. "application/json": {
  12753. "schema": {
  12754. "$ref": "#/components/schemas/InvalidRequestError"
  12755. }
  12756. }
  12757. }
  12758. },
  12759. "401": {
  12760. "description": "UnauthorizedError",
  12761. "content": {
  12762. "application/json": {
  12763. "schema": {
  12764. "$ref": "#/components/schemas/UnauthorizedError"
  12765. }
  12766. }
  12767. }
  12768. }
  12769. },
  12770. "description": "Serve one file relative to the requested location.",
  12771. "summary": "Read file",
  12772. "x-codeSamples": [
  12773. {
  12774. "lang": "js",
  12775. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.read({\n ...\n})"
  12776. }
  12777. ]
  12778. }
  12779. },
  12780. "/api/fs/list": {
  12781. "get": {
  12782. "tags": ["filesystem"],
  12783. "operationId": "v2.fs.list",
  12784. "parameters": [
  12785. {
  12786. "name": "location",
  12787. "in": "query",
  12788. "schema": {
  12789. "type": "object",
  12790. "properties": {
  12791. "directory": {
  12792. "type": "string"
  12793. },
  12794. "workspace": {
  12795. "type": "string"
  12796. }
  12797. },
  12798. "additionalProperties": false
  12799. },
  12800. "required": false,
  12801. "style": "deepObject",
  12802. "explode": true
  12803. },
  12804. {
  12805. "name": "path",
  12806. "in": "query",
  12807. "schema": {
  12808. "type": "string"
  12809. },
  12810. "required": false
  12811. }
  12812. ],
  12813. "security": [],
  12814. "responses": {
  12815. "200": {
  12816. "description": "Success",
  12817. "content": {
  12818. "application/json": {
  12819. "schema": {
  12820. "type": "object",
  12821. "properties": {
  12822. "location": {
  12823. "$ref": "#/components/schemas/LocationInfo"
  12824. },
  12825. "data": {
  12826. "type": "array",
  12827. "items": {
  12828. "$ref": "#/components/schemas/FileSystemEntry"
  12829. }
  12830. }
  12831. },
  12832. "required": ["location", "data"],
  12833. "additionalProperties": false
  12834. }
  12835. }
  12836. }
  12837. },
  12838. "400": {
  12839. "description": "InvalidRequestError",
  12840. "content": {
  12841. "application/json": {
  12842. "schema": {
  12843. "$ref": "#/components/schemas/InvalidRequestError"
  12844. }
  12845. }
  12846. }
  12847. },
  12848. "401": {
  12849. "description": "UnauthorizedError",
  12850. "content": {
  12851. "application/json": {
  12852. "schema": {
  12853. "$ref": "#/components/schemas/UnauthorizedError"
  12854. }
  12855. }
  12856. }
  12857. }
  12858. },
  12859. "description": "List direct children of one directory relative to the requested location.",
  12860. "summary": "List directory",
  12861. "x-codeSamples": [
  12862. {
  12863. "lang": "js",
  12864. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.list({\n ...\n})"
  12865. }
  12866. ]
  12867. }
  12868. },
  12869. "/api/fs/find": {
  12870. "get": {
  12871. "tags": ["filesystem"],
  12872. "operationId": "v2.fs.find",
  12873. "parameters": [
  12874. {
  12875. "name": "location",
  12876. "in": "query",
  12877. "schema": {
  12878. "type": "object",
  12879. "properties": {
  12880. "directory": {
  12881. "type": "string"
  12882. },
  12883. "workspace": {
  12884. "type": "string"
  12885. }
  12886. },
  12887. "additionalProperties": false
  12888. },
  12889. "required": false,
  12890. "style": "deepObject",
  12891. "explode": true
  12892. },
  12893. {
  12894. "name": "query",
  12895. "in": "query",
  12896. "schema": {
  12897. "type": "string"
  12898. },
  12899. "required": true
  12900. },
  12901. {
  12902. "name": "type",
  12903. "in": "query",
  12904. "schema": {
  12905. "type": "string",
  12906. "enum": ["file", "directory"]
  12907. },
  12908. "required": false
  12909. },
  12910. {
  12911. "name": "limit",
  12912. "in": "query",
  12913. "schema": {
  12914. "type": "string"
  12915. },
  12916. "required": false
  12917. }
  12918. ],
  12919. "security": [],
  12920. "responses": {
  12921. "200": {
  12922. "description": "Success",
  12923. "content": {
  12924. "application/json": {
  12925. "schema": {
  12926. "type": "object",
  12927. "properties": {
  12928. "location": {
  12929. "$ref": "#/components/schemas/LocationInfo"
  12930. },
  12931. "data": {
  12932. "type": "array",
  12933. "items": {
  12934. "$ref": "#/components/schemas/FileSystemEntry"
  12935. }
  12936. }
  12937. },
  12938. "required": ["location", "data"],
  12939. "additionalProperties": false
  12940. }
  12941. }
  12942. }
  12943. },
  12944. "400": {
  12945. "description": "InvalidRequestError",
  12946. "content": {
  12947. "application/json": {
  12948. "schema": {
  12949. "$ref": "#/components/schemas/InvalidRequestError"
  12950. }
  12951. }
  12952. }
  12953. },
  12954. "401": {
  12955. "description": "UnauthorizedError",
  12956. "content": {
  12957. "application/json": {
  12958. "schema": {
  12959. "$ref": "#/components/schemas/UnauthorizedError"
  12960. }
  12961. }
  12962. }
  12963. }
  12964. },
  12965. "description": "Find recursively ranked filesystem entries relative to the requested location.",
  12966. "summary": "Find files",
  12967. "x-codeSamples": [
  12968. {
  12969. "lang": "js",
  12970. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.find({\n ...\n})"
  12971. }
  12972. ]
  12973. }
  12974. },
  12975. "/api/command": {
  12976. "get": {
  12977. "tags": ["commands"],
  12978. "operationId": "v2.command.list",
  12979. "parameters": [
  12980. {
  12981. "name": "location",
  12982. "in": "query",
  12983. "schema": {
  12984. "type": "object",
  12985. "properties": {
  12986. "directory": {
  12987. "type": "string"
  12988. },
  12989. "workspace": {
  12990. "type": "string"
  12991. }
  12992. },
  12993. "additionalProperties": false
  12994. },
  12995. "required": false,
  12996. "style": "deepObject",
  12997. "explode": true
  12998. }
  12999. ],
  13000. "security": [],
  13001. "responses": {
  13002. "200": {
  13003. "description": "Success",
  13004. "content": {
  13005. "application/json": {
  13006. "schema": {
  13007. "type": "object",
  13008. "properties": {
  13009. "location": {
  13010. "$ref": "#/components/schemas/LocationInfo"
  13011. },
  13012. "data": {
  13013. "type": "array",
  13014. "items": {
  13015. "$ref": "#/components/schemas/CommandV2Info"
  13016. }
  13017. }
  13018. },
  13019. "required": ["location", "data"],
  13020. "additionalProperties": false
  13021. }
  13022. }
  13023. }
  13024. },
  13025. "400": {
  13026. "description": "InvalidRequestError",
  13027. "content": {
  13028. "application/json": {
  13029. "schema": {
  13030. "$ref": "#/components/schemas/InvalidRequestError"
  13031. }
  13032. }
  13033. }
  13034. },
  13035. "401": {
  13036. "description": "UnauthorizedError",
  13037. "content": {
  13038. "application/json": {
  13039. "schema": {
  13040. "$ref": "#/components/schemas/UnauthorizedError"
  13041. }
  13042. }
  13043. }
  13044. }
  13045. },
  13046. "description": "Retrieve currently registered commands.",
  13047. "summary": "List commands",
  13048. "x-codeSamples": [
  13049. {
  13050. "lang": "js",
  13051. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.command.list({\n ...\n})"
  13052. }
  13053. ]
  13054. }
  13055. },
  13056. "/api/skill": {
  13057. "get": {
  13058. "tags": ["skills"],
  13059. "operationId": "v2.skill.list",
  13060. "parameters": [
  13061. {
  13062. "name": "location",
  13063. "in": "query",
  13064. "schema": {
  13065. "type": "object",
  13066. "properties": {
  13067. "directory": {
  13068. "type": "string"
  13069. },
  13070. "workspace": {
  13071. "type": "string"
  13072. }
  13073. },
  13074. "additionalProperties": false
  13075. },
  13076. "required": false,
  13077. "style": "deepObject",
  13078. "explode": true
  13079. }
  13080. ],
  13081. "security": [],
  13082. "responses": {
  13083. "200": {
  13084. "description": "Success",
  13085. "content": {
  13086. "application/json": {
  13087. "schema": {
  13088. "type": "object",
  13089. "properties": {
  13090. "location": {
  13091. "$ref": "#/components/schemas/LocationInfo"
  13092. },
  13093. "data": {
  13094. "type": "array",
  13095. "items": {
  13096. "$ref": "#/components/schemas/SkillV2Info"
  13097. }
  13098. }
  13099. },
  13100. "required": ["location", "data"],
  13101. "additionalProperties": false
  13102. }
  13103. }
  13104. }
  13105. },
  13106. "400": {
  13107. "description": "InvalidRequestError",
  13108. "content": {
  13109. "application/json": {
  13110. "schema": {
  13111. "$ref": "#/components/schemas/InvalidRequestError"
  13112. }
  13113. }
  13114. }
  13115. },
  13116. "401": {
  13117. "description": "UnauthorizedError",
  13118. "content": {
  13119. "application/json": {
  13120. "schema": {
  13121. "$ref": "#/components/schemas/UnauthorizedError"
  13122. }
  13123. }
  13124. }
  13125. }
  13126. },
  13127. "description": "Retrieve currently registered skills.",
  13128. "summary": "List skills",
  13129. "x-codeSamples": [
  13130. {
  13131. "lang": "js",
  13132. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.skill.list({\n ...\n})"
  13133. }
  13134. ]
  13135. }
  13136. },
  13137. "/api/event": {
  13138. "get": {
  13139. "tags": ["events"],
  13140. "operationId": "v2.event.subscribe",
  13141. "parameters": [],
  13142. "security": [],
  13143. "responses": {
  13144. "200": {
  13145. "description": "Event stream",
  13146. "content": {
  13147. "text/event-stream": {
  13148. "schema": {
  13149. "$ref": "#/components/schemas/V2Event"
  13150. }
  13151. }
  13152. }
  13153. },
  13154. "400": {
  13155. "description": "InvalidRequestError",
  13156. "content": {
  13157. "application/json": {
  13158. "schema": {
  13159. "$ref": "#/components/schemas/InvalidRequestError"
  13160. }
  13161. }
  13162. }
  13163. },
  13164. "401": {
  13165. "description": "UnauthorizedError",
  13166. "content": {
  13167. "application/json": {
  13168. "schema": {
  13169. "$ref": "#/components/schemas/UnauthorizedError"
  13170. }
  13171. }
  13172. }
  13173. }
  13174. },
  13175. "description": "Subscribe to native event payloads for the server.",
  13176. "summary": "Subscribe to events",
  13177. "x-codeSamples": [
  13178. {
  13179. "lang": "js",
  13180. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.event.subscribe({\n ...\n})"
  13181. }
  13182. ]
  13183. }
  13184. },
  13185. "/api/pty": {
  13186. "get": {
  13187. "tags": ["pty"],
  13188. "operationId": "v2.pty.list",
  13189. "parameters": [
  13190. {
  13191. "name": "location",
  13192. "in": "query",
  13193. "schema": {
  13194. "type": "object",
  13195. "properties": {
  13196. "directory": {
  13197. "type": "string"
  13198. },
  13199. "workspace": {
  13200. "type": "string"
  13201. }
  13202. },
  13203. "additionalProperties": false
  13204. },
  13205. "required": false,
  13206. "style": "deepObject",
  13207. "explode": true
  13208. }
  13209. ],
  13210. "security": [],
  13211. "responses": {
  13212. "200": {
  13213. "description": "Success",
  13214. "content": {
  13215. "application/json": {
  13216. "schema": {
  13217. "type": "object",
  13218. "properties": {
  13219. "location": {
  13220. "$ref": "#/components/schemas/LocationInfo"
  13221. },
  13222. "data": {
  13223. "type": "array",
  13224. "items": {
  13225. "$ref": "#/components/schemas/Pty"
  13226. }
  13227. }
  13228. },
  13229. "required": ["location", "data"],
  13230. "additionalProperties": false
  13231. }
  13232. }
  13233. }
  13234. },
  13235. "400": {
  13236. "description": "InvalidRequestError",
  13237. "content": {
  13238. "application/json": {
  13239. "schema": {
  13240. "$ref": "#/components/schemas/InvalidRequestError"
  13241. }
  13242. }
  13243. }
  13244. },
  13245. "401": {
  13246. "description": "UnauthorizedError",
  13247. "content": {
  13248. "application/json": {
  13249. "schema": {
  13250. "$ref": "#/components/schemas/UnauthorizedError"
  13251. }
  13252. }
  13253. }
  13254. }
  13255. },
  13256. "description": "List PTY sessions for a location, including exited sessions retained until removal.",
  13257. "summary": "List PTY sessions",
  13258. "x-codeSamples": [
  13259. {
  13260. "lang": "js",
  13261. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.list({\n ...\n})"
  13262. }
  13263. ]
  13264. },
  13265. "post": {
  13266. "tags": ["pty"],
  13267. "operationId": "v2.pty.create",
  13268. "parameters": [
  13269. {
  13270. "name": "location",
  13271. "in": "query",
  13272. "schema": {
  13273. "type": "object",
  13274. "properties": {
  13275. "directory": {
  13276. "type": "string"
  13277. },
  13278. "workspace": {
  13279. "type": "string"
  13280. }
  13281. },
  13282. "additionalProperties": false
  13283. },
  13284. "required": false,
  13285. "style": "deepObject",
  13286. "explode": true
  13287. }
  13288. ],
  13289. "security": [],
  13290. "responses": {
  13291. "200": {
  13292. "description": "Success",
  13293. "content": {
  13294. "application/json": {
  13295. "schema": {
  13296. "type": "object",
  13297. "properties": {
  13298. "location": {
  13299. "$ref": "#/components/schemas/LocationInfo"
  13300. },
  13301. "data": {
  13302. "$ref": "#/components/schemas/Pty"
  13303. }
  13304. },
  13305. "required": ["location", "data"],
  13306. "additionalProperties": false
  13307. }
  13308. }
  13309. }
  13310. },
  13311. "400": {
  13312. "description": "InvalidRequestError",
  13313. "content": {
  13314. "application/json": {
  13315. "schema": {
  13316. "$ref": "#/components/schemas/InvalidRequestError"
  13317. }
  13318. }
  13319. }
  13320. },
  13321. "401": {
  13322. "description": "UnauthorizedError",
  13323. "content": {
  13324. "application/json": {
  13325. "schema": {
  13326. "$ref": "#/components/schemas/UnauthorizedError"
  13327. }
  13328. }
  13329. }
  13330. }
  13331. },
  13332. "description": "Create a pseudo-terminal session for a location.",
  13333. "summary": "Create PTY session",
  13334. "requestBody": {
  13335. "content": {
  13336. "application/json": {
  13337. "schema": {
  13338. "type": "object",
  13339. "properties": {
  13340. "command": {
  13341. "type": "string"
  13342. },
  13343. "args": {
  13344. "type": "array",
  13345. "items": {
  13346. "type": "string"
  13347. }
  13348. },
  13349. "cwd": {
  13350. "type": "string"
  13351. },
  13352. "title": {
  13353. "type": "string"
  13354. },
  13355. "env": {
  13356. "type": "object",
  13357. "additionalProperties": {
  13358. "type": "string"
  13359. }
  13360. }
  13361. },
  13362. "additionalProperties": false
  13363. }
  13364. }
  13365. },
  13366. "required": true
  13367. },
  13368. "x-codeSamples": [
  13369. {
  13370. "lang": "js",
  13371. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.create({\n ...\n})"
  13372. }
  13373. ]
  13374. }
  13375. },
  13376. "/api/pty/{ptyID}": {
  13377. "get": {
  13378. "tags": ["pty"],
  13379. "operationId": "v2.pty.get",
  13380. "parameters": [
  13381. {
  13382. "name": "ptyID",
  13383. "in": "path",
  13384. "schema": {
  13385. "type": "string",
  13386. "pattern": "^pty"
  13387. },
  13388. "required": true
  13389. },
  13390. {
  13391. "name": "location",
  13392. "in": "query",
  13393. "schema": {
  13394. "type": "object",
  13395. "properties": {
  13396. "directory": {
  13397. "type": "string"
  13398. },
  13399. "workspace": {
  13400. "type": "string"
  13401. }
  13402. },
  13403. "additionalProperties": false
  13404. },
  13405. "required": false,
  13406. "style": "deepObject",
  13407. "explode": true
  13408. }
  13409. ],
  13410. "security": [],
  13411. "responses": {
  13412. "200": {
  13413. "description": "Success",
  13414. "content": {
  13415. "application/json": {
  13416. "schema": {
  13417. "type": "object",
  13418. "properties": {
  13419. "location": {
  13420. "$ref": "#/components/schemas/LocationInfo"
  13421. },
  13422. "data": {
  13423. "$ref": "#/components/schemas/Pty"
  13424. }
  13425. },
  13426. "required": ["location", "data"],
  13427. "additionalProperties": false
  13428. }
  13429. }
  13430. }
  13431. },
  13432. "400": {
  13433. "description": "InvalidRequestError",
  13434. "content": {
  13435. "application/json": {
  13436. "schema": {
  13437. "$ref": "#/components/schemas/InvalidRequestError"
  13438. }
  13439. }
  13440. }
  13441. },
  13442. "401": {
  13443. "description": "UnauthorizedError",
  13444. "content": {
  13445. "application/json": {
  13446. "schema": {
  13447. "$ref": "#/components/schemas/UnauthorizedError"
  13448. }
  13449. }
  13450. }
  13451. },
  13452. "404": {
  13453. "description": "PtyNotFoundError",
  13454. "content": {
  13455. "application/json": {
  13456. "schema": {
  13457. "$ref": "#/components/schemas/PtyNotFoundError"
  13458. }
  13459. }
  13460. }
  13461. }
  13462. },
  13463. "description": "Get one PTY session, including its exit code once exited.",
  13464. "summary": "Get PTY session",
  13465. "x-codeSamples": [
  13466. {
  13467. "lang": "js",
  13468. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.get({\n ...\n})"
  13469. }
  13470. ]
  13471. },
  13472. "put": {
  13473. "tags": ["pty"],
  13474. "operationId": "v2.pty.update",
  13475. "parameters": [
  13476. {
  13477. "name": "ptyID",
  13478. "in": "path",
  13479. "schema": {
  13480. "type": "string",
  13481. "pattern": "^pty"
  13482. },
  13483. "required": true
  13484. },
  13485. {
  13486. "name": "location",
  13487. "in": "query",
  13488. "schema": {
  13489. "type": "object",
  13490. "properties": {
  13491. "directory": {
  13492. "type": "string"
  13493. },
  13494. "workspace": {
  13495. "type": "string"
  13496. }
  13497. },
  13498. "additionalProperties": false
  13499. },
  13500. "required": false,
  13501. "style": "deepObject",
  13502. "explode": true
  13503. }
  13504. ],
  13505. "security": [],
  13506. "responses": {
  13507. "200": {
  13508. "description": "Success",
  13509. "content": {
  13510. "application/json": {
  13511. "schema": {
  13512. "type": "object",
  13513. "properties": {
  13514. "location": {
  13515. "$ref": "#/components/schemas/LocationInfo"
  13516. },
  13517. "data": {
  13518. "$ref": "#/components/schemas/Pty"
  13519. }
  13520. },
  13521. "required": ["location", "data"],
  13522. "additionalProperties": false
  13523. }
  13524. }
  13525. }
  13526. },
  13527. "400": {
  13528. "description": "InvalidRequestError",
  13529. "content": {
  13530. "application/json": {
  13531. "schema": {
  13532. "$ref": "#/components/schemas/InvalidRequestError"
  13533. }
  13534. }
  13535. }
  13536. },
  13537. "401": {
  13538. "description": "UnauthorizedError",
  13539. "content": {
  13540. "application/json": {
  13541. "schema": {
  13542. "$ref": "#/components/schemas/UnauthorizedError"
  13543. }
  13544. }
  13545. }
  13546. },
  13547. "404": {
  13548. "description": "PtyNotFoundError",
  13549. "content": {
  13550. "application/json": {
  13551. "schema": {
  13552. "$ref": "#/components/schemas/PtyNotFoundError"
  13553. }
  13554. }
  13555. }
  13556. }
  13557. },
  13558. "description": "Update the title or viewport size of one PTY session.",
  13559. "summary": "Update PTY session",
  13560. "requestBody": {
  13561. "content": {
  13562. "application/json": {
  13563. "schema": {
  13564. "type": "object",
  13565. "properties": {
  13566. "title": {
  13567. "type": "string"
  13568. },
  13569. "size": {
  13570. "type": "object",
  13571. "properties": {
  13572. "rows": {
  13573. "type": "integer",
  13574. "exclusiveMinimum": 0
  13575. },
  13576. "cols": {
  13577. "type": "integer",
  13578. "exclusiveMinimum": 0
  13579. }
  13580. },
  13581. "required": ["rows", "cols"],
  13582. "additionalProperties": false
  13583. }
  13584. },
  13585. "additionalProperties": false
  13586. }
  13587. }
  13588. },
  13589. "required": true
  13590. },
  13591. "x-codeSamples": [
  13592. {
  13593. "lang": "js",
  13594. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.update({\n ...\n})"
  13595. }
  13596. ]
  13597. },
  13598. "delete": {
  13599. "tags": ["pty"],
  13600. "operationId": "v2.pty.remove",
  13601. "parameters": [
  13602. {
  13603. "name": "ptyID",
  13604. "in": "path",
  13605. "schema": {
  13606. "type": "string",
  13607. "pattern": "^pty"
  13608. },
  13609. "required": true
  13610. },
  13611. {
  13612. "name": "location",
  13613. "in": "query",
  13614. "schema": {
  13615. "type": "object",
  13616. "properties": {
  13617. "directory": {
  13618. "type": "string"
  13619. },
  13620. "workspace": {
  13621. "type": "string"
  13622. }
  13623. },
  13624. "additionalProperties": false
  13625. },
  13626. "required": false,
  13627. "style": "deepObject",
  13628. "explode": true
  13629. }
  13630. ],
  13631. "security": [],
  13632. "responses": {
  13633. "204": {
  13634. "description": "<No Content>"
  13635. },
  13636. "400": {
  13637. "description": "InvalidRequestError",
  13638. "content": {
  13639. "application/json": {
  13640. "schema": {
  13641. "$ref": "#/components/schemas/InvalidRequestError"
  13642. }
  13643. }
  13644. }
  13645. },
  13646. "401": {
  13647. "description": "UnauthorizedError",
  13648. "content": {
  13649. "application/json": {
  13650. "schema": {
  13651. "$ref": "#/components/schemas/UnauthorizedError"
  13652. }
  13653. }
  13654. }
  13655. },
  13656. "404": {
  13657. "description": "PtyNotFoundError",
  13658. "content": {
  13659. "application/json": {
  13660. "schema": {
  13661. "$ref": "#/components/schemas/PtyNotFoundError"
  13662. }
  13663. }
  13664. }
  13665. }
  13666. },
  13667. "description": "Terminate and remove one PTY session.",
  13668. "summary": "Remove PTY session",
  13669. "x-codeSamples": [
  13670. {
  13671. "lang": "js",
  13672. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.remove({\n ...\n})"
  13673. }
  13674. ]
  13675. }
  13676. },
  13677. "/api/pty/{ptyID}/connect-token": {
  13678. "post": {
  13679. "tags": ["pty"],
  13680. "operationId": "v2.pty.connectToken",
  13681. "parameters": [
  13682. {
  13683. "name": "ptyID",
  13684. "in": "path",
  13685. "schema": {
  13686. "type": "string",
  13687. "pattern": "^pty"
  13688. },
  13689. "required": true
  13690. },
  13691. {
  13692. "name": "location",
  13693. "in": "query",
  13694. "schema": {
  13695. "type": "object",
  13696. "properties": {
  13697. "directory": {
  13698. "type": "string"
  13699. },
  13700. "workspace": {
  13701. "type": "string"
  13702. }
  13703. },
  13704. "additionalProperties": false
  13705. },
  13706. "required": false,
  13707. "style": "deepObject",
  13708. "explode": true
  13709. }
  13710. ],
  13711. "security": [],
  13712. "responses": {
  13713. "200": {
  13714. "description": "Success",
  13715. "content": {
  13716. "application/json": {
  13717. "schema": {
  13718. "type": "object",
  13719. "properties": {
  13720. "location": {
  13721. "$ref": "#/components/schemas/LocationInfo"
  13722. },
  13723. "data": {
  13724. "type": "object",
  13725. "properties": {
  13726. "ticket": {
  13727. "type": "string"
  13728. },
  13729. "expires_in": {
  13730. "type": "integer",
  13731. "exclusiveMinimum": 0
  13732. }
  13733. },
  13734. "required": ["ticket", "expires_in"],
  13735. "additionalProperties": false
  13736. }
  13737. },
  13738. "required": ["location", "data"],
  13739. "additionalProperties": false
  13740. }
  13741. }
  13742. }
  13743. },
  13744. "400": {
  13745. "description": "InvalidRequestError",
  13746. "content": {
  13747. "application/json": {
  13748. "schema": {
  13749. "$ref": "#/components/schemas/InvalidRequestError"
  13750. }
  13751. }
  13752. }
  13753. },
  13754. "401": {
  13755. "description": "UnauthorizedError",
  13756. "content": {
  13757. "application/json": {
  13758. "schema": {
  13759. "$ref": "#/components/schemas/UnauthorizedError"
  13760. }
  13761. }
  13762. }
  13763. },
  13764. "403": {
  13765. "description": "ForbiddenError",
  13766. "content": {
  13767. "application/json": {
  13768. "schema": {
  13769. "$ref": "#/components/schemas/ForbiddenError"
  13770. }
  13771. }
  13772. }
  13773. },
  13774. "404": {
  13775. "description": "PtyNotFoundError",
  13776. "content": {
  13777. "application/json": {
  13778. "schema": {
  13779. "$ref": "#/components/schemas/PtyNotFoundError"
  13780. }
  13781. }
  13782. }
  13783. }
  13784. },
  13785. "description": "Create a short-lived single-use ticket for opening a PTY WebSocket connection.",
  13786. "summary": "Create PTY WebSocket token",
  13787. "x-codeSamples": [
  13788. {
  13789. "lang": "js",
  13790. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.connectToken({\n ...\n})"
  13791. }
  13792. ]
  13793. }
  13794. },
  13795. "/api/pty/{ptyID}/connect": {
  13796. "get": {
  13797. "tags": ["pty"],
  13798. "operationId": "v2.pty.connect",
  13799. "parameters": [
  13800. {
  13801. "name": "ptyID",
  13802. "in": "path",
  13803. "schema": {
  13804. "type": "string",
  13805. "pattern": "^pty"
  13806. },
  13807. "required": true
  13808. },
  13809. {
  13810. "in": "query",
  13811. "name": "location[directory]",
  13812. "schema": {
  13813. "type": "string"
  13814. }
  13815. },
  13816. {
  13817. "in": "query",
  13818. "name": "location[workspace]",
  13819. "schema": {
  13820. "type": "string"
  13821. }
  13822. },
  13823. {
  13824. "in": "query",
  13825. "name": "cursor",
  13826. "schema": {
  13827. "type": "string"
  13828. }
  13829. },
  13830. {
  13831. "in": "query",
  13832. "name": "ticket",
  13833. "schema": {
  13834. "type": "string"
  13835. }
  13836. }
  13837. ],
  13838. "security": [],
  13839. "responses": {
  13840. "200": {
  13841. "description": "Success",
  13842. "content": {
  13843. "application/json": {
  13844. "schema": {
  13845. "type": "boolean"
  13846. }
  13847. }
  13848. }
  13849. },
  13850. "400": {
  13851. "description": "InvalidRequestError",
  13852. "content": {
  13853. "application/json": {
  13854. "schema": {
  13855. "$ref": "#/components/schemas/InvalidRequestError"
  13856. }
  13857. }
  13858. }
  13859. },
  13860. "401": {
  13861. "description": "UnauthorizedError",
  13862. "content": {
  13863. "application/json": {
  13864. "schema": {
  13865. "$ref": "#/components/schemas/UnauthorizedError"
  13866. }
  13867. }
  13868. }
  13869. },
  13870. "403": {
  13871. "description": "ForbiddenError",
  13872. "content": {
  13873. "application/json": {
  13874. "schema": {
  13875. "$ref": "#/components/schemas/ForbiddenError"
  13876. }
  13877. }
  13878. }
  13879. },
  13880. "404": {
  13881. "description": "PtyNotFoundError",
  13882. "content": {
  13883. "application/json": {
  13884. "schema": {
  13885. "$ref": "#/components/schemas/PtyNotFoundError"
  13886. }
  13887. }
  13888. }
  13889. }
  13890. },
  13891. "description": "Establish a WebSocket connection streaming PTY output and accepting terminal input.",
  13892. "summary": "Connect to PTY session",
  13893. "x-codeSamples": [
  13894. {
  13895. "lang": "js",
  13896. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.connect({\n ...\n})"
  13897. }
  13898. ]
  13899. }
  13900. },
  13901. "/api/question/request": {
  13902. "get": {
  13903. "tags": ["session questions"],
  13904. "operationId": "v2.question.request.list",
  13905. "parameters": [
  13906. {
  13907. "name": "location",
  13908. "in": "query",
  13909. "schema": {
  13910. "type": "object",
  13911. "properties": {
  13912. "directory": {
  13913. "type": "string"
  13914. },
  13915. "workspace": {
  13916. "type": "string"
  13917. }
  13918. },
  13919. "additionalProperties": false
  13920. },
  13921. "required": false,
  13922. "style": "deepObject",
  13923. "explode": true
  13924. }
  13925. ],
  13926. "security": [],
  13927. "responses": {
  13928. "200": {
  13929. "description": "Success",
  13930. "content": {
  13931. "application/json": {
  13932. "schema": {
  13933. "type": "object",
  13934. "properties": {
  13935. "location": {
  13936. "$ref": "#/components/schemas/LocationInfo"
  13937. },
  13938. "data": {
  13939. "type": "array",
  13940. "items": {
  13941. "$ref": "#/components/schemas/QuestionV2Request"
  13942. }
  13943. }
  13944. },
  13945. "required": ["location", "data"],
  13946. "additionalProperties": false
  13947. }
  13948. }
  13949. }
  13950. },
  13951. "400": {
  13952. "description": "InvalidRequestError",
  13953. "content": {
  13954. "application/json": {
  13955. "schema": {
  13956. "$ref": "#/components/schemas/InvalidRequestError"
  13957. }
  13958. }
  13959. }
  13960. },
  13961. "401": {
  13962. "description": "UnauthorizedError",
  13963. "content": {
  13964. "application/json": {
  13965. "schema": {
  13966. "$ref": "#/components/schemas/UnauthorizedError"
  13967. }
  13968. }
  13969. }
  13970. }
  13971. },
  13972. "description": "Retrieve pending question requests for a location.",
  13973. "summary": "List pending question requests",
  13974. "x-codeSamples": [
  13975. {
  13976. "lang": "js",
  13977. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.question.request.list({\n ...\n})"
  13978. }
  13979. ]
  13980. }
  13981. },
  13982. "/api/session/{sessionID}/question": {
  13983. "get": {
  13984. "tags": ["session questions"],
  13985. "operationId": "v2.session.question.list",
  13986. "parameters": [
  13987. {
  13988. "name": "sessionID",
  13989. "in": "path",
  13990. "schema": {
  13991. "type": "string",
  13992. "pattern": "^ses"
  13993. },
  13994. "required": true
  13995. }
  13996. ],
  13997. "security": [],
  13998. "responses": {
  13999. "200": {
  14000. "description": "Success",
  14001. "content": {
  14002. "application/json": {
  14003. "schema": {
  14004. "type": "object",
  14005. "properties": {
  14006. "data": {
  14007. "type": "array",
  14008. "items": {
  14009. "$ref": "#/components/schemas/QuestionV2Request"
  14010. }
  14011. }
  14012. },
  14013. "required": ["data"],
  14014. "additionalProperties": false
  14015. }
  14016. }
  14017. }
  14018. },
  14019. "400": {
  14020. "description": "InvalidRequestError",
  14021. "content": {
  14022. "application/json": {
  14023. "schema": {
  14024. "$ref": "#/components/schemas/InvalidRequestError"
  14025. }
  14026. }
  14027. }
  14028. },
  14029. "401": {
  14030. "description": "UnauthorizedError",
  14031. "content": {
  14032. "application/json": {
  14033. "schema": {
  14034. "$ref": "#/components/schemas/UnauthorizedError"
  14035. }
  14036. }
  14037. }
  14038. },
  14039. "404": {
  14040. "description": "SessionNotFoundError",
  14041. "content": {
  14042. "application/json": {
  14043. "schema": {
  14044. "anyOf": [
  14045. {
  14046. "$ref": "#/components/schemas/SessionNotFoundError"
  14047. },
  14048. {
  14049. "$ref": "#/components/schemas/SessionNotFoundError"
  14050. }
  14051. ]
  14052. }
  14053. }
  14054. }
  14055. }
  14056. },
  14057. "description": "Retrieve pending question requests owned by a session.",
  14058. "summary": "List session question requests",
  14059. "x-codeSamples": [
  14060. {
  14061. "lang": "js",
  14062. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.list({\n ...\n})"
  14063. }
  14064. ]
  14065. }
  14066. },
  14067. "/api/session/{sessionID}/question/{requestID}/reply": {
  14068. "post": {
  14069. "tags": ["session questions"],
  14070. "operationId": "v2.session.question.reply",
  14071. "parameters": [
  14072. {
  14073. "name": "sessionID",
  14074. "in": "path",
  14075. "schema": {
  14076. "type": "string",
  14077. "pattern": "^ses"
  14078. },
  14079. "required": true
  14080. },
  14081. {
  14082. "name": "requestID",
  14083. "in": "path",
  14084. "schema": {
  14085. "type": "string",
  14086. "pattern": "^que"
  14087. },
  14088. "required": true
  14089. }
  14090. ],
  14091. "security": [],
  14092. "responses": {
  14093. "204": {
  14094. "description": "<No Content>"
  14095. },
  14096. "400": {
  14097. "description": "InvalidRequestError",
  14098. "content": {
  14099. "application/json": {
  14100. "schema": {
  14101. "$ref": "#/components/schemas/InvalidRequestError"
  14102. }
  14103. }
  14104. }
  14105. },
  14106. "401": {
  14107. "description": "UnauthorizedError",
  14108. "content": {
  14109. "application/json": {
  14110. "schema": {
  14111. "$ref": "#/components/schemas/UnauthorizedError"
  14112. }
  14113. }
  14114. }
  14115. },
  14116. "404": {
  14117. "description": "SessionNotFoundError | QuestionNotFoundError",
  14118. "content": {
  14119. "application/json": {
  14120. "schema": {
  14121. "anyOf": [
  14122. {
  14123. "$ref": "#/components/schemas/QuestionNotFoundError"
  14124. },
  14125. {
  14126. "$ref": "#/components/schemas/SessionNotFoundError"
  14127. },
  14128. {
  14129. "$ref": "#/components/schemas/SessionNotFoundError"
  14130. }
  14131. ]
  14132. }
  14133. }
  14134. }
  14135. }
  14136. },
  14137. "description": "Answer a pending question request owned by a session.",
  14138. "summary": "Reply to pending question request",
  14139. "requestBody": {
  14140. "content": {
  14141. "application/json": {
  14142. "schema": {
  14143. "$ref": "#/components/schemas/QuestionV2Reply"
  14144. }
  14145. }
  14146. },
  14147. "required": true
  14148. },
  14149. "x-codeSamples": [
  14150. {
  14151. "lang": "js",
  14152. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reply({\n ...\n})"
  14153. }
  14154. ]
  14155. }
  14156. },
  14157. "/api/session/{sessionID}/question/{requestID}/reject": {
  14158. "post": {
  14159. "tags": ["session questions"],
  14160. "operationId": "v2.session.question.reject",
  14161. "parameters": [
  14162. {
  14163. "name": "sessionID",
  14164. "in": "path",
  14165. "schema": {
  14166. "type": "string",
  14167. "pattern": "^ses"
  14168. },
  14169. "required": true
  14170. },
  14171. {
  14172. "name": "requestID",
  14173. "in": "path",
  14174. "schema": {
  14175. "type": "string",
  14176. "pattern": "^que"
  14177. },
  14178. "required": true
  14179. }
  14180. ],
  14181. "security": [],
  14182. "responses": {
  14183. "204": {
  14184. "description": "<No Content>"
  14185. },
  14186. "400": {
  14187. "description": "InvalidRequestError",
  14188. "content": {
  14189. "application/json": {
  14190. "schema": {
  14191. "$ref": "#/components/schemas/InvalidRequestError"
  14192. }
  14193. }
  14194. }
  14195. },
  14196. "401": {
  14197. "description": "UnauthorizedError",
  14198. "content": {
  14199. "application/json": {
  14200. "schema": {
  14201. "$ref": "#/components/schemas/UnauthorizedError"
  14202. }
  14203. }
  14204. }
  14205. },
  14206. "404": {
  14207. "description": "SessionNotFoundError | QuestionNotFoundError",
  14208. "content": {
  14209. "application/json": {
  14210. "schema": {
  14211. "anyOf": [
  14212. {
  14213. "$ref": "#/components/schemas/QuestionNotFoundError"
  14214. },
  14215. {
  14216. "$ref": "#/components/schemas/SessionNotFoundError"
  14217. },
  14218. {
  14219. "$ref": "#/components/schemas/SessionNotFoundError"
  14220. }
  14221. ]
  14222. }
  14223. }
  14224. }
  14225. }
  14226. },
  14227. "description": "Reject a pending question request owned by a session.",
  14228. "summary": "Reject pending question request",
  14229. "x-codeSamples": [
  14230. {
  14231. "lang": "js",
  14232. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reject({\n ...\n})"
  14233. }
  14234. ]
  14235. }
  14236. },
  14237. "/api/reference": {
  14238. "get": {
  14239. "tags": ["reference"],
  14240. "operationId": "v2.reference.list",
  14241. "parameters": [
  14242. {
  14243. "name": "location",
  14244. "in": "query",
  14245. "schema": {
  14246. "type": "object",
  14247. "properties": {
  14248. "directory": {
  14249. "type": "string"
  14250. },
  14251. "workspace": {
  14252. "type": "string"
  14253. }
  14254. },
  14255. "additionalProperties": false
  14256. },
  14257. "required": false,
  14258. "style": "deepObject",
  14259. "explode": true
  14260. }
  14261. ],
  14262. "security": [],
  14263. "responses": {
  14264. "200": {
  14265. "description": "Success",
  14266. "content": {
  14267. "application/json": {
  14268. "schema": {
  14269. "type": "object",
  14270. "properties": {
  14271. "location": {
  14272. "$ref": "#/components/schemas/LocationInfo"
  14273. },
  14274. "data": {
  14275. "type": "array",
  14276. "items": {
  14277. "$ref": "#/components/schemas/ReferenceInfo"
  14278. }
  14279. }
  14280. },
  14281. "required": ["location", "data"],
  14282. "additionalProperties": false
  14283. }
  14284. }
  14285. }
  14286. },
  14287. "400": {
  14288. "description": "InvalidRequestError",
  14289. "content": {
  14290. "application/json": {
  14291. "schema": {
  14292. "$ref": "#/components/schemas/InvalidRequestError"
  14293. }
  14294. }
  14295. }
  14296. },
  14297. "401": {
  14298. "description": "UnauthorizedError",
  14299. "content": {
  14300. "application/json": {
  14301. "schema": {
  14302. "$ref": "#/components/schemas/UnauthorizedError"
  14303. }
  14304. }
  14305. }
  14306. }
  14307. },
  14308. "description": "List references available in the requested location.",
  14309. "summary": "List references",
  14310. "x-codeSamples": [
  14311. {
  14312. "lang": "js",
  14313. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.reference.list({\n ...\n})"
  14314. }
  14315. ]
  14316. }
  14317. },
  14318. "/experimental/project/{projectID}/copy": {
  14319. "post": {
  14320. "tags": ["projectCopy"],
  14321. "operationId": "v2.projectCopy.create",
  14322. "parameters": [
  14323. {
  14324. "name": "projectID",
  14325. "in": "path",
  14326. "schema": {
  14327. "type": "string"
  14328. },
  14329. "required": true
  14330. },
  14331. {
  14332. "name": "location",
  14333. "in": "query",
  14334. "schema": {
  14335. "type": "object",
  14336. "properties": {
  14337. "directory": {
  14338. "type": "string"
  14339. },
  14340. "workspace": {
  14341. "type": "string"
  14342. }
  14343. },
  14344. "additionalProperties": false
  14345. },
  14346. "required": false,
  14347. "style": "deepObject",
  14348. "explode": true
  14349. }
  14350. ],
  14351. "responses": {
  14352. "200": {
  14353. "description": "ProjectCopy.Copy",
  14354. "content": {
  14355. "application/json": {
  14356. "schema": {
  14357. "$ref": "#/components/schemas/ProjectCopyCopy"
  14358. }
  14359. }
  14360. }
  14361. },
  14362. "400": {
  14363. "description": "ProjectCopyError | InvalidRequestError",
  14364. "content": {
  14365. "application/json": {
  14366. "schema": {
  14367. "anyOf": [
  14368. {
  14369. "$ref": "#/components/schemas/ProjectCopyError"
  14370. },
  14371. {
  14372. "$ref": "#/components/schemas/InvalidRequestError"
  14373. }
  14374. ]
  14375. }
  14376. }
  14377. }
  14378. }
  14379. },
  14380. "requestBody": {
  14381. "content": {
  14382. "application/json": {
  14383. "schema": {
  14384. "type": "object",
  14385. "properties": {
  14386. "strategy": {
  14387. "type": "string"
  14388. },
  14389. "directory": {
  14390. "type": "string"
  14391. },
  14392. "name": {
  14393. "type": "string"
  14394. }
  14395. },
  14396. "required": ["strategy", "directory"],
  14397. "additionalProperties": false
  14398. }
  14399. }
  14400. }
  14401. },
  14402. "x-codeSamples": [
  14403. {
  14404. "lang": "js",
  14405. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.create({\n ...\n})"
  14406. }
  14407. ]
  14408. },
  14409. "delete": {
  14410. "tags": ["projectCopy"],
  14411. "operationId": "v2.projectCopy.remove",
  14412. "parameters": [
  14413. {
  14414. "name": "projectID",
  14415. "in": "path",
  14416. "schema": {
  14417. "type": "string"
  14418. },
  14419. "required": true
  14420. },
  14421. {
  14422. "name": "location",
  14423. "in": "query",
  14424. "schema": {
  14425. "type": "object",
  14426. "properties": {
  14427. "directory": {
  14428. "type": "string"
  14429. },
  14430. "workspace": {
  14431. "type": "string"
  14432. }
  14433. },
  14434. "additionalProperties": false
  14435. },
  14436. "required": false,
  14437. "style": "deepObject",
  14438. "explode": true
  14439. }
  14440. ],
  14441. "responses": {
  14442. "204": {
  14443. "description": "<No Content>"
  14444. },
  14445. "400": {
  14446. "description": "ProjectCopyError | InvalidRequestError",
  14447. "content": {
  14448. "application/json": {
  14449. "schema": {
  14450. "anyOf": [
  14451. {
  14452. "$ref": "#/components/schemas/ProjectCopyError"
  14453. },
  14454. {
  14455. "$ref": "#/components/schemas/InvalidRequestError"
  14456. }
  14457. ]
  14458. }
  14459. }
  14460. }
  14461. }
  14462. },
  14463. "requestBody": {
  14464. "content": {
  14465. "application/json": {
  14466. "schema": {
  14467. "type": "object",
  14468. "properties": {
  14469. "directory": {
  14470. "type": "string"
  14471. },
  14472. "force": {
  14473. "type": "boolean"
  14474. }
  14475. },
  14476. "required": ["directory", "force"],
  14477. "additionalProperties": false
  14478. }
  14479. }
  14480. }
  14481. },
  14482. "x-codeSamples": [
  14483. {
  14484. "lang": "js",
  14485. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.remove({\n ...\n})"
  14486. }
  14487. ]
  14488. }
  14489. },
  14490. "/experimental/project/{projectID}/copy/refresh": {
  14491. "post": {
  14492. "tags": ["projectCopy"],
  14493. "operationId": "v2.projectCopy.refresh",
  14494. "parameters": [
  14495. {
  14496. "name": "projectID",
  14497. "in": "path",
  14498. "schema": {
  14499. "type": "string"
  14500. },
  14501. "required": true
  14502. },
  14503. {
  14504. "name": "location",
  14505. "in": "query",
  14506. "schema": {
  14507. "type": "object",
  14508. "properties": {
  14509. "directory": {
  14510. "type": "string"
  14511. },
  14512. "workspace": {
  14513. "type": "string"
  14514. }
  14515. },
  14516. "additionalProperties": false
  14517. },
  14518. "required": false,
  14519. "style": "deepObject",
  14520. "explode": true
  14521. }
  14522. ],
  14523. "responses": {
  14524. "204": {
  14525. "description": "<No Content>"
  14526. },
  14527. "400": {
  14528. "description": "ProjectCopyError | InvalidRequestError",
  14529. "content": {
  14530. "application/json": {
  14531. "schema": {
  14532. "anyOf": [
  14533. {
  14534. "$ref": "#/components/schemas/ProjectCopyError"
  14535. },
  14536. {
  14537. "$ref": "#/components/schemas/InvalidRequestError"
  14538. }
  14539. ]
  14540. }
  14541. }
  14542. }
  14543. }
  14544. },
  14545. "x-codeSamples": [
  14546. {
  14547. "lang": "js",
  14548. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.refresh({\n ...\n})"
  14549. }
  14550. ]
  14551. }
  14552. },
  14553. "/pty/{ptyID}/connect": {
  14554. "get": {
  14555. "tags": ["pty"],
  14556. "operationId": "pty.connect",
  14557. "parameters": [
  14558. {
  14559. "name": "ptyID",
  14560. "in": "path",
  14561. "schema": {
  14562. "type": "string",
  14563. "pattern": "^pty"
  14564. },
  14565. "required": true
  14566. },
  14567. {
  14568. "in": "query",
  14569. "name": "directory",
  14570. "schema": {
  14571. "type": "string"
  14572. }
  14573. },
  14574. {
  14575. "in": "query",
  14576. "name": "workspace",
  14577. "schema": {
  14578. "type": "string"
  14579. }
  14580. },
  14581. {
  14582. "in": "query",
  14583. "name": "cursor",
  14584. "schema": {
  14585. "type": "string"
  14586. }
  14587. },
  14588. {
  14589. "in": "query",
  14590. "name": "ticket",
  14591. "schema": {
  14592. "type": "string"
  14593. }
  14594. }
  14595. ],
  14596. "responses": {
  14597. "200": {
  14598. "description": "Connected session",
  14599. "content": {
  14600. "application/json": {
  14601. "schema": {
  14602. "type": "boolean",
  14603. "description": "Connected session"
  14604. }
  14605. }
  14606. }
  14607. },
  14608. "403": {
  14609. "description": "Forbidden",
  14610. "content": {
  14611. "application/json": {
  14612. "schema": {
  14613. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  14614. }
  14615. }
  14616. }
  14617. },
  14618. "404": {
  14619. "description": "Not found",
  14620. "content": {
  14621. "application/json": {
  14622. "schema": {
  14623. "$ref": "#/components/schemas/NotFoundError"
  14624. }
  14625. }
  14626. }
  14627. }
  14628. },
  14629. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  14630. "summary": "Connect to PTY session",
  14631. "x-codeSamples": [
  14632. {
  14633. "lang": "js",
  14634. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  14635. }
  14636. ]
  14637. }
  14638. }
  14639. },
  14640. "components": {
  14641. "schemas": {
  14642. "Event": {
  14643. "anyOf": [
  14644. {
  14645. "$ref": "#/components/schemas/EventModels-devRefreshed"
  14646. },
  14647. {
  14648. "$ref": "#/components/schemas/EventIntegrationUpdated"
  14649. },
  14650. {
  14651. "$ref": "#/components/schemas/EventCatalogUpdated"
  14652. },
  14653. {
  14654. "$ref": "#/components/schemas/EventSessionCreated"
  14655. },
  14656. {
  14657. "$ref": "#/components/schemas/EventSessionUpdated"
  14658. },
  14659. {
  14660. "$ref": "#/components/schemas/EventSessionDeleted"
  14661. },
  14662. {
  14663. "$ref": "#/components/schemas/EventMessageUpdated"
  14664. },
  14665. {
  14666. "$ref": "#/components/schemas/EventMessageRemoved"
  14667. },
  14668. {
  14669. "$ref": "#/components/schemas/EventMessagePartUpdated"
  14670. },
  14671. {
  14672. "$ref": "#/components/schemas/EventMessagePartRemoved"
  14673. },
  14674. {
  14675. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  14676. },
  14677. {
  14678. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  14679. },
  14680. {
  14681. "$ref": "#/components/schemas/EventSessionNextMoved"
  14682. },
  14683. {
  14684. "$ref": "#/components/schemas/EventSessionNextPrompted"
  14685. },
  14686. {
  14687. "$ref": "#/components/schemas/EventSessionNextPromptAdmitted"
  14688. },
  14689. {
  14690. "$ref": "#/components/schemas/EventSessionNextContextUpdated"
  14691. },
  14692. {
  14693. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  14694. },
  14695. {
  14696. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  14697. },
  14698. {
  14699. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  14700. },
  14701. {
  14702. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  14703. },
  14704. {
  14705. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  14706. },
  14707. {
  14708. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  14709. },
  14710. {
  14711. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  14712. },
  14713. {
  14714. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  14715. },
  14716. {
  14717. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  14718. },
  14719. {
  14720. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  14721. },
  14722. {
  14723. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  14724. },
  14725. {
  14726. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  14727. },
  14728. {
  14729. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  14730. },
  14731. {
  14732. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  14733. },
  14734. {
  14735. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  14736. },
  14737. {
  14738. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  14739. },
  14740. {
  14741. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  14742. },
  14743. {
  14744. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  14745. },
  14746. {
  14747. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  14748. },
  14749. {
  14750. "$ref": "#/components/schemas/EventSessionNextRetried"
  14751. },
  14752. {
  14753. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  14754. },
  14755. {
  14756. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  14757. },
  14758. {
  14759. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  14760. },
  14761. {
  14762. "$ref": "#/components/schemas/EventMessagePartDelta"
  14763. },
  14764. {
  14765. "$ref": "#/components/schemas/EventSessionDiff"
  14766. },
  14767. {
  14768. "$ref": "#/components/schemas/EventSessionError"
  14769. },
  14770. {
  14771. "$ref": "#/components/schemas/EventInstallationUpdated"
  14772. },
  14773. {
  14774. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  14775. },
  14776. {
  14777. "$ref": "#/components/schemas/EventFileEdited"
  14778. },
  14779. {
  14780. "$ref": "#/components/schemas/EventReferenceUpdated"
  14781. },
  14782. {
  14783. "$ref": "#/components/schemas/EventPermissionV2Asked"
  14784. },
  14785. {
  14786. "$ref": "#/components/schemas/EventPermissionV2Replied"
  14787. },
  14788. {
  14789. "$ref": "#/components/schemas/EventPluginAdded"
  14790. },
  14791. {
  14792. "$ref": "#/components/schemas/EventProjectDirectoriesUpdated"
  14793. },
  14794. {
  14795. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  14796. },
  14797. {
  14798. "$ref": "#/components/schemas/EventPtyCreated"
  14799. },
  14800. {
  14801. "$ref": "#/components/schemas/EventPtyUpdated"
  14802. },
  14803. {
  14804. "$ref": "#/components/schemas/EventPtyExited"
  14805. },
  14806. {
  14807. "$ref": "#/components/schemas/EventPtyDeleted"
  14808. },
  14809. {
  14810. "$ref": "#/components/schemas/EventQuestionV2Asked"
  14811. },
  14812. {
  14813. "$ref": "#/components/schemas/EventQuestionV2Replied"
  14814. },
  14815. {
  14816. "$ref": "#/components/schemas/EventQuestionV2Rejected"
  14817. },
  14818. {
  14819. "$ref": "#/components/schemas/EventTodoUpdated"
  14820. },
  14821. {
  14822. "$ref": "#/components/schemas/EventLspUpdated"
  14823. },
  14824. {
  14825. "$ref": "#/components/schemas/EventPermissionAsked"
  14826. },
  14827. {
  14828. "$ref": "#/components/schemas/EventPermissionReplied"
  14829. },
  14830. {
  14831. "$ref": "#/components/schemas/Event.tui.prompt.append"
  14832. },
  14833. {
  14834. "$ref": "#/components/schemas/Event.tui.command.execute"
  14835. },
  14836. {
  14837. "$ref": "#/components/schemas/Event.tui.toast.show"
  14838. },
  14839. {
  14840. "$ref": "#/components/schemas/Event.tui.session.select"
  14841. },
  14842. {
  14843. "$ref": "#/components/schemas/EventMcpToolsChanged"
  14844. },
  14845. {
  14846. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  14847. },
  14848. {
  14849. "$ref": "#/components/schemas/EventCommandExecuted"
  14850. },
  14851. {
  14852. "$ref": "#/components/schemas/EventProjectUpdated"
  14853. },
  14854. {
  14855. "$ref": "#/components/schemas/EventSessionStatus"
  14856. },
  14857. {
  14858. "$ref": "#/components/schemas/EventSessionIdle"
  14859. },
  14860. {
  14861. "$ref": "#/components/schemas/EventQuestionAsked"
  14862. },
  14863. {
  14864. "$ref": "#/components/schemas/EventQuestionReplied"
  14865. },
  14866. {
  14867. "$ref": "#/components/schemas/EventQuestionRejected"
  14868. },
  14869. {
  14870. "$ref": "#/components/schemas/EventSessionCompacted"
  14871. },
  14872. {
  14873. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  14874. },
  14875. {
  14876. "$ref": "#/components/schemas/EventWorkspaceReady"
  14877. },
  14878. {
  14879. "$ref": "#/components/schemas/EventWorkspaceFailed"
  14880. },
  14881. {
  14882. "$ref": "#/components/schemas/EventWorkspaceStatus"
  14883. },
  14884. {
  14885. "$ref": "#/components/schemas/EventWorktreeReady"
  14886. },
  14887. {
  14888. "$ref": "#/components/schemas/EventWorktreeFailed"
  14889. },
  14890. {
  14891. "$ref": "#/components/schemas/EventServerConnected"
  14892. },
  14893. {
  14894. "$ref": "#/components/schemas/EventGlobalDisposed"
  14895. },
  14896. {
  14897. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  14898. }
  14899. ]
  14900. },
  14901. "QuestionReplied": {
  14902. "type": "object",
  14903. "properties": {
  14904. "sessionID": {
  14905. "type": "string",
  14906. "pattern": "^ses"
  14907. },
  14908. "requestID": {
  14909. "type": "string",
  14910. "pattern": "^que"
  14911. },
  14912. "answers": {
  14913. "type": "array",
  14914. "items": {
  14915. "$ref": "#/components/schemas/QuestionAnswer"
  14916. }
  14917. }
  14918. },
  14919. "required": ["sessionID", "requestID", "answers"],
  14920. "additionalProperties": false
  14921. },
  14922. "QuestionRejected": {
  14923. "type": "object",
  14924. "properties": {
  14925. "sessionID": {
  14926. "type": "string",
  14927. "pattern": "^ses"
  14928. },
  14929. "requestID": {
  14930. "type": "string",
  14931. "pattern": "^que"
  14932. }
  14933. },
  14934. "required": ["sessionID", "requestID"],
  14935. "additionalProperties": false
  14936. },
  14937. "OAuth": {
  14938. "type": "object",
  14939. "properties": {
  14940. "type": {
  14941. "type": "string",
  14942. "enum": ["oauth"]
  14943. },
  14944. "refresh": {
  14945. "type": "string"
  14946. },
  14947. "access": {
  14948. "type": "string"
  14949. },
  14950. "expires": {
  14951. "type": "integer",
  14952. "minimum": 0
  14953. },
  14954. "accountId": {
  14955. "type": "string"
  14956. },
  14957. "enterpriseUrl": {
  14958. "type": "string"
  14959. }
  14960. },
  14961. "required": ["type", "refresh", "access", "expires"],
  14962. "additionalProperties": false
  14963. },
  14964. "ApiAuth": {
  14965. "type": "object",
  14966. "properties": {
  14967. "type": {
  14968. "type": "string",
  14969. "enum": ["api"]
  14970. },
  14971. "key": {
  14972. "type": "string"
  14973. },
  14974. "metadata": {
  14975. "type": "object",
  14976. "additionalProperties": {
  14977. "type": "string"
  14978. }
  14979. }
  14980. },
  14981. "required": ["type", "key"],
  14982. "additionalProperties": false
  14983. },
  14984. "WellKnownAuth": {
  14985. "type": "object",
  14986. "properties": {
  14987. "type": {
  14988. "type": "string",
  14989. "enum": ["wellknown"]
  14990. },
  14991. "key": {
  14992. "type": "string"
  14993. },
  14994. "token": {
  14995. "type": "string"
  14996. }
  14997. },
  14998. "required": ["type", "key", "token"],
  14999. "additionalProperties": false
  15000. },
  15001. "Auth": {
  15002. "anyOf": [
  15003. {
  15004. "$ref": "#/components/schemas/OAuth"
  15005. },
  15006. {
  15007. "$ref": "#/components/schemas/ApiAuth"
  15008. },
  15009. {
  15010. "$ref": "#/components/schemas/WellKnownAuth"
  15011. }
  15012. ]
  15013. },
  15014. "effect_HttpApiError_BadRequest": {
  15015. "type": "object",
  15016. "properties": {
  15017. "_tag": {
  15018. "type": "string",
  15019. "enum": ["BadRequest"]
  15020. }
  15021. },
  15022. "required": ["_tag"],
  15023. "additionalProperties": false
  15024. },
  15025. "InvalidRequestError": {
  15026. "type": "object",
  15027. "properties": {
  15028. "_tag": {
  15029. "type": "string",
  15030. "enum": ["InvalidRequestError"]
  15031. },
  15032. "message": {
  15033. "type": "string"
  15034. },
  15035. "kind": {
  15036. "type": "string"
  15037. },
  15038. "field": {
  15039. "type": "string"
  15040. }
  15041. },
  15042. "required": ["_tag", "message"],
  15043. "additionalProperties": false
  15044. },
  15045. "MoveSessionError": {
  15046. "type": "object",
  15047. "properties": {
  15048. "name": {
  15049. "type": "string",
  15050. "enum": ["MoveSessionError"]
  15051. },
  15052. "data": {
  15053. "type": "object",
  15054. "properties": {
  15055. "message": {
  15056. "type": "string"
  15057. }
  15058. },
  15059. "required": ["message"],
  15060. "additionalProperties": false
  15061. }
  15062. },
  15063. "required": ["name", "data"],
  15064. "additionalProperties": false
  15065. },
  15066. "SnapshotFileDiff": {
  15067. "type": "object",
  15068. "properties": {
  15069. "file": {
  15070. "type": "string"
  15071. },
  15072. "patch": {
  15073. "type": "string"
  15074. },
  15075. "additions": {
  15076. "type": "number"
  15077. },
  15078. "deletions": {
  15079. "type": "number"
  15080. },
  15081. "status": {
  15082. "type": "string",
  15083. "enum": ["added", "deleted", "modified"]
  15084. }
  15085. },
  15086. "required": ["additions", "deletions"],
  15087. "additionalProperties": false
  15088. },
  15089. "PermissionAction": {
  15090. "type": "string",
  15091. "enum": ["allow", "deny", "ask"]
  15092. },
  15093. "PermissionRule": {
  15094. "type": "object",
  15095. "properties": {
  15096. "permission": {
  15097. "type": "string"
  15098. },
  15099. "pattern": {
  15100. "type": "string"
  15101. },
  15102. "action": {
  15103. "$ref": "#/components/schemas/PermissionAction"
  15104. }
  15105. },
  15106. "required": ["permission", "pattern", "action"],
  15107. "additionalProperties": false
  15108. },
  15109. "PermissionRuleset": {
  15110. "type": "array",
  15111. "items": {
  15112. "$ref": "#/components/schemas/PermissionRule"
  15113. }
  15114. },
  15115. "Session": {
  15116. "type": "object",
  15117. "properties": {
  15118. "id": {
  15119. "type": "string",
  15120. "pattern": "^ses"
  15121. },
  15122. "slug": {
  15123. "type": "string"
  15124. },
  15125. "projectID": {
  15126. "type": "string"
  15127. },
  15128. "workspaceID": {
  15129. "type": "string",
  15130. "pattern": "^wrk"
  15131. },
  15132. "directory": {
  15133. "type": "string"
  15134. },
  15135. "path": {
  15136. "type": "string"
  15137. },
  15138. "parentID": {
  15139. "type": "string",
  15140. "pattern": "^ses"
  15141. },
  15142. "summary": {
  15143. "type": "object",
  15144. "properties": {
  15145. "additions": {
  15146. "type": "number"
  15147. },
  15148. "deletions": {
  15149. "type": "number"
  15150. },
  15151. "files": {
  15152. "type": "number"
  15153. },
  15154. "diffs": {
  15155. "type": "array",
  15156. "items": {
  15157. "$ref": "#/components/schemas/SnapshotFileDiff"
  15158. }
  15159. }
  15160. },
  15161. "required": ["additions", "deletions", "files"],
  15162. "additionalProperties": false
  15163. },
  15164. "cost": {
  15165. "type": "number"
  15166. },
  15167. "tokens": {
  15168. "type": "object",
  15169. "properties": {
  15170. "input": {
  15171. "type": "number"
  15172. },
  15173. "output": {
  15174. "type": "number"
  15175. },
  15176. "reasoning": {
  15177. "type": "number"
  15178. },
  15179. "cache": {
  15180. "type": "object",
  15181. "properties": {
  15182. "read": {
  15183. "type": "number"
  15184. },
  15185. "write": {
  15186. "type": "number"
  15187. }
  15188. },
  15189. "required": ["read", "write"],
  15190. "additionalProperties": false
  15191. }
  15192. },
  15193. "required": ["input", "output", "reasoning", "cache"],
  15194. "additionalProperties": false
  15195. },
  15196. "share": {
  15197. "type": "object",
  15198. "properties": {
  15199. "url": {
  15200. "type": "string"
  15201. }
  15202. },
  15203. "required": ["url"],
  15204. "additionalProperties": false
  15205. },
  15206. "title": {
  15207. "type": "string"
  15208. },
  15209. "agent": {
  15210. "type": "string"
  15211. },
  15212. "model": {
  15213. "type": "object",
  15214. "properties": {
  15215. "id": {
  15216. "type": "string"
  15217. },
  15218. "providerID": {
  15219. "type": "string"
  15220. },
  15221. "variant": {
  15222. "type": "string"
  15223. }
  15224. },
  15225. "required": ["id", "providerID"],
  15226. "additionalProperties": false
  15227. },
  15228. "version": {
  15229. "type": "string"
  15230. },
  15231. "metadata": {
  15232. "type": "object"
  15233. },
  15234. "time": {
  15235. "type": "object",
  15236. "properties": {
  15237. "created": {
  15238. "type": "integer",
  15239. "minimum": 0
  15240. },
  15241. "updated": {
  15242. "type": "integer",
  15243. "minimum": 0
  15244. },
  15245. "compacting": {
  15246. "type": "integer",
  15247. "minimum": 0
  15248. },
  15249. "archived": {
  15250. "type": "number"
  15251. }
  15252. },
  15253. "required": ["created", "updated"],
  15254. "additionalProperties": false
  15255. },
  15256. "permission": {
  15257. "$ref": "#/components/schemas/PermissionRuleset"
  15258. },
  15259. "revert": {
  15260. "type": "object",
  15261. "properties": {
  15262. "messageID": {
  15263. "type": "string",
  15264. "pattern": "^msg"
  15265. },
  15266. "partID": {
  15267. "type": "string",
  15268. "pattern": "^prt"
  15269. },
  15270. "snapshot": {
  15271. "type": "string"
  15272. },
  15273. "diff": {
  15274. "type": "string"
  15275. }
  15276. },
  15277. "required": ["messageID"],
  15278. "additionalProperties": false
  15279. }
  15280. },
  15281. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  15282. "additionalProperties": false
  15283. },
  15284. "OutputFormatText": {
  15285. "type": "object",
  15286. "properties": {
  15287. "type": {
  15288. "type": "string",
  15289. "enum": ["text"]
  15290. }
  15291. },
  15292. "required": ["type"],
  15293. "additionalProperties": false
  15294. },
  15295. "JSONSchema": {
  15296. "type": "object"
  15297. },
  15298. "OutputFormatJsonSchema": {
  15299. "type": "object",
  15300. "properties": {
  15301. "type": {
  15302. "type": "string",
  15303. "enum": ["json_schema"]
  15304. },
  15305. "schema": {
  15306. "$ref": "#/components/schemas/JSONSchema"
  15307. },
  15308. "retryCount": {
  15309. "type": "integer",
  15310. "minimum": 0
  15311. }
  15312. },
  15313. "required": ["type", "schema"],
  15314. "additionalProperties": false
  15315. },
  15316. "OutputFormat": {
  15317. "anyOf": [
  15318. {
  15319. "$ref": "#/components/schemas/OutputFormatText"
  15320. },
  15321. {
  15322. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  15323. }
  15324. ]
  15325. },
  15326. "UserMessage": {
  15327. "type": "object",
  15328. "properties": {
  15329. "id": {
  15330. "type": "string",
  15331. "pattern": "^msg"
  15332. },
  15333. "sessionID": {
  15334. "type": "string",
  15335. "pattern": "^ses"
  15336. },
  15337. "role": {
  15338. "type": "string",
  15339. "enum": ["user"]
  15340. },
  15341. "time": {
  15342. "type": "object",
  15343. "properties": {
  15344. "created": {
  15345. "type": "number",
  15346. "minimum": 0
  15347. }
  15348. },
  15349. "required": ["created"],
  15350. "additionalProperties": false
  15351. },
  15352. "format": {
  15353. "$ref": "#/components/schemas/OutputFormat"
  15354. },
  15355. "summary": {
  15356. "type": "object",
  15357. "properties": {
  15358. "title": {
  15359. "type": "string"
  15360. },
  15361. "body": {
  15362. "type": "string"
  15363. },
  15364. "diffs": {
  15365. "type": "array",
  15366. "items": {
  15367. "$ref": "#/components/schemas/SnapshotFileDiff"
  15368. }
  15369. }
  15370. },
  15371. "required": ["diffs"],
  15372. "additionalProperties": false
  15373. },
  15374. "agent": {
  15375. "type": "string"
  15376. },
  15377. "model": {
  15378. "type": "object",
  15379. "properties": {
  15380. "providerID": {
  15381. "type": "string"
  15382. },
  15383. "modelID": {
  15384. "type": "string"
  15385. },
  15386. "variant": {
  15387. "type": "string"
  15388. }
  15389. },
  15390. "required": ["providerID", "modelID"],
  15391. "additionalProperties": false
  15392. },
  15393. "system": {
  15394. "type": "string"
  15395. },
  15396. "tools": {
  15397. "type": "object",
  15398. "additionalProperties": {
  15399. "type": "boolean"
  15400. }
  15401. }
  15402. },
  15403. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  15404. "additionalProperties": false
  15405. },
  15406. "ProviderAuthError": {
  15407. "type": "object",
  15408. "properties": {
  15409. "name": {
  15410. "type": "string",
  15411. "enum": ["ProviderAuthError"]
  15412. },
  15413. "data": {
  15414. "type": "object",
  15415. "properties": {
  15416. "providerID": {
  15417. "type": "string"
  15418. },
  15419. "message": {
  15420. "type": "string"
  15421. }
  15422. },
  15423. "required": ["providerID", "message"],
  15424. "additionalProperties": false
  15425. }
  15426. },
  15427. "required": ["name", "data"],
  15428. "additionalProperties": false
  15429. },
  15430. "UnknownError": {
  15431. "type": "object",
  15432. "properties": {
  15433. "name": {
  15434. "type": "string",
  15435. "enum": ["UnknownError"]
  15436. },
  15437. "data": {
  15438. "type": "object",
  15439. "properties": {
  15440. "message": {
  15441. "type": "string"
  15442. },
  15443. "ref": {
  15444. "type": "string"
  15445. }
  15446. },
  15447. "required": ["message"],
  15448. "additionalProperties": false
  15449. }
  15450. },
  15451. "required": ["name", "data"],
  15452. "additionalProperties": false
  15453. },
  15454. "MessageOutputLengthError": {
  15455. "type": "object",
  15456. "properties": {
  15457. "name": {
  15458. "type": "string",
  15459. "enum": ["MessageOutputLengthError"]
  15460. },
  15461. "data": {
  15462. "type": "object",
  15463. "properties": {}
  15464. }
  15465. },
  15466. "required": ["name", "data"],
  15467. "additionalProperties": false
  15468. },
  15469. "MessageAbortedError": {
  15470. "type": "object",
  15471. "properties": {
  15472. "name": {
  15473. "type": "string",
  15474. "enum": ["MessageAbortedError"]
  15475. },
  15476. "data": {
  15477. "type": "object",
  15478. "properties": {
  15479. "message": {
  15480. "type": "string"
  15481. }
  15482. },
  15483. "required": ["message"],
  15484. "additionalProperties": false
  15485. }
  15486. },
  15487. "required": ["name", "data"],
  15488. "additionalProperties": false
  15489. },
  15490. "StructuredOutputError": {
  15491. "type": "object",
  15492. "properties": {
  15493. "name": {
  15494. "type": "string",
  15495. "enum": ["StructuredOutputError"]
  15496. },
  15497. "data": {
  15498. "type": "object",
  15499. "properties": {
  15500. "message": {
  15501. "type": "string"
  15502. },
  15503. "retries": {
  15504. "type": "integer",
  15505. "minimum": 0
  15506. }
  15507. },
  15508. "required": ["message", "retries"],
  15509. "additionalProperties": false
  15510. }
  15511. },
  15512. "required": ["name", "data"],
  15513. "additionalProperties": false
  15514. },
  15515. "ContextOverflowError": {
  15516. "type": "object",
  15517. "properties": {
  15518. "name": {
  15519. "type": "string",
  15520. "enum": ["ContextOverflowError"]
  15521. },
  15522. "data": {
  15523. "type": "object",
  15524. "properties": {
  15525. "message": {
  15526. "type": "string"
  15527. },
  15528. "responseBody": {
  15529. "type": "string"
  15530. }
  15531. },
  15532. "required": ["message"],
  15533. "additionalProperties": false
  15534. }
  15535. },
  15536. "required": ["name", "data"],
  15537. "additionalProperties": false
  15538. },
  15539. "ContentFilterError": {
  15540. "type": "object",
  15541. "properties": {
  15542. "name": {
  15543. "type": "string",
  15544. "enum": ["ContentFilterError"]
  15545. },
  15546. "data": {
  15547. "type": "object",
  15548. "properties": {
  15549. "message": {
  15550. "type": "string"
  15551. }
  15552. },
  15553. "required": ["message"],
  15554. "additionalProperties": false
  15555. }
  15556. },
  15557. "required": ["name", "data"],
  15558. "additionalProperties": false
  15559. },
  15560. "APIError": {
  15561. "type": "object",
  15562. "properties": {
  15563. "name": {
  15564. "type": "string",
  15565. "enum": ["APIError"]
  15566. },
  15567. "data": {
  15568. "type": "object",
  15569. "properties": {
  15570. "message": {
  15571. "type": "string"
  15572. },
  15573. "statusCode": {
  15574. "type": "integer",
  15575. "minimum": 0
  15576. },
  15577. "isRetryable": {
  15578. "type": "boolean"
  15579. },
  15580. "responseHeaders": {
  15581. "type": "object",
  15582. "additionalProperties": {
  15583. "type": "string"
  15584. }
  15585. },
  15586. "responseBody": {
  15587. "type": "string"
  15588. },
  15589. "metadata": {
  15590. "type": "object",
  15591. "additionalProperties": {
  15592. "type": "string"
  15593. }
  15594. }
  15595. },
  15596. "required": ["message", "isRetryable"],
  15597. "additionalProperties": false
  15598. }
  15599. },
  15600. "required": ["name", "data"],
  15601. "additionalProperties": false
  15602. },
  15603. "AssistantMessage": {
  15604. "type": "object",
  15605. "properties": {
  15606. "id": {
  15607. "type": "string",
  15608. "pattern": "^msg"
  15609. },
  15610. "sessionID": {
  15611. "type": "string",
  15612. "pattern": "^ses"
  15613. },
  15614. "role": {
  15615. "type": "string",
  15616. "enum": ["assistant"]
  15617. },
  15618. "time": {
  15619. "type": "object",
  15620. "properties": {
  15621. "created": {
  15622. "type": "integer",
  15623. "minimum": 0
  15624. },
  15625. "completed": {
  15626. "type": "integer",
  15627. "minimum": 0
  15628. }
  15629. },
  15630. "required": ["created"],
  15631. "additionalProperties": false
  15632. },
  15633. "error": {
  15634. "anyOf": [
  15635. {
  15636. "$ref": "#/components/schemas/ProviderAuthError"
  15637. },
  15638. {
  15639. "$ref": "#/components/schemas/UnknownError"
  15640. },
  15641. {
  15642. "$ref": "#/components/schemas/MessageOutputLengthError"
  15643. },
  15644. {
  15645. "$ref": "#/components/schemas/MessageAbortedError"
  15646. },
  15647. {
  15648. "$ref": "#/components/schemas/StructuredOutputError"
  15649. },
  15650. {
  15651. "$ref": "#/components/schemas/ContextOverflowError"
  15652. },
  15653. {
  15654. "$ref": "#/components/schemas/ContentFilterError"
  15655. },
  15656. {
  15657. "$ref": "#/components/schemas/APIError"
  15658. }
  15659. ]
  15660. },
  15661. "parentID": {
  15662. "type": "string",
  15663. "pattern": "^msg"
  15664. },
  15665. "modelID": {
  15666. "type": "string"
  15667. },
  15668. "providerID": {
  15669. "type": "string"
  15670. },
  15671. "mode": {
  15672. "type": "string"
  15673. },
  15674. "agent": {
  15675. "type": "string"
  15676. },
  15677. "path": {
  15678. "type": "object",
  15679. "properties": {
  15680. "cwd": {
  15681. "type": "string"
  15682. },
  15683. "root": {
  15684. "type": "string"
  15685. }
  15686. },
  15687. "required": ["cwd", "root"],
  15688. "additionalProperties": false
  15689. },
  15690. "summary": {
  15691. "type": "boolean"
  15692. },
  15693. "cost": {
  15694. "type": "number"
  15695. },
  15696. "tokens": {
  15697. "type": "object",
  15698. "properties": {
  15699. "total": {
  15700. "type": "number"
  15701. },
  15702. "input": {
  15703. "type": "number"
  15704. },
  15705. "output": {
  15706. "type": "number"
  15707. },
  15708. "reasoning": {
  15709. "type": "number"
  15710. },
  15711. "cache": {
  15712. "type": "object",
  15713. "properties": {
  15714. "read": {
  15715. "type": "number"
  15716. },
  15717. "write": {
  15718. "type": "number"
  15719. }
  15720. },
  15721. "required": ["read", "write"],
  15722. "additionalProperties": false
  15723. }
  15724. },
  15725. "required": ["input", "output", "reasoning", "cache"],
  15726. "additionalProperties": false
  15727. },
  15728. "structured": {},
  15729. "variant": {
  15730. "type": "string"
  15731. },
  15732. "finish": {
  15733. "type": "string"
  15734. }
  15735. },
  15736. "required": [
  15737. "id",
  15738. "sessionID",
  15739. "role",
  15740. "time",
  15741. "parentID",
  15742. "modelID",
  15743. "providerID",
  15744. "mode",
  15745. "agent",
  15746. "path",
  15747. "cost",
  15748. "tokens"
  15749. ],
  15750. "additionalProperties": false
  15751. },
  15752. "Message": {
  15753. "anyOf": [
  15754. {
  15755. "$ref": "#/components/schemas/UserMessage"
  15756. },
  15757. {
  15758. "$ref": "#/components/schemas/AssistantMessage"
  15759. }
  15760. ]
  15761. },
  15762. "TextPart": {
  15763. "type": "object",
  15764. "properties": {
  15765. "id": {
  15766. "type": "string",
  15767. "pattern": "^prt"
  15768. },
  15769. "sessionID": {
  15770. "type": "string",
  15771. "pattern": "^ses"
  15772. },
  15773. "messageID": {
  15774. "type": "string",
  15775. "pattern": "^msg"
  15776. },
  15777. "type": {
  15778. "type": "string",
  15779. "enum": ["text"]
  15780. },
  15781. "text": {
  15782. "type": "string"
  15783. },
  15784. "synthetic": {
  15785. "type": "boolean"
  15786. },
  15787. "ignored": {
  15788. "type": "boolean"
  15789. },
  15790. "time": {
  15791. "type": "object",
  15792. "properties": {
  15793. "start": {
  15794. "type": "integer",
  15795. "minimum": 0
  15796. },
  15797. "end": {
  15798. "type": "integer",
  15799. "minimum": 0
  15800. }
  15801. },
  15802. "required": ["start"],
  15803. "additionalProperties": false
  15804. },
  15805. "metadata": {
  15806. "type": "object"
  15807. }
  15808. },
  15809. "required": ["id", "sessionID", "messageID", "type", "text"],
  15810. "additionalProperties": false
  15811. },
  15812. "SubtaskPart": {
  15813. "type": "object",
  15814. "properties": {
  15815. "id": {
  15816. "type": "string",
  15817. "pattern": "^prt"
  15818. },
  15819. "sessionID": {
  15820. "type": "string",
  15821. "pattern": "^ses"
  15822. },
  15823. "messageID": {
  15824. "type": "string",
  15825. "pattern": "^msg"
  15826. },
  15827. "type": {
  15828. "type": "string",
  15829. "enum": ["subtask"]
  15830. },
  15831. "prompt": {
  15832. "type": "string"
  15833. },
  15834. "description": {
  15835. "type": "string"
  15836. },
  15837. "agent": {
  15838. "type": "string"
  15839. },
  15840. "model": {
  15841. "type": "object",
  15842. "properties": {
  15843. "providerID": {
  15844. "type": "string"
  15845. },
  15846. "modelID": {
  15847. "type": "string"
  15848. }
  15849. },
  15850. "required": ["providerID", "modelID"],
  15851. "additionalProperties": false
  15852. },
  15853. "command": {
  15854. "type": "string"
  15855. }
  15856. },
  15857. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  15858. "additionalProperties": false
  15859. },
  15860. "ReasoningPart": {
  15861. "type": "object",
  15862. "properties": {
  15863. "id": {
  15864. "type": "string",
  15865. "pattern": "^prt"
  15866. },
  15867. "sessionID": {
  15868. "type": "string",
  15869. "pattern": "^ses"
  15870. },
  15871. "messageID": {
  15872. "type": "string",
  15873. "pattern": "^msg"
  15874. },
  15875. "type": {
  15876. "type": "string",
  15877. "enum": ["reasoning"]
  15878. },
  15879. "text": {
  15880. "type": "string"
  15881. },
  15882. "metadata": {
  15883. "type": "object"
  15884. },
  15885. "time": {
  15886. "type": "object",
  15887. "properties": {
  15888. "start": {
  15889. "type": "integer",
  15890. "minimum": 0
  15891. },
  15892. "end": {
  15893. "type": "integer",
  15894. "minimum": 0
  15895. }
  15896. },
  15897. "required": ["start"],
  15898. "additionalProperties": false
  15899. }
  15900. },
  15901. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  15902. "additionalProperties": false
  15903. },
  15904. "FilePartSourceText": {
  15905. "type": "object",
  15906. "properties": {
  15907. "value": {
  15908. "type": "string"
  15909. },
  15910. "start": {
  15911. "type": "number"
  15912. },
  15913. "end": {
  15914. "type": "number"
  15915. }
  15916. },
  15917. "required": ["value", "start", "end"],
  15918. "additionalProperties": false
  15919. },
  15920. "FileSource": {
  15921. "type": "object",
  15922. "properties": {
  15923. "text": {
  15924. "$ref": "#/components/schemas/FilePartSourceText"
  15925. },
  15926. "type": {
  15927. "type": "string",
  15928. "enum": ["file"]
  15929. },
  15930. "path": {
  15931. "type": "string"
  15932. }
  15933. },
  15934. "required": ["text", "type", "path"],
  15935. "additionalProperties": false
  15936. },
  15937. "Range": {
  15938. "type": "object",
  15939. "properties": {
  15940. "start": {
  15941. "type": "object",
  15942. "properties": {
  15943. "line": {
  15944. "type": "integer",
  15945. "minimum": 0
  15946. },
  15947. "character": {
  15948. "type": "integer",
  15949. "minimum": 0
  15950. }
  15951. },
  15952. "required": ["line", "character"],
  15953. "additionalProperties": false
  15954. },
  15955. "end": {
  15956. "type": "object",
  15957. "properties": {
  15958. "line": {
  15959. "type": "integer",
  15960. "minimum": 0
  15961. },
  15962. "character": {
  15963. "type": "integer",
  15964. "minimum": 0
  15965. }
  15966. },
  15967. "required": ["line", "character"],
  15968. "additionalProperties": false
  15969. }
  15970. },
  15971. "required": ["start", "end"],
  15972. "additionalProperties": false
  15973. },
  15974. "SymbolSource": {
  15975. "type": "object",
  15976. "properties": {
  15977. "text": {
  15978. "$ref": "#/components/schemas/FilePartSourceText"
  15979. },
  15980. "type": {
  15981. "type": "string",
  15982. "enum": ["symbol"]
  15983. },
  15984. "path": {
  15985. "type": "string"
  15986. },
  15987. "range": {
  15988. "$ref": "#/components/schemas/Range"
  15989. },
  15990. "name": {
  15991. "type": "string"
  15992. },
  15993. "kind": {
  15994. "type": "integer",
  15995. "minimum": 0
  15996. }
  15997. },
  15998. "required": ["text", "type", "path", "range", "name", "kind"],
  15999. "additionalProperties": false
  16000. },
  16001. "ResourceSource": {
  16002. "type": "object",
  16003. "properties": {
  16004. "text": {
  16005. "$ref": "#/components/schemas/FilePartSourceText"
  16006. },
  16007. "type": {
  16008. "type": "string",
  16009. "enum": ["resource"]
  16010. },
  16011. "clientName": {
  16012. "type": "string"
  16013. },
  16014. "uri": {
  16015. "type": "string"
  16016. }
  16017. },
  16018. "required": ["text", "type", "clientName", "uri"],
  16019. "additionalProperties": false
  16020. },
  16021. "FilePartSource": {
  16022. "anyOf": [
  16023. {
  16024. "$ref": "#/components/schemas/FileSource"
  16025. },
  16026. {
  16027. "$ref": "#/components/schemas/SymbolSource"
  16028. },
  16029. {
  16030. "$ref": "#/components/schemas/ResourceSource"
  16031. }
  16032. ]
  16033. },
  16034. "FilePart": {
  16035. "type": "object",
  16036. "properties": {
  16037. "id": {
  16038. "type": "string",
  16039. "pattern": "^prt"
  16040. },
  16041. "sessionID": {
  16042. "type": "string",
  16043. "pattern": "^ses"
  16044. },
  16045. "messageID": {
  16046. "type": "string",
  16047. "pattern": "^msg"
  16048. },
  16049. "type": {
  16050. "type": "string",
  16051. "enum": ["file"]
  16052. },
  16053. "mime": {
  16054. "type": "string"
  16055. },
  16056. "filename": {
  16057. "type": "string"
  16058. },
  16059. "url": {
  16060. "type": "string"
  16061. },
  16062. "source": {
  16063. "$ref": "#/components/schemas/FilePartSource"
  16064. }
  16065. },
  16066. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  16067. "additionalProperties": false
  16068. },
  16069. "ToolStatePending": {
  16070. "type": "object",
  16071. "properties": {
  16072. "status": {
  16073. "type": "string",
  16074. "enum": ["pending"]
  16075. },
  16076. "input": {
  16077. "type": "object"
  16078. },
  16079. "raw": {
  16080. "type": "string"
  16081. }
  16082. },
  16083. "required": ["status", "input", "raw"],
  16084. "additionalProperties": false
  16085. },
  16086. "ToolStateRunning": {
  16087. "type": "object",
  16088. "properties": {
  16089. "status": {
  16090. "type": "string",
  16091. "enum": ["running"]
  16092. },
  16093. "input": {
  16094. "type": "object"
  16095. },
  16096. "title": {
  16097. "type": "string"
  16098. },
  16099. "metadata": {
  16100. "type": "object"
  16101. },
  16102. "time": {
  16103. "type": "object",
  16104. "properties": {
  16105. "start": {
  16106. "type": "integer",
  16107. "minimum": 0
  16108. }
  16109. },
  16110. "required": ["start"],
  16111. "additionalProperties": false
  16112. }
  16113. },
  16114. "required": ["status", "input", "time"],
  16115. "additionalProperties": false
  16116. },
  16117. "ToolStateCompleted": {
  16118. "type": "object",
  16119. "properties": {
  16120. "status": {
  16121. "type": "string",
  16122. "enum": ["completed"]
  16123. },
  16124. "input": {
  16125. "type": "object"
  16126. },
  16127. "output": {
  16128. "type": "string"
  16129. },
  16130. "title": {
  16131. "type": "string"
  16132. },
  16133. "metadata": {
  16134. "type": "object"
  16135. },
  16136. "time": {
  16137. "type": "object",
  16138. "properties": {
  16139. "start": {
  16140. "type": "integer",
  16141. "minimum": 0
  16142. },
  16143. "end": {
  16144. "type": "integer",
  16145. "minimum": 0
  16146. },
  16147. "compacted": {
  16148. "type": "integer",
  16149. "minimum": 0
  16150. }
  16151. },
  16152. "required": ["start", "end"],
  16153. "additionalProperties": false
  16154. },
  16155. "attachments": {
  16156. "type": "array",
  16157. "items": {
  16158. "$ref": "#/components/schemas/FilePart"
  16159. }
  16160. }
  16161. },
  16162. "required": ["status", "input", "output", "title", "metadata", "time"],
  16163. "additionalProperties": false
  16164. },
  16165. "ToolStateError": {
  16166. "type": "object",
  16167. "properties": {
  16168. "status": {
  16169. "type": "string",
  16170. "enum": ["error"]
  16171. },
  16172. "input": {
  16173. "type": "object"
  16174. },
  16175. "error": {
  16176. "type": "string"
  16177. },
  16178. "metadata": {
  16179. "type": "object"
  16180. },
  16181. "time": {
  16182. "type": "object",
  16183. "properties": {
  16184. "start": {
  16185. "type": "integer",
  16186. "minimum": 0
  16187. },
  16188. "end": {
  16189. "type": "integer",
  16190. "minimum": 0
  16191. }
  16192. },
  16193. "required": ["start", "end"],
  16194. "additionalProperties": false
  16195. }
  16196. },
  16197. "required": ["status", "input", "error", "time"],
  16198. "additionalProperties": false
  16199. },
  16200. "ToolState": {
  16201. "anyOf": [
  16202. {
  16203. "$ref": "#/components/schemas/ToolStatePending"
  16204. },
  16205. {
  16206. "$ref": "#/components/schemas/ToolStateRunning"
  16207. },
  16208. {
  16209. "$ref": "#/components/schemas/ToolStateCompleted"
  16210. },
  16211. {
  16212. "$ref": "#/components/schemas/ToolStateError"
  16213. }
  16214. ]
  16215. },
  16216. "ToolPart": {
  16217. "type": "object",
  16218. "properties": {
  16219. "id": {
  16220. "type": "string",
  16221. "pattern": "^prt"
  16222. },
  16223. "sessionID": {
  16224. "type": "string",
  16225. "pattern": "^ses"
  16226. },
  16227. "messageID": {
  16228. "type": "string",
  16229. "pattern": "^msg"
  16230. },
  16231. "type": {
  16232. "type": "string",
  16233. "enum": ["tool"]
  16234. },
  16235. "callID": {
  16236. "type": "string"
  16237. },
  16238. "tool": {
  16239. "type": "string"
  16240. },
  16241. "state": {
  16242. "$ref": "#/components/schemas/ToolState"
  16243. },
  16244. "metadata": {
  16245. "type": "object"
  16246. }
  16247. },
  16248. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  16249. "additionalProperties": false
  16250. },
  16251. "StepStartPart": {
  16252. "type": "object",
  16253. "properties": {
  16254. "id": {
  16255. "type": "string",
  16256. "pattern": "^prt"
  16257. },
  16258. "sessionID": {
  16259. "type": "string",
  16260. "pattern": "^ses"
  16261. },
  16262. "messageID": {
  16263. "type": "string",
  16264. "pattern": "^msg"
  16265. },
  16266. "type": {
  16267. "type": "string",
  16268. "enum": ["step-start"]
  16269. },
  16270. "snapshot": {
  16271. "type": "string"
  16272. }
  16273. },
  16274. "required": ["id", "sessionID", "messageID", "type"],
  16275. "additionalProperties": false
  16276. },
  16277. "StepFinishPart": {
  16278. "type": "object",
  16279. "properties": {
  16280. "id": {
  16281. "type": "string",
  16282. "pattern": "^prt"
  16283. },
  16284. "sessionID": {
  16285. "type": "string",
  16286. "pattern": "^ses"
  16287. },
  16288. "messageID": {
  16289. "type": "string",
  16290. "pattern": "^msg"
  16291. },
  16292. "type": {
  16293. "type": "string",
  16294. "enum": ["step-finish"]
  16295. },
  16296. "reason": {
  16297. "type": "string"
  16298. },
  16299. "snapshot": {
  16300. "type": "string"
  16301. },
  16302. "cost": {
  16303. "type": "number"
  16304. },
  16305. "tokens": {
  16306. "type": "object",
  16307. "properties": {
  16308. "total": {
  16309. "type": "number"
  16310. },
  16311. "input": {
  16312. "type": "number"
  16313. },
  16314. "output": {
  16315. "type": "number"
  16316. },
  16317. "reasoning": {
  16318. "type": "number"
  16319. },
  16320. "cache": {
  16321. "type": "object",
  16322. "properties": {
  16323. "read": {
  16324. "type": "number"
  16325. },
  16326. "write": {
  16327. "type": "number"
  16328. }
  16329. },
  16330. "required": ["read", "write"],
  16331. "additionalProperties": false
  16332. }
  16333. },
  16334. "required": ["input", "output", "reasoning", "cache"],
  16335. "additionalProperties": false
  16336. }
  16337. },
  16338. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  16339. "additionalProperties": false
  16340. },
  16341. "SnapshotPart": {
  16342. "type": "object",
  16343. "properties": {
  16344. "id": {
  16345. "type": "string",
  16346. "pattern": "^prt"
  16347. },
  16348. "sessionID": {
  16349. "type": "string",
  16350. "pattern": "^ses"
  16351. },
  16352. "messageID": {
  16353. "type": "string",
  16354. "pattern": "^msg"
  16355. },
  16356. "type": {
  16357. "type": "string",
  16358. "enum": ["snapshot"]
  16359. },
  16360. "snapshot": {
  16361. "type": "string"
  16362. }
  16363. },
  16364. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  16365. "additionalProperties": false
  16366. },
  16367. "PatchPart": {
  16368. "type": "object",
  16369. "properties": {
  16370. "id": {
  16371. "type": "string",
  16372. "pattern": "^prt"
  16373. },
  16374. "sessionID": {
  16375. "type": "string",
  16376. "pattern": "^ses"
  16377. },
  16378. "messageID": {
  16379. "type": "string",
  16380. "pattern": "^msg"
  16381. },
  16382. "type": {
  16383. "type": "string",
  16384. "enum": ["patch"]
  16385. },
  16386. "hash": {
  16387. "type": "string"
  16388. },
  16389. "files": {
  16390. "type": "array",
  16391. "items": {
  16392. "type": "string"
  16393. }
  16394. }
  16395. },
  16396. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  16397. "additionalProperties": false
  16398. },
  16399. "AgentPart": {
  16400. "type": "object",
  16401. "properties": {
  16402. "id": {
  16403. "type": "string",
  16404. "pattern": "^prt"
  16405. },
  16406. "sessionID": {
  16407. "type": "string",
  16408. "pattern": "^ses"
  16409. },
  16410. "messageID": {
  16411. "type": "string",
  16412. "pattern": "^msg"
  16413. },
  16414. "type": {
  16415. "type": "string",
  16416. "enum": ["agent"]
  16417. },
  16418. "name": {
  16419. "type": "string"
  16420. },
  16421. "source": {
  16422. "type": "object",
  16423. "properties": {
  16424. "value": {
  16425. "type": "string"
  16426. },
  16427. "start": {
  16428. "type": "integer",
  16429. "minimum": 0
  16430. },
  16431. "end": {
  16432. "type": "integer",
  16433. "minimum": 0
  16434. }
  16435. },
  16436. "required": ["value", "start", "end"],
  16437. "additionalProperties": false
  16438. }
  16439. },
  16440. "required": ["id", "sessionID", "messageID", "type", "name"],
  16441. "additionalProperties": false
  16442. },
  16443. "RetryPart": {
  16444. "type": "object",
  16445. "properties": {
  16446. "id": {
  16447. "type": "string",
  16448. "pattern": "^prt"
  16449. },
  16450. "sessionID": {
  16451. "type": "string",
  16452. "pattern": "^ses"
  16453. },
  16454. "messageID": {
  16455. "type": "string",
  16456. "pattern": "^msg"
  16457. },
  16458. "type": {
  16459. "type": "string",
  16460. "enum": ["retry"]
  16461. },
  16462. "attempt": {
  16463. "type": "integer",
  16464. "minimum": 0
  16465. },
  16466. "error": {
  16467. "$ref": "#/components/schemas/APIError"
  16468. },
  16469. "time": {
  16470. "type": "object",
  16471. "properties": {
  16472. "created": {
  16473. "type": "integer",
  16474. "minimum": 0
  16475. }
  16476. },
  16477. "required": ["created"],
  16478. "additionalProperties": false
  16479. }
  16480. },
  16481. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  16482. "additionalProperties": false
  16483. },
  16484. "CompactionPart": {
  16485. "type": "object",
  16486. "properties": {
  16487. "id": {
  16488. "type": "string",
  16489. "pattern": "^prt"
  16490. },
  16491. "sessionID": {
  16492. "type": "string",
  16493. "pattern": "^ses"
  16494. },
  16495. "messageID": {
  16496. "type": "string",
  16497. "pattern": "^msg"
  16498. },
  16499. "type": {
  16500. "type": "string",
  16501. "enum": ["compaction"]
  16502. },
  16503. "auto": {
  16504. "type": "boolean"
  16505. },
  16506. "overflow": {
  16507. "type": "boolean"
  16508. },
  16509. "tail_start_id": {
  16510. "type": "string",
  16511. "pattern": "^msg"
  16512. }
  16513. },
  16514. "required": ["id", "sessionID", "messageID", "type", "auto"],
  16515. "additionalProperties": false
  16516. },
  16517. "Part": {
  16518. "anyOf": [
  16519. {
  16520. "$ref": "#/components/schemas/TextPart"
  16521. },
  16522. {
  16523. "$ref": "#/components/schemas/SubtaskPart"
  16524. },
  16525. {
  16526. "$ref": "#/components/schemas/ReasoningPart"
  16527. },
  16528. {
  16529. "$ref": "#/components/schemas/FilePart"
  16530. },
  16531. {
  16532. "$ref": "#/components/schemas/ToolPart"
  16533. },
  16534. {
  16535. "$ref": "#/components/schemas/StepStartPart"
  16536. },
  16537. {
  16538. "$ref": "#/components/schemas/StepFinishPart"
  16539. },
  16540. {
  16541. "$ref": "#/components/schemas/SnapshotPart"
  16542. },
  16543. {
  16544. "$ref": "#/components/schemas/PatchPart"
  16545. },
  16546. {
  16547. "$ref": "#/components/schemas/AgentPart"
  16548. },
  16549. {
  16550. "$ref": "#/components/schemas/RetryPart"
  16551. },
  16552. {
  16553. "$ref": "#/components/schemas/CompactionPart"
  16554. }
  16555. ]
  16556. },
  16557. "Prompt": {
  16558. "type": "object",
  16559. "properties": {
  16560. "text": {
  16561. "type": "string"
  16562. },
  16563. "files": {
  16564. "type": "array",
  16565. "items": {
  16566. "$ref": "#/components/schemas/PromptFileAttachment"
  16567. }
  16568. },
  16569. "agents": {
  16570. "type": "array",
  16571. "items": {
  16572. "$ref": "#/components/schemas/PromptAgentAttachment"
  16573. }
  16574. }
  16575. },
  16576. "required": ["text"],
  16577. "additionalProperties": false
  16578. },
  16579. "Pty": {
  16580. "type": "object",
  16581. "properties": {
  16582. "id": {
  16583. "type": "string",
  16584. "pattern": "^pty"
  16585. },
  16586. "title": {
  16587. "type": "string"
  16588. },
  16589. "command": {
  16590. "type": "string"
  16591. },
  16592. "args": {
  16593. "type": "array",
  16594. "items": {
  16595. "type": "string"
  16596. }
  16597. },
  16598. "cwd": {
  16599. "type": "string"
  16600. },
  16601. "status": {
  16602. "type": "string",
  16603. "enum": ["running", "exited"]
  16604. },
  16605. "pid": {
  16606. "type": "integer",
  16607. "minimum": 0
  16608. },
  16609. "exitCode": {
  16610. "type": "integer",
  16611. "minimum": 0
  16612. }
  16613. },
  16614. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  16615. "additionalProperties": false
  16616. },
  16617. "Todo": {
  16618. "type": "object",
  16619. "properties": {
  16620. "content": {
  16621. "type": "string",
  16622. "description": "Brief description of the task"
  16623. },
  16624. "status": {
  16625. "type": "string",
  16626. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  16627. },
  16628. "priority": {
  16629. "type": "string",
  16630. "description": "Priority level of the task: high, medium, low"
  16631. }
  16632. },
  16633. "required": ["content", "status", "priority"],
  16634. "additionalProperties": false
  16635. },
  16636. "SessionStatus": {
  16637. "anyOf": [
  16638. {
  16639. "type": "object",
  16640. "properties": {
  16641. "type": {
  16642. "type": "string",
  16643. "enum": ["idle"]
  16644. }
  16645. },
  16646. "required": ["type"],
  16647. "additionalProperties": false
  16648. },
  16649. {
  16650. "type": "object",
  16651. "properties": {
  16652. "type": {
  16653. "type": "string",
  16654. "enum": ["retry"]
  16655. },
  16656. "attempt": {
  16657. "type": "integer",
  16658. "minimum": 0
  16659. },
  16660. "message": {
  16661. "type": "string"
  16662. },
  16663. "action": {
  16664. "type": "object",
  16665. "properties": {
  16666. "reason": {
  16667. "type": "string"
  16668. },
  16669. "provider": {
  16670. "type": "string"
  16671. },
  16672. "title": {
  16673. "type": "string"
  16674. },
  16675. "message": {
  16676. "type": "string"
  16677. },
  16678. "label": {
  16679. "type": "string"
  16680. },
  16681. "link": {
  16682. "type": "string"
  16683. }
  16684. },
  16685. "required": ["reason", "provider", "title", "message", "label"],
  16686. "additionalProperties": false
  16687. },
  16688. "next": {
  16689. "type": "integer",
  16690. "minimum": 0
  16691. }
  16692. },
  16693. "required": ["type", "attempt", "message", "next"],
  16694. "additionalProperties": false
  16695. },
  16696. {
  16697. "type": "object",
  16698. "properties": {
  16699. "type": {
  16700. "type": "string",
  16701. "enum": ["busy"]
  16702. }
  16703. },
  16704. "required": ["type"],
  16705. "additionalProperties": false
  16706. }
  16707. ]
  16708. },
  16709. "QuestionOption": {
  16710. "type": "object",
  16711. "properties": {
  16712. "label": {
  16713. "type": "string",
  16714. "description": "Display text (1-5 words, concise)"
  16715. },
  16716. "description": {
  16717. "type": "string",
  16718. "description": "Explanation of choice"
  16719. }
  16720. },
  16721. "required": ["label", "description"],
  16722. "additionalProperties": false
  16723. },
  16724. "QuestionInfo": {
  16725. "type": "object",
  16726. "properties": {
  16727. "question": {
  16728. "type": "string",
  16729. "description": "Complete question"
  16730. },
  16731. "header": {
  16732. "type": "string",
  16733. "description": "Very short label (max 30 chars)"
  16734. },
  16735. "options": {
  16736. "type": "array",
  16737. "items": {
  16738. "$ref": "#/components/schemas/QuestionOption"
  16739. },
  16740. "description": "Available choices"
  16741. },
  16742. "multiple": {
  16743. "type": "boolean"
  16744. },
  16745. "custom": {
  16746. "type": "boolean"
  16747. }
  16748. },
  16749. "required": ["question", "header", "options"],
  16750. "additionalProperties": false
  16751. },
  16752. "QuestionTool": {
  16753. "type": "object",
  16754. "properties": {
  16755. "messageID": {
  16756. "type": "string",
  16757. "pattern": "^msg"
  16758. },
  16759. "callID": {
  16760. "type": "string"
  16761. }
  16762. },
  16763. "required": ["messageID", "callID"],
  16764. "additionalProperties": false
  16765. },
  16766. "QuestionAnswer": {
  16767. "type": "array",
  16768. "items": {
  16769. "type": "string"
  16770. }
  16771. },
  16772. "GlobalEvent": {
  16773. "type": "object",
  16774. "properties": {
  16775. "directory": {
  16776. "type": "string"
  16777. },
  16778. "project": {
  16779. "type": "string"
  16780. },
  16781. "workspace": {
  16782. "type": "string"
  16783. },
  16784. "payload": {
  16785. "anyOf": [
  16786. {
  16787. "type": "object",
  16788. "properties": {
  16789. "id": {
  16790. "type": "string",
  16791. "pattern": "^evt_"
  16792. },
  16793. "type": {
  16794. "type": "string",
  16795. "enum": ["models-dev.refreshed"]
  16796. },
  16797. "properties": {
  16798. "type": "object",
  16799. "properties": {}
  16800. }
  16801. },
  16802. "required": ["id", "type", "properties"],
  16803. "additionalProperties": false
  16804. },
  16805. {
  16806. "type": "object",
  16807. "properties": {
  16808. "id": {
  16809. "type": "string",
  16810. "pattern": "^evt_"
  16811. },
  16812. "type": {
  16813. "type": "string",
  16814. "enum": ["integration.updated"]
  16815. },
  16816. "properties": {
  16817. "type": "object",
  16818. "properties": {}
  16819. }
  16820. },
  16821. "required": ["id", "type", "properties"],
  16822. "additionalProperties": false
  16823. },
  16824. {
  16825. "type": "object",
  16826. "properties": {
  16827. "id": {
  16828. "type": "string",
  16829. "pattern": "^evt_"
  16830. },
  16831. "type": {
  16832. "type": "string",
  16833. "enum": ["catalog.updated"]
  16834. },
  16835. "properties": {
  16836. "type": "object",
  16837. "properties": {}
  16838. }
  16839. },
  16840. "required": ["id", "type", "properties"],
  16841. "additionalProperties": false
  16842. },
  16843. {
  16844. "type": "object",
  16845. "properties": {
  16846. "id": {
  16847. "type": "string",
  16848. "pattern": "^evt_"
  16849. },
  16850. "type": {
  16851. "type": "string",
  16852. "enum": ["session.created"]
  16853. },
  16854. "properties": {
  16855. "type": "object",
  16856. "properties": {
  16857. "sessionID": {
  16858. "type": "string",
  16859. "pattern": "^ses"
  16860. },
  16861. "info": {
  16862. "$ref": "#/components/schemas/Session"
  16863. }
  16864. },
  16865. "required": ["sessionID", "info"],
  16866. "additionalProperties": false
  16867. }
  16868. },
  16869. "required": ["id", "type", "properties"],
  16870. "additionalProperties": false
  16871. },
  16872. {
  16873. "type": "object",
  16874. "properties": {
  16875. "id": {
  16876. "type": "string",
  16877. "pattern": "^evt_"
  16878. },
  16879. "type": {
  16880. "type": "string",
  16881. "enum": ["session.updated"]
  16882. },
  16883. "properties": {
  16884. "type": "object",
  16885. "properties": {
  16886. "sessionID": {
  16887. "type": "string",
  16888. "pattern": "^ses"
  16889. },
  16890. "info": {
  16891. "$ref": "#/components/schemas/Session"
  16892. }
  16893. },
  16894. "required": ["sessionID", "info"],
  16895. "additionalProperties": false
  16896. }
  16897. },
  16898. "required": ["id", "type", "properties"],
  16899. "additionalProperties": false
  16900. },
  16901. {
  16902. "type": "object",
  16903. "properties": {
  16904. "id": {
  16905. "type": "string",
  16906. "pattern": "^evt_"
  16907. },
  16908. "type": {
  16909. "type": "string",
  16910. "enum": ["session.deleted"]
  16911. },
  16912. "properties": {
  16913. "type": "object",
  16914. "properties": {
  16915. "sessionID": {
  16916. "type": "string",
  16917. "pattern": "^ses"
  16918. },
  16919. "info": {
  16920. "$ref": "#/components/schemas/Session"
  16921. }
  16922. },
  16923. "required": ["sessionID", "info"],
  16924. "additionalProperties": false
  16925. }
  16926. },
  16927. "required": ["id", "type", "properties"],
  16928. "additionalProperties": false
  16929. },
  16930. {
  16931. "type": "object",
  16932. "properties": {
  16933. "id": {
  16934. "type": "string",
  16935. "pattern": "^evt_"
  16936. },
  16937. "type": {
  16938. "type": "string",
  16939. "enum": ["message.updated"]
  16940. },
  16941. "properties": {
  16942. "type": "object",
  16943. "properties": {
  16944. "sessionID": {
  16945. "type": "string",
  16946. "pattern": "^ses"
  16947. },
  16948. "info": {
  16949. "$ref": "#/components/schemas/Message"
  16950. }
  16951. },
  16952. "required": ["sessionID", "info"],
  16953. "additionalProperties": false
  16954. }
  16955. },
  16956. "required": ["id", "type", "properties"],
  16957. "additionalProperties": false
  16958. },
  16959. {
  16960. "type": "object",
  16961. "properties": {
  16962. "id": {
  16963. "type": "string",
  16964. "pattern": "^evt_"
  16965. },
  16966. "type": {
  16967. "type": "string",
  16968. "enum": ["message.removed"]
  16969. },
  16970. "properties": {
  16971. "type": "object",
  16972. "properties": {
  16973. "sessionID": {
  16974. "type": "string",
  16975. "pattern": "^ses"
  16976. },
  16977. "messageID": {
  16978. "type": "string",
  16979. "pattern": "^msg"
  16980. }
  16981. },
  16982. "required": ["sessionID", "messageID"],
  16983. "additionalProperties": false
  16984. }
  16985. },
  16986. "required": ["id", "type", "properties"],
  16987. "additionalProperties": false
  16988. },
  16989. {
  16990. "type": "object",
  16991. "properties": {
  16992. "id": {
  16993. "type": "string",
  16994. "pattern": "^evt_"
  16995. },
  16996. "type": {
  16997. "type": "string",
  16998. "enum": ["message.part.updated"]
  16999. },
  17000. "properties": {
  17001. "type": "object",
  17002. "properties": {
  17003. "sessionID": {
  17004. "type": "string",
  17005. "pattern": "^ses"
  17006. },
  17007. "part": {
  17008. "$ref": "#/components/schemas/Part"
  17009. },
  17010. "time": {
  17011. "type": "number"
  17012. }
  17013. },
  17014. "required": ["sessionID", "part", "time"],
  17015. "additionalProperties": false
  17016. }
  17017. },
  17018. "required": ["id", "type", "properties"],
  17019. "additionalProperties": false
  17020. },
  17021. {
  17022. "type": "object",
  17023. "properties": {
  17024. "id": {
  17025. "type": "string",
  17026. "pattern": "^evt_"
  17027. },
  17028. "type": {
  17029. "type": "string",
  17030. "enum": ["message.part.removed"]
  17031. },
  17032. "properties": {
  17033. "type": "object",
  17034. "properties": {
  17035. "sessionID": {
  17036. "type": "string",
  17037. "pattern": "^ses"
  17038. },
  17039. "messageID": {
  17040. "type": "string",
  17041. "pattern": "^msg"
  17042. },
  17043. "partID": {
  17044. "type": "string",
  17045. "pattern": "^prt"
  17046. }
  17047. },
  17048. "required": ["sessionID", "messageID", "partID"],
  17049. "additionalProperties": false
  17050. }
  17051. },
  17052. "required": ["id", "type", "properties"],
  17053. "additionalProperties": false
  17054. },
  17055. {
  17056. "type": "object",
  17057. "properties": {
  17058. "id": {
  17059. "type": "string",
  17060. "pattern": "^evt_"
  17061. },
  17062. "type": {
  17063. "type": "string",
  17064. "enum": ["session.next.agent.switched"]
  17065. },
  17066. "properties": {
  17067. "type": "object",
  17068. "properties": {
  17069. "timestamp": {
  17070. "type": "number"
  17071. },
  17072. "sessionID": {
  17073. "type": "string",
  17074. "pattern": "^ses"
  17075. },
  17076. "messageID": {
  17077. "type": "string",
  17078. "pattern": "^msg_"
  17079. },
  17080. "agent": {
  17081. "type": "string"
  17082. }
  17083. },
  17084. "required": ["timestamp", "sessionID", "messageID", "agent"],
  17085. "additionalProperties": false
  17086. }
  17087. },
  17088. "required": ["id", "type", "properties"],
  17089. "additionalProperties": false
  17090. },
  17091. {
  17092. "type": "object",
  17093. "properties": {
  17094. "id": {
  17095. "type": "string",
  17096. "pattern": "^evt_"
  17097. },
  17098. "type": {
  17099. "type": "string",
  17100. "enum": ["session.next.model.switched"]
  17101. },
  17102. "properties": {
  17103. "type": "object",
  17104. "properties": {
  17105. "timestamp": {
  17106. "type": "number"
  17107. },
  17108. "sessionID": {
  17109. "type": "string",
  17110. "pattern": "^ses"
  17111. },
  17112. "messageID": {
  17113. "type": "string",
  17114. "pattern": "^msg_"
  17115. },
  17116. "model": {
  17117. "type": "object",
  17118. "properties": {
  17119. "id": {
  17120. "type": "string"
  17121. },
  17122. "providerID": {
  17123. "type": "string"
  17124. },
  17125. "variant": {
  17126. "type": "string"
  17127. }
  17128. },
  17129. "required": ["id", "providerID"],
  17130. "additionalProperties": false
  17131. }
  17132. },
  17133. "required": ["timestamp", "sessionID", "messageID", "model"],
  17134. "additionalProperties": false
  17135. }
  17136. },
  17137. "required": ["id", "type", "properties"],
  17138. "additionalProperties": false
  17139. },
  17140. {
  17141. "type": "object",
  17142. "properties": {
  17143. "id": {
  17144. "type": "string",
  17145. "pattern": "^evt_"
  17146. },
  17147. "type": {
  17148. "type": "string",
  17149. "enum": ["session.next.moved"]
  17150. },
  17151. "properties": {
  17152. "type": "object",
  17153. "properties": {
  17154. "timestamp": {
  17155. "type": "number"
  17156. },
  17157. "sessionID": {
  17158. "type": "string",
  17159. "pattern": "^ses"
  17160. },
  17161. "location": {
  17162. "$ref": "#/components/schemas/LocationRef"
  17163. },
  17164. "subdirectory": {
  17165. "type": "string"
  17166. }
  17167. },
  17168. "required": ["timestamp", "sessionID", "location"],
  17169. "additionalProperties": false
  17170. }
  17171. },
  17172. "required": ["id", "type", "properties"],
  17173. "additionalProperties": false
  17174. },
  17175. {
  17176. "type": "object",
  17177. "properties": {
  17178. "id": {
  17179. "type": "string",
  17180. "pattern": "^evt_"
  17181. },
  17182. "type": {
  17183. "type": "string",
  17184. "enum": ["session.next.prompted"]
  17185. },
  17186. "properties": {
  17187. "type": "object",
  17188. "properties": {
  17189. "timestamp": {
  17190. "type": "number"
  17191. },
  17192. "sessionID": {
  17193. "type": "string",
  17194. "pattern": "^ses"
  17195. },
  17196. "messageID": {
  17197. "type": "string",
  17198. "pattern": "^msg_"
  17199. },
  17200. "prompt": {
  17201. "$ref": "#/components/schemas/Prompt"
  17202. },
  17203. "delivery": {
  17204. "type": "string",
  17205. "enum": ["steer", "queue"]
  17206. }
  17207. },
  17208. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  17209. "additionalProperties": false
  17210. }
  17211. },
  17212. "required": ["id", "type", "properties"],
  17213. "additionalProperties": false
  17214. },
  17215. {
  17216. "type": "object",
  17217. "properties": {
  17218. "id": {
  17219. "type": "string",
  17220. "pattern": "^evt_"
  17221. },
  17222. "type": {
  17223. "type": "string",
  17224. "enum": ["session.next.prompt.admitted"]
  17225. },
  17226. "properties": {
  17227. "type": "object",
  17228. "properties": {
  17229. "timestamp": {
  17230. "type": "number"
  17231. },
  17232. "sessionID": {
  17233. "type": "string",
  17234. "pattern": "^ses"
  17235. },
  17236. "messageID": {
  17237. "type": "string",
  17238. "pattern": "^msg_"
  17239. },
  17240. "prompt": {
  17241. "$ref": "#/components/schemas/Prompt"
  17242. },
  17243. "delivery": {
  17244. "type": "string",
  17245. "enum": ["steer", "queue"]
  17246. }
  17247. },
  17248. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  17249. "additionalProperties": false
  17250. }
  17251. },
  17252. "required": ["id", "type", "properties"],
  17253. "additionalProperties": false
  17254. },
  17255. {
  17256. "type": "object",
  17257. "properties": {
  17258. "id": {
  17259. "type": "string",
  17260. "pattern": "^evt_"
  17261. },
  17262. "type": {
  17263. "type": "string",
  17264. "enum": ["session.next.context.updated"]
  17265. },
  17266. "properties": {
  17267. "type": "object",
  17268. "properties": {
  17269. "timestamp": {
  17270. "type": "number"
  17271. },
  17272. "sessionID": {
  17273. "type": "string",
  17274. "pattern": "^ses"
  17275. },
  17276. "messageID": {
  17277. "type": "string",
  17278. "pattern": "^msg_"
  17279. },
  17280. "text": {
  17281. "type": "string"
  17282. }
  17283. },
  17284. "required": ["timestamp", "sessionID", "messageID", "text"],
  17285. "additionalProperties": false
  17286. }
  17287. },
  17288. "required": ["id", "type", "properties"],
  17289. "additionalProperties": false
  17290. },
  17291. {
  17292. "type": "object",
  17293. "properties": {
  17294. "id": {
  17295. "type": "string",
  17296. "pattern": "^evt_"
  17297. },
  17298. "type": {
  17299. "type": "string",
  17300. "enum": ["session.next.synthetic"]
  17301. },
  17302. "properties": {
  17303. "type": "object",
  17304. "properties": {
  17305. "timestamp": {
  17306. "type": "number"
  17307. },
  17308. "sessionID": {
  17309. "type": "string",
  17310. "pattern": "^ses"
  17311. },
  17312. "messageID": {
  17313. "type": "string",
  17314. "pattern": "^msg_"
  17315. },
  17316. "text": {
  17317. "type": "string"
  17318. }
  17319. },
  17320. "required": ["timestamp", "sessionID", "messageID", "text"],
  17321. "additionalProperties": false
  17322. }
  17323. },
  17324. "required": ["id", "type", "properties"],
  17325. "additionalProperties": false
  17326. },
  17327. {
  17328. "type": "object",
  17329. "properties": {
  17330. "id": {
  17331. "type": "string",
  17332. "pattern": "^evt_"
  17333. },
  17334. "type": {
  17335. "type": "string",
  17336. "enum": ["session.next.shell.started"]
  17337. },
  17338. "properties": {
  17339. "type": "object",
  17340. "properties": {
  17341. "timestamp": {
  17342. "type": "number"
  17343. },
  17344. "sessionID": {
  17345. "type": "string",
  17346. "pattern": "^ses"
  17347. },
  17348. "messageID": {
  17349. "type": "string",
  17350. "pattern": "^msg_"
  17351. },
  17352. "callID": {
  17353. "type": "string"
  17354. },
  17355. "command": {
  17356. "type": "string"
  17357. }
  17358. },
  17359. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  17360. "additionalProperties": false
  17361. }
  17362. },
  17363. "required": ["id", "type", "properties"],
  17364. "additionalProperties": false
  17365. },
  17366. {
  17367. "type": "object",
  17368. "properties": {
  17369. "id": {
  17370. "type": "string",
  17371. "pattern": "^evt_"
  17372. },
  17373. "type": {
  17374. "type": "string",
  17375. "enum": ["session.next.shell.ended"]
  17376. },
  17377. "properties": {
  17378. "type": "object",
  17379. "properties": {
  17380. "timestamp": {
  17381. "type": "number"
  17382. },
  17383. "sessionID": {
  17384. "type": "string",
  17385. "pattern": "^ses"
  17386. },
  17387. "callID": {
  17388. "type": "string"
  17389. },
  17390. "output": {
  17391. "type": "string"
  17392. }
  17393. },
  17394. "required": ["timestamp", "sessionID", "callID", "output"],
  17395. "additionalProperties": false
  17396. }
  17397. },
  17398. "required": ["id", "type", "properties"],
  17399. "additionalProperties": false
  17400. },
  17401. {
  17402. "type": "object",
  17403. "properties": {
  17404. "id": {
  17405. "type": "string",
  17406. "pattern": "^evt_"
  17407. },
  17408. "type": {
  17409. "type": "string",
  17410. "enum": ["session.next.step.started"]
  17411. },
  17412. "properties": {
  17413. "type": "object",
  17414. "properties": {
  17415. "timestamp": {
  17416. "type": "number"
  17417. },
  17418. "sessionID": {
  17419. "type": "string",
  17420. "pattern": "^ses"
  17421. },
  17422. "assistantMessageID": {
  17423. "type": "string",
  17424. "pattern": "^msg_"
  17425. },
  17426. "agent": {
  17427. "type": "string"
  17428. },
  17429. "model": {
  17430. "type": "object",
  17431. "properties": {
  17432. "id": {
  17433. "type": "string"
  17434. },
  17435. "providerID": {
  17436. "type": "string"
  17437. },
  17438. "variant": {
  17439. "type": "string"
  17440. }
  17441. },
  17442. "required": ["id", "providerID"],
  17443. "additionalProperties": false
  17444. },
  17445. "snapshot": {
  17446. "type": "string"
  17447. }
  17448. },
  17449. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  17450. "additionalProperties": false
  17451. }
  17452. },
  17453. "required": ["id", "type", "properties"],
  17454. "additionalProperties": false
  17455. },
  17456. {
  17457. "type": "object",
  17458. "properties": {
  17459. "id": {
  17460. "type": "string",
  17461. "pattern": "^evt_"
  17462. },
  17463. "type": {
  17464. "type": "string",
  17465. "enum": ["session.next.step.ended"]
  17466. },
  17467. "properties": {
  17468. "type": "object",
  17469. "properties": {
  17470. "timestamp": {
  17471. "type": "number"
  17472. },
  17473. "sessionID": {
  17474. "type": "string",
  17475. "pattern": "^ses"
  17476. },
  17477. "assistantMessageID": {
  17478. "type": "string",
  17479. "pattern": "^msg_"
  17480. },
  17481. "finish": {
  17482. "type": "string"
  17483. },
  17484. "cost": {
  17485. "type": "number"
  17486. },
  17487. "tokens": {
  17488. "type": "object",
  17489. "properties": {
  17490. "input": {
  17491. "type": "number"
  17492. },
  17493. "output": {
  17494. "type": "number"
  17495. },
  17496. "reasoning": {
  17497. "type": "number"
  17498. },
  17499. "cache": {
  17500. "type": "object",
  17501. "properties": {
  17502. "read": {
  17503. "type": "number"
  17504. },
  17505. "write": {
  17506. "type": "number"
  17507. }
  17508. },
  17509. "required": ["read", "write"],
  17510. "additionalProperties": false
  17511. }
  17512. },
  17513. "required": ["input", "output", "reasoning", "cache"],
  17514. "additionalProperties": false
  17515. },
  17516. "snapshot": {
  17517. "type": "string"
  17518. }
  17519. },
  17520. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  17521. "additionalProperties": false
  17522. }
  17523. },
  17524. "required": ["id", "type", "properties"],
  17525. "additionalProperties": false
  17526. },
  17527. {
  17528. "type": "object",
  17529. "properties": {
  17530. "id": {
  17531. "type": "string",
  17532. "pattern": "^evt_"
  17533. },
  17534. "type": {
  17535. "type": "string",
  17536. "enum": ["session.next.step.failed"]
  17537. },
  17538. "properties": {
  17539. "type": "object",
  17540. "properties": {
  17541. "timestamp": {
  17542. "type": "number"
  17543. },
  17544. "sessionID": {
  17545. "type": "string",
  17546. "pattern": "^ses"
  17547. },
  17548. "assistantMessageID": {
  17549. "type": "string",
  17550. "pattern": "^msg_"
  17551. },
  17552. "error": {
  17553. "$ref": "#/components/schemas/SessionErrorUnknown"
  17554. }
  17555. },
  17556. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  17557. "additionalProperties": false
  17558. }
  17559. },
  17560. "required": ["id", "type", "properties"],
  17561. "additionalProperties": false
  17562. },
  17563. {
  17564. "type": "object",
  17565. "properties": {
  17566. "id": {
  17567. "type": "string",
  17568. "pattern": "^evt_"
  17569. },
  17570. "type": {
  17571. "type": "string",
  17572. "enum": ["session.next.text.started"]
  17573. },
  17574. "properties": {
  17575. "type": "object",
  17576. "properties": {
  17577. "timestamp": {
  17578. "type": "number"
  17579. },
  17580. "sessionID": {
  17581. "type": "string",
  17582. "pattern": "^ses"
  17583. },
  17584. "assistantMessageID": {
  17585. "type": "string",
  17586. "pattern": "^msg_"
  17587. },
  17588. "textID": {
  17589. "type": "string"
  17590. }
  17591. },
  17592. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  17593. "additionalProperties": false
  17594. }
  17595. },
  17596. "required": ["id", "type", "properties"],
  17597. "additionalProperties": false
  17598. },
  17599. {
  17600. "type": "object",
  17601. "properties": {
  17602. "id": {
  17603. "type": "string",
  17604. "pattern": "^evt_"
  17605. },
  17606. "type": {
  17607. "type": "string",
  17608. "enum": ["session.next.text.delta"]
  17609. },
  17610. "properties": {
  17611. "type": "object",
  17612. "properties": {
  17613. "timestamp": {
  17614. "type": "number"
  17615. },
  17616. "sessionID": {
  17617. "type": "string",
  17618. "pattern": "^ses"
  17619. },
  17620. "assistantMessageID": {
  17621. "type": "string",
  17622. "pattern": "^msg_"
  17623. },
  17624. "textID": {
  17625. "type": "string"
  17626. },
  17627. "delta": {
  17628. "type": "string"
  17629. }
  17630. },
  17631. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  17632. "additionalProperties": false
  17633. }
  17634. },
  17635. "required": ["id", "type", "properties"],
  17636. "additionalProperties": false
  17637. },
  17638. {
  17639. "type": "object",
  17640. "properties": {
  17641. "id": {
  17642. "type": "string",
  17643. "pattern": "^evt_"
  17644. },
  17645. "type": {
  17646. "type": "string",
  17647. "enum": ["session.next.text.ended"]
  17648. },
  17649. "properties": {
  17650. "type": "object",
  17651. "properties": {
  17652. "timestamp": {
  17653. "type": "number"
  17654. },
  17655. "sessionID": {
  17656. "type": "string",
  17657. "pattern": "^ses"
  17658. },
  17659. "assistantMessageID": {
  17660. "type": "string",
  17661. "pattern": "^msg_"
  17662. },
  17663. "textID": {
  17664. "type": "string"
  17665. },
  17666. "text": {
  17667. "type": "string"
  17668. }
  17669. },
  17670. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  17671. "additionalProperties": false
  17672. }
  17673. },
  17674. "required": ["id", "type", "properties"],
  17675. "additionalProperties": false
  17676. },
  17677. {
  17678. "type": "object",
  17679. "properties": {
  17680. "id": {
  17681. "type": "string",
  17682. "pattern": "^evt_"
  17683. },
  17684. "type": {
  17685. "type": "string",
  17686. "enum": ["session.next.reasoning.started"]
  17687. },
  17688. "properties": {
  17689. "type": "object",
  17690. "properties": {
  17691. "timestamp": {
  17692. "type": "number"
  17693. },
  17694. "sessionID": {
  17695. "type": "string",
  17696. "pattern": "^ses"
  17697. },
  17698. "assistantMessageID": {
  17699. "type": "string",
  17700. "pattern": "^msg_"
  17701. },
  17702. "reasoningID": {
  17703. "type": "string"
  17704. },
  17705. "providerMetadata": {
  17706. "type": "object",
  17707. "additionalProperties": {
  17708. "type": "object"
  17709. }
  17710. }
  17711. },
  17712. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  17713. "additionalProperties": false
  17714. }
  17715. },
  17716. "required": ["id", "type", "properties"],
  17717. "additionalProperties": false
  17718. },
  17719. {
  17720. "type": "object",
  17721. "properties": {
  17722. "id": {
  17723. "type": "string",
  17724. "pattern": "^evt_"
  17725. },
  17726. "type": {
  17727. "type": "string",
  17728. "enum": ["session.next.reasoning.delta"]
  17729. },
  17730. "properties": {
  17731. "type": "object",
  17732. "properties": {
  17733. "timestamp": {
  17734. "type": "number"
  17735. },
  17736. "sessionID": {
  17737. "type": "string",
  17738. "pattern": "^ses"
  17739. },
  17740. "assistantMessageID": {
  17741. "type": "string",
  17742. "pattern": "^msg_"
  17743. },
  17744. "reasoningID": {
  17745. "type": "string"
  17746. },
  17747. "delta": {
  17748. "type": "string"
  17749. }
  17750. },
  17751. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  17752. "additionalProperties": false
  17753. }
  17754. },
  17755. "required": ["id", "type", "properties"],
  17756. "additionalProperties": false
  17757. },
  17758. {
  17759. "type": "object",
  17760. "properties": {
  17761. "id": {
  17762. "type": "string",
  17763. "pattern": "^evt_"
  17764. },
  17765. "type": {
  17766. "type": "string",
  17767. "enum": ["session.next.reasoning.ended"]
  17768. },
  17769. "properties": {
  17770. "type": "object",
  17771. "properties": {
  17772. "timestamp": {
  17773. "type": "number"
  17774. },
  17775. "sessionID": {
  17776. "type": "string",
  17777. "pattern": "^ses"
  17778. },
  17779. "assistantMessageID": {
  17780. "type": "string",
  17781. "pattern": "^msg_"
  17782. },
  17783. "reasoningID": {
  17784. "type": "string"
  17785. },
  17786. "text": {
  17787. "type": "string"
  17788. },
  17789. "providerMetadata": {
  17790. "type": "object",
  17791. "additionalProperties": {
  17792. "type": "object"
  17793. }
  17794. }
  17795. },
  17796. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  17797. "additionalProperties": false
  17798. }
  17799. },
  17800. "required": ["id", "type", "properties"],
  17801. "additionalProperties": false
  17802. },
  17803. {
  17804. "type": "object",
  17805. "properties": {
  17806. "id": {
  17807. "type": "string",
  17808. "pattern": "^evt_"
  17809. },
  17810. "type": {
  17811. "type": "string",
  17812. "enum": ["session.next.tool.input.started"]
  17813. },
  17814. "properties": {
  17815. "type": "object",
  17816. "properties": {
  17817. "timestamp": {
  17818. "type": "number"
  17819. },
  17820. "sessionID": {
  17821. "type": "string",
  17822. "pattern": "^ses"
  17823. },
  17824. "assistantMessageID": {
  17825. "type": "string",
  17826. "pattern": "^msg_"
  17827. },
  17828. "callID": {
  17829. "type": "string"
  17830. },
  17831. "name": {
  17832. "type": "string"
  17833. }
  17834. },
  17835. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  17836. "additionalProperties": false
  17837. }
  17838. },
  17839. "required": ["id", "type", "properties"],
  17840. "additionalProperties": false
  17841. },
  17842. {
  17843. "type": "object",
  17844. "properties": {
  17845. "id": {
  17846. "type": "string",
  17847. "pattern": "^evt_"
  17848. },
  17849. "type": {
  17850. "type": "string",
  17851. "enum": ["session.next.tool.input.delta"]
  17852. },
  17853. "properties": {
  17854. "type": "object",
  17855. "properties": {
  17856. "timestamp": {
  17857. "type": "number"
  17858. },
  17859. "sessionID": {
  17860. "type": "string",
  17861. "pattern": "^ses"
  17862. },
  17863. "assistantMessageID": {
  17864. "type": "string",
  17865. "pattern": "^msg_"
  17866. },
  17867. "callID": {
  17868. "type": "string"
  17869. },
  17870. "delta": {
  17871. "type": "string"
  17872. }
  17873. },
  17874. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  17875. "additionalProperties": false
  17876. }
  17877. },
  17878. "required": ["id", "type", "properties"],
  17879. "additionalProperties": false
  17880. },
  17881. {
  17882. "type": "object",
  17883. "properties": {
  17884. "id": {
  17885. "type": "string",
  17886. "pattern": "^evt_"
  17887. },
  17888. "type": {
  17889. "type": "string",
  17890. "enum": ["session.next.tool.input.ended"]
  17891. },
  17892. "properties": {
  17893. "type": "object",
  17894. "properties": {
  17895. "timestamp": {
  17896. "type": "number"
  17897. },
  17898. "sessionID": {
  17899. "type": "string",
  17900. "pattern": "^ses"
  17901. },
  17902. "assistantMessageID": {
  17903. "type": "string",
  17904. "pattern": "^msg_"
  17905. },
  17906. "callID": {
  17907. "type": "string"
  17908. },
  17909. "text": {
  17910. "type": "string"
  17911. }
  17912. },
  17913. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  17914. "additionalProperties": false
  17915. }
  17916. },
  17917. "required": ["id", "type", "properties"],
  17918. "additionalProperties": false
  17919. },
  17920. {
  17921. "type": "object",
  17922. "properties": {
  17923. "id": {
  17924. "type": "string",
  17925. "pattern": "^evt_"
  17926. },
  17927. "type": {
  17928. "type": "string",
  17929. "enum": ["session.next.tool.called"]
  17930. },
  17931. "properties": {
  17932. "type": "object",
  17933. "properties": {
  17934. "timestamp": {
  17935. "type": "number"
  17936. },
  17937. "sessionID": {
  17938. "type": "string",
  17939. "pattern": "^ses"
  17940. },
  17941. "assistantMessageID": {
  17942. "type": "string",
  17943. "pattern": "^msg_"
  17944. },
  17945. "callID": {
  17946. "type": "string"
  17947. },
  17948. "tool": {
  17949. "type": "string"
  17950. },
  17951. "input": {
  17952. "type": "object"
  17953. },
  17954. "provider": {
  17955. "type": "object",
  17956. "properties": {
  17957. "executed": {
  17958. "type": "boolean"
  17959. },
  17960. "metadata": {
  17961. "type": "object",
  17962. "additionalProperties": {
  17963. "type": "object"
  17964. }
  17965. }
  17966. },
  17967. "required": ["executed"],
  17968. "additionalProperties": false
  17969. }
  17970. },
  17971. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  17972. "additionalProperties": false
  17973. }
  17974. },
  17975. "required": ["id", "type", "properties"],
  17976. "additionalProperties": false
  17977. },
  17978. {
  17979. "type": "object",
  17980. "properties": {
  17981. "id": {
  17982. "type": "string",
  17983. "pattern": "^evt_"
  17984. },
  17985. "type": {
  17986. "type": "string",
  17987. "enum": ["session.next.tool.progress"]
  17988. },
  17989. "properties": {
  17990. "type": "object",
  17991. "properties": {
  17992. "timestamp": {
  17993. "type": "number"
  17994. },
  17995. "sessionID": {
  17996. "type": "string",
  17997. "pattern": "^ses"
  17998. },
  17999. "assistantMessageID": {
  18000. "type": "string",
  18001. "pattern": "^msg_"
  18002. },
  18003. "callID": {
  18004. "type": "string"
  18005. },
  18006. "structured": {
  18007. "type": "object"
  18008. },
  18009. "content": {
  18010. "type": "array",
  18011. "items": {
  18012. "anyOf": [
  18013. {
  18014. "$ref": "#/components/schemas/ToolTextContent"
  18015. },
  18016. {
  18017. "$ref": "#/components/schemas/ToolFileContent"
  18018. }
  18019. ]
  18020. }
  18021. }
  18022. },
  18023. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  18024. "additionalProperties": false
  18025. }
  18026. },
  18027. "required": ["id", "type", "properties"],
  18028. "additionalProperties": false
  18029. },
  18030. {
  18031. "type": "object",
  18032. "properties": {
  18033. "id": {
  18034. "type": "string",
  18035. "pattern": "^evt_"
  18036. },
  18037. "type": {
  18038. "type": "string",
  18039. "enum": ["session.next.tool.success"]
  18040. },
  18041. "properties": {
  18042. "type": "object",
  18043. "properties": {
  18044. "timestamp": {
  18045. "type": "number"
  18046. },
  18047. "sessionID": {
  18048. "type": "string",
  18049. "pattern": "^ses"
  18050. },
  18051. "assistantMessageID": {
  18052. "type": "string",
  18053. "pattern": "^msg_"
  18054. },
  18055. "callID": {
  18056. "type": "string"
  18057. },
  18058. "structured": {
  18059. "type": "object"
  18060. },
  18061. "content": {
  18062. "type": "array",
  18063. "items": {
  18064. "anyOf": [
  18065. {
  18066. "$ref": "#/components/schemas/ToolTextContent"
  18067. },
  18068. {
  18069. "$ref": "#/components/schemas/ToolFileContent"
  18070. }
  18071. ]
  18072. }
  18073. },
  18074. "outputPaths": {
  18075. "type": "array",
  18076. "items": {
  18077. "type": "string"
  18078. }
  18079. },
  18080. "result": {},
  18081. "provider": {
  18082. "type": "object",
  18083. "properties": {
  18084. "executed": {
  18085. "type": "boolean"
  18086. },
  18087. "metadata": {
  18088. "type": "object",
  18089. "additionalProperties": {
  18090. "type": "object"
  18091. }
  18092. }
  18093. },
  18094. "required": ["executed"],
  18095. "additionalProperties": false
  18096. }
  18097. },
  18098. "required": [
  18099. "timestamp",
  18100. "sessionID",
  18101. "assistantMessageID",
  18102. "callID",
  18103. "structured",
  18104. "content",
  18105. "provider"
  18106. ],
  18107. "additionalProperties": false
  18108. }
  18109. },
  18110. "required": ["id", "type", "properties"],
  18111. "additionalProperties": false
  18112. },
  18113. {
  18114. "type": "object",
  18115. "properties": {
  18116. "id": {
  18117. "type": "string",
  18118. "pattern": "^evt_"
  18119. },
  18120. "type": {
  18121. "type": "string",
  18122. "enum": ["session.next.tool.failed"]
  18123. },
  18124. "properties": {
  18125. "type": "object",
  18126. "properties": {
  18127. "timestamp": {
  18128. "type": "number"
  18129. },
  18130. "sessionID": {
  18131. "type": "string",
  18132. "pattern": "^ses"
  18133. },
  18134. "assistantMessageID": {
  18135. "type": "string",
  18136. "pattern": "^msg_"
  18137. },
  18138. "callID": {
  18139. "type": "string"
  18140. },
  18141. "error": {
  18142. "$ref": "#/components/schemas/SessionErrorUnknown"
  18143. },
  18144. "result": {},
  18145. "provider": {
  18146. "type": "object",
  18147. "properties": {
  18148. "executed": {
  18149. "type": "boolean"
  18150. },
  18151. "metadata": {
  18152. "type": "object",
  18153. "additionalProperties": {
  18154. "type": "object"
  18155. }
  18156. }
  18157. },
  18158. "required": ["executed"],
  18159. "additionalProperties": false
  18160. }
  18161. },
  18162. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  18163. "additionalProperties": false
  18164. }
  18165. },
  18166. "required": ["id", "type", "properties"],
  18167. "additionalProperties": false
  18168. },
  18169. {
  18170. "type": "object",
  18171. "properties": {
  18172. "id": {
  18173. "type": "string",
  18174. "pattern": "^evt_"
  18175. },
  18176. "type": {
  18177. "type": "string",
  18178. "enum": ["session.next.retried"]
  18179. },
  18180. "properties": {
  18181. "type": "object",
  18182. "properties": {
  18183. "timestamp": {
  18184. "type": "number"
  18185. },
  18186. "sessionID": {
  18187. "type": "string",
  18188. "pattern": "^ses"
  18189. },
  18190. "attempt": {
  18191. "type": "number"
  18192. },
  18193. "error": {
  18194. "$ref": "#/components/schemas/SessionNextRetry_error"
  18195. }
  18196. },
  18197. "required": ["timestamp", "sessionID", "attempt", "error"],
  18198. "additionalProperties": false
  18199. }
  18200. },
  18201. "required": ["id", "type", "properties"],
  18202. "additionalProperties": false
  18203. },
  18204. {
  18205. "type": "object",
  18206. "properties": {
  18207. "id": {
  18208. "type": "string",
  18209. "pattern": "^evt_"
  18210. },
  18211. "type": {
  18212. "type": "string",
  18213. "enum": ["session.next.compaction.started"]
  18214. },
  18215. "properties": {
  18216. "type": "object",
  18217. "properties": {
  18218. "timestamp": {
  18219. "type": "number"
  18220. },
  18221. "sessionID": {
  18222. "type": "string",
  18223. "pattern": "^ses"
  18224. },
  18225. "messageID": {
  18226. "type": "string",
  18227. "pattern": "^msg_"
  18228. },
  18229. "reason": {
  18230. "type": "string",
  18231. "enum": ["auto", "manual"]
  18232. }
  18233. },
  18234. "required": ["timestamp", "sessionID", "messageID", "reason"],
  18235. "additionalProperties": false
  18236. }
  18237. },
  18238. "required": ["id", "type", "properties"],
  18239. "additionalProperties": false
  18240. },
  18241. {
  18242. "type": "object",
  18243. "properties": {
  18244. "id": {
  18245. "type": "string",
  18246. "pattern": "^evt_"
  18247. },
  18248. "type": {
  18249. "type": "string",
  18250. "enum": ["session.next.compaction.delta"]
  18251. },
  18252. "properties": {
  18253. "type": "object",
  18254. "properties": {
  18255. "timestamp": {
  18256. "type": "number"
  18257. },
  18258. "sessionID": {
  18259. "type": "string",
  18260. "pattern": "^ses"
  18261. },
  18262. "messageID": {
  18263. "type": "string",
  18264. "pattern": "^msg_"
  18265. },
  18266. "text": {
  18267. "type": "string"
  18268. }
  18269. },
  18270. "required": ["timestamp", "sessionID", "messageID", "text"],
  18271. "additionalProperties": false
  18272. }
  18273. },
  18274. "required": ["id", "type", "properties"],
  18275. "additionalProperties": false
  18276. },
  18277. {
  18278. "type": "object",
  18279. "properties": {
  18280. "id": {
  18281. "type": "string",
  18282. "pattern": "^evt_"
  18283. },
  18284. "type": {
  18285. "type": "string",
  18286. "enum": ["session.next.compaction.ended"]
  18287. },
  18288. "properties": {
  18289. "type": "object",
  18290. "properties": {
  18291. "timestamp": {
  18292. "type": "number"
  18293. },
  18294. "sessionID": {
  18295. "type": "string",
  18296. "pattern": "^ses"
  18297. },
  18298. "messageID": {
  18299. "type": "string",
  18300. "pattern": "^msg_"
  18301. },
  18302. "reason": {
  18303. "type": "string",
  18304. "enum": ["auto", "manual"]
  18305. },
  18306. "text": {
  18307. "type": "string"
  18308. },
  18309. "recent": {
  18310. "type": "string"
  18311. }
  18312. },
  18313. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  18314. "additionalProperties": false
  18315. }
  18316. },
  18317. "required": ["id", "type", "properties"],
  18318. "additionalProperties": false
  18319. },
  18320. {
  18321. "type": "object",
  18322. "properties": {
  18323. "id": {
  18324. "type": "string",
  18325. "pattern": "^evt_"
  18326. },
  18327. "type": {
  18328. "type": "string",
  18329. "enum": ["message.part.delta"]
  18330. },
  18331. "properties": {
  18332. "type": "object",
  18333. "properties": {
  18334. "sessionID": {
  18335. "type": "string",
  18336. "pattern": "^ses"
  18337. },
  18338. "messageID": {
  18339. "type": "string",
  18340. "pattern": "^msg"
  18341. },
  18342. "partID": {
  18343. "type": "string",
  18344. "pattern": "^prt"
  18345. },
  18346. "field": {
  18347. "type": "string"
  18348. },
  18349. "delta": {
  18350. "type": "string"
  18351. }
  18352. },
  18353. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  18354. "additionalProperties": false
  18355. }
  18356. },
  18357. "required": ["id", "type", "properties"],
  18358. "additionalProperties": false
  18359. },
  18360. {
  18361. "type": "object",
  18362. "properties": {
  18363. "id": {
  18364. "type": "string",
  18365. "pattern": "^evt_"
  18366. },
  18367. "type": {
  18368. "type": "string",
  18369. "enum": ["session.diff"]
  18370. },
  18371. "properties": {
  18372. "type": "object",
  18373. "properties": {
  18374. "sessionID": {
  18375. "type": "string",
  18376. "pattern": "^ses"
  18377. },
  18378. "diff": {
  18379. "type": "array",
  18380. "items": {
  18381. "$ref": "#/components/schemas/SnapshotFileDiff"
  18382. }
  18383. }
  18384. },
  18385. "required": ["sessionID", "diff"],
  18386. "additionalProperties": false
  18387. }
  18388. },
  18389. "required": ["id", "type", "properties"],
  18390. "additionalProperties": false
  18391. },
  18392. {
  18393. "type": "object",
  18394. "properties": {
  18395. "id": {
  18396. "type": "string",
  18397. "pattern": "^evt_"
  18398. },
  18399. "type": {
  18400. "type": "string",
  18401. "enum": ["session.error"]
  18402. },
  18403. "properties": {
  18404. "type": "object",
  18405. "properties": {
  18406. "sessionID": {
  18407. "type": "string",
  18408. "pattern": "^ses"
  18409. },
  18410. "error": {
  18411. "anyOf": [
  18412. {
  18413. "$ref": "#/components/schemas/ProviderAuthError"
  18414. },
  18415. {
  18416. "$ref": "#/components/schemas/UnknownError"
  18417. },
  18418. {
  18419. "$ref": "#/components/schemas/MessageOutputLengthError"
  18420. },
  18421. {
  18422. "$ref": "#/components/schemas/MessageAbortedError"
  18423. },
  18424. {
  18425. "$ref": "#/components/schemas/StructuredOutputError"
  18426. },
  18427. {
  18428. "$ref": "#/components/schemas/ContextOverflowError"
  18429. },
  18430. {
  18431. "$ref": "#/components/schemas/ContentFilterError"
  18432. },
  18433. {
  18434. "$ref": "#/components/schemas/APIError"
  18435. }
  18436. ]
  18437. }
  18438. },
  18439. "additionalProperties": false
  18440. }
  18441. },
  18442. "required": ["id", "type", "properties"],
  18443. "additionalProperties": false
  18444. },
  18445. {
  18446. "type": "object",
  18447. "properties": {
  18448. "id": {
  18449. "type": "string",
  18450. "pattern": "^evt_"
  18451. },
  18452. "type": {
  18453. "type": "string",
  18454. "enum": ["installation.updated"]
  18455. },
  18456. "properties": {
  18457. "type": "object",
  18458. "properties": {
  18459. "version": {
  18460. "type": "string"
  18461. }
  18462. },
  18463. "required": ["version"],
  18464. "additionalProperties": false
  18465. }
  18466. },
  18467. "required": ["id", "type", "properties"],
  18468. "additionalProperties": false
  18469. },
  18470. {
  18471. "type": "object",
  18472. "properties": {
  18473. "id": {
  18474. "type": "string",
  18475. "pattern": "^evt_"
  18476. },
  18477. "type": {
  18478. "type": "string",
  18479. "enum": ["installation.update-available"]
  18480. },
  18481. "properties": {
  18482. "type": "object",
  18483. "properties": {
  18484. "version": {
  18485. "type": "string"
  18486. }
  18487. },
  18488. "required": ["version"],
  18489. "additionalProperties": false
  18490. }
  18491. },
  18492. "required": ["id", "type", "properties"],
  18493. "additionalProperties": false
  18494. },
  18495. {
  18496. "type": "object",
  18497. "properties": {
  18498. "id": {
  18499. "type": "string",
  18500. "pattern": "^evt_"
  18501. },
  18502. "type": {
  18503. "type": "string",
  18504. "enum": ["file.edited"]
  18505. },
  18506. "properties": {
  18507. "type": "object",
  18508. "properties": {
  18509. "file": {
  18510. "type": "string"
  18511. }
  18512. },
  18513. "required": ["file"],
  18514. "additionalProperties": false
  18515. }
  18516. },
  18517. "required": ["id", "type", "properties"],
  18518. "additionalProperties": false
  18519. },
  18520. {
  18521. "type": "object",
  18522. "properties": {
  18523. "id": {
  18524. "type": "string",
  18525. "pattern": "^evt_"
  18526. },
  18527. "type": {
  18528. "type": "string",
  18529. "enum": ["reference.updated"]
  18530. },
  18531. "properties": {
  18532. "type": "object",
  18533. "properties": {}
  18534. }
  18535. },
  18536. "required": ["id", "type", "properties"],
  18537. "additionalProperties": false
  18538. },
  18539. {
  18540. "type": "object",
  18541. "properties": {
  18542. "id": {
  18543. "type": "string",
  18544. "pattern": "^evt_"
  18545. },
  18546. "type": {
  18547. "type": "string",
  18548. "enum": ["permission.v2.asked"]
  18549. },
  18550. "properties": {
  18551. "type": "object",
  18552. "properties": {
  18553. "id": {
  18554. "type": "string",
  18555. "pattern": "^per"
  18556. },
  18557. "sessionID": {
  18558. "type": "string",
  18559. "pattern": "^ses"
  18560. },
  18561. "action": {
  18562. "type": "string"
  18563. },
  18564. "resources": {
  18565. "type": "array",
  18566. "items": {
  18567. "type": "string"
  18568. }
  18569. },
  18570. "save": {
  18571. "type": "array",
  18572. "items": {
  18573. "type": "string"
  18574. }
  18575. },
  18576. "metadata": {
  18577. "type": "object"
  18578. },
  18579. "source": {
  18580. "$ref": "#/components/schemas/PermissionV2Source"
  18581. }
  18582. },
  18583. "required": ["id", "sessionID", "action", "resources"],
  18584. "additionalProperties": false
  18585. }
  18586. },
  18587. "required": ["id", "type", "properties"],
  18588. "additionalProperties": false
  18589. },
  18590. {
  18591. "type": "object",
  18592. "properties": {
  18593. "id": {
  18594. "type": "string",
  18595. "pattern": "^evt_"
  18596. },
  18597. "type": {
  18598. "type": "string",
  18599. "enum": ["permission.v2.replied"]
  18600. },
  18601. "properties": {
  18602. "type": "object",
  18603. "properties": {
  18604. "sessionID": {
  18605. "type": "string",
  18606. "pattern": "^ses"
  18607. },
  18608. "requestID": {
  18609. "type": "string",
  18610. "pattern": "^per"
  18611. },
  18612. "reply": {
  18613. "$ref": "#/components/schemas/PermissionV2Reply"
  18614. }
  18615. },
  18616. "required": ["sessionID", "requestID", "reply"],
  18617. "additionalProperties": false
  18618. }
  18619. },
  18620. "required": ["id", "type", "properties"],
  18621. "additionalProperties": false
  18622. },
  18623. {
  18624. "type": "object",
  18625. "properties": {
  18626. "id": {
  18627. "type": "string",
  18628. "pattern": "^evt_"
  18629. },
  18630. "type": {
  18631. "type": "string",
  18632. "enum": ["plugin.added"]
  18633. },
  18634. "properties": {
  18635. "type": "object",
  18636. "properties": {
  18637. "id": {
  18638. "type": "string"
  18639. }
  18640. },
  18641. "required": ["id"],
  18642. "additionalProperties": false
  18643. }
  18644. },
  18645. "required": ["id", "type", "properties"],
  18646. "additionalProperties": false
  18647. },
  18648. {
  18649. "type": "object",
  18650. "properties": {
  18651. "id": {
  18652. "type": "string",
  18653. "pattern": "^evt_"
  18654. },
  18655. "type": {
  18656. "type": "string",
  18657. "enum": ["project.directories.updated"]
  18658. },
  18659. "properties": {
  18660. "type": "object",
  18661. "properties": {
  18662. "projectID": {
  18663. "type": "string"
  18664. }
  18665. },
  18666. "required": ["projectID"],
  18667. "additionalProperties": false
  18668. }
  18669. },
  18670. "required": ["id", "type", "properties"],
  18671. "additionalProperties": false
  18672. },
  18673. {
  18674. "type": "object",
  18675. "properties": {
  18676. "id": {
  18677. "type": "string",
  18678. "pattern": "^evt_"
  18679. },
  18680. "type": {
  18681. "type": "string",
  18682. "enum": ["file.watcher.updated"]
  18683. },
  18684. "properties": {
  18685. "type": "object",
  18686. "properties": {
  18687. "file": {
  18688. "type": "string"
  18689. },
  18690. "event": {
  18691. "type": "string",
  18692. "enum": ["add", "change", "unlink"]
  18693. }
  18694. },
  18695. "required": ["file", "event"],
  18696. "additionalProperties": false
  18697. }
  18698. },
  18699. "required": ["id", "type", "properties"],
  18700. "additionalProperties": false
  18701. },
  18702. {
  18703. "type": "object",
  18704. "properties": {
  18705. "id": {
  18706. "type": "string",
  18707. "pattern": "^evt_"
  18708. },
  18709. "type": {
  18710. "type": "string",
  18711. "enum": ["pty.created"]
  18712. },
  18713. "properties": {
  18714. "type": "object",
  18715. "properties": {
  18716. "info": {
  18717. "$ref": "#/components/schemas/Pty"
  18718. }
  18719. },
  18720. "required": ["info"],
  18721. "additionalProperties": false
  18722. }
  18723. },
  18724. "required": ["id", "type", "properties"],
  18725. "additionalProperties": false
  18726. },
  18727. {
  18728. "type": "object",
  18729. "properties": {
  18730. "id": {
  18731. "type": "string",
  18732. "pattern": "^evt_"
  18733. },
  18734. "type": {
  18735. "type": "string",
  18736. "enum": ["pty.updated"]
  18737. },
  18738. "properties": {
  18739. "type": "object",
  18740. "properties": {
  18741. "info": {
  18742. "$ref": "#/components/schemas/Pty"
  18743. }
  18744. },
  18745. "required": ["info"],
  18746. "additionalProperties": false
  18747. }
  18748. },
  18749. "required": ["id", "type", "properties"],
  18750. "additionalProperties": false
  18751. },
  18752. {
  18753. "type": "object",
  18754. "properties": {
  18755. "id": {
  18756. "type": "string",
  18757. "pattern": "^evt_"
  18758. },
  18759. "type": {
  18760. "type": "string",
  18761. "enum": ["pty.exited"]
  18762. },
  18763. "properties": {
  18764. "type": "object",
  18765. "properties": {
  18766. "id": {
  18767. "type": "string",
  18768. "pattern": "^pty"
  18769. },
  18770. "exitCode": {
  18771. "type": "integer",
  18772. "minimum": 0
  18773. }
  18774. },
  18775. "required": ["id", "exitCode"],
  18776. "additionalProperties": false
  18777. }
  18778. },
  18779. "required": ["id", "type", "properties"],
  18780. "additionalProperties": false
  18781. },
  18782. {
  18783. "type": "object",
  18784. "properties": {
  18785. "id": {
  18786. "type": "string",
  18787. "pattern": "^evt_"
  18788. },
  18789. "type": {
  18790. "type": "string",
  18791. "enum": ["pty.deleted"]
  18792. },
  18793. "properties": {
  18794. "type": "object",
  18795. "properties": {
  18796. "id": {
  18797. "type": "string",
  18798. "pattern": "^pty"
  18799. }
  18800. },
  18801. "required": ["id"],
  18802. "additionalProperties": false
  18803. }
  18804. },
  18805. "required": ["id", "type", "properties"],
  18806. "additionalProperties": false
  18807. },
  18808. {
  18809. "type": "object",
  18810. "properties": {
  18811. "id": {
  18812. "type": "string",
  18813. "pattern": "^evt_"
  18814. },
  18815. "type": {
  18816. "type": "string",
  18817. "enum": ["question.v2.asked"]
  18818. },
  18819. "properties": {
  18820. "type": "object",
  18821. "properties": {
  18822. "id": {
  18823. "type": "string",
  18824. "pattern": "^que"
  18825. },
  18826. "sessionID": {
  18827. "type": "string",
  18828. "pattern": "^ses"
  18829. },
  18830. "questions": {
  18831. "type": "array",
  18832. "items": {
  18833. "$ref": "#/components/schemas/QuestionV2Info"
  18834. },
  18835. "description": "Questions to ask"
  18836. },
  18837. "tool": {
  18838. "$ref": "#/components/schemas/QuestionV2Tool"
  18839. }
  18840. },
  18841. "required": ["id", "sessionID", "questions"],
  18842. "additionalProperties": false
  18843. }
  18844. },
  18845. "required": ["id", "type", "properties"],
  18846. "additionalProperties": false
  18847. },
  18848. {
  18849. "type": "object",
  18850. "properties": {
  18851. "id": {
  18852. "type": "string",
  18853. "pattern": "^evt_"
  18854. },
  18855. "type": {
  18856. "type": "string",
  18857. "enum": ["question.v2.replied"]
  18858. },
  18859. "properties": {
  18860. "type": "object",
  18861. "properties": {
  18862. "sessionID": {
  18863. "type": "string",
  18864. "pattern": "^ses"
  18865. },
  18866. "requestID": {
  18867. "type": "string",
  18868. "pattern": "^que"
  18869. },
  18870. "answers": {
  18871. "type": "array",
  18872. "items": {
  18873. "$ref": "#/components/schemas/QuestionV2Answer"
  18874. }
  18875. }
  18876. },
  18877. "required": ["sessionID", "requestID", "answers"],
  18878. "additionalProperties": false
  18879. }
  18880. },
  18881. "required": ["id", "type", "properties"],
  18882. "additionalProperties": false
  18883. },
  18884. {
  18885. "type": "object",
  18886. "properties": {
  18887. "id": {
  18888. "type": "string",
  18889. "pattern": "^evt_"
  18890. },
  18891. "type": {
  18892. "type": "string",
  18893. "enum": ["question.v2.rejected"]
  18894. },
  18895. "properties": {
  18896. "type": "object",
  18897. "properties": {
  18898. "sessionID": {
  18899. "type": "string",
  18900. "pattern": "^ses"
  18901. },
  18902. "requestID": {
  18903. "type": "string",
  18904. "pattern": "^que"
  18905. }
  18906. },
  18907. "required": ["sessionID", "requestID"],
  18908. "additionalProperties": false
  18909. }
  18910. },
  18911. "required": ["id", "type", "properties"],
  18912. "additionalProperties": false
  18913. },
  18914. {
  18915. "type": "object",
  18916. "properties": {
  18917. "id": {
  18918. "type": "string",
  18919. "pattern": "^evt_"
  18920. },
  18921. "type": {
  18922. "type": "string",
  18923. "enum": ["todo.updated"]
  18924. },
  18925. "properties": {
  18926. "type": "object",
  18927. "properties": {
  18928. "sessionID": {
  18929. "type": "string",
  18930. "pattern": "^ses"
  18931. },
  18932. "todos": {
  18933. "type": "array",
  18934. "items": {
  18935. "$ref": "#/components/schemas/Todo"
  18936. }
  18937. }
  18938. },
  18939. "required": ["sessionID", "todos"],
  18940. "additionalProperties": false
  18941. }
  18942. },
  18943. "required": ["id", "type", "properties"],
  18944. "additionalProperties": false
  18945. },
  18946. {
  18947. "type": "object",
  18948. "properties": {
  18949. "id": {
  18950. "type": "string",
  18951. "pattern": "^evt_"
  18952. },
  18953. "type": {
  18954. "type": "string",
  18955. "enum": ["lsp.updated"]
  18956. },
  18957. "properties": {
  18958. "type": "object",
  18959. "properties": {}
  18960. }
  18961. },
  18962. "required": ["id", "type", "properties"],
  18963. "additionalProperties": false
  18964. },
  18965. {
  18966. "type": "object",
  18967. "properties": {
  18968. "id": {
  18969. "type": "string",
  18970. "pattern": "^evt_"
  18971. },
  18972. "type": {
  18973. "type": "string",
  18974. "enum": ["permission.asked"]
  18975. },
  18976. "properties": {
  18977. "type": "object",
  18978. "properties": {
  18979. "id": {
  18980. "type": "string",
  18981. "pattern": "^per"
  18982. },
  18983. "sessionID": {
  18984. "type": "string",
  18985. "pattern": "^ses"
  18986. },
  18987. "permission": {
  18988. "type": "string"
  18989. },
  18990. "patterns": {
  18991. "type": "array",
  18992. "items": {
  18993. "type": "string"
  18994. }
  18995. },
  18996. "metadata": {
  18997. "type": "object"
  18998. },
  18999. "always": {
  19000. "type": "array",
  19001. "items": {
  19002. "type": "string"
  19003. }
  19004. },
  19005. "tool": {
  19006. "type": "object",
  19007. "properties": {
  19008. "messageID": {
  19009. "type": "string"
  19010. },
  19011. "callID": {
  19012. "type": "string"
  19013. }
  19014. },
  19015. "required": ["messageID", "callID"],
  19016. "additionalProperties": false
  19017. }
  19018. },
  19019. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  19020. "additionalProperties": false
  19021. }
  19022. },
  19023. "required": ["id", "type", "properties"],
  19024. "additionalProperties": false
  19025. },
  19026. {
  19027. "type": "object",
  19028. "properties": {
  19029. "id": {
  19030. "type": "string",
  19031. "pattern": "^evt_"
  19032. },
  19033. "type": {
  19034. "type": "string",
  19035. "enum": ["permission.replied"]
  19036. },
  19037. "properties": {
  19038. "type": "object",
  19039. "properties": {
  19040. "sessionID": {
  19041. "type": "string",
  19042. "pattern": "^ses"
  19043. },
  19044. "requestID": {
  19045. "type": "string",
  19046. "pattern": "^per"
  19047. },
  19048. "reply": {
  19049. "type": "string",
  19050. "enum": ["once", "always", "reject"]
  19051. }
  19052. },
  19053. "required": ["sessionID", "requestID", "reply"],
  19054. "additionalProperties": false
  19055. }
  19056. },
  19057. "required": ["id", "type", "properties"],
  19058. "additionalProperties": false
  19059. },
  19060. {
  19061. "type": "object",
  19062. "properties": {
  19063. "id": {
  19064. "type": "string",
  19065. "pattern": "^evt_"
  19066. },
  19067. "type": {
  19068. "type": "string",
  19069. "enum": ["tui.prompt.append"]
  19070. },
  19071. "properties": {
  19072. "type": "object",
  19073. "properties": {
  19074. "text": {
  19075. "type": "string"
  19076. }
  19077. },
  19078. "required": ["text"],
  19079. "additionalProperties": false
  19080. }
  19081. },
  19082. "required": ["id", "type", "properties"],
  19083. "additionalProperties": false
  19084. },
  19085. {
  19086. "type": "object",
  19087. "properties": {
  19088. "id": {
  19089. "type": "string",
  19090. "pattern": "^evt_"
  19091. },
  19092. "type": {
  19093. "type": "string",
  19094. "enum": ["tui.command.execute"]
  19095. },
  19096. "properties": {
  19097. "type": "object",
  19098. "properties": {
  19099. "command": {
  19100. "anyOf": [
  19101. {
  19102. "type": "string",
  19103. "enum": [
  19104. "session.list",
  19105. "session.new",
  19106. "session.share",
  19107. "session.interrupt",
  19108. "session.compact",
  19109. "session.page.up",
  19110. "session.page.down",
  19111. "session.line.up",
  19112. "session.line.down",
  19113. "session.half.page.up",
  19114. "session.half.page.down",
  19115. "session.first",
  19116. "session.last",
  19117. "prompt.clear",
  19118. "prompt.submit",
  19119. "agent.cycle"
  19120. ]
  19121. },
  19122. {
  19123. "type": "string"
  19124. }
  19125. ]
  19126. }
  19127. },
  19128. "required": ["command"],
  19129. "additionalProperties": false
  19130. }
  19131. },
  19132. "required": ["id", "type", "properties"],
  19133. "additionalProperties": false
  19134. },
  19135. {
  19136. "type": "object",
  19137. "properties": {
  19138. "id": {
  19139. "type": "string",
  19140. "pattern": "^evt_"
  19141. },
  19142. "type": {
  19143. "type": "string",
  19144. "enum": ["tui.toast.show"]
  19145. },
  19146. "properties": {
  19147. "type": "object",
  19148. "properties": {
  19149. "title": {
  19150. "type": "string"
  19151. },
  19152. "message": {
  19153. "type": "string"
  19154. },
  19155. "variant": {
  19156. "type": "string",
  19157. "enum": ["info", "success", "warning", "error"]
  19158. },
  19159. "duration": {
  19160. "type": "integer",
  19161. "exclusiveMinimum": 0
  19162. }
  19163. },
  19164. "required": ["message", "variant"],
  19165. "additionalProperties": false
  19166. }
  19167. },
  19168. "required": ["id", "type", "properties"],
  19169. "additionalProperties": false
  19170. },
  19171. {
  19172. "type": "object",
  19173. "properties": {
  19174. "id": {
  19175. "type": "string",
  19176. "pattern": "^evt_"
  19177. },
  19178. "type": {
  19179. "type": "string",
  19180. "enum": ["tui.session.select"]
  19181. },
  19182. "properties": {
  19183. "type": "object",
  19184. "properties": {
  19185. "sessionID": {
  19186. "type": "string",
  19187. "pattern": "^ses",
  19188. "description": "Session ID to navigate to"
  19189. }
  19190. },
  19191. "required": ["sessionID"],
  19192. "additionalProperties": false
  19193. }
  19194. },
  19195. "required": ["id", "type", "properties"],
  19196. "additionalProperties": false
  19197. },
  19198. {
  19199. "type": "object",
  19200. "properties": {
  19201. "id": {
  19202. "type": "string",
  19203. "pattern": "^evt_"
  19204. },
  19205. "type": {
  19206. "type": "string",
  19207. "enum": ["mcp.tools.changed"]
  19208. },
  19209. "properties": {
  19210. "type": "object",
  19211. "properties": {
  19212. "server": {
  19213. "type": "string"
  19214. }
  19215. },
  19216. "required": ["server"],
  19217. "additionalProperties": false
  19218. }
  19219. },
  19220. "required": ["id", "type", "properties"],
  19221. "additionalProperties": false
  19222. },
  19223. {
  19224. "type": "object",
  19225. "properties": {
  19226. "id": {
  19227. "type": "string",
  19228. "pattern": "^evt_"
  19229. },
  19230. "type": {
  19231. "type": "string",
  19232. "enum": ["mcp.browser.open.failed"]
  19233. },
  19234. "properties": {
  19235. "type": "object",
  19236. "properties": {
  19237. "mcpName": {
  19238. "type": "string"
  19239. },
  19240. "url": {
  19241. "type": "string"
  19242. }
  19243. },
  19244. "required": ["mcpName", "url"],
  19245. "additionalProperties": false
  19246. }
  19247. },
  19248. "required": ["id", "type", "properties"],
  19249. "additionalProperties": false
  19250. },
  19251. {
  19252. "type": "object",
  19253. "properties": {
  19254. "id": {
  19255. "type": "string",
  19256. "pattern": "^evt_"
  19257. },
  19258. "type": {
  19259. "type": "string",
  19260. "enum": ["command.executed"]
  19261. },
  19262. "properties": {
  19263. "type": "object",
  19264. "properties": {
  19265. "name": {
  19266. "type": "string"
  19267. },
  19268. "sessionID": {
  19269. "type": "string",
  19270. "pattern": "^ses"
  19271. },
  19272. "arguments": {
  19273. "type": "string"
  19274. },
  19275. "messageID": {
  19276. "type": "string",
  19277. "pattern": "^msg"
  19278. }
  19279. },
  19280. "required": ["name", "sessionID", "arguments", "messageID"],
  19281. "additionalProperties": false
  19282. }
  19283. },
  19284. "required": ["id", "type", "properties"],
  19285. "additionalProperties": false
  19286. },
  19287. {
  19288. "type": "object",
  19289. "properties": {
  19290. "id": {
  19291. "type": "string",
  19292. "pattern": "^evt_"
  19293. },
  19294. "type": {
  19295. "type": "string",
  19296. "enum": ["project.updated"]
  19297. },
  19298. "properties": {
  19299. "type": "object",
  19300. "properties": {
  19301. "id": {
  19302. "type": "string"
  19303. },
  19304. "worktree": {
  19305. "type": "string"
  19306. },
  19307. "vcs": {
  19308. "type": "string",
  19309. "enum": ["git"]
  19310. },
  19311. "name": {
  19312. "type": "string"
  19313. },
  19314. "icon": {
  19315. "type": "object",
  19316. "properties": {
  19317. "url": {
  19318. "type": "string"
  19319. },
  19320. "override": {
  19321. "type": "string"
  19322. },
  19323. "color": {
  19324. "type": "string"
  19325. }
  19326. },
  19327. "additionalProperties": false
  19328. },
  19329. "commands": {
  19330. "type": "object",
  19331. "properties": {
  19332. "start": {
  19333. "type": "string",
  19334. "description": "Startup script to run when creating a new workspace (worktree)"
  19335. }
  19336. },
  19337. "additionalProperties": false
  19338. },
  19339. "time": {
  19340. "type": "object",
  19341. "properties": {
  19342. "created": {
  19343. "type": "integer",
  19344. "minimum": 0
  19345. },
  19346. "updated": {
  19347. "type": "integer",
  19348. "minimum": 0
  19349. },
  19350. "initialized": {
  19351. "type": "integer",
  19352. "minimum": 0
  19353. }
  19354. },
  19355. "required": ["created", "updated"],
  19356. "additionalProperties": false
  19357. },
  19358. "sandboxes": {
  19359. "type": "array",
  19360. "items": {
  19361. "type": "string"
  19362. }
  19363. }
  19364. },
  19365. "required": ["id", "worktree", "time", "sandboxes"],
  19366. "additionalProperties": false
  19367. }
  19368. },
  19369. "required": ["id", "type", "properties"],
  19370. "additionalProperties": false
  19371. },
  19372. {
  19373. "type": "object",
  19374. "properties": {
  19375. "id": {
  19376. "type": "string",
  19377. "pattern": "^evt_"
  19378. },
  19379. "type": {
  19380. "type": "string",
  19381. "enum": ["session.status"]
  19382. },
  19383. "properties": {
  19384. "type": "object",
  19385. "properties": {
  19386. "sessionID": {
  19387. "type": "string",
  19388. "pattern": "^ses"
  19389. },
  19390. "status": {
  19391. "$ref": "#/components/schemas/SessionStatus"
  19392. }
  19393. },
  19394. "required": ["sessionID", "status"],
  19395. "additionalProperties": false
  19396. }
  19397. },
  19398. "required": ["id", "type", "properties"],
  19399. "additionalProperties": false
  19400. },
  19401. {
  19402. "type": "object",
  19403. "properties": {
  19404. "id": {
  19405. "type": "string",
  19406. "pattern": "^evt_"
  19407. },
  19408. "type": {
  19409. "type": "string",
  19410. "enum": ["session.idle"]
  19411. },
  19412. "properties": {
  19413. "type": "object",
  19414. "properties": {
  19415. "sessionID": {
  19416. "type": "string",
  19417. "pattern": "^ses"
  19418. }
  19419. },
  19420. "required": ["sessionID"],
  19421. "additionalProperties": false
  19422. }
  19423. },
  19424. "required": ["id", "type", "properties"],
  19425. "additionalProperties": false
  19426. },
  19427. {
  19428. "type": "object",
  19429. "properties": {
  19430. "id": {
  19431. "type": "string",
  19432. "pattern": "^evt_"
  19433. },
  19434. "type": {
  19435. "type": "string",
  19436. "enum": ["question.asked"]
  19437. },
  19438. "properties": {
  19439. "type": "object",
  19440. "properties": {
  19441. "id": {
  19442. "type": "string",
  19443. "pattern": "^que"
  19444. },
  19445. "sessionID": {
  19446. "type": "string",
  19447. "pattern": "^ses"
  19448. },
  19449. "questions": {
  19450. "type": "array",
  19451. "items": {
  19452. "$ref": "#/components/schemas/QuestionInfo"
  19453. },
  19454. "description": "Questions to ask"
  19455. },
  19456. "tool": {
  19457. "$ref": "#/components/schemas/QuestionTool"
  19458. }
  19459. },
  19460. "required": ["id", "sessionID", "questions"],
  19461. "additionalProperties": false
  19462. }
  19463. },
  19464. "required": ["id", "type", "properties"],
  19465. "additionalProperties": false
  19466. },
  19467. {
  19468. "type": "object",
  19469. "properties": {
  19470. "id": {
  19471. "type": "string",
  19472. "pattern": "^evt_"
  19473. },
  19474. "type": {
  19475. "type": "string",
  19476. "enum": ["question.replied"]
  19477. },
  19478. "properties": {
  19479. "type": "object",
  19480. "properties": {
  19481. "sessionID": {
  19482. "type": "string",
  19483. "pattern": "^ses"
  19484. },
  19485. "requestID": {
  19486. "type": "string",
  19487. "pattern": "^que"
  19488. },
  19489. "answers": {
  19490. "type": "array",
  19491. "items": {
  19492. "$ref": "#/components/schemas/QuestionAnswer"
  19493. }
  19494. }
  19495. },
  19496. "required": ["sessionID", "requestID", "answers"],
  19497. "additionalProperties": false
  19498. }
  19499. },
  19500. "required": ["id", "type", "properties"],
  19501. "additionalProperties": false
  19502. },
  19503. {
  19504. "type": "object",
  19505. "properties": {
  19506. "id": {
  19507. "type": "string",
  19508. "pattern": "^evt_"
  19509. },
  19510. "type": {
  19511. "type": "string",
  19512. "enum": ["question.rejected"]
  19513. },
  19514. "properties": {
  19515. "type": "object",
  19516. "properties": {
  19517. "sessionID": {
  19518. "type": "string",
  19519. "pattern": "^ses"
  19520. },
  19521. "requestID": {
  19522. "type": "string",
  19523. "pattern": "^que"
  19524. }
  19525. },
  19526. "required": ["sessionID", "requestID"],
  19527. "additionalProperties": false
  19528. }
  19529. },
  19530. "required": ["id", "type", "properties"],
  19531. "additionalProperties": false
  19532. },
  19533. {
  19534. "type": "object",
  19535. "properties": {
  19536. "id": {
  19537. "type": "string",
  19538. "pattern": "^evt_"
  19539. },
  19540. "type": {
  19541. "type": "string",
  19542. "enum": ["session.compacted"]
  19543. },
  19544. "properties": {
  19545. "type": "object",
  19546. "properties": {
  19547. "sessionID": {
  19548. "type": "string",
  19549. "pattern": "^ses"
  19550. }
  19551. },
  19552. "required": ["sessionID"],
  19553. "additionalProperties": false
  19554. }
  19555. },
  19556. "required": ["id", "type", "properties"],
  19557. "additionalProperties": false
  19558. },
  19559. {
  19560. "type": "object",
  19561. "properties": {
  19562. "id": {
  19563. "type": "string",
  19564. "pattern": "^evt_"
  19565. },
  19566. "type": {
  19567. "type": "string",
  19568. "enum": ["vcs.branch.updated"]
  19569. },
  19570. "properties": {
  19571. "type": "object",
  19572. "properties": {
  19573. "branch": {
  19574. "type": "string"
  19575. }
  19576. },
  19577. "additionalProperties": false
  19578. }
  19579. },
  19580. "required": ["id", "type", "properties"],
  19581. "additionalProperties": false
  19582. },
  19583. {
  19584. "type": "object",
  19585. "properties": {
  19586. "id": {
  19587. "type": "string",
  19588. "pattern": "^evt_"
  19589. },
  19590. "type": {
  19591. "type": "string",
  19592. "enum": ["workspace.ready"]
  19593. },
  19594. "properties": {
  19595. "type": "object",
  19596. "properties": {
  19597. "name": {
  19598. "type": "string"
  19599. }
  19600. },
  19601. "required": ["name"],
  19602. "additionalProperties": false
  19603. }
  19604. },
  19605. "required": ["id", "type", "properties"],
  19606. "additionalProperties": false
  19607. },
  19608. {
  19609. "type": "object",
  19610. "properties": {
  19611. "id": {
  19612. "type": "string",
  19613. "pattern": "^evt_"
  19614. },
  19615. "type": {
  19616. "type": "string",
  19617. "enum": ["workspace.failed"]
  19618. },
  19619. "properties": {
  19620. "type": "object",
  19621. "properties": {
  19622. "message": {
  19623. "type": "string"
  19624. }
  19625. },
  19626. "required": ["message"],
  19627. "additionalProperties": false
  19628. }
  19629. },
  19630. "required": ["id", "type", "properties"],
  19631. "additionalProperties": false
  19632. },
  19633. {
  19634. "type": "object",
  19635. "properties": {
  19636. "id": {
  19637. "type": "string",
  19638. "pattern": "^evt_"
  19639. },
  19640. "type": {
  19641. "type": "string",
  19642. "enum": ["workspace.status"]
  19643. },
  19644. "properties": {
  19645. "type": "object",
  19646. "properties": {
  19647. "workspaceID": {
  19648. "type": "string",
  19649. "pattern": "^wrk"
  19650. },
  19651. "status": {
  19652. "type": "string",
  19653. "enum": ["connected", "connecting", "disconnected", "error"]
  19654. }
  19655. },
  19656. "required": ["workspaceID", "status"],
  19657. "additionalProperties": false
  19658. }
  19659. },
  19660. "required": ["id", "type", "properties"],
  19661. "additionalProperties": false
  19662. },
  19663. {
  19664. "type": "object",
  19665. "properties": {
  19666. "id": {
  19667. "type": "string",
  19668. "pattern": "^evt_"
  19669. },
  19670. "type": {
  19671. "type": "string",
  19672. "enum": ["worktree.ready"]
  19673. },
  19674. "properties": {
  19675. "type": "object",
  19676. "properties": {
  19677. "name": {
  19678. "type": "string"
  19679. },
  19680. "branch": {
  19681. "type": "string"
  19682. }
  19683. },
  19684. "required": ["name"],
  19685. "additionalProperties": false
  19686. }
  19687. },
  19688. "required": ["id", "type", "properties"],
  19689. "additionalProperties": false
  19690. },
  19691. {
  19692. "type": "object",
  19693. "properties": {
  19694. "id": {
  19695. "type": "string",
  19696. "pattern": "^evt_"
  19697. },
  19698. "type": {
  19699. "type": "string",
  19700. "enum": ["worktree.failed"]
  19701. },
  19702. "properties": {
  19703. "type": "object",
  19704. "properties": {
  19705. "message": {
  19706. "type": "string"
  19707. }
  19708. },
  19709. "required": ["message"],
  19710. "additionalProperties": false
  19711. }
  19712. },
  19713. "required": ["id", "type", "properties"],
  19714. "additionalProperties": false
  19715. },
  19716. {
  19717. "type": "object",
  19718. "properties": {
  19719. "id": {
  19720. "type": "string",
  19721. "pattern": "^evt_"
  19722. },
  19723. "type": {
  19724. "type": "string",
  19725. "enum": ["server.connected"]
  19726. },
  19727. "properties": {
  19728. "type": "object",
  19729. "properties": {}
  19730. }
  19731. },
  19732. "required": ["id", "type", "properties"],
  19733. "additionalProperties": false
  19734. },
  19735. {
  19736. "type": "object",
  19737. "properties": {
  19738. "id": {
  19739. "type": "string",
  19740. "pattern": "^evt_"
  19741. },
  19742. "type": {
  19743. "type": "string",
  19744. "enum": ["global.disposed"]
  19745. },
  19746. "properties": {
  19747. "type": "object",
  19748. "properties": {}
  19749. }
  19750. },
  19751. "required": ["id", "type", "properties"],
  19752. "additionalProperties": false
  19753. },
  19754. {
  19755. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  19756. },
  19757. {
  19758. "$ref": "#/components/schemas/SyncEventSessionCreated"
  19759. },
  19760. {
  19761. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  19762. },
  19763. {
  19764. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  19765. },
  19766. {
  19767. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  19768. },
  19769. {
  19770. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  19771. },
  19772. {
  19773. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  19774. },
  19775. {
  19776. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  19777. },
  19778. {
  19779. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  19780. },
  19781. {
  19782. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  19783. },
  19784. {
  19785. "$ref": "#/components/schemas/SyncEventSessionNextMoved"
  19786. },
  19787. {
  19788. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  19789. },
  19790. {
  19791. "$ref": "#/components/schemas/SyncEventSessionNextPromptAdmitted"
  19792. },
  19793. {
  19794. "$ref": "#/components/schemas/SyncEventSessionNextContextUpdated"
  19795. },
  19796. {
  19797. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  19798. },
  19799. {
  19800. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  19801. },
  19802. {
  19803. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  19804. },
  19805. {
  19806. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  19807. },
  19808. {
  19809. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  19810. },
  19811. {
  19812. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  19813. },
  19814. {
  19815. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  19816. },
  19817. {
  19818. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  19819. },
  19820. {
  19821. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  19822. },
  19823. {
  19824. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  19825. },
  19826. {
  19827. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  19828. },
  19829. {
  19830. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  19831. },
  19832. {
  19833. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  19834. },
  19835. {
  19836. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  19837. },
  19838. {
  19839. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  19840. },
  19841. {
  19842. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  19843. },
  19844. {
  19845. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  19846. },
  19847. {
  19848. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  19849. },
  19850. {
  19851. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  19852. }
  19853. ]
  19854. }
  19855. },
  19856. "required": ["directory", "payload"],
  19857. "additionalProperties": false
  19858. },
  19859. "LogLevel": {
  19860. "type": "string",
  19861. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  19862. "description": "Log level"
  19863. },
  19864. "ServerConfig": {
  19865. "type": "object",
  19866. "properties": {
  19867. "port": {
  19868. "type": "integer",
  19869. "exclusiveMinimum": 0
  19870. },
  19871. "hostname": {
  19872. "type": "string"
  19873. },
  19874. "mdns": {
  19875. "type": "boolean"
  19876. },
  19877. "mdnsDomain": {
  19878. "type": "string"
  19879. },
  19880. "cors": {
  19881. "type": "array",
  19882. "items": {
  19883. "type": "string"
  19884. }
  19885. }
  19886. },
  19887. "additionalProperties": false,
  19888. "description": "Server configuration for opencode serve and web commands"
  19889. },
  19890. "PermissionActionConfig": {
  19891. "type": "string",
  19892. "enum": ["ask", "allow", "deny"]
  19893. },
  19894. "PermissionObjectConfig": {
  19895. "type": "object",
  19896. "additionalProperties": {
  19897. "$ref": "#/components/schemas/PermissionActionConfig"
  19898. }
  19899. },
  19900. "PermissionRuleConfig": {
  19901. "anyOf": [
  19902. {
  19903. "$ref": "#/components/schemas/PermissionActionConfig"
  19904. },
  19905. {
  19906. "$ref": "#/components/schemas/PermissionObjectConfig"
  19907. }
  19908. ]
  19909. },
  19910. "PermissionConfig": {
  19911. "anyOf": [
  19912. {
  19913. "$ref": "#/components/schemas/PermissionActionConfig"
  19914. },
  19915. {
  19916. "type": "object",
  19917. "properties": {
  19918. "read": {
  19919. "$ref": "#/components/schemas/PermissionRuleConfig"
  19920. },
  19921. "edit": {
  19922. "$ref": "#/components/schemas/PermissionRuleConfig"
  19923. },
  19924. "glob": {
  19925. "$ref": "#/components/schemas/PermissionRuleConfig"
  19926. },
  19927. "grep": {
  19928. "$ref": "#/components/schemas/PermissionRuleConfig"
  19929. },
  19930. "list": {
  19931. "$ref": "#/components/schemas/PermissionRuleConfig"
  19932. },
  19933. "bash": {
  19934. "$ref": "#/components/schemas/PermissionRuleConfig"
  19935. },
  19936. "task": {
  19937. "$ref": "#/components/schemas/PermissionRuleConfig"
  19938. },
  19939. "external_directory": {
  19940. "$ref": "#/components/schemas/PermissionRuleConfig"
  19941. },
  19942. "todowrite": {
  19943. "$ref": "#/components/schemas/PermissionActionConfig"
  19944. },
  19945. "question": {
  19946. "$ref": "#/components/schemas/PermissionActionConfig"
  19947. },
  19948. "webfetch": {
  19949. "$ref": "#/components/schemas/PermissionActionConfig"
  19950. },
  19951. "websearch": {
  19952. "$ref": "#/components/schemas/PermissionActionConfig"
  19953. },
  19954. "lsp": {
  19955. "$ref": "#/components/schemas/PermissionRuleConfig"
  19956. },
  19957. "doom_loop": {
  19958. "$ref": "#/components/schemas/PermissionActionConfig"
  19959. },
  19960. "skill": {
  19961. "$ref": "#/components/schemas/PermissionRuleConfig"
  19962. }
  19963. },
  19964. "additionalProperties": {
  19965. "$ref": "#/components/schemas/PermissionRuleConfig"
  19966. }
  19967. }
  19968. ]
  19969. },
  19970. "AgentConfig": {
  19971. "type": "object",
  19972. "properties": {
  19973. "model": {
  19974. "type": "string"
  19975. },
  19976. "variant": {
  19977. "type": "string"
  19978. },
  19979. "temperature": {
  19980. "type": "number"
  19981. },
  19982. "top_p": {
  19983. "type": "number"
  19984. },
  19985. "prompt": {
  19986. "type": "string"
  19987. },
  19988. "tools": {
  19989. "type": "object",
  19990. "additionalProperties": {
  19991. "type": "boolean"
  19992. }
  19993. },
  19994. "disable": {
  19995. "type": "boolean"
  19996. },
  19997. "description": {
  19998. "type": "string"
  19999. },
  20000. "mode": {
  20001. "type": "string",
  20002. "enum": ["subagent", "primary", "all"]
  20003. },
  20004. "hidden": {
  20005. "type": "boolean"
  20006. },
  20007. "options": {
  20008. "type": "object"
  20009. },
  20010. "color": {
  20011. "anyOf": [
  20012. {
  20013. "type": "string",
  20014. "pattern": "^#[0-9a-fA-F]{6}$"
  20015. },
  20016. {
  20017. "type": "string",
  20018. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  20019. }
  20020. ],
  20021. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  20022. },
  20023. "steps": {
  20024. "type": "integer",
  20025. "exclusiveMinimum": 0
  20026. },
  20027. "maxSteps": {
  20028. "type": "integer",
  20029. "exclusiveMinimum": 0
  20030. },
  20031. "permission": {
  20032. "$ref": "#/components/schemas/PermissionConfig"
  20033. }
  20034. },
  20035. "additionalProperties": {}
  20036. },
  20037. "ProviderConfig": {
  20038. "type": "object",
  20039. "properties": {
  20040. "api": {
  20041. "type": "string"
  20042. },
  20043. "name": {
  20044. "type": "string"
  20045. },
  20046. "env": {
  20047. "type": "array",
  20048. "items": {
  20049. "type": "string"
  20050. }
  20051. },
  20052. "id": {
  20053. "type": "string"
  20054. },
  20055. "npm": {
  20056. "type": "string"
  20057. },
  20058. "whitelist": {
  20059. "type": "array",
  20060. "items": {
  20061. "type": "string"
  20062. }
  20063. },
  20064. "blacklist": {
  20065. "type": "array",
  20066. "items": {
  20067. "type": "string"
  20068. }
  20069. },
  20070. "options": {
  20071. "type": "object",
  20072. "properties": {
  20073. "apiKey": {
  20074. "type": "string"
  20075. },
  20076. "baseURL": {
  20077. "type": "string"
  20078. },
  20079. "enterpriseUrl": {
  20080. "type": "string"
  20081. },
  20082. "setCacheKey": {
  20083. "type": "boolean"
  20084. },
  20085. "timeout": {
  20086. "anyOf": [
  20087. {
  20088. "type": "integer",
  20089. "exclusiveMinimum": 0
  20090. },
  20091. {
  20092. "type": "boolean",
  20093. "enum": [false]
  20094. }
  20095. ],
  20096. "description": "Timeout in milliseconds for full requests to this provider. Set to false to disable timeout."
  20097. },
  20098. "headerTimeout": {
  20099. "anyOf": [
  20100. {
  20101. "type": "integer",
  20102. "exclusiveMinimum": 0
  20103. },
  20104. {
  20105. "type": "boolean",
  20106. "enum": [false]
  20107. }
  20108. ],
  20109. "description": "Timeout in milliseconds to wait for response headers. Provider integrations may set defaults. Set to false to disable timeout."
  20110. },
  20111. "chunkTimeout": {
  20112. "type": "integer",
  20113. "exclusiveMinimum": 0
  20114. }
  20115. },
  20116. "additionalProperties": {}
  20117. },
  20118. "models": {
  20119. "type": "object",
  20120. "additionalProperties": {
  20121. "type": "object",
  20122. "properties": {
  20123. "id": {
  20124. "type": "string"
  20125. },
  20126. "name": {
  20127. "type": "string"
  20128. },
  20129. "family": {
  20130. "type": "string"
  20131. },
  20132. "release_date": {
  20133. "type": "string"
  20134. },
  20135. "attachment": {
  20136. "type": "boolean"
  20137. },
  20138. "reasoning": {
  20139. "type": "boolean"
  20140. },
  20141. "temperature": {
  20142. "type": "boolean"
  20143. },
  20144. "tool_call": {
  20145. "type": "boolean"
  20146. },
  20147. "interleaved": {
  20148. "anyOf": [
  20149. {
  20150. "type": "boolean",
  20151. "enum": [true]
  20152. },
  20153. {
  20154. "type": "object",
  20155. "properties": {
  20156. "field": {
  20157. "type": "string",
  20158. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  20159. }
  20160. },
  20161. "required": ["field"],
  20162. "additionalProperties": false
  20163. }
  20164. ]
  20165. },
  20166. "cost": {
  20167. "type": "object",
  20168. "properties": {
  20169. "input": {
  20170. "type": "number"
  20171. },
  20172. "output": {
  20173. "type": "number"
  20174. },
  20175. "cache_read": {
  20176. "type": "number"
  20177. },
  20178. "cache_write": {
  20179. "type": "number"
  20180. },
  20181. "context_over_200k": {
  20182. "type": "object",
  20183. "properties": {
  20184. "input": {
  20185. "type": "number"
  20186. },
  20187. "output": {
  20188. "type": "number"
  20189. },
  20190. "cache_read": {
  20191. "type": "number"
  20192. },
  20193. "cache_write": {
  20194. "type": "number"
  20195. }
  20196. },
  20197. "required": ["input", "output"],
  20198. "additionalProperties": false
  20199. }
  20200. },
  20201. "required": ["input", "output"],
  20202. "additionalProperties": false
  20203. },
  20204. "limit": {
  20205. "type": "object",
  20206. "properties": {
  20207. "context": {
  20208. "type": "number"
  20209. },
  20210. "input": {
  20211. "type": "number"
  20212. },
  20213. "output": {
  20214. "type": "number"
  20215. }
  20216. },
  20217. "required": ["context", "output"],
  20218. "additionalProperties": false
  20219. },
  20220. "modalities": {
  20221. "type": "object",
  20222. "properties": {
  20223. "input": {
  20224. "type": "array",
  20225. "items": {
  20226. "type": "string",
  20227. "enum": ["text", "audio", "image", "video", "pdf"]
  20228. }
  20229. },
  20230. "output": {
  20231. "type": "array",
  20232. "items": {
  20233. "type": "string",
  20234. "enum": ["text", "audio", "image", "video", "pdf"]
  20235. }
  20236. }
  20237. },
  20238. "additionalProperties": false
  20239. },
  20240. "experimental": {
  20241. "type": "boolean"
  20242. },
  20243. "status": {
  20244. "type": "string",
  20245. "enum": ["alpha", "beta", "deprecated", "active"]
  20246. },
  20247. "provider": {
  20248. "type": "object",
  20249. "properties": {
  20250. "npm": {
  20251. "type": "string"
  20252. },
  20253. "api": {
  20254. "type": "string"
  20255. }
  20256. },
  20257. "additionalProperties": false
  20258. },
  20259. "options": {
  20260. "type": "object"
  20261. },
  20262. "headers": {
  20263. "type": "object",
  20264. "additionalProperties": {
  20265. "type": "string"
  20266. }
  20267. },
  20268. "variants": {
  20269. "type": "object",
  20270. "additionalProperties": {
  20271. "type": "object",
  20272. "properties": {
  20273. "disabled": {
  20274. "type": "boolean"
  20275. }
  20276. },
  20277. "additionalProperties": {}
  20278. },
  20279. "description": "Variant-specific configuration"
  20280. }
  20281. },
  20282. "additionalProperties": false
  20283. }
  20284. }
  20285. },
  20286. "additionalProperties": false
  20287. },
  20288. "McpLocalConfig": {
  20289. "type": "object",
  20290. "properties": {
  20291. "type": {
  20292. "type": "string",
  20293. "enum": ["local"],
  20294. "description": "Type of MCP server connection"
  20295. },
  20296. "command": {
  20297. "type": "array",
  20298. "items": {
  20299. "type": "string"
  20300. },
  20301. "description": "Command and arguments to run the MCP server"
  20302. },
  20303. "cwd": {
  20304. "type": "string"
  20305. },
  20306. "environment": {
  20307. "type": "object",
  20308. "additionalProperties": {
  20309. "type": "string"
  20310. }
  20311. },
  20312. "enabled": {
  20313. "type": "boolean"
  20314. },
  20315. "timeout": {
  20316. "type": "integer",
  20317. "exclusiveMinimum": 0
  20318. }
  20319. },
  20320. "required": ["type", "command"],
  20321. "additionalProperties": false
  20322. },
  20323. "McpOAuthConfig": {
  20324. "type": "object",
  20325. "properties": {
  20326. "clientId": {
  20327. "type": "string"
  20328. },
  20329. "clientSecret": {
  20330. "type": "string"
  20331. },
  20332. "scope": {
  20333. "type": "string"
  20334. },
  20335. "callbackPort": {
  20336. "type": "integer",
  20337. "minimum": 1,
  20338. "maximum": 65535
  20339. },
  20340. "redirectUri": {
  20341. "type": "string"
  20342. }
  20343. },
  20344. "additionalProperties": false
  20345. },
  20346. "McpRemoteConfig": {
  20347. "type": "object",
  20348. "properties": {
  20349. "type": {
  20350. "type": "string",
  20351. "enum": ["remote"],
  20352. "description": "Type of MCP server connection"
  20353. },
  20354. "url": {
  20355. "type": "string",
  20356. "description": "URL of the remote MCP server"
  20357. },
  20358. "enabled": {
  20359. "type": "boolean"
  20360. },
  20361. "headers": {
  20362. "type": "object",
  20363. "additionalProperties": {
  20364. "type": "string"
  20365. }
  20366. },
  20367. "oauth": {
  20368. "anyOf": [
  20369. {
  20370. "$ref": "#/components/schemas/McpOAuthConfig"
  20371. },
  20372. {
  20373. "type": "boolean",
  20374. "enum": [false]
  20375. }
  20376. ],
  20377. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  20378. },
  20379. "timeout": {
  20380. "type": "integer",
  20381. "exclusiveMinimum": 0
  20382. }
  20383. },
  20384. "required": ["type", "url"],
  20385. "additionalProperties": false
  20386. },
  20387. "LayoutConfig": {
  20388. "type": "string",
  20389. "enum": ["auto", "stretch"],
  20390. "description": "@deprecated Always uses stretch layout."
  20391. },
  20392. "ImageAttachmentConfig": {
  20393. "type": "object",
  20394. "properties": {
  20395. "auto_resize": {
  20396. "type": "boolean"
  20397. },
  20398. "max_width": {
  20399. "type": "integer",
  20400. "exclusiveMinimum": 0
  20401. },
  20402. "max_height": {
  20403. "type": "integer",
  20404. "exclusiveMinimum": 0
  20405. },
  20406. "max_base64_bytes": {
  20407. "type": "integer",
  20408. "exclusiveMinimum": 0
  20409. }
  20410. },
  20411. "additionalProperties": false
  20412. },
  20413. "AttachmentConfig": {
  20414. "type": "object",
  20415. "properties": {
  20416. "image": {
  20417. "$ref": "#/components/schemas/ImageAttachmentConfig"
  20418. }
  20419. },
  20420. "additionalProperties": false
  20421. },
  20422. "Config": {
  20423. "type": "object",
  20424. "properties": {
  20425. "$schema": {
  20426. "type": "string"
  20427. },
  20428. "shell": {
  20429. "type": "string"
  20430. },
  20431. "logLevel": {
  20432. "$ref": "#/components/schemas/LogLevel"
  20433. },
  20434. "server": {
  20435. "$ref": "#/components/schemas/ServerConfig"
  20436. },
  20437. "command": {
  20438. "type": "object",
  20439. "additionalProperties": {
  20440. "type": "object",
  20441. "properties": {
  20442. "template": {
  20443. "type": "string"
  20444. },
  20445. "description": {
  20446. "type": "string"
  20447. },
  20448. "agent": {
  20449. "type": "string"
  20450. },
  20451. "model": {
  20452. "type": "string"
  20453. },
  20454. "variant": {
  20455. "type": "string"
  20456. },
  20457. "subtask": {
  20458. "type": "boolean"
  20459. }
  20460. },
  20461. "required": ["template"],
  20462. "additionalProperties": false
  20463. }
  20464. },
  20465. "skills": {
  20466. "type": "object",
  20467. "properties": {
  20468. "paths": {
  20469. "type": "array",
  20470. "items": {
  20471. "type": "string"
  20472. }
  20473. },
  20474. "urls": {
  20475. "type": "array",
  20476. "items": {
  20477. "type": "string"
  20478. }
  20479. }
  20480. },
  20481. "additionalProperties": false
  20482. },
  20483. "references": {
  20484. "type": "object",
  20485. "additionalProperties": {
  20486. "anyOf": [
  20487. {
  20488. "type": "string"
  20489. },
  20490. {
  20491. "$ref": "#/components/schemas/ConfigV2ReferenceGit"
  20492. },
  20493. {
  20494. "$ref": "#/components/schemas/ConfigV2ReferenceLocal"
  20495. }
  20496. ]
  20497. }
  20498. },
  20499. "reference": {
  20500. "type": "object",
  20501. "additionalProperties": {
  20502. "anyOf": [
  20503. {
  20504. "type": "string"
  20505. },
  20506. {
  20507. "$ref": "#/components/schemas/ConfigV2ReferenceGit"
  20508. },
  20509. {
  20510. "$ref": "#/components/schemas/ConfigV2ReferenceLocal"
  20511. }
  20512. ]
  20513. }
  20514. },
  20515. "watcher": {
  20516. "type": "object",
  20517. "properties": {
  20518. "ignore": {
  20519. "type": "array",
  20520. "items": {
  20521. "type": "string"
  20522. }
  20523. }
  20524. },
  20525. "additionalProperties": false
  20526. },
  20527. "snapshot": {
  20528. "type": "boolean"
  20529. },
  20530. "plugin": {
  20531. "type": "array",
  20532. "items": {
  20533. "anyOf": [
  20534. {
  20535. "type": "string"
  20536. },
  20537. {
  20538. "type": "array",
  20539. "prefixItems": [
  20540. {
  20541. "type": "string"
  20542. },
  20543. {
  20544. "type": "object"
  20545. }
  20546. ],
  20547. "maxItems": 2,
  20548. "minItems": 2
  20549. }
  20550. ]
  20551. }
  20552. },
  20553. "share": {
  20554. "type": "string",
  20555. "enum": ["manual", "auto", "disabled"]
  20556. },
  20557. "autoshare": {
  20558. "type": "boolean"
  20559. },
  20560. "autoupdate": {
  20561. "anyOf": [
  20562. {
  20563. "type": "boolean"
  20564. },
  20565. {
  20566. "type": "string",
  20567. "enum": ["notify"]
  20568. }
  20569. ],
  20570. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  20571. },
  20572. "disabled_providers": {
  20573. "type": "array",
  20574. "items": {
  20575. "type": "string"
  20576. }
  20577. },
  20578. "enabled_providers": {
  20579. "type": "array",
  20580. "items": {
  20581. "type": "string"
  20582. }
  20583. },
  20584. "model": {
  20585. "type": "string"
  20586. },
  20587. "small_model": {
  20588. "type": "string"
  20589. },
  20590. "default_agent": {
  20591. "type": "string"
  20592. },
  20593. "username": {
  20594. "type": "string"
  20595. },
  20596. "mode": {
  20597. "type": "object",
  20598. "properties": {
  20599. "build": {
  20600. "$ref": "#/components/schemas/AgentConfig"
  20601. },
  20602. "plan": {
  20603. "$ref": "#/components/schemas/AgentConfig"
  20604. }
  20605. },
  20606. "additionalProperties": {
  20607. "$ref": "#/components/schemas/AgentConfig"
  20608. }
  20609. },
  20610. "agent": {
  20611. "type": "object",
  20612. "properties": {
  20613. "plan": {
  20614. "$ref": "#/components/schemas/AgentConfig"
  20615. },
  20616. "build": {
  20617. "$ref": "#/components/schemas/AgentConfig"
  20618. },
  20619. "general": {
  20620. "$ref": "#/components/schemas/AgentConfig"
  20621. },
  20622. "explore": {
  20623. "$ref": "#/components/schemas/AgentConfig"
  20624. },
  20625. "title": {
  20626. "$ref": "#/components/schemas/AgentConfig"
  20627. },
  20628. "summary": {
  20629. "$ref": "#/components/schemas/AgentConfig"
  20630. },
  20631. "compaction": {
  20632. "$ref": "#/components/schemas/AgentConfig"
  20633. }
  20634. },
  20635. "additionalProperties": {
  20636. "$ref": "#/components/schemas/AgentConfig"
  20637. }
  20638. },
  20639. "provider": {
  20640. "type": "object",
  20641. "additionalProperties": {
  20642. "$ref": "#/components/schemas/ProviderConfig"
  20643. }
  20644. },
  20645. "mcp": {
  20646. "type": "object",
  20647. "additionalProperties": {
  20648. "anyOf": [
  20649. {
  20650. "$ref": "#/components/schemas/McpLocalConfig"
  20651. },
  20652. {
  20653. "$ref": "#/components/schemas/McpRemoteConfig"
  20654. },
  20655. {
  20656. "type": "object",
  20657. "properties": {
  20658. "enabled": {
  20659. "type": "boolean"
  20660. }
  20661. },
  20662. "required": ["enabled"],
  20663. "additionalProperties": false
  20664. }
  20665. ]
  20666. }
  20667. },
  20668. "formatter": {
  20669. "anyOf": [
  20670. {
  20671. "type": "boolean"
  20672. },
  20673. {
  20674. "type": "object",
  20675. "additionalProperties": {
  20676. "type": "object",
  20677. "properties": {
  20678. "disabled": {
  20679. "type": "boolean"
  20680. },
  20681. "command": {
  20682. "type": "array",
  20683. "items": {
  20684. "type": "string"
  20685. }
  20686. },
  20687. "environment": {
  20688. "type": "object",
  20689. "additionalProperties": {
  20690. "type": "string"
  20691. }
  20692. },
  20693. "extensions": {
  20694. "type": "array",
  20695. "items": {
  20696. "type": "string"
  20697. }
  20698. }
  20699. },
  20700. "additionalProperties": false
  20701. }
  20702. }
  20703. ],
  20704. "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."
  20705. },
  20706. "lsp": {
  20707. "anyOf": [
  20708. {
  20709. "type": "boolean"
  20710. },
  20711. {
  20712. "type": "object",
  20713. "additionalProperties": {
  20714. "anyOf": [
  20715. {
  20716. "type": "object",
  20717. "properties": {
  20718. "disabled": {
  20719. "type": "boolean",
  20720. "enum": [true]
  20721. }
  20722. },
  20723. "required": ["disabled"],
  20724. "additionalProperties": false
  20725. },
  20726. {
  20727. "type": "object",
  20728. "properties": {
  20729. "command": {
  20730. "type": "array",
  20731. "items": {
  20732. "type": "string"
  20733. }
  20734. },
  20735. "extensions": {
  20736. "type": "array",
  20737. "items": {
  20738. "type": "string"
  20739. }
  20740. },
  20741. "disabled": {
  20742. "type": "boolean"
  20743. },
  20744. "env": {
  20745. "type": "object",
  20746. "additionalProperties": {
  20747. "type": "string"
  20748. }
  20749. },
  20750. "initialization": {
  20751. "type": "object"
  20752. }
  20753. },
  20754. "required": ["command"],
  20755. "additionalProperties": false
  20756. }
  20757. ]
  20758. }
  20759. }
  20760. ],
  20761. "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."
  20762. },
  20763. "instructions": {
  20764. "type": "array",
  20765. "items": {
  20766. "type": "string"
  20767. }
  20768. },
  20769. "layout": {
  20770. "$ref": "#/components/schemas/LayoutConfig"
  20771. },
  20772. "permission": {
  20773. "$ref": "#/components/schemas/PermissionConfig"
  20774. },
  20775. "tools": {
  20776. "type": "object",
  20777. "additionalProperties": {
  20778. "type": "boolean"
  20779. }
  20780. },
  20781. "attachment": {
  20782. "$ref": "#/components/schemas/AttachmentConfig"
  20783. },
  20784. "enterprise": {
  20785. "type": "object",
  20786. "properties": {
  20787. "url": {
  20788. "type": "string"
  20789. }
  20790. },
  20791. "additionalProperties": false
  20792. },
  20793. "tool_output": {
  20794. "type": "object",
  20795. "properties": {
  20796. "max_lines": {
  20797. "type": "integer",
  20798. "exclusiveMinimum": 0
  20799. },
  20800. "max_bytes": {
  20801. "type": "integer",
  20802. "exclusiveMinimum": 0
  20803. }
  20804. },
  20805. "additionalProperties": false
  20806. },
  20807. "compaction": {
  20808. "type": "object",
  20809. "properties": {
  20810. "auto": {
  20811. "type": "boolean"
  20812. },
  20813. "prune": {
  20814. "type": "boolean"
  20815. },
  20816. "tail_turns": {
  20817. "type": "integer",
  20818. "minimum": 0
  20819. },
  20820. "preserve_recent_tokens": {
  20821. "type": "integer",
  20822. "minimum": 0
  20823. },
  20824. "reserved": {
  20825. "type": "integer",
  20826. "minimum": 0
  20827. }
  20828. },
  20829. "additionalProperties": false
  20830. },
  20831. "experimental": {
  20832. "type": "object",
  20833. "properties": {
  20834. "disable_paste_summary": {
  20835. "type": "boolean"
  20836. },
  20837. "batch_tool": {
  20838. "type": "boolean"
  20839. },
  20840. "openTelemetry": {
  20841. "type": "boolean"
  20842. },
  20843. "primary_tools": {
  20844. "type": "array",
  20845. "items": {
  20846. "type": "string"
  20847. }
  20848. },
  20849. "continue_loop_on_deny": {
  20850. "type": "boolean"
  20851. },
  20852. "mcp_timeout": {
  20853. "type": "integer",
  20854. "exclusiveMinimum": 0
  20855. },
  20856. "policies": {
  20857. "type": "array",
  20858. "items": {
  20859. "$ref": "#/components/schemas/ConfigV2ExperimentalPolicy"
  20860. }
  20861. }
  20862. },
  20863. "additionalProperties": false
  20864. }
  20865. },
  20866. "additionalProperties": false
  20867. },
  20868. "Model": {
  20869. "type": "object",
  20870. "properties": {
  20871. "id": {
  20872. "type": "string"
  20873. },
  20874. "providerID": {
  20875. "type": "string"
  20876. },
  20877. "api": {
  20878. "type": "object",
  20879. "properties": {
  20880. "id": {
  20881. "type": "string"
  20882. },
  20883. "url": {
  20884. "type": "string"
  20885. },
  20886. "npm": {
  20887. "type": "string"
  20888. }
  20889. },
  20890. "required": ["id", "url", "npm"],
  20891. "additionalProperties": false
  20892. },
  20893. "name": {
  20894. "type": "string"
  20895. },
  20896. "family": {
  20897. "type": "string"
  20898. },
  20899. "capabilities": {
  20900. "type": "object",
  20901. "properties": {
  20902. "temperature": {
  20903. "type": "boolean"
  20904. },
  20905. "reasoning": {
  20906. "type": "boolean"
  20907. },
  20908. "attachment": {
  20909. "type": "boolean"
  20910. },
  20911. "toolcall": {
  20912. "type": "boolean"
  20913. },
  20914. "input": {
  20915. "type": "object",
  20916. "properties": {
  20917. "text": {
  20918. "type": "boolean"
  20919. },
  20920. "audio": {
  20921. "type": "boolean"
  20922. },
  20923. "image": {
  20924. "type": "boolean"
  20925. },
  20926. "video": {
  20927. "type": "boolean"
  20928. },
  20929. "pdf": {
  20930. "type": "boolean"
  20931. }
  20932. },
  20933. "required": ["text", "audio", "image", "video", "pdf"],
  20934. "additionalProperties": false
  20935. },
  20936. "output": {
  20937. "type": "object",
  20938. "properties": {
  20939. "text": {
  20940. "type": "boolean"
  20941. },
  20942. "audio": {
  20943. "type": "boolean"
  20944. },
  20945. "image": {
  20946. "type": "boolean"
  20947. },
  20948. "video": {
  20949. "type": "boolean"
  20950. },
  20951. "pdf": {
  20952. "type": "boolean"
  20953. }
  20954. },
  20955. "required": ["text", "audio", "image", "video", "pdf"],
  20956. "additionalProperties": false
  20957. },
  20958. "interleaved": {
  20959. "anyOf": [
  20960. {
  20961. "type": "boolean"
  20962. },
  20963. {
  20964. "type": "object",
  20965. "properties": {
  20966. "field": {
  20967. "type": "string",
  20968. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  20969. }
  20970. },
  20971. "required": ["field"],
  20972. "additionalProperties": false
  20973. }
  20974. ]
  20975. }
  20976. },
  20977. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  20978. "additionalProperties": false
  20979. },
  20980. "cost": {
  20981. "type": "object",
  20982. "properties": {
  20983. "input": {
  20984. "type": "number"
  20985. },
  20986. "output": {
  20987. "type": "number"
  20988. },
  20989. "cache": {
  20990. "type": "object",
  20991. "properties": {
  20992. "read": {
  20993. "type": "number"
  20994. },
  20995. "write": {
  20996. "type": "number"
  20997. }
  20998. },
  20999. "required": ["read", "write"],
  21000. "additionalProperties": false
  21001. },
  21002. "tiers": {
  21003. "type": "array",
  21004. "items": {
  21005. "type": "object",
  21006. "properties": {
  21007. "input": {
  21008. "type": "number"
  21009. },
  21010. "output": {
  21011. "type": "number"
  21012. },
  21013. "cache": {
  21014. "type": "object",
  21015. "properties": {
  21016. "read": {
  21017. "type": "number"
  21018. },
  21019. "write": {
  21020. "type": "number"
  21021. }
  21022. },
  21023. "required": ["read", "write"],
  21024. "additionalProperties": false
  21025. },
  21026. "tier": {
  21027. "type": "object",
  21028. "properties": {
  21029. "type": {
  21030. "type": "string",
  21031. "enum": ["context"]
  21032. },
  21033. "size": {
  21034. "type": "number"
  21035. }
  21036. },
  21037. "required": ["type", "size"],
  21038. "additionalProperties": false
  21039. }
  21040. },
  21041. "required": ["input", "output", "cache", "tier"],
  21042. "additionalProperties": false
  21043. }
  21044. },
  21045. "experimentalOver200K": {
  21046. "type": "object",
  21047. "properties": {
  21048. "input": {
  21049. "type": "number"
  21050. },
  21051. "output": {
  21052. "type": "number"
  21053. },
  21054. "cache": {
  21055. "type": "object",
  21056. "properties": {
  21057. "read": {
  21058. "type": "number"
  21059. },
  21060. "write": {
  21061. "type": "number"
  21062. }
  21063. },
  21064. "required": ["read", "write"],
  21065. "additionalProperties": false
  21066. }
  21067. },
  21068. "required": ["input", "output", "cache"],
  21069. "additionalProperties": false
  21070. }
  21071. },
  21072. "required": ["input", "output", "cache"],
  21073. "additionalProperties": false
  21074. },
  21075. "limit": {
  21076. "type": "object",
  21077. "properties": {
  21078. "context": {
  21079. "type": "number"
  21080. },
  21081. "input": {
  21082. "type": "number"
  21083. },
  21084. "output": {
  21085. "type": "number"
  21086. }
  21087. },
  21088. "required": ["context", "output"],
  21089. "additionalProperties": false
  21090. },
  21091. "status": {
  21092. "type": "string",
  21093. "enum": ["alpha", "beta", "deprecated", "active"]
  21094. },
  21095. "options": {
  21096. "type": "object"
  21097. },
  21098. "headers": {
  21099. "type": "object",
  21100. "additionalProperties": {
  21101. "type": "string"
  21102. }
  21103. },
  21104. "release_date": {
  21105. "type": "string"
  21106. },
  21107. "variants": {
  21108. "type": "object",
  21109. "additionalProperties": {
  21110. "type": "object"
  21111. }
  21112. }
  21113. },
  21114. "required": [
  21115. "id",
  21116. "providerID",
  21117. "api",
  21118. "name",
  21119. "capabilities",
  21120. "cost",
  21121. "limit",
  21122. "status",
  21123. "options",
  21124. "headers",
  21125. "release_date"
  21126. ],
  21127. "additionalProperties": false
  21128. },
  21129. "Provider": {
  21130. "type": "object",
  21131. "properties": {
  21132. "id": {
  21133. "type": "string"
  21134. },
  21135. "name": {
  21136. "type": "string"
  21137. },
  21138. "source": {
  21139. "type": "string",
  21140. "enum": ["env", "config", "custom", "api"]
  21141. },
  21142. "env": {
  21143. "type": "array",
  21144. "items": {
  21145. "type": "string"
  21146. }
  21147. },
  21148. "key": {
  21149. "type": "string"
  21150. },
  21151. "options": {
  21152. "type": "object"
  21153. },
  21154. "models": {
  21155. "type": "object",
  21156. "additionalProperties": {
  21157. "$ref": "#/components/schemas/Model"
  21158. }
  21159. }
  21160. },
  21161. "required": ["id", "name", "source", "env", "options", "models"],
  21162. "additionalProperties": false
  21163. },
  21164. "ExperimentalCapabilities": {
  21165. "type": "object",
  21166. "properties": {
  21167. "backgroundSubagents": {
  21168. "type": "boolean"
  21169. }
  21170. },
  21171. "required": ["backgroundSubagents"],
  21172. "additionalProperties": false
  21173. },
  21174. "ConsoleState": {
  21175. "type": "object",
  21176. "properties": {
  21177. "consoleManagedProviders": {
  21178. "type": "array",
  21179. "items": {
  21180. "type": "string"
  21181. }
  21182. },
  21183. "activeOrgName": {
  21184. "type": "string"
  21185. },
  21186. "switchableOrgCount": {
  21187. "type": "integer",
  21188. "minimum": 0
  21189. }
  21190. },
  21191. "required": ["consoleManagedProviders", "switchableOrgCount"],
  21192. "additionalProperties": false
  21193. },
  21194. "effect_HttpApiError_InternalServerError": {
  21195. "type": "object",
  21196. "properties": {
  21197. "_tag": {
  21198. "type": "string",
  21199. "enum": ["InternalServerError"]
  21200. }
  21201. },
  21202. "required": ["_tag"],
  21203. "additionalProperties": false
  21204. },
  21205. "ToolListItem": {
  21206. "type": "object",
  21207. "properties": {
  21208. "id": {
  21209. "type": "string"
  21210. },
  21211. "description": {
  21212. "type": "string"
  21213. },
  21214. "parameters": {}
  21215. },
  21216. "required": ["id", "description", "parameters"],
  21217. "additionalProperties": false
  21218. },
  21219. "ToolList": {
  21220. "type": "array",
  21221. "items": {
  21222. "$ref": "#/components/schemas/ToolListItem"
  21223. }
  21224. },
  21225. "ToolIDs": {
  21226. "type": "array",
  21227. "items": {
  21228. "type": "string"
  21229. }
  21230. },
  21231. "WorktreeError": {
  21232. "type": "object",
  21233. "properties": {
  21234. "name": {
  21235. "type": "string",
  21236. "enum": [
  21237. "WorktreeNotGitError",
  21238. "WorktreeNameGenerationFailedError",
  21239. "WorktreeCreateFailedError",
  21240. "WorktreeStartCommandFailedError",
  21241. "WorktreeRemoveFailedError",
  21242. "WorktreeResetFailedError",
  21243. "WorktreeListFailedError"
  21244. ]
  21245. },
  21246. "data": {
  21247. "type": "object",
  21248. "properties": {
  21249. "message": {
  21250. "type": "string"
  21251. }
  21252. },
  21253. "required": ["message"],
  21254. "additionalProperties": false
  21255. }
  21256. },
  21257. "required": ["name", "data"],
  21258. "additionalProperties": false
  21259. },
  21260. "WorktreeCreateInput": {
  21261. "type": "object",
  21262. "properties": {
  21263. "name": {
  21264. "type": "string"
  21265. },
  21266. "startCommand": {
  21267. "type": "string",
  21268. "description": "Additional startup script to run after the project's start command"
  21269. }
  21270. },
  21271. "additionalProperties": false
  21272. },
  21273. "Worktree": {
  21274. "type": "object",
  21275. "properties": {
  21276. "name": {
  21277. "type": "string"
  21278. },
  21279. "branch": {
  21280. "type": "string"
  21281. },
  21282. "directory": {
  21283. "type": "string"
  21284. }
  21285. },
  21286. "required": ["name", "directory"],
  21287. "additionalProperties": false
  21288. },
  21289. "WorktreeRemoveInput": {
  21290. "type": "object",
  21291. "properties": {
  21292. "directory": {
  21293. "type": "string"
  21294. }
  21295. },
  21296. "required": ["directory"],
  21297. "additionalProperties": false
  21298. },
  21299. "WorktreeResetInput": {
  21300. "type": "object",
  21301. "properties": {
  21302. "directory": {
  21303. "type": "string"
  21304. }
  21305. },
  21306. "required": ["directory"],
  21307. "additionalProperties": false
  21308. },
  21309. "ProjectSummary": {
  21310. "type": "object",
  21311. "properties": {
  21312. "id": {
  21313. "type": "string"
  21314. },
  21315. "name": {
  21316. "type": "string"
  21317. },
  21318. "worktree": {
  21319. "type": "string"
  21320. }
  21321. },
  21322. "required": ["id", "worktree"],
  21323. "additionalProperties": false
  21324. },
  21325. "GlobalSession": {
  21326. "type": "object",
  21327. "properties": {
  21328. "id": {
  21329. "type": "string",
  21330. "pattern": "^ses"
  21331. },
  21332. "slug": {
  21333. "type": "string"
  21334. },
  21335. "projectID": {
  21336. "type": "string"
  21337. },
  21338. "workspaceID": {
  21339. "type": "string",
  21340. "pattern": "^wrk"
  21341. },
  21342. "directory": {
  21343. "type": "string"
  21344. },
  21345. "path": {
  21346. "type": "string"
  21347. },
  21348. "parentID": {
  21349. "type": "string",
  21350. "pattern": "^ses"
  21351. },
  21352. "summary": {
  21353. "type": "object",
  21354. "properties": {
  21355. "additions": {
  21356. "type": "number"
  21357. },
  21358. "deletions": {
  21359. "type": "number"
  21360. },
  21361. "files": {
  21362. "type": "number"
  21363. },
  21364. "diffs": {
  21365. "type": "array",
  21366. "items": {
  21367. "$ref": "#/components/schemas/SnapshotFileDiff"
  21368. }
  21369. }
  21370. },
  21371. "required": ["additions", "deletions", "files"],
  21372. "additionalProperties": false
  21373. },
  21374. "cost": {
  21375. "type": "number"
  21376. },
  21377. "tokens": {
  21378. "type": "object",
  21379. "properties": {
  21380. "input": {
  21381. "type": "number"
  21382. },
  21383. "output": {
  21384. "type": "number"
  21385. },
  21386. "reasoning": {
  21387. "type": "number"
  21388. },
  21389. "cache": {
  21390. "type": "object",
  21391. "properties": {
  21392. "read": {
  21393. "type": "number"
  21394. },
  21395. "write": {
  21396. "type": "number"
  21397. }
  21398. },
  21399. "required": ["read", "write"],
  21400. "additionalProperties": false
  21401. }
  21402. },
  21403. "required": ["input", "output", "reasoning", "cache"],
  21404. "additionalProperties": false
  21405. },
  21406. "share": {
  21407. "type": "object",
  21408. "properties": {
  21409. "url": {
  21410. "type": "string"
  21411. }
  21412. },
  21413. "required": ["url"],
  21414. "additionalProperties": false
  21415. },
  21416. "title": {
  21417. "type": "string"
  21418. },
  21419. "agent": {
  21420. "type": "string"
  21421. },
  21422. "model": {
  21423. "type": "object",
  21424. "properties": {
  21425. "id": {
  21426. "type": "string"
  21427. },
  21428. "providerID": {
  21429. "type": "string"
  21430. },
  21431. "variant": {
  21432. "type": "string"
  21433. }
  21434. },
  21435. "required": ["id", "providerID"],
  21436. "additionalProperties": false
  21437. },
  21438. "version": {
  21439. "type": "string"
  21440. },
  21441. "metadata": {
  21442. "type": "object"
  21443. },
  21444. "time": {
  21445. "type": "object",
  21446. "properties": {
  21447. "created": {
  21448. "type": "integer",
  21449. "minimum": 0
  21450. },
  21451. "updated": {
  21452. "type": "integer",
  21453. "minimum": 0
  21454. },
  21455. "compacting": {
  21456. "type": "integer",
  21457. "minimum": 0
  21458. },
  21459. "archived": {
  21460. "type": "number"
  21461. }
  21462. },
  21463. "required": ["created", "updated"],
  21464. "additionalProperties": false
  21465. },
  21466. "permission": {
  21467. "$ref": "#/components/schemas/PermissionRuleset"
  21468. },
  21469. "revert": {
  21470. "type": "object",
  21471. "properties": {
  21472. "messageID": {
  21473. "type": "string",
  21474. "pattern": "^msg"
  21475. },
  21476. "partID": {
  21477. "type": "string",
  21478. "pattern": "^prt"
  21479. },
  21480. "snapshot": {
  21481. "type": "string"
  21482. },
  21483. "diff": {
  21484. "type": "string"
  21485. }
  21486. },
  21487. "required": ["messageID"],
  21488. "additionalProperties": false
  21489. },
  21490. "project": {
  21491. "anyOf": [
  21492. {
  21493. "$ref": "#/components/schemas/ProjectSummary"
  21494. },
  21495. {
  21496. "type": "null"
  21497. }
  21498. ]
  21499. }
  21500. },
  21501. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  21502. "additionalProperties": false
  21503. },
  21504. "McpResource": {
  21505. "type": "object",
  21506. "properties": {
  21507. "name": {
  21508. "type": "string"
  21509. },
  21510. "uri": {
  21511. "type": "string"
  21512. },
  21513. "description": {
  21514. "type": "string"
  21515. },
  21516. "mimeType": {
  21517. "type": "string"
  21518. },
  21519. "client": {
  21520. "type": "string"
  21521. }
  21522. },
  21523. "required": ["name", "uri", "client"],
  21524. "additionalProperties": false
  21525. },
  21526. "Symbol": {
  21527. "type": "object",
  21528. "properties": {
  21529. "name": {
  21530. "type": "string"
  21531. },
  21532. "kind": {
  21533. "type": "integer",
  21534. "minimum": 0
  21535. },
  21536. "location": {
  21537. "type": "object",
  21538. "properties": {
  21539. "uri": {
  21540. "type": "string"
  21541. },
  21542. "range": {
  21543. "$ref": "#/components/schemas/Range"
  21544. }
  21545. },
  21546. "required": ["uri", "range"],
  21547. "additionalProperties": false
  21548. }
  21549. },
  21550. "required": ["name", "kind", "location"],
  21551. "additionalProperties": false
  21552. },
  21553. "FileNode": {
  21554. "type": "object",
  21555. "properties": {
  21556. "name": {
  21557. "type": "string"
  21558. },
  21559. "path": {
  21560. "type": "string"
  21561. },
  21562. "absolute": {
  21563. "type": "string"
  21564. },
  21565. "type": {
  21566. "type": "string",
  21567. "enum": ["file", "directory"]
  21568. },
  21569. "ignored": {
  21570. "type": "boolean"
  21571. }
  21572. },
  21573. "required": ["name", "path", "absolute", "type", "ignored"],
  21574. "additionalProperties": false
  21575. },
  21576. "FileContent": {
  21577. "type": "object",
  21578. "properties": {
  21579. "type": {
  21580. "type": "string",
  21581. "enum": ["text", "binary"]
  21582. },
  21583. "content": {
  21584. "type": "string"
  21585. },
  21586. "diff": {
  21587. "type": "string"
  21588. },
  21589. "patch": {
  21590. "type": "object",
  21591. "properties": {
  21592. "oldFileName": {
  21593. "type": "string"
  21594. },
  21595. "newFileName": {
  21596. "type": "string"
  21597. },
  21598. "oldHeader": {
  21599. "type": "string"
  21600. },
  21601. "newHeader": {
  21602. "type": "string"
  21603. },
  21604. "hunks": {
  21605. "type": "array",
  21606. "items": {
  21607. "type": "object",
  21608. "properties": {
  21609. "oldStart": {
  21610. "type": "integer",
  21611. "minimum": 0
  21612. },
  21613. "oldLines": {
  21614. "type": "integer",
  21615. "minimum": 0
  21616. },
  21617. "newStart": {
  21618. "type": "integer",
  21619. "minimum": 0
  21620. },
  21621. "newLines": {
  21622. "type": "integer",
  21623. "minimum": 0
  21624. },
  21625. "lines": {
  21626. "type": "array",
  21627. "items": {
  21628. "type": "string"
  21629. }
  21630. }
  21631. },
  21632. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  21633. "additionalProperties": false
  21634. }
  21635. },
  21636. "index": {
  21637. "type": "string"
  21638. }
  21639. },
  21640. "required": ["oldFileName", "newFileName", "hunks"],
  21641. "additionalProperties": false
  21642. },
  21643. "encoding": {
  21644. "type": "string",
  21645. "enum": ["base64"]
  21646. },
  21647. "mimeType": {
  21648. "type": "string"
  21649. }
  21650. },
  21651. "required": ["type", "content"],
  21652. "additionalProperties": false
  21653. },
  21654. "File": {
  21655. "type": "object",
  21656. "properties": {
  21657. "path": {
  21658. "type": "string"
  21659. },
  21660. "added": {
  21661. "type": "integer",
  21662. "minimum": 0
  21663. },
  21664. "removed": {
  21665. "type": "integer",
  21666. "minimum": 0
  21667. },
  21668. "status": {
  21669. "type": "string",
  21670. "enum": ["added", "deleted", "modified"]
  21671. }
  21672. },
  21673. "required": ["path", "added", "removed", "status"],
  21674. "additionalProperties": false
  21675. },
  21676. "Path": {
  21677. "type": "object",
  21678. "properties": {
  21679. "home": {
  21680. "type": "string"
  21681. },
  21682. "state": {
  21683. "type": "string"
  21684. },
  21685. "config": {
  21686. "type": "string"
  21687. },
  21688. "worktree": {
  21689. "type": "string"
  21690. },
  21691. "directory": {
  21692. "type": "string"
  21693. }
  21694. },
  21695. "required": ["home", "state", "config", "worktree", "directory"],
  21696. "additionalProperties": false
  21697. },
  21698. "VcsInfo": {
  21699. "type": "object",
  21700. "properties": {
  21701. "branch": {
  21702. "type": "string"
  21703. },
  21704. "default_branch": {
  21705. "type": "string"
  21706. }
  21707. },
  21708. "additionalProperties": false
  21709. },
  21710. "VcsFileStatus": {
  21711. "type": "object",
  21712. "properties": {
  21713. "file": {
  21714. "type": "string"
  21715. },
  21716. "additions": {
  21717. "type": "number"
  21718. },
  21719. "deletions": {
  21720. "type": "number"
  21721. },
  21722. "status": {
  21723. "type": "string",
  21724. "enum": ["added", "deleted", "modified"]
  21725. }
  21726. },
  21727. "required": ["file", "additions", "deletions", "status"],
  21728. "additionalProperties": false
  21729. },
  21730. "VcsFileDiff": {
  21731. "type": "object",
  21732. "properties": {
  21733. "file": {
  21734. "type": "string"
  21735. },
  21736. "patch": {
  21737. "type": "string"
  21738. },
  21739. "additions": {
  21740. "type": "number"
  21741. },
  21742. "deletions": {
  21743. "type": "number"
  21744. },
  21745. "status": {
  21746. "type": "string",
  21747. "enum": ["added", "deleted", "modified"]
  21748. }
  21749. },
  21750. "required": ["file", "additions", "deletions"],
  21751. "additionalProperties": false
  21752. },
  21753. "VcsApplyError": {
  21754. "type": "object",
  21755. "properties": {
  21756. "name": {
  21757. "type": "string",
  21758. "enum": ["VcsApplyError"]
  21759. },
  21760. "data": {
  21761. "type": "object",
  21762. "properties": {
  21763. "message": {
  21764. "type": "string"
  21765. },
  21766. "reason": {
  21767. "type": "string",
  21768. "enum": ["non-git", "not-clean"]
  21769. }
  21770. },
  21771. "required": ["message", "reason"],
  21772. "additionalProperties": false
  21773. }
  21774. },
  21775. "required": ["name", "data"],
  21776. "additionalProperties": false
  21777. },
  21778. "Command": {
  21779. "type": "object",
  21780. "properties": {
  21781. "name": {
  21782. "type": "string"
  21783. },
  21784. "description": {
  21785. "type": "string"
  21786. },
  21787. "agent": {
  21788. "type": "string"
  21789. },
  21790. "model": {
  21791. "type": "string"
  21792. },
  21793. "source": {
  21794. "type": "string",
  21795. "enum": ["command", "mcp", "skill"]
  21796. },
  21797. "template": {
  21798. "type": "string"
  21799. },
  21800. "subtask": {
  21801. "type": "boolean"
  21802. },
  21803. "hints": {
  21804. "type": "array",
  21805. "items": {
  21806. "type": "string"
  21807. }
  21808. }
  21809. },
  21810. "required": ["name", "template", "hints"],
  21811. "additionalProperties": false
  21812. },
  21813. "Agent": {
  21814. "type": "object",
  21815. "properties": {
  21816. "name": {
  21817. "type": "string"
  21818. },
  21819. "description": {
  21820. "type": "string"
  21821. },
  21822. "mode": {
  21823. "type": "string",
  21824. "enum": ["subagent", "primary", "all"]
  21825. },
  21826. "native": {
  21827. "type": "boolean"
  21828. },
  21829. "hidden": {
  21830. "type": "boolean"
  21831. },
  21832. "topP": {
  21833. "type": "number"
  21834. },
  21835. "temperature": {
  21836. "type": "number"
  21837. },
  21838. "color": {
  21839. "type": "string"
  21840. },
  21841. "permission": {
  21842. "$ref": "#/components/schemas/PermissionRuleset"
  21843. },
  21844. "model": {
  21845. "type": "object",
  21846. "properties": {
  21847. "modelID": {
  21848. "type": "string"
  21849. },
  21850. "providerID": {
  21851. "type": "string"
  21852. }
  21853. },
  21854. "required": ["modelID", "providerID"],
  21855. "additionalProperties": false
  21856. },
  21857. "variant": {
  21858. "type": "string"
  21859. },
  21860. "prompt": {
  21861. "type": "string"
  21862. },
  21863. "options": {
  21864. "type": "object"
  21865. },
  21866. "steps": {
  21867. "type": "number"
  21868. }
  21869. },
  21870. "required": ["name", "mode", "permission", "options"],
  21871. "additionalProperties": false
  21872. },
  21873. "LSPStatus": {
  21874. "type": "object",
  21875. "properties": {
  21876. "id": {
  21877. "type": "string"
  21878. },
  21879. "name": {
  21880. "type": "string"
  21881. },
  21882. "root": {
  21883. "type": "string"
  21884. },
  21885. "status": {
  21886. "type": "string",
  21887. "enum": ["connected", "error"]
  21888. }
  21889. },
  21890. "required": ["id", "name", "root", "status"],
  21891. "additionalProperties": false
  21892. },
  21893. "FormatterStatus": {
  21894. "type": "object",
  21895. "properties": {
  21896. "name": {
  21897. "type": "string"
  21898. },
  21899. "extensions": {
  21900. "type": "array",
  21901. "items": {
  21902. "type": "string"
  21903. }
  21904. },
  21905. "enabled": {
  21906. "type": "boolean"
  21907. }
  21908. },
  21909. "required": ["name", "extensions", "enabled"],
  21910. "additionalProperties": false
  21911. },
  21912. "MCPStatusConnected": {
  21913. "type": "object",
  21914. "properties": {
  21915. "status": {
  21916. "type": "string",
  21917. "enum": ["connected"]
  21918. }
  21919. },
  21920. "required": ["status"],
  21921. "additionalProperties": false
  21922. },
  21923. "MCPStatusDisabled": {
  21924. "type": "object",
  21925. "properties": {
  21926. "status": {
  21927. "type": "string",
  21928. "enum": ["disabled"]
  21929. }
  21930. },
  21931. "required": ["status"],
  21932. "additionalProperties": false
  21933. },
  21934. "MCPStatusFailed": {
  21935. "type": "object",
  21936. "properties": {
  21937. "status": {
  21938. "type": "string",
  21939. "enum": ["failed"]
  21940. },
  21941. "error": {
  21942. "type": "string"
  21943. }
  21944. },
  21945. "required": ["status", "error"],
  21946. "additionalProperties": false
  21947. },
  21948. "MCPStatusNeedsAuth": {
  21949. "type": "object",
  21950. "properties": {
  21951. "status": {
  21952. "type": "string",
  21953. "enum": ["needs_auth"]
  21954. }
  21955. },
  21956. "required": ["status"],
  21957. "additionalProperties": false
  21958. },
  21959. "MCPStatusNeedsClientRegistration": {
  21960. "type": "object",
  21961. "properties": {
  21962. "status": {
  21963. "type": "string",
  21964. "enum": ["needs_client_registration"]
  21965. },
  21966. "error": {
  21967. "type": "string"
  21968. }
  21969. },
  21970. "required": ["status", "error"],
  21971. "additionalProperties": false
  21972. },
  21973. "MCPStatus": {
  21974. "anyOf": [
  21975. {
  21976. "$ref": "#/components/schemas/MCPStatusConnected"
  21977. },
  21978. {
  21979. "$ref": "#/components/schemas/MCPStatusDisabled"
  21980. },
  21981. {
  21982. "$ref": "#/components/schemas/MCPStatusFailed"
  21983. },
  21984. {
  21985. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  21986. },
  21987. {
  21988. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  21989. }
  21990. ]
  21991. },
  21992. "McpUnsupportedOAuthError": {
  21993. "type": "object",
  21994. "properties": {
  21995. "error": {
  21996. "type": "string"
  21997. }
  21998. },
  21999. "required": ["error"],
  22000. "additionalProperties": false
  22001. },
  22002. "McpServerNotFoundError": {
  22003. "type": "object",
  22004. "properties": {
  22005. "_tag": {
  22006. "type": "string",
  22007. "enum": ["McpServerNotFoundError"]
  22008. },
  22009. "name": {
  22010. "type": "string"
  22011. },
  22012. "message": {
  22013. "type": "string"
  22014. }
  22015. },
  22016. "required": ["_tag", "name", "message"],
  22017. "additionalProperties": false
  22018. },
  22019. "Project": {
  22020. "type": "object",
  22021. "properties": {
  22022. "id": {
  22023. "type": "string"
  22024. },
  22025. "worktree": {
  22026. "type": "string"
  22027. },
  22028. "vcs": {
  22029. "type": "string",
  22030. "enum": ["git"]
  22031. },
  22032. "name": {
  22033. "type": "string"
  22034. },
  22035. "icon": {
  22036. "type": "object",
  22037. "properties": {
  22038. "url": {
  22039. "type": "string"
  22040. },
  22041. "override": {
  22042. "type": "string"
  22043. },
  22044. "color": {
  22045. "type": "string"
  22046. }
  22047. },
  22048. "additionalProperties": false
  22049. },
  22050. "commands": {
  22051. "type": "object",
  22052. "properties": {
  22053. "start": {
  22054. "type": "string",
  22055. "description": "Startup script to run when creating a new workspace (worktree)"
  22056. }
  22057. },
  22058. "additionalProperties": false
  22059. },
  22060. "time": {
  22061. "type": "object",
  22062. "properties": {
  22063. "created": {
  22064. "type": "integer",
  22065. "minimum": 0
  22066. },
  22067. "updated": {
  22068. "type": "integer",
  22069. "minimum": 0
  22070. },
  22071. "initialized": {
  22072. "type": "integer",
  22073. "minimum": 0
  22074. }
  22075. },
  22076. "required": ["created", "updated"],
  22077. "additionalProperties": false
  22078. },
  22079. "sandboxes": {
  22080. "type": "array",
  22081. "items": {
  22082. "type": "string"
  22083. }
  22084. }
  22085. },
  22086. "required": ["id", "worktree", "time", "sandboxes"],
  22087. "additionalProperties": false
  22088. },
  22089. "ProjectNotFoundError": {
  22090. "type": "object",
  22091. "properties": {
  22092. "_tag": {
  22093. "type": "string",
  22094. "enum": ["ProjectNotFoundError"]
  22095. },
  22096. "projectID": {
  22097. "type": "string"
  22098. },
  22099. "message": {
  22100. "type": "string"
  22101. }
  22102. },
  22103. "required": ["_tag", "projectID", "message"],
  22104. "additionalProperties": false
  22105. },
  22106. "PtyNotFoundError": {
  22107. "type": "object",
  22108. "properties": {
  22109. "_tag": {
  22110. "type": "string",
  22111. "enum": ["PtyNotFoundError"]
  22112. },
  22113. "ptyID": {
  22114. "type": "string"
  22115. },
  22116. "message": {
  22117. "type": "string"
  22118. }
  22119. },
  22120. "required": ["_tag", "ptyID", "message"],
  22121. "additionalProperties": false
  22122. },
  22123. "PtyForbiddenError": {
  22124. "type": "object",
  22125. "properties": {
  22126. "_tag": {
  22127. "type": "string",
  22128. "enum": ["PtyForbiddenError"]
  22129. },
  22130. "message": {
  22131. "type": "string"
  22132. }
  22133. },
  22134. "required": ["_tag", "message"],
  22135. "additionalProperties": false
  22136. },
  22137. "QuestionRequest": {
  22138. "type": "object",
  22139. "properties": {
  22140. "id": {
  22141. "type": "string",
  22142. "pattern": "^que"
  22143. },
  22144. "sessionID": {
  22145. "type": "string",
  22146. "pattern": "^ses"
  22147. },
  22148. "questions": {
  22149. "type": "array",
  22150. "items": {
  22151. "$ref": "#/components/schemas/QuestionInfo"
  22152. },
  22153. "description": "Questions to ask"
  22154. },
  22155. "tool": {
  22156. "$ref": "#/components/schemas/QuestionTool"
  22157. }
  22158. },
  22159. "required": ["id", "sessionID", "questions"],
  22160. "additionalProperties": false
  22161. },
  22162. "QuestionNotFoundError": {
  22163. "type": "object",
  22164. "properties": {
  22165. "_tag": {
  22166. "type": "string",
  22167. "enum": ["QuestionNotFoundError"]
  22168. },
  22169. "requestID": {
  22170. "type": "string"
  22171. },
  22172. "message": {
  22173. "type": "string"
  22174. }
  22175. },
  22176. "required": ["_tag", "requestID", "message"],
  22177. "additionalProperties": false
  22178. },
  22179. "PermissionRequest": {
  22180. "type": "object",
  22181. "properties": {
  22182. "id": {
  22183. "type": "string",
  22184. "pattern": "^per"
  22185. },
  22186. "sessionID": {
  22187. "type": "string",
  22188. "pattern": "^ses"
  22189. },
  22190. "permission": {
  22191. "type": "string"
  22192. },
  22193. "patterns": {
  22194. "type": "array",
  22195. "items": {
  22196. "type": "string"
  22197. }
  22198. },
  22199. "metadata": {
  22200. "type": "object"
  22201. },
  22202. "always": {
  22203. "type": "array",
  22204. "items": {
  22205. "type": "string"
  22206. }
  22207. },
  22208. "tool": {
  22209. "type": "object",
  22210. "properties": {
  22211. "messageID": {
  22212. "type": "string"
  22213. },
  22214. "callID": {
  22215. "type": "string"
  22216. }
  22217. },
  22218. "required": ["messageID", "callID"],
  22219. "additionalProperties": false
  22220. }
  22221. },
  22222. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  22223. "additionalProperties": false
  22224. },
  22225. "PermissionNotFoundError": {
  22226. "type": "object",
  22227. "properties": {
  22228. "_tag": {
  22229. "type": "string",
  22230. "enum": ["PermissionNotFoundError"]
  22231. },
  22232. "requestID": {
  22233. "type": "string"
  22234. },
  22235. "message": {
  22236. "type": "string"
  22237. }
  22238. },
  22239. "required": ["_tag", "requestID", "message"],
  22240. "additionalProperties": false
  22241. },
  22242. "ProviderAuthMethod": {
  22243. "type": "object",
  22244. "properties": {
  22245. "type": {
  22246. "type": "string",
  22247. "enum": ["oauth", "api"]
  22248. },
  22249. "label": {
  22250. "type": "string"
  22251. },
  22252. "prompts": {
  22253. "type": "array",
  22254. "items": {
  22255. "anyOf": [
  22256. {
  22257. "type": "object",
  22258. "properties": {
  22259. "type": {
  22260. "type": "string",
  22261. "enum": ["text"]
  22262. },
  22263. "key": {
  22264. "type": "string"
  22265. },
  22266. "message": {
  22267. "type": "string"
  22268. },
  22269. "placeholder": {
  22270. "type": "string"
  22271. },
  22272. "when": {
  22273. "type": "object",
  22274. "properties": {
  22275. "key": {
  22276. "type": "string"
  22277. },
  22278. "op": {
  22279. "type": "string",
  22280. "enum": ["eq", "neq"]
  22281. },
  22282. "value": {
  22283. "type": "string"
  22284. }
  22285. },
  22286. "required": ["key", "op", "value"],
  22287. "additionalProperties": false
  22288. }
  22289. },
  22290. "required": ["type", "key", "message"],
  22291. "additionalProperties": false
  22292. },
  22293. {
  22294. "type": "object",
  22295. "properties": {
  22296. "type": {
  22297. "type": "string",
  22298. "enum": ["select"]
  22299. },
  22300. "key": {
  22301. "type": "string"
  22302. },
  22303. "message": {
  22304. "type": "string"
  22305. },
  22306. "options": {
  22307. "type": "array",
  22308. "items": {
  22309. "type": "object",
  22310. "properties": {
  22311. "label": {
  22312. "type": "string"
  22313. },
  22314. "value": {
  22315. "type": "string"
  22316. },
  22317. "hint": {
  22318. "type": "string"
  22319. }
  22320. },
  22321. "required": ["label", "value"],
  22322. "additionalProperties": false
  22323. }
  22324. },
  22325. "when": {
  22326. "type": "object",
  22327. "properties": {
  22328. "key": {
  22329. "type": "string"
  22330. },
  22331. "op": {
  22332. "type": "string",
  22333. "enum": ["eq", "neq"]
  22334. },
  22335. "value": {
  22336. "type": "string"
  22337. }
  22338. },
  22339. "required": ["key", "op", "value"],
  22340. "additionalProperties": false
  22341. }
  22342. },
  22343. "required": ["type", "key", "message", "options"],
  22344. "additionalProperties": false
  22345. }
  22346. ]
  22347. }
  22348. }
  22349. },
  22350. "required": ["type", "label"],
  22351. "additionalProperties": false
  22352. },
  22353. "ProviderAuthAuthorization": {
  22354. "type": "object",
  22355. "properties": {
  22356. "url": {
  22357. "type": "string"
  22358. },
  22359. "method": {
  22360. "type": "string",
  22361. "enum": ["auto", "code"]
  22362. },
  22363. "instructions": {
  22364. "type": "string"
  22365. }
  22366. },
  22367. "required": ["url", "method", "instructions"],
  22368. "additionalProperties": false
  22369. },
  22370. "ProviderAuthError1": {
  22371. "type": "object",
  22372. "properties": {
  22373. "name": {
  22374. "type": "string",
  22375. "enum": [
  22376. "BadRequest",
  22377. "ProviderAuthOauthMissing",
  22378. "ProviderAuthOauthCodeMissing",
  22379. "ProviderAuthOauthCallbackFailed",
  22380. "ProviderAuthValidationFailed"
  22381. ]
  22382. },
  22383. "data": {
  22384. "type": "object",
  22385. "properties": {
  22386. "providerID": {
  22387. "type": "string"
  22388. },
  22389. "field": {
  22390. "type": "string"
  22391. },
  22392. "message": {
  22393. "type": "string"
  22394. },
  22395. "kind": {
  22396. "type": "string"
  22397. }
  22398. },
  22399. "additionalProperties": false
  22400. }
  22401. },
  22402. "required": ["name", "data"],
  22403. "additionalProperties": false
  22404. },
  22405. "NotFoundError": {
  22406. "type": "object",
  22407. "required": ["name", "data"],
  22408. "properties": {
  22409. "name": {
  22410. "type": "string",
  22411. "enum": ["NotFoundError"]
  22412. },
  22413. "data": {
  22414. "type": "object",
  22415. "required": ["message"],
  22416. "properties": {
  22417. "message": {
  22418. "type": "string"
  22419. }
  22420. }
  22421. }
  22422. }
  22423. },
  22424. "TextPartInput": {
  22425. "type": "object",
  22426. "properties": {
  22427. "id": {
  22428. "type": "string",
  22429. "pattern": "^prt"
  22430. },
  22431. "type": {
  22432. "type": "string",
  22433. "enum": ["text"]
  22434. },
  22435. "text": {
  22436. "type": "string"
  22437. },
  22438. "synthetic": {
  22439. "type": "boolean"
  22440. },
  22441. "ignored": {
  22442. "type": "boolean"
  22443. },
  22444. "time": {
  22445. "type": "object",
  22446. "properties": {
  22447. "start": {
  22448. "type": "integer",
  22449. "minimum": 0
  22450. },
  22451. "end": {
  22452. "type": "integer",
  22453. "minimum": 0
  22454. }
  22455. },
  22456. "required": ["start"],
  22457. "additionalProperties": false
  22458. },
  22459. "metadata": {
  22460. "type": "object"
  22461. }
  22462. },
  22463. "required": ["type", "text"],
  22464. "additionalProperties": false
  22465. },
  22466. "FilePartInput": {
  22467. "type": "object",
  22468. "properties": {
  22469. "id": {
  22470. "type": "string",
  22471. "pattern": "^prt"
  22472. },
  22473. "type": {
  22474. "type": "string",
  22475. "enum": ["file"]
  22476. },
  22477. "mime": {
  22478. "type": "string"
  22479. },
  22480. "filename": {
  22481. "type": "string"
  22482. },
  22483. "url": {
  22484. "type": "string"
  22485. },
  22486. "source": {
  22487. "$ref": "#/components/schemas/FilePartSource"
  22488. }
  22489. },
  22490. "required": ["type", "mime", "url"],
  22491. "additionalProperties": false
  22492. },
  22493. "AgentPartInput": {
  22494. "type": "object",
  22495. "properties": {
  22496. "id": {
  22497. "type": "string",
  22498. "pattern": "^prt"
  22499. },
  22500. "type": {
  22501. "type": "string",
  22502. "enum": ["agent"]
  22503. },
  22504. "name": {
  22505. "type": "string"
  22506. },
  22507. "source": {
  22508. "type": "object",
  22509. "properties": {
  22510. "value": {
  22511. "type": "string"
  22512. },
  22513. "start": {
  22514. "type": "integer",
  22515. "minimum": 0
  22516. },
  22517. "end": {
  22518. "type": "integer",
  22519. "minimum": 0
  22520. }
  22521. },
  22522. "required": ["value", "start", "end"],
  22523. "additionalProperties": false
  22524. }
  22525. },
  22526. "required": ["type", "name"],
  22527. "additionalProperties": false
  22528. },
  22529. "SubtaskPartInput": {
  22530. "type": "object",
  22531. "properties": {
  22532. "id": {
  22533. "type": "string",
  22534. "pattern": "^prt"
  22535. },
  22536. "type": {
  22537. "type": "string",
  22538. "enum": ["subtask"]
  22539. },
  22540. "prompt": {
  22541. "type": "string"
  22542. },
  22543. "description": {
  22544. "type": "string"
  22545. },
  22546. "agent": {
  22547. "type": "string"
  22548. },
  22549. "model": {
  22550. "type": "object",
  22551. "properties": {
  22552. "providerID": {
  22553. "type": "string"
  22554. },
  22555. "modelID": {
  22556. "type": "string"
  22557. }
  22558. },
  22559. "required": ["providerID", "modelID"],
  22560. "additionalProperties": false
  22561. },
  22562. "command": {
  22563. "type": "string"
  22564. }
  22565. },
  22566. "required": ["type", "prompt", "description", "agent"],
  22567. "additionalProperties": false
  22568. },
  22569. "SessionBusyError": {
  22570. "type": "object",
  22571. "properties": {
  22572. "_tag": {
  22573. "type": "string",
  22574. "enum": ["SessionBusyError"]
  22575. },
  22576. "sessionID": {
  22577. "type": "string"
  22578. },
  22579. "message": {
  22580. "type": "string"
  22581. }
  22582. },
  22583. "required": ["_tag", "sessionID", "message"],
  22584. "additionalProperties": false
  22585. },
  22586. "EventTuiPromptAppend": {
  22587. "type": "object",
  22588. "properties": {
  22589. "type": {
  22590. "type": "string",
  22591. "enum": ["tui.prompt.append"]
  22592. },
  22593. "properties": {
  22594. "type": "object",
  22595. "properties": {
  22596. "text": {
  22597. "type": "string"
  22598. }
  22599. },
  22600. "required": ["text"],
  22601. "additionalProperties": false
  22602. }
  22603. },
  22604. "required": ["type", "properties"],
  22605. "additionalProperties": false
  22606. },
  22607. "EventTuiCommandExecute": {
  22608. "type": "object",
  22609. "properties": {
  22610. "type": {
  22611. "type": "string",
  22612. "enum": ["tui.command.execute"]
  22613. },
  22614. "properties": {
  22615. "type": "object",
  22616. "properties": {
  22617. "command": {
  22618. "anyOf": [
  22619. {
  22620. "type": "string",
  22621. "enum": [
  22622. "session.list",
  22623. "session.new",
  22624. "session.share",
  22625. "session.interrupt",
  22626. "session.compact",
  22627. "session.page.up",
  22628. "session.page.down",
  22629. "session.line.up",
  22630. "session.line.down",
  22631. "session.half.page.up",
  22632. "session.half.page.down",
  22633. "session.first",
  22634. "session.last",
  22635. "prompt.clear",
  22636. "prompt.submit",
  22637. "agent.cycle"
  22638. ]
  22639. },
  22640. {
  22641. "type": "string"
  22642. }
  22643. ]
  22644. }
  22645. },
  22646. "required": ["command"],
  22647. "additionalProperties": false
  22648. }
  22649. },
  22650. "required": ["type", "properties"],
  22651. "additionalProperties": false
  22652. },
  22653. "EventTuiToastShow": {
  22654. "type": "object",
  22655. "properties": {
  22656. "type": {
  22657. "type": "string",
  22658. "enum": ["tui.toast.show"]
  22659. },
  22660. "properties": {
  22661. "type": "object",
  22662. "properties": {
  22663. "title": {
  22664. "type": "string"
  22665. },
  22666. "message": {
  22667. "type": "string"
  22668. },
  22669. "variant": {
  22670. "type": "string",
  22671. "enum": ["info", "success", "warning", "error"]
  22672. },
  22673. "duration": {
  22674. "type": "integer",
  22675. "exclusiveMinimum": 0
  22676. }
  22677. },
  22678. "required": ["message", "variant"],
  22679. "additionalProperties": false
  22680. }
  22681. },
  22682. "required": ["type", "properties"],
  22683. "additionalProperties": false
  22684. },
  22685. "EventTuiSessionSelect": {
  22686. "type": "object",
  22687. "properties": {
  22688. "type": {
  22689. "type": "string",
  22690. "enum": ["tui.session.select"]
  22691. },
  22692. "properties": {
  22693. "type": "object",
  22694. "properties": {
  22695. "sessionID": {
  22696. "type": "string",
  22697. "pattern": "^ses",
  22698. "description": "Session ID to navigate to"
  22699. }
  22700. },
  22701. "required": ["sessionID"],
  22702. "additionalProperties": false
  22703. }
  22704. },
  22705. "required": ["type", "properties"],
  22706. "additionalProperties": false
  22707. },
  22708. "Workspace": {
  22709. "type": "object",
  22710. "properties": {
  22711. "id": {
  22712. "type": "string",
  22713. "pattern": "^wrk"
  22714. },
  22715. "type": {
  22716. "type": "string"
  22717. },
  22718. "name": {
  22719. "type": "string"
  22720. },
  22721. "branch": {
  22722. "anyOf": [
  22723. {
  22724. "type": "string"
  22725. },
  22726. {
  22727. "type": "null"
  22728. }
  22729. ]
  22730. },
  22731. "directory": {
  22732. "anyOf": [
  22733. {
  22734. "type": "string"
  22735. },
  22736. {
  22737. "type": "null"
  22738. }
  22739. ]
  22740. },
  22741. "extra": {
  22742. "anyOf": [
  22743. {},
  22744. {
  22745. "type": "null"
  22746. }
  22747. ]
  22748. },
  22749. "projectID": {
  22750. "type": "string"
  22751. },
  22752. "timeUsed": {
  22753. "anyOf": [
  22754. {
  22755. "type": "number"
  22756. },
  22757. {
  22758. "type": "string",
  22759. "enum": ["NaN"]
  22760. },
  22761. {
  22762. "type": "string",
  22763. "enum": ["Infinity"]
  22764. },
  22765. {
  22766. "type": "string",
  22767. "enum": ["-Infinity"]
  22768. },
  22769. {
  22770. "type": "string",
  22771. "enum": ["Infinity", "-Infinity", "NaN"]
  22772. }
  22773. ]
  22774. }
  22775. },
  22776. "required": ["id", "type", "name", "projectID", "timeUsed"],
  22777. "additionalProperties": false
  22778. },
  22779. "WorkspaceCreateError": {
  22780. "type": "object",
  22781. "properties": {
  22782. "name": {
  22783. "type": "string",
  22784. "enum": ["WorkspaceCreateError"]
  22785. },
  22786. "data": {
  22787. "type": "object",
  22788. "properties": {
  22789. "message": {
  22790. "type": "string"
  22791. }
  22792. },
  22793. "required": ["message"],
  22794. "additionalProperties": false
  22795. }
  22796. },
  22797. "required": ["name", "data"],
  22798. "additionalProperties": false
  22799. },
  22800. "WorkspaceWarpError": {
  22801. "type": "object",
  22802. "properties": {
  22803. "name": {
  22804. "type": "string",
  22805. "enum": ["WorkspaceWarpError"]
  22806. },
  22807. "data": {
  22808. "type": "object",
  22809. "properties": {
  22810. "message": {
  22811. "type": "string"
  22812. }
  22813. },
  22814. "required": ["message"],
  22815. "additionalProperties": false
  22816. }
  22817. },
  22818. "required": ["name", "data"],
  22819. "additionalProperties": false
  22820. },
  22821. "UnauthorizedError": {
  22822. "type": "object",
  22823. "properties": {
  22824. "_tag": {
  22825. "type": "string",
  22826. "enum": ["UnauthorizedError"]
  22827. },
  22828. "message": {
  22829. "type": "string"
  22830. }
  22831. },
  22832. "required": ["_tag", "message"],
  22833. "additionalProperties": false
  22834. },
  22835. "SessionsResponse": {
  22836. "type": "object",
  22837. "properties": {
  22838. "data": {
  22839. "type": "array",
  22840. "items": {
  22841. "$ref": "#/components/schemas/SessionV2Info"
  22842. }
  22843. },
  22844. "cursor": {
  22845. "type": "object",
  22846. "properties": {
  22847. "previous": {
  22848. "type": "string"
  22849. },
  22850. "next": {
  22851. "type": "string"
  22852. }
  22853. },
  22854. "additionalProperties": false
  22855. }
  22856. },
  22857. "required": ["data", "cursor"],
  22858. "additionalProperties": false
  22859. },
  22860. "InvalidCursorError": {
  22861. "type": "object",
  22862. "properties": {
  22863. "_tag": {
  22864. "type": "string",
  22865. "enum": ["InvalidCursorError"]
  22866. },
  22867. "message": {
  22868. "type": "string"
  22869. }
  22870. },
  22871. "required": ["_tag", "message"],
  22872. "additionalProperties": false
  22873. },
  22874. "SessionNotFoundError": {
  22875. "type": "object",
  22876. "properties": {
  22877. "_tag": {
  22878. "type": "string",
  22879. "enum": ["SessionNotFoundError"]
  22880. },
  22881. "sessionID": {
  22882. "type": "string"
  22883. },
  22884. "message": {
  22885. "type": "string"
  22886. }
  22887. },
  22888. "required": ["_tag", "sessionID", "message"],
  22889. "additionalProperties": false
  22890. },
  22891. "ConflictError": {
  22892. "type": "object",
  22893. "properties": {
  22894. "_tag": {
  22895. "type": "string",
  22896. "enum": ["ConflictError"]
  22897. },
  22898. "message": {
  22899. "type": "string"
  22900. },
  22901. "resource": {
  22902. "type": "string"
  22903. }
  22904. },
  22905. "required": ["_tag", "message"],
  22906. "additionalProperties": false
  22907. },
  22908. "ServiceUnavailableError": {
  22909. "type": "object",
  22910. "properties": {
  22911. "_tag": {
  22912. "type": "string",
  22913. "enum": ["ServiceUnavailableError"]
  22914. },
  22915. "message": {
  22916. "type": "string"
  22917. },
  22918. "service": {
  22919. "type": "string"
  22920. }
  22921. },
  22922. "required": ["_tag", "message"],
  22923. "additionalProperties": false
  22924. },
  22925. "UnknownError1": {
  22926. "type": "object",
  22927. "properties": {
  22928. "_tag": {
  22929. "type": "string",
  22930. "enum": ["UnknownError"]
  22931. },
  22932. "message": {
  22933. "type": "string"
  22934. },
  22935. "ref": {
  22936. "type": "string"
  22937. }
  22938. },
  22939. "required": ["_tag", "message"],
  22940. "additionalProperties": false
  22941. },
  22942. "SessionMessagesResponse": {
  22943. "type": "object",
  22944. "properties": {
  22945. "data": {
  22946. "type": "array",
  22947. "items": {
  22948. "$ref": "#/components/schemas/SessionMessage"
  22949. }
  22950. },
  22951. "cursor": {
  22952. "type": "object",
  22953. "properties": {
  22954. "previous": {
  22955. "type": "string"
  22956. },
  22957. "next": {
  22958. "type": "string"
  22959. }
  22960. },
  22961. "additionalProperties": false
  22962. }
  22963. },
  22964. "required": ["data", "cursor"],
  22965. "additionalProperties": false
  22966. },
  22967. "ProviderNotFoundError": {
  22968. "type": "object",
  22969. "properties": {
  22970. "_tag": {
  22971. "type": "string",
  22972. "enum": ["ProviderNotFoundError"]
  22973. },
  22974. "providerID": {
  22975. "type": "string"
  22976. },
  22977. "message": {
  22978. "type": "string"
  22979. }
  22980. },
  22981. "required": ["_tag", "providerID", "message"],
  22982. "additionalProperties": false
  22983. },
  22984. "V2Event": {
  22985. "anyOf": [
  22986. {
  22987. "$ref": "#/components/schemas/V2EventModels-devRefreshed"
  22988. },
  22989. {
  22990. "$ref": "#/components/schemas/V2EventIntegrationUpdated"
  22991. },
  22992. {
  22993. "$ref": "#/components/schemas/V2EventCatalogUpdated"
  22994. },
  22995. {
  22996. "$ref": "#/components/schemas/V2EventSessionCreated"
  22997. },
  22998. {
  22999. "$ref": "#/components/schemas/V2EventSessionUpdated"
  23000. },
  23001. {
  23002. "$ref": "#/components/schemas/V2EventSessionDeleted"
  23003. },
  23004. {
  23005. "$ref": "#/components/schemas/V2EventMessageUpdated"
  23006. },
  23007. {
  23008. "$ref": "#/components/schemas/V2EventMessageRemoved"
  23009. },
  23010. {
  23011. "$ref": "#/components/schemas/V2EventMessagePartUpdated"
  23012. },
  23013. {
  23014. "$ref": "#/components/schemas/V2EventMessagePartRemoved"
  23015. },
  23016. {
  23017. "$ref": "#/components/schemas/V2EventSessionNextAgentSwitched"
  23018. },
  23019. {
  23020. "$ref": "#/components/schemas/V2EventSessionNextModelSwitched"
  23021. },
  23022. {
  23023. "$ref": "#/components/schemas/V2EventSessionNextMoved"
  23024. },
  23025. {
  23026. "$ref": "#/components/schemas/V2EventSessionNextPrompted"
  23027. },
  23028. {
  23029. "$ref": "#/components/schemas/V2EventSessionNextPromptAdmitted"
  23030. },
  23031. {
  23032. "$ref": "#/components/schemas/V2EventSessionNextContextUpdated"
  23033. },
  23034. {
  23035. "$ref": "#/components/schemas/V2EventSessionNextSynthetic"
  23036. },
  23037. {
  23038. "$ref": "#/components/schemas/V2EventSessionNextShellStarted"
  23039. },
  23040. {
  23041. "$ref": "#/components/schemas/V2EventSessionNextShellEnded"
  23042. },
  23043. {
  23044. "$ref": "#/components/schemas/V2EventSessionNextStepStarted"
  23045. },
  23046. {
  23047. "$ref": "#/components/schemas/V2EventSessionNextStepEnded"
  23048. },
  23049. {
  23050. "$ref": "#/components/schemas/V2EventSessionNextStepFailed"
  23051. },
  23052. {
  23053. "$ref": "#/components/schemas/V2EventSessionNextTextStarted"
  23054. },
  23055. {
  23056. "$ref": "#/components/schemas/V2EventSessionNextTextDelta"
  23057. },
  23058. {
  23059. "$ref": "#/components/schemas/V2EventSessionNextTextEnded"
  23060. },
  23061. {
  23062. "$ref": "#/components/schemas/V2EventSessionNextReasoningStarted"
  23063. },
  23064. {
  23065. "$ref": "#/components/schemas/V2EventSessionNextReasoningDelta"
  23066. },
  23067. {
  23068. "$ref": "#/components/schemas/V2EventSessionNextReasoningEnded"
  23069. },
  23070. {
  23071. "$ref": "#/components/schemas/V2EventSessionNextToolInputStarted"
  23072. },
  23073. {
  23074. "$ref": "#/components/schemas/V2EventSessionNextToolInputDelta"
  23075. },
  23076. {
  23077. "$ref": "#/components/schemas/V2EventSessionNextToolInputEnded"
  23078. },
  23079. {
  23080. "$ref": "#/components/schemas/V2EventSessionNextToolCalled"
  23081. },
  23082. {
  23083. "$ref": "#/components/schemas/V2EventSessionNextToolProgress"
  23084. },
  23085. {
  23086. "$ref": "#/components/schemas/V2EventSessionNextToolSuccess"
  23087. },
  23088. {
  23089. "$ref": "#/components/schemas/V2EventSessionNextToolFailed"
  23090. },
  23091. {
  23092. "$ref": "#/components/schemas/V2EventSessionNextRetried"
  23093. },
  23094. {
  23095. "$ref": "#/components/schemas/V2EventSessionNextCompactionStarted"
  23096. },
  23097. {
  23098. "$ref": "#/components/schemas/V2EventSessionNextCompactionDelta"
  23099. },
  23100. {
  23101. "$ref": "#/components/schemas/V2EventSessionNextCompactionEnded"
  23102. },
  23103. {
  23104. "$ref": "#/components/schemas/V2EventMessagePartDelta"
  23105. },
  23106. {
  23107. "$ref": "#/components/schemas/V2EventSessionDiff"
  23108. },
  23109. {
  23110. "$ref": "#/components/schemas/V2EventSessionError"
  23111. },
  23112. {
  23113. "$ref": "#/components/schemas/V2EventInstallationUpdated"
  23114. },
  23115. {
  23116. "$ref": "#/components/schemas/V2EventInstallationUpdate-available"
  23117. },
  23118. {
  23119. "$ref": "#/components/schemas/V2EventFileEdited"
  23120. },
  23121. {
  23122. "$ref": "#/components/schemas/V2EventReferenceUpdated"
  23123. },
  23124. {
  23125. "$ref": "#/components/schemas/V2EventPermissionV2Asked"
  23126. },
  23127. {
  23128. "$ref": "#/components/schemas/V2EventPermissionV2Replied"
  23129. },
  23130. {
  23131. "$ref": "#/components/schemas/V2EventPluginAdded"
  23132. },
  23133. {
  23134. "$ref": "#/components/schemas/V2EventProjectDirectoriesUpdated"
  23135. },
  23136. {
  23137. "$ref": "#/components/schemas/V2EventFileWatcherUpdated"
  23138. },
  23139. {
  23140. "$ref": "#/components/schemas/V2EventPtyCreated"
  23141. },
  23142. {
  23143. "$ref": "#/components/schemas/V2EventPtyUpdated"
  23144. },
  23145. {
  23146. "$ref": "#/components/schemas/V2EventPtyExited"
  23147. },
  23148. {
  23149. "$ref": "#/components/schemas/V2EventPtyDeleted"
  23150. },
  23151. {
  23152. "$ref": "#/components/schemas/V2EventQuestionV2Asked"
  23153. },
  23154. {
  23155. "$ref": "#/components/schemas/V2EventQuestionV2Replied"
  23156. },
  23157. {
  23158. "$ref": "#/components/schemas/V2EventQuestionV2Rejected"
  23159. },
  23160. {
  23161. "$ref": "#/components/schemas/V2EventTodoUpdated"
  23162. },
  23163. {
  23164. "$ref": "#/components/schemas/V2EventLspUpdated"
  23165. },
  23166. {
  23167. "$ref": "#/components/schemas/V2EventPermissionAsked"
  23168. },
  23169. {
  23170. "$ref": "#/components/schemas/V2EventPermissionReplied"
  23171. },
  23172. {
  23173. "$ref": "#/components/schemas/V2EventTuiPromptAppend"
  23174. },
  23175. {
  23176. "$ref": "#/components/schemas/V2EventTuiCommandExecute"
  23177. },
  23178. {
  23179. "$ref": "#/components/schemas/V2EventTuiToastShow"
  23180. },
  23181. {
  23182. "$ref": "#/components/schemas/V2EventTuiSessionSelect"
  23183. },
  23184. {
  23185. "$ref": "#/components/schemas/V2EventMcpToolsChanged"
  23186. },
  23187. {
  23188. "$ref": "#/components/schemas/V2EventMcpBrowserOpenFailed"
  23189. },
  23190. {
  23191. "$ref": "#/components/schemas/V2EventCommandExecuted"
  23192. },
  23193. {
  23194. "$ref": "#/components/schemas/V2EventProjectUpdated"
  23195. },
  23196. {
  23197. "$ref": "#/components/schemas/V2EventSessionStatus"
  23198. },
  23199. {
  23200. "$ref": "#/components/schemas/V2EventSessionIdle"
  23201. },
  23202. {
  23203. "$ref": "#/components/schemas/V2EventQuestionAsked"
  23204. },
  23205. {
  23206. "$ref": "#/components/schemas/V2EventQuestionReplied"
  23207. },
  23208. {
  23209. "$ref": "#/components/schemas/V2EventQuestionRejected"
  23210. },
  23211. {
  23212. "$ref": "#/components/schemas/V2EventSessionCompacted"
  23213. },
  23214. {
  23215. "$ref": "#/components/schemas/V2EventVcsBranchUpdated"
  23216. },
  23217. {
  23218. "$ref": "#/components/schemas/V2EventWorkspaceReady"
  23219. },
  23220. {
  23221. "$ref": "#/components/schemas/V2EventWorkspaceFailed"
  23222. },
  23223. {
  23224. "$ref": "#/components/schemas/V2EventWorkspaceStatus"
  23225. },
  23226. {
  23227. "$ref": "#/components/schemas/V2EventWorktreeReady"
  23228. },
  23229. {
  23230. "$ref": "#/components/schemas/V2EventWorktreeFailed"
  23231. },
  23232. {
  23233. "$ref": "#/components/schemas/V2EventServerConnected"
  23234. },
  23235. {
  23236. "$ref": "#/components/schemas/V2EventGlobalDisposed"
  23237. },
  23238. {
  23239. "$ref": "#/components/schemas/V2EventServerConnected"
  23240. }
  23241. ]
  23242. },
  23243. "ForbiddenError": {
  23244. "type": "object",
  23245. "properties": {
  23246. "_tag": {
  23247. "type": "string",
  23248. "enum": ["ForbiddenError"]
  23249. },
  23250. "message": {
  23251. "type": "string"
  23252. }
  23253. },
  23254. "required": ["_tag", "message"],
  23255. "additionalProperties": false
  23256. },
  23257. "ProjectCopyError": {
  23258. "type": "object",
  23259. "properties": {
  23260. "name": {
  23261. "type": "string",
  23262. "enum": ["ProjectCopyError"]
  23263. },
  23264. "data": {
  23265. "type": "object",
  23266. "properties": {
  23267. "message": {
  23268. "type": "string"
  23269. },
  23270. "forceRequired": {
  23271. "type": "boolean"
  23272. }
  23273. },
  23274. "required": ["message"],
  23275. "additionalProperties": false
  23276. }
  23277. },
  23278. "required": ["name", "data"],
  23279. "additionalProperties": false
  23280. },
  23281. "effect_HttpApiError_Forbidden": {
  23282. "type": "object",
  23283. "properties": {
  23284. "_tag": {
  23285. "type": "string",
  23286. "enum": ["Forbidden"]
  23287. }
  23288. },
  23289. "required": ["_tag"],
  23290. "additionalProperties": false
  23291. },
  23292. "Event.tui.prompt.append": {
  23293. "type": "object",
  23294. "properties": {
  23295. "id": {
  23296. "type": "string",
  23297. "pattern": "^evt_"
  23298. },
  23299. "type": {
  23300. "type": "string",
  23301. "enum": ["tui.prompt.append"]
  23302. },
  23303. "properties": {
  23304. "type": "object",
  23305. "properties": {
  23306. "text": {
  23307. "type": "string"
  23308. }
  23309. },
  23310. "required": ["text"],
  23311. "additionalProperties": false
  23312. }
  23313. },
  23314. "required": ["id", "type", "properties"],
  23315. "additionalProperties": false
  23316. },
  23317. "Event.tui.command.execute": {
  23318. "type": "object",
  23319. "properties": {
  23320. "id": {
  23321. "type": "string",
  23322. "pattern": "^evt_"
  23323. },
  23324. "type": {
  23325. "type": "string",
  23326. "enum": ["tui.command.execute"]
  23327. },
  23328. "properties": {
  23329. "type": "object",
  23330. "properties": {
  23331. "command": {
  23332. "anyOf": [
  23333. {
  23334. "type": "string",
  23335. "enum": [
  23336. "session.list",
  23337. "session.new",
  23338. "session.share",
  23339. "session.interrupt",
  23340. "session.compact",
  23341. "session.page.up",
  23342. "session.page.down",
  23343. "session.line.up",
  23344. "session.line.down",
  23345. "session.half.page.up",
  23346. "session.half.page.down",
  23347. "session.first",
  23348. "session.last",
  23349. "prompt.clear",
  23350. "prompt.submit",
  23351. "agent.cycle"
  23352. ]
  23353. },
  23354. {
  23355. "type": "string"
  23356. }
  23357. ]
  23358. }
  23359. },
  23360. "required": ["command"],
  23361. "additionalProperties": false
  23362. }
  23363. },
  23364. "required": ["id", "type", "properties"],
  23365. "additionalProperties": false
  23366. },
  23367. "Event.tui.toast.show": {
  23368. "type": "object",
  23369. "properties": {
  23370. "id": {
  23371. "type": "string",
  23372. "pattern": "^evt_"
  23373. },
  23374. "type": {
  23375. "type": "string",
  23376. "enum": ["tui.toast.show"]
  23377. },
  23378. "properties": {
  23379. "type": "object",
  23380. "properties": {
  23381. "title": {
  23382. "type": "string"
  23383. },
  23384. "message": {
  23385. "type": "string"
  23386. },
  23387. "variant": {
  23388. "type": "string",
  23389. "enum": ["info", "success", "warning", "error"]
  23390. },
  23391. "duration": {
  23392. "type": "integer",
  23393. "exclusiveMinimum": 0
  23394. }
  23395. },
  23396. "required": ["message", "variant"],
  23397. "additionalProperties": false
  23398. }
  23399. },
  23400. "required": ["id", "type", "properties"],
  23401. "additionalProperties": false
  23402. },
  23403. "Event.tui.session.select": {
  23404. "type": "object",
  23405. "properties": {
  23406. "id": {
  23407. "type": "string",
  23408. "pattern": "^evt_"
  23409. },
  23410. "type": {
  23411. "type": "string",
  23412. "enum": ["tui.session.select"]
  23413. },
  23414. "properties": {
  23415. "type": "object",
  23416. "properties": {
  23417. "sessionID": {
  23418. "type": "string",
  23419. "pattern": "^ses",
  23420. "description": "Session ID to navigate to"
  23421. }
  23422. },
  23423. "required": ["sessionID"],
  23424. "additionalProperties": false
  23425. }
  23426. },
  23427. "required": ["id", "type", "properties"],
  23428. "additionalProperties": false
  23429. },
  23430. "MoveSessionDestination": {
  23431. "type": "object",
  23432. "properties": {
  23433. "directory": {
  23434. "type": "string"
  23435. }
  23436. },
  23437. "required": ["directory"],
  23438. "additionalProperties": false
  23439. },
  23440. "LocationRef": {
  23441. "type": "object",
  23442. "properties": {
  23443. "directory": {
  23444. "type": "string"
  23445. },
  23446. "workspaceID": {
  23447. "type": "string",
  23448. "pattern": "^wrk"
  23449. }
  23450. },
  23451. "required": ["directory"],
  23452. "additionalProperties": false
  23453. },
  23454. "PromptSource": {
  23455. "type": "object",
  23456. "properties": {
  23457. "start": {
  23458. "type": "number"
  23459. },
  23460. "end": {
  23461. "type": "number"
  23462. },
  23463. "text": {
  23464. "type": "string"
  23465. }
  23466. },
  23467. "required": ["start", "end", "text"],
  23468. "additionalProperties": false
  23469. },
  23470. "PromptFileAttachment": {
  23471. "type": "object",
  23472. "properties": {
  23473. "uri": {
  23474. "type": "string"
  23475. },
  23476. "mime": {
  23477. "type": "string"
  23478. },
  23479. "name": {
  23480. "type": "string"
  23481. },
  23482. "description": {
  23483. "type": "string"
  23484. },
  23485. "source": {
  23486. "$ref": "#/components/schemas/PromptSource"
  23487. }
  23488. },
  23489. "required": ["uri", "mime"],
  23490. "additionalProperties": false
  23491. },
  23492. "PromptAgentAttachment": {
  23493. "type": "object",
  23494. "properties": {
  23495. "name": {
  23496. "type": "string"
  23497. },
  23498. "source": {
  23499. "$ref": "#/components/schemas/PromptSource"
  23500. }
  23501. },
  23502. "required": ["name"],
  23503. "additionalProperties": false
  23504. },
  23505. "SessionErrorUnknown": {
  23506. "type": "object",
  23507. "properties": {
  23508. "type": {
  23509. "type": "string",
  23510. "enum": ["unknown"]
  23511. },
  23512. "message": {
  23513. "type": "string"
  23514. }
  23515. },
  23516. "required": ["type", "message"],
  23517. "additionalProperties": false
  23518. },
  23519. "ToolTextContent": {
  23520. "type": "object",
  23521. "properties": {
  23522. "type": {
  23523. "type": "string",
  23524. "enum": ["text"]
  23525. },
  23526. "text": {
  23527. "type": "string"
  23528. }
  23529. },
  23530. "required": ["type", "text"],
  23531. "additionalProperties": false
  23532. },
  23533. "ToolFileContent": {
  23534. "type": "object",
  23535. "properties": {
  23536. "type": {
  23537. "type": "string",
  23538. "enum": ["file"]
  23539. },
  23540. "uri": {
  23541. "type": "string"
  23542. },
  23543. "mime": {
  23544. "type": "string"
  23545. },
  23546. "name": {
  23547. "type": "string"
  23548. }
  23549. },
  23550. "required": ["type", "uri", "mime"],
  23551. "additionalProperties": false
  23552. },
  23553. "SessionNextRetry_error": {
  23554. "type": "object",
  23555. "properties": {
  23556. "message": {
  23557. "type": "string"
  23558. },
  23559. "statusCode": {
  23560. "type": "number"
  23561. },
  23562. "isRetryable": {
  23563. "type": "boolean"
  23564. },
  23565. "responseHeaders": {
  23566. "type": "object",
  23567. "additionalProperties": {
  23568. "type": "string"
  23569. }
  23570. },
  23571. "responseBody": {
  23572. "type": "string"
  23573. },
  23574. "metadata": {
  23575. "type": "object",
  23576. "additionalProperties": {
  23577. "type": "string"
  23578. }
  23579. }
  23580. },
  23581. "required": ["message", "isRetryable"],
  23582. "additionalProperties": false
  23583. },
  23584. "PermissionV2Source": {
  23585. "type": "object",
  23586. "properties": {
  23587. "type": {
  23588. "type": "string",
  23589. "enum": ["tool"]
  23590. },
  23591. "messageID": {
  23592. "type": "string"
  23593. },
  23594. "callID": {
  23595. "type": "string"
  23596. }
  23597. },
  23598. "required": ["type", "messageID", "callID"],
  23599. "additionalProperties": false
  23600. },
  23601. "PermissionV2Reply": {
  23602. "type": "string",
  23603. "enum": ["once", "always", "reject"]
  23604. },
  23605. "QuestionV2Option": {
  23606. "type": "object",
  23607. "properties": {
  23608. "label": {
  23609. "type": "string",
  23610. "description": "Display text (1-5 words, concise)"
  23611. },
  23612. "description": {
  23613. "type": "string",
  23614. "description": "Explanation of choice"
  23615. }
  23616. },
  23617. "required": ["label", "description"],
  23618. "additionalProperties": false
  23619. },
  23620. "QuestionV2Info": {
  23621. "type": "object",
  23622. "properties": {
  23623. "question": {
  23624. "type": "string",
  23625. "description": "Complete question"
  23626. },
  23627. "header": {
  23628. "type": "string",
  23629. "description": "Very short label (max 30 chars)"
  23630. },
  23631. "options": {
  23632. "type": "array",
  23633. "items": {
  23634. "$ref": "#/components/schemas/QuestionV2Option"
  23635. },
  23636. "description": "Available choices"
  23637. },
  23638. "multiple": {
  23639. "type": "boolean"
  23640. },
  23641. "custom": {
  23642. "type": "boolean"
  23643. }
  23644. },
  23645. "required": ["question", "header", "options"],
  23646. "additionalProperties": false
  23647. },
  23648. "QuestionV2Tool": {
  23649. "type": "object",
  23650. "properties": {
  23651. "messageID": {
  23652. "type": "string"
  23653. },
  23654. "callID": {
  23655. "type": "string"
  23656. }
  23657. },
  23658. "required": ["messageID", "callID"],
  23659. "additionalProperties": false
  23660. },
  23661. "QuestionV2Answer": {
  23662. "type": "array",
  23663. "items": {
  23664. "type": "string"
  23665. }
  23666. },
  23667. "EventServerInstanceDisposed": {
  23668. "type": "object",
  23669. "properties": {
  23670. "id": {
  23671. "type": "string"
  23672. },
  23673. "type": {
  23674. "type": "string",
  23675. "enum": ["server.instance.disposed"]
  23676. },
  23677. "properties": {
  23678. "type": "object",
  23679. "properties": {
  23680. "directory": {
  23681. "type": "string"
  23682. }
  23683. },
  23684. "required": ["directory"],
  23685. "additionalProperties": false
  23686. }
  23687. },
  23688. "required": ["id", "type", "properties"],
  23689. "additionalProperties": false
  23690. },
  23691. "SyncEventSessionCreated": {
  23692. "type": "object",
  23693. "properties": {
  23694. "type": {
  23695. "type": "string",
  23696. "enum": ["sync"]
  23697. },
  23698. "id": {
  23699. "type": "string",
  23700. "pattern": "^evt_"
  23701. },
  23702. "syncEvent": {
  23703. "type": "object",
  23704. "properties": {
  23705. "type": {
  23706. "type": "string",
  23707. "enum": ["session.created.1"]
  23708. },
  23709. "id": {
  23710. "type": "string",
  23711. "pattern": "^evt_"
  23712. },
  23713. "seq": {
  23714. "type": "number"
  23715. },
  23716. "aggregateID": {
  23717. "type": "string"
  23718. },
  23719. "data": {
  23720. "type": "object",
  23721. "properties": {
  23722. "sessionID": {
  23723. "type": "string",
  23724. "pattern": "^ses"
  23725. },
  23726. "info": {
  23727. "$ref": "#/components/schemas/Session"
  23728. }
  23729. },
  23730. "required": ["sessionID", "info"],
  23731. "additionalProperties": false
  23732. }
  23733. },
  23734. "required": ["type", "id", "seq", "aggregateID", "data"],
  23735. "additionalProperties": false
  23736. }
  23737. },
  23738. "required": ["type", "id", "syncEvent"],
  23739. "additionalProperties": false
  23740. },
  23741. "SyncEventSessionUpdated": {
  23742. "type": "object",
  23743. "properties": {
  23744. "type": {
  23745. "type": "string",
  23746. "enum": ["sync"]
  23747. },
  23748. "id": {
  23749. "type": "string",
  23750. "pattern": "^evt_"
  23751. },
  23752. "syncEvent": {
  23753. "type": "object",
  23754. "properties": {
  23755. "type": {
  23756. "type": "string",
  23757. "enum": ["session.updated.1"]
  23758. },
  23759. "id": {
  23760. "type": "string",
  23761. "pattern": "^evt_"
  23762. },
  23763. "seq": {
  23764. "type": "number"
  23765. },
  23766. "aggregateID": {
  23767. "type": "string"
  23768. },
  23769. "data": {
  23770. "type": "object",
  23771. "properties": {
  23772. "sessionID": {
  23773. "type": "string",
  23774. "pattern": "^ses"
  23775. },
  23776. "info": {
  23777. "$ref": "#/components/schemas/Session"
  23778. }
  23779. },
  23780. "required": ["sessionID", "info"],
  23781. "additionalProperties": false
  23782. }
  23783. },
  23784. "required": ["type", "id", "seq", "aggregateID", "data"],
  23785. "additionalProperties": false
  23786. }
  23787. },
  23788. "required": ["type", "id", "syncEvent"],
  23789. "additionalProperties": false
  23790. },
  23791. "SyncEventSessionDeleted": {
  23792. "type": "object",
  23793. "properties": {
  23794. "type": {
  23795. "type": "string",
  23796. "enum": ["sync"]
  23797. },
  23798. "id": {
  23799. "type": "string",
  23800. "pattern": "^evt_"
  23801. },
  23802. "syncEvent": {
  23803. "type": "object",
  23804. "properties": {
  23805. "type": {
  23806. "type": "string",
  23807. "enum": ["session.deleted.1"]
  23808. },
  23809. "id": {
  23810. "type": "string",
  23811. "pattern": "^evt_"
  23812. },
  23813. "seq": {
  23814. "type": "number"
  23815. },
  23816. "aggregateID": {
  23817. "type": "string"
  23818. },
  23819. "data": {
  23820. "type": "object",
  23821. "properties": {
  23822. "sessionID": {
  23823. "type": "string",
  23824. "pattern": "^ses"
  23825. },
  23826. "info": {
  23827. "$ref": "#/components/schemas/Session"
  23828. }
  23829. },
  23830. "required": ["sessionID", "info"],
  23831. "additionalProperties": false
  23832. }
  23833. },
  23834. "required": ["type", "id", "seq", "aggregateID", "data"],
  23835. "additionalProperties": false
  23836. }
  23837. },
  23838. "required": ["type", "id", "syncEvent"],
  23839. "additionalProperties": false
  23840. },
  23841. "SyncEventMessageUpdated": {
  23842. "type": "object",
  23843. "properties": {
  23844. "type": {
  23845. "type": "string",
  23846. "enum": ["sync"]
  23847. },
  23848. "id": {
  23849. "type": "string",
  23850. "pattern": "^evt_"
  23851. },
  23852. "syncEvent": {
  23853. "type": "object",
  23854. "properties": {
  23855. "type": {
  23856. "type": "string",
  23857. "enum": ["message.updated.1"]
  23858. },
  23859. "id": {
  23860. "type": "string",
  23861. "pattern": "^evt_"
  23862. },
  23863. "seq": {
  23864. "type": "number"
  23865. },
  23866. "aggregateID": {
  23867. "type": "string"
  23868. },
  23869. "data": {
  23870. "type": "object",
  23871. "properties": {
  23872. "sessionID": {
  23873. "type": "string",
  23874. "pattern": "^ses"
  23875. },
  23876. "info": {
  23877. "$ref": "#/components/schemas/Message"
  23878. }
  23879. },
  23880. "required": ["sessionID", "info"],
  23881. "additionalProperties": false
  23882. }
  23883. },
  23884. "required": ["type", "id", "seq", "aggregateID", "data"],
  23885. "additionalProperties": false
  23886. }
  23887. },
  23888. "required": ["type", "id", "syncEvent"],
  23889. "additionalProperties": false
  23890. },
  23891. "SyncEventMessageRemoved": {
  23892. "type": "object",
  23893. "properties": {
  23894. "type": {
  23895. "type": "string",
  23896. "enum": ["sync"]
  23897. },
  23898. "id": {
  23899. "type": "string",
  23900. "pattern": "^evt_"
  23901. },
  23902. "syncEvent": {
  23903. "type": "object",
  23904. "properties": {
  23905. "type": {
  23906. "type": "string",
  23907. "enum": ["message.removed.1"]
  23908. },
  23909. "id": {
  23910. "type": "string",
  23911. "pattern": "^evt_"
  23912. },
  23913. "seq": {
  23914. "type": "number"
  23915. },
  23916. "aggregateID": {
  23917. "type": "string"
  23918. },
  23919. "data": {
  23920. "type": "object",
  23921. "properties": {
  23922. "sessionID": {
  23923. "type": "string",
  23924. "pattern": "^ses"
  23925. },
  23926. "messageID": {
  23927. "type": "string",
  23928. "pattern": "^msg"
  23929. }
  23930. },
  23931. "required": ["sessionID", "messageID"],
  23932. "additionalProperties": false
  23933. }
  23934. },
  23935. "required": ["type", "id", "seq", "aggregateID", "data"],
  23936. "additionalProperties": false
  23937. }
  23938. },
  23939. "required": ["type", "id", "syncEvent"],
  23940. "additionalProperties": false
  23941. },
  23942. "SyncEventMessagePartUpdated": {
  23943. "type": "object",
  23944. "properties": {
  23945. "type": {
  23946. "type": "string",
  23947. "enum": ["sync"]
  23948. },
  23949. "id": {
  23950. "type": "string",
  23951. "pattern": "^evt_"
  23952. },
  23953. "syncEvent": {
  23954. "type": "object",
  23955. "properties": {
  23956. "type": {
  23957. "type": "string",
  23958. "enum": ["message.part.updated.1"]
  23959. },
  23960. "id": {
  23961. "type": "string",
  23962. "pattern": "^evt_"
  23963. },
  23964. "seq": {
  23965. "type": "number"
  23966. },
  23967. "aggregateID": {
  23968. "type": "string"
  23969. },
  23970. "data": {
  23971. "type": "object",
  23972. "properties": {
  23973. "sessionID": {
  23974. "type": "string",
  23975. "pattern": "^ses"
  23976. },
  23977. "part": {
  23978. "$ref": "#/components/schemas/Part"
  23979. },
  23980. "time": {
  23981. "type": "number"
  23982. }
  23983. },
  23984. "required": ["sessionID", "part", "time"],
  23985. "additionalProperties": false
  23986. }
  23987. },
  23988. "required": ["type", "id", "seq", "aggregateID", "data"],
  23989. "additionalProperties": false
  23990. }
  23991. },
  23992. "required": ["type", "id", "syncEvent"],
  23993. "additionalProperties": false
  23994. },
  23995. "SyncEventMessagePartRemoved": {
  23996. "type": "object",
  23997. "properties": {
  23998. "type": {
  23999. "type": "string",
  24000. "enum": ["sync"]
  24001. },
  24002. "id": {
  24003. "type": "string",
  24004. "pattern": "^evt_"
  24005. },
  24006. "syncEvent": {
  24007. "type": "object",
  24008. "properties": {
  24009. "type": {
  24010. "type": "string",
  24011. "enum": ["message.part.removed.1"]
  24012. },
  24013. "id": {
  24014. "type": "string",
  24015. "pattern": "^evt_"
  24016. },
  24017. "seq": {
  24018. "type": "number"
  24019. },
  24020. "aggregateID": {
  24021. "type": "string"
  24022. },
  24023. "data": {
  24024. "type": "object",
  24025. "properties": {
  24026. "sessionID": {
  24027. "type": "string",
  24028. "pattern": "^ses"
  24029. },
  24030. "messageID": {
  24031. "type": "string",
  24032. "pattern": "^msg"
  24033. },
  24034. "partID": {
  24035. "type": "string",
  24036. "pattern": "^prt"
  24037. }
  24038. },
  24039. "required": ["sessionID", "messageID", "partID"],
  24040. "additionalProperties": false
  24041. }
  24042. },
  24043. "required": ["type", "id", "seq", "aggregateID", "data"],
  24044. "additionalProperties": false
  24045. }
  24046. },
  24047. "required": ["type", "id", "syncEvent"],
  24048. "additionalProperties": false
  24049. },
  24050. "SyncEventSessionNextAgentSwitched": {
  24051. "type": "object",
  24052. "properties": {
  24053. "type": {
  24054. "type": "string",
  24055. "enum": ["sync"]
  24056. },
  24057. "id": {
  24058. "type": "string",
  24059. "pattern": "^evt_"
  24060. },
  24061. "syncEvent": {
  24062. "type": "object",
  24063. "properties": {
  24064. "type": {
  24065. "type": "string",
  24066. "enum": ["session.next.agent.switched.1"]
  24067. },
  24068. "id": {
  24069. "type": "string",
  24070. "pattern": "^evt_"
  24071. },
  24072. "seq": {
  24073. "type": "number"
  24074. },
  24075. "aggregateID": {
  24076. "type": "string"
  24077. },
  24078. "data": {
  24079. "type": "object",
  24080. "properties": {
  24081. "timestamp": {
  24082. "type": "number"
  24083. },
  24084. "sessionID": {
  24085. "type": "string",
  24086. "pattern": "^ses"
  24087. },
  24088. "messageID": {
  24089. "type": "string",
  24090. "pattern": "^msg_"
  24091. },
  24092. "agent": {
  24093. "type": "string"
  24094. }
  24095. },
  24096. "required": ["timestamp", "sessionID", "messageID", "agent"],
  24097. "additionalProperties": false
  24098. }
  24099. },
  24100. "required": ["type", "id", "seq", "aggregateID", "data"],
  24101. "additionalProperties": false
  24102. }
  24103. },
  24104. "required": ["type", "id", "syncEvent"],
  24105. "additionalProperties": false
  24106. },
  24107. "SyncEventSessionNextModelSwitched": {
  24108. "type": "object",
  24109. "properties": {
  24110. "type": {
  24111. "type": "string",
  24112. "enum": ["sync"]
  24113. },
  24114. "id": {
  24115. "type": "string",
  24116. "pattern": "^evt_"
  24117. },
  24118. "syncEvent": {
  24119. "type": "object",
  24120. "properties": {
  24121. "type": {
  24122. "type": "string",
  24123. "enum": ["session.next.model.switched.1"]
  24124. },
  24125. "id": {
  24126. "type": "string",
  24127. "pattern": "^evt_"
  24128. },
  24129. "seq": {
  24130. "type": "number"
  24131. },
  24132. "aggregateID": {
  24133. "type": "string"
  24134. },
  24135. "data": {
  24136. "type": "object",
  24137. "properties": {
  24138. "timestamp": {
  24139. "type": "number"
  24140. },
  24141. "sessionID": {
  24142. "type": "string",
  24143. "pattern": "^ses"
  24144. },
  24145. "messageID": {
  24146. "type": "string",
  24147. "pattern": "^msg_"
  24148. },
  24149. "model": {
  24150. "type": "object",
  24151. "properties": {
  24152. "id": {
  24153. "type": "string"
  24154. },
  24155. "providerID": {
  24156. "type": "string"
  24157. },
  24158. "variant": {
  24159. "type": "string"
  24160. }
  24161. },
  24162. "required": ["id", "providerID"],
  24163. "additionalProperties": false
  24164. }
  24165. },
  24166. "required": ["timestamp", "sessionID", "messageID", "model"],
  24167. "additionalProperties": false
  24168. }
  24169. },
  24170. "required": ["type", "id", "seq", "aggregateID", "data"],
  24171. "additionalProperties": false
  24172. }
  24173. },
  24174. "required": ["type", "id", "syncEvent"],
  24175. "additionalProperties": false
  24176. },
  24177. "SyncEventSessionNextMoved": {
  24178. "type": "object",
  24179. "properties": {
  24180. "type": {
  24181. "type": "string",
  24182. "enum": ["sync"]
  24183. },
  24184. "id": {
  24185. "type": "string",
  24186. "pattern": "^evt_"
  24187. },
  24188. "syncEvent": {
  24189. "type": "object",
  24190. "properties": {
  24191. "type": {
  24192. "type": "string",
  24193. "enum": ["session.next.moved.1"]
  24194. },
  24195. "id": {
  24196. "type": "string",
  24197. "pattern": "^evt_"
  24198. },
  24199. "seq": {
  24200. "type": "number"
  24201. },
  24202. "aggregateID": {
  24203. "type": "string"
  24204. },
  24205. "data": {
  24206. "type": "object",
  24207. "properties": {
  24208. "timestamp": {
  24209. "type": "number"
  24210. },
  24211. "sessionID": {
  24212. "type": "string",
  24213. "pattern": "^ses"
  24214. },
  24215. "location": {
  24216. "$ref": "#/components/schemas/LocationRef"
  24217. },
  24218. "subdirectory": {
  24219. "type": "string"
  24220. }
  24221. },
  24222. "required": ["timestamp", "sessionID", "location"],
  24223. "additionalProperties": false
  24224. }
  24225. },
  24226. "required": ["type", "id", "seq", "aggregateID", "data"],
  24227. "additionalProperties": false
  24228. }
  24229. },
  24230. "required": ["type", "id", "syncEvent"],
  24231. "additionalProperties": false
  24232. },
  24233. "SyncEventSessionNextPrompted": {
  24234. "type": "object",
  24235. "properties": {
  24236. "type": {
  24237. "type": "string",
  24238. "enum": ["sync"]
  24239. },
  24240. "id": {
  24241. "type": "string",
  24242. "pattern": "^evt_"
  24243. },
  24244. "syncEvent": {
  24245. "type": "object",
  24246. "properties": {
  24247. "type": {
  24248. "type": "string",
  24249. "enum": ["session.next.prompted.1"]
  24250. },
  24251. "id": {
  24252. "type": "string",
  24253. "pattern": "^evt_"
  24254. },
  24255. "seq": {
  24256. "type": "number"
  24257. },
  24258. "aggregateID": {
  24259. "type": "string"
  24260. },
  24261. "data": {
  24262. "type": "object",
  24263. "properties": {
  24264. "timestamp": {
  24265. "type": "number"
  24266. },
  24267. "sessionID": {
  24268. "type": "string",
  24269. "pattern": "^ses"
  24270. },
  24271. "messageID": {
  24272. "type": "string",
  24273. "pattern": "^msg_"
  24274. },
  24275. "prompt": {
  24276. "$ref": "#/components/schemas/Prompt"
  24277. },
  24278. "delivery": {
  24279. "type": "string",
  24280. "enum": ["steer", "queue"]
  24281. }
  24282. },
  24283. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  24284. "additionalProperties": false
  24285. }
  24286. },
  24287. "required": ["type", "id", "seq", "aggregateID", "data"],
  24288. "additionalProperties": false
  24289. }
  24290. },
  24291. "required": ["type", "id", "syncEvent"],
  24292. "additionalProperties": false
  24293. },
  24294. "SyncEventSessionNextPromptAdmitted": {
  24295. "type": "object",
  24296. "properties": {
  24297. "type": {
  24298. "type": "string",
  24299. "enum": ["sync"]
  24300. },
  24301. "id": {
  24302. "type": "string",
  24303. "pattern": "^evt_"
  24304. },
  24305. "syncEvent": {
  24306. "type": "object",
  24307. "properties": {
  24308. "type": {
  24309. "type": "string",
  24310. "enum": ["session.next.prompt.admitted.1"]
  24311. },
  24312. "id": {
  24313. "type": "string",
  24314. "pattern": "^evt_"
  24315. },
  24316. "seq": {
  24317. "type": "number"
  24318. },
  24319. "aggregateID": {
  24320. "type": "string"
  24321. },
  24322. "data": {
  24323. "type": "object",
  24324. "properties": {
  24325. "timestamp": {
  24326. "type": "number"
  24327. },
  24328. "sessionID": {
  24329. "type": "string",
  24330. "pattern": "^ses"
  24331. },
  24332. "messageID": {
  24333. "type": "string",
  24334. "pattern": "^msg_"
  24335. },
  24336. "prompt": {
  24337. "$ref": "#/components/schemas/Prompt"
  24338. },
  24339. "delivery": {
  24340. "type": "string",
  24341. "enum": ["steer", "queue"]
  24342. }
  24343. },
  24344. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  24345. "additionalProperties": false
  24346. }
  24347. },
  24348. "required": ["type", "id", "seq", "aggregateID", "data"],
  24349. "additionalProperties": false
  24350. }
  24351. },
  24352. "required": ["type", "id", "syncEvent"],
  24353. "additionalProperties": false
  24354. },
  24355. "SyncEventSessionNextContextUpdated": {
  24356. "type": "object",
  24357. "properties": {
  24358. "type": {
  24359. "type": "string",
  24360. "enum": ["sync"]
  24361. },
  24362. "id": {
  24363. "type": "string",
  24364. "pattern": "^evt_"
  24365. },
  24366. "syncEvent": {
  24367. "type": "object",
  24368. "properties": {
  24369. "type": {
  24370. "type": "string",
  24371. "enum": ["session.next.context.updated.1"]
  24372. },
  24373. "id": {
  24374. "type": "string",
  24375. "pattern": "^evt_"
  24376. },
  24377. "seq": {
  24378. "type": "number"
  24379. },
  24380. "aggregateID": {
  24381. "type": "string"
  24382. },
  24383. "data": {
  24384. "type": "object",
  24385. "properties": {
  24386. "timestamp": {
  24387. "type": "number"
  24388. },
  24389. "sessionID": {
  24390. "type": "string",
  24391. "pattern": "^ses"
  24392. },
  24393. "messageID": {
  24394. "type": "string",
  24395. "pattern": "^msg_"
  24396. },
  24397. "text": {
  24398. "type": "string"
  24399. }
  24400. },
  24401. "required": ["timestamp", "sessionID", "messageID", "text"],
  24402. "additionalProperties": false
  24403. }
  24404. },
  24405. "required": ["type", "id", "seq", "aggregateID", "data"],
  24406. "additionalProperties": false
  24407. }
  24408. },
  24409. "required": ["type", "id", "syncEvent"],
  24410. "additionalProperties": false
  24411. },
  24412. "SyncEventSessionNextSynthetic": {
  24413. "type": "object",
  24414. "properties": {
  24415. "type": {
  24416. "type": "string",
  24417. "enum": ["sync"]
  24418. },
  24419. "id": {
  24420. "type": "string",
  24421. "pattern": "^evt_"
  24422. },
  24423. "syncEvent": {
  24424. "type": "object",
  24425. "properties": {
  24426. "type": {
  24427. "type": "string",
  24428. "enum": ["session.next.synthetic.1"]
  24429. },
  24430. "id": {
  24431. "type": "string",
  24432. "pattern": "^evt_"
  24433. },
  24434. "seq": {
  24435. "type": "number"
  24436. },
  24437. "aggregateID": {
  24438. "type": "string"
  24439. },
  24440. "data": {
  24441. "type": "object",
  24442. "properties": {
  24443. "timestamp": {
  24444. "type": "number"
  24445. },
  24446. "sessionID": {
  24447. "type": "string",
  24448. "pattern": "^ses"
  24449. },
  24450. "messageID": {
  24451. "type": "string",
  24452. "pattern": "^msg_"
  24453. },
  24454. "text": {
  24455. "type": "string"
  24456. }
  24457. },
  24458. "required": ["timestamp", "sessionID", "messageID", "text"],
  24459. "additionalProperties": false
  24460. }
  24461. },
  24462. "required": ["type", "id", "seq", "aggregateID", "data"],
  24463. "additionalProperties": false
  24464. }
  24465. },
  24466. "required": ["type", "id", "syncEvent"],
  24467. "additionalProperties": false
  24468. },
  24469. "SyncEventSessionNextShellStarted": {
  24470. "type": "object",
  24471. "properties": {
  24472. "type": {
  24473. "type": "string",
  24474. "enum": ["sync"]
  24475. },
  24476. "id": {
  24477. "type": "string",
  24478. "pattern": "^evt_"
  24479. },
  24480. "syncEvent": {
  24481. "type": "object",
  24482. "properties": {
  24483. "type": {
  24484. "type": "string",
  24485. "enum": ["session.next.shell.started.1"]
  24486. },
  24487. "id": {
  24488. "type": "string",
  24489. "pattern": "^evt_"
  24490. },
  24491. "seq": {
  24492. "type": "number"
  24493. },
  24494. "aggregateID": {
  24495. "type": "string"
  24496. },
  24497. "data": {
  24498. "type": "object",
  24499. "properties": {
  24500. "timestamp": {
  24501. "type": "number"
  24502. },
  24503. "sessionID": {
  24504. "type": "string",
  24505. "pattern": "^ses"
  24506. },
  24507. "messageID": {
  24508. "type": "string",
  24509. "pattern": "^msg_"
  24510. },
  24511. "callID": {
  24512. "type": "string"
  24513. },
  24514. "command": {
  24515. "type": "string"
  24516. }
  24517. },
  24518. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  24519. "additionalProperties": false
  24520. }
  24521. },
  24522. "required": ["type", "id", "seq", "aggregateID", "data"],
  24523. "additionalProperties": false
  24524. }
  24525. },
  24526. "required": ["type", "id", "syncEvent"],
  24527. "additionalProperties": false
  24528. },
  24529. "SyncEventSessionNextShellEnded": {
  24530. "type": "object",
  24531. "properties": {
  24532. "type": {
  24533. "type": "string",
  24534. "enum": ["sync"]
  24535. },
  24536. "id": {
  24537. "type": "string",
  24538. "pattern": "^evt_"
  24539. },
  24540. "syncEvent": {
  24541. "type": "object",
  24542. "properties": {
  24543. "type": {
  24544. "type": "string",
  24545. "enum": ["session.next.shell.ended.1"]
  24546. },
  24547. "id": {
  24548. "type": "string",
  24549. "pattern": "^evt_"
  24550. },
  24551. "seq": {
  24552. "type": "number"
  24553. },
  24554. "aggregateID": {
  24555. "type": "string"
  24556. },
  24557. "data": {
  24558. "type": "object",
  24559. "properties": {
  24560. "timestamp": {
  24561. "type": "number"
  24562. },
  24563. "sessionID": {
  24564. "type": "string",
  24565. "pattern": "^ses"
  24566. },
  24567. "callID": {
  24568. "type": "string"
  24569. },
  24570. "output": {
  24571. "type": "string"
  24572. }
  24573. },
  24574. "required": ["timestamp", "sessionID", "callID", "output"],
  24575. "additionalProperties": false
  24576. }
  24577. },
  24578. "required": ["type", "id", "seq", "aggregateID", "data"],
  24579. "additionalProperties": false
  24580. }
  24581. },
  24582. "required": ["type", "id", "syncEvent"],
  24583. "additionalProperties": false
  24584. },
  24585. "SyncEventSessionNextStepStarted": {
  24586. "type": "object",
  24587. "properties": {
  24588. "type": {
  24589. "type": "string",
  24590. "enum": ["sync"]
  24591. },
  24592. "id": {
  24593. "type": "string",
  24594. "pattern": "^evt_"
  24595. },
  24596. "syncEvent": {
  24597. "type": "object",
  24598. "properties": {
  24599. "type": {
  24600. "type": "string",
  24601. "enum": ["session.next.step.started.1"]
  24602. },
  24603. "id": {
  24604. "type": "string",
  24605. "pattern": "^evt_"
  24606. },
  24607. "seq": {
  24608. "type": "number"
  24609. },
  24610. "aggregateID": {
  24611. "type": "string"
  24612. },
  24613. "data": {
  24614. "type": "object",
  24615. "properties": {
  24616. "timestamp": {
  24617. "type": "number"
  24618. },
  24619. "sessionID": {
  24620. "type": "string",
  24621. "pattern": "^ses"
  24622. },
  24623. "assistantMessageID": {
  24624. "type": "string",
  24625. "pattern": "^msg_"
  24626. },
  24627. "agent": {
  24628. "type": "string"
  24629. },
  24630. "model": {
  24631. "type": "object",
  24632. "properties": {
  24633. "id": {
  24634. "type": "string"
  24635. },
  24636. "providerID": {
  24637. "type": "string"
  24638. },
  24639. "variant": {
  24640. "type": "string"
  24641. }
  24642. },
  24643. "required": ["id", "providerID"],
  24644. "additionalProperties": false
  24645. },
  24646. "snapshot": {
  24647. "type": "string"
  24648. }
  24649. },
  24650. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  24651. "additionalProperties": false
  24652. }
  24653. },
  24654. "required": ["type", "id", "seq", "aggregateID", "data"],
  24655. "additionalProperties": false
  24656. }
  24657. },
  24658. "required": ["type", "id", "syncEvent"],
  24659. "additionalProperties": false
  24660. },
  24661. "SyncEventSessionNextStepEnded": {
  24662. "type": "object",
  24663. "properties": {
  24664. "type": {
  24665. "type": "string",
  24666. "enum": ["sync"]
  24667. },
  24668. "id": {
  24669. "type": "string",
  24670. "pattern": "^evt_"
  24671. },
  24672. "syncEvent": {
  24673. "type": "object",
  24674. "properties": {
  24675. "type": {
  24676. "type": "string",
  24677. "enum": ["session.next.step.ended.2"]
  24678. },
  24679. "id": {
  24680. "type": "string",
  24681. "pattern": "^evt_"
  24682. },
  24683. "seq": {
  24684. "type": "number"
  24685. },
  24686. "aggregateID": {
  24687. "type": "string"
  24688. },
  24689. "data": {
  24690. "type": "object",
  24691. "properties": {
  24692. "timestamp": {
  24693. "type": "number"
  24694. },
  24695. "sessionID": {
  24696. "type": "string",
  24697. "pattern": "^ses"
  24698. },
  24699. "assistantMessageID": {
  24700. "type": "string",
  24701. "pattern": "^msg_"
  24702. },
  24703. "finish": {
  24704. "type": "string"
  24705. },
  24706. "cost": {
  24707. "type": "number"
  24708. },
  24709. "tokens": {
  24710. "type": "object",
  24711. "properties": {
  24712. "input": {
  24713. "type": "number"
  24714. },
  24715. "output": {
  24716. "type": "number"
  24717. },
  24718. "reasoning": {
  24719. "type": "number"
  24720. },
  24721. "cache": {
  24722. "type": "object",
  24723. "properties": {
  24724. "read": {
  24725. "type": "number"
  24726. },
  24727. "write": {
  24728. "type": "number"
  24729. }
  24730. },
  24731. "required": ["read", "write"],
  24732. "additionalProperties": false
  24733. }
  24734. },
  24735. "required": ["input", "output", "reasoning", "cache"],
  24736. "additionalProperties": false
  24737. },
  24738. "snapshot": {
  24739. "type": "string"
  24740. }
  24741. },
  24742. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  24743. "additionalProperties": false
  24744. }
  24745. },
  24746. "required": ["type", "id", "seq", "aggregateID", "data"],
  24747. "additionalProperties": false
  24748. }
  24749. },
  24750. "required": ["type", "id", "syncEvent"],
  24751. "additionalProperties": false
  24752. },
  24753. "SyncEventSessionNextStepFailed": {
  24754. "type": "object",
  24755. "properties": {
  24756. "type": {
  24757. "type": "string",
  24758. "enum": ["sync"]
  24759. },
  24760. "id": {
  24761. "type": "string",
  24762. "pattern": "^evt_"
  24763. },
  24764. "syncEvent": {
  24765. "type": "object",
  24766. "properties": {
  24767. "type": {
  24768. "type": "string",
  24769. "enum": ["session.next.step.failed.2"]
  24770. },
  24771. "id": {
  24772. "type": "string",
  24773. "pattern": "^evt_"
  24774. },
  24775. "seq": {
  24776. "type": "number"
  24777. },
  24778. "aggregateID": {
  24779. "type": "string"
  24780. },
  24781. "data": {
  24782. "type": "object",
  24783. "properties": {
  24784. "timestamp": {
  24785. "type": "number"
  24786. },
  24787. "sessionID": {
  24788. "type": "string",
  24789. "pattern": "^ses"
  24790. },
  24791. "assistantMessageID": {
  24792. "type": "string",
  24793. "pattern": "^msg_"
  24794. },
  24795. "error": {
  24796. "$ref": "#/components/schemas/SessionErrorUnknown"
  24797. }
  24798. },
  24799. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  24800. "additionalProperties": false
  24801. }
  24802. },
  24803. "required": ["type", "id", "seq", "aggregateID", "data"],
  24804. "additionalProperties": false
  24805. }
  24806. },
  24807. "required": ["type", "id", "syncEvent"],
  24808. "additionalProperties": false
  24809. },
  24810. "SyncEventSessionNextTextStarted": {
  24811. "type": "object",
  24812. "properties": {
  24813. "type": {
  24814. "type": "string",
  24815. "enum": ["sync"]
  24816. },
  24817. "id": {
  24818. "type": "string",
  24819. "pattern": "^evt_"
  24820. },
  24821. "syncEvent": {
  24822. "type": "object",
  24823. "properties": {
  24824. "type": {
  24825. "type": "string",
  24826. "enum": ["session.next.text.started.1"]
  24827. },
  24828. "id": {
  24829. "type": "string",
  24830. "pattern": "^evt_"
  24831. },
  24832. "seq": {
  24833. "type": "number"
  24834. },
  24835. "aggregateID": {
  24836. "type": "string"
  24837. },
  24838. "data": {
  24839. "type": "object",
  24840. "properties": {
  24841. "timestamp": {
  24842. "type": "number"
  24843. },
  24844. "sessionID": {
  24845. "type": "string",
  24846. "pattern": "^ses"
  24847. },
  24848. "assistantMessageID": {
  24849. "type": "string",
  24850. "pattern": "^msg_"
  24851. },
  24852. "textID": {
  24853. "type": "string"
  24854. }
  24855. },
  24856. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  24857. "additionalProperties": false
  24858. }
  24859. },
  24860. "required": ["type", "id", "seq", "aggregateID", "data"],
  24861. "additionalProperties": false
  24862. }
  24863. },
  24864. "required": ["type", "id", "syncEvent"],
  24865. "additionalProperties": false
  24866. },
  24867. "SyncEventSessionNextTextEnded": {
  24868. "type": "object",
  24869. "properties": {
  24870. "type": {
  24871. "type": "string",
  24872. "enum": ["sync"]
  24873. },
  24874. "id": {
  24875. "type": "string",
  24876. "pattern": "^evt_"
  24877. },
  24878. "syncEvent": {
  24879. "type": "object",
  24880. "properties": {
  24881. "type": {
  24882. "type": "string",
  24883. "enum": ["session.next.text.ended.1"]
  24884. },
  24885. "id": {
  24886. "type": "string",
  24887. "pattern": "^evt_"
  24888. },
  24889. "seq": {
  24890. "type": "number"
  24891. },
  24892. "aggregateID": {
  24893. "type": "string"
  24894. },
  24895. "data": {
  24896. "type": "object",
  24897. "properties": {
  24898. "timestamp": {
  24899. "type": "number"
  24900. },
  24901. "sessionID": {
  24902. "type": "string",
  24903. "pattern": "^ses"
  24904. },
  24905. "assistantMessageID": {
  24906. "type": "string",
  24907. "pattern": "^msg_"
  24908. },
  24909. "textID": {
  24910. "type": "string"
  24911. },
  24912. "text": {
  24913. "type": "string"
  24914. }
  24915. },
  24916. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  24917. "additionalProperties": false
  24918. }
  24919. },
  24920. "required": ["type", "id", "seq", "aggregateID", "data"],
  24921. "additionalProperties": false
  24922. }
  24923. },
  24924. "required": ["type", "id", "syncEvent"],
  24925. "additionalProperties": false
  24926. },
  24927. "SyncEventSessionNextReasoningStarted": {
  24928. "type": "object",
  24929. "properties": {
  24930. "type": {
  24931. "type": "string",
  24932. "enum": ["sync"]
  24933. },
  24934. "id": {
  24935. "type": "string",
  24936. "pattern": "^evt_"
  24937. },
  24938. "syncEvent": {
  24939. "type": "object",
  24940. "properties": {
  24941. "type": {
  24942. "type": "string",
  24943. "enum": ["session.next.reasoning.started.1"]
  24944. },
  24945. "id": {
  24946. "type": "string",
  24947. "pattern": "^evt_"
  24948. },
  24949. "seq": {
  24950. "type": "number"
  24951. },
  24952. "aggregateID": {
  24953. "type": "string"
  24954. },
  24955. "data": {
  24956. "type": "object",
  24957. "properties": {
  24958. "timestamp": {
  24959. "type": "number"
  24960. },
  24961. "sessionID": {
  24962. "type": "string",
  24963. "pattern": "^ses"
  24964. },
  24965. "assistantMessageID": {
  24966. "type": "string",
  24967. "pattern": "^msg_"
  24968. },
  24969. "reasoningID": {
  24970. "type": "string"
  24971. },
  24972. "providerMetadata": {
  24973. "type": "object",
  24974. "additionalProperties": {
  24975. "type": "object"
  24976. }
  24977. }
  24978. },
  24979. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  24980. "additionalProperties": false
  24981. }
  24982. },
  24983. "required": ["type", "id", "seq", "aggregateID", "data"],
  24984. "additionalProperties": false
  24985. }
  24986. },
  24987. "required": ["type", "id", "syncEvent"],
  24988. "additionalProperties": false
  24989. },
  24990. "SyncEventSessionNextReasoningEnded": {
  24991. "type": "object",
  24992. "properties": {
  24993. "type": {
  24994. "type": "string",
  24995. "enum": ["sync"]
  24996. },
  24997. "id": {
  24998. "type": "string",
  24999. "pattern": "^evt_"
  25000. },
  25001. "syncEvent": {
  25002. "type": "object",
  25003. "properties": {
  25004. "type": {
  25005. "type": "string",
  25006. "enum": ["session.next.reasoning.ended.1"]
  25007. },
  25008. "id": {
  25009. "type": "string",
  25010. "pattern": "^evt_"
  25011. },
  25012. "seq": {
  25013. "type": "number"
  25014. },
  25015. "aggregateID": {
  25016. "type": "string"
  25017. },
  25018. "data": {
  25019. "type": "object",
  25020. "properties": {
  25021. "timestamp": {
  25022. "type": "number"
  25023. },
  25024. "sessionID": {
  25025. "type": "string",
  25026. "pattern": "^ses"
  25027. },
  25028. "assistantMessageID": {
  25029. "type": "string",
  25030. "pattern": "^msg_"
  25031. },
  25032. "reasoningID": {
  25033. "type": "string"
  25034. },
  25035. "text": {
  25036. "type": "string"
  25037. },
  25038. "providerMetadata": {
  25039. "type": "object",
  25040. "additionalProperties": {
  25041. "type": "object"
  25042. }
  25043. }
  25044. },
  25045. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  25046. "additionalProperties": false
  25047. }
  25048. },
  25049. "required": ["type", "id", "seq", "aggregateID", "data"],
  25050. "additionalProperties": false
  25051. }
  25052. },
  25053. "required": ["type", "id", "syncEvent"],
  25054. "additionalProperties": false
  25055. },
  25056. "SyncEventSessionNextToolInputStarted": {
  25057. "type": "object",
  25058. "properties": {
  25059. "type": {
  25060. "type": "string",
  25061. "enum": ["sync"]
  25062. },
  25063. "id": {
  25064. "type": "string",
  25065. "pattern": "^evt_"
  25066. },
  25067. "syncEvent": {
  25068. "type": "object",
  25069. "properties": {
  25070. "type": {
  25071. "type": "string",
  25072. "enum": ["session.next.tool.input.started.1"]
  25073. },
  25074. "id": {
  25075. "type": "string",
  25076. "pattern": "^evt_"
  25077. },
  25078. "seq": {
  25079. "type": "number"
  25080. },
  25081. "aggregateID": {
  25082. "type": "string"
  25083. },
  25084. "data": {
  25085. "type": "object",
  25086. "properties": {
  25087. "timestamp": {
  25088. "type": "number"
  25089. },
  25090. "sessionID": {
  25091. "type": "string",
  25092. "pattern": "^ses"
  25093. },
  25094. "assistantMessageID": {
  25095. "type": "string",
  25096. "pattern": "^msg_"
  25097. },
  25098. "callID": {
  25099. "type": "string"
  25100. },
  25101. "name": {
  25102. "type": "string"
  25103. }
  25104. },
  25105. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  25106. "additionalProperties": false
  25107. }
  25108. },
  25109. "required": ["type", "id", "seq", "aggregateID", "data"],
  25110. "additionalProperties": false
  25111. }
  25112. },
  25113. "required": ["type", "id", "syncEvent"],
  25114. "additionalProperties": false
  25115. },
  25116. "SyncEventSessionNextToolInputEnded": {
  25117. "type": "object",
  25118. "properties": {
  25119. "type": {
  25120. "type": "string",
  25121. "enum": ["sync"]
  25122. },
  25123. "id": {
  25124. "type": "string",
  25125. "pattern": "^evt_"
  25126. },
  25127. "syncEvent": {
  25128. "type": "object",
  25129. "properties": {
  25130. "type": {
  25131. "type": "string",
  25132. "enum": ["session.next.tool.input.ended.1"]
  25133. },
  25134. "id": {
  25135. "type": "string",
  25136. "pattern": "^evt_"
  25137. },
  25138. "seq": {
  25139. "type": "number"
  25140. },
  25141. "aggregateID": {
  25142. "type": "string"
  25143. },
  25144. "data": {
  25145. "type": "object",
  25146. "properties": {
  25147. "timestamp": {
  25148. "type": "number"
  25149. },
  25150. "sessionID": {
  25151. "type": "string",
  25152. "pattern": "^ses"
  25153. },
  25154. "assistantMessageID": {
  25155. "type": "string",
  25156. "pattern": "^msg_"
  25157. },
  25158. "callID": {
  25159. "type": "string"
  25160. },
  25161. "text": {
  25162. "type": "string"
  25163. }
  25164. },
  25165. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  25166. "additionalProperties": false
  25167. }
  25168. },
  25169. "required": ["type", "id", "seq", "aggregateID", "data"],
  25170. "additionalProperties": false
  25171. }
  25172. },
  25173. "required": ["type", "id", "syncEvent"],
  25174. "additionalProperties": false
  25175. },
  25176. "SyncEventSessionNextToolCalled": {
  25177. "type": "object",
  25178. "properties": {
  25179. "type": {
  25180. "type": "string",
  25181. "enum": ["sync"]
  25182. },
  25183. "id": {
  25184. "type": "string",
  25185. "pattern": "^evt_"
  25186. },
  25187. "syncEvent": {
  25188. "type": "object",
  25189. "properties": {
  25190. "type": {
  25191. "type": "string",
  25192. "enum": ["session.next.tool.called.1"]
  25193. },
  25194. "id": {
  25195. "type": "string",
  25196. "pattern": "^evt_"
  25197. },
  25198. "seq": {
  25199. "type": "number"
  25200. },
  25201. "aggregateID": {
  25202. "type": "string"
  25203. },
  25204. "data": {
  25205. "type": "object",
  25206. "properties": {
  25207. "timestamp": {
  25208. "type": "number"
  25209. },
  25210. "sessionID": {
  25211. "type": "string",
  25212. "pattern": "^ses"
  25213. },
  25214. "assistantMessageID": {
  25215. "type": "string",
  25216. "pattern": "^msg_"
  25217. },
  25218. "callID": {
  25219. "type": "string"
  25220. },
  25221. "tool": {
  25222. "type": "string"
  25223. },
  25224. "input": {
  25225. "type": "object"
  25226. },
  25227. "provider": {
  25228. "type": "object",
  25229. "properties": {
  25230. "executed": {
  25231. "type": "boolean"
  25232. },
  25233. "metadata": {
  25234. "type": "object",
  25235. "additionalProperties": {
  25236. "type": "object"
  25237. }
  25238. }
  25239. },
  25240. "required": ["executed"],
  25241. "additionalProperties": false
  25242. }
  25243. },
  25244. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  25245. "additionalProperties": false
  25246. }
  25247. },
  25248. "required": ["type", "id", "seq", "aggregateID", "data"],
  25249. "additionalProperties": false
  25250. }
  25251. },
  25252. "required": ["type", "id", "syncEvent"],
  25253. "additionalProperties": false
  25254. },
  25255. "SyncEventSessionNextToolProgress": {
  25256. "type": "object",
  25257. "properties": {
  25258. "type": {
  25259. "type": "string",
  25260. "enum": ["sync"]
  25261. },
  25262. "id": {
  25263. "type": "string",
  25264. "pattern": "^evt_"
  25265. },
  25266. "syncEvent": {
  25267. "type": "object",
  25268. "properties": {
  25269. "type": {
  25270. "type": "string",
  25271. "enum": ["session.next.tool.progress.1"]
  25272. },
  25273. "id": {
  25274. "type": "string",
  25275. "pattern": "^evt_"
  25276. },
  25277. "seq": {
  25278. "type": "number"
  25279. },
  25280. "aggregateID": {
  25281. "type": "string"
  25282. },
  25283. "data": {
  25284. "type": "object",
  25285. "properties": {
  25286. "timestamp": {
  25287. "type": "number"
  25288. },
  25289. "sessionID": {
  25290. "type": "string",
  25291. "pattern": "^ses"
  25292. },
  25293. "assistantMessageID": {
  25294. "type": "string",
  25295. "pattern": "^msg_"
  25296. },
  25297. "callID": {
  25298. "type": "string"
  25299. },
  25300. "structured": {
  25301. "type": "object"
  25302. },
  25303. "content": {
  25304. "type": "array",
  25305. "items": {
  25306. "anyOf": [
  25307. {
  25308. "$ref": "#/components/schemas/ToolTextContent"
  25309. },
  25310. {
  25311. "$ref": "#/components/schemas/ToolFileContent"
  25312. }
  25313. ]
  25314. }
  25315. }
  25316. },
  25317. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  25318. "additionalProperties": false
  25319. }
  25320. },
  25321. "required": ["type", "id", "seq", "aggregateID", "data"],
  25322. "additionalProperties": false
  25323. }
  25324. },
  25325. "required": ["type", "id", "syncEvent"],
  25326. "additionalProperties": false
  25327. },
  25328. "SyncEventSessionNextToolSuccess": {
  25329. "type": "object",
  25330. "properties": {
  25331. "type": {
  25332. "type": "string",
  25333. "enum": ["sync"]
  25334. },
  25335. "id": {
  25336. "type": "string",
  25337. "pattern": "^evt_"
  25338. },
  25339. "syncEvent": {
  25340. "type": "object",
  25341. "properties": {
  25342. "type": {
  25343. "type": "string",
  25344. "enum": ["session.next.tool.success.1"]
  25345. },
  25346. "id": {
  25347. "type": "string",
  25348. "pattern": "^evt_"
  25349. },
  25350. "seq": {
  25351. "type": "number"
  25352. },
  25353. "aggregateID": {
  25354. "type": "string"
  25355. },
  25356. "data": {
  25357. "type": "object",
  25358. "properties": {
  25359. "timestamp": {
  25360. "type": "number"
  25361. },
  25362. "sessionID": {
  25363. "type": "string",
  25364. "pattern": "^ses"
  25365. },
  25366. "assistantMessageID": {
  25367. "type": "string",
  25368. "pattern": "^msg_"
  25369. },
  25370. "callID": {
  25371. "type": "string"
  25372. },
  25373. "structured": {
  25374. "type": "object"
  25375. },
  25376. "content": {
  25377. "type": "array",
  25378. "items": {
  25379. "anyOf": [
  25380. {
  25381. "$ref": "#/components/schemas/ToolTextContent"
  25382. },
  25383. {
  25384. "$ref": "#/components/schemas/ToolFileContent"
  25385. }
  25386. ]
  25387. }
  25388. },
  25389. "outputPaths": {
  25390. "type": "array",
  25391. "items": {
  25392. "type": "string"
  25393. }
  25394. },
  25395. "result": {},
  25396. "provider": {
  25397. "type": "object",
  25398. "properties": {
  25399. "executed": {
  25400. "type": "boolean"
  25401. },
  25402. "metadata": {
  25403. "type": "object",
  25404. "additionalProperties": {
  25405. "type": "object"
  25406. }
  25407. }
  25408. },
  25409. "required": ["executed"],
  25410. "additionalProperties": false
  25411. }
  25412. },
  25413. "required": [
  25414. "timestamp",
  25415. "sessionID",
  25416. "assistantMessageID",
  25417. "callID",
  25418. "structured",
  25419. "content",
  25420. "provider"
  25421. ],
  25422. "additionalProperties": false
  25423. }
  25424. },
  25425. "required": ["type", "id", "seq", "aggregateID", "data"],
  25426. "additionalProperties": false
  25427. }
  25428. },
  25429. "required": ["type", "id", "syncEvent"],
  25430. "additionalProperties": false
  25431. },
  25432. "SyncEventSessionNextToolFailed": {
  25433. "type": "object",
  25434. "properties": {
  25435. "type": {
  25436. "type": "string",
  25437. "enum": ["sync"]
  25438. },
  25439. "id": {
  25440. "type": "string",
  25441. "pattern": "^evt_"
  25442. },
  25443. "syncEvent": {
  25444. "type": "object",
  25445. "properties": {
  25446. "type": {
  25447. "type": "string",
  25448. "enum": ["session.next.tool.failed.1"]
  25449. },
  25450. "id": {
  25451. "type": "string",
  25452. "pattern": "^evt_"
  25453. },
  25454. "seq": {
  25455. "type": "number"
  25456. },
  25457. "aggregateID": {
  25458. "type": "string"
  25459. },
  25460. "data": {
  25461. "type": "object",
  25462. "properties": {
  25463. "timestamp": {
  25464. "type": "number"
  25465. },
  25466. "sessionID": {
  25467. "type": "string",
  25468. "pattern": "^ses"
  25469. },
  25470. "assistantMessageID": {
  25471. "type": "string",
  25472. "pattern": "^msg_"
  25473. },
  25474. "callID": {
  25475. "type": "string"
  25476. },
  25477. "error": {
  25478. "$ref": "#/components/schemas/SessionErrorUnknown"
  25479. },
  25480. "result": {},
  25481. "provider": {
  25482. "type": "object",
  25483. "properties": {
  25484. "executed": {
  25485. "type": "boolean"
  25486. },
  25487. "metadata": {
  25488. "type": "object",
  25489. "additionalProperties": {
  25490. "type": "object"
  25491. }
  25492. }
  25493. },
  25494. "required": ["executed"],
  25495. "additionalProperties": false
  25496. }
  25497. },
  25498. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  25499. "additionalProperties": false
  25500. }
  25501. },
  25502. "required": ["type", "id", "seq", "aggregateID", "data"],
  25503. "additionalProperties": false
  25504. }
  25505. },
  25506. "required": ["type", "id", "syncEvent"],
  25507. "additionalProperties": false
  25508. },
  25509. "SyncEventSessionNextRetried": {
  25510. "type": "object",
  25511. "properties": {
  25512. "type": {
  25513. "type": "string",
  25514. "enum": ["sync"]
  25515. },
  25516. "id": {
  25517. "type": "string",
  25518. "pattern": "^evt_"
  25519. },
  25520. "syncEvent": {
  25521. "type": "object",
  25522. "properties": {
  25523. "type": {
  25524. "type": "string",
  25525. "enum": ["session.next.retried.1"]
  25526. },
  25527. "id": {
  25528. "type": "string",
  25529. "pattern": "^evt_"
  25530. },
  25531. "seq": {
  25532. "type": "number"
  25533. },
  25534. "aggregateID": {
  25535. "type": "string"
  25536. },
  25537. "data": {
  25538. "type": "object",
  25539. "properties": {
  25540. "timestamp": {
  25541. "type": "number"
  25542. },
  25543. "sessionID": {
  25544. "type": "string",
  25545. "pattern": "^ses"
  25546. },
  25547. "attempt": {
  25548. "type": "number"
  25549. },
  25550. "error": {
  25551. "$ref": "#/components/schemas/SessionNextRetry_error"
  25552. }
  25553. },
  25554. "required": ["timestamp", "sessionID", "attempt", "error"],
  25555. "additionalProperties": false
  25556. }
  25557. },
  25558. "required": ["type", "id", "seq", "aggregateID", "data"],
  25559. "additionalProperties": false
  25560. }
  25561. },
  25562. "required": ["type", "id", "syncEvent"],
  25563. "additionalProperties": false
  25564. },
  25565. "SyncEventSessionNextCompactionStarted": {
  25566. "type": "object",
  25567. "properties": {
  25568. "type": {
  25569. "type": "string",
  25570. "enum": ["sync"]
  25571. },
  25572. "id": {
  25573. "type": "string",
  25574. "pattern": "^evt_"
  25575. },
  25576. "syncEvent": {
  25577. "type": "object",
  25578. "properties": {
  25579. "type": {
  25580. "type": "string",
  25581. "enum": ["session.next.compaction.started.1"]
  25582. },
  25583. "id": {
  25584. "type": "string",
  25585. "pattern": "^evt_"
  25586. },
  25587. "seq": {
  25588. "type": "number"
  25589. },
  25590. "aggregateID": {
  25591. "type": "string"
  25592. },
  25593. "data": {
  25594. "type": "object",
  25595. "properties": {
  25596. "timestamp": {
  25597. "type": "number"
  25598. },
  25599. "sessionID": {
  25600. "type": "string",
  25601. "pattern": "^ses"
  25602. },
  25603. "messageID": {
  25604. "type": "string",
  25605. "pattern": "^msg_"
  25606. },
  25607. "reason": {
  25608. "type": "string",
  25609. "enum": ["auto", "manual"]
  25610. }
  25611. },
  25612. "required": ["timestamp", "sessionID", "messageID", "reason"],
  25613. "additionalProperties": false
  25614. }
  25615. },
  25616. "required": ["type", "id", "seq", "aggregateID", "data"],
  25617. "additionalProperties": false
  25618. }
  25619. },
  25620. "required": ["type", "id", "syncEvent"],
  25621. "additionalProperties": false
  25622. },
  25623. "SyncEventSessionNextCompactionEnded": {
  25624. "type": "object",
  25625. "properties": {
  25626. "type": {
  25627. "type": "string",
  25628. "enum": ["sync"]
  25629. },
  25630. "id": {
  25631. "type": "string",
  25632. "pattern": "^evt_"
  25633. },
  25634. "syncEvent": {
  25635. "type": "object",
  25636. "properties": {
  25637. "type": {
  25638. "type": "string",
  25639. "enum": ["session.next.compaction.ended.1"]
  25640. },
  25641. "id": {
  25642. "type": "string",
  25643. "pattern": "^evt_"
  25644. },
  25645. "seq": {
  25646. "type": "number"
  25647. },
  25648. "aggregateID": {
  25649. "type": "string"
  25650. },
  25651. "data": {
  25652. "type": "object",
  25653. "properties": {
  25654. "timestamp": {
  25655. "type": "number"
  25656. },
  25657. "sessionID": {
  25658. "type": "string",
  25659. "pattern": "^ses"
  25660. },
  25661. "messageID": {
  25662. "type": "string",
  25663. "pattern": "^msg_"
  25664. },
  25665. "reason": {
  25666. "type": "string",
  25667. "enum": ["auto", "manual"]
  25668. },
  25669. "text": {
  25670. "type": "string"
  25671. },
  25672. "recent": {
  25673. "type": "string"
  25674. }
  25675. },
  25676. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  25677. "additionalProperties": false
  25678. }
  25679. },
  25680. "required": ["type", "id", "seq", "aggregateID", "data"],
  25681. "additionalProperties": false
  25682. }
  25683. },
  25684. "required": ["type", "id", "syncEvent"],
  25685. "additionalProperties": false
  25686. },
  25687. "ConfigV2ReferenceGit": {
  25688. "type": "object",
  25689. "properties": {
  25690. "repository": {
  25691. "type": "string"
  25692. },
  25693. "branch": {
  25694. "type": "string"
  25695. },
  25696. "description": {
  25697. "type": "string"
  25698. },
  25699. "hidden": {
  25700. "type": "boolean"
  25701. }
  25702. },
  25703. "required": ["repository"],
  25704. "additionalProperties": false
  25705. },
  25706. "ConfigV2ReferenceLocal": {
  25707. "type": "object",
  25708. "properties": {
  25709. "path": {
  25710. "type": "string"
  25711. },
  25712. "description": {
  25713. "type": "string"
  25714. },
  25715. "hidden": {
  25716. "type": "boolean"
  25717. }
  25718. },
  25719. "required": ["path"],
  25720. "additionalProperties": false
  25721. },
  25722. "PolicyEffect": {
  25723. "type": "string",
  25724. "enum": ["allow", "deny"]
  25725. },
  25726. "ConfigV2ExperimentalPolicy": {
  25727. "type": "object",
  25728. "properties": {
  25729. "action": {
  25730. "type": "string",
  25731. "enum": ["provider.use"]
  25732. },
  25733. "effect": {
  25734. "$ref": "#/components/schemas/PolicyEffect"
  25735. },
  25736. "resource": {
  25737. "type": "string"
  25738. }
  25739. },
  25740. "required": ["action", "effect", "resource"],
  25741. "additionalProperties": false
  25742. },
  25743. "ProjectDirectories": {
  25744. "type": "array",
  25745. "items": {
  25746. "type": "object",
  25747. "properties": {
  25748. "directory": {
  25749. "type": "string"
  25750. },
  25751. "strategy": {
  25752. "type": "string"
  25753. }
  25754. },
  25755. "required": ["directory"],
  25756. "additionalProperties": false
  25757. }
  25758. },
  25759. "LocationInfo": {
  25760. "type": "object",
  25761. "properties": {
  25762. "directory": {
  25763. "type": "string"
  25764. },
  25765. "workspaceID": {
  25766. "type": "string",
  25767. "pattern": "^wrk"
  25768. },
  25769. "project": {
  25770. "type": "object",
  25771. "properties": {
  25772. "id": {
  25773. "type": "string"
  25774. },
  25775. "directory": {
  25776. "type": "string"
  25777. }
  25778. },
  25779. "required": ["id", "directory"],
  25780. "additionalProperties": false
  25781. }
  25782. },
  25783. "required": ["directory", "project"],
  25784. "additionalProperties": false
  25785. },
  25786. "PermissionV2Effect": {
  25787. "type": "string",
  25788. "enum": ["allow", "deny", "ask"]
  25789. },
  25790. "PermissionV2Rule": {
  25791. "type": "object",
  25792. "properties": {
  25793. "action": {
  25794. "type": "string"
  25795. },
  25796. "resource": {
  25797. "type": "string"
  25798. },
  25799. "effect": {
  25800. "$ref": "#/components/schemas/PermissionV2Effect"
  25801. }
  25802. },
  25803. "required": ["action", "resource", "effect"],
  25804. "additionalProperties": false
  25805. },
  25806. "PermissionV2Ruleset": {
  25807. "type": "array",
  25808. "items": {
  25809. "$ref": "#/components/schemas/PermissionV2Rule"
  25810. }
  25811. },
  25812. "AgentV2Info": {
  25813. "type": "object",
  25814. "properties": {
  25815. "id": {
  25816. "type": "string"
  25817. },
  25818. "model": {
  25819. "type": "object",
  25820. "properties": {
  25821. "id": {
  25822. "type": "string"
  25823. },
  25824. "providerID": {
  25825. "type": "string"
  25826. },
  25827. "variant": {
  25828. "type": "string"
  25829. }
  25830. },
  25831. "required": ["id", "providerID"],
  25832. "additionalProperties": false
  25833. },
  25834. "request": {
  25835. "type": "object",
  25836. "properties": {
  25837. "headers": {
  25838. "type": "object",
  25839. "additionalProperties": {
  25840. "type": "string"
  25841. }
  25842. },
  25843. "body": {
  25844. "type": "object"
  25845. }
  25846. },
  25847. "required": ["headers", "body"],
  25848. "additionalProperties": false
  25849. },
  25850. "system": {
  25851. "type": "string"
  25852. },
  25853. "description": {
  25854. "type": "string"
  25855. },
  25856. "mode": {
  25857. "type": "string",
  25858. "enum": ["subagent", "primary", "all"]
  25859. },
  25860. "hidden": {
  25861. "type": "boolean"
  25862. },
  25863. "color": {
  25864. "anyOf": [
  25865. {
  25866. "type": "string",
  25867. "pattern": "^#[0-9a-fA-F]{6}$"
  25868. },
  25869. {
  25870. "type": "string",
  25871. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  25872. }
  25873. ]
  25874. },
  25875. "steps": {
  25876. "type": "integer",
  25877. "exclusiveMinimum": 0
  25878. },
  25879. "permissions": {
  25880. "$ref": "#/components/schemas/PermissionV2Ruleset"
  25881. }
  25882. },
  25883. "required": ["id", "request", "mode", "hidden", "permissions"],
  25884. "additionalProperties": false
  25885. },
  25886. "SessionV2Info": {
  25887. "type": "object",
  25888. "properties": {
  25889. "id": {
  25890. "type": "string",
  25891. "pattern": "^ses"
  25892. },
  25893. "parentID": {
  25894. "type": "string",
  25895. "pattern": "^ses"
  25896. },
  25897. "projectID": {
  25898. "type": "string"
  25899. },
  25900. "agent": {
  25901. "type": "string"
  25902. },
  25903. "model": {
  25904. "type": "object",
  25905. "properties": {
  25906. "id": {
  25907. "type": "string"
  25908. },
  25909. "providerID": {
  25910. "type": "string"
  25911. },
  25912. "variant": {
  25913. "type": "string"
  25914. }
  25915. },
  25916. "required": ["id", "providerID"],
  25917. "additionalProperties": false
  25918. },
  25919. "cost": {
  25920. "type": "number"
  25921. },
  25922. "tokens": {
  25923. "type": "object",
  25924. "properties": {
  25925. "input": {
  25926. "type": "number"
  25927. },
  25928. "output": {
  25929. "type": "number"
  25930. },
  25931. "reasoning": {
  25932. "type": "number"
  25933. },
  25934. "cache": {
  25935. "type": "object",
  25936. "properties": {
  25937. "read": {
  25938. "type": "number"
  25939. },
  25940. "write": {
  25941. "type": "number"
  25942. }
  25943. },
  25944. "required": ["read", "write"],
  25945. "additionalProperties": false
  25946. }
  25947. },
  25948. "required": ["input", "output", "reasoning", "cache"],
  25949. "additionalProperties": false
  25950. },
  25951. "time": {
  25952. "type": "object",
  25953. "properties": {
  25954. "created": {
  25955. "type": "number"
  25956. },
  25957. "updated": {
  25958. "type": "number"
  25959. },
  25960. "archived": {
  25961. "type": "number"
  25962. }
  25963. },
  25964. "required": ["created", "updated"],
  25965. "additionalProperties": false
  25966. },
  25967. "title": {
  25968. "type": "string"
  25969. },
  25970. "location": {
  25971. "$ref": "#/components/schemas/LocationRef"
  25972. },
  25973. "subpath": {
  25974. "type": "string"
  25975. }
  25976. },
  25977. "required": ["id", "projectID", "cost", "tokens", "time", "title", "location"],
  25978. "additionalProperties": false
  25979. },
  25980. "SessionInputAdmitted": {
  25981. "type": "object",
  25982. "properties": {
  25983. "admittedSeq": {
  25984. "type": "integer",
  25985. "minimum": 0
  25986. },
  25987. "id": {
  25988. "type": "string",
  25989. "pattern": "^msg_"
  25990. },
  25991. "sessionID": {
  25992. "type": "string",
  25993. "pattern": "^ses"
  25994. },
  25995. "prompt": {
  25996. "$ref": "#/components/schemas/Prompt"
  25997. },
  25998. "delivery": {
  25999. "type": "string",
  26000. "enum": ["steer", "queue"]
  26001. },
  26002. "timeCreated": {
  26003. "type": "number"
  26004. },
  26005. "promotedSeq": {
  26006. "type": "integer",
  26007. "minimum": 0
  26008. }
  26009. },
  26010. "required": ["admittedSeq", "id", "sessionID", "prompt", "delivery", "timeCreated"],
  26011. "additionalProperties": false
  26012. },
  26013. "SessionMessageAgentSwitched": {
  26014. "type": "object",
  26015. "properties": {
  26016. "id": {
  26017. "type": "string",
  26018. "pattern": "^msg_"
  26019. },
  26020. "metadata": {
  26021. "type": "object"
  26022. },
  26023. "time": {
  26024. "type": "object",
  26025. "properties": {
  26026. "created": {
  26027. "type": "number"
  26028. }
  26029. },
  26030. "required": ["created"],
  26031. "additionalProperties": false
  26032. },
  26033. "type": {
  26034. "type": "string",
  26035. "enum": ["agent-switched"]
  26036. },
  26037. "agent": {
  26038. "type": "string"
  26039. }
  26040. },
  26041. "required": ["id", "time", "type", "agent"],
  26042. "additionalProperties": false
  26043. },
  26044. "SessionMessageModelSwitched": {
  26045. "type": "object",
  26046. "properties": {
  26047. "id": {
  26048. "type": "string",
  26049. "pattern": "^msg_"
  26050. },
  26051. "metadata": {
  26052. "type": "object"
  26053. },
  26054. "time": {
  26055. "type": "object",
  26056. "properties": {
  26057. "created": {
  26058. "type": "number"
  26059. }
  26060. },
  26061. "required": ["created"],
  26062. "additionalProperties": false
  26063. },
  26064. "type": {
  26065. "type": "string",
  26066. "enum": ["model-switched"]
  26067. },
  26068. "model": {
  26069. "type": "object",
  26070. "properties": {
  26071. "id": {
  26072. "type": "string"
  26073. },
  26074. "providerID": {
  26075. "type": "string"
  26076. },
  26077. "variant": {
  26078. "type": "string"
  26079. }
  26080. },
  26081. "required": ["id", "providerID"],
  26082. "additionalProperties": false
  26083. }
  26084. },
  26085. "required": ["id", "time", "type", "model"],
  26086. "additionalProperties": false
  26087. },
  26088. "SessionMessageUser": {
  26089. "type": "object",
  26090. "properties": {
  26091. "id": {
  26092. "type": "string",
  26093. "pattern": "^msg_"
  26094. },
  26095. "metadata": {
  26096. "type": "object"
  26097. },
  26098. "time": {
  26099. "type": "object",
  26100. "properties": {
  26101. "created": {
  26102. "type": "number"
  26103. }
  26104. },
  26105. "required": ["created"],
  26106. "additionalProperties": false
  26107. },
  26108. "text": {
  26109. "type": "string"
  26110. },
  26111. "files": {
  26112. "type": "array",
  26113. "items": {
  26114. "$ref": "#/components/schemas/PromptFileAttachment"
  26115. }
  26116. },
  26117. "agents": {
  26118. "type": "array",
  26119. "items": {
  26120. "$ref": "#/components/schemas/PromptAgentAttachment"
  26121. }
  26122. },
  26123. "type": {
  26124. "type": "string",
  26125. "enum": ["user"]
  26126. }
  26127. },
  26128. "required": ["id", "time", "text", "type"],
  26129. "additionalProperties": false
  26130. },
  26131. "SessionMessageSynthetic": {
  26132. "type": "object",
  26133. "properties": {
  26134. "id": {
  26135. "type": "string",
  26136. "pattern": "^msg_"
  26137. },
  26138. "metadata": {
  26139. "type": "object"
  26140. },
  26141. "time": {
  26142. "type": "object",
  26143. "properties": {
  26144. "created": {
  26145. "type": "number"
  26146. }
  26147. },
  26148. "required": ["created"],
  26149. "additionalProperties": false
  26150. },
  26151. "sessionID": {
  26152. "type": "string",
  26153. "pattern": "^ses"
  26154. },
  26155. "text": {
  26156. "type": "string"
  26157. },
  26158. "type": {
  26159. "type": "string",
  26160. "enum": ["synthetic"]
  26161. }
  26162. },
  26163. "required": ["id", "time", "sessionID", "text", "type"],
  26164. "additionalProperties": false
  26165. },
  26166. "SessionMessageSystem": {
  26167. "type": "object",
  26168. "properties": {
  26169. "id": {
  26170. "type": "string",
  26171. "pattern": "^msg_"
  26172. },
  26173. "metadata": {
  26174. "type": "object"
  26175. },
  26176. "time": {
  26177. "type": "object",
  26178. "properties": {
  26179. "created": {
  26180. "type": "number"
  26181. }
  26182. },
  26183. "required": ["created"],
  26184. "additionalProperties": false
  26185. },
  26186. "type": {
  26187. "type": "string",
  26188. "enum": ["system"]
  26189. },
  26190. "text": {
  26191. "type": "string"
  26192. }
  26193. },
  26194. "required": ["id", "time", "type", "text"],
  26195. "additionalProperties": false
  26196. },
  26197. "SessionMessageShell": {
  26198. "type": "object",
  26199. "properties": {
  26200. "id": {
  26201. "type": "string",
  26202. "pattern": "^msg_"
  26203. },
  26204. "metadata": {
  26205. "type": "object"
  26206. },
  26207. "time": {
  26208. "type": "object",
  26209. "properties": {
  26210. "created": {
  26211. "type": "number"
  26212. },
  26213. "completed": {
  26214. "type": "number"
  26215. }
  26216. },
  26217. "required": ["created"],
  26218. "additionalProperties": false
  26219. },
  26220. "type": {
  26221. "type": "string",
  26222. "enum": ["shell"]
  26223. },
  26224. "callID": {
  26225. "type": "string"
  26226. },
  26227. "command": {
  26228. "type": "string"
  26229. },
  26230. "output": {
  26231. "type": "string"
  26232. }
  26233. },
  26234. "required": ["id", "time", "type", "callID", "command", "output"],
  26235. "additionalProperties": false
  26236. },
  26237. "SessionMessageAssistantText": {
  26238. "type": "object",
  26239. "properties": {
  26240. "type": {
  26241. "type": "string",
  26242. "enum": ["text"]
  26243. },
  26244. "id": {
  26245. "type": "string"
  26246. },
  26247. "text": {
  26248. "type": "string"
  26249. }
  26250. },
  26251. "required": ["type", "id", "text"],
  26252. "additionalProperties": false
  26253. },
  26254. "SessionMessageAssistantReasoning": {
  26255. "type": "object",
  26256. "properties": {
  26257. "type": {
  26258. "type": "string",
  26259. "enum": ["reasoning"]
  26260. },
  26261. "id": {
  26262. "type": "string"
  26263. },
  26264. "text": {
  26265. "type": "string"
  26266. },
  26267. "providerMetadata": {
  26268. "type": "object",
  26269. "additionalProperties": {
  26270. "type": "object"
  26271. }
  26272. }
  26273. },
  26274. "required": ["type", "id", "text"],
  26275. "additionalProperties": false
  26276. },
  26277. "SessionMessageToolStatePending": {
  26278. "type": "object",
  26279. "properties": {
  26280. "status": {
  26281. "type": "string",
  26282. "enum": ["pending"]
  26283. },
  26284. "input": {
  26285. "type": "string"
  26286. }
  26287. },
  26288. "required": ["status", "input"],
  26289. "additionalProperties": false
  26290. },
  26291. "SessionMessageToolStateRunning": {
  26292. "type": "object",
  26293. "properties": {
  26294. "status": {
  26295. "type": "string",
  26296. "enum": ["running"]
  26297. },
  26298. "input": {
  26299. "type": "object"
  26300. },
  26301. "structured": {
  26302. "type": "object"
  26303. },
  26304. "content": {
  26305. "type": "array",
  26306. "items": {
  26307. "anyOf": [
  26308. {
  26309. "$ref": "#/components/schemas/ToolTextContent"
  26310. },
  26311. {
  26312. "$ref": "#/components/schemas/ToolFileContent"
  26313. }
  26314. ]
  26315. }
  26316. }
  26317. },
  26318. "required": ["status", "input", "structured", "content"],
  26319. "additionalProperties": false
  26320. },
  26321. "SessionMessageToolStateCompleted": {
  26322. "type": "object",
  26323. "properties": {
  26324. "status": {
  26325. "type": "string",
  26326. "enum": ["completed"]
  26327. },
  26328. "input": {
  26329. "type": "object"
  26330. },
  26331. "attachments": {
  26332. "type": "array",
  26333. "items": {
  26334. "$ref": "#/components/schemas/PromptFileAttachment"
  26335. }
  26336. },
  26337. "content": {
  26338. "type": "array",
  26339. "items": {
  26340. "anyOf": [
  26341. {
  26342. "$ref": "#/components/schemas/ToolTextContent"
  26343. },
  26344. {
  26345. "$ref": "#/components/schemas/ToolFileContent"
  26346. }
  26347. ]
  26348. }
  26349. },
  26350. "outputPaths": {
  26351. "type": "array",
  26352. "items": {
  26353. "type": "string"
  26354. }
  26355. },
  26356. "structured": {
  26357. "type": "object"
  26358. },
  26359. "result": {}
  26360. },
  26361. "required": ["status", "input", "content", "structured"],
  26362. "additionalProperties": false
  26363. },
  26364. "SessionMessageToolStateError": {
  26365. "type": "object",
  26366. "properties": {
  26367. "status": {
  26368. "type": "string",
  26369. "enum": ["error"]
  26370. },
  26371. "input": {
  26372. "type": "object"
  26373. },
  26374. "content": {
  26375. "type": "array",
  26376. "items": {
  26377. "anyOf": [
  26378. {
  26379. "$ref": "#/components/schemas/ToolTextContent"
  26380. },
  26381. {
  26382. "$ref": "#/components/schemas/ToolFileContent"
  26383. }
  26384. ]
  26385. }
  26386. },
  26387. "structured": {
  26388. "type": "object"
  26389. },
  26390. "error": {
  26391. "$ref": "#/components/schemas/SessionErrorUnknown"
  26392. },
  26393. "result": {}
  26394. },
  26395. "required": ["status", "input", "content", "structured", "error"],
  26396. "additionalProperties": false
  26397. },
  26398. "SessionMessageAssistantTool": {
  26399. "type": "object",
  26400. "properties": {
  26401. "type": {
  26402. "type": "string",
  26403. "enum": ["tool"]
  26404. },
  26405. "id": {
  26406. "type": "string"
  26407. },
  26408. "name": {
  26409. "type": "string"
  26410. },
  26411. "provider": {
  26412. "type": "object",
  26413. "properties": {
  26414. "executed": {
  26415. "type": "boolean"
  26416. },
  26417. "metadata": {
  26418. "type": "object",
  26419. "additionalProperties": {
  26420. "type": "object"
  26421. }
  26422. },
  26423. "resultMetadata": {
  26424. "type": "object",
  26425. "additionalProperties": {
  26426. "type": "object"
  26427. }
  26428. }
  26429. },
  26430. "required": ["executed"],
  26431. "additionalProperties": false
  26432. },
  26433. "state": {
  26434. "anyOf": [
  26435. {
  26436. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  26437. },
  26438. {
  26439. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  26440. },
  26441. {
  26442. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  26443. },
  26444. {
  26445. "$ref": "#/components/schemas/SessionMessageToolStateError"
  26446. }
  26447. ]
  26448. },
  26449. "time": {
  26450. "type": "object",
  26451. "properties": {
  26452. "created": {
  26453. "type": "number"
  26454. },
  26455. "ran": {
  26456. "type": "number"
  26457. },
  26458. "completed": {
  26459. "type": "number"
  26460. },
  26461. "pruned": {
  26462. "type": "number"
  26463. }
  26464. },
  26465. "required": ["created"],
  26466. "additionalProperties": false
  26467. }
  26468. },
  26469. "required": ["type", "id", "name", "state", "time"],
  26470. "additionalProperties": false
  26471. },
  26472. "SessionMessageAssistant": {
  26473. "type": "object",
  26474. "properties": {
  26475. "id": {
  26476. "type": "string",
  26477. "pattern": "^msg_"
  26478. },
  26479. "metadata": {
  26480. "type": "object"
  26481. },
  26482. "time": {
  26483. "type": "object",
  26484. "properties": {
  26485. "created": {
  26486. "type": "number"
  26487. },
  26488. "completed": {
  26489. "type": "number"
  26490. }
  26491. },
  26492. "required": ["created"],
  26493. "additionalProperties": false
  26494. },
  26495. "type": {
  26496. "type": "string",
  26497. "enum": ["assistant"]
  26498. },
  26499. "agent": {
  26500. "type": "string"
  26501. },
  26502. "model": {
  26503. "type": "object",
  26504. "properties": {
  26505. "id": {
  26506. "type": "string"
  26507. },
  26508. "providerID": {
  26509. "type": "string"
  26510. },
  26511. "variant": {
  26512. "type": "string"
  26513. }
  26514. },
  26515. "required": ["id", "providerID"],
  26516. "additionalProperties": false
  26517. },
  26518. "content": {
  26519. "type": "array",
  26520. "items": {
  26521. "anyOf": [
  26522. {
  26523. "$ref": "#/components/schemas/SessionMessageAssistantText"
  26524. },
  26525. {
  26526. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  26527. },
  26528. {
  26529. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  26530. }
  26531. ]
  26532. }
  26533. },
  26534. "snapshot": {
  26535. "type": "object",
  26536. "properties": {
  26537. "start": {
  26538. "type": "string"
  26539. },
  26540. "end": {
  26541. "type": "string"
  26542. }
  26543. },
  26544. "additionalProperties": false
  26545. },
  26546. "finish": {
  26547. "type": "string"
  26548. },
  26549. "cost": {
  26550. "type": "number"
  26551. },
  26552. "tokens": {
  26553. "type": "object",
  26554. "properties": {
  26555. "input": {
  26556. "type": "number"
  26557. },
  26558. "output": {
  26559. "type": "number"
  26560. },
  26561. "reasoning": {
  26562. "type": "number"
  26563. },
  26564. "cache": {
  26565. "type": "object",
  26566. "properties": {
  26567. "read": {
  26568. "type": "number"
  26569. },
  26570. "write": {
  26571. "type": "number"
  26572. }
  26573. },
  26574. "required": ["read", "write"],
  26575. "additionalProperties": false
  26576. }
  26577. },
  26578. "required": ["input", "output", "reasoning", "cache"],
  26579. "additionalProperties": false
  26580. },
  26581. "error": {
  26582. "$ref": "#/components/schemas/SessionErrorUnknown"
  26583. }
  26584. },
  26585. "required": ["id", "time", "type", "agent", "model", "content"],
  26586. "additionalProperties": false
  26587. },
  26588. "SessionMessageCompaction": {
  26589. "type": "object",
  26590. "properties": {
  26591. "type": {
  26592. "type": "string",
  26593. "enum": ["compaction"]
  26594. },
  26595. "reason": {
  26596. "type": "string",
  26597. "enum": ["auto", "manual"]
  26598. },
  26599. "summary": {
  26600. "type": "string"
  26601. },
  26602. "recent": {
  26603. "type": "string"
  26604. },
  26605. "id": {
  26606. "type": "string",
  26607. "pattern": "^msg_"
  26608. },
  26609. "metadata": {
  26610. "type": "object"
  26611. },
  26612. "time": {
  26613. "type": "object",
  26614. "properties": {
  26615. "created": {
  26616. "type": "number"
  26617. }
  26618. },
  26619. "required": ["created"],
  26620. "additionalProperties": false
  26621. }
  26622. },
  26623. "required": ["type", "reason", "summary", "recent", "id", "time"],
  26624. "additionalProperties": false
  26625. },
  26626. "SessionMessage": {
  26627. "anyOf": [
  26628. {
  26629. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  26630. },
  26631. {
  26632. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  26633. },
  26634. {
  26635. "$ref": "#/components/schemas/SessionMessageUser"
  26636. },
  26637. {
  26638. "$ref": "#/components/schemas/SessionMessageSynthetic"
  26639. },
  26640. {
  26641. "$ref": "#/components/schemas/SessionMessageSystem"
  26642. },
  26643. {
  26644. "$ref": "#/components/schemas/SessionMessageShell"
  26645. },
  26646. {
  26647. "$ref": "#/components/schemas/SessionMessageAssistant"
  26648. },
  26649. {
  26650. "$ref": "#/components/schemas/SessionMessageCompaction"
  26651. }
  26652. ]
  26653. },
  26654. "ModelV2Info": {
  26655. "type": "object",
  26656. "properties": {
  26657. "id": {
  26658. "type": "string"
  26659. },
  26660. "providerID": {
  26661. "type": "string"
  26662. },
  26663. "family": {
  26664. "type": "string"
  26665. },
  26666. "name": {
  26667. "type": "string"
  26668. },
  26669. "api": {
  26670. "anyOf": [
  26671. {
  26672. "type": "object",
  26673. "properties": {
  26674. "id": {
  26675. "type": "string"
  26676. },
  26677. "type": {
  26678. "type": "string",
  26679. "enum": ["aisdk"]
  26680. },
  26681. "package": {
  26682. "type": "string"
  26683. },
  26684. "url": {
  26685. "type": "string"
  26686. },
  26687. "settings": {
  26688. "type": "object"
  26689. }
  26690. },
  26691. "required": ["id", "type", "package"],
  26692. "additionalProperties": false
  26693. },
  26694. {
  26695. "type": "object",
  26696. "properties": {
  26697. "id": {
  26698. "type": "string"
  26699. },
  26700. "type": {
  26701. "type": "string",
  26702. "enum": ["native"]
  26703. },
  26704. "url": {
  26705. "type": "string"
  26706. },
  26707. "settings": {
  26708. "type": "object"
  26709. }
  26710. },
  26711. "required": ["id", "type", "settings"],
  26712. "additionalProperties": false
  26713. }
  26714. ]
  26715. },
  26716. "capabilities": {
  26717. "type": "object",
  26718. "properties": {
  26719. "tools": {
  26720. "type": "boolean"
  26721. },
  26722. "input": {
  26723. "type": "array",
  26724. "items": {
  26725. "type": "string"
  26726. }
  26727. },
  26728. "output": {
  26729. "type": "array",
  26730. "items": {
  26731. "type": "string"
  26732. }
  26733. }
  26734. },
  26735. "required": ["tools", "input", "output"],
  26736. "additionalProperties": false
  26737. },
  26738. "request": {
  26739. "type": "object",
  26740. "properties": {
  26741. "headers": {
  26742. "type": "object",
  26743. "additionalProperties": {
  26744. "type": "string"
  26745. }
  26746. },
  26747. "body": {
  26748. "type": "object"
  26749. },
  26750. "generation": {
  26751. "type": "object",
  26752. "properties": {
  26753. "maxTokens": {
  26754. "anyOf": [
  26755. {
  26756. "type": "number"
  26757. },
  26758. {
  26759. "type": "string",
  26760. "enum": ["NaN"]
  26761. },
  26762. {
  26763. "type": "string",
  26764. "enum": ["Infinity"]
  26765. },
  26766. {
  26767. "type": "string",
  26768. "enum": ["-Infinity"]
  26769. },
  26770. {
  26771. "type": "string",
  26772. "enum": ["Infinity", "-Infinity", "NaN"]
  26773. }
  26774. ]
  26775. },
  26776. "temperature": {
  26777. "anyOf": [
  26778. {
  26779. "type": "number"
  26780. },
  26781. {
  26782. "type": "string",
  26783. "enum": ["NaN"]
  26784. },
  26785. {
  26786. "type": "string",
  26787. "enum": ["Infinity"]
  26788. },
  26789. {
  26790. "type": "string",
  26791. "enum": ["-Infinity"]
  26792. },
  26793. {
  26794. "type": "string",
  26795. "enum": ["Infinity", "-Infinity", "NaN"]
  26796. }
  26797. ]
  26798. },
  26799. "topP": {
  26800. "anyOf": [
  26801. {
  26802. "type": "number"
  26803. },
  26804. {
  26805. "type": "string",
  26806. "enum": ["NaN"]
  26807. },
  26808. {
  26809. "type": "string",
  26810. "enum": ["Infinity"]
  26811. },
  26812. {
  26813. "type": "string",
  26814. "enum": ["-Infinity"]
  26815. },
  26816. {
  26817. "type": "string",
  26818. "enum": ["Infinity", "-Infinity", "NaN"]
  26819. }
  26820. ]
  26821. },
  26822. "topK": {
  26823. "anyOf": [
  26824. {
  26825. "type": "number"
  26826. },
  26827. {
  26828. "type": "string",
  26829. "enum": ["NaN"]
  26830. },
  26831. {
  26832. "type": "string",
  26833. "enum": ["Infinity"]
  26834. },
  26835. {
  26836. "type": "string",
  26837. "enum": ["-Infinity"]
  26838. },
  26839. {
  26840. "type": "string",
  26841. "enum": ["Infinity", "-Infinity", "NaN"]
  26842. }
  26843. ]
  26844. },
  26845. "frequencyPenalty": {
  26846. "anyOf": [
  26847. {
  26848. "type": "number"
  26849. },
  26850. {
  26851. "type": "string",
  26852. "enum": ["NaN"]
  26853. },
  26854. {
  26855. "type": "string",
  26856. "enum": ["Infinity"]
  26857. },
  26858. {
  26859. "type": "string",
  26860. "enum": ["-Infinity"]
  26861. },
  26862. {
  26863. "type": "string",
  26864. "enum": ["Infinity", "-Infinity", "NaN"]
  26865. }
  26866. ]
  26867. },
  26868. "presencePenalty": {
  26869. "anyOf": [
  26870. {
  26871. "type": "number"
  26872. },
  26873. {
  26874. "type": "string",
  26875. "enum": ["NaN"]
  26876. },
  26877. {
  26878. "type": "string",
  26879. "enum": ["Infinity"]
  26880. },
  26881. {
  26882. "type": "string",
  26883. "enum": ["-Infinity"]
  26884. },
  26885. {
  26886. "type": "string",
  26887. "enum": ["Infinity", "-Infinity", "NaN"]
  26888. }
  26889. ]
  26890. },
  26891. "seed": {
  26892. "anyOf": [
  26893. {
  26894. "type": "number"
  26895. },
  26896. {
  26897. "type": "string",
  26898. "enum": ["NaN"]
  26899. },
  26900. {
  26901. "type": "string",
  26902. "enum": ["Infinity"]
  26903. },
  26904. {
  26905. "type": "string",
  26906. "enum": ["-Infinity"]
  26907. },
  26908. {
  26909. "type": "string",
  26910. "enum": ["Infinity", "-Infinity", "NaN"]
  26911. }
  26912. ]
  26913. },
  26914. "stop": {
  26915. "type": "array",
  26916. "items": {
  26917. "type": "string"
  26918. }
  26919. }
  26920. },
  26921. "additionalProperties": false
  26922. },
  26923. "options": {
  26924. "type": "object"
  26925. },
  26926. "variant": {
  26927. "type": "string"
  26928. }
  26929. },
  26930. "required": ["headers", "body"],
  26931. "additionalProperties": false
  26932. },
  26933. "variants": {
  26934. "type": "array",
  26935. "items": {
  26936. "type": "object",
  26937. "properties": {
  26938. "id": {
  26939. "type": "string"
  26940. },
  26941. "headers": {
  26942. "type": "object",
  26943. "additionalProperties": {
  26944. "type": "string"
  26945. }
  26946. },
  26947. "body": {
  26948. "type": "object"
  26949. },
  26950. "generation": {
  26951. "type": "object",
  26952. "properties": {
  26953. "maxTokens": {
  26954. "anyOf": [
  26955. {
  26956. "type": "number"
  26957. },
  26958. {
  26959. "type": "string",
  26960. "enum": ["NaN"]
  26961. },
  26962. {
  26963. "type": "string",
  26964. "enum": ["Infinity"]
  26965. },
  26966. {
  26967. "type": "string",
  26968. "enum": ["-Infinity"]
  26969. },
  26970. {
  26971. "type": "string",
  26972. "enum": ["Infinity", "-Infinity", "NaN"]
  26973. }
  26974. ]
  26975. },
  26976. "temperature": {
  26977. "anyOf": [
  26978. {
  26979. "type": "number"
  26980. },
  26981. {
  26982. "type": "string",
  26983. "enum": ["NaN"]
  26984. },
  26985. {
  26986. "type": "string",
  26987. "enum": ["Infinity"]
  26988. },
  26989. {
  26990. "type": "string",
  26991. "enum": ["-Infinity"]
  26992. },
  26993. {
  26994. "type": "string",
  26995. "enum": ["Infinity", "-Infinity", "NaN"]
  26996. }
  26997. ]
  26998. },
  26999. "topP": {
  27000. "anyOf": [
  27001. {
  27002. "type": "number"
  27003. },
  27004. {
  27005. "type": "string",
  27006. "enum": ["NaN"]
  27007. },
  27008. {
  27009. "type": "string",
  27010. "enum": ["Infinity"]
  27011. },
  27012. {
  27013. "type": "string",
  27014. "enum": ["-Infinity"]
  27015. },
  27016. {
  27017. "type": "string",
  27018. "enum": ["Infinity", "-Infinity", "NaN"]
  27019. }
  27020. ]
  27021. },
  27022. "topK": {
  27023. "anyOf": [
  27024. {
  27025. "type": "number"
  27026. },
  27027. {
  27028. "type": "string",
  27029. "enum": ["NaN"]
  27030. },
  27031. {
  27032. "type": "string",
  27033. "enum": ["Infinity"]
  27034. },
  27035. {
  27036. "type": "string",
  27037. "enum": ["-Infinity"]
  27038. },
  27039. {
  27040. "type": "string",
  27041. "enum": ["Infinity", "-Infinity", "NaN"]
  27042. }
  27043. ]
  27044. },
  27045. "frequencyPenalty": {
  27046. "anyOf": [
  27047. {
  27048. "type": "number"
  27049. },
  27050. {
  27051. "type": "string",
  27052. "enum": ["NaN"]
  27053. },
  27054. {
  27055. "type": "string",
  27056. "enum": ["Infinity"]
  27057. },
  27058. {
  27059. "type": "string",
  27060. "enum": ["-Infinity"]
  27061. },
  27062. {
  27063. "type": "string",
  27064. "enum": ["Infinity", "-Infinity", "NaN"]
  27065. }
  27066. ]
  27067. },
  27068. "presencePenalty": {
  27069. "anyOf": [
  27070. {
  27071. "type": "number"
  27072. },
  27073. {
  27074. "type": "string",
  27075. "enum": ["NaN"]
  27076. },
  27077. {
  27078. "type": "string",
  27079. "enum": ["Infinity"]
  27080. },
  27081. {
  27082. "type": "string",
  27083. "enum": ["-Infinity"]
  27084. },
  27085. {
  27086. "type": "string",
  27087. "enum": ["Infinity", "-Infinity", "NaN"]
  27088. }
  27089. ]
  27090. },
  27091. "seed": {
  27092. "anyOf": [
  27093. {
  27094. "type": "number"
  27095. },
  27096. {
  27097. "type": "string",
  27098. "enum": ["NaN"]
  27099. },
  27100. {
  27101. "type": "string",
  27102. "enum": ["Infinity"]
  27103. },
  27104. {
  27105. "type": "string",
  27106. "enum": ["-Infinity"]
  27107. },
  27108. {
  27109. "type": "string",
  27110. "enum": ["Infinity", "-Infinity", "NaN"]
  27111. }
  27112. ]
  27113. },
  27114. "stop": {
  27115. "type": "array",
  27116. "items": {
  27117. "type": "string"
  27118. }
  27119. }
  27120. },
  27121. "additionalProperties": false
  27122. },
  27123. "options": {
  27124. "type": "object"
  27125. }
  27126. },
  27127. "required": ["id", "headers", "body"],
  27128. "additionalProperties": false
  27129. }
  27130. },
  27131. "time": {
  27132. "type": "object",
  27133. "properties": {
  27134. "released": {
  27135. "type": "number"
  27136. }
  27137. },
  27138. "required": ["released"],
  27139. "additionalProperties": false
  27140. },
  27141. "cost": {
  27142. "type": "array",
  27143. "items": {
  27144. "type": "object",
  27145. "properties": {
  27146. "tier": {
  27147. "type": "object",
  27148. "properties": {
  27149. "type": {
  27150. "type": "string",
  27151. "enum": ["context"]
  27152. },
  27153. "size": {
  27154. "type": "integer"
  27155. }
  27156. },
  27157. "required": ["type", "size"],
  27158. "additionalProperties": false
  27159. },
  27160. "input": {
  27161. "type": "number"
  27162. },
  27163. "output": {
  27164. "type": "number"
  27165. },
  27166. "cache": {
  27167. "type": "object",
  27168. "properties": {
  27169. "read": {
  27170. "type": "number"
  27171. },
  27172. "write": {
  27173. "type": "number"
  27174. }
  27175. },
  27176. "required": ["read", "write"],
  27177. "additionalProperties": false
  27178. }
  27179. },
  27180. "required": ["input", "output", "cache"],
  27181. "additionalProperties": false
  27182. }
  27183. },
  27184. "status": {
  27185. "type": "string",
  27186. "enum": ["alpha", "beta", "deprecated", "active"]
  27187. },
  27188. "enabled": {
  27189. "type": "boolean"
  27190. },
  27191. "limit": {
  27192. "type": "object",
  27193. "properties": {
  27194. "context": {
  27195. "type": "integer"
  27196. },
  27197. "input": {
  27198. "type": "integer"
  27199. },
  27200. "output": {
  27201. "type": "integer"
  27202. }
  27203. },
  27204. "required": ["context", "output"],
  27205. "additionalProperties": false
  27206. }
  27207. },
  27208. "required": [
  27209. "id",
  27210. "providerID",
  27211. "name",
  27212. "api",
  27213. "capabilities",
  27214. "request",
  27215. "variants",
  27216. "time",
  27217. "cost",
  27218. "status",
  27219. "enabled",
  27220. "limit"
  27221. ],
  27222. "additionalProperties": false
  27223. },
  27224. "ProviderV2Info": {
  27225. "type": "object",
  27226. "properties": {
  27227. "id": {
  27228. "type": "string"
  27229. },
  27230. "name": {
  27231. "type": "string"
  27232. },
  27233. "disabled": {
  27234. "type": "boolean"
  27235. },
  27236. "api": {
  27237. "anyOf": [
  27238. {
  27239. "type": "object",
  27240. "properties": {
  27241. "type": {
  27242. "type": "string",
  27243. "enum": ["aisdk"]
  27244. },
  27245. "package": {
  27246. "type": "string"
  27247. },
  27248. "url": {
  27249. "type": "string"
  27250. },
  27251. "settings": {
  27252. "type": "object"
  27253. }
  27254. },
  27255. "required": ["type", "package"],
  27256. "additionalProperties": false
  27257. },
  27258. {
  27259. "type": "object",
  27260. "properties": {
  27261. "type": {
  27262. "type": "string",
  27263. "enum": ["native"]
  27264. },
  27265. "url": {
  27266. "type": "string"
  27267. },
  27268. "settings": {
  27269. "type": "object"
  27270. }
  27271. },
  27272. "required": ["type", "settings"],
  27273. "additionalProperties": false
  27274. }
  27275. ]
  27276. },
  27277. "request": {
  27278. "type": "object",
  27279. "properties": {
  27280. "headers": {
  27281. "type": "object",
  27282. "additionalProperties": {
  27283. "type": "string"
  27284. }
  27285. },
  27286. "body": {
  27287. "type": "object"
  27288. }
  27289. },
  27290. "required": ["headers", "body"],
  27291. "additionalProperties": false
  27292. }
  27293. },
  27294. "required": ["id", "name", "api", "request"],
  27295. "additionalProperties": false
  27296. },
  27297. "IntegrationWhen": {
  27298. "type": "object",
  27299. "properties": {
  27300. "key": {
  27301. "type": "string"
  27302. },
  27303. "op": {
  27304. "type": "string",
  27305. "enum": ["eq", "neq"]
  27306. },
  27307. "value": {
  27308. "type": "string"
  27309. }
  27310. },
  27311. "required": ["key", "op", "value"],
  27312. "additionalProperties": false
  27313. },
  27314. "IntegrationTextPrompt": {
  27315. "type": "object",
  27316. "properties": {
  27317. "type": {
  27318. "type": "string",
  27319. "enum": ["text"]
  27320. },
  27321. "key": {
  27322. "type": "string"
  27323. },
  27324. "message": {
  27325. "type": "string"
  27326. },
  27327. "placeholder": {
  27328. "type": "string"
  27329. },
  27330. "when": {
  27331. "$ref": "#/components/schemas/IntegrationWhen"
  27332. }
  27333. },
  27334. "required": ["type", "key", "message"],
  27335. "additionalProperties": false
  27336. },
  27337. "IntegrationSelectPrompt": {
  27338. "type": "object",
  27339. "properties": {
  27340. "type": {
  27341. "type": "string",
  27342. "enum": ["select"]
  27343. },
  27344. "key": {
  27345. "type": "string"
  27346. },
  27347. "message": {
  27348. "type": "string"
  27349. },
  27350. "options": {
  27351. "type": "array",
  27352. "items": {
  27353. "type": "object",
  27354. "properties": {
  27355. "label": {
  27356. "type": "string"
  27357. },
  27358. "value": {
  27359. "type": "string"
  27360. },
  27361. "hint": {
  27362. "type": "string"
  27363. }
  27364. },
  27365. "required": ["label", "value"],
  27366. "additionalProperties": false
  27367. }
  27368. },
  27369. "when": {
  27370. "$ref": "#/components/schemas/IntegrationWhen"
  27371. }
  27372. },
  27373. "required": ["type", "key", "message", "options"],
  27374. "additionalProperties": false
  27375. },
  27376. "IntegrationOAuthMethod": {
  27377. "type": "object",
  27378. "properties": {
  27379. "id": {
  27380. "type": "string"
  27381. },
  27382. "type": {
  27383. "type": "string",
  27384. "enum": ["oauth"]
  27385. },
  27386. "label": {
  27387. "type": "string"
  27388. },
  27389. "prompts": {
  27390. "type": "array",
  27391. "items": {
  27392. "anyOf": [
  27393. {
  27394. "$ref": "#/components/schemas/IntegrationTextPrompt"
  27395. },
  27396. {
  27397. "$ref": "#/components/schemas/IntegrationSelectPrompt"
  27398. }
  27399. ]
  27400. }
  27401. }
  27402. },
  27403. "required": ["id", "type", "label"],
  27404. "additionalProperties": false
  27405. },
  27406. "IntegrationKeyMethod": {
  27407. "type": "object",
  27408. "properties": {
  27409. "type": {
  27410. "type": "string",
  27411. "enum": ["key"]
  27412. },
  27413. "label": {
  27414. "type": "string"
  27415. }
  27416. },
  27417. "required": ["type"],
  27418. "additionalProperties": false
  27419. },
  27420. "IntegrationEnvMethod": {
  27421. "type": "object",
  27422. "properties": {
  27423. "type": {
  27424. "type": "string",
  27425. "enum": ["env"]
  27426. },
  27427. "names": {
  27428. "type": "array",
  27429. "items": {
  27430. "type": "string"
  27431. }
  27432. }
  27433. },
  27434. "required": ["type", "names"],
  27435. "additionalProperties": false
  27436. },
  27437. "ConnectionCredentialInfo": {
  27438. "type": "object",
  27439. "properties": {
  27440. "type": {
  27441. "type": "string",
  27442. "enum": ["credential"]
  27443. },
  27444. "id": {
  27445. "type": "string"
  27446. },
  27447. "label": {
  27448. "type": "string"
  27449. }
  27450. },
  27451. "required": ["type", "id", "label"],
  27452. "additionalProperties": false
  27453. },
  27454. "ConnectionEnvInfo": {
  27455. "type": "object",
  27456. "properties": {
  27457. "type": {
  27458. "type": "string",
  27459. "enum": ["env"]
  27460. },
  27461. "name": {
  27462. "type": "string"
  27463. }
  27464. },
  27465. "required": ["type", "name"],
  27466. "additionalProperties": false
  27467. },
  27468. "ConnectionInfo": {
  27469. "anyOf": [
  27470. {
  27471. "$ref": "#/components/schemas/ConnectionCredentialInfo"
  27472. },
  27473. {
  27474. "$ref": "#/components/schemas/ConnectionEnvInfo"
  27475. }
  27476. ]
  27477. },
  27478. "IntegrationInfo": {
  27479. "type": "object",
  27480. "properties": {
  27481. "id": {
  27482. "type": "string"
  27483. },
  27484. "name": {
  27485. "type": "string"
  27486. },
  27487. "methods": {
  27488. "type": "array",
  27489. "items": {
  27490. "anyOf": [
  27491. {
  27492. "$ref": "#/components/schemas/IntegrationOAuthMethod"
  27493. },
  27494. {
  27495. "$ref": "#/components/schemas/IntegrationKeyMethod"
  27496. },
  27497. {
  27498. "$ref": "#/components/schemas/IntegrationEnvMethod"
  27499. }
  27500. ]
  27501. }
  27502. },
  27503. "connections": {
  27504. "type": "array",
  27505. "items": {
  27506. "$ref": "#/components/schemas/ConnectionInfo"
  27507. }
  27508. }
  27509. },
  27510. "required": ["id", "name", "methods", "connections"],
  27511. "additionalProperties": false
  27512. },
  27513. "IntegrationAttempt": {
  27514. "type": "object",
  27515. "properties": {
  27516. "attemptID": {
  27517. "type": "string"
  27518. },
  27519. "url": {
  27520. "type": "string"
  27521. },
  27522. "instructions": {
  27523. "type": "string"
  27524. },
  27525. "mode": {
  27526. "type": "string",
  27527. "enum": ["auto", "code"]
  27528. },
  27529. "time": {
  27530. "type": "object",
  27531. "properties": {
  27532. "created": {
  27533. "anyOf": [
  27534. {
  27535. "type": "number"
  27536. },
  27537. {
  27538. "type": "string",
  27539. "enum": ["NaN"]
  27540. },
  27541. {
  27542. "type": "string",
  27543. "enum": ["Infinity"]
  27544. },
  27545. {
  27546. "type": "string",
  27547. "enum": ["-Infinity"]
  27548. },
  27549. {
  27550. "type": "string",
  27551. "enum": ["Infinity", "-Infinity", "NaN"]
  27552. }
  27553. ]
  27554. },
  27555. "expires": {
  27556. "anyOf": [
  27557. {
  27558. "type": "number"
  27559. },
  27560. {
  27561. "type": "string",
  27562. "enum": ["NaN"]
  27563. },
  27564. {
  27565. "type": "string",
  27566. "enum": ["Infinity"]
  27567. },
  27568. {
  27569. "type": "string",
  27570. "enum": ["-Infinity"]
  27571. },
  27572. {
  27573. "type": "string",
  27574. "enum": ["Infinity", "-Infinity", "NaN"]
  27575. }
  27576. ]
  27577. }
  27578. },
  27579. "required": ["created", "expires"],
  27580. "additionalProperties": false
  27581. }
  27582. },
  27583. "required": ["attemptID", "url", "instructions", "mode", "time"],
  27584. "additionalProperties": false
  27585. },
  27586. "PermissionV2Request": {
  27587. "type": "object",
  27588. "properties": {
  27589. "id": {
  27590. "type": "string",
  27591. "pattern": "^per"
  27592. },
  27593. "sessionID": {
  27594. "type": "string",
  27595. "pattern": "^ses"
  27596. },
  27597. "action": {
  27598. "type": "string"
  27599. },
  27600. "resources": {
  27601. "type": "array",
  27602. "items": {
  27603. "type": "string"
  27604. }
  27605. },
  27606. "save": {
  27607. "type": "array",
  27608. "items": {
  27609. "type": "string"
  27610. }
  27611. },
  27612. "metadata": {
  27613. "type": "object"
  27614. },
  27615. "source": {
  27616. "$ref": "#/components/schemas/PermissionV2Source"
  27617. }
  27618. },
  27619. "required": ["id", "sessionID", "action", "resources"],
  27620. "additionalProperties": false
  27621. },
  27622. "PermissionSavedInfo": {
  27623. "type": "object",
  27624. "properties": {
  27625. "id": {
  27626. "type": "string"
  27627. },
  27628. "projectID": {
  27629. "type": "string"
  27630. },
  27631. "action": {
  27632. "type": "string"
  27633. },
  27634. "resource": {
  27635. "type": "string"
  27636. }
  27637. },
  27638. "required": ["id", "projectID", "action", "resource"],
  27639. "additionalProperties": false
  27640. },
  27641. "FileSystemEntry": {
  27642. "type": "object",
  27643. "properties": {
  27644. "path": {
  27645. "type": "string"
  27646. },
  27647. "type": {
  27648. "type": "string",
  27649. "enum": ["file", "directory"]
  27650. },
  27651. "mime": {
  27652. "type": "string"
  27653. }
  27654. },
  27655. "required": ["path", "type", "mime"],
  27656. "additionalProperties": false
  27657. },
  27658. "CommandV2Info": {
  27659. "type": "object",
  27660. "properties": {
  27661. "name": {
  27662. "type": "string"
  27663. },
  27664. "template": {
  27665. "type": "string"
  27666. },
  27667. "description": {
  27668. "type": "string"
  27669. },
  27670. "agent": {
  27671. "type": "string"
  27672. },
  27673. "model": {
  27674. "type": "object",
  27675. "properties": {
  27676. "id": {
  27677. "type": "string"
  27678. },
  27679. "providerID": {
  27680. "type": "string"
  27681. },
  27682. "variant": {
  27683. "type": "string"
  27684. }
  27685. },
  27686. "required": ["id", "providerID"],
  27687. "additionalProperties": false
  27688. },
  27689. "subtask": {
  27690. "type": "boolean"
  27691. }
  27692. },
  27693. "required": ["name", "template"],
  27694. "additionalProperties": false
  27695. },
  27696. "SkillV2Info": {
  27697. "type": "object",
  27698. "properties": {
  27699. "name": {
  27700. "type": "string"
  27701. },
  27702. "description": {
  27703. "type": "string"
  27704. },
  27705. "slash": {
  27706. "type": "boolean"
  27707. },
  27708. "location": {
  27709. "type": "string"
  27710. },
  27711. "content": {
  27712. "type": "string"
  27713. }
  27714. },
  27715. "required": ["name", "location", "content"],
  27716. "additionalProperties": false
  27717. },
  27718. "V2EventModels-devRefreshed": {
  27719. "type": "object",
  27720. "properties": {
  27721. "id": {
  27722. "type": "string",
  27723. "pattern": "^evt_"
  27724. },
  27725. "metadata": {
  27726. "type": "object"
  27727. },
  27728. "durable": {
  27729. "type": "object",
  27730. "properties": {
  27731. "aggregateID": {
  27732. "type": "string"
  27733. },
  27734. "seq": {
  27735. "type": "integer"
  27736. },
  27737. "version": {
  27738. "type": "integer"
  27739. }
  27740. },
  27741. "required": ["aggregateID", "seq", "version"],
  27742. "additionalProperties": false
  27743. },
  27744. "location": {
  27745. "$ref": "#/components/schemas/LocationRef"
  27746. },
  27747. "type": {
  27748. "type": "string",
  27749. "enum": ["models-dev.refreshed"]
  27750. },
  27751. "data": {
  27752. "type": "object",
  27753. "properties": {}
  27754. }
  27755. },
  27756. "required": ["id", "type", "data"],
  27757. "additionalProperties": false
  27758. },
  27759. "V2EventIntegrationUpdated": {
  27760. "type": "object",
  27761. "properties": {
  27762. "id": {
  27763. "type": "string",
  27764. "pattern": "^evt_"
  27765. },
  27766. "metadata": {
  27767. "type": "object"
  27768. },
  27769. "durable": {
  27770. "type": "object",
  27771. "properties": {
  27772. "aggregateID": {
  27773. "type": "string"
  27774. },
  27775. "seq": {
  27776. "type": "integer"
  27777. },
  27778. "version": {
  27779. "type": "integer"
  27780. }
  27781. },
  27782. "required": ["aggregateID", "seq", "version"],
  27783. "additionalProperties": false
  27784. },
  27785. "location": {
  27786. "$ref": "#/components/schemas/LocationRef"
  27787. },
  27788. "type": {
  27789. "type": "string",
  27790. "enum": ["integration.updated"]
  27791. },
  27792. "data": {
  27793. "type": "object",
  27794. "properties": {}
  27795. }
  27796. },
  27797. "required": ["id", "type", "data"],
  27798. "additionalProperties": false
  27799. },
  27800. "V2EventCatalogUpdated": {
  27801. "type": "object",
  27802. "properties": {
  27803. "id": {
  27804. "type": "string",
  27805. "pattern": "^evt_"
  27806. },
  27807. "metadata": {
  27808. "type": "object"
  27809. },
  27810. "durable": {
  27811. "type": "object",
  27812. "properties": {
  27813. "aggregateID": {
  27814. "type": "string"
  27815. },
  27816. "seq": {
  27817. "type": "integer"
  27818. },
  27819. "version": {
  27820. "type": "integer"
  27821. }
  27822. },
  27823. "required": ["aggregateID", "seq", "version"],
  27824. "additionalProperties": false
  27825. },
  27826. "location": {
  27827. "$ref": "#/components/schemas/LocationRef"
  27828. },
  27829. "type": {
  27830. "type": "string",
  27831. "enum": ["catalog.updated"]
  27832. },
  27833. "data": {
  27834. "type": "object",
  27835. "properties": {}
  27836. }
  27837. },
  27838. "required": ["id", "type", "data"],
  27839. "additionalProperties": false
  27840. },
  27841. "V2EventSessionCreated": {
  27842. "type": "object",
  27843. "properties": {
  27844. "id": {
  27845. "type": "string",
  27846. "pattern": "^evt_"
  27847. },
  27848. "metadata": {
  27849. "type": "object"
  27850. },
  27851. "durable": {
  27852. "type": "object",
  27853. "properties": {
  27854. "aggregateID": {
  27855. "type": "string"
  27856. },
  27857. "seq": {
  27858. "type": "integer"
  27859. },
  27860. "version": {
  27861. "type": "integer"
  27862. }
  27863. },
  27864. "required": ["aggregateID", "seq", "version"],
  27865. "additionalProperties": false
  27866. },
  27867. "location": {
  27868. "$ref": "#/components/schemas/LocationRef"
  27869. },
  27870. "type": {
  27871. "type": "string",
  27872. "enum": ["session.created"]
  27873. },
  27874. "data": {
  27875. "type": "object",
  27876. "properties": {
  27877. "sessionID": {
  27878. "type": "string",
  27879. "pattern": "^ses"
  27880. },
  27881. "info": {
  27882. "$ref": "#/components/schemas/Session"
  27883. }
  27884. },
  27885. "required": ["sessionID", "info"],
  27886. "additionalProperties": false
  27887. }
  27888. },
  27889. "required": ["id", "type", "data"],
  27890. "additionalProperties": false
  27891. },
  27892. "V2EventSessionUpdated": {
  27893. "type": "object",
  27894. "properties": {
  27895. "id": {
  27896. "type": "string",
  27897. "pattern": "^evt_"
  27898. },
  27899. "metadata": {
  27900. "type": "object"
  27901. },
  27902. "durable": {
  27903. "type": "object",
  27904. "properties": {
  27905. "aggregateID": {
  27906. "type": "string"
  27907. },
  27908. "seq": {
  27909. "type": "integer"
  27910. },
  27911. "version": {
  27912. "type": "integer"
  27913. }
  27914. },
  27915. "required": ["aggregateID", "seq", "version"],
  27916. "additionalProperties": false
  27917. },
  27918. "location": {
  27919. "$ref": "#/components/schemas/LocationRef"
  27920. },
  27921. "type": {
  27922. "type": "string",
  27923. "enum": ["session.updated"]
  27924. },
  27925. "data": {
  27926. "type": "object",
  27927. "properties": {
  27928. "sessionID": {
  27929. "type": "string",
  27930. "pattern": "^ses"
  27931. },
  27932. "info": {
  27933. "$ref": "#/components/schemas/Session"
  27934. }
  27935. },
  27936. "required": ["sessionID", "info"],
  27937. "additionalProperties": false
  27938. }
  27939. },
  27940. "required": ["id", "type", "data"],
  27941. "additionalProperties": false
  27942. },
  27943. "V2EventSessionDeleted": {
  27944. "type": "object",
  27945. "properties": {
  27946. "id": {
  27947. "type": "string",
  27948. "pattern": "^evt_"
  27949. },
  27950. "metadata": {
  27951. "type": "object"
  27952. },
  27953. "durable": {
  27954. "type": "object",
  27955. "properties": {
  27956. "aggregateID": {
  27957. "type": "string"
  27958. },
  27959. "seq": {
  27960. "type": "integer"
  27961. },
  27962. "version": {
  27963. "type": "integer"
  27964. }
  27965. },
  27966. "required": ["aggregateID", "seq", "version"],
  27967. "additionalProperties": false
  27968. },
  27969. "location": {
  27970. "$ref": "#/components/schemas/LocationRef"
  27971. },
  27972. "type": {
  27973. "type": "string",
  27974. "enum": ["session.deleted"]
  27975. },
  27976. "data": {
  27977. "type": "object",
  27978. "properties": {
  27979. "sessionID": {
  27980. "type": "string",
  27981. "pattern": "^ses"
  27982. },
  27983. "info": {
  27984. "$ref": "#/components/schemas/Session"
  27985. }
  27986. },
  27987. "required": ["sessionID", "info"],
  27988. "additionalProperties": false
  27989. }
  27990. },
  27991. "required": ["id", "type", "data"],
  27992. "additionalProperties": false
  27993. },
  27994. "V2EventMessageUpdated": {
  27995. "type": "object",
  27996. "properties": {
  27997. "id": {
  27998. "type": "string",
  27999. "pattern": "^evt_"
  28000. },
  28001. "metadata": {
  28002. "type": "object"
  28003. },
  28004. "durable": {
  28005. "type": "object",
  28006. "properties": {
  28007. "aggregateID": {
  28008. "type": "string"
  28009. },
  28010. "seq": {
  28011. "type": "integer"
  28012. },
  28013. "version": {
  28014. "type": "integer"
  28015. }
  28016. },
  28017. "required": ["aggregateID", "seq", "version"],
  28018. "additionalProperties": false
  28019. },
  28020. "location": {
  28021. "$ref": "#/components/schemas/LocationRef"
  28022. },
  28023. "type": {
  28024. "type": "string",
  28025. "enum": ["message.updated"]
  28026. },
  28027. "data": {
  28028. "type": "object",
  28029. "properties": {
  28030. "sessionID": {
  28031. "type": "string",
  28032. "pattern": "^ses"
  28033. },
  28034. "info": {
  28035. "$ref": "#/components/schemas/Message"
  28036. }
  28037. },
  28038. "required": ["sessionID", "info"],
  28039. "additionalProperties": false
  28040. }
  28041. },
  28042. "required": ["id", "type", "data"],
  28043. "additionalProperties": false
  28044. },
  28045. "V2EventMessageRemoved": {
  28046. "type": "object",
  28047. "properties": {
  28048. "id": {
  28049. "type": "string",
  28050. "pattern": "^evt_"
  28051. },
  28052. "metadata": {
  28053. "type": "object"
  28054. },
  28055. "durable": {
  28056. "type": "object",
  28057. "properties": {
  28058. "aggregateID": {
  28059. "type": "string"
  28060. },
  28061. "seq": {
  28062. "type": "integer"
  28063. },
  28064. "version": {
  28065. "type": "integer"
  28066. }
  28067. },
  28068. "required": ["aggregateID", "seq", "version"],
  28069. "additionalProperties": false
  28070. },
  28071. "location": {
  28072. "$ref": "#/components/schemas/LocationRef"
  28073. },
  28074. "type": {
  28075. "type": "string",
  28076. "enum": ["message.removed"]
  28077. },
  28078. "data": {
  28079. "type": "object",
  28080. "properties": {
  28081. "sessionID": {
  28082. "type": "string",
  28083. "pattern": "^ses"
  28084. },
  28085. "messageID": {
  28086. "type": "string",
  28087. "pattern": "^msg"
  28088. }
  28089. },
  28090. "required": ["sessionID", "messageID"],
  28091. "additionalProperties": false
  28092. }
  28093. },
  28094. "required": ["id", "type", "data"],
  28095. "additionalProperties": false
  28096. },
  28097. "V2EventMessagePartUpdated": {
  28098. "type": "object",
  28099. "properties": {
  28100. "id": {
  28101. "type": "string",
  28102. "pattern": "^evt_"
  28103. },
  28104. "metadata": {
  28105. "type": "object"
  28106. },
  28107. "durable": {
  28108. "type": "object",
  28109. "properties": {
  28110. "aggregateID": {
  28111. "type": "string"
  28112. },
  28113. "seq": {
  28114. "type": "integer"
  28115. },
  28116. "version": {
  28117. "type": "integer"
  28118. }
  28119. },
  28120. "required": ["aggregateID", "seq", "version"],
  28121. "additionalProperties": false
  28122. },
  28123. "location": {
  28124. "$ref": "#/components/schemas/LocationRef"
  28125. },
  28126. "type": {
  28127. "type": "string",
  28128. "enum": ["message.part.updated"]
  28129. },
  28130. "data": {
  28131. "type": "object",
  28132. "properties": {
  28133. "sessionID": {
  28134. "type": "string",
  28135. "pattern": "^ses"
  28136. },
  28137. "part": {
  28138. "$ref": "#/components/schemas/Part"
  28139. },
  28140. "time": {
  28141. "type": "number"
  28142. }
  28143. },
  28144. "required": ["sessionID", "part", "time"],
  28145. "additionalProperties": false
  28146. }
  28147. },
  28148. "required": ["id", "type", "data"],
  28149. "additionalProperties": false
  28150. },
  28151. "V2EventMessagePartRemoved": {
  28152. "type": "object",
  28153. "properties": {
  28154. "id": {
  28155. "type": "string",
  28156. "pattern": "^evt_"
  28157. },
  28158. "metadata": {
  28159. "type": "object"
  28160. },
  28161. "durable": {
  28162. "type": "object",
  28163. "properties": {
  28164. "aggregateID": {
  28165. "type": "string"
  28166. },
  28167. "seq": {
  28168. "type": "integer"
  28169. },
  28170. "version": {
  28171. "type": "integer"
  28172. }
  28173. },
  28174. "required": ["aggregateID", "seq", "version"],
  28175. "additionalProperties": false
  28176. },
  28177. "location": {
  28178. "$ref": "#/components/schemas/LocationRef"
  28179. },
  28180. "type": {
  28181. "type": "string",
  28182. "enum": ["message.part.removed"]
  28183. },
  28184. "data": {
  28185. "type": "object",
  28186. "properties": {
  28187. "sessionID": {
  28188. "type": "string",
  28189. "pattern": "^ses"
  28190. },
  28191. "messageID": {
  28192. "type": "string",
  28193. "pattern": "^msg"
  28194. },
  28195. "partID": {
  28196. "type": "string",
  28197. "pattern": "^prt"
  28198. }
  28199. },
  28200. "required": ["sessionID", "messageID", "partID"],
  28201. "additionalProperties": false
  28202. }
  28203. },
  28204. "required": ["id", "type", "data"],
  28205. "additionalProperties": false
  28206. },
  28207. "V2EventSessionNextAgentSwitched": {
  28208. "type": "object",
  28209. "properties": {
  28210. "id": {
  28211. "type": "string",
  28212. "pattern": "^evt_"
  28213. },
  28214. "metadata": {
  28215. "type": "object"
  28216. },
  28217. "durable": {
  28218. "type": "object",
  28219. "properties": {
  28220. "aggregateID": {
  28221. "type": "string"
  28222. },
  28223. "seq": {
  28224. "type": "integer"
  28225. },
  28226. "version": {
  28227. "type": "integer"
  28228. }
  28229. },
  28230. "required": ["aggregateID", "seq", "version"],
  28231. "additionalProperties": false
  28232. },
  28233. "location": {
  28234. "$ref": "#/components/schemas/LocationRef"
  28235. },
  28236. "type": {
  28237. "type": "string",
  28238. "enum": ["session.next.agent.switched"]
  28239. },
  28240. "data": {
  28241. "type": "object",
  28242. "properties": {
  28243. "timestamp": {
  28244. "type": "number"
  28245. },
  28246. "sessionID": {
  28247. "type": "string",
  28248. "pattern": "^ses"
  28249. },
  28250. "messageID": {
  28251. "type": "string",
  28252. "pattern": "^msg_"
  28253. },
  28254. "agent": {
  28255. "type": "string"
  28256. }
  28257. },
  28258. "required": ["timestamp", "sessionID", "messageID", "agent"],
  28259. "additionalProperties": false
  28260. }
  28261. },
  28262. "required": ["id", "type", "data"],
  28263. "additionalProperties": false
  28264. },
  28265. "V2EventSessionNextModelSwitched": {
  28266. "type": "object",
  28267. "properties": {
  28268. "id": {
  28269. "type": "string",
  28270. "pattern": "^evt_"
  28271. },
  28272. "metadata": {
  28273. "type": "object"
  28274. },
  28275. "durable": {
  28276. "type": "object",
  28277. "properties": {
  28278. "aggregateID": {
  28279. "type": "string"
  28280. },
  28281. "seq": {
  28282. "type": "integer"
  28283. },
  28284. "version": {
  28285. "type": "integer"
  28286. }
  28287. },
  28288. "required": ["aggregateID", "seq", "version"],
  28289. "additionalProperties": false
  28290. },
  28291. "location": {
  28292. "$ref": "#/components/schemas/LocationRef"
  28293. },
  28294. "type": {
  28295. "type": "string",
  28296. "enum": ["session.next.model.switched"]
  28297. },
  28298. "data": {
  28299. "type": "object",
  28300. "properties": {
  28301. "timestamp": {
  28302. "type": "number"
  28303. },
  28304. "sessionID": {
  28305. "type": "string",
  28306. "pattern": "^ses"
  28307. },
  28308. "messageID": {
  28309. "type": "string",
  28310. "pattern": "^msg_"
  28311. },
  28312. "model": {
  28313. "type": "object",
  28314. "properties": {
  28315. "id": {
  28316. "type": "string"
  28317. },
  28318. "providerID": {
  28319. "type": "string"
  28320. },
  28321. "variant": {
  28322. "type": "string"
  28323. }
  28324. },
  28325. "required": ["id", "providerID"],
  28326. "additionalProperties": false
  28327. }
  28328. },
  28329. "required": ["timestamp", "sessionID", "messageID", "model"],
  28330. "additionalProperties": false
  28331. }
  28332. },
  28333. "required": ["id", "type", "data"],
  28334. "additionalProperties": false
  28335. },
  28336. "V2EventSessionNextMoved": {
  28337. "type": "object",
  28338. "properties": {
  28339. "id": {
  28340. "type": "string",
  28341. "pattern": "^evt_"
  28342. },
  28343. "metadata": {
  28344. "type": "object"
  28345. },
  28346. "durable": {
  28347. "type": "object",
  28348. "properties": {
  28349. "aggregateID": {
  28350. "type": "string"
  28351. },
  28352. "seq": {
  28353. "type": "integer"
  28354. },
  28355. "version": {
  28356. "type": "integer"
  28357. }
  28358. },
  28359. "required": ["aggregateID", "seq", "version"],
  28360. "additionalProperties": false
  28361. },
  28362. "location": {
  28363. "$ref": "#/components/schemas/LocationRef"
  28364. },
  28365. "type": {
  28366. "type": "string",
  28367. "enum": ["session.next.moved"]
  28368. },
  28369. "data": {
  28370. "type": "object",
  28371. "properties": {
  28372. "timestamp": {
  28373. "type": "number"
  28374. },
  28375. "sessionID": {
  28376. "type": "string",
  28377. "pattern": "^ses"
  28378. },
  28379. "location": {
  28380. "$ref": "#/components/schemas/LocationRef"
  28381. },
  28382. "subdirectory": {
  28383. "type": "string"
  28384. }
  28385. },
  28386. "required": ["timestamp", "sessionID", "location"],
  28387. "additionalProperties": false
  28388. }
  28389. },
  28390. "required": ["id", "type", "data"],
  28391. "additionalProperties": false
  28392. },
  28393. "V2EventSessionNextPrompted": {
  28394. "type": "object",
  28395. "properties": {
  28396. "id": {
  28397. "type": "string",
  28398. "pattern": "^evt_"
  28399. },
  28400. "metadata": {
  28401. "type": "object"
  28402. },
  28403. "durable": {
  28404. "type": "object",
  28405. "properties": {
  28406. "aggregateID": {
  28407. "type": "string"
  28408. },
  28409. "seq": {
  28410. "type": "integer"
  28411. },
  28412. "version": {
  28413. "type": "integer"
  28414. }
  28415. },
  28416. "required": ["aggregateID", "seq", "version"],
  28417. "additionalProperties": false
  28418. },
  28419. "location": {
  28420. "$ref": "#/components/schemas/LocationRef"
  28421. },
  28422. "type": {
  28423. "type": "string",
  28424. "enum": ["session.next.prompted"]
  28425. },
  28426. "data": {
  28427. "type": "object",
  28428. "properties": {
  28429. "timestamp": {
  28430. "type": "number"
  28431. },
  28432. "sessionID": {
  28433. "type": "string",
  28434. "pattern": "^ses"
  28435. },
  28436. "messageID": {
  28437. "type": "string",
  28438. "pattern": "^msg_"
  28439. },
  28440. "prompt": {
  28441. "$ref": "#/components/schemas/Prompt"
  28442. },
  28443. "delivery": {
  28444. "type": "string",
  28445. "enum": ["steer", "queue"]
  28446. }
  28447. },
  28448. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  28449. "additionalProperties": false
  28450. }
  28451. },
  28452. "required": ["id", "type", "data"],
  28453. "additionalProperties": false
  28454. },
  28455. "V2EventSessionNextPromptAdmitted": {
  28456. "type": "object",
  28457. "properties": {
  28458. "id": {
  28459. "type": "string",
  28460. "pattern": "^evt_"
  28461. },
  28462. "metadata": {
  28463. "type": "object"
  28464. },
  28465. "durable": {
  28466. "type": "object",
  28467. "properties": {
  28468. "aggregateID": {
  28469. "type": "string"
  28470. },
  28471. "seq": {
  28472. "type": "integer"
  28473. },
  28474. "version": {
  28475. "type": "integer"
  28476. }
  28477. },
  28478. "required": ["aggregateID", "seq", "version"],
  28479. "additionalProperties": false
  28480. },
  28481. "location": {
  28482. "$ref": "#/components/schemas/LocationRef"
  28483. },
  28484. "type": {
  28485. "type": "string",
  28486. "enum": ["session.next.prompt.admitted"]
  28487. },
  28488. "data": {
  28489. "type": "object",
  28490. "properties": {
  28491. "timestamp": {
  28492. "type": "number"
  28493. },
  28494. "sessionID": {
  28495. "type": "string",
  28496. "pattern": "^ses"
  28497. },
  28498. "messageID": {
  28499. "type": "string",
  28500. "pattern": "^msg_"
  28501. },
  28502. "prompt": {
  28503. "$ref": "#/components/schemas/Prompt"
  28504. },
  28505. "delivery": {
  28506. "type": "string",
  28507. "enum": ["steer", "queue"]
  28508. }
  28509. },
  28510. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  28511. "additionalProperties": false
  28512. }
  28513. },
  28514. "required": ["id", "type", "data"],
  28515. "additionalProperties": false
  28516. },
  28517. "V2EventSessionNextContextUpdated": {
  28518. "type": "object",
  28519. "properties": {
  28520. "id": {
  28521. "type": "string",
  28522. "pattern": "^evt_"
  28523. },
  28524. "metadata": {
  28525. "type": "object"
  28526. },
  28527. "durable": {
  28528. "type": "object",
  28529. "properties": {
  28530. "aggregateID": {
  28531. "type": "string"
  28532. },
  28533. "seq": {
  28534. "type": "integer"
  28535. },
  28536. "version": {
  28537. "type": "integer"
  28538. }
  28539. },
  28540. "required": ["aggregateID", "seq", "version"],
  28541. "additionalProperties": false
  28542. },
  28543. "location": {
  28544. "$ref": "#/components/schemas/LocationRef"
  28545. },
  28546. "type": {
  28547. "type": "string",
  28548. "enum": ["session.next.context.updated"]
  28549. },
  28550. "data": {
  28551. "type": "object",
  28552. "properties": {
  28553. "timestamp": {
  28554. "type": "number"
  28555. },
  28556. "sessionID": {
  28557. "type": "string",
  28558. "pattern": "^ses"
  28559. },
  28560. "messageID": {
  28561. "type": "string",
  28562. "pattern": "^msg_"
  28563. },
  28564. "text": {
  28565. "type": "string"
  28566. }
  28567. },
  28568. "required": ["timestamp", "sessionID", "messageID", "text"],
  28569. "additionalProperties": false
  28570. }
  28571. },
  28572. "required": ["id", "type", "data"],
  28573. "additionalProperties": false
  28574. },
  28575. "V2EventSessionNextSynthetic": {
  28576. "type": "object",
  28577. "properties": {
  28578. "id": {
  28579. "type": "string",
  28580. "pattern": "^evt_"
  28581. },
  28582. "metadata": {
  28583. "type": "object"
  28584. },
  28585. "durable": {
  28586. "type": "object",
  28587. "properties": {
  28588. "aggregateID": {
  28589. "type": "string"
  28590. },
  28591. "seq": {
  28592. "type": "integer"
  28593. },
  28594. "version": {
  28595. "type": "integer"
  28596. }
  28597. },
  28598. "required": ["aggregateID", "seq", "version"],
  28599. "additionalProperties": false
  28600. },
  28601. "location": {
  28602. "$ref": "#/components/schemas/LocationRef"
  28603. },
  28604. "type": {
  28605. "type": "string",
  28606. "enum": ["session.next.synthetic"]
  28607. },
  28608. "data": {
  28609. "type": "object",
  28610. "properties": {
  28611. "timestamp": {
  28612. "type": "number"
  28613. },
  28614. "sessionID": {
  28615. "type": "string",
  28616. "pattern": "^ses"
  28617. },
  28618. "messageID": {
  28619. "type": "string",
  28620. "pattern": "^msg_"
  28621. },
  28622. "text": {
  28623. "type": "string"
  28624. }
  28625. },
  28626. "required": ["timestamp", "sessionID", "messageID", "text"],
  28627. "additionalProperties": false
  28628. }
  28629. },
  28630. "required": ["id", "type", "data"],
  28631. "additionalProperties": false
  28632. },
  28633. "V2EventSessionNextShellStarted": {
  28634. "type": "object",
  28635. "properties": {
  28636. "id": {
  28637. "type": "string",
  28638. "pattern": "^evt_"
  28639. },
  28640. "metadata": {
  28641. "type": "object"
  28642. },
  28643. "durable": {
  28644. "type": "object",
  28645. "properties": {
  28646. "aggregateID": {
  28647. "type": "string"
  28648. },
  28649. "seq": {
  28650. "type": "integer"
  28651. },
  28652. "version": {
  28653. "type": "integer"
  28654. }
  28655. },
  28656. "required": ["aggregateID", "seq", "version"],
  28657. "additionalProperties": false
  28658. },
  28659. "location": {
  28660. "$ref": "#/components/schemas/LocationRef"
  28661. },
  28662. "type": {
  28663. "type": "string",
  28664. "enum": ["session.next.shell.started"]
  28665. },
  28666. "data": {
  28667. "type": "object",
  28668. "properties": {
  28669. "timestamp": {
  28670. "type": "number"
  28671. },
  28672. "sessionID": {
  28673. "type": "string",
  28674. "pattern": "^ses"
  28675. },
  28676. "messageID": {
  28677. "type": "string",
  28678. "pattern": "^msg_"
  28679. },
  28680. "callID": {
  28681. "type": "string"
  28682. },
  28683. "command": {
  28684. "type": "string"
  28685. }
  28686. },
  28687. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  28688. "additionalProperties": false
  28689. }
  28690. },
  28691. "required": ["id", "type", "data"],
  28692. "additionalProperties": false
  28693. },
  28694. "V2EventSessionNextShellEnded": {
  28695. "type": "object",
  28696. "properties": {
  28697. "id": {
  28698. "type": "string",
  28699. "pattern": "^evt_"
  28700. },
  28701. "metadata": {
  28702. "type": "object"
  28703. },
  28704. "durable": {
  28705. "type": "object",
  28706. "properties": {
  28707. "aggregateID": {
  28708. "type": "string"
  28709. },
  28710. "seq": {
  28711. "type": "integer"
  28712. },
  28713. "version": {
  28714. "type": "integer"
  28715. }
  28716. },
  28717. "required": ["aggregateID", "seq", "version"],
  28718. "additionalProperties": false
  28719. },
  28720. "location": {
  28721. "$ref": "#/components/schemas/LocationRef"
  28722. },
  28723. "type": {
  28724. "type": "string",
  28725. "enum": ["session.next.shell.ended"]
  28726. },
  28727. "data": {
  28728. "type": "object",
  28729. "properties": {
  28730. "timestamp": {
  28731. "type": "number"
  28732. },
  28733. "sessionID": {
  28734. "type": "string",
  28735. "pattern": "^ses"
  28736. },
  28737. "callID": {
  28738. "type": "string"
  28739. },
  28740. "output": {
  28741. "type": "string"
  28742. }
  28743. },
  28744. "required": ["timestamp", "sessionID", "callID", "output"],
  28745. "additionalProperties": false
  28746. }
  28747. },
  28748. "required": ["id", "type", "data"],
  28749. "additionalProperties": false
  28750. },
  28751. "V2EventSessionNextStepStarted": {
  28752. "type": "object",
  28753. "properties": {
  28754. "id": {
  28755. "type": "string",
  28756. "pattern": "^evt_"
  28757. },
  28758. "metadata": {
  28759. "type": "object"
  28760. },
  28761. "durable": {
  28762. "type": "object",
  28763. "properties": {
  28764. "aggregateID": {
  28765. "type": "string"
  28766. },
  28767. "seq": {
  28768. "type": "integer"
  28769. },
  28770. "version": {
  28771. "type": "integer"
  28772. }
  28773. },
  28774. "required": ["aggregateID", "seq", "version"],
  28775. "additionalProperties": false
  28776. },
  28777. "location": {
  28778. "$ref": "#/components/schemas/LocationRef"
  28779. },
  28780. "type": {
  28781. "type": "string",
  28782. "enum": ["session.next.step.started"]
  28783. },
  28784. "data": {
  28785. "type": "object",
  28786. "properties": {
  28787. "timestamp": {
  28788. "type": "number"
  28789. },
  28790. "sessionID": {
  28791. "type": "string",
  28792. "pattern": "^ses"
  28793. },
  28794. "assistantMessageID": {
  28795. "type": "string",
  28796. "pattern": "^msg_"
  28797. },
  28798. "agent": {
  28799. "type": "string"
  28800. },
  28801. "model": {
  28802. "type": "object",
  28803. "properties": {
  28804. "id": {
  28805. "type": "string"
  28806. },
  28807. "providerID": {
  28808. "type": "string"
  28809. },
  28810. "variant": {
  28811. "type": "string"
  28812. }
  28813. },
  28814. "required": ["id", "providerID"],
  28815. "additionalProperties": false
  28816. },
  28817. "snapshot": {
  28818. "type": "string"
  28819. }
  28820. },
  28821. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  28822. "additionalProperties": false
  28823. }
  28824. },
  28825. "required": ["id", "type", "data"],
  28826. "additionalProperties": false
  28827. },
  28828. "V2EventSessionNextStepEnded": {
  28829. "type": "object",
  28830. "properties": {
  28831. "id": {
  28832. "type": "string",
  28833. "pattern": "^evt_"
  28834. },
  28835. "metadata": {
  28836. "type": "object"
  28837. },
  28838. "durable": {
  28839. "type": "object",
  28840. "properties": {
  28841. "aggregateID": {
  28842. "type": "string"
  28843. },
  28844. "seq": {
  28845. "type": "integer"
  28846. },
  28847. "version": {
  28848. "type": "integer"
  28849. }
  28850. },
  28851. "required": ["aggregateID", "seq", "version"],
  28852. "additionalProperties": false
  28853. },
  28854. "location": {
  28855. "$ref": "#/components/schemas/LocationRef"
  28856. },
  28857. "type": {
  28858. "type": "string",
  28859. "enum": ["session.next.step.ended"]
  28860. },
  28861. "data": {
  28862. "type": "object",
  28863. "properties": {
  28864. "timestamp": {
  28865. "type": "number"
  28866. },
  28867. "sessionID": {
  28868. "type": "string",
  28869. "pattern": "^ses"
  28870. },
  28871. "assistantMessageID": {
  28872. "type": "string",
  28873. "pattern": "^msg_"
  28874. },
  28875. "finish": {
  28876. "type": "string"
  28877. },
  28878. "cost": {
  28879. "type": "number"
  28880. },
  28881. "tokens": {
  28882. "type": "object",
  28883. "properties": {
  28884. "input": {
  28885. "type": "number"
  28886. },
  28887. "output": {
  28888. "type": "number"
  28889. },
  28890. "reasoning": {
  28891. "type": "number"
  28892. },
  28893. "cache": {
  28894. "type": "object",
  28895. "properties": {
  28896. "read": {
  28897. "type": "number"
  28898. },
  28899. "write": {
  28900. "type": "number"
  28901. }
  28902. },
  28903. "required": ["read", "write"],
  28904. "additionalProperties": false
  28905. }
  28906. },
  28907. "required": ["input", "output", "reasoning", "cache"],
  28908. "additionalProperties": false
  28909. },
  28910. "snapshot": {
  28911. "type": "string"
  28912. }
  28913. },
  28914. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  28915. "additionalProperties": false
  28916. }
  28917. },
  28918. "required": ["id", "type", "data"],
  28919. "additionalProperties": false
  28920. },
  28921. "V2EventSessionNextStepFailed": {
  28922. "type": "object",
  28923. "properties": {
  28924. "id": {
  28925. "type": "string",
  28926. "pattern": "^evt_"
  28927. },
  28928. "metadata": {
  28929. "type": "object"
  28930. },
  28931. "durable": {
  28932. "type": "object",
  28933. "properties": {
  28934. "aggregateID": {
  28935. "type": "string"
  28936. },
  28937. "seq": {
  28938. "type": "integer"
  28939. },
  28940. "version": {
  28941. "type": "integer"
  28942. }
  28943. },
  28944. "required": ["aggregateID", "seq", "version"],
  28945. "additionalProperties": false
  28946. },
  28947. "location": {
  28948. "$ref": "#/components/schemas/LocationRef"
  28949. },
  28950. "type": {
  28951. "type": "string",
  28952. "enum": ["session.next.step.failed"]
  28953. },
  28954. "data": {
  28955. "type": "object",
  28956. "properties": {
  28957. "timestamp": {
  28958. "type": "number"
  28959. },
  28960. "sessionID": {
  28961. "type": "string",
  28962. "pattern": "^ses"
  28963. },
  28964. "assistantMessageID": {
  28965. "type": "string",
  28966. "pattern": "^msg_"
  28967. },
  28968. "error": {
  28969. "$ref": "#/components/schemas/SessionErrorUnknown"
  28970. }
  28971. },
  28972. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  28973. "additionalProperties": false
  28974. }
  28975. },
  28976. "required": ["id", "type", "data"],
  28977. "additionalProperties": false
  28978. },
  28979. "V2EventSessionNextTextStarted": {
  28980. "type": "object",
  28981. "properties": {
  28982. "id": {
  28983. "type": "string",
  28984. "pattern": "^evt_"
  28985. },
  28986. "metadata": {
  28987. "type": "object"
  28988. },
  28989. "durable": {
  28990. "type": "object",
  28991. "properties": {
  28992. "aggregateID": {
  28993. "type": "string"
  28994. },
  28995. "seq": {
  28996. "type": "integer"
  28997. },
  28998. "version": {
  28999. "type": "integer"
  29000. }
  29001. },
  29002. "required": ["aggregateID", "seq", "version"],
  29003. "additionalProperties": false
  29004. },
  29005. "location": {
  29006. "$ref": "#/components/schemas/LocationRef"
  29007. },
  29008. "type": {
  29009. "type": "string",
  29010. "enum": ["session.next.text.started"]
  29011. },
  29012. "data": {
  29013. "type": "object",
  29014. "properties": {
  29015. "timestamp": {
  29016. "type": "number"
  29017. },
  29018. "sessionID": {
  29019. "type": "string",
  29020. "pattern": "^ses"
  29021. },
  29022. "assistantMessageID": {
  29023. "type": "string",
  29024. "pattern": "^msg_"
  29025. },
  29026. "textID": {
  29027. "type": "string"
  29028. }
  29029. },
  29030. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  29031. "additionalProperties": false
  29032. }
  29033. },
  29034. "required": ["id", "type", "data"],
  29035. "additionalProperties": false
  29036. },
  29037. "V2EventSessionNextTextDelta": {
  29038. "type": "object",
  29039. "properties": {
  29040. "id": {
  29041. "type": "string",
  29042. "pattern": "^evt_"
  29043. },
  29044. "metadata": {
  29045. "type": "object"
  29046. },
  29047. "durable": {
  29048. "type": "object",
  29049. "properties": {
  29050. "aggregateID": {
  29051. "type": "string"
  29052. },
  29053. "seq": {
  29054. "type": "integer"
  29055. },
  29056. "version": {
  29057. "type": "integer"
  29058. }
  29059. },
  29060. "required": ["aggregateID", "seq", "version"],
  29061. "additionalProperties": false
  29062. },
  29063. "location": {
  29064. "$ref": "#/components/schemas/LocationRef"
  29065. },
  29066. "type": {
  29067. "type": "string",
  29068. "enum": ["session.next.text.delta"]
  29069. },
  29070. "data": {
  29071. "type": "object",
  29072. "properties": {
  29073. "timestamp": {
  29074. "type": "number"
  29075. },
  29076. "sessionID": {
  29077. "type": "string",
  29078. "pattern": "^ses"
  29079. },
  29080. "assistantMessageID": {
  29081. "type": "string",
  29082. "pattern": "^msg_"
  29083. },
  29084. "textID": {
  29085. "type": "string"
  29086. },
  29087. "delta": {
  29088. "type": "string"
  29089. }
  29090. },
  29091. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  29092. "additionalProperties": false
  29093. }
  29094. },
  29095. "required": ["id", "type", "data"],
  29096. "additionalProperties": false
  29097. },
  29098. "V2EventSessionNextTextEnded": {
  29099. "type": "object",
  29100. "properties": {
  29101. "id": {
  29102. "type": "string",
  29103. "pattern": "^evt_"
  29104. },
  29105. "metadata": {
  29106. "type": "object"
  29107. },
  29108. "durable": {
  29109. "type": "object",
  29110. "properties": {
  29111. "aggregateID": {
  29112. "type": "string"
  29113. },
  29114. "seq": {
  29115. "type": "integer"
  29116. },
  29117. "version": {
  29118. "type": "integer"
  29119. }
  29120. },
  29121. "required": ["aggregateID", "seq", "version"],
  29122. "additionalProperties": false
  29123. },
  29124. "location": {
  29125. "$ref": "#/components/schemas/LocationRef"
  29126. },
  29127. "type": {
  29128. "type": "string",
  29129. "enum": ["session.next.text.ended"]
  29130. },
  29131. "data": {
  29132. "type": "object",
  29133. "properties": {
  29134. "timestamp": {
  29135. "type": "number"
  29136. },
  29137. "sessionID": {
  29138. "type": "string",
  29139. "pattern": "^ses"
  29140. },
  29141. "assistantMessageID": {
  29142. "type": "string",
  29143. "pattern": "^msg_"
  29144. },
  29145. "textID": {
  29146. "type": "string"
  29147. },
  29148. "text": {
  29149. "type": "string"
  29150. }
  29151. },
  29152. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  29153. "additionalProperties": false
  29154. }
  29155. },
  29156. "required": ["id", "type", "data"],
  29157. "additionalProperties": false
  29158. },
  29159. "V2EventSessionNextReasoningStarted": {
  29160. "type": "object",
  29161. "properties": {
  29162. "id": {
  29163. "type": "string",
  29164. "pattern": "^evt_"
  29165. },
  29166. "metadata": {
  29167. "type": "object"
  29168. },
  29169. "durable": {
  29170. "type": "object",
  29171. "properties": {
  29172. "aggregateID": {
  29173. "type": "string"
  29174. },
  29175. "seq": {
  29176. "type": "integer"
  29177. },
  29178. "version": {
  29179. "type": "integer"
  29180. }
  29181. },
  29182. "required": ["aggregateID", "seq", "version"],
  29183. "additionalProperties": false
  29184. },
  29185. "location": {
  29186. "$ref": "#/components/schemas/LocationRef"
  29187. },
  29188. "type": {
  29189. "type": "string",
  29190. "enum": ["session.next.reasoning.started"]
  29191. },
  29192. "data": {
  29193. "type": "object",
  29194. "properties": {
  29195. "timestamp": {
  29196. "type": "number"
  29197. },
  29198. "sessionID": {
  29199. "type": "string",
  29200. "pattern": "^ses"
  29201. },
  29202. "assistantMessageID": {
  29203. "type": "string",
  29204. "pattern": "^msg_"
  29205. },
  29206. "reasoningID": {
  29207. "type": "string"
  29208. },
  29209. "providerMetadata": {
  29210. "type": "object",
  29211. "additionalProperties": {
  29212. "type": "object"
  29213. }
  29214. }
  29215. },
  29216. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  29217. "additionalProperties": false
  29218. }
  29219. },
  29220. "required": ["id", "type", "data"],
  29221. "additionalProperties": false
  29222. },
  29223. "V2EventSessionNextReasoningDelta": {
  29224. "type": "object",
  29225. "properties": {
  29226. "id": {
  29227. "type": "string",
  29228. "pattern": "^evt_"
  29229. },
  29230. "metadata": {
  29231. "type": "object"
  29232. },
  29233. "durable": {
  29234. "type": "object",
  29235. "properties": {
  29236. "aggregateID": {
  29237. "type": "string"
  29238. },
  29239. "seq": {
  29240. "type": "integer"
  29241. },
  29242. "version": {
  29243. "type": "integer"
  29244. }
  29245. },
  29246. "required": ["aggregateID", "seq", "version"],
  29247. "additionalProperties": false
  29248. },
  29249. "location": {
  29250. "$ref": "#/components/schemas/LocationRef"
  29251. },
  29252. "type": {
  29253. "type": "string",
  29254. "enum": ["session.next.reasoning.delta"]
  29255. },
  29256. "data": {
  29257. "type": "object",
  29258. "properties": {
  29259. "timestamp": {
  29260. "type": "number"
  29261. },
  29262. "sessionID": {
  29263. "type": "string",
  29264. "pattern": "^ses"
  29265. },
  29266. "assistantMessageID": {
  29267. "type": "string",
  29268. "pattern": "^msg_"
  29269. },
  29270. "reasoningID": {
  29271. "type": "string"
  29272. },
  29273. "delta": {
  29274. "type": "string"
  29275. }
  29276. },
  29277. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  29278. "additionalProperties": false
  29279. }
  29280. },
  29281. "required": ["id", "type", "data"],
  29282. "additionalProperties": false
  29283. },
  29284. "V2EventSessionNextReasoningEnded": {
  29285. "type": "object",
  29286. "properties": {
  29287. "id": {
  29288. "type": "string",
  29289. "pattern": "^evt_"
  29290. },
  29291. "metadata": {
  29292. "type": "object"
  29293. },
  29294. "durable": {
  29295. "type": "object",
  29296. "properties": {
  29297. "aggregateID": {
  29298. "type": "string"
  29299. },
  29300. "seq": {
  29301. "type": "integer"
  29302. },
  29303. "version": {
  29304. "type": "integer"
  29305. }
  29306. },
  29307. "required": ["aggregateID", "seq", "version"],
  29308. "additionalProperties": false
  29309. },
  29310. "location": {
  29311. "$ref": "#/components/schemas/LocationRef"
  29312. },
  29313. "type": {
  29314. "type": "string",
  29315. "enum": ["session.next.reasoning.ended"]
  29316. },
  29317. "data": {
  29318. "type": "object",
  29319. "properties": {
  29320. "timestamp": {
  29321. "type": "number"
  29322. },
  29323. "sessionID": {
  29324. "type": "string",
  29325. "pattern": "^ses"
  29326. },
  29327. "assistantMessageID": {
  29328. "type": "string",
  29329. "pattern": "^msg_"
  29330. },
  29331. "reasoningID": {
  29332. "type": "string"
  29333. },
  29334. "text": {
  29335. "type": "string"
  29336. },
  29337. "providerMetadata": {
  29338. "type": "object",
  29339. "additionalProperties": {
  29340. "type": "object"
  29341. }
  29342. }
  29343. },
  29344. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  29345. "additionalProperties": false
  29346. }
  29347. },
  29348. "required": ["id", "type", "data"],
  29349. "additionalProperties": false
  29350. },
  29351. "V2EventSessionNextToolInputStarted": {
  29352. "type": "object",
  29353. "properties": {
  29354. "id": {
  29355. "type": "string",
  29356. "pattern": "^evt_"
  29357. },
  29358. "metadata": {
  29359. "type": "object"
  29360. },
  29361. "durable": {
  29362. "type": "object",
  29363. "properties": {
  29364. "aggregateID": {
  29365. "type": "string"
  29366. },
  29367. "seq": {
  29368. "type": "integer"
  29369. },
  29370. "version": {
  29371. "type": "integer"
  29372. }
  29373. },
  29374. "required": ["aggregateID", "seq", "version"],
  29375. "additionalProperties": false
  29376. },
  29377. "location": {
  29378. "$ref": "#/components/schemas/LocationRef"
  29379. },
  29380. "type": {
  29381. "type": "string",
  29382. "enum": ["session.next.tool.input.started"]
  29383. },
  29384. "data": {
  29385. "type": "object",
  29386. "properties": {
  29387. "timestamp": {
  29388. "type": "number"
  29389. },
  29390. "sessionID": {
  29391. "type": "string",
  29392. "pattern": "^ses"
  29393. },
  29394. "assistantMessageID": {
  29395. "type": "string",
  29396. "pattern": "^msg_"
  29397. },
  29398. "callID": {
  29399. "type": "string"
  29400. },
  29401. "name": {
  29402. "type": "string"
  29403. }
  29404. },
  29405. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  29406. "additionalProperties": false
  29407. }
  29408. },
  29409. "required": ["id", "type", "data"],
  29410. "additionalProperties": false
  29411. },
  29412. "V2EventSessionNextToolInputDelta": {
  29413. "type": "object",
  29414. "properties": {
  29415. "id": {
  29416. "type": "string",
  29417. "pattern": "^evt_"
  29418. },
  29419. "metadata": {
  29420. "type": "object"
  29421. },
  29422. "durable": {
  29423. "type": "object",
  29424. "properties": {
  29425. "aggregateID": {
  29426. "type": "string"
  29427. },
  29428. "seq": {
  29429. "type": "integer"
  29430. },
  29431. "version": {
  29432. "type": "integer"
  29433. }
  29434. },
  29435. "required": ["aggregateID", "seq", "version"],
  29436. "additionalProperties": false
  29437. },
  29438. "location": {
  29439. "$ref": "#/components/schemas/LocationRef"
  29440. },
  29441. "type": {
  29442. "type": "string",
  29443. "enum": ["session.next.tool.input.delta"]
  29444. },
  29445. "data": {
  29446. "type": "object",
  29447. "properties": {
  29448. "timestamp": {
  29449. "type": "number"
  29450. },
  29451. "sessionID": {
  29452. "type": "string",
  29453. "pattern": "^ses"
  29454. },
  29455. "assistantMessageID": {
  29456. "type": "string",
  29457. "pattern": "^msg_"
  29458. },
  29459. "callID": {
  29460. "type": "string"
  29461. },
  29462. "delta": {
  29463. "type": "string"
  29464. }
  29465. },
  29466. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  29467. "additionalProperties": false
  29468. }
  29469. },
  29470. "required": ["id", "type", "data"],
  29471. "additionalProperties": false
  29472. },
  29473. "V2EventSessionNextToolInputEnded": {
  29474. "type": "object",
  29475. "properties": {
  29476. "id": {
  29477. "type": "string",
  29478. "pattern": "^evt_"
  29479. },
  29480. "metadata": {
  29481. "type": "object"
  29482. },
  29483. "durable": {
  29484. "type": "object",
  29485. "properties": {
  29486. "aggregateID": {
  29487. "type": "string"
  29488. },
  29489. "seq": {
  29490. "type": "integer"
  29491. },
  29492. "version": {
  29493. "type": "integer"
  29494. }
  29495. },
  29496. "required": ["aggregateID", "seq", "version"],
  29497. "additionalProperties": false
  29498. },
  29499. "location": {
  29500. "$ref": "#/components/schemas/LocationRef"
  29501. },
  29502. "type": {
  29503. "type": "string",
  29504. "enum": ["session.next.tool.input.ended"]
  29505. },
  29506. "data": {
  29507. "type": "object",
  29508. "properties": {
  29509. "timestamp": {
  29510. "type": "number"
  29511. },
  29512. "sessionID": {
  29513. "type": "string",
  29514. "pattern": "^ses"
  29515. },
  29516. "assistantMessageID": {
  29517. "type": "string",
  29518. "pattern": "^msg_"
  29519. },
  29520. "callID": {
  29521. "type": "string"
  29522. },
  29523. "text": {
  29524. "type": "string"
  29525. }
  29526. },
  29527. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  29528. "additionalProperties": false
  29529. }
  29530. },
  29531. "required": ["id", "type", "data"],
  29532. "additionalProperties": false
  29533. },
  29534. "V2EventSessionNextToolCalled": {
  29535. "type": "object",
  29536. "properties": {
  29537. "id": {
  29538. "type": "string",
  29539. "pattern": "^evt_"
  29540. },
  29541. "metadata": {
  29542. "type": "object"
  29543. },
  29544. "durable": {
  29545. "type": "object",
  29546. "properties": {
  29547. "aggregateID": {
  29548. "type": "string"
  29549. },
  29550. "seq": {
  29551. "type": "integer"
  29552. },
  29553. "version": {
  29554. "type": "integer"
  29555. }
  29556. },
  29557. "required": ["aggregateID", "seq", "version"],
  29558. "additionalProperties": false
  29559. },
  29560. "location": {
  29561. "$ref": "#/components/schemas/LocationRef"
  29562. },
  29563. "type": {
  29564. "type": "string",
  29565. "enum": ["session.next.tool.called"]
  29566. },
  29567. "data": {
  29568. "type": "object",
  29569. "properties": {
  29570. "timestamp": {
  29571. "type": "number"
  29572. },
  29573. "sessionID": {
  29574. "type": "string",
  29575. "pattern": "^ses"
  29576. },
  29577. "assistantMessageID": {
  29578. "type": "string",
  29579. "pattern": "^msg_"
  29580. },
  29581. "callID": {
  29582. "type": "string"
  29583. },
  29584. "tool": {
  29585. "type": "string"
  29586. },
  29587. "input": {
  29588. "type": "object"
  29589. },
  29590. "provider": {
  29591. "type": "object",
  29592. "properties": {
  29593. "executed": {
  29594. "type": "boolean"
  29595. },
  29596. "metadata": {
  29597. "type": "object",
  29598. "additionalProperties": {
  29599. "type": "object"
  29600. }
  29601. }
  29602. },
  29603. "required": ["executed"],
  29604. "additionalProperties": false
  29605. }
  29606. },
  29607. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  29608. "additionalProperties": false
  29609. }
  29610. },
  29611. "required": ["id", "type", "data"],
  29612. "additionalProperties": false
  29613. },
  29614. "V2EventSessionNextToolProgress": {
  29615. "type": "object",
  29616. "properties": {
  29617. "id": {
  29618. "type": "string",
  29619. "pattern": "^evt_"
  29620. },
  29621. "metadata": {
  29622. "type": "object"
  29623. },
  29624. "durable": {
  29625. "type": "object",
  29626. "properties": {
  29627. "aggregateID": {
  29628. "type": "string"
  29629. },
  29630. "seq": {
  29631. "type": "integer"
  29632. },
  29633. "version": {
  29634. "type": "integer"
  29635. }
  29636. },
  29637. "required": ["aggregateID", "seq", "version"],
  29638. "additionalProperties": false
  29639. },
  29640. "location": {
  29641. "$ref": "#/components/schemas/LocationRef"
  29642. },
  29643. "type": {
  29644. "type": "string",
  29645. "enum": ["session.next.tool.progress"]
  29646. },
  29647. "data": {
  29648. "type": "object",
  29649. "properties": {
  29650. "timestamp": {
  29651. "type": "number"
  29652. },
  29653. "sessionID": {
  29654. "type": "string",
  29655. "pattern": "^ses"
  29656. },
  29657. "assistantMessageID": {
  29658. "type": "string",
  29659. "pattern": "^msg_"
  29660. },
  29661. "callID": {
  29662. "type": "string"
  29663. },
  29664. "structured": {
  29665. "type": "object"
  29666. },
  29667. "content": {
  29668. "type": "array",
  29669. "items": {
  29670. "anyOf": [
  29671. {
  29672. "$ref": "#/components/schemas/ToolTextContent"
  29673. },
  29674. {
  29675. "$ref": "#/components/schemas/ToolFileContent"
  29676. }
  29677. ]
  29678. }
  29679. }
  29680. },
  29681. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  29682. "additionalProperties": false
  29683. }
  29684. },
  29685. "required": ["id", "type", "data"],
  29686. "additionalProperties": false
  29687. },
  29688. "V2EventSessionNextToolSuccess": {
  29689. "type": "object",
  29690. "properties": {
  29691. "id": {
  29692. "type": "string",
  29693. "pattern": "^evt_"
  29694. },
  29695. "metadata": {
  29696. "type": "object"
  29697. },
  29698. "durable": {
  29699. "type": "object",
  29700. "properties": {
  29701. "aggregateID": {
  29702. "type": "string"
  29703. },
  29704. "seq": {
  29705. "type": "integer"
  29706. },
  29707. "version": {
  29708. "type": "integer"
  29709. }
  29710. },
  29711. "required": ["aggregateID", "seq", "version"],
  29712. "additionalProperties": false
  29713. },
  29714. "location": {
  29715. "$ref": "#/components/schemas/LocationRef"
  29716. },
  29717. "type": {
  29718. "type": "string",
  29719. "enum": ["session.next.tool.success"]
  29720. },
  29721. "data": {
  29722. "type": "object",
  29723. "properties": {
  29724. "timestamp": {
  29725. "type": "number"
  29726. },
  29727. "sessionID": {
  29728. "type": "string",
  29729. "pattern": "^ses"
  29730. },
  29731. "assistantMessageID": {
  29732. "type": "string",
  29733. "pattern": "^msg_"
  29734. },
  29735. "callID": {
  29736. "type": "string"
  29737. },
  29738. "structured": {
  29739. "type": "object"
  29740. },
  29741. "content": {
  29742. "type": "array",
  29743. "items": {
  29744. "anyOf": [
  29745. {
  29746. "$ref": "#/components/schemas/ToolTextContent"
  29747. },
  29748. {
  29749. "$ref": "#/components/schemas/ToolFileContent"
  29750. }
  29751. ]
  29752. }
  29753. },
  29754. "outputPaths": {
  29755. "type": "array",
  29756. "items": {
  29757. "type": "string"
  29758. }
  29759. },
  29760. "result": {},
  29761. "provider": {
  29762. "type": "object",
  29763. "properties": {
  29764. "executed": {
  29765. "type": "boolean"
  29766. },
  29767. "metadata": {
  29768. "type": "object",
  29769. "additionalProperties": {
  29770. "type": "object"
  29771. }
  29772. }
  29773. },
  29774. "required": ["executed"],
  29775. "additionalProperties": false
  29776. }
  29777. },
  29778. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  29779. "additionalProperties": false
  29780. }
  29781. },
  29782. "required": ["id", "type", "data"],
  29783. "additionalProperties": false
  29784. },
  29785. "V2EventSessionNextToolFailed": {
  29786. "type": "object",
  29787. "properties": {
  29788. "id": {
  29789. "type": "string",
  29790. "pattern": "^evt_"
  29791. },
  29792. "metadata": {
  29793. "type": "object"
  29794. },
  29795. "durable": {
  29796. "type": "object",
  29797. "properties": {
  29798. "aggregateID": {
  29799. "type": "string"
  29800. },
  29801. "seq": {
  29802. "type": "integer"
  29803. },
  29804. "version": {
  29805. "type": "integer"
  29806. }
  29807. },
  29808. "required": ["aggregateID", "seq", "version"],
  29809. "additionalProperties": false
  29810. },
  29811. "location": {
  29812. "$ref": "#/components/schemas/LocationRef"
  29813. },
  29814. "type": {
  29815. "type": "string",
  29816. "enum": ["session.next.tool.failed"]
  29817. },
  29818. "data": {
  29819. "type": "object",
  29820. "properties": {
  29821. "timestamp": {
  29822. "type": "number"
  29823. },
  29824. "sessionID": {
  29825. "type": "string",
  29826. "pattern": "^ses"
  29827. },
  29828. "assistantMessageID": {
  29829. "type": "string",
  29830. "pattern": "^msg_"
  29831. },
  29832. "callID": {
  29833. "type": "string"
  29834. },
  29835. "error": {
  29836. "$ref": "#/components/schemas/SessionErrorUnknown"
  29837. },
  29838. "result": {},
  29839. "provider": {
  29840. "type": "object",
  29841. "properties": {
  29842. "executed": {
  29843. "type": "boolean"
  29844. },
  29845. "metadata": {
  29846. "type": "object",
  29847. "additionalProperties": {
  29848. "type": "object"
  29849. }
  29850. }
  29851. },
  29852. "required": ["executed"],
  29853. "additionalProperties": false
  29854. }
  29855. },
  29856. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  29857. "additionalProperties": false
  29858. }
  29859. },
  29860. "required": ["id", "type", "data"],
  29861. "additionalProperties": false
  29862. },
  29863. "V2EventSessionNextRetried": {
  29864. "type": "object",
  29865. "properties": {
  29866. "id": {
  29867. "type": "string",
  29868. "pattern": "^evt_"
  29869. },
  29870. "metadata": {
  29871. "type": "object"
  29872. },
  29873. "durable": {
  29874. "type": "object",
  29875. "properties": {
  29876. "aggregateID": {
  29877. "type": "string"
  29878. },
  29879. "seq": {
  29880. "type": "integer"
  29881. },
  29882. "version": {
  29883. "type": "integer"
  29884. }
  29885. },
  29886. "required": ["aggregateID", "seq", "version"],
  29887. "additionalProperties": false
  29888. },
  29889. "location": {
  29890. "$ref": "#/components/schemas/LocationRef"
  29891. },
  29892. "type": {
  29893. "type": "string",
  29894. "enum": ["session.next.retried"]
  29895. },
  29896. "data": {
  29897. "type": "object",
  29898. "properties": {
  29899. "timestamp": {
  29900. "type": "number"
  29901. },
  29902. "sessionID": {
  29903. "type": "string",
  29904. "pattern": "^ses"
  29905. },
  29906. "attempt": {
  29907. "type": "number"
  29908. },
  29909. "error": {
  29910. "$ref": "#/components/schemas/SessionNextRetry_error"
  29911. }
  29912. },
  29913. "required": ["timestamp", "sessionID", "attempt", "error"],
  29914. "additionalProperties": false
  29915. }
  29916. },
  29917. "required": ["id", "type", "data"],
  29918. "additionalProperties": false
  29919. },
  29920. "V2EventSessionNextCompactionStarted": {
  29921. "type": "object",
  29922. "properties": {
  29923. "id": {
  29924. "type": "string",
  29925. "pattern": "^evt_"
  29926. },
  29927. "metadata": {
  29928. "type": "object"
  29929. },
  29930. "durable": {
  29931. "type": "object",
  29932. "properties": {
  29933. "aggregateID": {
  29934. "type": "string"
  29935. },
  29936. "seq": {
  29937. "type": "integer"
  29938. },
  29939. "version": {
  29940. "type": "integer"
  29941. }
  29942. },
  29943. "required": ["aggregateID", "seq", "version"],
  29944. "additionalProperties": false
  29945. },
  29946. "location": {
  29947. "$ref": "#/components/schemas/LocationRef"
  29948. },
  29949. "type": {
  29950. "type": "string",
  29951. "enum": ["session.next.compaction.started"]
  29952. },
  29953. "data": {
  29954. "type": "object",
  29955. "properties": {
  29956. "timestamp": {
  29957. "type": "number"
  29958. },
  29959. "sessionID": {
  29960. "type": "string",
  29961. "pattern": "^ses"
  29962. },
  29963. "messageID": {
  29964. "type": "string",
  29965. "pattern": "^msg_"
  29966. },
  29967. "reason": {
  29968. "type": "string",
  29969. "enum": ["auto", "manual"]
  29970. }
  29971. },
  29972. "required": ["timestamp", "sessionID", "messageID", "reason"],
  29973. "additionalProperties": false
  29974. }
  29975. },
  29976. "required": ["id", "type", "data"],
  29977. "additionalProperties": false
  29978. },
  29979. "V2EventSessionNextCompactionDelta": {
  29980. "type": "object",
  29981. "properties": {
  29982. "id": {
  29983. "type": "string",
  29984. "pattern": "^evt_"
  29985. },
  29986. "metadata": {
  29987. "type": "object"
  29988. },
  29989. "durable": {
  29990. "type": "object",
  29991. "properties": {
  29992. "aggregateID": {
  29993. "type": "string"
  29994. },
  29995. "seq": {
  29996. "type": "integer"
  29997. },
  29998. "version": {
  29999. "type": "integer"
  30000. }
  30001. },
  30002. "required": ["aggregateID", "seq", "version"],
  30003. "additionalProperties": false
  30004. },
  30005. "location": {
  30006. "$ref": "#/components/schemas/LocationRef"
  30007. },
  30008. "type": {
  30009. "type": "string",
  30010. "enum": ["session.next.compaction.delta"]
  30011. },
  30012. "data": {
  30013. "type": "object",
  30014. "properties": {
  30015. "timestamp": {
  30016. "type": "number"
  30017. },
  30018. "sessionID": {
  30019. "type": "string",
  30020. "pattern": "^ses"
  30021. },
  30022. "messageID": {
  30023. "type": "string",
  30024. "pattern": "^msg_"
  30025. },
  30026. "text": {
  30027. "type": "string"
  30028. }
  30029. },
  30030. "required": ["timestamp", "sessionID", "messageID", "text"],
  30031. "additionalProperties": false
  30032. }
  30033. },
  30034. "required": ["id", "type", "data"],
  30035. "additionalProperties": false
  30036. },
  30037. "V2EventSessionNextCompactionEnded": {
  30038. "type": "object",
  30039. "properties": {
  30040. "id": {
  30041. "type": "string",
  30042. "pattern": "^evt_"
  30043. },
  30044. "metadata": {
  30045. "type": "object"
  30046. },
  30047. "durable": {
  30048. "type": "object",
  30049. "properties": {
  30050. "aggregateID": {
  30051. "type": "string"
  30052. },
  30053. "seq": {
  30054. "type": "integer"
  30055. },
  30056. "version": {
  30057. "type": "integer"
  30058. }
  30059. },
  30060. "required": ["aggregateID", "seq", "version"],
  30061. "additionalProperties": false
  30062. },
  30063. "location": {
  30064. "$ref": "#/components/schemas/LocationRef"
  30065. },
  30066. "type": {
  30067. "type": "string",
  30068. "enum": ["session.next.compaction.ended"]
  30069. },
  30070. "data": {
  30071. "type": "object",
  30072. "properties": {
  30073. "timestamp": {
  30074. "type": "number"
  30075. },
  30076. "sessionID": {
  30077. "type": "string",
  30078. "pattern": "^ses"
  30079. },
  30080. "messageID": {
  30081. "type": "string",
  30082. "pattern": "^msg_"
  30083. },
  30084. "reason": {
  30085. "type": "string",
  30086. "enum": ["auto", "manual"]
  30087. },
  30088. "text": {
  30089. "type": "string"
  30090. },
  30091. "recent": {
  30092. "type": "string"
  30093. }
  30094. },
  30095. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  30096. "additionalProperties": false
  30097. }
  30098. },
  30099. "required": ["id", "type", "data"],
  30100. "additionalProperties": false
  30101. },
  30102. "V2EventMessagePartDelta": {
  30103. "type": "object",
  30104. "properties": {
  30105. "id": {
  30106. "type": "string",
  30107. "pattern": "^evt_"
  30108. },
  30109. "metadata": {
  30110. "type": "object"
  30111. },
  30112. "durable": {
  30113. "type": "object",
  30114. "properties": {
  30115. "aggregateID": {
  30116. "type": "string"
  30117. },
  30118. "seq": {
  30119. "type": "integer"
  30120. },
  30121. "version": {
  30122. "type": "integer"
  30123. }
  30124. },
  30125. "required": ["aggregateID", "seq", "version"],
  30126. "additionalProperties": false
  30127. },
  30128. "location": {
  30129. "$ref": "#/components/schemas/LocationRef"
  30130. },
  30131. "type": {
  30132. "type": "string",
  30133. "enum": ["message.part.delta"]
  30134. },
  30135. "data": {
  30136. "type": "object",
  30137. "properties": {
  30138. "sessionID": {
  30139. "type": "string",
  30140. "pattern": "^ses"
  30141. },
  30142. "messageID": {
  30143. "type": "string",
  30144. "pattern": "^msg"
  30145. },
  30146. "partID": {
  30147. "type": "string",
  30148. "pattern": "^prt"
  30149. },
  30150. "field": {
  30151. "type": "string"
  30152. },
  30153. "delta": {
  30154. "type": "string"
  30155. }
  30156. },
  30157. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  30158. "additionalProperties": false
  30159. }
  30160. },
  30161. "required": ["id", "type", "data"],
  30162. "additionalProperties": false
  30163. },
  30164. "V2EventSessionDiff": {
  30165. "type": "object",
  30166. "properties": {
  30167. "id": {
  30168. "type": "string",
  30169. "pattern": "^evt_"
  30170. },
  30171. "metadata": {
  30172. "type": "object"
  30173. },
  30174. "durable": {
  30175. "type": "object",
  30176. "properties": {
  30177. "aggregateID": {
  30178. "type": "string"
  30179. },
  30180. "seq": {
  30181. "type": "integer"
  30182. },
  30183. "version": {
  30184. "type": "integer"
  30185. }
  30186. },
  30187. "required": ["aggregateID", "seq", "version"],
  30188. "additionalProperties": false
  30189. },
  30190. "location": {
  30191. "$ref": "#/components/schemas/LocationRef"
  30192. },
  30193. "type": {
  30194. "type": "string",
  30195. "enum": ["session.diff"]
  30196. },
  30197. "data": {
  30198. "type": "object",
  30199. "properties": {
  30200. "sessionID": {
  30201. "type": "string",
  30202. "pattern": "^ses"
  30203. },
  30204. "diff": {
  30205. "type": "array",
  30206. "items": {
  30207. "$ref": "#/components/schemas/SnapshotFileDiff"
  30208. }
  30209. }
  30210. },
  30211. "required": ["sessionID", "diff"],
  30212. "additionalProperties": false
  30213. }
  30214. },
  30215. "required": ["id", "type", "data"],
  30216. "additionalProperties": false
  30217. },
  30218. "V2EventSessionError": {
  30219. "type": "object",
  30220. "properties": {
  30221. "id": {
  30222. "type": "string",
  30223. "pattern": "^evt_"
  30224. },
  30225. "metadata": {
  30226. "type": "object"
  30227. },
  30228. "durable": {
  30229. "type": "object",
  30230. "properties": {
  30231. "aggregateID": {
  30232. "type": "string"
  30233. },
  30234. "seq": {
  30235. "type": "integer"
  30236. },
  30237. "version": {
  30238. "type": "integer"
  30239. }
  30240. },
  30241. "required": ["aggregateID", "seq", "version"],
  30242. "additionalProperties": false
  30243. },
  30244. "location": {
  30245. "$ref": "#/components/schemas/LocationRef"
  30246. },
  30247. "type": {
  30248. "type": "string",
  30249. "enum": ["session.error"]
  30250. },
  30251. "data": {
  30252. "type": "object",
  30253. "properties": {
  30254. "sessionID": {
  30255. "type": "string",
  30256. "pattern": "^ses"
  30257. },
  30258. "error": {
  30259. "anyOf": [
  30260. {
  30261. "$ref": "#/components/schemas/ProviderAuthError"
  30262. },
  30263. {
  30264. "$ref": "#/components/schemas/UnknownError"
  30265. },
  30266. {
  30267. "$ref": "#/components/schemas/MessageOutputLengthError"
  30268. },
  30269. {
  30270. "$ref": "#/components/schemas/MessageAbortedError"
  30271. },
  30272. {
  30273. "$ref": "#/components/schemas/StructuredOutputError"
  30274. },
  30275. {
  30276. "$ref": "#/components/schemas/ContextOverflowError"
  30277. },
  30278. {
  30279. "$ref": "#/components/schemas/ContentFilterError"
  30280. },
  30281. {
  30282. "$ref": "#/components/schemas/APIError"
  30283. }
  30284. ]
  30285. }
  30286. },
  30287. "additionalProperties": false
  30288. }
  30289. },
  30290. "required": ["id", "type", "data"],
  30291. "additionalProperties": false
  30292. },
  30293. "V2EventInstallationUpdated": {
  30294. "type": "object",
  30295. "properties": {
  30296. "id": {
  30297. "type": "string",
  30298. "pattern": "^evt_"
  30299. },
  30300. "metadata": {
  30301. "type": "object"
  30302. },
  30303. "durable": {
  30304. "type": "object",
  30305. "properties": {
  30306. "aggregateID": {
  30307. "type": "string"
  30308. },
  30309. "seq": {
  30310. "type": "integer"
  30311. },
  30312. "version": {
  30313. "type": "integer"
  30314. }
  30315. },
  30316. "required": ["aggregateID", "seq", "version"],
  30317. "additionalProperties": false
  30318. },
  30319. "location": {
  30320. "$ref": "#/components/schemas/LocationRef"
  30321. },
  30322. "type": {
  30323. "type": "string",
  30324. "enum": ["installation.updated"]
  30325. },
  30326. "data": {
  30327. "type": "object",
  30328. "properties": {
  30329. "version": {
  30330. "type": "string"
  30331. }
  30332. },
  30333. "required": ["version"],
  30334. "additionalProperties": false
  30335. }
  30336. },
  30337. "required": ["id", "type", "data"],
  30338. "additionalProperties": false
  30339. },
  30340. "V2EventInstallationUpdate-available": {
  30341. "type": "object",
  30342. "properties": {
  30343. "id": {
  30344. "type": "string",
  30345. "pattern": "^evt_"
  30346. },
  30347. "metadata": {
  30348. "type": "object"
  30349. },
  30350. "durable": {
  30351. "type": "object",
  30352. "properties": {
  30353. "aggregateID": {
  30354. "type": "string"
  30355. },
  30356. "seq": {
  30357. "type": "integer"
  30358. },
  30359. "version": {
  30360. "type": "integer"
  30361. }
  30362. },
  30363. "required": ["aggregateID", "seq", "version"],
  30364. "additionalProperties": false
  30365. },
  30366. "location": {
  30367. "$ref": "#/components/schemas/LocationRef"
  30368. },
  30369. "type": {
  30370. "type": "string",
  30371. "enum": ["installation.update-available"]
  30372. },
  30373. "data": {
  30374. "type": "object",
  30375. "properties": {
  30376. "version": {
  30377. "type": "string"
  30378. }
  30379. },
  30380. "required": ["version"],
  30381. "additionalProperties": false
  30382. }
  30383. },
  30384. "required": ["id", "type", "data"],
  30385. "additionalProperties": false
  30386. },
  30387. "V2EventFileEdited": {
  30388. "type": "object",
  30389. "properties": {
  30390. "id": {
  30391. "type": "string",
  30392. "pattern": "^evt_"
  30393. },
  30394. "metadata": {
  30395. "type": "object"
  30396. },
  30397. "durable": {
  30398. "type": "object",
  30399. "properties": {
  30400. "aggregateID": {
  30401. "type": "string"
  30402. },
  30403. "seq": {
  30404. "type": "integer"
  30405. },
  30406. "version": {
  30407. "type": "integer"
  30408. }
  30409. },
  30410. "required": ["aggregateID", "seq", "version"],
  30411. "additionalProperties": false
  30412. },
  30413. "location": {
  30414. "$ref": "#/components/schemas/LocationRef"
  30415. },
  30416. "type": {
  30417. "type": "string",
  30418. "enum": ["file.edited"]
  30419. },
  30420. "data": {
  30421. "type": "object",
  30422. "properties": {
  30423. "file": {
  30424. "type": "string"
  30425. }
  30426. },
  30427. "required": ["file"],
  30428. "additionalProperties": false
  30429. }
  30430. },
  30431. "required": ["id", "type", "data"],
  30432. "additionalProperties": false
  30433. },
  30434. "V2EventReferenceUpdated": {
  30435. "type": "object",
  30436. "properties": {
  30437. "id": {
  30438. "type": "string",
  30439. "pattern": "^evt_"
  30440. },
  30441. "metadata": {
  30442. "type": "object"
  30443. },
  30444. "durable": {
  30445. "type": "object",
  30446. "properties": {
  30447. "aggregateID": {
  30448. "type": "string"
  30449. },
  30450. "seq": {
  30451. "type": "integer"
  30452. },
  30453. "version": {
  30454. "type": "integer"
  30455. }
  30456. },
  30457. "required": ["aggregateID", "seq", "version"],
  30458. "additionalProperties": false
  30459. },
  30460. "location": {
  30461. "$ref": "#/components/schemas/LocationRef"
  30462. },
  30463. "type": {
  30464. "type": "string",
  30465. "enum": ["reference.updated"]
  30466. },
  30467. "data": {
  30468. "type": "object",
  30469. "properties": {}
  30470. }
  30471. },
  30472. "required": ["id", "type", "data"],
  30473. "additionalProperties": false
  30474. },
  30475. "V2EventPermissionV2Asked": {
  30476. "type": "object",
  30477. "properties": {
  30478. "id": {
  30479. "type": "string",
  30480. "pattern": "^evt_"
  30481. },
  30482. "metadata": {
  30483. "type": "object"
  30484. },
  30485. "durable": {
  30486. "type": "object",
  30487. "properties": {
  30488. "aggregateID": {
  30489. "type": "string"
  30490. },
  30491. "seq": {
  30492. "type": "integer"
  30493. },
  30494. "version": {
  30495. "type": "integer"
  30496. }
  30497. },
  30498. "required": ["aggregateID", "seq", "version"],
  30499. "additionalProperties": false
  30500. },
  30501. "location": {
  30502. "$ref": "#/components/schemas/LocationRef"
  30503. },
  30504. "type": {
  30505. "type": "string",
  30506. "enum": ["permission.v2.asked"]
  30507. },
  30508. "data": {
  30509. "type": "object",
  30510. "properties": {
  30511. "id": {
  30512. "type": "string",
  30513. "pattern": "^per"
  30514. },
  30515. "sessionID": {
  30516. "type": "string",
  30517. "pattern": "^ses"
  30518. },
  30519. "action": {
  30520. "type": "string"
  30521. },
  30522. "resources": {
  30523. "type": "array",
  30524. "items": {
  30525. "type": "string"
  30526. }
  30527. },
  30528. "save": {
  30529. "type": "array",
  30530. "items": {
  30531. "type": "string"
  30532. }
  30533. },
  30534. "metadata": {
  30535. "type": "object"
  30536. },
  30537. "source": {
  30538. "$ref": "#/components/schemas/PermissionV2Source"
  30539. }
  30540. },
  30541. "required": ["id", "sessionID", "action", "resources"],
  30542. "additionalProperties": false
  30543. }
  30544. },
  30545. "required": ["id", "type", "data"],
  30546. "additionalProperties": false
  30547. },
  30548. "V2EventPermissionV2Replied": {
  30549. "type": "object",
  30550. "properties": {
  30551. "id": {
  30552. "type": "string",
  30553. "pattern": "^evt_"
  30554. },
  30555. "metadata": {
  30556. "type": "object"
  30557. },
  30558. "durable": {
  30559. "type": "object",
  30560. "properties": {
  30561. "aggregateID": {
  30562. "type": "string"
  30563. },
  30564. "seq": {
  30565. "type": "integer"
  30566. },
  30567. "version": {
  30568. "type": "integer"
  30569. }
  30570. },
  30571. "required": ["aggregateID", "seq", "version"],
  30572. "additionalProperties": false
  30573. },
  30574. "location": {
  30575. "$ref": "#/components/schemas/LocationRef"
  30576. },
  30577. "type": {
  30578. "type": "string",
  30579. "enum": ["permission.v2.replied"]
  30580. },
  30581. "data": {
  30582. "type": "object",
  30583. "properties": {
  30584. "sessionID": {
  30585. "type": "string",
  30586. "pattern": "^ses"
  30587. },
  30588. "requestID": {
  30589. "type": "string",
  30590. "pattern": "^per"
  30591. },
  30592. "reply": {
  30593. "$ref": "#/components/schemas/PermissionV2Reply"
  30594. }
  30595. },
  30596. "required": ["sessionID", "requestID", "reply"],
  30597. "additionalProperties": false
  30598. }
  30599. },
  30600. "required": ["id", "type", "data"],
  30601. "additionalProperties": false
  30602. },
  30603. "V2EventPluginAdded": {
  30604. "type": "object",
  30605. "properties": {
  30606. "id": {
  30607. "type": "string",
  30608. "pattern": "^evt_"
  30609. },
  30610. "metadata": {
  30611. "type": "object"
  30612. },
  30613. "durable": {
  30614. "type": "object",
  30615. "properties": {
  30616. "aggregateID": {
  30617. "type": "string"
  30618. },
  30619. "seq": {
  30620. "type": "integer"
  30621. },
  30622. "version": {
  30623. "type": "integer"
  30624. }
  30625. },
  30626. "required": ["aggregateID", "seq", "version"],
  30627. "additionalProperties": false
  30628. },
  30629. "location": {
  30630. "$ref": "#/components/schemas/LocationRef"
  30631. },
  30632. "type": {
  30633. "type": "string",
  30634. "enum": ["plugin.added"]
  30635. },
  30636. "data": {
  30637. "type": "object",
  30638. "properties": {
  30639. "id": {
  30640. "type": "string"
  30641. }
  30642. },
  30643. "required": ["id"],
  30644. "additionalProperties": false
  30645. }
  30646. },
  30647. "required": ["id", "type", "data"],
  30648. "additionalProperties": false
  30649. },
  30650. "V2EventProjectDirectoriesUpdated": {
  30651. "type": "object",
  30652. "properties": {
  30653. "id": {
  30654. "type": "string",
  30655. "pattern": "^evt_"
  30656. },
  30657. "metadata": {
  30658. "type": "object"
  30659. },
  30660. "durable": {
  30661. "type": "object",
  30662. "properties": {
  30663. "aggregateID": {
  30664. "type": "string"
  30665. },
  30666. "seq": {
  30667. "type": "integer"
  30668. },
  30669. "version": {
  30670. "type": "integer"
  30671. }
  30672. },
  30673. "required": ["aggregateID", "seq", "version"],
  30674. "additionalProperties": false
  30675. },
  30676. "location": {
  30677. "$ref": "#/components/schemas/LocationRef"
  30678. },
  30679. "type": {
  30680. "type": "string",
  30681. "enum": ["project.directories.updated"]
  30682. },
  30683. "data": {
  30684. "type": "object",
  30685. "properties": {
  30686. "projectID": {
  30687. "type": "string"
  30688. }
  30689. },
  30690. "required": ["projectID"],
  30691. "additionalProperties": false
  30692. }
  30693. },
  30694. "required": ["id", "type", "data"],
  30695. "additionalProperties": false
  30696. },
  30697. "V2EventFileWatcherUpdated": {
  30698. "type": "object",
  30699. "properties": {
  30700. "id": {
  30701. "type": "string",
  30702. "pattern": "^evt_"
  30703. },
  30704. "metadata": {
  30705. "type": "object"
  30706. },
  30707. "durable": {
  30708. "type": "object",
  30709. "properties": {
  30710. "aggregateID": {
  30711. "type": "string"
  30712. },
  30713. "seq": {
  30714. "type": "integer"
  30715. },
  30716. "version": {
  30717. "type": "integer"
  30718. }
  30719. },
  30720. "required": ["aggregateID", "seq", "version"],
  30721. "additionalProperties": false
  30722. },
  30723. "location": {
  30724. "$ref": "#/components/schemas/LocationRef"
  30725. },
  30726. "type": {
  30727. "type": "string",
  30728. "enum": ["file.watcher.updated"]
  30729. },
  30730. "data": {
  30731. "type": "object",
  30732. "properties": {
  30733. "file": {
  30734. "type": "string"
  30735. },
  30736. "event": {
  30737. "type": "string",
  30738. "enum": ["add", "change", "unlink"]
  30739. }
  30740. },
  30741. "required": ["file", "event"],
  30742. "additionalProperties": false
  30743. }
  30744. },
  30745. "required": ["id", "type", "data"],
  30746. "additionalProperties": false
  30747. },
  30748. "V2EventPtyCreated": {
  30749. "type": "object",
  30750. "properties": {
  30751. "id": {
  30752. "type": "string",
  30753. "pattern": "^evt_"
  30754. },
  30755. "metadata": {
  30756. "type": "object"
  30757. },
  30758. "durable": {
  30759. "type": "object",
  30760. "properties": {
  30761. "aggregateID": {
  30762. "type": "string"
  30763. },
  30764. "seq": {
  30765. "type": "integer"
  30766. },
  30767. "version": {
  30768. "type": "integer"
  30769. }
  30770. },
  30771. "required": ["aggregateID", "seq", "version"],
  30772. "additionalProperties": false
  30773. },
  30774. "location": {
  30775. "$ref": "#/components/schemas/LocationRef"
  30776. },
  30777. "type": {
  30778. "type": "string",
  30779. "enum": ["pty.created"]
  30780. },
  30781. "data": {
  30782. "type": "object",
  30783. "properties": {
  30784. "info": {
  30785. "$ref": "#/components/schemas/Pty"
  30786. }
  30787. },
  30788. "required": ["info"],
  30789. "additionalProperties": false
  30790. }
  30791. },
  30792. "required": ["id", "type", "data"],
  30793. "additionalProperties": false
  30794. },
  30795. "V2EventPtyUpdated": {
  30796. "type": "object",
  30797. "properties": {
  30798. "id": {
  30799. "type": "string",
  30800. "pattern": "^evt_"
  30801. },
  30802. "metadata": {
  30803. "type": "object"
  30804. },
  30805. "durable": {
  30806. "type": "object",
  30807. "properties": {
  30808. "aggregateID": {
  30809. "type": "string"
  30810. },
  30811. "seq": {
  30812. "type": "integer"
  30813. },
  30814. "version": {
  30815. "type": "integer"
  30816. }
  30817. },
  30818. "required": ["aggregateID", "seq", "version"],
  30819. "additionalProperties": false
  30820. },
  30821. "location": {
  30822. "$ref": "#/components/schemas/LocationRef"
  30823. },
  30824. "type": {
  30825. "type": "string",
  30826. "enum": ["pty.updated"]
  30827. },
  30828. "data": {
  30829. "type": "object",
  30830. "properties": {
  30831. "info": {
  30832. "$ref": "#/components/schemas/Pty"
  30833. }
  30834. },
  30835. "required": ["info"],
  30836. "additionalProperties": false
  30837. }
  30838. },
  30839. "required": ["id", "type", "data"],
  30840. "additionalProperties": false
  30841. },
  30842. "V2EventPtyExited": {
  30843. "type": "object",
  30844. "properties": {
  30845. "id": {
  30846. "type": "string",
  30847. "pattern": "^evt_"
  30848. },
  30849. "metadata": {
  30850. "type": "object"
  30851. },
  30852. "durable": {
  30853. "type": "object",
  30854. "properties": {
  30855. "aggregateID": {
  30856. "type": "string"
  30857. },
  30858. "seq": {
  30859. "type": "integer"
  30860. },
  30861. "version": {
  30862. "type": "integer"
  30863. }
  30864. },
  30865. "required": ["aggregateID", "seq", "version"],
  30866. "additionalProperties": false
  30867. },
  30868. "location": {
  30869. "$ref": "#/components/schemas/LocationRef"
  30870. },
  30871. "type": {
  30872. "type": "string",
  30873. "enum": ["pty.exited"]
  30874. },
  30875. "data": {
  30876. "type": "object",
  30877. "properties": {
  30878. "id": {
  30879. "type": "string",
  30880. "pattern": "^pty"
  30881. },
  30882. "exitCode": {
  30883. "type": "integer",
  30884. "minimum": 0
  30885. }
  30886. },
  30887. "required": ["id", "exitCode"],
  30888. "additionalProperties": false
  30889. }
  30890. },
  30891. "required": ["id", "type", "data"],
  30892. "additionalProperties": false
  30893. },
  30894. "V2EventPtyDeleted": {
  30895. "type": "object",
  30896. "properties": {
  30897. "id": {
  30898. "type": "string",
  30899. "pattern": "^evt_"
  30900. },
  30901. "metadata": {
  30902. "type": "object"
  30903. },
  30904. "durable": {
  30905. "type": "object",
  30906. "properties": {
  30907. "aggregateID": {
  30908. "type": "string"
  30909. },
  30910. "seq": {
  30911. "type": "integer"
  30912. },
  30913. "version": {
  30914. "type": "integer"
  30915. }
  30916. },
  30917. "required": ["aggregateID", "seq", "version"],
  30918. "additionalProperties": false
  30919. },
  30920. "location": {
  30921. "$ref": "#/components/schemas/LocationRef"
  30922. },
  30923. "type": {
  30924. "type": "string",
  30925. "enum": ["pty.deleted"]
  30926. },
  30927. "data": {
  30928. "type": "object",
  30929. "properties": {
  30930. "id": {
  30931. "type": "string",
  30932. "pattern": "^pty"
  30933. }
  30934. },
  30935. "required": ["id"],
  30936. "additionalProperties": false
  30937. }
  30938. },
  30939. "required": ["id", "type", "data"],
  30940. "additionalProperties": false
  30941. },
  30942. "V2EventQuestionV2Asked": {
  30943. "type": "object",
  30944. "properties": {
  30945. "id": {
  30946. "type": "string",
  30947. "pattern": "^evt_"
  30948. },
  30949. "metadata": {
  30950. "type": "object"
  30951. },
  30952. "durable": {
  30953. "type": "object",
  30954. "properties": {
  30955. "aggregateID": {
  30956. "type": "string"
  30957. },
  30958. "seq": {
  30959. "type": "integer"
  30960. },
  30961. "version": {
  30962. "type": "integer"
  30963. }
  30964. },
  30965. "required": ["aggregateID", "seq", "version"],
  30966. "additionalProperties": false
  30967. },
  30968. "location": {
  30969. "$ref": "#/components/schemas/LocationRef"
  30970. },
  30971. "type": {
  30972. "type": "string",
  30973. "enum": ["question.v2.asked"]
  30974. },
  30975. "data": {
  30976. "type": "object",
  30977. "properties": {
  30978. "id": {
  30979. "type": "string",
  30980. "pattern": "^que"
  30981. },
  30982. "sessionID": {
  30983. "type": "string",
  30984. "pattern": "^ses"
  30985. },
  30986. "questions": {
  30987. "type": "array",
  30988. "items": {
  30989. "$ref": "#/components/schemas/QuestionV2Info"
  30990. },
  30991. "description": "Questions to ask"
  30992. },
  30993. "tool": {
  30994. "$ref": "#/components/schemas/QuestionV2Tool"
  30995. }
  30996. },
  30997. "required": ["id", "sessionID", "questions"],
  30998. "additionalProperties": false
  30999. }
  31000. },
  31001. "required": ["id", "type", "data"],
  31002. "additionalProperties": false
  31003. },
  31004. "V2EventQuestionV2Replied": {
  31005. "type": "object",
  31006. "properties": {
  31007. "id": {
  31008. "type": "string",
  31009. "pattern": "^evt_"
  31010. },
  31011. "metadata": {
  31012. "type": "object"
  31013. },
  31014. "durable": {
  31015. "type": "object",
  31016. "properties": {
  31017. "aggregateID": {
  31018. "type": "string"
  31019. },
  31020. "seq": {
  31021. "type": "integer"
  31022. },
  31023. "version": {
  31024. "type": "integer"
  31025. }
  31026. },
  31027. "required": ["aggregateID", "seq", "version"],
  31028. "additionalProperties": false
  31029. },
  31030. "location": {
  31031. "$ref": "#/components/schemas/LocationRef"
  31032. },
  31033. "type": {
  31034. "type": "string",
  31035. "enum": ["question.v2.replied"]
  31036. },
  31037. "data": {
  31038. "type": "object",
  31039. "properties": {
  31040. "sessionID": {
  31041. "type": "string",
  31042. "pattern": "^ses"
  31043. },
  31044. "requestID": {
  31045. "type": "string",
  31046. "pattern": "^que"
  31047. },
  31048. "answers": {
  31049. "type": "array",
  31050. "items": {
  31051. "$ref": "#/components/schemas/QuestionV2Answer"
  31052. }
  31053. }
  31054. },
  31055. "required": ["sessionID", "requestID", "answers"],
  31056. "additionalProperties": false
  31057. }
  31058. },
  31059. "required": ["id", "type", "data"],
  31060. "additionalProperties": false
  31061. },
  31062. "V2EventQuestionV2Rejected": {
  31063. "type": "object",
  31064. "properties": {
  31065. "id": {
  31066. "type": "string",
  31067. "pattern": "^evt_"
  31068. },
  31069. "metadata": {
  31070. "type": "object"
  31071. },
  31072. "durable": {
  31073. "type": "object",
  31074. "properties": {
  31075. "aggregateID": {
  31076. "type": "string"
  31077. },
  31078. "seq": {
  31079. "type": "integer"
  31080. },
  31081. "version": {
  31082. "type": "integer"
  31083. }
  31084. },
  31085. "required": ["aggregateID", "seq", "version"],
  31086. "additionalProperties": false
  31087. },
  31088. "location": {
  31089. "$ref": "#/components/schemas/LocationRef"
  31090. },
  31091. "type": {
  31092. "type": "string",
  31093. "enum": ["question.v2.rejected"]
  31094. },
  31095. "data": {
  31096. "type": "object",
  31097. "properties": {
  31098. "sessionID": {
  31099. "type": "string",
  31100. "pattern": "^ses"
  31101. },
  31102. "requestID": {
  31103. "type": "string",
  31104. "pattern": "^que"
  31105. }
  31106. },
  31107. "required": ["sessionID", "requestID"],
  31108. "additionalProperties": false
  31109. }
  31110. },
  31111. "required": ["id", "type", "data"],
  31112. "additionalProperties": false
  31113. },
  31114. "V2EventTodoUpdated": {
  31115. "type": "object",
  31116. "properties": {
  31117. "id": {
  31118. "type": "string",
  31119. "pattern": "^evt_"
  31120. },
  31121. "metadata": {
  31122. "type": "object"
  31123. },
  31124. "durable": {
  31125. "type": "object",
  31126. "properties": {
  31127. "aggregateID": {
  31128. "type": "string"
  31129. },
  31130. "seq": {
  31131. "type": "integer"
  31132. },
  31133. "version": {
  31134. "type": "integer"
  31135. }
  31136. },
  31137. "required": ["aggregateID", "seq", "version"],
  31138. "additionalProperties": false
  31139. },
  31140. "location": {
  31141. "$ref": "#/components/schemas/LocationRef"
  31142. },
  31143. "type": {
  31144. "type": "string",
  31145. "enum": ["todo.updated"]
  31146. },
  31147. "data": {
  31148. "type": "object",
  31149. "properties": {
  31150. "sessionID": {
  31151. "type": "string",
  31152. "pattern": "^ses"
  31153. },
  31154. "todos": {
  31155. "type": "array",
  31156. "items": {
  31157. "$ref": "#/components/schemas/Todo"
  31158. }
  31159. }
  31160. },
  31161. "required": ["sessionID", "todos"],
  31162. "additionalProperties": false
  31163. }
  31164. },
  31165. "required": ["id", "type", "data"],
  31166. "additionalProperties": false
  31167. },
  31168. "V2EventLspUpdated": {
  31169. "type": "object",
  31170. "properties": {
  31171. "id": {
  31172. "type": "string",
  31173. "pattern": "^evt_"
  31174. },
  31175. "metadata": {
  31176. "type": "object"
  31177. },
  31178. "durable": {
  31179. "type": "object",
  31180. "properties": {
  31181. "aggregateID": {
  31182. "type": "string"
  31183. },
  31184. "seq": {
  31185. "type": "integer"
  31186. },
  31187. "version": {
  31188. "type": "integer"
  31189. }
  31190. },
  31191. "required": ["aggregateID", "seq", "version"],
  31192. "additionalProperties": false
  31193. },
  31194. "location": {
  31195. "$ref": "#/components/schemas/LocationRef"
  31196. },
  31197. "type": {
  31198. "type": "string",
  31199. "enum": ["lsp.updated"]
  31200. },
  31201. "data": {
  31202. "type": "object",
  31203. "properties": {}
  31204. }
  31205. },
  31206. "required": ["id", "type", "data"],
  31207. "additionalProperties": false
  31208. },
  31209. "V2EventPermissionAsked": {
  31210. "type": "object",
  31211. "properties": {
  31212. "id": {
  31213. "type": "string",
  31214. "pattern": "^evt_"
  31215. },
  31216. "metadata": {
  31217. "type": "object"
  31218. },
  31219. "durable": {
  31220. "type": "object",
  31221. "properties": {
  31222. "aggregateID": {
  31223. "type": "string"
  31224. },
  31225. "seq": {
  31226. "type": "integer"
  31227. },
  31228. "version": {
  31229. "type": "integer"
  31230. }
  31231. },
  31232. "required": ["aggregateID", "seq", "version"],
  31233. "additionalProperties": false
  31234. },
  31235. "location": {
  31236. "$ref": "#/components/schemas/LocationRef"
  31237. },
  31238. "type": {
  31239. "type": "string",
  31240. "enum": ["permission.asked"]
  31241. },
  31242. "data": {
  31243. "type": "object",
  31244. "properties": {
  31245. "id": {
  31246. "type": "string",
  31247. "pattern": "^per"
  31248. },
  31249. "sessionID": {
  31250. "type": "string",
  31251. "pattern": "^ses"
  31252. },
  31253. "permission": {
  31254. "type": "string"
  31255. },
  31256. "patterns": {
  31257. "type": "array",
  31258. "items": {
  31259. "type": "string"
  31260. }
  31261. },
  31262. "metadata": {
  31263. "type": "object"
  31264. },
  31265. "always": {
  31266. "type": "array",
  31267. "items": {
  31268. "type": "string"
  31269. }
  31270. },
  31271. "tool": {
  31272. "type": "object",
  31273. "properties": {
  31274. "messageID": {
  31275. "type": "string"
  31276. },
  31277. "callID": {
  31278. "type": "string"
  31279. }
  31280. },
  31281. "required": ["messageID", "callID"],
  31282. "additionalProperties": false
  31283. }
  31284. },
  31285. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  31286. "additionalProperties": false
  31287. }
  31288. },
  31289. "required": ["id", "type", "data"],
  31290. "additionalProperties": false
  31291. },
  31292. "V2EventPermissionReplied": {
  31293. "type": "object",
  31294. "properties": {
  31295. "id": {
  31296. "type": "string",
  31297. "pattern": "^evt_"
  31298. },
  31299. "metadata": {
  31300. "type": "object"
  31301. },
  31302. "durable": {
  31303. "type": "object",
  31304. "properties": {
  31305. "aggregateID": {
  31306. "type": "string"
  31307. },
  31308. "seq": {
  31309. "type": "integer"
  31310. },
  31311. "version": {
  31312. "type": "integer"
  31313. }
  31314. },
  31315. "required": ["aggregateID", "seq", "version"],
  31316. "additionalProperties": false
  31317. },
  31318. "location": {
  31319. "$ref": "#/components/schemas/LocationRef"
  31320. },
  31321. "type": {
  31322. "type": "string",
  31323. "enum": ["permission.replied"]
  31324. },
  31325. "data": {
  31326. "type": "object",
  31327. "properties": {
  31328. "sessionID": {
  31329. "type": "string",
  31330. "pattern": "^ses"
  31331. },
  31332. "requestID": {
  31333. "type": "string",
  31334. "pattern": "^per"
  31335. },
  31336. "reply": {
  31337. "type": "string",
  31338. "enum": ["once", "always", "reject"]
  31339. }
  31340. },
  31341. "required": ["sessionID", "requestID", "reply"],
  31342. "additionalProperties": false
  31343. }
  31344. },
  31345. "required": ["id", "type", "data"],
  31346. "additionalProperties": false
  31347. },
  31348. "V2EventTuiPromptAppend": {
  31349. "type": "object",
  31350. "properties": {
  31351. "id": {
  31352. "type": "string",
  31353. "pattern": "^evt_"
  31354. },
  31355. "metadata": {
  31356. "type": "object"
  31357. },
  31358. "durable": {
  31359. "type": "object",
  31360. "properties": {
  31361. "aggregateID": {
  31362. "type": "string"
  31363. },
  31364. "seq": {
  31365. "type": "integer"
  31366. },
  31367. "version": {
  31368. "type": "integer"
  31369. }
  31370. },
  31371. "required": ["aggregateID", "seq", "version"],
  31372. "additionalProperties": false
  31373. },
  31374. "location": {
  31375. "$ref": "#/components/schemas/LocationRef"
  31376. },
  31377. "type": {
  31378. "type": "string",
  31379. "enum": ["tui.prompt.append"]
  31380. },
  31381. "data": {
  31382. "type": "object",
  31383. "properties": {
  31384. "text": {
  31385. "type": "string"
  31386. }
  31387. },
  31388. "required": ["text"],
  31389. "additionalProperties": false
  31390. }
  31391. },
  31392. "required": ["id", "type", "data"],
  31393. "additionalProperties": false
  31394. },
  31395. "V2EventTuiCommandExecute": {
  31396. "type": "object",
  31397. "properties": {
  31398. "id": {
  31399. "type": "string",
  31400. "pattern": "^evt_"
  31401. },
  31402. "metadata": {
  31403. "type": "object"
  31404. },
  31405. "durable": {
  31406. "type": "object",
  31407. "properties": {
  31408. "aggregateID": {
  31409. "type": "string"
  31410. },
  31411. "seq": {
  31412. "type": "integer"
  31413. },
  31414. "version": {
  31415. "type": "integer"
  31416. }
  31417. },
  31418. "required": ["aggregateID", "seq", "version"],
  31419. "additionalProperties": false
  31420. },
  31421. "location": {
  31422. "$ref": "#/components/schemas/LocationRef"
  31423. },
  31424. "type": {
  31425. "type": "string",
  31426. "enum": ["tui.command.execute"]
  31427. },
  31428. "data": {
  31429. "type": "object",
  31430. "properties": {
  31431. "command": {
  31432. "anyOf": [
  31433. {
  31434. "type": "string",
  31435. "enum": [
  31436. "session.list",
  31437. "session.new",
  31438. "session.share",
  31439. "session.interrupt",
  31440. "session.compact",
  31441. "session.page.up",
  31442. "session.page.down",
  31443. "session.line.up",
  31444. "session.line.down",
  31445. "session.half.page.up",
  31446. "session.half.page.down",
  31447. "session.first",
  31448. "session.last",
  31449. "prompt.clear",
  31450. "prompt.submit",
  31451. "agent.cycle"
  31452. ]
  31453. },
  31454. {
  31455. "type": "string"
  31456. }
  31457. ]
  31458. }
  31459. },
  31460. "required": ["command"],
  31461. "additionalProperties": false
  31462. }
  31463. },
  31464. "required": ["id", "type", "data"],
  31465. "additionalProperties": false
  31466. },
  31467. "V2EventTuiToastShow": {
  31468. "type": "object",
  31469. "properties": {
  31470. "id": {
  31471. "type": "string",
  31472. "pattern": "^evt_"
  31473. },
  31474. "metadata": {
  31475. "type": "object"
  31476. },
  31477. "durable": {
  31478. "type": "object",
  31479. "properties": {
  31480. "aggregateID": {
  31481. "type": "string"
  31482. },
  31483. "seq": {
  31484. "type": "integer"
  31485. },
  31486. "version": {
  31487. "type": "integer"
  31488. }
  31489. },
  31490. "required": ["aggregateID", "seq", "version"],
  31491. "additionalProperties": false
  31492. },
  31493. "location": {
  31494. "$ref": "#/components/schemas/LocationRef"
  31495. },
  31496. "type": {
  31497. "type": "string",
  31498. "enum": ["tui.toast.show"]
  31499. },
  31500. "data": {
  31501. "type": "object",
  31502. "properties": {
  31503. "title": {
  31504. "type": "string"
  31505. },
  31506. "message": {
  31507. "type": "string"
  31508. },
  31509. "variant": {
  31510. "type": "string",
  31511. "enum": ["info", "success", "warning", "error"]
  31512. },
  31513. "duration": {
  31514. "type": "integer",
  31515. "exclusiveMinimum": 0
  31516. }
  31517. },
  31518. "required": ["message", "variant"],
  31519. "additionalProperties": false
  31520. }
  31521. },
  31522. "required": ["id", "type", "data"],
  31523. "additionalProperties": false
  31524. },
  31525. "V2EventTuiSessionSelect": {
  31526. "type": "object",
  31527. "properties": {
  31528. "id": {
  31529. "type": "string",
  31530. "pattern": "^evt_"
  31531. },
  31532. "metadata": {
  31533. "type": "object"
  31534. },
  31535. "durable": {
  31536. "type": "object",
  31537. "properties": {
  31538. "aggregateID": {
  31539. "type": "string"
  31540. },
  31541. "seq": {
  31542. "type": "integer"
  31543. },
  31544. "version": {
  31545. "type": "integer"
  31546. }
  31547. },
  31548. "required": ["aggregateID", "seq", "version"],
  31549. "additionalProperties": false
  31550. },
  31551. "location": {
  31552. "$ref": "#/components/schemas/LocationRef"
  31553. },
  31554. "type": {
  31555. "type": "string",
  31556. "enum": ["tui.session.select"]
  31557. },
  31558. "data": {
  31559. "type": "object",
  31560. "properties": {
  31561. "sessionID": {
  31562. "type": "string",
  31563. "pattern": "^ses",
  31564. "description": "Session ID to navigate to"
  31565. }
  31566. },
  31567. "required": ["sessionID"],
  31568. "additionalProperties": false
  31569. }
  31570. },
  31571. "required": ["id", "type", "data"],
  31572. "additionalProperties": false
  31573. },
  31574. "V2EventMcpToolsChanged": {
  31575. "type": "object",
  31576. "properties": {
  31577. "id": {
  31578. "type": "string",
  31579. "pattern": "^evt_"
  31580. },
  31581. "metadata": {
  31582. "type": "object"
  31583. },
  31584. "durable": {
  31585. "type": "object",
  31586. "properties": {
  31587. "aggregateID": {
  31588. "type": "string"
  31589. },
  31590. "seq": {
  31591. "type": "integer"
  31592. },
  31593. "version": {
  31594. "type": "integer"
  31595. }
  31596. },
  31597. "required": ["aggregateID", "seq", "version"],
  31598. "additionalProperties": false
  31599. },
  31600. "location": {
  31601. "$ref": "#/components/schemas/LocationRef"
  31602. },
  31603. "type": {
  31604. "type": "string",
  31605. "enum": ["mcp.tools.changed"]
  31606. },
  31607. "data": {
  31608. "type": "object",
  31609. "properties": {
  31610. "server": {
  31611. "type": "string"
  31612. }
  31613. },
  31614. "required": ["server"],
  31615. "additionalProperties": false
  31616. }
  31617. },
  31618. "required": ["id", "type", "data"],
  31619. "additionalProperties": false
  31620. },
  31621. "V2EventMcpBrowserOpenFailed": {
  31622. "type": "object",
  31623. "properties": {
  31624. "id": {
  31625. "type": "string",
  31626. "pattern": "^evt_"
  31627. },
  31628. "metadata": {
  31629. "type": "object"
  31630. },
  31631. "durable": {
  31632. "type": "object",
  31633. "properties": {
  31634. "aggregateID": {
  31635. "type": "string"
  31636. },
  31637. "seq": {
  31638. "type": "integer"
  31639. },
  31640. "version": {
  31641. "type": "integer"
  31642. }
  31643. },
  31644. "required": ["aggregateID", "seq", "version"],
  31645. "additionalProperties": false
  31646. },
  31647. "location": {
  31648. "$ref": "#/components/schemas/LocationRef"
  31649. },
  31650. "type": {
  31651. "type": "string",
  31652. "enum": ["mcp.browser.open.failed"]
  31653. },
  31654. "data": {
  31655. "type": "object",
  31656. "properties": {
  31657. "mcpName": {
  31658. "type": "string"
  31659. },
  31660. "url": {
  31661. "type": "string"
  31662. }
  31663. },
  31664. "required": ["mcpName", "url"],
  31665. "additionalProperties": false
  31666. }
  31667. },
  31668. "required": ["id", "type", "data"],
  31669. "additionalProperties": false
  31670. },
  31671. "V2EventCommandExecuted": {
  31672. "type": "object",
  31673. "properties": {
  31674. "id": {
  31675. "type": "string",
  31676. "pattern": "^evt_"
  31677. },
  31678. "metadata": {
  31679. "type": "object"
  31680. },
  31681. "durable": {
  31682. "type": "object",
  31683. "properties": {
  31684. "aggregateID": {
  31685. "type": "string"
  31686. },
  31687. "seq": {
  31688. "type": "integer"
  31689. },
  31690. "version": {
  31691. "type": "integer"
  31692. }
  31693. },
  31694. "required": ["aggregateID", "seq", "version"],
  31695. "additionalProperties": false
  31696. },
  31697. "location": {
  31698. "$ref": "#/components/schemas/LocationRef"
  31699. },
  31700. "type": {
  31701. "type": "string",
  31702. "enum": ["command.executed"]
  31703. },
  31704. "data": {
  31705. "type": "object",
  31706. "properties": {
  31707. "name": {
  31708. "type": "string"
  31709. },
  31710. "sessionID": {
  31711. "type": "string",
  31712. "pattern": "^ses"
  31713. },
  31714. "arguments": {
  31715. "type": "string"
  31716. },
  31717. "messageID": {
  31718. "type": "string",
  31719. "pattern": "^msg"
  31720. }
  31721. },
  31722. "required": ["name", "sessionID", "arguments", "messageID"],
  31723. "additionalProperties": false
  31724. }
  31725. },
  31726. "required": ["id", "type", "data"],
  31727. "additionalProperties": false
  31728. },
  31729. "V2EventProjectUpdated": {
  31730. "type": "object",
  31731. "properties": {
  31732. "id": {
  31733. "type": "string",
  31734. "pattern": "^evt_"
  31735. },
  31736. "metadata": {
  31737. "type": "object"
  31738. },
  31739. "durable": {
  31740. "type": "object",
  31741. "properties": {
  31742. "aggregateID": {
  31743. "type": "string"
  31744. },
  31745. "seq": {
  31746. "type": "integer"
  31747. },
  31748. "version": {
  31749. "type": "integer"
  31750. }
  31751. },
  31752. "required": ["aggregateID", "seq", "version"],
  31753. "additionalProperties": false
  31754. },
  31755. "location": {
  31756. "$ref": "#/components/schemas/LocationRef"
  31757. },
  31758. "type": {
  31759. "type": "string",
  31760. "enum": ["project.updated"]
  31761. },
  31762. "data": {
  31763. "type": "object",
  31764. "properties": {
  31765. "id": {
  31766. "type": "string"
  31767. },
  31768. "worktree": {
  31769. "type": "string"
  31770. },
  31771. "vcs": {
  31772. "type": "string",
  31773. "enum": ["git"]
  31774. },
  31775. "name": {
  31776. "type": "string"
  31777. },
  31778. "icon": {
  31779. "type": "object",
  31780. "properties": {
  31781. "url": {
  31782. "type": "string"
  31783. },
  31784. "override": {
  31785. "type": "string"
  31786. },
  31787. "color": {
  31788. "type": "string"
  31789. }
  31790. },
  31791. "additionalProperties": false
  31792. },
  31793. "commands": {
  31794. "type": "object",
  31795. "properties": {
  31796. "start": {
  31797. "type": "string",
  31798. "description": "Startup script to run when creating a new workspace (worktree)"
  31799. }
  31800. },
  31801. "additionalProperties": false
  31802. },
  31803. "time": {
  31804. "type": "object",
  31805. "properties": {
  31806. "created": {
  31807. "type": "integer",
  31808. "minimum": 0
  31809. },
  31810. "updated": {
  31811. "type": "integer",
  31812. "minimum": 0
  31813. },
  31814. "initialized": {
  31815. "type": "integer",
  31816. "minimum": 0
  31817. }
  31818. },
  31819. "required": ["created", "updated"],
  31820. "additionalProperties": false
  31821. },
  31822. "sandboxes": {
  31823. "type": "array",
  31824. "items": {
  31825. "type": "string"
  31826. }
  31827. }
  31828. },
  31829. "required": ["id", "worktree", "time", "sandboxes"],
  31830. "additionalProperties": false
  31831. }
  31832. },
  31833. "required": ["id", "type", "data"],
  31834. "additionalProperties": false
  31835. },
  31836. "V2EventSessionStatus": {
  31837. "type": "object",
  31838. "properties": {
  31839. "id": {
  31840. "type": "string",
  31841. "pattern": "^evt_"
  31842. },
  31843. "metadata": {
  31844. "type": "object"
  31845. },
  31846. "durable": {
  31847. "type": "object",
  31848. "properties": {
  31849. "aggregateID": {
  31850. "type": "string"
  31851. },
  31852. "seq": {
  31853. "type": "integer"
  31854. },
  31855. "version": {
  31856. "type": "integer"
  31857. }
  31858. },
  31859. "required": ["aggregateID", "seq", "version"],
  31860. "additionalProperties": false
  31861. },
  31862. "location": {
  31863. "$ref": "#/components/schemas/LocationRef"
  31864. },
  31865. "type": {
  31866. "type": "string",
  31867. "enum": ["session.status"]
  31868. },
  31869. "data": {
  31870. "type": "object",
  31871. "properties": {
  31872. "sessionID": {
  31873. "type": "string",
  31874. "pattern": "^ses"
  31875. },
  31876. "status": {
  31877. "$ref": "#/components/schemas/SessionStatus"
  31878. }
  31879. },
  31880. "required": ["sessionID", "status"],
  31881. "additionalProperties": false
  31882. }
  31883. },
  31884. "required": ["id", "type", "data"],
  31885. "additionalProperties": false
  31886. },
  31887. "V2EventSessionIdle": {
  31888. "type": "object",
  31889. "properties": {
  31890. "id": {
  31891. "type": "string",
  31892. "pattern": "^evt_"
  31893. },
  31894. "metadata": {
  31895. "type": "object"
  31896. },
  31897. "durable": {
  31898. "type": "object",
  31899. "properties": {
  31900. "aggregateID": {
  31901. "type": "string"
  31902. },
  31903. "seq": {
  31904. "type": "integer"
  31905. },
  31906. "version": {
  31907. "type": "integer"
  31908. }
  31909. },
  31910. "required": ["aggregateID", "seq", "version"],
  31911. "additionalProperties": false
  31912. },
  31913. "location": {
  31914. "$ref": "#/components/schemas/LocationRef"
  31915. },
  31916. "type": {
  31917. "type": "string",
  31918. "enum": ["session.idle"]
  31919. },
  31920. "data": {
  31921. "type": "object",
  31922. "properties": {
  31923. "sessionID": {
  31924. "type": "string",
  31925. "pattern": "^ses"
  31926. }
  31927. },
  31928. "required": ["sessionID"],
  31929. "additionalProperties": false
  31930. }
  31931. },
  31932. "required": ["id", "type", "data"],
  31933. "additionalProperties": false
  31934. },
  31935. "V2EventQuestionAsked": {
  31936. "type": "object",
  31937. "properties": {
  31938. "id": {
  31939. "type": "string",
  31940. "pattern": "^evt_"
  31941. },
  31942. "metadata": {
  31943. "type": "object"
  31944. },
  31945. "durable": {
  31946. "type": "object",
  31947. "properties": {
  31948. "aggregateID": {
  31949. "type": "string"
  31950. },
  31951. "seq": {
  31952. "type": "integer"
  31953. },
  31954. "version": {
  31955. "type": "integer"
  31956. }
  31957. },
  31958. "required": ["aggregateID", "seq", "version"],
  31959. "additionalProperties": false
  31960. },
  31961. "location": {
  31962. "$ref": "#/components/schemas/LocationRef"
  31963. },
  31964. "type": {
  31965. "type": "string",
  31966. "enum": ["question.asked"]
  31967. },
  31968. "data": {
  31969. "type": "object",
  31970. "properties": {
  31971. "id": {
  31972. "type": "string",
  31973. "pattern": "^que"
  31974. },
  31975. "sessionID": {
  31976. "type": "string",
  31977. "pattern": "^ses"
  31978. },
  31979. "questions": {
  31980. "type": "array",
  31981. "items": {
  31982. "$ref": "#/components/schemas/QuestionInfo"
  31983. },
  31984. "description": "Questions to ask"
  31985. },
  31986. "tool": {
  31987. "$ref": "#/components/schemas/QuestionTool"
  31988. }
  31989. },
  31990. "required": ["id", "sessionID", "questions"],
  31991. "additionalProperties": false
  31992. }
  31993. },
  31994. "required": ["id", "type", "data"],
  31995. "additionalProperties": false
  31996. },
  31997. "V2EventQuestionReplied": {
  31998. "type": "object",
  31999. "properties": {
  32000. "id": {
  32001. "type": "string",
  32002. "pattern": "^evt_"
  32003. },
  32004. "metadata": {
  32005. "type": "object"
  32006. },
  32007. "durable": {
  32008. "type": "object",
  32009. "properties": {
  32010. "aggregateID": {
  32011. "type": "string"
  32012. },
  32013. "seq": {
  32014. "type": "integer"
  32015. },
  32016. "version": {
  32017. "type": "integer"
  32018. }
  32019. },
  32020. "required": ["aggregateID", "seq", "version"],
  32021. "additionalProperties": false
  32022. },
  32023. "location": {
  32024. "$ref": "#/components/schemas/LocationRef"
  32025. },
  32026. "type": {
  32027. "type": "string",
  32028. "enum": ["question.replied"]
  32029. },
  32030. "data": {
  32031. "type": "object",
  32032. "properties": {
  32033. "sessionID": {
  32034. "type": "string",
  32035. "pattern": "^ses"
  32036. },
  32037. "requestID": {
  32038. "type": "string",
  32039. "pattern": "^que"
  32040. },
  32041. "answers": {
  32042. "type": "array",
  32043. "items": {
  32044. "$ref": "#/components/schemas/QuestionAnswer"
  32045. }
  32046. }
  32047. },
  32048. "required": ["sessionID", "requestID", "answers"],
  32049. "additionalProperties": false
  32050. }
  32051. },
  32052. "required": ["id", "type", "data"],
  32053. "additionalProperties": false
  32054. },
  32055. "V2EventQuestionRejected": {
  32056. "type": "object",
  32057. "properties": {
  32058. "id": {
  32059. "type": "string",
  32060. "pattern": "^evt_"
  32061. },
  32062. "metadata": {
  32063. "type": "object"
  32064. },
  32065. "durable": {
  32066. "type": "object",
  32067. "properties": {
  32068. "aggregateID": {
  32069. "type": "string"
  32070. },
  32071. "seq": {
  32072. "type": "integer"
  32073. },
  32074. "version": {
  32075. "type": "integer"
  32076. }
  32077. },
  32078. "required": ["aggregateID", "seq", "version"],
  32079. "additionalProperties": false
  32080. },
  32081. "location": {
  32082. "$ref": "#/components/schemas/LocationRef"
  32083. },
  32084. "type": {
  32085. "type": "string",
  32086. "enum": ["question.rejected"]
  32087. },
  32088. "data": {
  32089. "type": "object",
  32090. "properties": {
  32091. "sessionID": {
  32092. "type": "string",
  32093. "pattern": "^ses"
  32094. },
  32095. "requestID": {
  32096. "type": "string",
  32097. "pattern": "^que"
  32098. }
  32099. },
  32100. "required": ["sessionID", "requestID"],
  32101. "additionalProperties": false
  32102. }
  32103. },
  32104. "required": ["id", "type", "data"],
  32105. "additionalProperties": false
  32106. },
  32107. "V2EventSessionCompacted": {
  32108. "type": "object",
  32109. "properties": {
  32110. "id": {
  32111. "type": "string",
  32112. "pattern": "^evt_"
  32113. },
  32114. "metadata": {
  32115. "type": "object"
  32116. },
  32117. "durable": {
  32118. "type": "object",
  32119. "properties": {
  32120. "aggregateID": {
  32121. "type": "string"
  32122. },
  32123. "seq": {
  32124. "type": "integer"
  32125. },
  32126. "version": {
  32127. "type": "integer"
  32128. }
  32129. },
  32130. "required": ["aggregateID", "seq", "version"],
  32131. "additionalProperties": false
  32132. },
  32133. "location": {
  32134. "$ref": "#/components/schemas/LocationRef"
  32135. },
  32136. "type": {
  32137. "type": "string",
  32138. "enum": ["session.compacted"]
  32139. },
  32140. "data": {
  32141. "type": "object",
  32142. "properties": {
  32143. "sessionID": {
  32144. "type": "string",
  32145. "pattern": "^ses"
  32146. }
  32147. },
  32148. "required": ["sessionID"],
  32149. "additionalProperties": false
  32150. }
  32151. },
  32152. "required": ["id", "type", "data"],
  32153. "additionalProperties": false
  32154. },
  32155. "V2EventVcsBranchUpdated": {
  32156. "type": "object",
  32157. "properties": {
  32158. "id": {
  32159. "type": "string",
  32160. "pattern": "^evt_"
  32161. },
  32162. "metadata": {
  32163. "type": "object"
  32164. },
  32165. "durable": {
  32166. "type": "object",
  32167. "properties": {
  32168. "aggregateID": {
  32169. "type": "string"
  32170. },
  32171. "seq": {
  32172. "type": "integer"
  32173. },
  32174. "version": {
  32175. "type": "integer"
  32176. }
  32177. },
  32178. "required": ["aggregateID", "seq", "version"],
  32179. "additionalProperties": false
  32180. },
  32181. "location": {
  32182. "$ref": "#/components/schemas/LocationRef"
  32183. },
  32184. "type": {
  32185. "type": "string",
  32186. "enum": ["vcs.branch.updated"]
  32187. },
  32188. "data": {
  32189. "type": "object",
  32190. "properties": {
  32191. "branch": {
  32192. "type": "string"
  32193. }
  32194. },
  32195. "additionalProperties": false
  32196. }
  32197. },
  32198. "required": ["id", "type", "data"],
  32199. "additionalProperties": false
  32200. },
  32201. "V2EventWorkspaceReady": {
  32202. "type": "object",
  32203. "properties": {
  32204. "id": {
  32205. "type": "string",
  32206. "pattern": "^evt_"
  32207. },
  32208. "metadata": {
  32209. "type": "object"
  32210. },
  32211. "durable": {
  32212. "type": "object",
  32213. "properties": {
  32214. "aggregateID": {
  32215. "type": "string"
  32216. },
  32217. "seq": {
  32218. "type": "integer"
  32219. },
  32220. "version": {
  32221. "type": "integer"
  32222. }
  32223. },
  32224. "required": ["aggregateID", "seq", "version"],
  32225. "additionalProperties": false
  32226. },
  32227. "location": {
  32228. "$ref": "#/components/schemas/LocationRef"
  32229. },
  32230. "type": {
  32231. "type": "string",
  32232. "enum": ["workspace.ready"]
  32233. },
  32234. "data": {
  32235. "type": "object",
  32236. "properties": {
  32237. "name": {
  32238. "type": "string"
  32239. }
  32240. },
  32241. "required": ["name"],
  32242. "additionalProperties": false
  32243. }
  32244. },
  32245. "required": ["id", "type", "data"],
  32246. "additionalProperties": false
  32247. },
  32248. "V2EventWorkspaceFailed": {
  32249. "type": "object",
  32250. "properties": {
  32251. "id": {
  32252. "type": "string",
  32253. "pattern": "^evt_"
  32254. },
  32255. "metadata": {
  32256. "type": "object"
  32257. },
  32258. "durable": {
  32259. "type": "object",
  32260. "properties": {
  32261. "aggregateID": {
  32262. "type": "string"
  32263. },
  32264. "seq": {
  32265. "type": "integer"
  32266. },
  32267. "version": {
  32268. "type": "integer"
  32269. }
  32270. },
  32271. "required": ["aggregateID", "seq", "version"],
  32272. "additionalProperties": false
  32273. },
  32274. "location": {
  32275. "$ref": "#/components/schemas/LocationRef"
  32276. },
  32277. "type": {
  32278. "type": "string",
  32279. "enum": ["workspace.failed"]
  32280. },
  32281. "data": {
  32282. "type": "object",
  32283. "properties": {
  32284. "message": {
  32285. "type": "string"
  32286. }
  32287. },
  32288. "required": ["message"],
  32289. "additionalProperties": false
  32290. }
  32291. },
  32292. "required": ["id", "type", "data"],
  32293. "additionalProperties": false
  32294. },
  32295. "V2EventWorkspaceStatus": {
  32296. "type": "object",
  32297. "properties": {
  32298. "id": {
  32299. "type": "string",
  32300. "pattern": "^evt_"
  32301. },
  32302. "metadata": {
  32303. "type": "object"
  32304. },
  32305. "durable": {
  32306. "type": "object",
  32307. "properties": {
  32308. "aggregateID": {
  32309. "type": "string"
  32310. },
  32311. "seq": {
  32312. "type": "integer"
  32313. },
  32314. "version": {
  32315. "type": "integer"
  32316. }
  32317. },
  32318. "required": ["aggregateID", "seq", "version"],
  32319. "additionalProperties": false
  32320. },
  32321. "location": {
  32322. "$ref": "#/components/schemas/LocationRef"
  32323. },
  32324. "type": {
  32325. "type": "string",
  32326. "enum": ["workspace.status"]
  32327. },
  32328. "data": {
  32329. "type": "object",
  32330. "properties": {
  32331. "workspaceID": {
  32332. "type": "string",
  32333. "pattern": "^wrk"
  32334. },
  32335. "status": {
  32336. "type": "string",
  32337. "enum": ["connected", "connecting", "disconnected", "error"]
  32338. }
  32339. },
  32340. "required": ["workspaceID", "status"],
  32341. "additionalProperties": false
  32342. }
  32343. },
  32344. "required": ["id", "type", "data"],
  32345. "additionalProperties": false
  32346. },
  32347. "V2EventWorktreeReady": {
  32348. "type": "object",
  32349. "properties": {
  32350. "id": {
  32351. "type": "string",
  32352. "pattern": "^evt_"
  32353. },
  32354. "metadata": {
  32355. "type": "object"
  32356. },
  32357. "durable": {
  32358. "type": "object",
  32359. "properties": {
  32360. "aggregateID": {
  32361. "type": "string"
  32362. },
  32363. "seq": {
  32364. "type": "integer"
  32365. },
  32366. "version": {
  32367. "type": "integer"
  32368. }
  32369. },
  32370. "required": ["aggregateID", "seq", "version"],
  32371. "additionalProperties": false
  32372. },
  32373. "location": {
  32374. "$ref": "#/components/schemas/LocationRef"
  32375. },
  32376. "type": {
  32377. "type": "string",
  32378. "enum": ["worktree.ready"]
  32379. },
  32380. "data": {
  32381. "type": "object",
  32382. "properties": {
  32383. "name": {
  32384. "type": "string"
  32385. },
  32386. "branch": {
  32387. "type": "string"
  32388. }
  32389. },
  32390. "required": ["name"],
  32391. "additionalProperties": false
  32392. }
  32393. },
  32394. "required": ["id", "type", "data"],
  32395. "additionalProperties": false
  32396. },
  32397. "V2EventWorktreeFailed": {
  32398. "type": "object",
  32399. "properties": {
  32400. "id": {
  32401. "type": "string",
  32402. "pattern": "^evt_"
  32403. },
  32404. "metadata": {
  32405. "type": "object"
  32406. },
  32407. "durable": {
  32408. "type": "object",
  32409. "properties": {
  32410. "aggregateID": {
  32411. "type": "string"
  32412. },
  32413. "seq": {
  32414. "type": "integer"
  32415. },
  32416. "version": {
  32417. "type": "integer"
  32418. }
  32419. },
  32420. "required": ["aggregateID", "seq", "version"],
  32421. "additionalProperties": false
  32422. },
  32423. "location": {
  32424. "$ref": "#/components/schemas/LocationRef"
  32425. },
  32426. "type": {
  32427. "type": "string",
  32428. "enum": ["worktree.failed"]
  32429. },
  32430. "data": {
  32431. "type": "object",
  32432. "properties": {
  32433. "message": {
  32434. "type": "string"
  32435. }
  32436. },
  32437. "required": ["message"],
  32438. "additionalProperties": false
  32439. }
  32440. },
  32441. "required": ["id", "type", "data"],
  32442. "additionalProperties": false
  32443. },
  32444. "V2EventServerConnected": {
  32445. "type": "object",
  32446. "properties": {
  32447. "id": {
  32448. "type": "string",
  32449. "pattern": "^evt_"
  32450. },
  32451. "metadata": {
  32452. "type": "object"
  32453. },
  32454. "durable": {
  32455. "type": "object",
  32456. "properties": {
  32457. "aggregateID": {
  32458. "type": "string"
  32459. },
  32460. "seq": {
  32461. "type": "integer"
  32462. },
  32463. "version": {
  32464. "type": "integer"
  32465. }
  32466. },
  32467. "required": ["aggregateID", "seq", "version"],
  32468. "additionalProperties": false
  32469. },
  32470. "location": {
  32471. "$ref": "#/components/schemas/LocationRef"
  32472. },
  32473. "type": {
  32474. "type": "string",
  32475. "enum": ["server.connected"]
  32476. },
  32477. "data": {
  32478. "type": "object",
  32479. "properties": {}
  32480. }
  32481. },
  32482. "required": ["id", "type", "data"],
  32483. "additionalProperties": false
  32484. },
  32485. "V2EventGlobalDisposed": {
  32486. "type": "object",
  32487. "properties": {
  32488. "id": {
  32489. "type": "string",
  32490. "pattern": "^evt_"
  32491. },
  32492. "metadata": {
  32493. "type": "object"
  32494. },
  32495. "durable": {
  32496. "type": "object",
  32497. "properties": {
  32498. "aggregateID": {
  32499. "type": "string"
  32500. },
  32501. "seq": {
  32502. "type": "integer"
  32503. },
  32504. "version": {
  32505. "type": "integer"
  32506. }
  32507. },
  32508. "required": ["aggregateID", "seq", "version"],
  32509. "additionalProperties": false
  32510. },
  32511. "location": {
  32512. "$ref": "#/components/schemas/LocationRef"
  32513. },
  32514. "type": {
  32515. "type": "string",
  32516. "enum": ["global.disposed"]
  32517. },
  32518. "data": {
  32519. "type": "object",
  32520. "properties": {}
  32521. }
  32522. },
  32523. "required": ["id", "type", "data"],
  32524. "additionalProperties": false
  32525. },
  32526. "QuestionV2Request": {
  32527. "type": "object",
  32528. "properties": {
  32529. "id": {
  32530. "type": "string",
  32531. "pattern": "^que"
  32532. },
  32533. "sessionID": {
  32534. "type": "string",
  32535. "pattern": "^ses"
  32536. },
  32537. "questions": {
  32538. "type": "array",
  32539. "items": {
  32540. "$ref": "#/components/schemas/QuestionV2Info"
  32541. },
  32542. "description": "Questions to ask"
  32543. },
  32544. "tool": {
  32545. "$ref": "#/components/schemas/QuestionV2Tool"
  32546. }
  32547. },
  32548. "required": ["id", "sessionID", "questions"],
  32549. "additionalProperties": false
  32550. },
  32551. "QuestionV2Reply": {
  32552. "type": "object",
  32553. "properties": {
  32554. "answers": {
  32555. "type": "array",
  32556. "items": {
  32557. "$ref": "#/components/schemas/QuestionV2Answer"
  32558. },
  32559. "description": "User answers in order of questions (each answer is an array of selected labels)"
  32560. }
  32561. },
  32562. "required": ["answers"],
  32563. "additionalProperties": false
  32564. },
  32565. "ReferenceLocalSource": {
  32566. "type": "object",
  32567. "properties": {
  32568. "type": {
  32569. "type": "string",
  32570. "enum": ["local"]
  32571. },
  32572. "path": {
  32573. "type": "string"
  32574. },
  32575. "description": {
  32576. "type": "string"
  32577. },
  32578. "hidden": {
  32579. "type": "boolean"
  32580. }
  32581. },
  32582. "required": ["type", "path"],
  32583. "additionalProperties": false
  32584. },
  32585. "ReferenceGitSource": {
  32586. "type": "object",
  32587. "properties": {
  32588. "type": {
  32589. "type": "string",
  32590. "enum": ["git"]
  32591. },
  32592. "repository": {
  32593. "type": "string"
  32594. },
  32595. "branch": {
  32596. "type": "string"
  32597. },
  32598. "description": {
  32599. "type": "string"
  32600. },
  32601. "hidden": {
  32602. "type": "boolean"
  32603. }
  32604. },
  32605. "required": ["type", "repository"],
  32606. "additionalProperties": false
  32607. },
  32608. "ReferenceInfo": {
  32609. "type": "object",
  32610. "properties": {
  32611. "name": {
  32612. "type": "string"
  32613. },
  32614. "path": {
  32615. "type": "string"
  32616. },
  32617. "description": {
  32618. "type": "string"
  32619. },
  32620. "hidden": {
  32621. "type": "boolean"
  32622. },
  32623. "source": {
  32624. "anyOf": [
  32625. {
  32626. "$ref": "#/components/schemas/ReferenceLocalSource"
  32627. },
  32628. {
  32629. "$ref": "#/components/schemas/ReferenceGitSource"
  32630. }
  32631. ]
  32632. }
  32633. },
  32634. "required": ["name", "path", "source"],
  32635. "additionalProperties": false
  32636. },
  32637. "ProjectCopyCopy": {
  32638. "type": "object",
  32639. "properties": {
  32640. "directory": {
  32641. "type": "string"
  32642. }
  32643. },
  32644. "required": ["directory"],
  32645. "additionalProperties": false
  32646. },
  32647. "EventModels-devRefreshed": {
  32648. "type": "object",
  32649. "properties": {
  32650. "id": {
  32651. "type": "string",
  32652. "pattern": "^evt_"
  32653. },
  32654. "type": {
  32655. "type": "string",
  32656. "enum": ["models-dev.refreshed"]
  32657. },
  32658. "properties": {
  32659. "type": "object",
  32660. "properties": {}
  32661. }
  32662. },
  32663. "required": ["id", "type", "properties"],
  32664. "additionalProperties": false
  32665. },
  32666. "EventIntegrationUpdated": {
  32667. "type": "object",
  32668. "properties": {
  32669. "id": {
  32670. "type": "string",
  32671. "pattern": "^evt_"
  32672. },
  32673. "type": {
  32674. "type": "string",
  32675. "enum": ["integration.updated"]
  32676. },
  32677. "properties": {
  32678. "type": "object",
  32679. "properties": {}
  32680. }
  32681. },
  32682. "required": ["id", "type", "properties"],
  32683. "additionalProperties": false
  32684. },
  32685. "EventCatalogUpdated": {
  32686. "type": "object",
  32687. "properties": {
  32688. "id": {
  32689. "type": "string",
  32690. "pattern": "^evt_"
  32691. },
  32692. "type": {
  32693. "type": "string",
  32694. "enum": ["catalog.updated"]
  32695. },
  32696. "properties": {
  32697. "type": "object",
  32698. "properties": {}
  32699. }
  32700. },
  32701. "required": ["id", "type", "properties"],
  32702. "additionalProperties": false
  32703. },
  32704. "EventSessionCreated": {
  32705. "type": "object",
  32706. "properties": {
  32707. "id": {
  32708. "type": "string",
  32709. "pattern": "^evt_"
  32710. },
  32711. "type": {
  32712. "type": "string",
  32713. "enum": ["session.created"]
  32714. },
  32715. "properties": {
  32716. "type": "object",
  32717. "properties": {
  32718. "sessionID": {
  32719. "type": "string",
  32720. "pattern": "^ses"
  32721. },
  32722. "info": {
  32723. "$ref": "#/components/schemas/Session"
  32724. }
  32725. },
  32726. "required": ["sessionID", "info"],
  32727. "additionalProperties": false
  32728. }
  32729. },
  32730. "required": ["id", "type", "properties"],
  32731. "additionalProperties": false
  32732. },
  32733. "EventSessionUpdated": {
  32734. "type": "object",
  32735. "properties": {
  32736. "id": {
  32737. "type": "string",
  32738. "pattern": "^evt_"
  32739. },
  32740. "type": {
  32741. "type": "string",
  32742. "enum": ["session.updated"]
  32743. },
  32744. "properties": {
  32745. "type": "object",
  32746. "properties": {
  32747. "sessionID": {
  32748. "type": "string",
  32749. "pattern": "^ses"
  32750. },
  32751. "info": {
  32752. "$ref": "#/components/schemas/Session"
  32753. }
  32754. },
  32755. "required": ["sessionID", "info"],
  32756. "additionalProperties": false
  32757. }
  32758. },
  32759. "required": ["id", "type", "properties"],
  32760. "additionalProperties": false
  32761. },
  32762. "EventSessionDeleted": {
  32763. "type": "object",
  32764. "properties": {
  32765. "id": {
  32766. "type": "string",
  32767. "pattern": "^evt_"
  32768. },
  32769. "type": {
  32770. "type": "string",
  32771. "enum": ["session.deleted"]
  32772. },
  32773. "properties": {
  32774. "type": "object",
  32775. "properties": {
  32776. "sessionID": {
  32777. "type": "string",
  32778. "pattern": "^ses"
  32779. },
  32780. "info": {
  32781. "$ref": "#/components/schemas/Session"
  32782. }
  32783. },
  32784. "required": ["sessionID", "info"],
  32785. "additionalProperties": false
  32786. }
  32787. },
  32788. "required": ["id", "type", "properties"],
  32789. "additionalProperties": false
  32790. },
  32791. "EventMessageUpdated": {
  32792. "type": "object",
  32793. "properties": {
  32794. "id": {
  32795. "type": "string",
  32796. "pattern": "^evt_"
  32797. },
  32798. "type": {
  32799. "type": "string",
  32800. "enum": ["message.updated"]
  32801. },
  32802. "properties": {
  32803. "type": "object",
  32804. "properties": {
  32805. "sessionID": {
  32806. "type": "string",
  32807. "pattern": "^ses"
  32808. },
  32809. "info": {
  32810. "$ref": "#/components/schemas/Message"
  32811. }
  32812. },
  32813. "required": ["sessionID", "info"],
  32814. "additionalProperties": false
  32815. }
  32816. },
  32817. "required": ["id", "type", "properties"],
  32818. "additionalProperties": false
  32819. },
  32820. "EventMessageRemoved": {
  32821. "type": "object",
  32822. "properties": {
  32823. "id": {
  32824. "type": "string",
  32825. "pattern": "^evt_"
  32826. },
  32827. "type": {
  32828. "type": "string",
  32829. "enum": ["message.removed"]
  32830. },
  32831. "properties": {
  32832. "type": "object",
  32833. "properties": {
  32834. "sessionID": {
  32835. "type": "string",
  32836. "pattern": "^ses"
  32837. },
  32838. "messageID": {
  32839. "type": "string",
  32840. "pattern": "^msg"
  32841. }
  32842. },
  32843. "required": ["sessionID", "messageID"],
  32844. "additionalProperties": false
  32845. }
  32846. },
  32847. "required": ["id", "type", "properties"],
  32848. "additionalProperties": false
  32849. },
  32850. "EventMessagePartUpdated": {
  32851. "type": "object",
  32852. "properties": {
  32853. "id": {
  32854. "type": "string",
  32855. "pattern": "^evt_"
  32856. },
  32857. "type": {
  32858. "type": "string",
  32859. "enum": ["message.part.updated"]
  32860. },
  32861. "properties": {
  32862. "type": "object",
  32863. "properties": {
  32864. "sessionID": {
  32865. "type": "string",
  32866. "pattern": "^ses"
  32867. },
  32868. "part": {
  32869. "$ref": "#/components/schemas/Part"
  32870. },
  32871. "time": {
  32872. "type": "number"
  32873. }
  32874. },
  32875. "required": ["sessionID", "part", "time"],
  32876. "additionalProperties": false
  32877. }
  32878. },
  32879. "required": ["id", "type", "properties"],
  32880. "additionalProperties": false
  32881. },
  32882. "EventMessagePartRemoved": {
  32883. "type": "object",
  32884. "properties": {
  32885. "id": {
  32886. "type": "string",
  32887. "pattern": "^evt_"
  32888. },
  32889. "type": {
  32890. "type": "string",
  32891. "enum": ["message.part.removed"]
  32892. },
  32893. "properties": {
  32894. "type": "object",
  32895. "properties": {
  32896. "sessionID": {
  32897. "type": "string",
  32898. "pattern": "^ses"
  32899. },
  32900. "messageID": {
  32901. "type": "string",
  32902. "pattern": "^msg"
  32903. },
  32904. "partID": {
  32905. "type": "string",
  32906. "pattern": "^prt"
  32907. }
  32908. },
  32909. "required": ["sessionID", "messageID", "partID"],
  32910. "additionalProperties": false
  32911. }
  32912. },
  32913. "required": ["id", "type", "properties"],
  32914. "additionalProperties": false
  32915. },
  32916. "EventSessionNextAgentSwitched": {
  32917. "type": "object",
  32918. "properties": {
  32919. "id": {
  32920. "type": "string",
  32921. "pattern": "^evt_"
  32922. },
  32923. "type": {
  32924. "type": "string",
  32925. "enum": ["session.next.agent.switched"]
  32926. },
  32927. "properties": {
  32928. "type": "object",
  32929. "properties": {
  32930. "timestamp": {
  32931. "type": "number"
  32932. },
  32933. "sessionID": {
  32934. "type": "string",
  32935. "pattern": "^ses"
  32936. },
  32937. "messageID": {
  32938. "type": "string",
  32939. "pattern": "^msg_"
  32940. },
  32941. "agent": {
  32942. "type": "string"
  32943. }
  32944. },
  32945. "required": ["timestamp", "sessionID", "messageID", "agent"],
  32946. "additionalProperties": false
  32947. }
  32948. },
  32949. "required": ["id", "type", "properties"],
  32950. "additionalProperties": false
  32951. },
  32952. "EventSessionNextModelSwitched": {
  32953. "type": "object",
  32954. "properties": {
  32955. "id": {
  32956. "type": "string",
  32957. "pattern": "^evt_"
  32958. },
  32959. "type": {
  32960. "type": "string",
  32961. "enum": ["session.next.model.switched"]
  32962. },
  32963. "properties": {
  32964. "type": "object",
  32965. "properties": {
  32966. "timestamp": {
  32967. "type": "number"
  32968. },
  32969. "sessionID": {
  32970. "type": "string",
  32971. "pattern": "^ses"
  32972. },
  32973. "messageID": {
  32974. "type": "string",
  32975. "pattern": "^msg_"
  32976. },
  32977. "model": {
  32978. "type": "object",
  32979. "properties": {
  32980. "id": {
  32981. "type": "string"
  32982. },
  32983. "providerID": {
  32984. "type": "string"
  32985. },
  32986. "variant": {
  32987. "type": "string"
  32988. }
  32989. },
  32990. "required": ["id", "providerID"],
  32991. "additionalProperties": false
  32992. }
  32993. },
  32994. "required": ["timestamp", "sessionID", "messageID", "model"],
  32995. "additionalProperties": false
  32996. }
  32997. },
  32998. "required": ["id", "type", "properties"],
  32999. "additionalProperties": false
  33000. },
  33001. "EventSessionNextMoved": {
  33002. "type": "object",
  33003. "properties": {
  33004. "id": {
  33005. "type": "string",
  33006. "pattern": "^evt_"
  33007. },
  33008. "type": {
  33009. "type": "string",
  33010. "enum": ["session.next.moved"]
  33011. },
  33012. "properties": {
  33013. "type": "object",
  33014. "properties": {
  33015. "timestamp": {
  33016. "type": "number"
  33017. },
  33018. "sessionID": {
  33019. "type": "string",
  33020. "pattern": "^ses"
  33021. },
  33022. "location": {
  33023. "$ref": "#/components/schemas/LocationRef"
  33024. },
  33025. "subdirectory": {
  33026. "type": "string"
  33027. }
  33028. },
  33029. "required": ["timestamp", "sessionID", "location"],
  33030. "additionalProperties": false
  33031. }
  33032. },
  33033. "required": ["id", "type", "properties"],
  33034. "additionalProperties": false
  33035. },
  33036. "EventSessionNextPrompted": {
  33037. "type": "object",
  33038. "properties": {
  33039. "id": {
  33040. "type": "string",
  33041. "pattern": "^evt_"
  33042. },
  33043. "type": {
  33044. "type": "string",
  33045. "enum": ["session.next.prompted"]
  33046. },
  33047. "properties": {
  33048. "type": "object",
  33049. "properties": {
  33050. "timestamp": {
  33051. "type": "number"
  33052. },
  33053. "sessionID": {
  33054. "type": "string",
  33055. "pattern": "^ses"
  33056. },
  33057. "messageID": {
  33058. "type": "string",
  33059. "pattern": "^msg_"
  33060. },
  33061. "prompt": {
  33062. "$ref": "#/components/schemas/Prompt"
  33063. },
  33064. "delivery": {
  33065. "type": "string",
  33066. "enum": ["steer", "queue"]
  33067. }
  33068. },
  33069. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  33070. "additionalProperties": false
  33071. }
  33072. },
  33073. "required": ["id", "type", "properties"],
  33074. "additionalProperties": false
  33075. },
  33076. "EventSessionNextPromptAdmitted": {
  33077. "type": "object",
  33078. "properties": {
  33079. "id": {
  33080. "type": "string",
  33081. "pattern": "^evt_"
  33082. },
  33083. "type": {
  33084. "type": "string",
  33085. "enum": ["session.next.prompt.admitted"]
  33086. },
  33087. "properties": {
  33088. "type": "object",
  33089. "properties": {
  33090. "timestamp": {
  33091. "type": "number"
  33092. },
  33093. "sessionID": {
  33094. "type": "string",
  33095. "pattern": "^ses"
  33096. },
  33097. "messageID": {
  33098. "type": "string",
  33099. "pattern": "^msg_"
  33100. },
  33101. "prompt": {
  33102. "$ref": "#/components/schemas/Prompt"
  33103. },
  33104. "delivery": {
  33105. "type": "string",
  33106. "enum": ["steer", "queue"]
  33107. }
  33108. },
  33109. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  33110. "additionalProperties": false
  33111. }
  33112. },
  33113. "required": ["id", "type", "properties"],
  33114. "additionalProperties": false
  33115. },
  33116. "EventSessionNextContextUpdated": {
  33117. "type": "object",
  33118. "properties": {
  33119. "id": {
  33120. "type": "string",
  33121. "pattern": "^evt_"
  33122. },
  33123. "type": {
  33124. "type": "string",
  33125. "enum": ["session.next.context.updated"]
  33126. },
  33127. "properties": {
  33128. "type": "object",
  33129. "properties": {
  33130. "timestamp": {
  33131. "type": "number"
  33132. },
  33133. "sessionID": {
  33134. "type": "string",
  33135. "pattern": "^ses"
  33136. },
  33137. "messageID": {
  33138. "type": "string",
  33139. "pattern": "^msg_"
  33140. },
  33141. "text": {
  33142. "type": "string"
  33143. }
  33144. },
  33145. "required": ["timestamp", "sessionID", "messageID", "text"],
  33146. "additionalProperties": false
  33147. }
  33148. },
  33149. "required": ["id", "type", "properties"],
  33150. "additionalProperties": false
  33151. },
  33152. "EventSessionNextSynthetic": {
  33153. "type": "object",
  33154. "properties": {
  33155. "id": {
  33156. "type": "string",
  33157. "pattern": "^evt_"
  33158. },
  33159. "type": {
  33160. "type": "string",
  33161. "enum": ["session.next.synthetic"]
  33162. },
  33163. "properties": {
  33164. "type": "object",
  33165. "properties": {
  33166. "timestamp": {
  33167. "type": "number"
  33168. },
  33169. "sessionID": {
  33170. "type": "string",
  33171. "pattern": "^ses"
  33172. },
  33173. "messageID": {
  33174. "type": "string",
  33175. "pattern": "^msg_"
  33176. },
  33177. "text": {
  33178. "type": "string"
  33179. }
  33180. },
  33181. "required": ["timestamp", "sessionID", "messageID", "text"],
  33182. "additionalProperties": false
  33183. }
  33184. },
  33185. "required": ["id", "type", "properties"],
  33186. "additionalProperties": false
  33187. },
  33188. "EventSessionNextShellStarted": {
  33189. "type": "object",
  33190. "properties": {
  33191. "id": {
  33192. "type": "string",
  33193. "pattern": "^evt_"
  33194. },
  33195. "type": {
  33196. "type": "string",
  33197. "enum": ["session.next.shell.started"]
  33198. },
  33199. "properties": {
  33200. "type": "object",
  33201. "properties": {
  33202. "timestamp": {
  33203. "type": "number"
  33204. },
  33205. "sessionID": {
  33206. "type": "string",
  33207. "pattern": "^ses"
  33208. },
  33209. "messageID": {
  33210. "type": "string",
  33211. "pattern": "^msg_"
  33212. },
  33213. "callID": {
  33214. "type": "string"
  33215. },
  33216. "command": {
  33217. "type": "string"
  33218. }
  33219. },
  33220. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  33221. "additionalProperties": false
  33222. }
  33223. },
  33224. "required": ["id", "type", "properties"],
  33225. "additionalProperties": false
  33226. },
  33227. "EventSessionNextShellEnded": {
  33228. "type": "object",
  33229. "properties": {
  33230. "id": {
  33231. "type": "string",
  33232. "pattern": "^evt_"
  33233. },
  33234. "type": {
  33235. "type": "string",
  33236. "enum": ["session.next.shell.ended"]
  33237. },
  33238. "properties": {
  33239. "type": "object",
  33240. "properties": {
  33241. "timestamp": {
  33242. "type": "number"
  33243. },
  33244. "sessionID": {
  33245. "type": "string",
  33246. "pattern": "^ses"
  33247. },
  33248. "callID": {
  33249. "type": "string"
  33250. },
  33251. "output": {
  33252. "type": "string"
  33253. }
  33254. },
  33255. "required": ["timestamp", "sessionID", "callID", "output"],
  33256. "additionalProperties": false
  33257. }
  33258. },
  33259. "required": ["id", "type", "properties"],
  33260. "additionalProperties": false
  33261. },
  33262. "EventSessionNextStepStarted": {
  33263. "type": "object",
  33264. "properties": {
  33265. "id": {
  33266. "type": "string",
  33267. "pattern": "^evt_"
  33268. },
  33269. "type": {
  33270. "type": "string",
  33271. "enum": ["session.next.step.started"]
  33272. },
  33273. "properties": {
  33274. "type": "object",
  33275. "properties": {
  33276. "timestamp": {
  33277. "type": "number"
  33278. },
  33279. "sessionID": {
  33280. "type": "string",
  33281. "pattern": "^ses"
  33282. },
  33283. "assistantMessageID": {
  33284. "type": "string",
  33285. "pattern": "^msg_"
  33286. },
  33287. "agent": {
  33288. "type": "string"
  33289. },
  33290. "model": {
  33291. "type": "object",
  33292. "properties": {
  33293. "id": {
  33294. "type": "string"
  33295. },
  33296. "providerID": {
  33297. "type": "string"
  33298. },
  33299. "variant": {
  33300. "type": "string"
  33301. }
  33302. },
  33303. "required": ["id", "providerID"],
  33304. "additionalProperties": false
  33305. },
  33306. "snapshot": {
  33307. "type": "string"
  33308. }
  33309. },
  33310. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  33311. "additionalProperties": false
  33312. }
  33313. },
  33314. "required": ["id", "type", "properties"],
  33315. "additionalProperties": false
  33316. },
  33317. "EventSessionNextStepEnded": {
  33318. "type": "object",
  33319. "properties": {
  33320. "id": {
  33321. "type": "string",
  33322. "pattern": "^evt_"
  33323. },
  33324. "type": {
  33325. "type": "string",
  33326. "enum": ["session.next.step.ended"]
  33327. },
  33328. "properties": {
  33329. "type": "object",
  33330. "properties": {
  33331. "timestamp": {
  33332. "type": "number"
  33333. },
  33334. "sessionID": {
  33335. "type": "string",
  33336. "pattern": "^ses"
  33337. },
  33338. "assistantMessageID": {
  33339. "type": "string",
  33340. "pattern": "^msg_"
  33341. },
  33342. "finish": {
  33343. "type": "string"
  33344. },
  33345. "cost": {
  33346. "type": "number"
  33347. },
  33348. "tokens": {
  33349. "type": "object",
  33350. "properties": {
  33351. "input": {
  33352. "type": "number"
  33353. },
  33354. "output": {
  33355. "type": "number"
  33356. },
  33357. "reasoning": {
  33358. "type": "number"
  33359. },
  33360. "cache": {
  33361. "type": "object",
  33362. "properties": {
  33363. "read": {
  33364. "type": "number"
  33365. },
  33366. "write": {
  33367. "type": "number"
  33368. }
  33369. },
  33370. "required": ["read", "write"],
  33371. "additionalProperties": false
  33372. }
  33373. },
  33374. "required": ["input", "output", "reasoning", "cache"],
  33375. "additionalProperties": false
  33376. },
  33377. "snapshot": {
  33378. "type": "string"
  33379. }
  33380. },
  33381. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  33382. "additionalProperties": false
  33383. }
  33384. },
  33385. "required": ["id", "type", "properties"],
  33386. "additionalProperties": false
  33387. },
  33388. "EventSessionNextStepFailed": {
  33389. "type": "object",
  33390. "properties": {
  33391. "id": {
  33392. "type": "string",
  33393. "pattern": "^evt_"
  33394. },
  33395. "type": {
  33396. "type": "string",
  33397. "enum": ["session.next.step.failed"]
  33398. },
  33399. "properties": {
  33400. "type": "object",
  33401. "properties": {
  33402. "timestamp": {
  33403. "type": "number"
  33404. },
  33405. "sessionID": {
  33406. "type": "string",
  33407. "pattern": "^ses"
  33408. },
  33409. "assistantMessageID": {
  33410. "type": "string",
  33411. "pattern": "^msg_"
  33412. },
  33413. "error": {
  33414. "$ref": "#/components/schemas/SessionErrorUnknown"
  33415. }
  33416. },
  33417. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  33418. "additionalProperties": false
  33419. }
  33420. },
  33421. "required": ["id", "type", "properties"],
  33422. "additionalProperties": false
  33423. },
  33424. "EventSessionNextTextStarted": {
  33425. "type": "object",
  33426. "properties": {
  33427. "id": {
  33428. "type": "string",
  33429. "pattern": "^evt_"
  33430. },
  33431. "type": {
  33432. "type": "string",
  33433. "enum": ["session.next.text.started"]
  33434. },
  33435. "properties": {
  33436. "type": "object",
  33437. "properties": {
  33438. "timestamp": {
  33439. "type": "number"
  33440. },
  33441. "sessionID": {
  33442. "type": "string",
  33443. "pattern": "^ses"
  33444. },
  33445. "assistantMessageID": {
  33446. "type": "string",
  33447. "pattern": "^msg_"
  33448. },
  33449. "textID": {
  33450. "type": "string"
  33451. }
  33452. },
  33453. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  33454. "additionalProperties": false
  33455. }
  33456. },
  33457. "required": ["id", "type", "properties"],
  33458. "additionalProperties": false
  33459. },
  33460. "EventSessionNextTextDelta": {
  33461. "type": "object",
  33462. "properties": {
  33463. "id": {
  33464. "type": "string",
  33465. "pattern": "^evt_"
  33466. },
  33467. "type": {
  33468. "type": "string",
  33469. "enum": ["session.next.text.delta"]
  33470. },
  33471. "properties": {
  33472. "type": "object",
  33473. "properties": {
  33474. "timestamp": {
  33475. "type": "number"
  33476. },
  33477. "sessionID": {
  33478. "type": "string",
  33479. "pattern": "^ses"
  33480. },
  33481. "assistantMessageID": {
  33482. "type": "string",
  33483. "pattern": "^msg_"
  33484. },
  33485. "textID": {
  33486. "type": "string"
  33487. },
  33488. "delta": {
  33489. "type": "string"
  33490. }
  33491. },
  33492. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  33493. "additionalProperties": false
  33494. }
  33495. },
  33496. "required": ["id", "type", "properties"],
  33497. "additionalProperties": false
  33498. },
  33499. "EventSessionNextTextEnded": {
  33500. "type": "object",
  33501. "properties": {
  33502. "id": {
  33503. "type": "string",
  33504. "pattern": "^evt_"
  33505. },
  33506. "type": {
  33507. "type": "string",
  33508. "enum": ["session.next.text.ended"]
  33509. },
  33510. "properties": {
  33511. "type": "object",
  33512. "properties": {
  33513. "timestamp": {
  33514. "type": "number"
  33515. },
  33516. "sessionID": {
  33517. "type": "string",
  33518. "pattern": "^ses"
  33519. },
  33520. "assistantMessageID": {
  33521. "type": "string",
  33522. "pattern": "^msg_"
  33523. },
  33524. "textID": {
  33525. "type": "string"
  33526. },
  33527. "text": {
  33528. "type": "string"
  33529. }
  33530. },
  33531. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  33532. "additionalProperties": false
  33533. }
  33534. },
  33535. "required": ["id", "type", "properties"],
  33536. "additionalProperties": false
  33537. },
  33538. "EventSessionNextReasoningStarted": {
  33539. "type": "object",
  33540. "properties": {
  33541. "id": {
  33542. "type": "string",
  33543. "pattern": "^evt_"
  33544. },
  33545. "type": {
  33546. "type": "string",
  33547. "enum": ["session.next.reasoning.started"]
  33548. },
  33549. "properties": {
  33550. "type": "object",
  33551. "properties": {
  33552. "timestamp": {
  33553. "type": "number"
  33554. },
  33555. "sessionID": {
  33556. "type": "string",
  33557. "pattern": "^ses"
  33558. },
  33559. "assistantMessageID": {
  33560. "type": "string",
  33561. "pattern": "^msg_"
  33562. },
  33563. "reasoningID": {
  33564. "type": "string"
  33565. },
  33566. "providerMetadata": {
  33567. "type": "object",
  33568. "additionalProperties": {
  33569. "type": "object"
  33570. }
  33571. }
  33572. },
  33573. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  33574. "additionalProperties": false
  33575. }
  33576. },
  33577. "required": ["id", "type", "properties"],
  33578. "additionalProperties": false
  33579. },
  33580. "EventSessionNextReasoningDelta": {
  33581. "type": "object",
  33582. "properties": {
  33583. "id": {
  33584. "type": "string",
  33585. "pattern": "^evt_"
  33586. },
  33587. "type": {
  33588. "type": "string",
  33589. "enum": ["session.next.reasoning.delta"]
  33590. },
  33591. "properties": {
  33592. "type": "object",
  33593. "properties": {
  33594. "timestamp": {
  33595. "type": "number"
  33596. },
  33597. "sessionID": {
  33598. "type": "string",
  33599. "pattern": "^ses"
  33600. },
  33601. "assistantMessageID": {
  33602. "type": "string",
  33603. "pattern": "^msg_"
  33604. },
  33605. "reasoningID": {
  33606. "type": "string"
  33607. },
  33608. "delta": {
  33609. "type": "string"
  33610. }
  33611. },
  33612. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  33613. "additionalProperties": false
  33614. }
  33615. },
  33616. "required": ["id", "type", "properties"],
  33617. "additionalProperties": false
  33618. },
  33619. "EventSessionNextReasoningEnded": {
  33620. "type": "object",
  33621. "properties": {
  33622. "id": {
  33623. "type": "string",
  33624. "pattern": "^evt_"
  33625. },
  33626. "type": {
  33627. "type": "string",
  33628. "enum": ["session.next.reasoning.ended"]
  33629. },
  33630. "properties": {
  33631. "type": "object",
  33632. "properties": {
  33633. "timestamp": {
  33634. "type": "number"
  33635. },
  33636. "sessionID": {
  33637. "type": "string",
  33638. "pattern": "^ses"
  33639. },
  33640. "assistantMessageID": {
  33641. "type": "string",
  33642. "pattern": "^msg_"
  33643. },
  33644. "reasoningID": {
  33645. "type": "string"
  33646. },
  33647. "text": {
  33648. "type": "string"
  33649. },
  33650. "providerMetadata": {
  33651. "type": "object",
  33652. "additionalProperties": {
  33653. "type": "object"
  33654. }
  33655. }
  33656. },
  33657. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  33658. "additionalProperties": false
  33659. }
  33660. },
  33661. "required": ["id", "type", "properties"],
  33662. "additionalProperties": false
  33663. },
  33664. "EventSessionNextToolInputStarted": {
  33665. "type": "object",
  33666. "properties": {
  33667. "id": {
  33668. "type": "string",
  33669. "pattern": "^evt_"
  33670. },
  33671. "type": {
  33672. "type": "string",
  33673. "enum": ["session.next.tool.input.started"]
  33674. },
  33675. "properties": {
  33676. "type": "object",
  33677. "properties": {
  33678. "timestamp": {
  33679. "type": "number"
  33680. },
  33681. "sessionID": {
  33682. "type": "string",
  33683. "pattern": "^ses"
  33684. },
  33685. "assistantMessageID": {
  33686. "type": "string",
  33687. "pattern": "^msg_"
  33688. },
  33689. "callID": {
  33690. "type": "string"
  33691. },
  33692. "name": {
  33693. "type": "string"
  33694. }
  33695. },
  33696. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  33697. "additionalProperties": false
  33698. }
  33699. },
  33700. "required": ["id", "type", "properties"],
  33701. "additionalProperties": false
  33702. },
  33703. "EventSessionNextToolInputDelta": {
  33704. "type": "object",
  33705. "properties": {
  33706. "id": {
  33707. "type": "string",
  33708. "pattern": "^evt_"
  33709. },
  33710. "type": {
  33711. "type": "string",
  33712. "enum": ["session.next.tool.input.delta"]
  33713. },
  33714. "properties": {
  33715. "type": "object",
  33716. "properties": {
  33717. "timestamp": {
  33718. "type": "number"
  33719. },
  33720. "sessionID": {
  33721. "type": "string",
  33722. "pattern": "^ses"
  33723. },
  33724. "assistantMessageID": {
  33725. "type": "string",
  33726. "pattern": "^msg_"
  33727. },
  33728. "callID": {
  33729. "type": "string"
  33730. },
  33731. "delta": {
  33732. "type": "string"
  33733. }
  33734. },
  33735. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  33736. "additionalProperties": false
  33737. }
  33738. },
  33739. "required": ["id", "type", "properties"],
  33740. "additionalProperties": false
  33741. },
  33742. "EventSessionNextToolInputEnded": {
  33743. "type": "object",
  33744. "properties": {
  33745. "id": {
  33746. "type": "string",
  33747. "pattern": "^evt_"
  33748. },
  33749. "type": {
  33750. "type": "string",
  33751. "enum": ["session.next.tool.input.ended"]
  33752. },
  33753. "properties": {
  33754. "type": "object",
  33755. "properties": {
  33756. "timestamp": {
  33757. "type": "number"
  33758. },
  33759. "sessionID": {
  33760. "type": "string",
  33761. "pattern": "^ses"
  33762. },
  33763. "assistantMessageID": {
  33764. "type": "string",
  33765. "pattern": "^msg_"
  33766. },
  33767. "callID": {
  33768. "type": "string"
  33769. },
  33770. "text": {
  33771. "type": "string"
  33772. }
  33773. },
  33774. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  33775. "additionalProperties": false
  33776. }
  33777. },
  33778. "required": ["id", "type", "properties"],
  33779. "additionalProperties": false
  33780. },
  33781. "EventSessionNextToolCalled": {
  33782. "type": "object",
  33783. "properties": {
  33784. "id": {
  33785. "type": "string",
  33786. "pattern": "^evt_"
  33787. },
  33788. "type": {
  33789. "type": "string",
  33790. "enum": ["session.next.tool.called"]
  33791. },
  33792. "properties": {
  33793. "type": "object",
  33794. "properties": {
  33795. "timestamp": {
  33796. "type": "number"
  33797. },
  33798. "sessionID": {
  33799. "type": "string",
  33800. "pattern": "^ses"
  33801. },
  33802. "assistantMessageID": {
  33803. "type": "string",
  33804. "pattern": "^msg_"
  33805. },
  33806. "callID": {
  33807. "type": "string"
  33808. },
  33809. "tool": {
  33810. "type": "string"
  33811. },
  33812. "input": {
  33813. "type": "object"
  33814. },
  33815. "provider": {
  33816. "type": "object",
  33817. "properties": {
  33818. "executed": {
  33819. "type": "boolean"
  33820. },
  33821. "metadata": {
  33822. "type": "object",
  33823. "additionalProperties": {
  33824. "type": "object"
  33825. }
  33826. }
  33827. },
  33828. "required": ["executed"],
  33829. "additionalProperties": false
  33830. }
  33831. },
  33832. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  33833. "additionalProperties": false
  33834. }
  33835. },
  33836. "required": ["id", "type", "properties"],
  33837. "additionalProperties": false
  33838. },
  33839. "EventSessionNextToolProgress": {
  33840. "type": "object",
  33841. "properties": {
  33842. "id": {
  33843. "type": "string",
  33844. "pattern": "^evt_"
  33845. },
  33846. "type": {
  33847. "type": "string",
  33848. "enum": ["session.next.tool.progress"]
  33849. },
  33850. "properties": {
  33851. "type": "object",
  33852. "properties": {
  33853. "timestamp": {
  33854. "type": "number"
  33855. },
  33856. "sessionID": {
  33857. "type": "string",
  33858. "pattern": "^ses"
  33859. },
  33860. "assistantMessageID": {
  33861. "type": "string",
  33862. "pattern": "^msg_"
  33863. },
  33864. "callID": {
  33865. "type": "string"
  33866. },
  33867. "structured": {
  33868. "type": "object"
  33869. },
  33870. "content": {
  33871. "type": "array",
  33872. "items": {
  33873. "anyOf": [
  33874. {
  33875. "$ref": "#/components/schemas/ToolTextContent"
  33876. },
  33877. {
  33878. "$ref": "#/components/schemas/ToolFileContent"
  33879. }
  33880. ]
  33881. }
  33882. }
  33883. },
  33884. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  33885. "additionalProperties": false
  33886. }
  33887. },
  33888. "required": ["id", "type", "properties"],
  33889. "additionalProperties": false
  33890. },
  33891. "EventSessionNextToolSuccess": {
  33892. "type": "object",
  33893. "properties": {
  33894. "id": {
  33895. "type": "string",
  33896. "pattern": "^evt_"
  33897. },
  33898. "type": {
  33899. "type": "string",
  33900. "enum": ["session.next.tool.success"]
  33901. },
  33902. "properties": {
  33903. "type": "object",
  33904. "properties": {
  33905. "timestamp": {
  33906. "type": "number"
  33907. },
  33908. "sessionID": {
  33909. "type": "string",
  33910. "pattern": "^ses"
  33911. },
  33912. "assistantMessageID": {
  33913. "type": "string",
  33914. "pattern": "^msg_"
  33915. },
  33916. "callID": {
  33917. "type": "string"
  33918. },
  33919. "structured": {
  33920. "type": "object"
  33921. },
  33922. "content": {
  33923. "type": "array",
  33924. "items": {
  33925. "anyOf": [
  33926. {
  33927. "$ref": "#/components/schemas/ToolTextContent"
  33928. },
  33929. {
  33930. "$ref": "#/components/schemas/ToolFileContent"
  33931. }
  33932. ]
  33933. }
  33934. },
  33935. "outputPaths": {
  33936. "type": "array",
  33937. "items": {
  33938. "type": "string"
  33939. }
  33940. },
  33941. "result": {},
  33942. "provider": {
  33943. "type": "object",
  33944. "properties": {
  33945. "executed": {
  33946. "type": "boolean"
  33947. },
  33948. "metadata": {
  33949. "type": "object",
  33950. "additionalProperties": {
  33951. "type": "object"
  33952. }
  33953. }
  33954. },
  33955. "required": ["executed"],
  33956. "additionalProperties": false
  33957. }
  33958. },
  33959. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  33960. "additionalProperties": false
  33961. }
  33962. },
  33963. "required": ["id", "type", "properties"],
  33964. "additionalProperties": false
  33965. },
  33966. "EventSessionNextToolFailed": {
  33967. "type": "object",
  33968. "properties": {
  33969. "id": {
  33970. "type": "string",
  33971. "pattern": "^evt_"
  33972. },
  33973. "type": {
  33974. "type": "string",
  33975. "enum": ["session.next.tool.failed"]
  33976. },
  33977. "properties": {
  33978. "type": "object",
  33979. "properties": {
  33980. "timestamp": {
  33981. "type": "number"
  33982. },
  33983. "sessionID": {
  33984. "type": "string",
  33985. "pattern": "^ses"
  33986. },
  33987. "assistantMessageID": {
  33988. "type": "string",
  33989. "pattern": "^msg_"
  33990. },
  33991. "callID": {
  33992. "type": "string"
  33993. },
  33994. "error": {
  33995. "$ref": "#/components/schemas/SessionErrorUnknown"
  33996. },
  33997. "result": {},
  33998. "provider": {
  33999. "type": "object",
  34000. "properties": {
  34001. "executed": {
  34002. "type": "boolean"
  34003. },
  34004. "metadata": {
  34005. "type": "object",
  34006. "additionalProperties": {
  34007. "type": "object"
  34008. }
  34009. }
  34010. },
  34011. "required": ["executed"],
  34012. "additionalProperties": false
  34013. }
  34014. },
  34015. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  34016. "additionalProperties": false
  34017. }
  34018. },
  34019. "required": ["id", "type", "properties"],
  34020. "additionalProperties": false
  34021. },
  34022. "EventSessionNextRetried": {
  34023. "type": "object",
  34024. "properties": {
  34025. "id": {
  34026. "type": "string",
  34027. "pattern": "^evt_"
  34028. },
  34029. "type": {
  34030. "type": "string",
  34031. "enum": ["session.next.retried"]
  34032. },
  34033. "properties": {
  34034. "type": "object",
  34035. "properties": {
  34036. "timestamp": {
  34037. "type": "number"
  34038. },
  34039. "sessionID": {
  34040. "type": "string",
  34041. "pattern": "^ses"
  34042. },
  34043. "attempt": {
  34044. "type": "number"
  34045. },
  34046. "error": {
  34047. "$ref": "#/components/schemas/SessionNextRetry_error"
  34048. }
  34049. },
  34050. "required": ["timestamp", "sessionID", "attempt", "error"],
  34051. "additionalProperties": false
  34052. }
  34053. },
  34054. "required": ["id", "type", "properties"],
  34055. "additionalProperties": false
  34056. },
  34057. "EventSessionNextCompactionStarted": {
  34058. "type": "object",
  34059. "properties": {
  34060. "id": {
  34061. "type": "string",
  34062. "pattern": "^evt_"
  34063. },
  34064. "type": {
  34065. "type": "string",
  34066. "enum": ["session.next.compaction.started"]
  34067. },
  34068. "properties": {
  34069. "type": "object",
  34070. "properties": {
  34071. "timestamp": {
  34072. "type": "number"
  34073. },
  34074. "sessionID": {
  34075. "type": "string",
  34076. "pattern": "^ses"
  34077. },
  34078. "messageID": {
  34079. "type": "string",
  34080. "pattern": "^msg_"
  34081. },
  34082. "reason": {
  34083. "type": "string",
  34084. "enum": ["auto", "manual"]
  34085. }
  34086. },
  34087. "required": ["timestamp", "sessionID", "messageID", "reason"],
  34088. "additionalProperties": false
  34089. }
  34090. },
  34091. "required": ["id", "type", "properties"],
  34092. "additionalProperties": false
  34093. },
  34094. "EventSessionNextCompactionDelta": {
  34095. "type": "object",
  34096. "properties": {
  34097. "id": {
  34098. "type": "string",
  34099. "pattern": "^evt_"
  34100. },
  34101. "type": {
  34102. "type": "string",
  34103. "enum": ["session.next.compaction.delta"]
  34104. },
  34105. "properties": {
  34106. "type": "object",
  34107. "properties": {
  34108. "timestamp": {
  34109. "type": "number"
  34110. },
  34111. "sessionID": {
  34112. "type": "string",
  34113. "pattern": "^ses"
  34114. },
  34115. "messageID": {
  34116. "type": "string",
  34117. "pattern": "^msg_"
  34118. },
  34119. "text": {
  34120. "type": "string"
  34121. }
  34122. },
  34123. "required": ["timestamp", "sessionID", "messageID", "text"],
  34124. "additionalProperties": false
  34125. }
  34126. },
  34127. "required": ["id", "type", "properties"],
  34128. "additionalProperties": false
  34129. },
  34130. "EventSessionNextCompactionEnded": {
  34131. "type": "object",
  34132. "properties": {
  34133. "id": {
  34134. "type": "string",
  34135. "pattern": "^evt_"
  34136. },
  34137. "type": {
  34138. "type": "string",
  34139. "enum": ["session.next.compaction.ended"]
  34140. },
  34141. "properties": {
  34142. "type": "object",
  34143. "properties": {
  34144. "timestamp": {
  34145. "type": "number"
  34146. },
  34147. "sessionID": {
  34148. "type": "string",
  34149. "pattern": "^ses"
  34150. },
  34151. "messageID": {
  34152. "type": "string",
  34153. "pattern": "^msg_"
  34154. },
  34155. "reason": {
  34156. "type": "string",
  34157. "enum": ["auto", "manual"]
  34158. },
  34159. "text": {
  34160. "type": "string"
  34161. },
  34162. "recent": {
  34163. "type": "string"
  34164. }
  34165. },
  34166. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  34167. "additionalProperties": false
  34168. }
  34169. },
  34170. "required": ["id", "type", "properties"],
  34171. "additionalProperties": false
  34172. },
  34173. "EventMessagePartDelta": {
  34174. "type": "object",
  34175. "properties": {
  34176. "id": {
  34177. "type": "string",
  34178. "pattern": "^evt_"
  34179. },
  34180. "type": {
  34181. "type": "string",
  34182. "enum": ["message.part.delta"]
  34183. },
  34184. "properties": {
  34185. "type": "object",
  34186. "properties": {
  34187. "sessionID": {
  34188. "type": "string",
  34189. "pattern": "^ses"
  34190. },
  34191. "messageID": {
  34192. "type": "string",
  34193. "pattern": "^msg"
  34194. },
  34195. "partID": {
  34196. "type": "string",
  34197. "pattern": "^prt"
  34198. },
  34199. "field": {
  34200. "type": "string"
  34201. },
  34202. "delta": {
  34203. "type": "string"
  34204. }
  34205. },
  34206. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  34207. "additionalProperties": false
  34208. }
  34209. },
  34210. "required": ["id", "type", "properties"],
  34211. "additionalProperties": false
  34212. },
  34213. "EventSessionDiff": {
  34214. "type": "object",
  34215. "properties": {
  34216. "id": {
  34217. "type": "string",
  34218. "pattern": "^evt_"
  34219. },
  34220. "type": {
  34221. "type": "string",
  34222. "enum": ["session.diff"]
  34223. },
  34224. "properties": {
  34225. "type": "object",
  34226. "properties": {
  34227. "sessionID": {
  34228. "type": "string",
  34229. "pattern": "^ses"
  34230. },
  34231. "diff": {
  34232. "type": "array",
  34233. "items": {
  34234. "$ref": "#/components/schemas/SnapshotFileDiff"
  34235. }
  34236. }
  34237. },
  34238. "required": ["sessionID", "diff"],
  34239. "additionalProperties": false
  34240. }
  34241. },
  34242. "required": ["id", "type", "properties"],
  34243. "additionalProperties": false
  34244. },
  34245. "EventSessionError": {
  34246. "type": "object",
  34247. "properties": {
  34248. "id": {
  34249. "type": "string",
  34250. "pattern": "^evt_"
  34251. },
  34252. "type": {
  34253. "type": "string",
  34254. "enum": ["session.error"]
  34255. },
  34256. "properties": {
  34257. "type": "object",
  34258. "properties": {
  34259. "sessionID": {
  34260. "type": "string",
  34261. "pattern": "^ses"
  34262. },
  34263. "error": {
  34264. "anyOf": [
  34265. {
  34266. "$ref": "#/components/schemas/ProviderAuthError"
  34267. },
  34268. {
  34269. "$ref": "#/components/schemas/UnknownError"
  34270. },
  34271. {
  34272. "$ref": "#/components/schemas/MessageOutputLengthError"
  34273. },
  34274. {
  34275. "$ref": "#/components/schemas/MessageAbortedError"
  34276. },
  34277. {
  34278. "$ref": "#/components/schemas/StructuredOutputError"
  34279. },
  34280. {
  34281. "$ref": "#/components/schemas/ContextOverflowError"
  34282. },
  34283. {
  34284. "$ref": "#/components/schemas/ContentFilterError"
  34285. },
  34286. {
  34287. "$ref": "#/components/schemas/APIError"
  34288. }
  34289. ]
  34290. }
  34291. },
  34292. "additionalProperties": false
  34293. }
  34294. },
  34295. "required": ["id", "type", "properties"],
  34296. "additionalProperties": false
  34297. },
  34298. "EventInstallationUpdated": {
  34299. "type": "object",
  34300. "properties": {
  34301. "id": {
  34302. "type": "string",
  34303. "pattern": "^evt_"
  34304. },
  34305. "type": {
  34306. "type": "string",
  34307. "enum": ["installation.updated"]
  34308. },
  34309. "properties": {
  34310. "type": "object",
  34311. "properties": {
  34312. "version": {
  34313. "type": "string"
  34314. }
  34315. },
  34316. "required": ["version"],
  34317. "additionalProperties": false
  34318. }
  34319. },
  34320. "required": ["id", "type", "properties"],
  34321. "additionalProperties": false
  34322. },
  34323. "EventInstallationUpdate-available": {
  34324. "type": "object",
  34325. "properties": {
  34326. "id": {
  34327. "type": "string",
  34328. "pattern": "^evt_"
  34329. },
  34330. "type": {
  34331. "type": "string",
  34332. "enum": ["installation.update-available"]
  34333. },
  34334. "properties": {
  34335. "type": "object",
  34336. "properties": {
  34337. "version": {
  34338. "type": "string"
  34339. }
  34340. },
  34341. "required": ["version"],
  34342. "additionalProperties": false
  34343. }
  34344. },
  34345. "required": ["id", "type", "properties"],
  34346. "additionalProperties": false
  34347. },
  34348. "EventFileEdited": {
  34349. "type": "object",
  34350. "properties": {
  34351. "id": {
  34352. "type": "string",
  34353. "pattern": "^evt_"
  34354. },
  34355. "type": {
  34356. "type": "string",
  34357. "enum": ["file.edited"]
  34358. },
  34359. "properties": {
  34360. "type": "object",
  34361. "properties": {
  34362. "file": {
  34363. "type": "string"
  34364. }
  34365. },
  34366. "required": ["file"],
  34367. "additionalProperties": false
  34368. }
  34369. },
  34370. "required": ["id", "type", "properties"],
  34371. "additionalProperties": false
  34372. },
  34373. "EventReferenceUpdated": {
  34374. "type": "object",
  34375. "properties": {
  34376. "id": {
  34377. "type": "string",
  34378. "pattern": "^evt_"
  34379. },
  34380. "type": {
  34381. "type": "string",
  34382. "enum": ["reference.updated"]
  34383. },
  34384. "properties": {
  34385. "type": "object",
  34386. "properties": {}
  34387. }
  34388. },
  34389. "required": ["id", "type", "properties"],
  34390. "additionalProperties": false
  34391. },
  34392. "EventPermissionV2Asked": {
  34393. "type": "object",
  34394. "properties": {
  34395. "id": {
  34396. "type": "string",
  34397. "pattern": "^evt_"
  34398. },
  34399. "type": {
  34400. "type": "string",
  34401. "enum": ["permission.v2.asked"]
  34402. },
  34403. "properties": {
  34404. "type": "object",
  34405. "properties": {
  34406. "id": {
  34407. "type": "string",
  34408. "pattern": "^per"
  34409. },
  34410. "sessionID": {
  34411. "type": "string",
  34412. "pattern": "^ses"
  34413. },
  34414. "action": {
  34415. "type": "string"
  34416. },
  34417. "resources": {
  34418. "type": "array",
  34419. "items": {
  34420. "type": "string"
  34421. }
  34422. },
  34423. "save": {
  34424. "type": "array",
  34425. "items": {
  34426. "type": "string"
  34427. }
  34428. },
  34429. "metadata": {
  34430. "type": "object"
  34431. },
  34432. "source": {
  34433. "$ref": "#/components/schemas/PermissionV2Source"
  34434. }
  34435. },
  34436. "required": ["id", "sessionID", "action", "resources"],
  34437. "additionalProperties": false
  34438. }
  34439. },
  34440. "required": ["id", "type", "properties"],
  34441. "additionalProperties": false
  34442. },
  34443. "EventPermissionV2Replied": {
  34444. "type": "object",
  34445. "properties": {
  34446. "id": {
  34447. "type": "string",
  34448. "pattern": "^evt_"
  34449. },
  34450. "type": {
  34451. "type": "string",
  34452. "enum": ["permission.v2.replied"]
  34453. },
  34454. "properties": {
  34455. "type": "object",
  34456. "properties": {
  34457. "sessionID": {
  34458. "type": "string",
  34459. "pattern": "^ses"
  34460. },
  34461. "requestID": {
  34462. "type": "string",
  34463. "pattern": "^per"
  34464. },
  34465. "reply": {
  34466. "$ref": "#/components/schemas/PermissionV2Reply"
  34467. }
  34468. },
  34469. "required": ["sessionID", "requestID", "reply"],
  34470. "additionalProperties": false
  34471. }
  34472. },
  34473. "required": ["id", "type", "properties"],
  34474. "additionalProperties": false
  34475. },
  34476. "EventPluginAdded": {
  34477. "type": "object",
  34478. "properties": {
  34479. "id": {
  34480. "type": "string",
  34481. "pattern": "^evt_"
  34482. },
  34483. "type": {
  34484. "type": "string",
  34485. "enum": ["plugin.added"]
  34486. },
  34487. "properties": {
  34488. "type": "object",
  34489. "properties": {
  34490. "id": {
  34491. "type": "string"
  34492. }
  34493. },
  34494. "required": ["id"],
  34495. "additionalProperties": false
  34496. }
  34497. },
  34498. "required": ["id", "type", "properties"],
  34499. "additionalProperties": false
  34500. },
  34501. "EventProjectDirectoriesUpdated": {
  34502. "type": "object",
  34503. "properties": {
  34504. "id": {
  34505. "type": "string",
  34506. "pattern": "^evt_"
  34507. },
  34508. "type": {
  34509. "type": "string",
  34510. "enum": ["project.directories.updated"]
  34511. },
  34512. "properties": {
  34513. "type": "object",
  34514. "properties": {
  34515. "projectID": {
  34516. "type": "string"
  34517. }
  34518. },
  34519. "required": ["projectID"],
  34520. "additionalProperties": false
  34521. }
  34522. },
  34523. "required": ["id", "type", "properties"],
  34524. "additionalProperties": false
  34525. },
  34526. "EventFileWatcherUpdated": {
  34527. "type": "object",
  34528. "properties": {
  34529. "id": {
  34530. "type": "string",
  34531. "pattern": "^evt_"
  34532. },
  34533. "type": {
  34534. "type": "string",
  34535. "enum": ["file.watcher.updated"]
  34536. },
  34537. "properties": {
  34538. "type": "object",
  34539. "properties": {
  34540. "file": {
  34541. "type": "string"
  34542. },
  34543. "event": {
  34544. "type": "string",
  34545. "enum": ["add", "change", "unlink"]
  34546. }
  34547. },
  34548. "required": ["file", "event"],
  34549. "additionalProperties": false
  34550. }
  34551. },
  34552. "required": ["id", "type", "properties"],
  34553. "additionalProperties": false
  34554. },
  34555. "EventPtyCreated": {
  34556. "type": "object",
  34557. "properties": {
  34558. "id": {
  34559. "type": "string",
  34560. "pattern": "^evt_"
  34561. },
  34562. "type": {
  34563. "type": "string",
  34564. "enum": ["pty.created"]
  34565. },
  34566. "properties": {
  34567. "type": "object",
  34568. "properties": {
  34569. "info": {
  34570. "$ref": "#/components/schemas/Pty"
  34571. }
  34572. },
  34573. "required": ["info"],
  34574. "additionalProperties": false
  34575. }
  34576. },
  34577. "required": ["id", "type", "properties"],
  34578. "additionalProperties": false
  34579. },
  34580. "EventPtyUpdated": {
  34581. "type": "object",
  34582. "properties": {
  34583. "id": {
  34584. "type": "string",
  34585. "pattern": "^evt_"
  34586. },
  34587. "type": {
  34588. "type": "string",
  34589. "enum": ["pty.updated"]
  34590. },
  34591. "properties": {
  34592. "type": "object",
  34593. "properties": {
  34594. "info": {
  34595. "$ref": "#/components/schemas/Pty"
  34596. }
  34597. },
  34598. "required": ["info"],
  34599. "additionalProperties": false
  34600. }
  34601. },
  34602. "required": ["id", "type", "properties"],
  34603. "additionalProperties": false
  34604. },
  34605. "EventPtyExited": {
  34606. "type": "object",
  34607. "properties": {
  34608. "id": {
  34609. "type": "string",
  34610. "pattern": "^evt_"
  34611. },
  34612. "type": {
  34613. "type": "string",
  34614. "enum": ["pty.exited"]
  34615. },
  34616. "properties": {
  34617. "type": "object",
  34618. "properties": {
  34619. "id": {
  34620. "type": "string",
  34621. "pattern": "^pty"
  34622. },
  34623. "exitCode": {
  34624. "type": "integer",
  34625. "minimum": 0
  34626. }
  34627. },
  34628. "required": ["id", "exitCode"],
  34629. "additionalProperties": false
  34630. }
  34631. },
  34632. "required": ["id", "type", "properties"],
  34633. "additionalProperties": false
  34634. },
  34635. "EventPtyDeleted": {
  34636. "type": "object",
  34637. "properties": {
  34638. "id": {
  34639. "type": "string",
  34640. "pattern": "^evt_"
  34641. },
  34642. "type": {
  34643. "type": "string",
  34644. "enum": ["pty.deleted"]
  34645. },
  34646. "properties": {
  34647. "type": "object",
  34648. "properties": {
  34649. "id": {
  34650. "type": "string",
  34651. "pattern": "^pty"
  34652. }
  34653. },
  34654. "required": ["id"],
  34655. "additionalProperties": false
  34656. }
  34657. },
  34658. "required": ["id", "type", "properties"],
  34659. "additionalProperties": false
  34660. },
  34661. "EventQuestionV2Asked": {
  34662. "type": "object",
  34663. "properties": {
  34664. "id": {
  34665. "type": "string",
  34666. "pattern": "^evt_"
  34667. },
  34668. "type": {
  34669. "type": "string",
  34670. "enum": ["question.v2.asked"]
  34671. },
  34672. "properties": {
  34673. "type": "object",
  34674. "properties": {
  34675. "id": {
  34676. "type": "string",
  34677. "pattern": "^que"
  34678. },
  34679. "sessionID": {
  34680. "type": "string",
  34681. "pattern": "^ses"
  34682. },
  34683. "questions": {
  34684. "type": "array",
  34685. "items": {
  34686. "$ref": "#/components/schemas/QuestionV2Info"
  34687. },
  34688. "description": "Questions to ask"
  34689. },
  34690. "tool": {
  34691. "$ref": "#/components/schemas/QuestionV2Tool"
  34692. }
  34693. },
  34694. "required": ["id", "sessionID", "questions"],
  34695. "additionalProperties": false
  34696. }
  34697. },
  34698. "required": ["id", "type", "properties"],
  34699. "additionalProperties": false
  34700. },
  34701. "EventQuestionV2Replied": {
  34702. "type": "object",
  34703. "properties": {
  34704. "id": {
  34705. "type": "string",
  34706. "pattern": "^evt_"
  34707. },
  34708. "type": {
  34709. "type": "string",
  34710. "enum": ["question.v2.replied"]
  34711. },
  34712. "properties": {
  34713. "type": "object",
  34714. "properties": {
  34715. "sessionID": {
  34716. "type": "string",
  34717. "pattern": "^ses"
  34718. },
  34719. "requestID": {
  34720. "type": "string",
  34721. "pattern": "^que"
  34722. },
  34723. "answers": {
  34724. "type": "array",
  34725. "items": {
  34726. "$ref": "#/components/schemas/QuestionV2Answer"
  34727. }
  34728. }
  34729. },
  34730. "required": ["sessionID", "requestID", "answers"],
  34731. "additionalProperties": false
  34732. }
  34733. },
  34734. "required": ["id", "type", "properties"],
  34735. "additionalProperties": false
  34736. },
  34737. "EventQuestionV2Rejected": {
  34738. "type": "object",
  34739. "properties": {
  34740. "id": {
  34741. "type": "string",
  34742. "pattern": "^evt_"
  34743. },
  34744. "type": {
  34745. "type": "string",
  34746. "enum": ["question.v2.rejected"]
  34747. },
  34748. "properties": {
  34749. "type": "object",
  34750. "properties": {
  34751. "sessionID": {
  34752. "type": "string",
  34753. "pattern": "^ses"
  34754. },
  34755. "requestID": {
  34756. "type": "string",
  34757. "pattern": "^que"
  34758. }
  34759. },
  34760. "required": ["sessionID", "requestID"],
  34761. "additionalProperties": false
  34762. }
  34763. },
  34764. "required": ["id", "type", "properties"],
  34765. "additionalProperties": false
  34766. },
  34767. "EventTodoUpdated": {
  34768. "type": "object",
  34769. "properties": {
  34770. "id": {
  34771. "type": "string",
  34772. "pattern": "^evt_"
  34773. },
  34774. "type": {
  34775. "type": "string",
  34776. "enum": ["todo.updated"]
  34777. },
  34778. "properties": {
  34779. "type": "object",
  34780. "properties": {
  34781. "sessionID": {
  34782. "type": "string",
  34783. "pattern": "^ses"
  34784. },
  34785. "todos": {
  34786. "type": "array",
  34787. "items": {
  34788. "$ref": "#/components/schemas/Todo"
  34789. }
  34790. }
  34791. },
  34792. "required": ["sessionID", "todos"],
  34793. "additionalProperties": false
  34794. }
  34795. },
  34796. "required": ["id", "type", "properties"],
  34797. "additionalProperties": false
  34798. },
  34799. "EventLspUpdated": {
  34800. "type": "object",
  34801. "properties": {
  34802. "id": {
  34803. "type": "string",
  34804. "pattern": "^evt_"
  34805. },
  34806. "type": {
  34807. "type": "string",
  34808. "enum": ["lsp.updated"]
  34809. },
  34810. "properties": {
  34811. "type": "object",
  34812. "properties": {}
  34813. }
  34814. },
  34815. "required": ["id", "type", "properties"],
  34816. "additionalProperties": false
  34817. },
  34818. "EventPermissionAsked": {
  34819. "type": "object",
  34820. "properties": {
  34821. "id": {
  34822. "type": "string",
  34823. "pattern": "^evt_"
  34824. },
  34825. "type": {
  34826. "type": "string",
  34827. "enum": ["permission.asked"]
  34828. },
  34829. "properties": {
  34830. "type": "object",
  34831. "properties": {
  34832. "id": {
  34833. "type": "string",
  34834. "pattern": "^per"
  34835. },
  34836. "sessionID": {
  34837. "type": "string",
  34838. "pattern": "^ses"
  34839. },
  34840. "permission": {
  34841. "type": "string"
  34842. },
  34843. "patterns": {
  34844. "type": "array",
  34845. "items": {
  34846. "type": "string"
  34847. }
  34848. },
  34849. "metadata": {
  34850. "type": "object"
  34851. },
  34852. "always": {
  34853. "type": "array",
  34854. "items": {
  34855. "type": "string"
  34856. }
  34857. },
  34858. "tool": {
  34859. "type": "object",
  34860. "properties": {
  34861. "messageID": {
  34862. "type": "string"
  34863. },
  34864. "callID": {
  34865. "type": "string"
  34866. }
  34867. },
  34868. "required": ["messageID", "callID"],
  34869. "additionalProperties": false
  34870. }
  34871. },
  34872. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  34873. "additionalProperties": false
  34874. }
  34875. },
  34876. "required": ["id", "type", "properties"],
  34877. "additionalProperties": false
  34878. },
  34879. "EventPermissionReplied": {
  34880. "type": "object",
  34881. "properties": {
  34882. "id": {
  34883. "type": "string",
  34884. "pattern": "^evt_"
  34885. },
  34886. "type": {
  34887. "type": "string",
  34888. "enum": ["permission.replied"]
  34889. },
  34890. "properties": {
  34891. "type": "object",
  34892. "properties": {
  34893. "sessionID": {
  34894. "type": "string",
  34895. "pattern": "^ses"
  34896. },
  34897. "requestID": {
  34898. "type": "string",
  34899. "pattern": "^per"
  34900. },
  34901. "reply": {
  34902. "type": "string",
  34903. "enum": ["once", "always", "reject"]
  34904. }
  34905. },
  34906. "required": ["sessionID", "requestID", "reply"],
  34907. "additionalProperties": false
  34908. }
  34909. },
  34910. "required": ["id", "type", "properties"],
  34911. "additionalProperties": false
  34912. },
  34913. "EventMcpToolsChanged": {
  34914. "type": "object",
  34915. "properties": {
  34916. "id": {
  34917. "type": "string",
  34918. "pattern": "^evt_"
  34919. },
  34920. "type": {
  34921. "type": "string",
  34922. "enum": ["mcp.tools.changed"]
  34923. },
  34924. "properties": {
  34925. "type": "object",
  34926. "properties": {
  34927. "server": {
  34928. "type": "string"
  34929. }
  34930. },
  34931. "required": ["server"],
  34932. "additionalProperties": false
  34933. }
  34934. },
  34935. "required": ["id", "type", "properties"],
  34936. "additionalProperties": false
  34937. },
  34938. "EventMcpBrowserOpenFailed": {
  34939. "type": "object",
  34940. "properties": {
  34941. "id": {
  34942. "type": "string",
  34943. "pattern": "^evt_"
  34944. },
  34945. "type": {
  34946. "type": "string",
  34947. "enum": ["mcp.browser.open.failed"]
  34948. },
  34949. "properties": {
  34950. "type": "object",
  34951. "properties": {
  34952. "mcpName": {
  34953. "type": "string"
  34954. },
  34955. "url": {
  34956. "type": "string"
  34957. }
  34958. },
  34959. "required": ["mcpName", "url"],
  34960. "additionalProperties": false
  34961. }
  34962. },
  34963. "required": ["id", "type", "properties"],
  34964. "additionalProperties": false
  34965. },
  34966. "EventCommandExecuted": {
  34967. "type": "object",
  34968. "properties": {
  34969. "id": {
  34970. "type": "string",
  34971. "pattern": "^evt_"
  34972. },
  34973. "type": {
  34974. "type": "string",
  34975. "enum": ["command.executed"]
  34976. },
  34977. "properties": {
  34978. "type": "object",
  34979. "properties": {
  34980. "name": {
  34981. "type": "string"
  34982. },
  34983. "sessionID": {
  34984. "type": "string",
  34985. "pattern": "^ses"
  34986. },
  34987. "arguments": {
  34988. "type": "string"
  34989. },
  34990. "messageID": {
  34991. "type": "string",
  34992. "pattern": "^msg"
  34993. }
  34994. },
  34995. "required": ["name", "sessionID", "arguments", "messageID"],
  34996. "additionalProperties": false
  34997. }
  34998. },
  34999. "required": ["id", "type", "properties"],
  35000. "additionalProperties": false
  35001. },
  35002. "EventProjectUpdated": {
  35003. "type": "object",
  35004. "properties": {
  35005. "id": {
  35006. "type": "string",
  35007. "pattern": "^evt_"
  35008. },
  35009. "type": {
  35010. "type": "string",
  35011. "enum": ["project.updated"]
  35012. },
  35013. "properties": {
  35014. "type": "object",
  35015. "properties": {
  35016. "id": {
  35017. "type": "string"
  35018. },
  35019. "worktree": {
  35020. "type": "string"
  35021. },
  35022. "vcs": {
  35023. "type": "string",
  35024. "enum": ["git"]
  35025. },
  35026. "name": {
  35027. "type": "string"
  35028. },
  35029. "icon": {
  35030. "type": "object",
  35031. "properties": {
  35032. "url": {
  35033. "type": "string"
  35034. },
  35035. "override": {
  35036. "type": "string"
  35037. },
  35038. "color": {
  35039. "type": "string"
  35040. }
  35041. },
  35042. "additionalProperties": false
  35043. },
  35044. "commands": {
  35045. "type": "object",
  35046. "properties": {
  35047. "start": {
  35048. "type": "string",
  35049. "description": "Startup script to run when creating a new workspace (worktree)"
  35050. }
  35051. },
  35052. "additionalProperties": false
  35053. },
  35054. "time": {
  35055. "type": "object",
  35056. "properties": {
  35057. "created": {
  35058. "type": "integer",
  35059. "minimum": 0
  35060. },
  35061. "updated": {
  35062. "type": "integer",
  35063. "minimum": 0
  35064. },
  35065. "initialized": {
  35066. "type": "integer",
  35067. "minimum": 0
  35068. }
  35069. },
  35070. "required": ["created", "updated"],
  35071. "additionalProperties": false
  35072. },
  35073. "sandboxes": {
  35074. "type": "array",
  35075. "items": {
  35076. "type": "string"
  35077. }
  35078. }
  35079. },
  35080. "required": ["id", "worktree", "time", "sandboxes"],
  35081. "additionalProperties": false
  35082. }
  35083. },
  35084. "required": ["id", "type", "properties"],
  35085. "additionalProperties": false
  35086. },
  35087. "EventSessionStatus": {
  35088. "type": "object",
  35089. "properties": {
  35090. "id": {
  35091. "type": "string",
  35092. "pattern": "^evt_"
  35093. },
  35094. "type": {
  35095. "type": "string",
  35096. "enum": ["session.status"]
  35097. },
  35098. "properties": {
  35099. "type": "object",
  35100. "properties": {
  35101. "sessionID": {
  35102. "type": "string",
  35103. "pattern": "^ses"
  35104. },
  35105. "status": {
  35106. "$ref": "#/components/schemas/SessionStatus"
  35107. }
  35108. },
  35109. "required": ["sessionID", "status"],
  35110. "additionalProperties": false
  35111. }
  35112. },
  35113. "required": ["id", "type", "properties"],
  35114. "additionalProperties": false
  35115. },
  35116. "EventSessionIdle": {
  35117. "type": "object",
  35118. "properties": {
  35119. "id": {
  35120. "type": "string",
  35121. "pattern": "^evt_"
  35122. },
  35123. "type": {
  35124. "type": "string",
  35125. "enum": ["session.idle"]
  35126. },
  35127. "properties": {
  35128. "type": "object",
  35129. "properties": {
  35130. "sessionID": {
  35131. "type": "string",
  35132. "pattern": "^ses"
  35133. }
  35134. },
  35135. "required": ["sessionID"],
  35136. "additionalProperties": false
  35137. }
  35138. },
  35139. "required": ["id", "type", "properties"],
  35140. "additionalProperties": false
  35141. },
  35142. "EventQuestionAsked": {
  35143. "type": "object",
  35144. "properties": {
  35145. "id": {
  35146. "type": "string",
  35147. "pattern": "^evt_"
  35148. },
  35149. "type": {
  35150. "type": "string",
  35151. "enum": ["question.asked"]
  35152. },
  35153. "properties": {
  35154. "type": "object",
  35155. "properties": {
  35156. "id": {
  35157. "type": "string",
  35158. "pattern": "^que"
  35159. },
  35160. "sessionID": {
  35161. "type": "string",
  35162. "pattern": "^ses"
  35163. },
  35164. "questions": {
  35165. "type": "array",
  35166. "items": {
  35167. "$ref": "#/components/schemas/QuestionInfo"
  35168. },
  35169. "description": "Questions to ask"
  35170. },
  35171. "tool": {
  35172. "$ref": "#/components/schemas/QuestionTool"
  35173. }
  35174. },
  35175. "required": ["id", "sessionID", "questions"],
  35176. "additionalProperties": false
  35177. }
  35178. },
  35179. "required": ["id", "type", "properties"],
  35180. "additionalProperties": false
  35181. },
  35182. "EventQuestionReplied": {
  35183. "type": "object",
  35184. "properties": {
  35185. "id": {
  35186. "type": "string",
  35187. "pattern": "^evt_"
  35188. },
  35189. "type": {
  35190. "type": "string",
  35191. "enum": ["question.replied"]
  35192. },
  35193. "properties": {
  35194. "type": "object",
  35195. "properties": {
  35196. "sessionID": {
  35197. "type": "string",
  35198. "pattern": "^ses"
  35199. },
  35200. "requestID": {
  35201. "type": "string",
  35202. "pattern": "^que"
  35203. },
  35204. "answers": {
  35205. "type": "array",
  35206. "items": {
  35207. "$ref": "#/components/schemas/QuestionAnswer"
  35208. }
  35209. }
  35210. },
  35211. "required": ["sessionID", "requestID", "answers"],
  35212. "additionalProperties": false
  35213. }
  35214. },
  35215. "required": ["id", "type", "properties"],
  35216. "additionalProperties": false
  35217. },
  35218. "EventQuestionRejected": {
  35219. "type": "object",
  35220. "properties": {
  35221. "id": {
  35222. "type": "string",
  35223. "pattern": "^evt_"
  35224. },
  35225. "type": {
  35226. "type": "string",
  35227. "enum": ["question.rejected"]
  35228. },
  35229. "properties": {
  35230. "type": "object",
  35231. "properties": {
  35232. "sessionID": {
  35233. "type": "string",
  35234. "pattern": "^ses"
  35235. },
  35236. "requestID": {
  35237. "type": "string",
  35238. "pattern": "^que"
  35239. }
  35240. },
  35241. "required": ["sessionID", "requestID"],
  35242. "additionalProperties": false
  35243. }
  35244. },
  35245. "required": ["id", "type", "properties"],
  35246. "additionalProperties": false
  35247. },
  35248. "EventSessionCompacted": {
  35249. "type": "object",
  35250. "properties": {
  35251. "id": {
  35252. "type": "string",
  35253. "pattern": "^evt_"
  35254. },
  35255. "type": {
  35256. "type": "string",
  35257. "enum": ["session.compacted"]
  35258. },
  35259. "properties": {
  35260. "type": "object",
  35261. "properties": {
  35262. "sessionID": {
  35263. "type": "string",
  35264. "pattern": "^ses"
  35265. }
  35266. },
  35267. "required": ["sessionID"],
  35268. "additionalProperties": false
  35269. }
  35270. },
  35271. "required": ["id", "type", "properties"],
  35272. "additionalProperties": false
  35273. },
  35274. "EventVcsBranchUpdated": {
  35275. "type": "object",
  35276. "properties": {
  35277. "id": {
  35278. "type": "string",
  35279. "pattern": "^evt_"
  35280. },
  35281. "type": {
  35282. "type": "string",
  35283. "enum": ["vcs.branch.updated"]
  35284. },
  35285. "properties": {
  35286. "type": "object",
  35287. "properties": {
  35288. "branch": {
  35289. "type": "string"
  35290. }
  35291. },
  35292. "additionalProperties": false
  35293. }
  35294. },
  35295. "required": ["id", "type", "properties"],
  35296. "additionalProperties": false
  35297. },
  35298. "EventWorkspaceReady": {
  35299. "type": "object",
  35300. "properties": {
  35301. "id": {
  35302. "type": "string",
  35303. "pattern": "^evt_"
  35304. },
  35305. "type": {
  35306. "type": "string",
  35307. "enum": ["workspace.ready"]
  35308. },
  35309. "properties": {
  35310. "type": "object",
  35311. "properties": {
  35312. "name": {
  35313. "type": "string"
  35314. }
  35315. },
  35316. "required": ["name"],
  35317. "additionalProperties": false
  35318. }
  35319. },
  35320. "required": ["id", "type", "properties"],
  35321. "additionalProperties": false
  35322. },
  35323. "EventWorkspaceFailed": {
  35324. "type": "object",
  35325. "properties": {
  35326. "id": {
  35327. "type": "string",
  35328. "pattern": "^evt_"
  35329. },
  35330. "type": {
  35331. "type": "string",
  35332. "enum": ["workspace.failed"]
  35333. },
  35334. "properties": {
  35335. "type": "object",
  35336. "properties": {
  35337. "message": {
  35338. "type": "string"
  35339. }
  35340. },
  35341. "required": ["message"],
  35342. "additionalProperties": false
  35343. }
  35344. },
  35345. "required": ["id", "type", "properties"],
  35346. "additionalProperties": false
  35347. },
  35348. "EventWorkspaceStatus": {
  35349. "type": "object",
  35350. "properties": {
  35351. "id": {
  35352. "type": "string",
  35353. "pattern": "^evt_"
  35354. },
  35355. "type": {
  35356. "type": "string",
  35357. "enum": ["workspace.status"]
  35358. },
  35359. "properties": {
  35360. "type": "object",
  35361. "properties": {
  35362. "workspaceID": {
  35363. "type": "string",
  35364. "pattern": "^wrk"
  35365. },
  35366. "status": {
  35367. "type": "string",
  35368. "enum": ["connected", "connecting", "disconnected", "error"]
  35369. }
  35370. },
  35371. "required": ["workspaceID", "status"],
  35372. "additionalProperties": false
  35373. }
  35374. },
  35375. "required": ["id", "type", "properties"],
  35376. "additionalProperties": false
  35377. },
  35378. "EventWorktreeReady": {
  35379. "type": "object",
  35380. "properties": {
  35381. "id": {
  35382. "type": "string",
  35383. "pattern": "^evt_"
  35384. },
  35385. "type": {
  35386. "type": "string",
  35387. "enum": ["worktree.ready"]
  35388. },
  35389. "properties": {
  35390. "type": "object",
  35391. "properties": {
  35392. "name": {
  35393. "type": "string"
  35394. },
  35395. "branch": {
  35396. "type": "string"
  35397. }
  35398. },
  35399. "required": ["name"],
  35400. "additionalProperties": false
  35401. }
  35402. },
  35403. "required": ["id", "type", "properties"],
  35404. "additionalProperties": false
  35405. },
  35406. "EventWorktreeFailed": {
  35407. "type": "object",
  35408. "properties": {
  35409. "id": {
  35410. "type": "string",
  35411. "pattern": "^evt_"
  35412. },
  35413. "type": {
  35414. "type": "string",
  35415. "enum": ["worktree.failed"]
  35416. },
  35417. "properties": {
  35418. "type": "object",
  35419. "properties": {
  35420. "message": {
  35421. "type": "string"
  35422. }
  35423. },
  35424. "required": ["message"],
  35425. "additionalProperties": false
  35426. }
  35427. },
  35428. "required": ["id", "type", "properties"],
  35429. "additionalProperties": false
  35430. },
  35431. "EventServerConnected": {
  35432. "type": "object",
  35433. "properties": {
  35434. "id": {
  35435. "type": "string",
  35436. "pattern": "^evt_"
  35437. },
  35438. "type": {
  35439. "type": "string",
  35440. "enum": ["server.connected"]
  35441. },
  35442. "properties": {
  35443. "type": "object",
  35444. "properties": {}
  35445. }
  35446. },
  35447. "required": ["id", "type", "properties"],
  35448. "additionalProperties": false
  35449. },
  35450. "EventGlobalDisposed": {
  35451. "type": "object",
  35452. "properties": {
  35453. "id": {
  35454. "type": "string",
  35455. "pattern": "^evt_"
  35456. },
  35457. "type": {
  35458. "type": "string",
  35459. "enum": ["global.disposed"]
  35460. },
  35461. "properties": {
  35462. "type": "object",
  35463. "properties": {}
  35464. }
  35465. },
  35466. "required": ["id", "type", "properties"],
  35467. "additionalProperties": false
  35468. },
  35469. "BadRequestError": {
  35470. "type": "object",
  35471. "required": ["name", "data"],
  35472. "properties": {
  35473. "name": {
  35474. "type": "string",
  35475. "enum": ["BadRequest"]
  35476. },
  35477. "data": {
  35478. "type": "object",
  35479. "required": ["message"],
  35480. "properties": {
  35481. "message": {
  35482. "type": "string"
  35483. },
  35484. "kind": {
  35485. "type": "string",
  35486. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  35487. }
  35488. }
  35489. }
  35490. }
  35491. }
  35492. }
  35493. },
  35494. "security": [],
  35495. "tags": [
  35496. {
  35497. "name": "control",
  35498. "description": "Control plane routes."
  35499. },
  35500. {
  35501. "name": "controlPlane",
  35502. "description": "Control-plane orchestration routes."
  35503. },
  35504. {
  35505. "name": "global",
  35506. "description": "Global server routes."
  35507. },
  35508. {
  35509. "name": "event",
  35510. "description": "Instance event stream route."
  35511. },
  35512. {
  35513. "name": "config",
  35514. "description": "Experimental HttpApi config routes."
  35515. },
  35516. {
  35517. "name": "experimental",
  35518. "description": "Experimental HttpApi read-only routes."
  35519. },
  35520. {
  35521. "name": "file",
  35522. "description": "Experimental HttpApi file routes."
  35523. },
  35524. {
  35525. "name": "instance",
  35526. "description": "Experimental HttpApi instance read routes."
  35527. },
  35528. {
  35529. "name": "mcp",
  35530. "description": "Experimental HttpApi MCP routes."
  35531. },
  35532. {
  35533. "name": "project",
  35534. "description": "Experimental HttpApi project routes."
  35535. },
  35536. {
  35537. "name": "projectCopy",
  35538. "description": "Project copy naming routes."
  35539. },
  35540. {
  35541. "name": "pty",
  35542. "description": "Experimental HttpApi PTY routes."
  35543. },
  35544. {
  35545. "name": "question",
  35546. "description": "Question routes."
  35547. },
  35548. {
  35549. "name": "permission",
  35550. "description": "Experimental HttpApi permission routes."
  35551. },
  35552. {
  35553. "name": "provider",
  35554. "description": "Experimental HttpApi provider routes."
  35555. },
  35556. {
  35557. "name": "session",
  35558. "description": "Experimental HttpApi session routes."
  35559. },
  35560. {
  35561. "name": "sync",
  35562. "description": "Experimental HttpApi sync routes."
  35563. },
  35564. {
  35565. "name": "tui",
  35566. "description": "Experimental HttpApi TUI routes."
  35567. },
  35568. {
  35569. "name": "workspace",
  35570. "description": "Experimental HttpApi workspace routes."
  35571. },
  35572. {
  35573. "name": "opencode HttpApi",
  35574. "description": "Experimental HttpApi surface for selected instance routes."
  35575. },
  35576. {
  35577. "name": "opencode HttpApi",
  35578. "description": "Experimental HttpApi surface for selected instance routes."
  35579. },
  35580. {
  35581. "name": "opencode HttpApi",
  35582. "description": "Experimental HttpApi surface for selected instance routes."
  35583. },
  35584. {
  35585. "name": "sessions",
  35586. "description": "Experimental session routes."
  35587. },
  35588. {
  35589. "name": "messages",
  35590. "description": "Experimental message routes."
  35591. },
  35592. {
  35593. "name": "models",
  35594. "description": "Experimental model routes."
  35595. },
  35596. {
  35597. "name": "providers",
  35598. "description": "Experimental provider routes."
  35599. },
  35600. {
  35601. "name": "integrations",
  35602. "description": "Integration discovery and authentication routes."
  35603. },
  35604. {
  35605. "name": "opencode HttpApi",
  35606. "description": "Experimental HttpApi surface for selected instance routes."
  35607. },
  35608. {
  35609. "name": "permissions",
  35610. "description": "Experimental permission routes."
  35611. },
  35612. {
  35613. "name": "filesystem",
  35614. "description": "Experimental location-scoped filesystem routes."
  35615. },
  35616. {
  35617. "name": "commands",
  35618. "description": "Experimental command routes."
  35619. },
  35620. {
  35621. "name": "skills",
  35622. "description": "Experimental skill routes."
  35623. },
  35624. {
  35625. "name": "events",
  35626. "description": "Experimental event stream route."
  35627. },
  35628. {
  35629. "name": "pty",
  35630. "description": "Experimental location-scoped PTY routes."
  35631. },
  35632. {
  35633. "name": "session questions",
  35634. "description": "Experimental session question routes."
  35635. },
  35636. {
  35637. "name": "reference",
  35638. "description": "Location-scoped project references."
  35639. },
  35640. {
  35641. "name": "projectCopy",
  35642. "description": "Project copy management routes."
  35643. },
  35644. {
  35645. "name": "pty",
  35646. "description": "PTY websocket route."
  35647. }
  35648. ]
  35649. }