openapi.json 1016 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132251332513425135251362513725138251392514025141251422514325144251452514625147251482514925150251512515225153251542515525156251572515825159251602516125162251632516425165251662516725168251692517025171251722517325174251752517625177251782517925180251812518225183251842518525186251872518825189251902519125192251932519425195251962519725198251992520025201252022520325204252052520625207252082520925210252112521225213252142521525216252172521825219252202522125222252232522425225252262522725228252292523025231252322523325234252352523625237252382523925240252412524225243252442524525246252472524825249252502525125252252532525425255252562525725258252592526025261252622526325264252652526625267252682526925270252712527225273252742527525276252772527825279252802528125282252832528425285252862528725288252892529025291252922529325294252952529625297252982529925300253012530225303253042530525306253072530825309253102531125312253132531425315253162531725318253192532025321253222532325324253252532625327253282532925330253312533225333253342533525336253372533825339253402534125342253432534425345253462534725348253492535025351253522535325354253552535625357253582535925360253612536225363253642536525366253672536825369253702537125372253732537425375253762537725378253792538025381253822538325384253852538625387253882538925390253912539225393253942539525396253972539825399254002540125402254032540425405254062540725408254092541025411254122541325414254152541625417254182541925420254212542225423254242542525426254272542825429254302543125432254332543425435254362543725438254392544025441254422544325444254452544625447254482544925450254512545225453254542545525456254572545825459254602546125462254632546425465254662546725468254692547025471254722547325474254752547625477254782547925480254812548225483254842548525486254872548825489254902549125492254932549425495254962549725498254992550025501255022550325504255052550625507255082550925510255112551225513255142551525516255172551825519255202552125522255232552425525255262552725528255292553025531255322553325534255352553625537255382553925540255412554225543255442554525546255472554825549255502555125552255532555425555255562555725558255592556025561255622556325564255652556625567255682556925570255712557225573255742557525576255772557825579255802558125582255832558425585255862558725588255892559025591255922559325594255952559625597255982559925600256012560225603256042560525606256072560825609256102561125612256132561425615256162561725618256192562025621256222562325624256252562625627256282562925630256312563225633256342563525636256372563825639256402564125642256432564425645256462564725648256492565025651256522565325654256552565625657256582565925660256612566225663256642566525666256672566825669256702567125672256732567425675256762567725678256792568025681256822568325684256852568625687256882568925690256912569225693256942569525696256972569825699257002570125702257032570425705257062570725708257092571025711257122571325714257152571625717257182571925720257212572225723257242572525726257272572825729257302573125732257332573425735257362573725738257392574025741257422574325744257452574625747257482574925750257512575225753257542575525756257572575825759257602576125762257632576425765257662576725768257692577025771257722577325774257752577625777257782577925780257812578225783257842578525786257872578825789257902579125792257932579425795257962579725798257992580025801258022580325804258052580625807258082580925810258112581225813258142581525816258172581825819258202582125822258232582425825258262582725828258292583025831258322583325834258352583625837258382583925840258412584225843258442584525846258472584825849258502585125852258532585425855258562585725858258592586025861258622586325864258652586625867258682586925870258712587225873258742587525876258772587825879258802588125882258832588425885258862588725888258892589025891258922589325894258952589625897258982589925900259012590225903259042590525906259072590825909259102591125912259132591425915259162591725918259192592025921259222592325924259252592625927259282592925930259312593225933259342593525936259372593825939259402594125942259432594425945259462594725948259492595025951259522595325954259552595625957259582595925960259612596225963259642596525966259672596825969259702597125972259732597425975259762597725978259792598025981259822598325984259852598625987259882598925990259912599225993259942599525996259972599825999260002600126002260032600426005260062600726008260092601026011260122601326014260152601626017260182601926020260212602226023260242602526026260272602826029260302603126032260332603426035260362603726038260392604026041260422604326044260452604626047260482604926050260512605226053260542605526056260572605826059260602606126062260632606426065260662606726068260692607026071260722607326074260752607626077260782607926080260812608226083260842608526086260872608826089260902609126092260932609426095260962609726098260992610026101261022610326104261052610626107261082610926110261112611226113261142611526116261172611826119261202612126122261232612426125261262612726128261292613026131261322613326134261352613626137261382613926140261412614226143261442614526146261472614826149261502615126152261532615426155261562615726158261592616026161261622616326164261652616626167261682616926170261712617226173261742617526176261772617826179261802618126182261832618426185261862618726188261892619026191261922619326194261952619626197261982619926200262012620226203262042620526206262072620826209262102621126212262132621426215262162621726218262192622026221262222622326224262252622626227262282622926230262312623226233262342623526236262372623826239262402624126242262432624426245262462624726248262492625026251262522625326254262552625626257262582625926260262612626226263262642626526266262672626826269262702627126272262732627426275262762627726278262792628026281262822628326284262852628626287262882628926290262912629226293262942629526296262972629826299263002630126302263032630426305263062630726308263092631026311263122631326314263152631626317263182631926320263212632226323263242632526326263272632826329263302633126332263332633426335263362633726338263392634026341263422634326344263452634626347263482634926350263512635226353263542635526356263572635826359263602636126362263632636426365263662636726368263692637026371263722637326374263752637626377263782637926380263812638226383263842638526386263872638826389263902639126392263932639426395263962639726398263992640026401264022640326404264052640626407264082640926410264112641226413264142641526416264172641826419264202642126422264232642426425264262642726428264292643026431264322643326434264352643626437264382643926440264412644226443264442644526446264472644826449264502645126452264532645426455264562645726458264592646026461264622646326464264652646626467264682646926470264712647226473264742647526476264772647826479264802648126482264832648426485264862648726488264892649026491264922649326494264952649626497264982649926500265012650226503265042650526506265072650826509265102651126512265132651426515265162651726518265192652026521265222652326524265252652626527265282652926530265312653226533265342653526536265372653826539265402654126542265432654426545265462654726548265492655026551265522655326554265552655626557265582655926560265612656226563265642656526566265672656826569265702657126572265732657426575265762657726578265792658026581265822658326584265852658626587265882658926590265912659226593265942659526596265972659826599266002660126602266032660426605266062660726608266092661026611266122661326614266152661626617266182661926620266212662226623266242662526626266272662826629266302663126632266332663426635266362663726638266392664026641266422664326644266452664626647266482664926650266512665226653266542665526656266572665826659266602666126662266632666426665266662666726668266692667026671266722667326674266752667626677266782667926680266812668226683266842668526686266872668826689266902669126692266932669426695266962669726698266992670026701267022670326704267052670626707267082670926710267112671226713267142671526716267172671826719267202672126722267232672426725267262672726728267292673026731267322673326734267352673626737267382673926740267412674226743267442674526746267472674826749267502675126752267532675426755267562675726758267592676026761267622676326764267652676626767267682676926770267712677226773267742677526776267772677826779267802678126782267832678426785267862678726788267892679026791267922679326794267952679626797267982679926800268012680226803268042680526806268072680826809268102681126812268132681426815268162681726818268192682026821268222682326824268252682626827268282682926830268312683226833268342683526836268372683826839268402684126842268432684426845268462684726848268492685026851268522685326854268552685626857268582685926860268612686226863268642686526866268672686826869268702687126872268732687426875268762687726878268792688026881268822688326884268852688626887268882688926890268912689226893268942689526896268972689826899269002690126902269032690426905269062690726908269092691026911269122691326914269152691626917269182691926920269212692226923269242692526926269272692826929269302693126932269332693426935269362693726938269392694026941269422694326944269452694626947269482694926950269512695226953269542695526956269572695826959269602696126962269632696426965269662696726968269692697026971269722697326974269752697626977269782697926980269812698226983269842698526986269872698826989269902699126992269932699426995269962699726998269992700027001270022700327004270052700627007270082700927010270112701227013270142701527016270172701827019270202702127022270232702427025270262702727028270292703027031270322703327034270352703627037270382703927040270412704227043270442704527046270472704827049270502705127052270532705427055270562705727058270592706027061270622706327064270652706627067270682706927070270712707227073270742707527076270772707827079270802708127082270832708427085270862708727088270892709027091270922709327094270952709627097270982709927100271012710227103271042710527106271072710827109271102711127112271132711427115271162711727118271192712027121271222712327124271252712627127271282712927130271312713227133271342713527136271372713827139271402714127142271432714427145271462714727148271492715027151271522715327154271552715627157271582715927160271612716227163271642716527166271672716827169271702717127172271732717427175271762717727178271792718027181271822718327184271852718627187271882718927190271912719227193271942719527196271972719827199272002720127202272032720427205272062720727208272092721027211272122721327214272152721627217272182721927220272212722227223272242722527226272272722827229272302723127232272332723427235272362723727238272392724027241272422724327244272452724627247272482724927250272512725227253272542725527256272572725827259272602726127262272632726427265272662726727268272692727027271272722727327274272752727627277272782727927280272812728227283272842728527286272872728827289272902729127292272932729427295272962729727298272992730027301273022730327304273052730627307273082730927310273112731227313273142731527316273172731827319273202732127322273232732427325273262732727328273292733027331273322733327334273352733627337273382733927340273412734227343273442734527346273472734827349273502735127352273532735427355273562735727358273592736027361273622736327364273652736627367273682736927370273712737227373273742737527376273772737827379273802738127382273832738427385273862738727388273892739027391273922739327394273952739627397273982739927400274012740227403274042740527406274072740827409274102741127412274132741427415274162741727418274192742027421274222742327424274252742627427274282742927430274312743227433274342743527436274372743827439274402744127442274432744427445274462744727448274492745027451274522745327454274552745627457274582745927460274612746227463274642746527466274672746827469274702747127472274732747427475274762747727478274792748027481274822748327484274852748627487274882748927490274912749227493274942749527496274972749827499275002750127502275032750427505275062750727508275092751027511275122751327514275152751627517275182751927520275212752227523275242752527526275272752827529275302753127532275332753427535275362753727538275392754027541275422754327544275452754627547275482754927550275512755227553275542755527556275572755827559275602756127562275632756427565275662756727568275692757027571275722757327574275752757627577275782757927580275812758227583275842758527586275872758827589275902759127592275932759427595275962759727598275992760027601276022760327604276052760627607276082760927610276112761227613276142761527616276172761827619276202762127622276232762427625276262762727628276292763027631276322763327634276352763627637276382763927640276412764227643276442764527646276472764827649276502765127652276532765427655276562765727658276592766027661276622766327664276652766627667276682766927670276712767227673276742767527676276772767827679276802768127682276832768427685276862768727688276892769027691276922769327694276952769627697276982769927700277012770227703277042770527706277072770827709277102771127712277132771427715277162771727718277192772027721277222772327724277252772627727277282772927730277312773227733277342773527736277372773827739277402774127742277432774427745277462774727748277492775027751277522775327754277552775627757277582775927760277612776227763277642776527766277672776827769277702777127772277732777427775277762777727778277792778027781277822778327784277852778627787277882778927790277912779227793277942779527796277972779827799278002780127802278032780427805278062780727808278092781027811278122781327814278152781627817278182781927820278212782227823278242782527826278272782827829278302783127832278332783427835278362783727838278392784027841278422784327844278452784627847278482784927850278512785227853278542785527856278572785827859278602786127862278632786427865278662786727868278692787027871278722787327874278752787627877278782787927880278812788227883278842788527886278872788827889278902789127892278932789427895278962789727898278992790027901279022790327904279052790627907279082790927910279112791227913279142791527916279172791827919279202792127922279232792427925279262792727928279292793027931279322793327934279352793627937279382793927940279412794227943279442794527946279472794827949279502795127952279532795427955279562795727958279592796027961279622796327964279652796627967279682796927970279712797227973279742797527976279772797827979279802798127982279832798427985279862798727988279892799027991279922799327994279952799627997279982799928000280012800228003280042800528006280072800828009280102801128012280132801428015280162801728018280192802028021280222802328024280252802628027280282802928030280312803228033280342803528036280372803828039280402804128042280432804428045280462804728048280492805028051280522805328054280552805628057280582805928060280612806228063280642806528066280672806828069280702807128072280732807428075280762807728078280792808028081280822808328084280852808628087280882808928090280912809228093280942809528096280972809828099281002810128102281032810428105281062810728108281092811028111281122811328114281152811628117281182811928120281212812228123281242812528126281272812828129281302813128132281332813428135281362813728138281392814028141281422814328144281452814628147281482814928150281512815228153281542815528156281572815828159281602816128162281632816428165281662816728168281692817028171281722817328174281752817628177281782817928180281812818228183281842818528186281872818828189281902819128192281932819428195281962819728198281992820028201282022820328204282052820628207282082820928210282112821228213282142821528216282172821828219282202822128222282232822428225282262822728228282292823028231282322823328234282352823628237282382823928240282412824228243282442824528246282472824828249282502825128252282532825428255282562825728258282592826028261282622826328264282652826628267282682826928270282712827228273282742827528276282772827828279282802828128282282832828428285282862828728288282892829028291282922829328294282952829628297282982829928300283012830228303283042830528306283072830828309283102831128312283132831428315283162831728318283192832028321283222832328324283252832628327283282832928330283312833228333283342833528336283372833828339283402834128342283432834428345283462834728348283492835028351283522835328354283552835628357283582835928360283612836228363283642836528366283672836828369283702837128372283732837428375283762837728378283792838028381283822838328384283852838628387283882838928390283912839228393283942839528396283972839828399284002840128402284032840428405284062840728408284092841028411284122841328414284152841628417284182841928420284212842228423284242842528426284272842828429284302843128432284332843428435284362843728438284392844028441284422844328444284452844628447284482844928450284512845228453284542845528456284572845828459284602846128462284632846428465284662846728468284692847028471284722847328474284752847628477284782847928480284812848228483284842848528486284872848828489284902849128492284932849428495284962849728498284992850028501285022850328504285052850628507285082850928510285112851228513285142851528516285172851828519285202852128522285232852428525285262852728528285292853028531285322853328534285352853628537285382853928540285412854228543285442854528546285472854828549285502855128552285532855428555285562855728558285592856028561285622856328564285652856628567285682856928570285712857228573285742857528576285772857828579285802858128582285832858428585285862858728588285892859028591285922859328594285952859628597285982859928600286012860228603286042860528606286072860828609286102861128612286132861428615286162861728618286192862028621286222862328624286252862628627286282862928630286312863228633286342863528636286372863828639286402864128642286432864428645286462864728648286492865028651286522865328654286552865628657286582865928660286612866228663286642866528666286672866828669286702867128672286732867428675286762867728678286792868028681286822868328684286852868628687286882868928690286912869228693286942869528696286972869828699287002870128702287032870428705287062870728708287092871028711287122871328714287152871628717287182871928720287212872228723287242872528726287272872828729287302873128732287332873428735287362873728738287392874028741287422874328744287452874628747287482874928750287512875228753287542875528756287572875828759287602876128762287632876428765287662876728768287692877028771287722877328774287752877628777287782877928780287812878228783287842878528786287872878828789287902879128792287932879428795287962879728798287992880028801288022880328804288052880628807288082880928810288112881228813288142881528816288172881828819288202882128822288232882428825288262882728828288292883028831288322883328834288352883628837288382883928840288412884228843288442884528846288472884828849288502885128852288532885428855288562885728858288592886028861288622886328864288652886628867288682886928870288712887228873288742887528876288772887828879288802888128882288832888428885288862888728888288892889028891288922889328894288952889628897288982889928900289012890228903289042890528906289072890828909289102891128912289132891428915289162891728918289192892028921289222892328924289252892628927289282892928930289312893228933289342893528936289372893828939289402894128942289432894428945289462894728948289492895028951289522895328954289552895628957289582895928960289612896228963289642896528966289672896828969289702897128972289732897428975289762897728978289792898028981289822898328984289852898628987289882898928990289912899228993289942899528996289972899828999290002900129002290032900429005290062900729008290092901029011290122901329014290152901629017290182901929020290212902229023290242902529026290272902829029290302903129032290332903429035290362903729038290392904029041290422904329044290452904629047290482904929050290512905229053290542905529056290572905829059290602906129062290632906429065290662906729068290692907029071290722907329074290752907629077290782907929080290812908229083290842908529086290872908829089290902909129092290932909429095290962909729098290992910029101291022910329104291052910629107291082910929110291112911229113291142911529116291172911829119291202912129122291232912429125291262912729128291292913029131291322913329134291352913629137291382913929140291412914229143291442914529146291472914829149291502915129152291532915429155291562915729158291592916029161291622916329164291652916629167291682916929170291712917229173291742917529176291772917829179291802918129182291832918429185291862918729188291892919029191291922919329194291952919629197291982919929200292012920229203292042920529206292072920829209292102921129212292132921429215292162921729218292192922029221292222922329224292252922629227292282922929230292312923229233292342923529236292372923829239292402924129242292432924429245292462924729248292492925029251292522925329254292552925629257292582925929260292612926229263292642926529266292672926829269292702927129272292732927429275292762927729278292792928029281292822928329284292852928629287292882928929290292912929229293292942929529296292972929829299293002930129302293032930429305293062930729308293092931029311293122931329314293152931629317293182931929320293212932229323293242932529326293272932829329293302933129332293332933429335293362933729338293392934029341293422934329344293452934629347293482934929350293512935229353293542935529356293572935829359293602936129362293632936429365293662936729368293692937029371293722937329374293752937629377293782937929380293812938229383293842938529386293872938829389293902939129392293932939429395293962939729398293992940029401294022940329404294052940629407294082940929410294112941229413294142941529416294172941829419294202942129422294232942429425294262942729428294292943029431294322943329434294352943629437294382943929440294412944229443294442944529446294472944829449294502945129452294532945429455294562945729458294592946029461294622946329464294652946629467294682946929470294712947229473294742947529476294772947829479294802948129482294832948429485294862948729488294892949029491294922949329494294952949629497294982949929500295012950229503295042950529506295072950829509295102951129512295132951429515295162951729518295192952029521295222952329524295252952629527295282952929530295312953229533295342953529536295372953829539295402954129542295432954429545295462954729548295492955029551295522955329554295552955629557295582955929560295612956229563295642956529566295672956829569295702957129572295732957429575295762957729578295792958029581295822958329584295852958629587295882958929590295912959229593295942959529596295972959829599296002960129602296032960429605296062960729608296092961029611296122961329614296152961629617296182961929620296212962229623296242962529626296272962829629296302963129632296332963429635296362963729638296392964029641296422964329644296452964629647296482964929650296512965229653296542965529656296572965829659296602966129662296632966429665296662966729668296692967029671296722967329674296752967629677296782967929680296812968229683296842968529686296872968829689296902969129692296932969429695296962969729698296992970029701297022970329704297052970629707297082970929710297112971229713297142971529716297172971829719297202972129722297232972429725297262972729728297292973029731297322973329734297352973629737297382973929740297412974229743297442974529746297472974829749297502975129752297532975429755297562975729758297592976029761297622976329764297652976629767297682976929770297712977229773297742977529776297772977829779297802978129782297832978429785297862978729788297892979029791297922979329794297952979629797297982979929800298012980229803298042980529806298072980829809298102981129812298132981429815298162981729818298192982029821298222982329824298252982629827298282982929830298312983229833298342983529836298372983829839298402984129842298432984429845298462984729848298492985029851298522985329854298552985629857298582985929860298612986229863298642986529866298672986829869298702987129872298732987429875298762987729878298792988029881298822988329884298852988629887298882988929890298912989229893298942989529896298972989829899299002990129902299032990429905299062990729908299092991029911299122991329914299152991629917299182991929920299212992229923299242992529926299272992829929299302993129932299332993429935299362993729938299392994029941299422994329944299452994629947299482994929950299512995229953299542995529956299572995829959299602996129962299632996429965299662996729968299692997029971299722997329974299752997629977299782997929980299812998229983299842998529986299872998829989299902999129992299932999429995299962999729998299993000030001300023000330004300053000630007300083000930010300113001230013300143001530016300173001830019300203002130022300233002430025300263002730028300293003030031300323003330034300353003630037300383003930040300413004230043300443004530046300473004830049300503005130052300533005430055300563005730058300593006030061300623006330064300653006630067300683006930070300713007230073300743007530076300773007830079300803008130082300833008430085300863008730088300893009030091300923009330094300953009630097300983009930100301013010230103301043010530106301073010830109301103011130112301133011430115301163011730118301193012030121301223012330124301253012630127301283012930130301313013230133301343013530136301373013830139301403014130142301433014430145301463014730148301493015030151301523015330154301553015630157301583015930160301613016230163301643016530166301673016830169301703017130172301733017430175301763017730178301793018030181301823018330184301853018630187301883018930190301913019230193301943019530196301973019830199302003020130202302033020430205302063020730208302093021030211302123021330214302153021630217302183021930220302213022230223302243022530226302273022830229302303023130232302333023430235302363023730238302393024030241302423024330244302453024630247302483024930250302513025230253302543025530256302573025830259302603026130262302633026430265302663026730268302693027030271302723027330274302753027630277302783027930280302813028230283302843028530286302873028830289302903029130292302933029430295302963029730298302993030030301303023030330304303053030630307303083030930310303113031230313303143031530316303173031830319303203032130322303233032430325303263032730328303293033030331303323033330334303353033630337303383033930340303413034230343303443034530346303473034830349303503035130352303533035430355303563035730358303593036030361303623036330364303653036630367303683036930370303713037230373303743037530376303773037830379303803038130382303833038430385303863038730388303893039030391303923039330394303953039630397303983039930400304013040230403304043040530406304073040830409304103041130412304133041430415304163041730418304193042030421304223042330424304253042630427304283042930430304313043230433304343043530436304373043830439304403044130442304433044430445304463044730448304493045030451304523045330454304553045630457304583045930460304613046230463304643046530466304673046830469304703047130472304733047430475304763047730478304793048030481304823048330484304853048630487304883048930490304913049230493304943049530496304973049830499305003050130502305033050430505305063050730508305093051030511305123051330514305153051630517305183051930520305213052230523305243052530526305273052830529305303053130532305333053430535305363053730538305393054030541305423054330544305453054630547305483054930550305513055230553305543055530556305573055830559305603056130562305633056430565305663056730568305693057030571305723057330574305753057630577305783057930580305813058230583305843058530586305873058830589305903059130592305933059430595305963059730598305993060030601306023060330604306053060630607306083060930610306113061230613306143061530616306173061830619306203062130622306233062430625306263062730628306293063030631306323063330634306353063630637306383063930640306413064230643306443064530646306473064830649306503065130652306533065430655306563065730658306593066030661306623066330664306653066630667306683066930670306713067230673306743067530676306773067830679306803068130682306833068430685306863068730688306893069030691306923069330694306953069630697306983069930700307013070230703307043070530706307073070830709307103071130712307133071430715307163071730718307193072030721307223072330724307253072630727307283072930730307313073230733307343073530736307373073830739307403074130742307433074430745307463074730748307493075030751307523075330754307553075630757307583075930760307613076230763307643076530766307673076830769307703077130772307733077430775307763077730778307793078030781307823078330784307853078630787307883078930790307913079230793307943079530796307973079830799308003080130802308033080430805308063080730808308093081030811308123081330814308153081630817308183081930820308213082230823308243082530826308273082830829308303083130832308333083430835308363083730838308393084030841308423084330844308453084630847308483084930850308513085230853308543085530856308573085830859308603086130862308633086430865308663086730868308693087030871308723087330874308753087630877308783087930880308813088230883308843088530886308873088830889308903089130892308933089430895308963089730898308993090030901309023090330904309053090630907309083090930910309113091230913309143091530916309173091830919309203092130922309233092430925309263092730928309293093030931309323093330934309353093630937309383093930940309413094230943309443094530946309473094830949309503095130952309533095430955309563095730958309593096030961309623096330964309653096630967309683096930970309713097230973309743097530976309773097830979309803098130982309833098430985309863098730988309893099030991309923099330994309953099630997309983099931000310013100231003310043100531006310073100831009310103101131012310133101431015310163101731018310193102031021310223102331024310253102631027310283102931030310313103231033310343103531036310373103831039310403104131042310433104431045310463104731048310493105031051310523105331054310553105631057310583105931060310613106231063310643106531066310673106831069310703107131072310733107431075310763107731078310793108031081310823108331084310853108631087310883108931090310913109231093310943109531096310973109831099311003110131102311033110431105311063110731108311093111031111311123111331114311153111631117311183111931120311213112231123311243112531126311273112831129311303113131132311333113431135311363113731138311393114031141311423114331144311453114631147311483114931150311513115231153311543115531156311573115831159311603116131162311633116431165311663116731168311693117031171311723117331174311753117631177311783117931180311813118231183311843118531186311873118831189311903119131192311933119431195311963119731198311993120031201312023120331204312053120631207312083120931210312113121231213312143121531216312173121831219312203122131222312233122431225312263122731228312293123031231312323123331234312353123631237312383123931240312413124231243312443124531246312473124831249312503125131252312533125431255312563125731258312593126031261312623126331264312653126631267312683126931270312713127231273312743127531276312773127831279312803128131282312833128431285312863128731288312893129031291312923129331294312953129631297312983129931300313013130231303313043130531306313073130831309313103131131312313133131431315313163131731318313193132031321313223132331324313253132631327313283132931330313313133231333313343133531336313373133831339313403134131342313433134431345313463134731348313493135031351313523135331354313553135631357313583135931360313613136231363313643136531366313673136831369313703137131372313733137431375313763137731378313793138031381313823138331384313853138631387313883138931390313913139231393313943139531396313973139831399314003140131402314033140431405314063140731408314093141031411314123141331414314153141631417314183141931420314213142231423314243142531426314273142831429314303143131432314333143431435314363143731438314393144031441314423144331444314453144631447314483144931450314513145231453314543145531456314573145831459314603146131462314633146431465314663146731468314693147031471314723147331474314753147631477314783147931480314813148231483314843148531486314873148831489314903149131492314933149431495314963149731498314993150031501315023150331504315053150631507315083150931510315113151231513315143151531516315173151831519315203152131522315233152431525315263152731528315293153031531315323153331534315353153631537315383153931540315413154231543315443154531546315473154831549315503155131552315533155431555315563155731558315593156031561315623156331564315653156631567315683156931570315713157231573315743157531576315773157831579315803158131582315833158431585315863158731588315893159031591315923159331594315953159631597315983159931600316013160231603316043160531606316073160831609316103161131612316133161431615316163161731618316193162031621316223162331624316253162631627316283162931630316313163231633316343163531636316373163831639316403164131642316433164431645316463164731648316493165031651316523165331654316553165631657316583165931660316613166231663316643166531666316673166831669316703167131672316733167431675316763167731678316793168031681316823168331684316853168631687316883168931690316913169231693316943169531696316973169831699317003170131702317033170431705317063170731708317093171031711317123171331714317153171631717317183171931720317213172231723317243172531726317273172831729317303173131732317333173431735317363173731738317393174031741317423174331744317453174631747317483174931750317513175231753317543175531756317573175831759317603176131762317633176431765317663176731768317693177031771317723177331774317753177631777317783177931780317813178231783317843178531786317873178831789317903179131792317933179431795317963179731798317993180031801318023180331804318053180631807318083180931810318113181231813318143181531816318173181831819318203182131822318233182431825318263182731828318293183031831318323183331834318353183631837318383183931840318413184231843318443184531846318473184831849318503185131852318533185431855318563185731858318593186031861318623186331864318653186631867318683186931870318713187231873318743187531876318773187831879318803188131882318833188431885318863188731888318893189031891318923189331894318953189631897318983189931900319013190231903319043190531906319073190831909319103191131912319133191431915319163191731918319193192031921319223192331924319253192631927319283192931930319313193231933319343193531936319373193831939319403194131942319433194431945319463194731948319493195031951319523195331954319553195631957319583195931960319613196231963319643196531966319673196831969319703197131972319733197431975319763197731978319793198031981319823198331984319853198631987319883198931990319913199231993319943199531996319973199831999320003200132002320033200432005320063200732008320093201032011320123201332014320153201632017320183201932020320213202232023320243202532026320273202832029320303203132032320333203432035320363203732038320393204032041320423204332044320453204632047320483204932050320513205232053320543205532056320573205832059320603206132062320633206432065320663206732068320693207032071320723207332074320753207632077320783207932080320813208232083320843208532086320873208832089320903209132092320933209432095320963209732098320993210032101321023210332104321053210632107321083210932110321113211232113321143211532116321173211832119321203212132122321233212432125321263212732128321293213032131321323213332134321353213632137321383213932140321413214232143321443214532146321473214832149321503215132152321533215432155321563215732158321593216032161321623216332164321653216632167321683216932170321713217232173321743217532176321773217832179321803218132182321833218432185321863218732188321893219032191321923219332194321953219632197321983219932200322013220232203322043220532206322073220832209322103221132212322133221432215322163221732218322193222032221322223222332224322253222632227322283222932230322313223232233322343223532236322373223832239322403224132242322433224432245322463224732248322493225032251322523225332254322553225632257322583225932260322613226232263322643226532266322673226832269322703227132272322733227432275322763227732278322793228032281322823228332284322853228632287322883228932290322913229232293322943229532296322973229832299323003230132302323033230432305323063230732308323093231032311323123231332314323153231632317323183231932320323213232232323323243232532326323273232832329323303233132332323333233432335323363233732338323393234032341323423234332344323453234632347323483234932350323513235232353323543235532356323573235832359323603236132362323633236432365323663236732368323693237032371323723237332374323753237632377323783237932380323813238232383323843238532386323873238832389323903239132392323933239432395323963239732398323993240032401324023240332404324053240632407324083240932410324113241232413324143241532416324173241832419324203242132422324233242432425324263242732428324293243032431324323243332434324353243632437324383243932440324413244232443324443244532446324473244832449324503245132452324533245432455324563245732458324593246032461324623246332464324653246632467324683246932470324713247232473324743247532476324773247832479324803248132482324833248432485324863248732488324893249032491324923249332494324953249632497324983249932500325013250232503325043250532506325073250832509325103251132512325133251432515325163251732518325193252032521325223252332524325253252632527325283252932530325313253232533325343253532536325373253832539325403254132542325433254432545325463254732548325493255032551325523255332554325553255632557325583255932560325613256232563325643256532566325673256832569325703257132572325733257432575325763257732578325793258032581325823258332584325853258632587325883258932590325913259232593325943259532596325973259832599326003260132602326033260432605326063260732608326093261032611326123261332614326153261632617326183261932620326213262232623326243262532626326273262832629326303263132632326333263432635326363263732638326393264032641326423264332644326453264632647326483264932650326513265232653326543265532656326573265832659326603266132662326633266432665326663266732668326693267032671326723267332674326753267632677326783267932680326813268232683326843268532686326873268832689326903269132692326933269432695326963269732698326993270032701327023270332704327053270632707327083270932710327113271232713327143271532716327173271832719327203272132722327233272432725327263272732728327293273032731327323273332734327353273632737327383273932740327413274232743327443274532746327473274832749327503275132752327533275432755327563275732758327593276032761327623276332764327653276632767327683276932770327713277232773327743277532776327773277832779327803278132782327833278432785327863278732788327893279032791327923279332794327953279632797327983279932800328013280232803328043280532806328073280832809328103281132812328133281432815328163281732818328193282032821328223282332824328253282632827328283282932830328313283232833328343283532836328373283832839328403284132842328433284432845328463284732848328493285032851328523285332854328553285632857328583285932860328613286232863328643286532866328673286832869328703287132872328733287432875328763287732878328793288032881328823288332884328853288632887328883288932890328913289232893328943289532896328973289832899329003290132902329033290432905329063290732908329093291032911329123291332914329153291632917329183291932920329213292232923329243292532926329273292832929329303293132932329333293432935329363293732938329393294032941329423294332944329453294632947329483294932950329513295232953329543295532956329573295832959329603296132962329633296432965329663296732968329693297032971329723297332974329753297632977329783297932980329813298232983329843298532986329873298832989329903299132992329933299432995329963299732998329993300033001330023300333004330053300633007330083300933010330113301233013330143301533016330173301833019330203302133022330233302433025330263302733028330293303033031330323303333034330353303633037330383303933040330413304233043330443304533046330473304833049330503305133052330533305433055330563305733058330593306033061330623306333064330653306633067330683306933070330713307233073330743307533076330773307833079330803308133082330833308433085330863308733088330893309033091330923309333094330953309633097330983309933100331013310233103331043310533106331073310833109331103311133112331133311433115331163311733118331193312033121331223312333124331253312633127331283312933130331313313233133331343313533136331373313833139331403314133142331433314433145331463314733148331493315033151331523315333154331553315633157331583315933160331613316233163331643316533166331673316833169331703317133172331733317433175331763317733178331793318033181331823318333184331853318633187331883318933190331913319233193331943319533196331973319833199332003320133202332033320433205332063320733208332093321033211332123321333214332153321633217332183321933220332213322233223332243322533226332273322833229332303323133232332333323433235332363323733238332393324033241332423324333244332453324633247332483324933250332513325233253332543325533256332573325833259332603326133262332633326433265332663326733268332693327033271332723327333274332753327633277332783327933280332813328233283332843328533286332873328833289332903329133292332933329433295332963329733298332993330033301333023330333304333053330633307333083330933310333113331233313333143331533316333173331833319333203332133322333233332433325333263332733328333293333033331333323333333334333353333633337333383333933340333413334233343333443334533346333473334833349333503335133352333533335433355333563335733358333593336033361333623336333364333653336633367333683336933370333713337233373333743337533376333773337833379333803338133382333833338433385333863338733388333893339033391333923339333394333953339633397333983339933400334013340233403334043340533406334073340833409334103341133412334133341433415334163341733418334193342033421334223342333424334253342633427334283342933430334313343233433334343343533436334373343833439334403344133442334433344433445334463344733448334493345033451334523345333454334553345633457334583345933460334613346233463334643346533466334673346833469334703347133472334733347433475334763347733478334793348033481334823348333484334853348633487334883348933490334913349233493334943349533496334973349833499335003350133502335033350433505335063350733508335093351033511335123351333514335153351633517335183351933520335213352233523335243352533526335273352833529335303353133532335333353433535335363353733538335393354033541335423354333544335453354633547335483354933550335513355233553335543355533556335573355833559335603356133562335633356433565335663356733568335693357033571335723357333574335753357633577335783357933580335813358233583335843358533586335873358833589335903359133592335933359433595335963359733598335993360033601336023360333604336053360633607336083360933610336113361233613336143361533616336173361833619336203362133622336233362433625336263362733628336293363033631336323363333634336353363633637336383363933640336413364233643336443364533646336473364833649336503365133652336533365433655336563365733658336593366033661336623366333664336653366633667336683366933670336713367233673336743367533676336773367833679336803368133682336833368433685336863368733688336893369033691336923369333694336953369633697336983369933700337013370233703337043370533706337073370833709337103371133712337133371433715337163371733718337193372033721337223372333724337253372633727337283372933730337313373233733337343373533736337373373833739337403374133742337433374433745337463374733748337493375033751337523375333754337553375633757337583375933760337613376233763337643376533766337673376833769337703377133772337733377433775337763377733778337793378033781337823378333784337853378633787337883378933790337913379233793337943379533796337973379833799338003380133802338033380433805338063380733808338093381033811338123381333814338153381633817338183381933820338213382233823338243382533826338273382833829338303383133832338333383433835338363383733838338393384033841338423384333844338453384633847338483384933850338513385233853338543385533856338573385833859338603386133862338633386433865338663386733868338693387033871338723387333874338753387633877338783387933880338813388233883338843388533886338873388833889338903389133892338933389433895338963389733898338993390033901339023390333904339053390633907339083390933910339113391233913339143391533916339173391833919339203392133922339233392433925339263392733928339293393033931339323393333934339353393633937339383393933940339413394233943339443394533946339473394833949339503395133952339533395433955339563395733958339593396033961339623396333964339653396633967339683396933970339713397233973339743397533976339773397833979339803398133982339833398433985339863398733988339893399033991339923399333994339953399633997339983399934000340013400234003340043400534006340073400834009340103401134012340133401434015340163401734018340193402034021340223402334024340253402634027340283402934030340313403234033340343403534036340373403834039340403404134042340433404434045340463404734048340493405034051340523405334054340553405634057340583405934060340613406234063340643406534066340673406834069340703407134072340733407434075340763407734078340793408034081340823408334084340853408634087340883408934090340913409234093340943409534096340973409834099341003410134102341033410434105341063410734108341093411034111341123411334114341153411634117341183411934120341213412234123341243412534126341273412834129341303413134132341333413434135341363413734138341393414034141341423414334144341453414634147341483414934150341513415234153341543415534156341573415834159341603416134162341633416434165341663416734168341693417034171341723417334174341753417634177341783417934180341813418234183341843418534186341873418834189341903419134192341933419434195341963419734198341993420034201342023420334204342053420634207342083420934210342113421234213342143421534216342173421834219342203422134222342233422434225342263422734228342293423034231342323423334234342353423634237342383423934240342413424234243342443424534246342473424834249342503425134252342533425434255342563425734258342593426034261342623426334264342653426634267342683426934270342713427234273342743427534276342773427834279342803428134282342833428434285342863428734288342893429034291342923429334294342953429634297342983429934300343013430234303343043430534306343073430834309343103431134312343133431434315343163431734318343193432034321343223432334324343253432634327343283432934330343313433234333343343433534336343373433834339343403434134342343433434434345343463434734348343493435034351343523435334354343553435634357343583435934360343613436234363343643436534366343673436834369343703437134372343733437434375343763437734378343793438034381343823438334384343853438634387343883438934390343913439234393343943439534396343973439834399344003440134402344033440434405344063440734408344093441034411344123441334414344153441634417344183441934420344213442234423344243442534426344273442834429344303443134432344333443434435344363443734438344393444034441344423444334444344453444634447344483444934450344513445234453344543445534456344573445834459344603446134462344633446434465344663446734468344693447034471344723447334474344753447634477344783447934480344813448234483344843448534486344873448834489344903449134492344933449434495344963449734498344993450034501345023450334504345053450634507345083450934510345113451234513345143451534516345173451834519345203452134522345233452434525345263452734528345293453034531345323453334534345353453634537345383453934540345413454234543345443454534546345473454834549345503455134552345533455434555345563455734558345593456034561345623456334564345653456634567345683456934570345713457234573345743457534576345773457834579345803458134582345833458434585345863458734588345893459034591345923459334594345953459634597345983459934600346013460234603346043460534606346073460834609346103461134612346133461434615346163461734618346193462034621346223462334624346253462634627346283462934630346313463234633346343463534636346373463834639346403464134642346433464434645346463464734648346493465034651346523465334654346553465634657346583465934660346613466234663346643466534666346673466834669346703467134672346733467434675346763467734678346793468034681346823468334684346853468634687346883468934690346913469234693346943469534696346973469834699347003470134702347033470434705347063470734708347093471034711347123471334714347153471634717347183471934720347213472234723347243472534726347273472834729347303473134732347333473434735347363473734738347393474034741347423474334744347453474634747347483474934750347513475234753347543475534756347573475834759347603476134762347633476434765347663476734768347693477034771347723477334774347753477634777347783477934780347813478234783347843478534786347873478834789347903479134792347933479434795347963479734798347993480034801348023480334804348053480634807348083480934810348113481234813348143481534816348173481834819348203482134822348233482434825348263482734828348293483034831348323483334834348353483634837348383483934840348413484234843348443484534846348473484834849348503485134852348533485434855348563485734858348593486034861348623486334864348653486634867348683486934870348713487234873348743487534876348773487834879348803488134882348833488434885348863488734888348893489034891348923489334894348953489634897348983489934900349013490234903349043490534906349073490834909349103491134912349133491434915349163491734918349193492034921349223492334924349253492634927349283492934930349313493234933349343493534936349373493834939349403494134942349433494434945349463494734948349493495034951349523495334954349553495634957349583495934960349613496234963349643496534966349673496834969349703497134972349733497434975349763497734978349793498034981349823498334984349853498634987349883498934990349913499234993349943499534996349973499834999350003500135002350033500435005350063500735008350093501035011350123501335014350153501635017350183501935020350213502235023350243502535026350273502835029350303503135032350333503435035350363503735038350393504035041350423504335044350453504635047350483504935050350513505235053350543505535056350573505835059350603506135062350633506435065350663506735068350693507035071350723507335074350753507635077350783507935080350813508235083350843508535086350873508835089350903509135092350933509435095350963509735098350993510035101351023510335104351053510635107351083510935110351113511235113351143511535116351173511835119351203512135122351233512435125351263512735128351293513035131351323513335134351353513635137351383513935140351413514235143351443514535146351473514835149351503515135152351533515435155351563515735158351593516035161351623516335164351653516635167351683516935170351713517235173351743517535176351773517835179351803518135182351833518435185351863518735188351893519035191351923519335194351953519635197351983519935200352013520235203352043520535206352073520835209352103521135212352133521435215352163521735218352193522035221352223522335224352253522635227352283522935230352313523235233352343523535236352373523835239352403524135242352433524435245352463524735248352493525035251352523525335254352553525635257352583525935260352613526235263352643526535266352673526835269352703527135272352733527435275352763527735278352793528035281352823528335284352853528635287352883528935290352913529235293352943529535296352973529835299353003530135302353033530435305353063530735308353093531035311353123531335314353153531635317353183531935320353213532235323353243532535326353273532835329353303533135332353333533435335353363533735338353393534035341353423534335344353453534635347353483534935350353513535235353353543535535356353573535835359353603536135362353633536435365353663536735368353693537035371353723537335374353753537635377353783537935380353813538235383353843538535386353873538835389353903539135392353933539435395353963539735398353993540035401354023540335404354053540635407354083540935410354113541235413354143541535416354173541835419354203542135422354233542435425354263542735428354293543035431354323543335434354353543635437354383543935440354413544235443354443544535446354473544835449354503545135452354533545435455354563545735458354593546035461354623546335464354653546635467354683546935470354713547235473354743547535476354773547835479354803548135482354833548435485354863548735488354893549035491354923549335494354953549635497354983549935500355013550235503355043550535506355073550835509355103551135512355133551435515355163551735518355193552035521355223552335524355253552635527355283552935530355313553235533355343553535536355373553835539355403554135542355433554435545355463554735548355493555035551355523555335554355553555635557355583555935560355613556235563355643556535566355673556835569355703557135572355733557435575355763557735578355793558035581355823558335584355853558635587355883558935590355913559235593355943559535596355973559835599356003560135602356033560435605356063560735608356093561035611356123561335614356153561635617356183561935620356213562235623356243562535626356273562835629356303563135632356333563435635356363563735638356393564035641356423564335644356453564635647356483564935650356513565235653356543565535656356573565835659356603566135662356633566435665356663566735668356693567035671356723567335674356753567635677356783567935680356813568235683356843568535686356873568835689356903569135692356933569435695356963569735698356993570035701357023570335704357053570635707357083570935710357113571235713357143571535716357173571835719357203572135722357233572435725357263572735728357293573035731357323573335734357353573635737357383573935740357413574235743357443574535746357473574835749357503575135752357533575435755357563575735758357593576035761357623576335764357653576635767357683576935770357713577235773357743577535776357773577835779357803578135782357833578435785357863578735788357893579035791357923579335794357953579635797357983579935800358013580235803358043580535806358073580835809358103581135812358133581435815358163581735818358193582035821358223582335824358253582635827358283582935830358313583235833358343583535836358373583835839358403584135842358433584435845358463584735848358493585035851358523585335854358553585635857358583585935860358613586235863358643586535866358673586835869358703587135872358733587435875358763587735878358793588035881358823588335884358853588635887358883588935890358913589235893358943589535896358973589835899359003590135902359033590435905359063590735908359093591035911359123591335914359153591635917359183591935920359213592235923359243592535926359273592835929359303593135932359333593435935359363593735938359393594035941359423594335944359453594635947359483594935950359513595235953359543595535956359573595835959359603596135962359633596435965359663596735968359693597035971359723597335974359753597635977359783597935980359813598235983359843598535986359873598835989359903599135992359933599435995359963599735998359993600036001360023600336004360053600636007360083600936010360113601236013360143601536016360173601836019360203602136022360233602436025360263602736028360293603036031360323603336034360353603636037360383603936040360413604236043360443604536046360473604836049360503605136052360533605436055360563605736058360593606036061360623606336064360653606636067360683606936070360713607236073360743607536076360773607836079360803608136082360833608436085360863608736088360893609036091360923609336094360953609636097360983609936100361013610236103361043610536106361073610836109361103611136112361133611436115361163611736118361193612036121361223612336124361253612636127361283612936130361313613236133361343613536136361373613836139361403614136142361433614436145361463614736148361493615036151361523615336154361553615636157361583615936160361613616236163361643616536166361673616836169361703617136172361733617436175361763617736178361793618036181361823618336184361853618636187361883618936190361913619236193361943619536196361973619836199362003620136202362033620436205362063620736208362093621036211362123621336214362153621636217362183621936220362213622236223362243622536226362273622836229362303623136232362333623436235362363623736238
  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. "$ref": "#/components/schemas/ProjectIcon"
  3850. },
  3851. "commands": {
  3852. "$ref": "#/components/schemas/ProjectCommands"
  3853. }
  3854. },
  3855. "additionalProperties": false
  3856. }
  3857. }
  3858. }
  3859. },
  3860. "x-codeSamples": [
  3861. {
  3862. "lang": "js",
  3863. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.update({\n ...\n})"
  3864. }
  3865. ]
  3866. }
  3867. },
  3868. "/project/{projectID}/directories": {
  3869. "get": {
  3870. "tags": ["project"],
  3871. "operationId": "project.directories",
  3872. "parameters": [
  3873. {
  3874. "name": "projectID",
  3875. "in": "path",
  3876. "schema": {
  3877. "type": "string"
  3878. },
  3879. "required": true
  3880. },
  3881. {
  3882. "name": "directory",
  3883. "in": "query",
  3884. "schema": {
  3885. "type": "string"
  3886. },
  3887. "required": false
  3888. },
  3889. {
  3890. "name": "workspace",
  3891. "in": "query",
  3892. "schema": {
  3893. "type": "string"
  3894. },
  3895. "required": false
  3896. }
  3897. ],
  3898. "responses": {
  3899. "200": {
  3900. "description": "Project directories",
  3901. "content": {
  3902. "application/json": {
  3903. "schema": {
  3904. "$ref": "#/components/schemas/ProjectDirectories"
  3905. }
  3906. }
  3907. }
  3908. },
  3909. "400": {
  3910. "description": "Bad request",
  3911. "content": {
  3912. "application/json": {
  3913. "schema": {
  3914. "$ref": "#/components/schemas/BadRequestError"
  3915. }
  3916. }
  3917. }
  3918. }
  3919. },
  3920. "description": "List known local absolute directories for a project.",
  3921. "summary": "List project directories",
  3922. "x-codeSamples": [
  3923. {
  3924. "lang": "js",
  3925. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.directories({\n ...\n})"
  3926. }
  3927. ]
  3928. }
  3929. },
  3930. "/experimental/project/{projectID}/copy/generate-name": {
  3931. "post": {
  3932. "tags": ["projectCopy"],
  3933. "operationId": "experimental.projectCopy.generateName",
  3934. "parameters": [
  3935. {
  3936. "name": "projectID",
  3937. "in": "path",
  3938. "schema": {
  3939. "type": "string"
  3940. },
  3941. "required": true
  3942. },
  3943. {
  3944. "name": "directory",
  3945. "in": "query",
  3946. "schema": {
  3947. "type": "string"
  3948. },
  3949. "required": false
  3950. },
  3951. {
  3952. "name": "workspace",
  3953. "in": "query",
  3954. "schema": {
  3955. "type": "string"
  3956. },
  3957. "required": false
  3958. }
  3959. ],
  3960. "responses": {
  3961. "200": {
  3962. "description": "Success",
  3963. "content": {
  3964. "application/json": {
  3965. "schema": {
  3966. "type": "object",
  3967. "properties": {
  3968. "name": {
  3969. "type": "string"
  3970. }
  3971. },
  3972. "required": ["name"],
  3973. "additionalProperties": false
  3974. }
  3975. }
  3976. }
  3977. },
  3978. "400": {
  3979. "description": "Bad request",
  3980. "content": {
  3981. "application/json": {
  3982. "schema": {
  3983. "$ref": "#/components/schemas/BadRequestError"
  3984. }
  3985. }
  3986. }
  3987. }
  3988. },
  3989. "description": "Generate a short name for a project copy from task context.",
  3990. "summary": "Generate project copy name",
  3991. "requestBody": {
  3992. "content": {
  3993. "application/json": {
  3994. "schema": {
  3995. "type": "object",
  3996. "properties": {
  3997. "context": {
  3998. "type": "string"
  3999. }
  4000. },
  4001. "additionalProperties": false
  4002. }
  4003. }
  4004. }
  4005. },
  4006. "x-codeSamples": [
  4007. {
  4008. "lang": "js",
  4009. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.projectCopy.generateName({\n ...\n})"
  4010. }
  4011. ]
  4012. }
  4013. },
  4014. "/pty/shells": {
  4015. "get": {
  4016. "tags": ["pty"],
  4017. "operationId": "pty.shells",
  4018. "parameters": [
  4019. {
  4020. "name": "directory",
  4021. "in": "query",
  4022. "schema": {
  4023. "type": "string"
  4024. },
  4025. "required": false
  4026. },
  4027. {
  4028. "name": "workspace",
  4029. "in": "query",
  4030. "schema": {
  4031. "type": "string"
  4032. },
  4033. "required": false
  4034. }
  4035. ],
  4036. "responses": {
  4037. "200": {
  4038. "description": "List of shells",
  4039. "content": {
  4040. "application/json": {
  4041. "schema": {
  4042. "type": "array",
  4043. "items": {
  4044. "type": "object",
  4045. "properties": {
  4046. "path": {
  4047. "type": "string"
  4048. },
  4049. "name": {
  4050. "type": "string"
  4051. },
  4052. "acceptable": {
  4053. "type": "boolean"
  4054. }
  4055. },
  4056. "required": ["path", "name", "acceptable"],
  4057. "additionalProperties": false
  4058. },
  4059. "description": "List of shells"
  4060. }
  4061. }
  4062. }
  4063. },
  4064. "400": {
  4065. "description": "Bad request",
  4066. "content": {
  4067. "application/json": {
  4068. "schema": {
  4069. "$ref": "#/components/schemas/BadRequestError"
  4070. }
  4071. }
  4072. }
  4073. }
  4074. },
  4075. "description": "Get a list of available shells on the system.",
  4076. "summary": "List available shells",
  4077. "x-codeSamples": [
  4078. {
  4079. "lang": "js",
  4080. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.shells({\n ...\n})"
  4081. }
  4082. ]
  4083. }
  4084. },
  4085. "/pty": {
  4086. "get": {
  4087. "tags": ["pty"],
  4088. "operationId": "pty.list",
  4089. "parameters": [
  4090. {
  4091. "name": "directory",
  4092. "in": "query",
  4093. "schema": {
  4094. "type": "string"
  4095. },
  4096. "required": false
  4097. },
  4098. {
  4099. "name": "workspace",
  4100. "in": "query",
  4101. "schema": {
  4102. "type": "string"
  4103. },
  4104. "required": false
  4105. }
  4106. ],
  4107. "responses": {
  4108. "200": {
  4109. "description": "List of sessions",
  4110. "content": {
  4111. "application/json": {
  4112. "schema": {
  4113. "type": "array",
  4114. "items": {
  4115. "$ref": "#/components/schemas/Pty"
  4116. },
  4117. "description": "List of sessions"
  4118. }
  4119. }
  4120. }
  4121. },
  4122. "400": {
  4123. "description": "Bad request",
  4124. "content": {
  4125. "application/json": {
  4126. "schema": {
  4127. "$ref": "#/components/schemas/BadRequestError"
  4128. }
  4129. }
  4130. }
  4131. }
  4132. },
  4133. "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
  4134. "summary": "List PTY sessions",
  4135. "x-codeSamples": [
  4136. {
  4137. "lang": "js",
  4138. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
  4139. }
  4140. ]
  4141. },
  4142. "post": {
  4143. "tags": ["pty"],
  4144. "operationId": "pty.create",
  4145. "parameters": [
  4146. {
  4147. "name": "directory",
  4148. "in": "query",
  4149. "schema": {
  4150. "type": "string"
  4151. },
  4152. "required": false
  4153. },
  4154. {
  4155. "name": "workspace",
  4156. "in": "query",
  4157. "schema": {
  4158. "type": "string"
  4159. },
  4160. "required": false
  4161. }
  4162. ],
  4163. "responses": {
  4164. "200": {
  4165. "description": "Created session",
  4166. "content": {
  4167. "application/json": {
  4168. "schema": {
  4169. "$ref": "#/components/schemas/Pty"
  4170. }
  4171. }
  4172. }
  4173. },
  4174. "400": {
  4175. "description": "BadRequest | InvalidRequestError",
  4176. "content": {
  4177. "application/json": {
  4178. "schema": {
  4179. "anyOf": [
  4180. {
  4181. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4182. },
  4183. {
  4184. "$ref": "#/components/schemas/InvalidRequestError"
  4185. }
  4186. ]
  4187. }
  4188. }
  4189. }
  4190. }
  4191. },
  4192. "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
  4193. "summary": "Create PTY session",
  4194. "requestBody": {
  4195. "content": {
  4196. "application/json": {
  4197. "schema": {
  4198. "type": "object",
  4199. "properties": {
  4200. "command": {
  4201. "type": "string"
  4202. },
  4203. "args": {
  4204. "type": "array",
  4205. "items": {
  4206. "type": "string"
  4207. }
  4208. },
  4209. "cwd": {
  4210. "type": "string"
  4211. },
  4212. "title": {
  4213. "type": "string"
  4214. },
  4215. "env": {
  4216. "type": "object",
  4217. "additionalProperties": {
  4218. "type": "string"
  4219. }
  4220. }
  4221. },
  4222. "additionalProperties": false
  4223. }
  4224. }
  4225. }
  4226. },
  4227. "x-codeSamples": [
  4228. {
  4229. "lang": "js",
  4230. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
  4231. }
  4232. ]
  4233. }
  4234. },
  4235. "/pty/{ptyID}": {
  4236. "get": {
  4237. "tags": ["pty"],
  4238. "operationId": "pty.get",
  4239. "parameters": [
  4240. {
  4241. "name": "ptyID",
  4242. "in": "path",
  4243. "schema": {
  4244. "type": "string",
  4245. "pattern": "^pty"
  4246. },
  4247. "required": true
  4248. },
  4249. {
  4250. "name": "directory",
  4251. "in": "query",
  4252. "schema": {
  4253. "type": "string"
  4254. },
  4255. "required": false
  4256. },
  4257. {
  4258. "name": "workspace",
  4259. "in": "query",
  4260. "schema": {
  4261. "type": "string"
  4262. },
  4263. "required": false
  4264. }
  4265. ],
  4266. "responses": {
  4267. "200": {
  4268. "description": "Session info",
  4269. "content": {
  4270. "application/json": {
  4271. "schema": {
  4272. "$ref": "#/components/schemas/Pty"
  4273. }
  4274. }
  4275. }
  4276. },
  4277. "400": {
  4278. "description": "Bad request",
  4279. "content": {
  4280. "application/json": {
  4281. "schema": {
  4282. "$ref": "#/components/schemas/BadRequestError"
  4283. }
  4284. }
  4285. }
  4286. },
  4287. "404": {
  4288. "description": "PtyNotFoundError",
  4289. "content": {
  4290. "application/json": {
  4291. "schema": {
  4292. "$ref": "#/components/schemas/PtyNotFoundError"
  4293. }
  4294. }
  4295. }
  4296. }
  4297. },
  4298. "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
  4299. "summary": "Get PTY session",
  4300. "x-codeSamples": [
  4301. {
  4302. "lang": "js",
  4303. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
  4304. }
  4305. ]
  4306. },
  4307. "put": {
  4308. "tags": ["pty"],
  4309. "operationId": "pty.update",
  4310. "parameters": [
  4311. {
  4312. "name": "ptyID",
  4313. "in": "path",
  4314. "schema": {
  4315. "type": "string",
  4316. "pattern": "^pty"
  4317. },
  4318. "required": true
  4319. },
  4320. {
  4321. "name": "directory",
  4322. "in": "query",
  4323. "schema": {
  4324. "type": "string"
  4325. },
  4326. "required": false
  4327. },
  4328. {
  4329. "name": "workspace",
  4330. "in": "query",
  4331. "schema": {
  4332. "type": "string"
  4333. },
  4334. "required": false
  4335. }
  4336. ],
  4337. "responses": {
  4338. "200": {
  4339. "description": "Updated session",
  4340. "content": {
  4341. "application/json": {
  4342. "schema": {
  4343. "$ref": "#/components/schemas/Pty"
  4344. }
  4345. }
  4346. }
  4347. },
  4348. "400": {
  4349. "description": "BadRequest | InvalidRequestError",
  4350. "content": {
  4351. "application/json": {
  4352. "schema": {
  4353. "anyOf": [
  4354. {
  4355. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4356. },
  4357. {
  4358. "$ref": "#/components/schemas/InvalidRequestError"
  4359. }
  4360. ]
  4361. }
  4362. }
  4363. }
  4364. },
  4365. "404": {
  4366. "description": "PtyNotFoundError",
  4367. "content": {
  4368. "application/json": {
  4369. "schema": {
  4370. "$ref": "#/components/schemas/PtyNotFoundError"
  4371. }
  4372. }
  4373. }
  4374. }
  4375. },
  4376. "description": "Update properties of an existing pseudo-terminal (PTY) session.",
  4377. "summary": "Update PTY session",
  4378. "requestBody": {
  4379. "content": {
  4380. "application/json": {
  4381. "schema": {
  4382. "type": "object",
  4383. "properties": {
  4384. "title": {
  4385. "type": "string"
  4386. },
  4387. "size": {
  4388. "type": "object",
  4389. "properties": {
  4390. "rows": {
  4391. "type": "integer",
  4392. "exclusiveMinimum": 0
  4393. },
  4394. "cols": {
  4395. "type": "integer",
  4396. "exclusiveMinimum": 0
  4397. }
  4398. },
  4399. "required": ["rows", "cols"],
  4400. "additionalProperties": false
  4401. }
  4402. },
  4403. "additionalProperties": false
  4404. }
  4405. }
  4406. }
  4407. },
  4408. "x-codeSamples": [
  4409. {
  4410. "lang": "js",
  4411. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
  4412. }
  4413. ]
  4414. },
  4415. "delete": {
  4416. "tags": ["pty"],
  4417. "operationId": "pty.remove",
  4418. "parameters": [
  4419. {
  4420. "name": "ptyID",
  4421. "in": "path",
  4422. "schema": {
  4423. "type": "string",
  4424. "pattern": "^pty"
  4425. },
  4426. "required": true
  4427. },
  4428. {
  4429. "name": "directory",
  4430. "in": "query",
  4431. "schema": {
  4432. "type": "string"
  4433. },
  4434. "required": false
  4435. },
  4436. {
  4437. "name": "workspace",
  4438. "in": "query",
  4439. "schema": {
  4440. "type": "string"
  4441. },
  4442. "required": false
  4443. }
  4444. ],
  4445. "responses": {
  4446. "200": {
  4447. "description": "Session removed",
  4448. "content": {
  4449. "application/json": {
  4450. "schema": {
  4451. "type": "boolean",
  4452. "description": "Session removed"
  4453. }
  4454. }
  4455. }
  4456. },
  4457. "400": {
  4458. "description": "Bad request",
  4459. "content": {
  4460. "application/json": {
  4461. "schema": {
  4462. "$ref": "#/components/schemas/BadRequestError"
  4463. }
  4464. }
  4465. }
  4466. },
  4467. "404": {
  4468. "description": "PtyNotFoundError",
  4469. "content": {
  4470. "application/json": {
  4471. "schema": {
  4472. "$ref": "#/components/schemas/PtyNotFoundError"
  4473. }
  4474. }
  4475. }
  4476. }
  4477. },
  4478. "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
  4479. "summary": "Remove PTY session",
  4480. "x-codeSamples": [
  4481. {
  4482. "lang": "js",
  4483. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
  4484. }
  4485. ]
  4486. }
  4487. },
  4488. "/pty/{ptyID}/connect-token": {
  4489. "post": {
  4490. "tags": ["pty"],
  4491. "operationId": "pty.connectToken",
  4492. "parameters": [
  4493. {
  4494. "name": "ptyID",
  4495. "in": "path",
  4496. "schema": {
  4497. "type": "string",
  4498. "pattern": "^pty"
  4499. },
  4500. "required": true
  4501. },
  4502. {
  4503. "name": "directory",
  4504. "in": "query",
  4505. "schema": {
  4506. "type": "string"
  4507. },
  4508. "required": false
  4509. },
  4510. {
  4511. "name": "workspace",
  4512. "in": "query",
  4513. "schema": {
  4514. "type": "string"
  4515. },
  4516. "required": false
  4517. }
  4518. ],
  4519. "responses": {
  4520. "200": {
  4521. "description": "WebSocket connect token",
  4522. "content": {
  4523. "application/json": {
  4524. "schema": {
  4525. "$ref": "#/components/schemas/PtyTicketConnectToken"
  4526. }
  4527. }
  4528. }
  4529. },
  4530. "400": {
  4531. "description": "Bad request",
  4532. "content": {
  4533. "application/json": {
  4534. "schema": {
  4535. "$ref": "#/components/schemas/BadRequestError"
  4536. }
  4537. }
  4538. }
  4539. },
  4540. "403": {
  4541. "description": "PtyForbiddenError",
  4542. "content": {
  4543. "application/json": {
  4544. "schema": {
  4545. "$ref": "#/components/schemas/PtyForbiddenError"
  4546. }
  4547. }
  4548. }
  4549. },
  4550. "404": {
  4551. "description": "PtyNotFoundError",
  4552. "content": {
  4553. "application/json": {
  4554. "schema": {
  4555. "$ref": "#/components/schemas/PtyNotFoundError"
  4556. }
  4557. }
  4558. }
  4559. }
  4560. },
  4561. "description": "Create a short-lived ticket for opening a PTY WebSocket connection.",
  4562. "summary": "Create PTY WebSocket token",
  4563. "x-codeSamples": [
  4564. {
  4565. "lang": "js",
  4566. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connectToken({\n ...\n})"
  4567. }
  4568. ]
  4569. }
  4570. },
  4571. "/question": {
  4572. "get": {
  4573. "tags": ["question"],
  4574. "operationId": "question.list",
  4575. "parameters": [
  4576. {
  4577. "name": "directory",
  4578. "in": "query",
  4579. "schema": {
  4580. "type": "string"
  4581. },
  4582. "required": false
  4583. },
  4584. {
  4585. "name": "workspace",
  4586. "in": "query",
  4587. "schema": {
  4588. "type": "string"
  4589. },
  4590. "required": false
  4591. }
  4592. ],
  4593. "responses": {
  4594. "200": {
  4595. "description": "List of pending questions",
  4596. "content": {
  4597. "application/json": {
  4598. "schema": {
  4599. "type": "array",
  4600. "items": {
  4601. "$ref": "#/components/schemas/QuestionRequest"
  4602. },
  4603. "description": "List of pending questions"
  4604. }
  4605. }
  4606. }
  4607. },
  4608. "400": {
  4609. "description": "Bad request",
  4610. "content": {
  4611. "application/json": {
  4612. "schema": {
  4613. "$ref": "#/components/schemas/BadRequestError"
  4614. }
  4615. }
  4616. }
  4617. }
  4618. },
  4619. "description": "Get all pending question requests across all sessions.",
  4620. "summary": "List pending questions",
  4621. "x-codeSamples": [
  4622. {
  4623. "lang": "js",
  4624. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
  4625. }
  4626. ]
  4627. }
  4628. },
  4629. "/question/{requestID}/reply": {
  4630. "post": {
  4631. "tags": ["question"],
  4632. "operationId": "question.reply",
  4633. "parameters": [
  4634. {
  4635. "name": "requestID",
  4636. "in": "path",
  4637. "schema": {
  4638. "type": "string",
  4639. "pattern": "^que"
  4640. },
  4641. "required": true
  4642. },
  4643. {
  4644. "name": "directory",
  4645. "in": "query",
  4646. "schema": {
  4647. "type": "string"
  4648. },
  4649. "required": false
  4650. },
  4651. {
  4652. "name": "workspace",
  4653. "in": "query",
  4654. "schema": {
  4655. "type": "string"
  4656. },
  4657. "required": false
  4658. }
  4659. ],
  4660. "responses": {
  4661. "200": {
  4662. "description": "Question answered successfully",
  4663. "content": {
  4664. "application/json": {
  4665. "schema": {
  4666. "type": "boolean",
  4667. "description": "Question answered successfully"
  4668. }
  4669. }
  4670. }
  4671. },
  4672. "400": {
  4673. "description": "BadRequest | InvalidRequestError",
  4674. "content": {
  4675. "application/json": {
  4676. "schema": {
  4677. "anyOf": [
  4678. {
  4679. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4680. },
  4681. {
  4682. "$ref": "#/components/schemas/InvalidRequestError"
  4683. }
  4684. ]
  4685. }
  4686. }
  4687. }
  4688. },
  4689. "404": {
  4690. "description": "QuestionNotFoundError",
  4691. "content": {
  4692. "application/json": {
  4693. "schema": {
  4694. "$ref": "#/components/schemas/QuestionNotFoundError"
  4695. }
  4696. }
  4697. }
  4698. }
  4699. },
  4700. "description": "Provide answers to a question request from the AI assistant.",
  4701. "summary": "Reply to question request",
  4702. "requestBody": {
  4703. "content": {
  4704. "application/json": {
  4705. "schema": {
  4706. "type": "object",
  4707. "properties": {
  4708. "answers": {
  4709. "type": "array",
  4710. "items": {
  4711. "$ref": "#/components/schemas/QuestionAnswer"
  4712. },
  4713. "description": "User answers in order of questions (each answer is an array of selected labels)"
  4714. }
  4715. },
  4716. "required": ["answers"],
  4717. "additionalProperties": false
  4718. }
  4719. }
  4720. }
  4721. },
  4722. "x-codeSamples": [
  4723. {
  4724. "lang": "js",
  4725. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
  4726. }
  4727. ]
  4728. }
  4729. },
  4730. "/question/{requestID}/reject": {
  4731. "post": {
  4732. "tags": ["question"],
  4733. "operationId": "question.reject",
  4734. "parameters": [
  4735. {
  4736. "name": "requestID",
  4737. "in": "path",
  4738. "schema": {
  4739. "type": "string",
  4740. "pattern": "^que"
  4741. },
  4742. "required": true
  4743. },
  4744. {
  4745. "name": "directory",
  4746. "in": "query",
  4747. "schema": {
  4748. "type": "string"
  4749. },
  4750. "required": false
  4751. },
  4752. {
  4753. "name": "workspace",
  4754. "in": "query",
  4755. "schema": {
  4756. "type": "string"
  4757. },
  4758. "required": false
  4759. }
  4760. ],
  4761. "responses": {
  4762. "200": {
  4763. "description": "Question rejected successfully",
  4764. "content": {
  4765. "application/json": {
  4766. "schema": {
  4767. "type": "boolean",
  4768. "description": "Question rejected successfully"
  4769. }
  4770. }
  4771. }
  4772. },
  4773. "400": {
  4774. "description": "BadRequest | InvalidRequestError",
  4775. "content": {
  4776. "application/json": {
  4777. "schema": {
  4778. "anyOf": [
  4779. {
  4780. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4781. },
  4782. {
  4783. "$ref": "#/components/schemas/InvalidRequestError"
  4784. }
  4785. ]
  4786. }
  4787. }
  4788. }
  4789. },
  4790. "404": {
  4791. "description": "QuestionNotFoundError",
  4792. "content": {
  4793. "application/json": {
  4794. "schema": {
  4795. "$ref": "#/components/schemas/QuestionNotFoundError"
  4796. }
  4797. }
  4798. }
  4799. }
  4800. },
  4801. "description": "Reject a question request from the AI assistant.",
  4802. "summary": "Reject question request",
  4803. "x-codeSamples": [
  4804. {
  4805. "lang": "js",
  4806. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
  4807. }
  4808. ]
  4809. }
  4810. },
  4811. "/permission": {
  4812. "get": {
  4813. "tags": ["permission"],
  4814. "operationId": "permission.list",
  4815. "parameters": [
  4816. {
  4817. "name": "directory",
  4818. "in": "query",
  4819. "schema": {
  4820. "type": "string"
  4821. },
  4822. "required": false
  4823. },
  4824. {
  4825. "name": "workspace",
  4826. "in": "query",
  4827. "schema": {
  4828. "type": "string"
  4829. },
  4830. "required": false
  4831. }
  4832. ],
  4833. "responses": {
  4834. "200": {
  4835. "description": "List of pending permissions",
  4836. "content": {
  4837. "application/json": {
  4838. "schema": {
  4839. "type": "array",
  4840. "items": {
  4841. "$ref": "#/components/schemas/PermissionRequest"
  4842. },
  4843. "description": "List of pending permissions"
  4844. }
  4845. }
  4846. }
  4847. },
  4848. "400": {
  4849. "description": "Bad request",
  4850. "content": {
  4851. "application/json": {
  4852. "schema": {
  4853. "$ref": "#/components/schemas/BadRequestError"
  4854. }
  4855. }
  4856. }
  4857. }
  4858. },
  4859. "description": "Get all pending permission requests across all sessions.",
  4860. "summary": "List pending permissions",
  4861. "x-codeSamples": [
  4862. {
  4863. "lang": "js",
  4864. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
  4865. }
  4866. ]
  4867. }
  4868. },
  4869. "/permission/{requestID}/reply": {
  4870. "post": {
  4871. "tags": ["permission"],
  4872. "operationId": "permission.reply",
  4873. "parameters": [
  4874. {
  4875. "name": "requestID",
  4876. "in": "path",
  4877. "schema": {
  4878. "type": "string",
  4879. "pattern": "^per"
  4880. },
  4881. "required": true
  4882. },
  4883. {
  4884. "name": "directory",
  4885. "in": "query",
  4886. "schema": {
  4887. "type": "string"
  4888. },
  4889. "required": false
  4890. },
  4891. {
  4892. "name": "workspace",
  4893. "in": "query",
  4894. "schema": {
  4895. "type": "string"
  4896. },
  4897. "required": false
  4898. }
  4899. ],
  4900. "responses": {
  4901. "200": {
  4902. "description": "Permission processed successfully",
  4903. "content": {
  4904. "application/json": {
  4905. "schema": {
  4906. "type": "boolean",
  4907. "description": "Permission processed successfully"
  4908. }
  4909. }
  4910. }
  4911. },
  4912. "400": {
  4913. "description": "BadRequest | InvalidRequestError",
  4914. "content": {
  4915. "application/json": {
  4916. "schema": {
  4917. "anyOf": [
  4918. {
  4919. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4920. },
  4921. {
  4922. "$ref": "#/components/schemas/InvalidRequestError"
  4923. }
  4924. ]
  4925. }
  4926. }
  4927. }
  4928. },
  4929. "404": {
  4930. "description": "PermissionNotFoundError",
  4931. "content": {
  4932. "application/json": {
  4933. "schema": {
  4934. "$ref": "#/components/schemas/PermissionNotFoundError"
  4935. }
  4936. }
  4937. }
  4938. }
  4939. },
  4940. "description": "Approve or deny a permission request from the AI assistant.",
  4941. "summary": "Respond to permission request",
  4942. "requestBody": {
  4943. "content": {
  4944. "application/json": {
  4945. "schema": {
  4946. "type": "object",
  4947. "properties": {
  4948. "reply": {
  4949. "type": "string",
  4950. "enum": ["once", "always", "reject"]
  4951. },
  4952. "message": {
  4953. "type": "string"
  4954. }
  4955. },
  4956. "required": ["reply"],
  4957. "additionalProperties": false
  4958. }
  4959. }
  4960. }
  4961. },
  4962. "x-codeSamples": [
  4963. {
  4964. "lang": "js",
  4965. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
  4966. }
  4967. ]
  4968. }
  4969. },
  4970. "/provider": {
  4971. "get": {
  4972. "tags": ["provider"],
  4973. "operationId": "provider.list",
  4974. "parameters": [
  4975. {
  4976. "name": "directory",
  4977. "in": "query",
  4978. "schema": {
  4979. "type": "string"
  4980. },
  4981. "required": false
  4982. },
  4983. {
  4984. "name": "workspace",
  4985. "in": "query",
  4986. "schema": {
  4987. "type": "string"
  4988. },
  4989. "required": false
  4990. }
  4991. ],
  4992. "responses": {
  4993. "200": {
  4994. "description": "List of providers",
  4995. "content": {
  4996. "application/json": {
  4997. "schema": {
  4998. "type": "object",
  4999. "properties": {
  5000. "all": {
  5001. "type": "array",
  5002. "items": {
  5003. "$ref": "#/components/schemas/Provider"
  5004. }
  5005. },
  5006. "default": {
  5007. "type": "object",
  5008. "additionalProperties": {
  5009. "type": "string"
  5010. }
  5011. },
  5012. "connected": {
  5013. "type": "array",
  5014. "items": {
  5015. "type": "string"
  5016. }
  5017. }
  5018. },
  5019. "required": ["all", "default", "connected"],
  5020. "additionalProperties": false,
  5021. "description": "List of providers"
  5022. }
  5023. }
  5024. }
  5025. },
  5026. "400": {
  5027. "description": "Bad request",
  5028. "content": {
  5029. "application/json": {
  5030. "schema": {
  5031. "$ref": "#/components/schemas/BadRequestError"
  5032. }
  5033. }
  5034. }
  5035. }
  5036. },
  5037. "description": "Get a list of all available AI providers, including both available and connected ones.",
  5038. "summary": "List providers",
  5039. "x-codeSamples": [
  5040. {
  5041. "lang": "js",
  5042. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  5043. }
  5044. ]
  5045. }
  5046. },
  5047. "/provider/auth": {
  5048. "get": {
  5049. "tags": ["provider"],
  5050. "operationId": "provider.auth",
  5051. "parameters": [
  5052. {
  5053. "name": "directory",
  5054. "in": "query",
  5055. "schema": {
  5056. "type": "string"
  5057. },
  5058. "required": false
  5059. },
  5060. {
  5061. "name": "workspace",
  5062. "in": "query",
  5063. "schema": {
  5064. "type": "string"
  5065. },
  5066. "required": false
  5067. }
  5068. ],
  5069. "responses": {
  5070. "200": {
  5071. "description": "Provider auth methods",
  5072. "content": {
  5073. "application/json": {
  5074. "schema": {
  5075. "type": "object",
  5076. "additionalProperties": {
  5077. "type": "array",
  5078. "items": {
  5079. "$ref": "#/components/schemas/ProviderAuthMethod"
  5080. }
  5081. },
  5082. "description": "Provider auth methods"
  5083. }
  5084. }
  5085. }
  5086. },
  5087. "400": {
  5088. "description": "Bad request",
  5089. "content": {
  5090. "application/json": {
  5091. "schema": {
  5092. "$ref": "#/components/schemas/BadRequestError"
  5093. }
  5094. }
  5095. }
  5096. }
  5097. },
  5098. "description": "Retrieve available authentication methods for all AI providers.",
  5099. "summary": "Get provider auth methods",
  5100. "x-codeSamples": [
  5101. {
  5102. "lang": "js",
  5103. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  5104. }
  5105. ]
  5106. }
  5107. },
  5108. "/provider/{providerID}/oauth/authorize": {
  5109. "post": {
  5110. "tags": ["provider"],
  5111. "operationId": "provider.oauth.authorize",
  5112. "parameters": [
  5113. {
  5114. "name": "providerID",
  5115. "in": "path",
  5116. "schema": {
  5117. "type": "string"
  5118. },
  5119. "required": true
  5120. },
  5121. {
  5122. "name": "directory",
  5123. "in": "query",
  5124. "schema": {
  5125. "type": "string"
  5126. },
  5127. "required": false
  5128. },
  5129. {
  5130. "name": "workspace",
  5131. "in": "query",
  5132. "schema": {
  5133. "type": "string"
  5134. },
  5135. "required": false
  5136. }
  5137. ],
  5138. "responses": {
  5139. "200": {
  5140. "description": "Authorization URL and method",
  5141. "content": {
  5142. "application/json": {
  5143. "schema": {
  5144. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  5145. }
  5146. }
  5147. }
  5148. },
  5149. "400": {
  5150. "description": "ProviderAuthError | InvalidRequestError",
  5151. "content": {
  5152. "application/json": {
  5153. "schema": {
  5154. "anyOf": [
  5155. {
  5156. "$ref": "#/components/schemas/ProviderAuthError1"
  5157. },
  5158. {
  5159. "$ref": "#/components/schemas/InvalidRequestError"
  5160. }
  5161. ]
  5162. }
  5163. }
  5164. }
  5165. }
  5166. },
  5167. "description": "Start the OAuth authorization flow for a provider.",
  5168. "summary": "Start OAuth authorization",
  5169. "requestBody": {
  5170. "content": {
  5171. "application/json": {
  5172. "schema": {
  5173. "type": "object",
  5174. "properties": {
  5175. "method": {
  5176. "type": "number",
  5177. "description": "Auth method index"
  5178. },
  5179. "inputs": {
  5180. "type": "object",
  5181. "additionalProperties": {
  5182. "type": "string"
  5183. }
  5184. }
  5185. },
  5186. "required": ["method"],
  5187. "additionalProperties": false
  5188. }
  5189. }
  5190. }
  5191. },
  5192. "x-codeSamples": [
  5193. {
  5194. "lang": "js",
  5195. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  5196. }
  5197. ]
  5198. }
  5199. },
  5200. "/provider/{providerID}/oauth/callback": {
  5201. "post": {
  5202. "tags": ["provider"],
  5203. "operationId": "provider.oauth.callback",
  5204. "parameters": [
  5205. {
  5206. "name": "providerID",
  5207. "in": "path",
  5208. "schema": {
  5209. "type": "string"
  5210. },
  5211. "required": true
  5212. },
  5213. {
  5214. "name": "directory",
  5215. "in": "query",
  5216. "schema": {
  5217. "type": "string"
  5218. },
  5219. "required": false
  5220. },
  5221. {
  5222. "name": "workspace",
  5223. "in": "query",
  5224. "schema": {
  5225. "type": "string"
  5226. },
  5227. "required": false
  5228. }
  5229. ],
  5230. "responses": {
  5231. "200": {
  5232. "description": "OAuth callback processed successfully",
  5233. "content": {
  5234. "application/json": {
  5235. "schema": {
  5236. "type": "boolean",
  5237. "description": "OAuth callback processed successfully"
  5238. }
  5239. }
  5240. }
  5241. },
  5242. "400": {
  5243. "description": "ProviderAuthError | InvalidRequestError",
  5244. "content": {
  5245. "application/json": {
  5246. "schema": {
  5247. "anyOf": [
  5248. {
  5249. "$ref": "#/components/schemas/ProviderAuthError1"
  5250. },
  5251. {
  5252. "$ref": "#/components/schemas/InvalidRequestError"
  5253. }
  5254. ]
  5255. }
  5256. }
  5257. }
  5258. }
  5259. },
  5260. "description": "Handle the OAuth callback from a provider after user authorization.",
  5261. "summary": "Handle OAuth callback",
  5262. "requestBody": {
  5263. "content": {
  5264. "application/json": {
  5265. "schema": {
  5266. "type": "object",
  5267. "properties": {
  5268. "method": {
  5269. "type": "number",
  5270. "description": "Auth method index"
  5271. },
  5272. "code": {
  5273. "type": "string"
  5274. }
  5275. },
  5276. "required": ["method"],
  5277. "additionalProperties": false
  5278. }
  5279. }
  5280. }
  5281. },
  5282. "x-codeSamples": [
  5283. {
  5284. "lang": "js",
  5285. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  5286. }
  5287. ]
  5288. }
  5289. },
  5290. "/session": {
  5291. "get": {
  5292. "tags": ["session"],
  5293. "operationId": "session.list",
  5294. "parameters": [
  5295. {
  5296. "name": "directory",
  5297. "in": "query",
  5298. "schema": {
  5299. "type": "string"
  5300. },
  5301. "required": false
  5302. },
  5303. {
  5304. "name": "workspace",
  5305. "in": "query",
  5306. "schema": {
  5307. "type": "string"
  5308. },
  5309. "required": false
  5310. },
  5311. {
  5312. "name": "scope",
  5313. "in": "query",
  5314. "schema": {
  5315. "type": "string",
  5316. "enum": ["project"]
  5317. },
  5318. "required": false
  5319. },
  5320. {
  5321. "name": "path",
  5322. "in": "query",
  5323. "schema": {
  5324. "type": "string"
  5325. },
  5326. "required": false
  5327. },
  5328. {
  5329. "name": "roots",
  5330. "in": "query",
  5331. "schema": {
  5332. "anyOf": [
  5333. {
  5334. "type": "boolean"
  5335. },
  5336. {
  5337. "type": "string",
  5338. "enum": ["true", "false"]
  5339. }
  5340. ]
  5341. },
  5342. "required": false
  5343. },
  5344. {
  5345. "name": "start",
  5346. "in": "query",
  5347. "schema": {
  5348. "type": "number"
  5349. },
  5350. "required": false
  5351. },
  5352. {
  5353. "name": "search",
  5354. "in": "query",
  5355. "schema": {
  5356. "type": "string"
  5357. },
  5358. "required": false
  5359. },
  5360. {
  5361. "name": "limit",
  5362. "in": "query",
  5363. "schema": {
  5364. "type": "number"
  5365. },
  5366. "required": false
  5367. }
  5368. ],
  5369. "responses": {
  5370. "200": {
  5371. "description": "List of sessions",
  5372. "content": {
  5373. "application/json": {
  5374. "schema": {
  5375. "type": "array",
  5376. "items": {
  5377. "$ref": "#/components/schemas/Session"
  5378. },
  5379. "description": "List of sessions"
  5380. }
  5381. }
  5382. }
  5383. },
  5384. "400": {
  5385. "description": "Bad request",
  5386. "content": {
  5387. "application/json": {
  5388. "schema": {
  5389. "$ref": "#/components/schemas/BadRequestError"
  5390. }
  5391. }
  5392. }
  5393. }
  5394. },
  5395. "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
  5396. "summary": "List sessions",
  5397. "x-codeSamples": [
  5398. {
  5399. "lang": "js",
  5400. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
  5401. }
  5402. ]
  5403. },
  5404. "post": {
  5405. "tags": ["session"],
  5406. "operationId": "session.create",
  5407. "parameters": [
  5408. {
  5409. "name": "directory",
  5410. "in": "query",
  5411. "schema": {
  5412. "type": "string"
  5413. },
  5414. "required": false
  5415. },
  5416. {
  5417. "name": "workspace",
  5418. "in": "query",
  5419. "schema": {
  5420. "type": "string"
  5421. },
  5422. "required": false
  5423. }
  5424. ],
  5425. "responses": {
  5426. "200": {
  5427. "description": "Successfully created session",
  5428. "content": {
  5429. "application/json": {
  5430. "schema": {
  5431. "$ref": "#/components/schemas/Session"
  5432. }
  5433. }
  5434. }
  5435. },
  5436. "400": {
  5437. "description": "BadRequest | InvalidRequestError",
  5438. "content": {
  5439. "application/json": {
  5440. "schema": {
  5441. "anyOf": [
  5442. {
  5443. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5444. },
  5445. {
  5446. "$ref": "#/components/schemas/InvalidRequestError"
  5447. }
  5448. ]
  5449. }
  5450. }
  5451. }
  5452. }
  5453. },
  5454. "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
  5455. "summary": "Create session",
  5456. "requestBody": {
  5457. "content": {
  5458. "application/json": {
  5459. "schema": {
  5460. "type": "object",
  5461. "properties": {
  5462. "parentID": {
  5463. "type": "string",
  5464. "pattern": "^ses"
  5465. },
  5466. "title": {
  5467. "type": "string"
  5468. },
  5469. "agent": {
  5470. "type": "string"
  5471. },
  5472. "model": {
  5473. "type": "object",
  5474. "properties": {
  5475. "id": {
  5476. "type": "string"
  5477. },
  5478. "providerID": {
  5479. "type": "string"
  5480. },
  5481. "variant": {
  5482. "type": "string"
  5483. }
  5484. },
  5485. "required": ["id", "providerID"],
  5486. "additionalProperties": false
  5487. },
  5488. "metadata": {
  5489. "type": "object"
  5490. },
  5491. "permission": {
  5492. "$ref": "#/components/schemas/PermissionRuleset"
  5493. },
  5494. "workspaceID": {
  5495. "type": "string",
  5496. "pattern": "^wrk"
  5497. }
  5498. },
  5499. "additionalProperties": false
  5500. }
  5501. }
  5502. }
  5503. },
  5504. "x-codeSamples": [
  5505. {
  5506. "lang": "js",
  5507. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
  5508. }
  5509. ]
  5510. }
  5511. },
  5512. "/session/status": {
  5513. "get": {
  5514. "tags": ["session"],
  5515. "operationId": "session.status",
  5516. "parameters": [
  5517. {
  5518. "name": "directory",
  5519. "in": "query",
  5520. "schema": {
  5521. "type": "string"
  5522. },
  5523. "required": false
  5524. },
  5525. {
  5526. "name": "workspace",
  5527. "in": "query",
  5528. "schema": {
  5529. "type": "string"
  5530. },
  5531. "required": false
  5532. }
  5533. ],
  5534. "responses": {
  5535. "200": {
  5536. "description": "Get session status",
  5537. "content": {
  5538. "application/json": {
  5539. "schema": {
  5540. "type": "object",
  5541. "additionalProperties": {
  5542. "$ref": "#/components/schemas/SessionStatus"
  5543. },
  5544. "description": "Get session status"
  5545. }
  5546. }
  5547. }
  5548. },
  5549. "400": {
  5550. "description": "BadRequest | InvalidRequestError",
  5551. "content": {
  5552. "application/json": {
  5553. "schema": {
  5554. "anyOf": [
  5555. {
  5556. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5557. },
  5558. {
  5559. "$ref": "#/components/schemas/InvalidRequestError"
  5560. }
  5561. ]
  5562. }
  5563. }
  5564. }
  5565. }
  5566. },
  5567. "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
  5568. "summary": "Get session status",
  5569. "x-codeSamples": [
  5570. {
  5571. "lang": "js",
  5572. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
  5573. }
  5574. ]
  5575. }
  5576. },
  5577. "/session/{sessionID}": {
  5578. "get": {
  5579. "tags": ["session"],
  5580. "operationId": "session.get",
  5581. "parameters": [
  5582. {
  5583. "name": "sessionID",
  5584. "in": "path",
  5585. "schema": {
  5586. "type": "string",
  5587. "pattern": "^ses"
  5588. },
  5589. "required": true
  5590. },
  5591. {
  5592. "name": "directory",
  5593. "in": "query",
  5594. "schema": {
  5595. "type": "string"
  5596. },
  5597. "required": false
  5598. },
  5599. {
  5600. "name": "workspace",
  5601. "in": "query",
  5602. "schema": {
  5603. "type": "string"
  5604. },
  5605. "required": false
  5606. }
  5607. ],
  5608. "responses": {
  5609. "200": {
  5610. "description": "Get session",
  5611. "content": {
  5612. "application/json": {
  5613. "schema": {
  5614. "$ref": "#/components/schemas/Session"
  5615. }
  5616. }
  5617. }
  5618. },
  5619. "400": {
  5620. "description": "BadRequest | InvalidRequestError",
  5621. "content": {
  5622. "application/json": {
  5623. "schema": {
  5624. "anyOf": [
  5625. {
  5626. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5627. },
  5628. {
  5629. "$ref": "#/components/schemas/InvalidRequestError"
  5630. }
  5631. ]
  5632. }
  5633. }
  5634. }
  5635. },
  5636. "404": {
  5637. "description": "NotFoundError",
  5638. "content": {
  5639. "application/json": {
  5640. "schema": {
  5641. "$ref": "#/components/schemas/NotFoundError"
  5642. }
  5643. }
  5644. }
  5645. }
  5646. },
  5647. "description": "Retrieve detailed information about a specific OpenCode session.",
  5648. "summary": "Get session",
  5649. "x-codeSamples": [
  5650. {
  5651. "lang": "js",
  5652. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
  5653. }
  5654. ]
  5655. },
  5656. "delete": {
  5657. "tags": ["session"],
  5658. "operationId": "session.delete",
  5659. "parameters": [
  5660. {
  5661. "name": "sessionID",
  5662. "in": "path",
  5663. "schema": {
  5664. "type": "string",
  5665. "pattern": "^ses"
  5666. },
  5667. "required": true
  5668. },
  5669. {
  5670. "name": "directory",
  5671. "in": "query",
  5672. "schema": {
  5673. "type": "string"
  5674. },
  5675. "required": false
  5676. },
  5677. {
  5678. "name": "workspace",
  5679. "in": "query",
  5680. "schema": {
  5681. "type": "string"
  5682. },
  5683. "required": false
  5684. }
  5685. ],
  5686. "responses": {
  5687. "200": {
  5688. "description": "Successfully deleted session",
  5689. "content": {
  5690. "application/json": {
  5691. "schema": {
  5692. "type": "boolean",
  5693. "description": "Successfully deleted session"
  5694. }
  5695. }
  5696. }
  5697. },
  5698. "400": {
  5699. "description": "BadRequest | InvalidRequestError",
  5700. "content": {
  5701. "application/json": {
  5702. "schema": {
  5703. "anyOf": [
  5704. {
  5705. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5706. },
  5707. {
  5708. "$ref": "#/components/schemas/InvalidRequestError"
  5709. }
  5710. ]
  5711. }
  5712. }
  5713. }
  5714. },
  5715. "404": {
  5716. "description": "NotFoundError",
  5717. "content": {
  5718. "application/json": {
  5719. "schema": {
  5720. "$ref": "#/components/schemas/NotFoundError"
  5721. }
  5722. }
  5723. }
  5724. }
  5725. },
  5726. "description": "Delete a session and permanently remove all associated data, including messages and history.",
  5727. "summary": "Delete session",
  5728. "x-codeSamples": [
  5729. {
  5730. "lang": "js",
  5731. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
  5732. }
  5733. ]
  5734. },
  5735. "patch": {
  5736. "tags": ["session"],
  5737. "operationId": "session.update",
  5738. "parameters": [
  5739. {
  5740. "name": "sessionID",
  5741. "in": "path",
  5742. "schema": {
  5743. "type": "string",
  5744. "pattern": "^ses"
  5745. },
  5746. "required": true
  5747. },
  5748. {
  5749. "name": "directory",
  5750. "in": "query",
  5751. "schema": {
  5752. "type": "string"
  5753. },
  5754. "required": false
  5755. },
  5756. {
  5757. "name": "workspace",
  5758. "in": "query",
  5759. "schema": {
  5760. "type": "string"
  5761. },
  5762. "required": false
  5763. }
  5764. ],
  5765. "responses": {
  5766. "200": {
  5767. "description": "Successfully updated session",
  5768. "content": {
  5769. "application/json": {
  5770. "schema": {
  5771. "$ref": "#/components/schemas/Session"
  5772. }
  5773. }
  5774. }
  5775. },
  5776. "400": {
  5777. "description": "BadRequest | InvalidRequestError",
  5778. "content": {
  5779. "application/json": {
  5780. "schema": {
  5781. "anyOf": [
  5782. {
  5783. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5784. },
  5785. {
  5786. "$ref": "#/components/schemas/InvalidRequestError"
  5787. }
  5788. ]
  5789. }
  5790. }
  5791. }
  5792. },
  5793. "404": {
  5794. "description": "NotFoundError",
  5795. "content": {
  5796. "application/json": {
  5797. "schema": {
  5798. "$ref": "#/components/schemas/NotFoundError"
  5799. }
  5800. }
  5801. }
  5802. }
  5803. },
  5804. "description": "Update properties of an existing session, such as title or other metadata.",
  5805. "summary": "Update session",
  5806. "requestBody": {
  5807. "content": {
  5808. "application/json": {
  5809. "schema": {
  5810. "type": "object",
  5811. "properties": {
  5812. "title": {
  5813. "type": "string"
  5814. },
  5815. "metadata": {
  5816. "type": "object"
  5817. },
  5818. "permission": {
  5819. "$ref": "#/components/schemas/PermissionRuleset"
  5820. },
  5821. "time": {
  5822. "type": "object",
  5823. "properties": {
  5824. "archived": {
  5825. "type": "number"
  5826. }
  5827. },
  5828. "additionalProperties": false
  5829. }
  5830. },
  5831. "additionalProperties": false
  5832. }
  5833. }
  5834. }
  5835. },
  5836. "x-codeSamples": [
  5837. {
  5838. "lang": "js",
  5839. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
  5840. }
  5841. ]
  5842. }
  5843. },
  5844. "/session/{sessionID}/children": {
  5845. "get": {
  5846. "tags": ["session"],
  5847. "operationId": "session.children",
  5848. "parameters": [
  5849. {
  5850. "name": "sessionID",
  5851. "in": "path",
  5852. "schema": {
  5853. "type": "string",
  5854. "pattern": "^ses"
  5855. },
  5856. "required": true
  5857. },
  5858. {
  5859. "name": "directory",
  5860. "in": "query",
  5861. "schema": {
  5862. "type": "string"
  5863. },
  5864. "required": false
  5865. },
  5866. {
  5867. "name": "workspace",
  5868. "in": "query",
  5869. "schema": {
  5870. "type": "string"
  5871. },
  5872. "required": false
  5873. }
  5874. ],
  5875. "responses": {
  5876. "200": {
  5877. "description": "List of children",
  5878. "content": {
  5879. "application/json": {
  5880. "schema": {
  5881. "type": "array",
  5882. "items": {
  5883. "$ref": "#/components/schemas/Session"
  5884. },
  5885. "description": "List of children"
  5886. }
  5887. }
  5888. }
  5889. },
  5890. "400": {
  5891. "description": "BadRequest | InvalidRequestError",
  5892. "content": {
  5893. "application/json": {
  5894. "schema": {
  5895. "anyOf": [
  5896. {
  5897. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5898. },
  5899. {
  5900. "$ref": "#/components/schemas/InvalidRequestError"
  5901. }
  5902. ]
  5903. }
  5904. }
  5905. }
  5906. },
  5907. "404": {
  5908. "description": "NotFoundError",
  5909. "content": {
  5910. "application/json": {
  5911. "schema": {
  5912. "$ref": "#/components/schemas/NotFoundError"
  5913. }
  5914. }
  5915. }
  5916. }
  5917. },
  5918. "description": "Retrieve all child sessions that were forked from the specified parent session.",
  5919. "summary": "Get session children",
  5920. "x-codeSamples": [
  5921. {
  5922. "lang": "js",
  5923. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
  5924. }
  5925. ]
  5926. }
  5927. },
  5928. "/session/{sessionID}/todo": {
  5929. "get": {
  5930. "tags": ["session"],
  5931. "operationId": "session.todo",
  5932. "parameters": [
  5933. {
  5934. "name": "sessionID",
  5935. "in": "path",
  5936. "schema": {
  5937. "type": "string",
  5938. "pattern": "^ses"
  5939. },
  5940. "required": true
  5941. },
  5942. {
  5943. "name": "directory",
  5944. "in": "query",
  5945. "schema": {
  5946. "type": "string"
  5947. },
  5948. "required": false
  5949. },
  5950. {
  5951. "name": "workspace",
  5952. "in": "query",
  5953. "schema": {
  5954. "type": "string"
  5955. },
  5956. "required": false
  5957. }
  5958. ],
  5959. "responses": {
  5960. "200": {
  5961. "description": "Todo list",
  5962. "content": {
  5963. "application/json": {
  5964. "schema": {
  5965. "type": "array",
  5966. "items": {
  5967. "$ref": "#/components/schemas/Todo"
  5968. },
  5969. "description": "Todo list"
  5970. }
  5971. }
  5972. }
  5973. },
  5974. "400": {
  5975. "description": "BadRequest | InvalidRequestError",
  5976. "content": {
  5977. "application/json": {
  5978. "schema": {
  5979. "anyOf": [
  5980. {
  5981. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5982. },
  5983. {
  5984. "$ref": "#/components/schemas/InvalidRequestError"
  5985. }
  5986. ]
  5987. }
  5988. }
  5989. }
  5990. },
  5991. "404": {
  5992. "description": "NotFoundError",
  5993. "content": {
  5994. "application/json": {
  5995. "schema": {
  5996. "$ref": "#/components/schemas/NotFoundError"
  5997. }
  5998. }
  5999. }
  6000. }
  6001. },
  6002. "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
  6003. "summary": "Get session todos",
  6004. "x-codeSamples": [
  6005. {
  6006. "lang": "js",
  6007. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
  6008. }
  6009. ]
  6010. }
  6011. },
  6012. "/session/{sessionID}/diff": {
  6013. "get": {
  6014. "tags": ["session"],
  6015. "operationId": "session.diff",
  6016. "parameters": [
  6017. {
  6018. "name": "sessionID",
  6019. "in": "path",
  6020. "schema": {
  6021. "type": "string",
  6022. "pattern": "^ses"
  6023. },
  6024. "required": true
  6025. },
  6026. {
  6027. "name": "directory",
  6028. "in": "query",
  6029. "schema": {
  6030. "type": "string"
  6031. },
  6032. "required": false
  6033. },
  6034. {
  6035. "name": "workspace",
  6036. "in": "query",
  6037. "schema": {
  6038. "type": "string"
  6039. },
  6040. "required": false
  6041. },
  6042. {
  6043. "name": "messageID",
  6044. "in": "query",
  6045. "schema": {
  6046. "type": "string",
  6047. "pattern": "^msg"
  6048. },
  6049. "required": false
  6050. }
  6051. ],
  6052. "responses": {
  6053. "200": {
  6054. "description": "Successfully retrieved diff",
  6055. "content": {
  6056. "application/json": {
  6057. "schema": {
  6058. "type": "array",
  6059. "items": {
  6060. "$ref": "#/components/schemas/SnapshotFileDiff"
  6061. },
  6062. "description": "Successfully retrieved diff"
  6063. }
  6064. }
  6065. }
  6066. },
  6067. "400": {
  6068. "description": "Bad request",
  6069. "content": {
  6070. "application/json": {
  6071. "schema": {
  6072. "$ref": "#/components/schemas/BadRequestError"
  6073. }
  6074. }
  6075. }
  6076. }
  6077. },
  6078. "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
  6079. "summary": "Get message diff",
  6080. "x-codeSamples": [
  6081. {
  6082. "lang": "js",
  6083. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
  6084. }
  6085. ]
  6086. }
  6087. },
  6088. "/session/{sessionID}/message": {
  6089. "get": {
  6090. "tags": ["session"],
  6091. "operationId": "session.messages",
  6092. "parameters": [
  6093. {
  6094. "name": "sessionID",
  6095. "in": "path",
  6096. "schema": {
  6097. "type": "string",
  6098. "pattern": "^ses"
  6099. },
  6100. "required": true
  6101. },
  6102. {
  6103. "name": "directory",
  6104. "in": "query",
  6105. "schema": {
  6106. "type": "string"
  6107. },
  6108. "required": false
  6109. },
  6110. {
  6111. "name": "workspace",
  6112. "in": "query",
  6113. "schema": {
  6114. "type": "string"
  6115. },
  6116. "required": false
  6117. },
  6118. {
  6119. "name": "limit",
  6120. "in": "query",
  6121. "schema": {
  6122. "type": "integer",
  6123. "minimum": 0,
  6124. "maximum": 9007199254740991
  6125. },
  6126. "required": false
  6127. },
  6128. {
  6129. "name": "before",
  6130. "in": "query",
  6131. "schema": {
  6132. "type": "string"
  6133. },
  6134. "required": false
  6135. }
  6136. ],
  6137. "responses": {
  6138. "200": {
  6139. "description": "List of messages",
  6140. "content": {
  6141. "application/json": {
  6142. "schema": {
  6143. "type": "array",
  6144. "items": {
  6145. "type": "object",
  6146. "properties": {
  6147. "info": {
  6148. "$ref": "#/components/schemas/Message"
  6149. },
  6150. "parts": {
  6151. "type": "array",
  6152. "items": {
  6153. "$ref": "#/components/schemas/Part"
  6154. }
  6155. }
  6156. },
  6157. "required": ["info", "parts"],
  6158. "additionalProperties": false
  6159. },
  6160. "description": "List of messages"
  6161. }
  6162. }
  6163. }
  6164. },
  6165. "400": {
  6166. "description": "BadRequest | InvalidRequestError",
  6167. "content": {
  6168. "application/json": {
  6169. "schema": {
  6170. "anyOf": [
  6171. {
  6172. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6173. },
  6174. {
  6175. "$ref": "#/components/schemas/InvalidRequestError"
  6176. }
  6177. ]
  6178. }
  6179. }
  6180. }
  6181. },
  6182. "404": {
  6183. "description": "NotFoundError",
  6184. "content": {
  6185. "application/json": {
  6186. "schema": {
  6187. "$ref": "#/components/schemas/NotFoundError"
  6188. }
  6189. }
  6190. }
  6191. }
  6192. },
  6193. "description": "Retrieve all messages in a session, including user prompts and AI responses.",
  6194. "summary": "Get session messages",
  6195. "x-codeSamples": [
  6196. {
  6197. "lang": "js",
  6198. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
  6199. }
  6200. ]
  6201. },
  6202. "post": {
  6203. "tags": ["session"],
  6204. "operationId": "session.prompt",
  6205. "parameters": [
  6206. {
  6207. "name": "sessionID",
  6208. "in": "path",
  6209. "schema": {
  6210. "type": "string",
  6211. "pattern": "^ses"
  6212. },
  6213. "required": true
  6214. },
  6215. {
  6216. "name": "directory",
  6217. "in": "query",
  6218. "schema": {
  6219. "type": "string"
  6220. },
  6221. "required": false
  6222. },
  6223. {
  6224. "name": "workspace",
  6225. "in": "query",
  6226. "schema": {
  6227. "type": "string"
  6228. },
  6229. "required": false
  6230. }
  6231. ],
  6232. "responses": {
  6233. "200": {
  6234. "description": "Created message",
  6235. "content": {
  6236. "application/json": {
  6237. "schema": {
  6238. "type": "object",
  6239. "required": ["info", "parts"],
  6240. "properties": {
  6241. "info": {
  6242. "$ref": "#/components/schemas/AssistantMessage"
  6243. },
  6244. "parts": {
  6245. "type": "array",
  6246. "items": {
  6247. "$ref": "#/components/schemas/Part"
  6248. }
  6249. }
  6250. }
  6251. }
  6252. }
  6253. }
  6254. },
  6255. "400": {
  6256. "description": "BadRequest | InvalidRequestError",
  6257. "content": {
  6258. "application/json": {
  6259. "schema": {
  6260. "anyOf": [
  6261. {
  6262. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6263. },
  6264. {
  6265. "$ref": "#/components/schemas/InvalidRequestError"
  6266. }
  6267. ]
  6268. }
  6269. }
  6270. }
  6271. },
  6272. "404": {
  6273. "description": "NotFoundError",
  6274. "content": {
  6275. "application/json": {
  6276. "schema": {
  6277. "$ref": "#/components/schemas/NotFoundError"
  6278. }
  6279. }
  6280. }
  6281. }
  6282. },
  6283. "description": "Create and send a new message to a session, streaming the AI response.",
  6284. "summary": "Send message",
  6285. "requestBody": {
  6286. "content": {
  6287. "application/json": {
  6288. "schema": {
  6289. "type": "object",
  6290. "properties": {
  6291. "messageID": {
  6292. "type": "string",
  6293. "pattern": "^msg"
  6294. },
  6295. "model": {
  6296. "type": "object",
  6297. "properties": {
  6298. "providerID": {
  6299. "type": "string"
  6300. },
  6301. "modelID": {
  6302. "type": "string"
  6303. }
  6304. },
  6305. "required": ["providerID", "modelID"],
  6306. "additionalProperties": false
  6307. },
  6308. "agent": {
  6309. "type": "string"
  6310. },
  6311. "noReply": {
  6312. "type": "boolean"
  6313. },
  6314. "tools": {
  6315. "type": "object",
  6316. "additionalProperties": {
  6317. "type": "boolean"
  6318. }
  6319. },
  6320. "format": {
  6321. "$ref": "#/components/schemas/OutputFormat"
  6322. },
  6323. "system": {
  6324. "type": "string"
  6325. },
  6326. "variant": {
  6327. "type": "string"
  6328. },
  6329. "parts": {
  6330. "type": "array",
  6331. "items": {
  6332. "anyOf": [
  6333. {
  6334. "$ref": "#/components/schemas/TextPartInput"
  6335. },
  6336. {
  6337. "$ref": "#/components/schemas/FilePartInput"
  6338. },
  6339. {
  6340. "$ref": "#/components/schemas/AgentPartInput"
  6341. },
  6342. {
  6343. "$ref": "#/components/schemas/SubtaskPartInput"
  6344. }
  6345. ]
  6346. }
  6347. }
  6348. },
  6349. "required": ["parts"],
  6350. "additionalProperties": false
  6351. }
  6352. }
  6353. }
  6354. },
  6355. "x-codeSamples": [
  6356. {
  6357. "lang": "js",
  6358. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  6359. }
  6360. ]
  6361. }
  6362. },
  6363. "/session/{sessionID}/message/{messageID}": {
  6364. "get": {
  6365. "tags": ["session"],
  6366. "operationId": "session.message",
  6367. "parameters": [
  6368. {
  6369. "name": "sessionID",
  6370. "in": "path",
  6371. "schema": {
  6372. "type": "string",
  6373. "pattern": "^ses"
  6374. },
  6375. "required": true
  6376. },
  6377. {
  6378. "name": "messageID",
  6379. "in": "path",
  6380. "schema": {
  6381. "type": "string",
  6382. "pattern": "^msg"
  6383. },
  6384. "required": true
  6385. },
  6386. {
  6387. "name": "directory",
  6388. "in": "query",
  6389. "schema": {
  6390. "type": "string"
  6391. },
  6392. "required": false
  6393. },
  6394. {
  6395. "name": "workspace",
  6396. "in": "query",
  6397. "schema": {
  6398. "type": "string"
  6399. },
  6400. "required": false
  6401. }
  6402. ],
  6403. "responses": {
  6404. "200": {
  6405. "description": "Message",
  6406. "content": {
  6407. "application/json": {
  6408. "schema": {
  6409. "type": "object",
  6410. "properties": {
  6411. "info": {
  6412. "$ref": "#/components/schemas/Message"
  6413. },
  6414. "parts": {
  6415. "type": "array",
  6416. "items": {
  6417. "$ref": "#/components/schemas/Part"
  6418. }
  6419. }
  6420. },
  6421. "required": ["info", "parts"],
  6422. "additionalProperties": false,
  6423. "description": "Message"
  6424. }
  6425. }
  6426. }
  6427. },
  6428. "400": {
  6429. "description": "BadRequest | InvalidRequestError",
  6430. "content": {
  6431. "application/json": {
  6432. "schema": {
  6433. "anyOf": [
  6434. {
  6435. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6436. },
  6437. {
  6438. "$ref": "#/components/schemas/InvalidRequestError"
  6439. }
  6440. ]
  6441. }
  6442. }
  6443. }
  6444. },
  6445. "404": {
  6446. "description": "NotFoundError",
  6447. "content": {
  6448. "application/json": {
  6449. "schema": {
  6450. "$ref": "#/components/schemas/NotFoundError"
  6451. }
  6452. }
  6453. }
  6454. }
  6455. },
  6456. "description": "Retrieve a specific message from a session by its message ID.",
  6457. "summary": "Get message",
  6458. "x-codeSamples": [
  6459. {
  6460. "lang": "js",
  6461. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  6462. }
  6463. ]
  6464. },
  6465. "delete": {
  6466. "tags": ["session"],
  6467. "operationId": "session.deleteMessage",
  6468. "parameters": [
  6469. {
  6470. "name": "sessionID",
  6471. "in": "path",
  6472. "schema": {
  6473. "type": "string",
  6474. "pattern": "^ses"
  6475. },
  6476. "required": true
  6477. },
  6478. {
  6479. "name": "messageID",
  6480. "in": "path",
  6481. "schema": {
  6482. "type": "string",
  6483. "pattern": "^msg"
  6484. },
  6485. "required": true
  6486. },
  6487. {
  6488. "name": "directory",
  6489. "in": "query",
  6490. "schema": {
  6491. "type": "string"
  6492. },
  6493. "required": false
  6494. },
  6495. {
  6496. "name": "workspace",
  6497. "in": "query",
  6498. "schema": {
  6499. "type": "string"
  6500. },
  6501. "required": false
  6502. }
  6503. ],
  6504. "responses": {
  6505. "200": {
  6506. "description": "Successfully deleted message",
  6507. "content": {
  6508. "application/json": {
  6509. "schema": {
  6510. "type": "boolean",
  6511. "description": "Successfully deleted message"
  6512. }
  6513. }
  6514. }
  6515. },
  6516. "400": {
  6517. "description": "BadRequest | InvalidRequestError",
  6518. "content": {
  6519. "application/json": {
  6520. "schema": {
  6521. "anyOf": [
  6522. {
  6523. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6524. },
  6525. {
  6526. "$ref": "#/components/schemas/InvalidRequestError"
  6527. }
  6528. ]
  6529. }
  6530. }
  6531. }
  6532. },
  6533. "404": {
  6534. "description": "NotFoundError",
  6535. "content": {
  6536. "application/json": {
  6537. "schema": {
  6538. "$ref": "#/components/schemas/NotFoundError"
  6539. }
  6540. }
  6541. }
  6542. },
  6543. "409": {
  6544. "description": "SessionBusyError",
  6545. "content": {
  6546. "application/json": {
  6547. "schema": {
  6548. "$ref": "#/components/schemas/SessionBusyError"
  6549. }
  6550. }
  6551. }
  6552. }
  6553. },
  6554. "description": "Permanently delete a specific message and all of its parts from a session without reverting file changes.",
  6555. "summary": "Delete message",
  6556. "x-codeSamples": [
  6557. {
  6558. "lang": "js",
  6559. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.deleteMessage({\n ...\n})"
  6560. }
  6561. ]
  6562. }
  6563. },
  6564. "/session/{sessionID}/fork": {
  6565. "post": {
  6566. "tags": ["session"],
  6567. "operationId": "session.fork",
  6568. "parameters": [
  6569. {
  6570. "name": "sessionID",
  6571. "in": "path",
  6572. "schema": {
  6573. "type": "string",
  6574. "pattern": "^ses"
  6575. },
  6576. "required": true
  6577. },
  6578. {
  6579. "name": "directory",
  6580. "in": "query",
  6581. "schema": {
  6582. "type": "string"
  6583. },
  6584. "required": false
  6585. },
  6586. {
  6587. "name": "workspace",
  6588. "in": "query",
  6589. "schema": {
  6590. "type": "string"
  6591. },
  6592. "required": false
  6593. }
  6594. ],
  6595. "responses": {
  6596. "200": {
  6597. "description": "200",
  6598. "content": {
  6599. "application/json": {
  6600. "schema": {
  6601. "$ref": "#/components/schemas/Session"
  6602. }
  6603. }
  6604. }
  6605. },
  6606. "400": {
  6607. "description": "BadRequest | InvalidRequestError",
  6608. "content": {
  6609. "application/json": {
  6610. "schema": {
  6611. "anyOf": [
  6612. {
  6613. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6614. },
  6615. {
  6616. "$ref": "#/components/schemas/InvalidRequestError"
  6617. }
  6618. ]
  6619. }
  6620. }
  6621. }
  6622. },
  6623. "404": {
  6624. "description": "NotFoundError",
  6625. "content": {
  6626. "application/json": {
  6627. "schema": {
  6628. "$ref": "#/components/schemas/NotFoundError"
  6629. }
  6630. }
  6631. }
  6632. }
  6633. },
  6634. "description": "Create a new session by forking an existing session at a specific message point.",
  6635. "summary": "Fork session",
  6636. "requestBody": {
  6637. "content": {
  6638. "application/json": {
  6639. "schema": {
  6640. "type": "object",
  6641. "properties": {
  6642. "messageID": {
  6643. "type": "string",
  6644. "pattern": "^msg"
  6645. }
  6646. },
  6647. "additionalProperties": false
  6648. }
  6649. }
  6650. }
  6651. },
  6652. "x-codeSamples": [
  6653. {
  6654. "lang": "js",
  6655. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  6656. }
  6657. ]
  6658. }
  6659. },
  6660. "/session/{sessionID}/abort": {
  6661. "post": {
  6662. "tags": ["session"],
  6663. "operationId": "session.abort",
  6664. "parameters": [
  6665. {
  6666. "name": "sessionID",
  6667. "in": "path",
  6668. "schema": {
  6669. "type": "string",
  6670. "pattern": "^ses"
  6671. },
  6672. "required": true
  6673. },
  6674. {
  6675. "name": "directory",
  6676. "in": "query",
  6677. "schema": {
  6678. "type": "string"
  6679. },
  6680. "required": false
  6681. },
  6682. {
  6683. "name": "workspace",
  6684. "in": "query",
  6685. "schema": {
  6686. "type": "string"
  6687. },
  6688. "required": false
  6689. }
  6690. ],
  6691. "responses": {
  6692. "200": {
  6693. "description": "Aborted session",
  6694. "content": {
  6695. "application/json": {
  6696. "schema": {
  6697. "type": "boolean",
  6698. "description": "Aborted session"
  6699. }
  6700. }
  6701. }
  6702. },
  6703. "400": {
  6704. "description": "BadRequest | InvalidRequestError",
  6705. "content": {
  6706. "application/json": {
  6707. "schema": {
  6708. "anyOf": [
  6709. {
  6710. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6711. },
  6712. {
  6713. "$ref": "#/components/schemas/InvalidRequestError"
  6714. }
  6715. ]
  6716. }
  6717. }
  6718. }
  6719. }
  6720. },
  6721. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  6722. "summary": "Abort session",
  6723. "x-codeSamples": [
  6724. {
  6725. "lang": "js",
  6726. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  6727. }
  6728. ]
  6729. }
  6730. },
  6731. "/session/{sessionID}/init": {
  6732. "post": {
  6733. "tags": ["session"],
  6734. "operationId": "session.init",
  6735. "parameters": [
  6736. {
  6737. "name": "sessionID",
  6738. "in": "path",
  6739. "schema": {
  6740. "type": "string",
  6741. "pattern": "^ses"
  6742. },
  6743. "required": true
  6744. },
  6745. {
  6746. "name": "directory",
  6747. "in": "query",
  6748. "schema": {
  6749. "type": "string"
  6750. },
  6751. "required": false
  6752. },
  6753. {
  6754. "name": "workspace",
  6755. "in": "query",
  6756. "schema": {
  6757. "type": "string"
  6758. },
  6759. "required": false
  6760. }
  6761. ],
  6762. "responses": {
  6763. "200": {
  6764. "description": "200",
  6765. "content": {
  6766. "application/json": {
  6767. "schema": {
  6768. "type": "boolean",
  6769. "description": "200"
  6770. }
  6771. }
  6772. }
  6773. },
  6774. "400": {
  6775. "description": "BadRequest | InvalidRequestError",
  6776. "content": {
  6777. "application/json": {
  6778. "schema": {
  6779. "anyOf": [
  6780. {
  6781. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6782. },
  6783. {
  6784. "$ref": "#/components/schemas/InvalidRequestError"
  6785. }
  6786. ]
  6787. }
  6788. }
  6789. }
  6790. },
  6791. "404": {
  6792. "description": "NotFoundError",
  6793. "content": {
  6794. "application/json": {
  6795. "schema": {
  6796. "$ref": "#/components/schemas/NotFoundError"
  6797. }
  6798. }
  6799. }
  6800. }
  6801. },
  6802. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  6803. "summary": "Initialize session",
  6804. "requestBody": {
  6805. "content": {
  6806. "application/json": {
  6807. "schema": {
  6808. "type": "object",
  6809. "properties": {
  6810. "modelID": {
  6811. "type": "string"
  6812. },
  6813. "providerID": {
  6814. "type": "string"
  6815. },
  6816. "messageID": {
  6817. "type": "string",
  6818. "pattern": "^msg"
  6819. }
  6820. },
  6821. "required": ["modelID", "providerID", "messageID"],
  6822. "additionalProperties": false
  6823. }
  6824. }
  6825. }
  6826. },
  6827. "x-codeSamples": [
  6828. {
  6829. "lang": "js",
  6830. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  6831. }
  6832. ]
  6833. }
  6834. },
  6835. "/session/{sessionID}/share": {
  6836. "post": {
  6837. "tags": ["session"],
  6838. "operationId": "session.share",
  6839. "parameters": [
  6840. {
  6841. "name": "sessionID",
  6842. "in": "path",
  6843. "schema": {
  6844. "type": "string",
  6845. "pattern": "^ses"
  6846. },
  6847. "required": true
  6848. },
  6849. {
  6850. "name": "directory",
  6851. "in": "query",
  6852. "schema": {
  6853. "type": "string"
  6854. },
  6855. "required": false
  6856. },
  6857. {
  6858. "name": "workspace",
  6859. "in": "query",
  6860. "schema": {
  6861. "type": "string"
  6862. },
  6863. "required": false
  6864. }
  6865. ],
  6866. "responses": {
  6867. "200": {
  6868. "description": "Successfully shared session",
  6869. "content": {
  6870. "application/json": {
  6871. "schema": {
  6872. "$ref": "#/components/schemas/Session"
  6873. }
  6874. }
  6875. }
  6876. },
  6877. "400": {
  6878. "description": "Bad request",
  6879. "content": {
  6880. "application/json": {
  6881. "schema": {
  6882. "$ref": "#/components/schemas/BadRequestError"
  6883. }
  6884. }
  6885. }
  6886. },
  6887. "404": {
  6888. "description": "NotFoundError",
  6889. "content": {
  6890. "application/json": {
  6891. "schema": {
  6892. "$ref": "#/components/schemas/NotFoundError"
  6893. }
  6894. }
  6895. }
  6896. },
  6897. "500": {
  6898. "description": "InternalServerError",
  6899. "content": {
  6900. "application/json": {
  6901. "schema": {
  6902. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6903. }
  6904. }
  6905. }
  6906. }
  6907. },
  6908. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  6909. "summary": "Share session",
  6910. "x-codeSamples": [
  6911. {
  6912. "lang": "js",
  6913. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  6914. }
  6915. ]
  6916. },
  6917. "delete": {
  6918. "tags": ["session"],
  6919. "operationId": "session.unshare",
  6920. "parameters": [
  6921. {
  6922. "name": "sessionID",
  6923. "in": "path",
  6924. "schema": {
  6925. "type": "string",
  6926. "pattern": "^ses"
  6927. },
  6928. "required": true
  6929. },
  6930. {
  6931. "name": "directory",
  6932. "in": "query",
  6933. "schema": {
  6934. "type": "string"
  6935. },
  6936. "required": false
  6937. },
  6938. {
  6939. "name": "workspace",
  6940. "in": "query",
  6941. "schema": {
  6942. "type": "string"
  6943. },
  6944. "required": false
  6945. }
  6946. ],
  6947. "responses": {
  6948. "200": {
  6949. "description": "Successfully unshared session",
  6950. "content": {
  6951. "application/json": {
  6952. "schema": {
  6953. "$ref": "#/components/schemas/Session"
  6954. }
  6955. }
  6956. }
  6957. },
  6958. "400": {
  6959. "description": "Bad request",
  6960. "content": {
  6961. "application/json": {
  6962. "schema": {
  6963. "$ref": "#/components/schemas/BadRequestError"
  6964. }
  6965. }
  6966. }
  6967. },
  6968. "404": {
  6969. "description": "NotFoundError",
  6970. "content": {
  6971. "application/json": {
  6972. "schema": {
  6973. "$ref": "#/components/schemas/NotFoundError"
  6974. }
  6975. }
  6976. }
  6977. },
  6978. "500": {
  6979. "description": "InternalServerError",
  6980. "content": {
  6981. "application/json": {
  6982. "schema": {
  6983. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6984. }
  6985. }
  6986. }
  6987. }
  6988. },
  6989. "description": "Remove the shareable link for a session, making it private again.",
  6990. "summary": "Unshare session",
  6991. "x-codeSamples": [
  6992. {
  6993. "lang": "js",
  6994. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  6995. }
  6996. ]
  6997. }
  6998. },
  6999. "/session/{sessionID}/summarize": {
  7000. "post": {
  7001. "tags": ["session"],
  7002. "operationId": "session.summarize",
  7003. "parameters": [
  7004. {
  7005. "name": "sessionID",
  7006. "in": "path",
  7007. "schema": {
  7008. "type": "string",
  7009. "pattern": "^ses"
  7010. },
  7011. "required": true
  7012. },
  7013. {
  7014. "name": "directory",
  7015. "in": "query",
  7016. "schema": {
  7017. "type": "string"
  7018. },
  7019. "required": false
  7020. },
  7021. {
  7022. "name": "workspace",
  7023. "in": "query",
  7024. "schema": {
  7025. "type": "string"
  7026. },
  7027. "required": false
  7028. }
  7029. ],
  7030. "responses": {
  7031. "200": {
  7032. "description": "Summarized session",
  7033. "content": {
  7034. "application/json": {
  7035. "schema": {
  7036. "type": "boolean",
  7037. "description": "Summarized session"
  7038. }
  7039. }
  7040. }
  7041. },
  7042. "400": {
  7043. "description": "BadRequest | InvalidRequestError",
  7044. "content": {
  7045. "application/json": {
  7046. "schema": {
  7047. "anyOf": [
  7048. {
  7049. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7050. },
  7051. {
  7052. "$ref": "#/components/schemas/InvalidRequestError"
  7053. }
  7054. ]
  7055. }
  7056. }
  7057. }
  7058. },
  7059. "404": {
  7060. "description": "NotFoundError",
  7061. "content": {
  7062. "application/json": {
  7063. "schema": {
  7064. "$ref": "#/components/schemas/NotFoundError"
  7065. }
  7066. }
  7067. }
  7068. }
  7069. },
  7070. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  7071. "summary": "Summarize session",
  7072. "requestBody": {
  7073. "content": {
  7074. "application/json": {
  7075. "schema": {
  7076. "type": "object",
  7077. "properties": {
  7078. "providerID": {
  7079. "type": "string"
  7080. },
  7081. "modelID": {
  7082. "type": "string"
  7083. },
  7084. "auto": {
  7085. "type": "boolean"
  7086. }
  7087. },
  7088. "required": ["providerID", "modelID"],
  7089. "additionalProperties": false
  7090. }
  7091. }
  7092. }
  7093. },
  7094. "x-codeSamples": [
  7095. {
  7096. "lang": "js",
  7097. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  7098. }
  7099. ]
  7100. }
  7101. },
  7102. "/session/{sessionID}/prompt_async": {
  7103. "post": {
  7104. "tags": ["session"],
  7105. "operationId": "session.prompt_async",
  7106. "parameters": [
  7107. {
  7108. "name": "sessionID",
  7109. "in": "path",
  7110. "schema": {
  7111. "type": "string",
  7112. "pattern": "^ses"
  7113. },
  7114. "required": true
  7115. },
  7116. {
  7117. "name": "directory",
  7118. "in": "query",
  7119. "schema": {
  7120. "type": "string"
  7121. },
  7122. "required": false
  7123. },
  7124. {
  7125. "name": "workspace",
  7126. "in": "query",
  7127. "schema": {
  7128. "type": "string"
  7129. },
  7130. "required": false
  7131. }
  7132. ],
  7133. "responses": {
  7134. "204": {
  7135. "description": "Prompt accepted"
  7136. },
  7137. "400": {
  7138. "description": "BadRequest | InvalidRequestError",
  7139. "content": {
  7140. "application/json": {
  7141. "schema": {
  7142. "anyOf": [
  7143. {
  7144. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7145. },
  7146. {
  7147. "$ref": "#/components/schemas/InvalidRequestError"
  7148. }
  7149. ]
  7150. }
  7151. }
  7152. }
  7153. },
  7154. "404": {
  7155. "description": "NotFoundError",
  7156. "content": {
  7157. "application/json": {
  7158. "schema": {
  7159. "$ref": "#/components/schemas/NotFoundError"
  7160. }
  7161. }
  7162. }
  7163. }
  7164. },
  7165. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  7166. "summary": "Send async message",
  7167. "requestBody": {
  7168. "content": {
  7169. "application/json": {
  7170. "schema": {
  7171. "type": "object",
  7172. "properties": {
  7173. "messageID": {
  7174. "type": "string",
  7175. "pattern": "^msg"
  7176. },
  7177. "model": {
  7178. "type": "object",
  7179. "properties": {
  7180. "providerID": {
  7181. "type": "string"
  7182. },
  7183. "modelID": {
  7184. "type": "string"
  7185. }
  7186. },
  7187. "required": ["providerID", "modelID"],
  7188. "additionalProperties": false
  7189. },
  7190. "agent": {
  7191. "type": "string"
  7192. },
  7193. "noReply": {
  7194. "type": "boolean"
  7195. },
  7196. "tools": {
  7197. "type": "object",
  7198. "additionalProperties": {
  7199. "type": "boolean"
  7200. }
  7201. },
  7202. "format": {
  7203. "$ref": "#/components/schemas/OutputFormat"
  7204. },
  7205. "system": {
  7206. "type": "string"
  7207. },
  7208. "variant": {
  7209. "type": "string"
  7210. },
  7211. "parts": {
  7212. "type": "array",
  7213. "items": {
  7214. "anyOf": [
  7215. {
  7216. "$ref": "#/components/schemas/TextPartInput"
  7217. },
  7218. {
  7219. "$ref": "#/components/schemas/FilePartInput"
  7220. },
  7221. {
  7222. "$ref": "#/components/schemas/AgentPartInput"
  7223. },
  7224. {
  7225. "$ref": "#/components/schemas/SubtaskPartInput"
  7226. }
  7227. ]
  7228. }
  7229. }
  7230. },
  7231. "required": ["parts"],
  7232. "additionalProperties": false
  7233. }
  7234. }
  7235. }
  7236. },
  7237. "x-codeSamples": [
  7238. {
  7239. "lang": "js",
  7240. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  7241. }
  7242. ]
  7243. }
  7244. },
  7245. "/session/{sessionID}/command": {
  7246. "post": {
  7247. "tags": ["session"],
  7248. "operationId": "session.command",
  7249. "parameters": [
  7250. {
  7251. "name": "sessionID",
  7252. "in": "path",
  7253. "schema": {
  7254. "type": "string",
  7255. "pattern": "^ses"
  7256. },
  7257. "required": true
  7258. },
  7259. {
  7260. "name": "directory",
  7261. "in": "query",
  7262. "schema": {
  7263. "type": "string"
  7264. },
  7265. "required": false
  7266. },
  7267. {
  7268. "name": "workspace",
  7269. "in": "query",
  7270. "schema": {
  7271. "type": "string"
  7272. },
  7273. "required": false
  7274. }
  7275. ],
  7276. "responses": {
  7277. "200": {
  7278. "description": "Created message",
  7279. "content": {
  7280. "application/json": {
  7281. "schema": {
  7282. "type": "object",
  7283. "required": ["info", "parts"],
  7284. "properties": {
  7285. "info": {
  7286. "$ref": "#/components/schemas/AssistantMessage"
  7287. },
  7288. "parts": {
  7289. "type": "array",
  7290. "items": {
  7291. "$ref": "#/components/schemas/Part"
  7292. }
  7293. }
  7294. }
  7295. }
  7296. }
  7297. }
  7298. },
  7299. "400": {
  7300. "description": "BadRequest | InvalidRequestError",
  7301. "content": {
  7302. "application/json": {
  7303. "schema": {
  7304. "anyOf": [
  7305. {
  7306. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7307. },
  7308. {
  7309. "$ref": "#/components/schemas/InvalidRequestError"
  7310. }
  7311. ]
  7312. }
  7313. }
  7314. }
  7315. },
  7316. "404": {
  7317. "description": "NotFoundError",
  7318. "content": {
  7319. "application/json": {
  7320. "schema": {
  7321. "$ref": "#/components/schemas/NotFoundError"
  7322. }
  7323. }
  7324. }
  7325. }
  7326. },
  7327. "description": "Send a new command to a session for execution by the AI assistant.",
  7328. "summary": "Send command",
  7329. "requestBody": {
  7330. "content": {
  7331. "application/json": {
  7332. "schema": {
  7333. "type": "object",
  7334. "properties": {
  7335. "messageID": {
  7336. "type": "string",
  7337. "pattern": "^msg"
  7338. },
  7339. "agent": {
  7340. "type": "string"
  7341. },
  7342. "model": {
  7343. "type": "string"
  7344. },
  7345. "arguments": {
  7346. "type": "string"
  7347. },
  7348. "command": {
  7349. "type": "string"
  7350. },
  7351. "variant": {
  7352. "type": "string"
  7353. },
  7354. "parts": {
  7355. "type": "array",
  7356. "items": {
  7357. "type": "object",
  7358. "properties": {
  7359. "id": {
  7360. "type": "string",
  7361. "pattern": "^prt"
  7362. },
  7363. "type": {
  7364. "type": "string",
  7365. "enum": ["file"]
  7366. },
  7367. "mime": {
  7368. "type": "string"
  7369. },
  7370. "filename": {
  7371. "type": "string"
  7372. },
  7373. "url": {
  7374. "type": "string"
  7375. },
  7376. "source": {
  7377. "$ref": "#/components/schemas/FilePartSource"
  7378. }
  7379. },
  7380. "required": ["type", "mime", "url"],
  7381. "additionalProperties": false
  7382. }
  7383. }
  7384. },
  7385. "required": ["arguments", "command"],
  7386. "additionalProperties": false
  7387. }
  7388. }
  7389. }
  7390. },
  7391. "x-codeSamples": [
  7392. {
  7393. "lang": "js",
  7394. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  7395. }
  7396. ]
  7397. }
  7398. },
  7399. "/session/{sessionID}/shell": {
  7400. "post": {
  7401. "tags": ["session"],
  7402. "operationId": "session.shell",
  7403. "parameters": [
  7404. {
  7405. "name": "sessionID",
  7406. "in": "path",
  7407. "schema": {
  7408. "type": "string",
  7409. "pattern": "^ses"
  7410. },
  7411. "required": true
  7412. },
  7413. {
  7414. "name": "directory",
  7415. "in": "query",
  7416. "schema": {
  7417. "type": "string"
  7418. },
  7419. "required": false
  7420. },
  7421. {
  7422. "name": "workspace",
  7423. "in": "query",
  7424. "schema": {
  7425. "type": "string"
  7426. },
  7427. "required": false
  7428. }
  7429. ],
  7430. "responses": {
  7431. "200": {
  7432. "description": "Created message",
  7433. "content": {
  7434. "application/json": {
  7435. "schema": {
  7436. "type": "object",
  7437. "properties": {
  7438. "info": {
  7439. "$ref": "#/components/schemas/Message"
  7440. },
  7441. "parts": {
  7442. "type": "array",
  7443. "items": {
  7444. "$ref": "#/components/schemas/Part"
  7445. }
  7446. }
  7447. },
  7448. "required": ["info", "parts"],
  7449. "additionalProperties": false,
  7450. "description": "Created message"
  7451. }
  7452. }
  7453. }
  7454. },
  7455. "400": {
  7456. "description": "BadRequest | InvalidRequestError",
  7457. "content": {
  7458. "application/json": {
  7459. "schema": {
  7460. "anyOf": [
  7461. {
  7462. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7463. },
  7464. {
  7465. "$ref": "#/components/schemas/InvalidRequestError"
  7466. }
  7467. ]
  7468. }
  7469. }
  7470. }
  7471. },
  7472. "404": {
  7473. "description": "NotFoundError",
  7474. "content": {
  7475. "application/json": {
  7476. "schema": {
  7477. "$ref": "#/components/schemas/NotFoundError"
  7478. }
  7479. }
  7480. }
  7481. },
  7482. "409": {
  7483. "description": "SessionBusyError",
  7484. "content": {
  7485. "application/json": {
  7486. "schema": {
  7487. "$ref": "#/components/schemas/SessionBusyError"
  7488. }
  7489. }
  7490. }
  7491. }
  7492. },
  7493. "description": "Execute a shell command within the session context and return the AI's response.",
  7494. "summary": "Run shell command",
  7495. "requestBody": {
  7496. "content": {
  7497. "application/json": {
  7498. "schema": {
  7499. "type": "object",
  7500. "properties": {
  7501. "messageID": {
  7502. "type": "string",
  7503. "pattern": "^msg"
  7504. },
  7505. "agent": {
  7506. "type": "string"
  7507. },
  7508. "model": {
  7509. "type": "object",
  7510. "properties": {
  7511. "providerID": {
  7512. "type": "string"
  7513. },
  7514. "modelID": {
  7515. "type": "string"
  7516. }
  7517. },
  7518. "required": ["providerID", "modelID"],
  7519. "additionalProperties": false
  7520. },
  7521. "command": {
  7522. "type": "string"
  7523. }
  7524. },
  7525. "required": ["agent", "command"],
  7526. "additionalProperties": false
  7527. }
  7528. }
  7529. }
  7530. },
  7531. "x-codeSamples": [
  7532. {
  7533. "lang": "js",
  7534. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  7535. }
  7536. ]
  7537. }
  7538. },
  7539. "/session/{sessionID}/revert": {
  7540. "post": {
  7541. "tags": ["session"],
  7542. "operationId": "session.revert",
  7543. "parameters": [
  7544. {
  7545. "name": "sessionID",
  7546. "in": "path",
  7547. "schema": {
  7548. "type": "string",
  7549. "pattern": "^ses"
  7550. },
  7551. "required": true
  7552. },
  7553. {
  7554. "name": "directory",
  7555. "in": "query",
  7556. "schema": {
  7557. "type": "string"
  7558. },
  7559. "required": false
  7560. },
  7561. {
  7562. "name": "workspace",
  7563. "in": "query",
  7564. "schema": {
  7565. "type": "string"
  7566. },
  7567. "required": false
  7568. }
  7569. ],
  7570. "responses": {
  7571. "200": {
  7572. "description": "Updated session",
  7573. "content": {
  7574. "application/json": {
  7575. "schema": {
  7576. "$ref": "#/components/schemas/Session"
  7577. }
  7578. }
  7579. }
  7580. },
  7581. "400": {
  7582. "description": "BadRequest | InvalidRequestError",
  7583. "content": {
  7584. "application/json": {
  7585. "schema": {
  7586. "anyOf": [
  7587. {
  7588. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7589. },
  7590. {
  7591. "$ref": "#/components/schemas/InvalidRequestError"
  7592. }
  7593. ]
  7594. }
  7595. }
  7596. }
  7597. },
  7598. "404": {
  7599. "description": "NotFoundError",
  7600. "content": {
  7601. "application/json": {
  7602. "schema": {
  7603. "$ref": "#/components/schemas/NotFoundError"
  7604. }
  7605. }
  7606. }
  7607. },
  7608. "409": {
  7609. "description": "SessionBusyError",
  7610. "content": {
  7611. "application/json": {
  7612. "schema": {
  7613. "$ref": "#/components/schemas/SessionBusyError"
  7614. }
  7615. }
  7616. }
  7617. }
  7618. },
  7619. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  7620. "summary": "Revert message",
  7621. "requestBody": {
  7622. "content": {
  7623. "application/json": {
  7624. "schema": {
  7625. "type": "object",
  7626. "properties": {
  7627. "messageID": {
  7628. "type": "string",
  7629. "pattern": "^msg"
  7630. },
  7631. "partID": {
  7632. "type": "string",
  7633. "pattern": "^prt"
  7634. }
  7635. },
  7636. "required": ["messageID"],
  7637. "additionalProperties": false
  7638. }
  7639. }
  7640. }
  7641. },
  7642. "x-codeSamples": [
  7643. {
  7644. "lang": "js",
  7645. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  7646. }
  7647. ]
  7648. }
  7649. },
  7650. "/session/{sessionID}/unrevert": {
  7651. "post": {
  7652. "tags": ["session"],
  7653. "operationId": "session.unrevert",
  7654. "parameters": [
  7655. {
  7656. "name": "sessionID",
  7657. "in": "path",
  7658. "schema": {
  7659. "type": "string",
  7660. "pattern": "^ses"
  7661. },
  7662. "required": true
  7663. },
  7664. {
  7665. "name": "directory",
  7666. "in": "query",
  7667. "schema": {
  7668. "type": "string"
  7669. },
  7670. "required": false
  7671. },
  7672. {
  7673. "name": "workspace",
  7674. "in": "query",
  7675. "schema": {
  7676. "type": "string"
  7677. },
  7678. "required": false
  7679. }
  7680. ],
  7681. "responses": {
  7682. "200": {
  7683. "description": "Updated session",
  7684. "content": {
  7685. "application/json": {
  7686. "schema": {
  7687. "$ref": "#/components/schemas/Session"
  7688. }
  7689. }
  7690. }
  7691. },
  7692. "400": {
  7693. "description": "BadRequest | InvalidRequestError",
  7694. "content": {
  7695. "application/json": {
  7696. "schema": {
  7697. "anyOf": [
  7698. {
  7699. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7700. },
  7701. {
  7702. "$ref": "#/components/schemas/InvalidRequestError"
  7703. }
  7704. ]
  7705. }
  7706. }
  7707. }
  7708. },
  7709. "404": {
  7710. "description": "NotFoundError",
  7711. "content": {
  7712. "application/json": {
  7713. "schema": {
  7714. "$ref": "#/components/schemas/NotFoundError"
  7715. }
  7716. }
  7717. }
  7718. },
  7719. "409": {
  7720. "description": "SessionBusyError",
  7721. "content": {
  7722. "application/json": {
  7723. "schema": {
  7724. "$ref": "#/components/schemas/SessionBusyError"
  7725. }
  7726. }
  7727. }
  7728. }
  7729. },
  7730. "description": "Restore all previously reverted messages in a session.",
  7731. "summary": "Restore reverted messages",
  7732. "x-codeSamples": [
  7733. {
  7734. "lang": "js",
  7735. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  7736. }
  7737. ]
  7738. }
  7739. },
  7740. "/session/{sessionID}/permissions/{permissionID}": {
  7741. "post": {
  7742. "tags": ["session"],
  7743. "operationId": "permission.respond",
  7744. "parameters": [
  7745. {
  7746. "name": "sessionID",
  7747. "in": "path",
  7748. "schema": {
  7749. "type": "string",
  7750. "pattern": "^ses"
  7751. },
  7752. "required": true
  7753. },
  7754. {
  7755. "name": "permissionID",
  7756. "in": "path",
  7757. "schema": {
  7758. "type": "string",
  7759. "pattern": "^per"
  7760. },
  7761. "required": true
  7762. },
  7763. {
  7764. "name": "directory",
  7765. "in": "query",
  7766. "schema": {
  7767. "type": "string"
  7768. },
  7769. "required": false
  7770. },
  7771. {
  7772. "name": "workspace",
  7773. "in": "query",
  7774. "schema": {
  7775. "type": "string"
  7776. },
  7777. "required": false
  7778. }
  7779. ],
  7780. "responses": {
  7781. "200": {
  7782. "description": "Permission processed successfully",
  7783. "content": {
  7784. "application/json": {
  7785. "schema": {
  7786. "type": "boolean",
  7787. "description": "Permission processed successfully"
  7788. }
  7789. }
  7790. }
  7791. },
  7792. "400": {
  7793. "description": "BadRequest | InvalidRequestError",
  7794. "content": {
  7795. "application/json": {
  7796. "schema": {
  7797. "anyOf": [
  7798. {
  7799. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7800. },
  7801. {
  7802. "$ref": "#/components/schemas/InvalidRequestError"
  7803. }
  7804. ]
  7805. }
  7806. }
  7807. }
  7808. },
  7809. "404": {
  7810. "description": "NotFoundError | PermissionNotFoundError",
  7811. "content": {
  7812. "application/json": {
  7813. "schema": {
  7814. "anyOf": [
  7815. {
  7816. "$ref": "#/components/schemas/NotFoundError"
  7817. },
  7818. {
  7819. "$ref": "#/components/schemas/PermissionNotFoundError"
  7820. }
  7821. ]
  7822. }
  7823. }
  7824. }
  7825. }
  7826. },
  7827. "description": "Approve or deny a permission request from the AI assistant.",
  7828. "summary": "Respond to permission",
  7829. "deprecated": true,
  7830. "requestBody": {
  7831. "content": {
  7832. "application/json": {
  7833. "schema": {
  7834. "type": "object",
  7835. "properties": {
  7836. "response": {
  7837. "type": "string",
  7838. "enum": ["once", "always", "reject"]
  7839. }
  7840. },
  7841. "required": ["response"],
  7842. "additionalProperties": false
  7843. }
  7844. }
  7845. }
  7846. },
  7847. "x-codeSamples": [
  7848. {
  7849. "lang": "js",
  7850. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  7851. }
  7852. ]
  7853. }
  7854. },
  7855. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  7856. "delete": {
  7857. "tags": ["session"],
  7858. "operationId": "part.delete",
  7859. "parameters": [
  7860. {
  7861. "name": "sessionID",
  7862. "in": "path",
  7863. "schema": {
  7864. "type": "string",
  7865. "pattern": "^ses"
  7866. },
  7867. "required": true
  7868. },
  7869. {
  7870. "name": "messageID",
  7871. "in": "path",
  7872. "schema": {
  7873. "type": "string",
  7874. "pattern": "^msg"
  7875. },
  7876. "required": true
  7877. },
  7878. {
  7879. "name": "partID",
  7880. "in": "path",
  7881. "schema": {
  7882. "type": "string",
  7883. "pattern": "^prt"
  7884. },
  7885. "required": true
  7886. },
  7887. {
  7888. "name": "directory",
  7889. "in": "query",
  7890. "schema": {
  7891. "type": "string"
  7892. },
  7893. "required": false
  7894. },
  7895. {
  7896. "name": "workspace",
  7897. "in": "query",
  7898. "schema": {
  7899. "type": "string"
  7900. },
  7901. "required": false
  7902. }
  7903. ],
  7904. "responses": {
  7905. "200": {
  7906. "description": "Successfully deleted part",
  7907. "content": {
  7908. "application/json": {
  7909. "schema": {
  7910. "type": "boolean",
  7911. "description": "Successfully deleted part"
  7912. }
  7913. }
  7914. }
  7915. },
  7916. "400": {
  7917. "description": "BadRequest | InvalidRequestError",
  7918. "content": {
  7919. "application/json": {
  7920. "schema": {
  7921. "anyOf": [
  7922. {
  7923. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7924. },
  7925. {
  7926. "$ref": "#/components/schemas/InvalidRequestError"
  7927. }
  7928. ]
  7929. }
  7930. }
  7931. }
  7932. },
  7933. "404": {
  7934. "description": "NotFoundError",
  7935. "content": {
  7936. "application/json": {
  7937. "schema": {
  7938. "$ref": "#/components/schemas/NotFoundError"
  7939. }
  7940. }
  7941. }
  7942. }
  7943. },
  7944. "description": "Delete a part from a message.",
  7945. "x-codeSamples": [
  7946. {
  7947. "lang": "js",
  7948. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  7949. }
  7950. ]
  7951. },
  7952. "patch": {
  7953. "tags": ["session"],
  7954. "operationId": "part.update",
  7955. "parameters": [
  7956. {
  7957. "name": "sessionID",
  7958. "in": "path",
  7959. "schema": {
  7960. "type": "string",
  7961. "pattern": "^ses"
  7962. },
  7963. "required": true
  7964. },
  7965. {
  7966. "name": "messageID",
  7967. "in": "path",
  7968. "schema": {
  7969. "type": "string",
  7970. "pattern": "^msg"
  7971. },
  7972. "required": true
  7973. },
  7974. {
  7975. "name": "partID",
  7976. "in": "path",
  7977. "schema": {
  7978. "type": "string",
  7979. "pattern": "^prt"
  7980. },
  7981. "required": true
  7982. },
  7983. {
  7984. "name": "directory",
  7985. "in": "query",
  7986. "schema": {
  7987. "type": "string"
  7988. },
  7989. "required": false
  7990. },
  7991. {
  7992. "name": "workspace",
  7993. "in": "query",
  7994. "schema": {
  7995. "type": "string"
  7996. },
  7997. "required": false
  7998. }
  7999. ],
  8000. "responses": {
  8001. "200": {
  8002. "description": "Successfully updated part",
  8003. "content": {
  8004. "application/json": {
  8005. "schema": {
  8006. "$ref": "#/components/schemas/Part"
  8007. }
  8008. }
  8009. }
  8010. },
  8011. "400": {
  8012. "description": "BadRequest | InvalidRequestError",
  8013. "content": {
  8014. "application/json": {
  8015. "schema": {
  8016. "anyOf": [
  8017. {
  8018. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8019. },
  8020. {
  8021. "$ref": "#/components/schemas/InvalidRequestError"
  8022. }
  8023. ]
  8024. }
  8025. }
  8026. }
  8027. },
  8028. "404": {
  8029. "description": "NotFoundError",
  8030. "content": {
  8031. "application/json": {
  8032. "schema": {
  8033. "$ref": "#/components/schemas/NotFoundError"
  8034. }
  8035. }
  8036. }
  8037. }
  8038. },
  8039. "description": "Update a part in a message.",
  8040. "requestBody": {
  8041. "content": {
  8042. "application/json": {
  8043. "schema": {
  8044. "$ref": "#/components/schemas/Part"
  8045. }
  8046. }
  8047. }
  8048. },
  8049. "x-codeSamples": [
  8050. {
  8051. "lang": "js",
  8052. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  8053. }
  8054. ]
  8055. }
  8056. },
  8057. "/sync/start": {
  8058. "post": {
  8059. "tags": ["sync"],
  8060. "operationId": "sync.start",
  8061. "parameters": [
  8062. {
  8063. "name": "directory",
  8064. "in": "query",
  8065. "schema": {
  8066. "type": "string"
  8067. },
  8068. "required": false
  8069. },
  8070. {
  8071. "name": "workspace",
  8072. "in": "query",
  8073. "schema": {
  8074. "type": "string"
  8075. },
  8076. "required": false
  8077. }
  8078. ],
  8079. "responses": {
  8080. "200": {
  8081. "description": "Workspace sync started",
  8082. "content": {
  8083. "application/json": {
  8084. "schema": {
  8085. "type": "boolean",
  8086. "description": "Workspace sync started"
  8087. }
  8088. }
  8089. }
  8090. },
  8091. "400": {
  8092. "description": "Bad request",
  8093. "content": {
  8094. "application/json": {
  8095. "schema": {
  8096. "$ref": "#/components/schemas/BadRequestError"
  8097. }
  8098. }
  8099. }
  8100. }
  8101. },
  8102. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  8103. "summary": "Start workspace sync",
  8104. "x-codeSamples": [
  8105. {
  8106. "lang": "js",
  8107. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  8108. }
  8109. ]
  8110. }
  8111. },
  8112. "/sync/replay": {
  8113. "post": {
  8114. "tags": ["sync"],
  8115. "operationId": "sync.replay",
  8116. "parameters": [
  8117. {
  8118. "name": "directory",
  8119. "in": "query",
  8120. "schema": {
  8121. "type": "string"
  8122. },
  8123. "required": false
  8124. },
  8125. {
  8126. "name": "workspace",
  8127. "in": "query",
  8128. "schema": {
  8129. "type": "string"
  8130. },
  8131. "required": false
  8132. }
  8133. ],
  8134. "responses": {
  8135. "200": {
  8136. "description": "Replayed sync events",
  8137. "content": {
  8138. "application/json": {
  8139. "schema": {
  8140. "type": "object",
  8141. "properties": {
  8142. "sessionID": {
  8143. "type": "string"
  8144. }
  8145. },
  8146. "required": ["sessionID"],
  8147. "additionalProperties": false,
  8148. "description": "Replayed sync events"
  8149. }
  8150. }
  8151. }
  8152. },
  8153. "400": {
  8154. "description": "BadRequest | InvalidRequestError",
  8155. "content": {
  8156. "application/json": {
  8157. "schema": {
  8158. "anyOf": [
  8159. {
  8160. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8161. },
  8162. {
  8163. "$ref": "#/components/schemas/InvalidRequestError"
  8164. }
  8165. ]
  8166. }
  8167. }
  8168. }
  8169. }
  8170. },
  8171. "description": "Validate and replay a complete sync event history.",
  8172. "summary": "Replay sync events",
  8173. "requestBody": {
  8174. "content": {
  8175. "application/json": {
  8176. "schema": {
  8177. "type": "object",
  8178. "properties": {
  8179. "directory": {
  8180. "type": "string"
  8181. },
  8182. "events": {
  8183. "type": "array",
  8184. "minItems": 1,
  8185. "items": {
  8186. "type": "object",
  8187. "properties": {
  8188. "id": {
  8189. "type": "string",
  8190. "pattern": "^evt_"
  8191. },
  8192. "aggregateID": {
  8193. "type": "string"
  8194. },
  8195. "seq": {
  8196. "type": "integer",
  8197. "minimum": 0
  8198. },
  8199. "type": {
  8200. "type": "string"
  8201. },
  8202. "data": {
  8203. "type": "object"
  8204. }
  8205. },
  8206. "required": ["id", "aggregateID", "seq", "type", "data"],
  8207. "additionalProperties": false
  8208. }
  8209. }
  8210. },
  8211. "required": ["directory", "events"],
  8212. "additionalProperties": false
  8213. }
  8214. }
  8215. }
  8216. },
  8217. "x-codeSamples": [
  8218. {
  8219. "lang": "js",
  8220. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  8221. }
  8222. ]
  8223. }
  8224. },
  8225. "/sync/steal": {
  8226. "post": {
  8227. "tags": ["sync"],
  8228. "operationId": "sync.steal",
  8229. "parameters": [
  8230. {
  8231. "name": "directory",
  8232. "in": "query",
  8233. "schema": {
  8234. "type": "string"
  8235. },
  8236. "required": false
  8237. },
  8238. {
  8239. "name": "workspace",
  8240. "in": "query",
  8241. "schema": {
  8242. "type": "string"
  8243. },
  8244. "required": false
  8245. }
  8246. ],
  8247. "responses": {
  8248. "200": {
  8249. "description": "Session stolen into workspace",
  8250. "content": {
  8251. "application/json": {
  8252. "schema": {
  8253. "type": "object",
  8254. "properties": {
  8255. "sessionID": {
  8256. "type": "string",
  8257. "pattern": "^ses"
  8258. }
  8259. },
  8260. "required": ["sessionID"],
  8261. "additionalProperties": false,
  8262. "description": "Session stolen into workspace"
  8263. }
  8264. }
  8265. }
  8266. },
  8267. "400": {
  8268. "description": "BadRequest | InvalidRequestError",
  8269. "content": {
  8270. "application/json": {
  8271. "schema": {
  8272. "anyOf": [
  8273. {
  8274. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8275. },
  8276. {
  8277. "$ref": "#/components/schemas/InvalidRequestError"
  8278. }
  8279. ]
  8280. }
  8281. }
  8282. }
  8283. }
  8284. },
  8285. "description": "Update a session to belong to the current workspace through the sync event system.",
  8286. "summary": "Steal session into workspace",
  8287. "requestBody": {
  8288. "content": {
  8289. "application/json": {
  8290. "schema": {
  8291. "type": "object",
  8292. "properties": {
  8293. "sessionID": {
  8294. "type": "string",
  8295. "pattern": "^ses"
  8296. }
  8297. },
  8298. "required": ["sessionID"],
  8299. "additionalProperties": false
  8300. }
  8301. }
  8302. }
  8303. },
  8304. "x-codeSamples": [
  8305. {
  8306. "lang": "js",
  8307. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.steal({\n ...\n})"
  8308. }
  8309. ]
  8310. }
  8311. },
  8312. "/sync/history": {
  8313. "post": {
  8314. "tags": ["sync"],
  8315. "operationId": "sync.history.list",
  8316. "parameters": [
  8317. {
  8318. "name": "directory",
  8319. "in": "query",
  8320. "schema": {
  8321. "type": "string"
  8322. },
  8323. "required": false
  8324. },
  8325. {
  8326. "name": "workspace",
  8327. "in": "query",
  8328. "schema": {
  8329. "type": "string"
  8330. },
  8331. "required": false
  8332. }
  8333. ],
  8334. "responses": {
  8335. "200": {
  8336. "description": "Sync events",
  8337. "content": {
  8338. "application/json": {
  8339. "schema": {
  8340. "type": "array",
  8341. "items": {
  8342. "type": "object",
  8343. "properties": {
  8344. "id": {
  8345. "type": "string",
  8346. "pattern": "^evt_"
  8347. },
  8348. "aggregate_id": {
  8349. "type": "string"
  8350. },
  8351. "seq": {
  8352. "type": "integer",
  8353. "minimum": 0
  8354. },
  8355. "type": {
  8356. "type": "string"
  8357. },
  8358. "data": {
  8359. "type": "object"
  8360. }
  8361. },
  8362. "required": ["id", "aggregate_id", "seq", "type", "data"],
  8363. "additionalProperties": false
  8364. },
  8365. "description": "Sync events"
  8366. }
  8367. }
  8368. }
  8369. },
  8370. "400": {
  8371. "description": "BadRequest | InvalidRequestError",
  8372. "content": {
  8373. "application/json": {
  8374. "schema": {
  8375. "anyOf": [
  8376. {
  8377. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8378. },
  8379. {
  8380. "$ref": "#/components/schemas/InvalidRequestError"
  8381. }
  8382. ]
  8383. }
  8384. }
  8385. }
  8386. }
  8387. },
  8388. "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.",
  8389. "summary": "List sync events",
  8390. "requestBody": {
  8391. "content": {
  8392. "application/json": {
  8393. "schema": {
  8394. "type": "object",
  8395. "additionalProperties": {
  8396. "type": "integer",
  8397. "minimum": 0
  8398. }
  8399. }
  8400. }
  8401. }
  8402. },
  8403. "x-codeSamples": [
  8404. {
  8405. "lang": "js",
  8406. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  8407. }
  8408. ]
  8409. }
  8410. },
  8411. "/tui/append-prompt": {
  8412. "post": {
  8413. "tags": ["tui"],
  8414. "operationId": "tui.appendPrompt",
  8415. "parameters": [
  8416. {
  8417. "name": "directory",
  8418. "in": "query",
  8419. "schema": {
  8420. "type": "string"
  8421. },
  8422. "required": false
  8423. },
  8424. {
  8425. "name": "workspace",
  8426. "in": "query",
  8427. "schema": {
  8428. "type": "string"
  8429. },
  8430. "required": false
  8431. }
  8432. ],
  8433. "responses": {
  8434. "200": {
  8435. "description": "Prompt processed successfully",
  8436. "content": {
  8437. "application/json": {
  8438. "schema": {
  8439. "type": "boolean",
  8440. "description": "Prompt processed successfully"
  8441. }
  8442. }
  8443. }
  8444. },
  8445. "400": {
  8446. "description": "BadRequest | InvalidRequestError",
  8447. "content": {
  8448. "application/json": {
  8449. "schema": {
  8450. "anyOf": [
  8451. {
  8452. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8453. },
  8454. {
  8455. "$ref": "#/components/schemas/InvalidRequestError"
  8456. }
  8457. ]
  8458. }
  8459. }
  8460. }
  8461. }
  8462. },
  8463. "description": "Append prompt to the TUI.",
  8464. "summary": "Append TUI prompt",
  8465. "requestBody": {
  8466. "content": {
  8467. "application/json": {
  8468. "schema": {
  8469. "type": "object",
  8470. "properties": {
  8471. "text": {
  8472. "type": "string"
  8473. }
  8474. },
  8475. "required": ["text"],
  8476. "additionalProperties": false
  8477. }
  8478. }
  8479. }
  8480. },
  8481. "x-codeSamples": [
  8482. {
  8483. "lang": "js",
  8484. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  8485. }
  8486. ]
  8487. }
  8488. },
  8489. "/tui/open-help": {
  8490. "post": {
  8491. "tags": ["tui"],
  8492. "operationId": "tui.openHelp",
  8493. "parameters": [
  8494. {
  8495. "name": "directory",
  8496. "in": "query",
  8497. "schema": {
  8498. "type": "string"
  8499. },
  8500. "required": false
  8501. },
  8502. {
  8503. "name": "workspace",
  8504. "in": "query",
  8505. "schema": {
  8506. "type": "string"
  8507. },
  8508. "required": false
  8509. }
  8510. ],
  8511. "responses": {
  8512. "200": {
  8513. "description": "Help dialog opened successfully",
  8514. "content": {
  8515. "application/json": {
  8516. "schema": {
  8517. "type": "boolean",
  8518. "description": "Help dialog opened successfully"
  8519. }
  8520. }
  8521. }
  8522. },
  8523. "400": {
  8524. "description": "Bad request",
  8525. "content": {
  8526. "application/json": {
  8527. "schema": {
  8528. "$ref": "#/components/schemas/BadRequestError"
  8529. }
  8530. }
  8531. }
  8532. }
  8533. },
  8534. "description": "Open the help dialog in the TUI to display user assistance information.",
  8535. "summary": "Open help dialog",
  8536. "x-codeSamples": [
  8537. {
  8538. "lang": "js",
  8539. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  8540. }
  8541. ]
  8542. }
  8543. },
  8544. "/tui/open-sessions": {
  8545. "post": {
  8546. "tags": ["tui"],
  8547. "operationId": "tui.openSessions",
  8548. "parameters": [
  8549. {
  8550. "name": "directory",
  8551. "in": "query",
  8552. "schema": {
  8553. "type": "string"
  8554. },
  8555. "required": false
  8556. },
  8557. {
  8558. "name": "workspace",
  8559. "in": "query",
  8560. "schema": {
  8561. "type": "string"
  8562. },
  8563. "required": false
  8564. }
  8565. ],
  8566. "responses": {
  8567. "200": {
  8568. "description": "Session dialog opened successfully",
  8569. "content": {
  8570. "application/json": {
  8571. "schema": {
  8572. "type": "boolean",
  8573. "description": "Session dialog opened successfully"
  8574. }
  8575. }
  8576. }
  8577. },
  8578. "400": {
  8579. "description": "Bad request",
  8580. "content": {
  8581. "application/json": {
  8582. "schema": {
  8583. "$ref": "#/components/schemas/BadRequestError"
  8584. }
  8585. }
  8586. }
  8587. }
  8588. },
  8589. "description": "Open the session dialog.",
  8590. "summary": "Open sessions dialog",
  8591. "x-codeSamples": [
  8592. {
  8593. "lang": "js",
  8594. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  8595. }
  8596. ]
  8597. }
  8598. },
  8599. "/tui/open-themes": {
  8600. "post": {
  8601. "tags": ["tui"],
  8602. "operationId": "tui.openThemes",
  8603. "parameters": [
  8604. {
  8605. "name": "directory",
  8606. "in": "query",
  8607. "schema": {
  8608. "type": "string"
  8609. },
  8610. "required": false
  8611. },
  8612. {
  8613. "name": "workspace",
  8614. "in": "query",
  8615. "schema": {
  8616. "type": "string"
  8617. },
  8618. "required": false
  8619. }
  8620. ],
  8621. "responses": {
  8622. "200": {
  8623. "description": "Theme dialog opened successfully",
  8624. "content": {
  8625. "application/json": {
  8626. "schema": {
  8627. "type": "boolean",
  8628. "description": "Theme dialog opened successfully"
  8629. }
  8630. }
  8631. }
  8632. },
  8633. "400": {
  8634. "description": "Bad request",
  8635. "content": {
  8636. "application/json": {
  8637. "schema": {
  8638. "$ref": "#/components/schemas/BadRequestError"
  8639. }
  8640. }
  8641. }
  8642. }
  8643. },
  8644. "description": "Open the theme dialog.",
  8645. "summary": "Open themes dialog",
  8646. "x-codeSamples": [
  8647. {
  8648. "lang": "js",
  8649. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  8650. }
  8651. ]
  8652. }
  8653. },
  8654. "/tui/open-models": {
  8655. "post": {
  8656. "tags": ["tui"],
  8657. "operationId": "tui.openModels",
  8658. "parameters": [
  8659. {
  8660. "name": "directory",
  8661. "in": "query",
  8662. "schema": {
  8663. "type": "string"
  8664. },
  8665. "required": false
  8666. },
  8667. {
  8668. "name": "workspace",
  8669. "in": "query",
  8670. "schema": {
  8671. "type": "string"
  8672. },
  8673. "required": false
  8674. }
  8675. ],
  8676. "responses": {
  8677. "200": {
  8678. "description": "Model dialog opened successfully",
  8679. "content": {
  8680. "application/json": {
  8681. "schema": {
  8682. "type": "boolean",
  8683. "description": "Model dialog opened successfully"
  8684. }
  8685. }
  8686. }
  8687. },
  8688. "400": {
  8689. "description": "Bad request",
  8690. "content": {
  8691. "application/json": {
  8692. "schema": {
  8693. "$ref": "#/components/schemas/BadRequestError"
  8694. }
  8695. }
  8696. }
  8697. }
  8698. },
  8699. "description": "Open the model dialog.",
  8700. "summary": "Open models dialog",
  8701. "x-codeSamples": [
  8702. {
  8703. "lang": "js",
  8704. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  8705. }
  8706. ]
  8707. }
  8708. },
  8709. "/tui/submit-prompt": {
  8710. "post": {
  8711. "tags": ["tui"],
  8712. "operationId": "tui.submitPrompt",
  8713. "parameters": [
  8714. {
  8715. "name": "directory",
  8716. "in": "query",
  8717. "schema": {
  8718. "type": "string"
  8719. },
  8720. "required": false
  8721. },
  8722. {
  8723. "name": "workspace",
  8724. "in": "query",
  8725. "schema": {
  8726. "type": "string"
  8727. },
  8728. "required": false
  8729. }
  8730. ],
  8731. "responses": {
  8732. "200": {
  8733. "description": "Prompt submitted successfully",
  8734. "content": {
  8735. "application/json": {
  8736. "schema": {
  8737. "type": "boolean",
  8738. "description": "Prompt submitted successfully"
  8739. }
  8740. }
  8741. }
  8742. },
  8743. "400": {
  8744. "description": "Bad request",
  8745. "content": {
  8746. "application/json": {
  8747. "schema": {
  8748. "$ref": "#/components/schemas/BadRequestError"
  8749. }
  8750. }
  8751. }
  8752. }
  8753. },
  8754. "description": "Submit the prompt.",
  8755. "summary": "Submit TUI prompt",
  8756. "x-codeSamples": [
  8757. {
  8758. "lang": "js",
  8759. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  8760. }
  8761. ]
  8762. }
  8763. },
  8764. "/tui/clear-prompt": {
  8765. "post": {
  8766. "tags": ["tui"],
  8767. "operationId": "tui.clearPrompt",
  8768. "parameters": [
  8769. {
  8770. "name": "directory",
  8771. "in": "query",
  8772. "schema": {
  8773. "type": "string"
  8774. },
  8775. "required": false
  8776. },
  8777. {
  8778. "name": "workspace",
  8779. "in": "query",
  8780. "schema": {
  8781. "type": "string"
  8782. },
  8783. "required": false
  8784. }
  8785. ],
  8786. "responses": {
  8787. "200": {
  8788. "description": "Prompt cleared successfully",
  8789. "content": {
  8790. "application/json": {
  8791. "schema": {
  8792. "type": "boolean",
  8793. "description": "Prompt cleared successfully"
  8794. }
  8795. }
  8796. }
  8797. },
  8798. "400": {
  8799. "description": "Bad request",
  8800. "content": {
  8801. "application/json": {
  8802. "schema": {
  8803. "$ref": "#/components/schemas/BadRequestError"
  8804. }
  8805. }
  8806. }
  8807. }
  8808. },
  8809. "description": "Clear the prompt.",
  8810. "summary": "Clear TUI prompt",
  8811. "x-codeSamples": [
  8812. {
  8813. "lang": "js",
  8814. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  8815. }
  8816. ]
  8817. }
  8818. },
  8819. "/tui/execute-command": {
  8820. "post": {
  8821. "tags": ["tui"],
  8822. "operationId": "tui.executeCommand",
  8823. "parameters": [
  8824. {
  8825. "name": "directory",
  8826. "in": "query",
  8827. "schema": {
  8828. "type": "string"
  8829. },
  8830. "required": false
  8831. },
  8832. {
  8833. "name": "workspace",
  8834. "in": "query",
  8835. "schema": {
  8836. "type": "string"
  8837. },
  8838. "required": false
  8839. }
  8840. ],
  8841. "responses": {
  8842. "200": {
  8843. "description": "Command executed successfully",
  8844. "content": {
  8845. "application/json": {
  8846. "schema": {
  8847. "type": "boolean",
  8848. "description": "Command executed successfully"
  8849. }
  8850. }
  8851. }
  8852. },
  8853. "400": {
  8854. "description": "BadRequest | InvalidRequestError",
  8855. "content": {
  8856. "application/json": {
  8857. "schema": {
  8858. "anyOf": [
  8859. {
  8860. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8861. },
  8862. {
  8863. "$ref": "#/components/schemas/InvalidRequestError"
  8864. }
  8865. ]
  8866. }
  8867. }
  8868. }
  8869. }
  8870. },
  8871. "description": "Execute a TUI command.",
  8872. "summary": "Execute TUI command",
  8873. "requestBody": {
  8874. "content": {
  8875. "application/json": {
  8876. "schema": {
  8877. "type": "object",
  8878. "properties": {
  8879. "command": {
  8880. "type": "string"
  8881. }
  8882. },
  8883. "required": ["command"],
  8884. "additionalProperties": false
  8885. }
  8886. }
  8887. }
  8888. },
  8889. "x-codeSamples": [
  8890. {
  8891. "lang": "js",
  8892. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  8893. }
  8894. ]
  8895. }
  8896. },
  8897. "/tui/show-toast": {
  8898. "post": {
  8899. "tags": ["tui"],
  8900. "operationId": "tui.showToast",
  8901. "parameters": [
  8902. {
  8903. "name": "directory",
  8904. "in": "query",
  8905. "schema": {
  8906. "type": "string"
  8907. },
  8908. "required": false
  8909. },
  8910. {
  8911. "name": "workspace",
  8912. "in": "query",
  8913. "schema": {
  8914. "type": "string"
  8915. },
  8916. "required": false
  8917. }
  8918. ],
  8919. "responses": {
  8920. "200": {
  8921. "description": "Toast notification shown successfully",
  8922. "content": {
  8923. "application/json": {
  8924. "schema": {
  8925. "type": "boolean",
  8926. "description": "Toast notification shown successfully"
  8927. }
  8928. }
  8929. }
  8930. },
  8931. "400": {
  8932. "description": "Bad request",
  8933. "content": {
  8934. "application/json": {
  8935. "schema": {
  8936. "$ref": "#/components/schemas/BadRequestError"
  8937. }
  8938. }
  8939. }
  8940. }
  8941. },
  8942. "description": "Show a toast notification in the TUI.",
  8943. "summary": "Show TUI toast",
  8944. "requestBody": {
  8945. "content": {
  8946. "application/json": {
  8947. "schema": {
  8948. "type": "object",
  8949. "properties": {
  8950. "title": {
  8951. "type": "string"
  8952. },
  8953. "message": {
  8954. "type": "string"
  8955. },
  8956. "variant": {
  8957. "type": "string",
  8958. "enum": ["info", "success", "warning", "error"]
  8959. },
  8960. "duration": {
  8961. "type": "integer",
  8962. "exclusiveMinimum": 0
  8963. }
  8964. },
  8965. "required": ["message", "variant"],
  8966. "additionalProperties": false
  8967. }
  8968. }
  8969. }
  8970. },
  8971. "x-codeSamples": [
  8972. {
  8973. "lang": "js",
  8974. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  8975. }
  8976. ]
  8977. }
  8978. },
  8979. "/tui/publish": {
  8980. "post": {
  8981. "tags": ["tui"],
  8982. "operationId": "tui.publish",
  8983. "parameters": [
  8984. {
  8985. "name": "directory",
  8986. "in": "query",
  8987. "schema": {
  8988. "type": "string"
  8989. },
  8990. "required": false
  8991. },
  8992. {
  8993. "name": "workspace",
  8994. "in": "query",
  8995. "schema": {
  8996. "type": "string"
  8997. },
  8998. "required": false
  8999. }
  9000. ],
  9001. "responses": {
  9002. "200": {
  9003. "description": "Event published successfully",
  9004. "content": {
  9005. "application/json": {
  9006. "schema": {
  9007. "type": "boolean",
  9008. "description": "Event published successfully"
  9009. }
  9010. }
  9011. }
  9012. },
  9013. "400": {
  9014. "description": "BadRequest | InvalidRequestError",
  9015. "content": {
  9016. "application/json": {
  9017. "schema": {
  9018. "anyOf": [
  9019. {
  9020. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9021. },
  9022. {
  9023. "$ref": "#/components/schemas/InvalidRequestError"
  9024. }
  9025. ]
  9026. }
  9027. }
  9028. }
  9029. }
  9030. },
  9031. "description": "Publish a TUI event.",
  9032. "summary": "Publish TUI event",
  9033. "requestBody": {
  9034. "content": {
  9035. "application/json": {
  9036. "schema": {
  9037. "anyOf": [
  9038. {
  9039. "$ref": "#/components/schemas/EventTuiPromptAppend"
  9040. },
  9041. {
  9042. "$ref": "#/components/schemas/EventTuiCommandExecute"
  9043. },
  9044. {
  9045. "$ref": "#/components/schemas/EventTuiToastShow"
  9046. },
  9047. {
  9048. "$ref": "#/components/schemas/EventTuiSessionSelect"
  9049. }
  9050. ]
  9051. }
  9052. }
  9053. }
  9054. },
  9055. "x-codeSamples": [
  9056. {
  9057. "lang": "js",
  9058. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  9059. }
  9060. ]
  9061. }
  9062. },
  9063. "/tui/select-session": {
  9064. "post": {
  9065. "tags": ["tui"],
  9066. "operationId": "tui.selectSession",
  9067. "parameters": [
  9068. {
  9069. "name": "directory",
  9070. "in": "query",
  9071. "schema": {
  9072. "type": "string"
  9073. },
  9074. "required": false
  9075. },
  9076. {
  9077. "name": "workspace",
  9078. "in": "query",
  9079. "schema": {
  9080. "type": "string"
  9081. },
  9082. "required": false
  9083. }
  9084. ],
  9085. "responses": {
  9086. "200": {
  9087. "description": "Session selected successfully",
  9088. "content": {
  9089. "application/json": {
  9090. "schema": {
  9091. "type": "boolean",
  9092. "description": "Session selected successfully"
  9093. }
  9094. }
  9095. }
  9096. },
  9097. "400": {
  9098. "description": "BadRequest | InvalidRequestError",
  9099. "content": {
  9100. "application/json": {
  9101. "schema": {
  9102. "anyOf": [
  9103. {
  9104. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9105. },
  9106. {
  9107. "$ref": "#/components/schemas/InvalidRequestError"
  9108. }
  9109. ]
  9110. }
  9111. }
  9112. }
  9113. },
  9114. "404": {
  9115. "description": "NotFoundError",
  9116. "content": {
  9117. "application/json": {
  9118. "schema": {
  9119. "$ref": "#/components/schemas/NotFoundError"
  9120. }
  9121. }
  9122. }
  9123. }
  9124. },
  9125. "description": "Navigate the TUI to display the specified session.",
  9126. "summary": "Select session",
  9127. "requestBody": {
  9128. "content": {
  9129. "application/json": {
  9130. "schema": {
  9131. "type": "object",
  9132. "properties": {
  9133. "sessionID": {
  9134. "type": "string",
  9135. "pattern": "^ses",
  9136. "description": "Session ID to navigate to"
  9137. }
  9138. },
  9139. "required": ["sessionID"],
  9140. "additionalProperties": false
  9141. }
  9142. }
  9143. }
  9144. },
  9145. "x-codeSamples": [
  9146. {
  9147. "lang": "js",
  9148. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  9149. }
  9150. ]
  9151. }
  9152. },
  9153. "/tui/control/next": {
  9154. "get": {
  9155. "tags": ["tui"],
  9156. "operationId": "tui.control.next",
  9157. "parameters": [
  9158. {
  9159. "name": "directory",
  9160. "in": "query",
  9161. "schema": {
  9162. "type": "string"
  9163. },
  9164. "required": false
  9165. },
  9166. {
  9167. "name": "workspace",
  9168. "in": "query",
  9169. "schema": {
  9170. "type": "string"
  9171. },
  9172. "required": false
  9173. }
  9174. ],
  9175. "responses": {
  9176. "200": {
  9177. "description": "Next TUI request",
  9178. "content": {
  9179. "application/json": {
  9180. "schema": {
  9181. "type": "object",
  9182. "properties": {
  9183. "path": {
  9184. "type": "string"
  9185. },
  9186. "body": {}
  9187. },
  9188. "required": ["path", "body"],
  9189. "additionalProperties": false,
  9190. "description": "Next TUI request"
  9191. }
  9192. }
  9193. }
  9194. },
  9195. "400": {
  9196. "description": "Bad request",
  9197. "content": {
  9198. "application/json": {
  9199. "schema": {
  9200. "$ref": "#/components/schemas/BadRequestError"
  9201. }
  9202. }
  9203. }
  9204. }
  9205. },
  9206. "description": "Retrieve the next TUI request from the queue for processing.",
  9207. "summary": "Get next TUI request",
  9208. "x-codeSamples": [
  9209. {
  9210. "lang": "js",
  9211. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  9212. }
  9213. ]
  9214. }
  9215. },
  9216. "/tui/control/response": {
  9217. "post": {
  9218. "tags": ["tui"],
  9219. "operationId": "tui.control.response",
  9220. "parameters": [
  9221. {
  9222. "name": "directory",
  9223. "in": "query",
  9224. "schema": {
  9225. "type": "string"
  9226. },
  9227. "required": false
  9228. },
  9229. {
  9230. "name": "workspace",
  9231. "in": "query",
  9232. "schema": {
  9233. "type": "string"
  9234. },
  9235. "required": false
  9236. }
  9237. ],
  9238. "responses": {
  9239. "200": {
  9240. "description": "Response submitted successfully",
  9241. "content": {
  9242. "application/json": {
  9243. "schema": {
  9244. "type": "boolean",
  9245. "description": "Response submitted successfully"
  9246. }
  9247. }
  9248. }
  9249. },
  9250. "400": {
  9251. "description": "Bad request",
  9252. "content": {
  9253. "application/json": {
  9254. "schema": {
  9255. "$ref": "#/components/schemas/BadRequestError"
  9256. }
  9257. }
  9258. }
  9259. }
  9260. },
  9261. "description": "Submit a response to the TUI request queue to complete a pending request.",
  9262. "summary": "Submit TUI response",
  9263. "requestBody": {
  9264. "content": {
  9265. "application/json": {
  9266. "schema": {}
  9267. }
  9268. }
  9269. },
  9270. "x-codeSamples": [
  9271. {
  9272. "lang": "js",
  9273. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  9274. }
  9275. ]
  9276. }
  9277. },
  9278. "/experimental/workspace/adapter": {
  9279. "get": {
  9280. "tags": ["workspace"],
  9281. "operationId": "experimental.workspace.adapter.list",
  9282. "parameters": [
  9283. {
  9284. "name": "directory",
  9285. "in": "query",
  9286. "schema": {
  9287. "type": "string"
  9288. },
  9289. "required": false
  9290. },
  9291. {
  9292. "name": "workspace",
  9293. "in": "query",
  9294. "schema": {
  9295. "type": "string"
  9296. },
  9297. "required": false
  9298. }
  9299. ],
  9300. "responses": {
  9301. "200": {
  9302. "description": "Workspace adapters",
  9303. "content": {
  9304. "application/json": {
  9305. "schema": {
  9306. "type": "array",
  9307. "items": {
  9308. "type": "object",
  9309. "properties": {
  9310. "type": {
  9311. "type": "string"
  9312. },
  9313. "name": {
  9314. "type": "string"
  9315. },
  9316. "description": {
  9317. "type": "string"
  9318. }
  9319. },
  9320. "required": ["type", "name", "description"],
  9321. "additionalProperties": false
  9322. },
  9323. "description": "Workspace adapters"
  9324. }
  9325. }
  9326. }
  9327. },
  9328. "400": {
  9329. "description": "Bad request",
  9330. "content": {
  9331. "application/json": {
  9332. "schema": {
  9333. "$ref": "#/components/schemas/BadRequestError"
  9334. }
  9335. }
  9336. }
  9337. }
  9338. },
  9339. "description": "List all available workspace adapters for the current project.",
  9340. "summary": "List workspace adapters",
  9341. "x-codeSamples": [
  9342. {
  9343. "lang": "js",
  9344. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  9345. }
  9346. ]
  9347. }
  9348. },
  9349. "/experimental/workspace": {
  9350. "get": {
  9351. "tags": ["workspace"],
  9352. "operationId": "experimental.workspace.list",
  9353. "parameters": [
  9354. {
  9355. "name": "directory",
  9356. "in": "query",
  9357. "schema": {
  9358. "type": "string"
  9359. },
  9360. "required": false
  9361. },
  9362. {
  9363. "name": "workspace",
  9364. "in": "query",
  9365. "schema": {
  9366. "type": "string"
  9367. },
  9368. "required": false
  9369. }
  9370. ],
  9371. "responses": {
  9372. "200": {
  9373. "description": "Workspaces",
  9374. "content": {
  9375. "application/json": {
  9376. "schema": {
  9377. "type": "array",
  9378. "items": {
  9379. "$ref": "#/components/schemas/Workspace"
  9380. },
  9381. "description": "Workspaces"
  9382. }
  9383. }
  9384. }
  9385. },
  9386. "400": {
  9387. "description": "Bad request",
  9388. "content": {
  9389. "application/json": {
  9390. "schema": {
  9391. "$ref": "#/components/schemas/BadRequestError"
  9392. }
  9393. }
  9394. }
  9395. }
  9396. },
  9397. "description": "List all workspaces.",
  9398. "summary": "List workspaces",
  9399. "x-codeSamples": [
  9400. {
  9401. "lang": "js",
  9402. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  9403. }
  9404. ]
  9405. },
  9406. "post": {
  9407. "tags": ["workspace"],
  9408. "operationId": "experimental.workspace.create",
  9409. "parameters": [
  9410. {
  9411. "name": "directory",
  9412. "in": "query",
  9413. "schema": {
  9414. "type": "string"
  9415. },
  9416. "required": false
  9417. },
  9418. {
  9419. "name": "workspace",
  9420. "in": "query",
  9421. "schema": {
  9422. "type": "string"
  9423. },
  9424. "required": false
  9425. }
  9426. ],
  9427. "responses": {
  9428. "200": {
  9429. "description": "Workspace created",
  9430. "content": {
  9431. "application/json": {
  9432. "schema": {
  9433. "$ref": "#/components/schemas/Workspace"
  9434. }
  9435. }
  9436. }
  9437. },
  9438. "400": {
  9439. "description": "WorkspaceCreateError | BadRequest | InvalidRequestError",
  9440. "content": {
  9441. "application/json": {
  9442. "schema": {
  9443. "anyOf": [
  9444. {
  9445. "$ref": "#/components/schemas/WorkspaceCreateError"
  9446. },
  9447. {
  9448. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9449. },
  9450. {
  9451. "$ref": "#/components/schemas/InvalidRequestError"
  9452. }
  9453. ]
  9454. }
  9455. }
  9456. }
  9457. }
  9458. },
  9459. "description": "Create a workspace for the current project.",
  9460. "summary": "Create workspace",
  9461. "requestBody": {
  9462. "content": {
  9463. "application/json": {
  9464. "schema": {
  9465. "type": "object",
  9466. "properties": {
  9467. "id": {
  9468. "type": "string",
  9469. "pattern": "^wrk"
  9470. },
  9471. "type": {
  9472. "type": "string"
  9473. },
  9474. "branch": {
  9475. "anyOf": [
  9476. {
  9477. "type": "string"
  9478. },
  9479. {
  9480. "type": "null"
  9481. }
  9482. ]
  9483. },
  9484. "extra": {
  9485. "anyOf": [
  9486. {},
  9487. {
  9488. "type": "null"
  9489. }
  9490. ]
  9491. }
  9492. },
  9493. "required": ["type"],
  9494. "additionalProperties": false
  9495. }
  9496. }
  9497. }
  9498. },
  9499. "x-codeSamples": [
  9500. {
  9501. "lang": "js",
  9502. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  9503. }
  9504. ]
  9505. }
  9506. },
  9507. "/experimental/workspace/sync-list": {
  9508. "post": {
  9509. "tags": ["workspace"],
  9510. "operationId": "experimental.workspace.syncList",
  9511. "parameters": [
  9512. {
  9513. "name": "directory",
  9514. "in": "query",
  9515. "schema": {
  9516. "type": "string"
  9517. },
  9518. "required": false
  9519. },
  9520. {
  9521. "name": "workspace",
  9522. "in": "query",
  9523. "schema": {
  9524. "type": "string"
  9525. },
  9526. "required": false
  9527. }
  9528. ],
  9529. "responses": {
  9530. "204": {
  9531. "description": "Workspace list synced"
  9532. },
  9533. "400": {
  9534. "description": "Bad request",
  9535. "content": {
  9536. "application/json": {
  9537. "schema": {
  9538. "$ref": "#/components/schemas/BadRequestError"
  9539. }
  9540. }
  9541. }
  9542. }
  9543. },
  9544. "description": "Register missing workspaces returned by workspace adapters.",
  9545. "summary": "Sync workspace list",
  9546. "x-codeSamples": [
  9547. {
  9548. "lang": "js",
  9549. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.syncList({\n ...\n})"
  9550. }
  9551. ]
  9552. }
  9553. },
  9554. "/experimental/workspace/status": {
  9555. "get": {
  9556. "tags": ["workspace"],
  9557. "operationId": "experimental.workspace.status",
  9558. "parameters": [
  9559. {
  9560. "name": "directory",
  9561. "in": "query",
  9562. "schema": {
  9563. "type": "string"
  9564. },
  9565. "required": false
  9566. },
  9567. {
  9568. "name": "workspace",
  9569. "in": "query",
  9570. "schema": {
  9571. "type": "string"
  9572. },
  9573. "required": false
  9574. }
  9575. ],
  9576. "responses": {
  9577. "200": {
  9578. "description": "Workspace status",
  9579. "content": {
  9580. "application/json": {
  9581. "schema": {
  9582. "type": "array",
  9583. "items": {
  9584. "$ref": "#/components/schemas/WorkspaceEventConnectionStatus"
  9585. },
  9586. "description": "Workspace status"
  9587. }
  9588. }
  9589. }
  9590. },
  9591. "400": {
  9592. "description": "Bad request",
  9593. "content": {
  9594. "application/json": {
  9595. "schema": {
  9596. "$ref": "#/components/schemas/BadRequestError"
  9597. }
  9598. }
  9599. }
  9600. }
  9601. },
  9602. "description": "Get connection status for workspaces in the current project.",
  9603. "summary": "Workspace status",
  9604. "x-codeSamples": [
  9605. {
  9606. "lang": "js",
  9607. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  9608. }
  9609. ]
  9610. }
  9611. },
  9612. "/experimental/workspace/{id}": {
  9613. "delete": {
  9614. "tags": ["workspace"],
  9615. "operationId": "experimental.workspace.remove",
  9616. "parameters": [
  9617. {
  9618. "name": "id",
  9619. "in": "path",
  9620. "schema": {
  9621. "type": "string",
  9622. "pattern": "^wrk"
  9623. },
  9624. "required": true
  9625. },
  9626. {
  9627. "name": "directory",
  9628. "in": "query",
  9629. "schema": {
  9630. "type": "string"
  9631. },
  9632. "required": false
  9633. },
  9634. {
  9635. "name": "workspace",
  9636. "in": "query",
  9637. "schema": {
  9638. "type": "string"
  9639. },
  9640. "required": false
  9641. }
  9642. ],
  9643. "responses": {
  9644. "200": {
  9645. "description": "Workspace removed",
  9646. "content": {
  9647. "application/json": {
  9648. "schema": {
  9649. "$ref": "#/components/schemas/Workspace"
  9650. }
  9651. }
  9652. }
  9653. },
  9654. "400": {
  9655. "description": "BadRequest | InvalidRequestError",
  9656. "content": {
  9657. "application/json": {
  9658. "schema": {
  9659. "anyOf": [
  9660. {
  9661. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9662. },
  9663. {
  9664. "$ref": "#/components/schemas/InvalidRequestError"
  9665. }
  9666. ]
  9667. }
  9668. }
  9669. }
  9670. }
  9671. },
  9672. "description": "Remove an existing workspace.",
  9673. "summary": "Remove workspace",
  9674. "x-codeSamples": [
  9675. {
  9676. "lang": "js",
  9677. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  9678. }
  9679. ]
  9680. }
  9681. },
  9682. "/experimental/workspace/warp": {
  9683. "post": {
  9684. "tags": ["workspace"],
  9685. "operationId": "experimental.workspace.warp",
  9686. "parameters": [
  9687. {
  9688. "name": "directory",
  9689. "in": "query",
  9690. "schema": {
  9691. "type": "string"
  9692. },
  9693. "required": false
  9694. },
  9695. {
  9696. "name": "workspace",
  9697. "in": "query",
  9698. "schema": {
  9699. "type": "string"
  9700. },
  9701. "required": false
  9702. }
  9703. ],
  9704. "responses": {
  9705. "204": {
  9706. "description": "Session warped"
  9707. },
  9708. "400": {
  9709. "description": "WorkspaceWarpError | VcsApplyError | InvalidRequestError",
  9710. "content": {
  9711. "application/json": {
  9712. "schema": {
  9713. "anyOf": [
  9714. {
  9715. "$ref": "#/components/schemas/WorkspaceWarpError"
  9716. },
  9717. {
  9718. "$ref": "#/components/schemas/VcsApplyError"
  9719. },
  9720. {
  9721. "$ref": "#/components/schemas/InvalidRequestError"
  9722. }
  9723. ]
  9724. }
  9725. }
  9726. }
  9727. },
  9728. "404": {
  9729. "description": "NotFoundError",
  9730. "content": {
  9731. "application/json": {
  9732. "schema": {
  9733. "$ref": "#/components/schemas/NotFoundError"
  9734. }
  9735. }
  9736. }
  9737. }
  9738. },
  9739. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  9740. "summary": "Warp session into workspace",
  9741. "requestBody": {
  9742. "content": {
  9743. "application/json": {
  9744. "schema": {
  9745. "type": "object",
  9746. "properties": {
  9747. "id": {
  9748. "anyOf": [
  9749. {
  9750. "type": "string",
  9751. "pattern": "^wrk"
  9752. },
  9753. {
  9754. "type": "null"
  9755. }
  9756. ]
  9757. },
  9758. "sessionID": {
  9759. "type": "string",
  9760. "pattern": "^ses"
  9761. },
  9762. "copyChanges": {
  9763. "type": "boolean"
  9764. }
  9765. },
  9766. "required": ["id", "sessionID"],
  9767. "additionalProperties": false
  9768. }
  9769. }
  9770. }
  9771. },
  9772. "x-codeSamples": [
  9773. {
  9774. "lang": "js",
  9775. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  9776. }
  9777. ]
  9778. }
  9779. },
  9780. "/api/health": {
  9781. "get": {
  9782. "tags": ["opencode HttpApi"],
  9783. "operationId": "v2.health.get",
  9784. "parameters": [],
  9785. "security": [],
  9786. "responses": {
  9787. "200": {
  9788. "description": "Success",
  9789. "content": {
  9790. "application/json": {
  9791. "schema": {
  9792. "type": "object",
  9793. "properties": {
  9794. "healthy": {
  9795. "type": "boolean",
  9796. "enum": [true]
  9797. }
  9798. },
  9799. "required": ["healthy"],
  9800. "additionalProperties": false
  9801. }
  9802. }
  9803. }
  9804. },
  9805. "400": {
  9806. "description": "InvalidRequestError",
  9807. "content": {
  9808. "application/json": {
  9809. "schema": {
  9810. "$ref": "#/components/schemas/InvalidRequestError"
  9811. }
  9812. }
  9813. }
  9814. },
  9815. "401": {
  9816. "description": "UnauthorizedError",
  9817. "content": {
  9818. "application/json": {
  9819. "schema": {
  9820. "$ref": "#/components/schemas/UnauthorizedError"
  9821. }
  9822. }
  9823. }
  9824. }
  9825. },
  9826. "description": "Check whether the API server is ready to accept requests.",
  9827. "summary": "Check server health",
  9828. "x-codeSamples": [
  9829. {
  9830. "lang": "js",
  9831. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.health.get({\n ...\n})"
  9832. }
  9833. ]
  9834. }
  9835. },
  9836. "/api/location": {
  9837. "get": {
  9838. "tags": ["opencode HttpApi"],
  9839. "operationId": "v2.location.get",
  9840. "parameters": [
  9841. {
  9842. "name": "location",
  9843. "in": "query",
  9844. "schema": {
  9845. "type": "object",
  9846. "properties": {
  9847. "directory": {
  9848. "type": "string"
  9849. },
  9850. "workspace": {
  9851. "type": "string"
  9852. }
  9853. },
  9854. "additionalProperties": false
  9855. },
  9856. "required": false,
  9857. "style": "deepObject",
  9858. "explode": true
  9859. }
  9860. ],
  9861. "security": [],
  9862. "responses": {
  9863. "200": {
  9864. "description": "Location.Info",
  9865. "content": {
  9866. "application/json": {
  9867. "schema": {
  9868. "$ref": "#/components/schemas/LocationInfo"
  9869. }
  9870. }
  9871. }
  9872. },
  9873. "400": {
  9874. "description": "InvalidRequestError",
  9875. "content": {
  9876. "application/json": {
  9877. "schema": {
  9878. "$ref": "#/components/schemas/InvalidRequestError"
  9879. }
  9880. }
  9881. }
  9882. },
  9883. "401": {
  9884. "description": "UnauthorizedError",
  9885. "content": {
  9886. "application/json": {
  9887. "schema": {
  9888. "$ref": "#/components/schemas/UnauthorizedError"
  9889. }
  9890. }
  9891. }
  9892. }
  9893. },
  9894. "description": "Resolve the requested location or the server default location.",
  9895. "summary": "Get location",
  9896. "x-codeSamples": [
  9897. {
  9898. "lang": "js",
  9899. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.location.get({\n ...\n})"
  9900. }
  9901. ]
  9902. }
  9903. },
  9904. "/api/agent": {
  9905. "get": {
  9906. "tags": ["opencode HttpApi"],
  9907. "operationId": "v2.agent.list",
  9908. "parameters": [
  9909. {
  9910. "name": "location",
  9911. "in": "query",
  9912. "schema": {
  9913. "type": "object",
  9914. "properties": {
  9915. "directory": {
  9916. "type": "string"
  9917. },
  9918. "workspace": {
  9919. "type": "string"
  9920. }
  9921. },
  9922. "additionalProperties": false
  9923. },
  9924. "required": false,
  9925. "style": "deepObject",
  9926. "explode": true
  9927. }
  9928. ],
  9929. "security": [],
  9930. "responses": {
  9931. "200": {
  9932. "description": "Success",
  9933. "content": {
  9934. "application/json": {
  9935. "schema": {
  9936. "type": "object",
  9937. "properties": {
  9938. "location": {
  9939. "$ref": "#/components/schemas/LocationInfo"
  9940. },
  9941. "data": {
  9942. "type": "array",
  9943. "items": {
  9944. "$ref": "#/components/schemas/AgentV2Info"
  9945. }
  9946. }
  9947. },
  9948. "required": ["location", "data"],
  9949. "additionalProperties": false
  9950. }
  9951. }
  9952. }
  9953. },
  9954. "400": {
  9955. "description": "InvalidRequestError",
  9956. "content": {
  9957. "application/json": {
  9958. "schema": {
  9959. "$ref": "#/components/schemas/InvalidRequestError"
  9960. }
  9961. }
  9962. }
  9963. },
  9964. "401": {
  9965. "description": "UnauthorizedError",
  9966. "content": {
  9967. "application/json": {
  9968. "schema": {
  9969. "$ref": "#/components/schemas/UnauthorizedError"
  9970. }
  9971. }
  9972. }
  9973. }
  9974. },
  9975. "description": "Retrieve currently registered agents.",
  9976. "summary": "List agents",
  9977. "x-codeSamples": [
  9978. {
  9979. "lang": "js",
  9980. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.agent.list({\n ...\n})"
  9981. }
  9982. ]
  9983. }
  9984. },
  9985. "/api/session": {
  9986. "get": {
  9987. "tags": ["sessions"],
  9988. "operationId": "v2.session.list",
  9989. "parameters": [
  9990. {
  9991. "name": "workspace",
  9992. "in": "query",
  9993. "schema": {
  9994. "type": "string",
  9995. "pattern": "^wrk"
  9996. },
  9997. "required": false
  9998. },
  9999. {
  10000. "name": "limit",
  10001. "in": "query",
  10002. "schema": {
  10003. "type": "number"
  10004. },
  10005. "required": false
  10006. },
  10007. {
  10008. "name": "order",
  10009. "in": "query",
  10010. "schema": {
  10011. "type": "string",
  10012. "enum": ["asc", "desc"]
  10013. },
  10014. "required": false
  10015. },
  10016. {
  10017. "name": "search",
  10018. "in": "query",
  10019. "schema": {
  10020. "type": "string"
  10021. },
  10022. "required": false
  10023. },
  10024. {
  10025. "name": "directory",
  10026. "in": "query",
  10027. "schema": {
  10028. "type": "string"
  10029. },
  10030. "required": false
  10031. },
  10032. {
  10033. "name": "project",
  10034. "in": "query",
  10035. "schema": {
  10036. "type": "string"
  10037. },
  10038. "required": false
  10039. },
  10040. {
  10041. "name": "subpath",
  10042. "in": "query",
  10043. "schema": {
  10044. "type": "string"
  10045. },
  10046. "required": false
  10047. },
  10048. {
  10049. "name": "cursor",
  10050. "in": "query",
  10051. "schema": {
  10052. "type": "string",
  10053. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response."
  10054. },
  10055. "required": false
  10056. }
  10057. ],
  10058. "security": [],
  10059. "responses": {
  10060. "200": {
  10061. "description": "SessionsResponse",
  10062. "content": {
  10063. "application/json": {
  10064. "schema": {
  10065. "$ref": "#/components/schemas/SessionsResponse"
  10066. }
  10067. }
  10068. }
  10069. },
  10070. "400": {
  10071. "description": "InvalidCursorError | InvalidRequestError",
  10072. "content": {
  10073. "application/json": {
  10074. "schema": {
  10075. "anyOf": [
  10076. {
  10077. "$ref": "#/components/schemas/InvalidCursorError"
  10078. },
  10079. {
  10080. "$ref": "#/components/schemas/InvalidRequestError"
  10081. },
  10082. {
  10083. "$ref": "#/components/schemas/InvalidRequestError"
  10084. }
  10085. ]
  10086. }
  10087. }
  10088. }
  10089. },
  10090. "401": {
  10091. "description": "UnauthorizedError",
  10092. "content": {
  10093. "application/json": {
  10094. "schema": {
  10095. "$ref": "#/components/schemas/UnauthorizedError"
  10096. }
  10097. }
  10098. }
  10099. }
  10100. },
  10101. "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.",
  10102. "summary": "List sessions",
  10103. "x-codeSamples": [
  10104. {
  10105. "lang": "js",
  10106. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  10107. }
  10108. ]
  10109. },
  10110. "post": {
  10111. "tags": ["sessions"],
  10112. "operationId": "v2.session.create",
  10113. "parameters": [],
  10114. "security": [],
  10115. "responses": {
  10116. "200": {
  10117. "description": "Success",
  10118. "content": {
  10119. "application/json": {
  10120. "schema": {
  10121. "type": "object",
  10122. "properties": {
  10123. "data": {
  10124. "$ref": "#/components/schemas/SessionV2Info"
  10125. }
  10126. },
  10127. "required": ["data"],
  10128. "additionalProperties": false
  10129. }
  10130. }
  10131. }
  10132. },
  10133. "400": {
  10134. "description": "InvalidRequestError",
  10135. "content": {
  10136. "application/json": {
  10137. "schema": {
  10138. "$ref": "#/components/schemas/InvalidRequestError"
  10139. }
  10140. }
  10141. }
  10142. },
  10143. "401": {
  10144. "description": "UnauthorizedError",
  10145. "content": {
  10146. "application/json": {
  10147. "schema": {
  10148. "$ref": "#/components/schemas/UnauthorizedError"
  10149. }
  10150. }
  10151. }
  10152. }
  10153. },
  10154. "description": "Create a session at the requested location.",
  10155. "summary": "Create session",
  10156. "requestBody": {
  10157. "content": {
  10158. "application/json": {
  10159. "schema": {
  10160. "type": "object",
  10161. "properties": {
  10162. "id": {
  10163. "type": "string",
  10164. "pattern": "^ses"
  10165. },
  10166. "agent": {
  10167. "type": "string"
  10168. },
  10169. "model": {
  10170. "$ref": "#/components/schemas/ModelRef"
  10171. },
  10172. "location": {
  10173. "$ref": "#/components/schemas/LocationRef"
  10174. }
  10175. },
  10176. "additionalProperties": false
  10177. }
  10178. }
  10179. },
  10180. "required": true
  10181. },
  10182. "x-codeSamples": [
  10183. {
  10184. "lang": "js",
  10185. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.create({\n ...\n})"
  10186. }
  10187. ]
  10188. }
  10189. },
  10190. "/api/session/{sessionID}": {
  10191. "get": {
  10192. "tags": ["sessions"],
  10193. "operationId": "v2.session.get",
  10194. "parameters": [
  10195. {
  10196. "name": "sessionID",
  10197. "in": "path",
  10198. "schema": {
  10199. "type": "string",
  10200. "pattern": "^ses"
  10201. },
  10202. "required": true
  10203. }
  10204. ],
  10205. "security": [],
  10206. "responses": {
  10207. "200": {
  10208. "description": "Success",
  10209. "content": {
  10210. "application/json": {
  10211. "schema": {
  10212. "type": "object",
  10213. "properties": {
  10214. "data": {
  10215. "$ref": "#/components/schemas/SessionV2Info"
  10216. }
  10217. },
  10218. "required": ["data"],
  10219. "additionalProperties": false
  10220. }
  10221. }
  10222. }
  10223. },
  10224. "400": {
  10225. "description": "InvalidRequestError",
  10226. "content": {
  10227. "application/json": {
  10228. "schema": {
  10229. "$ref": "#/components/schemas/InvalidRequestError"
  10230. }
  10231. }
  10232. }
  10233. },
  10234. "401": {
  10235. "description": "UnauthorizedError",
  10236. "content": {
  10237. "application/json": {
  10238. "schema": {
  10239. "$ref": "#/components/schemas/UnauthorizedError"
  10240. }
  10241. }
  10242. }
  10243. },
  10244. "404": {
  10245. "description": "SessionNotFoundError",
  10246. "content": {
  10247. "application/json": {
  10248. "schema": {
  10249. "anyOf": [
  10250. {
  10251. "$ref": "#/components/schemas/SessionNotFoundError"
  10252. },
  10253. {
  10254. "$ref": "#/components/schemas/SessionNotFoundError"
  10255. }
  10256. ]
  10257. }
  10258. }
  10259. }
  10260. }
  10261. },
  10262. "description": "Retrieve a session by ID.",
  10263. "summary": "Get session",
  10264. "x-codeSamples": [
  10265. {
  10266. "lang": "js",
  10267. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.get({\n ...\n})"
  10268. }
  10269. ]
  10270. }
  10271. },
  10272. "/api/session/{sessionID}/agent": {
  10273. "post": {
  10274. "tags": ["sessions"],
  10275. "operationId": "v2.session.switchAgent",
  10276. "parameters": [
  10277. {
  10278. "name": "sessionID",
  10279. "in": "path",
  10280. "schema": {
  10281. "type": "string",
  10282. "pattern": "^ses"
  10283. },
  10284. "required": true
  10285. }
  10286. ],
  10287. "security": [],
  10288. "responses": {
  10289. "204": {
  10290. "description": "<No Content>"
  10291. },
  10292. "400": {
  10293. "description": "InvalidRequestError",
  10294. "content": {
  10295. "application/json": {
  10296. "schema": {
  10297. "$ref": "#/components/schemas/InvalidRequestError"
  10298. }
  10299. }
  10300. }
  10301. },
  10302. "401": {
  10303. "description": "UnauthorizedError",
  10304. "content": {
  10305. "application/json": {
  10306. "schema": {
  10307. "$ref": "#/components/schemas/UnauthorizedError"
  10308. }
  10309. }
  10310. }
  10311. },
  10312. "404": {
  10313. "description": "SessionNotFoundError",
  10314. "content": {
  10315. "application/json": {
  10316. "schema": {
  10317. "anyOf": [
  10318. {
  10319. "$ref": "#/components/schemas/SessionNotFoundError"
  10320. },
  10321. {
  10322. "$ref": "#/components/schemas/SessionNotFoundError"
  10323. }
  10324. ]
  10325. }
  10326. }
  10327. }
  10328. }
  10329. },
  10330. "description": "Switch the agent used by subsequent provider turns.",
  10331. "summary": "Switch session agent",
  10332. "requestBody": {
  10333. "content": {
  10334. "application/json": {
  10335. "schema": {
  10336. "type": "object",
  10337. "properties": {
  10338. "agent": {
  10339. "type": "string"
  10340. }
  10341. },
  10342. "required": ["agent"],
  10343. "additionalProperties": false
  10344. }
  10345. }
  10346. },
  10347. "required": true
  10348. },
  10349. "x-codeSamples": [
  10350. {
  10351. "lang": "js",
  10352. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.switchAgent({\n ...\n})"
  10353. }
  10354. ]
  10355. }
  10356. },
  10357. "/api/session/{sessionID}/model": {
  10358. "post": {
  10359. "tags": ["sessions"],
  10360. "operationId": "v2.session.switchModel",
  10361. "parameters": [
  10362. {
  10363. "name": "sessionID",
  10364. "in": "path",
  10365. "schema": {
  10366. "type": "string",
  10367. "pattern": "^ses"
  10368. },
  10369. "required": true
  10370. }
  10371. ],
  10372. "security": [],
  10373. "responses": {
  10374. "204": {
  10375. "description": "<No Content>"
  10376. },
  10377. "400": {
  10378. "description": "InvalidRequestError",
  10379. "content": {
  10380. "application/json": {
  10381. "schema": {
  10382. "$ref": "#/components/schemas/InvalidRequestError"
  10383. }
  10384. }
  10385. }
  10386. },
  10387. "401": {
  10388. "description": "UnauthorizedError",
  10389. "content": {
  10390. "application/json": {
  10391. "schema": {
  10392. "$ref": "#/components/schemas/UnauthorizedError"
  10393. }
  10394. }
  10395. }
  10396. },
  10397. "404": {
  10398. "description": "SessionNotFoundError",
  10399. "content": {
  10400. "application/json": {
  10401. "schema": {
  10402. "anyOf": [
  10403. {
  10404. "$ref": "#/components/schemas/SessionNotFoundError"
  10405. },
  10406. {
  10407. "$ref": "#/components/schemas/SessionNotFoundError"
  10408. }
  10409. ]
  10410. }
  10411. }
  10412. }
  10413. }
  10414. },
  10415. "description": "Switch the model used by subsequent provider turns.",
  10416. "summary": "Switch session model",
  10417. "requestBody": {
  10418. "content": {
  10419. "application/json": {
  10420. "schema": {
  10421. "type": "object",
  10422. "properties": {
  10423. "model": {
  10424. "$ref": "#/components/schemas/ModelRef"
  10425. }
  10426. },
  10427. "required": ["model"],
  10428. "additionalProperties": false
  10429. }
  10430. }
  10431. },
  10432. "required": true
  10433. },
  10434. "x-codeSamples": [
  10435. {
  10436. "lang": "js",
  10437. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.switchModel({\n ...\n})"
  10438. }
  10439. ]
  10440. }
  10441. },
  10442. "/api/session/{sessionID}/prompt": {
  10443. "post": {
  10444. "tags": ["sessions"],
  10445. "operationId": "v2.session.prompt",
  10446. "parameters": [
  10447. {
  10448. "name": "sessionID",
  10449. "in": "path",
  10450. "schema": {
  10451. "type": "string",
  10452. "pattern": "^ses"
  10453. },
  10454. "required": true
  10455. }
  10456. ],
  10457. "security": [],
  10458. "responses": {
  10459. "200": {
  10460. "description": "Success",
  10461. "content": {
  10462. "application/json": {
  10463. "schema": {
  10464. "type": "object",
  10465. "properties": {
  10466. "data": {
  10467. "$ref": "#/components/schemas/SessionInputAdmitted"
  10468. }
  10469. },
  10470. "required": ["data"],
  10471. "additionalProperties": false
  10472. }
  10473. }
  10474. }
  10475. },
  10476. "400": {
  10477. "description": "InvalidRequestError",
  10478. "content": {
  10479. "application/json": {
  10480. "schema": {
  10481. "$ref": "#/components/schemas/InvalidRequestError"
  10482. }
  10483. }
  10484. }
  10485. },
  10486. "401": {
  10487. "description": "UnauthorizedError",
  10488. "content": {
  10489. "application/json": {
  10490. "schema": {
  10491. "$ref": "#/components/schemas/UnauthorizedError"
  10492. }
  10493. }
  10494. }
  10495. },
  10496. "404": {
  10497. "description": "SessionNotFoundError",
  10498. "content": {
  10499. "application/json": {
  10500. "schema": {
  10501. "anyOf": [
  10502. {
  10503. "$ref": "#/components/schemas/SessionNotFoundError"
  10504. },
  10505. {
  10506. "$ref": "#/components/schemas/SessionNotFoundError"
  10507. }
  10508. ]
  10509. }
  10510. }
  10511. }
  10512. },
  10513. "409": {
  10514. "description": "ConflictError",
  10515. "content": {
  10516. "application/json": {
  10517. "schema": {
  10518. "$ref": "#/components/schemas/ConflictError"
  10519. }
  10520. }
  10521. }
  10522. }
  10523. },
  10524. "description": "Durably admit one session input and schedule agent-loop execution unless resume is false.",
  10525. "summary": "Send message",
  10526. "requestBody": {
  10527. "content": {
  10528. "application/json": {
  10529. "schema": {
  10530. "type": "object",
  10531. "properties": {
  10532. "id": {
  10533. "type": "string",
  10534. "pattern": "^msg_"
  10535. },
  10536. "prompt": {
  10537. "$ref": "#/components/schemas/Prompt"
  10538. },
  10539. "delivery": {
  10540. "type": "string",
  10541. "enum": ["steer", "queue"]
  10542. },
  10543. "resume": {
  10544. "type": "boolean"
  10545. }
  10546. },
  10547. "required": ["prompt"],
  10548. "additionalProperties": false
  10549. }
  10550. }
  10551. },
  10552. "required": true
  10553. },
  10554. "x-codeSamples": [
  10555. {
  10556. "lang": "js",
  10557. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  10558. }
  10559. ]
  10560. }
  10561. },
  10562. "/api/session/{sessionID}/compact": {
  10563. "post": {
  10564. "tags": ["sessions"],
  10565. "operationId": "v2.session.compact",
  10566. "parameters": [
  10567. {
  10568. "name": "sessionID",
  10569. "in": "path",
  10570. "schema": {
  10571. "type": "string",
  10572. "pattern": "^ses"
  10573. },
  10574. "required": true
  10575. }
  10576. ],
  10577. "security": [],
  10578. "responses": {
  10579. "204": {
  10580. "description": "<No Content>"
  10581. },
  10582. "400": {
  10583. "description": "InvalidRequestError",
  10584. "content": {
  10585. "application/json": {
  10586. "schema": {
  10587. "$ref": "#/components/schemas/InvalidRequestError"
  10588. }
  10589. }
  10590. }
  10591. },
  10592. "401": {
  10593. "description": "UnauthorizedError",
  10594. "content": {
  10595. "application/json": {
  10596. "schema": {
  10597. "$ref": "#/components/schemas/UnauthorizedError"
  10598. }
  10599. }
  10600. }
  10601. },
  10602. "404": {
  10603. "description": "SessionNotFoundError",
  10604. "content": {
  10605. "application/json": {
  10606. "schema": {
  10607. "anyOf": [
  10608. {
  10609. "$ref": "#/components/schemas/SessionNotFoundError"
  10610. },
  10611. {
  10612. "$ref": "#/components/schemas/SessionNotFoundError"
  10613. }
  10614. ]
  10615. }
  10616. }
  10617. }
  10618. },
  10619. "503": {
  10620. "description": "ServiceUnavailableError",
  10621. "content": {
  10622. "application/json": {
  10623. "schema": {
  10624. "$ref": "#/components/schemas/ServiceUnavailableError"
  10625. }
  10626. }
  10627. }
  10628. }
  10629. },
  10630. "description": "Compact a session conversation.",
  10631. "summary": "Compact session",
  10632. "x-codeSamples": [
  10633. {
  10634. "lang": "js",
  10635. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  10636. }
  10637. ]
  10638. }
  10639. },
  10640. "/api/session/{sessionID}/wait": {
  10641. "post": {
  10642. "tags": ["sessions"],
  10643. "operationId": "v2.session.wait",
  10644. "parameters": [
  10645. {
  10646. "name": "sessionID",
  10647. "in": "path",
  10648. "schema": {
  10649. "type": "string",
  10650. "pattern": "^ses"
  10651. },
  10652. "required": true
  10653. }
  10654. ],
  10655. "security": [],
  10656. "responses": {
  10657. "204": {
  10658. "description": "<No Content>"
  10659. },
  10660. "400": {
  10661. "description": "InvalidRequestError",
  10662. "content": {
  10663. "application/json": {
  10664. "schema": {
  10665. "$ref": "#/components/schemas/InvalidRequestError"
  10666. }
  10667. }
  10668. }
  10669. },
  10670. "401": {
  10671. "description": "UnauthorizedError",
  10672. "content": {
  10673. "application/json": {
  10674. "schema": {
  10675. "$ref": "#/components/schemas/UnauthorizedError"
  10676. }
  10677. }
  10678. }
  10679. },
  10680. "404": {
  10681. "description": "SessionNotFoundError",
  10682. "content": {
  10683. "application/json": {
  10684. "schema": {
  10685. "anyOf": [
  10686. {
  10687. "$ref": "#/components/schemas/SessionNotFoundError"
  10688. },
  10689. {
  10690. "$ref": "#/components/schemas/SessionNotFoundError"
  10691. }
  10692. ]
  10693. }
  10694. }
  10695. }
  10696. },
  10697. "503": {
  10698. "description": "ServiceUnavailableError",
  10699. "content": {
  10700. "application/json": {
  10701. "schema": {
  10702. "$ref": "#/components/schemas/ServiceUnavailableError"
  10703. }
  10704. }
  10705. }
  10706. }
  10707. },
  10708. "description": "Wait for a session agent loop to become idle.",
  10709. "summary": "Wait for session",
  10710. "x-codeSamples": [
  10711. {
  10712. "lang": "js",
  10713. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  10714. }
  10715. ]
  10716. }
  10717. },
  10718. "/api/session/{sessionID}/revert/stage": {
  10719. "post": {
  10720. "tags": ["sessions"],
  10721. "operationId": "v2.session.revert.stage",
  10722. "parameters": [
  10723. {
  10724. "name": "sessionID",
  10725. "in": "path",
  10726. "schema": {
  10727. "type": "string",
  10728. "pattern": "^ses"
  10729. },
  10730. "required": true
  10731. }
  10732. ],
  10733. "security": [],
  10734. "responses": {
  10735. "200": {
  10736. "description": "Success",
  10737. "content": {
  10738. "application/json": {
  10739. "schema": {
  10740. "type": "object",
  10741. "properties": {
  10742. "data": {
  10743. "$ref": "#/components/schemas/RevertState"
  10744. }
  10745. },
  10746. "required": ["data"],
  10747. "additionalProperties": false
  10748. }
  10749. }
  10750. }
  10751. },
  10752. "400": {
  10753. "description": "InvalidRequestError",
  10754. "content": {
  10755. "application/json": {
  10756. "schema": {
  10757. "$ref": "#/components/schemas/InvalidRequestError"
  10758. }
  10759. }
  10760. }
  10761. },
  10762. "401": {
  10763. "description": "UnauthorizedError",
  10764. "content": {
  10765. "application/json": {
  10766. "schema": {
  10767. "$ref": "#/components/schemas/UnauthorizedError"
  10768. }
  10769. }
  10770. }
  10771. },
  10772. "404": {
  10773. "description": "MessageNotFoundError | SessionNotFoundError",
  10774. "content": {
  10775. "application/json": {
  10776. "schema": {
  10777. "anyOf": [
  10778. {
  10779. "$ref": "#/components/schemas/MessageNotFoundError"
  10780. },
  10781. {
  10782. "$ref": "#/components/schemas/SessionNotFoundError"
  10783. },
  10784. {
  10785. "$ref": "#/components/schemas/SessionNotFoundError"
  10786. }
  10787. ]
  10788. }
  10789. }
  10790. }
  10791. },
  10792. "500": {
  10793. "description": "UnknownError",
  10794. "content": {
  10795. "application/json": {
  10796. "schema": {
  10797. "$ref": "#/components/schemas/UnknownError1"
  10798. }
  10799. }
  10800. }
  10801. }
  10802. },
  10803. "description": "Stage or move a reversible session boundary and optionally apply its file changes.",
  10804. "summary": "Stage session revert",
  10805. "requestBody": {
  10806. "content": {
  10807. "application/json": {
  10808. "schema": {
  10809. "type": "object",
  10810. "properties": {
  10811. "messageID": {
  10812. "type": "string",
  10813. "pattern": "^msg_"
  10814. },
  10815. "files": {
  10816. "type": "boolean"
  10817. }
  10818. },
  10819. "required": ["messageID"],
  10820. "additionalProperties": false
  10821. }
  10822. }
  10823. },
  10824. "required": true
  10825. },
  10826. "x-codeSamples": [
  10827. {
  10828. "lang": "js",
  10829. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.revert.stage({\n ...\n})"
  10830. }
  10831. ]
  10832. }
  10833. },
  10834. "/api/session/{sessionID}/revert/clear": {
  10835. "post": {
  10836. "tags": ["sessions"],
  10837. "operationId": "v2.session.revert.clear",
  10838. "parameters": [
  10839. {
  10840. "name": "sessionID",
  10841. "in": "path",
  10842. "schema": {
  10843. "type": "string",
  10844. "pattern": "^ses"
  10845. },
  10846. "required": true
  10847. }
  10848. ],
  10849. "security": [],
  10850. "responses": {
  10851. "204": {
  10852. "description": "<No Content>"
  10853. },
  10854. "400": {
  10855. "description": "InvalidRequestError",
  10856. "content": {
  10857. "application/json": {
  10858. "schema": {
  10859. "$ref": "#/components/schemas/InvalidRequestError"
  10860. }
  10861. }
  10862. }
  10863. },
  10864. "401": {
  10865. "description": "UnauthorizedError",
  10866. "content": {
  10867. "application/json": {
  10868. "schema": {
  10869. "$ref": "#/components/schemas/UnauthorizedError"
  10870. }
  10871. }
  10872. }
  10873. },
  10874. "404": {
  10875. "description": "SessionNotFoundError",
  10876. "content": {
  10877. "application/json": {
  10878. "schema": {
  10879. "anyOf": [
  10880. {
  10881. "$ref": "#/components/schemas/SessionNotFoundError"
  10882. },
  10883. {
  10884. "$ref": "#/components/schemas/SessionNotFoundError"
  10885. }
  10886. ]
  10887. }
  10888. }
  10889. }
  10890. },
  10891. "500": {
  10892. "description": "UnknownError",
  10893. "content": {
  10894. "application/json": {
  10895. "schema": {
  10896. "$ref": "#/components/schemas/UnknownError1"
  10897. }
  10898. }
  10899. }
  10900. }
  10901. },
  10902. "summary": "Clear staged revert",
  10903. "x-codeSamples": [
  10904. {
  10905. "lang": "js",
  10906. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.revert.clear({\n ...\n})"
  10907. }
  10908. ]
  10909. }
  10910. },
  10911. "/api/session/{sessionID}/revert/commit": {
  10912. "post": {
  10913. "tags": ["sessions"],
  10914. "operationId": "v2.session.revert.commit",
  10915. "parameters": [
  10916. {
  10917. "name": "sessionID",
  10918. "in": "path",
  10919. "schema": {
  10920. "type": "string",
  10921. "pattern": "^ses"
  10922. },
  10923. "required": true
  10924. }
  10925. ],
  10926. "security": [],
  10927. "responses": {
  10928. "204": {
  10929. "description": "<No Content>"
  10930. },
  10931. "400": {
  10932. "description": "InvalidRequestError",
  10933. "content": {
  10934. "application/json": {
  10935. "schema": {
  10936. "$ref": "#/components/schemas/InvalidRequestError"
  10937. }
  10938. }
  10939. }
  10940. },
  10941. "401": {
  10942. "description": "UnauthorizedError",
  10943. "content": {
  10944. "application/json": {
  10945. "schema": {
  10946. "$ref": "#/components/schemas/UnauthorizedError"
  10947. }
  10948. }
  10949. }
  10950. },
  10951. "404": {
  10952. "description": "SessionNotFoundError",
  10953. "content": {
  10954. "application/json": {
  10955. "schema": {
  10956. "anyOf": [
  10957. {
  10958. "$ref": "#/components/schemas/SessionNotFoundError"
  10959. },
  10960. {
  10961. "$ref": "#/components/schemas/SessionNotFoundError"
  10962. }
  10963. ]
  10964. }
  10965. }
  10966. }
  10967. }
  10968. },
  10969. "summary": "Commit staged revert",
  10970. "x-codeSamples": [
  10971. {
  10972. "lang": "js",
  10973. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.revert.commit({\n ...\n})"
  10974. }
  10975. ]
  10976. }
  10977. },
  10978. "/api/session/{sessionID}/context": {
  10979. "get": {
  10980. "tags": ["sessions"],
  10981. "operationId": "v2.session.context",
  10982. "parameters": [
  10983. {
  10984. "name": "sessionID",
  10985. "in": "path",
  10986. "schema": {
  10987. "type": "string",
  10988. "pattern": "^ses"
  10989. },
  10990. "required": true
  10991. }
  10992. ],
  10993. "security": [],
  10994. "responses": {
  10995. "200": {
  10996. "description": "Success",
  10997. "content": {
  10998. "application/json": {
  10999. "schema": {
  11000. "type": "object",
  11001. "properties": {
  11002. "data": {
  11003. "type": "array",
  11004. "items": {
  11005. "$ref": "#/components/schemas/SessionMessage"
  11006. }
  11007. }
  11008. },
  11009. "required": ["data"],
  11010. "additionalProperties": false
  11011. }
  11012. }
  11013. }
  11014. },
  11015. "400": {
  11016. "description": "InvalidRequestError",
  11017. "content": {
  11018. "application/json": {
  11019. "schema": {
  11020. "$ref": "#/components/schemas/InvalidRequestError"
  11021. }
  11022. }
  11023. }
  11024. },
  11025. "401": {
  11026. "description": "UnauthorizedError",
  11027. "content": {
  11028. "application/json": {
  11029. "schema": {
  11030. "$ref": "#/components/schemas/UnauthorizedError"
  11031. }
  11032. }
  11033. }
  11034. },
  11035. "404": {
  11036. "description": "SessionNotFoundError",
  11037. "content": {
  11038. "application/json": {
  11039. "schema": {
  11040. "anyOf": [
  11041. {
  11042. "$ref": "#/components/schemas/SessionNotFoundError"
  11043. },
  11044. {
  11045. "$ref": "#/components/schemas/SessionNotFoundError"
  11046. }
  11047. ]
  11048. }
  11049. }
  11050. }
  11051. },
  11052. "500": {
  11053. "description": "UnknownError",
  11054. "content": {
  11055. "application/json": {
  11056. "schema": {
  11057. "$ref": "#/components/schemas/UnknownError1"
  11058. }
  11059. }
  11060. }
  11061. }
  11062. },
  11063. "description": "Retrieve the active context messages for a session (all messages after the last compaction).",
  11064. "summary": "Get session context",
  11065. "x-codeSamples": [
  11066. {
  11067. "lang": "js",
  11068. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  11069. }
  11070. ]
  11071. }
  11072. },
  11073. "/api/session/{sessionID}/message": {
  11074. "get": {
  11075. "tags": ["messages"],
  11076. "operationId": "v2.session.messages",
  11077. "parameters": [
  11078. {
  11079. "name": "sessionID",
  11080. "in": "path",
  11081. "schema": {
  11082. "type": "string",
  11083. "pattern": "^ses"
  11084. },
  11085. "required": true
  11086. },
  11087. {
  11088. "name": "limit",
  11089. "in": "query",
  11090. "schema": {
  11091. "type": "number"
  11092. },
  11093. "required": false
  11094. },
  11095. {
  11096. "name": "order",
  11097. "in": "query",
  11098. "schema": {
  11099. "type": "string",
  11100. "enum": ["asc", "desc"]
  11101. },
  11102. "required": false
  11103. },
  11104. {
  11105. "name": "cursor",
  11106. "in": "query",
  11107. "schema": {
  11108. "type": "string",
  11109. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."
  11110. },
  11111. "required": false
  11112. }
  11113. ],
  11114. "security": [],
  11115. "responses": {
  11116. "200": {
  11117. "description": "SessionMessagesResponse",
  11118. "content": {
  11119. "application/json": {
  11120. "schema": {
  11121. "$ref": "#/components/schemas/SessionMessagesResponse"
  11122. }
  11123. }
  11124. }
  11125. },
  11126. "400": {
  11127. "description": "InvalidCursorError | InvalidRequestError",
  11128. "content": {
  11129. "application/json": {
  11130. "schema": {
  11131. "anyOf": [
  11132. {
  11133. "$ref": "#/components/schemas/InvalidCursorError"
  11134. },
  11135. {
  11136. "$ref": "#/components/schemas/InvalidRequestError"
  11137. }
  11138. ]
  11139. }
  11140. }
  11141. }
  11142. },
  11143. "401": {
  11144. "description": "UnauthorizedError",
  11145. "content": {
  11146. "application/json": {
  11147. "schema": {
  11148. "$ref": "#/components/schemas/UnauthorizedError"
  11149. }
  11150. }
  11151. }
  11152. },
  11153. "404": {
  11154. "description": "SessionNotFoundError",
  11155. "content": {
  11156. "application/json": {
  11157. "schema": {
  11158. "anyOf": [
  11159. {
  11160. "$ref": "#/components/schemas/SessionNotFoundError"
  11161. },
  11162. {
  11163. "$ref": "#/components/schemas/SessionNotFoundError"
  11164. }
  11165. ]
  11166. }
  11167. }
  11168. }
  11169. },
  11170. "500": {
  11171. "description": "UnknownError",
  11172. "content": {
  11173. "application/json": {
  11174. "schema": {
  11175. "$ref": "#/components/schemas/UnknownError1"
  11176. }
  11177. }
  11178. }
  11179. }
  11180. },
  11181. "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.",
  11182. "summary": "Get session messages",
  11183. "x-codeSamples": [
  11184. {
  11185. "lang": "js",
  11186. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  11187. }
  11188. ]
  11189. }
  11190. },
  11191. "/api/model": {
  11192. "get": {
  11193. "tags": ["models"],
  11194. "operationId": "v2.model.list",
  11195. "parameters": [
  11196. {
  11197. "name": "location",
  11198. "in": "query",
  11199. "schema": {
  11200. "type": "object",
  11201. "properties": {
  11202. "directory": {
  11203. "type": "string"
  11204. },
  11205. "workspace": {
  11206. "type": "string"
  11207. }
  11208. },
  11209. "additionalProperties": false
  11210. },
  11211. "required": false,
  11212. "style": "deepObject",
  11213. "explode": true
  11214. }
  11215. ],
  11216. "security": [],
  11217. "responses": {
  11218. "200": {
  11219. "description": "Success",
  11220. "content": {
  11221. "application/json": {
  11222. "schema": {
  11223. "type": "object",
  11224. "properties": {
  11225. "location": {
  11226. "$ref": "#/components/schemas/LocationInfo"
  11227. },
  11228. "data": {
  11229. "type": "array",
  11230. "items": {
  11231. "$ref": "#/components/schemas/ModelV2Info"
  11232. }
  11233. }
  11234. },
  11235. "required": ["location", "data"],
  11236. "additionalProperties": false
  11237. }
  11238. }
  11239. }
  11240. },
  11241. "400": {
  11242. "description": "InvalidRequestError",
  11243. "content": {
  11244. "application/json": {
  11245. "schema": {
  11246. "$ref": "#/components/schemas/InvalidRequestError"
  11247. }
  11248. }
  11249. }
  11250. },
  11251. "401": {
  11252. "description": "UnauthorizedError",
  11253. "content": {
  11254. "application/json": {
  11255. "schema": {
  11256. "$ref": "#/components/schemas/UnauthorizedError"
  11257. }
  11258. }
  11259. }
  11260. },
  11261. "503": {
  11262. "description": "ServiceUnavailableError",
  11263. "content": {
  11264. "application/json": {
  11265. "schema": {
  11266. "$ref": "#/components/schemas/ServiceUnavailableError"
  11267. }
  11268. }
  11269. }
  11270. }
  11271. },
  11272. "description": "Retrieve available models ordered by release date.",
  11273. "summary": "List models",
  11274. "x-codeSamples": [
  11275. {
  11276. "lang": "js",
  11277. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.model.list({\n ...\n})"
  11278. }
  11279. ]
  11280. }
  11281. },
  11282. "/api/provider": {
  11283. "get": {
  11284. "tags": ["providers"],
  11285. "operationId": "v2.provider.list",
  11286. "parameters": [
  11287. {
  11288. "name": "location",
  11289. "in": "query",
  11290. "schema": {
  11291. "type": "object",
  11292. "properties": {
  11293. "directory": {
  11294. "type": "string"
  11295. },
  11296. "workspace": {
  11297. "type": "string"
  11298. }
  11299. },
  11300. "additionalProperties": false
  11301. },
  11302. "required": false,
  11303. "style": "deepObject",
  11304. "explode": true
  11305. }
  11306. ],
  11307. "security": [],
  11308. "responses": {
  11309. "200": {
  11310. "description": "Success",
  11311. "content": {
  11312. "application/json": {
  11313. "schema": {
  11314. "type": "object",
  11315. "properties": {
  11316. "location": {
  11317. "$ref": "#/components/schemas/LocationInfo"
  11318. },
  11319. "data": {
  11320. "type": "array",
  11321. "items": {
  11322. "$ref": "#/components/schemas/ProviderV2Info"
  11323. }
  11324. }
  11325. },
  11326. "required": ["location", "data"],
  11327. "additionalProperties": false
  11328. }
  11329. }
  11330. }
  11331. },
  11332. "400": {
  11333. "description": "InvalidRequestError",
  11334. "content": {
  11335. "application/json": {
  11336. "schema": {
  11337. "$ref": "#/components/schemas/InvalidRequestError"
  11338. }
  11339. }
  11340. }
  11341. },
  11342. "401": {
  11343. "description": "UnauthorizedError",
  11344. "content": {
  11345. "application/json": {
  11346. "schema": {
  11347. "$ref": "#/components/schemas/UnauthorizedError"
  11348. }
  11349. }
  11350. }
  11351. },
  11352. "503": {
  11353. "description": "ServiceUnavailableError",
  11354. "content": {
  11355. "application/json": {
  11356. "schema": {
  11357. "$ref": "#/components/schemas/ServiceUnavailableError"
  11358. }
  11359. }
  11360. }
  11361. }
  11362. },
  11363. "description": "Retrieve active AI providers so clients can show provider availability and configuration.",
  11364. "summary": "List providers",
  11365. "x-codeSamples": [
  11366. {
  11367. "lang": "js",
  11368. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.list({\n ...\n})"
  11369. }
  11370. ]
  11371. }
  11372. },
  11373. "/api/provider/{providerID}": {
  11374. "get": {
  11375. "tags": ["providers"],
  11376. "operationId": "v2.provider.get",
  11377. "parameters": [
  11378. {
  11379. "name": "providerID",
  11380. "in": "path",
  11381. "schema": {
  11382. "type": "string"
  11383. },
  11384. "required": true
  11385. },
  11386. {
  11387. "name": "location",
  11388. "in": "query",
  11389. "schema": {
  11390. "type": "object",
  11391. "properties": {
  11392. "directory": {
  11393. "type": "string"
  11394. },
  11395. "workspace": {
  11396. "type": "string"
  11397. }
  11398. },
  11399. "additionalProperties": false
  11400. },
  11401. "required": false,
  11402. "style": "deepObject",
  11403. "explode": true
  11404. }
  11405. ],
  11406. "security": [],
  11407. "responses": {
  11408. "200": {
  11409. "description": "Success",
  11410. "content": {
  11411. "application/json": {
  11412. "schema": {
  11413. "type": "object",
  11414. "properties": {
  11415. "location": {
  11416. "$ref": "#/components/schemas/LocationInfo"
  11417. },
  11418. "data": {
  11419. "$ref": "#/components/schemas/ProviderV2Info"
  11420. }
  11421. },
  11422. "required": ["location", "data"],
  11423. "additionalProperties": false
  11424. }
  11425. }
  11426. }
  11427. },
  11428. "400": {
  11429. "description": "InvalidRequestError",
  11430. "content": {
  11431. "application/json": {
  11432. "schema": {
  11433. "$ref": "#/components/schemas/InvalidRequestError"
  11434. }
  11435. }
  11436. }
  11437. },
  11438. "401": {
  11439. "description": "UnauthorizedError",
  11440. "content": {
  11441. "application/json": {
  11442. "schema": {
  11443. "$ref": "#/components/schemas/UnauthorizedError"
  11444. }
  11445. }
  11446. }
  11447. },
  11448. "404": {
  11449. "description": "ProviderNotFoundError",
  11450. "content": {
  11451. "application/json": {
  11452. "schema": {
  11453. "$ref": "#/components/schemas/ProviderNotFoundError"
  11454. }
  11455. }
  11456. }
  11457. },
  11458. "503": {
  11459. "description": "ServiceUnavailableError",
  11460. "content": {
  11461. "application/json": {
  11462. "schema": {
  11463. "$ref": "#/components/schemas/ServiceUnavailableError"
  11464. }
  11465. }
  11466. }
  11467. }
  11468. },
  11469. "description": "Retrieve a single AI provider so clients can inspect its availability and endpoint settings.",
  11470. "summary": "Get provider",
  11471. "x-codeSamples": [
  11472. {
  11473. "lang": "js",
  11474. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.get({\n ...\n})"
  11475. }
  11476. ]
  11477. }
  11478. },
  11479. "/api/integration": {
  11480. "get": {
  11481. "tags": ["integrations"],
  11482. "operationId": "v2.integration.list",
  11483. "parameters": [
  11484. {
  11485. "name": "location",
  11486. "in": "query",
  11487. "schema": {
  11488. "type": "object",
  11489. "properties": {
  11490. "directory": {
  11491. "type": "string"
  11492. },
  11493. "workspace": {
  11494. "type": "string"
  11495. }
  11496. },
  11497. "additionalProperties": false
  11498. },
  11499. "required": false,
  11500. "style": "deepObject",
  11501. "explode": true
  11502. }
  11503. ],
  11504. "security": [],
  11505. "responses": {
  11506. "200": {
  11507. "description": "Success",
  11508. "content": {
  11509. "application/json": {
  11510. "schema": {
  11511. "type": "object",
  11512. "properties": {
  11513. "location": {
  11514. "$ref": "#/components/schemas/LocationInfo"
  11515. },
  11516. "data": {
  11517. "type": "array",
  11518. "items": {
  11519. "$ref": "#/components/schemas/IntegrationInfo"
  11520. }
  11521. }
  11522. },
  11523. "required": ["location", "data"],
  11524. "additionalProperties": false
  11525. }
  11526. }
  11527. }
  11528. },
  11529. "400": {
  11530. "description": "InvalidRequestError",
  11531. "content": {
  11532. "application/json": {
  11533. "schema": {
  11534. "$ref": "#/components/schemas/InvalidRequestError"
  11535. }
  11536. }
  11537. }
  11538. },
  11539. "401": {
  11540. "description": "UnauthorizedError",
  11541. "content": {
  11542. "application/json": {
  11543. "schema": {
  11544. "$ref": "#/components/schemas/UnauthorizedError"
  11545. }
  11546. }
  11547. }
  11548. }
  11549. },
  11550. "description": "Retrieve available integrations and their authentication methods.",
  11551. "summary": "List integrations",
  11552. "x-codeSamples": [
  11553. {
  11554. "lang": "js",
  11555. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.list({\n ...\n})"
  11556. }
  11557. ]
  11558. }
  11559. },
  11560. "/api/integration/{integrationID}": {
  11561. "get": {
  11562. "tags": ["integrations"],
  11563. "operationId": "v2.integration.get",
  11564. "parameters": [
  11565. {
  11566. "name": "integrationID",
  11567. "in": "path",
  11568. "schema": {
  11569. "type": "string"
  11570. },
  11571. "required": true
  11572. },
  11573. {
  11574. "name": "location",
  11575. "in": "query",
  11576. "schema": {
  11577. "type": "object",
  11578. "properties": {
  11579. "directory": {
  11580. "type": "string"
  11581. },
  11582. "workspace": {
  11583. "type": "string"
  11584. }
  11585. },
  11586. "additionalProperties": false
  11587. },
  11588. "required": false,
  11589. "style": "deepObject",
  11590. "explode": true
  11591. }
  11592. ],
  11593. "security": [],
  11594. "responses": {
  11595. "200": {
  11596. "description": "Success",
  11597. "content": {
  11598. "application/json": {
  11599. "schema": {
  11600. "type": "object",
  11601. "properties": {
  11602. "location": {
  11603. "$ref": "#/components/schemas/LocationInfo"
  11604. },
  11605. "data": {
  11606. "$ref": "#/components/schemas/IntegrationInfo"
  11607. }
  11608. },
  11609. "required": ["location", "data"],
  11610. "additionalProperties": false
  11611. }
  11612. }
  11613. }
  11614. },
  11615. "400": {
  11616. "description": "InvalidRequestError",
  11617. "content": {
  11618. "application/json": {
  11619. "schema": {
  11620. "$ref": "#/components/schemas/InvalidRequestError"
  11621. }
  11622. }
  11623. }
  11624. },
  11625. "401": {
  11626. "description": "UnauthorizedError",
  11627. "content": {
  11628. "application/json": {
  11629. "schema": {
  11630. "$ref": "#/components/schemas/UnauthorizedError"
  11631. }
  11632. }
  11633. }
  11634. }
  11635. },
  11636. "description": "Retrieve one integration and its authentication methods.",
  11637. "summary": "Get integration",
  11638. "x-codeSamples": [
  11639. {
  11640. "lang": "js",
  11641. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.get({\n ...\n})"
  11642. }
  11643. ]
  11644. }
  11645. },
  11646. "/api/integration/{integrationID}/connect/key": {
  11647. "post": {
  11648. "tags": ["integrations"],
  11649. "operationId": "v2.integration.connect.key",
  11650. "parameters": [
  11651. {
  11652. "name": "integrationID",
  11653. "in": "path",
  11654. "schema": {
  11655. "type": "string"
  11656. },
  11657. "required": true
  11658. },
  11659. {
  11660. "name": "location",
  11661. "in": "query",
  11662. "schema": {
  11663. "type": "object",
  11664. "properties": {
  11665. "directory": {
  11666. "type": "string"
  11667. },
  11668. "workspace": {
  11669. "type": "string"
  11670. }
  11671. },
  11672. "additionalProperties": false
  11673. },
  11674. "required": false,
  11675. "style": "deepObject",
  11676. "explode": true
  11677. }
  11678. ],
  11679. "security": [],
  11680. "responses": {
  11681. "204": {
  11682. "description": "<No Content>"
  11683. },
  11684. "400": {
  11685. "description": "InvalidRequestError",
  11686. "content": {
  11687. "application/json": {
  11688. "schema": {
  11689. "anyOf": [
  11690. {
  11691. "$ref": "#/components/schemas/InvalidRequestError"
  11692. },
  11693. {
  11694. "$ref": "#/components/schemas/InvalidRequestError"
  11695. }
  11696. ]
  11697. }
  11698. }
  11699. }
  11700. },
  11701. "401": {
  11702. "description": "UnauthorizedError",
  11703. "content": {
  11704. "application/json": {
  11705. "schema": {
  11706. "$ref": "#/components/schemas/UnauthorizedError"
  11707. }
  11708. }
  11709. }
  11710. }
  11711. },
  11712. "description": "Run a key authentication method and store the resulting credential.",
  11713. "summary": "Connect with key",
  11714. "requestBody": {
  11715. "content": {
  11716. "application/json": {
  11717. "schema": {
  11718. "type": "object",
  11719. "properties": {
  11720. "key": {
  11721. "type": "string"
  11722. },
  11723. "label": {
  11724. "type": "string"
  11725. }
  11726. },
  11727. "required": ["key"],
  11728. "additionalProperties": false
  11729. }
  11730. }
  11731. },
  11732. "required": true
  11733. },
  11734. "x-codeSamples": [
  11735. {
  11736. "lang": "js",
  11737. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.connect.key({\n ...\n})"
  11738. }
  11739. ]
  11740. }
  11741. },
  11742. "/api/integration/{integrationID}/connect/oauth": {
  11743. "post": {
  11744. "tags": ["integrations"],
  11745. "operationId": "v2.integration.connect.oauth",
  11746. "parameters": [
  11747. {
  11748. "name": "integrationID",
  11749. "in": "path",
  11750. "schema": {
  11751. "type": "string"
  11752. },
  11753. "required": true
  11754. },
  11755. {
  11756. "name": "location",
  11757. "in": "query",
  11758. "schema": {
  11759. "type": "object",
  11760. "properties": {
  11761. "directory": {
  11762. "type": "string"
  11763. },
  11764. "workspace": {
  11765. "type": "string"
  11766. }
  11767. },
  11768. "additionalProperties": false
  11769. },
  11770. "required": false,
  11771. "style": "deepObject",
  11772. "explode": true
  11773. }
  11774. ],
  11775. "security": [],
  11776. "responses": {
  11777. "200": {
  11778. "description": "Success",
  11779. "content": {
  11780. "application/json": {
  11781. "schema": {
  11782. "type": "object",
  11783. "properties": {
  11784. "location": {
  11785. "$ref": "#/components/schemas/LocationInfo"
  11786. },
  11787. "data": {
  11788. "$ref": "#/components/schemas/IntegrationAttempt"
  11789. }
  11790. },
  11791. "required": ["location", "data"],
  11792. "additionalProperties": false
  11793. }
  11794. }
  11795. }
  11796. },
  11797. "400": {
  11798. "description": "InvalidRequestError",
  11799. "content": {
  11800. "application/json": {
  11801. "schema": {
  11802. "anyOf": [
  11803. {
  11804. "$ref": "#/components/schemas/InvalidRequestError"
  11805. },
  11806. {
  11807. "$ref": "#/components/schemas/InvalidRequestError"
  11808. }
  11809. ]
  11810. }
  11811. }
  11812. }
  11813. },
  11814. "401": {
  11815. "description": "UnauthorizedError",
  11816. "content": {
  11817. "application/json": {
  11818. "schema": {
  11819. "$ref": "#/components/schemas/UnauthorizedError"
  11820. }
  11821. }
  11822. }
  11823. }
  11824. },
  11825. "description": "Start an OAuth attempt and return the authorization details.",
  11826. "summary": "Begin OAuth connection",
  11827. "requestBody": {
  11828. "content": {
  11829. "application/json": {
  11830. "schema": {
  11831. "type": "object",
  11832. "properties": {
  11833. "methodID": {
  11834. "type": "string"
  11835. },
  11836. "inputs": {
  11837. "type": "object",
  11838. "additionalProperties": {
  11839. "type": "string"
  11840. }
  11841. },
  11842. "label": {
  11843. "type": "string"
  11844. }
  11845. },
  11846. "required": ["methodID", "inputs"],
  11847. "additionalProperties": false
  11848. }
  11849. }
  11850. },
  11851. "required": true
  11852. },
  11853. "x-codeSamples": [
  11854. {
  11855. "lang": "js",
  11856. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.connect.oauth({\n ...\n})"
  11857. }
  11858. ]
  11859. }
  11860. },
  11861. "/api/integration/attempt/{attemptID}": {
  11862. "get": {
  11863. "tags": ["integrations"],
  11864. "operationId": "v2.integration.attempt.status",
  11865. "parameters": [
  11866. {
  11867. "name": "attemptID",
  11868. "in": "path",
  11869. "schema": {
  11870. "type": "string"
  11871. },
  11872. "required": true
  11873. },
  11874. {
  11875. "name": "location",
  11876. "in": "query",
  11877. "schema": {
  11878. "type": "object",
  11879. "properties": {
  11880. "directory": {
  11881. "type": "string"
  11882. },
  11883. "workspace": {
  11884. "type": "string"
  11885. }
  11886. },
  11887. "additionalProperties": false
  11888. },
  11889. "required": false,
  11890. "style": "deepObject",
  11891. "explode": true
  11892. }
  11893. ],
  11894. "security": [],
  11895. "responses": {
  11896. "200": {
  11897. "description": "Success",
  11898. "content": {
  11899. "application/json": {
  11900. "schema": {
  11901. "type": "object",
  11902. "properties": {
  11903. "location": {
  11904. "$ref": "#/components/schemas/LocationInfo"
  11905. },
  11906. "data": {
  11907. "$ref": "#/components/schemas/IntegrationAttemptStatus"
  11908. }
  11909. },
  11910. "required": ["location", "data"],
  11911. "additionalProperties": false
  11912. }
  11913. }
  11914. }
  11915. },
  11916. "400": {
  11917. "description": "InvalidRequestError",
  11918. "content": {
  11919. "application/json": {
  11920. "schema": {
  11921. "$ref": "#/components/schemas/InvalidRequestError"
  11922. }
  11923. }
  11924. }
  11925. },
  11926. "401": {
  11927. "description": "UnauthorizedError",
  11928. "content": {
  11929. "application/json": {
  11930. "schema": {
  11931. "$ref": "#/components/schemas/UnauthorizedError"
  11932. }
  11933. }
  11934. }
  11935. }
  11936. },
  11937. "description": "Poll the current status of an OAuth attempt.",
  11938. "summary": "Get OAuth attempt status",
  11939. "x-codeSamples": [
  11940. {
  11941. "lang": "js",
  11942. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.attempt.status({\n ...\n})"
  11943. }
  11944. ]
  11945. },
  11946. "delete": {
  11947. "tags": ["integrations"],
  11948. "operationId": "v2.integration.attempt.cancel",
  11949. "parameters": [
  11950. {
  11951. "name": "attemptID",
  11952. "in": "path",
  11953. "schema": {
  11954. "type": "string"
  11955. },
  11956. "required": true
  11957. },
  11958. {
  11959. "name": "location",
  11960. "in": "query",
  11961. "schema": {
  11962. "type": "object",
  11963. "properties": {
  11964. "directory": {
  11965. "type": "string"
  11966. },
  11967. "workspace": {
  11968. "type": "string"
  11969. }
  11970. },
  11971. "additionalProperties": false
  11972. },
  11973. "required": false,
  11974. "style": "deepObject",
  11975. "explode": true
  11976. }
  11977. ],
  11978. "security": [],
  11979. "responses": {
  11980. "204": {
  11981. "description": "<No Content>"
  11982. },
  11983. "400": {
  11984. "description": "InvalidRequestError",
  11985. "content": {
  11986. "application/json": {
  11987. "schema": {
  11988. "$ref": "#/components/schemas/InvalidRequestError"
  11989. }
  11990. }
  11991. }
  11992. },
  11993. "401": {
  11994. "description": "UnauthorizedError",
  11995. "content": {
  11996. "application/json": {
  11997. "schema": {
  11998. "$ref": "#/components/schemas/UnauthorizedError"
  11999. }
  12000. }
  12001. }
  12002. }
  12003. },
  12004. "description": "Cancel an OAuth attempt and release its resources.",
  12005. "summary": "Cancel OAuth connection",
  12006. "x-codeSamples": [
  12007. {
  12008. "lang": "js",
  12009. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.attempt.cancel({\n ...\n})"
  12010. }
  12011. ]
  12012. }
  12013. },
  12014. "/api/integration/attempt/{attemptID}/complete": {
  12015. "post": {
  12016. "tags": ["integrations"],
  12017. "operationId": "v2.integration.attempt.complete",
  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. "anyOf": [
  12058. {
  12059. "$ref": "#/components/schemas/InvalidRequestError"
  12060. },
  12061. {
  12062. "$ref": "#/components/schemas/InvalidRequestError"
  12063. }
  12064. ]
  12065. }
  12066. }
  12067. }
  12068. },
  12069. "401": {
  12070. "description": "UnauthorizedError",
  12071. "content": {
  12072. "application/json": {
  12073. "schema": {
  12074. "$ref": "#/components/schemas/UnauthorizedError"
  12075. }
  12076. }
  12077. }
  12078. }
  12079. },
  12080. "description": "Complete a code-based OAuth attempt and store the resulting credential.",
  12081. "summary": "Complete OAuth connection",
  12082. "requestBody": {
  12083. "content": {
  12084. "application/json": {
  12085. "schema": {
  12086. "type": "object",
  12087. "properties": {
  12088. "code": {
  12089. "type": "string"
  12090. }
  12091. },
  12092. "additionalProperties": false
  12093. }
  12094. }
  12095. },
  12096. "required": true
  12097. },
  12098. "x-codeSamples": [
  12099. {
  12100. "lang": "js",
  12101. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.attempt.complete({\n ...\n})"
  12102. }
  12103. ]
  12104. }
  12105. },
  12106. "/api/credential/{credentialID}": {
  12107. "patch": {
  12108. "tags": ["opencode HttpApi"],
  12109. "operationId": "v2.credential.update",
  12110. "parameters": [
  12111. {
  12112. "name": "credentialID",
  12113. "in": "path",
  12114. "schema": {
  12115. "type": "string"
  12116. },
  12117. "required": true
  12118. },
  12119. {
  12120. "name": "location",
  12121. "in": "query",
  12122. "schema": {
  12123. "type": "object",
  12124. "properties": {
  12125. "directory": {
  12126. "type": "string"
  12127. },
  12128. "workspace": {
  12129. "type": "string"
  12130. }
  12131. },
  12132. "additionalProperties": false
  12133. },
  12134. "required": false,
  12135. "style": "deepObject",
  12136. "explode": true
  12137. }
  12138. ],
  12139. "security": [],
  12140. "responses": {
  12141. "204": {
  12142. "description": "<No Content>"
  12143. },
  12144. "400": {
  12145. "description": "InvalidRequestError",
  12146. "content": {
  12147. "application/json": {
  12148. "schema": {
  12149. "$ref": "#/components/schemas/InvalidRequestError"
  12150. }
  12151. }
  12152. }
  12153. },
  12154. "401": {
  12155. "description": "UnauthorizedError",
  12156. "content": {
  12157. "application/json": {
  12158. "schema": {
  12159. "$ref": "#/components/schemas/UnauthorizedError"
  12160. }
  12161. }
  12162. }
  12163. }
  12164. },
  12165. "description": "Update a stored credential label.",
  12166. "summary": "Update credential",
  12167. "requestBody": {
  12168. "content": {
  12169. "application/json": {
  12170. "schema": {
  12171. "type": "object",
  12172. "properties": {
  12173. "label": {
  12174. "type": "string"
  12175. }
  12176. },
  12177. "required": ["label"],
  12178. "additionalProperties": false
  12179. }
  12180. }
  12181. },
  12182. "required": true
  12183. },
  12184. "x-codeSamples": [
  12185. {
  12186. "lang": "js",
  12187. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.credential.update({\n ...\n})"
  12188. }
  12189. ]
  12190. },
  12191. "delete": {
  12192. "tags": ["opencode HttpApi"],
  12193. "operationId": "v2.credential.remove",
  12194. "parameters": [
  12195. {
  12196. "name": "credentialID",
  12197. "in": "path",
  12198. "schema": {
  12199. "type": "string"
  12200. },
  12201. "required": true
  12202. },
  12203. {
  12204. "name": "location",
  12205. "in": "query",
  12206. "schema": {
  12207. "type": "object",
  12208. "properties": {
  12209. "directory": {
  12210. "type": "string"
  12211. },
  12212. "workspace": {
  12213. "type": "string"
  12214. }
  12215. },
  12216. "additionalProperties": false
  12217. },
  12218. "required": false,
  12219. "style": "deepObject",
  12220. "explode": true
  12221. }
  12222. ],
  12223. "security": [],
  12224. "responses": {
  12225. "204": {
  12226. "description": "<No Content>"
  12227. },
  12228. "400": {
  12229. "description": "InvalidRequestError",
  12230. "content": {
  12231. "application/json": {
  12232. "schema": {
  12233. "$ref": "#/components/schemas/InvalidRequestError"
  12234. }
  12235. }
  12236. }
  12237. },
  12238. "401": {
  12239. "description": "UnauthorizedError",
  12240. "content": {
  12241. "application/json": {
  12242. "schema": {
  12243. "$ref": "#/components/schemas/UnauthorizedError"
  12244. }
  12245. }
  12246. }
  12247. }
  12248. },
  12249. "description": "Remove a stored integration credential.",
  12250. "summary": "Remove credential",
  12251. "x-codeSamples": [
  12252. {
  12253. "lang": "js",
  12254. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.credential.remove({\n ...\n})"
  12255. }
  12256. ]
  12257. }
  12258. },
  12259. "/api/permission/request": {
  12260. "get": {
  12261. "tags": ["permissions"],
  12262. "operationId": "v2.permission.request.list",
  12263. "parameters": [
  12264. {
  12265. "name": "location",
  12266. "in": "query",
  12267. "schema": {
  12268. "type": "object",
  12269. "properties": {
  12270. "directory": {
  12271. "type": "string"
  12272. },
  12273. "workspace": {
  12274. "type": "string"
  12275. }
  12276. },
  12277. "additionalProperties": false
  12278. },
  12279. "required": false,
  12280. "style": "deepObject",
  12281. "explode": true
  12282. }
  12283. ],
  12284. "security": [],
  12285. "responses": {
  12286. "200": {
  12287. "description": "Success",
  12288. "content": {
  12289. "application/json": {
  12290. "schema": {
  12291. "type": "object",
  12292. "properties": {
  12293. "location": {
  12294. "$ref": "#/components/schemas/LocationInfo"
  12295. },
  12296. "data": {
  12297. "type": "array",
  12298. "items": {
  12299. "$ref": "#/components/schemas/PermissionV2Request"
  12300. }
  12301. }
  12302. },
  12303. "required": ["location", "data"],
  12304. "additionalProperties": false
  12305. }
  12306. }
  12307. }
  12308. },
  12309. "400": {
  12310. "description": "InvalidRequestError",
  12311. "content": {
  12312. "application/json": {
  12313. "schema": {
  12314. "$ref": "#/components/schemas/InvalidRequestError"
  12315. }
  12316. }
  12317. }
  12318. },
  12319. "401": {
  12320. "description": "UnauthorizedError",
  12321. "content": {
  12322. "application/json": {
  12323. "schema": {
  12324. "$ref": "#/components/schemas/UnauthorizedError"
  12325. }
  12326. }
  12327. }
  12328. }
  12329. },
  12330. "description": "Retrieve pending permission requests for a location.",
  12331. "summary": "List pending permission requests",
  12332. "x-codeSamples": [
  12333. {
  12334. "lang": "js",
  12335. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.request.list({\n ...\n})"
  12336. }
  12337. ]
  12338. }
  12339. },
  12340. "/api/permission/saved": {
  12341. "get": {
  12342. "tags": ["permissions"],
  12343. "operationId": "v2.permission.saved.list",
  12344. "parameters": [
  12345. {
  12346. "name": "projectID",
  12347. "in": "query",
  12348. "schema": {
  12349. "type": "string"
  12350. },
  12351. "required": false
  12352. }
  12353. ],
  12354. "security": [],
  12355. "responses": {
  12356. "200": {
  12357. "description": "Success",
  12358. "content": {
  12359. "application/json": {
  12360. "schema": {
  12361. "type": "object",
  12362. "properties": {
  12363. "data": {
  12364. "type": "array",
  12365. "items": {
  12366. "$ref": "#/components/schemas/PermissionSavedInfo"
  12367. }
  12368. }
  12369. },
  12370. "required": ["data"],
  12371. "additionalProperties": false
  12372. }
  12373. }
  12374. }
  12375. },
  12376. "400": {
  12377. "description": "InvalidRequestError",
  12378. "content": {
  12379. "application/json": {
  12380. "schema": {
  12381. "$ref": "#/components/schemas/InvalidRequestError"
  12382. }
  12383. }
  12384. }
  12385. },
  12386. "401": {
  12387. "description": "UnauthorizedError",
  12388. "content": {
  12389. "application/json": {
  12390. "schema": {
  12391. "$ref": "#/components/schemas/UnauthorizedError"
  12392. }
  12393. }
  12394. }
  12395. }
  12396. },
  12397. "description": "Retrieve saved permissions, optionally filtered by project.",
  12398. "summary": "List saved permissions",
  12399. "x-codeSamples": [
  12400. {
  12401. "lang": "js",
  12402. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.list({\n ...\n})"
  12403. }
  12404. ]
  12405. }
  12406. },
  12407. "/api/permission/saved/{id}": {
  12408. "delete": {
  12409. "tags": ["permissions"],
  12410. "operationId": "v2.permission.saved.remove",
  12411. "parameters": [
  12412. {
  12413. "name": "id",
  12414. "in": "path",
  12415. "schema": {
  12416. "type": "string"
  12417. },
  12418. "required": true
  12419. }
  12420. ],
  12421. "security": [],
  12422. "responses": {
  12423. "204": {
  12424. "description": "<No Content>"
  12425. },
  12426. "400": {
  12427. "description": "InvalidRequestError",
  12428. "content": {
  12429. "application/json": {
  12430. "schema": {
  12431. "$ref": "#/components/schemas/InvalidRequestError"
  12432. }
  12433. }
  12434. }
  12435. },
  12436. "401": {
  12437. "description": "UnauthorizedError",
  12438. "content": {
  12439. "application/json": {
  12440. "schema": {
  12441. "$ref": "#/components/schemas/UnauthorizedError"
  12442. }
  12443. }
  12444. }
  12445. }
  12446. },
  12447. "description": "Remove a saved permission by ID.",
  12448. "summary": "Remove saved permission",
  12449. "x-codeSamples": [
  12450. {
  12451. "lang": "js",
  12452. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.remove({\n ...\n})"
  12453. }
  12454. ]
  12455. }
  12456. },
  12457. "/api/session/{sessionID}/permission": {
  12458. "post": {
  12459. "tags": ["permissions"],
  12460. "operationId": "v2.session.permission.create",
  12461. "parameters": [
  12462. {
  12463. "name": "sessionID",
  12464. "in": "path",
  12465. "schema": {
  12466. "type": "string",
  12467. "pattern": "^ses"
  12468. },
  12469. "required": true
  12470. }
  12471. ],
  12472. "security": [],
  12473. "responses": {
  12474. "200": {
  12475. "description": "Success",
  12476. "content": {
  12477. "application/json": {
  12478. "schema": {
  12479. "type": "object",
  12480. "properties": {
  12481. "data": {
  12482. "type": "object",
  12483. "properties": {
  12484. "id": {
  12485. "type": "string",
  12486. "pattern": "^per"
  12487. },
  12488. "effect": {
  12489. "$ref": "#/components/schemas/PermissionV2Effect"
  12490. }
  12491. },
  12492. "required": ["id", "effect"],
  12493. "additionalProperties": false
  12494. }
  12495. },
  12496. "required": ["data"],
  12497. "additionalProperties": false
  12498. }
  12499. }
  12500. }
  12501. },
  12502. "400": {
  12503. "description": "InvalidRequestError",
  12504. "content": {
  12505. "application/json": {
  12506. "schema": {
  12507. "$ref": "#/components/schemas/InvalidRequestError"
  12508. }
  12509. }
  12510. }
  12511. },
  12512. "401": {
  12513. "description": "UnauthorizedError",
  12514. "content": {
  12515. "application/json": {
  12516. "schema": {
  12517. "$ref": "#/components/schemas/UnauthorizedError"
  12518. }
  12519. }
  12520. }
  12521. },
  12522. "404": {
  12523. "description": "SessionNotFoundError",
  12524. "content": {
  12525. "application/json": {
  12526. "schema": {
  12527. "anyOf": [
  12528. {
  12529. "$ref": "#/components/schemas/SessionNotFoundError"
  12530. },
  12531. {
  12532. "$ref": "#/components/schemas/SessionNotFoundError"
  12533. }
  12534. ]
  12535. }
  12536. }
  12537. }
  12538. }
  12539. },
  12540. "description": "Evaluate and, when approval is required, create a permission request for a session.",
  12541. "summary": "Create permission request",
  12542. "requestBody": {
  12543. "content": {
  12544. "application/json": {
  12545. "schema": {
  12546. "type": "object",
  12547. "properties": {
  12548. "id": {
  12549. "type": "string",
  12550. "pattern": "^per"
  12551. },
  12552. "action": {
  12553. "type": "string"
  12554. },
  12555. "resources": {
  12556. "type": "array",
  12557. "items": {
  12558. "type": "string"
  12559. }
  12560. },
  12561. "save": {
  12562. "type": "array",
  12563. "items": {
  12564. "type": "string"
  12565. }
  12566. },
  12567. "metadata": {
  12568. "type": "object"
  12569. },
  12570. "source": {
  12571. "$ref": "#/components/schemas/PermissionV2Source"
  12572. },
  12573. "agent": {
  12574. "type": "string"
  12575. }
  12576. },
  12577. "required": ["action", "resources"],
  12578. "additionalProperties": false
  12579. }
  12580. }
  12581. },
  12582. "required": true
  12583. },
  12584. "x-codeSamples": [
  12585. {
  12586. "lang": "js",
  12587. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.create({\n ...\n})"
  12588. }
  12589. ]
  12590. },
  12591. "get": {
  12592. "tags": ["permissions"],
  12593. "operationId": "v2.session.permission.list",
  12594. "parameters": [
  12595. {
  12596. "name": "sessionID",
  12597. "in": "path",
  12598. "schema": {
  12599. "type": "string",
  12600. "pattern": "^ses"
  12601. },
  12602. "required": true
  12603. }
  12604. ],
  12605. "security": [],
  12606. "responses": {
  12607. "200": {
  12608. "description": "Success",
  12609. "content": {
  12610. "application/json": {
  12611. "schema": {
  12612. "type": "object",
  12613. "properties": {
  12614. "data": {
  12615. "type": "array",
  12616. "items": {
  12617. "$ref": "#/components/schemas/PermissionV2Request"
  12618. }
  12619. }
  12620. },
  12621. "required": ["data"],
  12622. "additionalProperties": false
  12623. }
  12624. }
  12625. }
  12626. },
  12627. "400": {
  12628. "description": "InvalidRequestError",
  12629. "content": {
  12630. "application/json": {
  12631. "schema": {
  12632. "$ref": "#/components/schemas/InvalidRequestError"
  12633. }
  12634. }
  12635. }
  12636. },
  12637. "401": {
  12638. "description": "UnauthorizedError",
  12639. "content": {
  12640. "application/json": {
  12641. "schema": {
  12642. "$ref": "#/components/schemas/UnauthorizedError"
  12643. }
  12644. }
  12645. }
  12646. },
  12647. "404": {
  12648. "description": "SessionNotFoundError",
  12649. "content": {
  12650. "application/json": {
  12651. "schema": {
  12652. "anyOf": [
  12653. {
  12654. "$ref": "#/components/schemas/SessionNotFoundError"
  12655. },
  12656. {
  12657. "$ref": "#/components/schemas/SessionNotFoundError"
  12658. }
  12659. ]
  12660. }
  12661. }
  12662. }
  12663. }
  12664. },
  12665. "description": "Retrieve pending permission requests owned by a session.",
  12666. "summary": "List session permission requests",
  12667. "x-codeSamples": [
  12668. {
  12669. "lang": "js",
  12670. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.list({\n ...\n})"
  12671. }
  12672. ]
  12673. }
  12674. },
  12675. "/api/session/{sessionID}/permission/{requestID}": {
  12676. "get": {
  12677. "tags": ["permissions"],
  12678. "operationId": "v2.session.permission.get",
  12679. "parameters": [
  12680. {
  12681. "name": "sessionID",
  12682. "in": "path",
  12683. "schema": {
  12684. "type": "string",
  12685. "pattern": "^ses"
  12686. },
  12687. "required": true
  12688. },
  12689. {
  12690. "name": "requestID",
  12691. "in": "path",
  12692. "schema": {
  12693. "type": "string",
  12694. "pattern": "^per"
  12695. },
  12696. "required": true
  12697. }
  12698. ],
  12699. "security": [],
  12700. "responses": {
  12701. "200": {
  12702. "description": "Success",
  12703. "content": {
  12704. "application/json": {
  12705. "schema": {
  12706. "type": "object",
  12707. "properties": {
  12708. "data": {
  12709. "$ref": "#/components/schemas/PermissionV2Request"
  12710. }
  12711. },
  12712. "required": ["data"],
  12713. "additionalProperties": false
  12714. }
  12715. }
  12716. }
  12717. },
  12718. "400": {
  12719. "description": "InvalidRequestError",
  12720. "content": {
  12721. "application/json": {
  12722. "schema": {
  12723. "$ref": "#/components/schemas/InvalidRequestError"
  12724. }
  12725. }
  12726. }
  12727. },
  12728. "401": {
  12729. "description": "UnauthorizedError",
  12730. "content": {
  12731. "application/json": {
  12732. "schema": {
  12733. "$ref": "#/components/schemas/UnauthorizedError"
  12734. }
  12735. }
  12736. }
  12737. },
  12738. "404": {
  12739. "description": "SessionNotFoundError | PermissionNotFoundError",
  12740. "content": {
  12741. "application/json": {
  12742. "schema": {
  12743. "anyOf": [
  12744. {
  12745. "$ref": "#/components/schemas/PermissionNotFoundError"
  12746. },
  12747. {
  12748. "$ref": "#/components/schemas/SessionNotFoundError"
  12749. },
  12750. {
  12751. "$ref": "#/components/schemas/SessionNotFoundError"
  12752. }
  12753. ]
  12754. }
  12755. }
  12756. }
  12757. }
  12758. },
  12759. "description": "Retrieve a pending permission request owned by a session.",
  12760. "summary": "Get permission request",
  12761. "x-codeSamples": [
  12762. {
  12763. "lang": "js",
  12764. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.get({\n ...\n})"
  12765. }
  12766. ]
  12767. }
  12768. },
  12769. "/api/session/{sessionID}/permission/{requestID}/reply": {
  12770. "post": {
  12771. "tags": ["permissions"],
  12772. "operationId": "v2.session.permission.reply",
  12773. "parameters": [
  12774. {
  12775. "name": "sessionID",
  12776. "in": "path",
  12777. "schema": {
  12778. "type": "string",
  12779. "pattern": "^ses"
  12780. },
  12781. "required": true
  12782. },
  12783. {
  12784. "name": "requestID",
  12785. "in": "path",
  12786. "schema": {
  12787. "type": "string",
  12788. "pattern": "^per"
  12789. },
  12790. "required": true
  12791. }
  12792. ],
  12793. "security": [],
  12794. "responses": {
  12795. "204": {
  12796. "description": "<No Content>"
  12797. },
  12798. "400": {
  12799. "description": "InvalidRequestError",
  12800. "content": {
  12801. "application/json": {
  12802. "schema": {
  12803. "$ref": "#/components/schemas/InvalidRequestError"
  12804. }
  12805. }
  12806. }
  12807. },
  12808. "401": {
  12809. "description": "UnauthorizedError",
  12810. "content": {
  12811. "application/json": {
  12812. "schema": {
  12813. "$ref": "#/components/schemas/UnauthorizedError"
  12814. }
  12815. }
  12816. }
  12817. },
  12818. "404": {
  12819. "description": "SessionNotFoundError | PermissionNotFoundError",
  12820. "content": {
  12821. "application/json": {
  12822. "schema": {
  12823. "anyOf": [
  12824. {
  12825. "$ref": "#/components/schemas/PermissionNotFoundError"
  12826. },
  12827. {
  12828. "$ref": "#/components/schemas/SessionNotFoundError"
  12829. },
  12830. {
  12831. "$ref": "#/components/schemas/SessionNotFoundError"
  12832. }
  12833. ]
  12834. }
  12835. }
  12836. }
  12837. }
  12838. },
  12839. "description": "Respond to a pending permission request owned by a session.",
  12840. "summary": "Reply to pending permission request",
  12841. "requestBody": {
  12842. "content": {
  12843. "application/json": {
  12844. "schema": {
  12845. "type": "object",
  12846. "properties": {
  12847. "reply": {
  12848. "$ref": "#/components/schemas/PermissionV2Reply"
  12849. },
  12850. "message": {
  12851. "type": "string"
  12852. }
  12853. },
  12854. "required": ["reply"],
  12855. "additionalProperties": false
  12856. }
  12857. }
  12858. },
  12859. "required": true
  12860. },
  12861. "x-codeSamples": [
  12862. {
  12863. "lang": "js",
  12864. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.reply({\n ...\n})"
  12865. }
  12866. ]
  12867. }
  12868. },
  12869. "/api/fs/read/*": {
  12870. "get": {
  12871. "tags": ["filesystem"],
  12872. "operationId": "v2.fs.read",
  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. "security": [],
  12895. "responses": {
  12896. "200": {
  12897. "description": "Success",
  12898. "content": {
  12899. "application/octet-stream": {
  12900. "schema": {
  12901. "type": "string",
  12902. "format": "binary"
  12903. }
  12904. }
  12905. }
  12906. },
  12907. "400": {
  12908. "description": "InvalidRequestError",
  12909. "content": {
  12910. "application/json": {
  12911. "schema": {
  12912. "$ref": "#/components/schemas/InvalidRequestError"
  12913. }
  12914. }
  12915. }
  12916. },
  12917. "401": {
  12918. "description": "UnauthorizedError",
  12919. "content": {
  12920. "application/json": {
  12921. "schema": {
  12922. "$ref": "#/components/schemas/UnauthorizedError"
  12923. }
  12924. }
  12925. }
  12926. }
  12927. },
  12928. "description": "Serve one file relative to the requested location.",
  12929. "summary": "Read file",
  12930. "x-codeSamples": [
  12931. {
  12932. "lang": "js",
  12933. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.read({\n ...\n})"
  12934. }
  12935. ]
  12936. }
  12937. },
  12938. "/api/fs/list": {
  12939. "get": {
  12940. "tags": ["filesystem"],
  12941. "operationId": "v2.fs.list",
  12942. "parameters": [
  12943. {
  12944. "name": "location",
  12945. "in": "query",
  12946. "schema": {
  12947. "type": "object",
  12948. "properties": {
  12949. "directory": {
  12950. "type": "string"
  12951. },
  12952. "workspace": {
  12953. "type": "string"
  12954. }
  12955. },
  12956. "additionalProperties": false
  12957. },
  12958. "required": false,
  12959. "style": "deepObject",
  12960. "explode": true
  12961. },
  12962. {
  12963. "name": "path",
  12964. "in": "query",
  12965. "schema": {
  12966. "type": "string"
  12967. },
  12968. "required": false
  12969. }
  12970. ],
  12971. "security": [],
  12972. "responses": {
  12973. "200": {
  12974. "description": "Success",
  12975. "content": {
  12976. "application/json": {
  12977. "schema": {
  12978. "type": "object",
  12979. "properties": {
  12980. "location": {
  12981. "$ref": "#/components/schemas/LocationInfo"
  12982. },
  12983. "data": {
  12984. "type": "array",
  12985. "items": {
  12986. "$ref": "#/components/schemas/FileSystemEntry"
  12987. }
  12988. }
  12989. },
  12990. "required": ["location", "data"],
  12991. "additionalProperties": false
  12992. }
  12993. }
  12994. }
  12995. },
  12996. "400": {
  12997. "description": "InvalidRequestError",
  12998. "content": {
  12999. "application/json": {
  13000. "schema": {
  13001. "$ref": "#/components/schemas/InvalidRequestError"
  13002. }
  13003. }
  13004. }
  13005. },
  13006. "401": {
  13007. "description": "UnauthorizedError",
  13008. "content": {
  13009. "application/json": {
  13010. "schema": {
  13011. "$ref": "#/components/schemas/UnauthorizedError"
  13012. }
  13013. }
  13014. }
  13015. }
  13016. },
  13017. "description": "List direct children of one directory relative to the requested location.",
  13018. "summary": "List directory",
  13019. "x-codeSamples": [
  13020. {
  13021. "lang": "js",
  13022. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.list({\n ...\n})"
  13023. }
  13024. ]
  13025. }
  13026. },
  13027. "/api/fs/find": {
  13028. "get": {
  13029. "tags": ["filesystem"],
  13030. "operationId": "v2.fs.find",
  13031. "parameters": [
  13032. {
  13033. "name": "location",
  13034. "in": "query",
  13035. "schema": {
  13036. "type": "object",
  13037. "properties": {
  13038. "directory": {
  13039. "type": "string"
  13040. },
  13041. "workspace": {
  13042. "type": "string"
  13043. }
  13044. },
  13045. "additionalProperties": false
  13046. },
  13047. "required": false,
  13048. "style": "deepObject",
  13049. "explode": true
  13050. },
  13051. {
  13052. "name": "query",
  13053. "in": "query",
  13054. "schema": {
  13055. "type": "string"
  13056. },
  13057. "required": true
  13058. },
  13059. {
  13060. "name": "type",
  13061. "in": "query",
  13062. "schema": {
  13063. "type": "string",
  13064. "enum": ["file", "directory"]
  13065. },
  13066. "required": false
  13067. },
  13068. {
  13069. "name": "limit",
  13070. "in": "query",
  13071. "schema": {
  13072. "type": "string"
  13073. },
  13074. "required": false
  13075. }
  13076. ],
  13077. "security": [],
  13078. "responses": {
  13079. "200": {
  13080. "description": "Success",
  13081. "content": {
  13082. "application/json": {
  13083. "schema": {
  13084. "type": "object",
  13085. "properties": {
  13086. "location": {
  13087. "$ref": "#/components/schemas/LocationInfo"
  13088. },
  13089. "data": {
  13090. "type": "array",
  13091. "items": {
  13092. "$ref": "#/components/schemas/FileSystemEntry"
  13093. }
  13094. }
  13095. },
  13096. "required": ["location", "data"],
  13097. "additionalProperties": false
  13098. }
  13099. }
  13100. }
  13101. },
  13102. "400": {
  13103. "description": "InvalidRequestError",
  13104. "content": {
  13105. "application/json": {
  13106. "schema": {
  13107. "$ref": "#/components/schemas/InvalidRequestError"
  13108. }
  13109. }
  13110. }
  13111. },
  13112. "401": {
  13113. "description": "UnauthorizedError",
  13114. "content": {
  13115. "application/json": {
  13116. "schema": {
  13117. "$ref": "#/components/schemas/UnauthorizedError"
  13118. }
  13119. }
  13120. }
  13121. }
  13122. },
  13123. "description": "Find recursively ranked filesystem entries relative to the requested location.",
  13124. "summary": "Find files",
  13125. "x-codeSamples": [
  13126. {
  13127. "lang": "js",
  13128. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.find({\n ...\n})"
  13129. }
  13130. ]
  13131. }
  13132. },
  13133. "/api/command": {
  13134. "get": {
  13135. "tags": ["commands"],
  13136. "operationId": "v2.command.list",
  13137. "parameters": [
  13138. {
  13139. "name": "location",
  13140. "in": "query",
  13141. "schema": {
  13142. "type": "object",
  13143. "properties": {
  13144. "directory": {
  13145. "type": "string"
  13146. },
  13147. "workspace": {
  13148. "type": "string"
  13149. }
  13150. },
  13151. "additionalProperties": false
  13152. },
  13153. "required": false,
  13154. "style": "deepObject",
  13155. "explode": true
  13156. }
  13157. ],
  13158. "security": [],
  13159. "responses": {
  13160. "200": {
  13161. "description": "Success",
  13162. "content": {
  13163. "application/json": {
  13164. "schema": {
  13165. "type": "object",
  13166. "properties": {
  13167. "location": {
  13168. "$ref": "#/components/schemas/LocationInfo"
  13169. },
  13170. "data": {
  13171. "type": "array",
  13172. "items": {
  13173. "$ref": "#/components/schemas/CommandV2Info"
  13174. }
  13175. }
  13176. },
  13177. "required": ["location", "data"],
  13178. "additionalProperties": false
  13179. }
  13180. }
  13181. }
  13182. },
  13183. "400": {
  13184. "description": "InvalidRequestError",
  13185. "content": {
  13186. "application/json": {
  13187. "schema": {
  13188. "$ref": "#/components/schemas/InvalidRequestError"
  13189. }
  13190. }
  13191. }
  13192. },
  13193. "401": {
  13194. "description": "UnauthorizedError",
  13195. "content": {
  13196. "application/json": {
  13197. "schema": {
  13198. "$ref": "#/components/schemas/UnauthorizedError"
  13199. }
  13200. }
  13201. }
  13202. }
  13203. },
  13204. "description": "Retrieve currently registered commands.",
  13205. "summary": "List commands",
  13206. "x-codeSamples": [
  13207. {
  13208. "lang": "js",
  13209. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.command.list({\n ...\n})"
  13210. }
  13211. ]
  13212. }
  13213. },
  13214. "/api/skill": {
  13215. "get": {
  13216. "tags": ["skills"],
  13217. "operationId": "v2.skill.list",
  13218. "parameters": [
  13219. {
  13220. "name": "location",
  13221. "in": "query",
  13222. "schema": {
  13223. "type": "object",
  13224. "properties": {
  13225. "directory": {
  13226. "type": "string"
  13227. },
  13228. "workspace": {
  13229. "type": "string"
  13230. }
  13231. },
  13232. "additionalProperties": false
  13233. },
  13234. "required": false,
  13235. "style": "deepObject",
  13236. "explode": true
  13237. }
  13238. ],
  13239. "security": [],
  13240. "responses": {
  13241. "200": {
  13242. "description": "Success",
  13243. "content": {
  13244. "application/json": {
  13245. "schema": {
  13246. "type": "object",
  13247. "properties": {
  13248. "location": {
  13249. "$ref": "#/components/schemas/LocationInfo"
  13250. },
  13251. "data": {
  13252. "type": "array",
  13253. "items": {
  13254. "$ref": "#/components/schemas/SkillV2Info"
  13255. }
  13256. }
  13257. },
  13258. "required": ["location", "data"],
  13259. "additionalProperties": false
  13260. }
  13261. }
  13262. }
  13263. },
  13264. "400": {
  13265. "description": "InvalidRequestError",
  13266. "content": {
  13267. "application/json": {
  13268. "schema": {
  13269. "$ref": "#/components/schemas/InvalidRequestError"
  13270. }
  13271. }
  13272. }
  13273. },
  13274. "401": {
  13275. "description": "UnauthorizedError",
  13276. "content": {
  13277. "application/json": {
  13278. "schema": {
  13279. "$ref": "#/components/schemas/UnauthorizedError"
  13280. }
  13281. }
  13282. }
  13283. }
  13284. },
  13285. "description": "Retrieve currently registered skills.",
  13286. "summary": "List skills",
  13287. "x-codeSamples": [
  13288. {
  13289. "lang": "js",
  13290. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.skill.list({\n ...\n})"
  13291. }
  13292. ]
  13293. }
  13294. },
  13295. "/api/event": {
  13296. "get": {
  13297. "tags": ["events"],
  13298. "operationId": "v2.event.subscribe",
  13299. "parameters": [],
  13300. "security": [],
  13301. "responses": {
  13302. "200": {
  13303. "description": "Event stream",
  13304. "content": {
  13305. "text/event-stream": {
  13306. "schema": {
  13307. "$ref": "#/components/schemas/V2Event"
  13308. }
  13309. }
  13310. }
  13311. },
  13312. "400": {
  13313. "description": "InvalidRequestError",
  13314. "content": {
  13315. "application/json": {
  13316. "schema": {
  13317. "$ref": "#/components/schemas/InvalidRequestError"
  13318. }
  13319. }
  13320. }
  13321. },
  13322. "401": {
  13323. "description": "UnauthorizedError",
  13324. "content": {
  13325. "application/json": {
  13326. "schema": {
  13327. "$ref": "#/components/schemas/UnauthorizedError"
  13328. }
  13329. }
  13330. }
  13331. }
  13332. },
  13333. "description": "Subscribe to native event payloads for the server.",
  13334. "summary": "Subscribe to events",
  13335. "x-codeSamples": [
  13336. {
  13337. "lang": "js",
  13338. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.event.subscribe({\n ...\n})"
  13339. }
  13340. ]
  13341. }
  13342. },
  13343. "/api/pty": {
  13344. "get": {
  13345. "tags": ["pty"],
  13346. "operationId": "v2.pty.list",
  13347. "parameters": [
  13348. {
  13349. "name": "location",
  13350. "in": "query",
  13351. "schema": {
  13352. "type": "object",
  13353. "properties": {
  13354. "directory": {
  13355. "type": "string"
  13356. },
  13357. "workspace": {
  13358. "type": "string"
  13359. }
  13360. },
  13361. "additionalProperties": false
  13362. },
  13363. "required": false,
  13364. "style": "deepObject",
  13365. "explode": true
  13366. }
  13367. ],
  13368. "security": [],
  13369. "responses": {
  13370. "200": {
  13371. "description": "Success",
  13372. "content": {
  13373. "application/json": {
  13374. "schema": {
  13375. "type": "object",
  13376. "properties": {
  13377. "location": {
  13378. "$ref": "#/components/schemas/LocationInfo"
  13379. },
  13380. "data": {
  13381. "type": "array",
  13382. "items": {
  13383. "$ref": "#/components/schemas/Pty"
  13384. }
  13385. }
  13386. },
  13387. "required": ["location", "data"],
  13388. "additionalProperties": false
  13389. }
  13390. }
  13391. }
  13392. },
  13393. "400": {
  13394. "description": "InvalidRequestError",
  13395. "content": {
  13396. "application/json": {
  13397. "schema": {
  13398. "$ref": "#/components/schemas/InvalidRequestError"
  13399. }
  13400. }
  13401. }
  13402. },
  13403. "401": {
  13404. "description": "UnauthorizedError",
  13405. "content": {
  13406. "application/json": {
  13407. "schema": {
  13408. "$ref": "#/components/schemas/UnauthorizedError"
  13409. }
  13410. }
  13411. }
  13412. }
  13413. },
  13414. "description": "List PTY sessions for a location, including exited sessions retained until removal.",
  13415. "summary": "List PTY sessions",
  13416. "x-codeSamples": [
  13417. {
  13418. "lang": "js",
  13419. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.list({\n ...\n})"
  13420. }
  13421. ]
  13422. },
  13423. "post": {
  13424. "tags": ["pty"],
  13425. "operationId": "v2.pty.create",
  13426. "parameters": [
  13427. {
  13428. "name": "location",
  13429. "in": "query",
  13430. "schema": {
  13431. "type": "object",
  13432. "properties": {
  13433. "directory": {
  13434. "type": "string"
  13435. },
  13436. "workspace": {
  13437. "type": "string"
  13438. }
  13439. },
  13440. "additionalProperties": false
  13441. },
  13442. "required": false,
  13443. "style": "deepObject",
  13444. "explode": true
  13445. }
  13446. ],
  13447. "security": [],
  13448. "responses": {
  13449. "200": {
  13450. "description": "Success",
  13451. "content": {
  13452. "application/json": {
  13453. "schema": {
  13454. "type": "object",
  13455. "properties": {
  13456. "location": {
  13457. "$ref": "#/components/schemas/LocationInfo"
  13458. },
  13459. "data": {
  13460. "$ref": "#/components/schemas/Pty"
  13461. }
  13462. },
  13463. "required": ["location", "data"],
  13464. "additionalProperties": false
  13465. }
  13466. }
  13467. }
  13468. },
  13469. "400": {
  13470. "description": "InvalidRequestError",
  13471. "content": {
  13472. "application/json": {
  13473. "schema": {
  13474. "$ref": "#/components/schemas/InvalidRequestError"
  13475. }
  13476. }
  13477. }
  13478. },
  13479. "401": {
  13480. "description": "UnauthorizedError",
  13481. "content": {
  13482. "application/json": {
  13483. "schema": {
  13484. "$ref": "#/components/schemas/UnauthorizedError"
  13485. }
  13486. }
  13487. }
  13488. }
  13489. },
  13490. "description": "Create a pseudo-terminal session for a location.",
  13491. "summary": "Create PTY session",
  13492. "requestBody": {
  13493. "content": {
  13494. "application/json": {
  13495. "schema": {
  13496. "type": "object",
  13497. "properties": {
  13498. "command": {
  13499. "type": "string"
  13500. },
  13501. "args": {
  13502. "type": "array",
  13503. "items": {
  13504. "type": "string"
  13505. }
  13506. },
  13507. "cwd": {
  13508. "type": "string"
  13509. },
  13510. "title": {
  13511. "type": "string"
  13512. },
  13513. "env": {
  13514. "type": "object",
  13515. "additionalProperties": {
  13516. "type": "string"
  13517. }
  13518. }
  13519. },
  13520. "additionalProperties": false
  13521. }
  13522. }
  13523. },
  13524. "required": true
  13525. },
  13526. "x-codeSamples": [
  13527. {
  13528. "lang": "js",
  13529. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.create({\n ...\n})"
  13530. }
  13531. ]
  13532. }
  13533. },
  13534. "/api/pty/{ptyID}": {
  13535. "get": {
  13536. "tags": ["pty"],
  13537. "operationId": "v2.pty.get",
  13538. "parameters": [
  13539. {
  13540. "name": "ptyID",
  13541. "in": "path",
  13542. "schema": {
  13543. "type": "string",
  13544. "pattern": "^pty"
  13545. },
  13546. "required": true
  13547. },
  13548. {
  13549. "name": "location",
  13550. "in": "query",
  13551. "schema": {
  13552. "type": "object",
  13553. "properties": {
  13554. "directory": {
  13555. "type": "string"
  13556. },
  13557. "workspace": {
  13558. "type": "string"
  13559. }
  13560. },
  13561. "additionalProperties": false
  13562. },
  13563. "required": false,
  13564. "style": "deepObject",
  13565. "explode": true
  13566. }
  13567. ],
  13568. "security": [],
  13569. "responses": {
  13570. "200": {
  13571. "description": "Success",
  13572. "content": {
  13573. "application/json": {
  13574. "schema": {
  13575. "type": "object",
  13576. "properties": {
  13577. "location": {
  13578. "$ref": "#/components/schemas/LocationInfo"
  13579. },
  13580. "data": {
  13581. "$ref": "#/components/schemas/Pty"
  13582. }
  13583. },
  13584. "required": ["location", "data"],
  13585. "additionalProperties": false
  13586. }
  13587. }
  13588. }
  13589. },
  13590. "400": {
  13591. "description": "InvalidRequestError",
  13592. "content": {
  13593. "application/json": {
  13594. "schema": {
  13595. "$ref": "#/components/schemas/InvalidRequestError"
  13596. }
  13597. }
  13598. }
  13599. },
  13600. "401": {
  13601. "description": "UnauthorizedError",
  13602. "content": {
  13603. "application/json": {
  13604. "schema": {
  13605. "$ref": "#/components/schemas/UnauthorizedError"
  13606. }
  13607. }
  13608. }
  13609. },
  13610. "404": {
  13611. "description": "PtyNotFoundError",
  13612. "content": {
  13613. "application/json": {
  13614. "schema": {
  13615. "$ref": "#/components/schemas/PtyNotFoundError"
  13616. }
  13617. }
  13618. }
  13619. }
  13620. },
  13621. "description": "Get one PTY session, including its exit code once exited.",
  13622. "summary": "Get PTY session",
  13623. "x-codeSamples": [
  13624. {
  13625. "lang": "js",
  13626. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.get({\n ...\n})"
  13627. }
  13628. ]
  13629. },
  13630. "put": {
  13631. "tags": ["pty"],
  13632. "operationId": "v2.pty.update",
  13633. "parameters": [
  13634. {
  13635. "name": "ptyID",
  13636. "in": "path",
  13637. "schema": {
  13638. "type": "string",
  13639. "pattern": "^pty"
  13640. },
  13641. "required": true
  13642. },
  13643. {
  13644. "name": "location",
  13645. "in": "query",
  13646. "schema": {
  13647. "type": "object",
  13648. "properties": {
  13649. "directory": {
  13650. "type": "string"
  13651. },
  13652. "workspace": {
  13653. "type": "string"
  13654. }
  13655. },
  13656. "additionalProperties": false
  13657. },
  13658. "required": false,
  13659. "style": "deepObject",
  13660. "explode": true
  13661. }
  13662. ],
  13663. "security": [],
  13664. "responses": {
  13665. "200": {
  13666. "description": "Success",
  13667. "content": {
  13668. "application/json": {
  13669. "schema": {
  13670. "type": "object",
  13671. "properties": {
  13672. "location": {
  13673. "$ref": "#/components/schemas/LocationInfo"
  13674. },
  13675. "data": {
  13676. "$ref": "#/components/schemas/Pty"
  13677. }
  13678. },
  13679. "required": ["location", "data"],
  13680. "additionalProperties": false
  13681. }
  13682. }
  13683. }
  13684. },
  13685. "400": {
  13686. "description": "InvalidRequestError",
  13687. "content": {
  13688. "application/json": {
  13689. "schema": {
  13690. "$ref": "#/components/schemas/InvalidRequestError"
  13691. }
  13692. }
  13693. }
  13694. },
  13695. "401": {
  13696. "description": "UnauthorizedError",
  13697. "content": {
  13698. "application/json": {
  13699. "schema": {
  13700. "$ref": "#/components/schemas/UnauthorizedError"
  13701. }
  13702. }
  13703. }
  13704. },
  13705. "404": {
  13706. "description": "PtyNotFoundError",
  13707. "content": {
  13708. "application/json": {
  13709. "schema": {
  13710. "$ref": "#/components/schemas/PtyNotFoundError"
  13711. }
  13712. }
  13713. }
  13714. }
  13715. },
  13716. "description": "Update the title or viewport size of one PTY session.",
  13717. "summary": "Update PTY session",
  13718. "requestBody": {
  13719. "content": {
  13720. "application/json": {
  13721. "schema": {
  13722. "type": "object",
  13723. "properties": {
  13724. "title": {
  13725. "type": "string"
  13726. },
  13727. "size": {
  13728. "type": "object",
  13729. "properties": {
  13730. "rows": {
  13731. "type": "integer",
  13732. "exclusiveMinimum": 0
  13733. },
  13734. "cols": {
  13735. "type": "integer",
  13736. "exclusiveMinimum": 0
  13737. }
  13738. },
  13739. "required": ["rows", "cols"],
  13740. "additionalProperties": false
  13741. }
  13742. },
  13743. "additionalProperties": false
  13744. }
  13745. }
  13746. },
  13747. "required": true
  13748. },
  13749. "x-codeSamples": [
  13750. {
  13751. "lang": "js",
  13752. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.update({\n ...\n})"
  13753. }
  13754. ]
  13755. },
  13756. "delete": {
  13757. "tags": ["pty"],
  13758. "operationId": "v2.pty.remove",
  13759. "parameters": [
  13760. {
  13761. "name": "ptyID",
  13762. "in": "path",
  13763. "schema": {
  13764. "type": "string",
  13765. "pattern": "^pty"
  13766. },
  13767. "required": true
  13768. },
  13769. {
  13770. "name": "location",
  13771. "in": "query",
  13772. "schema": {
  13773. "type": "object",
  13774. "properties": {
  13775. "directory": {
  13776. "type": "string"
  13777. },
  13778. "workspace": {
  13779. "type": "string"
  13780. }
  13781. },
  13782. "additionalProperties": false
  13783. },
  13784. "required": false,
  13785. "style": "deepObject",
  13786. "explode": true
  13787. }
  13788. ],
  13789. "security": [],
  13790. "responses": {
  13791. "204": {
  13792. "description": "<No Content>"
  13793. },
  13794. "400": {
  13795. "description": "InvalidRequestError",
  13796. "content": {
  13797. "application/json": {
  13798. "schema": {
  13799. "$ref": "#/components/schemas/InvalidRequestError"
  13800. }
  13801. }
  13802. }
  13803. },
  13804. "401": {
  13805. "description": "UnauthorizedError",
  13806. "content": {
  13807. "application/json": {
  13808. "schema": {
  13809. "$ref": "#/components/schemas/UnauthorizedError"
  13810. }
  13811. }
  13812. }
  13813. },
  13814. "404": {
  13815. "description": "PtyNotFoundError",
  13816. "content": {
  13817. "application/json": {
  13818. "schema": {
  13819. "$ref": "#/components/schemas/PtyNotFoundError"
  13820. }
  13821. }
  13822. }
  13823. }
  13824. },
  13825. "description": "Terminate and remove one PTY session.",
  13826. "summary": "Remove PTY session",
  13827. "x-codeSamples": [
  13828. {
  13829. "lang": "js",
  13830. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.remove({\n ...\n})"
  13831. }
  13832. ]
  13833. }
  13834. },
  13835. "/api/pty/{ptyID}/connect-token": {
  13836. "post": {
  13837. "tags": ["pty"],
  13838. "operationId": "v2.pty.connectToken",
  13839. "parameters": [
  13840. {
  13841. "name": "ptyID",
  13842. "in": "path",
  13843. "schema": {
  13844. "type": "string",
  13845. "pattern": "^pty"
  13846. },
  13847. "required": true
  13848. },
  13849. {
  13850. "name": "location",
  13851. "in": "query",
  13852. "schema": {
  13853. "type": "object",
  13854. "properties": {
  13855. "directory": {
  13856. "type": "string"
  13857. },
  13858. "workspace": {
  13859. "type": "string"
  13860. }
  13861. },
  13862. "additionalProperties": false
  13863. },
  13864. "required": false,
  13865. "style": "deepObject",
  13866. "explode": true
  13867. }
  13868. ],
  13869. "security": [],
  13870. "responses": {
  13871. "200": {
  13872. "description": "Success",
  13873. "content": {
  13874. "application/json": {
  13875. "schema": {
  13876. "type": "object",
  13877. "properties": {
  13878. "location": {
  13879. "$ref": "#/components/schemas/LocationInfo"
  13880. },
  13881. "data": {
  13882. "$ref": "#/components/schemas/PtyTicketConnectToken"
  13883. }
  13884. },
  13885. "required": ["location", "data"],
  13886. "additionalProperties": false
  13887. }
  13888. }
  13889. }
  13890. },
  13891. "400": {
  13892. "description": "InvalidRequestError",
  13893. "content": {
  13894. "application/json": {
  13895. "schema": {
  13896. "$ref": "#/components/schemas/InvalidRequestError"
  13897. }
  13898. }
  13899. }
  13900. },
  13901. "401": {
  13902. "description": "UnauthorizedError",
  13903. "content": {
  13904. "application/json": {
  13905. "schema": {
  13906. "$ref": "#/components/schemas/UnauthorizedError"
  13907. }
  13908. }
  13909. }
  13910. },
  13911. "403": {
  13912. "description": "ForbiddenError",
  13913. "content": {
  13914. "application/json": {
  13915. "schema": {
  13916. "$ref": "#/components/schemas/ForbiddenError"
  13917. }
  13918. }
  13919. }
  13920. },
  13921. "404": {
  13922. "description": "PtyNotFoundError",
  13923. "content": {
  13924. "application/json": {
  13925. "schema": {
  13926. "$ref": "#/components/schemas/PtyNotFoundError"
  13927. }
  13928. }
  13929. }
  13930. }
  13931. },
  13932. "description": "Create a short-lived single-use ticket for opening a PTY WebSocket connection.",
  13933. "summary": "Create PTY WebSocket token",
  13934. "x-codeSamples": [
  13935. {
  13936. "lang": "js",
  13937. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.connectToken({\n ...\n})"
  13938. }
  13939. ]
  13940. }
  13941. },
  13942. "/api/pty/{ptyID}/connect": {
  13943. "get": {
  13944. "tags": ["pty"],
  13945. "operationId": "v2.pty.connect",
  13946. "parameters": [
  13947. {
  13948. "name": "ptyID",
  13949. "in": "path",
  13950. "schema": {
  13951. "type": "string",
  13952. "pattern": "^pty"
  13953. },
  13954. "required": true
  13955. },
  13956. {
  13957. "in": "query",
  13958. "name": "location[directory]",
  13959. "schema": {
  13960. "type": "string"
  13961. }
  13962. },
  13963. {
  13964. "in": "query",
  13965. "name": "location[workspace]",
  13966. "schema": {
  13967. "type": "string"
  13968. }
  13969. },
  13970. {
  13971. "in": "query",
  13972. "name": "cursor",
  13973. "schema": {
  13974. "type": "string"
  13975. }
  13976. },
  13977. {
  13978. "in": "query",
  13979. "name": "ticket",
  13980. "schema": {
  13981. "type": "string"
  13982. }
  13983. }
  13984. ],
  13985. "security": [],
  13986. "responses": {
  13987. "200": {
  13988. "description": "Success",
  13989. "content": {
  13990. "application/json": {
  13991. "schema": {
  13992. "type": "boolean"
  13993. }
  13994. }
  13995. }
  13996. },
  13997. "400": {
  13998. "description": "InvalidRequestError",
  13999. "content": {
  14000. "application/json": {
  14001. "schema": {
  14002. "$ref": "#/components/schemas/InvalidRequestError"
  14003. }
  14004. }
  14005. }
  14006. },
  14007. "401": {
  14008. "description": "UnauthorizedError",
  14009. "content": {
  14010. "application/json": {
  14011. "schema": {
  14012. "$ref": "#/components/schemas/UnauthorizedError"
  14013. }
  14014. }
  14015. }
  14016. },
  14017. "403": {
  14018. "description": "ForbiddenError",
  14019. "content": {
  14020. "application/json": {
  14021. "schema": {
  14022. "$ref": "#/components/schemas/ForbiddenError"
  14023. }
  14024. }
  14025. }
  14026. },
  14027. "404": {
  14028. "description": "PtyNotFoundError",
  14029. "content": {
  14030. "application/json": {
  14031. "schema": {
  14032. "$ref": "#/components/schemas/PtyNotFoundError"
  14033. }
  14034. }
  14035. }
  14036. }
  14037. },
  14038. "description": "Establish a WebSocket connection streaming PTY output and accepting terminal input.",
  14039. "summary": "Connect to PTY session",
  14040. "x-codeSamples": [
  14041. {
  14042. "lang": "js",
  14043. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.connect({\n ...\n})"
  14044. }
  14045. ]
  14046. }
  14047. },
  14048. "/api/question/request": {
  14049. "get": {
  14050. "tags": ["session questions"],
  14051. "operationId": "v2.question.request.list",
  14052. "parameters": [
  14053. {
  14054. "name": "location",
  14055. "in": "query",
  14056. "schema": {
  14057. "type": "object",
  14058. "properties": {
  14059. "directory": {
  14060. "type": "string"
  14061. },
  14062. "workspace": {
  14063. "type": "string"
  14064. }
  14065. },
  14066. "additionalProperties": false
  14067. },
  14068. "required": false,
  14069. "style": "deepObject",
  14070. "explode": true
  14071. }
  14072. ],
  14073. "security": [],
  14074. "responses": {
  14075. "200": {
  14076. "description": "Success",
  14077. "content": {
  14078. "application/json": {
  14079. "schema": {
  14080. "type": "object",
  14081. "properties": {
  14082. "location": {
  14083. "$ref": "#/components/schemas/LocationInfo"
  14084. },
  14085. "data": {
  14086. "type": "array",
  14087. "items": {
  14088. "$ref": "#/components/schemas/QuestionV2Request"
  14089. }
  14090. }
  14091. },
  14092. "required": ["location", "data"],
  14093. "additionalProperties": false
  14094. }
  14095. }
  14096. }
  14097. },
  14098. "400": {
  14099. "description": "InvalidRequestError",
  14100. "content": {
  14101. "application/json": {
  14102. "schema": {
  14103. "$ref": "#/components/schemas/InvalidRequestError"
  14104. }
  14105. }
  14106. }
  14107. },
  14108. "401": {
  14109. "description": "UnauthorizedError",
  14110. "content": {
  14111. "application/json": {
  14112. "schema": {
  14113. "$ref": "#/components/schemas/UnauthorizedError"
  14114. }
  14115. }
  14116. }
  14117. }
  14118. },
  14119. "description": "Retrieve pending question requests for a location.",
  14120. "summary": "List pending question requests",
  14121. "x-codeSamples": [
  14122. {
  14123. "lang": "js",
  14124. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.question.request.list({\n ...\n})"
  14125. }
  14126. ]
  14127. }
  14128. },
  14129. "/api/session/{sessionID}/question": {
  14130. "get": {
  14131. "tags": ["session questions"],
  14132. "operationId": "v2.session.question.list",
  14133. "parameters": [
  14134. {
  14135. "name": "sessionID",
  14136. "in": "path",
  14137. "schema": {
  14138. "type": "string",
  14139. "pattern": "^ses"
  14140. },
  14141. "required": true
  14142. }
  14143. ],
  14144. "security": [],
  14145. "responses": {
  14146. "200": {
  14147. "description": "Success",
  14148. "content": {
  14149. "application/json": {
  14150. "schema": {
  14151. "type": "object",
  14152. "properties": {
  14153. "data": {
  14154. "type": "array",
  14155. "items": {
  14156. "$ref": "#/components/schemas/QuestionV2Request"
  14157. }
  14158. }
  14159. },
  14160. "required": ["data"],
  14161. "additionalProperties": false
  14162. }
  14163. }
  14164. }
  14165. },
  14166. "400": {
  14167. "description": "InvalidRequestError",
  14168. "content": {
  14169. "application/json": {
  14170. "schema": {
  14171. "$ref": "#/components/schemas/InvalidRequestError"
  14172. }
  14173. }
  14174. }
  14175. },
  14176. "401": {
  14177. "description": "UnauthorizedError",
  14178. "content": {
  14179. "application/json": {
  14180. "schema": {
  14181. "$ref": "#/components/schemas/UnauthorizedError"
  14182. }
  14183. }
  14184. }
  14185. },
  14186. "404": {
  14187. "description": "SessionNotFoundError",
  14188. "content": {
  14189. "application/json": {
  14190. "schema": {
  14191. "anyOf": [
  14192. {
  14193. "$ref": "#/components/schemas/SessionNotFoundError"
  14194. },
  14195. {
  14196. "$ref": "#/components/schemas/SessionNotFoundError"
  14197. }
  14198. ]
  14199. }
  14200. }
  14201. }
  14202. }
  14203. },
  14204. "description": "Retrieve pending question requests owned by a session.",
  14205. "summary": "List session question requests",
  14206. "x-codeSamples": [
  14207. {
  14208. "lang": "js",
  14209. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.list({\n ...\n})"
  14210. }
  14211. ]
  14212. }
  14213. },
  14214. "/api/session/{sessionID}/question/{requestID}/reply": {
  14215. "post": {
  14216. "tags": ["session questions"],
  14217. "operationId": "v2.session.question.reply",
  14218. "parameters": [
  14219. {
  14220. "name": "sessionID",
  14221. "in": "path",
  14222. "schema": {
  14223. "type": "string",
  14224. "pattern": "^ses"
  14225. },
  14226. "required": true
  14227. },
  14228. {
  14229. "name": "requestID",
  14230. "in": "path",
  14231. "schema": {
  14232. "type": "string",
  14233. "pattern": "^que"
  14234. },
  14235. "required": true
  14236. }
  14237. ],
  14238. "security": [],
  14239. "responses": {
  14240. "204": {
  14241. "description": "<No Content>"
  14242. },
  14243. "400": {
  14244. "description": "InvalidRequestError",
  14245. "content": {
  14246. "application/json": {
  14247. "schema": {
  14248. "$ref": "#/components/schemas/InvalidRequestError"
  14249. }
  14250. }
  14251. }
  14252. },
  14253. "401": {
  14254. "description": "UnauthorizedError",
  14255. "content": {
  14256. "application/json": {
  14257. "schema": {
  14258. "$ref": "#/components/schemas/UnauthorizedError"
  14259. }
  14260. }
  14261. }
  14262. },
  14263. "404": {
  14264. "description": "SessionNotFoundError | QuestionNotFoundError",
  14265. "content": {
  14266. "application/json": {
  14267. "schema": {
  14268. "anyOf": [
  14269. {
  14270. "$ref": "#/components/schemas/QuestionNotFoundError"
  14271. },
  14272. {
  14273. "$ref": "#/components/schemas/SessionNotFoundError"
  14274. },
  14275. {
  14276. "$ref": "#/components/schemas/SessionNotFoundError"
  14277. }
  14278. ]
  14279. }
  14280. }
  14281. }
  14282. }
  14283. },
  14284. "description": "Answer a pending question request owned by a session.",
  14285. "summary": "Reply to pending question request",
  14286. "requestBody": {
  14287. "content": {
  14288. "application/json": {
  14289. "schema": {
  14290. "$ref": "#/components/schemas/QuestionV2Reply"
  14291. }
  14292. }
  14293. },
  14294. "required": true
  14295. },
  14296. "x-codeSamples": [
  14297. {
  14298. "lang": "js",
  14299. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reply({\n ...\n})"
  14300. }
  14301. ]
  14302. }
  14303. },
  14304. "/api/session/{sessionID}/question/{requestID}/reject": {
  14305. "post": {
  14306. "tags": ["session questions"],
  14307. "operationId": "v2.session.question.reject",
  14308. "parameters": [
  14309. {
  14310. "name": "sessionID",
  14311. "in": "path",
  14312. "schema": {
  14313. "type": "string",
  14314. "pattern": "^ses"
  14315. },
  14316. "required": true
  14317. },
  14318. {
  14319. "name": "requestID",
  14320. "in": "path",
  14321. "schema": {
  14322. "type": "string",
  14323. "pattern": "^que"
  14324. },
  14325. "required": true
  14326. }
  14327. ],
  14328. "security": [],
  14329. "responses": {
  14330. "204": {
  14331. "description": "<No Content>"
  14332. },
  14333. "400": {
  14334. "description": "InvalidRequestError",
  14335. "content": {
  14336. "application/json": {
  14337. "schema": {
  14338. "$ref": "#/components/schemas/InvalidRequestError"
  14339. }
  14340. }
  14341. }
  14342. },
  14343. "401": {
  14344. "description": "UnauthorizedError",
  14345. "content": {
  14346. "application/json": {
  14347. "schema": {
  14348. "$ref": "#/components/schemas/UnauthorizedError"
  14349. }
  14350. }
  14351. }
  14352. },
  14353. "404": {
  14354. "description": "SessionNotFoundError | QuestionNotFoundError",
  14355. "content": {
  14356. "application/json": {
  14357. "schema": {
  14358. "anyOf": [
  14359. {
  14360. "$ref": "#/components/schemas/QuestionNotFoundError"
  14361. },
  14362. {
  14363. "$ref": "#/components/schemas/SessionNotFoundError"
  14364. },
  14365. {
  14366. "$ref": "#/components/schemas/SessionNotFoundError"
  14367. }
  14368. ]
  14369. }
  14370. }
  14371. }
  14372. }
  14373. },
  14374. "description": "Reject a pending question request owned by a session.",
  14375. "summary": "Reject pending question request",
  14376. "x-codeSamples": [
  14377. {
  14378. "lang": "js",
  14379. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reject({\n ...\n})"
  14380. }
  14381. ]
  14382. }
  14383. },
  14384. "/api/reference": {
  14385. "get": {
  14386. "tags": ["reference"],
  14387. "operationId": "v2.reference.list",
  14388. "parameters": [
  14389. {
  14390. "name": "location",
  14391. "in": "query",
  14392. "schema": {
  14393. "type": "object",
  14394. "properties": {
  14395. "directory": {
  14396. "type": "string"
  14397. },
  14398. "workspace": {
  14399. "type": "string"
  14400. }
  14401. },
  14402. "additionalProperties": false
  14403. },
  14404. "required": false,
  14405. "style": "deepObject",
  14406. "explode": true
  14407. }
  14408. ],
  14409. "security": [],
  14410. "responses": {
  14411. "200": {
  14412. "description": "Success",
  14413. "content": {
  14414. "application/json": {
  14415. "schema": {
  14416. "type": "object",
  14417. "properties": {
  14418. "location": {
  14419. "$ref": "#/components/schemas/LocationInfo"
  14420. },
  14421. "data": {
  14422. "type": "array",
  14423. "items": {
  14424. "$ref": "#/components/schemas/ReferenceInfo"
  14425. }
  14426. }
  14427. },
  14428. "required": ["location", "data"],
  14429. "additionalProperties": false
  14430. }
  14431. }
  14432. }
  14433. },
  14434. "400": {
  14435. "description": "InvalidRequestError",
  14436. "content": {
  14437. "application/json": {
  14438. "schema": {
  14439. "$ref": "#/components/schemas/InvalidRequestError"
  14440. }
  14441. }
  14442. }
  14443. },
  14444. "401": {
  14445. "description": "UnauthorizedError",
  14446. "content": {
  14447. "application/json": {
  14448. "schema": {
  14449. "$ref": "#/components/schemas/UnauthorizedError"
  14450. }
  14451. }
  14452. }
  14453. }
  14454. },
  14455. "description": "List references available in the requested location.",
  14456. "summary": "List references",
  14457. "x-codeSamples": [
  14458. {
  14459. "lang": "js",
  14460. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.reference.list({\n ...\n})"
  14461. }
  14462. ]
  14463. }
  14464. },
  14465. "/experimental/project/{projectID}/copy": {
  14466. "post": {
  14467. "tags": ["projectCopy"],
  14468. "operationId": "v2.projectCopy.create",
  14469. "parameters": [
  14470. {
  14471. "name": "projectID",
  14472. "in": "path",
  14473. "schema": {
  14474. "type": "string"
  14475. },
  14476. "required": true
  14477. },
  14478. {
  14479. "name": "location",
  14480. "in": "query",
  14481. "schema": {
  14482. "type": "object",
  14483. "properties": {
  14484. "directory": {
  14485. "type": "string"
  14486. },
  14487. "workspace": {
  14488. "type": "string"
  14489. }
  14490. },
  14491. "additionalProperties": false
  14492. },
  14493. "required": false,
  14494. "style": "deepObject",
  14495. "explode": true
  14496. }
  14497. ],
  14498. "responses": {
  14499. "200": {
  14500. "description": "ProjectCopy.Copy",
  14501. "content": {
  14502. "application/json": {
  14503. "schema": {
  14504. "$ref": "#/components/schemas/ProjectCopyCopy"
  14505. }
  14506. }
  14507. }
  14508. },
  14509. "400": {
  14510. "description": "ProjectCopyError | InvalidRequestError",
  14511. "content": {
  14512. "application/json": {
  14513. "schema": {
  14514. "anyOf": [
  14515. {
  14516. "$ref": "#/components/schemas/ProjectCopyError"
  14517. },
  14518. {
  14519. "$ref": "#/components/schemas/InvalidRequestError"
  14520. }
  14521. ]
  14522. }
  14523. }
  14524. }
  14525. }
  14526. },
  14527. "requestBody": {
  14528. "content": {
  14529. "application/json": {
  14530. "schema": {
  14531. "type": "object",
  14532. "properties": {
  14533. "strategy": {
  14534. "type": "string"
  14535. },
  14536. "directory": {
  14537. "type": "string"
  14538. },
  14539. "name": {
  14540. "type": "string"
  14541. }
  14542. },
  14543. "required": ["strategy", "directory"],
  14544. "additionalProperties": false
  14545. }
  14546. }
  14547. }
  14548. },
  14549. "x-codeSamples": [
  14550. {
  14551. "lang": "js",
  14552. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.create({\n ...\n})"
  14553. }
  14554. ]
  14555. },
  14556. "delete": {
  14557. "tags": ["projectCopy"],
  14558. "operationId": "v2.projectCopy.remove",
  14559. "parameters": [
  14560. {
  14561. "name": "projectID",
  14562. "in": "path",
  14563. "schema": {
  14564. "type": "string"
  14565. },
  14566. "required": true
  14567. },
  14568. {
  14569. "name": "location",
  14570. "in": "query",
  14571. "schema": {
  14572. "type": "object",
  14573. "properties": {
  14574. "directory": {
  14575. "type": "string"
  14576. },
  14577. "workspace": {
  14578. "type": "string"
  14579. }
  14580. },
  14581. "additionalProperties": false
  14582. },
  14583. "required": false,
  14584. "style": "deepObject",
  14585. "explode": true
  14586. }
  14587. ],
  14588. "responses": {
  14589. "204": {
  14590. "description": "<No Content>"
  14591. },
  14592. "400": {
  14593. "description": "ProjectCopyError | InvalidRequestError",
  14594. "content": {
  14595. "application/json": {
  14596. "schema": {
  14597. "anyOf": [
  14598. {
  14599. "$ref": "#/components/schemas/ProjectCopyError"
  14600. },
  14601. {
  14602. "$ref": "#/components/schemas/InvalidRequestError"
  14603. }
  14604. ]
  14605. }
  14606. }
  14607. }
  14608. }
  14609. },
  14610. "requestBody": {
  14611. "content": {
  14612. "application/json": {
  14613. "schema": {
  14614. "type": "object",
  14615. "properties": {
  14616. "directory": {
  14617. "type": "string"
  14618. },
  14619. "force": {
  14620. "type": "boolean"
  14621. }
  14622. },
  14623. "required": ["directory", "force"],
  14624. "additionalProperties": false
  14625. }
  14626. }
  14627. }
  14628. },
  14629. "x-codeSamples": [
  14630. {
  14631. "lang": "js",
  14632. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.remove({\n ...\n})"
  14633. }
  14634. ]
  14635. }
  14636. },
  14637. "/experimental/project/{projectID}/copy/refresh": {
  14638. "post": {
  14639. "tags": ["projectCopy"],
  14640. "operationId": "v2.projectCopy.refresh",
  14641. "parameters": [
  14642. {
  14643. "name": "projectID",
  14644. "in": "path",
  14645. "schema": {
  14646. "type": "string"
  14647. },
  14648. "required": true
  14649. },
  14650. {
  14651. "name": "location",
  14652. "in": "query",
  14653. "schema": {
  14654. "type": "object",
  14655. "properties": {
  14656. "directory": {
  14657. "type": "string"
  14658. },
  14659. "workspace": {
  14660. "type": "string"
  14661. }
  14662. },
  14663. "additionalProperties": false
  14664. },
  14665. "required": false,
  14666. "style": "deepObject",
  14667. "explode": true
  14668. }
  14669. ],
  14670. "responses": {
  14671. "204": {
  14672. "description": "<No Content>"
  14673. },
  14674. "400": {
  14675. "description": "ProjectCopyError | InvalidRequestError",
  14676. "content": {
  14677. "application/json": {
  14678. "schema": {
  14679. "anyOf": [
  14680. {
  14681. "$ref": "#/components/schemas/ProjectCopyError"
  14682. },
  14683. {
  14684. "$ref": "#/components/schemas/InvalidRequestError"
  14685. }
  14686. ]
  14687. }
  14688. }
  14689. }
  14690. }
  14691. },
  14692. "x-codeSamples": [
  14693. {
  14694. "lang": "js",
  14695. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.refresh({\n ...\n})"
  14696. }
  14697. ]
  14698. }
  14699. },
  14700. "/pty/{ptyID}/connect": {
  14701. "get": {
  14702. "tags": ["pty"],
  14703. "operationId": "pty.connect",
  14704. "parameters": [
  14705. {
  14706. "name": "ptyID",
  14707. "in": "path",
  14708. "schema": {
  14709. "type": "string",
  14710. "pattern": "^pty"
  14711. },
  14712. "required": true
  14713. },
  14714. {
  14715. "in": "query",
  14716. "name": "directory",
  14717. "schema": {
  14718. "type": "string"
  14719. }
  14720. },
  14721. {
  14722. "in": "query",
  14723. "name": "workspace",
  14724. "schema": {
  14725. "type": "string"
  14726. }
  14727. },
  14728. {
  14729. "in": "query",
  14730. "name": "cursor",
  14731. "schema": {
  14732. "type": "string"
  14733. }
  14734. },
  14735. {
  14736. "in": "query",
  14737. "name": "ticket",
  14738. "schema": {
  14739. "type": "string"
  14740. }
  14741. }
  14742. ],
  14743. "responses": {
  14744. "200": {
  14745. "description": "Connected session",
  14746. "content": {
  14747. "application/json": {
  14748. "schema": {
  14749. "type": "boolean",
  14750. "description": "Connected session"
  14751. }
  14752. }
  14753. }
  14754. },
  14755. "403": {
  14756. "description": "Forbidden",
  14757. "content": {
  14758. "application/json": {
  14759. "schema": {
  14760. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  14761. }
  14762. }
  14763. }
  14764. },
  14765. "404": {
  14766. "description": "Not found",
  14767. "content": {
  14768. "application/json": {
  14769. "schema": {
  14770. "$ref": "#/components/schemas/NotFoundError"
  14771. }
  14772. }
  14773. }
  14774. }
  14775. },
  14776. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  14777. "summary": "Connect to PTY session",
  14778. "x-codeSamples": [
  14779. {
  14780. "lang": "js",
  14781. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  14782. }
  14783. ]
  14784. }
  14785. }
  14786. },
  14787. "components": {
  14788. "schemas": {
  14789. "Event": {
  14790. "anyOf": [
  14791. {
  14792. "$ref": "#/components/schemas/EventModels-devRefreshed"
  14793. },
  14794. {
  14795. "$ref": "#/components/schemas/EventIntegrationUpdated"
  14796. },
  14797. {
  14798. "$ref": "#/components/schemas/EventIntegrationConnectionUpdated"
  14799. },
  14800. {
  14801. "$ref": "#/components/schemas/EventCatalogUpdated"
  14802. },
  14803. {
  14804. "$ref": "#/components/schemas/EventSessionCreated"
  14805. },
  14806. {
  14807. "$ref": "#/components/schemas/EventSessionUpdated"
  14808. },
  14809. {
  14810. "$ref": "#/components/schemas/EventSessionDeleted"
  14811. },
  14812. {
  14813. "$ref": "#/components/schemas/EventMessageUpdated"
  14814. },
  14815. {
  14816. "$ref": "#/components/schemas/EventMessageRemoved"
  14817. },
  14818. {
  14819. "$ref": "#/components/schemas/EventMessagePartUpdated"
  14820. },
  14821. {
  14822. "$ref": "#/components/schemas/EventMessagePartRemoved"
  14823. },
  14824. {
  14825. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  14826. },
  14827. {
  14828. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  14829. },
  14830. {
  14831. "$ref": "#/components/schemas/EventSessionNextMoved"
  14832. },
  14833. {
  14834. "$ref": "#/components/schemas/EventSessionNextPrompted"
  14835. },
  14836. {
  14837. "$ref": "#/components/schemas/EventSessionNextPromptAdmitted"
  14838. },
  14839. {
  14840. "$ref": "#/components/schemas/EventSessionNextContextUpdated"
  14841. },
  14842. {
  14843. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  14844. },
  14845. {
  14846. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  14847. },
  14848. {
  14849. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  14850. },
  14851. {
  14852. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  14853. },
  14854. {
  14855. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  14856. },
  14857. {
  14858. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  14859. },
  14860. {
  14861. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  14862. },
  14863. {
  14864. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  14865. },
  14866. {
  14867. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  14868. },
  14869. {
  14870. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  14871. },
  14872. {
  14873. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  14874. },
  14875. {
  14876. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  14877. },
  14878. {
  14879. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  14880. },
  14881. {
  14882. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  14883. },
  14884. {
  14885. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  14886. },
  14887. {
  14888. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  14889. },
  14890. {
  14891. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  14892. },
  14893. {
  14894. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  14895. },
  14896. {
  14897. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  14898. },
  14899. {
  14900. "$ref": "#/components/schemas/EventSessionNextRetried"
  14901. },
  14902. {
  14903. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  14904. },
  14905. {
  14906. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  14907. },
  14908. {
  14909. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  14910. },
  14911. {
  14912. "$ref": "#/components/schemas/EventSessionNextRevertStaged"
  14913. },
  14914. {
  14915. "$ref": "#/components/schemas/EventSessionNextRevertCleared"
  14916. },
  14917. {
  14918. "$ref": "#/components/schemas/EventSessionNextRevertCommitted"
  14919. },
  14920. {
  14921. "$ref": "#/components/schemas/EventMessagePartDelta"
  14922. },
  14923. {
  14924. "$ref": "#/components/schemas/EventSessionDiff"
  14925. },
  14926. {
  14927. "$ref": "#/components/schemas/EventSessionError"
  14928. },
  14929. {
  14930. "$ref": "#/components/schemas/EventInstallationUpdated"
  14931. },
  14932. {
  14933. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  14934. },
  14935. {
  14936. "$ref": "#/components/schemas/EventFileEdited"
  14937. },
  14938. {
  14939. "$ref": "#/components/schemas/EventReferenceUpdated"
  14940. },
  14941. {
  14942. "$ref": "#/components/schemas/EventPermissionV2Asked"
  14943. },
  14944. {
  14945. "$ref": "#/components/schemas/EventPermissionV2Replied"
  14946. },
  14947. {
  14948. "$ref": "#/components/schemas/EventPluginAdded"
  14949. },
  14950. {
  14951. "$ref": "#/components/schemas/EventProjectDirectoriesUpdated"
  14952. },
  14953. {
  14954. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  14955. },
  14956. {
  14957. "$ref": "#/components/schemas/EventPtyCreated"
  14958. },
  14959. {
  14960. "$ref": "#/components/schemas/EventPtyUpdated"
  14961. },
  14962. {
  14963. "$ref": "#/components/schemas/EventPtyExited"
  14964. },
  14965. {
  14966. "$ref": "#/components/schemas/EventPtyDeleted"
  14967. },
  14968. {
  14969. "$ref": "#/components/schemas/EventQuestionV2Asked"
  14970. },
  14971. {
  14972. "$ref": "#/components/schemas/EventQuestionV2Replied"
  14973. },
  14974. {
  14975. "$ref": "#/components/schemas/EventQuestionV2Rejected"
  14976. },
  14977. {
  14978. "$ref": "#/components/schemas/EventTodoUpdated"
  14979. },
  14980. {
  14981. "$ref": "#/components/schemas/EventLspUpdated"
  14982. },
  14983. {
  14984. "$ref": "#/components/schemas/EventPermissionAsked"
  14985. },
  14986. {
  14987. "$ref": "#/components/schemas/EventPermissionReplied"
  14988. },
  14989. {
  14990. "$ref": "#/components/schemas/Event.tui.prompt.append"
  14991. },
  14992. {
  14993. "$ref": "#/components/schemas/Event.tui.command.execute"
  14994. },
  14995. {
  14996. "$ref": "#/components/schemas/Event.tui.toast.show"
  14997. },
  14998. {
  14999. "$ref": "#/components/schemas/Event.tui.session.select"
  15000. },
  15001. {
  15002. "$ref": "#/components/schemas/EventMcpToolsChanged"
  15003. },
  15004. {
  15005. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  15006. },
  15007. {
  15008. "$ref": "#/components/schemas/EventCommandExecuted"
  15009. },
  15010. {
  15011. "$ref": "#/components/schemas/EventProjectUpdated"
  15012. },
  15013. {
  15014. "$ref": "#/components/schemas/EventSessionStatus"
  15015. },
  15016. {
  15017. "$ref": "#/components/schemas/EventSessionIdle"
  15018. },
  15019. {
  15020. "$ref": "#/components/schemas/EventQuestionAsked"
  15021. },
  15022. {
  15023. "$ref": "#/components/schemas/EventQuestionReplied"
  15024. },
  15025. {
  15026. "$ref": "#/components/schemas/EventQuestionRejected"
  15027. },
  15028. {
  15029. "$ref": "#/components/schemas/EventSessionCompacted"
  15030. },
  15031. {
  15032. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  15033. },
  15034. {
  15035. "$ref": "#/components/schemas/EventWorkspaceReady"
  15036. },
  15037. {
  15038. "$ref": "#/components/schemas/EventWorkspaceFailed"
  15039. },
  15040. {
  15041. "$ref": "#/components/schemas/EventWorkspaceStatus"
  15042. },
  15043. {
  15044. "$ref": "#/components/schemas/EventWorktreeReady"
  15045. },
  15046. {
  15047. "$ref": "#/components/schemas/EventWorktreeFailed"
  15048. },
  15049. {
  15050. "$ref": "#/components/schemas/EventServerConnected"
  15051. },
  15052. {
  15053. "$ref": "#/components/schemas/EventGlobalDisposed"
  15054. },
  15055. {
  15056. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  15057. }
  15058. ]
  15059. },
  15060. "QuestionReplied": {
  15061. "type": "object",
  15062. "properties": {
  15063. "sessionID": {
  15064. "type": "string",
  15065. "pattern": "^ses"
  15066. },
  15067. "requestID": {
  15068. "type": "string",
  15069. "pattern": "^que"
  15070. },
  15071. "answers": {
  15072. "type": "array",
  15073. "items": {
  15074. "$ref": "#/components/schemas/QuestionAnswer"
  15075. }
  15076. }
  15077. },
  15078. "required": ["sessionID", "requestID", "answers"],
  15079. "additionalProperties": false
  15080. },
  15081. "QuestionRejected": {
  15082. "type": "object",
  15083. "properties": {
  15084. "sessionID": {
  15085. "type": "string",
  15086. "pattern": "^ses"
  15087. },
  15088. "requestID": {
  15089. "type": "string",
  15090. "pattern": "^que"
  15091. }
  15092. },
  15093. "required": ["sessionID", "requestID"],
  15094. "additionalProperties": false
  15095. },
  15096. "OAuth": {
  15097. "type": "object",
  15098. "properties": {
  15099. "type": {
  15100. "type": "string",
  15101. "enum": ["oauth"]
  15102. },
  15103. "refresh": {
  15104. "type": "string"
  15105. },
  15106. "access": {
  15107. "type": "string"
  15108. },
  15109. "expires": {
  15110. "type": "integer",
  15111. "minimum": 0
  15112. },
  15113. "accountId": {
  15114. "type": "string"
  15115. },
  15116. "enterpriseUrl": {
  15117. "type": "string"
  15118. }
  15119. },
  15120. "required": ["type", "refresh", "access", "expires"],
  15121. "additionalProperties": false
  15122. },
  15123. "ApiAuth": {
  15124. "type": "object",
  15125. "properties": {
  15126. "type": {
  15127. "type": "string",
  15128. "enum": ["api"]
  15129. },
  15130. "key": {
  15131. "type": "string"
  15132. },
  15133. "metadata": {
  15134. "type": "object",
  15135. "additionalProperties": {
  15136. "type": "string"
  15137. }
  15138. }
  15139. },
  15140. "required": ["type", "key"],
  15141. "additionalProperties": false
  15142. },
  15143. "WellKnownAuth": {
  15144. "type": "object",
  15145. "properties": {
  15146. "type": {
  15147. "type": "string",
  15148. "enum": ["wellknown"]
  15149. },
  15150. "key": {
  15151. "type": "string"
  15152. },
  15153. "token": {
  15154. "type": "string"
  15155. }
  15156. },
  15157. "required": ["type", "key", "token"],
  15158. "additionalProperties": false
  15159. },
  15160. "Auth": {
  15161. "anyOf": [
  15162. {
  15163. "$ref": "#/components/schemas/OAuth"
  15164. },
  15165. {
  15166. "$ref": "#/components/schemas/ApiAuth"
  15167. },
  15168. {
  15169. "$ref": "#/components/schemas/WellKnownAuth"
  15170. }
  15171. ]
  15172. },
  15173. "effect_HttpApiError_BadRequest": {
  15174. "type": "object",
  15175. "properties": {
  15176. "_tag": {
  15177. "type": "string",
  15178. "enum": ["BadRequest"]
  15179. }
  15180. },
  15181. "required": ["_tag"],
  15182. "additionalProperties": false
  15183. },
  15184. "InvalidRequestError": {
  15185. "type": "object",
  15186. "properties": {
  15187. "_tag": {
  15188. "type": "string",
  15189. "enum": ["InvalidRequestError"]
  15190. },
  15191. "message": {
  15192. "type": "string"
  15193. },
  15194. "kind": {
  15195. "type": "string"
  15196. },
  15197. "field": {
  15198. "type": "string"
  15199. }
  15200. },
  15201. "required": ["_tag", "message"],
  15202. "additionalProperties": false
  15203. },
  15204. "MoveSessionError": {
  15205. "type": "object",
  15206. "properties": {
  15207. "name": {
  15208. "type": "string",
  15209. "enum": ["MoveSessionError"]
  15210. },
  15211. "data": {
  15212. "type": "object",
  15213. "properties": {
  15214. "message": {
  15215. "type": "string"
  15216. }
  15217. },
  15218. "required": ["message"],
  15219. "additionalProperties": false
  15220. }
  15221. },
  15222. "required": ["name", "data"],
  15223. "additionalProperties": false
  15224. },
  15225. "SnapshotFileDiff": {
  15226. "type": "object",
  15227. "properties": {
  15228. "file": {
  15229. "type": "string"
  15230. },
  15231. "patch": {
  15232. "type": "string"
  15233. },
  15234. "additions": {
  15235. "type": "number"
  15236. },
  15237. "deletions": {
  15238. "type": "number"
  15239. },
  15240. "status": {
  15241. "type": "string",
  15242. "enum": ["added", "deleted", "modified"]
  15243. }
  15244. },
  15245. "required": ["additions", "deletions"],
  15246. "additionalProperties": false
  15247. },
  15248. "PermissionAction": {
  15249. "type": "string",
  15250. "enum": ["allow", "deny", "ask"]
  15251. },
  15252. "PermissionRule": {
  15253. "type": "object",
  15254. "properties": {
  15255. "permission": {
  15256. "type": "string"
  15257. },
  15258. "pattern": {
  15259. "type": "string"
  15260. },
  15261. "action": {
  15262. "$ref": "#/components/schemas/PermissionAction"
  15263. }
  15264. },
  15265. "required": ["permission", "pattern", "action"],
  15266. "additionalProperties": false
  15267. },
  15268. "PermissionRuleset": {
  15269. "type": "array",
  15270. "items": {
  15271. "$ref": "#/components/schemas/PermissionRule"
  15272. }
  15273. },
  15274. "Session": {
  15275. "type": "object",
  15276. "properties": {
  15277. "id": {
  15278. "type": "string",
  15279. "pattern": "^ses"
  15280. },
  15281. "slug": {
  15282. "type": "string"
  15283. },
  15284. "projectID": {
  15285. "type": "string"
  15286. },
  15287. "workspaceID": {
  15288. "type": "string",
  15289. "pattern": "^wrk"
  15290. },
  15291. "directory": {
  15292. "type": "string"
  15293. },
  15294. "path": {
  15295. "type": "string"
  15296. },
  15297. "parentID": {
  15298. "type": "string",
  15299. "pattern": "^ses"
  15300. },
  15301. "summary": {
  15302. "type": "object",
  15303. "properties": {
  15304. "additions": {
  15305. "type": "number"
  15306. },
  15307. "deletions": {
  15308. "type": "number"
  15309. },
  15310. "files": {
  15311. "type": "number"
  15312. },
  15313. "diffs": {
  15314. "type": "array",
  15315. "items": {
  15316. "$ref": "#/components/schemas/SnapshotFileDiff"
  15317. }
  15318. }
  15319. },
  15320. "required": ["additions", "deletions", "files"],
  15321. "additionalProperties": false
  15322. },
  15323. "cost": {
  15324. "type": "number"
  15325. },
  15326. "tokens": {
  15327. "type": "object",
  15328. "properties": {
  15329. "input": {
  15330. "type": "number"
  15331. },
  15332. "output": {
  15333. "type": "number"
  15334. },
  15335. "reasoning": {
  15336. "type": "number"
  15337. },
  15338. "cache": {
  15339. "type": "object",
  15340. "properties": {
  15341. "read": {
  15342. "type": "number"
  15343. },
  15344. "write": {
  15345. "type": "number"
  15346. }
  15347. },
  15348. "required": ["read", "write"],
  15349. "additionalProperties": false
  15350. }
  15351. },
  15352. "required": ["input", "output", "reasoning", "cache"],
  15353. "additionalProperties": false
  15354. },
  15355. "share": {
  15356. "type": "object",
  15357. "properties": {
  15358. "url": {
  15359. "type": "string"
  15360. }
  15361. },
  15362. "required": ["url"],
  15363. "additionalProperties": false
  15364. },
  15365. "title": {
  15366. "type": "string"
  15367. },
  15368. "agent": {
  15369. "type": "string"
  15370. },
  15371. "model": {
  15372. "type": "object",
  15373. "properties": {
  15374. "id": {
  15375. "type": "string"
  15376. },
  15377. "providerID": {
  15378. "type": "string"
  15379. },
  15380. "variant": {
  15381. "type": "string"
  15382. }
  15383. },
  15384. "required": ["id", "providerID"],
  15385. "additionalProperties": false
  15386. },
  15387. "version": {
  15388. "type": "string"
  15389. },
  15390. "metadata": {
  15391. "type": "object"
  15392. },
  15393. "time": {
  15394. "type": "object",
  15395. "properties": {
  15396. "created": {
  15397. "type": "integer",
  15398. "minimum": 0
  15399. },
  15400. "updated": {
  15401. "type": "integer",
  15402. "minimum": 0
  15403. },
  15404. "compacting": {
  15405. "type": "integer",
  15406. "minimum": 0
  15407. },
  15408. "archived": {
  15409. "type": "number"
  15410. }
  15411. },
  15412. "required": ["created", "updated"],
  15413. "additionalProperties": false
  15414. },
  15415. "permission": {
  15416. "$ref": "#/components/schemas/PermissionRuleset"
  15417. },
  15418. "revert": {
  15419. "type": "object",
  15420. "properties": {
  15421. "messageID": {
  15422. "type": "string",
  15423. "pattern": "^msg"
  15424. },
  15425. "partID": {
  15426. "type": "string",
  15427. "pattern": "^prt"
  15428. },
  15429. "snapshot": {
  15430. "type": "string"
  15431. },
  15432. "diff": {
  15433. "type": "string"
  15434. }
  15435. },
  15436. "required": ["messageID"],
  15437. "additionalProperties": false
  15438. }
  15439. },
  15440. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  15441. "additionalProperties": false
  15442. },
  15443. "OutputFormatText": {
  15444. "type": "object",
  15445. "properties": {
  15446. "type": {
  15447. "type": "string",
  15448. "enum": ["text"]
  15449. }
  15450. },
  15451. "required": ["type"],
  15452. "additionalProperties": false
  15453. },
  15454. "JSONSchema": {
  15455. "type": "object"
  15456. },
  15457. "OutputFormatJsonSchema": {
  15458. "type": "object",
  15459. "properties": {
  15460. "type": {
  15461. "type": "string",
  15462. "enum": ["json_schema"]
  15463. },
  15464. "schema": {
  15465. "$ref": "#/components/schemas/JSONSchema"
  15466. },
  15467. "retryCount": {
  15468. "type": "integer",
  15469. "minimum": 0
  15470. }
  15471. },
  15472. "required": ["type", "schema"],
  15473. "additionalProperties": false
  15474. },
  15475. "OutputFormat": {
  15476. "anyOf": [
  15477. {
  15478. "$ref": "#/components/schemas/OutputFormatText"
  15479. },
  15480. {
  15481. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  15482. }
  15483. ]
  15484. },
  15485. "UserMessage": {
  15486. "type": "object",
  15487. "properties": {
  15488. "id": {
  15489. "type": "string",
  15490. "pattern": "^msg"
  15491. },
  15492. "sessionID": {
  15493. "type": "string",
  15494. "pattern": "^ses"
  15495. },
  15496. "role": {
  15497. "type": "string",
  15498. "enum": ["user"]
  15499. },
  15500. "time": {
  15501. "type": "object",
  15502. "properties": {
  15503. "created": {
  15504. "type": "number",
  15505. "minimum": 0
  15506. }
  15507. },
  15508. "required": ["created"],
  15509. "additionalProperties": false
  15510. },
  15511. "format": {
  15512. "$ref": "#/components/schemas/OutputFormat"
  15513. },
  15514. "summary": {
  15515. "type": "object",
  15516. "properties": {
  15517. "title": {
  15518. "type": "string"
  15519. },
  15520. "body": {
  15521. "type": "string"
  15522. },
  15523. "diffs": {
  15524. "type": "array",
  15525. "items": {
  15526. "$ref": "#/components/schemas/SnapshotFileDiff"
  15527. }
  15528. }
  15529. },
  15530. "required": ["diffs"],
  15531. "additionalProperties": false
  15532. },
  15533. "agent": {
  15534. "type": "string"
  15535. },
  15536. "model": {
  15537. "type": "object",
  15538. "properties": {
  15539. "providerID": {
  15540. "type": "string"
  15541. },
  15542. "modelID": {
  15543. "type": "string"
  15544. },
  15545. "variant": {
  15546. "type": "string"
  15547. }
  15548. },
  15549. "required": ["providerID", "modelID"],
  15550. "additionalProperties": false
  15551. },
  15552. "system": {
  15553. "type": "string"
  15554. },
  15555. "tools": {
  15556. "type": "object",
  15557. "additionalProperties": {
  15558. "type": "boolean"
  15559. }
  15560. }
  15561. },
  15562. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  15563. "additionalProperties": false
  15564. },
  15565. "ProviderAuthError": {
  15566. "type": "object",
  15567. "properties": {
  15568. "name": {
  15569. "type": "string",
  15570. "enum": ["ProviderAuthError"]
  15571. },
  15572. "data": {
  15573. "type": "object",
  15574. "properties": {
  15575. "providerID": {
  15576. "type": "string"
  15577. },
  15578. "message": {
  15579. "type": "string"
  15580. }
  15581. },
  15582. "required": ["providerID", "message"],
  15583. "additionalProperties": false
  15584. }
  15585. },
  15586. "required": ["name", "data"],
  15587. "additionalProperties": false
  15588. },
  15589. "UnknownError": {
  15590. "type": "object",
  15591. "properties": {
  15592. "name": {
  15593. "type": "string",
  15594. "enum": ["UnknownError"]
  15595. },
  15596. "data": {
  15597. "type": "object",
  15598. "properties": {
  15599. "message": {
  15600. "type": "string"
  15601. },
  15602. "ref": {
  15603. "type": "string"
  15604. }
  15605. },
  15606. "required": ["message"],
  15607. "additionalProperties": false
  15608. }
  15609. },
  15610. "required": ["name", "data"],
  15611. "additionalProperties": false
  15612. },
  15613. "MessageOutputLengthError": {
  15614. "type": "object",
  15615. "properties": {
  15616. "name": {
  15617. "type": "string",
  15618. "enum": ["MessageOutputLengthError"]
  15619. },
  15620. "data": {
  15621. "type": "object",
  15622. "properties": {}
  15623. }
  15624. },
  15625. "required": ["name", "data"],
  15626. "additionalProperties": false
  15627. },
  15628. "MessageAbortedError": {
  15629. "type": "object",
  15630. "properties": {
  15631. "name": {
  15632. "type": "string",
  15633. "enum": ["MessageAbortedError"]
  15634. },
  15635. "data": {
  15636. "type": "object",
  15637. "properties": {
  15638. "message": {
  15639. "type": "string"
  15640. }
  15641. },
  15642. "required": ["message"],
  15643. "additionalProperties": false
  15644. }
  15645. },
  15646. "required": ["name", "data"],
  15647. "additionalProperties": false
  15648. },
  15649. "StructuredOutputError": {
  15650. "type": "object",
  15651. "properties": {
  15652. "name": {
  15653. "type": "string",
  15654. "enum": ["StructuredOutputError"]
  15655. },
  15656. "data": {
  15657. "type": "object",
  15658. "properties": {
  15659. "message": {
  15660. "type": "string"
  15661. },
  15662. "retries": {
  15663. "type": "integer",
  15664. "minimum": 0
  15665. }
  15666. },
  15667. "required": ["message", "retries"],
  15668. "additionalProperties": false
  15669. }
  15670. },
  15671. "required": ["name", "data"],
  15672. "additionalProperties": false
  15673. },
  15674. "ContextOverflowError": {
  15675. "type": "object",
  15676. "properties": {
  15677. "name": {
  15678. "type": "string",
  15679. "enum": ["ContextOverflowError"]
  15680. },
  15681. "data": {
  15682. "type": "object",
  15683. "properties": {
  15684. "message": {
  15685. "type": "string"
  15686. },
  15687. "responseBody": {
  15688. "type": "string"
  15689. }
  15690. },
  15691. "required": ["message"],
  15692. "additionalProperties": false
  15693. }
  15694. },
  15695. "required": ["name", "data"],
  15696. "additionalProperties": false
  15697. },
  15698. "ContentFilterError": {
  15699. "type": "object",
  15700. "properties": {
  15701. "name": {
  15702. "type": "string",
  15703. "enum": ["ContentFilterError"]
  15704. },
  15705. "data": {
  15706. "type": "object",
  15707. "properties": {
  15708. "message": {
  15709. "type": "string"
  15710. }
  15711. },
  15712. "required": ["message"],
  15713. "additionalProperties": false
  15714. }
  15715. },
  15716. "required": ["name", "data"],
  15717. "additionalProperties": false
  15718. },
  15719. "APIError": {
  15720. "type": "object",
  15721. "properties": {
  15722. "name": {
  15723. "type": "string",
  15724. "enum": ["APIError"]
  15725. },
  15726. "data": {
  15727. "type": "object",
  15728. "properties": {
  15729. "message": {
  15730. "type": "string"
  15731. },
  15732. "statusCode": {
  15733. "type": "integer",
  15734. "minimum": 0
  15735. },
  15736. "isRetryable": {
  15737. "type": "boolean"
  15738. },
  15739. "responseHeaders": {
  15740. "type": "object",
  15741. "additionalProperties": {
  15742. "type": "string"
  15743. }
  15744. },
  15745. "responseBody": {
  15746. "type": "string"
  15747. },
  15748. "metadata": {
  15749. "type": "object",
  15750. "additionalProperties": {
  15751. "type": "string"
  15752. }
  15753. }
  15754. },
  15755. "required": ["message", "isRetryable"],
  15756. "additionalProperties": false
  15757. }
  15758. },
  15759. "required": ["name", "data"],
  15760. "additionalProperties": false
  15761. },
  15762. "AssistantMessage": {
  15763. "type": "object",
  15764. "properties": {
  15765. "id": {
  15766. "type": "string",
  15767. "pattern": "^msg"
  15768. },
  15769. "sessionID": {
  15770. "type": "string",
  15771. "pattern": "^ses"
  15772. },
  15773. "role": {
  15774. "type": "string",
  15775. "enum": ["assistant"]
  15776. },
  15777. "time": {
  15778. "type": "object",
  15779. "properties": {
  15780. "created": {
  15781. "type": "integer",
  15782. "minimum": 0
  15783. },
  15784. "completed": {
  15785. "type": "integer",
  15786. "minimum": 0
  15787. }
  15788. },
  15789. "required": ["created"],
  15790. "additionalProperties": false
  15791. },
  15792. "error": {
  15793. "anyOf": [
  15794. {
  15795. "$ref": "#/components/schemas/ProviderAuthError"
  15796. },
  15797. {
  15798. "$ref": "#/components/schemas/UnknownError"
  15799. },
  15800. {
  15801. "$ref": "#/components/schemas/MessageOutputLengthError"
  15802. },
  15803. {
  15804. "$ref": "#/components/schemas/MessageAbortedError"
  15805. },
  15806. {
  15807. "$ref": "#/components/schemas/StructuredOutputError"
  15808. },
  15809. {
  15810. "$ref": "#/components/schemas/ContextOverflowError"
  15811. },
  15812. {
  15813. "$ref": "#/components/schemas/ContentFilterError"
  15814. },
  15815. {
  15816. "$ref": "#/components/schemas/APIError"
  15817. }
  15818. ]
  15819. },
  15820. "parentID": {
  15821. "type": "string",
  15822. "pattern": "^msg"
  15823. },
  15824. "modelID": {
  15825. "type": "string"
  15826. },
  15827. "providerID": {
  15828. "type": "string"
  15829. },
  15830. "mode": {
  15831. "type": "string"
  15832. },
  15833. "agent": {
  15834. "type": "string"
  15835. },
  15836. "path": {
  15837. "type": "object",
  15838. "properties": {
  15839. "cwd": {
  15840. "type": "string"
  15841. },
  15842. "root": {
  15843. "type": "string"
  15844. }
  15845. },
  15846. "required": ["cwd", "root"],
  15847. "additionalProperties": false
  15848. },
  15849. "summary": {
  15850. "type": "boolean"
  15851. },
  15852. "cost": {
  15853. "type": "number"
  15854. },
  15855. "tokens": {
  15856. "type": "object",
  15857. "properties": {
  15858. "total": {
  15859. "type": "number"
  15860. },
  15861. "input": {
  15862. "type": "number"
  15863. },
  15864. "output": {
  15865. "type": "number"
  15866. },
  15867. "reasoning": {
  15868. "type": "number"
  15869. },
  15870. "cache": {
  15871. "type": "object",
  15872. "properties": {
  15873. "read": {
  15874. "type": "number"
  15875. },
  15876. "write": {
  15877. "type": "number"
  15878. }
  15879. },
  15880. "required": ["read", "write"],
  15881. "additionalProperties": false
  15882. }
  15883. },
  15884. "required": ["input", "output", "reasoning", "cache"],
  15885. "additionalProperties": false
  15886. },
  15887. "structured": {},
  15888. "variant": {
  15889. "type": "string"
  15890. },
  15891. "finish": {
  15892. "type": "string"
  15893. }
  15894. },
  15895. "required": [
  15896. "id",
  15897. "sessionID",
  15898. "role",
  15899. "time",
  15900. "parentID",
  15901. "modelID",
  15902. "providerID",
  15903. "mode",
  15904. "agent",
  15905. "path",
  15906. "cost",
  15907. "tokens"
  15908. ],
  15909. "additionalProperties": false
  15910. },
  15911. "Message": {
  15912. "anyOf": [
  15913. {
  15914. "$ref": "#/components/schemas/UserMessage"
  15915. },
  15916. {
  15917. "$ref": "#/components/schemas/AssistantMessage"
  15918. }
  15919. ]
  15920. },
  15921. "TextPart": {
  15922. "type": "object",
  15923. "properties": {
  15924. "id": {
  15925. "type": "string",
  15926. "pattern": "^prt"
  15927. },
  15928. "sessionID": {
  15929. "type": "string",
  15930. "pattern": "^ses"
  15931. },
  15932. "messageID": {
  15933. "type": "string",
  15934. "pattern": "^msg"
  15935. },
  15936. "type": {
  15937. "type": "string",
  15938. "enum": ["text"]
  15939. },
  15940. "text": {
  15941. "type": "string"
  15942. },
  15943. "synthetic": {
  15944. "type": "boolean"
  15945. },
  15946. "ignored": {
  15947. "type": "boolean"
  15948. },
  15949. "time": {
  15950. "type": "object",
  15951. "properties": {
  15952. "start": {
  15953. "type": "integer",
  15954. "minimum": 0
  15955. },
  15956. "end": {
  15957. "type": "integer",
  15958. "minimum": 0
  15959. }
  15960. },
  15961. "required": ["start"],
  15962. "additionalProperties": false
  15963. },
  15964. "metadata": {
  15965. "type": "object"
  15966. }
  15967. },
  15968. "required": ["id", "sessionID", "messageID", "type", "text"],
  15969. "additionalProperties": false
  15970. },
  15971. "SubtaskPart": {
  15972. "type": "object",
  15973. "properties": {
  15974. "id": {
  15975. "type": "string",
  15976. "pattern": "^prt"
  15977. },
  15978. "sessionID": {
  15979. "type": "string",
  15980. "pattern": "^ses"
  15981. },
  15982. "messageID": {
  15983. "type": "string",
  15984. "pattern": "^msg"
  15985. },
  15986. "type": {
  15987. "type": "string",
  15988. "enum": ["subtask"]
  15989. },
  15990. "prompt": {
  15991. "type": "string"
  15992. },
  15993. "description": {
  15994. "type": "string"
  15995. },
  15996. "agent": {
  15997. "type": "string"
  15998. },
  15999. "model": {
  16000. "type": "object",
  16001. "properties": {
  16002. "providerID": {
  16003. "type": "string"
  16004. },
  16005. "modelID": {
  16006. "type": "string"
  16007. }
  16008. },
  16009. "required": ["providerID", "modelID"],
  16010. "additionalProperties": false
  16011. },
  16012. "command": {
  16013. "type": "string"
  16014. }
  16015. },
  16016. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  16017. "additionalProperties": false
  16018. },
  16019. "ReasoningPart": {
  16020. "type": "object",
  16021. "properties": {
  16022. "id": {
  16023. "type": "string",
  16024. "pattern": "^prt"
  16025. },
  16026. "sessionID": {
  16027. "type": "string",
  16028. "pattern": "^ses"
  16029. },
  16030. "messageID": {
  16031. "type": "string",
  16032. "pattern": "^msg"
  16033. },
  16034. "type": {
  16035. "type": "string",
  16036. "enum": ["reasoning"]
  16037. },
  16038. "text": {
  16039. "type": "string"
  16040. },
  16041. "metadata": {
  16042. "type": "object"
  16043. },
  16044. "time": {
  16045. "type": "object",
  16046. "properties": {
  16047. "start": {
  16048. "type": "integer",
  16049. "minimum": 0
  16050. },
  16051. "end": {
  16052. "type": "integer",
  16053. "minimum": 0
  16054. }
  16055. },
  16056. "required": ["start"],
  16057. "additionalProperties": false
  16058. }
  16059. },
  16060. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  16061. "additionalProperties": false
  16062. },
  16063. "FilePartSourceText": {
  16064. "type": "object",
  16065. "properties": {
  16066. "value": {
  16067. "type": "string"
  16068. },
  16069. "start": {
  16070. "type": "number"
  16071. },
  16072. "end": {
  16073. "type": "number"
  16074. }
  16075. },
  16076. "required": ["value", "start", "end"],
  16077. "additionalProperties": false
  16078. },
  16079. "FileSource": {
  16080. "type": "object",
  16081. "properties": {
  16082. "text": {
  16083. "$ref": "#/components/schemas/FilePartSourceText"
  16084. },
  16085. "type": {
  16086. "type": "string",
  16087. "enum": ["file"]
  16088. },
  16089. "path": {
  16090. "type": "string"
  16091. }
  16092. },
  16093. "required": ["text", "type", "path"],
  16094. "additionalProperties": false
  16095. },
  16096. "Range": {
  16097. "type": "object",
  16098. "properties": {
  16099. "start": {
  16100. "type": "object",
  16101. "properties": {
  16102. "line": {
  16103. "type": "integer",
  16104. "minimum": 0
  16105. },
  16106. "character": {
  16107. "type": "integer",
  16108. "minimum": 0
  16109. }
  16110. },
  16111. "required": ["line", "character"],
  16112. "additionalProperties": false
  16113. },
  16114. "end": {
  16115. "type": "object",
  16116. "properties": {
  16117. "line": {
  16118. "type": "integer",
  16119. "minimum": 0
  16120. },
  16121. "character": {
  16122. "type": "integer",
  16123. "minimum": 0
  16124. }
  16125. },
  16126. "required": ["line", "character"],
  16127. "additionalProperties": false
  16128. }
  16129. },
  16130. "required": ["start", "end"],
  16131. "additionalProperties": false
  16132. },
  16133. "SymbolSource": {
  16134. "type": "object",
  16135. "properties": {
  16136. "text": {
  16137. "$ref": "#/components/schemas/FilePartSourceText"
  16138. },
  16139. "type": {
  16140. "type": "string",
  16141. "enum": ["symbol"]
  16142. },
  16143. "path": {
  16144. "type": "string"
  16145. },
  16146. "range": {
  16147. "$ref": "#/components/schemas/Range"
  16148. },
  16149. "name": {
  16150. "type": "string"
  16151. },
  16152. "kind": {
  16153. "type": "integer",
  16154. "minimum": 0
  16155. }
  16156. },
  16157. "required": ["text", "type", "path", "range", "name", "kind"],
  16158. "additionalProperties": false
  16159. },
  16160. "ResourceSource": {
  16161. "type": "object",
  16162. "properties": {
  16163. "text": {
  16164. "$ref": "#/components/schemas/FilePartSourceText"
  16165. },
  16166. "type": {
  16167. "type": "string",
  16168. "enum": ["resource"]
  16169. },
  16170. "clientName": {
  16171. "type": "string"
  16172. },
  16173. "uri": {
  16174. "type": "string"
  16175. }
  16176. },
  16177. "required": ["text", "type", "clientName", "uri"],
  16178. "additionalProperties": false
  16179. },
  16180. "FilePartSource": {
  16181. "anyOf": [
  16182. {
  16183. "$ref": "#/components/schemas/FileSource"
  16184. },
  16185. {
  16186. "$ref": "#/components/schemas/SymbolSource"
  16187. },
  16188. {
  16189. "$ref": "#/components/schemas/ResourceSource"
  16190. }
  16191. ]
  16192. },
  16193. "FilePart": {
  16194. "type": "object",
  16195. "properties": {
  16196. "id": {
  16197. "type": "string",
  16198. "pattern": "^prt"
  16199. },
  16200. "sessionID": {
  16201. "type": "string",
  16202. "pattern": "^ses"
  16203. },
  16204. "messageID": {
  16205. "type": "string",
  16206. "pattern": "^msg"
  16207. },
  16208. "type": {
  16209. "type": "string",
  16210. "enum": ["file"]
  16211. },
  16212. "mime": {
  16213. "type": "string"
  16214. },
  16215. "filename": {
  16216. "type": "string"
  16217. },
  16218. "url": {
  16219. "type": "string"
  16220. },
  16221. "source": {
  16222. "$ref": "#/components/schemas/FilePartSource"
  16223. }
  16224. },
  16225. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  16226. "additionalProperties": false
  16227. },
  16228. "ToolStatePending": {
  16229. "type": "object",
  16230. "properties": {
  16231. "status": {
  16232. "type": "string",
  16233. "enum": ["pending"]
  16234. },
  16235. "input": {
  16236. "type": "object"
  16237. },
  16238. "raw": {
  16239. "type": "string"
  16240. }
  16241. },
  16242. "required": ["status", "input", "raw"],
  16243. "additionalProperties": false
  16244. },
  16245. "ToolStateRunning": {
  16246. "type": "object",
  16247. "properties": {
  16248. "status": {
  16249. "type": "string",
  16250. "enum": ["running"]
  16251. },
  16252. "input": {
  16253. "type": "object"
  16254. },
  16255. "title": {
  16256. "type": "string"
  16257. },
  16258. "metadata": {
  16259. "type": "object"
  16260. },
  16261. "time": {
  16262. "type": "object",
  16263. "properties": {
  16264. "start": {
  16265. "type": "integer",
  16266. "minimum": 0
  16267. }
  16268. },
  16269. "required": ["start"],
  16270. "additionalProperties": false
  16271. }
  16272. },
  16273. "required": ["status", "input", "time"],
  16274. "additionalProperties": false
  16275. },
  16276. "ToolStateCompleted": {
  16277. "type": "object",
  16278. "properties": {
  16279. "status": {
  16280. "type": "string",
  16281. "enum": ["completed"]
  16282. },
  16283. "input": {
  16284. "type": "object"
  16285. },
  16286. "output": {
  16287. "type": "string"
  16288. },
  16289. "title": {
  16290. "type": "string"
  16291. },
  16292. "metadata": {
  16293. "type": "object"
  16294. },
  16295. "time": {
  16296. "type": "object",
  16297. "properties": {
  16298. "start": {
  16299. "type": "integer",
  16300. "minimum": 0
  16301. },
  16302. "end": {
  16303. "type": "integer",
  16304. "minimum": 0
  16305. },
  16306. "compacted": {
  16307. "type": "integer",
  16308. "minimum": 0
  16309. }
  16310. },
  16311. "required": ["start", "end"],
  16312. "additionalProperties": false
  16313. },
  16314. "attachments": {
  16315. "type": "array",
  16316. "items": {
  16317. "$ref": "#/components/schemas/FilePart"
  16318. }
  16319. }
  16320. },
  16321. "required": ["status", "input", "output", "title", "metadata", "time"],
  16322. "additionalProperties": false
  16323. },
  16324. "ToolStateError": {
  16325. "type": "object",
  16326. "properties": {
  16327. "status": {
  16328. "type": "string",
  16329. "enum": ["error"]
  16330. },
  16331. "input": {
  16332. "type": "object"
  16333. },
  16334. "error": {
  16335. "type": "string"
  16336. },
  16337. "metadata": {
  16338. "type": "object"
  16339. },
  16340. "time": {
  16341. "type": "object",
  16342. "properties": {
  16343. "start": {
  16344. "type": "integer",
  16345. "minimum": 0
  16346. },
  16347. "end": {
  16348. "type": "integer",
  16349. "minimum": 0
  16350. }
  16351. },
  16352. "required": ["start", "end"],
  16353. "additionalProperties": false
  16354. }
  16355. },
  16356. "required": ["status", "input", "error", "time"],
  16357. "additionalProperties": false
  16358. },
  16359. "ToolState": {
  16360. "anyOf": [
  16361. {
  16362. "$ref": "#/components/schemas/ToolStatePending"
  16363. },
  16364. {
  16365. "$ref": "#/components/schemas/ToolStateRunning"
  16366. },
  16367. {
  16368. "$ref": "#/components/schemas/ToolStateCompleted"
  16369. },
  16370. {
  16371. "$ref": "#/components/schemas/ToolStateError"
  16372. }
  16373. ]
  16374. },
  16375. "ToolPart": {
  16376. "type": "object",
  16377. "properties": {
  16378. "id": {
  16379. "type": "string",
  16380. "pattern": "^prt"
  16381. },
  16382. "sessionID": {
  16383. "type": "string",
  16384. "pattern": "^ses"
  16385. },
  16386. "messageID": {
  16387. "type": "string",
  16388. "pattern": "^msg"
  16389. },
  16390. "type": {
  16391. "type": "string",
  16392. "enum": ["tool"]
  16393. },
  16394. "callID": {
  16395. "type": "string"
  16396. },
  16397. "tool": {
  16398. "type": "string"
  16399. },
  16400. "state": {
  16401. "$ref": "#/components/schemas/ToolState"
  16402. },
  16403. "metadata": {
  16404. "type": "object"
  16405. }
  16406. },
  16407. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  16408. "additionalProperties": false
  16409. },
  16410. "StepStartPart": {
  16411. "type": "object",
  16412. "properties": {
  16413. "id": {
  16414. "type": "string",
  16415. "pattern": "^prt"
  16416. },
  16417. "sessionID": {
  16418. "type": "string",
  16419. "pattern": "^ses"
  16420. },
  16421. "messageID": {
  16422. "type": "string",
  16423. "pattern": "^msg"
  16424. },
  16425. "type": {
  16426. "type": "string",
  16427. "enum": ["step-start"]
  16428. },
  16429. "snapshot": {
  16430. "type": "string"
  16431. }
  16432. },
  16433. "required": ["id", "sessionID", "messageID", "type"],
  16434. "additionalProperties": false
  16435. },
  16436. "StepFinishPart": {
  16437. "type": "object",
  16438. "properties": {
  16439. "id": {
  16440. "type": "string",
  16441. "pattern": "^prt"
  16442. },
  16443. "sessionID": {
  16444. "type": "string",
  16445. "pattern": "^ses"
  16446. },
  16447. "messageID": {
  16448. "type": "string",
  16449. "pattern": "^msg"
  16450. },
  16451. "type": {
  16452. "type": "string",
  16453. "enum": ["step-finish"]
  16454. },
  16455. "reason": {
  16456. "type": "string"
  16457. },
  16458. "snapshot": {
  16459. "type": "string"
  16460. },
  16461. "cost": {
  16462. "type": "number"
  16463. },
  16464. "tokens": {
  16465. "type": "object",
  16466. "properties": {
  16467. "total": {
  16468. "type": "number"
  16469. },
  16470. "input": {
  16471. "type": "number"
  16472. },
  16473. "output": {
  16474. "type": "number"
  16475. },
  16476. "reasoning": {
  16477. "type": "number"
  16478. },
  16479. "cache": {
  16480. "type": "object",
  16481. "properties": {
  16482. "read": {
  16483. "type": "number"
  16484. },
  16485. "write": {
  16486. "type": "number"
  16487. }
  16488. },
  16489. "required": ["read", "write"],
  16490. "additionalProperties": false
  16491. }
  16492. },
  16493. "required": ["input", "output", "reasoning", "cache"],
  16494. "additionalProperties": false
  16495. }
  16496. },
  16497. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  16498. "additionalProperties": false
  16499. },
  16500. "SnapshotPart": {
  16501. "type": "object",
  16502. "properties": {
  16503. "id": {
  16504. "type": "string",
  16505. "pattern": "^prt"
  16506. },
  16507. "sessionID": {
  16508. "type": "string",
  16509. "pattern": "^ses"
  16510. },
  16511. "messageID": {
  16512. "type": "string",
  16513. "pattern": "^msg"
  16514. },
  16515. "type": {
  16516. "type": "string",
  16517. "enum": ["snapshot"]
  16518. },
  16519. "snapshot": {
  16520. "type": "string"
  16521. }
  16522. },
  16523. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  16524. "additionalProperties": false
  16525. },
  16526. "PatchPart": {
  16527. "type": "object",
  16528. "properties": {
  16529. "id": {
  16530. "type": "string",
  16531. "pattern": "^prt"
  16532. },
  16533. "sessionID": {
  16534. "type": "string",
  16535. "pattern": "^ses"
  16536. },
  16537. "messageID": {
  16538. "type": "string",
  16539. "pattern": "^msg"
  16540. },
  16541. "type": {
  16542. "type": "string",
  16543. "enum": ["patch"]
  16544. },
  16545. "hash": {
  16546. "type": "string"
  16547. },
  16548. "files": {
  16549. "type": "array",
  16550. "items": {
  16551. "type": "string"
  16552. }
  16553. }
  16554. },
  16555. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  16556. "additionalProperties": false
  16557. },
  16558. "AgentPart": {
  16559. "type": "object",
  16560. "properties": {
  16561. "id": {
  16562. "type": "string",
  16563. "pattern": "^prt"
  16564. },
  16565. "sessionID": {
  16566. "type": "string",
  16567. "pattern": "^ses"
  16568. },
  16569. "messageID": {
  16570. "type": "string",
  16571. "pattern": "^msg"
  16572. },
  16573. "type": {
  16574. "type": "string",
  16575. "enum": ["agent"]
  16576. },
  16577. "name": {
  16578. "type": "string"
  16579. },
  16580. "source": {
  16581. "type": "object",
  16582. "properties": {
  16583. "value": {
  16584. "type": "string"
  16585. },
  16586. "start": {
  16587. "type": "integer",
  16588. "minimum": 0
  16589. },
  16590. "end": {
  16591. "type": "integer",
  16592. "minimum": 0
  16593. }
  16594. },
  16595. "required": ["value", "start", "end"],
  16596. "additionalProperties": false
  16597. }
  16598. },
  16599. "required": ["id", "sessionID", "messageID", "type", "name"],
  16600. "additionalProperties": false
  16601. },
  16602. "RetryPart": {
  16603. "type": "object",
  16604. "properties": {
  16605. "id": {
  16606. "type": "string",
  16607. "pattern": "^prt"
  16608. },
  16609. "sessionID": {
  16610. "type": "string",
  16611. "pattern": "^ses"
  16612. },
  16613. "messageID": {
  16614. "type": "string",
  16615. "pattern": "^msg"
  16616. },
  16617. "type": {
  16618. "type": "string",
  16619. "enum": ["retry"]
  16620. },
  16621. "attempt": {
  16622. "type": "integer",
  16623. "minimum": 0
  16624. },
  16625. "error": {
  16626. "$ref": "#/components/schemas/APIError"
  16627. },
  16628. "time": {
  16629. "type": "object",
  16630. "properties": {
  16631. "created": {
  16632. "type": "integer",
  16633. "minimum": 0
  16634. }
  16635. },
  16636. "required": ["created"],
  16637. "additionalProperties": false
  16638. }
  16639. },
  16640. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  16641. "additionalProperties": false
  16642. },
  16643. "CompactionPart": {
  16644. "type": "object",
  16645. "properties": {
  16646. "id": {
  16647. "type": "string",
  16648. "pattern": "^prt"
  16649. },
  16650. "sessionID": {
  16651. "type": "string",
  16652. "pattern": "^ses"
  16653. },
  16654. "messageID": {
  16655. "type": "string",
  16656. "pattern": "^msg"
  16657. },
  16658. "type": {
  16659. "type": "string",
  16660. "enum": ["compaction"]
  16661. },
  16662. "auto": {
  16663. "type": "boolean"
  16664. },
  16665. "overflow": {
  16666. "type": "boolean"
  16667. },
  16668. "tail_start_id": {
  16669. "type": "string",
  16670. "pattern": "^msg"
  16671. }
  16672. },
  16673. "required": ["id", "sessionID", "messageID", "type", "auto"],
  16674. "additionalProperties": false
  16675. },
  16676. "Part": {
  16677. "anyOf": [
  16678. {
  16679. "$ref": "#/components/schemas/TextPart"
  16680. },
  16681. {
  16682. "$ref": "#/components/schemas/SubtaskPart"
  16683. },
  16684. {
  16685. "$ref": "#/components/schemas/ReasoningPart"
  16686. },
  16687. {
  16688. "$ref": "#/components/schemas/FilePart"
  16689. },
  16690. {
  16691. "$ref": "#/components/schemas/ToolPart"
  16692. },
  16693. {
  16694. "$ref": "#/components/schemas/StepStartPart"
  16695. },
  16696. {
  16697. "$ref": "#/components/schemas/StepFinishPart"
  16698. },
  16699. {
  16700. "$ref": "#/components/schemas/SnapshotPart"
  16701. },
  16702. {
  16703. "$ref": "#/components/schemas/PatchPart"
  16704. },
  16705. {
  16706. "$ref": "#/components/schemas/AgentPart"
  16707. },
  16708. {
  16709. "$ref": "#/components/schemas/RetryPart"
  16710. },
  16711. {
  16712. "$ref": "#/components/schemas/CompactionPart"
  16713. }
  16714. ]
  16715. },
  16716. "Prompt": {
  16717. "type": "object",
  16718. "properties": {
  16719. "text": {
  16720. "type": "string"
  16721. },
  16722. "files": {
  16723. "type": "array",
  16724. "items": {
  16725. "$ref": "#/components/schemas/PromptFileAttachment"
  16726. }
  16727. },
  16728. "agents": {
  16729. "type": "array",
  16730. "items": {
  16731. "$ref": "#/components/schemas/PromptAgentAttachment"
  16732. }
  16733. }
  16734. },
  16735. "required": ["text"],
  16736. "additionalProperties": false
  16737. },
  16738. "Pty": {
  16739. "type": "object",
  16740. "properties": {
  16741. "id": {
  16742. "type": "string",
  16743. "pattern": "^pty"
  16744. },
  16745. "title": {
  16746. "type": "string"
  16747. },
  16748. "command": {
  16749. "type": "string"
  16750. },
  16751. "args": {
  16752. "type": "array",
  16753. "items": {
  16754. "type": "string"
  16755. }
  16756. },
  16757. "cwd": {
  16758. "type": "string"
  16759. },
  16760. "status": {
  16761. "type": "string",
  16762. "enum": ["running", "exited"]
  16763. },
  16764. "pid": {
  16765. "type": "integer",
  16766. "minimum": 0
  16767. },
  16768. "exitCode": {
  16769. "type": "integer",
  16770. "minimum": 0
  16771. }
  16772. },
  16773. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  16774. "additionalProperties": false
  16775. },
  16776. "Todo": {
  16777. "type": "object",
  16778. "properties": {
  16779. "content": {
  16780. "type": "string",
  16781. "description": "Brief description of the task"
  16782. },
  16783. "status": {
  16784. "type": "string",
  16785. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  16786. },
  16787. "priority": {
  16788. "type": "string",
  16789. "description": "Priority level of the task: high, medium, low"
  16790. }
  16791. },
  16792. "required": ["content", "status", "priority"],
  16793. "additionalProperties": false
  16794. },
  16795. "SessionStatus": {
  16796. "anyOf": [
  16797. {
  16798. "type": "object",
  16799. "properties": {
  16800. "type": {
  16801. "type": "string",
  16802. "enum": ["idle"]
  16803. }
  16804. },
  16805. "required": ["type"],
  16806. "additionalProperties": false
  16807. },
  16808. {
  16809. "type": "object",
  16810. "properties": {
  16811. "type": {
  16812. "type": "string",
  16813. "enum": ["retry"]
  16814. },
  16815. "attempt": {
  16816. "type": "integer",
  16817. "minimum": 0
  16818. },
  16819. "message": {
  16820. "type": "string"
  16821. },
  16822. "action": {
  16823. "type": "object",
  16824. "properties": {
  16825. "reason": {
  16826. "type": "string"
  16827. },
  16828. "provider": {
  16829. "type": "string"
  16830. },
  16831. "title": {
  16832. "type": "string"
  16833. },
  16834. "message": {
  16835. "type": "string"
  16836. },
  16837. "label": {
  16838. "type": "string"
  16839. },
  16840. "link": {
  16841. "type": "string"
  16842. }
  16843. },
  16844. "required": ["reason", "provider", "title", "message", "label"],
  16845. "additionalProperties": false
  16846. },
  16847. "next": {
  16848. "type": "integer",
  16849. "minimum": 0
  16850. }
  16851. },
  16852. "required": ["type", "attempt", "message", "next"],
  16853. "additionalProperties": false
  16854. },
  16855. {
  16856. "type": "object",
  16857. "properties": {
  16858. "type": {
  16859. "type": "string",
  16860. "enum": ["busy"]
  16861. }
  16862. },
  16863. "required": ["type"],
  16864. "additionalProperties": false
  16865. }
  16866. ]
  16867. },
  16868. "QuestionOption": {
  16869. "type": "object",
  16870. "properties": {
  16871. "label": {
  16872. "type": "string",
  16873. "description": "Display text (1-5 words, concise)"
  16874. },
  16875. "description": {
  16876. "type": "string",
  16877. "description": "Explanation of choice"
  16878. }
  16879. },
  16880. "required": ["label", "description"],
  16881. "additionalProperties": false
  16882. },
  16883. "QuestionInfo": {
  16884. "type": "object",
  16885. "properties": {
  16886. "question": {
  16887. "type": "string",
  16888. "description": "Complete question"
  16889. },
  16890. "header": {
  16891. "type": "string",
  16892. "description": "Very short label (max 30 chars)"
  16893. },
  16894. "options": {
  16895. "type": "array",
  16896. "items": {
  16897. "$ref": "#/components/schemas/QuestionOption"
  16898. },
  16899. "description": "Available choices"
  16900. },
  16901. "multiple": {
  16902. "type": "boolean"
  16903. },
  16904. "custom": {
  16905. "type": "boolean"
  16906. }
  16907. },
  16908. "required": ["question", "header", "options"],
  16909. "additionalProperties": false
  16910. },
  16911. "QuestionTool": {
  16912. "type": "object",
  16913. "properties": {
  16914. "messageID": {
  16915. "type": "string",
  16916. "pattern": "^msg"
  16917. },
  16918. "callID": {
  16919. "type": "string"
  16920. }
  16921. },
  16922. "required": ["messageID", "callID"],
  16923. "additionalProperties": false
  16924. },
  16925. "QuestionAnswer": {
  16926. "type": "array",
  16927. "items": {
  16928. "type": "string"
  16929. }
  16930. },
  16931. "GlobalEvent": {
  16932. "type": "object",
  16933. "properties": {
  16934. "directory": {
  16935. "type": "string"
  16936. },
  16937. "project": {
  16938. "type": "string"
  16939. },
  16940. "workspace": {
  16941. "type": "string"
  16942. },
  16943. "payload": {
  16944. "anyOf": [
  16945. {
  16946. "type": "object",
  16947. "properties": {
  16948. "id": {
  16949. "type": "string",
  16950. "pattern": "^evt_"
  16951. },
  16952. "type": {
  16953. "type": "string",
  16954. "enum": ["models-dev.refreshed"]
  16955. },
  16956. "properties": {
  16957. "type": "object",
  16958. "properties": {}
  16959. }
  16960. },
  16961. "required": ["id", "type", "properties"],
  16962. "additionalProperties": false
  16963. },
  16964. {
  16965. "type": "object",
  16966. "properties": {
  16967. "id": {
  16968. "type": "string",
  16969. "pattern": "^evt_"
  16970. },
  16971. "type": {
  16972. "type": "string",
  16973. "enum": ["integration.updated"]
  16974. },
  16975. "properties": {
  16976. "type": "object",
  16977. "properties": {}
  16978. }
  16979. },
  16980. "required": ["id", "type", "properties"],
  16981. "additionalProperties": false
  16982. },
  16983. {
  16984. "type": "object",
  16985. "properties": {
  16986. "id": {
  16987. "type": "string",
  16988. "pattern": "^evt_"
  16989. },
  16990. "type": {
  16991. "type": "string",
  16992. "enum": ["integration.connection.updated"]
  16993. },
  16994. "properties": {
  16995. "type": "object",
  16996. "properties": {
  16997. "integrationID": {
  16998. "type": "string"
  16999. }
  17000. },
  17001. "required": ["integrationID"],
  17002. "additionalProperties": false
  17003. }
  17004. },
  17005. "required": ["id", "type", "properties"],
  17006. "additionalProperties": false
  17007. },
  17008. {
  17009. "type": "object",
  17010. "properties": {
  17011. "id": {
  17012. "type": "string",
  17013. "pattern": "^evt_"
  17014. },
  17015. "type": {
  17016. "type": "string",
  17017. "enum": ["catalog.updated"]
  17018. },
  17019. "properties": {
  17020. "type": "object",
  17021. "properties": {}
  17022. }
  17023. },
  17024. "required": ["id", "type", "properties"],
  17025. "additionalProperties": false
  17026. },
  17027. {
  17028. "type": "object",
  17029. "properties": {
  17030. "id": {
  17031. "type": "string",
  17032. "pattern": "^evt_"
  17033. },
  17034. "type": {
  17035. "type": "string",
  17036. "enum": ["session.created"]
  17037. },
  17038. "properties": {
  17039. "type": "object",
  17040. "properties": {
  17041. "sessionID": {
  17042. "type": "string",
  17043. "pattern": "^ses"
  17044. },
  17045. "info": {
  17046. "$ref": "#/components/schemas/Session"
  17047. }
  17048. },
  17049. "required": ["sessionID", "info"],
  17050. "additionalProperties": false
  17051. }
  17052. },
  17053. "required": ["id", "type", "properties"],
  17054. "additionalProperties": false
  17055. },
  17056. {
  17057. "type": "object",
  17058. "properties": {
  17059. "id": {
  17060. "type": "string",
  17061. "pattern": "^evt_"
  17062. },
  17063. "type": {
  17064. "type": "string",
  17065. "enum": ["session.updated"]
  17066. },
  17067. "properties": {
  17068. "type": "object",
  17069. "properties": {
  17070. "sessionID": {
  17071. "type": "string",
  17072. "pattern": "^ses"
  17073. },
  17074. "info": {
  17075. "$ref": "#/components/schemas/Session"
  17076. }
  17077. },
  17078. "required": ["sessionID", "info"],
  17079. "additionalProperties": false
  17080. }
  17081. },
  17082. "required": ["id", "type", "properties"],
  17083. "additionalProperties": false
  17084. },
  17085. {
  17086. "type": "object",
  17087. "properties": {
  17088. "id": {
  17089. "type": "string",
  17090. "pattern": "^evt_"
  17091. },
  17092. "type": {
  17093. "type": "string",
  17094. "enum": ["session.deleted"]
  17095. },
  17096. "properties": {
  17097. "type": "object",
  17098. "properties": {
  17099. "sessionID": {
  17100. "type": "string",
  17101. "pattern": "^ses"
  17102. },
  17103. "info": {
  17104. "$ref": "#/components/schemas/Session"
  17105. }
  17106. },
  17107. "required": ["sessionID", "info"],
  17108. "additionalProperties": false
  17109. }
  17110. },
  17111. "required": ["id", "type", "properties"],
  17112. "additionalProperties": false
  17113. },
  17114. {
  17115. "type": "object",
  17116. "properties": {
  17117. "id": {
  17118. "type": "string",
  17119. "pattern": "^evt_"
  17120. },
  17121. "type": {
  17122. "type": "string",
  17123. "enum": ["message.updated"]
  17124. },
  17125. "properties": {
  17126. "type": "object",
  17127. "properties": {
  17128. "sessionID": {
  17129. "type": "string",
  17130. "pattern": "^ses"
  17131. },
  17132. "info": {
  17133. "$ref": "#/components/schemas/Message"
  17134. }
  17135. },
  17136. "required": ["sessionID", "info"],
  17137. "additionalProperties": false
  17138. }
  17139. },
  17140. "required": ["id", "type", "properties"],
  17141. "additionalProperties": false
  17142. },
  17143. {
  17144. "type": "object",
  17145. "properties": {
  17146. "id": {
  17147. "type": "string",
  17148. "pattern": "^evt_"
  17149. },
  17150. "type": {
  17151. "type": "string",
  17152. "enum": ["message.removed"]
  17153. },
  17154. "properties": {
  17155. "type": "object",
  17156. "properties": {
  17157. "sessionID": {
  17158. "type": "string",
  17159. "pattern": "^ses"
  17160. },
  17161. "messageID": {
  17162. "type": "string",
  17163. "pattern": "^msg"
  17164. }
  17165. },
  17166. "required": ["sessionID", "messageID"],
  17167. "additionalProperties": false
  17168. }
  17169. },
  17170. "required": ["id", "type", "properties"],
  17171. "additionalProperties": false
  17172. },
  17173. {
  17174. "type": "object",
  17175. "properties": {
  17176. "id": {
  17177. "type": "string",
  17178. "pattern": "^evt_"
  17179. },
  17180. "type": {
  17181. "type": "string",
  17182. "enum": ["message.part.updated"]
  17183. },
  17184. "properties": {
  17185. "type": "object",
  17186. "properties": {
  17187. "sessionID": {
  17188. "type": "string",
  17189. "pattern": "^ses"
  17190. },
  17191. "part": {
  17192. "$ref": "#/components/schemas/Part"
  17193. },
  17194. "time": {
  17195. "type": "number"
  17196. }
  17197. },
  17198. "required": ["sessionID", "part", "time"],
  17199. "additionalProperties": false
  17200. }
  17201. },
  17202. "required": ["id", "type", "properties"],
  17203. "additionalProperties": false
  17204. },
  17205. {
  17206. "type": "object",
  17207. "properties": {
  17208. "id": {
  17209. "type": "string",
  17210. "pattern": "^evt_"
  17211. },
  17212. "type": {
  17213. "type": "string",
  17214. "enum": ["message.part.removed"]
  17215. },
  17216. "properties": {
  17217. "type": "object",
  17218. "properties": {
  17219. "sessionID": {
  17220. "type": "string",
  17221. "pattern": "^ses"
  17222. },
  17223. "messageID": {
  17224. "type": "string",
  17225. "pattern": "^msg"
  17226. },
  17227. "partID": {
  17228. "type": "string",
  17229. "pattern": "^prt"
  17230. }
  17231. },
  17232. "required": ["sessionID", "messageID", "partID"],
  17233. "additionalProperties": false
  17234. }
  17235. },
  17236. "required": ["id", "type", "properties"],
  17237. "additionalProperties": false
  17238. },
  17239. {
  17240. "type": "object",
  17241. "properties": {
  17242. "id": {
  17243. "type": "string",
  17244. "pattern": "^evt_"
  17245. },
  17246. "type": {
  17247. "type": "string",
  17248. "enum": ["session.next.agent.switched"]
  17249. },
  17250. "properties": {
  17251. "type": "object",
  17252. "properties": {
  17253. "timestamp": {
  17254. "type": "number"
  17255. },
  17256. "sessionID": {
  17257. "type": "string",
  17258. "pattern": "^ses"
  17259. },
  17260. "messageID": {
  17261. "type": "string",
  17262. "pattern": "^msg_"
  17263. },
  17264. "agent": {
  17265. "type": "string"
  17266. }
  17267. },
  17268. "required": ["timestamp", "sessionID", "messageID", "agent"],
  17269. "additionalProperties": false
  17270. }
  17271. },
  17272. "required": ["id", "type", "properties"],
  17273. "additionalProperties": false
  17274. },
  17275. {
  17276. "type": "object",
  17277. "properties": {
  17278. "id": {
  17279. "type": "string",
  17280. "pattern": "^evt_"
  17281. },
  17282. "type": {
  17283. "type": "string",
  17284. "enum": ["session.next.model.switched"]
  17285. },
  17286. "properties": {
  17287. "type": "object",
  17288. "properties": {
  17289. "timestamp": {
  17290. "type": "number"
  17291. },
  17292. "sessionID": {
  17293. "type": "string",
  17294. "pattern": "^ses"
  17295. },
  17296. "messageID": {
  17297. "type": "string",
  17298. "pattern": "^msg_"
  17299. },
  17300. "model": {
  17301. "$ref": "#/components/schemas/ModelRef"
  17302. }
  17303. },
  17304. "required": ["timestamp", "sessionID", "messageID", "model"],
  17305. "additionalProperties": false
  17306. }
  17307. },
  17308. "required": ["id", "type", "properties"],
  17309. "additionalProperties": false
  17310. },
  17311. {
  17312. "type": "object",
  17313. "properties": {
  17314. "id": {
  17315. "type": "string",
  17316. "pattern": "^evt_"
  17317. },
  17318. "type": {
  17319. "type": "string",
  17320. "enum": ["session.next.moved"]
  17321. },
  17322. "properties": {
  17323. "type": "object",
  17324. "properties": {
  17325. "timestamp": {
  17326. "type": "number"
  17327. },
  17328. "sessionID": {
  17329. "type": "string",
  17330. "pattern": "^ses"
  17331. },
  17332. "location": {
  17333. "$ref": "#/components/schemas/LocationRef"
  17334. },
  17335. "subdirectory": {
  17336. "type": "string"
  17337. }
  17338. },
  17339. "required": ["timestamp", "sessionID", "location"],
  17340. "additionalProperties": false
  17341. }
  17342. },
  17343. "required": ["id", "type", "properties"],
  17344. "additionalProperties": false
  17345. },
  17346. {
  17347. "type": "object",
  17348. "properties": {
  17349. "id": {
  17350. "type": "string",
  17351. "pattern": "^evt_"
  17352. },
  17353. "type": {
  17354. "type": "string",
  17355. "enum": ["session.next.prompted"]
  17356. },
  17357. "properties": {
  17358. "type": "object",
  17359. "properties": {
  17360. "timestamp": {
  17361. "type": "number"
  17362. },
  17363. "sessionID": {
  17364. "type": "string",
  17365. "pattern": "^ses"
  17366. },
  17367. "messageID": {
  17368. "type": "string",
  17369. "pattern": "^msg_"
  17370. },
  17371. "prompt": {
  17372. "$ref": "#/components/schemas/Prompt"
  17373. },
  17374. "delivery": {
  17375. "type": "string",
  17376. "enum": ["steer", "queue"]
  17377. }
  17378. },
  17379. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  17380. "additionalProperties": false
  17381. }
  17382. },
  17383. "required": ["id", "type", "properties"],
  17384. "additionalProperties": false
  17385. },
  17386. {
  17387. "type": "object",
  17388. "properties": {
  17389. "id": {
  17390. "type": "string",
  17391. "pattern": "^evt_"
  17392. },
  17393. "type": {
  17394. "type": "string",
  17395. "enum": ["session.next.prompt.admitted"]
  17396. },
  17397. "properties": {
  17398. "type": "object",
  17399. "properties": {
  17400. "timestamp": {
  17401. "type": "number"
  17402. },
  17403. "sessionID": {
  17404. "type": "string",
  17405. "pattern": "^ses"
  17406. },
  17407. "messageID": {
  17408. "type": "string",
  17409. "pattern": "^msg_"
  17410. },
  17411. "prompt": {
  17412. "$ref": "#/components/schemas/Prompt"
  17413. },
  17414. "delivery": {
  17415. "type": "string",
  17416. "enum": ["steer", "queue"]
  17417. }
  17418. },
  17419. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  17420. "additionalProperties": false
  17421. }
  17422. },
  17423. "required": ["id", "type", "properties"],
  17424. "additionalProperties": false
  17425. },
  17426. {
  17427. "type": "object",
  17428. "properties": {
  17429. "id": {
  17430. "type": "string",
  17431. "pattern": "^evt_"
  17432. },
  17433. "type": {
  17434. "type": "string",
  17435. "enum": ["session.next.context.updated"]
  17436. },
  17437. "properties": {
  17438. "type": "object",
  17439. "properties": {
  17440. "timestamp": {
  17441. "type": "number"
  17442. },
  17443. "sessionID": {
  17444. "type": "string",
  17445. "pattern": "^ses"
  17446. },
  17447. "messageID": {
  17448. "type": "string",
  17449. "pattern": "^msg_"
  17450. },
  17451. "text": {
  17452. "type": "string"
  17453. }
  17454. },
  17455. "required": ["timestamp", "sessionID", "messageID", "text"],
  17456. "additionalProperties": false
  17457. }
  17458. },
  17459. "required": ["id", "type", "properties"],
  17460. "additionalProperties": false
  17461. },
  17462. {
  17463. "type": "object",
  17464. "properties": {
  17465. "id": {
  17466. "type": "string",
  17467. "pattern": "^evt_"
  17468. },
  17469. "type": {
  17470. "type": "string",
  17471. "enum": ["session.next.synthetic"]
  17472. },
  17473. "properties": {
  17474. "type": "object",
  17475. "properties": {
  17476. "timestamp": {
  17477. "type": "number"
  17478. },
  17479. "sessionID": {
  17480. "type": "string",
  17481. "pattern": "^ses"
  17482. },
  17483. "messageID": {
  17484. "type": "string",
  17485. "pattern": "^msg_"
  17486. },
  17487. "text": {
  17488. "type": "string"
  17489. }
  17490. },
  17491. "required": ["timestamp", "sessionID", "messageID", "text"],
  17492. "additionalProperties": false
  17493. }
  17494. },
  17495. "required": ["id", "type", "properties"],
  17496. "additionalProperties": false
  17497. },
  17498. {
  17499. "type": "object",
  17500. "properties": {
  17501. "id": {
  17502. "type": "string",
  17503. "pattern": "^evt_"
  17504. },
  17505. "type": {
  17506. "type": "string",
  17507. "enum": ["session.next.shell.started"]
  17508. },
  17509. "properties": {
  17510. "type": "object",
  17511. "properties": {
  17512. "timestamp": {
  17513. "type": "number"
  17514. },
  17515. "sessionID": {
  17516. "type": "string",
  17517. "pattern": "^ses"
  17518. },
  17519. "messageID": {
  17520. "type": "string",
  17521. "pattern": "^msg_"
  17522. },
  17523. "callID": {
  17524. "type": "string"
  17525. },
  17526. "command": {
  17527. "type": "string"
  17528. }
  17529. },
  17530. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  17531. "additionalProperties": false
  17532. }
  17533. },
  17534. "required": ["id", "type", "properties"],
  17535. "additionalProperties": false
  17536. },
  17537. {
  17538. "type": "object",
  17539. "properties": {
  17540. "id": {
  17541. "type": "string",
  17542. "pattern": "^evt_"
  17543. },
  17544. "type": {
  17545. "type": "string",
  17546. "enum": ["session.next.shell.ended"]
  17547. },
  17548. "properties": {
  17549. "type": "object",
  17550. "properties": {
  17551. "timestamp": {
  17552. "type": "number"
  17553. },
  17554. "sessionID": {
  17555. "type": "string",
  17556. "pattern": "^ses"
  17557. },
  17558. "callID": {
  17559. "type": "string"
  17560. },
  17561. "output": {
  17562. "type": "string"
  17563. }
  17564. },
  17565. "required": ["timestamp", "sessionID", "callID", "output"],
  17566. "additionalProperties": false
  17567. }
  17568. },
  17569. "required": ["id", "type", "properties"],
  17570. "additionalProperties": false
  17571. },
  17572. {
  17573. "type": "object",
  17574. "properties": {
  17575. "id": {
  17576. "type": "string",
  17577. "pattern": "^evt_"
  17578. },
  17579. "type": {
  17580. "type": "string",
  17581. "enum": ["session.next.step.started"]
  17582. },
  17583. "properties": {
  17584. "type": "object",
  17585. "properties": {
  17586. "timestamp": {
  17587. "type": "number"
  17588. },
  17589. "sessionID": {
  17590. "type": "string",
  17591. "pattern": "^ses"
  17592. },
  17593. "assistantMessageID": {
  17594. "type": "string",
  17595. "pattern": "^msg_"
  17596. },
  17597. "agent": {
  17598. "type": "string"
  17599. },
  17600. "model": {
  17601. "$ref": "#/components/schemas/ModelRef"
  17602. },
  17603. "snapshot": {
  17604. "type": "string"
  17605. }
  17606. },
  17607. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  17608. "additionalProperties": false
  17609. }
  17610. },
  17611. "required": ["id", "type", "properties"],
  17612. "additionalProperties": false
  17613. },
  17614. {
  17615. "type": "object",
  17616. "properties": {
  17617. "id": {
  17618. "type": "string",
  17619. "pattern": "^evt_"
  17620. },
  17621. "type": {
  17622. "type": "string",
  17623. "enum": ["session.next.step.ended"]
  17624. },
  17625. "properties": {
  17626. "type": "object",
  17627. "properties": {
  17628. "timestamp": {
  17629. "type": "number"
  17630. },
  17631. "sessionID": {
  17632. "type": "string",
  17633. "pattern": "^ses"
  17634. },
  17635. "assistantMessageID": {
  17636. "type": "string",
  17637. "pattern": "^msg_"
  17638. },
  17639. "finish": {
  17640. "type": "string"
  17641. },
  17642. "cost": {
  17643. "type": "number"
  17644. },
  17645. "tokens": {
  17646. "type": "object",
  17647. "properties": {
  17648. "input": {
  17649. "type": "number"
  17650. },
  17651. "output": {
  17652. "type": "number"
  17653. },
  17654. "reasoning": {
  17655. "type": "number"
  17656. },
  17657. "cache": {
  17658. "type": "object",
  17659. "properties": {
  17660. "read": {
  17661. "type": "number"
  17662. },
  17663. "write": {
  17664. "type": "number"
  17665. }
  17666. },
  17667. "required": ["read", "write"],
  17668. "additionalProperties": false
  17669. }
  17670. },
  17671. "required": ["input", "output", "reasoning", "cache"],
  17672. "additionalProperties": false
  17673. },
  17674. "snapshot": {
  17675. "type": "string"
  17676. },
  17677. "files": {
  17678. "type": "array",
  17679. "items": {
  17680. "type": "string"
  17681. }
  17682. }
  17683. },
  17684. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  17685. "additionalProperties": false
  17686. }
  17687. },
  17688. "required": ["id", "type", "properties"],
  17689. "additionalProperties": false
  17690. },
  17691. {
  17692. "type": "object",
  17693. "properties": {
  17694. "id": {
  17695. "type": "string",
  17696. "pattern": "^evt_"
  17697. },
  17698. "type": {
  17699. "type": "string",
  17700. "enum": ["session.next.step.failed"]
  17701. },
  17702. "properties": {
  17703. "type": "object",
  17704. "properties": {
  17705. "timestamp": {
  17706. "type": "number"
  17707. },
  17708. "sessionID": {
  17709. "type": "string",
  17710. "pattern": "^ses"
  17711. },
  17712. "assistantMessageID": {
  17713. "type": "string",
  17714. "pattern": "^msg_"
  17715. },
  17716. "error": {
  17717. "$ref": "#/components/schemas/SessionErrorUnknown"
  17718. }
  17719. },
  17720. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  17721. "additionalProperties": false
  17722. }
  17723. },
  17724. "required": ["id", "type", "properties"],
  17725. "additionalProperties": false
  17726. },
  17727. {
  17728. "type": "object",
  17729. "properties": {
  17730. "id": {
  17731. "type": "string",
  17732. "pattern": "^evt_"
  17733. },
  17734. "type": {
  17735. "type": "string",
  17736. "enum": ["session.next.text.started"]
  17737. },
  17738. "properties": {
  17739. "type": "object",
  17740. "properties": {
  17741. "timestamp": {
  17742. "type": "number"
  17743. },
  17744. "sessionID": {
  17745. "type": "string",
  17746. "pattern": "^ses"
  17747. },
  17748. "assistantMessageID": {
  17749. "type": "string",
  17750. "pattern": "^msg_"
  17751. },
  17752. "textID": {
  17753. "type": "string"
  17754. }
  17755. },
  17756. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  17757. "additionalProperties": false
  17758. }
  17759. },
  17760. "required": ["id", "type", "properties"],
  17761. "additionalProperties": false
  17762. },
  17763. {
  17764. "type": "object",
  17765. "properties": {
  17766. "id": {
  17767. "type": "string",
  17768. "pattern": "^evt_"
  17769. },
  17770. "type": {
  17771. "type": "string",
  17772. "enum": ["session.next.text.delta"]
  17773. },
  17774. "properties": {
  17775. "type": "object",
  17776. "properties": {
  17777. "timestamp": {
  17778. "type": "number"
  17779. },
  17780. "sessionID": {
  17781. "type": "string",
  17782. "pattern": "^ses"
  17783. },
  17784. "assistantMessageID": {
  17785. "type": "string",
  17786. "pattern": "^msg_"
  17787. },
  17788. "textID": {
  17789. "type": "string"
  17790. },
  17791. "delta": {
  17792. "type": "string"
  17793. }
  17794. },
  17795. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  17796. "additionalProperties": false
  17797. }
  17798. },
  17799. "required": ["id", "type", "properties"],
  17800. "additionalProperties": false
  17801. },
  17802. {
  17803. "type": "object",
  17804. "properties": {
  17805. "id": {
  17806. "type": "string",
  17807. "pattern": "^evt_"
  17808. },
  17809. "type": {
  17810. "type": "string",
  17811. "enum": ["session.next.text.ended"]
  17812. },
  17813. "properties": {
  17814. "type": "object",
  17815. "properties": {
  17816. "timestamp": {
  17817. "type": "number"
  17818. },
  17819. "sessionID": {
  17820. "type": "string",
  17821. "pattern": "^ses"
  17822. },
  17823. "assistantMessageID": {
  17824. "type": "string",
  17825. "pattern": "^msg_"
  17826. },
  17827. "textID": {
  17828. "type": "string"
  17829. },
  17830. "text": {
  17831. "type": "string"
  17832. }
  17833. },
  17834. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  17835. "additionalProperties": false
  17836. }
  17837. },
  17838. "required": ["id", "type", "properties"],
  17839. "additionalProperties": false
  17840. },
  17841. {
  17842. "type": "object",
  17843. "properties": {
  17844. "id": {
  17845. "type": "string",
  17846. "pattern": "^evt_"
  17847. },
  17848. "type": {
  17849. "type": "string",
  17850. "enum": ["session.next.reasoning.started"]
  17851. },
  17852. "properties": {
  17853. "type": "object",
  17854. "properties": {
  17855. "timestamp": {
  17856. "type": "number"
  17857. },
  17858. "sessionID": {
  17859. "type": "string",
  17860. "pattern": "^ses"
  17861. },
  17862. "assistantMessageID": {
  17863. "type": "string",
  17864. "pattern": "^msg_"
  17865. },
  17866. "reasoningID": {
  17867. "type": "string"
  17868. },
  17869. "providerMetadata": {
  17870. "$ref": "#/components/schemas/LLMProviderMetadata"
  17871. }
  17872. },
  17873. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  17874. "additionalProperties": false
  17875. }
  17876. },
  17877. "required": ["id", "type", "properties"],
  17878. "additionalProperties": false
  17879. },
  17880. {
  17881. "type": "object",
  17882. "properties": {
  17883. "id": {
  17884. "type": "string",
  17885. "pattern": "^evt_"
  17886. },
  17887. "type": {
  17888. "type": "string",
  17889. "enum": ["session.next.reasoning.delta"]
  17890. },
  17891. "properties": {
  17892. "type": "object",
  17893. "properties": {
  17894. "timestamp": {
  17895. "type": "number"
  17896. },
  17897. "sessionID": {
  17898. "type": "string",
  17899. "pattern": "^ses"
  17900. },
  17901. "assistantMessageID": {
  17902. "type": "string",
  17903. "pattern": "^msg_"
  17904. },
  17905. "reasoningID": {
  17906. "type": "string"
  17907. },
  17908. "delta": {
  17909. "type": "string"
  17910. }
  17911. },
  17912. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  17913. "additionalProperties": false
  17914. }
  17915. },
  17916. "required": ["id", "type", "properties"],
  17917. "additionalProperties": false
  17918. },
  17919. {
  17920. "type": "object",
  17921. "properties": {
  17922. "id": {
  17923. "type": "string",
  17924. "pattern": "^evt_"
  17925. },
  17926. "type": {
  17927. "type": "string",
  17928. "enum": ["session.next.reasoning.ended"]
  17929. },
  17930. "properties": {
  17931. "type": "object",
  17932. "properties": {
  17933. "timestamp": {
  17934. "type": "number"
  17935. },
  17936. "sessionID": {
  17937. "type": "string",
  17938. "pattern": "^ses"
  17939. },
  17940. "assistantMessageID": {
  17941. "type": "string",
  17942. "pattern": "^msg_"
  17943. },
  17944. "reasoningID": {
  17945. "type": "string"
  17946. },
  17947. "text": {
  17948. "type": "string"
  17949. },
  17950. "providerMetadata": {
  17951. "$ref": "#/components/schemas/LLMProviderMetadata"
  17952. }
  17953. },
  17954. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  17955. "additionalProperties": false
  17956. }
  17957. },
  17958. "required": ["id", "type", "properties"],
  17959. "additionalProperties": false
  17960. },
  17961. {
  17962. "type": "object",
  17963. "properties": {
  17964. "id": {
  17965. "type": "string",
  17966. "pattern": "^evt_"
  17967. },
  17968. "type": {
  17969. "type": "string",
  17970. "enum": ["session.next.tool.input.started"]
  17971. },
  17972. "properties": {
  17973. "type": "object",
  17974. "properties": {
  17975. "timestamp": {
  17976. "type": "number"
  17977. },
  17978. "sessionID": {
  17979. "type": "string",
  17980. "pattern": "^ses"
  17981. },
  17982. "assistantMessageID": {
  17983. "type": "string",
  17984. "pattern": "^msg_"
  17985. },
  17986. "callID": {
  17987. "type": "string"
  17988. },
  17989. "name": {
  17990. "type": "string"
  17991. }
  17992. },
  17993. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  17994. "additionalProperties": false
  17995. }
  17996. },
  17997. "required": ["id", "type", "properties"],
  17998. "additionalProperties": false
  17999. },
  18000. {
  18001. "type": "object",
  18002. "properties": {
  18003. "id": {
  18004. "type": "string",
  18005. "pattern": "^evt_"
  18006. },
  18007. "type": {
  18008. "type": "string",
  18009. "enum": ["session.next.tool.input.delta"]
  18010. },
  18011. "properties": {
  18012. "type": "object",
  18013. "properties": {
  18014. "timestamp": {
  18015. "type": "number"
  18016. },
  18017. "sessionID": {
  18018. "type": "string",
  18019. "pattern": "^ses"
  18020. },
  18021. "assistantMessageID": {
  18022. "type": "string",
  18023. "pattern": "^msg_"
  18024. },
  18025. "callID": {
  18026. "type": "string"
  18027. },
  18028. "delta": {
  18029. "type": "string"
  18030. }
  18031. },
  18032. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  18033. "additionalProperties": false
  18034. }
  18035. },
  18036. "required": ["id", "type", "properties"],
  18037. "additionalProperties": false
  18038. },
  18039. {
  18040. "type": "object",
  18041. "properties": {
  18042. "id": {
  18043. "type": "string",
  18044. "pattern": "^evt_"
  18045. },
  18046. "type": {
  18047. "type": "string",
  18048. "enum": ["session.next.tool.input.ended"]
  18049. },
  18050. "properties": {
  18051. "type": "object",
  18052. "properties": {
  18053. "timestamp": {
  18054. "type": "number"
  18055. },
  18056. "sessionID": {
  18057. "type": "string",
  18058. "pattern": "^ses"
  18059. },
  18060. "assistantMessageID": {
  18061. "type": "string",
  18062. "pattern": "^msg_"
  18063. },
  18064. "callID": {
  18065. "type": "string"
  18066. },
  18067. "text": {
  18068. "type": "string"
  18069. }
  18070. },
  18071. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  18072. "additionalProperties": false
  18073. }
  18074. },
  18075. "required": ["id", "type", "properties"],
  18076. "additionalProperties": false
  18077. },
  18078. {
  18079. "type": "object",
  18080. "properties": {
  18081. "id": {
  18082. "type": "string",
  18083. "pattern": "^evt_"
  18084. },
  18085. "type": {
  18086. "type": "string",
  18087. "enum": ["session.next.tool.called"]
  18088. },
  18089. "properties": {
  18090. "type": "object",
  18091. "properties": {
  18092. "timestamp": {
  18093. "type": "number"
  18094. },
  18095. "sessionID": {
  18096. "type": "string",
  18097. "pattern": "^ses"
  18098. },
  18099. "assistantMessageID": {
  18100. "type": "string",
  18101. "pattern": "^msg_"
  18102. },
  18103. "callID": {
  18104. "type": "string"
  18105. },
  18106. "tool": {
  18107. "type": "string"
  18108. },
  18109. "input": {
  18110. "type": "object"
  18111. },
  18112. "provider": {
  18113. "type": "object",
  18114. "properties": {
  18115. "executed": {
  18116. "type": "boolean"
  18117. },
  18118. "metadata": {
  18119. "$ref": "#/components/schemas/LLMProviderMetadata"
  18120. }
  18121. },
  18122. "required": ["executed"],
  18123. "additionalProperties": false
  18124. }
  18125. },
  18126. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  18127. "additionalProperties": false
  18128. }
  18129. },
  18130. "required": ["id", "type", "properties"],
  18131. "additionalProperties": false
  18132. },
  18133. {
  18134. "type": "object",
  18135. "properties": {
  18136. "id": {
  18137. "type": "string",
  18138. "pattern": "^evt_"
  18139. },
  18140. "type": {
  18141. "type": "string",
  18142. "enum": ["session.next.tool.progress"]
  18143. },
  18144. "properties": {
  18145. "type": "object",
  18146. "properties": {
  18147. "timestamp": {
  18148. "type": "number"
  18149. },
  18150. "sessionID": {
  18151. "type": "string",
  18152. "pattern": "^ses"
  18153. },
  18154. "assistantMessageID": {
  18155. "type": "string",
  18156. "pattern": "^msg_"
  18157. },
  18158. "callID": {
  18159. "type": "string"
  18160. },
  18161. "structured": {
  18162. "type": "object"
  18163. },
  18164. "content": {
  18165. "type": "array",
  18166. "items": {
  18167. "$ref": "#/components/schemas/LLMToolContent"
  18168. }
  18169. }
  18170. },
  18171. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  18172. "additionalProperties": false
  18173. }
  18174. },
  18175. "required": ["id", "type", "properties"],
  18176. "additionalProperties": false
  18177. },
  18178. {
  18179. "type": "object",
  18180. "properties": {
  18181. "id": {
  18182. "type": "string",
  18183. "pattern": "^evt_"
  18184. },
  18185. "type": {
  18186. "type": "string",
  18187. "enum": ["session.next.tool.success"]
  18188. },
  18189. "properties": {
  18190. "type": "object",
  18191. "properties": {
  18192. "timestamp": {
  18193. "type": "number"
  18194. },
  18195. "sessionID": {
  18196. "type": "string",
  18197. "pattern": "^ses"
  18198. },
  18199. "assistantMessageID": {
  18200. "type": "string",
  18201. "pattern": "^msg_"
  18202. },
  18203. "callID": {
  18204. "type": "string"
  18205. },
  18206. "structured": {
  18207. "type": "object"
  18208. },
  18209. "content": {
  18210. "type": "array",
  18211. "items": {
  18212. "$ref": "#/components/schemas/LLMToolContent"
  18213. }
  18214. },
  18215. "outputPaths": {
  18216. "type": "array",
  18217. "items": {
  18218. "type": "string"
  18219. }
  18220. },
  18221. "result": {},
  18222. "provider": {
  18223. "type": "object",
  18224. "properties": {
  18225. "executed": {
  18226. "type": "boolean"
  18227. },
  18228. "metadata": {
  18229. "$ref": "#/components/schemas/LLMProviderMetadata"
  18230. }
  18231. },
  18232. "required": ["executed"],
  18233. "additionalProperties": false
  18234. }
  18235. },
  18236. "required": [
  18237. "timestamp",
  18238. "sessionID",
  18239. "assistantMessageID",
  18240. "callID",
  18241. "structured",
  18242. "content",
  18243. "provider"
  18244. ],
  18245. "additionalProperties": false
  18246. }
  18247. },
  18248. "required": ["id", "type", "properties"],
  18249. "additionalProperties": false
  18250. },
  18251. {
  18252. "type": "object",
  18253. "properties": {
  18254. "id": {
  18255. "type": "string",
  18256. "pattern": "^evt_"
  18257. },
  18258. "type": {
  18259. "type": "string",
  18260. "enum": ["session.next.tool.failed"]
  18261. },
  18262. "properties": {
  18263. "type": "object",
  18264. "properties": {
  18265. "timestamp": {
  18266. "type": "number"
  18267. },
  18268. "sessionID": {
  18269. "type": "string",
  18270. "pattern": "^ses"
  18271. },
  18272. "assistantMessageID": {
  18273. "type": "string",
  18274. "pattern": "^msg_"
  18275. },
  18276. "callID": {
  18277. "type": "string"
  18278. },
  18279. "error": {
  18280. "$ref": "#/components/schemas/SessionErrorUnknown"
  18281. },
  18282. "result": {},
  18283. "provider": {
  18284. "type": "object",
  18285. "properties": {
  18286. "executed": {
  18287. "type": "boolean"
  18288. },
  18289. "metadata": {
  18290. "$ref": "#/components/schemas/LLMProviderMetadata"
  18291. }
  18292. },
  18293. "required": ["executed"],
  18294. "additionalProperties": false
  18295. }
  18296. },
  18297. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  18298. "additionalProperties": false
  18299. }
  18300. },
  18301. "required": ["id", "type", "properties"],
  18302. "additionalProperties": false
  18303. },
  18304. {
  18305. "type": "object",
  18306. "properties": {
  18307. "id": {
  18308. "type": "string",
  18309. "pattern": "^evt_"
  18310. },
  18311. "type": {
  18312. "type": "string",
  18313. "enum": ["session.next.retried"]
  18314. },
  18315. "properties": {
  18316. "type": "object",
  18317. "properties": {
  18318. "timestamp": {
  18319. "type": "number"
  18320. },
  18321. "sessionID": {
  18322. "type": "string",
  18323. "pattern": "^ses"
  18324. },
  18325. "attempt": {
  18326. "type": "number"
  18327. },
  18328. "error": {
  18329. "$ref": "#/components/schemas/SessionNextRetry_error"
  18330. }
  18331. },
  18332. "required": ["timestamp", "sessionID", "attempt", "error"],
  18333. "additionalProperties": false
  18334. }
  18335. },
  18336. "required": ["id", "type", "properties"],
  18337. "additionalProperties": false
  18338. },
  18339. {
  18340. "type": "object",
  18341. "properties": {
  18342. "id": {
  18343. "type": "string",
  18344. "pattern": "^evt_"
  18345. },
  18346. "type": {
  18347. "type": "string",
  18348. "enum": ["session.next.compaction.started"]
  18349. },
  18350. "properties": {
  18351. "type": "object",
  18352. "properties": {
  18353. "timestamp": {
  18354. "type": "number"
  18355. },
  18356. "sessionID": {
  18357. "type": "string",
  18358. "pattern": "^ses"
  18359. },
  18360. "messageID": {
  18361. "type": "string",
  18362. "pattern": "^msg_"
  18363. },
  18364. "reason": {
  18365. "type": "string",
  18366. "enum": ["auto", "manual"]
  18367. }
  18368. },
  18369. "required": ["timestamp", "sessionID", "messageID", "reason"],
  18370. "additionalProperties": false
  18371. }
  18372. },
  18373. "required": ["id", "type", "properties"],
  18374. "additionalProperties": false
  18375. },
  18376. {
  18377. "type": "object",
  18378. "properties": {
  18379. "id": {
  18380. "type": "string",
  18381. "pattern": "^evt_"
  18382. },
  18383. "type": {
  18384. "type": "string",
  18385. "enum": ["session.next.compaction.delta"]
  18386. },
  18387. "properties": {
  18388. "type": "object",
  18389. "properties": {
  18390. "timestamp": {
  18391. "type": "number"
  18392. },
  18393. "sessionID": {
  18394. "type": "string",
  18395. "pattern": "^ses"
  18396. },
  18397. "messageID": {
  18398. "type": "string",
  18399. "pattern": "^msg_"
  18400. },
  18401. "text": {
  18402. "type": "string"
  18403. }
  18404. },
  18405. "required": ["timestamp", "sessionID", "messageID", "text"],
  18406. "additionalProperties": false
  18407. }
  18408. },
  18409. "required": ["id", "type", "properties"],
  18410. "additionalProperties": false
  18411. },
  18412. {
  18413. "type": "object",
  18414. "properties": {
  18415. "id": {
  18416. "type": "string",
  18417. "pattern": "^evt_"
  18418. },
  18419. "type": {
  18420. "type": "string",
  18421. "enum": ["session.next.compaction.ended"]
  18422. },
  18423. "properties": {
  18424. "type": "object",
  18425. "properties": {
  18426. "timestamp": {
  18427. "type": "number"
  18428. },
  18429. "sessionID": {
  18430. "type": "string",
  18431. "pattern": "^ses"
  18432. },
  18433. "messageID": {
  18434. "type": "string",
  18435. "pattern": "^msg_"
  18436. },
  18437. "reason": {
  18438. "type": "string",
  18439. "enum": ["auto", "manual"]
  18440. },
  18441. "text": {
  18442. "type": "string"
  18443. },
  18444. "recent": {
  18445. "type": "string"
  18446. }
  18447. },
  18448. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  18449. "additionalProperties": false
  18450. }
  18451. },
  18452. "required": ["id", "type", "properties"],
  18453. "additionalProperties": false
  18454. },
  18455. {
  18456. "type": "object",
  18457. "properties": {
  18458. "id": {
  18459. "type": "string",
  18460. "pattern": "^evt_"
  18461. },
  18462. "type": {
  18463. "type": "string",
  18464. "enum": ["session.next.revert.staged"]
  18465. },
  18466. "properties": {
  18467. "type": "object",
  18468. "properties": {
  18469. "timestamp": {
  18470. "type": "number"
  18471. },
  18472. "sessionID": {
  18473. "type": "string",
  18474. "pattern": "^ses"
  18475. },
  18476. "revert": {
  18477. "$ref": "#/components/schemas/RevertState"
  18478. }
  18479. },
  18480. "required": ["timestamp", "sessionID", "revert"],
  18481. "additionalProperties": false
  18482. }
  18483. },
  18484. "required": ["id", "type", "properties"],
  18485. "additionalProperties": false
  18486. },
  18487. {
  18488. "type": "object",
  18489. "properties": {
  18490. "id": {
  18491. "type": "string",
  18492. "pattern": "^evt_"
  18493. },
  18494. "type": {
  18495. "type": "string",
  18496. "enum": ["session.next.revert.cleared"]
  18497. },
  18498. "properties": {
  18499. "type": "object",
  18500. "properties": {
  18501. "timestamp": {
  18502. "type": "number"
  18503. },
  18504. "sessionID": {
  18505. "type": "string",
  18506. "pattern": "^ses"
  18507. }
  18508. },
  18509. "required": ["timestamp", "sessionID"],
  18510. "additionalProperties": false
  18511. }
  18512. },
  18513. "required": ["id", "type", "properties"],
  18514. "additionalProperties": false
  18515. },
  18516. {
  18517. "type": "object",
  18518. "properties": {
  18519. "id": {
  18520. "type": "string",
  18521. "pattern": "^evt_"
  18522. },
  18523. "type": {
  18524. "type": "string",
  18525. "enum": ["session.next.revert.committed"]
  18526. },
  18527. "properties": {
  18528. "type": "object",
  18529. "properties": {
  18530. "timestamp": {
  18531. "type": "number"
  18532. },
  18533. "sessionID": {
  18534. "type": "string",
  18535. "pattern": "^ses"
  18536. },
  18537. "messageID": {
  18538. "type": "string",
  18539. "pattern": "^msg_"
  18540. }
  18541. },
  18542. "required": ["timestamp", "sessionID", "messageID"],
  18543. "additionalProperties": false
  18544. }
  18545. },
  18546. "required": ["id", "type", "properties"],
  18547. "additionalProperties": false
  18548. },
  18549. {
  18550. "type": "object",
  18551. "properties": {
  18552. "id": {
  18553. "type": "string",
  18554. "pattern": "^evt_"
  18555. },
  18556. "type": {
  18557. "type": "string",
  18558. "enum": ["message.part.delta"]
  18559. },
  18560. "properties": {
  18561. "type": "object",
  18562. "properties": {
  18563. "sessionID": {
  18564. "type": "string",
  18565. "pattern": "^ses"
  18566. },
  18567. "messageID": {
  18568. "type": "string",
  18569. "pattern": "^msg"
  18570. },
  18571. "partID": {
  18572. "type": "string",
  18573. "pattern": "^prt"
  18574. },
  18575. "field": {
  18576. "type": "string"
  18577. },
  18578. "delta": {
  18579. "type": "string"
  18580. }
  18581. },
  18582. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  18583. "additionalProperties": false
  18584. }
  18585. },
  18586. "required": ["id", "type", "properties"],
  18587. "additionalProperties": false
  18588. },
  18589. {
  18590. "type": "object",
  18591. "properties": {
  18592. "id": {
  18593. "type": "string",
  18594. "pattern": "^evt_"
  18595. },
  18596. "type": {
  18597. "type": "string",
  18598. "enum": ["session.diff"]
  18599. },
  18600. "properties": {
  18601. "type": "object",
  18602. "properties": {
  18603. "sessionID": {
  18604. "type": "string",
  18605. "pattern": "^ses"
  18606. },
  18607. "diff": {
  18608. "type": "array",
  18609. "items": {
  18610. "$ref": "#/components/schemas/SnapshotFileDiff"
  18611. }
  18612. }
  18613. },
  18614. "required": ["sessionID", "diff"],
  18615. "additionalProperties": false
  18616. }
  18617. },
  18618. "required": ["id", "type", "properties"],
  18619. "additionalProperties": false
  18620. },
  18621. {
  18622. "type": "object",
  18623. "properties": {
  18624. "id": {
  18625. "type": "string",
  18626. "pattern": "^evt_"
  18627. },
  18628. "type": {
  18629. "type": "string",
  18630. "enum": ["session.error"]
  18631. },
  18632. "properties": {
  18633. "type": "object",
  18634. "properties": {
  18635. "sessionID": {
  18636. "type": "string",
  18637. "pattern": "^ses"
  18638. },
  18639. "error": {
  18640. "anyOf": [
  18641. {
  18642. "$ref": "#/components/schemas/ProviderAuthError"
  18643. },
  18644. {
  18645. "$ref": "#/components/schemas/UnknownError"
  18646. },
  18647. {
  18648. "$ref": "#/components/schemas/MessageOutputLengthError"
  18649. },
  18650. {
  18651. "$ref": "#/components/schemas/MessageAbortedError"
  18652. },
  18653. {
  18654. "$ref": "#/components/schemas/StructuredOutputError"
  18655. },
  18656. {
  18657. "$ref": "#/components/schemas/ContextOverflowError"
  18658. },
  18659. {
  18660. "$ref": "#/components/schemas/ContentFilterError"
  18661. },
  18662. {
  18663. "$ref": "#/components/schemas/APIError"
  18664. }
  18665. ]
  18666. }
  18667. },
  18668. "additionalProperties": false
  18669. }
  18670. },
  18671. "required": ["id", "type", "properties"],
  18672. "additionalProperties": false
  18673. },
  18674. {
  18675. "type": "object",
  18676. "properties": {
  18677. "id": {
  18678. "type": "string",
  18679. "pattern": "^evt_"
  18680. },
  18681. "type": {
  18682. "type": "string",
  18683. "enum": ["installation.updated"]
  18684. },
  18685. "properties": {
  18686. "type": "object",
  18687. "properties": {
  18688. "version": {
  18689. "type": "string"
  18690. }
  18691. },
  18692. "required": ["version"],
  18693. "additionalProperties": false
  18694. }
  18695. },
  18696. "required": ["id", "type", "properties"],
  18697. "additionalProperties": false
  18698. },
  18699. {
  18700. "type": "object",
  18701. "properties": {
  18702. "id": {
  18703. "type": "string",
  18704. "pattern": "^evt_"
  18705. },
  18706. "type": {
  18707. "type": "string",
  18708. "enum": ["installation.update-available"]
  18709. },
  18710. "properties": {
  18711. "type": "object",
  18712. "properties": {
  18713. "version": {
  18714. "type": "string"
  18715. }
  18716. },
  18717. "required": ["version"],
  18718. "additionalProperties": false
  18719. }
  18720. },
  18721. "required": ["id", "type", "properties"],
  18722. "additionalProperties": false
  18723. },
  18724. {
  18725. "type": "object",
  18726. "properties": {
  18727. "id": {
  18728. "type": "string",
  18729. "pattern": "^evt_"
  18730. },
  18731. "type": {
  18732. "type": "string",
  18733. "enum": ["file.edited"]
  18734. },
  18735. "properties": {
  18736. "type": "object",
  18737. "properties": {
  18738. "file": {
  18739. "type": "string"
  18740. }
  18741. },
  18742. "required": ["file"],
  18743. "additionalProperties": false
  18744. }
  18745. },
  18746. "required": ["id", "type", "properties"],
  18747. "additionalProperties": false
  18748. },
  18749. {
  18750. "type": "object",
  18751. "properties": {
  18752. "id": {
  18753. "type": "string",
  18754. "pattern": "^evt_"
  18755. },
  18756. "type": {
  18757. "type": "string",
  18758. "enum": ["reference.updated"]
  18759. },
  18760. "properties": {
  18761. "type": "object",
  18762. "properties": {}
  18763. }
  18764. },
  18765. "required": ["id", "type", "properties"],
  18766. "additionalProperties": false
  18767. },
  18768. {
  18769. "type": "object",
  18770. "properties": {
  18771. "id": {
  18772. "type": "string",
  18773. "pattern": "^evt_"
  18774. },
  18775. "type": {
  18776. "type": "string",
  18777. "enum": ["permission.v2.asked"]
  18778. },
  18779. "properties": {
  18780. "type": "object",
  18781. "properties": {
  18782. "id": {
  18783. "type": "string",
  18784. "pattern": "^per"
  18785. },
  18786. "sessionID": {
  18787. "type": "string",
  18788. "pattern": "^ses"
  18789. },
  18790. "action": {
  18791. "type": "string"
  18792. },
  18793. "resources": {
  18794. "type": "array",
  18795. "items": {
  18796. "type": "string"
  18797. }
  18798. },
  18799. "save": {
  18800. "type": "array",
  18801. "items": {
  18802. "type": "string"
  18803. }
  18804. },
  18805. "metadata": {
  18806. "type": "object"
  18807. },
  18808. "source": {
  18809. "$ref": "#/components/schemas/PermissionV2Source"
  18810. }
  18811. },
  18812. "required": ["id", "sessionID", "action", "resources"],
  18813. "additionalProperties": false
  18814. }
  18815. },
  18816. "required": ["id", "type", "properties"],
  18817. "additionalProperties": false
  18818. },
  18819. {
  18820. "type": "object",
  18821. "properties": {
  18822. "id": {
  18823. "type": "string",
  18824. "pattern": "^evt_"
  18825. },
  18826. "type": {
  18827. "type": "string",
  18828. "enum": ["permission.v2.replied"]
  18829. },
  18830. "properties": {
  18831. "type": "object",
  18832. "properties": {
  18833. "sessionID": {
  18834. "type": "string",
  18835. "pattern": "^ses"
  18836. },
  18837. "requestID": {
  18838. "type": "string",
  18839. "pattern": "^per"
  18840. },
  18841. "reply": {
  18842. "$ref": "#/components/schemas/PermissionV2Reply"
  18843. }
  18844. },
  18845. "required": ["sessionID", "requestID", "reply"],
  18846. "additionalProperties": false
  18847. }
  18848. },
  18849. "required": ["id", "type", "properties"],
  18850. "additionalProperties": false
  18851. },
  18852. {
  18853. "type": "object",
  18854. "properties": {
  18855. "id": {
  18856. "type": "string",
  18857. "pattern": "^evt_"
  18858. },
  18859. "type": {
  18860. "type": "string",
  18861. "enum": ["plugin.added"]
  18862. },
  18863. "properties": {
  18864. "type": "object",
  18865. "properties": {
  18866. "id": {
  18867. "type": "string"
  18868. }
  18869. },
  18870. "required": ["id"],
  18871. "additionalProperties": false
  18872. }
  18873. },
  18874. "required": ["id", "type", "properties"],
  18875. "additionalProperties": false
  18876. },
  18877. {
  18878. "type": "object",
  18879. "properties": {
  18880. "id": {
  18881. "type": "string",
  18882. "pattern": "^evt_"
  18883. },
  18884. "type": {
  18885. "type": "string",
  18886. "enum": ["project.directories.updated"]
  18887. },
  18888. "properties": {
  18889. "type": "object",
  18890. "properties": {
  18891. "projectID": {
  18892. "type": "string"
  18893. }
  18894. },
  18895. "required": ["projectID"],
  18896. "additionalProperties": false
  18897. }
  18898. },
  18899. "required": ["id", "type", "properties"],
  18900. "additionalProperties": false
  18901. },
  18902. {
  18903. "type": "object",
  18904. "properties": {
  18905. "id": {
  18906. "type": "string",
  18907. "pattern": "^evt_"
  18908. },
  18909. "type": {
  18910. "type": "string",
  18911. "enum": ["file.watcher.updated"]
  18912. },
  18913. "properties": {
  18914. "type": "object",
  18915. "properties": {
  18916. "file": {
  18917. "type": "string"
  18918. },
  18919. "event": {
  18920. "type": "string",
  18921. "enum": ["add", "change", "unlink"]
  18922. }
  18923. },
  18924. "required": ["file", "event"],
  18925. "additionalProperties": false
  18926. }
  18927. },
  18928. "required": ["id", "type", "properties"],
  18929. "additionalProperties": false
  18930. },
  18931. {
  18932. "type": "object",
  18933. "properties": {
  18934. "id": {
  18935. "type": "string",
  18936. "pattern": "^evt_"
  18937. },
  18938. "type": {
  18939. "type": "string",
  18940. "enum": ["pty.created"]
  18941. },
  18942. "properties": {
  18943. "type": "object",
  18944. "properties": {
  18945. "info": {
  18946. "$ref": "#/components/schemas/Pty"
  18947. }
  18948. },
  18949. "required": ["info"],
  18950. "additionalProperties": false
  18951. }
  18952. },
  18953. "required": ["id", "type", "properties"],
  18954. "additionalProperties": false
  18955. },
  18956. {
  18957. "type": "object",
  18958. "properties": {
  18959. "id": {
  18960. "type": "string",
  18961. "pattern": "^evt_"
  18962. },
  18963. "type": {
  18964. "type": "string",
  18965. "enum": ["pty.updated"]
  18966. },
  18967. "properties": {
  18968. "type": "object",
  18969. "properties": {
  18970. "info": {
  18971. "$ref": "#/components/schemas/Pty"
  18972. }
  18973. },
  18974. "required": ["info"],
  18975. "additionalProperties": false
  18976. }
  18977. },
  18978. "required": ["id", "type", "properties"],
  18979. "additionalProperties": false
  18980. },
  18981. {
  18982. "type": "object",
  18983. "properties": {
  18984. "id": {
  18985. "type": "string",
  18986. "pattern": "^evt_"
  18987. },
  18988. "type": {
  18989. "type": "string",
  18990. "enum": ["pty.exited"]
  18991. },
  18992. "properties": {
  18993. "type": "object",
  18994. "properties": {
  18995. "id": {
  18996. "type": "string",
  18997. "pattern": "^pty"
  18998. },
  18999. "exitCode": {
  19000. "type": "integer",
  19001. "minimum": 0
  19002. }
  19003. },
  19004. "required": ["id", "exitCode"],
  19005. "additionalProperties": false
  19006. }
  19007. },
  19008. "required": ["id", "type", "properties"],
  19009. "additionalProperties": false
  19010. },
  19011. {
  19012. "type": "object",
  19013. "properties": {
  19014. "id": {
  19015. "type": "string",
  19016. "pattern": "^evt_"
  19017. },
  19018. "type": {
  19019. "type": "string",
  19020. "enum": ["pty.deleted"]
  19021. },
  19022. "properties": {
  19023. "type": "object",
  19024. "properties": {
  19025. "id": {
  19026. "type": "string",
  19027. "pattern": "^pty"
  19028. }
  19029. },
  19030. "required": ["id"],
  19031. "additionalProperties": false
  19032. }
  19033. },
  19034. "required": ["id", "type", "properties"],
  19035. "additionalProperties": false
  19036. },
  19037. {
  19038. "type": "object",
  19039. "properties": {
  19040. "id": {
  19041. "type": "string",
  19042. "pattern": "^evt_"
  19043. },
  19044. "type": {
  19045. "type": "string",
  19046. "enum": ["question.v2.asked"]
  19047. },
  19048. "properties": {
  19049. "type": "object",
  19050. "properties": {
  19051. "id": {
  19052. "type": "string",
  19053. "pattern": "^que"
  19054. },
  19055. "sessionID": {
  19056. "type": "string",
  19057. "pattern": "^ses"
  19058. },
  19059. "questions": {
  19060. "type": "array",
  19061. "items": {
  19062. "$ref": "#/components/schemas/QuestionV2Info"
  19063. },
  19064. "description": "Questions to ask"
  19065. },
  19066. "tool": {
  19067. "$ref": "#/components/schemas/QuestionV2Tool"
  19068. }
  19069. },
  19070. "required": ["id", "sessionID", "questions"],
  19071. "additionalProperties": false
  19072. }
  19073. },
  19074. "required": ["id", "type", "properties"],
  19075. "additionalProperties": false
  19076. },
  19077. {
  19078. "type": "object",
  19079. "properties": {
  19080. "id": {
  19081. "type": "string",
  19082. "pattern": "^evt_"
  19083. },
  19084. "type": {
  19085. "type": "string",
  19086. "enum": ["question.v2.replied"]
  19087. },
  19088. "properties": {
  19089. "type": "object",
  19090. "properties": {
  19091. "sessionID": {
  19092. "type": "string",
  19093. "pattern": "^ses"
  19094. },
  19095. "requestID": {
  19096. "type": "string",
  19097. "pattern": "^que"
  19098. },
  19099. "answers": {
  19100. "type": "array",
  19101. "items": {
  19102. "$ref": "#/components/schemas/QuestionV2Answer"
  19103. }
  19104. }
  19105. },
  19106. "required": ["sessionID", "requestID", "answers"],
  19107. "additionalProperties": false
  19108. }
  19109. },
  19110. "required": ["id", "type", "properties"],
  19111. "additionalProperties": false
  19112. },
  19113. {
  19114. "type": "object",
  19115. "properties": {
  19116. "id": {
  19117. "type": "string",
  19118. "pattern": "^evt_"
  19119. },
  19120. "type": {
  19121. "type": "string",
  19122. "enum": ["question.v2.rejected"]
  19123. },
  19124. "properties": {
  19125. "type": "object",
  19126. "properties": {
  19127. "sessionID": {
  19128. "type": "string",
  19129. "pattern": "^ses"
  19130. },
  19131. "requestID": {
  19132. "type": "string",
  19133. "pattern": "^que"
  19134. }
  19135. },
  19136. "required": ["sessionID", "requestID"],
  19137. "additionalProperties": false
  19138. }
  19139. },
  19140. "required": ["id", "type", "properties"],
  19141. "additionalProperties": false
  19142. },
  19143. {
  19144. "type": "object",
  19145. "properties": {
  19146. "id": {
  19147. "type": "string",
  19148. "pattern": "^evt_"
  19149. },
  19150. "type": {
  19151. "type": "string",
  19152. "enum": ["todo.updated"]
  19153. },
  19154. "properties": {
  19155. "type": "object",
  19156. "properties": {
  19157. "sessionID": {
  19158. "type": "string",
  19159. "pattern": "^ses"
  19160. },
  19161. "todos": {
  19162. "type": "array",
  19163. "items": {
  19164. "$ref": "#/components/schemas/Todo"
  19165. }
  19166. }
  19167. },
  19168. "required": ["sessionID", "todos"],
  19169. "additionalProperties": false
  19170. }
  19171. },
  19172. "required": ["id", "type", "properties"],
  19173. "additionalProperties": false
  19174. },
  19175. {
  19176. "type": "object",
  19177. "properties": {
  19178. "id": {
  19179. "type": "string",
  19180. "pattern": "^evt_"
  19181. },
  19182. "type": {
  19183. "type": "string",
  19184. "enum": ["lsp.updated"]
  19185. },
  19186. "properties": {
  19187. "type": "object",
  19188. "properties": {}
  19189. }
  19190. },
  19191. "required": ["id", "type", "properties"],
  19192. "additionalProperties": false
  19193. },
  19194. {
  19195. "type": "object",
  19196. "properties": {
  19197. "id": {
  19198. "type": "string",
  19199. "pattern": "^evt_"
  19200. },
  19201. "type": {
  19202. "type": "string",
  19203. "enum": ["permission.asked"]
  19204. },
  19205. "properties": {
  19206. "type": "object",
  19207. "properties": {
  19208. "id": {
  19209. "type": "string",
  19210. "pattern": "^per"
  19211. },
  19212. "sessionID": {
  19213. "type": "string",
  19214. "pattern": "^ses"
  19215. },
  19216. "permission": {
  19217. "type": "string"
  19218. },
  19219. "patterns": {
  19220. "type": "array",
  19221. "items": {
  19222. "type": "string"
  19223. }
  19224. },
  19225. "metadata": {
  19226. "type": "object"
  19227. },
  19228. "always": {
  19229. "type": "array",
  19230. "items": {
  19231. "type": "string"
  19232. }
  19233. },
  19234. "tool": {
  19235. "type": "object",
  19236. "properties": {
  19237. "messageID": {
  19238. "type": "string"
  19239. },
  19240. "callID": {
  19241. "type": "string"
  19242. }
  19243. },
  19244. "required": ["messageID", "callID"],
  19245. "additionalProperties": false
  19246. }
  19247. },
  19248. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  19249. "additionalProperties": false
  19250. }
  19251. },
  19252. "required": ["id", "type", "properties"],
  19253. "additionalProperties": false
  19254. },
  19255. {
  19256. "type": "object",
  19257. "properties": {
  19258. "id": {
  19259. "type": "string",
  19260. "pattern": "^evt_"
  19261. },
  19262. "type": {
  19263. "type": "string",
  19264. "enum": ["permission.replied"]
  19265. },
  19266. "properties": {
  19267. "type": "object",
  19268. "properties": {
  19269. "sessionID": {
  19270. "type": "string",
  19271. "pattern": "^ses"
  19272. },
  19273. "requestID": {
  19274. "type": "string",
  19275. "pattern": "^per"
  19276. },
  19277. "reply": {
  19278. "type": "string",
  19279. "enum": ["once", "always", "reject"]
  19280. }
  19281. },
  19282. "required": ["sessionID", "requestID", "reply"],
  19283. "additionalProperties": false
  19284. }
  19285. },
  19286. "required": ["id", "type", "properties"],
  19287. "additionalProperties": false
  19288. },
  19289. {
  19290. "type": "object",
  19291. "properties": {
  19292. "id": {
  19293. "type": "string",
  19294. "pattern": "^evt_"
  19295. },
  19296. "type": {
  19297. "type": "string",
  19298. "enum": ["tui.prompt.append"]
  19299. },
  19300. "properties": {
  19301. "type": "object",
  19302. "properties": {
  19303. "text": {
  19304. "type": "string"
  19305. }
  19306. },
  19307. "required": ["text"],
  19308. "additionalProperties": false
  19309. }
  19310. },
  19311. "required": ["id", "type", "properties"],
  19312. "additionalProperties": false
  19313. },
  19314. {
  19315. "type": "object",
  19316. "properties": {
  19317. "id": {
  19318. "type": "string",
  19319. "pattern": "^evt_"
  19320. },
  19321. "type": {
  19322. "type": "string",
  19323. "enum": ["tui.command.execute"]
  19324. },
  19325. "properties": {
  19326. "type": "object",
  19327. "properties": {
  19328. "command": {
  19329. "anyOf": [
  19330. {
  19331. "type": "string",
  19332. "enum": [
  19333. "session.list",
  19334. "session.new",
  19335. "session.share",
  19336. "session.interrupt",
  19337. "session.compact",
  19338. "session.page.up",
  19339. "session.page.down",
  19340. "session.line.up",
  19341. "session.line.down",
  19342. "session.half.page.up",
  19343. "session.half.page.down",
  19344. "session.first",
  19345. "session.last",
  19346. "prompt.clear",
  19347. "prompt.submit",
  19348. "agent.cycle"
  19349. ]
  19350. },
  19351. {
  19352. "type": "string"
  19353. }
  19354. ]
  19355. }
  19356. },
  19357. "required": ["command"],
  19358. "additionalProperties": false
  19359. }
  19360. },
  19361. "required": ["id", "type", "properties"],
  19362. "additionalProperties": false
  19363. },
  19364. {
  19365. "type": "object",
  19366. "properties": {
  19367. "id": {
  19368. "type": "string",
  19369. "pattern": "^evt_"
  19370. },
  19371. "type": {
  19372. "type": "string",
  19373. "enum": ["tui.toast.show"]
  19374. },
  19375. "properties": {
  19376. "type": "object",
  19377. "properties": {
  19378. "title": {
  19379. "type": "string"
  19380. },
  19381. "message": {
  19382. "type": "string"
  19383. },
  19384. "variant": {
  19385. "type": "string",
  19386. "enum": ["info", "success", "warning", "error"]
  19387. },
  19388. "duration": {
  19389. "type": "integer",
  19390. "exclusiveMinimum": 0
  19391. }
  19392. },
  19393. "required": ["message", "variant"],
  19394. "additionalProperties": false
  19395. }
  19396. },
  19397. "required": ["id", "type", "properties"],
  19398. "additionalProperties": false
  19399. },
  19400. {
  19401. "type": "object",
  19402. "properties": {
  19403. "id": {
  19404. "type": "string",
  19405. "pattern": "^evt_"
  19406. },
  19407. "type": {
  19408. "type": "string",
  19409. "enum": ["tui.session.select"]
  19410. },
  19411. "properties": {
  19412. "type": "object",
  19413. "properties": {
  19414. "sessionID": {
  19415. "type": "string",
  19416. "pattern": "^ses",
  19417. "description": "Session ID to navigate to"
  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": ["mcp.tools.changed"]
  19437. },
  19438. "properties": {
  19439. "type": "object",
  19440. "properties": {
  19441. "server": {
  19442. "type": "string"
  19443. }
  19444. },
  19445. "required": ["server"],
  19446. "additionalProperties": false
  19447. }
  19448. },
  19449. "required": ["id", "type", "properties"],
  19450. "additionalProperties": false
  19451. },
  19452. {
  19453. "type": "object",
  19454. "properties": {
  19455. "id": {
  19456. "type": "string",
  19457. "pattern": "^evt_"
  19458. },
  19459. "type": {
  19460. "type": "string",
  19461. "enum": ["mcp.browser.open.failed"]
  19462. },
  19463. "properties": {
  19464. "type": "object",
  19465. "properties": {
  19466. "mcpName": {
  19467. "type": "string"
  19468. },
  19469. "url": {
  19470. "type": "string"
  19471. }
  19472. },
  19473. "required": ["mcpName", "url"],
  19474. "additionalProperties": false
  19475. }
  19476. },
  19477. "required": ["id", "type", "properties"],
  19478. "additionalProperties": false
  19479. },
  19480. {
  19481. "type": "object",
  19482. "properties": {
  19483. "id": {
  19484. "type": "string",
  19485. "pattern": "^evt_"
  19486. },
  19487. "type": {
  19488. "type": "string",
  19489. "enum": ["command.executed"]
  19490. },
  19491. "properties": {
  19492. "type": "object",
  19493. "properties": {
  19494. "name": {
  19495. "type": "string"
  19496. },
  19497. "sessionID": {
  19498. "type": "string",
  19499. "pattern": "^ses"
  19500. },
  19501. "arguments": {
  19502. "type": "string"
  19503. },
  19504. "messageID": {
  19505. "type": "string",
  19506. "pattern": "^msg"
  19507. }
  19508. },
  19509. "required": ["name", "sessionID", "arguments", "messageID"],
  19510. "additionalProperties": false
  19511. }
  19512. },
  19513. "required": ["id", "type", "properties"],
  19514. "additionalProperties": false
  19515. },
  19516. {
  19517. "type": "object",
  19518. "properties": {
  19519. "id": {
  19520. "type": "string",
  19521. "pattern": "^evt_"
  19522. },
  19523. "type": {
  19524. "type": "string",
  19525. "enum": ["project.updated"]
  19526. },
  19527. "properties": {
  19528. "type": "object",
  19529. "properties": {
  19530. "id": {
  19531. "type": "string"
  19532. },
  19533. "worktree": {
  19534. "type": "string"
  19535. },
  19536. "vcs": {
  19537. "$ref": "#/components/schemas/ProjectVcs"
  19538. },
  19539. "name": {
  19540. "type": "string"
  19541. },
  19542. "icon": {
  19543. "$ref": "#/components/schemas/ProjectIcon"
  19544. },
  19545. "commands": {
  19546. "$ref": "#/components/schemas/ProjectCommands"
  19547. },
  19548. "time": {
  19549. "$ref": "#/components/schemas/ProjectTime"
  19550. },
  19551. "sandboxes": {
  19552. "type": "array",
  19553. "items": {
  19554. "type": "string"
  19555. }
  19556. }
  19557. },
  19558. "required": ["id", "worktree", "time", "sandboxes"],
  19559. "additionalProperties": false
  19560. }
  19561. },
  19562. "required": ["id", "type", "properties"],
  19563. "additionalProperties": false
  19564. },
  19565. {
  19566. "type": "object",
  19567. "properties": {
  19568. "id": {
  19569. "type": "string",
  19570. "pattern": "^evt_"
  19571. },
  19572. "type": {
  19573. "type": "string",
  19574. "enum": ["session.status"]
  19575. },
  19576. "properties": {
  19577. "type": "object",
  19578. "properties": {
  19579. "sessionID": {
  19580. "type": "string",
  19581. "pattern": "^ses"
  19582. },
  19583. "status": {
  19584. "$ref": "#/components/schemas/SessionStatus"
  19585. }
  19586. },
  19587. "required": ["sessionID", "status"],
  19588. "additionalProperties": false
  19589. }
  19590. },
  19591. "required": ["id", "type", "properties"],
  19592. "additionalProperties": false
  19593. },
  19594. {
  19595. "type": "object",
  19596. "properties": {
  19597. "id": {
  19598. "type": "string",
  19599. "pattern": "^evt_"
  19600. },
  19601. "type": {
  19602. "type": "string",
  19603. "enum": ["session.idle"]
  19604. },
  19605. "properties": {
  19606. "type": "object",
  19607. "properties": {
  19608. "sessionID": {
  19609. "type": "string",
  19610. "pattern": "^ses"
  19611. }
  19612. },
  19613. "required": ["sessionID"],
  19614. "additionalProperties": false
  19615. }
  19616. },
  19617. "required": ["id", "type", "properties"],
  19618. "additionalProperties": false
  19619. },
  19620. {
  19621. "type": "object",
  19622. "properties": {
  19623. "id": {
  19624. "type": "string",
  19625. "pattern": "^evt_"
  19626. },
  19627. "type": {
  19628. "type": "string",
  19629. "enum": ["question.asked"]
  19630. },
  19631. "properties": {
  19632. "type": "object",
  19633. "properties": {
  19634. "id": {
  19635. "type": "string",
  19636. "pattern": "^que"
  19637. },
  19638. "sessionID": {
  19639. "type": "string",
  19640. "pattern": "^ses"
  19641. },
  19642. "questions": {
  19643. "type": "array",
  19644. "items": {
  19645. "$ref": "#/components/schemas/QuestionInfo"
  19646. },
  19647. "description": "Questions to ask"
  19648. },
  19649. "tool": {
  19650. "$ref": "#/components/schemas/QuestionTool"
  19651. }
  19652. },
  19653. "required": ["id", "sessionID", "questions"],
  19654. "additionalProperties": false
  19655. }
  19656. },
  19657. "required": ["id", "type", "properties"],
  19658. "additionalProperties": false
  19659. },
  19660. {
  19661. "type": "object",
  19662. "properties": {
  19663. "id": {
  19664. "type": "string",
  19665. "pattern": "^evt_"
  19666. },
  19667. "type": {
  19668. "type": "string",
  19669. "enum": ["question.replied"]
  19670. },
  19671. "properties": {
  19672. "type": "object",
  19673. "properties": {
  19674. "sessionID": {
  19675. "type": "string",
  19676. "pattern": "^ses"
  19677. },
  19678. "requestID": {
  19679. "type": "string",
  19680. "pattern": "^que"
  19681. },
  19682. "answers": {
  19683. "type": "array",
  19684. "items": {
  19685. "$ref": "#/components/schemas/QuestionAnswer"
  19686. }
  19687. }
  19688. },
  19689. "required": ["sessionID", "requestID", "answers"],
  19690. "additionalProperties": false
  19691. }
  19692. },
  19693. "required": ["id", "type", "properties"],
  19694. "additionalProperties": false
  19695. },
  19696. {
  19697. "type": "object",
  19698. "properties": {
  19699. "id": {
  19700. "type": "string",
  19701. "pattern": "^evt_"
  19702. },
  19703. "type": {
  19704. "type": "string",
  19705. "enum": ["question.rejected"]
  19706. },
  19707. "properties": {
  19708. "type": "object",
  19709. "properties": {
  19710. "sessionID": {
  19711. "type": "string",
  19712. "pattern": "^ses"
  19713. },
  19714. "requestID": {
  19715. "type": "string",
  19716. "pattern": "^que"
  19717. }
  19718. },
  19719. "required": ["sessionID", "requestID"],
  19720. "additionalProperties": false
  19721. }
  19722. },
  19723. "required": ["id", "type", "properties"],
  19724. "additionalProperties": false
  19725. },
  19726. {
  19727. "type": "object",
  19728. "properties": {
  19729. "id": {
  19730. "type": "string",
  19731. "pattern": "^evt_"
  19732. },
  19733. "type": {
  19734. "type": "string",
  19735. "enum": ["session.compacted"]
  19736. },
  19737. "properties": {
  19738. "type": "object",
  19739. "properties": {
  19740. "sessionID": {
  19741. "type": "string",
  19742. "pattern": "^ses"
  19743. }
  19744. },
  19745. "required": ["sessionID"],
  19746. "additionalProperties": false
  19747. }
  19748. },
  19749. "required": ["id", "type", "properties"],
  19750. "additionalProperties": false
  19751. },
  19752. {
  19753. "type": "object",
  19754. "properties": {
  19755. "id": {
  19756. "type": "string",
  19757. "pattern": "^evt_"
  19758. },
  19759. "type": {
  19760. "type": "string",
  19761. "enum": ["vcs.branch.updated"]
  19762. },
  19763. "properties": {
  19764. "type": "object",
  19765. "properties": {
  19766. "branch": {
  19767. "type": "string"
  19768. }
  19769. },
  19770. "additionalProperties": false
  19771. }
  19772. },
  19773. "required": ["id", "type", "properties"],
  19774. "additionalProperties": false
  19775. },
  19776. {
  19777. "type": "object",
  19778. "properties": {
  19779. "id": {
  19780. "type": "string",
  19781. "pattern": "^evt_"
  19782. },
  19783. "type": {
  19784. "type": "string",
  19785. "enum": ["workspace.ready"]
  19786. },
  19787. "properties": {
  19788. "type": "object",
  19789. "properties": {
  19790. "name": {
  19791. "type": "string"
  19792. }
  19793. },
  19794. "required": ["name"],
  19795. "additionalProperties": false
  19796. }
  19797. },
  19798. "required": ["id", "type", "properties"],
  19799. "additionalProperties": false
  19800. },
  19801. {
  19802. "type": "object",
  19803. "properties": {
  19804. "id": {
  19805. "type": "string",
  19806. "pattern": "^evt_"
  19807. },
  19808. "type": {
  19809. "type": "string",
  19810. "enum": ["workspace.failed"]
  19811. },
  19812. "properties": {
  19813. "type": "object",
  19814. "properties": {
  19815. "message": {
  19816. "type": "string"
  19817. }
  19818. },
  19819. "required": ["message"],
  19820. "additionalProperties": false
  19821. }
  19822. },
  19823. "required": ["id", "type", "properties"],
  19824. "additionalProperties": false
  19825. },
  19826. {
  19827. "type": "object",
  19828. "properties": {
  19829. "id": {
  19830. "type": "string",
  19831. "pattern": "^evt_"
  19832. },
  19833. "type": {
  19834. "type": "string",
  19835. "enum": ["workspace.status"]
  19836. },
  19837. "properties": {
  19838. "type": "object",
  19839. "properties": {
  19840. "workspaceID": {
  19841. "type": "string",
  19842. "pattern": "^wrk"
  19843. },
  19844. "status": {
  19845. "type": "string",
  19846. "enum": ["connected", "connecting", "disconnected", "error"]
  19847. }
  19848. },
  19849. "required": ["workspaceID", "status"],
  19850. "additionalProperties": false
  19851. }
  19852. },
  19853. "required": ["id", "type", "properties"],
  19854. "additionalProperties": false
  19855. },
  19856. {
  19857. "type": "object",
  19858. "properties": {
  19859. "id": {
  19860. "type": "string",
  19861. "pattern": "^evt_"
  19862. },
  19863. "type": {
  19864. "type": "string",
  19865. "enum": ["worktree.ready"]
  19866. },
  19867. "properties": {
  19868. "type": "object",
  19869. "properties": {
  19870. "name": {
  19871. "type": "string"
  19872. },
  19873. "branch": {
  19874. "type": "string"
  19875. }
  19876. },
  19877. "required": ["name"],
  19878. "additionalProperties": false
  19879. }
  19880. },
  19881. "required": ["id", "type", "properties"],
  19882. "additionalProperties": false
  19883. },
  19884. {
  19885. "type": "object",
  19886. "properties": {
  19887. "id": {
  19888. "type": "string",
  19889. "pattern": "^evt_"
  19890. },
  19891. "type": {
  19892. "type": "string",
  19893. "enum": ["worktree.failed"]
  19894. },
  19895. "properties": {
  19896. "type": "object",
  19897. "properties": {
  19898. "message": {
  19899. "type": "string"
  19900. }
  19901. },
  19902. "required": ["message"],
  19903. "additionalProperties": false
  19904. }
  19905. },
  19906. "required": ["id", "type", "properties"],
  19907. "additionalProperties": false
  19908. },
  19909. {
  19910. "type": "object",
  19911. "properties": {
  19912. "id": {
  19913. "type": "string",
  19914. "pattern": "^evt_"
  19915. },
  19916. "type": {
  19917. "type": "string",
  19918. "enum": ["server.connected"]
  19919. },
  19920. "properties": {
  19921. "type": "object",
  19922. "properties": {}
  19923. }
  19924. },
  19925. "required": ["id", "type", "properties"],
  19926. "additionalProperties": false
  19927. },
  19928. {
  19929. "type": "object",
  19930. "properties": {
  19931. "id": {
  19932. "type": "string",
  19933. "pattern": "^evt_"
  19934. },
  19935. "type": {
  19936. "type": "string",
  19937. "enum": ["global.disposed"]
  19938. },
  19939. "properties": {
  19940. "type": "object",
  19941. "properties": {}
  19942. }
  19943. },
  19944. "required": ["id", "type", "properties"],
  19945. "additionalProperties": false
  19946. },
  19947. {
  19948. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  19949. },
  19950. {
  19951. "$ref": "#/components/schemas/SyncEventSessionCreated"
  19952. },
  19953. {
  19954. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  19955. },
  19956. {
  19957. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  19958. },
  19959. {
  19960. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  19961. },
  19962. {
  19963. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  19964. },
  19965. {
  19966. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  19967. },
  19968. {
  19969. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  19970. },
  19971. {
  19972. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  19973. },
  19974. {
  19975. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  19976. },
  19977. {
  19978. "$ref": "#/components/schemas/SyncEventSessionNextMoved"
  19979. },
  19980. {
  19981. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  19982. },
  19983. {
  19984. "$ref": "#/components/schemas/SyncEventSessionNextPromptAdmitted"
  19985. },
  19986. {
  19987. "$ref": "#/components/schemas/SyncEventSessionNextContextUpdated"
  19988. },
  19989. {
  19990. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  19991. },
  19992. {
  19993. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  19994. },
  19995. {
  19996. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  19997. },
  19998. {
  19999. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  20000. },
  20001. {
  20002. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  20003. },
  20004. {
  20005. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  20006. },
  20007. {
  20008. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  20009. },
  20010. {
  20011. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  20012. },
  20013. {
  20014. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  20015. },
  20016. {
  20017. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  20018. },
  20019. {
  20020. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  20021. },
  20022. {
  20023. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  20024. },
  20025. {
  20026. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  20027. },
  20028. {
  20029. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  20030. },
  20031. {
  20032. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  20033. },
  20034. {
  20035. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  20036. },
  20037. {
  20038. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  20039. },
  20040. {
  20041. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  20042. },
  20043. {
  20044. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  20045. },
  20046. {
  20047. "$ref": "#/components/schemas/SyncEventSessionNextRevertStaged"
  20048. },
  20049. {
  20050. "$ref": "#/components/schemas/SyncEventSessionNextRevertCleared"
  20051. },
  20052. {
  20053. "$ref": "#/components/schemas/SyncEventSessionNextRevertCommitted"
  20054. }
  20055. ]
  20056. }
  20057. },
  20058. "required": ["directory", "payload"],
  20059. "additionalProperties": false
  20060. },
  20061. "LogLevel": {
  20062. "type": "string",
  20063. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  20064. "description": "Log level"
  20065. },
  20066. "ServerConfig": {
  20067. "type": "object",
  20068. "properties": {
  20069. "port": {
  20070. "type": "integer",
  20071. "exclusiveMinimum": 0
  20072. },
  20073. "hostname": {
  20074. "type": "string"
  20075. },
  20076. "mdns": {
  20077. "type": "boolean"
  20078. },
  20079. "mdnsDomain": {
  20080. "type": "string"
  20081. },
  20082. "cors": {
  20083. "type": "array",
  20084. "items": {
  20085. "type": "string"
  20086. }
  20087. }
  20088. },
  20089. "additionalProperties": false,
  20090. "description": "Server configuration for opencode serve and web commands"
  20091. },
  20092. "PermissionActionConfig": {
  20093. "type": "string",
  20094. "enum": ["ask", "allow", "deny"]
  20095. },
  20096. "PermissionObjectConfig": {
  20097. "type": "object",
  20098. "additionalProperties": {
  20099. "$ref": "#/components/schemas/PermissionActionConfig"
  20100. }
  20101. },
  20102. "PermissionRuleConfig": {
  20103. "anyOf": [
  20104. {
  20105. "$ref": "#/components/schemas/PermissionActionConfig"
  20106. },
  20107. {
  20108. "$ref": "#/components/schemas/PermissionObjectConfig"
  20109. }
  20110. ]
  20111. },
  20112. "PermissionConfig": {
  20113. "anyOf": [
  20114. {
  20115. "$ref": "#/components/schemas/PermissionActionConfig"
  20116. },
  20117. {
  20118. "type": "object",
  20119. "properties": {
  20120. "read": {
  20121. "$ref": "#/components/schemas/PermissionRuleConfig"
  20122. },
  20123. "edit": {
  20124. "$ref": "#/components/schemas/PermissionRuleConfig"
  20125. },
  20126. "glob": {
  20127. "$ref": "#/components/schemas/PermissionRuleConfig"
  20128. },
  20129. "grep": {
  20130. "$ref": "#/components/schemas/PermissionRuleConfig"
  20131. },
  20132. "list": {
  20133. "$ref": "#/components/schemas/PermissionRuleConfig"
  20134. },
  20135. "bash": {
  20136. "$ref": "#/components/schemas/PermissionRuleConfig"
  20137. },
  20138. "task": {
  20139. "$ref": "#/components/schemas/PermissionRuleConfig"
  20140. },
  20141. "external_directory": {
  20142. "$ref": "#/components/schemas/PermissionRuleConfig"
  20143. },
  20144. "todowrite": {
  20145. "$ref": "#/components/schemas/PermissionActionConfig"
  20146. },
  20147. "question": {
  20148. "$ref": "#/components/schemas/PermissionActionConfig"
  20149. },
  20150. "webfetch": {
  20151. "$ref": "#/components/schemas/PermissionActionConfig"
  20152. },
  20153. "websearch": {
  20154. "$ref": "#/components/schemas/PermissionActionConfig"
  20155. },
  20156. "lsp": {
  20157. "$ref": "#/components/schemas/PermissionRuleConfig"
  20158. },
  20159. "doom_loop": {
  20160. "$ref": "#/components/schemas/PermissionActionConfig"
  20161. },
  20162. "skill": {
  20163. "$ref": "#/components/schemas/PermissionRuleConfig"
  20164. }
  20165. },
  20166. "additionalProperties": {
  20167. "$ref": "#/components/schemas/PermissionRuleConfig"
  20168. }
  20169. }
  20170. ]
  20171. },
  20172. "AgentConfig": {
  20173. "type": "object",
  20174. "properties": {
  20175. "model": {
  20176. "type": "string"
  20177. },
  20178. "variant": {
  20179. "type": "string"
  20180. },
  20181. "temperature": {
  20182. "type": "number"
  20183. },
  20184. "top_p": {
  20185. "type": "number"
  20186. },
  20187. "prompt": {
  20188. "type": "string"
  20189. },
  20190. "tools": {
  20191. "type": "object",
  20192. "additionalProperties": {
  20193. "type": "boolean"
  20194. }
  20195. },
  20196. "disable": {
  20197. "type": "boolean"
  20198. },
  20199. "description": {
  20200. "type": "string"
  20201. },
  20202. "mode": {
  20203. "type": "string",
  20204. "enum": ["subagent", "primary", "all"]
  20205. },
  20206. "hidden": {
  20207. "type": "boolean"
  20208. },
  20209. "options": {
  20210. "type": "object"
  20211. },
  20212. "color": {
  20213. "anyOf": [
  20214. {
  20215. "type": "string",
  20216. "pattern": "^#[0-9a-fA-F]{6}$"
  20217. },
  20218. {
  20219. "type": "string",
  20220. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  20221. }
  20222. ],
  20223. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  20224. },
  20225. "steps": {
  20226. "type": "integer",
  20227. "exclusiveMinimum": 0
  20228. },
  20229. "maxSteps": {
  20230. "type": "integer",
  20231. "exclusiveMinimum": 0
  20232. },
  20233. "permission": {
  20234. "$ref": "#/components/schemas/PermissionConfig"
  20235. }
  20236. },
  20237. "additionalProperties": {}
  20238. },
  20239. "ProviderConfig": {
  20240. "type": "object",
  20241. "properties": {
  20242. "api": {
  20243. "type": "string"
  20244. },
  20245. "name": {
  20246. "type": "string"
  20247. },
  20248. "env": {
  20249. "type": "array",
  20250. "items": {
  20251. "type": "string"
  20252. }
  20253. },
  20254. "id": {
  20255. "type": "string"
  20256. },
  20257. "npm": {
  20258. "type": "string"
  20259. },
  20260. "whitelist": {
  20261. "type": "array",
  20262. "items": {
  20263. "type": "string"
  20264. }
  20265. },
  20266. "blacklist": {
  20267. "type": "array",
  20268. "items": {
  20269. "type": "string"
  20270. }
  20271. },
  20272. "options": {
  20273. "type": "object",
  20274. "properties": {
  20275. "apiKey": {
  20276. "type": "string"
  20277. },
  20278. "baseURL": {
  20279. "type": "string"
  20280. },
  20281. "enterpriseUrl": {
  20282. "type": "string"
  20283. },
  20284. "setCacheKey": {
  20285. "type": "boolean"
  20286. },
  20287. "timeout": {
  20288. "anyOf": [
  20289. {
  20290. "type": "integer",
  20291. "exclusiveMinimum": 0
  20292. },
  20293. {
  20294. "type": "boolean",
  20295. "enum": [false]
  20296. }
  20297. ],
  20298. "description": "Timeout in milliseconds for full requests to this provider. Set to false to disable timeout."
  20299. },
  20300. "headerTimeout": {
  20301. "anyOf": [
  20302. {
  20303. "type": "integer",
  20304. "exclusiveMinimum": 0
  20305. },
  20306. {
  20307. "type": "boolean",
  20308. "enum": [false]
  20309. }
  20310. ],
  20311. "description": "Timeout in milliseconds to wait for response headers. Provider integrations may set defaults. Set to false to disable timeout."
  20312. },
  20313. "chunkTimeout": {
  20314. "type": "integer",
  20315. "exclusiveMinimum": 0
  20316. }
  20317. },
  20318. "additionalProperties": {}
  20319. },
  20320. "models": {
  20321. "type": "object",
  20322. "additionalProperties": {
  20323. "type": "object",
  20324. "properties": {
  20325. "id": {
  20326. "type": "string"
  20327. },
  20328. "name": {
  20329. "type": "string"
  20330. },
  20331. "family": {
  20332. "type": "string"
  20333. },
  20334. "release_date": {
  20335. "type": "string"
  20336. },
  20337. "attachment": {
  20338. "type": "boolean"
  20339. },
  20340. "reasoning": {
  20341. "type": "boolean"
  20342. },
  20343. "temperature": {
  20344. "type": "boolean"
  20345. },
  20346. "tool_call": {
  20347. "type": "boolean"
  20348. },
  20349. "interleaved": {
  20350. "anyOf": [
  20351. {
  20352. "type": "boolean",
  20353. "enum": [true]
  20354. },
  20355. {
  20356. "type": "object",
  20357. "properties": {
  20358. "field": {
  20359. "type": "string",
  20360. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  20361. }
  20362. },
  20363. "required": ["field"],
  20364. "additionalProperties": false
  20365. }
  20366. ]
  20367. },
  20368. "cost": {
  20369. "type": "object",
  20370. "properties": {
  20371. "input": {
  20372. "type": "number"
  20373. },
  20374. "output": {
  20375. "type": "number"
  20376. },
  20377. "cache_read": {
  20378. "type": "number"
  20379. },
  20380. "cache_write": {
  20381. "type": "number"
  20382. },
  20383. "context_over_200k": {
  20384. "type": "object",
  20385. "properties": {
  20386. "input": {
  20387. "type": "number"
  20388. },
  20389. "output": {
  20390. "type": "number"
  20391. },
  20392. "cache_read": {
  20393. "type": "number"
  20394. },
  20395. "cache_write": {
  20396. "type": "number"
  20397. }
  20398. },
  20399. "required": ["input", "output"],
  20400. "additionalProperties": false
  20401. }
  20402. },
  20403. "required": ["input", "output"],
  20404. "additionalProperties": false
  20405. },
  20406. "limit": {
  20407. "type": "object",
  20408. "properties": {
  20409. "context": {
  20410. "type": "number"
  20411. },
  20412. "input": {
  20413. "type": "number"
  20414. },
  20415. "output": {
  20416. "type": "number"
  20417. }
  20418. },
  20419. "required": ["context", "output"],
  20420. "additionalProperties": false
  20421. },
  20422. "modalities": {
  20423. "type": "object",
  20424. "properties": {
  20425. "input": {
  20426. "type": "array",
  20427. "items": {
  20428. "type": "string",
  20429. "enum": ["text", "audio", "image", "video", "pdf"]
  20430. }
  20431. },
  20432. "output": {
  20433. "type": "array",
  20434. "items": {
  20435. "type": "string",
  20436. "enum": ["text", "audio", "image", "video", "pdf"]
  20437. }
  20438. }
  20439. },
  20440. "additionalProperties": false
  20441. },
  20442. "experimental": {
  20443. "type": "boolean"
  20444. },
  20445. "status": {
  20446. "type": "string",
  20447. "enum": ["alpha", "beta", "deprecated", "active"]
  20448. },
  20449. "provider": {
  20450. "type": "object",
  20451. "properties": {
  20452. "npm": {
  20453. "type": "string"
  20454. },
  20455. "api": {
  20456. "type": "string"
  20457. }
  20458. },
  20459. "additionalProperties": false
  20460. },
  20461. "options": {
  20462. "type": "object"
  20463. },
  20464. "headers": {
  20465. "type": "object",
  20466. "additionalProperties": {
  20467. "type": "string"
  20468. }
  20469. },
  20470. "variants": {
  20471. "type": "object",
  20472. "additionalProperties": {
  20473. "type": "object",
  20474. "properties": {
  20475. "disabled": {
  20476. "type": "boolean"
  20477. }
  20478. },
  20479. "additionalProperties": {}
  20480. },
  20481. "description": "Variant-specific configuration"
  20482. }
  20483. },
  20484. "additionalProperties": false
  20485. }
  20486. }
  20487. },
  20488. "additionalProperties": false
  20489. },
  20490. "McpLocalConfig": {
  20491. "type": "object",
  20492. "properties": {
  20493. "type": {
  20494. "type": "string",
  20495. "enum": ["local"],
  20496. "description": "Type of MCP server connection"
  20497. },
  20498. "command": {
  20499. "type": "array",
  20500. "items": {
  20501. "type": "string"
  20502. },
  20503. "description": "Command and arguments to run the MCP server"
  20504. },
  20505. "cwd": {
  20506. "type": "string"
  20507. },
  20508. "environment": {
  20509. "type": "object",
  20510. "additionalProperties": {
  20511. "type": "string"
  20512. }
  20513. },
  20514. "enabled": {
  20515. "type": "boolean"
  20516. },
  20517. "timeout": {
  20518. "type": "integer",
  20519. "exclusiveMinimum": 0
  20520. }
  20521. },
  20522. "required": ["type", "command"],
  20523. "additionalProperties": false
  20524. },
  20525. "McpOAuthConfig": {
  20526. "type": "object",
  20527. "properties": {
  20528. "clientId": {
  20529. "type": "string"
  20530. },
  20531. "clientSecret": {
  20532. "type": "string"
  20533. },
  20534. "scope": {
  20535. "type": "string"
  20536. },
  20537. "callbackPort": {
  20538. "type": "integer",
  20539. "minimum": 1,
  20540. "maximum": 65535
  20541. },
  20542. "redirectUri": {
  20543. "type": "string"
  20544. }
  20545. },
  20546. "additionalProperties": false
  20547. },
  20548. "McpRemoteConfig": {
  20549. "type": "object",
  20550. "properties": {
  20551. "type": {
  20552. "type": "string",
  20553. "enum": ["remote"],
  20554. "description": "Type of MCP server connection"
  20555. },
  20556. "url": {
  20557. "type": "string",
  20558. "description": "URL of the remote MCP server"
  20559. },
  20560. "enabled": {
  20561. "type": "boolean"
  20562. },
  20563. "headers": {
  20564. "type": "object",
  20565. "additionalProperties": {
  20566. "type": "string"
  20567. }
  20568. },
  20569. "oauth": {
  20570. "anyOf": [
  20571. {
  20572. "$ref": "#/components/schemas/McpOAuthConfig"
  20573. },
  20574. {
  20575. "type": "boolean",
  20576. "enum": [false]
  20577. }
  20578. ],
  20579. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  20580. },
  20581. "timeout": {
  20582. "type": "integer",
  20583. "exclusiveMinimum": 0
  20584. }
  20585. },
  20586. "required": ["type", "url"],
  20587. "additionalProperties": false
  20588. },
  20589. "LayoutConfig": {
  20590. "type": "string",
  20591. "enum": ["auto", "stretch"],
  20592. "description": "@deprecated Always uses stretch layout."
  20593. },
  20594. "ImageAttachmentConfig": {
  20595. "type": "object",
  20596. "properties": {
  20597. "auto_resize": {
  20598. "type": "boolean"
  20599. },
  20600. "max_width": {
  20601. "type": "integer",
  20602. "exclusiveMinimum": 0
  20603. },
  20604. "max_height": {
  20605. "type": "integer",
  20606. "exclusiveMinimum": 0
  20607. },
  20608. "max_base64_bytes": {
  20609. "type": "integer",
  20610. "exclusiveMinimum": 0
  20611. }
  20612. },
  20613. "additionalProperties": false
  20614. },
  20615. "AttachmentConfig": {
  20616. "type": "object",
  20617. "properties": {
  20618. "image": {
  20619. "$ref": "#/components/schemas/ImageAttachmentConfig"
  20620. }
  20621. },
  20622. "additionalProperties": false
  20623. },
  20624. "Config": {
  20625. "type": "object",
  20626. "properties": {
  20627. "$schema": {
  20628. "type": "string"
  20629. },
  20630. "shell": {
  20631. "type": "string"
  20632. },
  20633. "logLevel": {
  20634. "$ref": "#/components/schemas/LogLevel"
  20635. },
  20636. "server": {
  20637. "$ref": "#/components/schemas/ServerConfig"
  20638. },
  20639. "command": {
  20640. "type": "object",
  20641. "additionalProperties": {
  20642. "type": "object",
  20643. "properties": {
  20644. "template": {
  20645. "type": "string"
  20646. },
  20647. "description": {
  20648. "type": "string"
  20649. },
  20650. "agent": {
  20651. "type": "string"
  20652. },
  20653. "model": {
  20654. "type": "string"
  20655. },
  20656. "variant": {
  20657. "type": "string"
  20658. },
  20659. "subtask": {
  20660. "type": "boolean"
  20661. }
  20662. },
  20663. "required": ["template"],
  20664. "additionalProperties": false
  20665. }
  20666. },
  20667. "skills": {
  20668. "type": "object",
  20669. "properties": {
  20670. "paths": {
  20671. "type": "array",
  20672. "items": {
  20673. "type": "string"
  20674. }
  20675. },
  20676. "urls": {
  20677. "type": "array",
  20678. "items": {
  20679. "type": "string"
  20680. }
  20681. }
  20682. },
  20683. "additionalProperties": false
  20684. },
  20685. "references": {
  20686. "type": "object",
  20687. "additionalProperties": {
  20688. "anyOf": [
  20689. {
  20690. "type": "string"
  20691. },
  20692. {
  20693. "$ref": "#/components/schemas/ConfigV2ReferenceGit"
  20694. },
  20695. {
  20696. "$ref": "#/components/schemas/ConfigV2ReferenceLocal"
  20697. }
  20698. ]
  20699. }
  20700. },
  20701. "reference": {
  20702. "type": "object",
  20703. "additionalProperties": {
  20704. "anyOf": [
  20705. {
  20706. "type": "string"
  20707. },
  20708. {
  20709. "$ref": "#/components/schemas/ConfigV2ReferenceGit"
  20710. },
  20711. {
  20712. "$ref": "#/components/schemas/ConfigV2ReferenceLocal"
  20713. }
  20714. ]
  20715. }
  20716. },
  20717. "watcher": {
  20718. "type": "object",
  20719. "properties": {
  20720. "ignore": {
  20721. "type": "array",
  20722. "items": {
  20723. "type": "string"
  20724. }
  20725. }
  20726. },
  20727. "additionalProperties": false
  20728. },
  20729. "snapshot": {
  20730. "type": "boolean"
  20731. },
  20732. "plugin": {
  20733. "type": "array",
  20734. "items": {
  20735. "anyOf": [
  20736. {
  20737. "type": "string"
  20738. },
  20739. {
  20740. "type": "array",
  20741. "prefixItems": [
  20742. {
  20743. "type": "string"
  20744. },
  20745. {
  20746. "type": "object"
  20747. }
  20748. ],
  20749. "maxItems": 2,
  20750. "minItems": 2
  20751. }
  20752. ]
  20753. }
  20754. },
  20755. "share": {
  20756. "type": "string",
  20757. "enum": ["manual", "auto", "disabled"]
  20758. },
  20759. "autoshare": {
  20760. "type": "boolean"
  20761. },
  20762. "autoupdate": {
  20763. "anyOf": [
  20764. {
  20765. "type": "boolean"
  20766. },
  20767. {
  20768. "type": "string",
  20769. "enum": ["notify"]
  20770. }
  20771. ],
  20772. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  20773. },
  20774. "disabled_providers": {
  20775. "type": "array",
  20776. "items": {
  20777. "type": "string"
  20778. }
  20779. },
  20780. "enabled_providers": {
  20781. "type": "array",
  20782. "items": {
  20783. "type": "string"
  20784. }
  20785. },
  20786. "model": {
  20787. "type": "string"
  20788. },
  20789. "small_model": {
  20790. "type": "string"
  20791. },
  20792. "default_agent": {
  20793. "type": "string"
  20794. },
  20795. "username": {
  20796. "type": "string"
  20797. },
  20798. "mode": {
  20799. "type": "object",
  20800. "properties": {
  20801. "build": {
  20802. "$ref": "#/components/schemas/AgentConfig"
  20803. },
  20804. "plan": {
  20805. "$ref": "#/components/schemas/AgentConfig"
  20806. }
  20807. },
  20808. "additionalProperties": {
  20809. "$ref": "#/components/schemas/AgentConfig"
  20810. }
  20811. },
  20812. "agent": {
  20813. "type": "object",
  20814. "properties": {
  20815. "plan": {
  20816. "$ref": "#/components/schemas/AgentConfig"
  20817. },
  20818. "build": {
  20819. "$ref": "#/components/schemas/AgentConfig"
  20820. },
  20821. "general": {
  20822. "$ref": "#/components/schemas/AgentConfig"
  20823. },
  20824. "explore": {
  20825. "$ref": "#/components/schemas/AgentConfig"
  20826. },
  20827. "title": {
  20828. "$ref": "#/components/schemas/AgentConfig"
  20829. },
  20830. "summary": {
  20831. "$ref": "#/components/schemas/AgentConfig"
  20832. },
  20833. "compaction": {
  20834. "$ref": "#/components/schemas/AgentConfig"
  20835. }
  20836. },
  20837. "additionalProperties": {
  20838. "$ref": "#/components/schemas/AgentConfig"
  20839. }
  20840. },
  20841. "provider": {
  20842. "type": "object",
  20843. "additionalProperties": {
  20844. "$ref": "#/components/schemas/ProviderConfig"
  20845. }
  20846. },
  20847. "mcp": {
  20848. "type": "object",
  20849. "additionalProperties": {
  20850. "anyOf": [
  20851. {
  20852. "$ref": "#/components/schemas/McpLocalConfig"
  20853. },
  20854. {
  20855. "$ref": "#/components/schemas/McpRemoteConfig"
  20856. },
  20857. {
  20858. "type": "object",
  20859. "properties": {
  20860. "enabled": {
  20861. "type": "boolean"
  20862. }
  20863. },
  20864. "required": ["enabled"],
  20865. "additionalProperties": false
  20866. }
  20867. ]
  20868. }
  20869. },
  20870. "formatter": {
  20871. "anyOf": [
  20872. {
  20873. "type": "boolean"
  20874. },
  20875. {
  20876. "type": "object",
  20877. "additionalProperties": {
  20878. "type": "object",
  20879. "properties": {
  20880. "disabled": {
  20881. "type": "boolean"
  20882. },
  20883. "command": {
  20884. "type": "array",
  20885. "items": {
  20886. "type": "string"
  20887. }
  20888. },
  20889. "environment": {
  20890. "type": "object",
  20891. "additionalProperties": {
  20892. "type": "string"
  20893. }
  20894. },
  20895. "extensions": {
  20896. "type": "array",
  20897. "items": {
  20898. "type": "string"
  20899. }
  20900. }
  20901. },
  20902. "additionalProperties": false
  20903. }
  20904. }
  20905. ],
  20906. "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."
  20907. },
  20908. "lsp": {
  20909. "anyOf": [
  20910. {
  20911. "type": "boolean"
  20912. },
  20913. {
  20914. "type": "object",
  20915. "additionalProperties": {
  20916. "anyOf": [
  20917. {
  20918. "type": "object",
  20919. "properties": {
  20920. "disabled": {
  20921. "type": "boolean",
  20922. "enum": [true]
  20923. }
  20924. },
  20925. "required": ["disabled"],
  20926. "additionalProperties": false
  20927. },
  20928. {
  20929. "type": "object",
  20930. "properties": {
  20931. "command": {
  20932. "type": "array",
  20933. "items": {
  20934. "type": "string"
  20935. }
  20936. },
  20937. "extensions": {
  20938. "type": "array",
  20939. "items": {
  20940. "type": "string"
  20941. }
  20942. },
  20943. "disabled": {
  20944. "type": "boolean"
  20945. },
  20946. "env": {
  20947. "type": "object",
  20948. "additionalProperties": {
  20949. "type": "string"
  20950. }
  20951. },
  20952. "initialization": {
  20953. "type": "object"
  20954. }
  20955. },
  20956. "required": ["command"],
  20957. "additionalProperties": false
  20958. }
  20959. ]
  20960. }
  20961. }
  20962. ],
  20963. "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."
  20964. },
  20965. "instructions": {
  20966. "type": "array",
  20967. "items": {
  20968. "type": "string"
  20969. }
  20970. },
  20971. "layout": {
  20972. "$ref": "#/components/schemas/LayoutConfig"
  20973. },
  20974. "permission": {
  20975. "$ref": "#/components/schemas/PermissionConfig"
  20976. },
  20977. "tools": {
  20978. "type": "object",
  20979. "additionalProperties": {
  20980. "type": "boolean"
  20981. }
  20982. },
  20983. "attachment": {
  20984. "$ref": "#/components/schemas/AttachmentConfig"
  20985. },
  20986. "enterprise": {
  20987. "type": "object",
  20988. "properties": {
  20989. "url": {
  20990. "type": "string"
  20991. }
  20992. },
  20993. "additionalProperties": false
  20994. },
  20995. "tool_output": {
  20996. "type": "object",
  20997. "properties": {
  20998. "max_lines": {
  20999. "type": "integer",
  21000. "exclusiveMinimum": 0
  21001. },
  21002. "max_bytes": {
  21003. "type": "integer",
  21004. "exclusiveMinimum": 0
  21005. }
  21006. },
  21007. "additionalProperties": false
  21008. },
  21009. "compaction": {
  21010. "type": "object",
  21011. "properties": {
  21012. "auto": {
  21013. "type": "boolean"
  21014. },
  21015. "prune": {
  21016. "type": "boolean"
  21017. },
  21018. "tail_turns": {
  21019. "type": "integer",
  21020. "minimum": 0
  21021. },
  21022. "preserve_recent_tokens": {
  21023. "type": "integer",
  21024. "minimum": 0
  21025. },
  21026. "reserved": {
  21027. "type": "integer",
  21028. "minimum": 0
  21029. }
  21030. },
  21031. "additionalProperties": false
  21032. },
  21033. "experimental": {
  21034. "type": "object",
  21035. "properties": {
  21036. "disable_paste_summary": {
  21037. "type": "boolean"
  21038. },
  21039. "batch_tool": {
  21040. "type": "boolean"
  21041. },
  21042. "openTelemetry": {
  21043. "type": "boolean"
  21044. },
  21045. "primary_tools": {
  21046. "type": "array",
  21047. "items": {
  21048. "type": "string"
  21049. }
  21050. },
  21051. "continue_loop_on_deny": {
  21052. "type": "boolean"
  21053. },
  21054. "mcp_timeout": {
  21055. "type": "integer",
  21056. "exclusiveMinimum": 0
  21057. },
  21058. "policies": {
  21059. "type": "array",
  21060. "items": {
  21061. "$ref": "#/components/schemas/ConfigV2ExperimentalPolicy"
  21062. }
  21063. }
  21064. },
  21065. "additionalProperties": false
  21066. }
  21067. },
  21068. "additionalProperties": false
  21069. },
  21070. "Model": {
  21071. "type": "object",
  21072. "properties": {
  21073. "id": {
  21074. "type": "string"
  21075. },
  21076. "providerID": {
  21077. "type": "string"
  21078. },
  21079. "api": {
  21080. "type": "object",
  21081. "properties": {
  21082. "id": {
  21083. "type": "string"
  21084. },
  21085. "url": {
  21086. "type": "string"
  21087. },
  21088. "npm": {
  21089. "type": "string"
  21090. }
  21091. },
  21092. "required": ["id", "url", "npm"],
  21093. "additionalProperties": false
  21094. },
  21095. "name": {
  21096. "type": "string"
  21097. },
  21098. "family": {
  21099. "type": "string"
  21100. },
  21101. "capabilities": {
  21102. "type": "object",
  21103. "properties": {
  21104. "temperature": {
  21105. "type": "boolean"
  21106. },
  21107. "reasoning": {
  21108. "type": "boolean"
  21109. },
  21110. "attachment": {
  21111. "type": "boolean"
  21112. },
  21113. "toolcall": {
  21114. "type": "boolean"
  21115. },
  21116. "input": {
  21117. "type": "object",
  21118. "properties": {
  21119. "text": {
  21120. "type": "boolean"
  21121. },
  21122. "audio": {
  21123. "type": "boolean"
  21124. },
  21125. "image": {
  21126. "type": "boolean"
  21127. },
  21128. "video": {
  21129. "type": "boolean"
  21130. },
  21131. "pdf": {
  21132. "type": "boolean"
  21133. }
  21134. },
  21135. "required": ["text", "audio", "image", "video", "pdf"],
  21136. "additionalProperties": false
  21137. },
  21138. "output": {
  21139. "type": "object",
  21140. "properties": {
  21141. "text": {
  21142. "type": "boolean"
  21143. },
  21144. "audio": {
  21145. "type": "boolean"
  21146. },
  21147. "image": {
  21148. "type": "boolean"
  21149. },
  21150. "video": {
  21151. "type": "boolean"
  21152. },
  21153. "pdf": {
  21154. "type": "boolean"
  21155. }
  21156. },
  21157. "required": ["text", "audio", "image", "video", "pdf"],
  21158. "additionalProperties": false
  21159. },
  21160. "interleaved": {
  21161. "anyOf": [
  21162. {
  21163. "type": "boolean"
  21164. },
  21165. {
  21166. "type": "object",
  21167. "properties": {
  21168. "field": {
  21169. "type": "string",
  21170. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  21171. }
  21172. },
  21173. "required": ["field"],
  21174. "additionalProperties": false
  21175. }
  21176. ]
  21177. }
  21178. },
  21179. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  21180. "additionalProperties": false
  21181. },
  21182. "cost": {
  21183. "type": "object",
  21184. "properties": {
  21185. "input": {
  21186. "type": "number"
  21187. },
  21188. "output": {
  21189. "type": "number"
  21190. },
  21191. "cache": {
  21192. "type": "object",
  21193. "properties": {
  21194. "read": {
  21195. "type": "number"
  21196. },
  21197. "write": {
  21198. "type": "number"
  21199. }
  21200. },
  21201. "required": ["read", "write"],
  21202. "additionalProperties": false
  21203. },
  21204. "tiers": {
  21205. "type": "array",
  21206. "items": {
  21207. "type": "object",
  21208. "properties": {
  21209. "input": {
  21210. "type": "number"
  21211. },
  21212. "output": {
  21213. "type": "number"
  21214. },
  21215. "cache": {
  21216. "type": "object",
  21217. "properties": {
  21218. "read": {
  21219. "type": "number"
  21220. },
  21221. "write": {
  21222. "type": "number"
  21223. }
  21224. },
  21225. "required": ["read", "write"],
  21226. "additionalProperties": false
  21227. },
  21228. "tier": {
  21229. "type": "object",
  21230. "properties": {
  21231. "type": {
  21232. "type": "string",
  21233. "enum": ["context"]
  21234. },
  21235. "size": {
  21236. "type": "number"
  21237. }
  21238. },
  21239. "required": ["type", "size"],
  21240. "additionalProperties": false
  21241. }
  21242. },
  21243. "required": ["input", "output", "cache", "tier"],
  21244. "additionalProperties": false
  21245. }
  21246. },
  21247. "experimentalOver200K": {
  21248. "type": "object",
  21249. "properties": {
  21250. "input": {
  21251. "type": "number"
  21252. },
  21253. "output": {
  21254. "type": "number"
  21255. },
  21256. "cache": {
  21257. "type": "object",
  21258. "properties": {
  21259. "read": {
  21260. "type": "number"
  21261. },
  21262. "write": {
  21263. "type": "number"
  21264. }
  21265. },
  21266. "required": ["read", "write"],
  21267. "additionalProperties": false
  21268. }
  21269. },
  21270. "required": ["input", "output", "cache"],
  21271. "additionalProperties": false
  21272. }
  21273. },
  21274. "required": ["input", "output", "cache"],
  21275. "additionalProperties": false
  21276. },
  21277. "limit": {
  21278. "type": "object",
  21279. "properties": {
  21280. "context": {
  21281. "type": "number"
  21282. },
  21283. "input": {
  21284. "type": "number"
  21285. },
  21286. "output": {
  21287. "type": "number"
  21288. }
  21289. },
  21290. "required": ["context", "output"],
  21291. "additionalProperties": false
  21292. },
  21293. "status": {
  21294. "type": "string",
  21295. "enum": ["alpha", "beta", "deprecated", "active"]
  21296. },
  21297. "options": {
  21298. "type": "object"
  21299. },
  21300. "headers": {
  21301. "type": "object",
  21302. "additionalProperties": {
  21303. "type": "string"
  21304. }
  21305. },
  21306. "release_date": {
  21307. "type": "string"
  21308. },
  21309. "variants": {
  21310. "type": "object",
  21311. "additionalProperties": {
  21312. "type": "object"
  21313. }
  21314. }
  21315. },
  21316. "required": [
  21317. "id",
  21318. "providerID",
  21319. "api",
  21320. "name",
  21321. "capabilities",
  21322. "cost",
  21323. "limit",
  21324. "status",
  21325. "options",
  21326. "headers",
  21327. "release_date"
  21328. ],
  21329. "additionalProperties": false
  21330. },
  21331. "Provider": {
  21332. "type": "object",
  21333. "properties": {
  21334. "id": {
  21335. "type": "string"
  21336. },
  21337. "name": {
  21338. "type": "string"
  21339. },
  21340. "source": {
  21341. "type": "string",
  21342. "enum": ["env", "config", "custom", "api"]
  21343. },
  21344. "env": {
  21345. "type": "array",
  21346. "items": {
  21347. "type": "string"
  21348. }
  21349. },
  21350. "key": {
  21351. "type": "string"
  21352. },
  21353. "options": {
  21354. "type": "object"
  21355. },
  21356. "models": {
  21357. "type": "object",
  21358. "additionalProperties": {
  21359. "$ref": "#/components/schemas/Model"
  21360. }
  21361. }
  21362. },
  21363. "required": ["id", "name", "source", "env", "options", "models"],
  21364. "additionalProperties": false
  21365. },
  21366. "ExperimentalCapabilities": {
  21367. "type": "object",
  21368. "properties": {
  21369. "backgroundSubagents": {
  21370. "type": "boolean"
  21371. }
  21372. },
  21373. "required": ["backgroundSubagents"],
  21374. "additionalProperties": false
  21375. },
  21376. "ConsoleState": {
  21377. "type": "object",
  21378. "properties": {
  21379. "consoleManagedProviders": {
  21380. "type": "array",
  21381. "items": {
  21382. "type": "string"
  21383. }
  21384. },
  21385. "activeOrgName": {
  21386. "type": "string"
  21387. },
  21388. "switchableOrgCount": {
  21389. "type": "integer",
  21390. "minimum": 0
  21391. }
  21392. },
  21393. "required": ["consoleManagedProviders", "switchableOrgCount"],
  21394. "additionalProperties": false
  21395. },
  21396. "effect_HttpApiError_InternalServerError": {
  21397. "type": "object",
  21398. "properties": {
  21399. "_tag": {
  21400. "type": "string",
  21401. "enum": ["InternalServerError"]
  21402. }
  21403. },
  21404. "required": ["_tag"],
  21405. "additionalProperties": false
  21406. },
  21407. "ToolListItem": {
  21408. "type": "object",
  21409. "properties": {
  21410. "id": {
  21411. "type": "string"
  21412. },
  21413. "description": {
  21414. "type": "string"
  21415. },
  21416. "parameters": {}
  21417. },
  21418. "required": ["id", "description", "parameters"],
  21419. "additionalProperties": false
  21420. },
  21421. "ToolList": {
  21422. "type": "array",
  21423. "items": {
  21424. "$ref": "#/components/schemas/ToolListItem"
  21425. }
  21426. },
  21427. "ToolIDs": {
  21428. "type": "array",
  21429. "items": {
  21430. "type": "string"
  21431. }
  21432. },
  21433. "WorktreeError": {
  21434. "type": "object",
  21435. "properties": {
  21436. "name": {
  21437. "type": "string",
  21438. "enum": [
  21439. "WorktreeNotGitError",
  21440. "WorktreeNameGenerationFailedError",
  21441. "WorktreeCreateFailedError",
  21442. "WorktreeStartCommandFailedError",
  21443. "WorktreeRemoveFailedError",
  21444. "WorktreeResetFailedError",
  21445. "WorktreeListFailedError"
  21446. ]
  21447. },
  21448. "data": {
  21449. "type": "object",
  21450. "properties": {
  21451. "message": {
  21452. "type": "string"
  21453. }
  21454. },
  21455. "required": ["message"],
  21456. "additionalProperties": false
  21457. }
  21458. },
  21459. "required": ["name", "data"],
  21460. "additionalProperties": false
  21461. },
  21462. "WorktreeCreateInput": {
  21463. "type": "object",
  21464. "properties": {
  21465. "name": {
  21466. "type": "string"
  21467. },
  21468. "startCommand": {
  21469. "type": "string",
  21470. "description": "Additional startup script to run after the project's start command"
  21471. }
  21472. },
  21473. "additionalProperties": false
  21474. },
  21475. "Worktree": {
  21476. "type": "object",
  21477. "properties": {
  21478. "name": {
  21479. "type": "string"
  21480. },
  21481. "branch": {
  21482. "type": "string"
  21483. },
  21484. "directory": {
  21485. "type": "string"
  21486. }
  21487. },
  21488. "required": ["name", "directory"],
  21489. "additionalProperties": false
  21490. },
  21491. "WorktreeRemoveInput": {
  21492. "type": "object",
  21493. "properties": {
  21494. "directory": {
  21495. "type": "string"
  21496. }
  21497. },
  21498. "required": ["directory"],
  21499. "additionalProperties": false
  21500. },
  21501. "WorktreeResetInput": {
  21502. "type": "object",
  21503. "properties": {
  21504. "directory": {
  21505. "type": "string"
  21506. }
  21507. },
  21508. "required": ["directory"],
  21509. "additionalProperties": false
  21510. },
  21511. "ProjectSummary": {
  21512. "type": "object",
  21513. "properties": {
  21514. "id": {
  21515. "type": "string"
  21516. },
  21517. "name": {
  21518. "type": "string"
  21519. },
  21520. "worktree": {
  21521. "type": "string"
  21522. }
  21523. },
  21524. "required": ["id", "worktree"],
  21525. "additionalProperties": false
  21526. },
  21527. "GlobalSession": {
  21528. "type": "object",
  21529. "properties": {
  21530. "id": {
  21531. "type": "string",
  21532. "pattern": "^ses"
  21533. },
  21534. "slug": {
  21535. "type": "string"
  21536. },
  21537. "projectID": {
  21538. "type": "string"
  21539. },
  21540. "workspaceID": {
  21541. "type": "string",
  21542. "pattern": "^wrk"
  21543. },
  21544. "directory": {
  21545. "type": "string"
  21546. },
  21547. "path": {
  21548. "type": "string"
  21549. },
  21550. "parentID": {
  21551. "type": "string",
  21552. "pattern": "^ses"
  21553. },
  21554. "summary": {
  21555. "type": "object",
  21556. "properties": {
  21557. "additions": {
  21558. "type": "number"
  21559. },
  21560. "deletions": {
  21561. "type": "number"
  21562. },
  21563. "files": {
  21564. "type": "number"
  21565. },
  21566. "diffs": {
  21567. "type": "array",
  21568. "items": {
  21569. "$ref": "#/components/schemas/SnapshotFileDiff"
  21570. }
  21571. }
  21572. },
  21573. "required": ["additions", "deletions", "files"],
  21574. "additionalProperties": false
  21575. },
  21576. "cost": {
  21577. "type": "number"
  21578. },
  21579. "tokens": {
  21580. "type": "object",
  21581. "properties": {
  21582. "input": {
  21583. "type": "number"
  21584. },
  21585. "output": {
  21586. "type": "number"
  21587. },
  21588. "reasoning": {
  21589. "type": "number"
  21590. },
  21591. "cache": {
  21592. "type": "object",
  21593. "properties": {
  21594. "read": {
  21595. "type": "number"
  21596. },
  21597. "write": {
  21598. "type": "number"
  21599. }
  21600. },
  21601. "required": ["read", "write"],
  21602. "additionalProperties": false
  21603. }
  21604. },
  21605. "required": ["input", "output", "reasoning", "cache"],
  21606. "additionalProperties": false
  21607. },
  21608. "share": {
  21609. "type": "object",
  21610. "properties": {
  21611. "url": {
  21612. "type": "string"
  21613. }
  21614. },
  21615. "required": ["url"],
  21616. "additionalProperties": false
  21617. },
  21618. "title": {
  21619. "type": "string"
  21620. },
  21621. "agent": {
  21622. "type": "string"
  21623. },
  21624. "model": {
  21625. "type": "object",
  21626. "properties": {
  21627. "id": {
  21628. "type": "string"
  21629. },
  21630. "providerID": {
  21631. "type": "string"
  21632. },
  21633. "variant": {
  21634. "type": "string"
  21635. }
  21636. },
  21637. "required": ["id", "providerID"],
  21638. "additionalProperties": false
  21639. },
  21640. "version": {
  21641. "type": "string"
  21642. },
  21643. "metadata": {
  21644. "type": "object"
  21645. },
  21646. "time": {
  21647. "type": "object",
  21648. "properties": {
  21649. "created": {
  21650. "type": "integer",
  21651. "minimum": 0
  21652. },
  21653. "updated": {
  21654. "type": "integer",
  21655. "minimum": 0
  21656. },
  21657. "compacting": {
  21658. "type": "integer",
  21659. "minimum": 0
  21660. },
  21661. "archived": {
  21662. "type": "number"
  21663. }
  21664. },
  21665. "required": ["created", "updated"],
  21666. "additionalProperties": false
  21667. },
  21668. "permission": {
  21669. "$ref": "#/components/schemas/PermissionRuleset"
  21670. },
  21671. "revert": {
  21672. "type": "object",
  21673. "properties": {
  21674. "messageID": {
  21675. "type": "string",
  21676. "pattern": "^msg"
  21677. },
  21678. "partID": {
  21679. "type": "string",
  21680. "pattern": "^prt"
  21681. },
  21682. "snapshot": {
  21683. "type": "string"
  21684. },
  21685. "diff": {
  21686. "type": "string"
  21687. }
  21688. },
  21689. "required": ["messageID"],
  21690. "additionalProperties": false
  21691. },
  21692. "project": {
  21693. "anyOf": [
  21694. {
  21695. "$ref": "#/components/schemas/ProjectSummary"
  21696. },
  21697. {
  21698. "type": "null"
  21699. }
  21700. ]
  21701. }
  21702. },
  21703. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  21704. "additionalProperties": false
  21705. },
  21706. "McpResource": {
  21707. "type": "object",
  21708. "properties": {
  21709. "name": {
  21710. "type": "string"
  21711. },
  21712. "uri": {
  21713. "type": "string"
  21714. },
  21715. "description": {
  21716. "type": "string"
  21717. },
  21718. "mimeType": {
  21719. "type": "string"
  21720. },
  21721. "client": {
  21722. "type": "string"
  21723. }
  21724. },
  21725. "required": ["name", "uri", "client"],
  21726. "additionalProperties": false
  21727. },
  21728. "Symbol": {
  21729. "type": "object",
  21730. "properties": {
  21731. "name": {
  21732. "type": "string"
  21733. },
  21734. "kind": {
  21735. "type": "integer",
  21736. "minimum": 0
  21737. },
  21738. "location": {
  21739. "type": "object",
  21740. "properties": {
  21741. "uri": {
  21742. "type": "string"
  21743. },
  21744. "range": {
  21745. "$ref": "#/components/schemas/Range"
  21746. }
  21747. },
  21748. "required": ["uri", "range"],
  21749. "additionalProperties": false
  21750. }
  21751. },
  21752. "required": ["name", "kind", "location"],
  21753. "additionalProperties": false
  21754. },
  21755. "FileNode": {
  21756. "type": "object",
  21757. "properties": {
  21758. "name": {
  21759. "type": "string"
  21760. },
  21761. "path": {
  21762. "type": "string"
  21763. },
  21764. "absolute": {
  21765. "type": "string"
  21766. },
  21767. "type": {
  21768. "type": "string",
  21769. "enum": ["file", "directory"]
  21770. },
  21771. "ignored": {
  21772. "type": "boolean"
  21773. }
  21774. },
  21775. "required": ["name", "path", "absolute", "type", "ignored"],
  21776. "additionalProperties": false
  21777. },
  21778. "FileContent": {
  21779. "type": "object",
  21780. "properties": {
  21781. "type": {
  21782. "type": "string",
  21783. "enum": ["text", "binary"]
  21784. },
  21785. "content": {
  21786. "type": "string"
  21787. },
  21788. "diff": {
  21789. "type": "string"
  21790. },
  21791. "patch": {
  21792. "type": "object",
  21793. "properties": {
  21794. "oldFileName": {
  21795. "type": "string"
  21796. },
  21797. "newFileName": {
  21798. "type": "string"
  21799. },
  21800. "oldHeader": {
  21801. "type": "string"
  21802. },
  21803. "newHeader": {
  21804. "type": "string"
  21805. },
  21806. "hunks": {
  21807. "type": "array",
  21808. "items": {
  21809. "type": "object",
  21810. "properties": {
  21811. "oldStart": {
  21812. "type": "integer",
  21813. "minimum": 0
  21814. },
  21815. "oldLines": {
  21816. "type": "integer",
  21817. "minimum": 0
  21818. },
  21819. "newStart": {
  21820. "type": "integer",
  21821. "minimum": 0
  21822. },
  21823. "newLines": {
  21824. "type": "integer",
  21825. "minimum": 0
  21826. },
  21827. "lines": {
  21828. "type": "array",
  21829. "items": {
  21830. "type": "string"
  21831. }
  21832. }
  21833. },
  21834. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  21835. "additionalProperties": false
  21836. }
  21837. },
  21838. "index": {
  21839. "type": "string"
  21840. }
  21841. },
  21842. "required": ["oldFileName", "newFileName", "hunks"],
  21843. "additionalProperties": false
  21844. },
  21845. "encoding": {
  21846. "type": "string",
  21847. "enum": ["base64"]
  21848. },
  21849. "mimeType": {
  21850. "type": "string"
  21851. }
  21852. },
  21853. "required": ["type", "content"],
  21854. "additionalProperties": false
  21855. },
  21856. "File": {
  21857. "type": "object",
  21858. "properties": {
  21859. "path": {
  21860. "type": "string"
  21861. },
  21862. "added": {
  21863. "type": "integer",
  21864. "minimum": 0
  21865. },
  21866. "removed": {
  21867. "type": "integer",
  21868. "minimum": 0
  21869. },
  21870. "status": {
  21871. "type": "string",
  21872. "enum": ["added", "deleted", "modified"]
  21873. }
  21874. },
  21875. "required": ["path", "added", "removed", "status"],
  21876. "additionalProperties": false
  21877. },
  21878. "Path": {
  21879. "type": "object",
  21880. "properties": {
  21881. "home": {
  21882. "type": "string"
  21883. },
  21884. "state": {
  21885. "type": "string"
  21886. },
  21887. "config": {
  21888. "type": "string"
  21889. },
  21890. "worktree": {
  21891. "type": "string"
  21892. },
  21893. "directory": {
  21894. "type": "string"
  21895. }
  21896. },
  21897. "required": ["home", "state", "config", "worktree", "directory"],
  21898. "additionalProperties": false
  21899. },
  21900. "VcsInfo": {
  21901. "type": "object",
  21902. "properties": {
  21903. "branch": {
  21904. "type": "string"
  21905. },
  21906. "default_branch": {
  21907. "type": "string"
  21908. }
  21909. },
  21910. "additionalProperties": false
  21911. },
  21912. "VcsFileStatus": {
  21913. "type": "object",
  21914. "properties": {
  21915. "file": {
  21916. "type": "string"
  21917. },
  21918. "additions": {
  21919. "type": "number"
  21920. },
  21921. "deletions": {
  21922. "type": "number"
  21923. },
  21924. "status": {
  21925. "type": "string",
  21926. "enum": ["added", "deleted", "modified"]
  21927. }
  21928. },
  21929. "required": ["file", "additions", "deletions", "status"],
  21930. "additionalProperties": false
  21931. },
  21932. "VcsFileDiff": {
  21933. "type": "object",
  21934. "properties": {
  21935. "file": {
  21936. "type": "string"
  21937. },
  21938. "patch": {
  21939. "type": "string"
  21940. },
  21941. "additions": {
  21942. "type": "number"
  21943. },
  21944. "deletions": {
  21945. "type": "number"
  21946. },
  21947. "status": {
  21948. "type": "string",
  21949. "enum": ["added", "deleted", "modified"]
  21950. }
  21951. },
  21952. "required": ["file", "additions", "deletions"],
  21953. "additionalProperties": false
  21954. },
  21955. "VcsApplyError": {
  21956. "type": "object",
  21957. "properties": {
  21958. "name": {
  21959. "type": "string",
  21960. "enum": ["VcsApplyError"]
  21961. },
  21962. "data": {
  21963. "type": "object",
  21964. "properties": {
  21965. "message": {
  21966. "type": "string"
  21967. },
  21968. "reason": {
  21969. "type": "string",
  21970. "enum": ["non-git", "not-clean"]
  21971. }
  21972. },
  21973. "required": ["message", "reason"],
  21974. "additionalProperties": false
  21975. }
  21976. },
  21977. "required": ["name", "data"],
  21978. "additionalProperties": false
  21979. },
  21980. "Command": {
  21981. "type": "object",
  21982. "properties": {
  21983. "name": {
  21984. "type": "string"
  21985. },
  21986. "description": {
  21987. "type": "string"
  21988. },
  21989. "agent": {
  21990. "type": "string"
  21991. },
  21992. "model": {
  21993. "type": "string"
  21994. },
  21995. "source": {
  21996. "type": "string",
  21997. "enum": ["command", "mcp", "skill"]
  21998. },
  21999. "template": {
  22000. "type": "string"
  22001. },
  22002. "subtask": {
  22003. "type": "boolean"
  22004. },
  22005. "hints": {
  22006. "type": "array",
  22007. "items": {
  22008. "type": "string"
  22009. }
  22010. }
  22011. },
  22012. "required": ["name", "template", "hints"],
  22013. "additionalProperties": false
  22014. },
  22015. "Agent": {
  22016. "type": "object",
  22017. "properties": {
  22018. "name": {
  22019. "type": "string"
  22020. },
  22021. "description": {
  22022. "type": "string"
  22023. },
  22024. "mode": {
  22025. "type": "string",
  22026. "enum": ["subagent", "primary", "all"]
  22027. },
  22028. "native": {
  22029. "type": "boolean"
  22030. },
  22031. "hidden": {
  22032. "type": "boolean"
  22033. },
  22034. "topP": {
  22035. "type": "number"
  22036. },
  22037. "temperature": {
  22038. "type": "number"
  22039. },
  22040. "color": {
  22041. "type": "string"
  22042. },
  22043. "permission": {
  22044. "$ref": "#/components/schemas/PermissionRuleset"
  22045. },
  22046. "model": {
  22047. "type": "object",
  22048. "properties": {
  22049. "modelID": {
  22050. "type": "string"
  22051. },
  22052. "providerID": {
  22053. "type": "string"
  22054. }
  22055. },
  22056. "required": ["modelID", "providerID"],
  22057. "additionalProperties": false
  22058. },
  22059. "variant": {
  22060. "type": "string"
  22061. },
  22062. "prompt": {
  22063. "type": "string"
  22064. },
  22065. "options": {
  22066. "type": "object"
  22067. },
  22068. "steps": {
  22069. "type": "number"
  22070. }
  22071. },
  22072. "required": ["name", "mode", "permission", "options"],
  22073. "additionalProperties": false
  22074. },
  22075. "LSPStatus": {
  22076. "type": "object",
  22077. "properties": {
  22078. "id": {
  22079. "type": "string"
  22080. },
  22081. "name": {
  22082. "type": "string"
  22083. },
  22084. "root": {
  22085. "type": "string"
  22086. },
  22087. "status": {
  22088. "type": "string",
  22089. "enum": ["connected", "error"]
  22090. }
  22091. },
  22092. "required": ["id", "name", "root", "status"],
  22093. "additionalProperties": false
  22094. },
  22095. "FormatterStatus": {
  22096. "type": "object",
  22097. "properties": {
  22098. "name": {
  22099. "type": "string"
  22100. },
  22101. "extensions": {
  22102. "type": "array",
  22103. "items": {
  22104. "type": "string"
  22105. }
  22106. },
  22107. "enabled": {
  22108. "type": "boolean"
  22109. }
  22110. },
  22111. "required": ["name", "extensions", "enabled"],
  22112. "additionalProperties": false
  22113. },
  22114. "MCPStatusConnected": {
  22115. "type": "object",
  22116. "properties": {
  22117. "status": {
  22118. "type": "string",
  22119. "enum": ["connected"]
  22120. }
  22121. },
  22122. "required": ["status"],
  22123. "additionalProperties": false
  22124. },
  22125. "MCPStatusDisabled": {
  22126. "type": "object",
  22127. "properties": {
  22128. "status": {
  22129. "type": "string",
  22130. "enum": ["disabled"]
  22131. }
  22132. },
  22133. "required": ["status"],
  22134. "additionalProperties": false
  22135. },
  22136. "MCPStatusFailed": {
  22137. "type": "object",
  22138. "properties": {
  22139. "status": {
  22140. "type": "string",
  22141. "enum": ["failed"]
  22142. },
  22143. "error": {
  22144. "type": "string"
  22145. }
  22146. },
  22147. "required": ["status", "error"],
  22148. "additionalProperties": false
  22149. },
  22150. "MCPStatusNeedsAuth": {
  22151. "type": "object",
  22152. "properties": {
  22153. "status": {
  22154. "type": "string",
  22155. "enum": ["needs_auth"]
  22156. }
  22157. },
  22158. "required": ["status"],
  22159. "additionalProperties": false
  22160. },
  22161. "MCPStatusNeedsClientRegistration": {
  22162. "type": "object",
  22163. "properties": {
  22164. "status": {
  22165. "type": "string",
  22166. "enum": ["needs_client_registration"]
  22167. },
  22168. "error": {
  22169. "type": "string"
  22170. }
  22171. },
  22172. "required": ["status", "error"],
  22173. "additionalProperties": false
  22174. },
  22175. "MCPStatus": {
  22176. "anyOf": [
  22177. {
  22178. "$ref": "#/components/schemas/MCPStatusConnected"
  22179. },
  22180. {
  22181. "$ref": "#/components/schemas/MCPStatusDisabled"
  22182. },
  22183. {
  22184. "$ref": "#/components/schemas/MCPStatusFailed"
  22185. },
  22186. {
  22187. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  22188. },
  22189. {
  22190. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  22191. }
  22192. ]
  22193. },
  22194. "McpUnsupportedOAuthError": {
  22195. "type": "object",
  22196. "properties": {
  22197. "error": {
  22198. "type": "string"
  22199. }
  22200. },
  22201. "required": ["error"],
  22202. "additionalProperties": false
  22203. },
  22204. "McpServerNotFoundError": {
  22205. "type": "object",
  22206. "properties": {
  22207. "_tag": {
  22208. "type": "string",
  22209. "enum": ["McpServerNotFoundError"]
  22210. },
  22211. "name": {
  22212. "type": "string"
  22213. },
  22214. "message": {
  22215. "type": "string"
  22216. }
  22217. },
  22218. "required": ["_tag", "name", "message"],
  22219. "additionalProperties": false
  22220. },
  22221. "Project": {
  22222. "type": "object",
  22223. "properties": {
  22224. "id": {
  22225. "type": "string"
  22226. },
  22227. "worktree": {
  22228. "type": "string"
  22229. },
  22230. "vcs": {
  22231. "$ref": "#/components/schemas/ProjectVcs"
  22232. },
  22233. "name": {
  22234. "type": "string"
  22235. },
  22236. "icon": {
  22237. "$ref": "#/components/schemas/ProjectIcon"
  22238. },
  22239. "commands": {
  22240. "$ref": "#/components/schemas/ProjectCommands"
  22241. },
  22242. "time": {
  22243. "$ref": "#/components/schemas/ProjectTime"
  22244. },
  22245. "sandboxes": {
  22246. "type": "array",
  22247. "items": {
  22248. "type": "string"
  22249. }
  22250. }
  22251. },
  22252. "required": ["id", "worktree", "time", "sandboxes"],
  22253. "additionalProperties": false
  22254. },
  22255. "ProjectNotFoundError": {
  22256. "type": "object",
  22257. "properties": {
  22258. "_tag": {
  22259. "type": "string",
  22260. "enum": ["ProjectNotFoundError"]
  22261. },
  22262. "projectID": {
  22263. "type": "string"
  22264. },
  22265. "message": {
  22266. "type": "string"
  22267. }
  22268. },
  22269. "required": ["_tag", "projectID", "message"],
  22270. "additionalProperties": false
  22271. },
  22272. "PtyNotFoundError": {
  22273. "type": "object",
  22274. "properties": {
  22275. "_tag": {
  22276. "type": "string",
  22277. "enum": ["PtyNotFoundError"]
  22278. },
  22279. "ptyID": {
  22280. "type": "string"
  22281. },
  22282. "message": {
  22283. "type": "string"
  22284. }
  22285. },
  22286. "required": ["_tag", "ptyID", "message"],
  22287. "additionalProperties": false
  22288. },
  22289. "PtyForbiddenError": {
  22290. "type": "object",
  22291. "properties": {
  22292. "_tag": {
  22293. "type": "string",
  22294. "enum": ["PtyForbiddenError"]
  22295. },
  22296. "message": {
  22297. "type": "string"
  22298. }
  22299. },
  22300. "required": ["_tag", "message"],
  22301. "additionalProperties": false
  22302. },
  22303. "QuestionRequest": {
  22304. "type": "object",
  22305. "properties": {
  22306. "id": {
  22307. "type": "string",
  22308. "pattern": "^que"
  22309. },
  22310. "sessionID": {
  22311. "type": "string",
  22312. "pattern": "^ses"
  22313. },
  22314. "questions": {
  22315. "type": "array",
  22316. "items": {
  22317. "$ref": "#/components/schemas/QuestionInfo"
  22318. },
  22319. "description": "Questions to ask"
  22320. },
  22321. "tool": {
  22322. "$ref": "#/components/schemas/QuestionTool"
  22323. }
  22324. },
  22325. "required": ["id", "sessionID", "questions"],
  22326. "additionalProperties": false
  22327. },
  22328. "QuestionNotFoundError": {
  22329. "type": "object",
  22330. "properties": {
  22331. "_tag": {
  22332. "type": "string",
  22333. "enum": ["QuestionNotFoundError"]
  22334. },
  22335. "requestID": {
  22336. "type": "string"
  22337. },
  22338. "message": {
  22339. "type": "string"
  22340. }
  22341. },
  22342. "required": ["_tag", "requestID", "message"],
  22343. "additionalProperties": false
  22344. },
  22345. "PermissionRequest": {
  22346. "type": "object",
  22347. "properties": {
  22348. "id": {
  22349. "type": "string",
  22350. "pattern": "^per"
  22351. },
  22352. "sessionID": {
  22353. "type": "string",
  22354. "pattern": "^ses"
  22355. },
  22356. "permission": {
  22357. "type": "string"
  22358. },
  22359. "patterns": {
  22360. "type": "array",
  22361. "items": {
  22362. "type": "string"
  22363. }
  22364. },
  22365. "metadata": {
  22366. "type": "object"
  22367. },
  22368. "always": {
  22369. "type": "array",
  22370. "items": {
  22371. "type": "string"
  22372. }
  22373. },
  22374. "tool": {
  22375. "type": "object",
  22376. "properties": {
  22377. "messageID": {
  22378. "type": "string"
  22379. },
  22380. "callID": {
  22381. "type": "string"
  22382. }
  22383. },
  22384. "required": ["messageID", "callID"],
  22385. "additionalProperties": false
  22386. }
  22387. },
  22388. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  22389. "additionalProperties": false
  22390. },
  22391. "PermissionNotFoundError": {
  22392. "type": "object",
  22393. "properties": {
  22394. "_tag": {
  22395. "type": "string",
  22396. "enum": ["PermissionNotFoundError"]
  22397. },
  22398. "requestID": {
  22399. "type": "string"
  22400. },
  22401. "message": {
  22402. "type": "string"
  22403. }
  22404. },
  22405. "required": ["_tag", "requestID", "message"],
  22406. "additionalProperties": false
  22407. },
  22408. "ProviderAuthMethod": {
  22409. "type": "object",
  22410. "properties": {
  22411. "type": {
  22412. "type": "string",
  22413. "enum": ["oauth", "api"]
  22414. },
  22415. "label": {
  22416. "type": "string"
  22417. },
  22418. "prompts": {
  22419. "type": "array",
  22420. "items": {
  22421. "anyOf": [
  22422. {
  22423. "type": "object",
  22424. "properties": {
  22425. "type": {
  22426. "type": "string",
  22427. "enum": ["text"]
  22428. },
  22429. "key": {
  22430. "type": "string"
  22431. },
  22432. "message": {
  22433. "type": "string"
  22434. },
  22435. "placeholder": {
  22436. "type": "string"
  22437. },
  22438. "when": {
  22439. "type": "object",
  22440. "properties": {
  22441. "key": {
  22442. "type": "string"
  22443. },
  22444. "op": {
  22445. "type": "string",
  22446. "enum": ["eq", "neq"]
  22447. },
  22448. "value": {
  22449. "type": "string"
  22450. }
  22451. },
  22452. "required": ["key", "op", "value"],
  22453. "additionalProperties": false
  22454. }
  22455. },
  22456. "required": ["type", "key", "message"],
  22457. "additionalProperties": false
  22458. },
  22459. {
  22460. "type": "object",
  22461. "properties": {
  22462. "type": {
  22463. "type": "string",
  22464. "enum": ["select"]
  22465. },
  22466. "key": {
  22467. "type": "string"
  22468. },
  22469. "message": {
  22470. "type": "string"
  22471. },
  22472. "options": {
  22473. "type": "array",
  22474. "items": {
  22475. "type": "object",
  22476. "properties": {
  22477. "label": {
  22478. "type": "string"
  22479. },
  22480. "value": {
  22481. "type": "string"
  22482. },
  22483. "hint": {
  22484. "type": "string"
  22485. }
  22486. },
  22487. "required": ["label", "value"],
  22488. "additionalProperties": false
  22489. }
  22490. },
  22491. "when": {
  22492. "type": "object",
  22493. "properties": {
  22494. "key": {
  22495. "type": "string"
  22496. },
  22497. "op": {
  22498. "type": "string",
  22499. "enum": ["eq", "neq"]
  22500. },
  22501. "value": {
  22502. "type": "string"
  22503. }
  22504. },
  22505. "required": ["key", "op", "value"],
  22506. "additionalProperties": false
  22507. }
  22508. },
  22509. "required": ["type", "key", "message", "options"],
  22510. "additionalProperties": false
  22511. }
  22512. ]
  22513. }
  22514. }
  22515. },
  22516. "required": ["type", "label"],
  22517. "additionalProperties": false
  22518. },
  22519. "ProviderAuthAuthorization": {
  22520. "type": "object",
  22521. "properties": {
  22522. "url": {
  22523. "type": "string"
  22524. },
  22525. "method": {
  22526. "type": "string",
  22527. "enum": ["auto", "code"]
  22528. },
  22529. "instructions": {
  22530. "type": "string"
  22531. }
  22532. },
  22533. "required": ["url", "method", "instructions"],
  22534. "additionalProperties": false
  22535. },
  22536. "ProviderAuthError1": {
  22537. "type": "object",
  22538. "properties": {
  22539. "name": {
  22540. "type": "string",
  22541. "enum": [
  22542. "BadRequest",
  22543. "ProviderAuthOauthMissing",
  22544. "ProviderAuthOauthCodeMissing",
  22545. "ProviderAuthOauthCallbackFailed",
  22546. "ProviderAuthValidationFailed"
  22547. ]
  22548. },
  22549. "data": {
  22550. "type": "object",
  22551. "properties": {
  22552. "providerID": {
  22553. "type": "string"
  22554. },
  22555. "field": {
  22556. "type": "string"
  22557. },
  22558. "message": {
  22559. "type": "string"
  22560. },
  22561. "kind": {
  22562. "type": "string"
  22563. }
  22564. },
  22565. "additionalProperties": false
  22566. }
  22567. },
  22568. "required": ["name", "data"],
  22569. "additionalProperties": false
  22570. },
  22571. "NotFoundError": {
  22572. "type": "object",
  22573. "required": ["name", "data"],
  22574. "properties": {
  22575. "name": {
  22576. "type": "string",
  22577. "enum": ["NotFoundError"]
  22578. },
  22579. "data": {
  22580. "type": "object",
  22581. "required": ["message"],
  22582. "properties": {
  22583. "message": {
  22584. "type": "string"
  22585. }
  22586. }
  22587. }
  22588. }
  22589. },
  22590. "TextPartInput": {
  22591. "type": "object",
  22592. "properties": {
  22593. "id": {
  22594. "type": "string",
  22595. "pattern": "^prt"
  22596. },
  22597. "type": {
  22598. "type": "string",
  22599. "enum": ["text"]
  22600. },
  22601. "text": {
  22602. "type": "string"
  22603. },
  22604. "synthetic": {
  22605. "type": "boolean"
  22606. },
  22607. "ignored": {
  22608. "type": "boolean"
  22609. },
  22610. "time": {
  22611. "type": "object",
  22612. "properties": {
  22613. "start": {
  22614. "type": "integer",
  22615. "minimum": 0
  22616. },
  22617. "end": {
  22618. "type": "integer",
  22619. "minimum": 0
  22620. }
  22621. },
  22622. "required": ["start"],
  22623. "additionalProperties": false
  22624. },
  22625. "metadata": {
  22626. "type": "object"
  22627. }
  22628. },
  22629. "required": ["type", "text"],
  22630. "additionalProperties": false
  22631. },
  22632. "FilePartInput": {
  22633. "type": "object",
  22634. "properties": {
  22635. "id": {
  22636. "type": "string",
  22637. "pattern": "^prt"
  22638. },
  22639. "type": {
  22640. "type": "string",
  22641. "enum": ["file"]
  22642. },
  22643. "mime": {
  22644. "type": "string"
  22645. },
  22646. "filename": {
  22647. "type": "string"
  22648. },
  22649. "url": {
  22650. "type": "string"
  22651. },
  22652. "source": {
  22653. "$ref": "#/components/schemas/FilePartSource"
  22654. }
  22655. },
  22656. "required": ["type", "mime", "url"],
  22657. "additionalProperties": false
  22658. },
  22659. "AgentPartInput": {
  22660. "type": "object",
  22661. "properties": {
  22662. "id": {
  22663. "type": "string",
  22664. "pattern": "^prt"
  22665. },
  22666. "type": {
  22667. "type": "string",
  22668. "enum": ["agent"]
  22669. },
  22670. "name": {
  22671. "type": "string"
  22672. },
  22673. "source": {
  22674. "type": "object",
  22675. "properties": {
  22676. "value": {
  22677. "type": "string"
  22678. },
  22679. "start": {
  22680. "type": "integer",
  22681. "minimum": 0
  22682. },
  22683. "end": {
  22684. "type": "integer",
  22685. "minimum": 0
  22686. }
  22687. },
  22688. "required": ["value", "start", "end"],
  22689. "additionalProperties": false
  22690. }
  22691. },
  22692. "required": ["type", "name"],
  22693. "additionalProperties": false
  22694. },
  22695. "SubtaskPartInput": {
  22696. "type": "object",
  22697. "properties": {
  22698. "id": {
  22699. "type": "string",
  22700. "pattern": "^prt"
  22701. },
  22702. "type": {
  22703. "type": "string",
  22704. "enum": ["subtask"]
  22705. },
  22706. "prompt": {
  22707. "type": "string"
  22708. },
  22709. "description": {
  22710. "type": "string"
  22711. },
  22712. "agent": {
  22713. "type": "string"
  22714. },
  22715. "model": {
  22716. "type": "object",
  22717. "properties": {
  22718. "providerID": {
  22719. "type": "string"
  22720. },
  22721. "modelID": {
  22722. "type": "string"
  22723. }
  22724. },
  22725. "required": ["providerID", "modelID"],
  22726. "additionalProperties": false
  22727. },
  22728. "command": {
  22729. "type": "string"
  22730. }
  22731. },
  22732. "required": ["type", "prompt", "description", "agent"],
  22733. "additionalProperties": false
  22734. },
  22735. "SessionBusyError": {
  22736. "type": "object",
  22737. "properties": {
  22738. "_tag": {
  22739. "type": "string",
  22740. "enum": ["SessionBusyError"]
  22741. },
  22742. "sessionID": {
  22743. "type": "string"
  22744. },
  22745. "message": {
  22746. "type": "string"
  22747. }
  22748. },
  22749. "required": ["_tag", "sessionID", "message"],
  22750. "additionalProperties": false
  22751. },
  22752. "EventTuiPromptAppend": {
  22753. "type": "object",
  22754. "properties": {
  22755. "type": {
  22756. "type": "string",
  22757. "enum": ["tui.prompt.append"]
  22758. },
  22759. "properties": {
  22760. "type": "object",
  22761. "properties": {
  22762. "text": {
  22763. "type": "string"
  22764. }
  22765. },
  22766. "required": ["text"],
  22767. "additionalProperties": false
  22768. }
  22769. },
  22770. "required": ["type", "properties"],
  22771. "additionalProperties": false
  22772. },
  22773. "EventTuiCommandExecute": {
  22774. "type": "object",
  22775. "properties": {
  22776. "type": {
  22777. "type": "string",
  22778. "enum": ["tui.command.execute"]
  22779. },
  22780. "properties": {
  22781. "type": "object",
  22782. "properties": {
  22783. "command": {
  22784. "anyOf": [
  22785. {
  22786. "type": "string",
  22787. "enum": [
  22788. "session.list",
  22789. "session.new",
  22790. "session.share",
  22791. "session.interrupt",
  22792. "session.compact",
  22793. "session.page.up",
  22794. "session.page.down",
  22795. "session.line.up",
  22796. "session.line.down",
  22797. "session.half.page.up",
  22798. "session.half.page.down",
  22799. "session.first",
  22800. "session.last",
  22801. "prompt.clear",
  22802. "prompt.submit",
  22803. "agent.cycle"
  22804. ]
  22805. },
  22806. {
  22807. "type": "string"
  22808. }
  22809. ]
  22810. }
  22811. },
  22812. "required": ["command"],
  22813. "additionalProperties": false
  22814. }
  22815. },
  22816. "required": ["type", "properties"],
  22817. "additionalProperties": false
  22818. },
  22819. "EventTuiToastShow": {
  22820. "type": "object",
  22821. "properties": {
  22822. "type": {
  22823. "type": "string",
  22824. "enum": ["tui.toast.show"]
  22825. },
  22826. "properties": {
  22827. "type": "object",
  22828. "properties": {
  22829. "title": {
  22830. "type": "string"
  22831. },
  22832. "message": {
  22833. "type": "string"
  22834. },
  22835. "variant": {
  22836. "type": "string",
  22837. "enum": ["info", "success", "warning", "error"]
  22838. },
  22839. "duration": {
  22840. "type": "integer",
  22841. "exclusiveMinimum": 0
  22842. }
  22843. },
  22844. "required": ["message", "variant"],
  22845. "additionalProperties": false
  22846. }
  22847. },
  22848. "required": ["type", "properties"],
  22849. "additionalProperties": false
  22850. },
  22851. "EventTuiSessionSelect": {
  22852. "type": "object",
  22853. "properties": {
  22854. "type": {
  22855. "type": "string",
  22856. "enum": ["tui.session.select"]
  22857. },
  22858. "properties": {
  22859. "type": "object",
  22860. "properties": {
  22861. "sessionID": {
  22862. "type": "string",
  22863. "pattern": "^ses",
  22864. "description": "Session ID to navigate to"
  22865. }
  22866. },
  22867. "required": ["sessionID"],
  22868. "additionalProperties": false
  22869. }
  22870. },
  22871. "required": ["type", "properties"],
  22872. "additionalProperties": false
  22873. },
  22874. "Workspace": {
  22875. "type": "object",
  22876. "properties": {
  22877. "id": {
  22878. "type": "string",
  22879. "pattern": "^wrk"
  22880. },
  22881. "type": {
  22882. "type": "string"
  22883. },
  22884. "name": {
  22885. "type": "string"
  22886. },
  22887. "branch": {
  22888. "anyOf": [
  22889. {
  22890. "type": "string"
  22891. },
  22892. {
  22893. "type": "null"
  22894. }
  22895. ]
  22896. },
  22897. "directory": {
  22898. "anyOf": [
  22899. {
  22900. "type": "string"
  22901. },
  22902. {
  22903. "type": "null"
  22904. }
  22905. ]
  22906. },
  22907. "extra": {
  22908. "anyOf": [
  22909. {},
  22910. {
  22911. "type": "null"
  22912. }
  22913. ]
  22914. },
  22915. "projectID": {
  22916. "type": "string"
  22917. },
  22918. "timeUsed": {
  22919. "anyOf": [
  22920. {
  22921. "type": "number"
  22922. },
  22923. {
  22924. "type": "string",
  22925. "enum": ["NaN"]
  22926. },
  22927. {
  22928. "type": "string",
  22929. "enum": ["Infinity"]
  22930. },
  22931. {
  22932. "type": "string",
  22933. "enum": ["-Infinity"]
  22934. },
  22935. {
  22936. "type": "string",
  22937. "enum": ["Infinity", "-Infinity", "NaN"]
  22938. }
  22939. ]
  22940. }
  22941. },
  22942. "required": ["id", "type", "name", "projectID", "timeUsed"],
  22943. "additionalProperties": false
  22944. },
  22945. "WorkspaceCreateError": {
  22946. "type": "object",
  22947. "properties": {
  22948. "name": {
  22949. "type": "string",
  22950. "enum": ["WorkspaceCreateError"]
  22951. },
  22952. "data": {
  22953. "type": "object",
  22954. "properties": {
  22955. "message": {
  22956. "type": "string"
  22957. }
  22958. },
  22959. "required": ["message"],
  22960. "additionalProperties": false
  22961. }
  22962. },
  22963. "required": ["name", "data"],
  22964. "additionalProperties": false
  22965. },
  22966. "WorkspaceWarpError": {
  22967. "type": "object",
  22968. "properties": {
  22969. "name": {
  22970. "type": "string",
  22971. "enum": ["WorkspaceWarpError"]
  22972. },
  22973. "data": {
  22974. "type": "object",
  22975. "properties": {
  22976. "message": {
  22977. "type": "string"
  22978. }
  22979. },
  22980. "required": ["message"],
  22981. "additionalProperties": false
  22982. }
  22983. },
  22984. "required": ["name", "data"],
  22985. "additionalProperties": false
  22986. },
  22987. "UnauthorizedError": {
  22988. "type": "object",
  22989. "properties": {
  22990. "_tag": {
  22991. "type": "string",
  22992. "enum": ["UnauthorizedError"]
  22993. },
  22994. "message": {
  22995. "type": "string"
  22996. }
  22997. },
  22998. "required": ["_tag", "message"],
  22999. "additionalProperties": false
  23000. },
  23001. "SessionsResponse": {
  23002. "type": "object",
  23003. "properties": {
  23004. "data": {
  23005. "type": "array",
  23006. "items": {
  23007. "$ref": "#/components/schemas/SessionV2Info"
  23008. }
  23009. },
  23010. "cursor": {
  23011. "type": "object",
  23012. "properties": {
  23013. "previous": {
  23014. "type": "string"
  23015. },
  23016. "next": {
  23017. "type": "string"
  23018. }
  23019. },
  23020. "additionalProperties": false
  23021. }
  23022. },
  23023. "required": ["data", "cursor"],
  23024. "additionalProperties": false
  23025. },
  23026. "InvalidCursorError": {
  23027. "type": "object",
  23028. "properties": {
  23029. "_tag": {
  23030. "type": "string",
  23031. "enum": ["InvalidCursorError"]
  23032. },
  23033. "message": {
  23034. "type": "string"
  23035. }
  23036. },
  23037. "required": ["_tag", "message"],
  23038. "additionalProperties": false
  23039. },
  23040. "SessionNotFoundError": {
  23041. "type": "object",
  23042. "properties": {
  23043. "_tag": {
  23044. "type": "string",
  23045. "enum": ["SessionNotFoundError"]
  23046. },
  23047. "sessionID": {
  23048. "type": "string"
  23049. },
  23050. "message": {
  23051. "type": "string"
  23052. }
  23053. },
  23054. "required": ["_tag", "sessionID", "message"],
  23055. "additionalProperties": false
  23056. },
  23057. "ConflictError": {
  23058. "type": "object",
  23059. "properties": {
  23060. "_tag": {
  23061. "type": "string",
  23062. "enum": ["ConflictError"]
  23063. },
  23064. "message": {
  23065. "type": "string"
  23066. },
  23067. "resource": {
  23068. "type": "string"
  23069. }
  23070. },
  23071. "required": ["_tag", "message"],
  23072. "additionalProperties": false
  23073. },
  23074. "ServiceUnavailableError": {
  23075. "type": "object",
  23076. "properties": {
  23077. "_tag": {
  23078. "type": "string",
  23079. "enum": ["ServiceUnavailableError"]
  23080. },
  23081. "message": {
  23082. "type": "string"
  23083. },
  23084. "service": {
  23085. "type": "string"
  23086. }
  23087. },
  23088. "required": ["_tag", "message"],
  23089. "additionalProperties": false
  23090. },
  23091. "MessageNotFoundError": {
  23092. "type": "object",
  23093. "properties": {
  23094. "_tag": {
  23095. "type": "string",
  23096. "enum": ["MessageNotFoundError"]
  23097. },
  23098. "sessionID": {
  23099. "type": "string"
  23100. },
  23101. "messageID": {
  23102. "type": "string"
  23103. },
  23104. "message": {
  23105. "type": "string"
  23106. }
  23107. },
  23108. "required": ["_tag", "sessionID", "messageID", "message"],
  23109. "additionalProperties": false
  23110. },
  23111. "UnknownError1": {
  23112. "type": "object",
  23113. "properties": {
  23114. "_tag": {
  23115. "type": "string",
  23116. "enum": ["UnknownError"]
  23117. },
  23118. "message": {
  23119. "type": "string"
  23120. },
  23121. "ref": {
  23122. "type": "string"
  23123. }
  23124. },
  23125. "required": ["_tag", "message"],
  23126. "additionalProperties": false
  23127. },
  23128. "SessionMessagesResponse": {
  23129. "type": "object",
  23130. "properties": {
  23131. "data": {
  23132. "type": "array",
  23133. "items": {
  23134. "$ref": "#/components/schemas/SessionMessage"
  23135. }
  23136. },
  23137. "cursor": {
  23138. "type": "object",
  23139. "properties": {
  23140. "previous": {
  23141. "type": "string"
  23142. },
  23143. "next": {
  23144. "type": "string"
  23145. }
  23146. },
  23147. "additionalProperties": false
  23148. }
  23149. },
  23150. "required": ["data", "cursor"],
  23151. "additionalProperties": false
  23152. },
  23153. "ProviderNotFoundError": {
  23154. "type": "object",
  23155. "properties": {
  23156. "_tag": {
  23157. "type": "string",
  23158. "enum": ["ProviderNotFoundError"]
  23159. },
  23160. "providerID": {
  23161. "type": "string"
  23162. },
  23163. "message": {
  23164. "type": "string"
  23165. }
  23166. },
  23167. "required": ["_tag", "providerID", "message"],
  23168. "additionalProperties": false
  23169. },
  23170. "V2Event": {
  23171. "anyOf": [
  23172. {
  23173. "$ref": "#/components/schemas/V2EventModels-devRefreshed"
  23174. },
  23175. {
  23176. "$ref": "#/components/schemas/V2EventIntegrationUpdated"
  23177. },
  23178. {
  23179. "$ref": "#/components/schemas/V2EventIntegrationConnectionUpdated"
  23180. },
  23181. {
  23182. "$ref": "#/components/schemas/V2EventCatalogUpdated"
  23183. },
  23184. {
  23185. "$ref": "#/components/schemas/V2EventSessionCreated"
  23186. },
  23187. {
  23188. "$ref": "#/components/schemas/V2EventSessionUpdated"
  23189. },
  23190. {
  23191. "$ref": "#/components/schemas/V2EventSessionDeleted"
  23192. },
  23193. {
  23194. "$ref": "#/components/schemas/V2EventMessageUpdated"
  23195. },
  23196. {
  23197. "$ref": "#/components/schemas/V2EventMessageRemoved"
  23198. },
  23199. {
  23200. "$ref": "#/components/schemas/V2EventMessagePartUpdated"
  23201. },
  23202. {
  23203. "$ref": "#/components/schemas/V2EventMessagePartRemoved"
  23204. },
  23205. {
  23206. "$ref": "#/components/schemas/V2EventSessionNextAgentSwitched"
  23207. },
  23208. {
  23209. "$ref": "#/components/schemas/V2EventSessionNextModelSwitched"
  23210. },
  23211. {
  23212. "$ref": "#/components/schemas/V2EventSessionNextMoved"
  23213. },
  23214. {
  23215. "$ref": "#/components/schemas/V2EventSessionNextPrompted"
  23216. },
  23217. {
  23218. "$ref": "#/components/schemas/V2EventSessionNextPromptAdmitted"
  23219. },
  23220. {
  23221. "$ref": "#/components/schemas/V2EventSessionNextContextUpdated"
  23222. },
  23223. {
  23224. "$ref": "#/components/schemas/V2EventSessionNextSynthetic"
  23225. },
  23226. {
  23227. "$ref": "#/components/schemas/V2EventSessionNextShellStarted"
  23228. },
  23229. {
  23230. "$ref": "#/components/schemas/V2EventSessionNextShellEnded"
  23231. },
  23232. {
  23233. "$ref": "#/components/schemas/V2EventSessionNextStepStarted"
  23234. },
  23235. {
  23236. "$ref": "#/components/schemas/V2EventSessionNextStepEnded"
  23237. },
  23238. {
  23239. "$ref": "#/components/schemas/V2EventSessionNextStepFailed"
  23240. },
  23241. {
  23242. "$ref": "#/components/schemas/V2EventSessionNextTextStarted"
  23243. },
  23244. {
  23245. "$ref": "#/components/schemas/V2EventSessionNextTextDelta"
  23246. },
  23247. {
  23248. "$ref": "#/components/schemas/V2EventSessionNextTextEnded"
  23249. },
  23250. {
  23251. "$ref": "#/components/schemas/V2EventSessionNextReasoningStarted"
  23252. },
  23253. {
  23254. "$ref": "#/components/schemas/V2EventSessionNextReasoningDelta"
  23255. },
  23256. {
  23257. "$ref": "#/components/schemas/V2EventSessionNextReasoningEnded"
  23258. },
  23259. {
  23260. "$ref": "#/components/schemas/V2EventSessionNextToolInputStarted"
  23261. },
  23262. {
  23263. "$ref": "#/components/schemas/V2EventSessionNextToolInputDelta"
  23264. },
  23265. {
  23266. "$ref": "#/components/schemas/V2EventSessionNextToolInputEnded"
  23267. },
  23268. {
  23269. "$ref": "#/components/schemas/V2EventSessionNextToolCalled"
  23270. },
  23271. {
  23272. "$ref": "#/components/schemas/V2EventSessionNextToolProgress"
  23273. },
  23274. {
  23275. "$ref": "#/components/schemas/V2EventSessionNextToolSuccess"
  23276. },
  23277. {
  23278. "$ref": "#/components/schemas/V2EventSessionNextToolFailed"
  23279. },
  23280. {
  23281. "$ref": "#/components/schemas/V2EventSessionNextRetried"
  23282. },
  23283. {
  23284. "$ref": "#/components/schemas/V2EventSessionNextCompactionStarted"
  23285. },
  23286. {
  23287. "$ref": "#/components/schemas/V2EventSessionNextCompactionDelta"
  23288. },
  23289. {
  23290. "$ref": "#/components/schemas/V2EventSessionNextCompactionEnded"
  23291. },
  23292. {
  23293. "$ref": "#/components/schemas/V2EventSessionNextRevertStaged"
  23294. },
  23295. {
  23296. "$ref": "#/components/schemas/V2EventSessionNextRevertCleared"
  23297. },
  23298. {
  23299. "$ref": "#/components/schemas/V2EventSessionNextRevertCommitted"
  23300. },
  23301. {
  23302. "$ref": "#/components/schemas/V2EventMessagePartDelta"
  23303. },
  23304. {
  23305. "$ref": "#/components/schemas/V2EventSessionDiff"
  23306. },
  23307. {
  23308. "$ref": "#/components/schemas/V2EventSessionError"
  23309. },
  23310. {
  23311. "$ref": "#/components/schemas/V2EventInstallationUpdated"
  23312. },
  23313. {
  23314. "$ref": "#/components/schemas/V2EventInstallationUpdate-available"
  23315. },
  23316. {
  23317. "$ref": "#/components/schemas/V2EventFileEdited"
  23318. },
  23319. {
  23320. "$ref": "#/components/schemas/V2EventReferenceUpdated"
  23321. },
  23322. {
  23323. "$ref": "#/components/schemas/V2EventPermissionV2Asked"
  23324. },
  23325. {
  23326. "$ref": "#/components/schemas/V2EventPermissionV2Replied"
  23327. },
  23328. {
  23329. "$ref": "#/components/schemas/V2EventPluginAdded"
  23330. },
  23331. {
  23332. "$ref": "#/components/schemas/V2EventProjectDirectoriesUpdated"
  23333. },
  23334. {
  23335. "$ref": "#/components/schemas/V2EventFileWatcherUpdated"
  23336. },
  23337. {
  23338. "$ref": "#/components/schemas/V2EventPtyCreated"
  23339. },
  23340. {
  23341. "$ref": "#/components/schemas/V2EventPtyUpdated"
  23342. },
  23343. {
  23344. "$ref": "#/components/schemas/V2EventPtyExited"
  23345. },
  23346. {
  23347. "$ref": "#/components/schemas/V2EventPtyDeleted"
  23348. },
  23349. {
  23350. "$ref": "#/components/schemas/V2EventQuestionV2Asked"
  23351. },
  23352. {
  23353. "$ref": "#/components/schemas/V2EventQuestionV2Replied"
  23354. },
  23355. {
  23356. "$ref": "#/components/schemas/V2EventQuestionV2Rejected"
  23357. },
  23358. {
  23359. "$ref": "#/components/schemas/V2EventTodoUpdated"
  23360. },
  23361. {
  23362. "$ref": "#/components/schemas/V2EventLspUpdated"
  23363. },
  23364. {
  23365. "$ref": "#/components/schemas/V2EventPermissionAsked"
  23366. },
  23367. {
  23368. "$ref": "#/components/schemas/V2EventPermissionReplied"
  23369. },
  23370. {
  23371. "$ref": "#/components/schemas/V2EventTuiPromptAppend"
  23372. },
  23373. {
  23374. "$ref": "#/components/schemas/V2EventTuiCommandExecute"
  23375. },
  23376. {
  23377. "$ref": "#/components/schemas/V2EventTuiToastShow"
  23378. },
  23379. {
  23380. "$ref": "#/components/schemas/V2EventTuiSessionSelect"
  23381. },
  23382. {
  23383. "$ref": "#/components/schemas/V2EventMcpToolsChanged"
  23384. },
  23385. {
  23386. "$ref": "#/components/schemas/V2EventMcpBrowserOpenFailed"
  23387. },
  23388. {
  23389. "$ref": "#/components/schemas/V2EventCommandExecuted"
  23390. },
  23391. {
  23392. "$ref": "#/components/schemas/V2EventProjectUpdated"
  23393. },
  23394. {
  23395. "$ref": "#/components/schemas/V2EventSessionStatus"
  23396. },
  23397. {
  23398. "$ref": "#/components/schemas/V2EventSessionIdle"
  23399. },
  23400. {
  23401. "$ref": "#/components/schemas/V2EventQuestionAsked"
  23402. },
  23403. {
  23404. "$ref": "#/components/schemas/V2EventQuestionReplied"
  23405. },
  23406. {
  23407. "$ref": "#/components/schemas/V2EventQuestionRejected"
  23408. },
  23409. {
  23410. "$ref": "#/components/schemas/V2EventSessionCompacted"
  23411. },
  23412. {
  23413. "$ref": "#/components/schemas/V2EventVcsBranchUpdated"
  23414. },
  23415. {
  23416. "$ref": "#/components/schemas/V2EventWorkspaceReady"
  23417. },
  23418. {
  23419. "$ref": "#/components/schemas/V2EventWorkspaceFailed"
  23420. },
  23421. {
  23422. "$ref": "#/components/schemas/V2EventWorkspaceStatus"
  23423. },
  23424. {
  23425. "$ref": "#/components/schemas/V2EventWorktreeReady"
  23426. },
  23427. {
  23428. "$ref": "#/components/schemas/V2EventWorktreeFailed"
  23429. },
  23430. {
  23431. "$ref": "#/components/schemas/V2EventServerConnected"
  23432. },
  23433. {
  23434. "$ref": "#/components/schemas/V2EventGlobalDisposed"
  23435. }
  23436. ]
  23437. },
  23438. "ForbiddenError": {
  23439. "type": "object",
  23440. "properties": {
  23441. "_tag": {
  23442. "type": "string",
  23443. "enum": ["ForbiddenError"]
  23444. },
  23445. "message": {
  23446. "type": "string"
  23447. }
  23448. },
  23449. "required": ["_tag", "message"],
  23450. "additionalProperties": false
  23451. },
  23452. "ProjectCopyError": {
  23453. "type": "object",
  23454. "properties": {
  23455. "name": {
  23456. "type": "string",
  23457. "enum": ["ProjectCopyError"]
  23458. },
  23459. "data": {
  23460. "type": "object",
  23461. "properties": {
  23462. "message": {
  23463. "type": "string"
  23464. },
  23465. "forceRequired": {
  23466. "type": "boolean"
  23467. }
  23468. },
  23469. "required": ["message"],
  23470. "additionalProperties": false
  23471. }
  23472. },
  23473. "required": ["name", "data"],
  23474. "additionalProperties": false
  23475. },
  23476. "effect_HttpApiError_Forbidden": {
  23477. "type": "object",
  23478. "properties": {
  23479. "_tag": {
  23480. "type": "string",
  23481. "enum": ["Forbidden"]
  23482. }
  23483. },
  23484. "required": ["_tag"],
  23485. "additionalProperties": false
  23486. },
  23487. "Event.tui.prompt.append": {
  23488. "type": "object",
  23489. "properties": {
  23490. "id": {
  23491. "type": "string",
  23492. "pattern": "^evt_"
  23493. },
  23494. "type": {
  23495. "type": "string",
  23496. "enum": ["tui.prompt.append"]
  23497. },
  23498. "properties": {
  23499. "type": "object",
  23500. "properties": {
  23501. "text": {
  23502. "type": "string"
  23503. }
  23504. },
  23505. "required": ["text"],
  23506. "additionalProperties": false
  23507. }
  23508. },
  23509. "required": ["id", "type", "properties"],
  23510. "additionalProperties": false
  23511. },
  23512. "Event.tui.command.execute": {
  23513. "type": "object",
  23514. "properties": {
  23515. "id": {
  23516. "type": "string",
  23517. "pattern": "^evt_"
  23518. },
  23519. "type": {
  23520. "type": "string",
  23521. "enum": ["tui.command.execute"]
  23522. },
  23523. "properties": {
  23524. "type": "object",
  23525. "properties": {
  23526. "command": {
  23527. "anyOf": [
  23528. {
  23529. "type": "string",
  23530. "enum": [
  23531. "session.list",
  23532. "session.new",
  23533. "session.share",
  23534. "session.interrupt",
  23535. "session.compact",
  23536. "session.page.up",
  23537. "session.page.down",
  23538. "session.line.up",
  23539. "session.line.down",
  23540. "session.half.page.up",
  23541. "session.half.page.down",
  23542. "session.first",
  23543. "session.last",
  23544. "prompt.clear",
  23545. "prompt.submit",
  23546. "agent.cycle"
  23547. ]
  23548. },
  23549. {
  23550. "type": "string"
  23551. }
  23552. ]
  23553. }
  23554. },
  23555. "required": ["command"],
  23556. "additionalProperties": false
  23557. }
  23558. },
  23559. "required": ["id", "type", "properties"],
  23560. "additionalProperties": false
  23561. },
  23562. "Event.tui.toast.show": {
  23563. "type": "object",
  23564. "properties": {
  23565. "id": {
  23566. "type": "string",
  23567. "pattern": "^evt_"
  23568. },
  23569. "type": {
  23570. "type": "string",
  23571. "enum": ["tui.toast.show"]
  23572. },
  23573. "properties": {
  23574. "type": "object",
  23575. "properties": {
  23576. "title": {
  23577. "type": "string"
  23578. },
  23579. "message": {
  23580. "type": "string"
  23581. },
  23582. "variant": {
  23583. "type": "string",
  23584. "enum": ["info", "success", "warning", "error"]
  23585. },
  23586. "duration": {
  23587. "type": "integer",
  23588. "exclusiveMinimum": 0
  23589. }
  23590. },
  23591. "required": ["message", "variant"],
  23592. "additionalProperties": false
  23593. }
  23594. },
  23595. "required": ["id", "type", "properties"],
  23596. "additionalProperties": false
  23597. },
  23598. "Event.tui.session.select": {
  23599. "type": "object",
  23600. "properties": {
  23601. "id": {
  23602. "type": "string",
  23603. "pattern": "^evt_"
  23604. },
  23605. "type": {
  23606. "type": "string",
  23607. "enum": ["tui.session.select"]
  23608. },
  23609. "properties": {
  23610. "type": "object",
  23611. "properties": {
  23612. "sessionID": {
  23613. "type": "string",
  23614. "pattern": "^ses",
  23615. "description": "Session ID to navigate to"
  23616. }
  23617. },
  23618. "required": ["sessionID"],
  23619. "additionalProperties": false
  23620. }
  23621. },
  23622. "required": ["id", "type", "properties"],
  23623. "additionalProperties": false
  23624. },
  23625. "CredentialValue": {
  23626. "anyOf": [
  23627. {
  23628. "$ref": "#/components/schemas/CredentialOAuth"
  23629. },
  23630. {
  23631. "$ref": "#/components/schemas/CredentialKey"
  23632. }
  23633. ]
  23634. },
  23635. "IntegrationInputs": {
  23636. "type": "object",
  23637. "additionalProperties": {
  23638. "type": "string"
  23639. }
  23640. },
  23641. "IntegrationMethod": {
  23642. "anyOf": [
  23643. {
  23644. "$ref": "#/components/schemas/IntegrationOAuthMethod"
  23645. },
  23646. {
  23647. "$ref": "#/components/schemas/IntegrationKeyMethod"
  23648. },
  23649. {
  23650. "$ref": "#/components/schemas/IntegrationEnvMethod"
  23651. }
  23652. ]
  23653. },
  23654. "IntegrationRef": {
  23655. "type": "object",
  23656. "properties": {
  23657. "id": {
  23658. "type": "string"
  23659. },
  23660. "name": {
  23661. "type": "string"
  23662. }
  23663. },
  23664. "required": ["id", "name"],
  23665. "additionalProperties": false
  23666. },
  23667. "SkillV2Source": {
  23668. "anyOf": [
  23669. {
  23670. "$ref": "#/components/schemas/SkillV2DirectorySource"
  23671. },
  23672. {
  23673. "$ref": "#/components/schemas/SkillV2UrlSource"
  23674. },
  23675. {
  23676. "$ref": "#/components/schemas/SkillV2EmbeddedSource"
  23677. }
  23678. ]
  23679. },
  23680. "MoveSessionDestination": {
  23681. "type": "object",
  23682. "properties": {
  23683. "directory": {
  23684. "type": "string"
  23685. }
  23686. },
  23687. "required": ["directory"],
  23688. "additionalProperties": false
  23689. },
  23690. "ModelRef": {
  23691. "type": "object",
  23692. "properties": {
  23693. "id": {
  23694. "type": "string"
  23695. },
  23696. "providerID": {
  23697. "type": "string"
  23698. },
  23699. "variant": {
  23700. "type": "string"
  23701. }
  23702. },
  23703. "required": ["id", "providerID"],
  23704. "additionalProperties": false
  23705. },
  23706. "LocationRef": {
  23707. "type": "object",
  23708. "properties": {
  23709. "directory": {
  23710. "type": "string"
  23711. },
  23712. "workspaceID": {
  23713. "type": "string",
  23714. "pattern": "^wrk"
  23715. }
  23716. },
  23717. "required": ["directory"],
  23718. "additionalProperties": false
  23719. },
  23720. "PromptSource": {
  23721. "type": "object",
  23722. "properties": {
  23723. "start": {
  23724. "type": "number"
  23725. },
  23726. "end": {
  23727. "type": "number"
  23728. },
  23729. "text": {
  23730. "type": "string"
  23731. }
  23732. },
  23733. "required": ["start", "end", "text"],
  23734. "additionalProperties": false
  23735. },
  23736. "PromptFileAttachment": {
  23737. "type": "object",
  23738. "properties": {
  23739. "uri": {
  23740. "type": "string"
  23741. },
  23742. "mime": {
  23743. "type": "string"
  23744. },
  23745. "name": {
  23746. "type": "string"
  23747. },
  23748. "description": {
  23749. "type": "string"
  23750. },
  23751. "source": {
  23752. "$ref": "#/components/schemas/PromptSource"
  23753. }
  23754. },
  23755. "required": ["uri", "mime"],
  23756. "additionalProperties": false
  23757. },
  23758. "PromptAgentAttachment": {
  23759. "type": "object",
  23760. "properties": {
  23761. "name": {
  23762. "type": "string"
  23763. },
  23764. "source": {
  23765. "$ref": "#/components/schemas/PromptSource"
  23766. }
  23767. },
  23768. "required": ["name"],
  23769. "additionalProperties": false
  23770. },
  23771. "SessionErrorUnknown": {
  23772. "type": "object",
  23773. "properties": {
  23774. "type": {
  23775. "type": "string",
  23776. "enum": ["unknown"]
  23777. },
  23778. "message": {
  23779. "type": "string"
  23780. }
  23781. },
  23782. "required": ["type", "message"],
  23783. "additionalProperties": false
  23784. },
  23785. "LLMProviderMetadata": {
  23786. "type": "object",
  23787. "additionalProperties": {
  23788. "type": "object"
  23789. }
  23790. },
  23791. "ToolTextContent": {
  23792. "type": "object",
  23793. "properties": {
  23794. "type": {
  23795. "type": "string",
  23796. "enum": ["text"]
  23797. },
  23798. "text": {
  23799. "type": "string"
  23800. }
  23801. },
  23802. "required": ["type", "text"],
  23803. "additionalProperties": false
  23804. },
  23805. "ToolFileContent": {
  23806. "type": "object",
  23807. "properties": {
  23808. "type": {
  23809. "type": "string",
  23810. "enum": ["file"]
  23811. },
  23812. "uri": {
  23813. "type": "string"
  23814. },
  23815. "mime": {
  23816. "type": "string"
  23817. },
  23818. "name": {
  23819. "type": "string"
  23820. }
  23821. },
  23822. "required": ["type", "uri", "mime"],
  23823. "additionalProperties": false
  23824. },
  23825. "LLMToolContent": {
  23826. "anyOf": [
  23827. {
  23828. "$ref": "#/components/schemas/ToolTextContent"
  23829. },
  23830. {
  23831. "$ref": "#/components/schemas/ToolFileContent"
  23832. }
  23833. ]
  23834. },
  23835. "SessionNextRetry_error": {
  23836. "type": "object",
  23837. "properties": {
  23838. "message": {
  23839. "type": "string"
  23840. },
  23841. "statusCode": {
  23842. "type": "number"
  23843. },
  23844. "isRetryable": {
  23845. "type": "boolean"
  23846. },
  23847. "responseHeaders": {
  23848. "type": "object",
  23849. "additionalProperties": {
  23850. "type": "string"
  23851. }
  23852. },
  23853. "responseBody": {
  23854. "type": "string"
  23855. },
  23856. "metadata": {
  23857. "type": "object",
  23858. "additionalProperties": {
  23859. "type": "string"
  23860. }
  23861. }
  23862. },
  23863. "required": ["message", "isRetryable"],
  23864. "additionalProperties": false
  23865. },
  23866. "FileDiff": {
  23867. "type": "object",
  23868. "properties": {
  23869. "path": {
  23870. "type": "string"
  23871. },
  23872. "status": {
  23873. "type": "string",
  23874. "enum": ["added", "modified", "deleted"]
  23875. },
  23876. "additions": {
  23877. "type": "integer",
  23878. "minimum": 0
  23879. },
  23880. "deletions": {
  23881. "type": "integer",
  23882. "minimum": 0
  23883. },
  23884. "patch": {
  23885. "type": "string"
  23886. }
  23887. },
  23888. "required": ["path", "status", "additions", "deletions", "patch"],
  23889. "additionalProperties": false
  23890. },
  23891. "RevertState": {
  23892. "type": "object",
  23893. "properties": {
  23894. "messageID": {
  23895. "type": "string",
  23896. "pattern": "^msg_"
  23897. },
  23898. "partID": {
  23899. "type": "string"
  23900. },
  23901. "snapshot": {
  23902. "type": "string"
  23903. },
  23904. "diff": {
  23905. "type": "string"
  23906. },
  23907. "files": {
  23908. "type": "array",
  23909. "items": {
  23910. "$ref": "#/components/schemas/FileDiff"
  23911. }
  23912. }
  23913. },
  23914. "required": ["messageID"],
  23915. "additionalProperties": false
  23916. },
  23917. "PermissionV2Source": {
  23918. "type": "object",
  23919. "properties": {
  23920. "type": {
  23921. "type": "string",
  23922. "enum": ["tool"]
  23923. },
  23924. "messageID": {
  23925. "type": "string"
  23926. },
  23927. "callID": {
  23928. "type": "string"
  23929. }
  23930. },
  23931. "required": ["type", "messageID", "callID"],
  23932. "additionalProperties": false
  23933. },
  23934. "PermissionV2Reply": {
  23935. "type": "string",
  23936. "enum": ["once", "always", "reject"]
  23937. },
  23938. "QuestionV2Option": {
  23939. "type": "object",
  23940. "properties": {
  23941. "label": {
  23942. "type": "string",
  23943. "description": "Display text (1-5 words, concise)"
  23944. },
  23945. "description": {
  23946. "type": "string",
  23947. "description": "Explanation of choice"
  23948. }
  23949. },
  23950. "required": ["label", "description"],
  23951. "additionalProperties": false
  23952. },
  23953. "QuestionV2Info": {
  23954. "type": "object",
  23955. "properties": {
  23956. "question": {
  23957. "type": "string",
  23958. "description": "Complete question"
  23959. },
  23960. "header": {
  23961. "type": "string",
  23962. "description": "Very short label (max 30 chars)"
  23963. },
  23964. "options": {
  23965. "type": "array",
  23966. "items": {
  23967. "$ref": "#/components/schemas/QuestionV2Option"
  23968. },
  23969. "description": "Available choices"
  23970. },
  23971. "multiple": {
  23972. "type": "boolean"
  23973. },
  23974. "custom": {
  23975. "type": "boolean"
  23976. }
  23977. },
  23978. "required": ["question", "header", "options"],
  23979. "additionalProperties": false
  23980. },
  23981. "QuestionV2Tool": {
  23982. "type": "object",
  23983. "properties": {
  23984. "messageID": {
  23985. "type": "string"
  23986. },
  23987. "callID": {
  23988. "type": "string"
  23989. }
  23990. },
  23991. "required": ["messageID", "callID"],
  23992. "additionalProperties": false
  23993. },
  23994. "QuestionV2Answer": {
  23995. "type": "array",
  23996. "items": {
  23997. "type": "string"
  23998. }
  23999. },
  24000. "ProjectVcs": {
  24001. "type": "string",
  24002. "enum": ["git"]
  24003. },
  24004. "ProjectIcon": {
  24005. "type": "object",
  24006. "properties": {
  24007. "url": {
  24008. "type": "string"
  24009. },
  24010. "override": {
  24011. "type": "string"
  24012. },
  24013. "color": {
  24014. "type": "string"
  24015. }
  24016. },
  24017. "additionalProperties": false
  24018. },
  24019. "ProjectCommands": {
  24020. "type": "object",
  24021. "properties": {
  24022. "start": {
  24023. "type": "string",
  24024. "description": "Startup script to run when creating a new workspace (worktree)"
  24025. }
  24026. },
  24027. "additionalProperties": false
  24028. },
  24029. "ProjectTime": {
  24030. "type": "object",
  24031. "properties": {
  24032. "created": {
  24033. "type": "integer",
  24034. "minimum": 0
  24035. },
  24036. "updated": {
  24037. "type": "integer",
  24038. "minimum": 0
  24039. },
  24040. "initialized": {
  24041. "type": "integer",
  24042. "minimum": 0
  24043. }
  24044. },
  24045. "required": ["created", "updated"],
  24046. "additionalProperties": false
  24047. },
  24048. "EventServerInstanceDisposed": {
  24049. "type": "object",
  24050. "properties": {
  24051. "id": {
  24052. "type": "string"
  24053. },
  24054. "type": {
  24055. "type": "string",
  24056. "enum": ["server.instance.disposed"]
  24057. },
  24058. "properties": {
  24059. "type": "object",
  24060. "properties": {
  24061. "directory": {
  24062. "type": "string"
  24063. }
  24064. },
  24065. "required": ["directory"],
  24066. "additionalProperties": false
  24067. }
  24068. },
  24069. "required": ["id", "type", "properties"],
  24070. "additionalProperties": false
  24071. },
  24072. "SyncEventSessionCreated": {
  24073. "type": "object",
  24074. "properties": {
  24075. "type": {
  24076. "type": "string",
  24077. "enum": ["sync"]
  24078. },
  24079. "id": {
  24080. "type": "string",
  24081. "pattern": "^evt_"
  24082. },
  24083. "syncEvent": {
  24084. "type": "object",
  24085. "properties": {
  24086. "type": {
  24087. "type": "string",
  24088. "enum": ["session.created.1"]
  24089. },
  24090. "id": {
  24091. "type": "string",
  24092. "pattern": "^evt_"
  24093. },
  24094. "seq": {
  24095. "type": "number"
  24096. },
  24097. "aggregateID": {
  24098. "type": "string"
  24099. },
  24100. "data": {
  24101. "type": "object",
  24102. "properties": {
  24103. "sessionID": {
  24104. "type": "string",
  24105. "pattern": "^ses"
  24106. },
  24107. "info": {
  24108. "$ref": "#/components/schemas/Session"
  24109. }
  24110. },
  24111. "required": ["sessionID", "info"],
  24112. "additionalProperties": false
  24113. }
  24114. },
  24115. "required": ["type", "id", "seq", "aggregateID", "data"],
  24116. "additionalProperties": false
  24117. }
  24118. },
  24119. "required": ["type", "id", "syncEvent"],
  24120. "additionalProperties": false
  24121. },
  24122. "SyncEventSessionUpdated": {
  24123. "type": "object",
  24124. "properties": {
  24125. "type": {
  24126. "type": "string",
  24127. "enum": ["sync"]
  24128. },
  24129. "id": {
  24130. "type": "string",
  24131. "pattern": "^evt_"
  24132. },
  24133. "syncEvent": {
  24134. "type": "object",
  24135. "properties": {
  24136. "type": {
  24137. "type": "string",
  24138. "enum": ["session.updated.1"]
  24139. },
  24140. "id": {
  24141. "type": "string",
  24142. "pattern": "^evt_"
  24143. },
  24144. "seq": {
  24145. "type": "number"
  24146. },
  24147. "aggregateID": {
  24148. "type": "string"
  24149. },
  24150. "data": {
  24151. "type": "object",
  24152. "properties": {
  24153. "sessionID": {
  24154. "type": "string",
  24155. "pattern": "^ses"
  24156. },
  24157. "info": {
  24158. "$ref": "#/components/schemas/Session"
  24159. }
  24160. },
  24161. "required": ["sessionID", "info"],
  24162. "additionalProperties": false
  24163. }
  24164. },
  24165. "required": ["type", "id", "seq", "aggregateID", "data"],
  24166. "additionalProperties": false
  24167. }
  24168. },
  24169. "required": ["type", "id", "syncEvent"],
  24170. "additionalProperties": false
  24171. },
  24172. "SyncEventSessionDeleted": {
  24173. "type": "object",
  24174. "properties": {
  24175. "type": {
  24176. "type": "string",
  24177. "enum": ["sync"]
  24178. },
  24179. "id": {
  24180. "type": "string",
  24181. "pattern": "^evt_"
  24182. },
  24183. "syncEvent": {
  24184. "type": "object",
  24185. "properties": {
  24186. "type": {
  24187. "type": "string",
  24188. "enum": ["session.deleted.1"]
  24189. },
  24190. "id": {
  24191. "type": "string",
  24192. "pattern": "^evt_"
  24193. },
  24194. "seq": {
  24195. "type": "number"
  24196. },
  24197. "aggregateID": {
  24198. "type": "string"
  24199. },
  24200. "data": {
  24201. "type": "object",
  24202. "properties": {
  24203. "sessionID": {
  24204. "type": "string",
  24205. "pattern": "^ses"
  24206. },
  24207. "info": {
  24208. "$ref": "#/components/schemas/Session"
  24209. }
  24210. },
  24211. "required": ["sessionID", "info"],
  24212. "additionalProperties": false
  24213. }
  24214. },
  24215. "required": ["type", "id", "seq", "aggregateID", "data"],
  24216. "additionalProperties": false
  24217. }
  24218. },
  24219. "required": ["type", "id", "syncEvent"],
  24220. "additionalProperties": false
  24221. },
  24222. "SyncEventMessageUpdated": {
  24223. "type": "object",
  24224. "properties": {
  24225. "type": {
  24226. "type": "string",
  24227. "enum": ["sync"]
  24228. },
  24229. "id": {
  24230. "type": "string",
  24231. "pattern": "^evt_"
  24232. },
  24233. "syncEvent": {
  24234. "type": "object",
  24235. "properties": {
  24236. "type": {
  24237. "type": "string",
  24238. "enum": ["message.updated.1"]
  24239. },
  24240. "id": {
  24241. "type": "string",
  24242. "pattern": "^evt_"
  24243. },
  24244. "seq": {
  24245. "type": "number"
  24246. },
  24247. "aggregateID": {
  24248. "type": "string"
  24249. },
  24250. "data": {
  24251. "type": "object",
  24252. "properties": {
  24253. "sessionID": {
  24254. "type": "string",
  24255. "pattern": "^ses"
  24256. },
  24257. "info": {
  24258. "$ref": "#/components/schemas/Message"
  24259. }
  24260. },
  24261. "required": ["sessionID", "info"],
  24262. "additionalProperties": false
  24263. }
  24264. },
  24265. "required": ["type", "id", "seq", "aggregateID", "data"],
  24266. "additionalProperties": false
  24267. }
  24268. },
  24269. "required": ["type", "id", "syncEvent"],
  24270. "additionalProperties": false
  24271. },
  24272. "SyncEventMessageRemoved": {
  24273. "type": "object",
  24274. "properties": {
  24275. "type": {
  24276. "type": "string",
  24277. "enum": ["sync"]
  24278. },
  24279. "id": {
  24280. "type": "string",
  24281. "pattern": "^evt_"
  24282. },
  24283. "syncEvent": {
  24284. "type": "object",
  24285. "properties": {
  24286. "type": {
  24287. "type": "string",
  24288. "enum": ["message.removed.1"]
  24289. },
  24290. "id": {
  24291. "type": "string",
  24292. "pattern": "^evt_"
  24293. },
  24294. "seq": {
  24295. "type": "number"
  24296. },
  24297. "aggregateID": {
  24298. "type": "string"
  24299. },
  24300. "data": {
  24301. "type": "object",
  24302. "properties": {
  24303. "sessionID": {
  24304. "type": "string",
  24305. "pattern": "^ses"
  24306. },
  24307. "messageID": {
  24308. "type": "string",
  24309. "pattern": "^msg"
  24310. }
  24311. },
  24312. "required": ["sessionID", "messageID"],
  24313. "additionalProperties": false
  24314. }
  24315. },
  24316. "required": ["type", "id", "seq", "aggregateID", "data"],
  24317. "additionalProperties": false
  24318. }
  24319. },
  24320. "required": ["type", "id", "syncEvent"],
  24321. "additionalProperties": false
  24322. },
  24323. "SyncEventMessagePartUpdated": {
  24324. "type": "object",
  24325. "properties": {
  24326. "type": {
  24327. "type": "string",
  24328. "enum": ["sync"]
  24329. },
  24330. "id": {
  24331. "type": "string",
  24332. "pattern": "^evt_"
  24333. },
  24334. "syncEvent": {
  24335. "type": "object",
  24336. "properties": {
  24337. "type": {
  24338. "type": "string",
  24339. "enum": ["message.part.updated.1"]
  24340. },
  24341. "id": {
  24342. "type": "string",
  24343. "pattern": "^evt_"
  24344. },
  24345. "seq": {
  24346. "type": "number"
  24347. },
  24348. "aggregateID": {
  24349. "type": "string"
  24350. },
  24351. "data": {
  24352. "type": "object",
  24353. "properties": {
  24354. "sessionID": {
  24355. "type": "string",
  24356. "pattern": "^ses"
  24357. },
  24358. "part": {
  24359. "$ref": "#/components/schemas/Part"
  24360. },
  24361. "time": {
  24362. "type": "number"
  24363. }
  24364. },
  24365. "required": ["sessionID", "part", "time"],
  24366. "additionalProperties": false
  24367. }
  24368. },
  24369. "required": ["type", "id", "seq", "aggregateID", "data"],
  24370. "additionalProperties": false
  24371. }
  24372. },
  24373. "required": ["type", "id", "syncEvent"],
  24374. "additionalProperties": false
  24375. },
  24376. "SyncEventMessagePartRemoved": {
  24377. "type": "object",
  24378. "properties": {
  24379. "type": {
  24380. "type": "string",
  24381. "enum": ["sync"]
  24382. },
  24383. "id": {
  24384. "type": "string",
  24385. "pattern": "^evt_"
  24386. },
  24387. "syncEvent": {
  24388. "type": "object",
  24389. "properties": {
  24390. "type": {
  24391. "type": "string",
  24392. "enum": ["message.part.removed.1"]
  24393. },
  24394. "id": {
  24395. "type": "string",
  24396. "pattern": "^evt_"
  24397. },
  24398. "seq": {
  24399. "type": "number"
  24400. },
  24401. "aggregateID": {
  24402. "type": "string"
  24403. },
  24404. "data": {
  24405. "type": "object",
  24406. "properties": {
  24407. "sessionID": {
  24408. "type": "string",
  24409. "pattern": "^ses"
  24410. },
  24411. "messageID": {
  24412. "type": "string",
  24413. "pattern": "^msg"
  24414. },
  24415. "partID": {
  24416. "type": "string",
  24417. "pattern": "^prt"
  24418. }
  24419. },
  24420. "required": ["sessionID", "messageID", "partID"],
  24421. "additionalProperties": false
  24422. }
  24423. },
  24424. "required": ["type", "id", "seq", "aggregateID", "data"],
  24425. "additionalProperties": false
  24426. }
  24427. },
  24428. "required": ["type", "id", "syncEvent"],
  24429. "additionalProperties": false
  24430. },
  24431. "SyncEventSessionNextAgentSwitched": {
  24432. "type": "object",
  24433. "properties": {
  24434. "type": {
  24435. "type": "string",
  24436. "enum": ["sync"]
  24437. },
  24438. "id": {
  24439. "type": "string",
  24440. "pattern": "^evt_"
  24441. },
  24442. "syncEvent": {
  24443. "type": "object",
  24444. "properties": {
  24445. "type": {
  24446. "type": "string",
  24447. "enum": ["session.next.agent.switched.1"]
  24448. },
  24449. "id": {
  24450. "type": "string",
  24451. "pattern": "^evt_"
  24452. },
  24453. "seq": {
  24454. "type": "number"
  24455. },
  24456. "aggregateID": {
  24457. "type": "string"
  24458. },
  24459. "data": {
  24460. "type": "object",
  24461. "properties": {
  24462. "timestamp": {
  24463. "type": "number"
  24464. },
  24465. "sessionID": {
  24466. "type": "string",
  24467. "pattern": "^ses"
  24468. },
  24469. "messageID": {
  24470. "type": "string",
  24471. "pattern": "^msg_"
  24472. },
  24473. "agent": {
  24474. "type": "string"
  24475. }
  24476. },
  24477. "required": ["timestamp", "sessionID", "messageID", "agent"],
  24478. "additionalProperties": false
  24479. }
  24480. },
  24481. "required": ["type", "id", "seq", "aggregateID", "data"],
  24482. "additionalProperties": false
  24483. }
  24484. },
  24485. "required": ["type", "id", "syncEvent"],
  24486. "additionalProperties": false
  24487. },
  24488. "SyncEventSessionNextModelSwitched": {
  24489. "type": "object",
  24490. "properties": {
  24491. "type": {
  24492. "type": "string",
  24493. "enum": ["sync"]
  24494. },
  24495. "id": {
  24496. "type": "string",
  24497. "pattern": "^evt_"
  24498. },
  24499. "syncEvent": {
  24500. "type": "object",
  24501. "properties": {
  24502. "type": {
  24503. "type": "string",
  24504. "enum": ["session.next.model.switched.1"]
  24505. },
  24506. "id": {
  24507. "type": "string",
  24508. "pattern": "^evt_"
  24509. },
  24510. "seq": {
  24511. "type": "number"
  24512. },
  24513. "aggregateID": {
  24514. "type": "string"
  24515. },
  24516. "data": {
  24517. "type": "object",
  24518. "properties": {
  24519. "timestamp": {
  24520. "type": "number"
  24521. },
  24522. "sessionID": {
  24523. "type": "string",
  24524. "pattern": "^ses"
  24525. },
  24526. "messageID": {
  24527. "type": "string",
  24528. "pattern": "^msg_"
  24529. },
  24530. "model": {
  24531. "$ref": "#/components/schemas/ModelRef"
  24532. }
  24533. },
  24534. "required": ["timestamp", "sessionID", "messageID", "model"],
  24535. "additionalProperties": false
  24536. }
  24537. },
  24538. "required": ["type", "id", "seq", "aggregateID", "data"],
  24539. "additionalProperties": false
  24540. }
  24541. },
  24542. "required": ["type", "id", "syncEvent"],
  24543. "additionalProperties": false
  24544. },
  24545. "SyncEventSessionNextMoved": {
  24546. "type": "object",
  24547. "properties": {
  24548. "type": {
  24549. "type": "string",
  24550. "enum": ["sync"]
  24551. },
  24552. "id": {
  24553. "type": "string",
  24554. "pattern": "^evt_"
  24555. },
  24556. "syncEvent": {
  24557. "type": "object",
  24558. "properties": {
  24559. "type": {
  24560. "type": "string",
  24561. "enum": ["session.next.moved.1"]
  24562. },
  24563. "id": {
  24564. "type": "string",
  24565. "pattern": "^evt_"
  24566. },
  24567. "seq": {
  24568. "type": "number"
  24569. },
  24570. "aggregateID": {
  24571. "type": "string"
  24572. },
  24573. "data": {
  24574. "type": "object",
  24575. "properties": {
  24576. "timestamp": {
  24577. "type": "number"
  24578. },
  24579. "sessionID": {
  24580. "type": "string",
  24581. "pattern": "^ses"
  24582. },
  24583. "location": {
  24584. "$ref": "#/components/schemas/LocationRef"
  24585. },
  24586. "subdirectory": {
  24587. "type": "string"
  24588. }
  24589. },
  24590. "required": ["timestamp", "sessionID", "location"],
  24591. "additionalProperties": false
  24592. }
  24593. },
  24594. "required": ["type", "id", "seq", "aggregateID", "data"],
  24595. "additionalProperties": false
  24596. }
  24597. },
  24598. "required": ["type", "id", "syncEvent"],
  24599. "additionalProperties": false
  24600. },
  24601. "SyncEventSessionNextPrompted": {
  24602. "type": "object",
  24603. "properties": {
  24604. "type": {
  24605. "type": "string",
  24606. "enum": ["sync"]
  24607. },
  24608. "id": {
  24609. "type": "string",
  24610. "pattern": "^evt_"
  24611. },
  24612. "syncEvent": {
  24613. "type": "object",
  24614. "properties": {
  24615. "type": {
  24616. "type": "string",
  24617. "enum": ["session.next.prompted.1"]
  24618. },
  24619. "id": {
  24620. "type": "string",
  24621. "pattern": "^evt_"
  24622. },
  24623. "seq": {
  24624. "type": "number"
  24625. },
  24626. "aggregateID": {
  24627. "type": "string"
  24628. },
  24629. "data": {
  24630. "type": "object",
  24631. "properties": {
  24632. "timestamp": {
  24633. "type": "number"
  24634. },
  24635. "sessionID": {
  24636. "type": "string",
  24637. "pattern": "^ses"
  24638. },
  24639. "messageID": {
  24640. "type": "string",
  24641. "pattern": "^msg_"
  24642. },
  24643. "prompt": {
  24644. "$ref": "#/components/schemas/Prompt"
  24645. },
  24646. "delivery": {
  24647. "type": "string",
  24648. "enum": ["steer", "queue"]
  24649. }
  24650. },
  24651. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  24652. "additionalProperties": false
  24653. }
  24654. },
  24655. "required": ["type", "id", "seq", "aggregateID", "data"],
  24656. "additionalProperties": false
  24657. }
  24658. },
  24659. "required": ["type", "id", "syncEvent"],
  24660. "additionalProperties": false
  24661. },
  24662. "SyncEventSessionNextPromptAdmitted": {
  24663. "type": "object",
  24664. "properties": {
  24665. "type": {
  24666. "type": "string",
  24667. "enum": ["sync"]
  24668. },
  24669. "id": {
  24670. "type": "string",
  24671. "pattern": "^evt_"
  24672. },
  24673. "syncEvent": {
  24674. "type": "object",
  24675. "properties": {
  24676. "type": {
  24677. "type": "string",
  24678. "enum": ["session.next.prompt.admitted.1"]
  24679. },
  24680. "id": {
  24681. "type": "string",
  24682. "pattern": "^evt_"
  24683. },
  24684. "seq": {
  24685. "type": "number"
  24686. },
  24687. "aggregateID": {
  24688. "type": "string"
  24689. },
  24690. "data": {
  24691. "type": "object",
  24692. "properties": {
  24693. "timestamp": {
  24694. "type": "number"
  24695. },
  24696. "sessionID": {
  24697. "type": "string",
  24698. "pattern": "^ses"
  24699. },
  24700. "messageID": {
  24701. "type": "string",
  24702. "pattern": "^msg_"
  24703. },
  24704. "prompt": {
  24705. "$ref": "#/components/schemas/Prompt"
  24706. },
  24707. "delivery": {
  24708. "type": "string",
  24709. "enum": ["steer", "queue"]
  24710. }
  24711. },
  24712. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  24713. "additionalProperties": false
  24714. }
  24715. },
  24716. "required": ["type", "id", "seq", "aggregateID", "data"],
  24717. "additionalProperties": false
  24718. }
  24719. },
  24720. "required": ["type", "id", "syncEvent"],
  24721. "additionalProperties": false
  24722. },
  24723. "SyncEventSessionNextContextUpdated": {
  24724. "type": "object",
  24725. "properties": {
  24726. "type": {
  24727. "type": "string",
  24728. "enum": ["sync"]
  24729. },
  24730. "id": {
  24731. "type": "string",
  24732. "pattern": "^evt_"
  24733. },
  24734. "syncEvent": {
  24735. "type": "object",
  24736. "properties": {
  24737. "type": {
  24738. "type": "string",
  24739. "enum": ["session.next.context.updated.1"]
  24740. },
  24741. "id": {
  24742. "type": "string",
  24743. "pattern": "^evt_"
  24744. },
  24745. "seq": {
  24746. "type": "number"
  24747. },
  24748. "aggregateID": {
  24749. "type": "string"
  24750. },
  24751. "data": {
  24752. "type": "object",
  24753. "properties": {
  24754. "timestamp": {
  24755. "type": "number"
  24756. },
  24757. "sessionID": {
  24758. "type": "string",
  24759. "pattern": "^ses"
  24760. },
  24761. "messageID": {
  24762. "type": "string",
  24763. "pattern": "^msg_"
  24764. },
  24765. "text": {
  24766. "type": "string"
  24767. }
  24768. },
  24769. "required": ["timestamp", "sessionID", "messageID", "text"],
  24770. "additionalProperties": false
  24771. }
  24772. },
  24773. "required": ["type", "id", "seq", "aggregateID", "data"],
  24774. "additionalProperties": false
  24775. }
  24776. },
  24777. "required": ["type", "id", "syncEvent"],
  24778. "additionalProperties": false
  24779. },
  24780. "SyncEventSessionNextSynthetic": {
  24781. "type": "object",
  24782. "properties": {
  24783. "type": {
  24784. "type": "string",
  24785. "enum": ["sync"]
  24786. },
  24787. "id": {
  24788. "type": "string",
  24789. "pattern": "^evt_"
  24790. },
  24791. "syncEvent": {
  24792. "type": "object",
  24793. "properties": {
  24794. "type": {
  24795. "type": "string",
  24796. "enum": ["session.next.synthetic.1"]
  24797. },
  24798. "id": {
  24799. "type": "string",
  24800. "pattern": "^evt_"
  24801. },
  24802. "seq": {
  24803. "type": "number"
  24804. },
  24805. "aggregateID": {
  24806. "type": "string"
  24807. },
  24808. "data": {
  24809. "type": "object",
  24810. "properties": {
  24811. "timestamp": {
  24812. "type": "number"
  24813. },
  24814. "sessionID": {
  24815. "type": "string",
  24816. "pattern": "^ses"
  24817. },
  24818. "messageID": {
  24819. "type": "string",
  24820. "pattern": "^msg_"
  24821. },
  24822. "text": {
  24823. "type": "string"
  24824. }
  24825. },
  24826. "required": ["timestamp", "sessionID", "messageID", "text"],
  24827. "additionalProperties": false
  24828. }
  24829. },
  24830. "required": ["type", "id", "seq", "aggregateID", "data"],
  24831. "additionalProperties": false
  24832. }
  24833. },
  24834. "required": ["type", "id", "syncEvent"],
  24835. "additionalProperties": false
  24836. },
  24837. "SyncEventSessionNextShellStarted": {
  24838. "type": "object",
  24839. "properties": {
  24840. "type": {
  24841. "type": "string",
  24842. "enum": ["sync"]
  24843. },
  24844. "id": {
  24845. "type": "string",
  24846. "pattern": "^evt_"
  24847. },
  24848. "syncEvent": {
  24849. "type": "object",
  24850. "properties": {
  24851. "type": {
  24852. "type": "string",
  24853. "enum": ["session.next.shell.started.1"]
  24854. },
  24855. "id": {
  24856. "type": "string",
  24857. "pattern": "^evt_"
  24858. },
  24859. "seq": {
  24860. "type": "number"
  24861. },
  24862. "aggregateID": {
  24863. "type": "string"
  24864. },
  24865. "data": {
  24866. "type": "object",
  24867. "properties": {
  24868. "timestamp": {
  24869. "type": "number"
  24870. },
  24871. "sessionID": {
  24872. "type": "string",
  24873. "pattern": "^ses"
  24874. },
  24875. "messageID": {
  24876. "type": "string",
  24877. "pattern": "^msg_"
  24878. },
  24879. "callID": {
  24880. "type": "string"
  24881. },
  24882. "command": {
  24883. "type": "string"
  24884. }
  24885. },
  24886. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  24887. "additionalProperties": false
  24888. }
  24889. },
  24890. "required": ["type", "id", "seq", "aggregateID", "data"],
  24891. "additionalProperties": false
  24892. }
  24893. },
  24894. "required": ["type", "id", "syncEvent"],
  24895. "additionalProperties": false
  24896. },
  24897. "SyncEventSessionNextShellEnded": {
  24898. "type": "object",
  24899. "properties": {
  24900. "type": {
  24901. "type": "string",
  24902. "enum": ["sync"]
  24903. },
  24904. "id": {
  24905. "type": "string",
  24906. "pattern": "^evt_"
  24907. },
  24908. "syncEvent": {
  24909. "type": "object",
  24910. "properties": {
  24911. "type": {
  24912. "type": "string",
  24913. "enum": ["session.next.shell.ended.1"]
  24914. },
  24915. "id": {
  24916. "type": "string",
  24917. "pattern": "^evt_"
  24918. },
  24919. "seq": {
  24920. "type": "number"
  24921. },
  24922. "aggregateID": {
  24923. "type": "string"
  24924. },
  24925. "data": {
  24926. "type": "object",
  24927. "properties": {
  24928. "timestamp": {
  24929. "type": "number"
  24930. },
  24931. "sessionID": {
  24932. "type": "string",
  24933. "pattern": "^ses"
  24934. },
  24935. "callID": {
  24936. "type": "string"
  24937. },
  24938. "output": {
  24939. "type": "string"
  24940. }
  24941. },
  24942. "required": ["timestamp", "sessionID", "callID", "output"],
  24943. "additionalProperties": false
  24944. }
  24945. },
  24946. "required": ["type", "id", "seq", "aggregateID", "data"],
  24947. "additionalProperties": false
  24948. }
  24949. },
  24950. "required": ["type", "id", "syncEvent"],
  24951. "additionalProperties": false
  24952. },
  24953. "SyncEventSessionNextStepStarted": {
  24954. "type": "object",
  24955. "properties": {
  24956. "type": {
  24957. "type": "string",
  24958. "enum": ["sync"]
  24959. },
  24960. "id": {
  24961. "type": "string",
  24962. "pattern": "^evt_"
  24963. },
  24964. "syncEvent": {
  24965. "type": "object",
  24966. "properties": {
  24967. "type": {
  24968. "type": "string",
  24969. "enum": ["session.next.step.started.1"]
  24970. },
  24971. "id": {
  24972. "type": "string",
  24973. "pattern": "^evt_"
  24974. },
  24975. "seq": {
  24976. "type": "number"
  24977. },
  24978. "aggregateID": {
  24979. "type": "string"
  24980. },
  24981. "data": {
  24982. "type": "object",
  24983. "properties": {
  24984. "timestamp": {
  24985. "type": "number"
  24986. },
  24987. "sessionID": {
  24988. "type": "string",
  24989. "pattern": "^ses"
  24990. },
  24991. "assistantMessageID": {
  24992. "type": "string",
  24993. "pattern": "^msg_"
  24994. },
  24995. "agent": {
  24996. "type": "string"
  24997. },
  24998. "model": {
  24999. "$ref": "#/components/schemas/ModelRef"
  25000. },
  25001. "snapshot": {
  25002. "type": "string"
  25003. }
  25004. },
  25005. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  25006. "additionalProperties": false
  25007. }
  25008. },
  25009. "required": ["type", "id", "seq", "aggregateID", "data"],
  25010. "additionalProperties": false
  25011. }
  25012. },
  25013. "required": ["type", "id", "syncEvent"],
  25014. "additionalProperties": false
  25015. },
  25016. "SyncEventSessionNextStepEnded": {
  25017. "type": "object",
  25018. "properties": {
  25019. "type": {
  25020. "type": "string",
  25021. "enum": ["sync"]
  25022. },
  25023. "id": {
  25024. "type": "string",
  25025. "pattern": "^evt_"
  25026. },
  25027. "syncEvent": {
  25028. "type": "object",
  25029. "properties": {
  25030. "type": {
  25031. "type": "string",
  25032. "enum": ["session.next.step.ended.2"]
  25033. },
  25034. "id": {
  25035. "type": "string",
  25036. "pattern": "^evt_"
  25037. },
  25038. "seq": {
  25039. "type": "number"
  25040. },
  25041. "aggregateID": {
  25042. "type": "string"
  25043. },
  25044. "data": {
  25045. "type": "object",
  25046. "properties": {
  25047. "timestamp": {
  25048. "type": "number"
  25049. },
  25050. "sessionID": {
  25051. "type": "string",
  25052. "pattern": "^ses"
  25053. },
  25054. "assistantMessageID": {
  25055. "type": "string",
  25056. "pattern": "^msg_"
  25057. },
  25058. "finish": {
  25059. "type": "string"
  25060. },
  25061. "cost": {
  25062. "type": "number"
  25063. },
  25064. "tokens": {
  25065. "type": "object",
  25066. "properties": {
  25067. "input": {
  25068. "type": "number"
  25069. },
  25070. "output": {
  25071. "type": "number"
  25072. },
  25073. "reasoning": {
  25074. "type": "number"
  25075. },
  25076. "cache": {
  25077. "type": "object",
  25078. "properties": {
  25079. "read": {
  25080. "type": "number"
  25081. },
  25082. "write": {
  25083. "type": "number"
  25084. }
  25085. },
  25086. "required": ["read", "write"],
  25087. "additionalProperties": false
  25088. }
  25089. },
  25090. "required": ["input", "output", "reasoning", "cache"],
  25091. "additionalProperties": false
  25092. },
  25093. "snapshot": {
  25094. "type": "string"
  25095. },
  25096. "files": {
  25097. "type": "array",
  25098. "items": {
  25099. "type": "string"
  25100. }
  25101. }
  25102. },
  25103. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  25104. "additionalProperties": false
  25105. }
  25106. },
  25107. "required": ["type", "id", "seq", "aggregateID", "data"],
  25108. "additionalProperties": false
  25109. }
  25110. },
  25111. "required": ["type", "id", "syncEvent"],
  25112. "additionalProperties": false
  25113. },
  25114. "SyncEventSessionNextStepFailed": {
  25115. "type": "object",
  25116. "properties": {
  25117. "type": {
  25118. "type": "string",
  25119. "enum": ["sync"]
  25120. },
  25121. "id": {
  25122. "type": "string",
  25123. "pattern": "^evt_"
  25124. },
  25125. "syncEvent": {
  25126. "type": "object",
  25127. "properties": {
  25128. "type": {
  25129. "type": "string",
  25130. "enum": ["session.next.step.failed.2"]
  25131. },
  25132. "id": {
  25133. "type": "string",
  25134. "pattern": "^evt_"
  25135. },
  25136. "seq": {
  25137. "type": "number"
  25138. },
  25139. "aggregateID": {
  25140. "type": "string"
  25141. },
  25142. "data": {
  25143. "type": "object",
  25144. "properties": {
  25145. "timestamp": {
  25146. "type": "number"
  25147. },
  25148. "sessionID": {
  25149. "type": "string",
  25150. "pattern": "^ses"
  25151. },
  25152. "assistantMessageID": {
  25153. "type": "string",
  25154. "pattern": "^msg_"
  25155. },
  25156. "error": {
  25157. "$ref": "#/components/schemas/SessionErrorUnknown"
  25158. }
  25159. },
  25160. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  25161. "additionalProperties": false
  25162. }
  25163. },
  25164. "required": ["type", "id", "seq", "aggregateID", "data"],
  25165. "additionalProperties": false
  25166. }
  25167. },
  25168. "required": ["type", "id", "syncEvent"],
  25169. "additionalProperties": false
  25170. },
  25171. "SyncEventSessionNextTextStarted": {
  25172. "type": "object",
  25173. "properties": {
  25174. "type": {
  25175. "type": "string",
  25176. "enum": ["sync"]
  25177. },
  25178. "id": {
  25179. "type": "string",
  25180. "pattern": "^evt_"
  25181. },
  25182. "syncEvent": {
  25183. "type": "object",
  25184. "properties": {
  25185. "type": {
  25186. "type": "string",
  25187. "enum": ["session.next.text.started.1"]
  25188. },
  25189. "id": {
  25190. "type": "string",
  25191. "pattern": "^evt_"
  25192. },
  25193. "seq": {
  25194. "type": "number"
  25195. },
  25196. "aggregateID": {
  25197. "type": "string"
  25198. },
  25199. "data": {
  25200. "type": "object",
  25201. "properties": {
  25202. "timestamp": {
  25203. "type": "number"
  25204. },
  25205. "sessionID": {
  25206. "type": "string",
  25207. "pattern": "^ses"
  25208. },
  25209. "assistantMessageID": {
  25210. "type": "string",
  25211. "pattern": "^msg_"
  25212. },
  25213. "textID": {
  25214. "type": "string"
  25215. }
  25216. },
  25217. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  25218. "additionalProperties": false
  25219. }
  25220. },
  25221. "required": ["type", "id", "seq", "aggregateID", "data"],
  25222. "additionalProperties": false
  25223. }
  25224. },
  25225. "required": ["type", "id", "syncEvent"],
  25226. "additionalProperties": false
  25227. },
  25228. "SyncEventSessionNextTextEnded": {
  25229. "type": "object",
  25230. "properties": {
  25231. "type": {
  25232. "type": "string",
  25233. "enum": ["sync"]
  25234. },
  25235. "id": {
  25236. "type": "string",
  25237. "pattern": "^evt_"
  25238. },
  25239. "syncEvent": {
  25240. "type": "object",
  25241. "properties": {
  25242. "type": {
  25243. "type": "string",
  25244. "enum": ["session.next.text.ended.1"]
  25245. },
  25246. "id": {
  25247. "type": "string",
  25248. "pattern": "^evt_"
  25249. },
  25250. "seq": {
  25251. "type": "number"
  25252. },
  25253. "aggregateID": {
  25254. "type": "string"
  25255. },
  25256. "data": {
  25257. "type": "object",
  25258. "properties": {
  25259. "timestamp": {
  25260. "type": "number"
  25261. },
  25262. "sessionID": {
  25263. "type": "string",
  25264. "pattern": "^ses"
  25265. },
  25266. "assistantMessageID": {
  25267. "type": "string",
  25268. "pattern": "^msg_"
  25269. },
  25270. "textID": {
  25271. "type": "string"
  25272. },
  25273. "text": {
  25274. "type": "string"
  25275. }
  25276. },
  25277. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  25278. "additionalProperties": false
  25279. }
  25280. },
  25281. "required": ["type", "id", "seq", "aggregateID", "data"],
  25282. "additionalProperties": false
  25283. }
  25284. },
  25285. "required": ["type", "id", "syncEvent"],
  25286. "additionalProperties": false
  25287. },
  25288. "SyncEventSessionNextReasoningStarted": {
  25289. "type": "object",
  25290. "properties": {
  25291. "type": {
  25292. "type": "string",
  25293. "enum": ["sync"]
  25294. },
  25295. "id": {
  25296. "type": "string",
  25297. "pattern": "^evt_"
  25298. },
  25299. "syncEvent": {
  25300. "type": "object",
  25301. "properties": {
  25302. "type": {
  25303. "type": "string",
  25304. "enum": ["session.next.reasoning.started.1"]
  25305. },
  25306. "id": {
  25307. "type": "string",
  25308. "pattern": "^evt_"
  25309. },
  25310. "seq": {
  25311. "type": "number"
  25312. },
  25313. "aggregateID": {
  25314. "type": "string"
  25315. },
  25316. "data": {
  25317. "type": "object",
  25318. "properties": {
  25319. "timestamp": {
  25320. "type": "number"
  25321. },
  25322. "sessionID": {
  25323. "type": "string",
  25324. "pattern": "^ses"
  25325. },
  25326. "assistantMessageID": {
  25327. "type": "string",
  25328. "pattern": "^msg_"
  25329. },
  25330. "reasoningID": {
  25331. "type": "string"
  25332. },
  25333. "providerMetadata": {
  25334. "$ref": "#/components/schemas/LLMProviderMetadata"
  25335. }
  25336. },
  25337. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  25338. "additionalProperties": false
  25339. }
  25340. },
  25341. "required": ["type", "id", "seq", "aggregateID", "data"],
  25342. "additionalProperties": false
  25343. }
  25344. },
  25345. "required": ["type", "id", "syncEvent"],
  25346. "additionalProperties": false
  25347. },
  25348. "SyncEventSessionNextReasoningEnded": {
  25349. "type": "object",
  25350. "properties": {
  25351. "type": {
  25352. "type": "string",
  25353. "enum": ["sync"]
  25354. },
  25355. "id": {
  25356. "type": "string",
  25357. "pattern": "^evt_"
  25358. },
  25359. "syncEvent": {
  25360. "type": "object",
  25361. "properties": {
  25362. "type": {
  25363. "type": "string",
  25364. "enum": ["session.next.reasoning.ended.1"]
  25365. },
  25366. "id": {
  25367. "type": "string",
  25368. "pattern": "^evt_"
  25369. },
  25370. "seq": {
  25371. "type": "number"
  25372. },
  25373. "aggregateID": {
  25374. "type": "string"
  25375. },
  25376. "data": {
  25377. "type": "object",
  25378. "properties": {
  25379. "timestamp": {
  25380. "type": "number"
  25381. },
  25382. "sessionID": {
  25383. "type": "string",
  25384. "pattern": "^ses"
  25385. },
  25386. "assistantMessageID": {
  25387. "type": "string",
  25388. "pattern": "^msg_"
  25389. },
  25390. "reasoningID": {
  25391. "type": "string"
  25392. },
  25393. "text": {
  25394. "type": "string"
  25395. },
  25396. "providerMetadata": {
  25397. "$ref": "#/components/schemas/LLMProviderMetadata"
  25398. }
  25399. },
  25400. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  25401. "additionalProperties": false
  25402. }
  25403. },
  25404. "required": ["type", "id", "seq", "aggregateID", "data"],
  25405. "additionalProperties": false
  25406. }
  25407. },
  25408. "required": ["type", "id", "syncEvent"],
  25409. "additionalProperties": false
  25410. },
  25411. "SyncEventSessionNextToolInputStarted": {
  25412. "type": "object",
  25413. "properties": {
  25414. "type": {
  25415. "type": "string",
  25416. "enum": ["sync"]
  25417. },
  25418. "id": {
  25419. "type": "string",
  25420. "pattern": "^evt_"
  25421. },
  25422. "syncEvent": {
  25423. "type": "object",
  25424. "properties": {
  25425. "type": {
  25426. "type": "string",
  25427. "enum": ["session.next.tool.input.started.1"]
  25428. },
  25429. "id": {
  25430. "type": "string",
  25431. "pattern": "^evt_"
  25432. },
  25433. "seq": {
  25434. "type": "number"
  25435. },
  25436. "aggregateID": {
  25437. "type": "string"
  25438. },
  25439. "data": {
  25440. "type": "object",
  25441. "properties": {
  25442. "timestamp": {
  25443. "type": "number"
  25444. },
  25445. "sessionID": {
  25446. "type": "string",
  25447. "pattern": "^ses"
  25448. },
  25449. "assistantMessageID": {
  25450. "type": "string",
  25451. "pattern": "^msg_"
  25452. },
  25453. "callID": {
  25454. "type": "string"
  25455. },
  25456. "name": {
  25457. "type": "string"
  25458. }
  25459. },
  25460. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  25461. "additionalProperties": false
  25462. }
  25463. },
  25464. "required": ["type", "id", "seq", "aggregateID", "data"],
  25465. "additionalProperties": false
  25466. }
  25467. },
  25468. "required": ["type", "id", "syncEvent"],
  25469. "additionalProperties": false
  25470. },
  25471. "SyncEventSessionNextToolInputEnded": {
  25472. "type": "object",
  25473. "properties": {
  25474. "type": {
  25475. "type": "string",
  25476. "enum": ["sync"]
  25477. },
  25478. "id": {
  25479. "type": "string",
  25480. "pattern": "^evt_"
  25481. },
  25482. "syncEvent": {
  25483. "type": "object",
  25484. "properties": {
  25485. "type": {
  25486. "type": "string",
  25487. "enum": ["session.next.tool.input.ended.1"]
  25488. },
  25489. "id": {
  25490. "type": "string",
  25491. "pattern": "^evt_"
  25492. },
  25493. "seq": {
  25494. "type": "number"
  25495. },
  25496. "aggregateID": {
  25497. "type": "string"
  25498. },
  25499. "data": {
  25500. "type": "object",
  25501. "properties": {
  25502. "timestamp": {
  25503. "type": "number"
  25504. },
  25505. "sessionID": {
  25506. "type": "string",
  25507. "pattern": "^ses"
  25508. },
  25509. "assistantMessageID": {
  25510. "type": "string",
  25511. "pattern": "^msg_"
  25512. },
  25513. "callID": {
  25514. "type": "string"
  25515. },
  25516. "text": {
  25517. "type": "string"
  25518. }
  25519. },
  25520. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  25521. "additionalProperties": false
  25522. }
  25523. },
  25524. "required": ["type", "id", "seq", "aggregateID", "data"],
  25525. "additionalProperties": false
  25526. }
  25527. },
  25528. "required": ["type", "id", "syncEvent"],
  25529. "additionalProperties": false
  25530. },
  25531. "SyncEventSessionNextToolCalled": {
  25532. "type": "object",
  25533. "properties": {
  25534. "type": {
  25535. "type": "string",
  25536. "enum": ["sync"]
  25537. },
  25538. "id": {
  25539. "type": "string",
  25540. "pattern": "^evt_"
  25541. },
  25542. "syncEvent": {
  25543. "type": "object",
  25544. "properties": {
  25545. "type": {
  25546. "type": "string",
  25547. "enum": ["session.next.tool.called.1"]
  25548. },
  25549. "id": {
  25550. "type": "string",
  25551. "pattern": "^evt_"
  25552. },
  25553. "seq": {
  25554. "type": "number"
  25555. },
  25556. "aggregateID": {
  25557. "type": "string"
  25558. },
  25559. "data": {
  25560. "type": "object",
  25561. "properties": {
  25562. "timestamp": {
  25563. "type": "number"
  25564. },
  25565. "sessionID": {
  25566. "type": "string",
  25567. "pattern": "^ses"
  25568. },
  25569. "assistantMessageID": {
  25570. "type": "string",
  25571. "pattern": "^msg_"
  25572. },
  25573. "callID": {
  25574. "type": "string"
  25575. },
  25576. "tool": {
  25577. "type": "string"
  25578. },
  25579. "input": {
  25580. "type": "object"
  25581. },
  25582. "provider": {
  25583. "type": "object",
  25584. "properties": {
  25585. "executed": {
  25586. "type": "boolean"
  25587. },
  25588. "metadata": {
  25589. "$ref": "#/components/schemas/LLMProviderMetadata"
  25590. }
  25591. },
  25592. "required": ["executed"],
  25593. "additionalProperties": false
  25594. }
  25595. },
  25596. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  25597. "additionalProperties": false
  25598. }
  25599. },
  25600. "required": ["type", "id", "seq", "aggregateID", "data"],
  25601. "additionalProperties": false
  25602. }
  25603. },
  25604. "required": ["type", "id", "syncEvent"],
  25605. "additionalProperties": false
  25606. },
  25607. "SyncEventSessionNextToolProgress": {
  25608. "type": "object",
  25609. "properties": {
  25610. "type": {
  25611. "type": "string",
  25612. "enum": ["sync"]
  25613. },
  25614. "id": {
  25615. "type": "string",
  25616. "pattern": "^evt_"
  25617. },
  25618. "syncEvent": {
  25619. "type": "object",
  25620. "properties": {
  25621. "type": {
  25622. "type": "string",
  25623. "enum": ["session.next.tool.progress.1"]
  25624. },
  25625. "id": {
  25626. "type": "string",
  25627. "pattern": "^evt_"
  25628. },
  25629. "seq": {
  25630. "type": "number"
  25631. },
  25632. "aggregateID": {
  25633. "type": "string"
  25634. },
  25635. "data": {
  25636. "type": "object",
  25637. "properties": {
  25638. "timestamp": {
  25639. "type": "number"
  25640. },
  25641. "sessionID": {
  25642. "type": "string",
  25643. "pattern": "^ses"
  25644. },
  25645. "assistantMessageID": {
  25646. "type": "string",
  25647. "pattern": "^msg_"
  25648. },
  25649. "callID": {
  25650. "type": "string"
  25651. },
  25652. "structured": {
  25653. "type": "object"
  25654. },
  25655. "content": {
  25656. "type": "array",
  25657. "items": {
  25658. "$ref": "#/components/schemas/LLMToolContent"
  25659. }
  25660. }
  25661. },
  25662. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  25663. "additionalProperties": false
  25664. }
  25665. },
  25666. "required": ["type", "id", "seq", "aggregateID", "data"],
  25667. "additionalProperties": false
  25668. }
  25669. },
  25670. "required": ["type", "id", "syncEvent"],
  25671. "additionalProperties": false
  25672. },
  25673. "SyncEventSessionNextToolSuccess": {
  25674. "type": "object",
  25675. "properties": {
  25676. "type": {
  25677. "type": "string",
  25678. "enum": ["sync"]
  25679. },
  25680. "id": {
  25681. "type": "string",
  25682. "pattern": "^evt_"
  25683. },
  25684. "syncEvent": {
  25685. "type": "object",
  25686. "properties": {
  25687. "type": {
  25688. "type": "string",
  25689. "enum": ["session.next.tool.success.1"]
  25690. },
  25691. "id": {
  25692. "type": "string",
  25693. "pattern": "^evt_"
  25694. },
  25695. "seq": {
  25696. "type": "number"
  25697. },
  25698. "aggregateID": {
  25699. "type": "string"
  25700. },
  25701. "data": {
  25702. "type": "object",
  25703. "properties": {
  25704. "timestamp": {
  25705. "type": "number"
  25706. },
  25707. "sessionID": {
  25708. "type": "string",
  25709. "pattern": "^ses"
  25710. },
  25711. "assistantMessageID": {
  25712. "type": "string",
  25713. "pattern": "^msg_"
  25714. },
  25715. "callID": {
  25716. "type": "string"
  25717. },
  25718. "structured": {
  25719. "type": "object"
  25720. },
  25721. "content": {
  25722. "type": "array",
  25723. "items": {
  25724. "$ref": "#/components/schemas/LLMToolContent"
  25725. }
  25726. },
  25727. "outputPaths": {
  25728. "type": "array",
  25729. "items": {
  25730. "type": "string"
  25731. }
  25732. },
  25733. "result": {},
  25734. "provider": {
  25735. "type": "object",
  25736. "properties": {
  25737. "executed": {
  25738. "type": "boolean"
  25739. },
  25740. "metadata": {
  25741. "$ref": "#/components/schemas/LLMProviderMetadata"
  25742. }
  25743. },
  25744. "required": ["executed"],
  25745. "additionalProperties": false
  25746. }
  25747. },
  25748. "required": [
  25749. "timestamp",
  25750. "sessionID",
  25751. "assistantMessageID",
  25752. "callID",
  25753. "structured",
  25754. "content",
  25755. "provider"
  25756. ],
  25757. "additionalProperties": false
  25758. }
  25759. },
  25760. "required": ["type", "id", "seq", "aggregateID", "data"],
  25761. "additionalProperties": false
  25762. }
  25763. },
  25764. "required": ["type", "id", "syncEvent"],
  25765. "additionalProperties": false
  25766. },
  25767. "SyncEventSessionNextToolFailed": {
  25768. "type": "object",
  25769. "properties": {
  25770. "type": {
  25771. "type": "string",
  25772. "enum": ["sync"]
  25773. },
  25774. "id": {
  25775. "type": "string",
  25776. "pattern": "^evt_"
  25777. },
  25778. "syncEvent": {
  25779. "type": "object",
  25780. "properties": {
  25781. "type": {
  25782. "type": "string",
  25783. "enum": ["session.next.tool.failed.1"]
  25784. },
  25785. "id": {
  25786. "type": "string",
  25787. "pattern": "^evt_"
  25788. },
  25789. "seq": {
  25790. "type": "number"
  25791. },
  25792. "aggregateID": {
  25793. "type": "string"
  25794. },
  25795. "data": {
  25796. "type": "object",
  25797. "properties": {
  25798. "timestamp": {
  25799. "type": "number"
  25800. },
  25801. "sessionID": {
  25802. "type": "string",
  25803. "pattern": "^ses"
  25804. },
  25805. "assistantMessageID": {
  25806. "type": "string",
  25807. "pattern": "^msg_"
  25808. },
  25809. "callID": {
  25810. "type": "string"
  25811. },
  25812. "error": {
  25813. "$ref": "#/components/schemas/SessionErrorUnknown"
  25814. },
  25815. "result": {},
  25816. "provider": {
  25817. "type": "object",
  25818. "properties": {
  25819. "executed": {
  25820. "type": "boolean"
  25821. },
  25822. "metadata": {
  25823. "$ref": "#/components/schemas/LLMProviderMetadata"
  25824. }
  25825. },
  25826. "required": ["executed"],
  25827. "additionalProperties": false
  25828. }
  25829. },
  25830. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  25831. "additionalProperties": false
  25832. }
  25833. },
  25834. "required": ["type", "id", "seq", "aggregateID", "data"],
  25835. "additionalProperties": false
  25836. }
  25837. },
  25838. "required": ["type", "id", "syncEvent"],
  25839. "additionalProperties": false
  25840. },
  25841. "SyncEventSessionNextRetried": {
  25842. "type": "object",
  25843. "properties": {
  25844. "type": {
  25845. "type": "string",
  25846. "enum": ["sync"]
  25847. },
  25848. "id": {
  25849. "type": "string",
  25850. "pattern": "^evt_"
  25851. },
  25852. "syncEvent": {
  25853. "type": "object",
  25854. "properties": {
  25855. "type": {
  25856. "type": "string",
  25857. "enum": ["session.next.retried.1"]
  25858. },
  25859. "id": {
  25860. "type": "string",
  25861. "pattern": "^evt_"
  25862. },
  25863. "seq": {
  25864. "type": "number"
  25865. },
  25866. "aggregateID": {
  25867. "type": "string"
  25868. },
  25869. "data": {
  25870. "type": "object",
  25871. "properties": {
  25872. "timestamp": {
  25873. "type": "number"
  25874. },
  25875. "sessionID": {
  25876. "type": "string",
  25877. "pattern": "^ses"
  25878. },
  25879. "attempt": {
  25880. "type": "number"
  25881. },
  25882. "error": {
  25883. "$ref": "#/components/schemas/SessionNextRetry_error"
  25884. }
  25885. },
  25886. "required": ["timestamp", "sessionID", "attempt", "error"],
  25887. "additionalProperties": false
  25888. }
  25889. },
  25890. "required": ["type", "id", "seq", "aggregateID", "data"],
  25891. "additionalProperties": false
  25892. }
  25893. },
  25894. "required": ["type", "id", "syncEvent"],
  25895. "additionalProperties": false
  25896. },
  25897. "SyncEventSessionNextCompactionStarted": {
  25898. "type": "object",
  25899. "properties": {
  25900. "type": {
  25901. "type": "string",
  25902. "enum": ["sync"]
  25903. },
  25904. "id": {
  25905. "type": "string",
  25906. "pattern": "^evt_"
  25907. },
  25908. "syncEvent": {
  25909. "type": "object",
  25910. "properties": {
  25911. "type": {
  25912. "type": "string",
  25913. "enum": ["session.next.compaction.started.1"]
  25914. },
  25915. "id": {
  25916. "type": "string",
  25917. "pattern": "^evt_"
  25918. },
  25919. "seq": {
  25920. "type": "number"
  25921. },
  25922. "aggregateID": {
  25923. "type": "string"
  25924. },
  25925. "data": {
  25926. "type": "object",
  25927. "properties": {
  25928. "timestamp": {
  25929. "type": "number"
  25930. },
  25931. "sessionID": {
  25932. "type": "string",
  25933. "pattern": "^ses"
  25934. },
  25935. "messageID": {
  25936. "type": "string",
  25937. "pattern": "^msg_"
  25938. },
  25939. "reason": {
  25940. "type": "string",
  25941. "enum": ["auto", "manual"]
  25942. }
  25943. },
  25944. "required": ["timestamp", "sessionID", "messageID", "reason"],
  25945. "additionalProperties": false
  25946. }
  25947. },
  25948. "required": ["type", "id", "seq", "aggregateID", "data"],
  25949. "additionalProperties": false
  25950. }
  25951. },
  25952. "required": ["type", "id", "syncEvent"],
  25953. "additionalProperties": false
  25954. },
  25955. "SyncEventSessionNextCompactionEnded": {
  25956. "type": "object",
  25957. "properties": {
  25958. "type": {
  25959. "type": "string",
  25960. "enum": ["sync"]
  25961. },
  25962. "id": {
  25963. "type": "string",
  25964. "pattern": "^evt_"
  25965. },
  25966. "syncEvent": {
  25967. "type": "object",
  25968. "properties": {
  25969. "type": {
  25970. "type": "string",
  25971. "enum": ["session.next.compaction.ended.1"]
  25972. },
  25973. "id": {
  25974. "type": "string",
  25975. "pattern": "^evt_"
  25976. },
  25977. "seq": {
  25978. "type": "number"
  25979. },
  25980. "aggregateID": {
  25981. "type": "string"
  25982. },
  25983. "data": {
  25984. "type": "object",
  25985. "properties": {
  25986. "timestamp": {
  25987. "type": "number"
  25988. },
  25989. "sessionID": {
  25990. "type": "string",
  25991. "pattern": "^ses"
  25992. },
  25993. "messageID": {
  25994. "type": "string",
  25995. "pattern": "^msg_"
  25996. },
  25997. "reason": {
  25998. "type": "string",
  25999. "enum": ["auto", "manual"]
  26000. },
  26001. "text": {
  26002. "type": "string"
  26003. },
  26004. "recent": {
  26005. "type": "string"
  26006. }
  26007. },
  26008. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  26009. "additionalProperties": false
  26010. }
  26011. },
  26012. "required": ["type", "id", "seq", "aggregateID", "data"],
  26013. "additionalProperties": false
  26014. }
  26015. },
  26016. "required": ["type", "id", "syncEvent"],
  26017. "additionalProperties": false
  26018. },
  26019. "SyncEventSessionNextRevertStaged": {
  26020. "type": "object",
  26021. "properties": {
  26022. "type": {
  26023. "type": "string",
  26024. "enum": ["sync"]
  26025. },
  26026. "id": {
  26027. "type": "string",
  26028. "pattern": "^evt_"
  26029. },
  26030. "syncEvent": {
  26031. "type": "object",
  26032. "properties": {
  26033. "type": {
  26034. "type": "string",
  26035. "enum": ["session.next.revert.staged.1"]
  26036. },
  26037. "id": {
  26038. "type": "string",
  26039. "pattern": "^evt_"
  26040. },
  26041. "seq": {
  26042. "type": "number"
  26043. },
  26044. "aggregateID": {
  26045. "type": "string"
  26046. },
  26047. "data": {
  26048. "type": "object",
  26049. "properties": {
  26050. "timestamp": {
  26051. "type": "number"
  26052. },
  26053. "sessionID": {
  26054. "type": "string",
  26055. "pattern": "^ses"
  26056. },
  26057. "revert": {
  26058. "$ref": "#/components/schemas/RevertState"
  26059. }
  26060. },
  26061. "required": ["timestamp", "sessionID", "revert"],
  26062. "additionalProperties": false
  26063. }
  26064. },
  26065. "required": ["type", "id", "seq", "aggregateID", "data"],
  26066. "additionalProperties": false
  26067. }
  26068. },
  26069. "required": ["type", "id", "syncEvent"],
  26070. "additionalProperties": false
  26071. },
  26072. "SyncEventSessionNextRevertCleared": {
  26073. "type": "object",
  26074. "properties": {
  26075. "type": {
  26076. "type": "string",
  26077. "enum": ["sync"]
  26078. },
  26079. "id": {
  26080. "type": "string",
  26081. "pattern": "^evt_"
  26082. },
  26083. "syncEvent": {
  26084. "type": "object",
  26085. "properties": {
  26086. "type": {
  26087. "type": "string",
  26088. "enum": ["session.next.revert.cleared.1"]
  26089. },
  26090. "id": {
  26091. "type": "string",
  26092. "pattern": "^evt_"
  26093. },
  26094. "seq": {
  26095. "type": "number"
  26096. },
  26097. "aggregateID": {
  26098. "type": "string"
  26099. },
  26100. "data": {
  26101. "type": "object",
  26102. "properties": {
  26103. "timestamp": {
  26104. "type": "number"
  26105. },
  26106. "sessionID": {
  26107. "type": "string",
  26108. "pattern": "^ses"
  26109. }
  26110. },
  26111. "required": ["timestamp", "sessionID"],
  26112. "additionalProperties": false
  26113. }
  26114. },
  26115. "required": ["type", "id", "seq", "aggregateID", "data"],
  26116. "additionalProperties": false
  26117. }
  26118. },
  26119. "required": ["type", "id", "syncEvent"],
  26120. "additionalProperties": false
  26121. },
  26122. "SyncEventSessionNextRevertCommitted": {
  26123. "type": "object",
  26124. "properties": {
  26125. "type": {
  26126. "type": "string",
  26127. "enum": ["sync"]
  26128. },
  26129. "id": {
  26130. "type": "string",
  26131. "pattern": "^evt_"
  26132. },
  26133. "syncEvent": {
  26134. "type": "object",
  26135. "properties": {
  26136. "type": {
  26137. "type": "string",
  26138. "enum": ["session.next.revert.committed.1"]
  26139. },
  26140. "id": {
  26141. "type": "string",
  26142. "pattern": "^evt_"
  26143. },
  26144. "seq": {
  26145. "type": "number"
  26146. },
  26147. "aggregateID": {
  26148. "type": "string"
  26149. },
  26150. "data": {
  26151. "type": "object",
  26152. "properties": {
  26153. "timestamp": {
  26154. "type": "number"
  26155. },
  26156. "sessionID": {
  26157. "type": "string",
  26158. "pattern": "^ses"
  26159. },
  26160. "messageID": {
  26161. "type": "string",
  26162. "pattern": "^msg_"
  26163. }
  26164. },
  26165. "required": ["timestamp", "sessionID", "messageID"],
  26166. "additionalProperties": false
  26167. }
  26168. },
  26169. "required": ["type", "id", "seq", "aggregateID", "data"],
  26170. "additionalProperties": false
  26171. }
  26172. },
  26173. "required": ["type", "id", "syncEvent"],
  26174. "additionalProperties": false
  26175. },
  26176. "ConfigV2ReferenceGit": {
  26177. "type": "object",
  26178. "properties": {
  26179. "repository": {
  26180. "type": "string"
  26181. },
  26182. "branch": {
  26183. "type": "string"
  26184. },
  26185. "description": {
  26186. "type": "string"
  26187. },
  26188. "hidden": {
  26189. "type": "boolean"
  26190. }
  26191. },
  26192. "required": ["repository"],
  26193. "additionalProperties": false
  26194. },
  26195. "ConfigV2ReferenceLocal": {
  26196. "type": "object",
  26197. "properties": {
  26198. "path": {
  26199. "type": "string"
  26200. },
  26201. "description": {
  26202. "type": "string"
  26203. },
  26204. "hidden": {
  26205. "type": "boolean"
  26206. }
  26207. },
  26208. "required": ["path"],
  26209. "additionalProperties": false
  26210. },
  26211. "PolicyEffect": {
  26212. "type": "string",
  26213. "enum": ["allow", "deny"]
  26214. },
  26215. "ConfigV2ExperimentalPolicy": {
  26216. "type": "object",
  26217. "properties": {
  26218. "action": {
  26219. "type": "string",
  26220. "enum": ["provider.use"]
  26221. },
  26222. "effect": {
  26223. "$ref": "#/components/schemas/PolicyEffect"
  26224. },
  26225. "resource": {
  26226. "type": "string"
  26227. }
  26228. },
  26229. "required": ["action", "effect", "resource"],
  26230. "additionalProperties": false
  26231. },
  26232. "ProjectDirectories": {
  26233. "type": "array",
  26234. "items": {
  26235. "type": "object",
  26236. "properties": {
  26237. "directory": {
  26238. "type": "string"
  26239. },
  26240. "strategy": {
  26241. "type": "string"
  26242. }
  26243. },
  26244. "required": ["directory"],
  26245. "additionalProperties": false
  26246. }
  26247. },
  26248. "PtyTicketConnectToken": {
  26249. "type": "object",
  26250. "properties": {
  26251. "ticket": {
  26252. "type": "string"
  26253. },
  26254. "expires_in": {
  26255. "type": "integer",
  26256. "exclusiveMinimum": 0
  26257. }
  26258. },
  26259. "required": ["ticket", "expires_in"],
  26260. "additionalProperties": false
  26261. },
  26262. "WorkspaceEventConnectionStatus": {
  26263. "type": "object",
  26264. "properties": {
  26265. "workspaceID": {
  26266. "type": "string",
  26267. "pattern": "^wrk"
  26268. },
  26269. "status": {
  26270. "type": "string",
  26271. "enum": ["connected", "connecting", "disconnected", "error"]
  26272. }
  26273. },
  26274. "required": ["workspaceID", "status"],
  26275. "additionalProperties": false
  26276. },
  26277. "LocationInfo": {
  26278. "type": "object",
  26279. "properties": {
  26280. "directory": {
  26281. "type": "string"
  26282. },
  26283. "workspaceID": {
  26284. "type": "string",
  26285. "pattern": "^wrk"
  26286. },
  26287. "project": {
  26288. "type": "object",
  26289. "properties": {
  26290. "id": {
  26291. "type": "string"
  26292. },
  26293. "directory": {
  26294. "type": "string"
  26295. }
  26296. },
  26297. "required": ["id", "directory"],
  26298. "additionalProperties": false
  26299. }
  26300. },
  26301. "required": ["directory", "project"],
  26302. "additionalProperties": false
  26303. },
  26304. "ProviderRequest": {
  26305. "type": "object",
  26306. "properties": {
  26307. "headers": {
  26308. "type": "object",
  26309. "additionalProperties": {
  26310. "type": "string"
  26311. }
  26312. },
  26313. "body": {
  26314. "type": "object"
  26315. }
  26316. },
  26317. "required": ["headers", "body"],
  26318. "additionalProperties": false
  26319. },
  26320. "AgentColor": {
  26321. "anyOf": [
  26322. {
  26323. "type": "string",
  26324. "pattern": "^#[0-9a-fA-F]{6}$"
  26325. },
  26326. {
  26327. "type": "string",
  26328. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  26329. }
  26330. ]
  26331. },
  26332. "PermissionV2Effect": {
  26333. "type": "string",
  26334. "enum": ["allow", "deny", "ask"]
  26335. },
  26336. "PermissionV2Rule": {
  26337. "type": "object",
  26338. "properties": {
  26339. "action": {
  26340. "type": "string"
  26341. },
  26342. "resource": {
  26343. "type": "string"
  26344. },
  26345. "effect": {
  26346. "$ref": "#/components/schemas/PermissionV2Effect"
  26347. }
  26348. },
  26349. "required": ["action", "resource", "effect"],
  26350. "additionalProperties": false
  26351. },
  26352. "PermissionV2Ruleset": {
  26353. "type": "array",
  26354. "items": {
  26355. "$ref": "#/components/schemas/PermissionV2Rule"
  26356. }
  26357. },
  26358. "AgentV2Info": {
  26359. "type": "object",
  26360. "properties": {
  26361. "id": {
  26362. "type": "string"
  26363. },
  26364. "model": {
  26365. "$ref": "#/components/schemas/ModelRef"
  26366. },
  26367. "request": {
  26368. "$ref": "#/components/schemas/ProviderRequest"
  26369. },
  26370. "system": {
  26371. "type": "string"
  26372. },
  26373. "description": {
  26374. "type": "string"
  26375. },
  26376. "mode": {
  26377. "type": "string",
  26378. "enum": ["subagent", "primary", "all"]
  26379. },
  26380. "hidden": {
  26381. "type": "boolean"
  26382. },
  26383. "color": {
  26384. "$ref": "#/components/schemas/AgentColor"
  26385. },
  26386. "steps": {
  26387. "type": "integer",
  26388. "exclusiveMinimum": 0
  26389. },
  26390. "permissions": {
  26391. "$ref": "#/components/schemas/PermissionV2Ruleset"
  26392. }
  26393. },
  26394. "required": ["id", "request", "mode", "hidden", "permissions"],
  26395. "additionalProperties": false
  26396. },
  26397. "SessionV2Info": {
  26398. "type": "object",
  26399. "properties": {
  26400. "id": {
  26401. "type": "string",
  26402. "pattern": "^ses"
  26403. },
  26404. "parentID": {
  26405. "type": "string",
  26406. "pattern": "^ses"
  26407. },
  26408. "projectID": {
  26409. "type": "string"
  26410. },
  26411. "agent": {
  26412. "type": "string"
  26413. },
  26414. "model": {
  26415. "$ref": "#/components/schemas/ModelRef"
  26416. },
  26417. "cost": {
  26418. "type": "number"
  26419. },
  26420. "tokens": {
  26421. "type": "object",
  26422. "properties": {
  26423. "input": {
  26424. "type": "number"
  26425. },
  26426. "output": {
  26427. "type": "number"
  26428. },
  26429. "reasoning": {
  26430. "type": "number"
  26431. },
  26432. "cache": {
  26433. "type": "object",
  26434. "properties": {
  26435. "read": {
  26436. "type": "number"
  26437. },
  26438. "write": {
  26439. "type": "number"
  26440. }
  26441. },
  26442. "required": ["read", "write"],
  26443. "additionalProperties": false
  26444. }
  26445. },
  26446. "required": ["input", "output", "reasoning", "cache"],
  26447. "additionalProperties": false
  26448. },
  26449. "time": {
  26450. "type": "object",
  26451. "properties": {
  26452. "created": {
  26453. "type": "number"
  26454. },
  26455. "updated": {
  26456. "type": "number"
  26457. },
  26458. "archived": {
  26459. "type": "number"
  26460. }
  26461. },
  26462. "required": ["created", "updated"],
  26463. "additionalProperties": false
  26464. },
  26465. "title": {
  26466. "type": "string"
  26467. },
  26468. "location": {
  26469. "$ref": "#/components/schemas/LocationRef"
  26470. },
  26471. "subpath": {
  26472. "type": "string"
  26473. },
  26474. "revert": {
  26475. "$ref": "#/components/schemas/RevertState"
  26476. }
  26477. },
  26478. "required": ["id", "projectID", "cost", "tokens", "time", "title", "location"],
  26479. "additionalProperties": false
  26480. },
  26481. "SessionInputAdmitted": {
  26482. "type": "object",
  26483. "properties": {
  26484. "admittedSeq": {
  26485. "type": "integer",
  26486. "minimum": 0
  26487. },
  26488. "id": {
  26489. "type": "string",
  26490. "pattern": "^msg_"
  26491. },
  26492. "sessionID": {
  26493. "type": "string",
  26494. "pattern": "^ses"
  26495. },
  26496. "prompt": {
  26497. "$ref": "#/components/schemas/Prompt"
  26498. },
  26499. "delivery": {
  26500. "type": "string",
  26501. "enum": ["steer", "queue"]
  26502. },
  26503. "timeCreated": {
  26504. "type": "number"
  26505. },
  26506. "promotedSeq": {
  26507. "type": "integer",
  26508. "minimum": 0
  26509. }
  26510. },
  26511. "required": ["admittedSeq", "id", "sessionID", "prompt", "delivery", "timeCreated"],
  26512. "additionalProperties": false
  26513. },
  26514. "SessionMessageAgentSwitched": {
  26515. "type": "object",
  26516. "properties": {
  26517. "id": {
  26518. "type": "string",
  26519. "pattern": "^msg_"
  26520. },
  26521. "metadata": {
  26522. "type": "object"
  26523. },
  26524. "time": {
  26525. "type": "object",
  26526. "properties": {
  26527. "created": {
  26528. "type": "number"
  26529. }
  26530. },
  26531. "required": ["created"],
  26532. "additionalProperties": false
  26533. },
  26534. "type": {
  26535. "type": "string",
  26536. "enum": ["agent-switched"]
  26537. },
  26538. "agent": {
  26539. "type": "string"
  26540. }
  26541. },
  26542. "required": ["id", "time", "type", "agent"],
  26543. "additionalProperties": false
  26544. },
  26545. "SessionMessageModelSwitched": {
  26546. "type": "object",
  26547. "properties": {
  26548. "id": {
  26549. "type": "string",
  26550. "pattern": "^msg_"
  26551. },
  26552. "metadata": {
  26553. "type": "object"
  26554. },
  26555. "time": {
  26556. "type": "object",
  26557. "properties": {
  26558. "created": {
  26559. "type": "number"
  26560. }
  26561. },
  26562. "required": ["created"],
  26563. "additionalProperties": false
  26564. },
  26565. "type": {
  26566. "type": "string",
  26567. "enum": ["model-switched"]
  26568. },
  26569. "model": {
  26570. "$ref": "#/components/schemas/ModelRef"
  26571. }
  26572. },
  26573. "required": ["id", "time", "type", "model"],
  26574. "additionalProperties": false
  26575. },
  26576. "SessionMessageUser": {
  26577. "type": "object",
  26578. "properties": {
  26579. "id": {
  26580. "type": "string",
  26581. "pattern": "^msg_"
  26582. },
  26583. "metadata": {
  26584. "type": "object"
  26585. },
  26586. "time": {
  26587. "type": "object",
  26588. "properties": {
  26589. "created": {
  26590. "type": "number"
  26591. }
  26592. },
  26593. "required": ["created"],
  26594. "additionalProperties": false
  26595. },
  26596. "text": {
  26597. "type": "string"
  26598. },
  26599. "files": {
  26600. "type": "array",
  26601. "items": {
  26602. "$ref": "#/components/schemas/PromptFileAttachment"
  26603. }
  26604. },
  26605. "agents": {
  26606. "type": "array",
  26607. "items": {
  26608. "$ref": "#/components/schemas/PromptAgentAttachment"
  26609. }
  26610. },
  26611. "type": {
  26612. "type": "string",
  26613. "enum": ["user"]
  26614. }
  26615. },
  26616. "required": ["id", "time", "text", "type"],
  26617. "additionalProperties": false
  26618. },
  26619. "SessionMessageSynthetic": {
  26620. "type": "object",
  26621. "properties": {
  26622. "id": {
  26623. "type": "string",
  26624. "pattern": "^msg_"
  26625. },
  26626. "metadata": {
  26627. "type": "object"
  26628. },
  26629. "time": {
  26630. "type": "object",
  26631. "properties": {
  26632. "created": {
  26633. "type": "number"
  26634. }
  26635. },
  26636. "required": ["created"],
  26637. "additionalProperties": false
  26638. },
  26639. "sessionID": {
  26640. "type": "string",
  26641. "pattern": "^ses"
  26642. },
  26643. "text": {
  26644. "type": "string"
  26645. },
  26646. "type": {
  26647. "type": "string",
  26648. "enum": ["synthetic"]
  26649. }
  26650. },
  26651. "required": ["id", "time", "sessionID", "text", "type"],
  26652. "additionalProperties": false
  26653. },
  26654. "SessionMessageSystem": {
  26655. "type": "object",
  26656. "properties": {
  26657. "id": {
  26658. "type": "string",
  26659. "pattern": "^msg_"
  26660. },
  26661. "metadata": {
  26662. "type": "object"
  26663. },
  26664. "time": {
  26665. "type": "object",
  26666. "properties": {
  26667. "created": {
  26668. "type": "number"
  26669. }
  26670. },
  26671. "required": ["created"],
  26672. "additionalProperties": false
  26673. },
  26674. "type": {
  26675. "type": "string",
  26676. "enum": ["system"]
  26677. },
  26678. "text": {
  26679. "type": "string"
  26680. }
  26681. },
  26682. "required": ["id", "time", "type", "text"],
  26683. "additionalProperties": false
  26684. },
  26685. "SessionMessageShell": {
  26686. "type": "object",
  26687. "properties": {
  26688. "id": {
  26689. "type": "string",
  26690. "pattern": "^msg_"
  26691. },
  26692. "metadata": {
  26693. "type": "object"
  26694. },
  26695. "time": {
  26696. "type": "object",
  26697. "properties": {
  26698. "created": {
  26699. "type": "number"
  26700. },
  26701. "completed": {
  26702. "type": "number"
  26703. }
  26704. },
  26705. "required": ["created"],
  26706. "additionalProperties": false
  26707. },
  26708. "type": {
  26709. "type": "string",
  26710. "enum": ["shell"]
  26711. },
  26712. "callID": {
  26713. "type": "string"
  26714. },
  26715. "command": {
  26716. "type": "string"
  26717. },
  26718. "output": {
  26719. "type": "string"
  26720. }
  26721. },
  26722. "required": ["id", "time", "type", "callID", "command", "output"],
  26723. "additionalProperties": false
  26724. },
  26725. "SessionMessageAssistantText": {
  26726. "type": "object",
  26727. "properties": {
  26728. "type": {
  26729. "type": "string",
  26730. "enum": ["text"]
  26731. },
  26732. "id": {
  26733. "type": "string"
  26734. },
  26735. "text": {
  26736. "type": "string"
  26737. }
  26738. },
  26739. "required": ["type", "id", "text"],
  26740. "additionalProperties": false
  26741. },
  26742. "SessionMessageAssistantReasoning": {
  26743. "type": "object",
  26744. "properties": {
  26745. "type": {
  26746. "type": "string",
  26747. "enum": ["reasoning"]
  26748. },
  26749. "id": {
  26750. "type": "string"
  26751. },
  26752. "text": {
  26753. "type": "string"
  26754. },
  26755. "providerMetadata": {
  26756. "$ref": "#/components/schemas/LLMProviderMetadata"
  26757. }
  26758. },
  26759. "required": ["type", "id", "text"],
  26760. "additionalProperties": false
  26761. },
  26762. "SessionMessageToolStatePending": {
  26763. "type": "object",
  26764. "properties": {
  26765. "status": {
  26766. "type": "string",
  26767. "enum": ["pending"]
  26768. },
  26769. "input": {
  26770. "type": "string"
  26771. }
  26772. },
  26773. "required": ["status", "input"],
  26774. "additionalProperties": false
  26775. },
  26776. "SessionMessageToolStateRunning": {
  26777. "type": "object",
  26778. "properties": {
  26779. "status": {
  26780. "type": "string",
  26781. "enum": ["running"]
  26782. },
  26783. "input": {
  26784. "type": "object"
  26785. },
  26786. "structured": {
  26787. "type": "object"
  26788. },
  26789. "content": {
  26790. "type": "array",
  26791. "items": {
  26792. "$ref": "#/components/schemas/LLMToolContent"
  26793. }
  26794. }
  26795. },
  26796. "required": ["status", "input", "structured", "content"],
  26797. "additionalProperties": false
  26798. },
  26799. "SessionMessageToolStateCompleted": {
  26800. "type": "object",
  26801. "properties": {
  26802. "status": {
  26803. "type": "string",
  26804. "enum": ["completed"]
  26805. },
  26806. "input": {
  26807. "type": "object"
  26808. },
  26809. "attachments": {
  26810. "type": "array",
  26811. "items": {
  26812. "$ref": "#/components/schemas/PromptFileAttachment"
  26813. }
  26814. },
  26815. "content": {
  26816. "type": "array",
  26817. "items": {
  26818. "$ref": "#/components/schemas/LLMToolContent"
  26819. }
  26820. },
  26821. "outputPaths": {
  26822. "type": "array",
  26823. "items": {
  26824. "type": "string"
  26825. }
  26826. },
  26827. "structured": {
  26828. "type": "object"
  26829. },
  26830. "result": {}
  26831. },
  26832. "required": ["status", "input", "content", "structured"],
  26833. "additionalProperties": false
  26834. },
  26835. "SessionMessageToolStateError": {
  26836. "type": "object",
  26837. "properties": {
  26838. "status": {
  26839. "type": "string",
  26840. "enum": ["error"]
  26841. },
  26842. "input": {
  26843. "type": "object"
  26844. },
  26845. "content": {
  26846. "type": "array",
  26847. "items": {
  26848. "$ref": "#/components/schemas/LLMToolContent"
  26849. }
  26850. },
  26851. "structured": {
  26852. "type": "object"
  26853. },
  26854. "error": {
  26855. "$ref": "#/components/schemas/SessionErrorUnknown"
  26856. },
  26857. "result": {}
  26858. },
  26859. "required": ["status", "input", "content", "structured", "error"],
  26860. "additionalProperties": false
  26861. },
  26862. "SessionMessageAssistantTool": {
  26863. "type": "object",
  26864. "properties": {
  26865. "type": {
  26866. "type": "string",
  26867. "enum": ["tool"]
  26868. },
  26869. "id": {
  26870. "type": "string"
  26871. },
  26872. "name": {
  26873. "type": "string"
  26874. },
  26875. "provider": {
  26876. "type": "object",
  26877. "properties": {
  26878. "executed": {
  26879. "type": "boolean"
  26880. },
  26881. "metadata": {
  26882. "$ref": "#/components/schemas/LLMProviderMetadata"
  26883. },
  26884. "resultMetadata": {
  26885. "$ref": "#/components/schemas/LLMProviderMetadata"
  26886. }
  26887. },
  26888. "required": ["executed"],
  26889. "additionalProperties": false
  26890. },
  26891. "state": {
  26892. "anyOf": [
  26893. {
  26894. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  26895. },
  26896. {
  26897. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  26898. },
  26899. {
  26900. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  26901. },
  26902. {
  26903. "$ref": "#/components/schemas/SessionMessageToolStateError"
  26904. }
  26905. ]
  26906. },
  26907. "time": {
  26908. "type": "object",
  26909. "properties": {
  26910. "created": {
  26911. "type": "number"
  26912. },
  26913. "ran": {
  26914. "type": "number"
  26915. },
  26916. "completed": {
  26917. "type": "number"
  26918. },
  26919. "pruned": {
  26920. "type": "number"
  26921. }
  26922. },
  26923. "required": ["created"],
  26924. "additionalProperties": false
  26925. }
  26926. },
  26927. "required": ["type", "id", "name", "state", "time"],
  26928. "additionalProperties": false
  26929. },
  26930. "SessionMessageAssistant": {
  26931. "type": "object",
  26932. "properties": {
  26933. "id": {
  26934. "type": "string",
  26935. "pattern": "^msg_"
  26936. },
  26937. "metadata": {
  26938. "type": "object"
  26939. },
  26940. "time": {
  26941. "type": "object",
  26942. "properties": {
  26943. "created": {
  26944. "type": "number"
  26945. },
  26946. "completed": {
  26947. "type": "number"
  26948. }
  26949. },
  26950. "required": ["created"],
  26951. "additionalProperties": false
  26952. },
  26953. "type": {
  26954. "type": "string",
  26955. "enum": ["assistant"]
  26956. },
  26957. "agent": {
  26958. "type": "string"
  26959. },
  26960. "model": {
  26961. "$ref": "#/components/schemas/ModelRef"
  26962. },
  26963. "content": {
  26964. "type": "array",
  26965. "items": {
  26966. "anyOf": [
  26967. {
  26968. "$ref": "#/components/schemas/SessionMessageAssistantText"
  26969. },
  26970. {
  26971. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  26972. },
  26973. {
  26974. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  26975. }
  26976. ]
  26977. }
  26978. },
  26979. "snapshot": {
  26980. "type": "object",
  26981. "properties": {
  26982. "start": {
  26983. "type": "string"
  26984. },
  26985. "end": {
  26986. "type": "string"
  26987. },
  26988. "files": {
  26989. "type": "array",
  26990. "items": {
  26991. "type": "string"
  26992. }
  26993. }
  26994. },
  26995. "additionalProperties": false
  26996. },
  26997. "finish": {
  26998. "type": "string"
  26999. },
  27000. "cost": {
  27001. "type": "number"
  27002. },
  27003. "tokens": {
  27004. "type": "object",
  27005. "properties": {
  27006. "input": {
  27007. "type": "number"
  27008. },
  27009. "output": {
  27010. "type": "number"
  27011. },
  27012. "reasoning": {
  27013. "type": "number"
  27014. },
  27015. "cache": {
  27016. "type": "object",
  27017. "properties": {
  27018. "read": {
  27019. "type": "number"
  27020. },
  27021. "write": {
  27022. "type": "number"
  27023. }
  27024. },
  27025. "required": ["read", "write"],
  27026. "additionalProperties": false
  27027. }
  27028. },
  27029. "required": ["input", "output", "reasoning", "cache"],
  27030. "additionalProperties": false
  27031. },
  27032. "error": {
  27033. "$ref": "#/components/schemas/SessionErrorUnknown"
  27034. }
  27035. },
  27036. "required": ["id", "time", "type", "agent", "model", "content"],
  27037. "additionalProperties": false
  27038. },
  27039. "SessionMessageCompaction": {
  27040. "type": "object",
  27041. "properties": {
  27042. "type": {
  27043. "type": "string",
  27044. "enum": ["compaction"]
  27045. },
  27046. "reason": {
  27047. "type": "string",
  27048. "enum": ["auto", "manual"]
  27049. },
  27050. "summary": {
  27051. "type": "string"
  27052. },
  27053. "recent": {
  27054. "type": "string"
  27055. },
  27056. "id": {
  27057. "type": "string",
  27058. "pattern": "^msg_"
  27059. },
  27060. "metadata": {
  27061. "type": "object"
  27062. },
  27063. "time": {
  27064. "type": "object",
  27065. "properties": {
  27066. "created": {
  27067. "type": "number"
  27068. }
  27069. },
  27070. "required": ["created"],
  27071. "additionalProperties": false
  27072. }
  27073. },
  27074. "required": ["type", "reason", "summary", "recent", "id", "time"],
  27075. "additionalProperties": false
  27076. },
  27077. "SessionMessage": {
  27078. "anyOf": [
  27079. {
  27080. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  27081. },
  27082. {
  27083. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  27084. },
  27085. {
  27086. "$ref": "#/components/schemas/SessionMessageUser"
  27087. },
  27088. {
  27089. "$ref": "#/components/schemas/SessionMessageSynthetic"
  27090. },
  27091. {
  27092. "$ref": "#/components/schemas/SessionMessageSystem"
  27093. },
  27094. {
  27095. "$ref": "#/components/schemas/SessionMessageShell"
  27096. },
  27097. {
  27098. "$ref": "#/components/schemas/SessionMessageAssistant"
  27099. },
  27100. {
  27101. "$ref": "#/components/schemas/SessionMessageCompaction"
  27102. }
  27103. ]
  27104. },
  27105. "ModelApi": {
  27106. "anyOf": [
  27107. {
  27108. "type": "object",
  27109. "properties": {
  27110. "id": {
  27111. "type": "string"
  27112. },
  27113. "type": {
  27114. "type": "string",
  27115. "enum": ["aisdk"]
  27116. },
  27117. "package": {
  27118. "type": "string"
  27119. },
  27120. "url": {
  27121. "type": "string"
  27122. },
  27123. "settings": {
  27124. "type": "object"
  27125. }
  27126. },
  27127. "required": ["id", "type", "package"],
  27128. "additionalProperties": false
  27129. },
  27130. {
  27131. "type": "object",
  27132. "properties": {
  27133. "id": {
  27134. "type": "string"
  27135. },
  27136. "type": {
  27137. "type": "string",
  27138. "enum": ["native"]
  27139. },
  27140. "url": {
  27141. "type": "string"
  27142. },
  27143. "settings": {
  27144. "type": "object"
  27145. }
  27146. },
  27147. "required": ["id", "type", "settings"],
  27148. "additionalProperties": false
  27149. }
  27150. ]
  27151. },
  27152. "ModelCapabilities": {
  27153. "type": "object",
  27154. "properties": {
  27155. "tools": {
  27156. "type": "boolean"
  27157. },
  27158. "input": {
  27159. "type": "array",
  27160. "items": {
  27161. "type": "string"
  27162. }
  27163. },
  27164. "output": {
  27165. "type": "array",
  27166. "items": {
  27167. "type": "string"
  27168. }
  27169. }
  27170. },
  27171. "required": ["tools", "input", "output"],
  27172. "additionalProperties": false
  27173. },
  27174. "ModelCost": {
  27175. "type": "object",
  27176. "properties": {
  27177. "tier": {
  27178. "type": "object",
  27179. "properties": {
  27180. "type": {
  27181. "type": "string",
  27182. "enum": ["context"]
  27183. },
  27184. "size": {
  27185. "type": "integer"
  27186. }
  27187. },
  27188. "required": ["type", "size"],
  27189. "additionalProperties": false
  27190. },
  27191. "input": {
  27192. "type": "number"
  27193. },
  27194. "output": {
  27195. "type": "number"
  27196. },
  27197. "cache": {
  27198. "type": "object",
  27199. "properties": {
  27200. "read": {
  27201. "type": "number"
  27202. },
  27203. "write": {
  27204. "type": "number"
  27205. }
  27206. },
  27207. "required": ["read", "write"],
  27208. "additionalProperties": false
  27209. }
  27210. },
  27211. "required": ["input", "output", "cache"],
  27212. "additionalProperties": false
  27213. },
  27214. "ModelV2Info": {
  27215. "type": "object",
  27216. "properties": {
  27217. "id": {
  27218. "type": "string"
  27219. },
  27220. "providerID": {
  27221. "type": "string"
  27222. },
  27223. "family": {
  27224. "type": "string"
  27225. },
  27226. "name": {
  27227. "type": "string"
  27228. },
  27229. "api": {
  27230. "$ref": "#/components/schemas/ModelApi"
  27231. },
  27232. "capabilities": {
  27233. "$ref": "#/components/schemas/ModelCapabilities"
  27234. },
  27235. "request": {
  27236. "type": "object",
  27237. "properties": {
  27238. "headers": {
  27239. "type": "object",
  27240. "additionalProperties": {
  27241. "type": "string"
  27242. }
  27243. },
  27244. "body": {
  27245. "type": "object"
  27246. },
  27247. "variant": {
  27248. "type": "string"
  27249. }
  27250. },
  27251. "required": ["headers", "body"],
  27252. "additionalProperties": false
  27253. },
  27254. "variants": {
  27255. "type": "array",
  27256. "items": {
  27257. "type": "object",
  27258. "properties": {
  27259. "id": {
  27260. "type": "string"
  27261. },
  27262. "headers": {
  27263. "type": "object",
  27264. "additionalProperties": {
  27265. "type": "string"
  27266. }
  27267. },
  27268. "body": {
  27269. "type": "object"
  27270. }
  27271. },
  27272. "required": ["id", "headers", "body"],
  27273. "additionalProperties": false
  27274. }
  27275. },
  27276. "time": {
  27277. "type": "object",
  27278. "properties": {
  27279. "released": {
  27280. "type": "number"
  27281. }
  27282. },
  27283. "required": ["released"],
  27284. "additionalProperties": false
  27285. },
  27286. "cost": {
  27287. "type": "array",
  27288. "items": {
  27289. "$ref": "#/components/schemas/ModelCost"
  27290. }
  27291. },
  27292. "status": {
  27293. "type": "string",
  27294. "enum": ["alpha", "beta", "deprecated", "active"]
  27295. },
  27296. "enabled": {
  27297. "type": "boolean"
  27298. },
  27299. "limit": {
  27300. "type": "object",
  27301. "properties": {
  27302. "context": {
  27303. "type": "integer"
  27304. },
  27305. "input": {
  27306. "type": "integer"
  27307. },
  27308. "output": {
  27309. "type": "integer"
  27310. }
  27311. },
  27312. "required": ["context", "output"],
  27313. "additionalProperties": false
  27314. }
  27315. },
  27316. "required": [
  27317. "id",
  27318. "providerID",
  27319. "name",
  27320. "api",
  27321. "capabilities",
  27322. "request",
  27323. "variants",
  27324. "time",
  27325. "cost",
  27326. "status",
  27327. "enabled",
  27328. "limit"
  27329. ],
  27330. "additionalProperties": false
  27331. },
  27332. "ProviderAISDK": {
  27333. "type": "object",
  27334. "properties": {
  27335. "type": {
  27336. "type": "string",
  27337. "enum": ["aisdk"]
  27338. },
  27339. "package": {
  27340. "type": "string"
  27341. },
  27342. "url": {
  27343. "type": "string"
  27344. },
  27345. "settings": {
  27346. "type": "object"
  27347. }
  27348. },
  27349. "required": ["type", "package"],
  27350. "additionalProperties": false
  27351. },
  27352. "ProviderNative": {
  27353. "type": "object",
  27354. "properties": {
  27355. "type": {
  27356. "type": "string",
  27357. "enum": ["native"]
  27358. },
  27359. "url": {
  27360. "type": "string"
  27361. },
  27362. "settings": {
  27363. "type": "object"
  27364. }
  27365. },
  27366. "required": ["type", "settings"],
  27367. "additionalProperties": false
  27368. },
  27369. "ProviderApi": {
  27370. "anyOf": [
  27371. {
  27372. "$ref": "#/components/schemas/ProviderAISDK"
  27373. },
  27374. {
  27375. "$ref": "#/components/schemas/ProviderNative"
  27376. }
  27377. ]
  27378. },
  27379. "ProviderV2Info": {
  27380. "type": "object",
  27381. "properties": {
  27382. "id": {
  27383. "type": "string"
  27384. },
  27385. "integrationID": {
  27386. "type": "string"
  27387. },
  27388. "name": {
  27389. "type": "string"
  27390. },
  27391. "disabled": {
  27392. "type": "boolean"
  27393. },
  27394. "api": {
  27395. "$ref": "#/components/schemas/ProviderApi"
  27396. },
  27397. "request": {
  27398. "$ref": "#/components/schemas/ProviderRequest"
  27399. }
  27400. },
  27401. "required": ["id", "name", "api", "request"],
  27402. "additionalProperties": false
  27403. },
  27404. "IntegrationWhen": {
  27405. "type": "object",
  27406. "properties": {
  27407. "key": {
  27408. "type": "string"
  27409. },
  27410. "op": {
  27411. "type": "string",
  27412. "enum": ["eq", "neq"]
  27413. },
  27414. "value": {
  27415. "type": "string"
  27416. }
  27417. },
  27418. "required": ["key", "op", "value"],
  27419. "additionalProperties": false
  27420. },
  27421. "IntegrationTextPrompt": {
  27422. "type": "object",
  27423. "properties": {
  27424. "type": {
  27425. "type": "string",
  27426. "enum": ["text"]
  27427. },
  27428. "key": {
  27429. "type": "string"
  27430. },
  27431. "message": {
  27432. "type": "string"
  27433. },
  27434. "placeholder": {
  27435. "type": "string"
  27436. },
  27437. "when": {
  27438. "$ref": "#/components/schemas/IntegrationWhen"
  27439. }
  27440. },
  27441. "required": ["type", "key", "message"],
  27442. "additionalProperties": false
  27443. },
  27444. "IntegrationSelectPrompt": {
  27445. "type": "object",
  27446. "properties": {
  27447. "type": {
  27448. "type": "string",
  27449. "enum": ["select"]
  27450. },
  27451. "key": {
  27452. "type": "string"
  27453. },
  27454. "message": {
  27455. "type": "string"
  27456. },
  27457. "options": {
  27458. "type": "array",
  27459. "items": {
  27460. "type": "object",
  27461. "properties": {
  27462. "label": {
  27463. "type": "string"
  27464. },
  27465. "value": {
  27466. "type": "string"
  27467. },
  27468. "hint": {
  27469. "type": "string"
  27470. }
  27471. },
  27472. "required": ["label", "value"],
  27473. "additionalProperties": false
  27474. }
  27475. },
  27476. "when": {
  27477. "$ref": "#/components/schemas/IntegrationWhen"
  27478. }
  27479. },
  27480. "required": ["type", "key", "message", "options"],
  27481. "additionalProperties": false
  27482. },
  27483. "IntegrationOAuthMethod": {
  27484. "type": "object",
  27485. "properties": {
  27486. "id": {
  27487. "type": "string"
  27488. },
  27489. "type": {
  27490. "type": "string",
  27491. "enum": ["oauth"]
  27492. },
  27493. "label": {
  27494. "type": "string"
  27495. },
  27496. "prompts": {
  27497. "type": "array",
  27498. "items": {
  27499. "anyOf": [
  27500. {
  27501. "$ref": "#/components/schemas/IntegrationTextPrompt"
  27502. },
  27503. {
  27504. "$ref": "#/components/schemas/IntegrationSelectPrompt"
  27505. }
  27506. ]
  27507. }
  27508. }
  27509. },
  27510. "required": ["id", "type", "label"],
  27511. "additionalProperties": false
  27512. },
  27513. "IntegrationKeyMethod": {
  27514. "type": "object",
  27515. "properties": {
  27516. "type": {
  27517. "type": "string",
  27518. "enum": ["key"]
  27519. },
  27520. "label": {
  27521. "type": "string"
  27522. }
  27523. },
  27524. "required": ["type"],
  27525. "additionalProperties": false
  27526. },
  27527. "IntegrationEnvMethod": {
  27528. "type": "object",
  27529. "properties": {
  27530. "type": {
  27531. "type": "string",
  27532. "enum": ["env"]
  27533. },
  27534. "names": {
  27535. "type": "array",
  27536. "items": {
  27537. "type": "string"
  27538. }
  27539. }
  27540. },
  27541. "required": ["type", "names"],
  27542. "additionalProperties": false
  27543. },
  27544. "ConnectionCredentialInfo": {
  27545. "type": "object",
  27546. "properties": {
  27547. "type": {
  27548. "type": "string",
  27549. "enum": ["credential"]
  27550. },
  27551. "id": {
  27552. "type": "string"
  27553. },
  27554. "label": {
  27555. "type": "string"
  27556. }
  27557. },
  27558. "required": ["type", "id", "label"],
  27559. "additionalProperties": false
  27560. },
  27561. "ConnectionEnvInfo": {
  27562. "type": "object",
  27563. "properties": {
  27564. "type": {
  27565. "type": "string",
  27566. "enum": ["env"]
  27567. },
  27568. "name": {
  27569. "type": "string"
  27570. }
  27571. },
  27572. "required": ["type", "name"],
  27573. "additionalProperties": false
  27574. },
  27575. "ConnectionInfo": {
  27576. "anyOf": [
  27577. {
  27578. "$ref": "#/components/schemas/ConnectionCredentialInfo"
  27579. },
  27580. {
  27581. "$ref": "#/components/schemas/ConnectionEnvInfo"
  27582. }
  27583. ]
  27584. },
  27585. "IntegrationInfo": {
  27586. "type": "object",
  27587. "properties": {
  27588. "id": {
  27589. "type": "string"
  27590. },
  27591. "name": {
  27592. "type": "string"
  27593. },
  27594. "methods": {
  27595. "type": "array",
  27596. "items": {
  27597. "$ref": "#/components/schemas/IntegrationMethod"
  27598. }
  27599. },
  27600. "connections": {
  27601. "type": "array",
  27602. "items": {
  27603. "$ref": "#/components/schemas/ConnectionInfo"
  27604. }
  27605. }
  27606. },
  27607. "required": ["id", "name", "methods", "connections"],
  27608. "additionalProperties": false
  27609. },
  27610. "IntegrationAttempt": {
  27611. "type": "object",
  27612. "properties": {
  27613. "attemptID": {
  27614. "type": "string"
  27615. },
  27616. "url": {
  27617. "type": "string"
  27618. },
  27619. "instructions": {
  27620. "type": "string"
  27621. },
  27622. "mode": {
  27623. "type": "string",
  27624. "enum": ["auto", "code"]
  27625. },
  27626. "time": {
  27627. "type": "object",
  27628. "properties": {
  27629. "created": {
  27630. "anyOf": [
  27631. {
  27632. "type": "number"
  27633. },
  27634. {
  27635. "type": "string",
  27636. "enum": ["NaN"]
  27637. },
  27638. {
  27639. "type": "string",
  27640. "enum": ["Infinity"]
  27641. },
  27642. {
  27643. "type": "string",
  27644. "enum": ["-Infinity"]
  27645. },
  27646. {
  27647. "type": "string",
  27648. "enum": ["Infinity", "-Infinity", "NaN"]
  27649. }
  27650. ]
  27651. },
  27652. "expires": {
  27653. "anyOf": [
  27654. {
  27655. "type": "number"
  27656. },
  27657. {
  27658. "type": "string",
  27659. "enum": ["NaN"]
  27660. },
  27661. {
  27662. "type": "string",
  27663. "enum": ["Infinity"]
  27664. },
  27665. {
  27666. "type": "string",
  27667. "enum": ["-Infinity"]
  27668. },
  27669. {
  27670. "type": "string",
  27671. "enum": ["Infinity", "-Infinity", "NaN"]
  27672. }
  27673. ]
  27674. }
  27675. },
  27676. "required": ["created", "expires"],
  27677. "additionalProperties": false
  27678. }
  27679. },
  27680. "required": ["attemptID", "url", "instructions", "mode", "time"],
  27681. "additionalProperties": false
  27682. },
  27683. "IntegrationAttemptStatus": {
  27684. "anyOf": [
  27685. {
  27686. "type": "object",
  27687. "properties": {
  27688. "status": {
  27689. "type": "string",
  27690. "enum": ["pending"]
  27691. },
  27692. "time": {
  27693. "type": "object",
  27694. "properties": {
  27695. "created": {
  27696. "anyOf": [
  27697. {
  27698. "type": "number"
  27699. },
  27700. {
  27701. "type": "string",
  27702. "enum": ["NaN"]
  27703. },
  27704. {
  27705. "type": "string",
  27706. "enum": ["Infinity"]
  27707. },
  27708. {
  27709. "type": "string",
  27710. "enum": ["-Infinity"]
  27711. },
  27712. {
  27713. "type": "string",
  27714. "enum": ["Infinity", "-Infinity", "NaN"]
  27715. }
  27716. ]
  27717. },
  27718. "expires": {
  27719. "anyOf": [
  27720. {
  27721. "type": "number"
  27722. },
  27723. {
  27724. "type": "string",
  27725. "enum": ["NaN"]
  27726. },
  27727. {
  27728. "type": "string",
  27729. "enum": ["Infinity"]
  27730. },
  27731. {
  27732. "type": "string",
  27733. "enum": ["-Infinity"]
  27734. },
  27735. {
  27736. "type": "string",
  27737. "enum": ["Infinity", "-Infinity", "NaN"]
  27738. }
  27739. ]
  27740. }
  27741. },
  27742. "required": ["created", "expires"],
  27743. "additionalProperties": false
  27744. }
  27745. },
  27746. "required": ["status", "time"],
  27747. "additionalProperties": false
  27748. },
  27749. {
  27750. "type": "object",
  27751. "properties": {
  27752. "status": {
  27753. "type": "string",
  27754. "enum": ["complete"]
  27755. },
  27756. "time": {
  27757. "type": "object",
  27758. "properties": {
  27759. "created": {
  27760. "anyOf": [
  27761. {
  27762. "type": "number"
  27763. },
  27764. {
  27765. "type": "string",
  27766. "enum": ["NaN"]
  27767. },
  27768. {
  27769. "type": "string",
  27770. "enum": ["Infinity"]
  27771. },
  27772. {
  27773. "type": "string",
  27774. "enum": ["-Infinity"]
  27775. },
  27776. {
  27777. "type": "string",
  27778. "enum": ["Infinity", "-Infinity", "NaN"]
  27779. }
  27780. ]
  27781. },
  27782. "expires": {
  27783. "anyOf": [
  27784. {
  27785. "type": "number"
  27786. },
  27787. {
  27788. "type": "string",
  27789. "enum": ["NaN"]
  27790. },
  27791. {
  27792. "type": "string",
  27793. "enum": ["Infinity"]
  27794. },
  27795. {
  27796. "type": "string",
  27797. "enum": ["-Infinity"]
  27798. },
  27799. {
  27800. "type": "string",
  27801. "enum": ["Infinity", "-Infinity", "NaN"]
  27802. }
  27803. ]
  27804. }
  27805. },
  27806. "required": ["created", "expires"],
  27807. "additionalProperties": false
  27808. }
  27809. },
  27810. "required": ["status", "time"],
  27811. "additionalProperties": false
  27812. },
  27813. {
  27814. "type": "object",
  27815. "properties": {
  27816. "status": {
  27817. "type": "string",
  27818. "enum": ["failed"]
  27819. },
  27820. "message": {
  27821. "type": "string"
  27822. },
  27823. "time": {
  27824. "type": "object",
  27825. "properties": {
  27826. "created": {
  27827. "anyOf": [
  27828. {
  27829. "type": "number"
  27830. },
  27831. {
  27832. "type": "string",
  27833. "enum": ["NaN"]
  27834. },
  27835. {
  27836. "type": "string",
  27837. "enum": ["Infinity"]
  27838. },
  27839. {
  27840. "type": "string",
  27841. "enum": ["-Infinity"]
  27842. },
  27843. {
  27844. "type": "string",
  27845. "enum": ["Infinity", "-Infinity", "NaN"]
  27846. }
  27847. ]
  27848. },
  27849. "expires": {
  27850. "anyOf": [
  27851. {
  27852. "type": "number"
  27853. },
  27854. {
  27855. "type": "string",
  27856. "enum": ["NaN"]
  27857. },
  27858. {
  27859. "type": "string",
  27860. "enum": ["Infinity"]
  27861. },
  27862. {
  27863. "type": "string",
  27864. "enum": ["-Infinity"]
  27865. },
  27866. {
  27867. "type": "string",
  27868. "enum": ["Infinity", "-Infinity", "NaN"]
  27869. }
  27870. ]
  27871. }
  27872. },
  27873. "required": ["created", "expires"],
  27874. "additionalProperties": false
  27875. }
  27876. },
  27877. "required": ["status", "message", "time"],
  27878. "additionalProperties": false
  27879. },
  27880. {
  27881. "type": "object",
  27882. "properties": {
  27883. "status": {
  27884. "type": "string",
  27885. "enum": ["expired"]
  27886. },
  27887. "time": {
  27888. "type": "object",
  27889. "properties": {
  27890. "created": {
  27891. "anyOf": [
  27892. {
  27893. "type": "number"
  27894. },
  27895. {
  27896. "type": "string",
  27897. "enum": ["NaN"]
  27898. },
  27899. {
  27900. "type": "string",
  27901. "enum": ["Infinity"]
  27902. },
  27903. {
  27904. "type": "string",
  27905. "enum": ["-Infinity"]
  27906. },
  27907. {
  27908. "type": "string",
  27909. "enum": ["Infinity", "-Infinity", "NaN"]
  27910. }
  27911. ]
  27912. },
  27913. "expires": {
  27914. "anyOf": [
  27915. {
  27916. "type": "number"
  27917. },
  27918. {
  27919. "type": "string",
  27920. "enum": ["NaN"]
  27921. },
  27922. {
  27923. "type": "string",
  27924. "enum": ["Infinity"]
  27925. },
  27926. {
  27927. "type": "string",
  27928. "enum": ["-Infinity"]
  27929. },
  27930. {
  27931. "type": "string",
  27932. "enum": ["Infinity", "-Infinity", "NaN"]
  27933. }
  27934. ]
  27935. }
  27936. },
  27937. "required": ["created", "expires"],
  27938. "additionalProperties": false
  27939. }
  27940. },
  27941. "required": ["status", "time"],
  27942. "additionalProperties": false
  27943. }
  27944. ]
  27945. },
  27946. "PermissionV2Request": {
  27947. "type": "object",
  27948. "properties": {
  27949. "id": {
  27950. "type": "string",
  27951. "pattern": "^per"
  27952. },
  27953. "sessionID": {
  27954. "type": "string",
  27955. "pattern": "^ses"
  27956. },
  27957. "action": {
  27958. "type": "string"
  27959. },
  27960. "resources": {
  27961. "type": "array",
  27962. "items": {
  27963. "type": "string"
  27964. }
  27965. },
  27966. "save": {
  27967. "type": "array",
  27968. "items": {
  27969. "type": "string"
  27970. }
  27971. },
  27972. "metadata": {
  27973. "type": "object"
  27974. },
  27975. "source": {
  27976. "$ref": "#/components/schemas/PermissionV2Source"
  27977. }
  27978. },
  27979. "required": ["id", "sessionID", "action", "resources"],
  27980. "additionalProperties": false
  27981. },
  27982. "PermissionSavedInfo": {
  27983. "type": "object",
  27984. "properties": {
  27985. "id": {
  27986. "type": "string"
  27987. },
  27988. "projectID": {
  27989. "type": "string"
  27990. },
  27991. "action": {
  27992. "type": "string"
  27993. },
  27994. "resource": {
  27995. "type": "string"
  27996. }
  27997. },
  27998. "required": ["id", "projectID", "action", "resource"],
  27999. "additionalProperties": false
  28000. },
  28001. "FileSystemEntry": {
  28002. "type": "object",
  28003. "properties": {
  28004. "path": {
  28005. "type": "string"
  28006. },
  28007. "type": {
  28008. "type": "string",
  28009. "enum": ["file", "directory"]
  28010. }
  28011. },
  28012. "required": ["path", "type"],
  28013. "additionalProperties": false
  28014. },
  28015. "CommandV2Info": {
  28016. "type": "object",
  28017. "properties": {
  28018. "name": {
  28019. "type": "string"
  28020. },
  28021. "template": {
  28022. "type": "string"
  28023. },
  28024. "description": {
  28025. "type": "string"
  28026. },
  28027. "agent": {
  28028. "type": "string"
  28029. },
  28030. "model": {
  28031. "$ref": "#/components/schemas/ModelRef"
  28032. },
  28033. "subtask": {
  28034. "type": "boolean"
  28035. }
  28036. },
  28037. "required": ["name", "template"],
  28038. "additionalProperties": false
  28039. },
  28040. "SkillV2Info": {
  28041. "type": "object",
  28042. "properties": {
  28043. "name": {
  28044. "type": "string"
  28045. },
  28046. "description": {
  28047. "type": "string"
  28048. },
  28049. "slash": {
  28050. "type": "boolean"
  28051. },
  28052. "location": {
  28053. "type": "string"
  28054. },
  28055. "content": {
  28056. "type": "string"
  28057. }
  28058. },
  28059. "required": ["name", "location", "content"],
  28060. "additionalProperties": false
  28061. },
  28062. "V2EventModels-devRefreshed": {
  28063. "type": "object",
  28064. "properties": {
  28065. "id": {
  28066. "type": "string",
  28067. "pattern": "^evt_"
  28068. },
  28069. "metadata": {
  28070. "type": "object"
  28071. },
  28072. "durable": {
  28073. "type": "object",
  28074. "properties": {
  28075. "aggregateID": {
  28076. "type": "string"
  28077. },
  28078. "seq": {
  28079. "type": "integer"
  28080. },
  28081. "version": {
  28082. "type": "integer"
  28083. }
  28084. },
  28085. "required": ["aggregateID", "seq", "version"],
  28086. "additionalProperties": false
  28087. },
  28088. "location": {
  28089. "$ref": "#/components/schemas/LocationRef"
  28090. },
  28091. "type": {
  28092. "type": "string",
  28093. "enum": ["models-dev.refreshed"]
  28094. },
  28095. "data": {
  28096. "type": "object",
  28097. "properties": {}
  28098. }
  28099. },
  28100. "required": ["id", "type", "data"],
  28101. "additionalProperties": false
  28102. },
  28103. "V2EventIntegrationUpdated": {
  28104. "type": "object",
  28105. "properties": {
  28106. "id": {
  28107. "type": "string",
  28108. "pattern": "^evt_"
  28109. },
  28110. "metadata": {
  28111. "type": "object"
  28112. },
  28113. "durable": {
  28114. "type": "object",
  28115. "properties": {
  28116. "aggregateID": {
  28117. "type": "string"
  28118. },
  28119. "seq": {
  28120. "type": "integer"
  28121. },
  28122. "version": {
  28123. "type": "integer"
  28124. }
  28125. },
  28126. "required": ["aggregateID", "seq", "version"],
  28127. "additionalProperties": false
  28128. },
  28129. "location": {
  28130. "$ref": "#/components/schemas/LocationRef"
  28131. },
  28132. "type": {
  28133. "type": "string",
  28134. "enum": ["integration.updated"]
  28135. },
  28136. "data": {
  28137. "type": "object",
  28138. "properties": {}
  28139. }
  28140. },
  28141. "required": ["id", "type", "data"],
  28142. "additionalProperties": false
  28143. },
  28144. "V2EventIntegrationConnectionUpdated": {
  28145. "type": "object",
  28146. "properties": {
  28147. "id": {
  28148. "type": "string",
  28149. "pattern": "^evt_"
  28150. },
  28151. "metadata": {
  28152. "type": "object"
  28153. },
  28154. "durable": {
  28155. "type": "object",
  28156. "properties": {
  28157. "aggregateID": {
  28158. "type": "string"
  28159. },
  28160. "seq": {
  28161. "type": "integer"
  28162. },
  28163. "version": {
  28164. "type": "integer"
  28165. }
  28166. },
  28167. "required": ["aggregateID", "seq", "version"],
  28168. "additionalProperties": false
  28169. },
  28170. "location": {
  28171. "$ref": "#/components/schemas/LocationRef"
  28172. },
  28173. "type": {
  28174. "type": "string",
  28175. "enum": ["integration.connection.updated"]
  28176. },
  28177. "data": {
  28178. "type": "object",
  28179. "properties": {
  28180. "integrationID": {
  28181. "type": "string"
  28182. }
  28183. },
  28184. "required": ["integrationID"],
  28185. "additionalProperties": false
  28186. }
  28187. },
  28188. "required": ["id", "type", "data"],
  28189. "additionalProperties": false
  28190. },
  28191. "V2EventCatalogUpdated": {
  28192. "type": "object",
  28193. "properties": {
  28194. "id": {
  28195. "type": "string",
  28196. "pattern": "^evt_"
  28197. },
  28198. "metadata": {
  28199. "type": "object"
  28200. },
  28201. "durable": {
  28202. "type": "object",
  28203. "properties": {
  28204. "aggregateID": {
  28205. "type": "string"
  28206. },
  28207. "seq": {
  28208. "type": "integer"
  28209. },
  28210. "version": {
  28211. "type": "integer"
  28212. }
  28213. },
  28214. "required": ["aggregateID", "seq", "version"],
  28215. "additionalProperties": false
  28216. },
  28217. "location": {
  28218. "$ref": "#/components/schemas/LocationRef"
  28219. },
  28220. "type": {
  28221. "type": "string",
  28222. "enum": ["catalog.updated"]
  28223. },
  28224. "data": {
  28225. "type": "object",
  28226. "properties": {}
  28227. }
  28228. },
  28229. "required": ["id", "type", "data"],
  28230. "additionalProperties": false
  28231. },
  28232. "V2EventSessionCreated": {
  28233. "type": "object",
  28234. "properties": {
  28235. "id": {
  28236. "type": "string",
  28237. "pattern": "^evt_"
  28238. },
  28239. "metadata": {
  28240. "type": "object"
  28241. },
  28242. "durable": {
  28243. "type": "object",
  28244. "properties": {
  28245. "aggregateID": {
  28246. "type": "string"
  28247. },
  28248. "seq": {
  28249. "type": "integer"
  28250. },
  28251. "version": {
  28252. "type": "integer"
  28253. }
  28254. },
  28255. "required": ["aggregateID", "seq", "version"],
  28256. "additionalProperties": false
  28257. },
  28258. "location": {
  28259. "$ref": "#/components/schemas/LocationRef"
  28260. },
  28261. "type": {
  28262. "type": "string",
  28263. "enum": ["session.created"]
  28264. },
  28265. "data": {
  28266. "type": "object",
  28267. "properties": {
  28268. "sessionID": {
  28269. "type": "string",
  28270. "pattern": "^ses"
  28271. },
  28272. "info": {
  28273. "$ref": "#/components/schemas/Session"
  28274. }
  28275. },
  28276. "required": ["sessionID", "info"],
  28277. "additionalProperties": false
  28278. }
  28279. },
  28280. "required": ["id", "type", "data"],
  28281. "additionalProperties": false
  28282. },
  28283. "V2EventSessionUpdated": {
  28284. "type": "object",
  28285. "properties": {
  28286. "id": {
  28287. "type": "string",
  28288. "pattern": "^evt_"
  28289. },
  28290. "metadata": {
  28291. "type": "object"
  28292. },
  28293. "durable": {
  28294. "type": "object",
  28295. "properties": {
  28296. "aggregateID": {
  28297. "type": "string"
  28298. },
  28299. "seq": {
  28300. "type": "integer"
  28301. },
  28302. "version": {
  28303. "type": "integer"
  28304. }
  28305. },
  28306. "required": ["aggregateID", "seq", "version"],
  28307. "additionalProperties": false
  28308. },
  28309. "location": {
  28310. "$ref": "#/components/schemas/LocationRef"
  28311. },
  28312. "type": {
  28313. "type": "string",
  28314. "enum": ["session.updated"]
  28315. },
  28316. "data": {
  28317. "type": "object",
  28318. "properties": {
  28319. "sessionID": {
  28320. "type": "string",
  28321. "pattern": "^ses"
  28322. },
  28323. "info": {
  28324. "$ref": "#/components/schemas/Session"
  28325. }
  28326. },
  28327. "required": ["sessionID", "info"],
  28328. "additionalProperties": false
  28329. }
  28330. },
  28331. "required": ["id", "type", "data"],
  28332. "additionalProperties": false
  28333. },
  28334. "V2EventSessionDeleted": {
  28335. "type": "object",
  28336. "properties": {
  28337. "id": {
  28338. "type": "string",
  28339. "pattern": "^evt_"
  28340. },
  28341. "metadata": {
  28342. "type": "object"
  28343. },
  28344. "durable": {
  28345. "type": "object",
  28346. "properties": {
  28347. "aggregateID": {
  28348. "type": "string"
  28349. },
  28350. "seq": {
  28351. "type": "integer"
  28352. },
  28353. "version": {
  28354. "type": "integer"
  28355. }
  28356. },
  28357. "required": ["aggregateID", "seq", "version"],
  28358. "additionalProperties": false
  28359. },
  28360. "location": {
  28361. "$ref": "#/components/schemas/LocationRef"
  28362. },
  28363. "type": {
  28364. "type": "string",
  28365. "enum": ["session.deleted"]
  28366. },
  28367. "data": {
  28368. "type": "object",
  28369. "properties": {
  28370. "sessionID": {
  28371. "type": "string",
  28372. "pattern": "^ses"
  28373. },
  28374. "info": {
  28375. "$ref": "#/components/schemas/Session"
  28376. }
  28377. },
  28378. "required": ["sessionID", "info"],
  28379. "additionalProperties": false
  28380. }
  28381. },
  28382. "required": ["id", "type", "data"],
  28383. "additionalProperties": false
  28384. },
  28385. "V2EventMessageUpdated": {
  28386. "type": "object",
  28387. "properties": {
  28388. "id": {
  28389. "type": "string",
  28390. "pattern": "^evt_"
  28391. },
  28392. "metadata": {
  28393. "type": "object"
  28394. },
  28395. "durable": {
  28396. "type": "object",
  28397. "properties": {
  28398. "aggregateID": {
  28399. "type": "string"
  28400. },
  28401. "seq": {
  28402. "type": "integer"
  28403. },
  28404. "version": {
  28405. "type": "integer"
  28406. }
  28407. },
  28408. "required": ["aggregateID", "seq", "version"],
  28409. "additionalProperties": false
  28410. },
  28411. "location": {
  28412. "$ref": "#/components/schemas/LocationRef"
  28413. },
  28414. "type": {
  28415. "type": "string",
  28416. "enum": ["message.updated"]
  28417. },
  28418. "data": {
  28419. "type": "object",
  28420. "properties": {
  28421. "sessionID": {
  28422. "type": "string",
  28423. "pattern": "^ses"
  28424. },
  28425. "info": {
  28426. "$ref": "#/components/schemas/Message"
  28427. }
  28428. },
  28429. "required": ["sessionID", "info"],
  28430. "additionalProperties": false
  28431. }
  28432. },
  28433. "required": ["id", "type", "data"],
  28434. "additionalProperties": false
  28435. },
  28436. "V2EventMessageRemoved": {
  28437. "type": "object",
  28438. "properties": {
  28439. "id": {
  28440. "type": "string",
  28441. "pattern": "^evt_"
  28442. },
  28443. "metadata": {
  28444. "type": "object"
  28445. },
  28446. "durable": {
  28447. "type": "object",
  28448. "properties": {
  28449. "aggregateID": {
  28450. "type": "string"
  28451. },
  28452. "seq": {
  28453. "type": "integer"
  28454. },
  28455. "version": {
  28456. "type": "integer"
  28457. }
  28458. },
  28459. "required": ["aggregateID", "seq", "version"],
  28460. "additionalProperties": false
  28461. },
  28462. "location": {
  28463. "$ref": "#/components/schemas/LocationRef"
  28464. },
  28465. "type": {
  28466. "type": "string",
  28467. "enum": ["message.removed"]
  28468. },
  28469. "data": {
  28470. "type": "object",
  28471. "properties": {
  28472. "sessionID": {
  28473. "type": "string",
  28474. "pattern": "^ses"
  28475. },
  28476. "messageID": {
  28477. "type": "string",
  28478. "pattern": "^msg"
  28479. }
  28480. },
  28481. "required": ["sessionID", "messageID"],
  28482. "additionalProperties": false
  28483. }
  28484. },
  28485. "required": ["id", "type", "data"],
  28486. "additionalProperties": false
  28487. },
  28488. "V2EventMessagePartUpdated": {
  28489. "type": "object",
  28490. "properties": {
  28491. "id": {
  28492. "type": "string",
  28493. "pattern": "^evt_"
  28494. },
  28495. "metadata": {
  28496. "type": "object"
  28497. },
  28498. "durable": {
  28499. "type": "object",
  28500. "properties": {
  28501. "aggregateID": {
  28502. "type": "string"
  28503. },
  28504. "seq": {
  28505. "type": "integer"
  28506. },
  28507. "version": {
  28508. "type": "integer"
  28509. }
  28510. },
  28511. "required": ["aggregateID", "seq", "version"],
  28512. "additionalProperties": false
  28513. },
  28514. "location": {
  28515. "$ref": "#/components/schemas/LocationRef"
  28516. },
  28517. "type": {
  28518. "type": "string",
  28519. "enum": ["message.part.updated"]
  28520. },
  28521. "data": {
  28522. "type": "object",
  28523. "properties": {
  28524. "sessionID": {
  28525. "type": "string",
  28526. "pattern": "^ses"
  28527. },
  28528. "part": {
  28529. "$ref": "#/components/schemas/Part"
  28530. },
  28531. "time": {
  28532. "type": "number"
  28533. }
  28534. },
  28535. "required": ["sessionID", "part", "time"],
  28536. "additionalProperties": false
  28537. }
  28538. },
  28539. "required": ["id", "type", "data"],
  28540. "additionalProperties": false
  28541. },
  28542. "V2EventMessagePartRemoved": {
  28543. "type": "object",
  28544. "properties": {
  28545. "id": {
  28546. "type": "string",
  28547. "pattern": "^evt_"
  28548. },
  28549. "metadata": {
  28550. "type": "object"
  28551. },
  28552. "durable": {
  28553. "type": "object",
  28554. "properties": {
  28555. "aggregateID": {
  28556. "type": "string"
  28557. },
  28558. "seq": {
  28559. "type": "integer"
  28560. },
  28561. "version": {
  28562. "type": "integer"
  28563. }
  28564. },
  28565. "required": ["aggregateID", "seq", "version"],
  28566. "additionalProperties": false
  28567. },
  28568. "location": {
  28569. "$ref": "#/components/schemas/LocationRef"
  28570. },
  28571. "type": {
  28572. "type": "string",
  28573. "enum": ["message.part.removed"]
  28574. },
  28575. "data": {
  28576. "type": "object",
  28577. "properties": {
  28578. "sessionID": {
  28579. "type": "string",
  28580. "pattern": "^ses"
  28581. },
  28582. "messageID": {
  28583. "type": "string",
  28584. "pattern": "^msg"
  28585. },
  28586. "partID": {
  28587. "type": "string",
  28588. "pattern": "^prt"
  28589. }
  28590. },
  28591. "required": ["sessionID", "messageID", "partID"],
  28592. "additionalProperties": false
  28593. }
  28594. },
  28595. "required": ["id", "type", "data"],
  28596. "additionalProperties": false
  28597. },
  28598. "V2EventSessionNextAgentSwitched": {
  28599. "type": "object",
  28600. "properties": {
  28601. "id": {
  28602. "type": "string",
  28603. "pattern": "^evt_"
  28604. },
  28605. "metadata": {
  28606. "type": "object"
  28607. },
  28608. "durable": {
  28609. "type": "object",
  28610. "properties": {
  28611. "aggregateID": {
  28612. "type": "string"
  28613. },
  28614. "seq": {
  28615. "type": "integer"
  28616. },
  28617. "version": {
  28618. "type": "integer"
  28619. }
  28620. },
  28621. "required": ["aggregateID", "seq", "version"],
  28622. "additionalProperties": false
  28623. },
  28624. "location": {
  28625. "$ref": "#/components/schemas/LocationRef"
  28626. },
  28627. "type": {
  28628. "type": "string",
  28629. "enum": ["session.next.agent.switched"]
  28630. },
  28631. "data": {
  28632. "type": "object",
  28633. "properties": {
  28634. "timestamp": {
  28635. "type": "number"
  28636. },
  28637. "sessionID": {
  28638. "type": "string",
  28639. "pattern": "^ses"
  28640. },
  28641. "messageID": {
  28642. "type": "string",
  28643. "pattern": "^msg_"
  28644. },
  28645. "agent": {
  28646. "type": "string"
  28647. }
  28648. },
  28649. "required": ["timestamp", "sessionID", "messageID", "agent"],
  28650. "additionalProperties": false
  28651. }
  28652. },
  28653. "required": ["id", "type", "data"],
  28654. "additionalProperties": false
  28655. },
  28656. "V2EventSessionNextModelSwitched": {
  28657. "type": "object",
  28658. "properties": {
  28659. "id": {
  28660. "type": "string",
  28661. "pattern": "^evt_"
  28662. },
  28663. "metadata": {
  28664. "type": "object"
  28665. },
  28666. "durable": {
  28667. "type": "object",
  28668. "properties": {
  28669. "aggregateID": {
  28670. "type": "string"
  28671. },
  28672. "seq": {
  28673. "type": "integer"
  28674. },
  28675. "version": {
  28676. "type": "integer"
  28677. }
  28678. },
  28679. "required": ["aggregateID", "seq", "version"],
  28680. "additionalProperties": false
  28681. },
  28682. "location": {
  28683. "$ref": "#/components/schemas/LocationRef"
  28684. },
  28685. "type": {
  28686. "type": "string",
  28687. "enum": ["session.next.model.switched"]
  28688. },
  28689. "data": {
  28690. "type": "object",
  28691. "properties": {
  28692. "timestamp": {
  28693. "type": "number"
  28694. },
  28695. "sessionID": {
  28696. "type": "string",
  28697. "pattern": "^ses"
  28698. },
  28699. "messageID": {
  28700. "type": "string",
  28701. "pattern": "^msg_"
  28702. },
  28703. "model": {
  28704. "$ref": "#/components/schemas/ModelRef"
  28705. }
  28706. },
  28707. "required": ["timestamp", "sessionID", "messageID", "model"],
  28708. "additionalProperties": false
  28709. }
  28710. },
  28711. "required": ["id", "type", "data"],
  28712. "additionalProperties": false
  28713. },
  28714. "V2EventSessionNextMoved": {
  28715. "type": "object",
  28716. "properties": {
  28717. "id": {
  28718. "type": "string",
  28719. "pattern": "^evt_"
  28720. },
  28721. "metadata": {
  28722. "type": "object"
  28723. },
  28724. "durable": {
  28725. "type": "object",
  28726. "properties": {
  28727. "aggregateID": {
  28728. "type": "string"
  28729. },
  28730. "seq": {
  28731. "type": "integer"
  28732. },
  28733. "version": {
  28734. "type": "integer"
  28735. }
  28736. },
  28737. "required": ["aggregateID", "seq", "version"],
  28738. "additionalProperties": false
  28739. },
  28740. "location": {
  28741. "$ref": "#/components/schemas/LocationRef"
  28742. },
  28743. "type": {
  28744. "type": "string",
  28745. "enum": ["session.next.moved"]
  28746. },
  28747. "data": {
  28748. "type": "object",
  28749. "properties": {
  28750. "timestamp": {
  28751. "type": "number"
  28752. },
  28753. "sessionID": {
  28754. "type": "string",
  28755. "pattern": "^ses"
  28756. },
  28757. "location": {
  28758. "$ref": "#/components/schemas/LocationRef"
  28759. },
  28760. "subdirectory": {
  28761. "type": "string"
  28762. }
  28763. },
  28764. "required": ["timestamp", "sessionID", "location"],
  28765. "additionalProperties": false
  28766. }
  28767. },
  28768. "required": ["id", "type", "data"],
  28769. "additionalProperties": false
  28770. },
  28771. "V2EventSessionNextPrompted": {
  28772. "type": "object",
  28773. "properties": {
  28774. "id": {
  28775. "type": "string",
  28776. "pattern": "^evt_"
  28777. },
  28778. "metadata": {
  28779. "type": "object"
  28780. },
  28781. "durable": {
  28782. "type": "object",
  28783. "properties": {
  28784. "aggregateID": {
  28785. "type": "string"
  28786. },
  28787. "seq": {
  28788. "type": "integer"
  28789. },
  28790. "version": {
  28791. "type": "integer"
  28792. }
  28793. },
  28794. "required": ["aggregateID", "seq", "version"],
  28795. "additionalProperties": false
  28796. },
  28797. "location": {
  28798. "$ref": "#/components/schemas/LocationRef"
  28799. },
  28800. "type": {
  28801. "type": "string",
  28802. "enum": ["session.next.prompted"]
  28803. },
  28804. "data": {
  28805. "type": "object",
  28806. "properties": {
  28807. "timestamp": {
  28808. "type": "number"
  28809. },
  28810. "sessionID": {
  28811. "type": "string",
  28812. "pattern": "^ses"
  28813. },
  28814. "messageID": {
  28815. "type": "string",
  28816. "pattern": "^msg_"
  28817. },
  28818. "prompt": {
  28819. "$ref": "#/components/schemas/Prompt"
  28820. },
  28821. "delivery": {
  28822. "type": "string",
  28823. "enum": ["steer", "queue"]
  28824. }
  28825. },
  28826. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  28827. "additionalProperties": false
  28828. }
  28829. },
  28830. "required": ["id", "type", "data"],
  28831. "additionalProperties": false
  28832. },
  28833. "V2EventSessionNextPromptAdmitted": {
  28834. "type": "object",
  28835. "properties": {
  28836. "id": {
  28837. "type": "string",
  28838. "pattern": "^evt_"
  28839. },
  28840. "metadata": {
  28841. "type": "object"
  28842. },
  28843. "durable": {
  28844. "type": "object",
  28845. "properties": {
  28846. "aggregateID": {
  28847. "type": "string"
  28848. },
  28849. "seq": {
  28850. "type": "integer"
  28851. },
  28852. "version": {
  28853. "type": "integer"
  28854. }
  28855. },
  28856. "required": ["aggregateID", "seq", "version"],
  28857. "additionalProperties": false
  28858. },
  28859. "location": {
  28860. "$ref": "#/components/schemas/LocationRef"
  28861. },
  28862. "type": {
  28863. "type": "string",
  28864. "enum": ["session.next.prompt.admitted"]
  28865. },
  28866. "data": {
  28867. "type": "object",
  28868. "properties": {
  28869. "timestamp": {
  28870. "type": "number"
  28871. },
  28872. "sessionID": {
  28873. "type": "string",
  28874. "pattern": "^ses"
  28875. },
  28876. "messageID": {
  28877. "type": "string",
  28878. "pattern": "^msg_"
  28879. },
  28880. "prompt": {
  28881. "$ref": "#/components/schemas/Prompt"
  28882. },
  28883. "delivery": {
  28884. "type": "string",
  28885. "enum": ["steer", "queue"]
  28886. }
  28887. },
  28888. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  28889. "additionalProperties": false
  28890. }
  28891. },
  28892. "required": ["id", "type", "data"],
  28893. "additionalProperties": false
  28894. },
  28895. "V2EventSessionNextContextUpdated": {
  28896. "type": "object",
  28897. "properties": {
  28898. "id": {
  28899. "type": "string",
  28900. "pattern": "^evt_"
  28901. },
  28902. "metadata": {
  28903. "type": "object"
  28904. },
  28905. "durable": {
  28906. "type": "object",
  28907. "properties": {
  28908. "aggregateID": {
  28909. "type": "string"
  28910. },
  28911. "seq": {
  28912. "type": "integer"
  28913. },
  28914. "version": {
  28915. "type": "integer"
  28916. }
  28917. },
  28918. "required": ["aggregateID", "seq", "version"],
  28919. "additionalProperties": false
  28920. },
  28921. "location": {
  28922. "$ref": "#/components/schemas/LocationRef"
  28923. },
  28924. "type": {
  28925. "type": "string",
  28926. "enum": ["session.next.context.updated"]
  28927. },
  28928. "data": {
  28929. "type": "object",
  28930. "properties": {
  28931. "timestamp": {
  28932. "type": "number"
  28933. },
  28934. "sessionID": {
  28935. "type": "string",
  28936. "pattern": "^ses"
  28937. },
  28938. "messageID": {
  28939. "type": "string",
  28940. "pattern": "^msg_"
  28941. },
  28942. "text": {
  28943. "type": "string"
  28944. }
  28945. },
  28946. "required": ["timestamp", "sessionID", "messageID", "text"],
  28947. "additionalProperties": false
  28948. }
  28949. },
  28950. "required": ["id", "type", "data"],
  28951. "additionalProperties": false
  28952. },
  28953. "V2EventSessionNextSynthetic": {
  28954. "type": "object",
  28955. "properties": {
  28956. "id": {
  28957. "type": "string",
  28958. "pattern": "^evt_"
  28959. },
  28960. "metadata": {
  28961. "type": "object"
  28962. },
  28963. "durable": {
  28964. "type": "object",
  28965. "properties": {
  28966. "aggregateID": {
  28967. "type": "string"
  28968. },
  28969. "seq": {
  28970. "type": "integer"
  28971. },
  28972. "version": {
  28973. "type": "integer"
  28974. }
  28975. },
  28976. "required": ["aggregateID", "seq", "version"],
  28977. "additionalProperties": false
  28978. },
  28979. "location": {
  28980. "$ref": "#/components/schemas/LocationRef"
  28981. },
  28982. "type": {
  28983. "type": "string",
  28984. "enum": ["session.next.synthetic"]
  28985. },
  28986. "data": {
  28987. "type": "object",
  28988. "properties": {
  28989. "timestamp": {
  28990. "type": "number"
  28991. },
  28992. "sessionID": {
  28993. "type": "string",
  28994. "pattern": "^ses"
  28995. },
  28996. "messageID": {
  28997. "type": "string",
  28998. "pattern": "^msg_"
  28999. },
  29000. "text": {
  29001. "type": "string"
  29002. }
  29003. },
  29004. "required": ["timestamp", "sessionID", "messageID", "text"],
  29005. "additionalProperties": false
  29006. }
  29007. },
  29008. "required": ["id", "type", "data"],
  29009. "additionalProperties": false
  29010. },
  29011. "V2EventSessionNextShellStarted": {
  29012. "type": "object",
  29013. "properties": {
  29014. "id": {
  29015. "type": "string",
  29016. "pattern": "^evt_"
  29017. },
  29018. "metadata": {
  29019. "type": "object"
  29020. },
  29021. "durable": {
  29022. "type": "object",
  29023. "properties": {
  29024. "aggregateID": {
  29025. "type": "string"
  29026. },
  29027. "seq": {
  29028. "type": "integer"
  29029. },
  29030. "version": {
  29031. "type": "integer"
  29032. }
  29033. },
  29034. "required": ["aggregateID", "seq", "version"],
  29035. "additionalProperties": false
  29036. },
  29037. "location": {
  29038. "$ref": "#/components/schemas/LocationRef"
  29039. },
  29040. "type": {
  29041. "type": "string",
  29042. "enum": ["session.next.shell.started"]
  29043. },
  29044. "data": {
  29045. "type": "object",
  29046. "properties": {
  29047. "timestamp": {
  29048. "type": "number"
  29049. },
  29050. "sessionID": {
  29051. "type": "string",
  29052. "pattern": "^ses"
  29053. },
  29054. "messageID": {
  29055. "type": "string",
  29056. "pattern": "^msg_"
  29057. },
  29058. "callID": {
  29059. "type": "string"
  29060. },
  29061. "command": {
  29062. "type": "string"
  29063. }
  29064. },
  29065. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  29066. "additionalProperties": false
  29067. }
  29068. },
  29069. "required": ["id", "type", "data"],
  29070. "additionalProperties": false
  29071. },
  29072. "V2EventSessionNextShellEnded": {
  29073. "type": "object",
  29074. "properties": {
  29075. "id": {
  29076. "type": "string",
  29077. "pattern": "^evt_"
  29078. },
  29079. "metadata": {
  29080. "type": "object"
  29081. },
  29082. "durable": {
  29083. "type": "object",
  29084. "properties": {
  29085. "aggregateID": {
  29086. "type": "string"
  29087. },
  29088. "seq": {
  29089. "type": "integer"
  29090. },
  29091. "version": {
  29092. "type": "integer"
  29093. }
  29094. },
  29095. "required": ["aggregateID", "seq", "version"],
  29096. "additionalProperties": false
  29097. },
  29098. "location": {
  29099. "$ref": "#/components/schemas/LocationRef"
  29100. },
  29101. "type": {
  29102. "type": "string",
  29103. "enum": ["session.next.shell.ended"]
  29104. },
  29105. "data": {
  29106. "type": "object",
  29107. "properties": {
  29108. "timestamp": {
  29109. "type": "number"
  29110. },
  29111. "sessionID": {
  29112. "type": "string",
  29113. "pattern": "^ses"
  29114. },
  29115. "callID": {
  29116. "type": "string"
  29117. },
  29118. "output": {
  29119. "type": "string"
  29120. }
  29121. },
  29122. "required": ["timestamp", "sessionID", "callID", "output"],
  29123. "additionalProperties": false
  29124. }
  29125. },
  29126. "required": ["id", "type", "data"],
  29127. "additionalProperties": false
  29128. },
  29129. "V2EventSessionNextStepStarted": {
  29130. "type": "object",
  29131. "properties": {
  29132. "id": {
  29133. "type": "string",
  29134. "pattern": "^evt_"
  29135. },
  29136. "metadata": {
  29137. "type": "object"
  29138. },
  29139. "durable": {
  29140. "type": "object",
  29141. "properties": {
  29142. "aggregateID": {
  29143. "type": "string"
  29144. },
  29145. "seq": {
  29146. "type": "integer"
  29147. },
  29148. "version": {
  29149. "type": "integer"
  29150. }
  29151. },
  29152. "required": ["aggregateID", "seq", "version"],
  29153. "additionalProperties": false
  29154. },
  29155. "location": {
  29156. "$ref": "#/components/schemas/LocationRef"
  29157. },
  29158. "type": {
  29159. "type": "string",
  29160. "enum": ["session.next.step.started"]
  29161. },
  29162. "data": {
  29163. "type": "object",
  29164. "properties": {
  29165. "timestamp": {
  29166. "type": "number"
  29167. },
  29168. "sessionID": {
  29169. "type": "string",
  29170. "pattern": "^ses"
  29171. },
  29172. "assistantMessageID": {
  29173. "type": "string",
  29174. "pattern": "^msg_"
  29175. },
  29176. "agent": {
  29177. "type": "string"
  29178. },
  29179. "model": {
  29180. "$ref": "#/components/schemas/ModelRef"
  29181. },
  29182. "snapshot": {
  29183. "type": "string"
  29184. }
  29185. },
  29186. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  29187. "additionalProperties": false
  29188. }
  29189. },
  29190. "required": ["id", "type", "data"],
  29191. "additionalProperties": false
  29192. },
  29193. "V2EventSessionNextStepEnded": {
  29194. "type": "object",
  29195. "properties": {
  29196. "id": {
  29197. "type": "string",
  29198. "pattern": "^evt_"
  29199. },
  29200. "metadata": {
  29201. "type": "object"
  29202. },
  29203. "durable": {
  29204. "type": "object",
  29205. "properties": {
  29206. "aggregateID": {
  29207. "type": "string"
  29208. },
  29209. "seq": {
  29210. "type": "integer"
  29211. },
  29212. "version": {
  29213. "type": "integer"
  29214. }
  29215. },
  29216. "required": ["aggregateID", "seq", "version"],
  29217. "additionalProperties": false
  29218. },
  29219. "location": {
  29220. "$ref": "#/components/schemas/LocationRef"
  29221. },
  29222. "type": {
  29223. "type": "string",
  29224. "enum": ["session.next.step.ended"]
  29225. },
  29226. "data": {
  29227. "type": "object",
  29228. "properties": {
  29229. "timestamp": {
  29230. "type": "number"
  29231. },
  29232. "sessionID": {
  29233. "type": "string",
  29234. "pattern": "^ses"
  29235. },
  29236. "assistantMessageID": {
  29237. "type": "string",
  29238. "pattern": "^msg_"
  29239. },
  29240. "finish": {
  29241. "type": "string"
  29242. },
  29243. "cost": {
  29244. "type": "number"
  29245. },
  29246. "tokens": {
  29247. "type": "object",
  29248. "properties": {
  29249. "input": {
  29250. "type": "number"
  29251. },
  29252. "output": {
  29253. "type": "number"
  29254. },
  29255. "reasoning": {
  29256. "type": "number"
  29257. },
  29258. "cache": {
  29259. "type": "object",
  29260. "properties": {
  29261. "read": {
  29262. "type": "number"
  29263. },
  29264. "write": {
  29265. "type": "number"
  29266. }
  29267. },
  29268. "required": ["read", "write"],
  29269. "additionalProperties": false
  29270. }
  29271. },
  29272. "required": ["input", "output", "reasoning", "cache"],
  29273. "additionalProperties": false
  29274. },
  29275. "snapshot": {
  29276. "type": "string"
  29277. },
  29278. "files": {
  29279. "type": "array",
  29280. "items": {
  29281. "type": "string"
  29282. }
  29283. }
  29284. },
  29285. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  29286. "additionalProperties": false
  29287. }
  29288. },
  29289. "required": ["id", "type", "data"],
  29290. "additionalProperties": false
  29291. },
  29292. "V2EventSessionNextStepFailed": {
  29293. "type": "object",
  29294. "properties": {
  29295. "id": {
  29296. "type": "string",
  29297. "pattern": "^evt_"
  29298. },
  29299. "metadata": {
  29300. "type": "object"
  29301. },
  29302. "durable": {
  29303. "type": "object",
  29304. "properties": {
  29305. "aggregateID": {
  29306. "type": "string"
  29307. },
  29308. "seq": {
  29309. "type": "integer"
  29310. },
  29311. "version": {
  29312. "type": "integer"
  29313. }
  29314. },
  29315. "required": ["aggregateID", "seq", "version"],
  29316. "additionalProperties": false
  29317. },
  29318. "location": {
  29319. "$ref": "#/components/schemas/LocationRef"
  29320. },
  29321. "type": {
  29322. "type": "string",
  29323. "enum": ["session.next.step.failed"]
  29324. },
  29325. "data": {
  29326. "type": "object",
  29327. "properties": {
  29328. "timestamp": {
  29329. "type": "number"
  29330. },
  29331. "sessionID": {
  29332. "type": "string",
  29333. "pattern": "^ses"
  29334. },
  29335. "assistantMessageID": {
  29336. "type": "string",
  29337. "pattern": "^msg_"
  29338. },
  29339. "error": {
  29340. "$ref": "#/components/schemas/SessionErrorUnknown"
  29341. }
  29342. },
  29343. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  29344. "additionalProperties": false
  29345. }
  29346. },
  29347. "required": ["id", "type", "data"],
  29348. "additionalProperties": false
  29349. },
  29350. "V2EventSessionNextTextStarted": {
  29351. "type": "object",
  29352. "properties": {
  29353. "id": {
  29354. "type": "string",
  29355. "pattern": "^evt_"
  29356. },
  29357. "metadata": {
  29358. "type": "object"
  29359. },
  29360. "durable": {
  29361. "type": "object",
  29362. "properties": {
  29363. "aggregateID": {
  29364. "type": "string"
  29365. },
  29366. "seq": {
  29367. "type": "integer"
  29368. },
  29369. "version": {
  29370. "type": "integer"
  29371. }
  29372. },
  29373. "required": ["aggregateID", "seq", "version"],
  29374. "additionalProperties": false
  29375. },
  29376. "location": {
  29377. "$ref": "#/components/schemas/LocationRef"
  29378. },
  29379. "type": {
  29380. "type": "string",
  29381. "enum": ["session.next.text.started"]
  29382. },
  29383. "data": {
  29384. "type": "object",
  29385. "properties": {
  29386. "timestamp": {
  29387. "type": "number"
  29388. },
  29389. "sessionID": {
  29390. "type": "string",
  29391. "pattern": "^ses"
  29392. },
  29393. "assistantMessageID": {
  29394. "type": "string",
  29395. "pattern": "^msg_"
  29396. },
  29397. "textID": {
  29398. "type": "string"
  29399. }
  29400. },
  29401. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  29402. "additionalProperties": false
  29403. }
  29404. },
  29405. "required": ["id", "type", "data"],
  29406. "additionalProperties": false
  29407. },
  29408. "V2EventSessionNextTextDelta": {
  29409. "type": "object",
  29410. "properties": {
  29411. "id": {
  29412. "type": "string",
  29413. "pattern": "^evt_"
  29414. },
  29415. "metadata": {
  29416. "type": "object"
  29417. },
  29418. "durable": {
  29419. "type": "object",
  29420. "properties": {
  29421. "aggregateID": {
  29422. "type": "string"
  29423. },
  29424. "seq": {
  29425. "type": "integer"
  29426. },
  29427. "version": {
  29428. "type": "integer"
  29429. }
  29430. },
  29431. "required": ["aggregateID", "seq", "version"],
  29432. "additionalProperties": false
  29433. },
  29434. "location": {
  29435. "$ref": "#/components/schemas/LocationRef"
  29436. },
  29437. "type": {
  29438. "type": "string",
  29439. "enum": ["session.next.text.delta"]
  29440. },
  29441. "data": {
  29442. "type": "object",
  29443. "properties": {
  29444. "timestamp": {
  29445. "type": "number"
  29446. },
  29447. "sessionID": {
  29448. "type": "string",
  29449. "pattern": "^ses"
  29450. },
  29451. "assistantMessageID": {
  29452. "type": "string",
  29453. "pattern": "^msg_"
  29454. },
  29455. "textID": {
  29456. "type": "string"
  29457. },
  29458. "delta": {
  29459. "type": "string"
  29460. }
  29461. },
  29462. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  29463. "additionalProperties": false
  29464. }
  29465. },
  29466. "required": ["id", "type", "data"],
  29467. "additionalProperties": false
  29468. },
  29469. "V2EventSessionNextTextEnded": {
  29470. "type": "object",
  29471. "properties": {
  29472. "id": {
  29473. "type": "string",
  29474. "pattern": "^evt_"
  29475. },
  29476. "metadata": {
  29477. "type": "object"
  29478. },
  29479. "durable": {
  29480. "type": "object",
  29481. "properties": {
  29482. "aggregateID": {
  29483. "type": "string"
  29484. },
  29485. "seq": {
  29486. "type": "integer"
  29487. },
  29488. "version": {
  29489. "type": "integer"
  29490. }
  29491. },
  29492. "required": ["aggregateID", "seq", "version"],
  29493. "additionalProperties": false
  29494. },
  29495. "location": {
  29496. "$ref": "#/components/schemas/LocationRef"
  29497. },
  29498. "type": {
  29499. "type": "string",
  29500. "enum": ["session.next.text.ended"]
  29501. },
  29502. "data": {
  29503. "type": "object",
  29504. "properties": {
  29505. "timestamp": {
  29506. "type": "number"
  29507. },
  29508. "sessionID": {
  29509. "type": "string",
  29510. "pattern": "^ses"
  29511. },
  29512. "assistantMessageID": {
  29513. "type": "string",
  29514. "pattern": "^msg_"
  29515. },
  29516. "textID": {
  29517. "type": "string"
  29518. },
  29519. "text": {
  29520. "type": "string"
  29521. }
  29522. },
  29523. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  29524. "additionalProperties": false
  29525. }
  29526. },
  29527. "required": ["id", "type", "data"],
  29528. "additionalProperties": false
  29529. },
  29530. "V2EventSessionNextReasoningStarted": {
  29531. "type": "object",
  29532. "properties": {
  29533. "id": {
  29534. "type": "string",
  29535. "pattern": "^evt_"
  29536. },
  29537. "metadata": {
  29538. "type": "object"
  29539. },
  29540. "durable": {
  29541. "type": "object",
  29542. "properties": {
  29543. "aggregateID": {
  29544. "type": "string"
  29545. },
  29546. "seq": {
  29547. "type": "integer"
  29548. },
  29549. "version": {
  29550. "type": "integer"
  29551. }
  29552. },
  29553. "required": ["aggregateID", "seq", "version"],
  29554. "additionalProperties": false
  29555. },
  29556. "location": {
  29557. "$ref": "#/components/schemas/LocationRef"
  29558. },
  29559. "type": {
  29560. "type": "string",
  29561. "enum": ["session.next.reasoning.started"]
  29562. },
  29563. "data": {
  29564. "type": "object",
  29565. "properties": {
  29566. "timestamp": {
  29567. "type": "number"
  29568. },
  29569. "sessionID": {
  29570. "type": "string",
  29571. "pattern": "^ses"
  29572. },
  29573. "assistantMessageID": {
  29574. "type": "string",
  29575. "pattern": "^msg_"
  29576. },
  29577. "reasoningID": {
  29578. "type": "string"
  29579. },
  29580. "providerMetadata": {
  29581. "$ref": "#/components/schemas/LLMProviderMetadata"
  29582. }
  29583. },
  29584. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  29585. "additionalProperties": false
  29586. }
  29587. },
  29588. "required": ["id", "type", "data"],
  29589. "additionalProperties": false
  29590. },
  29591. "V2EventSessionNextReasoningDelta": {
  29592. "type": "object",
  29593. "properties": {
  29594. "id": {
  29595. "type": "string",
  29596. "pattern": "^evt_"
  29597. },
  29598. "metadata": {
  29599. "type": "object"
  29600. },
  29601. "durable": {
  29602. "type": "object",
  29603. "properties": {
  29604. "aggregateID": {
  29605. "type": "string"
  29606. },
  29607. "seq": {
  29608. "type": "integer"
  29609. },
  29610. "version": {
  29611. "type": "integer"
  29612. }
  29613. },
  29614. "required": ["aggregateID", "seq", "version"],
  29615. "additionalProperties": false
  29616. },
  29617. "location": {
  29618. "$ref": "#/components/schemas/LocationRef"
  29619. },
  29620. "type": {
  29621. "type": "string",
  29622. "enum": ["session.next.reasoning.delta"]
  29623. },
  29624. "data": {
  29625. "type": "object",
  29626. "properties": {
  29627. "timestamp": {
  29628. "type": "number"
  29629. },
  29630. "sessionID": {
  29631. "type": "string",
  29632. "pattern": "^ses"
  29633. },
  29634. "assistantMessageID": {
  29635. "type": "string",
  29636. "pattern": "^msg_"
  29637. },
  29638. "reasoningID": {
  29639. "type": "string"
  29640. },
  29641. "delta": {
  29642. "type": "string"
  29643. }
  29644. },
  29645. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  29646. "additionalProperties": false
  29647. }
  29648. },
  29649. "required": ["id", "type", "data"],
  29650. "additionalProperties": false
  29651. },
  29652. "V2EventSessionNextReasoningEnded": {
  29653. "type": "object",
  29654. "properties": {
  29655. "id": {
  29656. "type": "string",
  29657. "pattern": "^evt_"
  29658. },
  29659. "metadata": {
  29660. "type": "object"
  29661. },
  29662. "durable": {
  29663. "type": "object",
  29664. "properties": {
  29665. "aggregateID": {
  29666. "type": "string"
  29667. },
  29668. "seq": {
  29669. "type": "integer"
  29670. },
  29671. "version": {
  29672. "type": "integer"
  29673. }
  29674. },
  29675. "required": ["aggregateID", "seq", "version"],
  29676. "additionalProperties": false
  29677. },
  29678. "location": {
  29679. "$ref": "#/components/schemas/LocationRef"
  29680. },
  29681. "type": {
  29682. "type": "string",
  29683. "enum": ["session.next.reasoning.ended"]
  29684. },
  29685. "data": {
  29686. "type": "object",
  29687. "properties": {
  29688. "timestamp": {
  29689. "type": "number"
  29690. },
  29691. "sessionID": {
  29692. "type": "string",
  29693. "pattern": "^ses"
  29694. },
  29695. "assistantMessageID": {
  29696. "type": "string",
  29697. "pattern": "^msg_"
  29698. },
  29699. "reasoningID": {
  29700. "type": "string"
  29701. },
  29702. "text": {
  29703. "type": "string"
  29704. },
  29705. "providerMetadata": {
  29706. "$ref": "#/components/schemas/LLMProviderMetadata"
  29707. }
  29708. },
  29709. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  29710. "additionalProperties": false
  29711. }
  29712. },
  29713. "required": ["id", "type", "data"],
  29714. "additionalProperties": false
  29715. },
  29716. "V2EventSessionNextToolInputStarted": {
  29717. "type": "object",
  29718. "properties": {
  29719. "id": {
  29720. "type": "string",
  29721. "pattern": "^evt_"
  29722. },
  29723. "metadata": {
  29724. "type": "object"
  29725. },
  29726. "durable": {
  29727. "type": "object",
  29728. "properties": {
  29729. "aggregateID": {
  29730. "type": "string"
  29731. },
  29732. "seq": {
  29733. "type": "integer"
  29734. },
  29735. "version": {
  29736. "type": "integer"
  29737. }
  29738. },
  29739. "required": ["aggregateID", "seq", "version"],
  29740. "additionalProperties": false
  29741. },
  29742. "location": {
  29743. "$ref": "#/components/schemas/LocationRef"
  29744. },
  29745. "type": {
  29746. "type": "string",
  29747. "enum": ["session.next.tool.input.started"]
  29748. },
  29749. "data": {
  29750. "type": "object",
  29751. "properties": {
  29752. "timestamp": {
  29753. "type": "number"
  29754. },
  29755. "sessionID": {
  29756. "type": "string",
  29757. "pattern": "^ses"
  29758. },
  29759. "assistantMessageID": {
  29760. "type": "string",
  29761. "pattern": "^msg_"
  29762. },
  29763. "callID": {
  29764. "type": "string"
  29765. },
  29766. "name": {
  29767. "type": "string"
  29768. }
  29769. },
  29770. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  29771. "additionalProperties": false
  29772. }
  29773. },
  29774. "required": ["id", "type", "data"],
  29775. "additionalProperties": false
  29776. },
  29777. "V2EventSessionNextToolInputDelta": {
  29778. "type": "object",
  29779. "properties": {
  29780. "id": {
  29781. "type": "string",
  29782. "pattern": "^evt_"
  29783. },
  29784. "metadata": {
  29785. "type": "object"
  29786. },
  29787. "durable": {
  29788. "type": "object",
  29789. "properties": {
  29790. "aggregateID": {
  29791. "type": "string"
  29792. },
  29793. "seq": {
  29794. "type": "integer"
  29795. },
  29796. "version": {
  29797. "type": "integer"
  29798. }
  29799. },
  29800. "required": ["aggregateID", "seq", "version"],
  29801. "additionalProperties": false
  29802. },
  29803. "location": {
  29804. "$ref": "#/components/schemas/LocationRef"
  29805. },
  29806. "type": {
  29807. "type": "string",
  29808. "enum": ["session.next.tool.input.delta"]
  29809. },
  29810. "data": {
  29811. "type": "object",
  29812. "properties": {
  29813. "timestamp": {
  29814. "type": "number"
  29815. },
  29816. "sessionID": {
  29817. "type": "string",
  29818. "pattern": "^ses"
  29819. },
  29820. "assistantMessageID": {
  29821. "type": "string",
  29822. "pattern": "^msg_"
  29823. },
  29824. "callID": {
  29825. "type": "string"
  29826. },
  29827. "delta": {
  29828. "type": "string"
  29829. }
  29830. },
  29831. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  29832. "additionalProperties": false
  29833. }
  29834. },
  29835. "required": ["id", "type", "data"],
  29836. "additionalProperties": false
  29837. },
  29838. "V2EventSessionNextToolInputEnded": {
  29839. "type": "object",
  29840. "properties": {
  29841. "id": {
  29842. "type": "string",
  29843. "pattern": "^evt_"
  29844. },
  29845. "metadata": {
  29846. "type": "object"
  29847. },
  29848. "durable": {
  29849. "type": "object",
  29850. "properties": {
  29851. "aggregateID": {
  29852. "type": "string"
  29853. },
  29854. "seq": {
  29855. "type": "integer"
  29856. },
  29857. "version": {
  29858. "type": "integer"
  29859. }
  29860. },
  29861. "required": ["aggregateID", "seq", "version"],
  29862. "additionalProperties": false
  29863. },
  29864. "location": {
  29865. "$ref": "#/components/schemas/LocationRef"
  29866. },
  29867. "type": {
  29868. "type": "string",
  29869. "enum": ["session.next.tool.input.ended"]
  29870. },
  29871. "data": {
  29872. "type": "object",
  29873. "properties": {
  29874. "timestamp": {
  29875. "type": "number"
  29876. },
  29877. "sessionID": {
  29878. "type": "string",
  29879. "pattern": "^ses"
  29880. },
  29881. "assistantMessageID": {
  29882. "type": "string",
  29883. "pattern": "^msg_"
  29884. },
  29885. "callID": {
  29886. "type": "string"
  29887. },
  29888. "text": {
  29889. "type": "string"
  29890. }
  29891. },
  29892. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  29893. "additionalProperties": false
  29894. }
  29895. },
  29896. "required": ["id", "type", "data"],
  29897. "additionalProperties": false
  29898. },
  29899. "V2EventSessionNextToolCalled": {
  29900. "type": "object",
  29901. "properties": {
  29902. "id": {
  29903. "type": "string",
  29904. "pattern": "^evt_"
  29905. },
  29906. "metadata": {
  29907. "type": "object"
  29908. },
  29909. "durable": {
  29910. "type": "object",
  29911. "properties": {
  29912. "aggregateID": {
  29913. "type": "string"
  29914. },
  29915. "seq": {
  29916. "type": "integer"
  29917. },
  29918. "version": {
  29919. "type": "integer"
  29920. }
  29921. },
  29922. "required": ["aggregateID", "seq", "version"],
  29923. "additionalProperties": false
  29924. },
  29925. "location": {
  29926. "$ref": "#/components/schemas/LocationRef"
  29927. },
  29928. "type": {
  29929. "type": "string",
  29930. "enum": ["session.next.tool.called"]
  29931. },
  29932. "data": {
  29933. "type": "object",
  29934. "properties": {
  29935. "timestamp": {
  29936. "type": "number"
  29937. },
  29938. "sessionID": {
  29939. "type": "string",
  29940. "pattern": "^ses"
  29941. },
  29942. "assistantMessageID": {
  29943. "type": "string",
  29944. "pattern": "^msg_"
  29945. },
  29946. "callID": {
  29947. "type": "string"
  29948. },
  29949. "tool": {
  29950. "type": "string"
  29951. },
  29952. "input": {
  29953. "type": "object"
  29954. },
  29955. "provider": {
  29956. "type": "object",
  29957. "properties": {
  29958. "executed": {
  29959. "type": "boolean"
  29960. },
  29961. "metadata": {
  29962. "$ref": "#/components/schemas/LLMProviderMetadata"
  29963. }
  29964. },
  29965. "required": ["executed"],
  29966. "additionalProperties": false
  29967. }
  29968. },
  29969. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  29970. "additionalProperties": false
  29971. }
  29972. },
  29973. "required": ["id", "type", "data"],
  29974. "additionalProperties": false
  29975. },
  29976. "V2EventSessionNextToolProgress": {
  29977. "type": "object",
  29978. "properties": {
  29979. "id": {
  29980. "type": "string",
  29981. "pattern": "^evt_"
  29982. },
  29983. "metadata": {
  29984. "type": "object"
  29985. },
  29986. "durable": {
  29987. "type": "object",
  29988. "properties": {
  29989. "aggregateID": {
  29990. "type": "string"
  29991. },
  29992. "seq": {
  29993. "type": "integer"
  29994. },
  29995. "version": {
  29996. "type": "integer"
  29997. }
  29998. },
  29999. "required": ["aggregateID", "seq", "version"],
  30000. "additionalProperties": false
  30001. },
  30002. "location": {
  30003. "$ref": "#/components/schemas/LocationRef"
  30004. },
  30005. "type": {
  30006. "type": "string",
  30007. "enum": ["session.next.tool.progress"]
  30008. },
  30009. "data": {
  30010. "type": "object",
  30011. "properties": {
  30012. "timestamp": {
  30013. "type": "number"
  30014. },
  30015. "sessionID": {
  30016. "type": "string",
  30017. "pattern": "^ses"
  30018. },
  30019. "assistantMessageID": {
  30020. "type": "string",
  30021. "pattern": "^msg_"
  30022. },
  30023. "callID": {
  30024. "type": "string"
  30025. },
  30026. "structured": {
  30027. "type": "object"
  30028. },
  30029. "content": {
  30030. "type": "array",
  30031. "items": {
  30032. "$ref": "#/components/schemas/LLMToolContent"
  30033. }
  30034. }
  30035. },
  30036. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  30037. "additionalProperties": false
  30038. }
  30039. },
  30040. "required": ["id", "type", "data"],
  30041. "additionalProperties": false
  30042. },
  30043. "V2EventSessionNextToolSuccess": {
  30044. "type": "object",
  30045. "properties": {
  30046. "id": {
  30047. "type": "string",
  30048. "pattern": "^evt_"
  30049. },
  30050. "metadata": {
  30051. "type": "object"
  30052. },
  30053. "durable": {
  30054. "type": "object",
  30055. "properties": {
  30056. "aggregateID": {
  30057. "type": "string"
  30058. },
  30059. "seq": {
  30060. "type": "integer"
  30061. },
  30062. "version": {
  30063. "type": "integer"
  30064. }
  30065. },
  30066. "required": ["aggregateID", "seq", "version"],
  30067. "additionalProperties": false
  30068. },
  30069. "location": {
  30070. "$ref": "#/components/schemas/LocationRef"
  30071. },
  30072. "type": {
  30073. "type": "string",
  30074. "enum": ["session.next.tool.success"]
  30075. },
  30076. "data": {
  30077. "type": "object",
  30078. "properties": {
  30079. "timestamp": {
  30080. "type": "number"
  30081. },
  30082. "sessionID": {
  30083. "type": "string",
  30084. "pattern": "^ses"
  30085. },
  30086. "assistantMessageID": {
  30087. "type": "string",
  30088. "pattern": "^msg_"
  30089. },
  30090. "callID": {
  30091. "type": "string"
  30092. },
  30093. "structured": {
  30094. "type": "object"
  30095. },
  30096. "content": {
  30097. "type": "array",
  30098. "items": {
  30099. "$ref": "#/components/schemas/LLMToolContent"
  30100. }
  30101. },
  30102. "outputPaths": {
  30103. "type": "array",
  30104. "items": {
  30105. "type": "string"
  30106. }
  30107. },
  30108. "result": {},
  30109. "provider": {
  30110. "type": "object",
  30111. "properties": {
  30112. "executed": {
  30113. "type": "boolean"
  30114. },
  30115. "metadata": {
  30116. "$ref": "#/components/schemas/LLMProviderMetadata"
  30117. }
  30118. },
  30119. "required": ["executed"],
  30120. "additionalProperties": false
  30121. }
  30122. },
  30123. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  30124. "additionalProperties": false
  30125. }
  30126. },
  30127. "required": ["id", "type", "data"],
  30128. "additionalProperties": false
  30129. },
  30130. "V2EventSessionNextToolFailed": {
  30131. "type": "object",
  30132. "properties": {
  30133. "id": {
  30134. "type": "string",
  30135. "pattern": "^evt_"
  30136. },
  30137. "metadata": {
  30138. "type": "object"
  30139. },
  30140. "durable": {
  30141. "type": "object",
  30142. "properties": {
  30143. "aggregateID": {
  30144. "type": "string"
  30145. },
  30146. "seq": {
  30147. "type": "integer"
  30148. },
  30149. "version": {
  30150. "type": "integer"
  30151. }
  30152. },
  30153. "required": ["aggregateID", "seq", "version"],
  30154. "additionalProperties": false
  30155. },
  30156. "location": {
  30157. "$ref": "#/components/schemas/LocationRef"
  30158. },
  30159. "type": {
  30160. "type": "string",
  30161. "enum": ["session.next.tool.failed"]
  30162. },
  30163. "data": {
  30164. "type": "object",
  30165. "properties": {
  30166. "timestamp": {
  30167. "type": "number"
  30168. },
  30169. "sessionID": {
  30170. "type": "string",
  30171. "pattern": "^ses"
  30172. },
  30173. "assistantMessageID": {
  30174. "type": "string",
  30175. "pattern": "^msg_"
  30176. },
  30177. "callID": {
  30178. "type": "string"
  30179. },
  30180. "error": {
  30181. "$ref": "#/components/schemas/SessionErrorUnknown"
  30182. },
  30183. "result": {},
  30184. "provider": {
  30185. "type": "object",
  30186. "properties": {
  30187. "executed": {
  30188. "type": "boolean"
  30189. },
  30190. "metadata": {
  30191. "$ref": "#/components/schemas/LLMProviderMetadata"
  30192. }
  30193. },
  30194. "required": ["executed"],
  30195. "additionalProperties": false
  30196. }
  30197. },
  30198. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  30199. "additionalProperties": false
  30200. }
  30201. },
  30202. "required": ["id", "type", "data"],
  30203. "additionalProperties": false
  30204. },
  30205. "V2EventSessionNextRetried": {
  30206. "type": "object",
  30207. "properties": {
  30208. "id": {
  30209. "type": "string",
  30210. "pattern": "^evt_"
  30211. },
  30212. "metadata": {
  30213. "type": "object"
  30214. },
  30215. "durable": {
  30216. "type": "object",
  30217. "properties": {
  30218. "aggregateID": {
  30219. "type": "string"
  30220. },
  30221. "seq": {
  30222. "type": "integer"
  30223. },
  30224. "version": {
  30225. "type": "integer"
  30226. }
  30227. },
  30228. "required": ["aggregateID", "seq", "version"],
  30229. "additionalProperties": false
  30230. },
  30231. "location": {
  30232. "$ref": "#/components/schemas/LocationRef"
  30233. },
  30234. "type": {
  30235. "type": "string",
  30236. "enum": ["session.next.retried"]
  30237. },
  30238. "data": {
  30239. "type": "object",
  30240. "properties": {
  30241. "timestamp": {
  30242. "type": "number"
  30243. },
  30244. "sessionID": {
  30245. "type": "string",
  30246. "pattern": "^ses"
  30247. },
  30248. "attempt": {
  30249. "type": "number"
  30250. },
  30251. "error": {
  30252. "$ref": "#/components/schemas/SessionNextRetry_error"
  30253. }
  30254. },
  30255. "required": ["timestamp", "sessionID", "attempt", "error"],
  30256. "additionalProperties": false
  30257. }
  30258. },
  30259. "required": ["id", "type", "data"],
  30260. "additionalProperties": false
  30261. },
  30262. "V2EventSessionNextCompactionStarted": {
  30263. "type": "object",
  30264. "properties": {
  30265. "id": {
  30266. "type": "string",
  30267. "pattern": "^evt_"
  30268. },
  30269. "metadata": {
  30270. "type": "object"
  30271. },
  30272. "durable": {
  30273. "type": "object",
  30274. "properties": {
  30275. "aggregateID": {
  30276. "type": "string"
  30277. },
  30278. "seq": {
  30279. "type": "integer"
  30280. },
  30281. "version": {
  30282. "type": "integer"
  30283. }
  30284. },
  30285. "required": ["aggregateID", "seq", "version"],
  30286. "additionalProperties": false
  30287. },
  30288. "location": {
  30289. "$ref": "#/components/schemas/LocationRef"
  30290. },
  30291. "type": {
  30292. "type": "string",
  30293. "enum": ["session.next.compaction.started"]
  30294. },
  30295. "data": {
  30296. "type": "object",
  30297. "properties": {
  30298. "timestamp": {
  30299. "type": "number"
  30300. },
  30301. "sessionID": {
  30302. "type": "string",
  30303. "pattern": "^ses"
  30304. },
  30305. "messageID": {
  30306. "type": "string",
  30307. "pattern": "^msg_"
  30308. },
  30309. "reason": {
  30310. "type": "string",
  30311. "enum": ["auto", "manual"]
  30312. }
  30313. },
  30314. "required": ["timestamp", "sessionID", "messageID", "reason"],
  30315. "additionalProperties": false
  30316. }
  30317. },
  30318. "required": ["id", "type", "data"],
  30319. "additionalProperties": false
  30320. },
  30321. "V2EventSessionNextCompactionDelta": {
  30322. "type": "object",
  30323. "properties": {
  30324. "id": {
  30325. "type": "string",
  30326. "pattern": "^evt_"
  30327. },
  30328. "metadata": {
  30329. "type": "object"
  30330. },
  30331. "durable": {
  30332. "type": "object",
  30333. "properties": {
  30334. "aggregateID": {
  30335. "type": "string"
  30336. },
  30337. "seq": {
  30338. "type": "integer"
  30339. },
  30340. "version": {
  30341. "type": "integer"
  30342. }
  30343. },
  30344. "required": ["aggregateID", "seq", "version"],
  30345. "additionalProperties": false
  30346. },
  30347. "location": {
  30348. "$ref": "#/components/schemas/LocationRef"
  30349. },
  30350. "type": {
  30351. "type": "string",
  30352. "enum": ["session.next.compaction.delta"]
  30353. },
  30354. "data": {
  30355. "type": "object",
  30356. "properties": {
  30357. "timestamp": {
  30358. "type": "number"
  30359. },
  30360. "sessionID": {
  30361. "type": "string",
  30362. "pattern": "^ses"
  30363. },
  30364. "messageID": {
  30365. "type": "string",
  30366. "pattern": "^msg_"
  30367. },
  30368. "text": {
  30369. "type": "string"
  30370. }
  30371. },
  30372. "required": ["timestamp", "sessionID", "messageID", "text"],
  30373. "additionalProperties": false
  30374. }
  30375. },
  30376. "required": ["id", "type", "data"],
  30377. "additionalProperties": false
  30378. },
  30379. "V2EventSessionNextCompactionEnded": {
  30380. "type": "object",
  30381. "properties": {
  30382. "id": {
  30383. "type": "string",
  30384. "pattern": "^evt_"
  30385. },
  30386. "metadata": {
  30387. "type": "object"
  30388. },
  30389. "durable": {
  30390. "type": "object",
  30391. "properties": {
  30392. "aggregateID": {
  30393. "type": "string"
  30394. },
  30395. "seq": {
  30396. "type": "integer"
  30397. },
  30398. "version": {
  30399. "type": "integer"
  30400. }
  30401. },
  30402. "required": ["aggregateID", "seq", "version"],
  30403. "additionalProperties": false
  30404. },
  30405. "location": {
  30406. "$ref": "#/components/schemas/LocationRef"
  30407. },
  30408. "type": {
  30409. "type": "string",
  30410. "enum": ["session.next.compaction.ended"]
  30411. },
  30412. "data": {
  30413. "type": "object",
  30414. "properties": {
  30415. "timestamp": {
  30416. "type": "number"
  30417. },
  30418. "sessionID": {
  30419. "type": "string",
  30420. "pattern": "^ses"
  30421. },
  30422. "messageID": {
  30423. "type": "string",
  30424. "pattern": "^msg_"
  30425. },
  30426. "reason": {
  30427. "type": "string",
  30428. "enum": ["auto", "manual"]
  30429. },
  30430. "text": {
  30431. "type": "string"
  30432. },
  30433. "recent": {
  30434. "type": "string"
  30435. }
  30436. },
  30437. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  30438. "additionalProperties": false
  30439. }
  30440. },
  30441. "required": ["id", "type", "data"],
  30442. "additionalProperties": false
  30443. },
  30444. "V2EventSessionNextRevertStaged": {
  30445. "type": "object",
  30446. "properties": {
  30447. "id": {
  30448. "type": "string",
  30449. "pattern": "^evt_"
  30450. },
  30451. "metadata": {
  30452. "type": "object"
  30453. },
  30454. "durable": {
  30455. "type": "object",
  30456. "properties": {
  30457. "aggregateID": {
  30458. "type": "string"
  30459. },
  30460. "seq": {
  30461. "type": "integer"
  30462. },
  30463. "version": {
  30464. "type": "integer"
  30465. }
  30466. },
  30467. "required": ["aggregateID", "seq", "version"],
  30468. "additionalProperties": false
  30469. },
  30470. "location": {
  30471. "$ref": "#/components/schemas/LocationRef"
  30472. },
  30473. "type": {
  30474. "type": "string",
  30475. "enum": ["session.next.revert.staged"]
  30476. },
  30477. "data": {
  30478. "type": "object",
  30479. "properties": {
  30480. "timestamp": {
  30481. "type": "number"
  30482. },
  30483. "sessionID": {
  30484. "type": "string",
  30485. "pattern": "^ses"
  30486. },
  30487. "revert": {
  30488. "$ref": "#/components/schemas/RevertState"
  30489. }
  30490. },
  30491. "required": ["timestamp", "sessionID", "revert"],
  30492. "additionalProperties": false
  30493. }
  30494. },
  30495. "required": ["id", "type", "data"],
  30496. "additionalProperties": false
  30497. },
  30498. "V2EventSessionNextRevertCleared": {
  30499. "type": "object",
  30500. "properties": {
  30501. "id": {
  30502. "type": "string",
  30503. "pattern": "^evt_"
  30504. },
  30505. "metadata": {
  30506. "type": "object"
  30507. },
  30508. "durable": {
  30509. "type": "object",
  30510. "properties": {
  30511. "aggregateID": {
  30512. "type": "string"
  30513. },
  30514. "seq": {
  30515. "type": "integer"
  30516. },
  30517. "version": {
  30518. "type": "integer"
  30519. }
  30520. },
  30521. "required": ["aggregateID", "seq", "version"],
  30522. "additionalProperties": false
  30523. },
  30524. "location": {
  30525. "$ref": "#/components/schemas/LocationRef"
  30526. },
  30527. "type": {
  30528. "type": "string",
  30529. "enum": ["session.next.revert.cleared"]
  30530. },
  30531. "data": {
  30532. "type": "object",
  30533. "properties": {
  30534. "timestamp": {
  30535. "type": "number"
  30536. },
  30537. "sessionID": {
  30538. "type": "string",
  30539. "pattern": "^ses"
  30540. }
  30541. },
  30542. "required": ["timestamp", "sessionID"],
  30543. "additionalProperties": false
  30544. }
  30545. },
  30546. "required": ["id", "type", "data"],
  30547. "additionalProperties": false
  30548. },
  30549. "V2EventSessionNextRevertCommitted": {
  30550. "type": "object",
  30551. "properties": {
  30552. "id": {
  30553. "type": "string",
  30554. "pattern": "^evt_"
  30555. },
  30556. "metadata": {
  30557. "type": "object"
  30558. },
  30559. "durable": {
  30560. "type": "object",
  30561. "properties": {
  30562. "aggregateID": {
  30563. "type": "string"
  30564. },
  30565. "seq": {
  30566. "type": "integer"
  30567. },
  30568. "version": {
  30569. "type": "integer"
  30570. }
  30571. },
  30572. "required": ["aggregateID", "seq", "version"],
  30573. "additionalProperties": false
  30574. },
  30575. "location": {
  30576. "$ref": "#/components/schemas/LocationRef"
  30577. },
  30578. "type": {
  30579. "type": "string",
  30580. "enum": ["session.next.revert.committed"]
  30581. },
  30582. "data": {
  30583. "type": "object",
  30584. "properties": {
  30585. "timestamp": {
  30586. "type": "number"
  30587. },
  30588. "sessionID": {
  30589. "type": "string",
  30590. "pattern": "^ses"
  30591. },
  30592. "messageID": {
  30593. "type": "string",
  30594. "pattern": "^msg_"
  30595. }
  30596. },
  30597. "required": ["timestamp", "sessionID", "messageID"],
  30598. "additionalProperties": false
  30599. }
  30600. },
  30601. "required": ["id", "type", "data"],
  30602. "additionalProperties": false
  30603. },
  30604. "V2EventMessagePartDelta": {
  30605. "type": "object",
  30606. "properties": {
  30607. "id": {
  30608. "type": "string",
  30609. "pattern": "^evt_"
  30610. },
  30611. "metadata": {
  30612. "type": "object"
  30613. },
  30614. "durable": {
  30615. "type": "object",
  30616. "properties": {
  30617. "aggregateID": {
  30618. "type": "string"
  30619. },
  30620. "seq": {
  30621. "type": "integer"
  30622. },
  30623. "version": {
  30624. "type": "integer"
  30625. }
  30626. },
  30627. "required": ["aggregateID", "seq", "version"],
  30628. "additionalProperties": false
  30629. },
  30630. "location": {
  30631. "$ref": "#/components/schemas/LocationRef"
  30632. },
  30633. "type": {
  30634. "type": "string",
  30635. "enum": ["message.part.delta"]
  30636. },
  30637. "data": {
  30638. "type": "object",
  30639. "properties": {
  30640. "sessionID": {
  30641. "type": "string",
  30642. "pattern": "^ses"
  30643. },
  30644. "messageID": {
  30645. "type": "string",
  30646. "pattern": "^msg"
  30647. },
  30648. "partID": {
  30649. "type": "string",
  30650. "pattern": "^prt"
  30651. },
  30652. "field": {
  30653. "type": "string"
  30654. },
  30655. "delta": {
  30656. "type": "string"
  30657. }
  30658. },
  30659. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  30660. "additionalProperties": false
  30661. }
  30662. },
  30663. "required": ["id", "type", "data"],
  30664. "additionalProperties": false
  30665. },
  30666. "V2EventSessionDiff": {
  30667. "type": "object",
  30668. "properties": {
  30669. "id": {
  30670. "type": "string",
  30671. "pattern": "^evt_"
  30672. },
  30673. "metadata": {
  30674. "type": "object"
  30675. },
  30676. "durable": {
  30677. "type": "object",
  30678. "properties": {
  30679. "aggregateID": {
  30680. "type": "string"
  30681. },
  30682. "seq": {
  30683. "type": "integer"
  30684. },
  30685. "version": {
  30686. "type": "integer"
  30687. }
  30688. },
  30689. "required": ["aggregateID", "seq", "version"],
  30690. "additionalProperties": false
  30691. },
  30692. "location": {
  30693. "$ref": "#/components/schemas/LocationRef"
  30694. },
  30695. "type": {
  30696. "type": "string",
  30697. "enum": ["session.diff"]
  30698. },
  30699. "data": {
  30700. "type": "object",
  30701. "properties": {
  30702. "sessionID": {
  30703. "type": "string",
  30704. "pattern": "^ses"
  30705. },
  30706. "diff": {
  30707. "type": "array",
  30708. "items": {
  30709. "$ref": "#/components/schemas/SnapshotFileDiff"
  30710. }
  30711. }
  30712. },
  30713. "required": ["sessionID", "diff"],
  30714. "additionalProperties": false
  30715. }
  30716. },
  30717. "required": ["id", "type", "data"],
  30718. "additionalProperties": false
  30719. },
  30720. "V2EventSessionError": {
  30721. "type": "object",
  30722. "properties": {
  30723. "id": {
  30724. "type": "string",
  30725. "pattern": "^evt_"
  30726. },
  30727. "metadata": {
  30728. "type": "object"
  30729. },
  30730. "durable": {
  30731. "type": "object",
  30732. "properties": {
  30733. "aggregateID": {
  30734. "type": "string"
  30735. },
  30736. "seq": {
  30737. "type": "integer"
  30738. },
  30739. "version": {
  30740. "type": "integer"
  30741. }
  30742. },
  30743. "required": ["aggregateID", "seq", "version"],
  30744. "additionalProperties": false
  30745. },
  30746. "location": {
  30747. "$ref": "#/components/schemas/LocationRef"
  30748. },
  30749. "type": {
  30750. "type": "string",
  30751. "enum": ["session.error"]
  30752. },
  30753. "data": {
  30754. "type": "object",
  30755. "properties": {
  30756. "sessionID": {
  30757. "type": "string",
  30758. "pattern": "^ses"
  30759. },
  30760. "error": {
  30761. "anyOf": [
  30762. {
  30763. "$ref": "#/components/schemas/ProviderAuthError"
  30764. },
  30765. {
  30766. "$ref": "#/components/schemas/UnknownError"
  30767. },
  30768. {
  30769. "$ref": "#/components/schemas/MessageOutputLengthError"
  30770. },
  30771. {
  30772. "$ref": "#/components/schemas/MessageAbortedError"
  30773. },
  30774. {
  30775. "$ref": "#/components/schemas/StructuredOutputError"
  30776. },
  30777. {
  30778. "$ref": "#/components/schemas/ContextOverflowError"
  30779. },
  30780. {
  30781. "$ref": "#/components/schemas/ContentFilterError"
  30782. },
  30783. {
  30784. "$ref": "#/components/schemas/APIError"
  30785. }
  30786. ]
  30787. }
  30788. },
  30789. "additionalProperties": false
  30790. }
  30791. },
  30792. "required": ["id", "type", "data"],
  30793. "additionalProperties": false
  30794. },
  30795. "V2EventInstallationUpdated": {
  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": ["installation.updated"]
  30827. },
  30828. "data": {
  30829. "type": "object",
  30830. "properties": {
  30831. "version": {
  30832. "type": "string"
  30833. }
  30834. },
  30835. "required": ["version"],
  30836. "additionalProperties": false
  30837. }
  30838. },
  30839. "required": ["id", "type", "data"],
  30840. "additionalProperties": false
  30841. },
  30842. "V2EventInstallationUpdate-available": {
  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": ["installation.update-available"]
  30874. },
  30875. "data": {
  30876. "type": "object",
  30877. "properties": {
  30878. "version": {
  30879. "type": "string"
  30880. }
  30881. },
  30882. "required": ["version"],
  30883. "additionalProperties": false
  30884. }
  30885. },
  30886. "required": ["id", "type", "data"],
  30887. "additionalProperties": false
  30888. },
  30889. "V2EventFileEdited": {
  30890. "type": "object",
  30891. "properties": {
  30892. "id": {
  30893. "type": "string",
  30894. "pattern": "^evt_"
  30895. },
  30896. "metadata": {
  30897. "type": "object"
  30898. },
  30899. "durable": {
  30900. "type": "object",
  30901. "properties": {
  30902. "aggregateID": {
  30903. "type": "string"
  30904. },
  30905. "seq": {
  30906. "type": "integer"
  30907. },
  30908. "version": {
  30909. "type": "integer"
  30910. }
  30911. },
  30912. "required": ["aggregateID", "seq", "version"],
  30913. "additionalProperties": false
  30914. },
  30915. "location": {
  30916. "$ref": "#/components/schemas/LocationRef"
  30917. },
  30918. "type": {
  30919. "type": "string",
  30920. "enum": ["file.edited"]
  30921. },
  30922. "data": {
  30923. "type": "object",
  30924. "properties": {
  30925. "file": {
  30926. "type": "string"
  30927. }
  30928. },
  30929. "required": ["file"],
  30930. "additionalProperties": false
  30931. }
  30932. },
  30933. "required": ["id", "type", "data"],
  30934. "additionalProperties": false
  30935. },
  30936. "V2EventReferenceUpdated": {
  30937. "type": "object",
  30938. "properties": {
  30939. "id": {
  30940. "type": "string",
  30941. "pattern": "^evt_"
  30942. },
  30943. "metadata": {
  30944. "type": "object"
  30945. },
  30946. "durable": {
  30947. "type": "object",
  30948. "properties": {
  30949. "aggregateID": {
  30950. "type": "string"
  30951. },
  30952. "seq": {
  30953. "type": "integer"
  30954. },
  30955. "version": {
  30956. "type": "integer"
  30957. }
  30958. },
  30959. "required": ["aggregateID", "seq", "version"],
  30960. "additionalProperties": false
  30961. },
  30962. "location": {
  30963. "$ref": "#/components/schemas/LocationRef"
  30964. },
  30965. "type": {
  30966. "type": "string",
  30967. "enum": ["reference.updated"]
  30968. },
  30969. "data": {
  30970. "type": "object",
  30971. "properties": {}
  30972. }
  30973. },
  30974. "required": ["id", "type", "data"],
  30975. "additionalProperties": false
  30976. },
  30977. "V2EventPermissionV2Asked": {
  30978. "type": "object",
  30979. "properties": {
  30980. "id": {
  30981. "type": "string",
  30982. "pattern": "^evt_"
  30983. },
  30984. "metadata": {
  30985. "type": "object"
  30986. },
  30987. "durable": {
  30988. "type": "object",
  30989. "properties": {
  30990. "aggregateID": {
  30991. "type": "string"
  30992. },
  30993. "seq": {
  30994. "type": "integer"
  30995. },
  30996. "version": {
  30997. "type": "integer"
  30998. }
  30999. },
  31000. "required": ["aggregateID", "seq", "version"],
  31001. "additionalProperties": false
  31002. },
  31003. "location": {
  31004. "$ref": "#/components/schemas/LocationRef"
  31005. },
  31006. "type": {
  31007. "type": "string",
  31008. "enum": ["permission.v2.asked"]
  31009. },
  31010. "data": {
  31011. "type": "object",
  31012. "properties": {
  31013. "id": {
  31014. "type": "string",
  31015. "pattern": "^per"
  31016. },
  31017. "sessionID": {
  31018. "type": "string",
  31019. "pattern": "^ses"
  31020. },
  31021. "action": {
  31022. "type": "string"
  31023. },
  31024. "resources": {
  31025. "type": "array",
  31026. "items": {
  31027. "type": "string"
  31028. }
  31029. },
  31030. "save": {
  31031. "type": "array",
  31032. "items": {
  31033. "type": "string"
  31034. }
  31035. },
  31036. "metadata": {
  31037. "type": "object"
  31038. },
  31039. "source": {
  31040. "$ref": "#/components/schemas/PermissionV2Source"
  31041. }
  31042. },
  31043. "required": ["id", "sessionID", "action", "resources"],
  31044. "additionalProperties": false
  31045. }
  31046. },
  31047. "required": ["id", "type", "data"],
  31048. "additionalProperties": false
  31049. },
  31050. "V2EventPermissionV2Replied": {
  31051. "type": "object",
  31052. "properties": {
  31053. "id": {
  31054. "type": "string",
  31055. "pattern": "^evt_"
  31056. },
  31057. "metadata": {
  31058. "type": "object"
  31059. },
  31060. "durable": {
  31061. "type": "object",
  31062. "properties": {
  31063. "aggregateID": {
  31064. "type": "string"
  31065. },
  31066. "seq": {
  31067. "type": "integer"
  31068. },
  31069. "version": {
  31070. "type": "integer"
  31071. }
  31072. },
  31073. "required": ["aggregateID", "seq", "version"],
  31074. "additionalProperties": false
  31075. },
  31076. "location": {
  31077. "$ref": "#/components/schemas/LocationRef"
  31078. },
  31079. "type": {
  31080. "type": "string",
  31081. "enum": ["permission.v2.replied"]
  31082. },
  31083. "data": {
  31084. "type": "object",
  31085. "properties": {
  31086. "sessionID": {
  31087. "type": "string",
  31088. "pattern": "^ses"
  31089. },
  31090. "requestID": {
  31091. "type": "string",
  31092. "pattern": "^per"
  31093. },
  31094. "reply": {
  31095. "$ref": "#/components/schemas/PermissionV2Reply"
  31096. }
  31097. },
  31098. "required": ["sessionID", "requestID", "reply"],
  31099. "additionalProperties": false
  31100. }
  31101. },
  31102. "required": ["id", "type", "data"],
  31103. "additionalProperties": false
  31104. },
  31105. "V2EventPluginAdded": {
  31106. "type": "object",
  31107. "properties": {
  31108. "id": {
  31109. "type": "string",
  31110. "pattern": "^evt_"
  31111. },
  31112. "metadata": {
  31113. "type": "object"
  31114. },
  31115. "durable": {
  31116. "type": "object",
  31117. "properties": {
  31118. "aggregateID": {
  31119. "type": "string"
  31120. },
  31121. "seq": {
  31122. "type": "integer"
  31123. },
  31124. "version": {
  31125. "type": "integer"
  31126. }
  31127. },
  31128. "required": ["aggregateID", "seq", "version"],
  31129. "additionalProperties": false
  31130. },
  31131. "location": {
  31132. "$ref": "#/components/schemas/LocationRef"
  31133. },
  31134. "type": {
  31135. "type": "string",
  31136. "enum": ["plugin.added"]
  31137. },
  31138. "data": {
  31139. "type": "object",
  31140. "properties": {
  31141. "id": {
  31142. "type": "string"
  31143. }
  31144. },
  31145. "required": ["id"],
  31146. "additionalProperties": false
  31147. }
  31148. },
  31149. "required": ["id", "type", "data"],
  31150. "additionalProperties": false
  31151. },
  31152. "V2EventProjectDirectoriesUpdated": {
  31153. "type": "object",
  31154. "properties": {
  31155. "id": {
  31156. "type": "string",
  31157. "pattern": "^evt_"
  31158. },
  31159. "metadata": {
  31160. "type": "object"
  31161. },
  31162. "durable": {
  31163. "type": "object",
  31164. "properties": {
  31165. "aggregateID": {
  31166. "type": "string"
  31167. },
  31168. "seq": {
  31169. "type": "integer"
  31170. },
  31171. "version": {
  31172. "type": "integer"
  31173. }
  31174. },
  31175. "required": ["aggregateID", "seq", "version"],
  31176. "additionalProperties": false
  31177. },
  31178. "location": {
  31179. "$ref": "#/components/schemas/LocationRef"
  31180. },
  31181. "type": {
  31182. "type": "string",
  31183. "enum": ["project.directories.updated"]
  31184. },
  31185. "data": {
  31186. "type": "object",
  31187. "properties": {
  31188. "projectID": {
  31189. "type": "string"
  31190. }
  31191. },
  31192. "required": ["projectID"],
  31193. "additionalProperties": false
  31194. }
  31195. },
  31196. "required": ["id", "type", "data"],
  31197. "additionalProperties": false
  31198. },
  31199. "V2EventFileWatcherUpdated": {
  31200. "type": "object",
  31201. "properties": {
  31202. "id": {
  31203. "type": "string",
  31204. "pattern": "^evt_"
  31205. },
  31206. "metadata": {
  31207. "type": "object"
  31208. },
  31209. "durable": {
  31210. "type": "object",
  31211. "properties": {
  31212. "aggregateID": {
  31213. "type": "string"
  31214. },
  31215. "seq": {
  31216. "type": "integer"
  31217. },
  31218. "version": {
  31219. "type": "integer"
  31220. }
  31221. },
  31222. "required": ["aggregateID", "seq", "version"],
  31223. "additionalProperties": false
  31224. },
  31225. "location": {
  31226. "$ref": "#/components/schemas/LocationRef"
  31227. },
  31228. "type": {
  31229. "type": "string",
  31230. "enum": ["file.watcher.updated"]
  31231. },
  31232. "data": {
  31233. "type": "object",
  31234. "properties": {
  31235. "file": {
  31236. "type": "string"
  31237. },
  31238. "event": {
  31239. "type": "string",
  31240. "enum": ["add", "change", "unlink"]
  31241. }
  31242. },
  31243. "required": ["file", "event"],
  31244. "additionalProperties": false
  31245. }
  31246. },
  31247. "required": ["id", "type", "data"],
  31248. "additionalProperties": false
  31249. },
  31250. "V2EventPtyCreated": {
  31251. "type": "object",
  31252. "properties": {
  31253. "id": {
  31254. "type": "string",
  31255. "pattern": "^evt_"
  31256. },
  31257. "metadata": {
  31258. "type": "object"
  31259. },
  31260. "durable": {
  31261. "type": "object",
  31262. "properties": {
  31263. "aggregateID": {
  31264. "type": "string"
  31265. },
  31266. "seq": {
  31267. "type": "integer"
  31268. },
  31269. "version": {
  31270. "type": "integer"
  31271. }
  31272. },
  31273. "required": ["aggregateID", "seq", "version"],
  31274. "additionalProperties": false
  31275. },
  31276. "location": {
  31277. "$ref": "#/components/schemas/LocationRef"
  31278. },
  31279. "type": {
  31280. "type": "string",
  31281. "enum": ["pty.created"]
  31282. },
  31283. "data": {
  31284. "type": "object",
  31285. "properties": {
  31286. "info": {
  31287. "$ref": "#/components/schemas/Pty"
  31288. }
  31289. },
  31290. "required": ["info"],
  31291. "additionalProperties": false
  31292. }
  31293. },
  31294. "required": ["id", "type", "data"],
  31295. "additionalProperties": false
  31296. },
  31297. "V2EventPtyUpdated": {
  31298. "type": "object",
  31299. "properties": {
  31300. "id": {
  31301. "type": "string",
  31302. "pattern": "^evt_"
  31303. },
  31304. "metadata": {
  31305. "type": "object"
  31306. },
  31307. "durable": {
  31308. "type": "object",
  31309. "properties": {
  31310. "aggregateID": {
  31311. "type": "string"
  31312. },
  31313. "seq": {
  31314. "type": "integer"
  31315. },
  31316. "version": {
  31317. "type": "integer"
  31318. }
  31319. },
  31320. "required": ["aggregateID", "seq", "version"],
  31321. "additionalProperties": false
  31322. },
  31323. "location": {
  31324. "$ref": "#/components/schemas/LocationRef"
  31325. },
  31326. "type": {
  31327. "type": "string",
  31328. "enum": ["pty.updated"]
  31329. },
  31330. "data": {
  31331. "type": "object",
  31332. "properties": {
  31333. "info": {
  31334. "$ref": "#/components/schemas/Pty"
  31335. }
  31336. },
  31337. "required": ["info"],
  31338. "additionalProperties": false
  31339. }
  31340. },
  31341. "required": ["id", "type", "data"],
  31342. "additionalProperties": false
  31343. },
  31344. "V2EventPtyExited": {
  31345. "type": "object",
  31346. "properties": {
  31347. "id": {
  31348. "type": "string",
  31349. "pattern": "^evt_"
  31350. },
  31351. "metadata": {
  31352. "type": "object"
  31353. },
  31354. "durable": {
  31355. "type": "object",
  31356. "properties": {
  31357. "aggregateID": {
  31358. "type": "string"
  31359. },
  31360. "seq": {
  31361. "type": "integer"
  31362. },
  31363. "version": {
  31364. "type": "integer"
  31365. }
  31366. },
  31367. "required": ["aggregateID", "seq", "version"],
  31368. "additionalProperties": false
  31369. },
  31370. "location": {
  31371. "$ref": "#/components/schemas/LocationRef"
  31372. },
  31373. "type": {
  31374. "type": "string",
  31375. "enum": ["pty.exited"]
  31376. },
  31377. "data": {
  31378. "type": "object",
  31379. "properties": {
  31380. "id": {
  31381. "type": "string",
  31382. "pattern": "^pty"
  31383. },
  31384. "exitCode": {
  31385. "type": "integer",
  31386. "minimum": 0
  31387. }
  31388. },
  31389. "required": ["id", "exitCode"],
  31390. "additionalProperties": false
  31391. }
  31392. },
  31393. "required": ["id", "type", "data"],
  31394. "additionalProperties": false
  31395. },
  31396. "V2EventPtyDeleted": {
  31397. "type": "object",
  31398. "properties": {
  31399. "id": {
  31400. "type": "string",
  31401. "pattern": "^evt_"
  31402. },
  31403. "metadata": {
  31404. "type": "object"
  31405. },
  31406. "durable": {
  31407. "type": "object",
  31408. "properties": {
  31409. "aggregateID": {
  31410. "type": "string"
  31411. },
  31412. "seq": {
  31413. "type": "integer"
  31414. },
  31415. "version": {
  31416. "type": "integer"
  31417. }
  31418. },
  31419. "required": ["aggregateID", "seq", "version"],
  31420. "additionalProperties": false
  31421. },
  31422. "location": {
  31423. "$ref": "#/components/schemas/LocationRef"
  31424. },
  31425. "type": {
  31426. "type": "string",
  31427. "enum": ["pty.deleted"]
  31428. },
  31429. "data": {
  31430. "type": "object",
  31431. "properties": {
  31432. "id": {
  31433. "type": "string",
  31434. "pattern": "^pty"
  31435. }
  31436. },
  31437. "required": ["id"],
  31438. "additionalProperties": false
  31439. }
  31440. },
  31441. "required": ["id", "type", "data"],
  31442. "additionalProperties": false
  31443. },
  31444. "V2EventQuestionV2Asked": {
  31445. "type": "object",
  31446. "properties": {
  31447. "id": {
  31448. "type": "string",
  31449. "pattern": "^evt_"
  31450. },
  31451. "metadata": {
  31452. "type": "object"
  31453. },
  31454. "durable": {
  31455. "type": "object",
  31456. "properties": {
  31457. "aggregateID": {
  31458. "type": "string"
  31459. },
  31460. "seq": {
  31461. "type": "integer"
  31462. },
  31463. "version": {
  31464. "type": "integer"
  31465. }
  31466. },
  31467. "required": ["aggregateID", "seq", "version"],
  31468. "additionalProperties": false
  31469. },
  31470. "location": {
  31471. "$ref": "#/components/schemas/LocationRef"
  31472. },
  31473. "type": {
  31474. "type": "string",
  31475. "enum": ["question.v2.asked"]
  31476. },
  31477. "data": {
  31478. "type": "object",
  31479. "properties": {
  31480. "id": {
  31481. "type": "string",
  31482. "pattern": "^que"
  31483. },
  31484. "sessionID": {
  31485. "type": "string",
  31486. "pattern": "^ses"
  31487. },
  31488. "questions": {
  31489. "type": "array",
  31490. "items": {
  31491. "$ref": "#/components/schemas/QuestionV2Info"
  31492. },
  31493. "description": "Questions to ask"
  31494. },
  31495. "tool": {
  31496. "$ref": "#/components/schemas/QuestionV2Tool"
  31497. }
  31498. },
  31499. "required": ["id", "sessionID", "questions"],
  31500. "additionalProperties": false
  31501. }
  31502. },
  31503. "required": ["id", "type", "data"],
  31504. "additionalProperties": false
  31505. },
  31506. "V2EventQuestionV2Replied": {
  31507. "type": "object",
  31508. "properties": {
  31509. "id": {
  31510. "type": "string",
  31511. "pattern": "^evt_"
  31512. },
  31513. "metadata": {
  31514. "type": "object"
  31515. },
  31516. "durable": {
  31517. "type": "object",
  31518. "properties": {
  31519. "aggregateID": {
  31520. "type": "string"
  31521. },
  31522. "seq": {
  31523. "type": "integer"
  31524. },
  31525. "version": {
  31526. "type": "integer"
  31527. }
  31528. },
  31529. "required": ["aggregateID", "seq", "version"],
  31530. "additionalProperties": false
  31531. },
  31532. "location": {
  31533. "$ref": "#/components/schemas/LocationRef"
  31534. },
  31535. "type": {
  31536. "type": "string",
  31537. "enum": ["question.v2.replied"]
  31538. },
  31539. "data": {
  31540. "type": "object",
  31541. "properties": {
  31542. "sessionID": {
  31543. "type": "string",
  31544. "pattern": "^ses"
  31545. },
  31546. "requestID": {
  31547. "type": "string",
  31548. "pattern": "^que"
  31549. },
  31550. "answers": {
  31551. "type": "array",
  31552. "items": {
  31553. "$ref": "#/components/schemas/QuestionV2Answer"
  31554. }
  31555. }
  31556. },
  31557. "required": ["sessionID", "requestID", "answers"],
  31558. "additionalProperties": false
  31559. }
  31560. },
  31561. "required": ["id", "type", "data"],
  31562. "additionalProperties": false
  31563. },
  31564. "V2EventQuestionV2Rejected": {
  31565. "type": "object",
  31566. "properties": {
  31567. "id": {
  31568. "type": "string",
  31569. "pattern": "^evt_"
  31570. },
  31571. "metadata": {
  31572. "type": "object"
  31573. },
  31574. "durable": {
  31575. "type": "object",
  31576. "properties": {
  31577. "aggregateID": {
  31578. "type": "string"
  31579. },
  31580. "seq": {
  31581. "type": "integer"
  31582. },
  31583. "version": {
  31584. "type": "integer"
  31585. }
  31586. },
  31587. "required": ["aggregateID", "seq", "version"],
  31588. "additionalProperties": false
  31589. },
  31590. "location": {
  31591. "$ref": "#/components/schemas/LocationRef"
  31592. },
  31593. "type": {
  31594. "type": "string",
  31595. "enum": ["question.v2.rejected"]
  31596. },
  31597. "data": {
  31598. "type": "object",
  31599. "properties": {
  31600. "sessionID": {
  31601. "type": "string",
  31602. "pattern": "^ses"
  31603. },
  31604. "requestID": {
  31605. "type": "string",
  31606. "pattern": "^que"
  31607. }
  31608. },
  31609. "required": ["sessionID", "requestID"],
  31610. "additionalProperties": false
  31611. }
  31612. },
  31613. "required": ["id", "type", "data"],
  31614. "additionalProperties": false
  31615. },
  31616. "V2EventTodoUpdated": {
  31617. "type": "object",
  31618. "properties": {
  31619. "id": {
  31620. "type": "string",
  31621. "pattern": "^evt_"
  31622. },
  31623. "metadata": {
  31624. "type": "object"
  31625. },
  31626. "durable": {
  31627. "type": "object",
  31628. "properties": {
  31629. "aggregateID": {
  31630. "type": "string"
  31631. },
  31632. "seq": {
  31633. "type": "integer"
  31634. },
  31635. "version": {
  31636. "type": "integer"
  31637. }
  31638. },
  31639. "required": ["aggregateID", "seq", "version"],
  31640. "additionalProperties": false
  31641. },
  31642. "location": {
  31643. "$ref": "#/components/schemas/LocationRef"
  31644. },
  31645. "type": {
  31646. "type": "string",
  31647. "enum": ["todo.updated"]
  31648. },
  31649. "data": {
  31650. "type": "object",
  31651. "properties": {
  31652. "sessionID": {
  31653. "type": "string",
  31654. "pattern": "^ses"
  31655. },
  31656. "todos": {
  31657. "type": "array",
  31658. "items": {
  31659. "$ref": "#/components/schemas/Todo"
  31660. }
  31661. }
  31662. },
  31663. "required": ["sessionID", "todos"],
  31664. "additionalProperties": false
  31665. }
  31666. },
  31667. "required": ["id", "type", "data"],
  31668. "additionalProperties": false
  31669. },
  31670. "V2EventLspUpdated": {
  31671. "type": "object",
  31672. "properties": {
  31673. "id": {
  31674. "type": "string",
  31675. "pattern": "^evt_"
  31676. },
  31677. "metadata": {
  31678. "type": "object"
  31679. },
  31680. "durable": {
  31681. "type": "object",
  31682. "properties": {
  31683. "aggregateID": {
  31684. "type": "string"
  31685. },
  31686. "seq": {
  31687. "type": "integer"
  31688. },
  31689. "version": {
  31690. "type": "integer"
  31691. }
  31692. },
  31693. "required": ["aggregateID", "seq", "version"],
  31694. "additionalProperties": false
  31695. },
  31696. "location": {
  31697. "$ref": "#/components/schemas/LocationRef"
  31698. },
  31699. "type": {
  31700. "type": "string",
  31701. "enum": ["lsp.updated"]
  31702. },
  31703. "data": {
  31704. "type": "object",
  31705. "properties": {}
  31706. }
  31707. },
  31708. "required": ["id", "type", "data"],
  31709. "additionalProperties": false
  31710. },
  31711. "V2EventPermissionAsked": {
  31712. "type": "object",
  31713. "properties": {
  31714. "id": {
  31715. "type": "string",
  31716. "pattern": "^evt_"
  31717. },
  31718. "metadata": {
  31719. "type": "object"
  31720. },
  31721. "durable": {
  31722. "type": "object",
  31723. "properties": {
  31724. "aggregateID": {
  31725. "type": "string"
  31726. },
  31727. "seq": {
  31728. "type": "integer"
  31729. },
  31730. "version": {
  31731. "type": "integer"
  31732. }
  31733. },
  31734. "required": ["aggregateID", "seq", "version"],
  31735. "additionalProperties": false
  31736. },
  31737. "location": {
  31738. "$ref": "#/components/schemas/LocationRef"
  31739. },
  31740. "type": {
  31741. "type": "string",
  31742. "enum": ["permission.asked"]
  31743. },
  31744. "data": {
  31745. "type": "object",
  31746. "properties": {
  31747. "id": {
  31748. "type": "string",
  31749. "pattern": "^per"
  31750. },
  31751. "sessionID": {
  31752. "type": "string",
  31753. "pattern": "^ses"
  31754. },
  31755. "permission": {
  31756. "type": "string"
  31757. },
  31758. "patterns": {
  31759. "type": "array",
  31760. "items": {
  31761. "type": "string"
  31762. }
  31763. },
  31764. "metadata": {
  31765. "type": "object"
  31766. },
  31767. "always": {
  31768. "type": "array",
  31769. "items": {
  31770. "type": "string"
  31771. }
  31772. },
  31773. "tool": {
  31774. "type": "object",
  31775. "properties": {
  31776. "messageID": {
  31777. "type": "string"
  31778. },
  31779. "callID": {
  31780. "type": "string"
  31781. }
  31782. },
  31783. "required": ["messageID", "callID"],
  31784. "additionalProperties": false
  31785. }
  31786. },
  31787. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  31788. "additionalProperties": false
  31789. }
  31790. },
  31791. "required": ["id", "type", "data"],
  31792. "additionalProperties": false
  31793. },
  31794. "V2EventPermissionReplied": {
  31795. "type": "object",
  31796. "properties": {
  31797. "id": {
  31798. "type": "string",
  31799. "pattern": "^evt_"
  31800. },
  31801. "metadata": {
  31802. "type": "object"
  31803. },
  31804. "durable": {
  31805. "type": "object",
  31806. "properties": {
  31807. "aggregateID": {
  31808. "type": "string"
  31809. },
  31810. "seq": {
  31811. "type": "integer"
  31812. },
  31813. "version": {
  31814. "type": "integer"
  31815. }
  31816. },
  31817. "required": ["aggregateID", "seq", "version"],
  31818. "additionalProperties": false
  31819. },
  31820. "location": {
  31821. "$ref": "#/components/schemas/LocationRef"
  31822. },
  31823. "type": {
  31824. "type": "string",
  31825. "enum": ["permission.replied"]
  31826. },
  31827. "data": {
  31828. "type": "object",
  31829. "properties": {
  31830. "sessionID": {
  31831. "type": "string",
  31832. "pattern": "^ses"
  31833. },
  31834. "requestID": {
  31835. "type": "string",
  31836. "pattern": "^per"
  31837. },
  31838. "reply": {
  31839. "type": "string",
  31840. "enum": ["once", "always", "reject"]
  31841. }
  31842. },
  31843. "required": ["sessionID", "requestID", "reply"],
  31844. "additionalProperties": false
  31845. }
  31846. },
  31847. "required": ["id", "type", "data"],
  31848. "additionalProperties": false
  31849. },
  31850. "V2EventTuiPromptAppend": {
  31851. "type": "object",
  31852. "properties": {
  31853. "id": {
  31854. "type": "string",
  31855. "pattern": "^evt_"
  31856. },
  31857. "metadata": {
  31858. "type": "object"
  31859. },
  31860. "durable": {
  31861. "type": "object",
  31862. "properties": {
  31863. "aggregateID": {
  31864. "type": "string"
  31865. },
  31866. "seq": {
  31867. "type": "integer"
  31868. },
  31869. "version": {
  31870. "type": "integer"
  31871. }
  31872. },
  31873. "required": ["aggregateID", "seq", "version"],
  31874. "additionalProperties": false
  31875. },
  31876. "location": {
  31877. "$ref": "#/components/schemas/LocationRef"
  31878. },
  31879. "type": {
  31880. "type": "string",
  31881. "enum": ["tui.prompt.append"]
  31882. },
  31883. "data": {
  31884. "type": "object",
  31885. "properties": {
  31886. "text": {
  31887. "type": "string"
  31888. }
  31889. },
  31890. "required": ["text"],
  31891. "additionalProperties": false
  31892. }
  31893. },
  31894. "required": ["id", "type", "data"],
  31895. "additionalProperties": false
  31896. },
  31897. "V2EventTuiCommandExecute": {
  31898. "type": "object",
  31899. "properties": {
  31900. "id": {
  31901. "type": "string",
  31902. "pattern": "^evt_"
  31903. },
  31904. "metadata": {
  31905. "type": "object"
  31906. },
  31907. "durable": {
  31908. "type": "object",
  31909. "properties": {
  31910. "aggregateID": {
  31911. "type": "string"
  31912. },
  31913. "seq": {
  31914. "type": "integer"
  31915. },
  31916. "version": {
  31917. "type": "integer"
  31918. }
  31919. },
  31920. "required": ["aggregateID", "seq", "version"],
  31921. "additionalProperties": false
  31922. },
  31923. "location": {
  31924. "$ref": "#/components/schemas/LocationRef"
  31925. },
  31926. "type": {
  31927. "type": "string",
  31928. "enum": ["tui.command.execute"]
  31929. },
  31930. "data": {
  31931. "type": "object",
  31932. "properties": {
  31933. "command": {
  31934. "anyOf": [
  31935. {
  31936. "type": "string",
  31937. "enum": [
  31938. "session.list",
  31939. "session.new",
  31940. "session.share",
  31941. "session.interrupt",
  31942. "session.compact",
  31943. "session.page.up",
  31944. "session.page.down",
  31945. "session.line.up",
  31946. "session.line.down",
  31947. "session.half.page.up",
  31948. "session.half.page.down",
  31949. "session.first",
  31950. "session.last",
  31951. "prompt.clear",
  31952. "prompt.submit",
  31953. "agent.cycle"
  31954. ]
  31955. },
  31956. {
  31957. "type": "string"
  31958. }
  31959. ]
  31960. }
  31961. },
  31962. "required": ["command"],
  31963. "additionalProperties": false
  31964. }
  31965. },
  31966. "required": ["id", "type", "data"],
  31967. "additionalProperties": false
  31968. },
  31969. "V2EventTuiToastShow": {
  31970. "type": "object",
  31971. "properties": {
  31972. "id": {
  31973. "type": "string",
  31974. "pattern": "^evt_"
  31975. },
  31976. "metadata": {
  31977. "type": "object"
  31978. },
  31979. "durable": {
  31980. "type": "object",
  31981. "properties": {
  31982. "aggregateID": {
  31983. "type": "string"
  31984. },
  31985. "seq": {
  31986. "type": "integer"
  31987. },
  31988. "version": {
  31989. "type": "integer"
  31990. }
  31991. },
  31992. "required": ["aggregateID", "seq", "version"],
  31993. "additionalProperties": false
  31994. },
  31995. "location": {
  31996. "$ref": "#/components/schemas/LocationRef"
  31997. },
  31998. "type": {
  31999. "type": "string",
  32000. "enum": ["tui.toast.show"]
  32001. },
  32002. "data": {
  32003. "type": "object",
  32004. "properties": {
  32005. "title": {
  32006. "type": "string"
  32007. },
  32008. "message": {
  32009. "type": "string"
  32010. },
  32011. "variant": {
  32012. "type": "string",
  32013. "enum": ["info", "success", "warning", "error"]
  32014. },
  32015. "duration": {
  32016. "type": "integer",
  32017. "exclusiveMinimum": 0
  32018. }
  32019. },
  32020. "required": ["message", "variant"],
  32021. "additionalProperties": false
  32022. }
  32023. },
  32024. "required": ["id", "type", "data"],
  32025. "additionalProperties": false
  32026. },
  32027. "V2EventTuiSessionSelect": {
  32028. "type": "object",
  32029. "properties": {
  32030. "id": {
  32031. "type": "string",
  32032. "pattern": "^evt_"
  32033. },
  32034. "metadata": {
  32035. "type": "object"
  32036. },
  32037. "durable": {
  32038. "type": "object",
  32039. "properties": {
  32040. "aggregateID": {
  32041. "type": "string"
  32042. },
  32043. "seq": {
  32044. "type": "integer"
  32045. },
  32046. "version": {
  32047. "type": "integer"
  32048. }
  32049. },
  32050. "required": ["aggregateID", "seq", "version"],
  32051. "additionalProperties": false
  32052. },
  32053. "location": {
  32054. "$ref": "#/components/schemas/LocationRef"
  32055. },
  32056. "type": {
  32057. "type": "string",
  32058. "enum": ["tui.session.select"]
  32059. },
  32060. "data": {
  32061. "type": "object",
  32062. "properties": {
  32063. "sessionID": {
  32064. "type": "string",
  32065. "pattern": "^ses",
  32066. "description": "Session ID to navigate to"
  32067. }
  32068. },
  32069. "required": ["sessionID"],
  32070. "additionalProperties": false
  32071. }
  32072. },
  32073. "required": ["id", "type", "data"],
  32074. "additionalProperties": false
  32075. },
  32076. "V2EventMcpToolsChanged": {
  32077. "type": "object",
  32078. "properties": {
  32079. "id": {
  32080. "type": "string",
  32081. "pattern": "^evt_"
  32082. },
  32083. "metadata": {
  32084. "type": "object"
  32085. },
  32086. "durable": {
  32087. "type": "object",
  32088. "properties": {
  32089. "aggregateID": {
  32090. "type": "string"
  32091. },
  32092. "seq": {
  32093. "type": "integer"
  32094. },
  32095. "version": {
  32096. "type": "integer"
  32097. }
  32098. },
  32099. "required": ["aggregateID", "seq", "version"],
  32100. "additionalProperties": false
  32101. },
  32102. "location": {
  32103. "$ref": "#/components/schemas/LocationRef"
  32104. },
  32105. "type": {
  32106. "type": "string",
  32107. "enum": ["mcp.tools.changed"]
  32108. },
  32109. "data": {
  32110. "type": "object",
  32111. "properties": {
  32112. "server": {
  32113. "type": "string"
  32114. }
  32115. },
  32116. "required": ["server"],
  32117. "additionalProperties": false
  32118. }
  32119. },
  32120. "required": ["id", "type", "data"],
  32121. "additionalProperties": false
  32122. },
  32123. "V2EventMcpBrowserOpenFailed": {
  32124. "type": "object",
  32125. "properties": {
  32126. "id": {
  32127. "type": "string",
  32128. "pattern": "^evt_"
  32129. },
  32130. "metadata": {
  32131. "type": "object"
  32132. },
  32133. "durable": {
  32134. "type": "object",
  32135. "properties": {
  32136. "aggregateID": {
  32137. "type": "string"
  32138. },
  32139. "seq": {
  32140. "type": "integer"
  32141. },
  32142. "version": {
  32143. "type": "integer"
  32144. }
  32145. },
  32146. "required": ["aggregateID", "seq", "version"],
  32147. "additionalProperties": false
  32148. },
  32149. "location": {
  32150. "$ref": "#/components/schemas/LocationRef"
  32151. },
  32152. "type": {
  32153. "type": "string",
  32154. "enum": ["mcp.browser.open.failed"]
  32155. },
  32156. "data": {
  32157. "type": "object",
  32158. "properties": {
  32159. "mcpName": {
  32160. "type": "string"
  32161. },
  32162. "url": {
  32163. "type": "string"
  32164. }
  32165. },
  32166. "required": ["mcpName", "url"],
  32167. "additionalProperties": false
  32168. }
  32169. },
  32170. "required": ["id", "type", "data"],
  32171. "additionalProperties": false
  32172. },
  32173. "V2EventCommandExecuted": {
  32174. "type": "object",
  32175. "properties": {
  32176. "id": {
  32177. "type": "string",
  32178. "pattern": "^evt_"
  32179. },
  32180. "metadata": {
  32181. "type": "object"
  32182. },
  32183. "durable": {
  32184. "type": "object",
  32185. "properties": {
  32186. "aggregateID": {
  32187. "type": "string"
  32188. },
  32189. "seq": {
  32190. "type": "integer"
  32191. },
  32192. "version": {
  32193. "type": "integer"
  32194. }
  32195. },
  32196. "required": ["aggregateID", "seq", "version"],
  32197. "additionalProperties": false
  32198. },
  32199. "location": {
  32200. "$ref": "#/components/schemas/LocationRef"
  32201. },
  32202. "type": {
  32203. "type": "string",
  32204. "enum": ["command.executed"]
  32205. },
  32206. "data": {
  32207. "type": "object",
  32208. "properties": {
  32209. "name": {
  32210. "type": "string"
  32211. },
  32212. "sessionID": {
  32213. "type": "string",
  32214. "pattern": "^ses"
  32215. },
  32216. "arguments": {
  32217. "type": "string"
  32218. },
  32219. "messageID": {
  32220. "type": "string",
  32221. "pattern": "^msg"
  32222. }
  32223. },
  32224. "required": ["name", "sessionID", "arguments", "messageID"],
  32225. "additionalProperties": false
  32226. }
  32227. },
  32228. "required": ["id", "type", "data"],
  32229. "additionalProperties": false
  32230. },
  32231. "V2EventProjectUpdated": {
  32232. "type": "object",
  32233. "properties": {
  32234. "id": {
  32235. "type": "string",
  32236. "pattern": "^evt_"
  32237. },
  32238. "metadata": {
  32239. "type": "object"
  32240. },
  32241. "durable": {
  32242. "type": "object",
  32243. "properties": {
  32244. "aggregateID": {
  32245. "type": "string"
  32246. },
  32247. "seq": {
  32248. "type": "integer"
  32249. },
  32250. "version": {
  32251. "type": "integer"
  32252. }
  32253. },
  32254. "required": ["aggregateID", "seq", "version"],
  32255. "additionalProperties": false
  32256. },
  32257. "location": {
  32258. "$ref": "#/components/schemas/LocationRef"
  32259. },
  32260. "type": {
  32261. "type": "string",
  32262. "enum": ["project.updated"]
  32263. },
  32264. "data": {
  32265. "type": "object",
  32266. "properties": {
  32267. "id": {
  32268. "type": "string"
  32269. },
  32270. "worktree": {
  32271. "type": "string"
  32272. },
  32273. "vcs": {
  32274. "$ref": "#/components/schemas/ProjectVcs"
  32275. },
  32276. "name": {
  32277. "type": "string"
  32278. },
  32279. "icon": {
  32280. "$ref": "#/components/schemas/ProjectIcon"
  32281. },
  32282. "commands": {
  32283. "$ref": "#/components/schemas/ProjectCommands"
  32284. },
  32285. "time": {
  32286. "$ref": "#/components/schemas/ProjectTime"
  32287. },
  32288. "sandboxes": {
  32289. "type": "array",
  32290. "items": {
  32291. "type": "string"
  32292. }
  32293. }
  32294. },
  32295. "required": ["id", "worktree", "time", "sandboxes"],
  32296. "additionalProperties": false
  32297. }
  32298. },
  32299. "required": ["id", "type", "data"],
  32300. "additionalProperties": false
  32301. },
  32302. "V2EventSessionStatus": {
  32303. "type": "object",
  32304. "properties": {
  32305. "id": {
  32306. "type": "string",
  32307. "pattern": "^evt_"
  32308. },
  32309. "metadata": {
  32310. "type": "object"
  32311. },
  32312. "durable": {
  32313. "type": "object",
  32314. "properties": {
  32315. "aggregateID": {
  32316. "type": "string"
  32317. },
  32318. "seq": {
  32319. "type": "integer"
  32320. },
  32321. "version": {
  32322. "type": "integer"
  32323. }
  32324. },
  32325. "required": ["aggregateID", "seq", "version"],
  32326. "additionalProperties": false
  32327. },
  32328. "location": {
  32329. "$ref": "#/components/schemas/LocationRef"
  32330. },
  32331. "type": {
  32332. "type": "string",
  32333. "enum": ["session.status"]
  32334. },
  32335. "data": {
  32336. "type": "object",
  32337. "properties": {
  32338. "sessionID": {
  32339. "type": "string",
  32340. "pattern": "^ses"
  32341. },
  32342. "status": {
  32343. "$ref": "#/components/schemas/SessionStatus"
  32344. }
  32345. },
  32346. "required": ["sessionID", "status"],
  32347. "additionalProperties": false
  32348. }
  32349. },
  32350. "required": ["id", "type", "data"],
  32351. "additionalProperties": false
  32352. },
  32353. "V2EventSessionIdle": {
  32354. "type": "object",
  32355. "properties": {
  32356. "id": {
  32357. "type": "string",
  32358. "pattern": "^evt_"
  32359. },
  32360. "metadata": {
  32361. "type": "object"
  32362. },
  32363. "durable": {
  32364. "type": "object",
  32365. "properties": {
  32366. "aggregateID": {
  32367. "type": "string"
  32368. },
  32369. "seq": {
  32370. "type": "integer"
  32371. },
  32372. "version": {
  32373. "type": "integer"
  32374. }
  32375. },
  32376. "required": ["aggregateID", "seq", "version"],
  32377. "additionalProperties": false
  32378. },
  32379. "location": {
  32380. "$ref": "#/components/schemas/LocationRef"
  32381. },
  32382. "type": {
  32383. "type": "string",
  32384. "enum": ["session.idle"]
  32385. },
  32386. "data": {
  32387. "type": "object",
  32388. "properties": {
  32389. "sessionID": {
  32390. "type": "string",
  32391. "pattern": "^ses"
  32392. }
  32393. },
  32394. "required": ["sessionID"],
  32395. "additionalProperties": false
  32396. }
  32397. },
  32398. "required": ["id", "type", "data"],
  32399. "additionalProperties": false
  32400. },
  32401. "V2EventQuestionAsked": {
  32402. "type": "object",
  32403. "properties": {
  32404. "id": {
  32405. "type": "string",
  32406. "pattern": "^evt_"
  32407. },
  32408. "metadata": {
  32409. "type": "object"
  32410. },
  32411. "durable": {
  32412. "type": "object",
  32413. "properties": {
  32414. "aggregateID": {
  32415. "type": "string"
  32416. },
  32417. "seq": {
  32418. "type": "integer"
  32419. },
  32420. "version": {
  32421. "type": "integer"
  32422. }
  32423. },
  32424. "required": ["aggregateID", "seq", "version"],
  32425. "additionalProperties": false
  32426. },
  32427. "location": {
  32428. "$ref": "#/components/schemas/LocationRef"
  32429. },
  32430. "type": {
  32431. "type": "string",
  32432. "enum": ["question.asked"]
  32433. },
  32434. "data": {
  32435. "type": "object",
  32436. "properties": {
  32437. "id": {
  32438. "type": "string",
  32439. "pattern": "^que"
  32440. },
  32441. "sessionID": {
  32442. "type": "string",
  32443. "pattern": "^ses"
  32444. },
  32445. "questions": {
  32446. "type": "array",
  32447. "items": {
  32448. "$ref": "#/components/schemas/QuestionInfo"
  32449. },
  32450. "description": "Questions to ask"
  32451. },
  32452. "tool": {
  32453. "$ref": "#/components/schemas/QuestionTool"
  32454. }
  32455. },
  32456. "required": ["id", "sessionID", "questions"],
  32457. "additionalProperties": false
  32458. }
  32459. },
  32460. "required": ["id", "type", "data"],
  32461. "additionalProperties": false
  32462. },
  32463. "V2EventQuestionReplied": {
  32464. "type": "object",
  32465. "properties": {
  32466. "id": {
  32467. "type": "string",
  32468. "pattern": "^evt_"
  32469. },
  32470. "metadata": {
  32471. "type": "object"
  32472. },
  32473. "durable": {
  32474. "type": "object",
  32475. "properties": {
  32476. "aggregateID": {
  32477. "type": "string"
  32478. },
  32479. "seq": {
  32480. "type": "integer"
  32481. },
  32482. "version": {
  32483. "type": "integer"
  32484. }
  32485. },
  32486. "required": ["aggregateID", "seq", "version"],
  32487. "additionalProperties": false
  32488. },
  32489. "location": {
  32490. "$ref": "#/components/schemas/LocationRef"
  32491. },
  32492. "type": {
  32493. "type": "string",
  32494. "enum": ["question.replied"]
  32495. },
  32496. "data": {
  32497. "type": "object",
  32498. "properties": {
  32499. "sessionID": {
  32500. "type": "string",
  32501. "pattern": "^ses"
  32502. },
  32503. "requestID": {
  32504. "type": "string",
  32505. "pattern": "^que"
  32506. },
  32507. "answers": {
  32508. "type": "array",
  32509. "items": {
  32510. "$ref": "#/components/schemas/QuestionAnswer"
  32511. }
  32512. }
  32513. },
  32514. "required": ["sessionID", "requestID", "answers"],
  32515. "additionalProperties": false
  32516. }
  32517. },
  32518. "required": ["id", "type", "data"],
  32519. "additionalProperties": false
  32520. },
  32521. "V2EventQuestionRejected": {
  32522. "type": "object",
  32523. "properties": {
  32524. "id": {
  32525. "type": "string",
  32526. "pattern": "^evt_"
  32527. },
  32528. "metadata": {
  32529. "type": "object"
  32530. },
  32531. "durable": {
  32532. "type": "object",
  32533. "properties": {
  32534. "aggregateID": {
  32535. "type": "string"
  32536. },
  32537. "seq": {
  32538. "type": "integer"
  32539. },
  32540. "version": {
  32541. "type": "integer"
  32542. }
  32543. },
  32544. "required": ["aggregateID", "seq", "version"],
  32545. "additionalProperties": false
  32546. },
  32547. "location": {
  32548. "$ref": "#/components/schemas/LocationRef"
  32549. },
  32550. "type": {
  32551. "type": "string",
  32552. "enum": ["question.rejected"]
  32553. },
  32554. "data": {
  32555. "type": "object",
  32556. "properties": {
  32557. "sessionID": {
  32558. "type": "string",
  32559. "pattern": "^ses"
  32560. },
  32561. "requestID": {
  32562. "type": "string",
  32563. "pattern": "^que"
  32564. }
  32565. },
  32566. "required": ["sessionID", "requestID"],
  32567. "additionalProperties": false
  32568. }
  32569. },
  32570. "required": ["id", "type", "data"],
  32571. "additionalProperties": false
  32572. },
  32573. "V2EventSessionCompacted": {
  32574. "type": "object",
  32575. "properties": {
  32576. "id": {
  32577. "type": "string",
  32578. "pattern": "^evt_"
  32579. },
  32580. "metadata": {
  32581. "type": "object"
  32582. },
  32583. "durable": {
  32584. "type": "object",
  32585. "properties": {
  32586. "aggregateID": {
  32587. "type": "string"
  32588. },
  32589. "seq": {
  32590. "type": "integer"
  32591. },
  32592. "version": {
  32593. "type": "integer"
  32594. }
  32595. },
  32596. "required": ["aggregateID", "seq", "version"],
  32597. "additionalProperties": false
  32598. },
  32599. "location": {
  32600. "$ref": "#/components/schemas/LocationRef"
  32601. },
  32602. "type": {
  32603. "type": "string",
  32604. "enum": ["session.compacted"]
  32605. },
  32606. "data": {
  32607. "type": "object",
  32608. "properties": {
  32609. "sessionID": {
  32610. "type": "string",
  32611. "pattern": "^ses"
  32612. }
  32613. },
  32614. "required": ["sessionID"],
  32615. "additionalProperties": false
  32616. }
  32617. },
  32618. "required": ["id", "type", "data"],
  32619. "additionalProperties": false
  32620. },
  32621. "V2EventVcsBranchUpdated": {
  32622. "type": "object",
  32623. "properties": {
  32624. "id": {
  32625. "type": "string",
  32626. "pattern": "^evt_"
  32627. },
  32628. "metadata": {
  32629. "type": "object"
  32630. },
  32631. "durable": {
  32632. "type": "object",
  32633. "properties": {
  32634. "aggregateID": {
  32635. "type": "string"
  32636. },
  32637. "seq": {
  32638. "type": "integer"
  32639. },
  32640. "version": {
  32641. "type": "integer"
  32642. }
  32643. },
  32644. "required": ["aggregateID", "seq", "version"],
  32645. "additionalProperties": false
  32646. },
  32647. "location": {
  32648. "$ref": "#/components/schemas/LocationRef"
  32649. },
  32650. "type": {
  32651. "type": "string",
  32652. "enum": ["vcs.branch.updated"]
  32653. },
  32654. "data": {
  32655. "type": "object",
  32656. "properties": {
  32657. "branch": {
  32658. "type": "string"
  32659. }
  32660. },
  32661. "additionalProperties": false
  32662. }
  32663. },
  32664. "required": ["id", "type", "data"],
  32665. "additionalProperties": false
  32666. },
  32667. "V2EventWorkspaceReady": {
  32668. "type": "object",
  32669. "properties": {
  32670. "id": {
  32671. "type": "string",
  32672. "pattern": "^evt_"
  32673. },
  32674. "metadata": {
  32675. "type": "object"
  32676. },
  32677. "durable": {
  32678. "type": "object",
  32679. "properties": {
  32680. "aggregateID": {
  32681. "type": "string"
  32682. },
  32683. "seq": {
  32684. "type": "integer"
  32685. },
  32686. "version": {
  32687. "type": "integer"
  32688. }
  32689. },
  32690. "required": ["aggregateID", "seq", "version"],
  32691. "additionalProperties": false
  32692. },
  32693. "location": {
  32694. "$ref": "#/components/schemas/LocationRef"
  32695. },
  32696. "type": {
  32697. "type": "string",
  32698. "enum": ["workspace.ready"]
  32699. },
  32700. "data": {
  32701. "type": "object",
  32702. "properties": {
  32703. "name": {
  32704. "type": "string"
  32705. }
  32706. },
  32707. "required": ["name"],
  32708. "additionalProperties": false
  32709. }
  32710. },
  32711. "required": ["id", "type", "data"],
  32712. "additionalProperties": false
  32713. },
  32714. "V2EventWorkspaceFailed": {
  32715. "type": "object",
  32716. "properties": {
  32717. "id": {
  32718. "type": "string",
  32719. "pattern": "^evt_"
  32720. },
  32721. "metadata": {
  32722. "type": "object"
  32723. },
  32724. "durable": {
  32725. "type": "object",
  32726. "properties": {
  32727. "aggregateID": {
  32728. "type": "string"
  32729. },
  32730. "seq": {
  32731. "type": "integer"
  32732. },
  32733. "version": {
  32734. "type": "integer"
  32735. }
  32736. },
  32737. "required": ["aggregateID", "seq", "version"],
  32738. "additionalProperties": false
  32739. },
  32740. "location": {
  32741. "$ref": "#/components/schemas/LocationRef"
  32742. },
  32743. "type": {
  32744. "type": "string",
  32745. "enum": ["workspace.failed"]
  32746. },
  32747. "data": {
  32748. "type": "object",
  32749. "properties": {
  32750. "message": {
  32751. "type": "string"
  32752. }
  32753. },
  32754. "required": ["message"],
  32755. "additionalProperties": false
  32756. }
  32757. },
  32758. "required": ["id", "type", "data"],
  32759. "additionalProperties": false
  32760. },
  32761. "V2EventWorkspaceStatus": {
  32762. "type": "object",
  32763. "properties": {
  32764. "id": {
  32765. "type": "string",
  32766. "pattern": "^evt_"
  32767. },
  32768. "metadata": {
  32769. "type": "object"
  32770. },
  32771. "durable": {
  32772. "type": "object",
  32773. "properties": {
  32774. "aggregateID": {
  32775. "type": "string"
  32776. },
  32777. "seq": {
  32778. "type": "integer"
  32779. },
  32780. "version": {
  32781. "type": "integer"
  32782. }
  32783. },
  32784. "required": ["aggregateID", "seq", "version"],
  32785. "additionalProperties": false
  32786. },
  32787. "location": {
  32788. "$ref": "#/components/schemas/LocationRef"
  32789. },
  32790. "type": {
  32791. "type": "string",
  32792. "enum": ["workspace.status"]
  32793. },
  32794. "data": {
  32795. "type": "object",
  32796. "properties": {
  32797. "workspaceID": {
  32798. "type": "string",
  32799. "pattern": "^wrk"
  32800. },
  32801. "status": {
  32802. "type": "string",
  32803. "enum": ["connected", "connecting", "disconnected", "error"]
  32804. }
  32805. },
  32806. "required": ["workspaceID", "status"],
  32807. "additionalProperties": false
  32808. }
  32809. },
  32810. "required": ["id", "type", "data"],
  32811. "additionalProperties": false
  32812. },
  32813. "V2EventWorktreeReady": {
  32814. "type": "object",
  32815. "properties": {
  32816. "id": {
  32817. "type": "string",
  32818. "pattern": "^evt_"
  32819. },
  32820. "metadata": {
  32821. "type": "object"
  32822. },
  32823. "durable": {
  32824. "type": "object",
  32825. "properties": {
  32826. "aggregateID": {
  32827. "type": "string"
  32828. },
  32829. "seq": {
  32830. "type": "integer"
  32831. },
  32832. "version": {
  32833. "type": "integer"
  32834. }
  32835. },
  32836. "required": ["aggregateID", "seq", "version"],
  32837. "additionalProperties": false
  32838. },
  32839. "location": {
  32840. "$ref": "#/components/schemas/LocationRef"
  32841. },
  32842. "type": {
  32843. "type": "string",
  32844. "enum": ["worktree.ready"]
  32845. },
  32846. "data": {
  32847. "type": "object",
  32848. "properties": {
  32849. "name": {
  32850. "type": "string"
  32851. },
  32852. "branch": {
  32853. "type": "string"
  32854. }
  32855. },
  32856. "required": ["name"],
  32857. "additionalProperties": false
  32858. }
  32859. },
  32860. "required": ["id", "type", "data"],
  32861. "additionalProperties": false
  32862. },
  32863. "V2EventWorktreeFailed": {
  32864. "type": "object",
  32865. "properties": {
  32866. "id": {
  32867. "type": "string",
  32868. "pattern": "^evt_"
  32869. },
  32870. "metadata": {
  32871. "type": "object"
  32872. },
  32873. "durable": {
  32874. "type": "object",
  32875. "properties": {
  32876. "aggregateID": {
  32877. "type": "string"
  32878. },
  32879. "seq": {
  32880. "type": "integer"
  32881. },
  32882. "version": {
  32883. "type": "integer"
  32884. }
  32885. },
  32886. "required": ["aggregateID", "seq", "version"],
  32887. "additionalProperties": false
  32888. },
  32889. "location": {
  32890. "$ref": "#/components/schemas/LocationRef"
  32891. },
  32892. "type": {
  32893. "type": "string",
  32894. "enum": ["worktree.failed"]
  32895. },
  32896. "data": {
  32897. "type": "object",
  32898. "properties": {
  32899. "message": {
  32900. "type": "string"
  32901. }
  32902. },
  32903. "required": ["message"],
  32904. "additionalProperties": false
  32905. }
  32906. },
  32907. "required": ["id", "type", "data"],
  32908. "additionalProperties": false
  32909. },
  32910. "V2EventServerConnected": {
  32911. "type": "object",
  32912. "properties": {
  32913. "id": {
  32914. "type": "string",
  32915. "pattern": "^evt_"
  32916. },
  32917. "metadata": {
  32918. "type": "object"
  32919. },
  32920. "durable": {
  32921. "type": "object",
  32922. "properties": {
  32923. "aggregateID": {
  32924. "type": "string"
  32925. },
  32926. "seq": {
  32927. "type": "integer"
  32928. },
  32929. "version": {
  32930. "type": "integer"
  32931. }
  32932. },
  32933. "required": ["aggregateID", "seq", "version"],
  32934. "additionalProperties": false
  32935. },
  32936. "location": {
  32937. "$ref": "#/components/schemas/LocationRef"
  32938. },
  32939. "type": {
  32940. "type": "string",
  32941. "enum": ["server.connected"]
  32942. },
  32943. "data": {
  32944. "type": "object",
  32945. "properties": {}
  32946. }
  32947. },
  32948. "required": ["id", "type", "data"],
  32949. "additionalProperties": false
  32950. },
  32951. "V2EventGlobalDisposed": {
  32952. "type": "object",
  32953. "properties": {
  32954. "id": {
  32955. "type": "string",
  32956. "pattern": "^evt_"
  32957. },
  32958. "metadata": {
  32959. "type": "object"
  32960. },
  32961. "durable": {
  32962. "type": "object",
  32963. "properties": {
  32964. "aggregateID": {
  32965. "type": "string"
  32966. },
  32967. "seq": {
  32968. "type": "integer"
  32969. },
  32970. "version": {
  32971. "type": "integer"
  32972. }
  32973. },
  32974. "required": ["aggregateID", "seq", "version"],
  32975. "additionalProperties": false
  32976. },
  32977. "location": {
  32978. "$ref": "#/components/schemas/LocationRef"
  32979. },
  32980. "type": {
  32981. "type": "string",
  32982. "enum": ["global.disposed"]
  32983. },
  32984. "data": {
  32985. "type": "object",
  32986. "properties": {}
  32987. }
  32988. },
  32989. "required": ["id", "type", "data"],
  32990. "additionalProperties": false
  32991. },
  32992. "QuestionV2Request": {
  32993. "type": "object",
  32994. "properties": {
  32995. "id": {
  32996. "type": "string",
  32997. "pattern": "^que"
  32998. },
  32999. "sessionID": {
  33000. "type": "string",
  33001. "pattern": "^ses"
  33002. },
  33003. "questions": {
  33004. "type": "array",
  33005. "items": {
  33006. "$ref": "#/components/schemas/QuestionV2Info"
  33007. },
  33008. "description": "Questions to ask"
  33009. },
  33010. "tool": {
  33011. "$ref": "#/components/schemas/QuestionV2Tool"
  33012. }
  33013. },
  33014. "required": ["id", "sessionID", "questions"],
  33015. "additionalProperties": false
  33016. },
  33017. "QuestionV2Reply": {
  33018. "type": "object",
  33019. "properties": {
  33020. "answers": {
  33021. "type": "array",
  33022. "items": {
  33023. "$ref": "#/components/schemas/QuestionV2Answer"
  33024. },
  33025. "description": "User answers in order of questions (each answer is an array of selected labels)"
  33026. }
  33027. },
  33028. "required": ["answers"],
  33029. "additionalProperties": false
  33030. },
  33031. "ReferenceLocalSource": {
  33032. "type": "object",
  33033. "properties": {
  33034. "type": {
  33035. "type": "string",
  33036. "enum": ["local"]
  33037. },
  33038. "path": {
  33039. "type": "string"
  33040. },
  33041. "description": {
  33042. "type": "string"
  33043. },
  33044. "hidden": {
  33045. "type": "boolean"
  33046. }
  33047. },
  33048. "required": ["type", "path"],
  33049. "additionalProperties": false
  33050. },
  33051. "ReferenceGitSource": {
  33052. "type": "object",
  33053. "properties": {
  33054. "type": {
  33055. "type": "string",
  33056. "enum": ["git"]
  33057. },
  33058. "repository": {
  33059. "type": "string"
  33060. },
  33061. "branch": {
  33062. "type": "string"
  33063. },
  33064. "description": {
  33065. "type": "string"
  33066. },
  33067. "hidden": {
  33068. "type": "boolean"
  33069. }
  33070. },
  33071. "required": ["type", "repository"],
  33072. "additionalProperties": false
  33073. },
  33074. "ReferenceSource": {
  33075. "anyOf": [
  33076. {
  33077. "$ref": "#/components/schemas/ReferenceLocalSource"
  33078. },
  33079. {
  33080. "$ref": "#/components/schemas/ReferenceGitSource"
  33081. }
  33082. ]
  33083. },
  33084. "ReferenceInfo": {
  33085. "type": "object",
  33086. "properties": {
  33087. "name": {
  33088. "type": "string"
  33089. },
  33090. "path": {
  33091. "type": "string"
  33092. },
  33093. "description": {
  33094. "type": "string"
  33095. },
  33096. "hidden": {
  33097. "type": "boolean"
  33098. },
  33099. "source": {
  33100. "$ref": "#/components/schemas/ReferenceSource"
  33101. }
  33102. },
  33103. "required": ["name", "path", "source"],
  33104. "additionalProperties": false
  33105. },
  33106. "ProjectCopyCopy": {
  33107. "type": "object",
  33108. "properties": {
  33109. "directory": {
  33110. "type": "string"
  33111. }
  33112. },
  33113. "required": ["directory"],
  33114. "additionalProperties": false
  33115. },
  33116. "EventModels-devRefreshed": {
  33117. "type": "object",
  33118. "properties": {
  33119. "id": {
  33120. "type": "string",
  33121. "pattern": "^evt_"
  33122. },
  33123. "type": {
  33124. "type": "string",
  33125. "enum": ["models-dev.refreshed"]
  33126. },
  33127. "properties": {
  33128. "type": "object",
  33129. "properties": {}
  33130. }
  33131. },
  33132. "required": ["id", "type", "properties"],
  33133. "additionalProperties": false
  33134. },
  33135. "EventIntegrationUpdated": {
  33136. "type": "object",
  33137. "properties": {
  33138. "id": {
  33139. "type": "string",
  33140. "pattern": "^evt_"
  33141. },
  33142. "type": {
  33143. "type": "string",
  33144. "enum": ["integration.updated"]
  33145. },
  33146. "properties": {
  33147. "type": "object",
  33148. "properties": {}
  33149. }
  33150. },
  33151. "required": ["id", "type", "properties"],
  33152. "additionalProperties": false
  33153. },
  33154. "EventIntegrationConnectionUpdated": {
  33155. "type": "object",
  33156. "properties": {
  33157. "id": {
  33158. "type": "string",
  33159. "pattern": "^evt_"
  33160. },
  33161. "type": {
  33162. "type": "string",
  33163. "enum": ["integration.connection.updated"]
  33164. },
  33165. "properties": {
  33166. "type": "object",
  33167. "properties": {
  33168. "integrationID": {
  33169. "type": "string"
  33170. }
  33171. },
  33172. "required": ["integrationID"],
  33173. "additionalProperties": false
  33174. }
  33175. },
  33176. "required": ["id", "type", "properties"],
  33177. "additionalProperties": false
  33178. },
  33179. "EventCatalogUpdated": {
  33180. "type": "object",
  33181. "properties": {
  33182. "id": {
  33183. "type": "string",
  33184. "pattern": "^evt_"
  33185. },
  33186. "type": {
  33187. "type": "string",
  33188. "enum": ["catalog.updated"]
  33189. },
  33190. "properties": {
  33191. "type": "object",
  33192. "properties": {}
  33193. }
  33194. },
  33195. "required": ["id", "type", "properties"],
  33196. "additionalProperties": false
  33197. },
  33198. "EventSessionCreated": {
  33199. "type": "object",
  33200. "properties": {
  33201. "id": {
  33202. "type": "string",
  33203. "pattern": "^evt_"
  33204. },
  33205. "type": {
  33206. "type": "string",
  33207. "enum": ["session.created"]
  33208. },
  33209. "properties": {
  33210. "type": "object",
  33211. "properties": {
  33212. "sessionID": {
  33213. "type": "string",
  33214. "pattern": "^ses"
  33215. },
  33216. "info": {
  33217. "$ref": "#/components/schemas/Session"
  33218. }
  33219. },
  33220. "required": ["sessionID", "info"],
  33221. "additionalProperties": false
  33222. }
  33223. },
  33224. "required": ["id", "type", "properties"],
  33225. "additionalProperties": false
  33226. },
  33227. "EventSessionUpdated": {
  33228. "type": "object",
  33229. "properties": {
  33230. "id": {
  33231. "type": "string",
  33232. "pattern": "^evt_"
  33233. },
  33234. "type": {
  33235. "type": "string",
  33236. "enum": ["session.updated"]
  33237. },
  33238. "properties": {
  33239. "type": "object",
  33240. "properties": {
  33241. "sessionID": {
  33242. "type": "string",
  33243. "pattern": "^ses"
  33244. },
  33245. "info": {
  33246. "$ref": "#/components/schemas/Session"
  33247. }
  33248. },
  33249. "required": ["sessionID", "info"],
  33250. "additionalProperties": false
  33251. }
  33252. },
  33253. "required": ["id", "type", "properties"],
  33254. "additionalProperties": false
  33255. },
  33256. "EventSessionDeleted": {
  33257. "type": "object",
  33258. "properties": {
  33259. "id": {
  33260. "type": "string",
  33261. "pattern": "^evt_"
  33262. },
  33263. "type": {
  33264. "type": "string",
  33265. "enum": ["session.deleted"]
  33266. },
  33267. "properties": {
  33268. "type": "object",
  33269. "properties": {
  33270. "sessionID": {
  33271. "type": "string",
  33272. "pattern": "^ses"
  33273. },
  33274. "info": {
  33275. "$ref": "#/components/schemas/Session"
  33276. }
  33277. },
  33278. "required": ["sessionID", "info"],
  33279. "additionalProperties": false
  33280. }
  33281. },
  33282. "required": ["id", "type", "properties"],
  33283. "additionalProperties": false
  33284. },
  33285. "EventMessageUpdated": {
  33286. "type": "object",
  33287. "properties": {
  33288. "id": {
  33289. "type": "string",
  33290. "pattern": "^evt_"
  33291. },
  33292. "type": {
  33293. "type": "string",
  33294. "enum": ["message.updated"]
  33295. },
  33296. "properties": {
  33297. "type": "object",
  33298. "properties": {
  33299. "sessionID": {
  33300. "type": "string",
  33301. "pattern": "^ses"
  33302. },
  33303. "info": {
  33304. "$ref": "#/components/schemas/Message"
  33305. }
  33306. },
  33307. "required": ["sessionID", "info"],
  33308. "additionalProperties": false
  33309. }
  33310. },
  33311. "required": ["id", "type", "properties"],
  33312. "additionalProperties": false
  33313. },
  33314. "EventMessageRemoved": {
  33315. "type": "object",
  33316. "properties": {
  33317. "id": {
  33318. "type": "string",
  33319. "pattern": "^evt_"
  33320. },
  33321. "type": {
  33322. "type": "string",
  33323. "enum": ["message.removed"]
  33324. },
  33325. "properties": {
  33326. "type": "object",
  33327. "properties": {
  33328. "sessionID": {
  33329. "type": "string",
  33330. "pattern": "^ses"
  33331. },
  33332. "messageID": {
  33333. "type": "string",
  33334. "pattern": "^msg"
  33335. }
  33336. },
  33337. "required": ["sessionID", "messageID"],
  33338. "additionalProperties": false
  33339. }
  33340. },
  33341. "required": ["id", "type", "properties"],
  33342. "additionalProperties": false
  33343. },
  33344. "EventMessagePartUpdated": {
  33345. "type": "object",
  33346. "properties": {
  33347. "id": {
  33348. "type": "string",
  33349. "pattern": "^evt_"
  33350. },
  33351. "type": {
  33352. "type": "string",
  33353. "enum": ["message.part.updated"]
  33354. },
  33355. "properties": {
  33356. "type": "object",
  33357. "properties": {
  33358. "sessionID": {
  33359. "type": "string",
  33360. "pattern": "^ses"
  33361. },
  33362. "part": {
  33363. "$ref": "#/components/schemas/Part"
  33364. },
  33365. "time": {
  33366. "type": "number"
  33367. }
  33368. },
  33369. "required": ["sessionID", "part", "time"],
  33370. "additionalProperties": false
  33371. }
  33372. },
  33373. "required": ["id", "type", "properties"],
  33374. "additionalProperties": false
  33375. },
  33376. "EventMessagePartRemoved": {
  33377. "type": "object",
  33378. "properties": {
  33379. "id": {
  33380. "type": "string",
  33381. "pattern": "^evt_"
  33382. },
  33383. "type": {
  33384. "type": "string",
  33385. "enum": ["message.part.removed"]
  33386. },
  33387. "properties": {
  33388. "type": "object",
  33389. "properties": {
  33390. "sessionID": {
  33391. "type": "string",
  33392. "pattern": "^ses"
  33393. },
  33394. "messageID": {
  33395. "type": "string",
  33396. "pattern": "^msg"
  33397. },
  33398. "partID": {
  33399. "type": "string",
  33400. "pattern": "^prt"
  33401. }
  33402. },
  33403. "required": ["sessionID", "messageID", "partID"],
  33404. "additionalProperties": false
  33405. }
  33406. },
  33407. "required": ["id", "type", "properties"],
  33408. "additionalProperties": false
  33409. },
  33410. "EventSessionNextAgentSwitched": {
  33411. "type": "object",
  33412. "properties": {
  33413. "id": {
  33414. "type": "string",
  33415. "pattern": "^evt_"
  33416. },
  33417. "type": {
  33418. "type": "string",
  33419. "enum": ["session.next.agent.switched"]
  33420. },
  33421. "properties": {
  33422. "type": "object",
  33423. "properties": {
  33424. "timestamp": {
  33425. "type": "number"
  33426. },
  33427. "sessionID": {
  33428. "type": "string",
  33429. "pattern": "^ses"
  33430. },
  33431. "messageID": {
  33432. "type": "string",
  33433. "pattern": "^msg_"
  33434. },
  33435. "agent": {
  33436. "type": "string"
  33437. }
  33438. },
  33439. "required": ["timestamp", "sessionID", "messageID", "agent"],
  33440. "additionalProperties": false
  33441. }
  33442. },
  33443. "required": ["id", "type", "properties"],
  33444. "additionalProperties": false
  33445. },
  33446. "EventSessionNextModelSwitched": {
  33447. "type": "object",
  33448. "properties": {
  33449. "id": {
  33450. "type": "string",
  33451. "pattern": "^evt_"
  33452. },
  33453. "type": {
  33454. "type": "string",
  33455. "enum": ["session.next.model.switched"]
  33456. },
  33457. "properties": {
  33458. "type": "object",
  33459. "properties": {
  33460. "timestamp": {
  33461. "type": "number"
  33462. },
  33463. "sessionID": {
  33464. "type": "string",
  33465. "pattern": "^ses"
  33466. },
  33467. "messageID": {
  33468. "type": "string",
  33469. "pattern": "^msg_"
  33470. },
  33471. "model": {
  33472. "$ref": "#/components/schemas/ModelRef"
  33473. }
  33474. },
  33475. "required": ["timestamp", "sessionID", "messageID", "model"],
  33476. "additionalProperties": false
  33477. }
  33478. },
  33479. "required": ["id", "type", "properties"],
  33480. "additionalProperties": false
  33481. },
  33482. "EventSessionNextMoved": {
  33483. "type": "object",
  33484. "properties": {
  33485. "id": {
  33486. "type": "string",
  33487. "pattern": "^evt_"
  33488. },
  33489. "type": {
  33490. "type": "string",
  33491. "enum": ["session.next.moved"]
  33492. },
  33493. "properties": {
  33494. "type": "object",
  33495. "properties": {
  33496. "timestamp": {
  33497. "type": "number"
  33498. },
  33499. "sessionID": {
  33500. "type": "string",
  33501. "pattern": "^ses"
  33502. },
  33503. "location": {
  33504. "$ref": "#/components/schemas/LocationRef"
  33505. },
  33506. "subdirectory": {
  33507. "type": "string"
  33508. }
  33509. },
  33510. "required": ["timestamp", "sessionID", "location"],
  33511. "additionalProperties": false
  33512. }
  33513. },
  33514. "required": ["id", "type", "properties"],
  33515. "additionalProperties": false
  33516. },
  33517. "EventSessionNextPrompted": {
  33518. "type": "object",
  33519. "properties": {
  33520. "id": {
  33521. "type": "string",
  33522. "pattern": "^evt_"
  33523. },
  33524. "type": {
  33525. "type": "string",
  33526. "enum": ["session.next.prompted"]
  33527. },
  33528. "properties": {
  33529. "type": "object",
  33530. "properties": {
  33531. "timestamp": {
  33532. "type": "number"
  33533. },
  33534. "sessionID": {
  33535. "type": "string",
  33536. "pattern": "^ses"
  33537. },
  33538. "messageID": {
  33539. "type": "string",
  33540. "pattern": "^msg_"
  33541. },
  33542. "prompt": {
  33543. "$ref": "#/components/schemas/Prompt"
  33544. },
  33545. "delivery": {
  33546. "type": "string",
  33547. "enum": ["steer", "queue"]
  33548. }
  33549. },
  33550. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  33551. "additionalProperties": false
  33552. }
  33553. },
  33554. "required": ["id", "type", "properties"],
  33555. "additionalProperties": false
  33556. },
  33557. "EventSessionNextPromptAdmitted": {
  33558. "type": "object",
  33559. "properties": {
  33560. "id": {
  33561. "type": "string",
  33562. "pattern": "^evt_"
  33563. },
  33564. "type": {
  33565. "type": "string",
  33566. "enum": ["session.next.prompt.admitted"]
  33567. },
  33568. "properties": {
  33569. "type": "object",
  33570. "properties": {
  33571. "timestamp": {
  33572. "type": "number"
  33573. },
  33574. "sessionID": {
  33575. "type": "string",
  33576. "pattern": "^ses"
  33577. },
  33578. "messageID": {
  33579. "type": "string",
  33580. "pattern": "^msg_"
  33581. },
  33582. "prompt": {
  33583. "$ref": "#/components/schemas/Prompt"
  33584. },
  33585. "delivery": {
  33586. "type": "string",
  33587. "enum": ["steer", "queue"]
  33588. }
  33589. },
  33590. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  33591. "additionalProperties": false
  33592. }
  33593. },
  33594. "required": ["id", "type", "properties"],
  33595. "additionalProperties": false
  33596. },
  33597. "EventSessionNextContextUpdated": {
  33598. "type": "object",
  33599. "properties": {
  33600. "id": {
  33601. "type": "string",
  33602. "pattern": "^evt_"
  33603. },
  33604. "type": {
  33605. "type": "string",
  33606. "enum": ["session.next.context.updated"]
  33607. },
  33608. "properties": {
  33609. "type": "object",
  33610. "properties": {
  33611. "timestamp": {
  33612. "type": "number"
  33613. },
  33614. "sessionID": {
  33615. "type": "string",
  33616. "pattern": "^ses"
  33617. },
  33618. "messageID": {
  33619. "type": "string",
  33620. "pattern": "^msg_"
  33621. },
  33622. "text": {
  33623. "type": "string"
  33624. }
  33625. },
  33626. "required": ["timestamp", "sessionID", "messageID", "text"],
  33627. "additionalProperties": false
  33628. }
  33629. },
  33630. "required": ["id", "type", "properties"],
  33631. "additionalProperties": false
  33632. },
  33633. "EventSessionNextSynthetic": {
  33634. "type": "object",
  33635. "properties": {
  33636. "id": {
  33637. "type": "string",
  33638. "pattern": "^evt_"
  33639. },
  33640. "type": {
  33641. "type": "string",
  33642. "enum": ["session.next.synthetic"]
  33643. },
  33644. "properties": {
  33645. "type": "object",
  33646. "properties": {
  33647. "timestamp": {
  33648. "type": "number"
  33649. },
  33650. "sessionID": {
  33651. "type": "string",
  33652. "pattern": "^ses"
  33653. },
  33654. "messageID": {
  33655. "type": "string",
  33656. "pattern": "^msg_"
  33657. },
  33658. "text": {
  33659. "type": "string"
  33660. }
  33661. },
  33662. "required": ["timestamp", "sessionID", "messageID", "text"],
  33663. "additionalProperties": false
  33664. }
  33665. },
  33666. "required": ["id", "type", "properties"],
  33667. "additionalProperties": false
  33668. },
  33669. "EventSessionNextShellStarted": {
  33670. "type": "object",
  33671. "properties": {
  33672. "id": {
  33673. "type": "string",
  33674. "pattern": "^evt_"
  33675. },
  33676. "type": {
  33677. "type": "string",
  33678. "enum": ["session.next.shell.started"]
  33679. },
  33680. "properties": {
  33681. "type": "object",
  33682. "properties": {
  33683. "timestamp": {
  33684. "type": "number"
  33685. },
  33686. "sessionID": {
  33687. "type": "string",
  33688. "pattern": "^ses"
  33689. },
  33690. "messageID": {
  33691. "type": "string",
  33692. "pattern": "^msg_"
  33693. },
  33694. "callID": {
  33695. "type": "string"
  33696. },
  33697. "command": {
  33698. "type": "string"
  33699. }
  33700. },
  33701. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  33702. "additionalProperties": false
  33703. }
  33704. },
  33705. "required": ["id", "type", "properties"],
  33706. "additionalProperties": false
  33707. },
  33708. "EventSessionNextShellEnded": {
  33709. "type": "object",
  33710. "properties": {
  33711. "id": {
  33712. "type": "string",
  33713. "pattern": "^evt_"
  33714. },
  33715. "type": {
  33716. "type": "string",
  33717. "enum": ["session.next.shell.ended"]
  33718. },
  33719. "properties": {
  33720. "type": "object",
  33721. "properties": {
  33722. "timestamp": {
  33723. "type": "number"
  33724. },
  33725. "sessionID": {
  33726. "type": "string",
  33727. "pattern": "^ses"
  33728. },
  33729. "callID": {
  33730. "type": "string"
  33731. },
  33732. "output": {
  33733. "type": "string"
  33734. }
  33735. },
  33736. "required": ["timestamp", "sessionID", "callID", "output"],
  33737. "additionalProperties": false
  33738. }
  33739. },
  33740. "required": ["id", "type", "properties"],
  33741. "additionalProperties": false
  33742. },
  33743. "EventSessionNextStepStarted": {
  33744. "type": "object",
  33745. "properties": {
  33746. "id": {
  33747. "type": "string",
  33748. "pattern": "^evt_"
  33749. },
  33750. "type": {
  33751. "type": "string",
  33752. "enum": ["session.next.step.started"]
  33753. },
  33754. "properties": {
  33755. "type": "object",
  33756. "properties": {
  33757. "timestamp": {
  33758. "type": "number"
  33759. },
  33760. "sessionID": {
  33761. "type": "string",
  33762. "pattern": "^ses"
  33763. },
  33764. "assistantMessageID": {
  33765. "type": "string",
  33766. "pattern": "^msg_"
  33767. },
  33768. "agent": {
  33769. "type": "string"
  33770. },
  33771. "model": {
  33772. "$ref": "#/components/schemas/ModelRef"
  33773. },
  33774. "snapshot": {
  33775. "type": "string"
  33776. }
  33777. },
  33778. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  33779. "additionalProperties": false
  33780. }
  33781. },
  33782. "required": ["id", "type", "properties"],
  33783. "additionalProperties": false
  33784. },
  33785. "EventSessionNextStepEnded": {
  33786. "type": "object",
  33787. "properties": {
  33788. "id": {
  33789. "type": "string",
  33790. "pattern": "^evt_"
  33791. },
  33792. "type": {
  33793. "type": "string",
  33794. "enum": ["session.next.step.ended"]
  33795. },
  33796. "properties": {
  33797. "type": "object",
  33798. "properties": {
  33799. "timestamp": {
  33800. "type": "number"
  33801. },
  33802. "sessionID": {
  33803. "type": "string",
  33804. "pattern": "^ses"
  33805. },
  33806. "assistantMessageID": {
  33807. "type": "string",
  33808. "pattern": "^msg_"
  33809. },
  33810. "finish": {
  33811. "type": "string"
  33812. },
  33813. "cost": {
  33814. "type": "number"
  33815. },
  33816. "tokens": {
  33817. "type": "object",
  33818. "properties": {
  33819. "input": {
  33820. "type": "number"
  33821. },
  33822. "output": {
  33823. "type": "number"
  33824. },
  33825. "reasoning": {
  33826. "type": "number"
  33827. },
  33828. "cache": {
  33829. "type": "object",
  33830. "properties": {
  33831. "read": {
  33832. "type": "number"
  33833. },
  33834. "write": {
  33835. "type": "number"
  33836. }
  33837. },
  33838. "required": ["read", "write"],
  33839. "additionalProperties": false
  33840. }
  33841. },
  33842. "required": ["input", "output", "reasoning", "cache"],
  33843. "additionalProperties": false
  33844. },
  33845. "snapshot": {
  33846. "type": "string"
  33847. },
  33848. "files": {
  33849. "type": "array",
  33850. "items": {
  33851. "type": "string"
  33852. }
  33853. }
  33854. },
  33855. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  33856. "additionalProperties": false
  33857. }
  33858. },
  33859. "required": ["id", "type", "properties"],
  33860. "additionalProperties": false
  33861. },
  33862. "EventSessionNextStepFailed": {
  33863. "type": "object",
  33864. "properties": {
  33865. "id": {
  33866. "type": "string",
  33867. "pattern": "^evt_"
  33868. },
  33869. "type": {
  33870. "type": "string",
  33871. "enum": ["session.next.step.failed"]
  33872. },
  33873. "properties": {
  33874. "type": "object",
  33875. "properties": {
  33876. "timestamp": {
  33877. "type": "number"
  33878. },
  33879. "sessionID": {
  33880. "type": "string",
  33881. "pattern": "^ses"
  33882. },
  33883. "assistantMessageID": {
  33884. "type": "string",
  33885. "pattern": "^msg_"
  33886. },
  33887. "error": {
  33888. "$ref": "#/components/schemas/SessionErrorUnknown"
  33889. }
  33890. },
  33891. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  33892. "additionalProperties": false
  33893. }
  33894. },
  33895. "required": ["id", "type", "properties"],
  33896. "additionalProperties": false
  33897. },
  33898. "EventSessionNextTextStarted": {
  33899. "type": "object",
  33900. "properties": {
  33901. "id": {
  33902. "type": "string",
  33903. "pattern": "^evt_"
  33904. },
  33905. "type": {
  33906. "type": "string",
  33907. "enum": ["session.next.text.started"]
  33908. },
  33909. "properties": {
  33910. "type": "object",
  33911. "properties": {
  33912. "timestamp": {
  33913. "type": "number"
  33914. },
  33915. "sessionID": {
  33916. "type": "string",
  33917. "pattern": "^ses"
  33918. },
  33919. "assistantMessageID": {
  33920. "type": "string",
  33921. "pattern": "^msg_"
  33922. },
  33923. "textID": {
  33924. "type": "string"
  33925. }
  33926. },
  33927. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  33928. "additionalProperties": false
  33929. }
  33930. },
  33931. "required": ["id", "type", "properties"],
  33932. "additionalProperties": false
  33933. },
  33934. "EventSessionNextTextDelta": {
  33935. "type": "object",
  33936. "properties": {
  33937. "id": {
  33938. "type": "string",
  33939. "pattern": "^evt_"
  33940. },
  33941. "type": {
  33942. "type": "string",
  33943. "enum": ["session.next.text.delta"]
  33944. },
  33945. "properties": {
  33946. "type": "object",
  33947. "properties": {
  33948. "timestamp": {
  33949. "type": "number"
  33950. },
  33951. "sessionID": {
  33952. "type": "string",
  33953. "pattern": "^ses"
  33954. },
  33955. "assistantMessageID": {
  33956. "type": "string",
  33957. "pattern": "^msg_"
  33958. },
  33959. "textID": {
  33960. "type": "string"
  33961. },
  33962. "delta": {
  33963. "type": "string"
  33964. }
  33965. },
  33966. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  33967. "additionalProperties": false
  33968. }
  33969. },
  33970. "required": ["id", "type", "properties"],
  33971. "additionalProperties": false
  33972. },
  33973. "EventSessionNextTextEnded": {
  33974. "type": "object",
  33975. "properties": {
  33976. "id": {
  33977. "type": "string",
  33978. "pattern": "^evt_"
  33979. },
  33980. "type": {
  33981. "type": "string",
  33982. "enum": ["session.next.text.ended"]
  33983. },
  33984. "properties": {
  33985. "type": "object",
  33986. "properties": {
  33987. "timestamp": {
  33988. "type": "number"
  33989. },
  33990. "sessionID": {
  33991. "type": "string",
  33992. "pattern": "^ses"
  33993. },
  33994. "assistantMessageID": {
  33995. "type": "string",
  33996. "pattern": "^msg_"
  33997. },
  33998. "textID": {
  33999. "type": "string"
  34000. },
  34001. "text": {
  34002. "type": "string"
  34003. }
  34004. },
  34005. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  34006. "additionalProperties": false
  34007. }
  34008. },
  34009. "required": ["id", "type", "properties"],
  34010. "additionalProperties": false
  34011. },
  34012. "EventSessionNextReasoningStarted": {
  34013. "type": "object",
  34014. "properties": {
  34015. "id": {
  34016. "type": "string",
  34017. "pattern": "^evt_"
  34018. },
  34019. "type": {
  34020. "type": "string",
  34021. "enum": ["session.next.reasoning.started"]
  34022. },
  34023. "properties": {
  34024. "type": "object",
  34025. "properties": {
  34026. "timestamp": {
  34027. "type": "number"
  34028. },
  34029. "sessionID": {
  34030. "type": "string",
  34031. "pattern": "^ses"
  34032. },
  34033. "assistantMessageID": {
  34034. "type": "string",
  34035. "pattern": "^msg_"
  34036. },
  34037. "reasoningID": {
  34038. "type": "string"
  34039. },
  34040. "providerMetadata": {
  34041. "$ref": "#/components/schemas/LLMProviderMetadata"
  34042. }
  34043. },
  34044. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  34045. "additionalProperties": false
  34046. }
  34047. },
  34048. "required": ["id", "type", "properties"],
  34049. "additionalProperties": false
  34050. },
  34051. "EventSessionNextReasoningDelta": {
  34052. "type": "object",
  34053. "properties": {
  34054. "id": {
  34055. "type": "string",
  34056. "pattern": "^evt_"
  34057. },
  34058. "type": {
  34059. "type": "string",
  34060. "enum": ["session.next.reasoning.delta"]
  34061. },
  34062. "properties": {
  34063. "type": "object",
  34064. "properties": {
  34065. "timestamp": {
  34066. "type": "number"
  34067. },
  34068. "sessionID": {
  34069. "type": "string",
  34070. "pattern": "^ses"
  34071. },
  34072. "assistantMessageID": {
  34073. "type": "string",
  34074. "pattern": "^msg_"
  34075. },
  34076. "reasoningID": {
  34077. "type": "string"
  34078. },
  34079. "delta": {
  34080. "type": "string"
  34081. }
  34082. },
  34083. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  34084. "additionalProperties": false
  34085. }
  34086. },
  34087. "required": ["id", "type", "properties"],
  34088. "additionalProperties": false
  34089. },
  34090. "EventSessionNextReasoningEnded": {
  34091. "type": "object",
  34092. "properties": {
  34093. "id": {
  34094. "type": "string",
  34095. "pattern": "^evt_"
  34096. },
  34097. "type": {
  34098. "type": "string",
  34099. "enum": ["session.next.reasoning.ended"]
  34100. },
  34101. "properties": {
  34102. "type": "object",
  34103. "properties": {
  34104. "timestamp": {
  34105. "type": "number"
  34106. },
  34107. "sessionID": {
  34108. "type": "string",
  34109. "pattern": "^ses"
  34110. },
  34111. "assistantMessageID": {
  34112. "type": "string",
  34113. "pattern": "^msg_"
  34114. },
  34115. "reasoningID": {
  34116. "type": "string"
  34117. },
  34118. "text": {
  34119. "type": "string"
  34120. },
  34121. "providerMetadata": {
  34122. "$ref": "#/components/schemas/LLMProviderMetadata"
  34123. }
  34124. },
  34125. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  34126. "additionalProperties": false
  34127. }
  34128. },
  34129. "required": ["id", "type", "properties"],
  34130. "additionalProperties": false
  34131. },
  34132. "EventSessionNextToolInputStarted": {
  34133. "type": "object",
  34134. "properties": {
  34135. "id": {
  34136. "type": "string",
  34137. "pattern": "^evt_"
  34138. },
  34139. "type": {
  34140. "type": "string",
  34141. "enum": ["session.next.tool.input.started"]
  34142. },
  34143. "properties": {
  34144. "type": "object",
  34145. "properties": {
  34146. "timestamp": {
  34147. "type": "number"
  34148. },
  34149. "sessionID": {
  34150. "type": "string",
  34151. "pattern": "^ses"
  34152. },
  34153. "assistantMessageID": {
  34154. "type": "string",
  34155. "pattern": "^msg_"
  34156. },
  34157. "callID": {
  34158. "type": "string"
  34159. },
  34160. "name": {
  34161. "type": "string"
  34162. }
  34163. },
  34164. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  34165. "additionalProperties": false
  34166. }
  34167. },
  34168. "required": ["id", "type", "properties"],
  34169. "additionalProperties": false
  34170. },
  34171. "EventSessionNextToolInputDelta": {
  34172. "type": "object",
  34173. "properties": {
  34174. "id": {
  34175. "type": "string",
  34176. "pattern": "^evt_"
  34177. },
  34178. "type": {
  34179. "type": "string",
  34180. "enum": ["session.next.tool.input.delta"]
  34181. },
  34182. "properties": {
  34183. "type": "object",
  34184. "properties": {
  34185. "timestamp": {
  34186. "type": "number"
  34187. },
  34188. "sessionID": {
  34189. "type": "string",
  34190. "pattern": "^ses"
  34191. },
  34192. "assistantMessageID": {
  34193. "type": "string",
  34194. "pattern": "^msg_"
  34195. },
  34196. "callID": {
  34197. "type": "string"
  34198. },
  34199. "delta": {
  34200. "type": "string"
  34201. }
  34202. },
  34203. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  34204. "additionalProperties": false
  34205. }
  34206. },
  34207. "required": ["id", "type", "properties"],
  34208. "additionalProperties": false
  34209. },
  34210. "EventSessionNextToolInputEnded": {
  34211. "type": "object",
  34212. "properties": {
  34213. "id": {
  34214. "type": "string",
  34215. "pattern": "^evt_"
  34216. },
  34217. "type": {
  34218. "type": "string",
  34219. "enum": ["session.next.tool.input.ended"]
  34220. },
  34221. "properties": {
  34222. "type": "object",
  34223. "properties": {
  34224. "timestamp": {
  34225. "type": "number"
  34226. },
  34227. "sessionID": {
  34228. "type": "string",
  34229. "pattern": "^ses"
  34230. },
  34231. "assistantMessageID": {
  34232. "type": "string",
  34233. "pattern": "^msg_"
  34234. },
  34235. "callID": {
  34236. "type": "string"
  34237. },
  34238. "text": {
  34239. "type": "string"
  34240. }
  34241. },
  34242. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  34243. "additionalProperties": false
  34244. }
  34245. },
  34246. "required": ["id", "type", "properties"],
  34247. "additionalProperties": false
  34248. },
  34249. "EventSessionNextToolCalled": {
  34250. "type": "object",
  34251. "properties": {
  34252. "id": {
  34253. "type": "string",
  34254. "pattern": "^evt_"
  34255. },
  34256. "type": {
  34257. "type": "string",
  34258. "enum": ["session.next.tool.called"]
  34259. },
  34260. "properties": {
  34261. "type": "object",
  34262. "properties": {
  34263. "timestamp": {
  34264. "type": "number"
  34265. },
  34266. "sessionID": {
  34267. "type": "string",
  34268. "pattern": "^ses"
  34269. },
  34270. "assistantMessageID": {
  34271. "type": "string",
  34272. "pattern": "^msg_"
  34273. },
  34274. "callID": {
  34275. "type": "string"
  34276. },
  34277. "tool": {
  34278. "type": "string"
  34279. },
  34280. "input": {
  34281. "type": "object"
  34282. },
  34283. "provider": {
  34284. "type": "object",
  34285. "properties": {
  34286. "executed": {
  34287. "type": "boolean"
  34288. },
  34289. "metadata": {
  34290. "$ref": "#/components/schemas/LLMProviderMetadata"
  34291. }
  34292. },
  34293. "required": ["executed"],
  34294. "additionalProperties": false
  34295. }
  34296. },
  34297. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  34298. "additionalProperties": false
  34299. }
  34300. },
  34301. "required": ["id", "type", "properties"],
  34302. "additionalProperties": false
  34303. },
  34304. "EventSessionNextToolProgress": {
  34305. "type": "object",
  34306. "properties": {
  34307. "id": {
  34308. "type": "string",
  34309. "pattern": "^evt_"
  34310. },
  34311. "type": {
  34312. "type": "string",
  34313. "enum": ["session.next.tool.progress"]
  34314. },
  34315. "properties": {
  34316. "type": "object",
  34317. "properties": {
  34318. "timestamp": {
  34319. "type": "number"
  34320. },
  34321. "sessionID": {
  34322. "type": "string",
  34323. "pattern": "^ses"
  34324. },
  34325. "assistantMessageID": {
  34326. "type": "string",
  34327. "pattern": "^msg_"
  34328. },
  34329. "callID": {
  34330. "type": "string"
  34331. },
  34332. "structured": {
  34333. "type": "object"
  34334. },
  34335. "content": {
  34336. "type": "array",
  34337. "items": {
  34338. "$ref": "#/components/schemas/LLMToolContent"
  34339. }
  34340. }
  34341. },
  34342. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  34343. "additionalProperties": false
  34344. }
  34345. },
  34346. "required": ["id", "type", "properties"],
  34347. "additionalProperties": false
  34348. },
  34349. "EventSessionNextToolSuccess": {
  34350. "type": "object",
  34351. "properties": {
  34352. "id": {
  34353. "type": "string",
  34354. "pattern": "^evt_"
  34355. },
  34356. "type": {
  34357. "type": "string",
  34358. "enum": ["session.next.tool.success"]
  34359. },
  34360. "properties": {
  34361. "type": "object",
  34362. "properties": {
  34363. "timestamp": {
  34364. "type": "number"
  34365. },
  34366. "sessionID": {
  34367. "type": "string",
  34368. "pattern": "^ses"
  34369. },
  34370. "assistantMessageID": {
  34371. "type": "string",
  34372. "pattern": "^msg_"
  34373. },
  34374. "callID": {
  34375. "type": "string"
  34376. },
  34377. "structured": {
  34378. "type": "object"
  34379. },
  34380. "content": {
  34381. "type": "array",
  34382. "items": {
  34383. "$ref": "#/components/schemas/LLMToolContent"
  34384. }
  34385. },
  34386. "outputPaths": {
  34387. "type": "array",
  34388. "items": {
  34389. "type": "string"
  34390. }
  34391. },
  34392. "result": {},
  34393. "provider": {
  34394. "type": "object",
  34395. "properties": {
  34396. "executed": {
  34397. "type": "boolean"
  34398. },
  34399. "metadata": {
  34400. "$ref": "#/components/schemas/LLMProviderMetadata"
  34401. }
  34402. },
  34403. "required": ["executed"],
  34404. "additionalProperties": false
  34405. }
  34406. },
  34407. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  34408. "additionalProperties": false
  34409. }
  34410. },
  34411. "required": ["id", "type", "properties"],
  34412. "additionalProperties": false
  34413. },
  34414. "EventSessionNextToolFailed": {
  34415. "type": "object",
  34416. "properties": {
  34417. "id": {
  34418. "type": "string",
  34419. "pattern": "^evt_"
  34420. },
  34421. "type": {
  34422. "type": "string",
  34423. "enum": ["session.next.tool.failed"]
  34424. },
  34425. "properties": {
  34426. "type": "object",
  34427. "properties": {
  34428. "timestamp": {
  34429. "type": "number"
  34430. },
  34431. "sessionID": {
  34432. "type": "string",
  34433. "pattern": "^ses"
  34434. },
  34435. "assistantMessageID": {
  34436. "type": "string",
  34437. "pattern": "^msg_"
  34438. },
  34439. "callID": {
  34440. "type": "string"
  34441. },
  34442. "error": {
  34443. "$ref": "#/components/schemas/SessionErrorUnknown"
  34444. },
  34445. "result": {},
  34446. "provider": {
  34447. "type": "object",
  34448. "properties": {
  34449. "executed": {
  34450. "type": "boolean"
  34451. },
  34452. "metadata": {
  34453. "$ref": "#/components/schemas/LLMProviderMetadata"
  34454. }
  34455. },
  34456. "required": ["executed"],
  34457. "additionalProperties": false
  34458. }
  34459. },
  34460. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  34461. "additionalProperties": false
  34462. }
  34463. },
  34464. "required": ["id", "type", "properties"],
  34465. "additionalProperties": false
  34466. },
  34467. "EventSessionNextRetried": {
  34468. "type": "object",
  34469. "properties": {
  34470. "id": {
  34471. "type": "string",
  34472. "pattern": "^evt_"
  34473. },
  34474. "type": {
  34475. "type": "string",
  34476. "enum": ["session.next.retried"]
  34477. },
  34478. "properties": {
  34479. "type": "object",
  34480. "properties": {
  34481. "timestamp": {
  34482. "type": "number"
  34483. },
  34484. "sessionID": {
  34485. "type": "string",
  34486. "pattern": "^ses"
  34487. },
  34488. "attempt": {
  34489. "type": "number"
  34490. },
  34491. "error": {
  34492. "$ref": "#/components/schemas/SessionNextRetry_error"
  34493. }
  34494. },
  34495. "required": ["timestamp", "sessionID", "attempt", "error"],
  34496. "additionalProperties": false
  34497. }
  34498. },
  34499. "required": ["id", "type", "properties"],
  34500. "additionalProperties": false
  34501. },
  34502. "EventSessionNextCompactionStarted": {
  34503. "type": "object",
  34504. "properties": {
  34505. "id": {
  34506. "type": "string",
  34507. "pattern": "^evt_"
  34508. },
  34509. "type": {
  34510. "type": "string",
  34511. "enum": ["session.next.compaction.started"]
  34512. },
  34513. "properties": {
  34514. "type": "object",
  34515. "properties": {
  34516. "timestamp": {
  34517. "type": "number"
  34518. },
  34519. "sessionID": {
  34520. "type": "string",
  34521. "pattern": "^ses"
  34522. },
  34523. "messageID": {
  34524. "type": "string",
  34525. "pattern": "^msg_"
  34526. },
  34527. "reason": {
  34528. "type": "string",
  34529. "enum": ["auto", "manual"]
  34530. }
  34531. },
  34532. "required": ["timestamp", "sessionID", "messageID", "reason"],
  34533. "additionalProperties": false
  34534. }
  34535. },
  34536. "required": ["id", "type", "properties"],
  34537. "additionalProperties": false
  34538. },
  34539. "EventSessionNextCompactionDelta": {
  34540. "type": "object",
  34541. "properties": {
  34542. "id": {
  34543. "type": "string",
  34544. "pattern": "^evt_"
  34545. },
  34546. "type": {
  34547. "type": "string",
  34548. "enum": ["session.next.compaction.delta"]
  34549. },
  34550. "properties": {
  34551. "type": "object",
  34552. "properties": {
  34553. "timestamp": {
  34554. "type": "number"
  34555. },
  34556. "sessionID": {
  34557. "type": "string",
  34558. "pattern": "^ses"
  34559. },
  34560. "messageID": {
  34561. "type": "string",
  34562. "pattern": "^msg_"
  34563. },
  34564. "text": {
  34565. "type": "string"
  34566. }
  34567. },
  34568. "required": ["timestamp", "sessionID", "messageID", "text"],
  34569. "additionalProperties": false
  34570. }
  34571. },
  34572. "required": ["id", "type", "properties"],
  34573. "additionalProperties": false
  34574. },
  34575. "EventSessionNextCompactionEnded": {
  34576. "type": "object",
  34577. "properties": {
  34578. "id": {
  34579. "type": "string",
  34580. "pattern": "^evt_"
  34581. },
  34582. "type": {
  34583. "type": "string",
  34584. "enum": ["session.next.compaction.ended"]
  34585. },
  34586. "properties": {
  34587. "type": "object",
  34588. "properties": {
  34589. "timestamp": {
  34590. "type": "number"
  34591. },
  34592. "sessionID": {
  34593. "type": "string",
  34594. "pattern": "^ses"
  34595. },
  34596. "messageID": {
  34597. "type": "string",
  34598. "pattern": "^msg_"
  34599. },
  34600. "reason": {
  34601. "type": "string",
  34602. "enum": ["auto", "manual"]
  34603. },
  34604. "text": {
  34605. "type": "string"
  34606. },
  34607. "recent": {
  34608. "type": "string"
  34609. }
  34610. },
  34611. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  34612. "additionalProperties": false
  34613. }
  34614. },
  34615. "required": ["id", "type", "properties"],
  34616. "additionalProperties": false
  34617. },
  34618. "EventSessionNextRevertStaged": {
  34619. "type": "object",
  34620. "properties": {
  34621. "id": {
  34622. "type": "string",
  34623. "pattern": "^evt_"
  34624. },
  34625. "type": {
  34626. "type": "string",
  34627. "enum": ["session.next.revert.staged"]
  34628. },
  34629. "properties": {
  34630. "type": "object",
  34631. "properties": {
  34632. "timestamp": {
  34633. "type": "number"
  34634. },
  34635. "sessionID": {
  34636. "type": "string",
  34637. "pattern": "^ses"
  34638. },
  34639. "revert": {
  34640. "$ref": "#/components/schemas/RevertState"
  34641. }
  34642. },
  34643. "required": ["timestamp", "sessionID", "revert"],
  34644. "additionalProperties": false
  34645. }
  34646. },
  34647. "required": ["id", "type", "properties"],
  34648. "additionalProperties": false
  34649. },
  34650. "EventSessionNextRevertCleared": {
  34651. "type": "object",
  34652. "properties": {
  34653. "id": {
  34654. "type": "string",
  34655. "pattern": "^evt_"
  34656. },
  34657. "type": {
  34658. "type": "string",
  34659. "enum": ["session.next.revert.cleared"]
  34660. },
  34661. "properties": {
  34662. "type": "object",
  34663. "properties": {
  34664. "timestamp": {
  34665. "type": "number"
  34666. },
  34667. "sessionID": {
  34668. "type": "string",
  34669. "pattern": "^ses"
  34670. }
  34671. },
  34672. "required": ["timestamp", "sessionID"],
  34673. "additionalProperties": false
  34674. }
  34675. },
  34676. "required": ["id", "type", "properties"],
  34677. "additionalProperties": false
  34678. },
  34679. "EventSessionNextRevertCommitted": {
  34680. "type": "object",
  34681. "properties": {
  34682. "id": {
  34683. "type": "string",
  34684. "pattern": "^evt_"
  34685. },
  34686. "type": {
  34687. "type": "string",
  34688. "enum": ["session.next.revert.committed"]
  34689. },
  34690. "properties": {
  34691. "type": "object",
  34692. "properties": {
  34693. "timestamp": {
  34694. "type": "number"
  34695. },
  34696. "sessionID": {
  34697. "type": "string",
  34698. "pattern": "^ses"
  34699. },
  34700. "messageID": {
  34701. "type": "string",
  34702. "pattern": "^msg_"
  34703. }
  34704. },
  34705. "required": ["timestamp", "sessionID", "messageID"],
  34706. "additionalProperties": false
  34707. }
  34708. },
  34709. "required": ["id", "type", "properties"],
  34710. "additionalProperties": false
  34711. },
  34712. "EventMessagePartDelta": {
  34713. "type": "object",
  34714. "properties": {
  34715. "id": {
  34716. "type": "string",
  34717. "pattern": "^evt_"
  34718. },
  34719. "type": {
  34720. "type": "string",
  34721. "enum": ["message.part.delta"]
  34722. },
  34723. "properties": {
  34724. "type": "object",
  34725. "properties": {
  34726. "sessionID": {
  34727. "type": "string",
  34728. "pattern": "^ses"
  34729. },
  34730. "messageID": {
  34731. "type": "string",
  34732. "pattern": "^msg"
  34733. },
  34734. "partID": {
  34735. "type": "string",
  34736. "pattern": "^prt"
  34737. },
  34738. "field": {
  34739. "type": "string"
  34740. },
  34741. "delta": {
  34742. "type": "string"
  34743. }
  34744. },
  34745. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  34746. "additionalProperties": false
  34747. }
  34748. },
  34749. "required": ["id", "type", "properties"],
  34750. "additionalProperties": false
  34751. },
  34752. "EventSessionDiff": {
  34753. "type": "object",
  34754. "properties": {
  34755. "id": {
  34756. "type": "string",
  34757. "pattern": "^evt_"
  34758. },
  34759. "type": {
  34760. "type": "string",
  34761. "enum": ["session.diff"]
  34762. },
  34763. "properties": {
  34764. "type": "object",
  34765. "properties": {
  34766. "sessionID": {
  34767. "type": "string",
  34768. "pattern": "^ses"
  34769. },
  34770. "diff": {
  34771. "type": "array",
  34772. "items": {
  34773. "$ref": "#/components/schemas/SnapshotFileDiff"
  34774. }
  34775. }
  34776. },
  34777. "required": ["sessionID", "diff"],
  34778. "additionalProperties": false
  34779. }
  34780. },
  34781. "required": ["id", "type", "properties"],
  34782. "additionalProperties": false
  34783. },
  34784. "EventSessionError": {
  34785. "type": "object",
  34786. "properties": {
  34787. "id": {
  34788. "type": "string",
  34789. "pattern": "^evt_"
  34790. },
  34791. "type": {
  34792. "type": "string",
  34793. "enum": ["session.error"]
  34794. },
  34795. "properties": {
  34796. "type": "object",
  34797. "properties": {
  34798. "sessionID": {
  34799. "type": "string",
  34800. "pattern": "^ses"
  34801. },
  34802. "error": {
  34803. "anyOf": [
  34804. {
  34805. "$ref": "#/components/schemas/ProviderAuthError"
  34806. },
  34807. {
  34808. "$ref": "#/components/schemas/UnknownError"
  34809. },
  34810. {
  34811. "$ref": "#/components/schemas/MessageOutputLengthError"
  34812. },
  34813. {
  34814. "$ref": "#/components/schemas/MessageAbortedError"
  34815. },
  34816. {
  34817. "$ref": "#/components/schemas/StructuredOutputError"
  34818. },
  34819. {
  34820. "$ref": "#/components/schemas/ContextOverflowError"
  34821. },
  34822. {
  34823. "$ref": "#/components/schemas/ContentFilterError"
  34824. },
  34825. {
  34826. "$ref": "#/components/schemas/APIError"
  34827. }
  34828. ]
  34829. }
  34830. },
  34831. "additionalProperties": false
  34832. }
  34833. },
  34834. "required": ["id", "type", "properties"],
  34835. "additionalProperties": false
  34836. },
  34837. "EventInstallationUpdated": {
  34838. "type": "object",
  34839. "properties": {
  34840. "id": {
  34841. "type": "string",
  34842. "pattern": "^evt_"
  34843. },
  34844. "type": {
  34845. "type": "string",
  34846. "enum": ["installation.updated"]
  34847. },
  34848. "properties": {
  34849. "type": "object",
  34850. "properties": {
  34851. "version": {
  34852. "type": "string"
  34853. }
  34854. },
  34855. "required": ["version"],
  34856. "additionalProperties": false
  34857. }
  34858. },
  34859. "required": ["id", "type", "properties"],
  34860. "additionalProperties": false
  34861. },
  34862. "EventInstallationUpdate-available": {
  34863. "type": "object",
  34864. "properties": {
  34865. "id": {
  34866. "type": "string",
  34867. "pattern": "^evt_"
  34868. },
  34869. "type": {
  34870. "type": "string",
  34871. "enum": ["installation.update-available"]
  34872. },
  34873. "properties": {
  34874. "type": "object",
  34875. "properties": {
  34876. "version": {
  34877. "type": "string"
  34878. }
  34879. },
  34880. "required": ["version"],
  34881. "additionalProperties": false
  34882. }
  34883. },
  34884. "required": ["id", "type", "properties"],
  34885. "additionalProperties": false
  34886. },
  34887. "EventFileEdited": {
  34888. "type": "object",
  34889. "properties": {
  34890. "id": {
  34891. "type": "string",
  34892. "pattern": "^evt_"
  34893. },
  34894. "type": {
  34895. "type": "string",
  34896. "enum": ["file.edited"]
  34897. },
  34898. "properties": {
  34899. "type": "object",
  34900. "properties": {
  34901. "file": {
  34902. "type": "string"
  34903. }
  34904. },
  34905. "required": ["file"],
  34906. "additionalProperties": false
  34907. }
  34908. },
  34909. "required": ["id", "type", "properties"],
  34910. "additionalProperties": false
  34911. },
  34912. "EventReferenceUpdated": {
  34913. "type": "object",
  34914. "properties": {
  34915. "id": {
  34916. "type": "string",
  34917. "pattern": "^evt_"
  34918. },
  34919. "type": {
  34920. "type": "string",
  34921. "enum": ["reference.updated"]
  34922. },
  34923. "properties": {
  34924. "type": "object",
  34925. "properties": {}
  34926. }
  34927. },
  34928. "required": ["id", "type", "properties"],
  34929. "additionalProperties": false
  34930. },
  34931. "EventPermissionV2Asked": {
  34932. "type": "object",
  34933. "properties": {
  34934. "id": {
  34935. "type": "string",
  34936. "pattern": "^evt_"
  34937. },
  34938. "type": {
  34939. "type": "string",
  34940. "enum": ["permission.v2.asked"]
  34941. },
  34942. "properties": {
  34943. "type": "object",
  34944. "properties": {
  34945. "id": {
  34946. "type": "string",
  34947. "pattern": "^per"
  34948. },
  34949. "sessionID": {
  34950. "type": "string",
  34951. "pattern": "^ses"
  34952. },
  34953. "action": {
  34954. "type": "string"
  34955. },
  34956. "resources": {
  34957. "type": "array",
  34958. "items": {
  34959. "type": "string"
  34960. }
  34961. },
  34962. "save": {
  34963. "type": "array",
  34964. "items": {
  34965. "type": "string"
  34966. }
  34967. },
  34968. "metadata": {
  34969. "type": "object"
  34970. },
  34971. "source": {
  34972. "$ref": "#/components/schemas/PermissionV2Source"
  34973. }
  34974. },
  34975. "required": ["id", "sessionID", "action", "resources"],
  34976. "additionalProperties": false
  34977. }
  34978. },
  34979. "required": ["id", "type", "properties"],
  34980. "additionalProperties": false
  34981. },
  34982. "EventPermissionV2Replied": {
  34983. "type": "object",
  34984. "properties": {
  34985. "id": {
  34986. "type": "string",
  34987. "pattern": "^evt_"
  34988. },
  34989. "type": {
  34990. "type": "string",
  34991. "enum": ["permission.v2.replied"]
  34992. },
  34993. "properties": {
  34994. "type": "object",
  34995. "properties": {
  34996. "sessionID": {
  34997. "type": "string",
  34998. "pattern": "^ses"
  34999. },
  35000. "requestID": {
  35001. "type": "string",
  35002. "pattern": "^per"
  35003. },
  35004. "reply": {
  35005. "$ref": "#/components/schemas/PermissionV2Reply"
  35006. }
  35007. },
  35008. "required": ["sessionID", "requestID", "reply"],
  35009. "additionalProperties": false
  35010. }
  35011. },
  35012. "required": ["id", "type", "properties"],
  35013. "additionalProperties": false
  35014. },
  35015. "EventPluginAdded": {
  35016. "type": "object",
  35017. "properties": {
  35018. "id": {
  35019. "type": "string",
  35020. "pattern": "^evt_"
  35021. },
  35022. "type": {
  35023. "type": "string",
  35024. "enum": ["plugin.added"]
  35025. },
  35026. "properties": {
  35027. "type": "object",
  35028. "properties": {
  35029. "id": {
  35030. "type": "string"
  35031. }
  35032. },
  35033. "required": ["id"],
  35034. "additionalProperties": false
  35035. }
  35036. },
  35037. "required": ["id", "type", "properties"],
  35038. "additionalProperties": false
  35039. },
  35040. "EventProjectDirectoriesUpdated": {
  35041. "type": "object",
  35042. "properties": {
  35043. "id": {
  35044. "type": "string",
  35045. "pattern": "^evt_"
  35046. },
  35047. "type": {
  35048. "type": "string",
  35049. "enum": ["project.directories.updated"]
  35050. },
  35051. "properties": {
  35052. "type": "object",
  35053. "properties": {
  35054. "projectID": {
  35055. "type": "string"
  35056. }
  35057. },
  35058. "required": ["projectID"],
  35059. "additionalProperties": false
  35060. }
  35061. },
  35062. "required": ["id", "type", "properties"],
  35063. "additionalProperties": false
  35064. },
  35065. "EventFileWatcherUpdated": {
  35066. "type": "object",
  35067. "properties": {
  35068. "id": {
  35069. "type": "string",
  35070. "pattern": "^evt_"
  35071. },
  35072. "type": {
  35073. "type": "string",
  35074. "enum": ["file.watcher.updated"]
  35075. },
  35076. "properties": {
  35077. "type": "object",
  35078. "properties": {
  35079. "file": {
  35080. "type": "string"
  35081. },
  35082. "event": {
  35083. "type": "string",
  35084. "enum": ["add", "change", "unlink"]
  35085. }
  35086. },
  35087. "required": ["file", "event"],
  35088. "additionalProperties": false
  35089. }
  35090. },
  35091. "required": ["id", "type", "properties"],
  35092. "additionalProperties": false
  35093. },
  35094. "EventPtyCreated": {
  35095. "type": "object",
  35096. "properties": {
  35097. "id": {
  35098. "type": "string",
  35099. "pattern": "^evt_"
  35100. },
  35101. "type": {
  35102. "type": "string",
  35103. "enum": ["pty.created"]
  35104. },
  35105. "properties": {
  35106. "type": "object",
  35107. "properties": {
  35108. "info": {
  35109. "$ref": "#/components/schemas/Pty"
  35110. }
  35111. },
  35112. "required": ["info"],
  35113. "additionalProperties": false
  35114. }
  35115. },
  35116. "required": ["id", "type", "properties"],
  35117. "additionalProperties": false
  35118. },
  35119. "EventPtyUpdated": {
  35120. "type": "object",
  35121. "properties": {
  35122. "id": {
  35123. "type": "string",
  35124. "pattern": "^evt_"
  35125. },
  35126. "type": {
  35127. "type": "string",
  35128. "enum": ["pty.updated"]
  35129. },
  35130. "properties": {
  35131. "type": "object",
  35132. "properties": {
  35133. "info": {
  35134. "$ref": "#/components/schemas/Pty"
  35135. }
  35136. },
  35137. "required": ["info"],
  35138. "additionalProperties": false
  35139. }
  35140. },
  35141. "required": ["id", "type", "properties"],
  35142. "additionalProperties": false
  35143. },
  35144. "EventPtyExited": {
  35145. "type": "object",
  35146. "properties": {
  35147. "id": {
  35148. "type": "string",
  35149. "pattern": "^evt_"
  35150. },
  35151. "type": {
  35152. "type": "string",
  35153. "enum": ["pty.exited"]
  35154. },
  35155. "properties": {
  35156. "type": "object",
  35157. "properties": {
  35158. "id": {
  35159. "type": "string",
  35160. "pattern": "^pty"
  35161. },
  35162. "exitCode": {
  35163. "type": "integer",
  35164. "minimum": 0
  35165. }
  35166. },
  35167. "required": ["id", "exitCode"],
  35168. "additionalProperties": false
  35169. }
  35170. },
  35171. "required": ["id", "type", "properties"],
  35172. "additionalProperties": false
  35173. },
  35174. "EventPtyDeleted": {
  35175. "type": "object",
  35176. "properties": {
  35177. "id": {
  35178. "type": "string",
  35179. "pattern": "^evt_"
  35180. },
  35181. "type": {
  35182. "type": "string",
  35183. "enum": ["pty.deleted"]
  35184. },
  35185. "properties": {
  35186. "type": "object",
  35187. "properties": {
  35188. "id": {
  35189. "type": "string",
  35190. "pattern": "^pty"
  35191. }
  35192. },
  35193. "required": ["id"],
  35194. "additionalProperties": false
  35195. }
  35196. },
  35197. "required": ["id", "type", "properties"],
  35198. "additionalProperties": false
  35199. },
  35200. "EventQuestionV2Asked": {
  35201. "type": "object",
  35202. "properties": {
  35203. "id": {
  35204. "type": "string",
  35205. "pattern": "^evt_"
  35206. },
  35207. "type": {
  35208. "type": "string",
  35209. "enum": ["question.v2.asked"]
  35210. },
  35211. "properties": {
  35212. "type": "object",
  35213. "properties": {
  35214. "id": {
  35215. "type": "string",
  35216. "pattern": "^que"
  35217. },
  35218. "sessionID": {
  35219. "type": "string",
  35220. "pattern": "^ses"
  35221. },
  35222. "questions": {
  35223. "type": "array",
  35224. "items": {
  35225. "$ref": "#/components/schemas/QuestionV2Info"
  35226. },
  35227. "description": "Questions to ask"
  35228. },
  35229. "tool": {
  35230. "$ref": "#/components/schemas/QuestionV2Tool"
  35231. }
  35232. },
  35233. "required": ["id", "sessionID", "questions"],
  35234. "additionalProperties": false
  35235. }
  35236. },
  35237. "required": ["id", "type", "properties"],
  35238. "additionalProperties": false
  35239. },
  35240. "EventQuestionV2Replied": {
  35241. "type": "object",
  35242. "properties": {
  35243. "id": {
  35244. "type": "string",
  35245. "pattern": "^evt_"
  35246. },
  35247. "type": {
  35248. "type": "string",
  35249. "enum": ["question.v2.replied"]
  35250. },
  35251. "properties": {
  35252. "type": "object",
  35253. "properties": {
  35254. "sessionID": {
  35255. "type": "string",
  35256. "pattern": "^ses"
  35257. },
  35258. "requestID": {
  35259. "type": "string",
  35260. "pattern": "^que"
  35261. },
  35262. "answers": {
  35263. "type": "array",
  35264. "items": {
  35265. "$ref": "#/components/schemas/QuestionV2Answer"
  35266. }
  35267. }
  35268. },
  35269. "required": ["sessionID", "requestID", "answers"],
  35270. "additionalProperties": false
  35271. }
  35272. },
  35273. "required": ["id", "type", "properties"],
  35274. "additionalProperties": false
  35275. },
  35276. "EventQuestionV2Rejected": {
  35277. "type": "object",
  35278. "properties": {
  35279. "id": {
  35280. "type": "string",
  35281. "pattern": "^evt_"
  35282. },
  35283. "type": {
  35284. "type": "string",
  35285. "enum": ["question.v2.rejected"]
  35286. },
  35287. "properties": {
  35288. "type": "object",
  35289. "properties": {
  35290. "sessionID": {
  35291. "type": "string",
  35292. "pattern": "^ses"
  35293. },
  35294. "requestID": {
  35295. "type": "string",
  35296. "pattern": "^que"
  35297. }
  35298. },
  35299. "required": ["sessionID", "requestID"],
  35300. "additionalProperties": false
  35301. }
  35302. },
  35303. "required": ["id", "type", "properties"],
  35304. "additionalProperties": false
  35305. },
  35306. "EventTodoUpdated": {
  35307. "type": "object",
  35308. "properties": {
  35309. "id": {
  35310. "type": "string",
  35311. "pattern": "^evt_"
  35312. },
  35313. "type": {
  35314. "type": "string",
  35315. "enum": ["todo.updated"]
  35316. },
  35317. "properties": {
  35318. "type": "object",
  35319. "properties": {
  35320. "sessionID": {
  35321. "type": "string",
  35322. "pattern": "^ses"
  35323. },
  35324. "todos": {
  35325. "type": "array",
  35326. "items": {
  35327. "$ref": "#/components/schemas/Todo"
  35328. }
  35329. }
  35330. },
  35331. "required": ["sessionID", "todos"],
  35332. "additionalProperties": false
  35333. }
  35334. },
  35335. "required": ["id", "type", "properties"],
  35336. "additionalProperties": false
  35337. },
  35338. "EventLspUpdated": {
  35339. "type": "object",
  35340. "properties": {
  35341. "id": {
  35342. "type": "string",
  35343. "pattern": "^evt_"
  35344. },
  35345. "type": {
  35346. "type": "string",
  35347. "enum": ["lsp.updated"]
  35348. },
  35349. "properties": {
  35350. "type": "object",
  35351. "properties": {}
  35352. }
  35353. },
  35354. "required": ["id", "type", "properties"],
  35355. "additionalProperties": false
  35356. },
  35357. "EventPermissionAsked": {
  35358. "type": "object",
  35359. "properties": {
  35360. "id": {
  35361. "type": "string",
  35362. "pattern": "^evt_"
  35363. },
  35364. "type": {
  35365. "type": "string",
  35366. "enum": ["permission.asked"]
  35367. },
  35368. "properties": {
  35369. "type": "object",
  35370. "properties": {
  35371. "id": {
  35372. "type": "string",
  35373. "pattern": "^per"
  35374. },
  35375. "sessionID": {
  35376. "type": "string",
  35377. "pattern": "^ses"
  35378. },
  35379. "permission": {
  35380. "type": "string"
  35381. },
  35382. "patterns": {
  35383. "type": "array",
  35384. "items": {
  35385. "type": "string"
  35386. }
  35387. },
  35388. "metadata": {
  35389. "type": "object"
  35390. },
  35391. "always": {
  35392. "type": "array",
  35393. "items": {
  35394. "type": "string"
  35395. }
  35396. },
  35397. "tool": {
  35398. "type": "object",
  35399. "properties": {
  35400. "messageID": {
  35401. "type": "string"
  35402. },
  35403. "callID": {
  35404. "type": "string"
  35405. }
  35406. },
  35407. "required": ["messageID", "callID"],
  35408. "additionalProperties": false
  35409. }
  35410. },
  35411. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  35412. "additionalProperties": false
  35413. }
  35414. },
  35415. "required": ["id", "type", "properties"],
  35416. "additionalProperties": false
  35417. },
  35418. "EventPermissionReplied": {
  35419. "type": "object",
  35420. "properties": {
  35421. "id": {
  35422. "type": "string",
  35423. "pattern": "^evt_"
  35424. },
  35425. "type": {
  35426. "type": "string",
  35427. "enum": ["permission.replied"]
  35428. },
  35429. "properties": {
  35430. "type": "object",
  35431. "properties": {
  35432. "sessionID": {
  35433. "type": "string",
  35434. "pattern": "^ses"
  35435. },
  35436. "requestID": {
  35437. "type": "string",
  35438. "pattern": "^per"
  35439. },
  35440. "reply": {
  35441. "type": "string",
  35442. "enum": ["once", "always", "reject"]
  35443. }
  35444. },
  35445. "required": ["sessionID", "requestID", "reply"],
  35446. "additionalProperties": false
  35447. }
  35448. },
  35449. "required": ["id", "type", "properties"],
  35450. "additionalProperties": false
  35451. },
  35452. "EventMcpToolsChanged": {
  35453. "type": "object",
  35454. "properties": {
  35455. "id": {
  35456. "type": "string",
  35457. "pattern": "^evt_"
  35458. },
  35459. "type": {
  35460. "type": "string",
  35461. "enum": ["mcp.tools.changed"]
  35462. },
  35463. "properties": {
  35464. "type": "object",
  35465. "properties": {
  35466. "server": {
  35467. "type": "string"
  35468. }
  35469. },
  35470. "required": ["server"],
  35471. "additionalProperties": false
  35472. }
  35473. },
  35474. "required": ["id", "type", "properties"],
  35475. "additionalProperties": false
  35476. },
  35477. "EventMcpBrowserOpenFailed": {
  35478. "type": "object",
  35479. "properties": {
  35480. "id": {
  35481. "type": "string",
  35482. "pattern": "^evt_"
  35483. },
  35484. "type": {
  35485. "type": "string",
  35486. "enum": ["mcp.browser.open.failed"]
  35487. },
  35488. "properties": {
  35489. "type": "object",
  35490. "properties": {
  35491. "mcpName": {
  35492. "type": "string"
  35493. },
  35494. "url": {
  35495. "type": "string"
  35496. }
  35497. },
  35498. "required": ["mcpName", "url"],
  35499. "additionalProperties": false
  35500. }
  35501. },
  35502. "required": ["id", "type", "properties"],
  35503. "additionalProperties": false
  35504. },
  35505. "EventCommandExecuted": {
  35506. "type": "object",
  35507. "properties": {
  35508. "id": {
  35509. "type": "string",
  35510. "pattern": "^evt_"
  35511. },
  35512. "type": {
  35513. "type": "string",
  35514. "enum": ["command.executed"]
  35515. },
  35516. "properties": {
  35517. "type": "object",
  35518. "properties": {
  35519. "name": {
  35520. "type": "string"
  35521. },
  35522. "sessionID": {
  35523. "type": "string",
  35524. "pattern": "^ses"
  35525. },
  35526. "arguments": {
  35527. "type": "string"
  35528. },
  35529. "messageID": {
  35530. "type": "string",
  35531. "pattern": "^msg"
  35532. }
  35533. },
  35534. "required": ["name", "sessionID", "arguments", "messageID"],
  35535. "additionalProperties": false
  35536. }
  35537. },
  35538. "required": ["id", "type", "properties"],
  35539. "additionalProperties": false
  35540. },
  35541. "EventProjectUpdated": {
  35542. "type": "object",
  35543. "properties": {
  35544. "id": {
  35545. "type": "string",
  35546. "pattern": "^evt_"
  35547. },
  35548. "type": {
  35549. "type": "string",
  35550. "enum": ["project.updated"]
  35551. },
  35552. "properties": {
  35553. "type": "object",
  35554. "properties": {
  35555. "id": {
  35556. "type": "string"
  35557. },
  35558. "worktree": {
  35559. "type": "string"
  35560. },
  35561. "vcs": {
  35562. "$ref": "#/components/schemas/ProjectVcs"
  35563. },
  35564. "name": {
  35565. "type": "string"
  35566. },
  35567. "icon": {
  35568. "$ref": "#/components/schemas/ProjectIcon"
  35569. },
  35570. "commands": {
  35571. "$ref": "#/components/schemas/ProjectCommands"
  35572. },
  35573. "time": {
  35574. "$ref": "#/components/schemas/ProjectTime"
  35575. },
  35576. "sandboxes": {
  35577. "type": "array",
  35578. "items": {
  35579. "type": "string"
  35580. }
  35581. }
  35582. },
  35583. "required": ["id", "worktree", "time", "sandboxes"],
  35584. "additionalProperties": false
  35585. }
  35586. },
  35587. "required": ["id", "type", "properties"],
  35588. "additionalProperties": false
  35589. },
  35590. "EventSessionStatus": {
  35591. "type": "object",
  35592. "properties": {
  35593. "id": {
  35594. "type": "string",
  35595. "pattern": "^evt_"
  35596. },
  35597. "type": {
  35598. "type": "string",
  35599. "enum": ["session.status"]
  35600. },
  35601. "properties": {
  35602. "type": "object",
  35603. "properties": {
  35604. "sessionID": {
  35605. "type": "string",
  35606. "pattern": "^ses"
  35607. },
  35608. "status": {
  35609. "$ref": "#/components/schemas/SessionStatus"
  35610. }
  35611. },
  35612. "required": ["sessionID", "status"],
  35613. "additionalProperties": false
  35614. }
  35615. },
  35616. "required": ["id", "type", "properties"],
  35617. "additionalProperties": false
  35618. },
  35619. "EventSessionIdle": {
  35620. "type": "object",
  35621. "properties": {
  35622. "id": {
  35623. "type": "string",
  35624. "pattern": "^evt_"
  35625. },
  35626. "type": {
  35627. "type": "string",
  35628. "enum": ["session.idle"]
  35629. },
  35630. "properties": {
  35631. "type": "object",
  35632. "properties": {
  35633. "sessionID": {
  35634. "type": "string",
  35635. "pattern": "^ses"
  35636. }
  35637. },
  35638. "required": ["sessionID"],
  35639. "additionalProperties": false
  35640. }
  35641. },
  35642. "required": ["id", "type", "properties"],
  35643. "additionalProperties": false
  35644. },
  35645. "EventQuestionAsked": {
  35646. "type": "object",
  35647. "properties": {
  35648. "id": {
  35649. "type": "string",
  35650. "pattern": "^evt_"
  35651. },
  35652. "type": {
  35653. "type": "string",
  35654. "enum": ["question.asked"]
  35655. },
  35656. "properties": {
  35657. "type": "object",
  35658. "properties": {
  35659. "id": {
  35660. "type": "string",
  35661. "pattern": "^que"
  35662. },
  35663. "sessionID": {
  35664. "type": "string",
  35665. "pattern": "^ses"
  35666. },
  35667. "questions": {
  35668. "type": "array",
  35669. "items": {
  35670. "$ref": "#/components/schemas/QuestionInfo"
  35671. },
  35672. "description": "Questions to ask"
  35673. },
  35674. "tool": {
  35675. "$ref": "#/components/schemas/QuestionTool"
  35676. }
  35677. },
  35678. "required": ["id", "sessionID", "questions"],
  35679. "additionalProperties": false
  35680. }
  35681. },
  35682. "required": ["id", "type", "properties"],
  35683. "additionalProperties": false
  35684. },
  35685. "EventQuestionReplied": {
  35686. "type": "object",
  35687. "properties": {
  35688. "id": {
  35689. "type": "string",
  35690. "pattern": "^evt_"
  35691. },
  35692. "type": {
  35693. "type": "string",
  35694. "enum": ["question.replied"]
  35695. },
  35696. "properties": {
  35697. "type": "object",
  35698. "properties": {
  35699. "sessionID": {
  35700. "type": "string",
  35701. "pattern": "^ses"
  35702. },
  35703. "requestID": {
  35704. "type": "string",
  35705. "pattern": "^que"
  35706. },
  35707. "answers": {
  35708. "type": "array",
  35709. "items": {
  35710. "$ref": "#/components/schemas/QuestionAnswer"
  35711. }
  35712. }
  35713. },
  35714. "required": ["sessionID", "requestID", "answers"],
  35715. "additionalProperties": false
  35716. }
  35717. },
  35718. "required": ["id", "type", "properties"],
  35719. "additionalProperties": false
  35720. },
  35721. "EventQuestionRejected": {
  35722. "type": "object",
  35723. "properties": {
  35724. "id": {
  35725. "type": "string",
  35726. "pattern": "^evt_"
  35727. },
  35728. "type": {
  35729. "type": "string",
  35730. "enum": ["question.rejected"]
  35731. },
  35732. "properties": {
  35733. "type": "object",
  35734. "properties": {
  35735. "sessionID": {
  35736. "type": "string",
  35737. "pattern": "^ses"
  35738. },
  35739. "requestID": {
  35740. "type": "string",
  35741. "pattern": "^que"
  35742. }
  35743. },
  35744. "required": ["sessionID", "requestID"],
  35745. "additionalProperties": false
  35746. }
  35747. },
  35748. "required": ["id", "type", "properties"],
  35749. "additionalProperties": false
  35750. },
  35751. "EventSessionCompacted": {
  35752. "type": "object",
  35753. "properties": {
  35754. "id": {
  35755. "type": "string",
  35756. "pattern": "^evt_"
  35757. },
  35758. "type": {
  35759. "type": "string",
  35760. "enum": ["session.compacted"]
  35761. },
  35762. "properties": {
  35763. "type": "object",
  35764. "properties": {
  35765. "sessionID": {
  35766. "type": "string",
  35767. "pattern": "^ses"
  35768. }
  35769. },
  35770. "required": ["sessionID"],
  35771. "additionalProperties": false
  35772. }
  35773. },
  35774. "required": ["id", "type", "properties"],
  35775. "additionalProperties": false
  35776. },
  35777. "EventVcsBranchUpdated": {
  35778. "type": "object",
  35779. "properties": {
  35780. "id": {
  35781. "type": "string",
  35782. "pattern": "^evt_"
  35783. },
  35784. "type": {
  35785. "type": "string",
  35786. "enum": ["vcs.branch.updated"]
  35787. },
  35788. "properties": {
  35789. "type": "object",
  35790. "properties": {
  35791. "branch": {
  35792. "type": "string"
  35793. }
  35794. },
  35795. "additionalProperties": false
  35796. }
  35797. },
  35798. "required": ["id", "type", "properties"],
  35799. "additionalProperties": false
  35800. },
  35801. "EventWorkspaceReady": {
  35802. "type": "object",
  35803. "properties": {
  35804. "id": {
  35805. "type": "string",
  35806. "pattern": "^evt_"
  35807. },
  35808. "type": {
  35809. "type": "string",
  35810. "enum": ["workspace.ready"]
  35811. },
  35812. "properties": {
  35813. "type": "object",
  35814. "properties": {
  35815. "name": {
  35816. "type": "string"
  35817. }
  35818. },
  35819. "required": ["name"],
  35820. "additionalProperties": false
  35821. }
  35822. },
  35823. "required": ["id", "type", "properties"],
  35824. "additionalProperties": false
  35825. },
  35826. "EventWorkspaceFailed": {
  35827. "type": "object",
  35828. "properties": {
  35829. "id": {
  35830. "type": "string",
  35831. "pattern": "^evt_"
  35832. },
  35833. "type": {
  35834. "type": "string",
  35835. "enum": ["workspace.failed"]
  35836. },
  35837. "properties": {
  35838. "type": "object",
  35839. "properties": {
  35840. "message": {
  35841. "type": "string"
  35842. }
  35843. },
  35844. "required": ["message"],
  35845. "additionalProperties": false
  35846. }
  35847. },
  35848. "required": ["id", "type", "properties"],
  35849. "additionalProperties": false
  35850. },
  35851. "EventWorkspaceStatus": {
  35852. "type": "object",
  35853. "properties": {
  35854. "id": {
  35855. "type": "string",
  35856. "pattern": "^evt_"
  35857. },
  35858. "type": {
  35859. "type": "string",
  35860. "enum": ["workspace.status"]
  35861. },
  35862. "properties": {
  35863. "type": "object",
  35864. "properties": {
  35865. "workspaceID": {
  35866. "type": "string",
  35867. "pattern": "^wrk"
  35868. },
  35869. "status": {
  35870. "type": "string",
  35871. "enum": ["connected", "connecting", "disconnected", "error"]
  35872. }
  35873. },
  35874. "required": ["workspaceID", "status"],
  35875. "additionalProperties": false
  35876. }
  35877. },
  35878. "required": ["id", "type", "properties"],
  35879. "additionalProperties": false
  35880. },
  35881. "EventWorktreeReady": {
  35882. "type": "object",
  35883. "properties": {
  35884. "id": {
  35885. "type": "string",
  35886. "pattern": "^evt_"
  35887. },
  35888. "type": {
  35889. "type": "string",
  35890. "enum": ["worktree.ready"]
  35891. },
  35892. "properties": {
  35893. "type": "object",
  35894. "properties": {
  35895. "name": {
  35896. "type": "string"
  35897. },
  35898. "branch": {
  35899. "type": "string"
  35900. }
  35901. },
  35902. "required": ["name"],
  35903. "additionalProperties": false
  35904. }
  35905. },
  35906. "required": ["id", "type", "properties"],
  35907. "additionalProperties": false
  35908. },
  35909. "EventWorktreeFailed": {
  35910. "type": "object",
  35911. "properties": {
  35912. "id": {
  35913. "type": "string",
  35914. "pattern": "^evt_"
  35915. },
  35916. "type": {
  35917. "type": "string",
  35918. "enum": ["worktree.failed"]
  35919. },
  35920. "properties": {
  35921. "type": "object",
  35922. "properties": {
  35923. "message": {
  35924. "type": "string"
  35925. }
  35926. },
  35927. "required": ["message"],
  35928. "additionalProperties": false
  35929. }
  35930. },
  35931. "required": ["id", "type", "properties"],
  35932. "additionalProperties": false
  35933. },
  35934. "EventServerConnected": {
  35935. "type": "object",
  35936. "properties": {
  35937. "id": {
  35938. "type": "string",
  35939. "pattern": "^evt_"
  35940. },
  35941. "type": {
  35942. "type": "string",
  35943. "enum": ["server.connected"]
  35944. },
  35945. "properties": {
  35946. "type": "object",
  35947. "properties": {}
  35948. }
  35949. },
  35950. "required": ["id", "type", "properties"],
  35951. "additionalProperties": false
  35952. },
  35953. "EventGlobalDisposed": {
  35954. "type": "object",
  35955. "properties": {
  35956. "id": {
  35957. "type": "string",
  35958. "pattern": "^evt_"
  35959. },
  35960. "type": {
  35961. "type": "string",
  35962. "enum": ["global.disposed"]
  35963. },
  35964. "properties": {
  35965. "type": "object",
  35966. "properties": {}
  35967. }
  35968. },
  35969. "required": ["id", "type", "properties"],
  35970. "additionalProperties": false
  35971. },
  35972. "CredentialOAuth": {
  35973. "type": "object",
  35974. "properties": {
  35975. "type": {
  35976. "type": "string",
  35977. "enum": ["oauth"]
  35978. },
  35979. "methodID": {
  35980. "type": "string"
  35981. },
  35982. "refresh": {
  35983. "type": "string"
  35984. },
  35985. "access": {
  35986. "type": "string"
  35987. },
  35988. "expires": {
  35989. "type": "integer",
  35990. "minimum": 0
  35991. },
  35992. "metadata": {
  35993. "type": "object"
  35994. }
  35995. },
  35996. "required": ["type", "methodID", "refresh", "access", "expires"],
  35997. "additionalProperties": false
  35998. },
  35999. "CredentialKey": {
  36000. "type": "object",
  36001. "properties": {
  36002. "type": {
  36003. "type": "string",
  36004. "enum": ["key"]
  36005. },
  36006. "key": {
  36007. "type": "string"
  36008. },
  36009. "metadata": {
  36010. "type": "object"
  36011. }
  36012. },
  36013. "required": ["type", "key"],
  36014. "additionalProperties": false
  36015. },
  36016. "SkillV2DirectorySource": {
  36017. "type": "object",
  36018. "properties": {
  36019. "type": {
  36020. "type": "string",
  36021. "enum": ["directory"]
  36022. },
  36023. "path": {
  36024. "type": "string"
  36025. }
  36026. },
  36027. "required": ["type", "path"],
  36028. "additionalProperties": false
  36029. },
  36030. "SkillV2UrlSource": {
  36031. "type": "object",
  36032. "properties": {
  36033. "type": {
  36034. "type": "string",
  36035. "enum": ["url"]
  36036. },
  36037. "url": {
  36038. "type": "string"
  36039. }
  36040. },
  36041. "required": ["type", "url"],
  36042. "additionalProperties": false
  36043. },
  36044. "SkillV2EmbeddedSource": {
  36045. "type": "object",
  36046. "properties": {
  36047. "type": {
  36048. "type": "string",
  36049. "enum": ["embedded"]
  36050. },
  36051. "skill": {
  36052. "$ref": "#/components/schemas/SkillV2Info"
  36053. }
  36054. },
  36055. "required": ["type", "skill"],
  36056. "additionalProperties": false
  36057. },
  36058. "BadRequestError": {
  36059. "type": "object",
  36060. "required": ["name", "data"],
  36061. "properties": {
  36062. "name": {
  36063. "type": "string",
  36064. "enum": ["BadRequest"]
  36065. },
  36066. "data": {
  36067. "type": "object",
  36068. "required": ["message"],
  36069. "properties": {
  36070. "message": {
  36071. "type": "string"
  36072. },
  36073. "kind": {
  36074. "type": "string",
  36075. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  36076. }
  36077. }
  36078. }
  36079. }
  36080. }
  36081. }
  36082. },
  36083. "security": [],
  36084. "tags": [
  36085. {
  36086. "name": "control",
  36087. "description": "Control plane routes."
  36088. },
  36089. {
  36090. "name": "controlPlane",
  36091. "description": "Control-plane orchestration routes."
  36092. },
  36093. {
  36094. "name": "global",
  36095. "description": "Global server routes."
  36096. },
  36097. {
  36098. "name": "event",
  36099. "description": "Instance event stream route."
  36100. },
  36101. {
  36102. "name": "config",
  36103. "description": "Experimental HttpApi config routes."
  36104. },
  36105. {
  36106. "name": "experimental",
  36107. "description": "Experimental HttpApi read-only routes."
  36108. },
  36109. {
  36110. "name": "file",
  36111. "description": "Experimental HttpApi file routes."
  36112. },
  36113. {
  36114. "name": "instance",
  36115. "description": "Experimental HttpApi instance read routes."
  36116. },
  36117. {
  36118. "name": "mcp",
  36119. "description": "Experimental HttpApi MCP routes."
  36120. },
  36121. {
  36122. "name": "project",
  36123. "description": "Experimental HttpApi project routes."
  36124. },
  36125. {
  36126. "name": "projectCopy",
  36127. "description": "Project copy naming routes."
  36128. },
  36129. {
  36130. "name": "pty",
  36131. "description": "Experimental HttpApi PTY routes."
  36132. },
  36133. {
  36134. "name": "question",
  36135. "description": "Question routes."
  36136. },
  36137. {
  36138. "name": "permission",
  36139. "description": "Experimental HttpApi permission routes."
  36140. },
  36141. {
  36142. "name": "provider",
  36143. "description": "Experimental HttpApi provider routes."
  36144. },
  36145. {
  36146. "name": "session",
  36147. "description": "Experimental HttpApi session routes."
  36148. },
  36149. {
  36150. "name": "sync",
  36151. "description": "Experimental HttpApi sync routes."
  36152. },
  36153. {
  36154. "name": "tui",
  36155. "description": "Experimental HttpApi TUI routes."
  36156. },
  36157. {
  36158. "name": "workspace",
  36159. "description": "Experimental HttpApi workspace routes."
  36160. },
  36161. {
  36162. "name": "opencode HttpApi",
  36163. "description": "Experimental HttpApi surface for selected instance routes."
  36164. },
  36165. {
  36166. "name": "opencode HttpApi",
  36167. "description": "Experimental HttpApi surface for selected instance routes."
  36168. },
  36169. {
  36170. "name": "opencode HttpApi",
  36171. "description": "Experimental HttpApi surface for selected instance routes."
  36172. },
  36173. {
  36174. "name": "sessions",
  36175. "description": "Experimental session routes."
  36176. },
  36177. {
  36178. "name": "messages",
  36179. "description": "Experimental message routes."
  36180. },
  36181. {
  36182. "name": "models",
  36183. "description": "Experimental model routes."
  36184. },
  36185. {
  36186. "name": "providers",
  36187. "description": "Experimental provider routes."
  36188. },
  36189. {
  36190. "name": "integrations",
  36191. "description": "Integration discovery and authentication routes."
  36192. },
  36193. {
  36194. "name": "opencode HttpApi",
  36195. "description": "Experimental HttpApi surface for selected instance routes."
  36196. },
  36197. {
  36198. "name": "permissions",
  36199. "description": "Experimental permission routes."
  36200. },
  36201. {
  36202. "name": "filesystem",
  36203. "description": "Experimental location-scoped filesystem routes."
  36204. },
  36205. {
  36206. "name": "commands",
  36207. "description": "Experimental command routes."
  36208. },
  36209. {
  36210. "name": "skills",
  36211. "description": "Experimental skill routes."
  36212. },
  36213. {
  36214. "name": "events",
  36215. "description": "Experimental event stream route."
  36216. },
  36217. {
  36218. "name": "pty",
  36219. "description": "Experimental location-scoped PTY routes."
  36220. },
  36221. {
  36222. "name": "session questions",
  36223. "description": "Experimental session question routes."
  36224. },
  36225. {
  36226. "name": "reference",
  36227. "description": "Location-scoped project references."
  36228. },
  36229. {
  36230. "name": "projectCopy",
  36231. "description": "Project copy management routes."
  36232. },
  36233. {
  36234. "name": "pty",
  36235. "description": "PTY websocket route."
  36236. }
  36237. ]
  36238. }