openapi.json 1002 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440274412744227443274442744527446274472744827449274502745127452274532745427455274562745727458274592746027461274622746327464274652746627467274682746927470274712747227473274742747527476274772747827479274802748127482274832748427485274862748727488274892749027491274922749327494274952749627497274982749927500275012750227503275042750527506275072750827509275102751127512275132751427515275162751727518275192752027521275222752327524275252752627527275282752927530275312753227533275342753527536275372753827539275402754127542275432754427545275462754727548275492755027551275522755327554275552755627557275582755927560275612756227563275642756527566275672756827569275702757127572275732757427575275762757727578275792758027581275822758327584275852758627587275882758927590275912759227593275942759527596275972759827599276002760127602276032760427605276062760727608276092761027611276122761327614276152761627617276182761927620276212762227623276242762527626276272762827629276302763127632276332763427635276362763727638276392764027641276422764327644276452764627647276482764927650276512765227653276542765527656276572765827659276602766127662276632766427665276662766727668276692767027671276722767327674276752767627677276782767927680276812768227683276842768527686276872768827689276902769127692276932769427695276962769727698276992770027701277022770327704277052770627707277082770927710277112771227713277142771527716277172771827719277202772127722277232772427725277262772727728277292773027731277322773327734277352773627737277382773927740277412774227743277442774527746277472774827749277502775127752277532775427755277562775727758277592776027761277622776327764277652776627767277682776927770277712777227773277742777527776277772777827779277802778127782277832778427785277862778727788277892779027791277922779327794277952779627797277982779927800278012780227803278042780527806278072780827809278102781127812278132781427815278162781727818278192782027821278222782327824278252782627827278282782927830278312783227833278342783527836278372783827839278402784127842278432784427845278462784727848278492785027851278522785327854278552785627857278582785927860278612786227863278642786527866278672786827869278702787127872278732787427875278762787727878278792788027881278822788327884278852788627887278882788927890278912789227893278942789527896278972789827899279002790127902279032790427905279062790727908279092791027911279122791327914279152791627917279182791927920279212792227923279242792527926279272792827929279302793127932279332793427935279362793727938279392794027941279422794327944279452794627947279482794927950279512795227953279542795527956279572795827959279602796127962279632796427965279662796727968279692797027971279722797327974279752797627977279782797927980279812798227983279842798527986279872798827989279902799127992279932799427995279962799727998279992800028001280022800328004280052800628007280082800928010280112801228013280142801528016280172801828019280202802128022280232802428025280262802728028280292803028031280322803328034280352803628037280382803928040280412804228043280442804528046280472804828049280502805128052280532805428055280562805728058280592806028061280622806328064280652806628067280682806928070280712807228073280742807528076280772807828079280802808128082280832808428085280862808728088280892809028091280922809328094280952809628097280982809928100281012810228103281042810528106281072810828109281102811128112281132811428115281162811728118281192812028121281222812328124281252812628127281282812928130281312813228133281342813528136281372813828139281402814128142281432814428145281462814728148281492815028151281522815328154281552815628157281582815928160281612816228163281642816528166281672816828169281702817128172281732817428175281762817728178281792818028181281822818328184281852818628187281882818928190281912819228193281942819528196281972819828199282002820128202282032820428205282062820728208282092821028211282122821328214282152821628217282182821928220282212822228223282242822528226282272822828229282302823128232282332823428235282362823728238282392824028241282422824328244282452824628247282482824928250282512825228253282542825528256282572825828259282602826128262282632826428265282662826728268282692827028271282722827328274282752827628277282782827928280282812828228283282842828528286282872828828289282902829128292282932829428295282962829728298282992830028301283022830328304283052830628307283082830928310283112831228313283142831528316283172831828319283202832128322283232832428325283262832728328283292833028331283322833328334283352833628337283382833928340283412834228343283442834528346283472834828349283502835128352283532835428355283562835728358283592836028361283622836328364283652836628367283682836928370283712837228373283742837528376283772837828379283802838128382283832838428385283862838728388283892839028391283922839328394283952839628397283982839928400284012840228403284042840528406284072840828409284102841128412284132841428415284162841728418284192842028421284222842328424284252842628427284282842928430284312843228433284342843528436284372843828439284402844128442284432844428445284462844728448284492845028451284522845328454284552845628457284582845928460284612846228463284642846528466284672846828469284702847128472284732847428475284762847728478284792848028481284822848328484284852848628487284882848928490284912849228493284942849528496284972849828499285002850128502285032850428505285062850728508285092851028511285122851328514285152851628517285182851928520285212852228523285242852528526285272852828529285302853128532285332853428535285362853728538285392854028541285422854328544285452854628547285482854928550285512855228553285542855528556285572855828559285602856128562285632856428565285662856728568285692857028571285722857328574285752857628577285782857928580285812858228583285842858528586285872858828589285902859128592285932859428595285962859728598285992860028601286022860328604286052860628607286082860928610286112861228613286142861528616286172861828619286202862128622286232862428625286262862728628286292863028631286322863328634286352863628637286382863928640286412864228643286442864528646286472864828649286502865128652286532865428655286562865728658286592866028661286622866328664286652866628667286682866928670286712867228673286742867528676286772867828679286802868128682286832868428685286862868728688286892869028691286922869328694286952869628697286982869928700287012870228703287042870528706287072870828709287102871128712287132871428715287162871728718287192872028721287222872328724287252872628727287282872928730287312873228733287342873528736287372873828739287402874128742287432874428745287462874728748287492875028751287522875328754287552875628757287582875928760287612876228763287642876528766287672876828769287702877128772287732877428775287762877728778287792878028781287822878328784287852878628787287882878928790287912879228793287942879528796287972879828799288002880128802288032880428805288062880728808288092881028811288122881328814288152881628817288182881928820288212882228823288242882528826288272882828829288302883128832288332883428835288362883728838288392884028841288422884328844288452884628847288482884928850288512885228853288542885528856288572885828859288602886128862288632886428865288662886728868288692887028871288722887328874288752887628877288782887928880288812888228883288842888528886288872888828889288902889128892288932889428895288962889728898288992890028901289022890328904289052890628907289082890928910289112891228913289142891528916289172891828919289202892128922289232892428925289262892728928289292893028931289322893328934289352893628937289382893928940289412894228943289442894528946289472894828949289502895128952289532895428955289562895728958289592896028961289622896328964289652896628967289682896928970289712897228973289742897528976289772897828979289802898128982289832898428985289862898728988289892899028991289922899328994289952899628997289982899929000290012900229003290042900529006290072900829009290102901129012290132901429015290162901729018290192902029021290222902329024290252902629027290282902929030290312903229033290342903529036290372903829039290402904129042290432904429045290462904729048290492905029051290522905329054290552905629057290582905929060290612906229063290642906529066290672906829069290702907129072290732907429075290762907729078290792908029081290822908329084290852908629087290882908929090290912909229093290942909529096290972909829099291002910129102291032910429105291062910729108291092911029111291122911329114291152911629117291182911929120291212912229123291242912529126291272912829129291302913129132291332913429135291362913729138291392914029141291422914329144291452914629147291482914929150291512915229153291542915529156291572915829159291602916129162291632916429165291662916729168291692917029171291722917329174291752917629177291782917929180291812918229183291842918529186291872918829189291902919129192291932919429195291962919729198291992920029201292022920329204292052920629207292082920929210292112921229213292142921529216292172921829219292202922129222292232922429225292262922729228292292923029231292322923329234292352923629237292382923929240292412924229243292442924529246292472924829249292502925129252292532925429255292562925729258292592926029261292622926329264292652926629267292682926929270292712927229273292742927529276292772927829279292802928129282292832928429285292862928729288292892929029291292922929329294292952929629297292982929929300293012930229303293042930529306293072930829309293102931129312293132931429315293162931729318293192932029321293222932329324293252932629327293282932929330293312933229333293342933529336293372933829339293402934129342293432934429345293462934729348293492935029351293522935329354293552935629357293582935929360293612936229363293642936529366293672936829369293702937129372293732937429375293762937729378293792938029381293822938329384293852938629387293882938929390293912939229393293942939529396293972939829399294002940129402294032940429405294062940729408294092941029411294122941329414294152941629417294182941929420294212942229423294242942529426294272942829429294302943129432294332943429435294362943729438294392944029441294422944329444294452944629447294482944929450294512945229453294542945529456294572945829459294602946129462294632946429465294662946729468294692947029471294722947329474294752947629477294782947929480294812948229483294842948529486294872948829489294902949129492294932949429495294962949729498294992950029501295022950329504295052950629507295082950929510295112951229513295142951529516295172951829519295202952129522295232952429525295262952729528295292953029531295322953329534295352953629537295382953929540295412954229543295442954529546295472954829549295502955129552295532955429555295562955729558295592956029561295622956329564295652956629567295682956929570295712957229573295742957529576295772957829579295802958129582295832958429585295862958729588295892959029591295922959329594295952959629597295982959929600296012960229603296042960529606296072960829609296102961129612296132961429615296162961729618296192962029621296222962329624296252962629627296282962929630296312963229633296342963529636296372963829639296402964129642296432964429645296462964729648296492965029651296522965329654296552965629657296582965929660296612966229663296642966529666296672966829669296702967129672296732967429675296762967729678296792968029681296822968329684296852968629687296882968929690296912969229693296942969529696296972969829699297002970129702297032970429705297062970729708297092971029711297122971329714297152971629717297182971929720297212972229723297242972529726297272972829729297302973129732297332973429735297362973729738297392974029741297422974329744297452974629747297482974929750297512975229753297542975529756297572975829759297602976129762297632976429765297662976729768297692977029771297722977329774297752977629777297782977929780297812978229783297842978529786297872978829789297902979129792297932979429795297962979729798297992980029801298022980329804298052980629807298082980929810298112981229813298142981529816298172981829819298202982129822298232982429825298262982729828298292983029831298322983329834298352983629837298382983929840298412984229843298442984529846298472984829849298502985129852298532985429855298562985729858298592986029861298622986329864298652986629867298682986929870298712987229873298742987529876298772987829879298802988129882298832988429885298862988729888298892989029891298922989329894298952989629897298982989929900299012990229903299042990529906299072990829909299102991129912299132991429915299162991729918299192992029921299222992329924299252992629927299282992929930299312993229933299342993529936299372993829939299402994129942299432994429945299462994729948299492995029951299522995329954299552995629957299582995929960299612996229963299642996529966299672996829969299702997129972299732997429975299762997729978299792998029981299822998329984299852998629987299882998929990299912999229993299942999529996299972999829999300003000130002300033000430005300063000730008300093001030011300123001330014300153001630017300183001930020300213002230023300243002530026300273002830029300303003130032300333003430035300363003730038300393004030041300423004330044300453004630047300483004930050300513005230053300543005530056300573005830059300603006130062300633006430065300663006730068300693007030071300723007330074300753007630077300783007930080300813008230083300843008530086300873008830089300903009130092300933009430095300963009730098300993010030101301023010330104301053010630107301083010930110301113011230113301143011530116301173011830119301203012130122301233012430125301263012730128301293013030131301323013330134301353013630137301383013930140301413014230143301443014530146301473014830149301503015130152301533015430155301563015730158301593016030161301623016330164301653016630167301683016930170301713017230173301743017530176301773017830179301803018130182301833018430185301863018730188301893019030191301923019330194301953019630197301983019930200302013020230203302043020530206302073020830209302103021130212302133021430215302163021730218302193022030221302223022330224302253022630227302283022930230302313023230233302343023530236302373023830239302403024130242302433024430245302463024730248302493025030251302523025330254302553025630257302583025930260302613026230263302643026530266302673026830269302703027130272302733027430275302763027730278302793028030281302823028330284302853028630287302883028930290302913029230293302943029530296302973029830299303003030130302303033030430305303063030730308303093031030311303123031330314303153031630317303183031930320303213032230323303243032530326303273032830329303303033130332303333033430335303363033730338303393034030341303423034330344303453034630347303483034930350303513035230353303543035530356303573035830359303603036130362303633036430365303663036730368303693037030371303723037330374303753037630377303783037930380303813038230383303843038530386303873038830389303903039130392303933039430395303963039730398303993040030401304023040330404304053040630407304083040930410304113041230413304143041530416304173041830419304203042130422304233042430425304263042730428304293043030431304323043330434304353043630437304383043930440304413044230443304443044530446304473044830449304503045130452304533045430455304563045730458304593046030461304623046330464304653046630467304683046930470304713047230473304743047530476304773047830479304803048130482304833048430485304863048730488304893049030491304923049330494304953049630497304983049930500305013050230503305043050530506305073050830509305103051130512305133051430515305163051730518305193052030521305223052330524305253052630527305283052930530305313053230533305343053530536305373053830539305403054130542305433054430545305463054730548305493055030551305523055330554305553055630557305583055930560305613056230563305643056530566305673056830569305703057130572305733057430575305763057730578305793058030581305823058330584305853058630587305883058930590305913059230593305943059530596305973059830599306003060130602306033060430605306063060730608306093061030611306123061330614306153061630617306183061930620306213062230623306243062530626306273062830629306303063130632306333063430635306363063730638306393064030641306423064330644306453064630647306483064930650306513065230653306543065530656306573065830659306603066130662306633066430665306663066730668306693067030671306723067330674306753067630677306783067930680306813068230683306843068530686306873068830689306903069130692306933069430695306963069730698306993070030701307023070330704307053070630707307083070930710307113071230713307143071530716307173071830719307203072130722307233072430725307263072730728307293073030731307323073330734307353073630737307383073930740307413074230743307443074530746307473074830749307503075130752307533075430755307563075730758307593076030761307623076330764307653076630767307683076930770307713077230773307743077530776307773077830779307803078130782307833078430785307863078730788307893079030791307923079330794307953079630797307983079930800308013080230803308043080530806308073080830809308103081130812308133081430815308163081730818308193082030821308223082330824308253082630827308283082930830308313083230833308343083530836308373083830839308403084130842308433084430845308463084730848308493085030851308523085330854308553085630857308583085930860308613086230863308643086530866308673086830869308703087130872308733087430875308763087730878308793088030881308823088330884308853088630887308883088930890308913089230893308943089530896308973089830899309003090130902309033090430905309063090730908309093091030911309123091330914309153091630917309183091930920309213092230923309243092530926309273092830929309303093130932309333093430935309363093730938309393094030941309423094330944309453094630947309483094930950309513095230953309543095530956309573095830959309603096130962309633096430965309663096730968309693097030971309723097330974309753097630977309783097930980309813098230983309843098530986309873098830989309903099130992309933099430995309963099730998309993100031001310023100331004310053100631007310083100931010310113101231013310143101531016310173101831019310203102131022310233102431025310263102731028310293103031031310323103331034310353103631037310383103931040310413104231043310443104531046310473104831049310503105131052310533105431055310563105731058310593106031061310623106331064310653106631067310683106931070310713107231073310743107531076310773107831079310803108131082310833108431085310863108731088310893109031091310923109331094310953109631097310983109931100311013110231103311043110531106311073110831109311103111131112311133111431115311163111731118311193112031121311223112331124311253112631127311283112931130311313113231133311343113531136311373113831139311403114131142311433114431145311463114731148311493115031151311523115331154311553115631157311583115931160311613116231163311643116531166311673116831169311703117131172311733117431175311763117731178311793118031181311823118331184311853118631187311883118931190311913119231193311943119531196311973119831199312003120131202312033120431205312063120731208312093121031211312123121331214312153121631217312183121931220312213122231223312243122531226312273122831229312303123131232312333123431235312363123731238312393124031241312423124331244312453124631247312483124931250312513125231253312543125531256312573125831259312603126131262312633126431265312663126731268312693127031271312723127331274312753127631277312783127931280312813128231283312843128531286312873128831289312903129131292312933129431295312963129731298312993130031301313023130331304313053130631307313083130931310313113131231313313143131531316313173131831319313203132131322313233132431325313263132731328313293133031331313323133331334313353133631337313383133931340313413134231343313443134531346313473134831349313503135131352313533135431355313563135731358313593136031361313623136331364313653136631367313683136931370313713137231373313743137531376313773137831379313803138131382313833138431385313863138731388313893139031391313923139331394313953139631397313983139931400314013140231403314043140531406314073140831409314103141131412314133141431415314163141731418314193142031421314223142331424314253142631427314283142931430314313143231433314343143531436314373143831439314403144131442314433144431445314463144731448314493145031451314523145331454314553145631457314583145931460314613146231463314643146531466314673146831469314703147131472314733147431475314763147731478314793148031481314823148331484314853148631487314883148931490314913149231493314943149531496314973149831499315003150131502315033150431505315063150731508315093151031511315123151331514315153151631517315183151931520315213152231523315243152531526315273152831529315303153131532315333153431535315363153731538315393154031541315423154331544315453154631547315483154931550315513155231553315543155531556315573155831559315603156131562315633156431565315663156731568315693157031571315723157331574315753157631577315783157931580315813158231583315843158531586315873158831589315903159131592315933159431595315963159731598315993160031601316023160331604316053160631607316083160931610316113161231613316143161531616316173161831619316203162131622316233162431625316263162731628316293163031631316323163331634316353163631637316383163931640316413164231643316443164531646316473164831649316503165131652316533165431655316563165731658316593166031661316623166331664316653166631667316683166931670316713167231673316743167531676316773167831679316803168131682316833168431685316863168731688316893169031691316923169331694316953169631697316983169931700317013170231703317043170531706317073170831709317103171131712317133171431715317163171731718317193172031721317223172331724317253172631727317283172931730317313173231733317343173531736317373173831739317403174131742317433174431745317463174731748317493175031751317523175331754317553175631757317583175931760317613176231763317643176531766317673176831769317703177131772317733177431775317763177731778317793178031781317823178331784317853178631787317883178931790317913179231793317943179531796317973179831799318003180131802318033180431805318063180731808318093181031811318123181331814318153181631817318183181931820318213182231823318243182531826318273182831829318303183131832318333183431835318363183731838318393184031841318423184331844318453184631847318483184931850318513185231853318543185531856318573185831859318603186131862318633186431865318663186731868318693187031871318723187331874318753187631877318783187931880318813188231883318843188531886318873188831889318903189131892318933189431895318963189731898318993190031901319023190331904319053190631907319083190931910319113191231913319143191531916319173191831919319203192131922319233192431925319263192731928319293193031931319323193331934319353193631937319383193931940319413194231943319443194531946319473194831949319503195131952319533195431955319563195731958319593196031961319623196331964319653196631967319683196931970319713197231973319743197531976319773197831979319803198131982319833198431985319863198731988319893199031991319923199331994319953199631997319983199932000320013200232003320043200532006320073200832009320103201132012320133201432015320163201732018320193202032021320223202332024320253202632027320283202932030320313203232033320343203532036320373203832039320403204132042320433204432045320463204732048320493205032051320523205332054320553205632057320583205932060320613206232063320643206532066320673206832069320703207132072320733207432075320763207732078320793208032081320823208332084320853208632087320883208932090320913209232093320943209532096320973209832099321003210132102321033210432105321063210732108321093211032111321123211332114321153211632117321183211932120321213212232123321243212532126321273212832129321303213132132321333213432135321363213732138321393214032141321423214332144321453214632147321483214932150321513215232153321543215532156321573215832159321603216132162321633216432165321663216732168321693217032171321723217332174321753217632177321783217932180321813218232183321843218532186321873218832189321903219132192321933219432195321963219732198321993220032201322023220332204322053220632207322083220932210322113221232213322143221532216322173221832219322203222132222322233222432225322263222732228322293223032231322323223332234322353223632237322383223932240322413224232243322443224532246322473224832249322503225132252322533225432255322563225732258322593226032261322623226332264322653226632267322683226932270322713227232273322743227532276322773227832279322803228132282322833228432285322863228732288322893229032291322923229332294322953229632297322983229932300323013230232303323043230532306323073230832309323103231132312323133231432315323163231732318323193232032321323223232332324323253232632327323283232932330323313233232333323343233532336323373233832339323403234132342323433234432345323463234732348323493235032351323523235332354323553235632357323583235932360323613236232363323643236532366323673236832369323703237132372323733237432375323763237732378323793238032381323823238332384323853238632387323883238932390323913239232393323943239532396323973239832399324003240132402324033240432405324063240732408324093241032411324123241332414324153241632417324183241932420324213242232423324243242532426324273242832429324303243132432324333243432435324363243732438324393244032441324423244332444324453244632447324483244932450324513245232453324543245532456324573245832459324603246132462324633246432465324663246732468324693247032471324723247332474324753247632477324783247932480324813248232483324843248532486324873248832489324903249132492324933249432495324963249732498324993250032501325023250332504325053250632507325083250932510325113251232513325143251532516325173251832519325203252132522325233252432525325263252732528325293253032531325323253332534325353253632537325383253932540325413254232543325443254532546325473254832549325503255132552325533255432555325563255732558325593256032561325623256332564325653256632567325683256932570325713257232573325743257532576325773257832579325803258132582325833258432585325863258732588325893259032591325923259332594325953259632597325983259932600326013260232603326043260532606326073260832609326103261132612326133261432615326163261732618326193262032621326223262332624326253262632627326283262932630326313263232633326343263532636326373263832639326403264132642326433264432645326463264732648326493265032651326523265332654326553265632657326583265932660326613266232663326643266532666326673266832669326703267132672326733267432675326763267732678326793268032681326823268332684326853268632687326883268932690326913269232693326943269532696326973269832699327003270132702327033270432705327063270732708327093271032711327123271332714327153271632717327183271932720327213272232723327243272532726327273272832729327303273132732327333273432735327363273732738327393274032741327423274332744327453274632747327483274932750327513275232753327543275532756327573275832759327603276132762327633276432765327663276732768327693277032771327723277332774327753277632777327783277932780327813278232783327843278532786327873278832789327903279132792327933279432795327963279732798327993280032801328023280332804328053280632807328083280932810328113281232813328143281532816328173281832819328203282132822328233282432825328263282732828328293283032831328323283332834328353283632837328383283932840328413284232843328443284532846328473284832849328503285132852328533285432855328563285732858328593286032861328623286332864328653286632867328683286932870328713287232873328743287532876328773287832879328803288132882328833288432885328863288732888328893289032891328923289332894328953289632897328983289932900329013290232903329043290532906329073290832909329103291132912329133291432915329163291732918329193292032921329223292332924329253292632927329283292932930329313293232933329343293532936329373293832939329403294132942329433294432945329463294732948329493295032951329523295332954329553295632957329583295932960329613296232963329643296532966329673296832969329703297132972329733297432975329763297732978329793298032981329823298332984329853298632987329883298932990329913299232993329943299532996329973299832999330003300133002330033300433005330063300733008330093301033011330123301333014330153301633017330183301933020330213302233023330243302533026330273302833029330303303133032330333303433035330363303733038330393304033041330423304333044330453304633047330483304933050330513305233053330543305533056330573305833059330603306133062330633306433065330663306733068330693307033071330723307333074330753307633077330783307933080330813308233083330843308533086330873308833089330903309133092330933309433095330963309733098330993310033101331023310333104331053310633107331083310933110331113311233113331143311533116331173311833119331203312133122331233312433125331263312733128331293313033131331323313333134331353313633137331383313933140331413314233143331443314533146331473314833149331503315133152331533315433155331563315733158331593316033161331623316333164331653316633167331683316933170331713317233173331743317533176331773317833179331803318133182331833318433185331863318733188331893319033191331923319333194331953319633197331983319933200332013320233203332043320533206332073320833209332103321133212332133321433215332163321733218332193322033221332223322333224332253322633227332283322933230332313323233233332343323533236332373323833239332403324133242332433324433245332463324733248332493325033251332523325333254332553325633257332583325933260332613326233263332643326533266332673326833269332703327133272332733327433275332763327733278332793328033281332823328333284332853328633287332883328933290332913329233293332943329533296332973329833299333003330133302333033330433305333063330733308333093331033311333123331333314333153331633317333183331933320333213332233323333243332533326333273332833329333303333133332333333333433335333363333733338333393334033341333423334333344333453334633347333483334933350333513335233353333543335533356333573335833359333603336133362333633336433365333663336733368333693337033371333723337333374333753337633377333783337933380333813338233383333843338533386333873338833389333903339133392333933339433395333963339733398333993340033401334023340333404334053340633407334083340933410334113341233413334143341533416334173341833419334203342133422334233342433425334263342733428334293343033431334323343333434334353343633437334383343933440334413344233443334443344533446334473344833449334503345133452334533345433455334563345733458334593346033461334623346333464334653346633467334683346933470334713347233473334743347533476334773347833479334803348133482334833348433485334863348733488334893349033491334923349333494334953349633497334983349933500335013350233503335043350533506335073350833509335103351133512335133351433515335163351733518335193352033521335223352333524335253352633527335283352933530335313353233533335343353533536335373353833539335403354133542335433354433545335463354733548335493355033551335523355333554335553355633557335583355933560335613356233563335643356533566335673356833569335703357133572335733357433575335763357733578335793358033581335823358333584335853358633587335883358933590335913359233593335943359533596335973359833599336003360133602336033360433605336063360733608336093361033611336123361333614336153361633617336183361933620336213362233623336243362533626336273362833629336303363133632336333363433635336363363733638336393364033641336423364333644336453364633647336483364933650336513365233653336543365533656336573365833659336603366133662336633366433665336663366733668336693367033671336723367333674336753367633677336783367933680336813368233683336843368533686336873368833689336903369133692336933369433695336963369733698336993370033701337023370333704337053370633707337083370933710337113371233713337143371533716337173371833719337203372133722337233372433725337263372733728337293373033731337323373333734337353373633737337383373933740337413374233743337443374533746337473374833749337503375133752337533375433755337563375733758337593376033761337623376333764337653376633767337683376933770337713377233773337743377533776337773377833779337803378133782337833378433785337863378733788337893379033791337923379333794337953379633797337983379933800338013380233803338043380533806338073380833809338103381133812338133381433815338163381733818338193382033821338223382333824338253382633827338283382933830338313383233833338343383533836338373383833839338403384133842338433384433845338463384733848338493385033851338523385333854338553385633857338583385933860338613386233863338643386533866338673386833869338703387133872338733387433875338763387733878338793388033881338823388333884338853388633887338883388933890338913389233893338943389533896338973389833899339003390133902339033390433905339063390733908339093391033911339123391333914339153391633917339183391933920339213392233923339243392533926339273392833929339303393133932339333393433935339363393733938339393394033941339423394333944339453394633947339483394933950339513395233953339543395533956339573395833959339603396133962339633396433965339663396733968339693397033971339723397333974339753397633977339783397933980339813398233983339843398533986339873398833989339903399133992339933399433995339963399733998339993400034001340023400334004340053400634007340083400934010340113401234013340143401534016340173401834019340203402134022340233402434025340263402734028340293403034031340323403334034340353403634037340383403934040340413404234043340443404534046340473404834049340503405134052340533405434055340563405734058340593406034061340623406334064340653406634067340683406934070340713407234073340743407534076340773407834079340803408134082340833408434085340863408734088340893409034091340923409334094340953409634097340983409934100341013410234103341043410534106341073410834109341103411134112341133411434115341163411734118341193412034121341223412334124341253412634127341283412934130341313413234133341343413534136341373413834139341403414134142341433414434145341463414734148341493415034151341523415334154341553415634157341583415934160341613416234163341643416534166341673416834169341703417134172341733417434175341763417734178341793418034181341823418334184341853418634187341883418934190341913419234193341943419534196341973419834199342003420134202342033420434205342063420734208342093421034211342123421334214342153421634217342183421934220342213422234223342243422534226342273422834229342303423134232342333423434235342363423734238342393424034241342423424334244342453424634247342483424934250342513425234253342543425534256342573425834259342603426134262342633426434265342663426734268342693427034271342723427334274342753427634277342783427934280342813428234283342843428534286342873428834289342903429134292342933429434295342963429734298342993430034301343023430334304343053430634307343083430934310343113431234313343143431534316343173431834319343203432134322343233432434325343263432734328343293433034331343323433334334343353433634337343383433934340343413434234343343443434534346343473434834349343503435134352343533435434355343563435734358343593436034361343623436334364343653436634367343683436934370343713437234373343743437534376343773437834379343803438134382343833438434385343863438734388343893439034391343923439334394343953439634397343983439934400344013440234403344043440534406344073440834409344103441134412344133441434415344163441734418344193442034421344223442334424344253442634427344283442934430344313443234433344343443534436344373443834439344403444134442344433444434445344463444734448344493445034451344523445334454344553445634457344583445934460344613446234463344643446534466344673446834469344703447134472344733447434475344763447734478344793448034481344823448334484344853448634487344883448934490344913449234493344943449534496344973449834499345003450134502345033450434505345063450734508345093451034511345123451334514345153451634517345183451934520345213452234523345243452534526345273452834529345303453134532345333453434535345363453734538345393454034541345423454334544345453454634547345483454934550345513455234553345543455534556345573455834559345603456134562345633456434565345663456734568345693457034571345723457334574345753457634577345783457934580345813458234583345843458534586345873458834589345903459134592345933459434595345963459734598345993460034601346023460334604346053460634607346083460934610346113461234613346143461534616346173461834619346203462134622346233462434625346263462734628346293463034631346323463334634346353463634637346383463934640346413464234643346443464534646346473464834649346503465134652346533465434655346563465734658346593466034661346623466334664346653466634667346683466934670346713467234673346743467534676346773467834679346803468134682346833468434685346863468734688346893469034691346923469334694346953469634697346983469934700347013470234703347043470534706347073470834709347103471134712347133471434715347163471734718347193472034721347223472334724347253472634727347283472934730347313473234733347343473534736347373473834739347403474134742347433474434745347463474734748347493475034751347523475334754347553475634757347583475934760347613476234763347643476534766347673476834769347703477134772347733477434775347763477734778347793478034781347823478334784347853478634787347883478934790347913479234793347943479534796347973479834799348003480134802348033480434805348063480734808348093481034811348123481334814348153481634817348183481934820348213482234823348243482534826348273482834829348303483134832348333483434835348363483734838348393484034841348423484334844348453484634847348483484934850348513485234853348543485534856348573485834859348603486134862348633486434865348663486734868348693487034871348723487334874348753487634877348783487934880348813488234883348843488534886348873488834889348903489134892348933489434895348963489734898348993490034901349023490334904349053490634907349083490934910349113491234913349143491534916349173491834919349203492134922349233492434925349263492734928349293493034931349323493334934349353493634937349383493934940349413494234943349443494534946349473494834949349503495134952349533495434955349563495734958349593496034961349623496334964349653496634967349683496934970349713497234973349743497534976349773497834979349803498134982349833498434985349863498734988349893499034991349923499334994349953499634997349983499935000350013500235003350043500535006350073500835009350103501135012350133501435015350163501735018350193502035021350223502335024350253502635027350283502935030350313503235033350343503535036350373503835039350403504135042350433504435045350463504735048350493505035051350523505335054350553505635057350583505935060350613506235063350643506535066350673506835069350703507135072350733507435075350763507735078350793508035081350823508335084350853508635087350883508935090350913509235093350943509535096350973509835099351003510135102351033510435105351063510735108351093511035111351123511335114351153511635117351183511935120351213512235123351243512535126351273512835129351303513135132351333513435135351363513735138351393514035141351423514335144351453514635147351483514935150351513515235153351543515535156351573515835159351603516135162351633516435165351663516735168351693517035171351723517335174351753517635177351783517935180351813518235183351843518535186351873518835189351903519135192351933519435195351963519735198351993520035201352023520335204352053520635207352083520935210352113521235213352143521535216352173521835219352203522135222352233522435225352263522735228352293523035231352323523335234352353523635237352383523935240352413524235243352443524535246352473524835249352503525135252352533525435255352563525735258352593526035261352623526335264352653526635267352683526935270352713527235273352743527535276352773527835279352803528135282352833528435285352863528735288352893529035291352923529335294352953529635297352983529935300353013530235303353043530535306353073530835309353103531135312353133531435315353163531735318353193532035321353223532335324353253532635327353283532935330353313533235333353343533535336353373533835339353403534135342353433534435345353463534735348353493535035351353523535335354353553535635357353583535935360353613536235363353643536535366353673536835369353703537135372353733537435375353763537735378353793538035381353823538335384353853538635387353883538935390353913539235393353943539535396353973539835399354003540135402354033540435405354063540735408354093541035411354123541335414354153541635417354183541935420354213542235423354243542535426354273542835429354303543135432354333543435435354363543735438354393544035441354423544335444354453544635447354483544935450354513545235453354543545535456354573545835459354603546135462354633546435465354663546735468354693547035471354723547335474354753547635477354783547935480354813548235483354843548535486354873548835489354903549135492354933549435495354963549735498354993550035501355023550335504355053550635507355083550935510355113551235513355143551535516355173551835519355203552135522355233552435525355263552735528
  1. {
  2. "openapi": "3.1.0",
  3. "info": {
  4. "title": "opencode",
  5. "version": "1.0.0",
  6. "description": "opencode api"
  7. },
  8. "paths": {
  9. "/auth/{providerID}": {
  10. "put": {
  11. "tags": ["control"],
  12. "operationId": "auth.set",
  13. "parameters": [
  14. {
  15. "name": "providerID",
  16. "in": "path",
  17. "schema": {
  18. "type": "string"
  19. },
  20. "required": true
  21. }
  22. ],
  23. "responses": {
  24. "200": {
  25. "description": "Successfully set authentication credentials",
  26. "content": {
  27. "application/json": {
  28. "schema": {
  29. "type": "boolean",
  30. "description": "Successfully set authentication credentials"
  31. }
  32. }
  33. }
  34. },
  35. "400": {
  36. "description": "BadRequest | InvalidRequestError",
  37. "content": {
  38. "application/json": {
  39. "schema": {
  40. "anyOf": [
  41. {
  42. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  43. },
  44. {
  45. "$ref": "#/components/schemas/InvalidRequestError"
  46. }
  47. ]
  48. }
  49. }
  50. }
  51. }
  52. },
  53. "description": "Set authentication credentials",
  54. "summary": "Set auth credentials",
  55. "requestBody": {
  56. "content": {
  57. "application/json": {
  58. "schema": {
  59. "$ref": "#/components/schemas/Auth"
  60. }
  61. }
  62. }
  63. },
  64. "x-codeSamples": [
  65. {
  66. "lang": "js",
  67. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.set({\n ...\n})"
  68. }
  69. ]
  70. },
  71. "delete": {
  72. "tags": ["control"],
  73. "operationId": "auth.remove",
  74. "parameters": [
  75. {
  76. "name": "providerID",
  77. "in": "path",
  78. "schema": {
  79. "type": "string"
  80. },
  81. "required": true
  82. }
  83. ],
  84. "responses": {
  85. "200": {
  86. "description": "Successfully removed authentication credentials",
  87. "content": {
  88. "application/json": {
  89. "schema": {
  90. "type": "boolean",
  91. "description": "Successfully removed authentication credentials"
  92. }
  93. }
  94. }
  95. },
  96. "400": {
  97. "description": "BadRequest | InvalidRequestError",
  98. "content": {
  99. "application/json": {
  100. "schema": {
  101. "anyOf": [
  102. {
  103. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  104. },
  105. {
  106. "$ref": "#/components/schemas/InvalidRequestError"
  107. }
  108. ]
  109. }
  110. }
  111. }
  112. }
  113. },
  114. "description": "Remove authentication credentials",
  115. "summary": "Remove auth credentials",
  116. "x-codeSamples": [
  117. {
  118. "lang": "js",
  119. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.remove({\n ...\n})"
  120. }
  121. ]
  122. }
  123. },
  124. "/log": {
  125. "post": {
  126. "tags": ["control"],
  127. "operationId": "app.log",
  128. "parameters": [
  129. {
  130. "name": "directory",
  131. "in": "query",
  132. "schema": {
  133. "type": "string"
  134. },
  135. "required": false
  136. },
  137. {
  138. "name": "workspace",
  139. "in": "query",
  140. "schema": {
  141. "type": "string"
  142. },
  143. "required": false
  144. }
  145. ],
  146. "responses": {
  147. "200": {
  148. "description": "Log entry written successfully",
  149. "content": {
  150. "application/json": {
  151. "schema": {
  152. "type": "boolean",
  153. "description": "Log entry written successfully"
  154. }
  155. }
  156. }
  157. },
  158. "400": {
  159. "description": "BadRequest | InvalidRequestError",
  160. "content": {
  161. "application/json": {
  162. "schema": {
  163. "anyOf": [
  164. {
  165. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  166. },
  167. {
  168. "$ref": "#/components/schemas/InvalidRequestError"
  169. }
  170. ]
  171. }
  172. }
  173. }
  174. }
  175. },
  176. "description": "Write a log entry to the server logs with specified level and metadata.",
  177. "summary": "Write log",
  178. "requestBody": {
  179. "content": {
  180. "application/json": {
  181. "schema": {
  182. "type": "object",
  183. "properties": {
  184. "service": {
  185. "type": "string",
  186. "description": "Service name for the log entry"
  187. },
  188. "level": {
  189. "type": "string",
  190. "enum": ["debug", "info", "error", "warn"],
  191. "description": "Log level"
  192. },
  193. "message": {
  194. "type": "string",
  195. "description": "Log message"
  196. },
  197. "extra": {
  198. "type": "object"
  199. }
  200. },
  201. "required": ["service", "level", "message"],
  202. "additionalProperties": false
  203. }
  204. }
  205. }
  206. },
  207. "x-codeSamples": [
  208. {
  209. "lang": "js",
  210. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.log({\n ...\n})"
  211. }
  212. ]
  213. }
  214. },
  215. "/experimental/control-plane/move-session": {
  216. "post": {
  217. "tags": ["controlPlane"],
  218. "operationId": "experimental.controlPlane.moveSession",
  219. "parameters": [],
  220. "responses": {
  221. "204": {
  222. "description": "Session moved"
  223. },
  224. "400": {
  225. "description": "MoveSessionError | InvalidRequestError",
  226. "content": {
  227. "application/json": {
  228. "schema": {
  229. "anyOf": [
  230. {
  231. "$ref": "#/components/schemas/MoveSessionError"
  232. },
  233. {
  234. "$ref": "#/components/schemas/InvalidRequestError"
  235. }
  236. ]
  237. }
  238. }
  239. }
  240. }
  241. },
  242. "description": "Move a session to another project directory, optionally transferring local changes.",
  243. "summary": "Move session",
  244. "requestBody": {
  245. "content": {
  246. "application/json": {
  247. "schema": {
  248. "type": "object",
  249. "properties": {
  250. "sessionID": {
  251. "type": "string",
  252. "pattern": "^ses"
  253. },
  254. "destination": {
  255. "$ref": "#/components/schemas/MoveSessionDestination"
  256. },
  257. "moveChanges": {
  258. "type": "boolean"
  259. }
  260. },
  261. "required": ["sessionID", "destination"],
  262. "additionalProperties": false
  263. }
  264. }
  265. }
  266. },
  267. "x-codeSamples": [
  268. {
  269. "lang": "js",
  270. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.controlPlane.moveSession({\n ...\n})"
  271. }
  272. ]
  273. }
  274. },
  275. "/global/health": {
  276. "get": {
  277. "tags": ["global"],
  278. "operationId": "global.health",
  279. "parameters": [],
  280. "responses": {
  281. "200": {
  282. "description": "Health information",
  283. "content": {
  284. "application/json": {
  285. "schema": {
  286. "type": "object",
  287. "properties": {
  288. "healthy": {
  289. "type": "boolean",
  290. "enum": [true]
  291. },
  292. "version": {
  293. "type": "string"
  294. }
  295. },
  296. "required": ["healthy", "version"],
  297. "additionalProperties": false,
  298. "description": "Health information"
  299. }
  300. }
  301. }
  302. },
  303. "400": {
  304. "description": "Bad request",
  305. "content": {
  306. "application/json": {
  307. "schema": {
  308. "$ref": "#/components/schemas/BadRequestError"
  309. }
  310. }
  311. }
  312. }
  313. },
  314. "description": "Get health information about the OpenCode server.",
  315. "summary": "Get health",
  316. "x-codeSamples": [
  317. {
  318. "lang": "js",
  319. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.health({\n ...\n})"
  320. }
  321. ]
  322. }
  323. },
  324. "/global/event": {
  325. "get": {
  326. "tags": ["global"],
  327. "operationId": "global.event",
  328. "parameters": [],
  329. "responses": {
  330. "200": {
  331. "description": "Event stream",
  332. "content": {
  333. "text/event-stream": {
  334. "schema": {
  335. "$ref": "#/components/schemas/GlobalEvent"
  336. }
  337. }
  338. }
  339. },
  340. "400": {
  341. "description": "Bad request",
  342. "content": {
  343. "application/json": {
  344. "schema": {
  345. "$ref": "#/components/schemas/BadRequestError"
  346. }
  347. }
  348. }
  349. }
  350. },
  351. "description": "Subscribe to global events from the OpenCode system using server-sent events.",
  352. "summary": "Get global events",
  353. "x-codeSamples": [
  354. {
  355. "lang": "js",
  356. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.event({\n ...\n})"
  357. }
  358. ]
  359. }
  360. },
  361. "/global/config": {
  362. "get": {
  363. "tags": ["global"],
  364. "operationId": "global.config.get",
  365. "parameters": [],
  366. "responses": {
  367. "200": {
  368. "description": "Get global config info",
  369. "content": {
  370. "application/json": {
  371. "schema": {
  372. "$ref": "#/components/schemas/Config"
  373. }
  374. }
  375. }
  376. },
  377. "400": {
  378. "description": "Bad request",
  379. "content": {
  380. "application/json": {
  381. "schema": {
  382. "$ref": "#/components/schemas/BadRequestError"
  383. }
  384. }
  385. }
  386. }
  387. },
  388. "description": "Retrieve the current global OpenCode configuration settings and preferences.",
  389. "summary": "Get global configuration",
  390. "x-codeSamples": [
  391. {
  392. "lang": "js",
  393. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.get({\n ...\n})"
  394. }
  395. ]
  396. },
  397. "patch": {
  398. "tags": ["global"],
  399. "operationId": "global.config.update",
  400. "parameters": [],
  401. "responses": {
  402. "200": {
  403. "description": "Successfully updated global config",
  404. "content": {
  405. "application/json": {
  406. "schema": {
  407. "$ref": "#/components/schemas/Config"
  408. }
  409. }
  410. }
  411. },
  412. "400": {
  413. "description": "BadRequest | InvalidRequestError",
  414. "content": {
  415. "application/json": {
  416. "schema": {
  417. "anyOf": [
  418. {
  419. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  420. },
  421. {
  422. "$ref": "#/components/schemas/InvalidRequestError"
  423. }
  424. ]
  425. }
  426. }
  427. }
  428. }
  429. },
  430. "description": "Update global OpenCode configuration settings and preferences.",
  431. "summary": "Update global configuration",
  432. "requestBody": {
  433. "content": {
  434. "application/json": {
  435. "schema": {
  436. "$ref": "#/components/schemas/Config"
  437. }
  438. }
  439. }
  440. },
  441. "x-codeSamples": [
  442. {
  443. "lang": "js",
  444. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.update({\n ...\n})"
  445. }
  446. ]
  447. }
  448. },
  449. "/global/dispose": {
  450. "post": {
  451. "tags": ["global"],
  452. "operationId": "global.dispose",
  453. "parameters": [],
  454. "responses": {
  455. "200": {
  456. "description": "Global disposed",
  457. "content": {
  458. "application/json": {
  459. "schema": {
  460. "type": "boolean",
  461. "description": "Global disposed"
  462. }
  463. }
  464. }
  465. },
  466. "400": {
  467. "description": "Bad request",
  468. "content": {
  469. "application/json": {
  470. "schema": {
  471. "$ref": "#/components/schemas/BadRequestError"
  472. }
  473. }
  474. }
  475. }
  476. },
  477. "description": "Clean up and dispose all OpenCode instances, releasing all resources.",
  478. "summary": "Dispose instance",
  479. "x-codeSamples": [
  480. {
  481. "lang": "js",
  482. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.dispose({\n ...\n})"
  483. }
  484. ]
  485. }
  486. },
  487. "/global/upgrade": {
  488. "post": {
  489. "tags": ["global"],
  490. "operationId": "global.upgrade",
  491. "parameters": [],
  492. "responses": {
  493. "200": {
  494. "description": "Upgrade result",
  495. "content": {
  496. "application/json": {
  497. "schema": {
  498. "anyOf": [
  499. {
  500. "type": "object",
  501. "properties": {
  502. "success": {
  503. "type": "boolean",
  504. "enum": [true]
  505. },
  506. "version": {
  507. "type": "string"
  508. }
  509. },
  510. "required": ["success", "version"],
  511. "additionalProperties": false
  512. },
  513. {
  514. "type": "object",
  515. "properties": {
  516. "success": {
  517. "type": "boolean",
  518. "enum": [false]
  519. },
  520. "error": {
  521. "type": "string"
  522. }
  523. },
  524. "required": ["success", "error"],
  525. "additionalProperties": false
  526. }
  527. ],
  528. "description": "Upgrade result"
  529. }
  530. }
  531. }
  532. },
  533. "400": {
  534. "description": "BadRequest | InvalidRequestError",
  535. "content": {
  536. "application/json": {
  537. "schema": {
  538. "anyOf": [
  539. {
  540. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  541. },
  542. {
  543. "$ref": "#/components/schemas/InvalidRequestError"
  544. }
  545. ]
  546. }
  547. }
  548. }
  549. }
  550. },
  551. "description": "Upgrade opencode to the specified version or latest if not specified.",
  552. "summary": "Upgrade opencode",
  553. "requestBody": {
  554. "content": {
  555. "application/json": {
  556. "schema": {
  557. "type": "object",
  558. "properties": {
  559. "target": {
  560. "type": "string"
  561. }
  562. },
  563. "additionalProperties": false
  564. }
  565. }
  566. }
  567. },
  568. "x-codeSamples": [
  569. {
  570. "lang": "js",
  571. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.upgrade({\n ...\n})"
  572. }
  573. ]
  574. }
  575. },
  576. "/event": {
  577. "get": {
  578. "tags": ["event"],
  579. "operationId": "event.subscribe",
  580. "parameters": [
  581. {
  582. "name": "directory",
  583. "in": "query",
  584. "schema": {
  585. "type": "string"
  586. },
  587. "required": false
  588. },
  589. {
  590. "name": "workspace",
  591. "in": "query",
  592. "schema": {
  593. "type": "string"
  594. },
  595. "required": false
  596. }
  597. ],
  598. "responses": {
  599. "200": {
  600. "description": "Event stream",
  601. "content": {
  602. "text/event-stream": {
  603. "schema": {
  604. "$ref": "#/components/schemas/Event"
  605. }
  606. }
  607. }
  608. }
  609. },
  610. "description": "Get events",
  611. "summary": "Subscribe to events",
  612. "x-codeSamples": [
  613. {
  614. "lang": "js",
  615. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.event.subscribe({\n ...\n})"
  616. }
  617. ]
  618. }
  619. },
  620. "/config": {
  621. "get": {
  622. "tags": ["config"],
  623. "operationId": "config.get",
  624. "parameters": [
  625. {
  626. "name": "directory",
  627. "in": "query",
  628. "schema": {
  629. "type": "string"
  630. },
  631. "required": false
  632. },
  633. {
  634. "name": "workspace",
  635. "in": "query",
  636. "schema": {
  637. "type": "string"
  638. },
  639. "required": false
  640. }
  641. ],
  642. "responses": {
  643. "200": {
  644. "description": "Get config info",
  645. "content": {
  646. "application/json": {
  647. "schema": {
  648. "$ref": "#/components/schemas/Config"
  649. }
  650. }
  651. }
  652. },
  653. "400": {
  654. "description": "Bad request",
  655. "content": {
  656. "application/json": {
  657. "schema": {
  658. "$ref": "#/components/schemas/BadRequestError"
  659. }
  660. }
  661. }
  662. }
  663. },
  664. "description": "Retrieve the current OpenCode configuration settings and preferences.",
  665. "summary": "Get configuration",
  666. "x-codeSamples": [
  667. {
  668. "lang": "js",
  669. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.get({\n ...\n})"
  670. }
  671. ]
  672. },
  673. "patch": {
  674. "tags": ["config"],
  675. "operationId": "config.update",
  676. "parameters": [
  677. {
  678. "name": "directory",
  679. "in": "query",
  680. "schema": {
  681. "type": "string"
  682. },
  683. "required": false
  684. },
  685. {
  686. "name": "workspace",
  687. "in": "query",
  688. "schema": {
  689. "type": "string"
  690. },
  691. "required": false
  692. }
  693. ],
  694. "responses": {
  695. "200": {
  696. "description": "Successfully updated config",
  697. "content": {
  698. "application/json": {
  699. "schema": {
  700. "$ref": "#/components/schemas/Config"
  701. }
  702. }
  703. }
  704. },
  705. "400": {
  706. "description": "BadRequest | InvalidRequestError",
  707. "content": {
  708. "application/json": {
  709. "schema": {
  710. "anyOf": [
  711. {
  712. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  713. },
  714. {
  715. "$ref": "#/components/schemas/InvalidRequestError"
  716. }
  717. ]
  718. }
  719. }
  720. }
  721. }
  722. },
  723. "description": "Update OpenCode configuration settings and preferences.",
  724. "summary": "Update configuration",
  725. "requestBody": {
  726. "content": {
  727. "application/json": {
  728. "schema": {
  729. "$ref": "#/components/schemas/Config"
  730. }
  731. }
  732. }
  733. },
  734. "x-codeSamples": [
  735. {
  736. "lang": "js",
  737. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.update({\n ...\n})"
  738. }
  739. ]
  740. }
  741. },
  742. "/config/providers": {
  743. "get": {
  744. "tags": ["config"],
  745. "operationId": "config.providers",
  746. "parameters": [
  747. {
  748. "name": "directory",
  749. "in": "query",
  750. "schema": {
  751. "type": "string"
  752. },
  753. "required": false
  754. },
  755. {
  756. "name": "workspace",
  757. "in": "query",
  758. "schema": {
  759. "type": "string"
  760. },
  761. "required": false
  762. }
  763. ],
  764. "responses": {
  765. "200": {
  766. "description": "List of providers",
  767. "content": {
  768. "application/json": {
  769. "schema": {
  770. "type": "object",
  771. "properties": {
  772. "providers": {
  773. "type": "array",
  774. "items": {
  775. "$ref": "#/components/schemas/Provider"
  776. }
  777. },
  778. "default": {
  779. "type": "object",
  780. "additionalProperties": {
  781. "type": "string"
  782. }
  783. }
  784. },
  785. "required": ["providers", "default"],
  786. "additionalProperties": false,
  787. "description": "List of providers"
  788. }
  789. }
  790. }
  791. },
  792. "400": {
  793. "description": "Bad request",
  794. "content": {
  795. "application/json": {
  796. "schema": {
  797. "$ref": "#/components/schemas/BadRequestError"
  798. }
  799. }
  800. }
  801. }
  802. },
  803. "description": "Get a list of all configured AI providers and their default models.",
  804. "summary": "List config providers",
  805. "x-codeSamples": [
  806. {
  807. "lang": "js",
  808. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.providers({\n ...\n})"
  809. }
  810. ]
  811. }
  812. },
  813. "/experimental/capabilities": {
  814. "get": {
  815. "tags": ["experimental"],
  816. "operationId": "experimental.capabilities.get",
  817. "parameters": [
  818. {
  819. "name": "directory",
  820. "in": "query",
  821. "schema": {
  822. "type": "string"
  823. },
  824. "required": false
  825. },
  826. {
  827. "name": "workspace",
  828. "in": "query",
  829. "schema": {
  830. "type": "string"
  831. },
  832. "required": false
  833. }
  834. ],
  835. "responses": {
  836. "200": {
  837. "description": "Experimental capabilities",
  838. "content": {
  839. "application/json": {
  840. "schema": {
  841. "$ref": "#/components/schemas/ExperimentalCapabilities"
  842. }
  843. }
  844. }
  845. },
  846. "400": {
  847. "description": "Bad request",
  848. "content": {
  849. "application/json": {
  850. "schema": {
  851. "$ref": "#/components/schemas/BadRequestError"
  852. }
  853. }
  854. }
  855. }
  856. },
  857. "description": "Get experimental features enabled on the OpenCode server.",
  858. "summary": "Get experimental capabilities",
  859. "x-codeSamples": [
  860. {
  861. "lang": "js",
  862. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.capabilities.get({\n ...\n})"
  863. }
  864. ]
  865. }
  866. },
  867. "/experimental/console": {
  868. "get": {
  869. "tags": ["experimental"],
  870. "operationId": "experimental.console.get",
  871. "parameters": [
  872. {
  873. "name": "directory",
  874. "in": "query",
  875. "schema": {
  876. "type": "string"
  877. },
  878. "required": false
  879. },
  880. {
  881. "name": "workspace",
  882. "in": "query",
  883. "schema": {
  884. "type": "string"
  885. },
  886. "required": false
  887. }
  888. ],
  889. "responses": {
  890. "200": {
  891. "description": "Active Console provider metadata",
  892. "content": {
  893. "application/json": {
  894. "schema": {
  895. "$ref": "#/components/schemas/ConsoleState"
  896. }
  897. }
  898. }
  899. },
  900. "400": {
  901. "description": "Bad request",
  902. "content": {
  903. "application/json": {
  904. "schema": {
  905. "$ref": "#/components/schemas/BadRequestError"
  906. }
  907. }
  908. }
  909. },
  910. "500": {
  911. "description": "InternalServerError",
  912. "content": {
  913. "application/json": {
  914. "schema": {
  915. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  916. }
  917. }
  918. }
  919. }
  920. },
  921. "description": "Get the active Console org name and the set of provider IDs managed by that Console org.",
  922. "summary": "Get active Console provider metadata",
  923. "x-codeSamples": [
  924. {
  925. "lang": "js",
  926. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.get({\n ...\n})"
  927. }
  928. ]
  929. }
  930. },
  931. "/experimental/console/orgs": {
  932. "get": {
  933. "tags": ["experimental"],
  934. "operationId": "experimental.console.listOrgs",
  935. "parameters": [
  936. {
  937. "name": "directory",
  938. "in": "query",
  939. "schema": {
  940. "type": "string"
  941. },
  942. "required": false
  943. },
  944. {
  945. "name": "workspace",
  946. "in": "query",
  947. "schema": {
  948. "type": "string"
  949. },
  950. "required": false
  951. }
  952. ],
  953. "responses": {
  954. "200": {
  955. "description": "Switchable Console orgs",
  956. "content": {
  957. "application/json": {
  958. "schema": {
  959. "type": "object",
  960. "properties": {
  961. "orgs": {
  962. "type": "array",
  963. "items": {
  964. "type": "object",
  965. "properties": {
  966. "accountID": {
  967. "type": "string"
  968. },
  969. "accountEmail": {
  970. "type": "string"
  971. },
  972. "accountUrl": {
  973. "type": "string"
  974. },
  975. "orgID": {
  976. "type": "string"
  977. },
  978. "orgName": {
  979. "type": "string"
  980. },
  981. "active": {
  982. "type": "boolean"
  983. }
  984. },
  985. "required": ["accountID", "accountEmail", "accountUrl", "orgID", "orgName", "active"],
  986. "additionalProperties": false
  987. }
  988. }
  989. },
  990. "required": ["orgs"],
  991. "additionalProperties": false,
  992. "description": "Switchable Console orgs"
  993. }
  994. }
  995. }
  996. },
  997. "400": {
  998. "description": "Bad request",
  999. "content": {
  1000. "application/json": {
  1001. "schema": {
  1002. "$ref": "#/components/schemas/BadRequestError"
  1003. }
  1004. }
  1005. }
  1006. },
  1007. "500": {
  1008. "description": "InternalServerError",
  1009. "content": {
  1010. "application/json": {
  1011. "schema": {
  1012. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  1013. }
  1014. }
  1015. }
  1016. }
  1017. },
  1018. "description": "Get the available Console orgs across logged-in accounts, including the current active org.",
  1019. "summary": "List switchable Console orgs",
  1020. "x-codeSamples": [
  1021. {
  1022. "lang": "js",
  1023. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.listOrgs({\n ...\n})"
  1024. }
  1025. ]
  1026. }
  1027. },
  1028. "/experimental/console/switch": {
  1029. "post": {
  1030. "tags": ["experimental"],
  1031. "operationId": "experimental.console.switchOrg",
  1032. "parameters": [
  1033. {
  1034. "name": "directory",
  1035. "in": "query",
  1036. "schema": {
  1037. "type": "string"
  1038. },
  1039. "required": false
  1040. },
  1041. {
  1042. "name": "workspace",
  1043. "in": "query",
  1044. "schema": {
  1045. "type": "string"
  1046. },
  1047. "required": false
  1048. }
  1049. ],
  1050. "responses": {
  1051. "200": {
  1052. "description": "Switch success",
  1053. "content": {
  1054. "application/json": {
  1055. "schema": {
  1056. "type": "boolean",
  1057. "description": "Switch success"
  1058. }
  1059. }
  1060. }
  1061. }
  1062. },
  1063. "description": "Persist a new active Console account/org selection for the current local OpenCode state.",
  1064. "summary": "Switch active Console org",
  1065. "requestBody": {
  1066. "content": {
  1067. "application/json": {
  1068. "schema": {
  1069. "type": "object",
  1070. "properties": {
  1071. "accountID": {
  1072. "type": "string"
  1073. },
  1074. "orgID": {
  1075. "type": "string"
  1076. }
  1077. },
  1078. "required": ["accountID", "orgID"],
  1079. "additionalProperties": false
  1080. }
  1081. }
  1082. }
  1083. },
  1084. "x-codeSamples": [
  1085. {
  1086. "lang": "js",
  1087. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.switchOrg({\n ...\n})"
  1088. }
  1089. ]
  1090. }
  1091. },
  1092. "/experimental/tool": {
  1093. "get": {
  1094. "tags": ["experimental"],
  1095. "operationId": "tool.list",
  1096. "parameters": [
  1097. {
  1098. "name": "directory",
  1099. "in": "query",
  1100. "schema": {
  1101. "type": "string"
  1102. },
  1103. "required": false
  1104. },
  1105. {
  1106. "name": "workspace",
  1107. "in": "query",
  1108. "schema": {
  1109. "type": "string"
  1110. },
  1111. "required": false
  1112. },
  1113. {
  1114. "name": "provider",
  1115. "in": "query",
  1116. "schema": {
  1117. "type": "string"
  1118. },
  1119. "required": true
  1120. },
  1121. {
  1122. "name": "model",
  1123. "in": "query",
  1124. "schema": {
  1125. "type": "string"
  1126. },
  1127. "required": true
  1128. }
  1129. ],
  1130. "responses": {
  1131. "200": {
  1132. "description": "Tools",
  1133. "content": {
  1134. "application/json": {
  1135. "schema": {
  1136. "$ref": "#/components/schemas/ToolList"
  1137. }
  1138. }
  1139. }
  1140. },
  1141. "400": {
  1142. "description": "BadRequest | InvalidRequestError",
  1143. "content": {
  1144. "application/json": {
  1145. "schema": {
  1146. "anyOf": [
  1147. {
  1148. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1149. },
  1150. {
  1151. "$ref": "#/components/schemas/InvalidRequestError"
  1152. }
  1153. ]
  1154. }
  1155. }
  1156. }
  1157. }
  1158. },
  1159. "description": "Get a list of available tools with their JSON schema parameters for a specific provider and model combination.",
  1160. "summary": "List tools",
  1161. "x-codeSamples": [
  1162. {
  1163. "lang": "js",
  1164. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.list({\n ...\n})"
  1165. }
  1166. ]
  1167. }
  1168. },
  1169. "/experimental/tool/ids": {
  1170. "get": {
  1171. "tags": ["experimental"],
  1172. "operationId": "tool.ids",
  1173. "parameters": [
  1174. {
  1175. "name": "directory",
  1176. "in": "query",
  1177. "schema": {
  1178. "type": "string"
  1179. },
  1180. "required": false
  1181. },
  1182. {
  1183. "name": "workspace",
  1184. "in": "query",
  1185. "schema": {
  1186. "type": "string"
  1187. },
  1188. "required": false
  1189. }
  1190. ],
  1191. "responses": {
  1192. "200": {
  1193. "description": "Tool IDs",
  1194. "content": {
  1195. "application/json": {
  1196. "schema": {
  1197. "$ref": "#/components/schemas/ToolIDs"
  1198. }
  1199. }
  1200. }
  1201. },
  1202. "400": {
  1203. "description": "BadRequest | InvalidRequestError",
  1204. "content": {
  1205. "application/json": {
  1206. "schema": {
  1207. "anyOf": [
  1208. {
  1209. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1210. },
  1211. {
  1212. "$ref": "#/components/schemas/InvalidRequestError"
  1213. }
  1214. ]
  1215. }
  1216. }
  1217. }
  1218. }
  1219. },
  1220. "description": "Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.",
  1221. "summary": "List tool IDs",
  1222. "x-codeSamples": [
  1223. {
  1224. "lang": "js",
  1225. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.ids({\n ...\n})"
  1226. }
  1227. ]
  1228. }
  1229. },
  1230. "/experimental/worktree": {
  1231. "get": {
  1232. "tags": ["experimental"],
  1233. "operationId": "worktree.list",
  1234. "parameters": [
  1235. {
  1236. "name": "directory",
  1237. "in": "query",
  1238. "schema": {
  1239. "type": "string"
  1240. },
  1241. "required": false
  1242. },
  1243. {
  1244. "name": "workspace",
  1245. "in": "query",
  1246. "schema": {
  1247. "type": "string"
  1248. },
  1249. "required": false
  1250. }
  1251. ],
  1252. "responses": {
  1253. "200": {
  1254. "description": "List of worktree directories",
  1255. "content": {
  1256. "application/json": {
  1257. "schema": {
  1258. "type": "array",
  1259. "items": {
  1260. "type": "string"
  1261. },
  1262. "description": "List of worktree directories"
  1263. }
  1264. }
  1265. }
  1266. },
  1267. "400": {
  1268. "description": "WorktreeError | InvalidRequestError",
  1269. "content": {
  1270. "application/json": {
  1271. "schema": {
  1272. "anyOf": [
  1273. {
  1274. "$ref": "#/components/schemas/WorktreeError"
  1275. },
  1276. {
  1277. "$ref": "#/components/schemas/InvalidRequestError"
  1278. }
  1279. ]
  1280. }
  1281. }
  1282. }
  1283. }
  1284. },
  1285. "description": "List all sandbox worktrees for the current project.",
  1286. "summary": "List worktrees",
  1287. "x-codeSamples": [
  1288. {
  1289. "lang": "js",
  1290. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.list({\n ...\n})"
  1291. }
  1292. ]
  1293. },
  1294. "post": {
  1295. "tags": ["experimental"],
  1296. "operationId": "worktree.create",
  1297. "parameters": [
  1298. {
  1299. "name": "directory",
  1300. "in": "query",
  1301. "schema": {
  1302. "type": "string"
  1303. },
  1304. "required": false
  1305. },
  1306. {
  1307. "name": "workspace",
  1308. "in": "query",
  1309. "schema": {
  1310. "type": "string"
  1311. },
  1312. "required": false
  1313. }
  1314. ],
  1315. "responses": {
  1316. "200": {
  1317. "description": "Worktree created",
  1318. "content": {
  1319. "application/json": {
  1320. "schema": {
  1321. "$ref": "#/components/schemas/Worktree"
  1322. }
  1323. }
  1324. }
  1325. },
  1326. "400": {
  1327. "description": "WorktreeError | InvalidRequestError",
  1328. "content": {
  1329. "application/json": {
  1330. "schema": {
  1331. "anyOf": [
  1332. {
  1333. "$ref": "#/components/schemas/WorktreeError"
  1334. },
  1335. {
  1336. "$ref": "#/components/schemas/InvalidRequestError"
  1337. }
  1338. ]
  1339. }
  1340. }
  1341. }
  1342. }
  1343. },
  1344. "description": "Create a new git worktree for the current project and run any configured startup scripts.",
  1345. "summary": "Create worktree",
  1346. "requestBody": {
  1347. "content": {
  1348. "application/json": {
  1349. "schema": {
  1350. "$ref": "#/components/schemas/WorktreeCreateInput"
  1351. }
  1352. }
  1353. }
  1354. },
  1355. "x-codeSamples": [
  1356. {
  1357. "lang": "js",
  1358. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.create({\n ...\n})"
  1359. }
  1360. ]
  1361. },
  1362. "delete": {
  1363. "tags": ["experimental"],
  1364. "operationId": "worktree.remove",
  1365. "parameters": [
  1366. {
  1367. "name": "directory",
  1368. "in": "query",
  1369. "schema": {
  1370. "type": "string"
  1371. },
  1372. "required": false
  1373. },
  1374. {
  1375. "name": "workspace",
  1376. "in": "query",
  1377. "schema": {
  1378. "type": "string"
  1379. },
  1380. "required": false
  1381. }
  1382. ],
  1383. "responses": {
  1384. "200": {
  1385. "description": "Worktree removed",
  1386. "content": {
  1387. "application/json": {
  1388. "schema": {
  1389. "type": "boolean",
  1390. "description": "Worktree removed"
  1391. }
  1392. }
  1393. }
  1394. },
  1395. "400": {
  1396. "description": "WorktreeError | InvalidRequestError",
  1397. "content": {
  1398. "application/json": {
  1399. "schema": {
  1400. "anyOf": [
  1401. {
  1402. "$ref": "#/components/schemas/WorktreeError"
  1403. },
  1404. {
  1405. "$ref": "#/components/schemas/InvalidRequestError"
  1406. }
  1407. ]
  1408. }
  1409. }
  1410. }
  1411. }
  1412. },
  1413. "description": "Remove a git worktree and delete its branch.",
  1414. "summary": "Remove worktree",
  1415. "requestBody": {
  1416. "content": {
  1417. "application/json": {
  1418. "schema": {
  1419. "$ref": "#/components/schemas/WorktreeRemoveInput"
  1420. }
  1421. }
  1422. }
  1423. },
  1424. "x-codeSamples": [
  1425. {
  1426. "lang": "js",
  1427. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.remove({\n ...\n})"
  1428. }
  1429. ]
  1430. }
  1431. },
  1432. "/experimental/worktree/reset": {
  1433. "post": {
  1434. "tags": ["experimental"],
  1435. "operationId": "worktree.reset",
  1436. "parameters": [
  1437. {
  1438. "name": "directory",
  1439. "in": "query",
  1440. "schema": {
  1441. "type": "string"
  1442. },
  1443. "required": false
  1444. },
  1445. {
  1446. "name": "workspace",
  1447. "in": "query",
  1448. "schema": {
  1449. "type": "string"
  1450. },
  1451. "required": false
  1452. }
  1453. ],
  1454. "responses": {
  1455. "200": {
  1456. "description": "Worktree reset",
  1457. "content": {
  1458. "application/json": {
  1459. "schema": {
  1460. "type": "boolean",
  1461. "description": "Worktree reset"
  1462. }
  1463. }
  1464. }
  1465. },
  1466. "400": {
  1467. "description": "WorktreeError | InvalidRequestError",
  1468. "content": {
  1469. "application/json": {
  1470. "schema": {
  1471. "anyOf": [
  1472. {
  1473. "$ref": "#/components/schemas/WorktreeError"
  1474. },
  1475. {
  1476. "$ref": "#/components/schemas/InvalidRequestError"
  1477. }
  1478. ]
  1479. }
  1480. }
  1481. }
  1482. }
  1483. },
  1484. "description": "Reset a worktree branch to the primary default branch.",
  1485. "summary": "Reset worktree",
  1486. "requestBody": {
  1487. "content": {
  1488. "application/json": {
  1489. "schema": {
  1490. "$ref": "#/components/schemas/WorktreeResetInput"
  1491. }
  1492. }
  1493. }
  1494. },
  1495. "x-codeSamples": [
  1496. {
  1497. "lang": "js",
  1498. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.reset({\n ...\n})"
  1499. }
  1500. ]
  1501. }
  1502. },
  1503. "/experimental/session": {
  1504. "get": {
  1505. "tags": ["experimental"],
  1506. "operationId": "experimental.session.list",
  1507. "parameters": [
  1508. {
  1509. "name": "directory",
  1510. "in": "query",
  1511. "schema": {
  1512. "type": "string"
  1513. },
  1514. "required": false
  1515. },
  1516. {
  1517. "name": "workspace",
  1518. "in": "query",
  1519. "schema": {
  1520. "type": "string"
  1521. },
  1522. "required": false
  1523. },
  1524. {
  1525. "name": "roots",
  1526. "in": "query",
  1527. "schema": {
  1528. "anyOf": [
  1529. {
  1530. "type": "boolean"
  1531. },
  1532. {
  1533. "type": "string",
  1534. "enum": ["true", "false"]
  1535. }
  1536. ]
  1537. },
  1538. "required": false
  1539. },
  1540. {
  1541. "name": "start",
  1542. "in": "query",
  1543. "schema": {
  1544. "type": "number"
  1545. },
  1546. "required": false
  1547. },
  1548. {
  1549. "name": "cursor",
  1550. "in": "query",
  1551. "schema": {
  1552. "type": "number"
  1553. },
  1554. "required": false
  1555. },
  1556. {
  1557. "name": "search",
  1558. "in": "query",
  1559. "schema": {
  1560. "type": "string"
  1561. },
  1562. "required": false
  1563. },
  1564. {
  1565. "name": "limit",
  1566. "in": "query",
  1567. "schema": {
  1568. "type": "number"
  1569. },
  1570. "required": false
  1571. },
  1572. {
  1573. "name": "archived",
  1574. "in": "query",
  1575. "schema": {
  1576. "anyOf": [
  1577. {
  1578. "type": "boolean"
  1579. },
  1580. {
  1581. "type": "string",
  1582. "enum": ["true", "false"]
  1583. }
  1584. ]
  1585. },
  1586. "required": false
  1587. }
  1588. ],
  1589. "responses": {
  1590. "200": {
  1591. "description": "List of sessions",
  1592. "content": {
  1593. "application/json": {
  1594. "schema": {
  1595. "type": "array",
  1596. "items": {
  1597. "$ref": "#/components/schemas/GlobalSession"
  1598. },
  1599. "description": "List of sessions"
  1600. }
  1601. }
  1602. }
  1603. },
  1604. "400": {
  1605. "description": "Bad request",
  1606. "content": {
  1607. "application/json": {
  1608. "schema": {
  1609. "$ref": "#/components/schemas/BadRequestError"
  1610. }
  1611. }
  1612. }
  1613. }
  1614. },
  1615. "description": "Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.",
  1616. "summary": "List sessions",
  1617. "x-codeSamples": [
  1618. {
  1619. "lang": "js",
  1620. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.list({\n ...\n})"
  1621. }
  1622. ]
  1623. }
  1624. },
  1625. "/experimental/session/{sessionID}/background": {
  1626. "post": {
  1627. "tags": ["experimental"],
  1628. "operationId": "experimental.session.background",
  1629. "parameters": [
  1630. {
  1631. "name": "sessionID",
  1632. "in": "path",
  1633. "schema": {
  1634. "type": "string",
  1635. "pattern": "^ses"
  1636. },
  1637. "required": true
  1638. },
  1639. {
  1640. "name": "directory",
  1641. "in": "query",
  1642. "schema": {
  1643. "type": "string"
  1644. },
  1645. "required": false
  1646. },
  1647. {
  1648. "name": "workspace",
  1649. "in": "query",
  1650. "schema": {
  1651. "type": "string"
  1652. },
  1653. "required": false
  1654. }
  1655. ],
  1656. "responses": {
  1657. "200": {
  1658. "description": "Backgrounded subagents",
  1659. "content": {
  1660. "application/json": {
  1661. "schema": {
  1662. "type": "boolean",
  1663. "description": "Backgrounded subagents"
  1664. }
  1665. }
  1666. }
  1667. },
  1668. "400": {
  1669. "description": "BadRequest | InvalidRequestError",
  1670. "content": {
  1671. "application/json": {
  1672. "schema": {
  1673. "anyOf": [
  1674. {
  1675. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1676. },
  1677. {
  1678. "$ref": "#/components/schemas/InvalidRequestError"
  1679. }
  1680. ]
  1681. }
  1682. }
  1683. }
  1684. }
  1685. },
  1686. "description": "Detach any synchronous subagents currently blocking the session and continue them in the background.",
  1687. "summary": "Background subagents",
  1688. "x-codeSamples": [
  1689. {
  1690. "lang": "js",
  1691. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.background({\n ...\n})"
  1692. }
  1693. ]
  1694. }
  1695. },
  1696. "/experimental/resource": {
  1697. "get": {
  1698. "tags": ["experimental"],
  1699. "operationId": "experimental.resource.list",
  1700. "parameters": [
  1701. {
  1702. "name": "directory",
  1703. "in": "query",
  1704. "schema": {
  1705. "type": "string"
  1706. },
  1707. "required": false
  1708. },
  1709. {
  1710. "name": "workspace",
  1711. "in": "query",
  1712. "schema": {
  1713. "type": "string"
  1714. },
  1715. "required": false
  1716. }
  1717. ],
  1718. "responses": {
  1719. "200": {
  1720. "description": "MCP resources",
  1721. "content": {
  1722. "application/json": {
  1723. "schema": {
  1724. "type": "object",
  1725. "additionalProperties": {
  1726. "$ref": "#/components/schemas/McpResource"
  1727. },
  1728. "description": "MCP resources"
  1729. }
  1730. }
  1731. }
  1732. },
  1733. "400": {
  1734. "description": "Bad request",
  1735. "content": {
  1736. "application/json": {
  1737. "schema": {
  1738. "$ref": "#/components/schemas/BadRequestError"
  1739. }
  1740. }
  1741. }
  1742. }
  1743. },
  1744. "description": "Get all available MCP resources from connected servers. Optionally filter by name.",
  1745. "summary": "Get MCP resources",
  1746. "x-codeSamples": [
  1747. {
  1748. "lang": "js",
  1749. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.resource.list({\n ...\n})"
  1750. }
  1751. ]
  1752. }
  1753. },
  1754. "/find": {
  1755. "get": {
  1756. "tags": ["file"],
  1757. "operationId": "find.text",
  1758. "parameters": [
  1759. {
  1760. "name": "directory",
  1761. "in": "query",
  1762. "schema": {
  1763. "type": "string"
  1764. },
  1765. "required": false
  1766. },
  1767. {
  1768. "name": "workspace",
  1769. "in": "query",
  1770. "schema": {
  1771. "type": "string"
  1772. },
  1773. "required": false
  1774. },
  1775. {
  1776. "name": "pattern",
  1777. "in": "query",
  1778. "schema": {
  1779. "type": "string"
  1780. },
  1781. "required": true
  1782. }
  1783. ],
  1784. "responses": {
  1785. "200": {
  1786. "description": "Matches",
  1787. "content": {
  1788. "application/json": {
  1789. "schema": {
  1790. "type": "array",
  1791. "items": {
  1792. "type": "object",
  1793. "properties": {
  1794. "path": {
  1795. "type": "object",
  1796. "properties": {
  1797. "text": {
  1798. "type": "string"
  1799. }
  1800. },
  1801. "required": ["text"],
  1802. "additionalProperties": false
  1803. },
  1804. "lines": {
  1805. "type": "object",
  1806. "properties": {
  1807. "text": {
  1808. "type": "string"
  1809. }
  1810. },
  1811. "required": ["text"],
  1812. "additionalProperties": false
  1813. },
  1814. "line_number": {
  1815. "type": "integer",
  1816. "minimum": 0
  1817. },
  1818. "absolute_offset": {
  1819. "type": "integer",
  1820. "minimum": 0
  1821. },
  1822. "submatches": {
  1823. "type": "array",
  1824. "items": {
  1825. "type": "object",
  1826. "properties": {
  1827. "match": {
  1828. "type": "object",
  1829. "properties": {
  1830. "text": {
  1831. "type": "string"
  1832. }
  1833. },
  1834. "required": ["text"],
  1835. "additionalProperties": false
  1836. },
  1837. "start": {
  1838. "type": "integer",
  1839. "minimum": 0
  1840. },
  1841. "end": {
  1842. "type": "integer",
  1843. "minimum": 0
  1844. }
  1845. },
  1846. "required": ["match", "start", "end"],
  1847. "additionalProperties": false
  1848. }
  1849. }
  1850. },
  1851. "required": ["path", "lines", "line_number", "absolute_offset", "submatches"],
  1852. "additionalProperties": false
  1853. },
  1854. "description": "Matches"
  1855. }
  1856. }
  1857. }
  1858. },
  1859. "400": {
  1860. "description": "Bad request",
  1861. "content": {
  1862. "application/json": {
  1863. "schema": {
  1864. "$ref": "#/components/schemas/BadRequestError"
  1865. }
  1866. }
  1867. }
  1868. }
  1869. },
  1870. "description": "Search for text patterns across files in the project using ripgrep.",
  1871. "summary": "Find text",
  1872. "x-codeSamples": [
  1873. {
  1874. "lang": "js",
  1875. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
  1876. }
  1877. ]
  1878. }
  1879. },
  1880. "/find/file": {
  1881. "get": {
  1882. "tags": ["file"],
  1883. "operationId": "find.files",
  1884. "parameters": [
  1885. {
  1886. "name": "directory",
  1887. "in": "query",
  1888. "schema": {
  1889. "type": "string"
  1890. },
  1891. "required": false
  1892. },
  1893. {
  1894. "name": "workspace",
  1895. "in": "query",
  1896. "schema": {
  1897. "type": "string"
  1898. },
  1899. "required": false
  1900. },
  1901. {
  1902. "name": "query",
  1903. "in": "query",
  1904. "schema": {
  1905. "type": "string"
  1906. },
  1907. "required": true
  1908. },
  1909. {
  1910. "name": "dirs",
  1911. "in": "query",
  1912. "schema": {
  1913. "type": "string",
  1914. "enum": ["true", "false"]
  1915. },
  1916. "required": false
  1917. },
  1918. {
  1919. "name": "type",
  1920. "in": "query",
  1921. "schema": {
  1922. "type": "string",
  1923. "enum": ["file", "directory"]
  1924. },
  1925. "required": false
  1926. },
  1927. {
  1928. "name": "limit",
  1929. "in": "query",
  1930. "schema": {
  1931. "type": "integer",
  1932. "minimum": 1,
  1933. "maximum": 200
  1934. },
  1935. "required": false
  1936. }
  1937. ],
  1938. "responses": {
  1939. "200": {
  1940. "description": "File paths",
  1941. "content": {
  1942. "application/json": {
  1943. "schema": {
  1944. "type": "array",
  1945. "items": {
  1946. "type": "string"
  1947. },
  1948. "description": "File paths"
  1949. }
  1950. }
  1951. }
  1952. },
  1953. "400": {
  1954. "description": "Bad request",
  1955. "content": {
  1956. "application/json": {
  1957. "schema": {
  1958. "$ref": "#/components/schemas/BadRequestError"
  1959. }
  1960. }
  1961. }
  1962. }
  1963. },
  1964. "description": "Search for files or directories by name or pattern in the project directory.",
  1965. "summary": "Find files",
  1966. "x-codeSamples": [
  1967. {
  1968. "lang": "js",
  1969. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
  1970. }
  1971. ]
  1972. }
  1973. },
  1974. "/find/symbol": {
  1975. "get": {
  1976. "tags": ["file"],
  1977. "operationId": "find.symbols",
  1978. "parameters": [
  1979. {
  1980. "name": "directory",
  1981. "in": "query",
  1982. "schema": {
  1983. "type": "string"
  1984. },
  1985. "required": false
  1986. },
  1987. {
  1988. "name": "workspace",
  1989. "in": "query",
  1990. "schema": {
  1991. "type": "string"
  1992. },
  1993. "required": false
  1994. },
  1995. {
  1996. "name": "query",
  1997. "in": "query",
  1998. "schema": {
  1999. "type": "string"
  2000. },
  2001. "required": true
  2002. }
  2003. ],
  2004. "responses": {
  2005. "200": {
  2006. "description": "Symbols",
  2007. "content": {
  2008. "application/json": {
  2009. "schema": {
  2010. "type": "array",
  2011. "items": {
  2012. "$ref": "#/components/schemas/Symbol"
  2013. },
  2014. "description": "Symbols"
  2015. }
  2016. }
  2017. }
  2018. },
  2019. "400": {
  2020. "description": "Bad request",
  2021. "content": {
  2022. "application/json": {
  2023. "schema": {
  2024. "$ref": "#/components/schemas/BadRequestError"
  2025. }
  2026. }
  2027. }
  2028. }
  2029. },
  2030. "description": "Search for workspace symbols like functions, classes, and variables using LSP.",
  2031. "summary": "Find symbols",
  2032. "x-codeSamples": [
  2033. {
  2034. "lang": "js",
  2035. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
  2036. }
  2037. ]
  2038. }
  2039. },
  2040. "/file": {
  2041. "get": {
  2042. "tags": ["file"],
  2043. "operationId": "file.list",
  2044. "parameters": [
  2045. {
  2046. "name": "directory",
  2047. "in": "query",
  2048. "schema": {
  2049. "type": "string"
  2050. },
  2051. "required": false
  2052. },
  2053. {
  2054. "name": "workspace",
  2055. "in": "query",
  2056. "schema": {
  2057. "type": "string"
  2058. },
  2059. "required": false
  2060. },
  2061. {
  2062. "name": "path",
  2063. "in": "query",
  2064. "schema": {
  2065. "type": "string"
  2066. },
  2067. "required": true
  2068. }
  2069. ],
  2070. "responses": {
  2071. "200": {
  2072. "description": "Files and directories",
  2073. "content": {
  2074. "application/json": {
  2075. "schema": {
  2076. "type": "array",
  2077. "items": {
  2078. "$ref": "#/components/schemas/FileNode"
  2079. },
  2080. "description": "Files and directories"
  2081. }
  2082. }
  2083. }
  2084. },
  2085. "400": {
  2086. "description": "Bad request",
  2087. "content": {
  2088. "application/json": {
  2089. "schema": {
  2090. "$ref": "#/components/schemas/BadRequestError"
  2091. }
  2092. }
  2093. }
  2094. }
  2095. },
  2096. "description": "List files and directories in a specified path.",
  2097. "summary": "List files",
  2098. "x-codeSamples": [
  2099. {
  2100. "lang": "js",
  2101. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
  2102. }
  2103. ]
  2104. }
  2105. },
  2106. "/file/content": {
  2107. "get": {
  2108. "tags": ["file"],
  2109. "operationId": "file.read",
  2110. "parameters": [
  2111. {
  2112. "name": "directory",
  2113. "in": "query",
  2114. "schema": {
  2115. "type": "string"
  2116. },
  2117. "required": false
  2118. },
  2119. {
  2120. "name": "workspace",
  2121. "in": "query",
  2122. "schema": {
  2123. "type": "string"
  2124. },
  2125. "required": false
  2126. },
  2127. {
  2128. "name": "path",
  2129. "in": "query",
  2130. "schema": {
  2131. "type": "string"
  2132. },
  2133. "required": true
  2134. }
  2135. ],
  2136. "responses": {
  2137. "200": {
  2138. "description": "File content",
  2139. "content": {
  2140. "application/json": {
  2141. "schema": {
  2142. "$ref": "#/components/schemas/FileContent"
  2143. }
  2144. }
  2145. }
  2146. },
  2147. "400": {
  2148. "description": "Bad request",
  2149. "content": {
  2150. "application/json": {
  2151. "schema": {
  2152. "$ref": "#/components/schemas/BadRequestError"
  2153. }
  2154. }
  2155. }
  2156. }
  2157. },
  2158. "description": "Read the content of a specified file.",
  2159. "summary": "Read file",
  2160. "x-codeSamples": [
  2161. {
  2162. "lang": "js",
  2163. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
  2164. }
  2165. ]
  2166. }
  2167. },
  2168. "/file/status": {
  2169. "get": {
  2170. "tags": ["file"],
  2171. "operationId": "file.status",
  2172. "parameters": [
  2173. {
  2174. "name": "directory",
  2175. "in": "query",
  2176. "schema": {
  2177. "type": "string"
  2178. },
  2179. "required": false
  2180. },
  2181. {
  2182. "name": "workspace",
  2183. "in": "query",
  2184. "schema": {
  2185. "type": "string"
  2186. },
  2187. "required": false
  2188. }
  2189. ],
  2190. "responses": {
  2191. "200": {
  2192. "description": "File status",
  2193. "content": {
  2194. "application/json": {
  2195. "schema": {
  2196. "type": "array",
  2197. "items": {
  2198. "$ref": "#/components/schemas/File"
  2199. },
  2200. "description": "File status"
  2201. }
  2202. }
  2203. }
  2204. },
  2205. "400": {
  2206. "description": "Bad request",
  2207. "content": {
  2208. "application/json": {
  2209. "schema": {
  2210. "$ref": "#/components/schemas/BadRequestError"
  2211. }
  2212. }
  2213. }
  2214. }
  2215. },
  2216. "description": "Get the git status of all files in the project.",
  2217. "summary": "Get file status",
  2218. "x-codeSamples": [
  2219. {
  2220. "lang": "js",
  2221. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
  2222. }
  2223. ]
  2224. }
  2225. },
  2226. "/instance/dispose": {
  2227. "post": {
  2228. "tags": ["instance"],
  2229. "operationId": "instance.dispose",
  2230. "parameters": [
  2231. {
  2232. "name": "directory",
  2233. "in": "query",
  2234. "schema": {
  2235. "type": "string"
  2236. },
  2237. "required": false
  2238. },
  2239. {
  2240. "name": "workspace",
  2241. "in": "query",
  2242. "schema": {
  2243. "type": "string"
  2244. },
  2245. "required": false
  2246. }
  2247. ],
  2248. "responses": {
  2249. "200": {
  2250. "description": "Instance disposed",
  2251. "content": {
  2252. "application/json": {
  2253. "schema": {
  2254. "type": "boolean",
  2255. "description": "Instance disposed"
  2256. }
  2257. }
  2258. }
  2259. },
  2260. "400": {
  2261. "description": "Bad request",
  2262. "content": {
  2263. "application/json": {
  2264. "schema": {
  2265. "$ref": "#/components/schemas/BadRequestError"
  2266. }
  2267. }
  2268. }
  2269. }
  2270. },
  2271. "description": "Clean up and dispose the current OpenCode instance, releasing all resources.",
  2272. "summary": "Dispose instance",
  2273. "x-codeSamples": [
  2274. {
  2275. "lang": "js",
  2276. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.instance.dispose({\n ...\n})"
  2277. }
  2278. ]
  2279. }
  2280. },
  2281. "/path": {
  2282. "get": {
  2283. "tags": ["instance"],
  2284. "operationId": "path.get",
  2285. "parameters": [
  2286. {
  2287. "name": "directory",
  2288. "in": "query",
  2289. "schema": {
  2290. "type": "string"
  2291. },
  2292. "required": false
  2293. },
  2294. {
  2295. "name": "workspace",
  2296. "in": "query",
  2297. "schema": {
  2298. "type": "string"
  2299. },
  2300. "required": false
  2301. }
  2302. ],
  2303. "responses": {
  2304. "200": {
  2305. "description": "Path",
  2306. "content": {
  2307. "application/json": {
  2308. "schema": {
  2309. "$ref": "#/components/schemas/Path"
  2310. }
  2311. }
  2312. }
  2313. },
  2314. "400": {
  2315. "description": "Bad request",
  2316. "content": {
  2317. "application/json": {
  2318. "schema": {
  2319. "$ref": "#/components/schemas/BadRequestError"
  2320. }
  2321. }
  2322. }
  2323. }
  2324. },
  2325. "description": "Retrieve the current working directory and related path information for the OpenCode instance.",
  2326. "summary": "Get paths",
  2327. "x-codeSamples": [
  2328. {
  2329. "lang": "js",
  2330. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.path.get({\n ...\n})"
  2331. }
  2332. ]
  2333. }
  2334. },
  2335. "/vcs": {
  2336. "get": {
  2337. "tags": ["instance"],
  2338. "operationId": "vcs.get",
  2339. "parameters": [
  2340. {
  2341. "name": "directory",
  2342. "in": "query",
  2343. "schema": {
  2344. "type": "string"
  2345. },
  2346. "required": false
  2347. },
  2348. {
  2349. "name": "workspace",
  2350. "in": "query",
  2351. "schema": {
  2352. "type": "string"
  2353. },
  2354. "required": false
  2355. }
  2356. ],
  2357. "responses": {
  2358. "200": {
  2359. "description": "VCS info",
  2360. "content": {
  2361. "application/json": {
  2362. "schema": {
  2363. "$ref": "#/components/schemas/VcsInfo"
  2364. }
  2365. }
  2366. }
  2367. },
  2368. "400": {
  2369. "description": "Bad request",
  2370. "content": {
  2371. "application/json": {
  2372. "schema": {
  2373. "$ref": "#/components/schemas/BadRequestError"
  2374. }
  2375. }
  2376. }
  2377. }
  2378. },
  2379. "description": "Retrieve version control system (VCS) information for the current project, such as git branch.",
  2380. "summary": "Get VCS info",
  2381. "x-codeSamples": [
  2382. {
  2383. "lang": "js",
  2384. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.get({\n ...\n})"
  2385. }
  2386. ]
  2387. }
  2388. },
  2389. "/vcs/status": {
  2390. "get": {
  2391. "tags": ["instance"],
  2392. "operationId": "vcs.status",
  2393. "parameters": [
  2394. {
  2395. "name": "directory",
  2396. "in": "query",
  2397. "schema": {
  2398. "type": "string"
  2399. },
  2400. "required": false
  2401. },
  2402. {
  2403. "name": "workspace",
  2404. "in": "query",
  2405. "schema": {
  2406. "type": "string"
  2407. },
  2408. "required": false
  2409. }
  2410. ],
  2411. "responses": {
  2412. "200": {
  2413. "description": "VCS status",
  2414. "content": {
  2415. "application/json": {
  2416. "schema": {
  2417. "type": "array",
  2418. "items": {
  2419. "$ref": "#/components/schemas/VcsFileStatus"
  2420. },
  2421. "description": "VCS status"
  2422. }
  2423. }
  2424. }
  2425. },
  2426. "400": {
  2427. "description": "Bad request",
  2428. "content": {
  2429. "application/json": {
  2430. "schema": {
  2431. "$ref": "#/components/schemas/BadRequestError"
  2432. }
  2433. }
  2434. }
  2435. }
  2436. },
  2437. "description": "Retrieve changed files in the current working tree without patches.",
  2438. "summary": "Get VCS status",
  2439. "x-codeSamples": [
  2440. {
  2441. "lang": "js",
  2442. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.status({\n ...\n})"
  2443. }
  2444. ]
  2445. }
  2446. },
  2447. "/vcs/diff": {
  2448. "get": {
  2449. "tags": ["instance"],
  2450. "operationId": "vcs.diff",
  2451. "parameters": [
  2452. {
  2453. "name": "directory",
  2454. "in": "query",
  2455. "schema": {
  2456. "type": "string"
  2457. },
  2458. "required": false
  2459. },
  2460. {
  2461. "name": "workspace",
  2462. "in": "query",
  2463. "schema": {
  2464. "type": "string"
  2465. },
  2466. "required": false
  2467. },
  2468. {
  2469. "name": "mode",
  2470. "in": "query",
  2471. "schema": {
  2472. "type": "string",
  2473. "enum": ["git", "branch"]
  2474. },
  2475. "required": true
  2476. },
  2477. {
  2478. "name": "context",
  2479. "in": "query",
  2480. "schema": {
  2481. "type": "integer",
  2482. "minimum": 0
  2483. },
  2484. "required": false
  2485. }
  2486. ],
  2487. "responses": {
  2488. "200": {
  2489. "description": "VCS diff",
  2490. "content": {
  2491. "application/json": {
  2492. "schema": {
  2493. "type": "array",
  2494. "items": {
  2495. "$ref": "#/components/schemas/VcsFileDiff"
  2496. },
  2497. "description": "VCS diff"
  2498. }
  2499. }
  2500. }
  2501. },
  2502. "400": {
  2503. "description": "Bad request",
  2504. "content": {
  2505. "application/json": {
  2506. "schema": {
  2507. "$ref": "#/components/schemas/BadRequestError"
  2508. }
  2509. }
  2510. }
  2511. }
  2512. },
  2513. "description": "Retrieve the current git diff for the working tree or against the default branch.",
  2514. "summary": "Get VCS diff",
  2515. "x-codeSamples": [
  2516. {
  2517. "lang": "js",
  2518. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff({\n ...\n})"
  2519. }
  2520. ]
  2521. }
  2522. },
  2523. "/vcs/diff/raw": {
  2524. "get": {
  2525. "tags": ["instance"],
  2526. "operationId": "vcs.diff.raw",
  2527. "parameters": [
  2528. {
  2529. "name": "directory",
  2530. "in": "query",
  2531. "schema": {
  2532. "type": "string"
  2533. },
  2534. "required": false
  2535. },
  2536. {
  2537. "name": "workspace",
  2538. "in": "query",
  2539. "schema": {
  2540. "type": "string"
  2541. },
  2542. "required": false
  2543. }
  2544. ],
  2545. "responses": {
  2546. "200": {
  2547. "description": "Raw VCS diff",
  2548. "content": {
  2549. "text/x-diff; charset=utf-8": {
  2550. "schema": {
  2551. "type": "string"
  2552. }
  2553. }
  2554. }
  2555. },
  2556. "400": {
  2557. "description": "Bad request",
  2558. "content": {
  2559. "application/json": {
  2560. "schema": {
  2561. "$ref": "#/components/schemas/BadRequestError"
  2562. }
  2563. }
  2564. }
  2565. }
  2566. },
  2567. "description": "Retrieve a raw patch for current uncommitted changes.",
  2568. "summary": "Get raw VCS diff",
  2569. "x-codeSamples": [
  2570. {
  2571. "lang": "js",
  2572. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff.raw({\n ...\n})"
  2573. }
  2574. ]
  2575. }
  2576. },
  2577. "/vcs/apply": {
  2578. "post": {
  2579. "tags": ["instance"],
  2580. "operationId": "vcs.apply",
  2581. "parameters": [
  2582. {
  2583. "name": "directory",
  2584. "in": "query",
  2585. "schema": {
  2586. "type": "string"
  2587. },
  2588. "required": false
  2589. },
  2590. {
  2591. "name": "workspace",
  2592. "in": "query",
  2593. "schema": {
  2594. "type": "string"
  2595. },
  2596. "required": false
  2597. }
  2598. ],
  2599. "responses": {
  2600. "200": {
  2601. "description": "VCS patch applied",
  2602. "content": {
  2603. "application/json": {
  2604. "schema": {
  2605. "type": "object",
  2606. "properties": {
  2607. "applied": {
  2608. "type": "boolean"
  2609. }
  2610. },
  2611. "required": ["applied"],
  2612. "additionalProperties": false,
  2613. "description": "VCS patch applied"
  2614. }
  2615. }
  2616. }
  2617. },
  2618. "400": {
  2619. "description": "VcsApplyError | InvalidRequestError",
  2620. "content": {
  2621. "application/json": {
  2622. "schema": {
  2623. "anyOf": [
  2624. {
  2625. "$ref": "#/components/schemas/VcsApplyError"
  2626. },
  2627. {
  2628. "$ref": "#/components/schemas/InvalidRequestError"
  2629. }
  2630. ]
  2631. }
  2632. }
  2633. }
  2634. }
  2635. },
  2636. "description": "Apply a raw patch to the current working tree.",
  2637. "summary": "Apply VCS patch",
  2638. "requestBody": {
  2639. "content": {
  2640. "application/json": {
  2641. "schema": {
  2642. "type": "object",
  2643. "properties": {
  2644. "patch": {
  2645. "type": "string"
  2646. }
  2647. },
  2648. "required": ["patch"],
  2649. "additionalProperties": false
  2650. }
  2651. }
  2652. }
  2653. },
  2654. "x-codeSamples": [
  2655. {
  2656. "lang": "js",
  2657. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.apply({\n ...\n})"
  2658. }
  2659. ]
  2660. }
  2661. },
  2662. "/command": {
  2663. "get": {
  2664. "tags": ["instance"],
  2665. "operationId": "command.list",
  2666. "parameters": [
  2667. {
  2668. "name": "directory",
  2669. "in": "query",
  2670. "schema": {
  2671. "type": "string"
  2672. },
  2673. "required": false
  2674. },
  2675. {
  2676. "name": "workspace",
  2677. "in": "query",
  2678. "schema": {
  2679. "type": "string"
  2680. },
  2681. "required": false
  2682. }
  2683. ],
  2684. "responses": {
  2685. "200": {
  2686. "description": "List of commands",
  2687. "content": {
  2688. "application/json": {
  2689. "schema": {
  2690. "type": "array",
  2691. "items": {
  2692. "$ref": "#/components/schemas/Command"
  2693. },
  2694. "description": "List of commands"
  2695. }
  2696. }
  2697. }
  2698. },
  2699. "400": {
  2700. "description": "Bad request",
  2701. "content": {
  2702. "application/json": {
  2703. "schema": {
  2704. "$ref": "#/components/schemas/BadRequestError"
  2705. }
  2706. }
  2707. }
  2708. }
  2709. },
  2710. "description": "Get a list of all available commands in the OpenCode system.",
  2711. "summary": "List commands",
  2712. "x-codeSamples": [
  2713. {
  2714. "lang": "js",
  2715. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
  2716. }
  2717. ]
  2718. }
  2719. },
  2720. "/agent": {
  2721. "get": {
  2722. "tags": ["instance"],
  2723. "operationId": "app.agents",
  2724. "parameters": [
  2725. {
  2726. "name": "directory",
  2727. "in": "query",
  2728. "schema": {
  2729. "type": "string"
  2730. },
  2731. "required": false
  2732. },
  2733. {
  2734. "name": "workspace",
  2735. "in": "query",
  2736. "schema": {
  2737. "type": "string"
  2738. },
  2739. "required": false
  2740. }
  2741. ],
  2742. "responses": {
  2743. "200": {
  2744. "description": "List of agents",
  2745. "content": {
  2746. "application/json": {
  2747. "schema": {
  2748. "type": "array",
  2749. "items": {
  2750. "$ref": "#/components/schemas/Agent"
  2751. },
  2752. "description": "List of agents"
  2753. }
  2754. }
  2755. }
  2756. },
  2757. "400": {
  2758. "description": "Bad request",
  2759. "content": {
  2760. "application/json": {
  2761. "schema": {
  2762. "$ref": "#/components/schemas/BadRequestError"
  2763. }
  2764. }
  2765. }
  2766. }
  2767. },
  2768. "description": "Get a list of all available AI agents in the OpenCode system.",
  2769. "summary": "List agents",
  2770. "x-codeSamples": [
  2771. {
  2772. "lang": "js",
  2773. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
  2774. }
  2775. ]
  2776. }
  2777. },
  2778. "/skill": {
  2779. "get": {
  2780. "tags": ["instance"],
  2781. "operationId": "app.skills",
  2782. "parameters": [
  2783. {
  2784. "name": "directory",
  2785. "in": "query",
  2786. "schema": {
  2787. "type": "string"
  2788. },
  2789. "required": false
  2790. },
  2791. {
  2792. "name": "workspace",
  2793. "in": "query",
  2794. "schema": {
  2795. "type": "string"
  2796. },
  2797. "required": false
  2798. }
  2799. ],
  2800. "responses": {
  2801. "200": {
  2802. "description": "List of skills",
  2803. "content": {
  2804. "application/json": {
  2805. "schema": {
  2806. "type": "array",
  2807. "items": {
  2808. "type": "object",
  2809. "properties": {
  2810. "name": {
  2811. "type": "string"
  2812. },
  2813. "description": {
  2814. "type": "string"
  2815. },
  2816. "location": {
  2817. "type": "string"
  2818. },
  2819. "content": {
  2820. "type": "string"
  2821. }
  2822. },
  2823. "required": ["name", "location", "content"],
  2824. "additionalProperties": false
  2825. },
  2826. "description": "List of skills"
  2827. }
  2828. }
  2829. }
  2830. },
  2831. "400": {
  2832. "description": "Bad request",
  2833. "content": {
  2834. "application/json": {
  2835. "schema": {
  2836. "$ref": "#/components/schemas/BadRequestError"
  2837. }
  2838. }
  2839. }
  2840. }
  2841. },
  2842. "description": "Get a list of all available skills in the OpenCode system.",
  2843. "summary": "List skills",
  2844. "x-codeSamples": [
  2845. {
  2846. "lang": "js",
  2847. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.skills({\n ...\n})"
  2848. }
  2849. ]
  2850. }
  2851. },
  2852. "/lsp": {
  2853. "get": {
  2854. "tags": ["instance"],
  2855. "operationId": "lsp.status",
  2856. "parameters": [
  2857. {
  2858. "name": "directory",
  2859. "in": "query",
  2860. "schema": {
  2861. "type": "string"
  2862. },
  2863. "required": false
  2864. },
  2865. {
  2866. "name": "workspace",
  2867. "in": "query",
  2868. "schema": {
  2869. "type": "string"
  2870. },
  2871. "required": false
  2872. }
  2873. ],
  2874. "responses": {
  2875. "200": {
  2876. "description": "LSP server status",
  2877. "content": {
  2878. "application/json": {
  2879. "schema": {
  2880. "type": "array",
  2881. "items": {
  2882. "$ref": "#/components/schemas/LSPStatus"
  2883. },
  2884. "description": "LSP server status"
  2885. }
  2886. }
  2887. }
  2888. },
  2889. "400": {
  2890. "description": "Bad request",
  2891. "content": {
  2892. "application/json": {
  2893. "schema": {
  2894. "$ref": "#/components/schemas/BadRequestError"
  2895. }
  2896. }
  2897. }
  2898. }
  2899. },
  2900. "description": "Get LSP server status",
  2901. "summary": "Get LSP status",
  2902. "x-codeSamples": [
  2903. {
  2904. "lang": "js",
  2905. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
  2906. }
  2907. ]
  2908. }
  2909. },
  2910. "/formatter": {
  2911. "get": {
  2912. "tags": ["instance"],
  2913. "operationId": "formatter.status",
  2914. "parameters": [
  2915. {
  2916. "name": "directory",
  2917. "in": "query",
  2918. "schema": {
  2919. "type": "string"
  2920. },
  2921. "required": false
  2922. },
  2923. {
  2924. "name": "workspace",
  2925. "in": "query",
  2926. "schema": {
  2927. "type": "string"
  2928. },
  2929. "required": false
  2930. }
  2931. ],
  2932. "responses": {
  2933. "200": {
  2934. "description": "Formatter status",
  2935. "content": {
  2936. "application/json": {
  2937. "schema": {
  2938. "type": "array",
  2939. "items": {
  2940. "$ref": "#/components/schemas/FormatterStatus"
  2941. },
  2942. "description": "Formatter status"
  2943. }
  2944. }
  2945. }
  2946. },
  2947. "400": {
  2948. "description": "Bad request",
  2949. "content": {
  2950. "application/json": {
  2951. "schema": {
  2952. "$ref": "#/components/schemas/BadRequestError"
  2953. }
  2954. }
  2955. }
  2956. }
  2957. },
  2958. "description": "Get formatter status",
  2959. "summary": "Get formatter status",
  2960. "x-codeSamples": [
  2961. {
  2962. "lang": "js",
  2963. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
  2964. }
  2965. ]
  2966. }
  2967. },
  2968. "/mcp": {
  2969. "get": {
  2970. "tags": ["mcp"],
  2971. "operationId": "mcp.status",
  2972. "parameters": [
  2973. {
  2974. "name": "directory",
  2975. "in": "query",
  2976. "schema": {
  2977. "type": "string"
  2978. },
  2979. "required": false
  2980. },
  2981. {
  2982. "name": "workspace",
  2983. "in": "query",
  2984. "schema": {
  2985. "type": "string"
  2986. },
  2987. "required": false
  2988. }
  2989. ],
  2990. "responses": {
  2991. "200": {
  2992. "description": "MCP server status",
  2993. "content": {
  2994. "application/json": {
  2995. "schema": {
  2996. "type": "object",
  2997. "additionalProperties": {
  2998. "$ref": "#/components/schemas/MCPStatus"
  2999. },
  3000. "description": "MCP server status"
  3001. }
  3002. }
  3003. }
  3004. },
  3005. "400": {
  3006. "description": "Bad request",
  3007. "content": {
  3008. "application/json": {
  3009. "schema": {
  3010. "$ref": "#/components/schemas/BadRequestError"
  3011. }
  3012. }
  3013. }
  3014. }
  3015. },
  3016. "description": "Get the status of all Model Context Protocol (MCP) servers.",
  3017. "summary": "Get MCP status",
  3018. "x-codeSamples": [
  3019. {
  3020. "lang": "js",
  3021. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
  3022. }
  3023. ]
  3024. },
  3025. "post": {
  3026. "tags": ["mcp"],
  3027. "operationId": "mcp.add",
  3028. "parameters": [
  3029. {
  3030. "name": "directory",
  3031. "in": "query",
  3032. "schema": {
  3033. "type": "string"
  3034. },
  3035. "required": false
  3036. },
  3037. {
  3038. "name": "workspace",
  3039. "in": "query",
  3040. "schema": {
  3041. "type": "string"
  3042. },
  3043. "required": false
  3044. }
  3045. ],
  3046. "responses": {
  3047. "200": {
  3048. "description": "MCP server added successfully",
  3049. "content": {
  3050. "application/json": {
  3051. "schema": {
  3052. "type": "object",
  3053. "additionalProperties": {
  3054. "$ref": "#/components/schemas/MCPStatus"
  3055. },
  3056. "description": "MCP server added successfully"
  3057. }
  3058. }
  3059. }
  3060. },
  3061. "400": {
  3062. "description": "BadRequest | InvalidRequestError",
  3063. "content": {
  3064. "application/json": {
  3065. "schema": {
  3066. "anyOf": [
  3067. {
  3068. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3069. },
  3070. {
  3071. "$ref": "#/components/schemas/InvalidRequestError"
  3072. }
  3073. ]
  3074. }
  3075. }
  3076. }
  3077. }
  3078. },
  3079. "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
  3080. "summary": "Add MCP server",
  3081. "requestBody": {
  3082. "content": {
  3083. "application/json": {
  3084. "schema": {
  3085. "type": "object",
  3086. "properties": {
  3087. "name": {
  3088. "type": "string"
  3089. },
  3090. "config": {
  3091. "anyOf": [
  3092. {
  3093. "$ref": "#/components/schemas/McpLocalConfig"
  3094. },
  3095. {
  3096. "$ref": "#/components/schemas/McpRemoteConfig"
  3097. }
  3098. ]
  3099. }
  3100. },
  3101. "required": ["name", "config"],
  3102. "additionalProperties": false
  3103. }
  3104. }
  3105. }
  3106. },
  3107. "x-codeSamples": [
  3108. {
  3109. "lang": "js",
  3110. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
  3111. }
  3112. ]
  3113. }
  3114. },
  3115. "/mcp/{name}/auth": {
  3116. "post": {
  3117. "tags": ["mcp"],
  3118. "operationId": "mcp.auth.start",
  3119. "parameters": [
  3120. {
  3121. "name": "name",
  3122. "in": "path",
  3123. "schema": {
  3124. "type": "string"
  3125. },
  3126. "required": true
  3127. },
  3128. {
  3129. "name": "directory",
  3130. "in": "query",
  3131. "schema": {
  3132. "type": "string"
  3133. },
  3134. "required": false
  3135. },
  3136. {
  3137. "name": "workspace",
  3138. "in": "query",
  3139. "schema": {
  3140. "type": "string"
  3141. },
  3142. "required": false
  3143. }
  3144. ],
  3145. "responses": {
  3146. "200": {
  3147. "description": "OAuth flow started",
  3148. "content": {
  3149. "application/json": {
  3150. "schema": {
  3151. "type": "object",
  3152. "properties": {
  3153. "authorizationUrl": {
  3154. "type": "string"
  3155. },
  3156. "oauthState": {
  3157. "type": "string"
  3158. }
  3159. },
  3160. "required": ["authorizationUrl", "oauthState"],
  3161. "additionalProperties": false,
  3162. "description": "OAuth flow started"
  3163. }
  3164. }
  3165. }
  3166. },
  3167. "400": {
  3168. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3169. "content": {
  3170. "application/json": {
  3171. "schema": {
  3172. "anyOf": [
  3173. {
  3174. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3175. },
  3176. {
  3177. "$ref": "#/components/schemas/InvalidRequestError"
  3178. }
  3179. ]
  3180. }
  3181. }
  3182. }
  3183. },
  3184. "404": {
  3185. "description": "McpServerNotFoundError",
  3186. "content": {
  3187. "application/json": {
  3188. "schema": {
  3189. "$ref": "#/components/schemas/McpServerNotFoundError"
  3190. }
  3191. }
  3192. }
  3193. }
  3194. },
  3195. "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
  3196. "summary": "Start MCP OAuth",
  3197. "x-codeSamples": [
  3198. {
  3199. "lang": "js",
  3200. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
  3201. }
  3202. ]
  3203. },
  3204. "delete": {
  3205. "tags": ["mcp"],
  3206. "operationId": "mcp.auth.remove",
  3207. "parameters": [
  3208. {
  3209. "name": "name",
  3210. "in": "path",
  3211. "schema": {
  3212. "type": "string"
  3213. },
  3214. "required": true
  3215. },
  3216. {
  3217. "name": "directory",
  3218. "in": "query",
  3219. "schema": {
  3220. "type": "string"
  3221. },
  3222. "required": false
  3223. },
  3224. {
  3225. "name": "workspace",
  3226. "in": "query",
  3227. "schema": {
  3228. "type": "string"
  3229. },
  3230. "required": false
  3231. }
  3232. ],
  3233. "responses": {
  3234. "200": {
  3235. "description": "OAuth credentials removed",
  3236. "content": {
  3237. "application/json": {
  3238. "schema": {
  3239. "type": "object",
  3240. "properties": {
  3241. "success": {
  3242. "type": "boolean",
  3243. "enum": [true]
  3244. }
  3245. },
  3246. "required": ["success"],
  3247. "additionalProperties": false,
  3248. "description": "OAuth credentials removed"
  3249. }
  3250. }
  3251. }
  3252. },
  3253. "400": {
  3254. "description": "Bad request",
  3255. "content": {
  3256. "application/json": {
  3257. "schema": {
  3258. "$ref": "#/components/schemas/BadRequestError"
  3259. }
  3260. }
  3261. }
  3262. },
  3263. "404": {
  3264. "description": "McpServerNotFoundError",
  3265. "content": {
  3266. "application/json": {
  3267. "schema": {
  3268. "$ref": "#/components/schemas/McpServerNotFoundError"
  3269. }
  3270. }
  3271. }
  3272. }
  3273. },
  3274. "description": "Remove OAuth credentials for an MCP server.",
  3275. "summary": "Remove MCP OAuth",
  3276. "x-codeSamples": [
  3277. {
  3278. "lang": "js",
  3279. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
  3280. }
  3281. ]
  3282. }
  3283. },
  3284. "/mcp/{name}/auth/callback": {
  3285. "post": {
  3286. "tags": ["mcp"],
  3287. "operationId": "mcp.auth.callback",
  3288. "parameters": [
  3289. {
  3290. "name": "name",
  3291. "in": "path",
  3292. "schema": {
  3293. "type": "string"
  3294. },
  3295. "required": true
  3296. },
  3297. {
  3298. "name": "directory",
  3299. "in": "query",
  3300. "schema": {
  3301. "type": "string"
  3302. },
  3303. "required": false
  3304. },
  3305. {
  3306. "name": "workspace",
  3307. "in": "query",
  3308. "schema": {
  3309. "type": "string"
  3310. },
  3311. "required": false
  3312. }
  3313. ],
  3314. "responses": {
  3315. "200": {
  3316. "description": "OAuth authentication completed",
  3317. "content": {
  3318. "application/json": {
  3319. "schema": {
  3320. "$ref": "#/components/schemas/MCPStatus"
  3321. }
  3322. }
  3323. }
  3324. },
  3325. "400": {
  3326. "description": "BadRequest | InvalidRequestError",
  3327. "content": {
  3328. "application/json": {
  3329. "schema": {
  3330. "anyOf": [
  3331. {
  3332. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3333. },
  3334. {
  3335. "$ref": "#/components/schemas/InvalidRequestError"
  3336. }
  3337. ]
  3338. }
  3339. }
  3340. }
  3341. },
  3342. "404": {
  3343. "description": "McpServerNotFoundError",
  3344. "content": {
  3345. "application/json": {
  3346. "schema": {
  3347. "$ref": "#/components/schemas/McpServerNotFoundError"
  3348. }
  3349. }
  3350. }
  3351. }
  3352. },
  3353. "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
  3354. "summary": "Complete MCP OAuth",
  3355. "requestBody": {
  3356. "content": {
  3357. "application/json": {
  3358. "schema": {
  3359. "type": "object",
  3360. "properties": {
  3361. "code": {
  3362. "type": "string"
  3363. }
  3364. },
  3365. "required": ["code"],
  3366. "additionalProperties": false
  3367. }
  3368. }
  3369. }
  3370. },
  3371. "x-codeSamples": [
  3372. {
  3373. "lang": "js",
  3374. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
  3375. }
  3376. ]
  3377. }
  3378. },
  3379. "/mcp/{name}/auth/authenticate": {
  3380. "post": {
  3381. "tags": ["mcp"],
  3382. "operationId": "mcp.auth.authenticate",
  3383. "parameters": [
  3384. {
  3385. "name": "name",
  3386. "in": "path",
  3387. "schema": {
  3388. "type": "string"
  3389. },
  3390. "required": true
  3391. },
  3392. {
  3393. "name": "directory",
  3394. "in": "query",
  3395. "schema": {
  3396. "type": "string"
  3397. },
  3398. "required": false
  3399. },
  3400. {
  3401. "name": "workspace",
  3402. "in": "query",
  3403. "schema": {
  3404. "type": "string"
  3405. },
  3406. "required": false
  3407. }
  3408. ],
  3409. "responses": {
  3410. "200": {
  3411. "description": "OAuth authentication completed",
  3412. "content": {
  3413. "application/json": {
  3414. "schema": {
  3415. "$ref": "#/components/schemas/MCPStatus"
  3416. }
  3417. }
  3418. }
  3419. },
  3420. "400": {
  3421. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3422. "content": {
  3423. "application/json": {
  3424. "schema": {
  3425. "anyOf": [
  3426. {
  3427. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3428. },
  3429. {
  3430. "$ref": "#/components/schemas/InvalidRequestError"
  3431. }
  3432. ]
  3433. }
  3434. }
  3435. }
  3436. },
  3437. "404": {
  3438. "description": "McpServerNotFoundError",
  3439. "content": {
  3440. "application/json": {
  3441. "schema": {
  3442. "$ref": "#/components/schemas/McpServerNotFoundError"
  3443. }
  3444. }
  3445. }
  3446. }
  3447. },
  3448. "description": "Start OAuth flow and wait for callback (opens browser).",
  3449. "summary": "Authenticate MCP OAuth",
  3450. "x-codeSamples": [
  3451. {
  3452. "lang": "js",
  3453. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
  3454. }
  3455. ]
  3456. }
  3457. },
  3458. "/mcp/{name}/connect": {
  3459. "post": {
  3460. "tags": ["mcp"],
  3461. "operationId": "mcp.connect",
  3462. "parameters": [
  3463. {
  3464. "name": "name",
  3465. "in": "path",
  3466. "schema": {
  3467. "type": "string"
  3468. },
  3469. "required": true
  3470. },
  3471. {
  3472. "name": "directory",
  3473. "in": "query",
  3474. "schema": {
  3475. "type": "string"
  3476. },
  3477. "required": false
  3478. },
  3479. {
  3480. "name": "workspace",
  3481. "in": "query",
  3482. "schema": {
  3483. "type": "string"
  3484. },
  3485. "required": false
  3486. }
  3487. ],
  3488. "responses": {
  3489. "200": {
  3490. "description": "MCP server connected successfully",
  3491. "content": {
  3492. "application/json": {
  3493. "schema": {
  3494. "type": "boolean",
  3495. "description": "MCP server connected successfully"
  3496. }
  3497. }
  3498. }
  3499. },
  3500. "400": {
  3501. "description": "Bad request",
  3502. "content": {
  3503. "application/json": {
  3504. "schema": {
  3505. "$ref": "#/components/schemas/BadRequestError"
  3506. }
  3507. }
  3508. }
  3509. },
  3510. "404": {
  3511. "description": "McpServerNotFoundError",
  3512. "content": {
  3513. "application/json": {
  3514. "schema": {
  3515. "$ref": "#/components/schemas/McpServerNotFoundError"
  3516. }
  3517. }
  3518. }
  3519. }
  3520. },
  3521. "description": "Connect an MCP server.",
  3522. "x-codeSamples": [
  3523. {
  3524. "lang": "js",
  3525. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
  3526. }
  3527. ]
  3528. }
  3529. },
  3530. "/mcp/{name}/disconnect": {
  3531. "post": {
  3532. "tags": ["mcp"],
  3533. "operationId": "mcp.disconnect",
  3534. "parameters": [
  3535. {
  3536. "name": "name",
  3537. "in": "path",
  3538. "schema": {
  3539. "type": "string"
  3540. },
  3541. "required": true
  3542. },
  3543. {
  3544. "name": "directory",
  3545. "in": "query",
  3546. "schema": {
  3547. "type": "string"
  3548. },
  3549. "required": false
  3550. },
  3551. {
  3552. "name": "workspace",
  3553. "in": "query",
  3554. "schema": {
  3555. "type": "string"
  3556. },
  3557. "required": false
  3558. }
  3559. ],
  3560. "responses": {
  3561. "200": {
  3562. "description": "MCP server disconnected successfully",
  3563. "content": {
  3564. "application/json": {
  3565. "schema": {
  3566. "type": "boolean",
  3567. "description": "MCP server disconnected successfully"
  3568. }
  3569. }
  3570. }
  3571. },
  3572. "400": {
  3573. "description": "Bad request",
  3574. "content": {
  3575. "application/json": {
  3576. "schema": {
  3577. "$ref": "#/components/schemas/BadRequestError"
  3578. }
  3579. }
  3580. }
  3581. },
  3582. "404": {
  3583. "description": "McpServerNotFoundError",
  3584. "content": {
  3585. "application/json": {
  3586. "schema": {
  3587. "$ref": "#/components/schemas/McpServerNotFoundError"
  3588. }
  3589. }
  3590. }
  3591. }
  3592. },
  3593. "description": "Disconnect an MCP server.",
  3594. "x-codeSamples": [
  3595. {
  3596. "lang": "js",
  3597. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
  3598. }
  3599. ]
  3600. }
  3601. },
  3602. "/project": {
  3603. "get": {
  3604. "tags": ["project"],
  3605. "operationId": "project.list",
  3606. "parameters": [
  3607. {
  3608. "name": "directory",
  3609. "in": "query",
  3610. "schema": {
  3611. "type": "string"
  3612. },
  3613. "required": false
  3614. },
  3615. {
  3616. "name": "workspace",
  3617. "in": "query",
  3618. "schema": {
  3619. "type": "string"
  3620. },
  3621. "required": false
  3622. }
  3623. ],
  3624. "responses": {
  3625. "200": {
  3626. "description": "List of projects",
  3627. "content": {
  3628. "application/json": {
  3629. "schema": {
  3630. "type": "array",
  3631. "items": {
  3632. "$ref": "#/components/schemas/Project"
  3633. },
  3634. "description": "List of projects"
  3635. }
  3636. }
  3637. }
  3638. },
  3639. "400": {
  3640. "description": "Bad request",
  3641. "content": {
  3642. "application/json": {
  3643. "schema": {
  3644. "$ref": "#/components/schemas/BadRequestError"
  3645. }
  3646. }
  3647. }
  3648. }
  3649. },
  3650. "description": "Get a list of projects that have been opened with OpenCode.",
  3651. "summary": "List all projects",
  3652. "x-codeSamples": [
  3653. {
  3654. "lang": "js",
  3655. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.list({\n ...\n})"
  3656. }
  3657. ]
  3658. }
  3659. },
  3660. "/project/current": {
  3661. "get": {
  3662. "tags": ["project"],
  3663. "operationId": "project.current",
  3664. "parameters": [
  3665. {
  3666. "name": "directory",
  3667. "in": "query",
  3668. "schema": {
  3669. "type": "string"
  3670. },
  3671. "required": false
  3672. },
  3673. {
  3674. "name": "workspace",
  3675. "in": "query",
  3676. "schema": {
  3677. "type": "string"
  3678. },
  3679. "required": false
  3680. }
  3681. ],
  3682. "responses": {
  3683. "200": {
  3684. "description": "Current project information",
  3685. "content": {
  3686. "application/json": {
  3687. "schema": {
  3688. "$ref": "#/components/schemas/Project"
  3689. }
  3690. }
  3691. }
  3692. },
  3693. "400": {
  3694. "description": "Bad request",
  3695. "content": {
  3696. "application/json": {
  3697. "schema": {
  3698. "$ref": "#/components/schemas/BadRequestError"
  3699. }
  3700. }
  3701. }
  3702. }
  3703. },
  3704. "description": "Retrieve the currently active project that OpenCode is working with.",
  3705. "summary": "Get current project",
  3706. "x-codeSamples": [
  3707. {
  3708. "lang": "js",
  3709. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.current({\n ...\n})"
  3710. }
  3711. ]
  3712. }
  3713. },
  3714. "/project/git/init": {
  3715. "post": {
  3716. "tags": ["project"],
  3717. "operationId": "project.initGit",
  3718. "parameters": [
  3719. {
  3720. "name": "directory",
  3721. "in": "query",
  3722. "schema": {
  3723. "type": "string"
  3724. },
  3725. "required": false
  3726. },
  3727. {
  3728. "name": "workspace",
  3729. "in": "query",
  3730. "schema": {
  3731. "type": "string"
  3732. },
  3733. "required": false
  3734. }
  3735. ],
  3736. "responses": {
  3737. "200": {
  3738. "description": "Project information after git initialization",
  3739. "content": {
  3740. "application/json": {
  3741. "schema": {
  3742. "$ref": "#/components/schemas/Project"
  3743. }
  3744. }
  3745. }
  3746. },
  3747. "400": {
  3748. "description": "Bad request",
  3749. "content": {
  3750. "application/json": {
  3751. "schema": {
  3752. "$ref": "#/components/schemas/BadRequestError"
  3753. }
  3754. }
  3755. }
  3756. }
  3757. },
  3758. "description": "Create a git repository for the current project and return the refreshed project info.",
  3759. "summary": "Initialize git repository",
  3760. "x-codeSamples": [
  3761. {
  3762. "lang": "js",
  3763. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.initGit({\n ...\n})"
  3764. }
  3765. ]
  3766. }
  3767. },
  3768. "/project/{projectID}": {
  3769. "patch": {
  3770. "tags": ["project"],
  3771. "operationId": "project.update",
  3772. "parameters": [
  3773. {
  3774. "name": "projectID",
  3775. "in": "path",
  3776. "schema": {
  3777. "type": "string"
  3778. },
  3779. "required": true
  3780. },
  3781. {
  3782. "name": "directory",
  3783. "in": "query",
  3784. "schema": {
  3785. "type": "string"
  3786. },
  3787. "required": false
  3788. },
  3789. {
  3790. "name": "workspace",
  3791. "in": "query",
  3792. "schema": {
  3793. "type": "string"
  3794. },
  3795. "required": false
  3796. }
  3797. ],
  3798. "responses": {
  3799. "200": {
  3800. "description": "Updated project information",
  3801. "content": {
  3802. "application/json": {
  3803. "schema": {
  3804. "$ref": "#/components/schemas/Project"
  3805. }
  3806. }
  3807. }
  3808. },
  3809. "400": {
  3810. "description": "BadRequest | InvalidRequestError",
  3811. "content": {
  3812. "application/json": {
  3813. "schema": {
  3814. "anyOf": [
  3815. {
  3816. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3817. },
  3818. {
  3819. "$ref": "#/components/schemas/InvalidRequestError"
  3820. }
  3821. ]
  3822. }
  3823. }
  3824. }
  3825. },
  3826. "404": {
  3827. "description": "ProjectNotFoundError",
  3828. "content": {
  3829. "application/json": {
  3830. "schema": {
  3831. "$ref": "#/components/schemas/ProjectNotFoundError"
  3832. }
  3833. }
  3834. }
  3835. }
  3836. },
  3837. "description": "Update project properties such as name, icon, and commands.",
  3838. "summary": "Update project",
  3839. "requestBody": {
  3840. "content": {
  3841. "application/json": {
  3842. "schema": {
  3843. "type": "object",
  3844. "properties": {
  3845. "name": {
  3846. "type": "string"
  3847. },
  3848. "icon": {
  3849. "type": "object",
  3850. "properties": {
  3851. "url": {
  3852. "type": "string"
  3853. },
  3854. "override": {
  3855. "type": "string"
  3856. },
  3857. "color": {
  3858. "type": "string"
  3859. }
  3860. },
  3861. "additionalProperties": false
  3862. },
  3863. "commands": {
  3864. "type": "object",
  3865. "properties": {
  3866. "start": {
  3867. "type": "string",
  3868. "description": "Startup script to run when creating a new workspace (worktree)"
  3869. }
  3870. },
  3871. "additionalProperties": false
  3872. }
  3873. },
  3874. "additionalProperties": false
  3875. }
  3876. }
  3877. }
  3878. },
  3879. "x-codeSamples": [
  3880. {
  3881. "lang": "js",
  3882. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.update({\n ...\n})"
  3883. }
  3884. ]
  3885. }
  3886. },
  3887. "/project/{projectID}/directories": {
  3888. "get": {
  3889. "tags": ["project"],
  3890. "operationId": "project.directories",
  3891. "parameters": [
  3892. {
  3893. "name": "projectID",
  3894. "in": "path",
  3895. "schema": {
  3896. "type": "string"
  3897. },
  3898. "required": true
  3899. },
  3900. {
  3901. "name": "directory",
  3902. "in": "query",
  3903. "schema": {
  3904. "type": "string"
  3905. },
  3906. "required": false
  3907. },
  3908. {
  3909. "name": "workspace",
  3910. "in": "query",
  3911. "schema": {
  3912. "type": "string"
  3913. },
  3914. "required": false
  3915. }
  3916. ],
  3917. "responses": {
  3918. "200": {
  3919. "description": "Project directories",
  3920. "content": {
  3921. "application/json": {
  3922. "schema": {
  3923. "$ref": "#/components/schemas/ProjectDirectories"
  3924. }
  3925. }
  3926. }
  3927. },
  3928. "400": {
  3929. "description": "Bad request",
  3930. "content": {
  3931. "application/json": {
  3932. "schema": {
  3933. "$ref": "#/components/schemas/BadRequestError"
  3934. }
  3935. }
  3936. }
  3937. }
  3938. },
  3939. "description": "List known local absolute directories for a project.",
  3940. "summary": "List project directories",
  3941. "x-codeSamples": [
  3942. {
  3943. "lang": "js",
  3944. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.directories({\n ...\n})"
  3945. }
  3946. ]
  3947. }
  3948. },
  3949. "/experimental/project/{projectID}/copy/generate-name": {
  3950. "post": {
  3951. "tags": ["projectCopy"],
  3952. "operationId": "experimental.projectCopy.generateName",
  3953. "parameters": [
  3954. {
  3955. "name": "projectID",
  3956. "in": "path",
  3957. "schema": {
  3958. "type": "string"
  3959. },
  3960. "required": true
  3961. },
  3962. {
  3963. "name": "directory",
  3964. "in": "query",
  3965. "schema": {
  3966. "type": "string"
  3967. },
  3968. "required": false
  3969. },
  3970. {
  3971. "name": "workspace",
  3972. "in": "query",
  3973. "schema": {
  3974. "type": "string"
  3975. },
  3976. "required": false
  3977. }
  3978. ],
  3979. "responses": {
  3980. "200": {
  3981. "description": "Success",
  3982. "content": {
  3983. "application/json": {
  3984. "schema": {
  3985. "type": "object",
  3986. "properties": {
  3987. "name": {
  3988. "type": "string"
  3989. }
  3990. },
  3991. "required": ["name"],
  3992. "additionalProperties": false
  3993. }
  3994. }
  3995. }
  3996. },
  3997. "400": {
  3998. "description": "Bad request",
  3999. "content": {
  4000. "application/json": {
  4001. "schema": {
  4002. "$ref": "#/components/schemas/BadRequestError"
  4003. }
  4004. }
  4005. }
  4006. }
  4007. },
  4008. "description": "Generate a short name for a project copy from task context.",
  4009. "summary": "Generate project copy name",
  4010. "requestBody": {
  4011. "content": {
  4012. "application/json": {
  4013. "schema": {
  4014. "type": "object",
  4015. "properties": {
  4016. "context": {
  4017. "type": "string"
  4018. }
  4019. },
  4020. "additionalProperties": false
  4021. }
  4022. }
  4023. }
  4024. },
  4025. "x-codeSamples": [
  4026. {
  4027. "lang": "js",
  4028. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.projectCopy.generateName({\n ...\n})"
  4029. }
  4030. ]
  4031. }
  4032. },
  4033. "/pty/shells": {
  4034. "get": {
  4035. "tags": ["pty"],
  4036. "operationId": "pty.shells",
  4037. "parameters": [
  4038. {
  4039. "name": "directory",
  4040. "in": "query",
  4041. "schema": {
  4042. "type": "string"
  4043. },
  4044. "required": false
  4045. },
  4046. {
  4047. "name": "workspace",
  4048. "in": "query",
  4049. "schema": {
  4050. "type": "string"
  4051. },
  4052. "required": false
  4053. }
  4054. ],
  4055. "responses": {
  4056. "200": {
  4057. "description": "List of shells",
  4058. "content": {
  4059. "application/json": {
  4060. "schema": {
  4061. "type": "array",
  4062. "items": {
  4063. "type": "object",
  4064. "properties": {
  4065. "path": {
  4066. "type": "string"
  4067. },
  4068. "name": {
  4069. "type": "string"
  4070. },
  4071. "acceptable": {
  4072. "type": "boolean"
  4073. }
  4074. },
  4075. "required": ["path", "name", "acceptable"],
  4076. "additionalProperties": false
  4077. },
  4078. "description": "List of shells"
  4079. }
  4080. }
  4081. }
  4082. },
  4083. "400": {
  4084. "description": "Bad request",
  4085. "content": {
  4086. "application/json": {
  4087. "schema": {
  4088. "$ref": "#/components/schemas/BadRequestError"
  4089. }
  4090. }
  4091. }
  4092. }
  4093. },
  4094. "description": "Get a list of available shells on the system.",
  4095. "summary": "List available shells",
  4096. "x-codeSamples": [
  4097. {
  4098. "lang": "js",
  4099. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.shells({\n ...\n})"
  4100. }
  4101. ]
  4102. }
  4103. },
  4104. "/pty": {
  4105. "get": {
  4106. "tags": ["pty"],
  4107. "operationId": "pty.list",
  4108. "parameters": [
  4109. {
  4110. "name": "directory",
  4111. "in": "query",
  4112. "schema": {
  4113. "type": "string"
  4114. },
  4115. "required": false
  4116. },
  4117. {
  4118. "name": "workspace",
  4119. "in": "query",
  4120. "schema": {
  4121. "type": "string"
  4122. },
  4123. "required": false
  4124. }
  4125. ],
  4126. "responses": {
  4127. "200": {
  4128. "description": "List of sessions",
  4129. "content": {
  4130. "application/json": {
  4131. "schema": {
  4132. "type": "array",
  4133. "items": {
  4134. "$ref": "#/components/schemas/Pty"
  4135. },
  4136. "description": "List of sessions"
  4137. }
  4138. }
  4139. }
  4140. },
  4141. "400": {
  4142. "description": "Bad request",
  4143. "content": {
  4144. "application/json": {
  4145. "schema": {
  4146. "$ref": "#/components/schemas/BadRequestError"
  4147. }
  4148. }
  4149. }
  4150. }
  4151. },
  4152. "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
  4153. "summary": "List PTY sessions",
  4154. "x-codeSamples": [
  4155. {
  4156. "lang": "js",
  4157. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
  4158. }
  4159. ]
  4160. },
  4161. "post": {
  4162. "tags": ["pty"],
  4163. "operationId": "pty.create",
  4164. "parameters": [
  4165. {
  4166. "name": "directory",
  4167. "in": "query",
  4168. "schema": {
  4169. "type": "string"
  4170. },
  4171. "required": false
  4172. },
  4173. {
  4174. "name": "workspace",
  4175. "in": "query",
  4176. "schema": {
  4177. "type": "string"
  4178. },
  4179. "required": false
  4180. }
  4181. ],
  4182. "responses": {
  4183. "200": {
  4184. "description": "Created session",
  4185. "content": {
  4186. "application/json": {
  4187. "schema": {
  4188. "$ref": "#/components/schemas/Pty"
  4189. }
  4190. }
  4191. }
  4192. },
  4193. "400": {
  4194. "description": "BadRequest | InvalidRequestError",
  4195. "content": {
  4196. "application/json": {
  4197. "schema": {
  4198. "anyOf": [
  4199. {
  4200. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4201. },
  4202. {
  4203. "$ref": "#/components/schemas/InvalidRequestError"
  4204. }
  4205. ]
  4206. }
  4207. }
  4208. }
  4209. }
  4210. },
  4211. "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
  4212. "summary": "Create PTY session",
  4213. "requestBody": {
  4214. "content": {
  4215. "application/json": {
  4216. "schema": {
  4217. "type": "object",
  4218. "properties": {
  4219. "command": {
  4220. "type": "string"
  4221. },
  4222. "args": {
  4223. "type": "array",
  4224. "items": {
  4225. "type": "string"
  4226. }
  4227. },
  4228. "cwd": {
  4229. "type": "string"
  4230. },
  4231. "title": {
  4232. "type": "string"
  4233. },
  4234. "env": {
  4235. "type": "object",
  4236. "additionalProperties": {
  4237. "type": "string"
  4238. }
  4239. }
  4240. },
  4241. "additionalProperties": false
  4242. }
  4243. }
  4244. }
  4245. },
  4246. "x-codeSamples": [
  4247. {
  4248. "lang": "js",
  4249. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
  4250. }
  4251. ]
  4252. }
  4253. },
  4254. "/pty/{ptyID}": {
  4255. "get": {
  4256. "tags": ["pty"],
  4257. "operationId": "pty.get",
  4258. "parameters": [
  4259. {
  4260. "name": "ptyID",
  4261. "in": "path",
  4262. "schema": {
  4263. "type": "string",
  4264. "pattern": "^pty"
  4265. },
  4266. "required": true
  4267. },
  4268. {
  4269. "name": "directory",
  4270. "in": "query",
  4271. "schema": {
  4272. "type": "string"
  4273. },
  4274. "required": false
  4275. },
  4276. {
  4277. "name": "workspace",
  4278. "in": "query",
  4279. "schema": {
  4280. "type": "string"
  4281. },
  4282. "required": false
  4283. }
  4284. ],
  4285. "responses": {
  4286. "200": {
  4287. "description": "Session info",
  4288. "content": {
  4289. "application/json": {
  4290. "schema": {
  4291. "$ref": "#/components/schemas/Pty"
  4292. }
  4293. }
  4294. }
  4295. },
  4296. "400": {
  4297. "description": "Bad request",
  4298. "content": {
  4299. "application/json": {
  4300. "schema": {
  4301. "$ref": "#/components/schemas/BadRequestError"
  4302. }
  4303. }
  4304. }
  4305. },
  4306. "404": {
  4307. "description": "PtyNotFoundError",
  4308. "content": {
  4309. "application/json": {
  4310. "schema": {
  4311. "$ref": "#/components/schemas/PtyNotFoundError"
  4312. }
  4313. }
  4314. }
  4315. }
  4316. },
  4317. "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
  4318. "summary": "Get PTY session",
  4319. "x-codeSamples": [
  4320. {
  4321. "lang": "js",
  4322. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
  4323. }
  4324. ]
  4325. },
  4326. "put": {
  4327. "tags": ["pty"],
  4328. "operationId": "pty.update",
  4329. "parameters": [
  4330. {
  4331. "name": "ptyID",
  4332. "in": "path",
  4333. "schema": {
  4334. "type": "string",
  4335. "pattern": "^pty"
  4336. },
  4337. "required": true
  4338. },
  4339. {
  4340. "name": "directory",
  4341. "in": "query",
  4342. "schema": {
  4343. "type": "string"
  4344. },
  4345. "required": false
  4346. },
  4347. {
  4348. "name": "workspace",
  4349. "in": "query",
  4350. "schema": {
  4351. "type": "string"
  4352. },
  4353. "required": false
  4354. }
  4355. ],
  4356. "responses": {
  4357. "200": {
  4358. "description": "Updated session",
  4359. "content": {
  4360. "application/json": {
  4361. "schema": {
  4362. "$ref": "#/components/schemas/Pty"
  4363. }
  4364. }
  4365. }
  4366. },
  4367. "400": {
  4368. "description": "BadRequest | InvalidRequestError",
  4369. "content": {
  4370. "application/json": {
  4371. "schema": {
  4372. "anyOf": [
  4373. {
  4374. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4375. },
  4376. {
  4377. "$ref": "#/components/schemas/InvalidRequestError"
  4378. }
  4379. ]
  4380. }
  4381. }
  4382. }
  4383. },
  4384. "404": {
  4385. "description": "PtyNotFoundError",
  4386. "content": {
  4387. "application/json": {
  4388. "schema": {
  4389. "$ref": "#/components/schemas/PtyNotFoundError"
  4390. }
  4391. }
  4392. }
  4393. }
  4394. },
  4395. "description": "Update properties of an existing pseudo-terminal (PTY) session.",
  4396. "summary": "Update PTY session",
  4397. "requestBody": {
  4398. "content": {
  4399. "application/json": {
  4400. "schema": {
  4401. "type": "object",
  4402. "properties": {
  4403. "title": {
  4404. "type": "string"
  4405. },
  4406. "size": {
  4407. "type": "object",
  4408. "properties": {
  4409. "rows": {
  4410. "type": "integer",
  4411. "exclusiveMinimum": 0
  4412. },
  4413. "cols": {
  4414. "type": "integer",
  4415. "exclusiveMinimum": 0
  4416. }
  4417. },
  4418. "required": ["rows", "cols"],
  4419. "additionalProperties": false
  4420. }
  4421. },
  4422. "additionalProperties": false
  4423. }
  4424. }
  4425. }
  4426. },
  4427. "x-codeSamples": [
  4428. {
  4429. "lang": "js",
  4430. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
  4431. }
  4432. ]
  4433. },
  4434. "delete": {
  4435. "tags": ["pty"],
  4436. "operationId": "pty.remove",
  4437. "parameters": [
  4438. {
  4439. "name": "ptyID",
  4440. "in": "path",
  4441. "schema": {
  4442. "type": "string",
  4443. "pattern": "^pty"
  4444. },
  4445. "required": true
  4446. },
  4447. {
  4448. "name": "directory",
  4449. "in": "query",
  4450. "schema": {
  4451. "type": "string"
  4452. },
  4453. "required": false
  4454. },
  4455. {
  4456. "name": "workspace",
  4457. "in": "query",
  4458. "schema": {
  4459. "type": "string"
  4460. },
  4461. "required": false
  4462. }
  4463. ],
  4464. "responses": {
  4465. "200": {
  4466. "description": "Session removed",
  4467. "content": {
  4468. "application/json": {
  4469. "schema": {
  4470. "type": "boolean",
  4471. "description": "Session removed"
  4472. }
  4473. }
  4474. }
  4475. },
  4476. "400": {
  4477. "description": "Bad request",
  4478. "content": {
  4479. "application/json": {
  4480. "schema": {
  4481. "$ref": "#/components/schemas/BadRequestError"
  4482. }
  4483. }
  4484. }
  4485. },
  4486. "404": {
  4487. "description": "PtyNotFoundError",
  4488. "content": {
  4489. "application/json": {
  4490. "schema": {
  4491. "$ref": "#/components/schemas/PtyNotFoundError"
  4492. }
  4493. }
  4494. }
  4495. }
  4496. },
  4497. "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
  4498. "summary": "Remove PTY session",
  4499. "x-codeSamples": [
  4500. {
  4501. "lang": "js",
  4502. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
  4503. }
  4504. ]
  4505. }
  4506. },
  4507. "/pty/{ptyID}/connect-token": {
  4508. "post": {
  4509. "tags": ["pty"],
  4510. "operationId": "pty.connectToken",
  4511. "parameters": [
  4512. {
  4513. "name": "ptyID",
  4514. "in": "path",
  4515. "schema": {
  4516. "type": "string",
  4517. "pattern": "^pty"
  4518. },
  4519. "required": true
  4520. },
  4521. {
  4522. "name": "directory",
  4523. "in": "query",
  4524. "schema": {
  4525. "type": "string"
  4526. },
  4527. "required": false
  4528. },
  4529. {
  4530. "name": "workspace",
  4531. "in": "query",
  4532. "schema": {
  4533. "type": "string"
  4534. },
  4535. "required": false
  4536. }
  4537. ],
  4538. "responses": {
  4539. "200": {
  4540. "description": "WebSocket connect token",
  4541. "content": {
  4542. "application/json": {
  4543. "schema": {
  4544. "type": "object",
  4545. "properties": {
  4546. "ticket": {
  4547. "type": "string"
  4548. },
  4549. "expires_in": {
  4550. "type": "integer",
  4551. "exclusiveMinimum": 0
  4552. }
  4553. },
  4554. "required": ["ticket", "expires_in"],
  4555. "additionalProperties": false,
  4556. "description": "WebSocket connect token"
  4557. }
  4558. }
  4559. }
  4560. },
  4561. "400": {
  4562. "description": "Bad request",
  4563. "content": {
  4564. "application/json": {
  4565. "schema": {
  4566. "$ref": "#/components/schemas/BadRequestError"
  4567. }
  4568. }
  4569. }
  4570. },
  4571. "403": {
  4572. "description": "PtyForbiddenError",
  4573. "content": {
  4574. "application/json": {
  4575. "schema": {
  4576. "$ref": "#/components/schemas/PtyForbiddenError"
  4577. }
  4578. }
  4579. }
  4580. },
  4581. "404": {
  4582. "description": "PtyNotFoundError",
  4583. "content": {
  4584. "application/json": {
  4585. "schema": {
  4586. "$ref": "#/components/schemas/PtyNotFoundError"
  4587. }
  4588. }
  4589. }
  4590. }
  4591. },
  4592. "description": "Create a short-lived ticket for opening a PTY WebSocket connection.",
  4593. "summary": "Create PTY WebSocket token",
  4594. "x-codeSamples": [
  4595. {
  4596. "lang": "js",
  4597. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connectToken({\n ...\n})"
  4598. }
  4599. ]
  4600. }
  4601. },
  4602. "/question": {
  4603. "get": {
  4604. "tags": ["question"],
  4605. "operationId": "question.list",
  4606. "parameters": [
  4607. {
  4608. "name": "directory",
  4609. "in": "query",
  4610. "schema": {
  4611. "type": "string"
  4612. },
  4613. "required": false
  4614. },
  4615. {
  4616. "name": "workspace",
  4617. "in": "query",
  4618. "schema": {
  4619. "type": "string"
  4620. },
  4621. "required": false
  4622. }
  4623. ],
  4624. "responses": {
  4625. "200": {
  4626. "description": "List of pending questions",
  4627. "content": {
  4628. "application/json": {
  4629. "schema": {
  4630. "type": "array",
  4631. "items": {
  4632. "$ref": "#/components/schemas/QuestionRequest"
  4633. },
  4634. "description": "List of pending questions"
  4635. }
  4636. }
  4637. }
  4638. },
  4639. "400": {
  4640. "description": "Bad request",
  4641. "content": {
  4642. "application/json": {
  4643. "schema": {
  4644. "$ref": "#/components/schemas/BadRequestError"
  4645. }
  4646. }
  4647. }
  4648. }
  4649. },
  4650. "description": "Get all pending question requests across all sessions.",
  4651. "summary": "List pending questions",
  4652. "x-codeSamples": [
  4653. {
  4654. "lang": "js",
  4655. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
  4656. }
  4657. ]
  4658. }
  4659. },
  4660. "/question/{requestID}/reply": {
  4661. "post": {
  4662. "tags": ["question"],
  4663. "operationId": "question.reply",
  4664. "parameters": [
  4665. {
  4666. "name": "requestID",
  4667. "in": "path",
  4668. "schema": {
  4669. "type": "string",
  4670. "pattern": "^que"
  4671. },
  4672. "required": true
  4673. },
  4674. {
  4675. "name": "directory",
  4676. "in": "query",
  4677. "schema": {
  4678. "type": "string"
  4679. },
  4680. "required": false
  4681. },
  4682. {
  4683. "name": "workspace",
  4684. "in": "query",
  4685. "schema": {
  4686. "type": "string"
  4687. },
  4688. "required": false
  4689. }
  4690. ],
  4691. "responses": {
  4692. "200": {
  4693. "description": "Question answered successfully",
  4694. "content": {
  4695. "application/json": {
  4696. "schema": {
  4697. "type": "boolean",
  4698. "description": "Question answered successfully"
  4699. }
  4700. }
  4701. }
  4702. },
  4703. "400": {
  4704. "description": "BadRequest | InvalidRequestError",
  4705. "content": {
  4706. "application/json": {
  4707. "schema": {
  4708. "anyOf": [
  4709. {
  4710. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4711. },
  4712. {
  4713. "$ref": "#/components/schemas/InvalidRequestError"
  4714. }
  4715. ]
  4716. }
  4717. }
  4718. }
  4719. },
  4720. "404": {
  4721. "description": "QuestionNotFoundError",
  4722. "content": {
  4723. "application/json": {
  4724. "schema": {
  4725. "$ref": "#/components/schemas/QuestionNotFoundError"
  4726. }
  4727. }
  4728. }
  4729. }
  4730. },
  4731. "description": "Provide answers to a question request from the AI assistant.",
  4732. "summary": "Reply to question request",
  4733. "requestBody": {
  4734. "content": {
  4735. "application/json": {
  4736. "schema": {
  4737. "type": "object",
  4738. "properties": {
  4739. "answers": {
  4740. "type": "array",
  4741. "items": {
  4742. "$ref": "#/components/schemas/QuestionAnswer"
  4743. },
  4744. "description": "User answers in order of questions (each answer is an array of selected labels)"
  4745. }
  4746. },
  4747. "required": ["answers"],
  4748. "additionalProperties": false
  4749. }
  4750. }
  4751. }
  4752. },
  4753. "x-codeSamples": [
  4754. {
  4755. "lang": "js",
  4756. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
  4757. }
  4758. ]
  4759. }
  4760. },
  4761. "/question/{requestID}/reject": {
  4762. "post": {
  4763. "tags": ["question"],
  4764. "operationId": "question.reject",
  4765. "parameters": [
  4766. {
  4767. "name": "requestID",
  4768. "in": "path",
  4769. "schema": {
  4770. "type": "string",
  4771. "pattern": "^que"
  4772. },
  4773. "required": true
  4774. },
  4775. {
  4776. "name": "directory",
  4777. "in": "query",
  4778. "schema": {
  4779. "type": "string"
  4780. },
  4781. "required": false
  4782. },
  4783. {
  4784. "name": "workspace",
  4785. "in": "query",
  4786. "schema": {
  4787. "type": "string"
  4788. },
  4789. "required": false
  4790. }
  4791. ],
  4792. "responses": {
  4793. "200": {
  4794. "description": "Question rejected successfully",
  4795. "content": {
  4796. "application/json": {
  4797. "schema": {
  4798. "type": "boolean",
  4799. "description": "Question rejected successfully"
  4800. }
  4801. }
  4802. }
  4803. },
  4804. "400": {
  4805. "description": "BadRequest | InvalidRequestError",
  4806. "content": {
  4807. "application/json": {
  4808. "schema": {
  4809. "anyOf": [
  4810. {
  4811. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4812. },
  4813. {
  4814. "$ref": "#/components/schemas/InvalidRequestError"
  4815. }
  4816. ]
  4817. }
  4818. }
  4819. }
  4820. },
  4821. "404": {
  4822. "description": "QuestionNotFoundError",
  4823. "content": {
  4824. "application/json": {
  4825. "schema": {
  4826. "$ref": "#/components/schemas/QuestionNotFoundError"
  4827. }
  4828. }
  4829. }
  4830. }
  4831. },
  4832. "description": "Reject a question request from the AI assistant.",
  4833. "summary": "Reject question request",
  4834. "x-codeSamples": [
  4835. {
  4836. "lang": "js",
  4837. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
  4838. }
  4839. ]
  4840. }
  4841. },
  4842. "/permission": {
  4843. "get": {
  4844. "tags": ["permission"],
  4845. "operationId": "permission.list",
  4846. "parameters": [
  4847. {
  4848. "name": "directory",
  4849. "in": "query",
  4850. "schema": {
  4851. "type": "string"
  4852. },
  4853. "required": false
  4854. },
  4855. {
  4856. "name": "workspace",
  4857. "in": "query",
  4858. "schema": {
  4859. "type": "string"
  4860. },
  4861. "required": false
  4862. }
  4863. ],
  4864. "responses": {
  4865. "200": {
  4866. "description": "List of pending permissions",
  4867. "content": {
  4868. "application/json": {
  4869. "schema": {
  4870. "type": "array",
  4871. "items": {
  4872. "$ref": "#/components/schemas/PermissionRequest"
  4873. },
  4874. "description": "List of pending permissions"
  4875. }
  4876. }
  4877. }
  4878. },
  4879. "400": {
  4880. "description": "Bad request",
  4881. "content": {
  4882. "application/json": {
  4883. "schema": {
  4884. "$ref": "#/components/schemas/BadRequestError"
  4885. }
  4886. }
  4887. }
  4888. }
  4889. },
  4890. "description": "Get all pending permission requests across all sessions.",
  4891. "summary": "List pending permissions",
  4892. "x-codeSamples": [
  4893. {
  4894. "lang": "js",
  4895. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
  4896. }
  4897. ]
  4898. }
  4899. },
  4900. "/permission/{requestID}/reply": {
  4901. "post": {
  4902. "tags": ["permission"],
  4903. "operationId": "permission.reply",
  4904. "parameters": [
  4905. {
  4906. "name": "requestID",
  4907. "in": "path",
  4908. "schema": {
  4909. "type": "string",
  4910. "pattern": "^per"
  4911. },
  4912. "required": true
  4913. },
  4914. {
  4915. "name": "directory",
  4916. "in": "query",
  4917. "schema": {
  4918. "type": "string"
  4919. },
  4920. "required": false
  4921. },
  4922. {
  4923. "name": "workspace",
  4924. "in": "query",
  4925. "schema": {
  4926. "type": "string"
  4927. },
  4928. "required": false
  4929. }
  4930. ],
  4931. "responses": {
  4932. "200": {
  4933. "description": "Permission processed successfully",
  4934. "content": {
  4935. "application/json": {
  4936. "schema": {
  4937. "type": "boolean",
  4938. "description": "Permission processed successfully"
  4939. }
  4940. }
  4941. }
  4942. },
  4943. "400": {
  4944. "description": "BadRequest | InvalidRequestError",
  4945. "content": {
  4946. "application/json": {
  4947. "schema": {
  4948. "anyOf": [
  4949. {
  4950. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4951. },
  4952. {
  4953. "$ref": "#/components/schemas/InvalidRequestError"
  4954. }
  4955. ]
  4956. }
  4957. }
  4958. }
  4959. },
  4960. "404": {
  4961. "description": "PermissionNotFoundError",
  4962. "content": {
  4963. "application/json": {
  4964. "schema": {
  4965. "$ref": "#/components/schemas/PermissionNotFoundError"
  4966. }
  4967. }
  4968. }
  4969. }
  4970. },
  4971. "description": "Approve or deny a permission request from the AI assistant.",
  4972. "summary": "Respond to permission request",
  4973. "requestBody": {
  4974. "content": {
  4975. "application/json": {
  4976. "schema": {
  4977. "type": "object",
  4978. "properties": {
  4979. "reply": {
  4980. "type": "string",
  4981. "enum": ["once", "always", "reject"]
  4982. },
  4983. "message": {
  4984. "type": "string"
  4985. }
  4986. },
  4987. "required": ["reply"],
  4988. "additionalProperties": false
  4989. }
  4990. }
  4991. }
  4992. },
  4993. "x-codeSamples": [
  4994. {
  4995. "lang": "js",
  4996. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
  4997. }
  4998. ]
  4999. }
  5000. },
  5001. "/provider": {
  5002. "get": {
  5003. "tags": ["provider"],
  5004. "operationId": "provider.list",
  5005. "parameters": [
  5006. {
  5007. "name": "directory",
  5008. "in": "query",
  5009. "schema": {
  5010. "type": "string"
  5011. },
  5012. "required": false
  5013. },
  5014. {
  5015. "name": "workspace",
  5016. "in": "query",
  5017. "schema": {
  5018. "type": "string"
  5019. },
  5020. "required": false
  5021. }
  5022. ],
  5023. "responses": {
  5024. "200": {
  5025. "description": "List of providers",
  5026. "content": {
  5027. "application/json": {
  5028. "schema": {
  5029. "type": "object",
  5030. "properties": {
  5031. "all": {
  5032. "type": "array",
  5033. "items": {
  5034. "$ref": "#/components/schemas/Provider"
  5035. }
  5036. },
  5037. "default": {
  5038. "type": "object",
  5039. "additionalProperties": {
  5040. "type": "string"
  5041. }
  5042. },
  5043. "connected": {
  5044. "type": "array",
  5045. "items": {
  5046. "type": "string"
  5047. }
  5048. }
  5049. },
  5050. "required": ["all", "default", "connected"],
  5051. "additionalProperties": false,
  5052. "description": "List of providers"
  5053. }
  5054. }
  5055. }
  5056. },
  5057. "400": {
  5058. "description": "Bad request",
  5059. "content": {
  5060. "application/json": {
  5061. "schema": {
  5062. "$ref": "#/components/schemas/BadRequestError"
  5063. }
  5064. }
  5065. }
  5066. }
  5067. },
  5068. "description": "Get a list of all available AI providers, including both available and connected ones.",
  5069. "summary": "List providers",
  5070. "x-codeSamples": [
  5071. {
  5072. "lang": "js",
  5073. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  5074. }
  5075. ]
  5076. }
  5077. },
  5078. "/provider/auth": {
  5079. "get": {
  5080. "tags": ["provider"],
  5081. "operationId": "provider.auth",
  5082. "parameters": [
  5083. {
  5084. "name": "directory",
  5085. "in": "query",
  5086. "schema": {
  5087. "type": "string"
  5088. },
  5089. "required": false
  5090. },
  5091. {
  5092. "name": "workspace",
  5093. "in": "query",
  5094. "schema": {
  5095. "type": "string"
  5096. },
  5097. "required": false
  5098. }
  5099. ],
  5100. "responses": {
  5101. "200": {
  5102. "description": "Provider auth methods",
  5103. "content": {
  5104. "application/json": {
  5105. "schema": {
  5106. "type": "object",
  5107. "additionalProperties": {
  5108. "type": "array",
  5109. "items": {
  5110. "$ref": "#/components/schemas/ProviderAuthMethod"
  5111. }
  5112. },
  5113. "description": "Provider auth methods"
  5114. }
  5115. }
  5116. }
  5117. },
  5118. "400": {
  5119. "description": "Bad request",
  5120. "content": {
  5121. "application/json": {
  5122. "schema": {
  5123. "$ref": "#/components/schemas/BadRequestError"
  5124. }
  5125. }
  5126. }
  5127. }
  5128. },
  5129. "description": "Retrieve available authentication methods for all AI providers.",
  5130. "summary": "Get provider auth methods",
  5131. "x-codeSamples": [
  5132. {
  5133. "lang": "js",
  5134. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  5135. }
  5136. ]
  5137. }
  5138. },
  5139. "/provider/{providerID}/oauth/authorize": {
  5140. "post": {
  5141. "tags": ["provider"],
  5142. "operationId": "provider.oauth.authorize",
  5143. "parameters": [
  5144. {
  5145. "name": "providerID",
  5146. "in": "path",
  5147. "schema": {
  5148. "type": "string"
  5149. },
  5150. "required": true
  5151. },
  5152. {
  5153. "name": "directory",
  5154. "in": "query",
  5155. "schema": {
  5156. "type": "string"
  5157. },
  5158. "required": false
  5159. },
  5160. {
  5161. "name": "workspace",
  5162. "in": "query",
  5163. "schema": {
  5164. "type": "string"
  5165. },
  5166. "required": false
  5167. }
  5168. ],
  5169. "responses": {
  5170. "200": {
  5171. "description": "Authorization URL and method",
  5172. "content": {
  5173. "application/json": {
  5174. "schema": {
  5175. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  5176. }
  5177. }
  5178. }
  5179. },
  5180. "400": {
  5181. "description": "ProviderAuthError | InvalidRequestError",
  5182. "content": {
  5183. "application/json": {
  5184. "schema": {
  5185. "anyOf": [
  5186. {
  5187. "$ref": "#/components/schemas/ProviderAuthError1"
  5188. },
  5189. {
  5190. "$ref": "#/components/schemas/InvalidRequestError"
  5191. }
  5192. ]
  5193. }
  5194. }
  5195. }
  5196. }
  5197. },
  5198. "description": "Start the OAuth authorization flow for a provider.",
  5199. "summary": "Start OAuth authorization",
  5200. "requestBody": {
  5201. "content": {
  5202. "application/json": {
  5203. "schema": {
  5204. "type": "object",
  5205. "properties": {
  5206. "method": {
  5207. "type": "number",
  5208. "description": "Auth method index"
  5209. },
  5210. "inputs": {
  5211. "type": "object",
  5212. "additionalProperties": {
  5213. "type": "string"
  5214. }
  5215. }
  5216. },
  5217. "required": ["method"],
  5218. "additionalProperties": false
  5219. }
  5220. }
  5221. }
  5222. },
  5223. "x-codeSamples": [
  5224. {
  5225. "lang": "js",
  5226. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  5227. }
  5228. ]
  5229. }
  5230. },
  5231. "/provider/{providerID}/oauth/callback": {
  5232. "post": {
  5233. "tags": ["provider"],
  5234. "operationId": "provider.oauth.callback",
  5235. "parameters": [
  5236. {
  5237. "name": "providerID",
  5238. "in": "path",
  5239. "schema": {
  5240. "type": "string"
  5241. },
  5242. "required": true
  5243. },
  5244. {
  5245. "name": "directory",
  5246. "in": "query",
  5247. "schema": {
  5248. "type": "string"
  5249. },
  5250. "required": false
  5251. },
  5252. {
  5253. "name": "workspace",
  5254. "in": "query",
  5255. "schema": {
  5256. "type": "string"
  5257. },
  5258. "required": false
  5259. }
  5260. ],
  5261. "responses": {
  5262. "200": {
  5263. "description": "OAuth callback processed successfully",
  5264. "content": {
  5265. "application/json": {
  5266. "schema": {
  5267. "type": "boolean",
  5268. "description": "OAuth callback processed successfully"
  5269. }
  5270. }
  5271. }
  5272. },
  5273. "400": {
  5274. "description": "ProviderAuthError | InvalidRequestError",
  5275. "content": {
  5276. "application/json": {
  5277. "schema": {
  5278. "anyOf": [
  5279. {
  5280. "$ref": "#/components/schemas/ProviderAuthError1"
  5281. },
  5282. {
  5283. "$ref": "#/components/schemas/InvalidRequestError"
  5284. }
  5285. ]
  5286. }
  5287. }
  5288. }
  5289. }
  5290. },
  5291. "description": "Handle the OAuth callback from a provider after user authorization.",
  5292. "summary": "Handle OAuth callback",
  5293. "requestBody": {
  5294. "content": {
  5295. "application/json": {
  5296. "schema": {
  5297. "type": "object",
  5298. "properties": {
  5299. "method": {
  5300. "type": "number",
  5301. "description": "Auth method index"
  5302. },
  5303. "code": {
  5304. "type": "string"
  5305. }
  5306. },
  5307. "required": ["method"],
  5308. "additionalProperties": false
  5309. }
  5310. }
  5311. }
  5312. },
  5313. "x-codeSamples": [
  5314. {
  5315. "lang": "js",
  5316. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  5317. }
  5318. ]
  5319. }
  5320. },
  5321. "/session": {
  5322. "get": {
  5323. "tags": ["session"],
  5324. "operationId": "session.list",
  5325. "parameters": [
  5326. {
  5327. "name": "directory",
  5328. "in": "query",
  5329. "schema": {
  5330. "type": "string"
  5331. },
  5332. "required": false
  5333. },
  5334. {
  5335. "name": "workspace",
  5336. "in": "query",
  5337. "schema": {
  5338. "type": "string"
  5339. },
  5340. "required": false
  5341. },
  5342. {
  5343. "name": "scope",
  5344. "in": "query",
  5345. "schema": {
  5346. "type": "string",
  5347. "enum": ["project"]
  5348. },
  5349. "required": false
  5350. },
  5351. {
  5352. "name": "path",
  5353. "in": "query",
  5354. "schema": {
  5355. "type": "string"
  5356. },
  5357. "required": false
  5358. },
  5359. {
  5360. "name": "roots",
  5361. "in": "query",
  5362. "schema": {
  5363. "anyOf": [
  5364. {
  5365. "type": "boolean"
  5366. },
  5367. {
  5368. "type": "string",
  5369. "enum": ["true", "false"]
  5370. }
  5371. ]
  5372. },
  5373. "required": false
  5374. },
  5375. {
  5376. "name": "start",
  5377. "in": "query",
  5378. "schema": {
  5379. "type": "number"
  5380. },
  5381. "required": false
  5382. },
  5383. {
  5384. "name": "search",
  5385. "in": "query",
  5386. "schema": {
  5387. "type": "string"
  5388. },
  5389. "required": false
  5390. },
  5391. {
  5392. "name": "limit",
  5393. "in": "query",
  5394. "schema": {
  5395. "type": "number"
  5396. },
  5397. "required": false
  5398. }
  5399. ],
  5400. "responses": {
  5401. "200": {
  5402. "description": "List of sessions",
  5403. "content": {
  5404. "application/json": {
  5405. "schema": {
  5406. "type": "array",
  5407. "items": {
  5408. "$ref": "#/components/schemas/Session"
  5409. },
  5410. "description": "List of sessions"
  5411. }
  5412. }
  5413. }
  5414. },
  5415. "400": {
  5416. "description": "Bad request",
  5417. "content": {
  5418. "application/json": {
  5419. "schema": {
  5420. "$ref": "#/components/schemas/BadRequestError"
  5421. }
  5422. }
  5423. }
  5424. }
  5425. },
  5426. "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
  5427. "summary": "List sessions",
  5428. "x-codeSamples": [
  5429. {
  5430. "lang": "js",
  5431. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
  5432. }
  5433. ]
  5434. },
  5435. "post": {
  5436. "tags": ["session"],
  5437. "operationId": "session.create",
  5438. "parameters": [
  5439. {
  5440. "name": "directory",
  5441. "in": "query",
  5442. "schema": {
  5443. "type": "string"
  5444. },
  5445. "required": false
  5446. },
  5447. {
  5448. "name": "workspace",
  5449. "in": "query",
  5450. "schema": {
  5451. "type": "string"
  5452. },
  5453. "required": false
  5454. }
  5455. ],
  5456. "responses": {
  5457. "200": {
  5458. "description": "Successfully created session",
  5459. "content": {
  5460. "application/json": {
  5461. "schema": {
  5462. "$ref": "#/components/schemas/Session"
  5463. }
  5464. }
  5465. }
  5466. },
  5467. "400": {
  5468. "description": "BadRequest | InvalidRequestError",
  5469. "content": {
  5470. "application/json": {
  5471. "schema": {
  5472. "anyOf": [
  5473. {
  5474. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5475. },
  5476. {
  5477. "$ref": "#/components/schemas/InvalidRequestError"
  5478. }
  5479. ]
  5480. }
  5481. }
  5482. }
  5483. }
  5484. },
  5485. "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
  5486. "summary": "Create session",
  5487. "requestBody": {
  5488. "content": {
  5489. "application/json": {
  5490. "schema": {
  5491. "type": "object",
  5492. "properties": {
  5493. "parentID": {
  5494. "type": "string",
  5495. "pattern": "^ses"
  5496. },
  5497. "title": {
  5498. "type": "string"
  5499. },
  5500. "agent": {
  5501. "type": "string"
  5502. },
  5503. "model": {
  5504. "type": "object",
  5505. "properties": {
  5506. "id": {
  5507. "type": "string"
  5508. },
  5509. "providerID": {
  5510. "type": "string"
  5511. },
  5512. "variant": {
  5513. "type": "string"
  5514. }
  5515. },
  5516. "required": ["id", "providerID"],
  5517. "additionalProperties": false
  5518. },
  5519. "metadata": {
  5520. "type": "object"
  5521. },
  5522. "permission": {
  5523. "$ref": "#/components/schemas/PermissionRuleset"
  5524. },
  5525. "workspaceID": {
  5526. "type": "string",
  5527. "pattern": "^wrk"
  5528. }
  5529. },
  5530. "additionalProperties": false
  5531. }
  5532. }
  5533. }
  5534. },
  5535. "x-codeSamples": [
  5536. {
  5537. "lang": "js",
  5538. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
  5539. }
  5540. ]
  5541. }
  5542. },
  5543. "/session/status": {
  5544. "get": {
  5545. "tags": ["session"],
  5546. "operationId": "session.status",
  5547. "parameters": [
  5548. {
  5549. "name": "directory",
  5550. "in": "query",
  5551. "schema": {
  5552. "type": "string"
  5553. },
  5554. "required": false
  5555. },
  5556. {
  5557. "name": "workspace",
  5558. "in": "query",
  5559. "schema": {
  5560. "type": "string"
  5561. },
  5562. "required": false
  5563. }
  5564. ],
  5565. "responses": {
  5566. "200": {
  5567. "description": "Get session status",
  5568. "content": {
  5569. "application/json": {
  5570. "schema": {
  5571. "type": "object",
  5572. "additionalProperties": {
  5573. "$ref": "#/components/schemas/SessionStatus"
  5574. },
  5575. "description": "Get session status"
  5576. }
  5577. }
  5578. }
  5579. },
  5580. "400": {
  5581. "description": "BadRequest | InvalidRequestError",
  5582. "content": {
  5583. "application/json": {
  5584. "schema": {
  5585. "anyOf": [
  5586. {
  5587. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5588. },
  5589. {
  5590. "$ref": "#/components/schemas/InvalidRequestError"
  5591. }
  5592. ]
  5593. }
  5594. }
  5595. }
  5596. }
  5597. },
  5598. "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
  5599. "summary": "Get session status",
  5600. "x-codeSamples": [
  5601. {
  5602. "lang": "js",
  5603. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
  5604. }
  5605. ]
  5606. }
  5607. },
  5608. "/session/{sessionID}": {
  5609. "get": {
  5610. "tags": ["session"],
  5611. "operationId": "session.get",
  5612. "parameters": [
  5613. {
  5614. "name": "sessionID",
  5615. "in": "path",
  5616. "schema": {
  5617. "type": "string",
  5618. "pattern": "^ses"
  5619. },
  5620. "required": true
  5621. },
  5622. {
  5623. "name": "directory",
  5624. "in": "query",
  5625. "schema": {
  5626. "type": "string"
  5627. },
  5628. "required": false
  5629. },
  5630. {
  5631. "name": "workspace",
  5632. "in": "query",
  5633. "schema": {
  5634. "type": "string"
  5635. },
  5636. "required": false
  5637. }
  5638. ],
  5639. "responses": {
  5640. "200": {
  5641. "description": "Get session",
  5642. "content": {
  5643. "application/json": {
  5644. "schema": {
  5645. "$ref": "#/components/schemas/Session"
  5646. }
  5647. }
  5648. }
  5649. },
  5650. "400": {
  5651. "description": "BadRequest | InvalidRequestError",
  5652. "content": {
  5653. "application/json": {
  5654. "schema": {
  5655. "anyOf": [
  5656. {
  5657. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5658. },
  5659. {
  5660. "$ref": "#/components/schemas/InvalidRequestError"
  5661. }
  5662. ]
  5663. }
  5664. }
  5665. }
  5666. },
  5667. "404": {
  5668. "description": "NotFoundError",
  5669. "content": {
  5670. "application/json": {
  5671. "schema": {
  5672. "$ref": "#/components/schemas/NotFoundError"
  5673. }
  5674. }
  5675. }
  5676. }
  5677. },
  5678. "description": "Retrieve detailed information about a specific OpenCode session.",
  5679. "summary": "Get session",
  5680. "x-codeSamples": [
  5681. {
  5682. "lang": "js",
  5683. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
  5684. }
  5685. ]
  5686. },
  5687. "delete": {
  5688. "tags": ["session"],
  5689. "operationId": "session.delete",
  5690. "parameters": [
  5691. {
  5692. "name": "sessionID",
  5693. "in": "path",
  5694. "schema": {
  5695. "type": "string",
  5696. "pattern": "^ses"
  5697. },
  5698. "required": true
  5699. },
  5700. {
  5701. "name": "directory",
  5702. "in": "query",
  5703. "schema": {
  5704. "type": "string"
  5705. },
  5706. "required": false
  5707. },
  5708. {
  5709. "name": "workspace",
  5710. "in": "query",
  5711. "schema": {
  5712. "type": "string"
  5713. },
  5714. "required": false
  5715. }
  5716. ],
  5717. "responses": {
  5718. "200": {
  5719. "description": "Successfully deleted session",
  5720. "content": {
  5721. "application/json": {
  5722. "schema": {
  5723. "type": "boolean",
  5724. "description": "Successfully deleted session"
  5725. }
  5726. }
  5727. }
  5728. },
  5729. "400": {
  5730. "description": "BadRequest | InvalidRequestError",
  5731. "content": {
  5732. "application/json": {
  5733. "schema": {
  5734. "anyOf": [
  5735. {
  5736. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5737. },
  5738. {
  5739. "$ref": "#/components/schemas/InvalidRequestError"
  5740. }
  5741. ]
  5742. }
  5743. }
  5744. }
  5745. },
  5746. "404": {
  5747. "description": "NotFoundError",
  5748. "content": {
  5749. "application/json": {
  5750. "schema": {
  5751. "$ref": "#/components/schemas/NotFoundError"
  5752. }
  5753. }
  5754. }
  5755. }
  5756. },
  5757. "description": "Delete a session and permanently remove all associated data, including messages and history.",
  5758. "summary": "Delete session",
  5759. "x-codeSamples": [
  5760. {
  5761. "lang": "js",
  5762. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
  5763. }
  5764. ]
  5765. },
  5766. "patch": {
  5767. "tags": ["session"],
  5768. "operationId": "session.update",
  5769. "parameters": [
  5770. {
  5771. "name": "sessionID",
  5772. "in": "path",
  5773. "schema": {
  5774. "type": "string",
  5775. "pattern": "^ses"
  5776. },
  5777. "required": true
  5778. },
  5779. {
  5780. "name": "directory",
  5781. "in": "query",
  5782. "schema": {
  5783. "type": "string"
  5784. },
  5785. "required": false
  5786. },
  5787. {
  5788. "name": "workspace",
  5789. "in": "query",
  5790. "schema": {
  5791. "type": "string"
  5792. },
  5793. "required": false
  5794. }
  5795. ],
  5796. "responses": {
  5797. "200": {
  5798. "description": "Successfully updated session",
  5799. "content": {
  5800. "application/json": {
  5801. "schema": {
  5802. "$ref": "#/components/schemas/Session"
  5803. }
  5804. }
  5805. }
  5806. },
  5807. "400": {
  5808. "description": "BadRequest | InvalidRequestError",
  5809. "content": {
  5810. "application/json": {
  5811. "schema": {
  5812. "anyOf": [
  5813. {
  5814. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5815. },
  5816. {
  5817. "$ref": "#/components/schemas/InvalidRequestError"
  5818. }
  5819. ]
  5820. }
  5821. }
  5822. }
  5823. },
  5824. "404": {
  5825. "description": "NotFoundError",
  5826. "content": {
  5827. "application/json": {
  5828. "schema": {
  5829. "$ref": "#/components/schemas/NotFoundError"
  5830. }
  5831. }
  5832. }
  5833. }
  5834. },
  5835. "description": "Update properties of an existing session, such as title or other metadata.",
  5836. "summary": "Update session",
  5837. "requestBody": {
  5838. "content": {
  5839. "application/json": {
  5840. "schema": {
  5841. "type": "object",
  5842. "properties": {
  5843. "title": {
  5844. "type": "string"
  5845. },
  5846. "metadata": {
  5847. "type": "object"
  5848. },
  5849. "permission": {
  5850. "$ref": "#/components/schemas/PermissionRuleset"
  5851. },
  5852. "time": {
  5853. "type": "object",
  5854. "properties": {
  5855. "archived": {
  5856. "type": "number"
  5857. }
  5858. },
  5859. "additionalProperties": false
  5860. }
  5861. },
  5862. "additionalProperties": false
  5863. }
  5864. }
  5865. }
  5866. },
  5867. "x-codeSamples": [
  5868. {
  5869. "lang": "js",
  5870. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
  5871. }
  5872. ]
  5873. }
  5874. },
  5875. "/session/{sessionID}/children": {
  5876. "get": {
  5877. "tags": ["session"],
  5878. "operationId": "session.children",
  5879. "parameters": [
  5880. {
  5881. "name": "sessionID",
  5882. "in": "path",
  5883. "schema": {
  5884. "type": "string",
  5885. "pattern": "^ses"
  5886. },
  5887. "required": true
  5888. },
  5889. {
  5890. "name": "directory",
  5891. "in": "query",
  5892. "schema": {
  5893. "type": "string"
  5894. },
  5895. "required": false
  5896. },
  5897. {
  5898. "name": "workspace",
  5899. "in": "query",
  5900. "schema": {
  5901. "type": "string"
  5902. },
  5903. "required": false
  5904. }
  5905. ],
  5906. "responses": {
  5907. "200": {
  5908. "description": "List of children",
  5909. "content": {
  5910. "application/json": {
  5911. "schema": {
  5912. "type": "array",
  5913. "items": {
  5914. "$ref": "#/components/schemas/Session"
  5915. },
  5916. "description": "List of children"
  5917. }
  5918. }
  5919. }
  5920. },
  5921. "400": {
  5922. "description": "BadRequest | InvalidRequestError",
  5923. "content": {
  5924. "application/json": {
  5925. "schema": {
  5926. "anyOf": [
  5927. {
  5928. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5929. },
  5930. {
  5931. "$ref": "#/components/schemas/InvalidRequestError"
  5932. }
  5933. ]
  5934. }
  5935. }
  5936. }
  5937. },
  5938. "404": {
  5939. "description": "NotFoundError",
  5940. "content": {
  5941. "application/json": {
  5942. "schema": {
  5943. "$ref": "#/components/schemas/NotFoundError"
  5944. }
  5945. }
  5946. }
  5947. }
  5948. },
  5949. "description": "Retrieve all child sessions that were forked from the specified parent session.",
  5950. "summary": "Get session children",
  5951. "x-codeSamples": [
  5952. {
  5953. "lang": "js",
  5954. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
  5955. }
  5956. ]
  5957. }
  5958. },
  5959. "/session/{sessionID}/todo": {
  5960. "get": {
  5961. "tags": ["session"],
  5962. "operationId": "session.todo",
  5963. "parameters": [
  5964. {
  5965. "name": "sessionID",
  5966. "in": "path",
  5967. "schema": {
  5968. "type": "string",
  5969. "pattern": "^ses"
  5970. },
  5971. "required": true
  5972. },
  5973. {
  5974. "name": "directory",
  5975. "in": "query",
  5976. "schema": {
  5977. "type": "string"
  5978. },
  5979. "required": false
  5980. },
  5981. {
  5982. "name": "workspace",
  5983. "in": "query",
  5984. "schema": {
  5985. "type": "string"
  5986. },
  5987. "required": false
  5988. }
  5989. ],
  5990. "responses": {
  5991. "200": {
  5992. "description": "Todo list",
  5993. "content": {
  5994. "application/json": {
  5995. "schema": {
  5996. "type": "array",
  5997. "items": {
  5998. "$ref": "#/components/schemas/Todo"
  5999. },
  6000. "description": "Todo list"
  6001. }
  6002. }
  6003. }
  6004. },
  6005. "400": {
  6006. "description": "BadRequest | InvalidRequestError",
  6007. "content": {
  6008. "application/json": {
  6009. "schema": {
  6010. "anyOf": [
  6011. {
  6012. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6013. },
  6014. {
  6015. "$ref": "#/components/schemas/InvalidRequestError"
  6016. }
  6017. ]
  6018. }
  6019. }
  6020. }
  6021. },
  6022. "404": {
  6023. "description": "NotFoundError",
  6024. "content": {
  6025. "application/json": {
  6026. "schema": {
  6027. "$ref": "#/components/schemas/NotFoundError"
  6028. }
  6029. }
  6030. }
  6031. }
  6032. },
  6033. "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
  6034. "summary": "Get session todos",
  6035. "x-codeSamples": [
  6036. {
  6037. "lang": "js",
  6038. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
  6039. }
  6040. ]
  6041. }
  6042. },
  6043. "/session/{sessionID}/diff": {
  6044. "get": {
  6045. "tags": ["session"],
  6046. "operationId": "session.diff",
  6047. "parameters": [
  6048. {
  6049. "name": "sessionID",
  6050. "in": "path",
  6051. "schema": {
  6052. "type": "string",
  6053. "pattern": "^ses"
  6054. },
  6055. "required": true
  6056. },
  6057. {
  6058. "name": "directory",
  6059. "in": "query",
  6060. "schema": {
  6061. "type": "string"
  6062. },
  6063. "required": false
  6064. },
  6065. {
  6066. "name": "workspace",
  6067. "in": "query",
  6068. "schema": {
  6069. "type": "string"
  6070. },
  6071. "required": false
  6072. },
  6073. {
  6074. "name": "messageID",
  6075. "in": "query",
  6076. "schema": {
  6077. "type": "string",
  6078. "pattern": "^msg"
  6079. },
  6080. "required": false
  6081. }
  6082. ],
  6083. "responses": {
  6084. "200": {
  6085. "description": "Successfully retrieved diff",
  6086. "content": {
  6087. "application/json": {
  6088. "schema": {
  6089. "type": "array",
  6090. "items": {
  6091. "$ref": "#/components/schemas/SnapshotFileDiff"
  6092. },
  6093. "description": "Successfully retrieved diff"
  6094. }
  6095. }
  6096. }
  6097. },
  6098. "400": {
  6099. "description": "Bad request",
  6100. "content": {
  6101. "application/json": {
  6102. "schema": {
  6103. "$ref": "#/components/schemas/BadRequestError"
  6104. }
  6105. }
  6106. }
  6107. }
  6108. },
  6109. "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
  6110. "summary": "Get message diff",
  6111. "x-codeSamples": [
  6112. {
  6113. "lang": "js",
  6114. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
  6115. }
  6116. ]
  6117. }
  6118. },
  6119. "/session/{sessionID}/message": {
  6120. "get": {
  6121. "tags": ["session"],
  6122. "operationId": "session.messages",
  6123. "parameters": [
  6124. {
  6125. "name": "sessionID",
  6126. "in": "path",
  6127. "schema": {
  6128. "type": "string",
  6129. "pattern": "^ses"
  6130. },
  6131. "required": true
  6132. },
  6133. {
  6134. "name": "directory",
  6135. "in": "query",
  6136. "schema": {
  6137. "type": "string"
  6138. },
  6139. "required": false
  6140. },
  6141. {
  6142. "name": "workspace",
  6143. "in": "query",
  6144. "schema": {
  6145. "type": "string"
  6146. },
  6147. "required": false
  6148. },
  6149. {
  6150. "name": "limit",
  6151. "in": "query",
  6152. "schema": {
  6153. "type": "integer",
  6154. "minimum": 0,
  6155. "maximum": 9007199254740991
  6156. },
  6157. "required": false
  6158. },
  6159. {
  6160. "name": "before",
  6161. "in": "query",
  6162. "schema": {
  6163. "type": "string"
  6164. },
  6165. "required": false
  6166. }
  6167. ],
  6168. "responses": {
  6169. "200": {
  6170. "description": "List of messages",
  6171. "content": {
  6172. "application/json": {
  6173. "schema": {
  6174. "type": "array",
  6175. "items": {
  6176. "type": "object",
  6177. "properties": {
  6178. "info": {
  6179. "$ref": "#/components/schemas/Message"
  6180. },
  6181. "parts": {
  6182. "type": "array",
  6183. "items": {
  6184. "$ref": "#/components/schemas/Part"
  6185. }
  6186. }
  6187. },
  6188. "required": ["info", "parts"],
  6189. "additionalProperties": false
  6190. },
  6191. "description": "List of messages"
  6192. }
  6193. }
  6194. }
  6195. },
  6196. "400": {
  6197. "description": "BadRequest | InvalidRequestError",
  6198. "content": {
  6199. "application/json": {
  6200. "schema": {
  6201. "anyOf": [
  6202. {
  6203. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6204. },
  6205. {
  6206. "$ref": "#/components/schemas/InvalidRequestError"
  6207. }
  6208. ]
  6209. }
  6210. }
  6211. }
  6212. },
  6213. "404": {
  6214. "description": "NotFoundError",
  6215. "content": {
  6216. "application/json": {
  6217. "schema": {
  6218. "$ref": "#/components/schemas/NotFoundError"
  6219. }
  6220. }
  6221. }
  6222. }
  6223. },
  6224. "description": "Retrieve all messages in a session, including user prompts and AI responses.",
  6225. "summary": "Get session messages",
  6226. "x-codeSamples": [
  6227. {
  6228. "lang": "js",
  6229. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
  6230. }
  6231. ]
  6232. },
  6233. "post": {
  6234. "tags": ["session"],
  6235. "operationId": "session.prompt",
  6236. "parameters": [
  6237. {
  6238. "name": "sessionID",
  6239. "in": "path",
  6240. "schema": {
  6241. "type": "string",
  6242. "pattern": "^ses"
  6243. },
  6244. "required": true
  6245. },
  6246. {
  6247. "name": "directory",
  6248. "in": "query",
  6249. "schema": {
  6250. "type": "string"
  6251. },
  6252. "required": false
  6253. },
  6254. {
  6255. "name": "workspace",
  6256. "in": "query",
  6257. "schema": {
  6258. "type": "string"
  6259. },
  6260. "required": false
  6261. }
  6262. ],
  6263. "responses": {
  6264. "200": {
  6265. "description": "Created message",
  6266. "content": {
  6267. "application/json": {
  6268. "schema": {
  6269. "type": "object",
  6270. "required": ["info", "parts"],
  6271. "properties": {
  6272. "info": {
  6273. "$ref": "#/components/schemas/AssistantMessage"
  6274. },
  6275. "parts": {
  6276. "type": "array",
  6277. "items": {
  6278. "$ref": "#/components/schemas/Part"
  6279. }
  6280. }
  6281. }
  6282. }
  6283. }
  6284. }
  6285. },
  6286. "400": {
  6287. "description": "BadRequest | InvalidRequestError",
  6288. "content": {
  6289. "application/json": {
  6290. "schema": {
  6291. "anyOf": [
  6292. {
  6293. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6294. },
  6295. {
  6296. "$ref": "#/components/schemas/InvalidRequestError"
  6297. }
  6298. ]
  6299. }
  6300. }
  6301. }
  6302. },
  6303. "404": {
  6304. "description": "NotFoundError",
  6305. "content": {
  6306. "application/json": {
  6307. "schema": {
  6308. "$ref": "#/components/schemas/NotFoundError"
  6309. }
  6310. }
  6311. }
  6312. }
  6313. },
  6314. "description": "Create and send a new message to a session, streaming the AI response.",
  6315. "summary": "Send message",
  6316. "requestBody": {
  6317. "content": {
  6318. "application/json": {
  6319. "schema": {
  6320. "type": "object",
  6321. "properties": {
  6322. "messageID": {
  6323. "type": "string",
  6324. "pattern": "^msg"
  6325. },
  6326. "model": {
  6327. "type": "object",
  6328. "properties": {
  6329. "providerID": {
  6330. "type": "string"
  6331. },
  6332. "modelID": {
  6333. "type": "string"
  6334. }
  6335. },
  6336. "required": ["providerID", "modelID"],
  6337. "additionalProperties": false
  6338. },
  6339. "agent": {
  6340. "type": "string"
  6341. },
  6342. "noReply": {
  6343. "type": "boolean"
  6344. },
  6345. "tools": {
  6346. "type": "object",
  6347. "additionalProperties": {
  6348. "type": "boolean"
  6349. }
  6350. },
  6351. "format": {
  6352. "$ref": "#/components/schemas/OutputFormat"
  6353. },
  6354. "system": {
  6355. "type": "string"
  6356. },
  6357. "variant": {
  6358. "type": "string"
  6359. },
  6360. "parts": {
  6361. "type": "array",
  6362. "items": {
  6363. "anyOf": [
  6364. {
  6365. "$ref": "#/components/schemas/TextPartInput"
  6366. },
  6367. {
  6368. "$ref": "#/components/schemas/FilePartInput"
  6369. },
  6370. {
  6371. "$ref": "#/components/schemas/AgentPartInput"
  6372. },
  6373. {
  6374. "$ref": "#/components/schemas/SubtaskPartInput"
  6375. }
  6376. ]
  6377. }
  6378. }
  6379. },
  6380. "required": ["parts"],
  6381. "additionalProperties": false
  6382. }
  6383. }
  6384. }
  6385. },
  6386. "x-codeSamples": [
  6387. {
  6388. "lang": "js",
  6389. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  6390. }
  6391. ]
  6392. }
  6393. },
  6394. "/session/{sessionID}/message/{messageID}": {
  6395. "get": {
  6396. "tags": ["session"],
  6397. "operationId": "session.message",
  6398. "parameters": [
  6399. {
  6400. "name": "sessionID",
  6401. "in": "path",
  6402. "schema": {
  6403. "type": "string",
  6404. "pattern": "^ses"
  6405. },
  6406. "required": true
  6407. },
  6408. {
  6409. "name": "messageID",
  6410. "in": "path",
  6411. "schema": {
  6412. "type": "string",
  6413. "pattern": "^msg"
  6414. },
  6415. "required": true
  6416. },
  6417. {
  6418. "name": "directory",
  6419. "in": "query",
  6420. "schema": {
  6421. "type": "string"
  6422. },
  6423. "required": false
  6424. },
  6425. {
  6426. "name": "workspace",
  6427. "in": "query",
  6428. "schema": {
  6429. "type": "string"
  6430. },
  6431. "required": false
  6432. }
  6433. ],
  6434. "responses": {
  6435. "200": {
  6436. "description": "Message",
  6437. "content": {
  6438. "application/json": {
  6439. "schema": {
  6440. "type": "object",
  6441. "properties": {
  6442. "info": {
  6443. "$ref": "#/components/schemas/Message"
  6444. },
  6445. "parts": {
  6446. "type": "array",
  6447. "items": {
  6448. "$ref": "#/components/schemas/Part"
  6449. }
  6450. }
  6451. },
  6452. "required": ["info", "parts"],
  6453. "additionalProperties": false,
  6454. "description": "Message"
  6455. }
  6456. }
  6457. }
  6458. },
  6459. "400": {
  6460. "description": "BadRequest | InvalidRequestError",
  6461. "content": {
  6462. "application/json": {
  6463. "schema": {
  6464. "anyOf": [
  6465. {
  6466. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6467. },
  6468. {
  6469. "$ref": "#/components/schemas/InvalidRequestError"
  6470. }
  6471. ]
  6472. }
  6473. }
  6474. }
  6475. },
  6476. "404": {
  6477. "description": "NotFoundError",
  6478. "content": {
  6479. "application/json": {
  6480. "schema": {
  6481. "$ref": "#/components/schemas/NotFoundError"
  6482. }
  6483. }
  6484. }
  6485. }
  6486. },
  6487. "description": "Retrieve a specific message from a session by its message ID.",
  6488. "summary": "Get message",
  6489. "x-codeSamples": [
  6490. {
  6491. "lang": "js",
  6492. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  6493. }
  6494. ]
  6495. },
  6496. "delete": {
  6497. "tags": ["session"],
  6498. "operationId": "session.deleteMessage",
  6499. "parameters": [
  6500. {
  6501. "name": "sessionID",
  6502. "in": "path",
  6503. "schema": {
  6504. "type": "string",
  6505. "pattern": "^ses"
  6506. },
  6507. "required": true
  6508. },
  6509. {
  6510. "name": "messageID",
  6511. "in": "path",
  6512. "schema": {
  6513. "type": "string",
  6514. "pattern": "^msg"
  6515. },
  6516. "required": true
  6517. },
  6518. {
  6519. "name": "directory",
  6520. "in": "query",
  6521. "schema": {
  6522. "type": "string"
  6523. },
  6524. "required": false
  6525. },
  6526. {
  6527. "name": "workspace",
  6528. "in": "query",
  6529. "schema": {
  6530. "type": "string"
  6531. },
  6532. "required": false
  6533. }
  6534. ],
  6535. "responses": {
  6536. "200": {
  6537. "description": "Successfully deleted message",
  6538. "content": {
  6539. "application/json": {
  6540. "schema": {
  6541. "type": "boolean",
  6542. "description": "Successfully deleted message"
  6543. }
  6544. }
  6545. }
  6546. },
  6547. "400": {
  6548. "description": "BadRequest | InvalidRequestError",
  6549. "content": {
  6550. "application/json": {
  6551. "schema": {
  6552. "anyOf": [
  6553. {
  6554. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6555. },
  6556. {
  6557. "$ref": "#/components/schemas/InvalidRequestError"
  6558. }
  6559. ]
  6560. }
  6561. }
  6562. }
  6563. },
  6564. "404": {
  6565. "description": "NotFoundError",
  6566. "content": {
  6567. "application/json": {
  6568. "schema": {
  6569. "$ref": "#/components/schemas/NotFoundError"
  6570. }
  6571. }
  6572. }
  6573. },
  6574. "409": {
  6575. "description": "SessionBusyError",
  6576. "content": {
  6577. "application/json": {
  6578. "schema": {
  6579. "$ref": "#/components/schemas/SessionBusyError"
  6580. }
  6581. }
  6582. }
  6583. }
  6584. },
  6585. "description": "Permanently delete a specific message and all of its parts from a session without reverting file changes.",
  6586. "summary": "Delete message",
  6587. "x-codeSamples": [
  6588. {
  6589. "lang": "js",
  6590. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.deleteMessage({\n ...\n})"
  6591. }
  6592. ]
  6593. }
  6594. },
  6595. "/session/{sessionID}/fork": {
  6596. "post": {
  6597. "tags": ["session"],
  6598. "operationId": "session.fork",
  6599. "parameters": [
  6600. {
  6601. "name": "sessionID",
  6602. "in": "path",
  6603. "schema": {
  6604. "type": "string",
  6605. "pattern": "^ses"
  6606. },
  6607. "required": true
  6608. },
  6609. {
  6610. "name": "directory",
  6611. "in": "query",
  6612. "schema": {
  6613. "type": "string"
  6614. },
  6615. "required": false
  6616. },
  6617. {
  6618. "name": "workspace",
  6619. "in": "query",
  6620. "schema": {
  6621. "type": "string"
  6622. },
  6623. "required": false
  6624. }
  6625. ],
  6626. "responses": {
  6627. "200": {
  6628. "description": "200",
  6629. "content": {
  6630. "application/json": {
  6631. "schema": {
  6632. "$ref": "#/components/schemas/Session"
  6633. }
  6634. }
  6635. }
  6636. },
  6637. "400": {
  6638. "description": "BadRequest | InvalidRequestError",
  6639. "content": {
  6640. "application/json": {
  6641. "schema": {
  6642. "anyOf": [
  6643. {
  6644. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6645. },
  6646. {
  6647. "$ref": "#/components/schemas/InvalidRequestError"
  6648. }
  6649. ]
  6650. }
  6651. }
  6652. }
  6653. },
  6654. "404": {
  6655. "description": "NotFoundError",
  6656. "content": {
  6657. "application/json": {
  6658. "schema": {
  6659. "$ref": "#/components/schemas/NotFoundError"
  6660. }
  6661. }
  6662. }
  6663. }
  6664. },
  6665. "description": "Create a new session by forking an existing session at a specific message point.",
  6666. "summary": "Fork session",
  6667. "requestBody": {
  6668. "content": {
  6669. "application/json": {
  6670. "schema": {
  6671. "type": "object",
  6672. "properties": {
  6673. "messageID": {
  6674. "type": "string",
  6675. "pattern": "^msg"
  6676. }
  6677. },
  6678. "additionalProperties": false
  6679. }
  6680. }
  6681. }
  6682. },
  6683. "x-codeSamples": [
  6684. {
  6685. "lang": "js",
  6686. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  6687. }
  6688. ]
  6689. }
  6690. },
  6691. "/session/{sessionID}/abort": {
  6692. "post": {
  6693. "tags": ["session"],
  6694. "operationId": "session.abort",
  6695. "parameters": [
  6696. {
  6697. "name": "sessionID",
  6698. "in": "path",
  6699. "schema": {
  6700. "type": "string",
  6701. "pattern": "^ses"
  6702. },
  6703. "required": true
  6704. },
  6705. {
  6706. "name": "directory",
  6707. "in": "query",
  6708. "schema": {
  6709. "type": "string"
  6710. },
  6711. "required": false
  6712. },
  6713. {
  6714. "name": "workspace",
  6715. "in": "query",
  6716. "schema": {
  6717. "type": "string"
  6718. },
  6719. "required": false
  6720. }
  6721. ],
  6722. "responses": {
  6723. "200": {
  6724. "description": "Aborted session",
  6725. "content": {
  6726. "application/json": {
  6727. "schema": {
  6728. "type": "boolean",
  6729. "description": "Aborted session"
  6730. }
  6731. }
  6732. }
  6733. },
  6734. "400": {
  6735. "description": "BadRequest | InvalidRequestError",
  6736. "content": {
  6737. "application/json": {
  6738. "schema": {
  6739. "anyOf": [
  6740. {
  6741. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6742. },
  6743. {
  6744. "$ref": "#/components/schemas/InvalidRequestError"
  6745. }
  6746. ]
  6747. }
  6748. }
  6749. }
  6750. }
  6751. },
  6752. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  6753. "summary": "Abort session",
  6754. "x-codeSamples": [
  6755. {
  6756. "lang": "js",
  6757. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  6758. }
  6759. ]
  6760. }
  6761. },
  6762. "/session/{sessionID}/init": {
  6763. "post": {
  6764. "tags": ["session"],
  6765. "operationId": "session.init",
  6766. "parameters": [
  6767. {
  6768. "name": "sessionID",
  6769. "in": "path",
  6770. "schema": {
  6771. "type": "string",
  6772. "pattern": "^ses"
  6773. },
  6774. "required": true
  6775. },
  6776. {
  6777. "name": "directory",
  6778. "in": "query",
  6779. "schema": {
  6780. "type": "string"
  6781. },
  6782. "required": false
  6783. },
  6784. {
  6785. "name": "workspace",
  6786. "in": "query",
  6787. "schema": {
  6788. "type": "string"
  6789. },
  6790. "required": false
  6791. }
  6792. ],
  6793. "responses": {
  6794. "200": {
  6795. "description": "200",
  6796. "content": {
  6797. "application/json": {
  6798. "schema": {
  6799. "type": "boolean",
  6800. "description": "200"
  6801. }
  6802. }
  6803. }
  6804. },
  6805. "400": {
  6806. "description": "BadRequest | InvalidRequestError",
  6807. "content": {
  6808. "application/json": {
  6809. "schema": {
  6810. "anyOf": [
  6811. {
  6812. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6813. },
  6814. {
  6815. "$ref": "#/components/schemas/InvalidRequestError"
  6816. }
  6817. ]
  6818. }
  6819. }
  6820. }
  6821. },
  6822. "404": {
  6823. "description": "NotFoundError",
  6824. "content": {
  6825. "application/json": {
  6826. "schema": {
  6827. "$ref": "#/components/schemas/NotFoundError"
  6828. }
  6829. }
  6830. }
  6831. }
  6832. },
  6833. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  6834. "summary": "Initialize session",
  6835. "requestBody": {
  6836. "content": {
  6837. "application/json": {
  6838. "schema": {
  6839. "type": "object",
  6840. "properties": {
  6841. "modelID": {
  6842. "type": "string"
  6843. },
  6844. "providerID": {
  6845. "type": "string"
  6846. },
  6847. "messageID": {
  6848. "type": "string",
  6849. "pattern": "^msg"
  6850. }
  6851. },
  6852. "required": ["modelID", "providerID", "messageID"],
  6853. "additionalProperties": false
  6854. }
  6855. }
  6856. }
  6857. },
  6858. "x-codeSamples": [
  6859. {
  6860. "lang": "js",
  6861. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  6862. }
  6863. ]
  6864. }
  6865. },
  6866. "/session/{sessionID}/share": {
  6867. "post": {
  6868. "tags": ["session"],
  6869. "operationId": "session.share",
  6870. "parameters": [
  6871. {
  6872. "name": "sessionID",
  6873. "in": "path",
  6874. "schema": {
  6875. "type": "string",
  6876. "pattern": "^ses"
  6877. },
  6878. "required": true
  6879. },
  6880. {
  6881. "name": "directory",
  6882. "in": "query",
  6883. "schema": {
  6884. "type": "string"
  6885. },
  6886. "required": false
  6887. },
  6888. {
  6889. "name": "workspace",
  6890. "in": "query",
  6891. "schema": {
  6892. "type": "string"
  6893. },
  6894. "required": false
  6895. }
  6896. ],
  6897. "responses": {
  6898. "200": {
  6899. "description": "Successfully shared session",
  6900. "content": {
  6901. "application/json": {
  6902. "schema": {
  6903. "$ref": "#/components/schemas/Session"
  6904. }
  6905. }
  6906. }
  6907. },
  6908. "400": {
  6909. "description": "Bad request",
  6910. "content": {
  6911. "application/json": {
  6912. "schema": {
  6913. "$ref": "#/components/schemas/BadRequestError"
  6914. }
  6915. }
  6916. }
  6917. },
  6918. "404": {
  6919. "description": "NotFoundError",
  6920. "content": {
  6921. "application/json": {
  6922. "schema": {
  6923. "$ref": "#/components/schemas/NotFoundError"
  6924. }
  6925. }
  6926. }
  6927. },
  6928. "500": {
  6929. "description": "InternalServerError",
  6930. "content": {
  6931. "application/json": {
  6932. "schema": {
  6933. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6934. }
  6935. }
  6936. }
  6937. }
  6938. },
  6939. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  6940. "summary": "Share session",
  6941. "x-codeSamples": [
  6942. {
  6943. "lang": "js",
  6944. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  6945. }
  6946. ]
  6947. },
  6948. "delete": {
  6949. "tags": ["session"],
  6950. "operationId": "session.unshare",
  6951. "parameters": [
  6952. {
  6953. "name": "sessionID",
  6954. "in": "path",
  6955. "schema": {
  6956. "type": "string",
  6957. "pattern": "^ses"
  6958. },
  6959. "required": true
  6960. },
  6961. {
  6962. "name": "directory",
  6963. "in": "query",
  6964. "schema": {
  6965. "type": "string"
  6966. },
  6967. "required": false
  6968. },
  6969. {
  6970. "name": "workspace",
  6971. "in": "query",
  6972. "schema": {
  6973. "type": "string"
  6974. },
  6975. "required": false
  6976. }
  6977. ],
  6978. "responses": {
  6979. "200": {
  6980. "description": "Successfully unshared session",
  6981. "content": {
  6982. "application/json": {
  6983. "schema": {
  6984. "$ref": "#/components/schemas/Session"
  6985. }
  6986. }
  6987. }
  6988. },
  6989. "400": {
  6990. "description": "Bad request",
  6991. "content": {
  6992. "application/json": {
  6993. "schema": {
  6994. "$ref": "#/components/schemas/BadRequestError"
  6995. }
  6996. }
  6997. }
  6998. },
  6999. "404": {
  7000. "description": "NotFoundError",
  7001. "content": {
  7002. "application/json": {
  7003. "schema": {
  7004. "$ref": "#/components/schemas/NotFoundError"
  7005. }
  7006. }
  7007. }
  7008. },
  7009. "500": {
  7010. "description": "InternalServerError",
  7011. "content": {
  7012. "application/json": {
  7013. "schema": {
  7014. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  7015. }
  7016. }
  7017. }
  7018. }
  7019. },
  7020. "description": "Remove the shareable link for a session, making it private again.",
  7021. "summary": "Unshare session",
  7022. "x-codeSamples": [
  7023. {
  7024. "lang": "js",
  7025. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  7026. }
  7027. ]
  7028. }
  7029. },
  7030. "/session/{sessionID}/summarize": {
  7031. "post": {
  7032. "tags": ["session"],
  7033. "operationId": "session.summarize",
  7034. "parameters": [
  7035. {
  7036. "name": "sessionID",
  7037. "in": "path",
  7038. "schema": {
  7039. "type": "string",
  7040. "pattern": "^ses"
  7041. },
  7042. "required": true
  7043. },
  7044. {
  7045. "name": "directory",
  7046. "in": "query",
  7047. "schema": {
  7048. "type": "string"
  7049. },
  7050. "required": false
  7051. },
  7052. {
  7053. "name": "workspace",
  7054. "in": "query",
  7055. "schema": {
  7056. "type": "string"
  7057. },
  7058. "required": false
  7059. }
  7060. ],
  7061. "responses": {
  7062. "200": {
  7063. "description": "Summarized session",
  7064. "content": {
  7065. "application/json": {
  7066. "schema": {
  7067. "type": "boolean",
  7068. "description": "Summarized session"
  7069. }
  7070. }
  7071. }
  7072. },
  7073. "400": {
  7074. "description": "BadRequest | InvalidRequestError",
  7075. "content": {
  7076. "application/json": {
  7077. "schema": {
  7078. "anyOf": [
  7079. {
  7080. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7081. },
  7082. {
  7083. "$ref": "#/components/schemas/InvalidRequestError"
  7084. }
  7085. ]
  7086. }
  7087. }
  7088. }
  7089. },
  7090. "404": {
  7091. "description": "NotFoundError",
  7092. "content": {
  7093. "application/json": {
  7094. "schema": {
  7095. "$ref": "#/components/schemas/NotFoundError"
  7096. }
  7097. }
  7098. }
  7099. }
  7100. },
  7101. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  7102. "summary": "Summarize session",
  7103. "requestBody": {
  7104. "content": {
  7105. "application/json": {
  7106. "schema": {
  7107. "type": "object",
  7108. "properties": {
  7109. "providerID": {
  7110. "type": "string"
  7111. },
  7112. "modelID": {
  7113. "type": "string"
  7114. },
  7115. "auto": {
  7116. "type": "boolean"
  7117. }
  7118. },
  7119. "required": ["providerID", "modelID"],
  7120. "additionalProperties": false
  7121. }
  7122. }
  7123. }
  7124. },
  7125. "x-codeSamples": [
  7126. {
  7127. "lang": "js",
  7128. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  7129. }
  7130. ]
  7131. }
  7132. },
  7133. "/session/{sessionID}/prompt_async": {
  7134. "post": {
  7135. "tags": ["session"],
  7136. "operationId": "session.prompt_async",
  7137. "parameters": [
  7138. {
  7139. "name": "sessionID",
  7140. "in": "path",
  7141. "schema": {
  7142. "type": "string",
  7143. "pattern": "^ses"
  7144. },
  7145. "required": true
  7146. },
  7147. {
  7148. "name": "directory",
  7149. "in": "query",
  7150. "schema": {
  7151. "type": "string"
  7152. },
  7153. "required": false
  7154. },
  7155. {
  7156. "name": "workspace",
  7157. "in": "query",
  7158. "schema": {
  7159. "type": "string"
  7160. },
  7161. "required": false
  7162. }
  7163. ],
  7164. "responses": {
  7165. "204": {
  7166. "description": "Prompt accepted"
  7167. },
  7168. "400": {
  7169. "description": "BadRequest | InvalidRequestError",
  7170. "content": {
  7171. "application/json": {
  7172. "schema": {
  7173. "anyOf": [
  7174. {
  7175. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7176. },
  7177. {
  7178. "$ref": "#/components/schemas/InvalidRequestError"
  7179. }
  7180. ]
  7181. }
  7182. }
  7183. }
  7184. },
  7185. "404": {
  7186. "description": "NotFoundError",
  7187. "content": {
  7188. "application/json": {
  7189. "schema": {
  7190. "$ref": "#/components/schemas/NotFoundError"
  7191. }
  7192. }
  7193. }
  7194. }
  7195. },
  7196. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  7197. "summary": "Send async message",
  7198. "requestBody": {
  7199. "content": {
  7200. "application/json": {
  7201. "schema": {
  7202. "type": "object",
  7203. "properties": {
  7204. "messageID": {
  7205. "type": "string",
  7206. "pattern": "^msg"
  7207. },
  7208. "model": {
  7209. "type": "object",
  7210. "properties": {
  7211. "providerID": {
  7212. "type": "string"
  7213. },
  7214. "modelID": {
  7215. "type": "string"
  7216. }
  7217. },
  7218. "required": ["providerID", "modelID"],
  7219. "additionalProperties": false
  7220. },
  7221. "agent": {
  7222. "type": "string"
  7223. },
  7224. "noReply": {
  7225. "type": "boolean"
  7226. },
  7227. "tools": {
  7228. "type": "object",
  7229. "additionalProperties": {
  7230. "type": "boolean"
  7231. }
  7232. },
  7233. "format": {
  7234. "$ref": "#/components/schemas/OutputFormat"
  7235. },
  7236. "system": {
  7237. "type": "string"
  7238. },
  7239. "variant": {
  7240. "type": "string"
  7241. },
  7242. "parts": {
  7243. "type": "array",
  7244. "items": {
  7245. "anyOf": [
  7246. {
  7247. "$ref": "#/components/schemas/TextPartInput"
  7248. },
  7249. {
  7250. "$ref": "#/components/schemas/FilePartInput"
  7251. },
  7252. {
  7253. "$ref": "#/components/schemas/AgentPartInput"
  7254. },
  7255. {
  7256. "$ref": "#/components/schemas/SubtaskPartInput"
  7257. }
  7258. ]
  7259. }
  7260. }
  7261. },
  7262. "required": ["parts"],
  7263. "additionalProperties": false
  7264. }
  7265. }
  7266. }
  7267. },
  7268. "x-codeSamples": [
  7269. {
  7270. "lang": "js",
  7271. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  7272. }
  7273. ]
  7274. }
  7275. },
  7276. "/session/{sessionID}/command": {
  7277. "post": {
  7278. "tags": ["session"],
  7279. "operationId": "session.command",
  7280. "parameters": [
  7281. {
  7282. "name": "sessionID",
  7283. "in": "path",
  7284. "schema": {
  7285. "type": "string",
  7286. "pattern": "^ses"
  7287. },
  7288. "required": true
  7289. },
  7290. {
  7291. "name": "directory",
  7292. "in": "query",
  7293. "schema": {
  7294. "type": "string"
  7295. },
  7296. "required": false
  7297. },
  7298. {
  7299. "name": "workspace",
  7300. "in": "query",
  7301. "schema": {
  7302. "type": "string"
  7303. },
  7304. "required": false
  7305. }
  7306. ],
  7307. "responses": {
  7308. "200": {
  7309. "description": "Created message",
  7310. "content": {
  7311. "application/json": {
  7312. "schema": {
  7313. "type": "object",
  7314. "required": ["info", "parts"],
  7315. "properties": {
  7316. "info": {
  7317. "$ref": "#/components/schemas/AssistantMessage"
  7318. },
  7319. "parts": {
  7320. "type": "array",
  7321. "items": {
  7322. "$ref": "#/components/schemas/Part"
  7323. }
  7324. }
  7325. }
  7326. }
  7327. }
  7328. }
  7329. },
  7330. "400": {
  7331. "description": "BadRequest | InvalidRequestError",
  7332. "content": {
  7333. "application/json": {
  7334. "schema": {
  7335. "anyOf": [
  7336. {
  7337. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7338. },
  7339. {
  7340. "$ref": "#/components/schemas/InvalidRequestError"
  7341. }
  7342. ]
  7343. }
  7344. }
  7345. }
  7346. },
  7347. "404": {
  7348. "description": "NotFoundError",
  7349. "content": {
  7350. "application/json": {
  7351. "schema": {
  7352. "$ref": "#/components/schemas/NotFoundError"
  7353. }
  7354. }
  7355. }
  7356. }
  7357. },
  7358. "description": "Send a new command to a session for execution by the AI assistant.",
  7359. "summary": "Send command",
  7360. "requestBody": {
  7361. "content": {
  7362. "application/json": {
  7363. "schema": {
  7364. "type": "object",
  7365. "properties": {
  7366. "messageID": {
  7367. "type": "string",
  7368. "pattern": "^msg"
  7369. },
  7370. "agent": {
  7371. "type": "string"
  7372. },
  7373. "model": {
  7374. "type": "string"
  7375. },
  7376. "arguments": {
  7377. "type": "string"
  7378. },
  7379. "command": {
  7380. "type": "string"
  7381. },
  7382. "variant": {
  7383. "type": "string"
  7384. },
  7385. "parts": {
  7386. "type": "array",
  7387. "items": {
  7388. "type": "object",
  7389. "properties": {
  7390. "id": {
  7391. "type": "string",
  7392. "pattern": "^prt"
  7393. },
  7394. "type": {
  7395. "type": "string",
  7396. "enum": ["file"]
  7397. },
  7398. "mime": {
  7399. "type": "string"
  7400. },
  7401. "filename": {
  7402. "type": "string"
  7403. },
  7404. "url": {
  7405. "type": "string"
  7406. },
  7407. "source": {
  7408. "$ref": "#/components/schemas/FilePartSource"
  7409. }
  7410. },
  7411. "required": ["type", "mime", "url"],
  7412. "additionalProperties": false
  7413. }
  7414. }
  7415. },
  7416. "required": ["arguments", "command"],
  7417. "additionalProperties": false
  7418. }
  7419. }
  7420. }
  7421. },
  7422. "x-codeSamples": [
  7423. {
  7424. "lang": "js",
  7425. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  7426. }
  7427. ]
  7428. }
  7429. },
  7430. "/session/{sessionID}/shell": {
  7431. "post": {
  7432. "tags": ["session"],
  7433. "operationId": "session.shell",
  7434. "parameters": [
  7435. {
  7436. "name": "sessionID",
  7437. "in": "path",
  7438. "schema": {
  7439. "type": "string",
  7440. "pattern": "^ses"
  7441. },
  7442. "required": true
  7443. },
  7444. {
  7445. "name": "directory",
  7446. "in": "query",
  7447. "schema": {
  7448. "type": "string"
  7449. },
  7450. "required": false
  7451. },
  7452. {
  7453. "name": "workspace",
  7454. "in": "query",
  7455. "schema": {
  7456. "type": "string"
  7457. },
  7458. "required": false
  7459. }
  7460. ],
  7461. "responses": {
  7462. "200": {
  7463. "description": "Created message",
  7464. "content": {
  7465. "application/json": {
  7466. "schema": {
  7467. "type": "object",
  7468. "properties": {
  7469. "info": {
  7470. "$ref": "#/components/schemas/Message"
  7471. },
  7472. "parts": {
  7473. "type": "array",
  7474. "items": {
  7475. "$ref": "#/components/schemas/Part"
  7476. }
  7477. }
  7478. },
  7479. "required": ["info", "parts"],
  7480. "additionalProperties": false,
  7481. "description": "Created message"
  7482. }
  7483. }
  7484. }
  7485. },
  7486. "400": {
  7487. "description": "BadRequest | InvalidRequestError",
  7488. "content": {
  7489. "application/json": {
  7490. "schema": {
  7491. "anyOf": [
  7492. {
  7493. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7494. },
  7495. {
  7496. "$ref": "#/components/schemas/InvalidRequestError"
  7497. }
  7498. ]
  7499. }
  7500. }
  7501. }
  7502. },
  7503. "404": {
  7504. "description": "NotFoundError",
  7505. "content": {
  7506. "application/json": {
  7507. "schema": {
  7508. "$ref": "#/components/schemas/NotFoundError"
  7509. }
  7510. }
  7511. }
  7512. },
  7513. "409": {
  7514. "description": "SessionBusyError",
  7515. "content": {
  7516. "application/json": {
  7517. "schema": {
  7518. "$ref": "#/components/schemas/SessionBusyError"
  7519. }
  7520. }
  7521. }
  7522. }
  7523. },
  7524. "description": "Execute a shell command within the session context and return the AI's response.",
  7525. "summary": "Run shell command",
  7526. "requestBody": {
  7527. "content": {
  7528. "application/json": {
  7529. "schema": {
  7530. "type": "object",
  7531. "properties": {
  7532. "messageID": {
  7533. "type": "string",
  7534. "pattern": "^msg"
  7535. },
  7536. "agent": {
  7537. "type": "string"
  7538. },
  7539. "model": {
  7540. "type": "object",
  7541. "properties": {
  7542. "providerID": {
  7543. "type": "string"
  7544. },
  7545. "modelID": {
  7546. "type": "string"
  7547. }
  7548. },
  7549. "required": ["providerID", "modelID"],
  7550. "additionalProperties": false
  7551. },
  7552. "command": {
  7553. "type": "string"
  7554. }
  7555. },
  7556. "required": ["agent", "command"],
  7557. "additionalProperties": false
  7558. }
  7559. }
  7560. }
  7561. },
  7562. "x-codeSamples": [
  7563. {
  7564. "lang": "js",
  7565. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  7566. }
  7567. ]
  7568. }
  7569. },
  7570. "/session/{sessionID}/revert": {
  7571. "post": {
  7572. "tags": ["session"],
  7573. "operationId": "session.revert",
  7574. "parameters": [
  7575. {
  7576. "name": "sessionID",
  7577. "in": "path",
  7578. "schema": {
  7579. "type": "string",
  7580. "pattern": "^ses"
  7581. },
  7582. "required": true
  7583. },
  7584. {
  7585. "name": "directory",
  7586. "in": "query",
  7587. "schema": {
  7588. "type": "string"
  7589. },
  7590. "required": false
  7591. },
  7592. {
  7593. "name": "workspace",
  7594. "in": "query",
  7595. "schema": {
  7596. "type": "string"
  7597. },
  7598. "required": false
  7599. }
  7600. ],
  7601. "responses": {
  7602. "200": {
  7603. "description": "Updated session",
  7604. "content": {
  7605. "application/json": {
  7606. "schema": {
  7607. "$ref": "#/components/schemas/Session"
  7608. }
  7609. }
  7610. }
  7611. },
  7612. "400": {
  7613. "description": "BadRequest | InvalidRequestError",
  7614. "content": {
  7615. "application/json": {
  7616. "schema": {
  7617. "anyOf": [
  7618. {
  7619. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7620. },
  7621. {
  7622. "$ref": "#/components/schemas/InvalidRequestError"
  7623. }
  7624. ]
  7625. }
  7626. }
  7627. }
  7628. },
  7629. "404": {
  7630. "description": "NotFoundError",
  7631. "content": {
  7632. "application/json": {
  7633. "schema": {
  7634. "$ref": "#/components/schemas/NotFoundError"
  7635. }
  7636. }
  7637. }
  7638. },
  7639. "409": {
  7640. "description": "SessionBusyError",
  7641. "content": {
  7642. "application/json": {
  7643. "schema": {
  7644. "$ref": "#/components/schemas/SessionBusyError"
  7645. }
  7646. }
  7647. }
  7648. }
  7649. },
  7650. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  7651. "summary": "Revert message",
  7652. "requestBody": {
  7653. "content": {
  7654. "application/json": {
  7655. "schema": {
  7656. "type": "object",
  7657. "properties": {
  7658. "messageID": {
  7659. "type": "string",
  7660. "pattern": "^msg"
  7661. },
  7662. "partID": {
  7663. "type": "string",
  7664. "pattern": "^prt"
  7665. }
  7666. },
  7667. "required": ["messageID"],
  7668. "additionalProperties": false
  7669. }
  7670. }
  7671. }
  7672. },
  7673. "x-codeSamples": [
  7674. {
  7675. "lang": "js",
  7676. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  7677. }
  7678. ]
  7679. }
  7680. },
  7681. "/session/{sessionID}/unrevert": {
  7682. "post": {
  7683. "tags": ["session"],
  7684. "operationId": "session.unrevert",
  7685. "parameters": [
  7686. {
  7687. "name": "sessionID",
  7688. "in": "path",
  7689. "schema": {
  7690. "type": "string",
  7691. "pattern": "^ses"
  7692. },
  7693. "required": true
  7694. },
  7695. {
  7696. "name": "directory",
  7697. "in": "query",
  7698. "schema": {
  7699. "type": "string"
  7700. },
  7701. "required": false
  7702. },
  7703. {
  7704. "name": "workspace",
  7705. "in": "query",
  7706. "schema": {
  7707. "type": "string"
  7708. },
  7709. "required": false
  7710. }
  7711. ],
  7712. "responses": {
  7713. "200": {
  7714. "description": "Updated session",
  7715. "content": {
  7716. "application/json": {
  7717. "schema": {
  7718. "$ref": "#/components/schemas/Session"
  7719. }
  7720. }
  7721. }
  7722. },
  7723. "400": {
  7724. "description": "BadRequest | InvalidRequestError",
  7725. "content": {
  7726. "application/json": {
  7727. "schema": {
  7728. "anyOf": [
  7729. {
  7730. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7731. },
  7732. {
  7733. "$ref": "#/components/schemas/InvalidRequestError"
  7734. }
  7735. ]
  7736. }
  7737. }
  7738. }
  7739. },
  7740. "404": {
  7741. "description": "NotFoundError",
  7742. "content": {
  7743. "application/json": {
  7744. "schema": {
  7745. "$ref": "#/components/schemas/NotFoundError"
  7746. }
  7747. }
  7748. }
  7749. },
  7750. "409": {
  7751. "description": "SessionBusyError",
  7752. "content": {
  7753. "application/json": {
  7754. "schema": {
  7755. "$ref": "#/components/schemas/SessionBusyError"
  7756. }
  7757. }
  7758. }
  7759. }
  7760. },
  7761. "description": "Restore all previously reverted messages in a session.",
  7762. "summary": "Restore reverted messages",
  7763. "x-codeSamples": [
  7764. {
  7765. "lang": "js",
  7766. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  7767. }
  7768. ]
  7769. }
  7770. },
  7771. "/session/{sessionID}/permissions/{permissionID}": {
  7772. "post": {
  7773. "tags": ["session"],
  7774. "operationId": "permission.respond",
  7775. "parameters": [
  7776. {
  7777. "name": "sessionID",
  7778. "in": "path",
  7779. "schema": {
  7780. "type": "string",
  7781. "pattern": "^ses"
  7782. },
  7783. "required": true
  7784. },
  7785. {
  7786. "name": "permissionID",
  7787. "in": "path",
  7788. "schema": {
  7789. "type": "string",
  7790. "pattern": "^per"
  7791. },
  7792. "required": true
  7793. },
  7794. {
  7795. "name": "directory",
  7796. "in": "query",
  7797. "schema": {
  7798. "type": "string"
  7799. },
  7800. "required": false
  7801. },
  7802. {
  7803. "name": "workspace",
  7804. "in": "query",
  7805. "schema": {
  7806. "type": "string"
  7807. },
  7808. "required": false
  7809. }
  7810. ],
  7811. "responses": {
  7812. "200": {
  7813. "description": "Permission processed successfully",
  7814. "content": {
  7815. "application/json": {
  7816. "schema": {
  7817. "type": "boolean",
  7818. "description": "Permission processed successfully"
  7819. }
  7820. }
  7821. }
  7822. },
  7823. "400": {
  7824. "description": "BadRequest | InvalidRequestError",
  7825. "content": {
  7826. "application/json": {
  7827. "schema": {
  7828. "anyOf": [
  7829. {
  7830. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7831. },
  7832. {
  7833. "$ref": "#/components/schemas/InvalidRequestError"
  7834. }
  7835. ]
  7836. }
  7837. }
  7838. }
  7839. },
  7840. "404": {
  7841. "description": "NotFoundError | PermissionNotFoundError",
  7842. "content": {
  7843. "application/json": {
  7844. "schema": {
  7845. "anyOf": [
  7846. {
  7847. "$ref": "#/components/schemas/NotFoundError"
  7848. },
  7849. {
  7850. "$ref": "#/components/schemas/PermissionNotFoundError"
  7851. }
  7852. ]
  7853. }
  7854. }
  7855. }
  7856. }
  7857. },
  7858. "description": "Approve or deny a permission request from the AI assistant.",
  7859. "summary": "Respond to permission",
  7860. "deprecated": true,
  7861. "requestBody": {
  7862. "content": {
  7863. "application/json": {
  7864. "schema": {
  7865. "type": "object",
  7866. "properties": {
  7867. "response": {
  7868. "type": "string",
  7869. "enum": ["once", "always", "reject"]
  7870. }
  7871. },
  7872. "required": ["response"],
  7873. "additionalProperties": false
  7874. }
  7875. }
  7876. }
  7877. },
  7878. "x-codeSamples": [
  7879. {
  7880. "lang": "js",
  7881. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  7882. }
  7883. ]
  7884. }
  7885. },
  7886. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  7887. "delete": {
  7888. "tags": ["session"],
  7889. "operationId": "part.delete",
  7890. "parameters": [
  7891. {
  7892. "name": "sessionID",
  7893. "in": "path",
  7894. "schema": {
  7895. "type": "string",
  7896. "pattern": "^ses"
  7897. },
  7898. "required": true
  7899. },
  7900. {
  7901. "name": "messageID",
  7902. "in": "path",
  7903. "schema": {
  7904. "type": "string",
  7905. "pattern": "^msg"
  7906. },
  7907. "required": true
  7908. },
  7909. {
  7910. "name": "partID",
  7911. "in": "path",
  7912. "schema": {
  7913. "type": "string",
  7914. "pattern": "^prt"
  7915. },
  7916. "required": true
  7917. },
  7918. {
  7919. "name": "directory",
  7920. "in": "query",
  7921. "schema": {
  7922. "type": "string"
  7923. },
  7924. "required": false
  7925. },
  7926. {
  7927. "name": "workspace",
  7928. "in": "query",
  7929. "schema": {
  7930. "type": "string"
  7931. },
  7932. "required": false
  7933. }
  7934. ],
  7935. "responses": {
  7936. "200": {
  7937. "description": "Successfully deleted part",
  7938. "content": {
  7939. "application/json": {
  7940. "schema": {
  7941. "type": "boolean",
  7942. "description": "Successfully deleted part"
  7943. }
  7944. }
  7945. }
  7946. },
  7947. "400": {
  7948. "description": "BadRequest | InvalidRequestError",
  7949. "content": {
  7950. "application/json": {
  7951. "schema": {
  7952. "anyOf": [
  7953. {
  7954. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7955. },
  7956. {
  7957. "$ref": "#/components/schemas/InvalidRequestError"
  7958. }
  7959. ]
  7960. }
  7961. }
  7962. }
  7963. },
  7964. "404": {
  7965. "description": "NotFoundError",
  7966. "content": {
  7967. "application/json": {
  7968. "schema": {
  7969. "$ref": "#/components/schemas/NotFoundError"
  7970. }
  7971. }
  7972. }
  7973. }
  7974. },
  7975. "description": "Delete a part from a message.",
  7976. "x-codeSamples": [
  7977. {
  7978. "lang": "js",
  7979. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  7980. }
  7981. ]
  7982. },
  7983. "patch": {
  7984. "tags": ["session"],
  7985. "operationId": "part.update",
  7986. "parameters": [
  7987. {
  7988. "name": "sessionID",
  7989. "in": "path",
  7990. "schema": {
  7991. "type": "string",
  7992. "pattern": "^ses"
  7993. },
  7994. "required": true
  7995. },
  7996. {
  7997. "name": "messageID",
  7998. "in": "path",
  7999. "schema": {
  8000. "type": "string",
  8001. "pattern": "^msg"
  8002. },
  8003. "required": true
  8004. },
  8005. {
  8006. "name": "partID",
  8007. "in": "path",
  8008. "schema": {
  8009. "type": "string",
  8010. "pattern": "^prt"
  8011. },
  8012. "required": true
  8013. },
  8014. {
  8015. "name": "directory",
  8016. "in": "query",
  8017. "schema": {
  8018. "type": "string"
  8019. },
  8020. "required": false
  8021. },
  8022. {
  8023. "name": "workspace",
  8024. "in": "query",
  8025. "schema": {
  8026. "type": "string"
  8027. },
  8028. "required": false
  8029. }
  8030. ],
  8031. "responses": {
  8032. "200": {
  8033. "description": "Successfully updated part",
  8034. "content": {
  8035. "application/json": {
  8036. "schema": {
  8037. "$ref": "#/components/schemas/Part"
  8038. }
  8039. }
  8040. }
  8041. },
  8042. "400": {
  8043. "description": "BadRequest | InvalidRequestError",
  8044. "content": {
  8045. "application/json": {
  8046. "schema": {
  8047. "anyOf": [
  8048. {
  8049. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8050. },
  8051. {
  8052. "$ref": "#/components/schemas/InvalidRequestError"
  8053. }
  8054. ]
  8055. }
  8056. }
  8057. }
  8058. },
  8059. "404": {
  8060. "description": "NotFoundError",
  8061. "content": {
  8062. "application/json": {
  8063. "schema": {
  8064. "$ref": "#/components/schemas/NotFoundError"
  8065. }
  8066. }
  8067. }
  8068. }
  8069. },
  8070. "description": "Update a part in a message.",
  8071. "requestBody": {
  8072. "content": {
  8073. "application/json": {
  8074. "schema": {
  8075. "$ref": "#/components/schemas/Part"
  8076. }
  8077. }
  8078. }
  8079. },
  8080. "x-codeSamples": [
  8081. {
  8082. "lang": "js",
  8083. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  8084. }
  8085. ]
  8086. }
  8087. },
  8088. "/sync/start": {
  8089. "post": {
  8090. "tags": ["sync"],
  8091. "operationId": "sync.start",
  8092. "parameters": [
  8093. {
  8094. "name": "directory",
  8095. "in": "query",
  8096. "schema": {
  8097. "type": "string"
  8098. },
  8099. "required": false
  8100. },
  8101. {
  8102. "name": "workspace",
  8103. "in": "query",
  8104. "schema": {
  8105. "type": "string"
  8106. },
  8107. "required": false
  8108. }
  8109. ],
  8110. "responses": {
  8111. "200": {
  8112. "description": "Workspace sync started",
  8113. "content": {
  8114. "application/json": {
  8115. "schema": {
  8116. "type": "boolean",
  8117. "description": "Workspace sync started"
  8118. }
  8119. }
  8120. }
  8121. },
  8122. "400": {
  8123. "description": "Bad request",
  8124. "content": {
  8125. "application/json": {
  8126. "schema": {
  8127. "$ref": "#/components/schemas/BadRequestError"
  8128. }
  8129. }
  8130. }
  8131. }
  8132. },
  8133. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  8134. "summary": "Start workspace sync",
  8135. "x-codeSamples": [
  8136. {
  8137. "lang": "js",
  8138. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  8139. }
  8140. ]
  8141. }
  8142. },
  8143. "/sync/replay": {
  8144. "post": {
  8145. "tags": ["sync"],
  8146. "operationId": "sync.replay",
  8147. "parameters": [
  8148. {
  8149. "name": "directory",
  8150. "in": "query",
  8151. "schema": {
  8152. "type": "string"
  8153. },
  8154. "required": false
  8155. },
  8156. {
  8157. "name": "workspace",
  8158. "in": "query",
  8159. "schema": {
  8160. "type": "string"
  8161. },
  8162. "required": false
  8163. }
  8164. ],
  8165. "responses": {
  8166. "200": {
  8167. "description": "Replayed sync events",
  8168. "content": {
  8169. "application/json": {
  8170. "schema": {
  8171. "type": "object",
  8172. "properties": {
  8173. "sessionID": {
  8174. "type": "string"
  8175. }
  8176. },
  8177. "required": ["sessionID"],
  8178. "additionalProperties": false,
  8179. "description": "Replayed sync events"
  8180. }
  8181. }
  8182. }
  8183. },
  8184. "400": {
  8185. "description": "BadRequest | InvalidRequestError",
  8186. "content": {
  8187. "application/json": {
  8188. "schema": {
  8189. "anyOf": [
  8190. {
  8191. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8192. },
  8193. {
  8194. "$ref": "#/components/schemas/InvalidRequestError"
  8195. }
  8196. ]
  8197. }
  8198. }
  8199. }
  8200. }
  8201. },
  8202. "description": "Validate and replay a complete sync event history.",
  8203. "summary": "Replay sync events",
  8204. "requestBody": {
  8205. "content": {
  8206. "application/json": {
  8207. "schema": {
  8208. "type": "object",
  8209. "properties": {
  8210. "directory": {
  8211. "type": "string"
  8212. },
  8213. "events": {
  8214. "type": "array",
  8215. "minItems": 1,
  8216. "items": {
  8217. "type": "object",
  8218. "properties": {
  8219. "id": {
  8220. "type": "string",
  8221. "pattern": "^evt_"
  8222. },
  8223. "aggregateID": {
  8224. "type": "string"
  8225. },
  8226. "seq": {
  8227. "type": "integer",
  8228. "minimum": 0
  8229. },
  8230. "type": {
  8231. "type": "string"
  8232. },
  8233. "data": {
  8234. "type": "object"
  8235. }
  8236. },
  8237. "required": ["id", "aggregateID", "seq", "type", "data"],
  8238. "additionalProperties": false
  8239. }
  8240. }
  8241. },
  8242. "required": ["directory", "events"],
  8243. "additionalProperties": false
  8244. }
  8245. }
  8246. }
  8247. },
  8248. "x-codeSamples": [
  8249. {
  8250. "lang": "js",
  8251. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  8252. }
  8253. ]
  8254. }
  8255. },
  8256. "/sync/steal": {
  8257. "post": {
  8258. "tags": ["sync"],
  8259. "operationId": "sync.steal",
  8260. "parameters": [
  8261. {
  8262. "name": "directory",
  8263. "in": "query",
  8264. "schema": {
  8265. "type": "string"
  8266. },
  8267. "required": false
  8268. },
  8269. {
  8270. "name": "workspace",
  8271. "in": "query",
  8272. "schema": {
  8273. "type": "string"
  8274. },
  8275. "required": false
  8276. }
  8277. ],
  8278. "responses": {
  8279. "200": {
  8280. "description": "Session stolen into workspace",
  8281. "content": {
  8282. "application/json": {
  8283. "schema": {
  8284. "type": "object",
  8285. "properties": {
  8286. "sessionID": {
  8287. "type": "string",
  8288. "pattern": "^ses"
  8289. }
  8290. },
  8291. "required": ["sessionID"],
  8292. "additionalProperties": false,
  8293. "description": "Session stolen into workspace"
  8294. }
  8295. }
  8296. }
  8297. },
  8298. "400": {
  8299. "description": "BadRequest | InvalidRequestError",
  8300. "content": {
  8301. "application/json": {
  8302. "schema": {
  8303. "anyOf": [
  8304. {
  8305. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8306. },
  8307. {
  8308. "$ref": "#/components/schemas/InvalidRequestError"
  8309. }
  8310. ]
  8311. }
  8312. }
  8313. }
  8314. }
  8315. },
  8316. "description": "Update a session to belong to the current workspace through the sync event system.",
  8317. "summary": "Steal session into workspace",
  8318. "requestBody": {
  8319. "content": {
  8320. "application/json": {
  8321. "schema": {
  8322. "type": "object",
  8323. "properties": {
  8324. "sessionID": {
  8325. "type": "string",
  8326. "pattern": "^ses"
  8327. }
  8328. },
  8329. "required": ["sessionID"],
  8330. "additionalProperties": false
  8331. }
  8332. }
  8333. }
  8334. },
  8335. "x-codeSamples": [
  8336. {
  8337. "lang": "js",
  8338. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.steal({\n ...\n})"
  8339. }
  8340. ]
  8341. }
  8342. },
  8343. "/sync/history": {
  8344. "post": {
  8345. "tags": ["sync"],
  8346. "operationId": "sync.history.list",
  8347. "parameters": [
  8348. {
  8349. "name": "directory",
  8350. "in": "query",
  8351. "schema": {
  8352. "type": "string"
  8353. },
  8354. "required": false
  8355. },
  8356. {
  8357. "name": "workspace",
  8358. "in": "query",
  8359. "schema": {
  8360. "type": "string"
  8361. },
  8362. "required": false
  8363. }
  8364. ],
  8365. "responses": {
  8366. "200": {
  8367. "description": "Sync events",
  8368. "content": {
  8369. "application/json": {
  8370. "schema": {
  8371. "type": "array",
  8372. "items": {
  8373. "type": "object",
  8374. "properties": {
  8375. "id": {
  8376. "type": "string",
  8377. "pattern": "^evt_"
  8378. },
  8379. "aggregate_id": {
  8380. "type": "string"
  8381. },
  8382. "seq": {
  8383. "type": "integer",
  8384. "minimum": 0
  8385. },
  8386. "type": {
  8387. "type": "string"
  8388. },
  8389. "data": {
  8390. "type": "object"
  8391. }
  8392. },
  8393. "required": ["id", "aggregate_id", "seq", "type", "data"],
  8394. "additionalProperties": false
  8395. },
  8396. "description": "Sync events"
  8397. }
  8398. }
  8399. }
  8400. },
  8401. "400": {
  8402. "description": "BadRequest | InvalidRequestError",
  8403. "content": {
  8404. "application/json": {
  8405. "schema": {
  8406. "anyOf": [
  8407. {
  8408. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8409. },
  8410. {
  8411. "$ref": "#/components/schemas/InvalidRequestError"
  8412. }
  8413. ]
  8414. }
  8415. }
  8416. }
  8417. }
  8418. },
  8419. "description": "List sync events for all aggregates. Keys are aggregate IDs the client already knows about, values are the last known sequence ID. Events with seq > value are returned for those aggregates. Aggregates not listed in the input get their full history.",
  8420. "summary": "List sync events",
  8421. "requestBody": {
  8422. "content": {
  8423. "application/json": {
  8424. "schema": {
  8425. "type": "object",
  8426. "additionalProperties": {
  8427. "type": "integer",
  8428. "minimum": 0
  8429. }
  8430. }
  8431. }
  8432. }
  8433. },
  8434. "x-codeSamples": [
  8435. {
  8436. "lang": "js",
  8437. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  8438. }
  8439. ]
  8440. }
  8441. },
  8442. "/tui/append-prompt": {
  8443. "post": {
  8444. "tags": ["tui"],
  8445. "operationId": "tui.appendPrompt",
  8446. "parameters": [
  8447. {
  8448. "name": "directory",
  8449. "in": "query",
  8450. "schema": {
  8451. "type": "string"
  8452. },
  8453. "required": false
  8454. },
  8455. {
  8456. "name": "workspace",
  8457. "in": "query",
  8458. "schema": {
  8459. "type": "string"
  8460. },
  8461. "required": false
  8462. }
  8463. ],
  8464. "responses": {
  8465. "200": {
  8466. "description": "Prompt processed successfully",
  8467. "content": {
  8468. "application/json": {
  8469. "schema": {
  8470. "type": "boolean",
  8471. "description": "Prompt processed successfully"
  8472. }
  8473. }
  8474. }
  8475. },
  8476. "400": {
  8477. "description": "BadRequest | InvalidRequestError",
  8478. "content": {
  8479. "application/json": {
  8480. "schema": {
  8481. "anyOf": [
  8482. {
  8483. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8484. },
  8485. {
  8486. "$ref": "#/components/schemas/InvalidRequestError"
  8487. }
  8488. ]
  8489. }
  8490. }
  8491. }
  8492. }
  8493. },
  8494. "description": "Append prompt to the TUI.",
  8495. "summary": "Append TUI prompt",
  8496. "requestBody": {
  8497. "content": {
  8498. "application/json": {
  8499. "schema": {
  8500. "type": "object",
  8501. "properties": {
  8502. "text": {
  8503. "type": "string"
  8504. }
  8505. },
  8506. "required": ["text"],
  8507. "additionalProperties": false
  8508. }
  8509. }
  8510. }
  8511. },
  8512. "x-codeSamples": [
  8513. {
  8514. "lang": "js",
  8515. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  8516. }
  8517. ]
  8518. }
  8519. },
  8520. "/tui/open-help": {
  8521. "post": {
  8522. "tags": ["tui"],
  8523. "operationId": "tui.openHelp",
  8524. "parameters": [
  8525. {
  8526. "name": "directory",
  8527. "in": "query",
  8528. "schema": {
  8529. "type": "string"
  8530. },
  8531. "required": false
  8532. },
  8533. {
  8534. "name": "workspace",
  8535. "in": "query",
  8536. "schema": {
  8537. "type": "string"
  8538. },
  8539. "required": false
  8540. }
  8541. ],
  8542. "responses": {
  8543. "200": {
  8544. "description": "Help dialog opened successfully",
  8545. "content": {
  8546. "application/json": {
  8547. "schema": {
  8548. "type": "boolean",
  8549. "description": "Help dialog opened successfully"
  8550. }
  8551. }
  8552. }
  8553. },
  8554. "400": {
  8555. "description": "Bad request",
  8556. "content": {
  8557. "application/json": {
  8558. "schema": {
  8559. "$ref": "#/components/schemas/BadRequestError"
  8560. }
  8561. }
  8562. }
  8563. }
  8564. },
  8565. "description": "Open the help dialog in the TUI to display user assistance information.",
  8566. "summary": "Open help dialog",
  8567. "x-codeSamples": [
  8568. {
  8569. "lang": "js",
  8570. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  8571. }
  8572. ]
  8573. }
  8574. },
  8575. "/tui/open-sessions": {
  8576. "post": {
  8577. "tags": ["tui"],
  8578. "operationId": "tui.openSessions",
  8579. "parameters": [
  8580. {
  8581. "name": "directory",
  8582. "in": "query",
  8583. "schema": {
  8584. "type": "string"
  8585. },
  8586. "required": false
  8587. },
  8588. {
  8589. "name": "workspace",
  8590. "in": "query",
  8591. "schema": {
  8592. "type": "string"
  8593. },
  8594. "required": false
  8595. }
  8596. ],
  8597. "responses": {
  8598. "200": {
  8599. "description": "Session dialog opened successfully",
  8600. "content": {
  8601. "application/json": {
  8602. "schema": {
  8603. "type": "boolean",
  8604. "description": "Session dialog opened successfully"
  8605. }
  8606. }
  8607. }
  8608. },
  8609. "400": {
  8610. "description": "Bad request",
  8611. "content": {
  8612. "application/json": {
  8613. "schema": {
  8614. "$ref": "#/components/schemas/BadRequestError"
  8615. }
  8616. }
  8617. }
  8618. }
  8619. },
  8620. "description": "Open the session dialog.",
  8621. "summary": "Open sessions dialog",
  8622. "x-codeSamples": [
  8623. {
  8624. "lang": "js",
  8625. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  8626. }
  8627. ]
  8628. }
  8629. },
  8630. "/tui/open-themes": {
  8631. "post": {
  8632. "tags": ["tui"],
  8633. "operationId": "tui.openThemes",
  8634. "parameters": [
  8635. {
  8636. "name": "directory",
  8637. "in": "query",
  8638. "schema": {
  8639. "type": "string"
  8640. },
  8641. "required": false
  8642. },
  8643. {
  8644. "name": "workspace",
  8645. "in": "query",
  8646. "schema": {
  8647. "type": "string"
  8648. },
  8649. "required": false
  8650. }
  8651. ],
  8652. "responses": {
  8653. "200": {
  8654. "description": "Theme dialog opened successfully",
  8655. "content": {
  8656. "application/json": {
  8657. "schema": {
  8658. "type": "boolean",
  8659. "description": "Theme dialog opened successfully"
  8660. }
  8661. }
  8662. }
  8663. },
  8664. "400": {
  8665. "description": "Bad request",
  8666. "content": {
  8667. "application/json": {
  8668. "schema": {
  8669. "$ref": "#/components/schemas/BadRequestError"
  8670. }
  8671. }
  8672. }
  8673. }
  8674. },
  8675. "description": "Open the theme dialog.",
  8676. "summary": "Open themes dialog",
  8677. "x-codeSamples": [
  8678. {
  8679. "lang": "js",
  8680. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  8681. }
  8682. ]
  8683. }
  8684. },
  8685. "/tui/open-models": {
  8686. "post": {
  8687. "tags": ["tui"],
  8688. "operationId": "tui.openModels",
  8689. "parameters": [
  8690. {
  8691. "name": "directory",
  8692. "in": "query",
  8693. "schema": {
  8694. "type": "string"
  8695. },
  8696. "required": false
  8697. },
  8698. {
  8699. "name": "workspace",
  8700. "in": "query",
  8701. "schema": {
  8702. "type": "string"
  8703. },
  8704. "required": false
  8705. }
  8706. ],
  8707. "responses": {
  8708. "200": {
  8709. "description": "Model dialog opened successfully",
  8710. "content": {
  8711. "application/json": {
  8712. "schema": {
  8713. "type": "boolean",
  8714. "description": "Model dialog opened successfully"
  8715. }
  8716. }
  8717. }
  8718. },
  8719. "400": {
  8720. "description": "Bad request",
  8721. "content": {
  8722. "application/json": {
  8723. "schema": {
  8724. "$ref": "#/components/schemas/BadRequestError"
  8725. }
  8726. }
  8727. }
  8728. }
  8729. },
  8730. "description": "Open the model dialog.",
  8731. "summary": "Open models dialog",
  8732. "x-codeSamples": [
  8733. {
  8734. "lang": "js",
  8735. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  8736. }
  8737. ]
  8738. }
  8739. },
  8740. "/tui/submit-prompt": {
  8741. "post": {
  8742. "tags": ["tui"],
  8743. "operationId": "tui.submitPrompt",
  8744. "parameters": [
  8745. {
  8746. "name": "directory",
  8747. "in": "query",
  8748. "schema": {
  8749. "type": "string"
  8750. },
  8751. "required": false
  8752. },
  8753. {
  8754. "name": "workspace",
  8755. "in": "query",
  8756. "schema": {
  8757. "type": "string"
  8758. },
  8759. "required": false
  8760. }
  8761. ],
  8762. "responses": {
  8763. "200": {
  8764. "description": "Prompt submitted successfully",
  8765. "content": {
  8766. "application/json": {
  8767. "schema": {
  8768. "type": "boolean",
  8769. "description": "Prompt submitted successfully"
  8770. }
  8771. }
  8772. }
  8773. },
  8774. "400": {
  8775. "description": "Bad request",
  8776. "content": {
  8777. "application/json": {
  8778. "schema": {
  8779. "$ref": "#/components/schemas/BadRequestError"
  8780. }
  8781. }
  8782. }
  8783. }
  8784. },
  8785. "description": "Submit the prompt.",
  8786. "summary": "Submit TUI prompt",
  8787. "x-codeSamples": [
  8788. {
  8789. "lang": "js",
  8790. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  8791. }
  8792. ]
  8793. }
  8794. },
  8795. "/tui/clear-prompt": {
  8796. "post": {
  8797. "tags": ["tui"],
  8798. "operationId": "tui.clearPrompt",
  8799. "parameters": [
  8800. {
  8801. "name": "directory",
  8802. "in": "query",
  8803. "schema": {
  8804. "type": "string"
  8805. },
  8806. "required": false
  8807. },
  8808. {
  8809. "name": "workspace",
  8810. "in": "query",
  8811. "schema": {
  8812. "type": "string"
  8813. },
  8814. "required": false
  8815. }
  8816. ],
  8817. "responses": {
  8818. "200": {
  8819. "description": "Prompt cleared successfully",
  8820. "content": {
  8821. "application/json": {
  8822. "schema": {
  8823. "type": "boolean",
  8824. "description": "Prompt cleared successfully"
  8825. }
  8826. }
  8827. }
  8828. },
  8829. "400": {
  8830. "description": "Bad request",
  8831. "content": {
  8832. "application/json": {
  8833. "schema": {
  8834. "$ref": "#/components/schemas/BadRequestError"
  8835. }
  8836. }
  8837. }
  8838. }
  8839. },
  8840. "description": "Clear the prompt.",
  8841. "summary": "Clear TUI prompt",
  8842. "x-codeSamples": [
  8843. {
  8844. "lang": "js",
  8845. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  8846. }
  8847. ]
  8848. }
  8849. },
  8850. "/tui/execute-command": {
  8851. "post": {
  8852. "tags": ["tui"],
  8853. "operationId": "tui.executeCommand",
  8854. "parameters": [
  8855. {
  8856. "name": "directory",
  8857. "in": "query",
  8858. "schema": {
  8859. "type": "string"
  8860. },
  8861. "required": false
  8862. },
  8863. {
  8864. "name": "workspace",
  8865. "in": "query",
  8866. "schema": {
  8867. "type": "string"
  8868. },
  8869. "required": false
  8870. }
  8871. ],
  8872. "responses": {
  8873. "200": {
  8874. "description": "Command executed successfully",
  8875. "content": {
  8876. "application/json": {
  8877. "schema": {
  8878. "type": "boolean",
  8879. "description": "Command executed successfully"
  8880. }
  8881. }
  8882. }
  8883. },
  8884. "400": {
  8885. "description": "BadRequest | InvalidRequestError",
  8886. "content": {
  8887. "application/json": {
  8888. "schema": {
  8889. "anyOf": [
  8890. {
  8891. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8892. },
  8893. {
  8894. "$ref": "#/components/schemas/InvalidRequestError"
  8895. }
  8896. ]
  8897. }
  8898. }
  8899. }
  8900. }
  8901. },
  8902. "description": "Execute a TUI command.",
  8903. "summary": "Execute TUI command",
  8904. "requestBody": {
  8905. "content": {
  8906. "application/json": {
  8907. "schema": {
  8908. "type": "object",
  8909. "properties": {
  8910. "command": {
  8911. "type": "string"
  8912. }
  8913. },
  8914. "required": ["command"],
  8915. "additionalProperties": false
  8916. }
  8917. }
  8918. }
  8919. },
  8920. "x-codeSamples": [
  8921. {
  8922. "lang": "js",
  8923. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  8924. }
  8925. ]
  8926. }
  8927. },
  8928. "/tui/show-toast": {
  8929. "post": {
  8930. "tags": ["tui"],
  8931. "operationId": "tui.showToast",
  8932. "parameters": [
  8933. {
  8934. "name": "directory",
  8935. "in": "query",
  8936. "schema": {
  8937. "type": "string"
  8938. },
  8939. "required": false
  8940. },
  8941. {
  8942. "name": "workspace",
  8943. "in": "query",
  8944. "schema": {
  8945. "type": "string"
  8946. },
  8947. "required": false
  8948. }
  8949. ],
  8950. "responses": {
  8951. "200": {
  8952. "description": "Toast notification shown successfully",
  8953. "content": {
  8954. "application/json": {
  8955. "schema": {
  8956. "type": "boolean",
  8957. "description": "Toast notification shown successfully"
  8958. }
  8959. }
  8960. }
  8961. },
  8962. "400": {
  8963. "description": "Bad request",
  8964. "content": {
  8965. "application/json": {
  8966. "schema": {
  8967. "$ref": "#/components/schemas/BadRequestError"
  8968. }
  8969. }
  8970. }
  8971. }
  8972. },
  8973. "description": "Show a toast notification in the TUI.",
  8974. "summary": "Show TUI toast",
  8975. "requestBody": {
  8976. "content": {
  8977. "application/json": {
  8978. "schema": {
  8979. "type": "object",
  8980. "properties": {
  8981. "title": {
  8982. "type": "string"
  8983. },
  8984. "message": {
  8985. "type": "string"
  8986. },
  8987. "variant": {
  8988. "type": "string",
  8989. "enum": ["info", "success", "warning", "error"]
  8990. },
  8991. "duration": {
  8992. "type": "integer",
  8993. "exclusiveMinimum": 0
  8994. }
  8995. },
  8996. "required": ["message", "variant"],
  8997. "additionalProperties": false
  8998. }
  8999. }
  9000. }
  9001. },
  9002. "x-codeSamples": [
  9003. {
  9004. "lang": "js",
  9005. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  9006. }
  9007. ]
  9008. }
  9009. },
  9010. "/tui/publish": {
  9011. "post": {
  9012. "tags": ["tui"],
  9013. "operationId": "tui.publish",
  9014. "parameters": [
  9015. {
  9016. "name": "directory",
  9017. "in": "query",
  9018. "schema": {
  9019. "type": "string"
  9020. },
  9021. "required": false
  9022. },
  9023. {
  9024. "name": "workspace",
  9025. "in": "query",
  9026. "schema": {
  9027. "type": "string"
  9028. },
  9029. "required": false
  9030. }
  9031. ],
  9032. "responses": {
  9033. "200": {
  9034. "description": "Event published successfully",
  9035. "content": {
  9036. "application/json": {
  9037. "schema": {
  9038. "type": "boolean",
  9039. "description": "Event published successfully"
  9040. }
  9041. }
  9042. }
  9043. },
  9044. "400": {
  9045. "description": "BadRequest | InvalidRequestError",
  9046. "content": {
  9047. "application/json": {
  9048. "schema": {
  9049. "anyOf": [
  9050. {
  9051. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9052. },
  9053. {
  9054. "$ref": "#/components/schemas/InvalidRequestError"
  9055. }
  9056. ]
  9057. }
  9058. }
  9059. }
  9060. }
  9061. },
  9062. "description": "Publish a TUI event.",
  9063. "summary": "Publish TUI event",
  9064. "requestBody": {
  9065. "content": {
  9066. "application/json": {
  9067. "schema": {
  9068. "anyOf": [
  9069. {
  9070. "$ref": "#/components/schemas/EventTuiPromptAppend"
  9071. },
  9072. {
  9073. "$ref": "#/components/schemas/EventTuiCommandExecute"
  9074. },
  9075. {
  9076. "$ref": "#/components/schemas/EventTuiToastShow"
  9077. },
  9078. {
  9079. "$ref": "#/components/schemas/EventTuiSessionSelect"
  9080. }
  9081. ]
  9082. }
  9083. }
  9084. }
  9085. },
  9086. "x-codeSamples": [
  9087. {
  9088. "lang": "js",
  9089. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  9090. }
  9091. ]
  9092. }
  9093. },
  9094. "/tui/select-session": {
  9095. "post": {
  9096. "tags": ["tui"],
  9097. "operationId": "tui.selectSession",
  9098. "parameters": [
  9099. {
  9100. "name": "directory",
  9101. "in": "query",
  9102. "schema": {
  9103. "type": "string"
  9104. },
  9105. "required": false
  9106. },
  9107. {
  9108. "name": "workspace",
  9109. "in": "query",
  9110. "schema": {
  9111. "type": "string"
  9112. },
  9113. "required": false
  9114. }
  9115. ],
  9116. "responses": {
  9117. "200": {
  9118. "description": "Session selected successfully",
  9119. "content": {
  9120. "application/json": {
  9121. "schema": {
  9122. "type": "boolean",
  9123. "description": "Session selected successfully"
  9124. }
  9125. }
  9126. }
  9127. },
  9128. "400": {
  9129. "description": "BadRequest | InvalidRequestError",
  9130. "content": {
  9131. "application/json": {
  9132. "schema": {
  9133. "anyOf": [
  9134. {
  9135. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9136. },
  9137. {
  9138. "$ref": "#/components/schemas/InvalidRequestError"
  9139. }
  9140. ]
  9141. }
  9142. }
  9143. }
  9144. },
  9145. "404": {
  9146. "description": "NotFoundError",
  9147. "content": {
  9148. "application/json": {
  9149. "schema": {
  9150. "$ref": "#/components/schemas/NotFoundError"
  9151. }
  9152. }
  9153. }
  9154. }
  9155. },
  9156. "description": "Navigate the TUI to display the specified session.",
  9157. "summary": "Select session",
  9158. "requestBody": {
  9159. "content": {
  9160. "application/json": {
  9161. "schema": {
  9162. "type": "object",
  9163. "properties": {
  9164. "sessionID": {
  9165. "type": "string",
  9166. "pattern": "^ses",
  9167. "description": "Session ID to navigate to"
  9168. }
  9169. },
  9170. "required": ["sessionID"],
  9171. "additionalProperties": false
  9172. }
  9173. }
  9174. }
  9175. },
  9176. "x-codeSamples": [
  9177. {
  9178. "lang": "js",
  9179. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  9180. }
  9181. ]
  9182. }
  9183. },
  9184. "/tui/control/next": {
  9185. "get": {
  9186. "tags": ["tui"],
  9187. "operationId": "tui.control.next",
  9188. "parameters": [
  9189. {
  9190. "name": "directory",
  9191. "in": "query",
  9192. "schema": {
  9193. "type": "string"
  9194. },
  9195. "required": false
  9196. },
  9197. {
  9198. "name": "workspace",
  9199. "in": "query",
  9200. "schema": {
  9201. "type": "string"
  9202. },
  9203. "required": false
  9204. }
  9205. ],
  9206. "responses": {
  9207. "200": {
  9208. "description": "Next TUI request",
  9209. "content": {
  9210. "application/json": {
  9211. "schema": {
  9212. "type": "object",
  9213. "properties": {
  9214. "path": {
  9215. "type": "string"
  9216. },
  9217. "body": {}
  9218. },
  9219. "required": ["path", "body"],
  9220. "additionalProperties": false,
  9221. "description": "Next TUI request"
  9222. }
  9223. }
  9224. }
  9225. },
  9226. "400": {
  9227. "description": "Bad request",
  9228. "content": {
  9229. "application/json": {
  9230. "schema": {
  9231. "$ref": "#/components/schemas/BadRequestError"
  9232. }
  9233. }
  9234. }
  9235. }
  9236. },
  9237. "description": "Retrieve the next TUI request from the queue for processing.",
  9238. "summary": "Get next TUI request",
  9239. "x-codeSamples": [
  9240. {
  9241. "lang": "js",
  9242. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  9243. }
  9244. ]
  9245. }
  9246. },
  9247. "/tui/control/response": {
  9248. "post": {
  9249. "tags": ["tui"],
  9250. "operationId": "tui.control.response",
  9251. "parameters": [
  9252. {
  9253. "name": "directory",
  9254. "in": "query",
  9255. "schema": {
  9256. "type": "string"
  9257. },
  9258. "required": false
  9259. },
  9260. {
  9261. "name": "workspace",
  9262. "in": "query",
  9263. "schema": {
  9264. "type": "string"
  9265. },
  9266. "required": false
  9267. }
  9268. ],
  9269. "responses": {
  9270. "200": {
  9271. "description": "Response submitted successfully",
  9272. "content": {
  9273. "application/json": {
  9274. "schema": {
  9275. "type": "boolean",
  9276. "description": "Response submitted successfully"
  9277. }
  9278. }
  9279. }
  9280. },
  9281. "400": {
  9282. "description": "Bad request",
  9283. "content": {
  9284. "application/json": {
  9285. "schema": {
  9286. "$ref": "#/components/schemas/BadRequestError"
  9287. }
  9288. }
  9289. }
  9290. }
  9291. },
  9292. "description": "Submit a response to the TUI request queue to complete a pending request.",
  9293. "summary": "Submit TUI response",
  9294. "requestBody": {
  9295. "content": {
  9296. "application/json": {
  9297. "schema": {}
  9298. }
  9299. }
  9300. },
  9301. "x-codeSamples": [
  9302. {
  9303. "lang": "js",
  9304. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  9305. }
  9306. ]
  9307. }
  9308. },
  9309. "/experimental/workspace/adapter": {
  9310. "get": {
  9311. "tags": ["workspace"],
  9312. "operationId": "experimental.workspace.adapter.list",
  9313. "parameters": [
  9314. {
  9315. "name": "directory",
  9316. "in": "query",
  9317. "schema": {
  9318. "type": "string"
  9319. },
  9320. "required": false
  9321. },
  9322. {
  9323. "name": "workspace",
  9324. "in": "query",
  9325. "schema": {
  9326. "type": "string"
  9327. },
  9328. "required": false
  9329. }
  9330. ],
  9331. "responses": {
  9332. "200": {
  9333. "description": "Workspace adapters",
  9334. "content": {
  9335. "application/json": {
  9336. "schema": {
  9337. "type": "array",
  9338. "items": {
  9339. "type": "object",
  9340. "properties": {
  9341. "type": {
  9342. "type": "string"
  9343. },
  9344. "name": {
  9345. "type": "string"
  9346. },
  9347. "description": {
  9348. "type": "string"
  9349. }
  9350. },
  9351. "required": ["type", "name", "description"],
  9352. "additionalProperties": false
  9353. },
  9354. "description": "Workspace adapters"
  9355. }
  9356. }
  9357. }
  9358. },
  9359. "400": {
  9360. "description": "Bad request",
  9361. "content": {
  9362. "application/json": {
  9363. "schema": {
  9364. "$ref": "#/components/schemas/BadRequestError"
  9365. }
  9366. }
  9367. }
  9368. }
  9369. },
  9370. "description": "List all available workspace adapters for the current project.",
  9371. "summary": "List workspace adapters",
  9372. "x-codeSamples": [
  9373. {
  9374. "lang": "js",
  9375. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  9376. }
  9377. ]
  9378. }
  9379. },
  9380. "/experimental/workspace": {
  9381. "get": {
  9382. "tags": ["workspace"],
  9383. "operationId": "experimental.workspace.list",
  9384. "parameters": [
  9385. {
  9386. "name": "directory",
  9387. "in": "query",
  9388. "schema": {
  9389. "type": "string"
  9390. },
  9391. "required": false
  9392. },
  9393. {
  9394. "name": "workspace",
  9395. "in": "query",
  9396. "schema": {
  9397. "type": "string"
  9398. },
  9399. "required": false
  9400. }
  9401. ],
  9402. "responses": {
  9403. "200": {
  9404. "description": "Workspaces",
  9405. "content": {
  9406. "application/json": {
  9407. "schema": {
  9408. "type": "array",
  9409. "items": {
  9410. "$ref": "#/components/schemas/Workspace"
  9411. },
  9412. "description": "Workspaces"
  9413. }
  9414. }
  9415. }
  9416. },
  9417. "400": {
  9418. "description": "Bad request",
  9419. "content": {
  9420. "application/json": {
  9421. "schema": {
  9422. "$ref": "#/components/schemas/BadRequestError"
  9423. }
  9424. }
  9425. }
  9426. }
  9427. },
  9428. "description": "List all workspaces.",
  9429. "summary": "List workspaces",
  9430. "x-codeSamples": [
  9431. {
  9432. "lang": "js",
  9433. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  9434. }
  9435. ]
  9436. },
  9437. "post": {
  9438. "tags": ["workspace"],
  9439. "operationId": "experimental.workspace.create",
  9440. "parameters": [
  9441. {
  9442. "name": "directory",
  9443. "in": "query",
  9444. "schema": {
  9445. "type": "string"
  9446. },
  9447. "required": false
  9448. },
  9449. {
  9450. "name": "workspace",
  9451. "in": "query",
  9452. "schema": {
  9453. "type": "string"
  9454. },
  9455. "required": false
  9456. }
  9457. ],
  9458. "responses": {
  9459. "200": {
  9460. "description": "Workspace created",
  9461. "content": {
  9462. "application/json": {
  9463. "schema": {
  9464. "$ref": "#/components/schemas/Workspace"
  9465. }
  9466. }
  9467. }
  9468. },
  9469. "400": {
  9470. "description": "WorkspaceCreateError | BadRequest | InvalidRequestError",
  9471. "content": {
  9472. "application/json": {
  9473. "schema": {
  9474. "anyOf": [
  9475. {
  9476. "$ref": "#/components/schemas/WorkspaceCreateError"
  9477. },
  9478. {
  9479. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9480. },
  9481. {
  9482. "$ref": "#/components/schemas/InvalidRequestError"
  9483. }
  9484. ]
  9485. }
  9486. }
  9487. }
  9488. }
  9489. },
  9490. "description": "Create a workspace for the current project.",
  9491. "summary": "Create workspace",
  9492. "requestBody": {
  9493. "content": {
  9494. "application/json": {
  9495. "schema": {
  9496. "type": "object",
  9497. "properties": {
  9498. "id": {
  9499. "type": "string",
  9500. "pattern": "^wrk"
  9501. },
  9502. "type": {
  9503. "type": "string"
  9504. },
  9505. "branch": {
  9506. "anyOf": [
  9507. {
  9508. "type": "string"
  9509. },
  9510. {
  9511. "type": "null"
  9512. }
  9513. ]
  9514. },
  9515. "extra": {
  9516. "anyOf": [
  9517. {},
  9518. {
  9519. "type": "null"
  9520. }
  9521. ]
  9522. }
  9523. },
  9524. "required": ["type"],
  9525. "additionalProperties": false
  9526. }
  9527. }
  9528. }
  9529. },
  9530. "x-codeSamples": [
  9531. {
  9532. "lang": "js",
  9533. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  9534. }
  9535. ]
  9536. }
  9537. },
  9538. "/experimental/workspace/sync-list": {
  9539. "post": {
  9540. "tags": ["workspace"],
  9541. "operationId": "experimental.workspace.syncList",
  9542. "parameters": [
  9543. {
  9544. "name": "directory",
  9545. "in": "query",
  9546. "schema": {
  9547. "type": "string"
  9548. },
  9549. "required": false
  9550. },
  9551. {
  9552. "name": "workspace",
  9553. "in": "query",
  9554. "schema": {
  9555. "type": "string"
  9556. },
  9557. "required": false
  9558. }
  9559. ],
  9560. "responses": {
  9561. "204": {
  9562. "description": "Workspace list synced"
  9563. },
  9564. "400": {
  9565. "description": "Bad request",
  9566. "content": {
  9567. "application/json": {
  9568. "schema": {
  9569. "$ref": "#/components/schemas/BadRequestError"
  9570. }
  9571. }
  9572. }
  9573. }
  9574. },
  9575. "description": "Register missing workspaces returned by workspace adapters.",
  9576. "summary": "Sync workspace list",
  9577. "x-codeSamples": [
  9578. {
  9579. "lang": "js",
  9580. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.syncList({\n ...\n})"
  9581. }
  9582. ]
  9583. }
  9584. },
  9585. "/experimental/workspace/status": {
  9586. "get": {
  9587. "tags": ["workspace"],
  9588. "operationId": "experimental.workspace.status",
  9589. "parameters": [
  9590. {
  9591. "name": "directory",
  9592. "in": "query",
  9593. "schema": {
  9594. "type": "string"
  9595. },
  9596. "required": false
  9597. },
  9598. {
  9599. "name": "workspace",
  9600. "in": "query",
  9601. "schema": {
  9602. "type": "string"
  9603. },
  9604. "required": false
  9605. }
  9606. ],
  9607. "responses": {
  9608. "200": {
  9609. "description": "Workspace status",
  9610. "content": {
  9611. "application/json": {
  9612. "schema": {
  9613. "type": "array",
  9614. "items": {
  9615. "type": "object",
  9616. "properties": {
  9617. "workspaceID": {
  9618. "type": "string",
  9619. "pattern": "^wrk"
  9620. },
  9621. "status": {
  9622. "type": "string",
  9623. "enum": ["connected", "connecting", "disconnected", "error"]
  9624. }
  9625. },
  9626. "required": ["workspaceID", "status"],
  9627. "additionalProperties": false
  9628. },
  9629. "description": "Workspace status"
  9630. }
  9631. }
  9632. }
  9633. },
  9634. "400": {
  9635. "description": "Bad request",
  9636. "content": {
  9637. "application/json": {
  9638. "schema": {
  9639. "$ref": "#/components/schemas/BadRequestError"
  9640. }
  9641. }
  9642. }
  9643. }
  9644. },
  9645. "description": "Get connection status for workspaces in the current project.",
  9646. "summary": "Workspace status",
  9647. "x-codeSamples": [
  9648. {
  9649. "lang": "js",
  9650. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  9651. }
  9652. ]
  9653. }
  9654. },
  9655. "/experimental/workspace/{id}": {
  9656. "delete": {
  9657. "tags": ["workspace"],
  9658. "operationId": "experimental.workspace.remove",
  9659. "parameters": [
  9660. {
  9661. "name": "id",
  9662. "in": "path",
  9663. "schema": {
  9664. "type": "string",
  9665. "pattern": "^wrk"
  9666. },
  9667. "required": true
  9668. },
  9669. {
  9670. "name": "directory",
  9671. "in": "query",
  9672. "schema": {
  9673. "type": "string"
  9674. },
  9675. "required": false
  9676. },
  9677. {
  9678. "name": "workspace",
  9679. "in": "query",
  9680. "schema": {
  9681. "type": "string"
  9682. },
  9683. "required": false
  9684. }
  9685. ],
  9686. "responses": {
  9687. "200": {
  9688. "description": "Workspace removed",
  9689. "content": {
  9690. "application/json": {
  9691. "schema": {
  9692. "$ref": "#/components/schemas/Workspace"
  9693. }
  9694. }
  9695. }
  9696. },
  9697. "400": {
  9698. "description": "BadRequest | InvalidRequestError",
  9699. "content": {
  9700. "application/json": {
  9701. "schema": {
  9702. "anyOf": [
  9703. {
  9704. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9705. },
  9706. {
  9707. "$ref": "#/components/schemas/InvalidRequestError"
  9708. }
  9709. ]
  9710. }
  9711. }
  9712. }
  9713. }
  9714. },
  9715. "description": "Remove an existing workspace.",
  9716. "summary": "Remove workspace",
  9717. "x-codeSamples": [
  9718. {
  9719. "lang": "js",
  9720. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  9721. }
  9722. ]
  9723. }
  9724. },
  9725. "/experimental/workspace/warp": {
  9726. "post": {
  9727. "tags": ["workspace"],
  9728. "operationId": "experimental.workspace.warp",
  9729. "parameters": [
  9730. {
  9731. "name": "directory",
  9732. "in": "query",
  9733. "schema": {
  9734. "type": "string"
  9735. },
  9736. "required": false
  9737. },
  9738. {
  9739. "name": "workspace",
  9740. "in": "query",
  9741. "schema": {
  9742. "type": "string"
  9743. },
  9744. "required": false
  9745. }
  9746. ],
  9747. "responses": {
  9748. "204": {
  9749. "description": "Session warped"
  9750. },
  9751. "400": {
  9752. "description": "WorkspaceWarpError | VcsApplyError | InvalidRequestError",
  9753. "content": {
  9754. "application/json": {
  9755. "schema": {
  9756. "anyOf": [
  9757. {
  9758. "$ref": "#/components/schemas/WorkspaceWarpError"
  9759. },
  9760. {
  9761. "$ref": "#/components/schemas/VcsApplyError"
  9762. },
  9763. {
  9764. "$ref": "#/components/schemas/InvalidRequestError"
  9765. }
  9766. ]
  9767. }
  9768. }
  9769. }
  9770. },
  9771. "404": {
  9772. "description": "NotFoundError",
  9773. "content": {
  9774. "application/json": {
  9775. "schema": {
  9776. "$ref": "#/components/schemas/NotFoundError"
  9777. }
  9778. }
  9779. }
  9780. }
  9781. },
  9782. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  9783. "summary": "Warp session into workspace",
  9784. "requestBody": {
  9785. "content": {
  9786. "application/json": {
  9787. "schema": {
  9788. "type": "object",
  9789. "properties": {
  9790. "id": {
  9791. "anyOf": [
  9792. {
  9793. "type": "string",
  9794. "pattern": "^wrk"
  9795. },
  9796. {
  9797. "type": "null"
  9798. }
  9799. ]
  9800. },
  9801. "sessionID": {
  9802. "type": "string",
  9803. "pattern": "^ses"
  9804. },
  9805. "copyChanges": {
  9806. "type": "boolean"
  9807. }
  9808. },
  9809. "required": ["id", "sessionID"],
  9810. "additionalProperties": false
  9811. }
  9812. }
  9813. }
  9814. },
  9815. "x-codeSamples": [
  9816. {
  9817. "lang": "js",
  9818. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  9819. }
  9820. ]
  9821. }
  9822. },
  9823. "/api/health": {
  9824. "get": {
  9825. "tags": ["opencode HttpApi"],
  9826. "operationId": "v2.health.get",
  9827. "parameters": [],
  9828. "security": [],
  9829. "responses": {
  9830. "200": {
  9831. "description": "Success",
  9832. "content": {
  9833. "application/json": {
  9834. "schema": {
  9835. "type": "object",
  9836. "properties": {
  9837. "healthy": {
  9838. "type": "boolean",
  9839. "enum": [true]
  9840. }
  9841. },
  9842. "required": ["healthy"],
  9843. "additionalProperties": false
  9844. }
  9845. }
  9846. }
  9847. },
  9848. "400": {
  9849. "description": "InvalidRequestError",
  9850. "content": {
  9851. "application/json": {
  9852. "schema": {
  9853. "$ref": "#/components/schemas/InvalidRequestError"
  9854. }
  9855. }
  9856. }
  9857. },
  9858. "401": {
  9859. "description": "UnauthorizedError",
  9860. "content": {
  9861. "application/json": {
  9862. "schema": {
  9863. "$ref": "#/components/schemas/UnauthorizedError"
  9864. }
  9865. }
  9866. }
  9867. }
  9868. },
  9869. "description": "Check whether the API server is ready to accept requests.",
  9870. "summary": "Check server health",
  9871. "x-codeSamples": [
  9872. {
  9873. "lang": "js",
  9874. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.health.get({\n ...\n})"
  9875. }
  9876. ]
  9877. }
  9878. },
  9879. "/api/location": {
  9880. "get": {
  9881. "tags": ["opencode HttpApi"],
  9882. "operationId": "v2.location.get",
  9883. "parameters": [
  9884. {
  9885. "name": "location",
  9886. "in": "query",
  9887. "schema": {
  9888. "type": "object",
  9889. "properties": {
  9890. "directory": {
  9891. "type": "string"
  9892. },
  9893. "workspace": {
  9894. "type": "string"
  9895. }
  9896. },
  9897. "additionalProperties": false
  9898. },
  9899. "required": false,
  9900. "style": "deepObject",
  9901. "explode": true
  9902. }
  9903. ],
  9904. "security": [],
  9905. "responses": {
  9906. "200": {
  9907. "description": "Location.Info",
  9908. "content": {
  9909. "application/json": {
  9910. "schema": {
  9911. "$ref": "#/components/schemas/LocationInfo"
  9912. }
  9913. }
  9914. }
  9915. },
  9916. "400": {
  9917. "description": "InvalidRequestError",
  9918. "content": {
  9919. "application/json": {
  9920. "schema": {
  9921. "$ref": "#/components/schemas/InvalidRequestError"
  9922. }
  9923. }
  9924. }
  9925. },
  9926. "401": {
  9927. "description": "UnauthorizedError",
  9928. "content": {
  9929. "application/json": {
  9930. "schema": {
  9931. "$ref": "#/components/schemas/UnauthorizedError"
  9932. }
  9933. }
  9934. }
  9935. }
  9936. },
  9937. "description": "Resolve the requested location or the server default location.",
  9938. "summary": "Get location",
  9939. "x-codeSamples": [
  9940. {
  9941. "lang": "js",
  9942. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.location.get({\n ...\n})"
  9943. }
  9944. ]
  9945. }
  9946. },
  9947. "/api/agent": {
  9948. "get": {
  9949. "tags": ["opencode HttpApi"],
  9950. "operationId": "v2.agent.list",
  9951. "parameters": [
  9952. {
  9953. "name": "location",
  9954. "in": "query",
  9955. "schema": {
  9956. "type": "object",
  9957. "properties": {
  9958. "directory": {
  9959. "type": "string"
  9960. },
  9961. "workspace": {
  9962. "type": "string"
  9963. }
  9964. },
  9965. "additionalProperties": false
  9966. },
  9967. "required": false,
  9968. "style": "deepObject",
  9969. "explode": true
  9970. }
  9971. ],
  9972. "security": [],
  9973. "responses": {
  9974. "200": {
  9975. "description": "Success",
  9976. "content": {
  9977. "application/json": {
  9978. "schema": {
  9979. "type": "object",
  9980. "properties": {
  9981. "location": {
  9982. "$ref": "#/components/schemas/LocationInfo"
  9983. },
  9984. "data": {
  9985. "type": "array",
  9986. "items": {
  9987. "$ref": "#/components/schemas/AgentV2Info"
  9988. }
  9989. }
  9990. },
  9991. "required": ["location", "data"],
  9992. "additionalProperties": false
  9993. }
  9994. }
  9995. }
  9996. },
  9997. "400": {
  9998. "description": "InvalidRequestError",
  9999. "content": {
  10000. "application/json": {
  10001. "schema": {
  10002. "$ref": "#/components/schemas/InvalidRequestError"
  10003. }
  10004. }
  10005. }
  10006. },
  10007. "401": {
  10008. "description": "UnauthorizedError",
  10009. "content": {
  10010. "application/json": {
  10011. "schema": {
  10012. "$ref": "#/components/schemas/UnauthorizedError"
  10013. }
  10014. }
  10015. }
  10016. }
  10017. },
  10018. "description": "Retrieve currently registered agents.",
  10019. "summary": "List agents",
  10020. "x-codeSamples": [
  10021. {
  10022. "lang": "js",
  10023. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.agent.list({\n ...\n})"
  10024. }
  10025. ]
  10026. }
  10027. },
  10028. "/api/session": {
  10029. "get": {
  10030. "tags": ["sessions"],
  10031. "operationId": "v2.session.list",
  10032. "parameters": [
  10033. {
  10034. "name": "workspace",
  10035. "in": "query",
  10036. "schema": {
  10037. "type": "string",
  10038. "pattern": "^wrk"
  10039. },
  10040. "required": false
  10041. },
  10042. {
  10043. "name": "limit",
  10044. "in": "query",
  10045. "schema": {
  10046. "type": "number"
  10047. },
  10048. "required": false
  10049. },
  10050. {
  10051. "name": "order",
  10052. "in": "query",
  10053. "schema": {
  10054. "type": "string",
  10055. "enum": ["asc", "desc"]
  10056. },
  10057. "required": false
  10058. },
  10059. {
  10060. "name": "search",
  10061. "in": "query",
  10062. "schema": {
  10063. "type": "string"
  10064. },
  10065. "required": false
  10066. },
  10067. {
  10068. "name": "directory",
  10069. "in": "query",
  10070. "schema": {
  10071. "type": "string"
  10072. },
  10073. "required": false
  10074. },
  10075. {
  10076. "name": "project",
  10077. "in": "query",
  10078. "schema": {
  10079. "type": "string"
  10080. },
  10081. "required": false
  10082. },
  10083. {
  10084. "name": "subpath",
  10085. "in": "query",
  10086. "schema": {
  10087. "type": "string"
  10088. },
  10089. "required": false
  10090. },
  10091. {
  10092. "name": "cursor",
  10093. "in": "query",
  10094. "schema": {
  10095. "type": "string",
  10096. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response."
  10097. },
  10098. "required": false
  10099. }
  10100. ],
  10101. "security": [],
  10102. "responses": {
  10103. "200": {
  10104. "description": "SessionsResponse",
  10105. "content": {
  10106. "application/json": {
  10107. "schema": {
  10108. "$ref": "#/components/schemas/SessionsResponse"
  10109. }
  10110. }
  10111. }
  10112. },
  10113. "400": {
  10114. "description": "InvalidCursorError | InvalidRequestError",
  10115. "content": {
  10116. "application/json": {
  10117. "schema": {
  10118. "anyOf": [
  10119. {
  10120. "$ref": "#/components/schemas/InvalidCursorError"
  10121. },
  10122. {
  10123. "$ref": "#/components/schemas/InvalidRequestError"
  10124. },
  10125. {
  10126. "$ref": "#/components/schemas/InvalidRequestError"
  10127. }
  10128. ]
  10129. }
  10130. }
  10131. }
  10132. },
  10133. "401": {
  10134. "description": "UnauthorizedError",
  10135. "content": {
  10136. "application/json": {
  10137. "schema": {
  10138. "$ref": "#/components/schemas/UnauthorizedError"
  10139. }
  10140. }
  10141. }
  10142. }
  10143. },
  10144. "description": "Retrieve sessions in the requested order. Items keep that order across pages; use cursor.next or cursor.previous to move through the ordered list.",
  10145. "summary": "List sessions",
  10146. "x-codeSamples": [
  10147. {
  10148. "lang": "js",
  10149. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  10150. }
  10151. ]
  10152. },
  10153. "post": {
  10154. "tags": ["sessions"],
  10155. "operationId": "v2.session.create",
  10156. "parameters": [],
  10157. "security": [],
  10158. "responses": {
  10159. "200": {
  10160. "description": "Success",
  10161. "content": {
  10162. "application/json": {
  10163. "schema": {
  10164. "type": "object",
  10165. "properties": {
  10166. "data": {
  10167. "$ref": "#/components/schemas/SessionV2Info"
  10168. }
  10169. },
  10170. "required": ["data"],
  10171. "additionalProperties": false
  10172. }
  10173. }
  10174. }
  10175. },
  10176. "400": {
  10177. "description": "InvalidRequestError",
  10178. "content": {
  10179. "application/json": {
  10180. "schema": {
  10181. "$ref": "#/components/schemas/InvalidRequestError"
  10182. }
  10183. }
  10184. }
  10185. },
  10186. "401": {
  10187. "description": "UnauthorizedError",
  10188. "content": {
  10189. "application/json": {
  10190. "schema": {
  10191. "$ref": "#/components/schemas/UnauthorizedError"
  10192. }
  10193. }
  10194. }
  10195. }
  10196. },
  10197. "description": "Create a session at the requested location.",
  10198. "summary": "Create session",
  10199. "requestBody": {
  10200. "content": {
  10201. "application/json": {
  10202. "schema": {
  10203. "type": "object",
  10204. "properties": {
  10205. "id": {
  10206. "type": "string",
  10207. "pattern": "^ses"
  10208. },
  10209. "agent": {
  10210. "type": "string"
  10211. },
  10212. "model": {
  10213. "type": "object",
  10214. "properties": {
  10215. "id": {
  10216. "type": "string"
  10217. },
  10218. "providerID": {
  10219. "type": "string"
  10220. },
  10221. "variant": {
  10222. "type": "string"
  10223. }
  10224. },
  10225. "required": ["id", "providerID"],
  10226. "additionalProperties": false
  10227. },
  10228. "location": {
  10229. "$ref": "#/components/schemas/LocationRef"
  10230. }
  10231. },
  10232. "additionalProperties": false
  10233. }
  10234. }
  10235. },
  10236. "required": true
  10237. },
  10238. "x-codeSamples": [
  10239. {
  10240. "lang": "js",
  10241. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.create({\n ...\n})"
  10242. }
  10243. ]
  10244. }
  10245. },
  10246. "/api/session/{sessionID}": {
  10247. "get": {
  10248. "tags": ["sessions"],
  10249. "operationId": "v2.session.get",
  10250. "parameters": [
  10251. {
  10252. "name": "sessionID",
  10253. "in": "path",
  10254. "schema": {
  10255. "type": "string",
  10256. "pattern": "^ses"
  10257. },
  10258. "required": true
  10259. }
  10260. ],
  10261. "security": [],
  10262. "responses": {
  10263. "200": {
  10264. "description": "Success",
  10265. "content": {
  10266. "application/json": {
  10267. "schema": {
  10268. "type": "object",
  10269. "properties": {
  10270. "data": {
  10271. "$ref": "#/components/schemas/SessionV2Info"
  10272. }
  10273. },
  10274. "required": ["data"],
  10275. "additionalProperties": false
  10276. }
  10277. }
  10278. }
  10279. },
  10280. "400": {
  10281. "description": "InvalidRequestError",
  10282. "content": {
  10283. "application/json": {
  10284. "schema": {
  10285. "$ref": "#/components/schemas/InvalidRequestError"
  10286. }
  10287. }
  10288. }
  10289. },
  10290. "401": {
  10291. "description": "UnauthorizedError",
  10292. "content": {
  10293. "application/json": {
  10294. "schema": {
  10295. "$ref": "#/components/schemas/UnauthorizedError"
  10296. }
  10297. }
  10298. }
  10299. },
  10300. "404": {
  10301. "description": "SessionNotFoundError",
  10302. "content": {
  10303. "application/json": {
  10304. "schema": {
  10305. "anyOf": [
  10306. {
  10307. "$ref": "#/components/schemas/SessionNotFoundError"
  10308. },
  10309. {
  10310. "$ref": "#/components/schemas/SessionNotFoundError"
  10311. }
  10312. ]
  10313. }
  10314. }
  10315. }
  10316. }
  10317. },
  10318. "description": "Retrieve a session by ID.",
  10319. "summary": "Get session",
  10320. "x-codeSamples": [
  10321. {
  10322. "lang": "js",
  10323. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.get({\n ...\n})"
  10324. }
  10325. ]
  10326. }
  10327. },
  10328. "/api/session/{sessionID}/agent": {
  10329. "post": {
  10330. "tags": ["sessions"],
  10331. "operationId": "v2.session.switchAgent",
  10332. "parameters": [
  10333. {
  10334. "name": "sessionID",
  10335. "in": "path",
  10336. "schema": {
  10337. "type": "string",
  10338. "pattern": "^ses"
  10339. },
  10340. "required": true
  10341. }
  10342. ],
  10343. "security": [],
  10344. "responses": {
  10345. "204": {
  10346. "description": "<No Content>"
  10347. },
  10348. "400": {
  10349. "description": "InvalidRequestError",
  10350. "content": {
  10351. "application/json": {
  10352. "schema": {
  10353. "$ref": "#/components/schemas/InvalidRequestError"
  10354. }
  10355. }
  10356. }
  10357. },
  10358. "401": {
  10359. "description": "UnauthorizedError",
  10360. "content": {
  10361. "application/json": {
  10362. "schema": {
  10363. "$ref": "#/components/schemas/UnauthorizedError"
  10364. }
  10365. }
  10366. }
  10367. },
  10368. "404": {
  10369. "description": "SessionNotFoundError",
  10370. "content": {
  10371. "application/json": {
  10372. "schema": {
  10373. "anyOf": [
  10374. {
  10375. "$ref": "#/components/schemas/SessionNotFoundError"
  10376. },
  10377. {
  10378. "$ref": "#/components/schemas/SessionNotFoundError"
  10379. }
  10380. ]
  10381. }
  10382. }
  10383. }
  10384. }
  10385. },
  10386. "description": "Switch the agent used by subsequent provider turns.",
  10387. "summary": "Switch session agent",
  10388. "requestBody": {
  10389. "content": {
  10390. "application/json": {
  10391. "schema": {
  10392. "type": "object",
  10393. "properties": {
  10394. "agent": {
  10395. "type": "string"
  10396. }
  10397. },
  10398. "required": ["agent"],
  10399. "additionalProperties": false
  10400. }
  10401. }
  10402. },
  10403. "required": true
  10404. },
  10405. "x-codeSamples": [
  10406. {
  10407. "lang": "js",
  10408. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.switchAgent({\n ...\n})"
  10409. }
  10410. ]
  10411. }
  10412. },
  10413. "/api/session/{sessionID}/model": {
  10414. "post": {
  10415. "tags": ["sessions"],
  10416. "operationId": "v2.session.switchModel",
  10417. "parameters": [
  10418. {
  10419. "name": "sessionID",
  10420. "in": "path",
  10421. "schema": {
  10422. "type": "string",
  10423. "pattern": "^ses"
  10424. },
  10425. "required": true
  10426. }
  10427. ],
  10428. "security": [],
  10429. "responses": {
  10430. "204": {
  10431. "description": "<No Content>"
  10432. },
  10433. "400": {
  10434. "description": "InvalidRequestError",
  10435. "content": {
  10436. "application/json": {
  10437. "schema": {
  10438. "$ref": "#/components/schemas/InvalidRequestError"
  10439. }
  10440. }
  10441. }
  10442. },
  10443. "401": {
  10444. "description": "UnauthorizedError",
  10445. "content": {
  10446. "application/json": {
  10447. "schema": {
  10448. "$ref": "#/components/schemas/UnauthorizedError"
  10449. }
  10450. }
  10451. }
  10452. },
  10453. "404": {
  10454. "description": "SessionNotFoundError",
  10455. "content": {
  10456. "application/json": {
  10457. "schema": {
  10458. "anyOf": [
  10459. {
  10460. "$ref": "#/components/schemas/SessionNotFoundError"
  10461. },
  10462. {
  10463. "$ref": "#/components/schemas/SessionNotFoundError"
  10464. }
  10465. ]
  10466. }
  10467. }
  10468. }
  10469. }
  10470. },
  10471. "description": "Switch the model used by subsequent provider turns.",
  10472. "summary": "Switch session model",
  10473. "requestBody": {
  10474. "content": {
  10475. "application/json": {
  10476. "schema": {
  10477. "type": "object",
  10478. "properties": {
  10479. "model": {
  10480. "type": "object",
  10481. "properties": {
  10482. "id": {
  10483. "type": "string"
  10484. },
  10485. "providerID": {
  10486. "type": "string"
  10487. },
  10488. "variant": {
  10489. "type": "string"
  10490. }
  10491. },
  10492. "required": ["id", "providerID"],
  10493. "additionalProperties": false
  10494. }
  10495. },
  10496. "required": ["model"],
  10497. "additionalProperties": false
  10498. }
  10499. }
  10500. },
  10501. "required": true
  10502. },
  10503. "x-codeSamples": [
  10504. {
  10505. "lang": "js",
  10506. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.switchModel({\n ...\n})"
  10507. }
  10508. ]
  10509. }
  10510. },
  10511. "/api/session/{sessionID}/prompt": {
  10512. "post": {
  10513. "tags": ["sessions"],
  10514. "operationId": "v2.session.prompt",
  10515. "parameters": [
  10516. {
  10517. "name": "sessionID",
  10518. "in": "path",
  10519. "schema": {
  10520. "type": "string",
  10521. "pattern": "^ses"
  10522. },
  10523. "required": true
  10524. }
  10525. ],
  10526. "security": [],
  10527. "responses": {
  10528. "200": {
  10529. "description": "Success",
  10530. "content": {
  10531. "application/json": {
  10532. "schema": {
  10533. "type": "object",
  10534. "properties": {
  10535. "data": {
  10536. "$ref": "#/components/schemas/SessionInputAdmitted"
  10537. }
  10538. },
  10539. "required": ["data"],
  10540. "additionalProperties": false
  10541. }
  10542. }
  10543. }
  10544. },
  10545. "400": {
  10546. "description": "InvalidRequestError",
  10547. "content": {
  10548. "application/json": {
  10549. "schema": {
  10550. "$ref": "#/components/schemas/InvalidRequestError"
  10551. }
  10552. }
  10553. }
  10554. },
  10555. "401": {
  10556. "description": "UnauthorizedError",
  10557. "content": {
  10558. "application/json": {
  10559. "schema": {
  10560. "$ref": "#/components/schemas/UnauthorizedError"
  10561. }
  10562. }
  10563. }
  10564. },
  10565. "404": {
  10566. "description": "SessionNotFoundError",
  10567. "content": {
  10568. "application/json": {
  10569. "schema": {
  10570. "anyOf": [
  10571. {
  10572. "$ref": "#/components/schemas/SessionNotFoundError"
  10573. },
  10574. {
  10575. "$ref": "#/components/schemas/SessionNotFoundError"
  10576. }
  10577. ]
  10578. }
  10579. }
  10580. }
  10581. },
  10582. "409": {
  10583. "description": "ConflictError",
  10584. "content": {
  10585. "application/json": {
  10586. "schema": {
  10587. "$ref": "#/components/schemas/ConflictError"
  10588. }
  10589. }
  10590. }
  10591. }
  10592. },
  10593. "description": "Durably admit one session input and schedule agent-loop execution unless resume is false.",
  10594. "summary": "Send message",
  10595. "requestBody": {
  10596. "content": {
  10597. "application/json": {
  10598. "schema": {
  10599. "type": "object",
  10600. "properties": {
  10601. "id": {
  10602. "type": "string",
  10603. "pattern": "^msg_"
  10604. },
  10605. "prompt": {
  10606. "$ref": "#/components/schemas/Prompt"
  10607. },
  10608. "delivery": {
  10609. "type": "string",
  10610. "enum": ["steer", "queue"]
  10611. },
  10612. "resume": {
  10613. "type": "boolean"
  10614. }
  10615. },
  10616. "required": ["prompt"],
  10617. "additionalProperties": false
  10618. }
  10619. }
  10620. },
  10621. "required": true
  10622. },
  10623. "x-codeSamples": [
  10624. {
  10625. "lang": "js",
  10626. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  10627. }
  10628. ]
  10629. }
  10630. },
  10631. "/api/session/{sessionID}/compact": {
  10632. "post": {
  10633. "tags": ["sessions"],
  10634. "operationId": "v2.session.compact",
  10635. "parameters": [
  10636. {
  10637. "name": "sessionID",
  10638. "in": "path",
  10639. "schema": {
  10640. "type": "string",
  10641. "pattern": "^ses"
  10642. },
  10643. "required": true
  10644. }
  10645. ],
  10646. "security": [],
  10647. "responses": {
  10648. "204": {
  10649. "description": "<No Content>"
  10650. },
  10651. "400": {
  10652. "description": "InvalidRequestError",
  10653. "content": {
  10654. "application/json": {
  10655. "schema": {
  10656. "$ref": "#/components/schemas/InvalidRequestError"
  10657. }
  10658. }
  10659. }
  10660. },
  10661. "401": {
  10662. "description": "UnauthorizedError",
  10663. "content": {
  10664. "application/json": {
  10665. "schema": {
  10666. "$ref": "#/components/schemas/UnauthorizedError"
  10667. }
  10668. }
  10669. }
  10670. },
  10671. "404": {
  10672. "description": "SessionNotFoundError",
  10673. "content": {
  10674. "application/json": {
  10675. "schema": {
  10676. "anyOf": [
  10677. {
  10678. "$ref": "#/components/schemas/SessionNotFoundError"
  10679. },
  10680. {
  10681. "$ref": "#/components/schemas/SessionNotFoundError"
  10682. }
  10683. ]
  10684. }
  10685. }
  10686. }
  10687. },
  10688. "503": {
  10689. "description": "ServiceUnavailableError",
  10690. "content": {
  10691. "application/json": {
  10692. "schema": {
  10693. "$ref": "#/components/schemas/ServiceUnavailableError"
  10694. }
  10695. }
  10696. }
  10697. }
  10698. },
  10699. "description": "Compact a session conversation.",
  10700. "summary": "Compact session",
  10701. "x-codeSamples": [
  10702. {
  10703. "lang": "js",
  10704. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  10705. }
  10706. ]
  10707. }
  10708. },
  10709. "/api/session/{sessionID}/wait": {
  10710. "post": {
  10711. "tags": ["sessions"],
  10712. "operationId": "v2.session.wait",
  10713. "parameters": [
  10714. {
  10715. "name": "sessionID",
  10716. "in": "path",
  10717. "schema": {
  10718. "type": "string",
  10719. "pattern": "^ses"
  10720. },
  10721. "required": true
  10722. }
  10723. ],
  10724. "security": [],
  10725. "responses": {
  10726. "204": {
  10727. "description": "<No Content>"
  10728. },
  10729. "400": {
  10730. "description": "InvalidRequestError",
  10731. "content": {
  10732. "application/json": {
  10733. "schema": {
  10734. "$ref": "#/components/schemas/InvalidRequestError"
  10735. }
  10736. }
  10737. }
  10738. },
  10739. "401": {
  10740. "description": "UnauthorizedError",
  10741. "content": {
  10742. "application/json": {
  10743. "schema": {
  10744. "$ref": "#/components/schemas/UnauthorizedError"
  10745. }
  10746. }
  10747. }
  10748. },
  10749. "404": {
  10750. "description": "SessionNotFoundError",
  10751. "content": {
  10752. "application/json": {
  10753. "schema": {
  10754. "anyOf": [
  10755. {
  10756. "$ref": "#/components/schemas/SessionNotFoundError"
  10757. },
  10758. {
  10759. "$ref": "#/components/schemas/SessionNotFoundError"
  10760. }
  10761. ]
  10762. }
  10763. }
  10764. }
  10765. },
  10766. "503": {
  10767. "description": "ServiceUnavailableError",
  10768. "content": {
  10769. "application/json": {
  10770. "schema": {
  10771. "$ref": "#/components/schemas/ServiceUnavailableError"
  10772. }
  10773. }
  10774. }
  10775. }
  10776. },
  10777. "description": "Wait for a session agent loop to become idle.",
  10778. "summary": "Wait for session",
  10779. "x-codeSamples": [
  10780. {
  10781. "lang": "js",
  10782. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  10783. }
  10784. ]
  10785. }
  10786. },
  10787. "/api/session/{sessionID}/context": {
  10788. "get": {
  10789. "tags": ["sessions"],
  10790. "operationId": "v2.session.context",
  10791. "parameters": [
  10792. {
  10793. "name": "sessionID",
  10794. "in": "path",
  10795. "schema": {
  10796. "type": "string",
  10797. "pattern": "^ses"
  10798. },
  10799. "required": true
  10800. }
  10801. ],
  10802. "security": [],
  10803. "responses": {
  10804. "200": {
  10805. "description": "Success",
  10806. "content": {
  10807. "application/json": {
  10808. "schema": {
  10809. "type": "object",
  10810. "properties": {
  10811. "data": {
  10812. "type": "array",
  10813. "items": {
  10814. "$ref": "#/components/schemas/SessionMessage"
  10815. }
  10816. }
  10817. },
  10818. "required": ["data"],
  10819. "additionalProperties": false
  10820. }
  10821. }
  10822. }
  10823. },
  10824. "400": {
  10825. "description": "InvalidRequestError",
  10826. "content": {
  10827. "application/json": {
  10828. "schema": {
  10829. "$ref": "#/components/schemas/InvalidRequestError"
  10830. }
  10831. }
  10832. }
  10833. },
  10834. "401": {
  10835. "description": "UnauthorizedError",
  10836. "content": {
  10837. "application/json": {
  10838. "schema": {
  10839. "$ref": "#/components/schemas/UnauthorizedError"
  10840. }
  10841. }
  10842. }
  10843. },
  10844. "404": {
  10845. "description": "SessionNotFoundError",
  10846. "content": {
  10847. "application/json": {
  10848. "schema": {
  10849. "anyOf": [
  10850. {
  10851. "$ref": "#/components/schemas/SessionNotFoundError"
  10852. },
  10853. {
  10854. "$ref": "#/components/schemas/SessionNotFoundError"
  10855. }
  10856. ]
  10857. }
  10858. }
  10859. }
  10860. },
  10861. "500": {
  10862. "description": "UnknownError",
  10863. "content": {
  10864. "application/json": {
  10865. "schema": {
  10866. "$ref": "#/components/schemas/UnknownError1"
  10867. }
  10868. }
  10869. }
  10870. }
  10871. },
  10872. "description": "Retrieve the active context messages for a session (all messages after the last compaction).",
  10873. "summary": "Get session context",
  10874. "x-codeSamples": [
  10875. {
  10876. "lang": "js",
  10877. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  10878. }
  10879. ]
  10880. }
  10881. },
  10882. "/api/session/{sessionID}/message": {
  10883. "get": {
  10884. "tags": ["messages"],
  10885. "operationId": "v2.session.messages",
  10886. "parameters": [
  10887. {
  10888. "name": "sessionID",
  10889. "in": "path",
  10890. "schema": {
  10891. "type": "string",
  10892. "pattern": "^ses"
  10893. },
  10894. "required": true
  10895. },
  10896. {
  10897. "name": "limit",
  10898. "in": "query",
  10899. "schema": {
  10900. "type": "number"
  10901. },
  10902. "required": false
  10903. },
  10904. {
  10905. "name": "order",
  10906. "in": "query",
  10907. "schema": {
  10908. "type": "string",
  10909. "enum": ["asc", "desc"]
  10910. },
  10911. "required": false
  10912. },
  10913. {
  10914. "name": "cursor",
  10915. "in": "query",
  10916. "schema": {
  10917. "type": "string",
  10918. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."
  10919. },
  10920. "required": false
  10921. }
  10922. ],
  10923. "security": [],
  10924. "responses": {
  10925. "200": {
  10926. "description": "SessionMessagesResponse",
  10927. "content": {
  10928. "application/json": {
  10929. "schema": {
  10930. "$ref": "#/components/schemas/SessionMessagesResponse"
  10931. }
  10932. }
  10933. }
  10934. },
  10935. "400": {
  10936. "description": "InvalidCursorError | InvalidRequestError",
  10937. "content": {
  10938. "application/json": {
  10939. "schema": {
  10940. "anyOf": [
  10941. {
  10942. "$ref": "#/components/schemas/InvalidCursorError"
  10943. },
  10944. {
  10945. "$ref": "#/components/schemas/InvalidRequestError"
  10946. }
  10947. ]
  10948. }
  10949. }
  10950. }
  10951. },
  10952. "401": {
  10953. "description": "UnauthorizedError",
  10954. "content": {
  10955. "application/json": {
  10956. "schema": {
  10957. "$ref": "#/components/schemas/UnauthorizedError"
  10958. }
  10959. }
  10960. }
  10961. },
  10962. "404": {
  10963. "description": "SessionNotFoundError",
  10964. "content": {
  10965. "application/json": {
  10966. "schema": {
  10967. "anyOf": [
  10968. {
  10969. "$ref": "#/components/schemas/SessionNotFoundError"
  10970. },
  10971. {
  10972. "$ref": "#/components/schemas/SessionNotFoundError"
  10973. }
  10974. ]
  10975. }
  10976. }
  10977. }
  10978. },
  10979. "500": {
  10980. "description": "UnknownError",
  10981. "content": {
  10982. "application/json": {
  10983. "schema": {
  10984. "$ref": "#/components/schemas/UnknownError1"
  10985. }
  10986. }
  10987. }
  10988. }
  10989. },
  10990. "description": "Retrieve projected messages for a session. Items keep the requested order across pages; use cursor.next or cursor.previous to move through the ordered timeline.",
  10991. "summary": "Get session messages",
  10992. "x-codeSamples": [
  10993. {
  10994. "lang": "js",
  10995. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  10996. }
  10997. ]
  10998. }
  10999. },
  11000. "/api/model": {
  11001. "get": {
  11002. "tags": ["models"],
  11003. "operationId": "v2.model.list",
  11004. "parameters": [
  11005. {
  11006. "name": "location",
  11007. "in": "query",
  11008. "schema": {
  11009. "type": "object",
  11010. "properties": {
  11011. "directory": {
  11012. "type": "string"
  11013. },
  11014. "workspace": {
  11015. "type": "string"
  11016. }
  11017. },
  11018. "additionalProperties": false
  11019. },
  11020. "required": false,
  11021. "style": "deepObject",
  11022. "explode": true
  11023. }
  11024. ],
  11025. "security": [],
  11026. "responses": {
  11027. "200": {
  11028. "description": "Success",
  11029. "content": {
  11030. "application/json": {
  11031. "schema": {
  11032. "type": "object",
  11033. "properties": {
  11034. "location": {
  11035. "$ref": "#/components/schemas/LocationInfo"
  11036. },
  11037. "data": {
  11038. "type": "array",
  11039. "items": {
  11040. "$ref": "#/components/schemas/ModelV2Info"
  11041. }
  11042. }
  11043. },
  11044. "required": ["location", "data"],
  11045. "additionalProperties": false
  11046. }
  11047. }
  11048. }
  11049. },
  11050. "400": {
  11051. "description": "InvalidRequestError",
  11052. "content": {
  11053. "application/json": {
  11054. "schema": {
  11055. "$ref": "#/components/schemas/InvalidRequestError"
  11056. }
  11057. }
  11058. }
  11059. },
  11060. "401": {
  11061. "description": "UnauthorizedError",
  11062. "content": {
  11063. "application/json": {
  11064. "schema": {
  11065. "$ref": "#/components/schemas/UnauthorizedError"
  11066. }
  11067. }
  11068. }
  11069. },
  11070. "503": {
  11071. "description": "ServiceUnavailableError",
  11072. "content": {
  11073. "application/json": {
  11074. "schema": {
  11075. "$ref": "#/components/schemas/ServiceUnavailableError"
  11076. }
  11077. }
  11078. }
  11079. }
  11080. },
  11081. "description": "Retrieve available models ordered by release date.",
  11082. "summary": "List models",
  11083. "x-codeSamples": [
  11084. {
  11085. "lang": "js",
  11086. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.model.list({\n ...\n})"
  11087. }
  11088. ]
  11089. }
  11090. },
  11091. "/api/provider": {
  11092. "get": {
  11093. "tags": ["providers"],
  11094. "operationId": "v2.provider.list",
  11095. "parameters": [
  11096. {
  11097. "name": "location",
  11098. "in": "query",
  11099. "schema": {
  11100. "type": "object",
  11101. "properties": {
  11102. "directory": {
  11103. "type": "string"
  11104. },
  11105. "workspace": {
  11106. "type": "string"
  11107. }
  11108. },
  11109. "additionalProperties": false
  11110. },
  11111. "required": false,
  11112. "style": "deepObject",
  11113. "explode": true
  11114. }
  11115. ],
  11116. "security": [],
  11117. "responses": {
  11118. "200": {
  11119. "description": "Success",
  11120. "content": {
  11121. "application/json": {
  11122. "schema": {
  11123. "type": "object",
  11124. "properties": {
  11125. "location": {
  11126. "$ref": "#/components/schemas/LocationInfo"
  11127. },
  11128. "data": {
  11129. "type": "array",
  11130. "items": {
  11131. "$ref": "#/components/schemas/ProviderV2Info"
  11132. }
  11133. }
  11134. },
  11135. "required": ["location", "data"],
  11136. "additionalProperties": false
  11137. }
  11138. }
  11139. }
  11140. },
  11141. "400": {
  11142. "description": "InvalidRequestError",
  11143. "content": {
  11144. "application/json": {
  11145. "schema": {
  11146. "$ref": "#/components/schemas/InvalidRequestError"
  11147. }
  11148. }
  11149. }
  11150. },
  11151. "401": {
  11152. "description": "UnauthorizedError",
  11153. "content": {
  11154. "application/json": {
  11155. "schema": {
  11156. "$ref": "#/components/schemas/UnauthorizedError"
  11157. }
  11158. }
  11159. }
  11160. },
  11161. "503": {
  11162. "description": "ServiceUnavailableError",
  11163. "content": {
  11164. "application/json": {
  11165. "schema": {
  11166. "$ref": "#/components/schemas/ServiceUnavailableError"
  11167. }
  11168. }
  11169. }
  11170. }
  11171. },
  11172. "description": "Retrieve active AI providers so clients can show provider availability and configuration.",
  11173. "summary": "List providers",
  11174. "x-codeSamples": [
  11175. {
  11176. "lang": "js",
  11177. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.list({\n ...\n})"
  11178. }
  11179. ]
  11180. }
  11181. },
  11182. "/api/provider/{providerID}": {
  11183. "get": {
  11184. "tags": ["providers"],
  11185. "operationId": "v2.provider.get",
  11186. "parameters": [
  11187. {
  11188. "name": "providerID",
  11189. "in": "path",
  11190. "schema": {
  11191. "type": "string"
  11192. },
  11193. "required": true
  11194. },
  11195. {
  11196. "name": "location",
  11197. "in": "query",
  11198. "schema": {
  11199. "type": "object",
  11200. "properties": {
  11201. "directory": {
  11202. "type": "string"
  11203. },
  11204. "workspace": {
  11205. "type": "string"
  11206. }
  11207. },
  11208. "additionalProperties": false
  11209. },
  11210. "required": false,
  11211. "style": "deepObject",
  11212. "explode": true
  11213. }
  11214. ],
  11215. "security": [],
  11216. "responses": {
  11217. "200": {
  11218. "description": "Success",
  11219. "content": {
  11220. "application/json": {
  11221. "schema": {
  11222. "type": "object",
  11223. "properties": {
  11224. "location": {
  11225. "$ref": "#/components/schemas/LocationInfo"
  11226. },
  11227. "data": {
  11228. "$ref": "#/components/schemas/ProviderV2Info"
  11229. }
  11230. },
  11231. "required": ["location", "data"],
  11232. "additionalProperties": false
  11233. }
  11234. }
  11235. }
  11236. },
  11237. "400": {
  11238. "description": "InvalidRequestError",
  11239. "content": {
  11240. "application/json": {
  11241. "schema": {
  11242. "$ref": "#/components/schemas/InvalidRequestError"
  11243. }
  11244. }
  11245. }
  11246. },
  11247. "401": {
  11248. "description": "UnauthorizedError",
  11249. "content": {
  11250. "application/json": {
  11251. "schema": {
  11252. "$ref": "#/components/schemas/UnauthorizedError"
  11253. }
  11254. }
  11255. }
  11256. },
  11257. "404": {
  11258. "description": "ProviderNotFoundError",
  11259. "content": {
  11260. "application/json": {
  11261. "schema": {
  11262. "$ref": "#/components/schemas/ProviderNotFoundError"
  11263. }
  11264. }
  11265. }
  11266. },
  11267. "503": {
  11268. "description": "ServiceUnavailableError",
  11269. "content": {
  11270. "application/json": {
  11271. "schema": {
  11272. "$ref": "#/components/schemas/ServiceUnavailableError"
  11273. }
  11274. }
  11275. }
  11276. }
  11277. },
  11278. "description": "Retrieve a single AI provider so clients can inspect its availability and endpoint settings.",
  11279. "summary": "Get provider",
  11280. "x-codeSamples": [
  11281. {
  11282. "lang": "js",
  11283. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.get({\n ...\n})"
  11284. }
  11285. ]
  11286. }
  11287. },
  11288. "/api/integration": {
  11289. "get": {
  11290. "tags": ["integrations"],
  11291. "operationId": "v2.integration.list",
  11292. "parameters": [
  11293. {
  11294. "name": "location",
  11295. "in": "query",
  11296. "schema": {
  11297. "type": "object",
  11298. "properties": {
  11299. "directory": {
  11300. "type": "string"
  11301. },
  11302. "workspace": {
  11303. "type": "string"
  11304. }
  11305. },
  11306. "additionalProperties": false
  11307. },
  11308. "required": false,
  11309. "style": "deepObject",
  11310. "explode": true
  11311. }
  11312. ],
  11313. "security": [],
  11314. "responses": {
  11315. "200": {
  11316. "description": "Success",
  11317. "content": {
  11318. "application/json": {
  11319. "schema": {
  11320. "type": "object",
  11321. "properties": {
  11322. "location": {
  11323. "$ref": "#/components/schemas/LocationInfo"
  11324. },
  11325. "data": {
  11326. "type": "array",
  11327. "items": {
  11328. "$ref": "#/components/schemas/IntegrationInfo"
  11329. }
  11330. }
  11331. },
  11332. "required": ["location", "data"],
  11333. "additionalProperties": false
  11334. }
  11335. }
  11336. }
  11337. },
  11338. "400": {
  11339. "description": "InvalidRequestError",
  11340. "content": {
  11341. "application/json": {
  11342. "schema": {
  11343. "$ref": "#/components/schemas/InvalidRequestError"
  11344. }
  11345. }
  11346. }
  11347. },
  11348. "401": {
  11349. "description": "UnauthorizedError",
  11350. "content": {
  11351. "application/json": {
  11352. "schema": {
  11353. "$ref": "#/components/schemas/UnauthorizedError"
  11354. }
  11355. }
  11356. }
  11357. }
  11358. },
  11359. "description": "Retrieve available integrations and their authentication methods.",
  11360. "summary": "List integrations",
  11361. "x-codeSamples": [
  11362. {
  11363. "lang": "js",
  11364. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.list({\n ...\n})"
  11365. }
  11366. ]
  11367. }
  11368. },
  11369. "/api/integration/{integrationID}": {
  11370. "get": {
  11371. "tags": ["integrations"],
  11372. "operationId": "v2.integration.get",
  11373. "parameters": [
  11374. {
  11375. "name": "integrationID",
  11376. "in": "path",
  11377. "schema": {
  11378. "type": "string"
  11379. },
  11380. "required": true
  11381. },
  11382. {
  11383. "name": "location",
  11384. "in": "query",
  11385. "schema": {
  11386. "type": "object",
  11387. "properties": {
  11388. "directory": {
  11389. "type": "string"
  11390. },
  11391. "workspace": {
  11392. "type": "string"
  11393. }
  11394. },
  11395. "additionalProperties": false
  11396. },
  11397. "required": false,
  11398. "style": "deepObject",
  11399. "explode": true
  11400. }
  11401. ],
  11402. "security": [],
  11403. "responses": {
  11404. "200": {
  11405. "description": "Success",
  11406. "content": {
  11407. "application/json": {
  11408. "schema": {
  11409. "type": "object",
  11410. "properties": {
  11411. "location": {
  11412. "$ref": "#/components/schemas/LocationInfo"
  11413. },
  11414. "data": {
  11415. "$ref": "#/components/schemas/IntegrationInfo"
  11416. }
  11417. },
  11418. "required": ["location", "data"],
  11419. "additionalProperties": false
  11420. }
  11421. }
  11422. }
  11423. },
  11424. "400": {
  11425. "description": "InvalidRequestError",
  11426. "content": {
  11427. "application/json": {
  11428. "schema": {
  11429. "$ref": "#/components/schemas/InvalidRequestError"
  11430. }
  11431. }
  11432. }
  11433. },
  11434. "401": {
  11435. "description": "UnauthorizedError",
  11436. "content": {
  11437. "application/json": {
  11438. "schema": {
  11439. "$ref": "#/components/schemas/UnauthorizedError"
  11440. }
  11441. }
  11442. }
  11443. }
  11444. },
  11445. "description": "Retrieve one integration and its authentication methods.",
  11446. "summary": "Get integration",
  11447. "x-codeSamples": [
  11448. {
  11449. "lang": "js",
  11450. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.get({\n ...\n})"
  11451. }
  11452. ]
  11453. }
  11454. },
  11455. "/api/integration/{integrationID}/connect/key": {
  11456. "post": {
  11457. "tags": ["integrations"],
  11458. "operationId": "v2.integration.connect.key",
  11459. "parameters": [
  11460. {
  11461. "name": "integrationID",
  11462. "in": "path",
  11463. "schema": {
  11464. "type": "string"
  11465. },
  11466. "required": true
  11467. },
  11468. {
  11469. "name": "location",
  11470. "in": "query",
  11471. "schema": {
  11472. "type": "object",
  11473. "properties": {
  11474. "directory": {
  11475. "type": "string"
  11476. },
  11477. "workspace": {
  11478. "type": "string"
  11479. }
  11480. },
  11481. "additionalProperties": false
  11482. },
  11483. "required": false,
  11484. "style": "deepObject",
  11485. "explode": true
  11486. }
  11487. ],
  11488. "security": [],
  11489. "responses": {
  11490. "204": {
  11491. "description": "<No Content>"
  11492. },
  11493. "400": {
  11494. "description": "InvalidRequestError",
  11495. "content": {
  11496. "application/json": {
  11497. "schema": {
  11498. "anyOf": [
  11499. {
  11500. "$ref": "#/components/schemas/InvalidRequestError"
  11501. },
  11502. {
  11503. "$ref": "#/components/schemas/InvalidRequestError"
  11504. }
  11505. ]
  11506. }
  11507. }
  11508. }
  11509. },
  11510. "401": {
  11511. "description": "UnauthorizedError",
  11512. "content": {
  11513. "application/json": {
  11514. "schema": {
  11515. "$ref": "#/components/schemas/UnauthorizedError"
  11516. }
  11517. }
  11518. }
  11519. }
  11520. },
  11521. "description": "Run a key authentication method and store the resulting credential.",
  11522. "summary": "Connect with key",
  11523. "requestBody": {
  11524. "content": {
  11525. "application/json": {
  11526. "schema": {
  11527. "type": "object",
  11528. "properties": {
  11529. "key": {
  11530. "type": "string"
  11531. },
  11532. "label": {
  11533. "type": "string"
  11534. }
  11535. },
  11536. "required": ["key"],
  11537. "additionalProperties": false
  11538. }
  11539. }
  11540. },
  11541. "required": true
  11542. },
  11543. "x-codeSamples": [
  11544. {
  11545. "lang": "js",
  11546. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.connect.key({\n ...\n})"
  11547. }
  11548. ]
  11549. }
  11550. },
  11551. "/api/integration/{integrationID}/connect/oauth": {
  11552. "post": {
  11553. "tags": ["integrations"],
  11554. "operationId": "v2.integration.connect.oauth",
  11555. "parameters": [
  11556. {
  11557. "name": "integrationID",
  11558. "in": "path",
  11559. "schema": {
  11560. "type": "string"
  11561. },
  11562. "required": true
  11563. },
  11564. {
  11565. "name": "location",
  11566. "in": "query",
  11567. "schema": {
  11568. "type": "object",
  11569. "properties": {
  11570. "directory": {
  11571. "type": "string"
  11572. },
  11573. "workspace": {
  11574. "type": "string"
  11575. }
  11576. },
  11577. "additionalProperties": false
  11578. },
  11579. "required": false,
  11580. "style": "deepObject",
  11581. "explode": true
  11582. }
  11583. ],
  11584. "security": [],
  11585. "responses": {
  11586. "200": {
  11587. "description": "Success",
  11588. "content": {
  11589. "application/json": {
  11590. "schema": {
  11591. "type": "object",
  11592. "properties": {
  11593. "location": {
  11594. "$ref": "#/components/schemas/LocationInfo"
  11595. },
  11596. "data": {
  11597. "$ref": "#/components/schemas/IntegrationAttempt"
  11598. }
  11599. },
  11600. "required": ["location", "data"],
  11601. "additionalProperties": false
  11602. }
  11603. }
  11604. }
  11605. },
  11606. "400": {
  11607. "description": "InvalidRequestError",
  11608. "content": {
  11609. "application/json": {
  11610. "schema": {
  11611. "anyOf": [
  11612. {
  11613. "$ref": "#/components/schemas/InvalidRequestError"
  11614. },
  11615. {
  11616. "$ref": "#/components/schemas/InvalidRequestError"
  11617. }
  11618. ]
  11619. }
  11620. }
  11621. }
  11622. },
  11623. "401": {
  11624. "description": "UnauthorizedError",
  11625. "content": {
  11626. "application/json": {
  11627. "schema": {
  11628. "$ref": "#/components/schemas/UnauthorizedError"
  11629. }
  11630. }
  11631. }
  11632. }
  11633. },
  11634. "description": "Start an OAuth attempt and return the authorization details.",
  11635. "summary": "Begin OAuth connection",
  11636. "requestBody": {
  11637. "content": {
  11638. "application/json": {
  11639. "schema": {
  11640. "type": "object",
  11641. "properties": {
  11642. "methodID": {
  11643. "type": "string"
  11644. },
  11645. "inputs": {
  11646. "type": "object",
  11647. "additionalProperties": {
  11648. "type": "string"
  11649. }
  11650. },
  11651. "label": {
  11652. "type": "string"
  11653. }
  11654. },
  11655. "required": ["methodID", "inputs"],
  11656. "additionalProperties": false
  11657. }
  11658. }
  11659. },
  11660. "required": true
  11661. },
  11662. "x-codeSamples": [
  11663. {
  11664. "lang": "js",
  11665. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.connect.oauth({\n ...\n})"
  11666. }
  11667. ]
  11668. }
  11669. },
  11670. "/api/integration/attempt/{attemptID}": {
  11671. "get": {
  11672. "tags": ["integrations"],
  11673. "operationId": "v2.integration.attempt.status",
  11674. "parameters": [
  11675. {
  11676. "name": "attemptID",
  11677. "in": "path",
  11678. "schema": {
  11679. "type": "string"
  11680. },
  11681. "required": true
  11682. },
  11683. {
  11684. "name": "location",
  11685. "in": "query",
  11686. "schema": {
  11687. "type": "object",
  11688. "properties": {
  11689. "directory": {
  11690. "type": "string"
  11691. },
  11692. "workspace": {
  11693. "type": "string"
  11694. }
  11695. },
  11696. "additionalProperties": false
  11697. },
  11698. "required": false,
  11699. "style": "deepObject",
  11700. "explode": true
  11701. }
  11702. ],
  11703. "security": [],
  11704. "responses": {
  11705. "200": {
  11706. "description": "Success",
  11707. "content": {
  11708. "application/json": {
  11709. "schema": {
  11710. "type": "object",
  11711. "properties": {
  11712. "location": {
  11713. "$ref": "#/components/schemas/LocationInfo"
  11714. },
  11715. "data": {
  11716. "anyOf": [
  11717. {
  11718. "type": "object",
  11719. "properties": {
  11720. "status": {
  11721. "type": "string",
  11722. "enum": ["pending"]
  11723. },
  11724. "time": {
  11725. "type": "object",
  11726. "properties": {
  11727. "created": {
  11728. "anyOf": [
  11729. {
  11730. "type": "number"
  11731. },
  11732. {
  11733. "type": "string",
  11734. "enum": ["NaN"]
  11735. },
  11736. {
  11737. "type": "string",
  11738. "enum": ["Infinity"]
  11739. },
  11740. {
  11741. "type": "string",
  11742. "enum": ["-Infinity"]
  11743. },
  11744. {
  11745. "type": "string",
  11746. "enum": ["Infinity", "-Infinity", "NaN"]
  11747. }
  11748. ]
  11749. },
  11750. "expires": {
  11751. "anyOf": [
  11752. {
  11753. "type": "number"
  11754. },
  11755. {
  11756. "type": "string",
  11757. "enum": ["NaN"]
  11758. },
  11759. {
  11760. "type": "string",
  11761. "enum": ["Infinity"]
  11762. },
  11763. {
  11764. "type": "string",
  11765. "enum": ["-Infinity"]
  11766. },
  11767. {
  11768. "type": "string",
  11769. "enum": ["Infinity", "-Infinity", "NaN"]
  11770. }
  11771. ]
  11772. }
  11773. },
  11774. "required": ["created", "expires"],
  11775. "additionalProperties": false
  11776. }
  11777. },
  11778. "required": ["status", "time"],
  11779. "additionalProperties": false
  11780. },
  11781. {
  11782. "type": "object",
  11783. "properties": {
  11784. "status": {
  11785. "type": "string",
  11786. "enum": ["complete"]
  11787. },
  11788. "time": {
  11789. "type": "object",
  11790. "properties": {
  11791. "created": {
  11792. "anyOf": [
  11793. {
  11794. "type": "number"
  11795. },
  11796. {
  11797. "type": "string",
  11798. "enum": ["NaN"]
  11799. },
  11800. {
  11801. "type": "string",
  11802. "enum": ["Infinity"]
  11803. },
  11804. {
  11805. "type": "string",
  11806. "enum": ["-Infinity"]
  11807. },
  11808. {
  11809. "type": "string",
  11810. "enum": ["Infinity", "-Infinity", "NaN"]
  11811. }
  11812. ]
  11813. },
  11814. "expires": {
  11815. "anyOf": [
  11816. {
  11817. "type": "number"
  11818. },
  11819. {
  11820. "type": "string",
  11821. "enum": ["NaN"]
  11822. },
  11823. {
  11824. "type": "string",
  11825. "enum": ["Infinity"]
  11826. },
  11827. {
  11828. "type": "string",
  11829. "enum": ["-Infinity"]
  11830. },
  11831. {
  11832. "type": "string",
  11833. "enum": ["Infinity", "-Infinity", "NaN"]
  11834. }
  11835. ]
  11836. }
  11837. },
  11838. "required": ["created", "expires"],
  11839. "additionalProperties": false
  11840. }
  11841. },
  11842. "required": ["status", "time"],
  11843. "additionalProperties": false
  11844. },
  11845. {
  11846. "type": "object",
  11847. "properties": {
  11848. "status": {
  11849. "type": "string",
  11850. "enum": ["failed"]
  11851. },
  11852. "message": {
  11853. "type": "string"
  11854. },
  11855. "time": {
  11856. "type": "object",
  11857. "properties": {
  11858. "created": {
  11859. "anyOf": [
  11860. {
  11861. "type": "number"
  11862. },
  11863. {
  11864. "type": "string",
  11865. "enum": ["NaN"]
  11866. },
  11867. {
  11868. "type": "string",
  11869. "enum": ["Infinity"]
  11870. },
  11871. {
  11872. "type": "string",
  11873. "enum": ["-Infinity"]
  11874. },
  11875. {
  11876. "type": "string",
  11877. "enum": ["Infinity", "-Infinity", "NaN"]
  11878. }
  11879. ]
  11880. },
  11881. "expires": {
  11882. "anyOf": [
  11883. {
  11884. "type": "number"
  11885. },
  11886. {
  11887. "type": "string",
  11888. "enum": ["NaN"]
  11889. },
  11890. {
  11891. "type": "string",
  11892. "enum": ["Infinity"]
  11893. },
  11894. {
  11895. "type": "string",
  11896. "enum": ["-Infinity"]
  11897. },
  11898. {
  11899. "type": "string",
  11900. "enum": ["Infinity", "-Infinity", "NaN"]
  11901. }
  11902. ]
  11903. }
  11904. },
  11905. "required": ["created", "expires"],
  11906. "additionalProperties": false
  11907. }
  11908. },
  11909. "required": ["status", "message", "time"],
  11910. "additionalProperties": false
  11911. },
  11912. {
  11913. "type": "object",
  11914. "properties": {
  11915. "status": {
  11916. "type": "string",
  11917. "enum": ["expired"]
  11918. },
  11919. "time": {
  11920. "type": "object",
  11921. "properties": {
  11922. "created": {
  11923. "anyOf": [
  11924. {
  11925. "type": "number"
  11926. },
  11927. {
  11928. "type": "string",
  11929. "enum": ["NaN"]
  11930. },
  11931. {
  11932. "type": "string",
  11933. "enum": ["Infinity"]
  11934. },
  11935. {
  11936. "type": "string",
  11937. "enum": ["-Infinity"]
  11938. },
  11939. {
  11940. "type": "string",
  11941. "enum": ["Infinity", "-Infinity", "NaN"]
  11942. }
  11943. ]
  11944. },
  11945. "expires": {
  11946. "anyOf": [
  11947. {
  11948. "type": "number"
  11949. },
  11950. {
  11951. "type": "string",
  11952. "enum": ["NaN"]
  11953. },
  11954. {
  11955. "type": "string",
  11956. "enum": ["Infinity"]
  11957. },
  11958. {
  11959. "type": "string",
  11960. "enum": ["-Infinity"]
  11961. },
  11962. {
  11963. "type": "string",
  11964. "enum": ["Infinity", "-Infinity", "NaN"]
  11965. }
  11966. ]
  11967. }
  11968. },
  11969. "required": ["created", "expires"],
  11970. "additionalProperties": false
  11971. }
  11972. },
  11973. "required": ["status", "time"],
  11974. "additionalProperties": false
  11975. }
  11976. ]
  11977. }
  11978. },
  11979. "required": ["location", "data"],
  11980. "additionalProperties": false
  11981. }
  11982. }
  11983. }
  11984. },
  11985. "400": {
  11986. "description": "InvalidRequestError",
  11987. "content": {
  11988. "application/json": {
  11989. "schema": {
  11990. "$ref": "#/components/schemas/InvalidRequestError"
  11991. }
  11992. }
  11993. }
  11994. },
  11995. "401": {
  11996. "description": "UnauthorizedError",
  11997. "content": {
  11998. "application/json": {
  11999. "schema": {
  12000. "$ref": "#/components/schemas/UnauthorizedError"
  12001. }
  12002. }
  12003. }
  12004. }
  12005. },
  12006. "description": "Poll the current status of an OAuth attempt.",
  12007. "summary": "Get OAuth attempt status",
  12008. "x-codeSamples": [
  12009. {
  12010. "lang": "js",
  12011. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.attempt.status({\n ...\n})"
  12012. }
  12013. ]
  12014. },
  12015. "delete": {
  12016. "tags": ["integrations"],
  12017. "operationId": "v2.integration.attempt.cancel",
  12018. "parameters": [
  12019. {
  12020. "name": "attemptID",
  12021. "in": "path",
  12022. "schema": {
  12023. "type": "string"
  12024. },
  12025. "required": true
  12026. },
  12027. {
  12028. "name": "location",
  12029. "in": "query",
  12030. "schema": {
  12031. "type": "object",
  12032. "properties": {
  12033. "directory": {
  12034. "type": "string"
  12035. },
  12036. "workspace": {
  12037. "type": "string"
  12038. }
  12039. },
  12040. "additionalProperties": false
  12041. },
  12042. "required": false,
  12043. "style": "deepObject",
  12044. "explode": true
  12045. }
  12046. ],
  12047. "security": [],
  12048. "responses": {
  12049. "204": {
  12050. "description": "<No Content>"
  12051. },
  12052. "400": {
  12053. "description": "InvalidRequestError",
  12054. "content": {
  12055. "application/json": {
  12056. "schema": {
  12057. "$ref": "#/components/schemas/InvalidRequestError"
  12058. }
  12059. }
  12060. }
  12061. },
  12062. "401": {
  12063. "description": "UnauthorizedError",
  12064. "content": {
  12065. "application/json": {
  12066. "schema": {
  12067. "$ref": "#/components/schemas/UnauthorizedError"
  12068. }
  12069. }
  12070. }
  12071. }
  12072. },
  12073. "description": "Cancel an OAuth attempt and release its resources.",
  12074. "summary": "Cancel OAuth connection",
  12075. "x-codeSamples": [
  12076. {
  12077. "lang": "js",
  12078. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.attempt.cancel({\n ...\n})"
  12079. }
  12080. ]
  12081. }
  12082. },
  12083. "/api/integration/attempt/{attemptID}/complete": {
  12084. "post": {
  12085. "tags": ["integrations"],
  12086. "operationId": "v2.integration.attempt.complete",
  12087. "parameters": [
  12088. {
  12089. "name": "attemptID",
  12090. "in": "path",
  12091. "schema": {
  12092. "type": "string"
  12093. },
  12094. "required": true
  12095. },
  12096. {
  12097. "name": "location",
  12098. "in": "query",
  12099. "schema": {
  12100. "type": "object",
  12101. "properties": {
  12102. "directory": {
  12103. "type": "string"
  12104. },
  12105. "workspace": {
  12106. "type": "string"
  12107. }
  12108. },
  12109. "additionalProperties": false
  12110. },
  12111. "required": false,
  12112. "style": "deepObject",
  12113. "explode": true
  12114. }
  12115. ],
  12116. "security": [],
  12117. "responses": {
  12118. "204": {
  12119. "description": "<No Content>"
  12120. },
  12121. "400": {
  12122. "description": "InvalidRequestError",
  12123. "content": {
  12124. "application/json": {
  12125. "schema": {
  12126. "anyOf": [
  12127. {
  12128. "$ref": "#/components/schemas/InvalidRequestError"
  12129. },
  12130. {
  12131. "$ref": "#/components/schemas/InvalidRequestError"
  12132. }
  12133. ]
  12134. }
  12135. }
  12136. }
  12137. },
  12138. "401": {
  12139. "description": "UnauthorizedError",
  12140. "content": {
  12141. "application/json": {
  12142. "schema": {
  12143. "$ref": "#/components/schemas/UnauthorizedError"
  12144. }
  12145. }
  12146. }
  12147. }
  12148. },
  12149. "description": "Complete a code-based OAuth attempt and store the resulting credential.",
  12150. "summary": "Complete OAuth connection",
  12151. "requestBody": {
  12152. "content": {
  12153. "application/json": {
  12154. "schema": {
  12155. "type": "object",
  12156. "properties": {
  12157. "code": {
  12158. "type": "string"
  12159. }
  12160. },
  12161. "additionalProperties": false
  12162. }
  12163. }
  12164. },
  12165. "required": true
  12166. },
  12167. "x-codeSamples": [
  12168. {
  12169. "lang": "js",
  12170. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.attempt.complete({\n ...\n})"
  12171. }
  12172. ]
  12173. }
  12174. },
  12175. "/api/credential/{credentialID}": {
  12176. "patch": {
  12177. "tags": ["opencode HttpApi"],
  12178. "operationId": "v2.credential.update",
  12179. "parameters": [
  12180. {
  12181. "name": "credentialID",
  12182. "in": "path",
  12183. "schema": {
  12184. "type": "string"
  12185. },
  12186. "required": true
  12187. },
  12188. {
  12189. "name": "location",
  12190. "in": "query",
  12191. "schema": {
  12192. "type": "object",
  12193. "properties": {
  12194. "directory": {
  12195. "type": "string"
  12196. },
  12197. "workspace": {
  12198. "type": "string"
  12199. }
  12200. },
  12201. "additionalProperties": false
  12202. },
  12203. "required": false,
  12204. "style": "deepObject",
  12205. "explode": true
  12206. }
  12207. ],
  12208. "security": [],
  12209. "responses": {
  12210. "204": {
  12211. "description": "<No Content>"
  12212. },
  12213. "400": {
  12214. "description": "InvalidRequestError",
  12215. "content": {
  12216. "application/json": {
  12217. "schema": {
  12218. "$ref": "#/components/schemas/InvalidRequestError"
  12219. }
  12220. }
  12221. }
  12222. },
  12223. "401": {
  12224. "description": "UnauthorizedError",
  12225. "content": {
  12226. "application/json": {
  12227. "schema": {
  12228. "$ref": "#/components/schemas/UnauthorizedError"
  12229. }
  12230. }
  12231. }
  12232. }
  12233. },
  12234. "description": "Update a stored credential label.",
  12235. "summary": "Update credential",
  12236. "requestBody": {
  12237. "content": {
  12238. "application/json": {
  12239. "schema": {
  12240. "type": "object",
  12241. "properties": {
  12242. "label": {
  12243. "type": "string"
  12244. }
  12245. },
  12246. "required": ["label"],
  12247. "additionalProperties": false
  12248. }
  12249. }
  12250. },
  12251. "required": true
  12252. },
  12253. "x-codeSamples": [
  12254. {
  12255. "lang": "js",
  12256. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.credential.update({\n ...\n})"
  12257. }
  12258. ]
  12259. },
  12260. "delete": {
  12261. "tags": ["opencode HttpApi"],
  12262. "operationId": "v2.credential.remove",
  12263. "parameters": [
  12264. {
  12265. "name": "credentialID",
  12266. "in": "path",
  12267. "schema": {
  12268. "type": "string"
  12269. },
  12270. "required": true
  12271. },
  12272. {
  12273. "name": "location",
  12274. "in": "query",
  12275. "schema": {
  12276. "type": "object",
  12277. "properties": {
  12278. "directory": {
  12279. "type": "string"
  12280. },
  12281. "workspace": {
  12282. "type": "string"
  12283. }
  12284. },
  12285. "additionalProperties": false
  12286. },
  12287. "required": false,
  12288. "style": "deepObject",
  12289. "explode": true
  12290. }
  12291. ],
  12292. "security": [],
  12293. "responses": {
  12294. "204": {
  12295. "description": "<No Content>"
  12296. },
  12297. "400": {
  12298. "description": "InvalidRequestError",
  12299. "content": {
  12300. "application/json": {
  12301. "schema": {
  12302. "$ref": "#/components/schemas/InvalidRequestError"
  12303. }
  12304. }
  12305. }
  12306. },
  12307. "401": {
  12308. "description": "UnauthorizedError",
  12309. "content": {
  12310. "application/json": {
  12311. "schema": {
  12312. "$ref": "#/components/schemas/UnauthorizedError"
  12313. }
  12314. }
  12315. }
  12316. }
  12317. },
  12318. "description": "Remove a stored integration credential.",
  12319. "summary": "Remove credential",
  12320. "x-codeSamples": [
  12321. {
  12322. "lang": "js",
  12323. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.credential.remove({\n ...\n})"
  12324. }
  12325. ]
  12326. }
  12327. },
  12328. "/api/permission/request": {
  12329. "get": {
  12330. "tags": ["permissions"],
  12331. "operationId": "v2.permission.request.list",
  12332. "parameters": [
  12333. {
  12334. "name": "location",
  12335. "in": "query",
  12336. "schema": {
  12337. "type": "object",
  12338. "properties": {
  12339. "directory": {
  12340. "type": "string"
  12341. },
  12342. "workspace": {
  12343. "type": "string"
  12344. }
  12345. },
  12346. "additionalProperties": false
  12347. },
  12348. "required": false,
  12349. "style": "deepObject",
  12350. "explode": true
  12351. }
  12352. ],
  12353. "security": [],
  12354. "responses": {
  12355. "200": {
  12356. "description": "Success",
  12357. "content": {
  12358. "application/json": {
  12359. "schema": {
  12360. "type": "object",
  12361. "properties": {
  12362. "location": {
  12363. "$ref": "#/components/schemas/LocationInfo"
  12364. },
  12365. "data": {
  12366. "type": "array",
  12367. "items": {
  12368. "$ref": "#/components/schemas/PermissionV2Request"
  12369. }
  12370. }
  12371. },
  12372. "required": ["location", "data"],
  12373. "additionalProperties": false
  12374. }
  12375. }
  12376. }
  12377. },
  12378. "400": {
  12379. "description": "InvalidRequestError",
  12380. "content": {
  12381. "application/json": {
  12382. "schema": {
  12383. "$ref": "#/components/schemas/InvalidRequestError"
  12384. }
  12385. }
  12386. }
  12387. },
  12388. "401": {
  12389. "description": "UnauthorizedError",
  12390. "content": {
  12391. "application/json": {
  12392. "schema": {
  12393. "$ref": "#/components/schemas/UnauthorizedError"
  12394. }
  12395. }
  12396. }
  12397. }
  12398. },
  12399. "description": "Retrieve pending permission requests for a location.",
  12400. "summary": "List pending permission requests",
  12401. "x-codeSamples": [
  12402. {
  12403. "lang": "js",
  12404. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.request.list({\n ...\n})"
  12405. }
  12406. ]
  12407. }
  12408. },
  12409. "/api/permission/saved": {
  12410. "get": {
  12411. "tags": ["permissions"],
  12412. "operationId": "v2.permission.saved.list",
  12413. "parameters": [
  12414. {
  12415. "name": "projectID",
  12416. "in": "query",
  12417. "schema": {
  12418. "type": "string"
  12419. },
  12420. "required": false
  12421. }
  12422. ],
  12423. "security": [],
  12424. "responses": {
  12425. "200": {
  12426. "description": "Success",
  12427. "content": {
  12428. "application/json": {
  12429. "schema": {
  12430. "type": "object",
  12431. "properties": {
  12432. "data": {
  12433. "type": "array",
  12434. "items": {
  12435. "$ref": "#/components/schemas/PermissionSavedInfo"
  12436. }
  12437. }
  12438. },
  12439. "required": ["data"],
  12440. "additionalProperties": false
  12441. }
  12442. }
  12443. }
  12444. },
  12445. "400": {
  12446. "description": "InvalidRequestError",
  12447. "content": {
  12448. "application/json": {
  12449. "schema": {
  12450. "$ref": "#/components/schemas/InvalidRequestError"
  12451. }
  12452. }
  12453. }
  12454. },
  12455. "401": {
  12456. "description": "UnauthorizedError",
  12457. "content": {
  12458. "application/json": {
  12459. "schema": {
  12460. "$ref": "#/components/schemas/UnauthorizedError"
  12461. }
  12462. }
  12463. }
  12464. }
  12465. },
  12466. "description": "Retrieve saved permissions, optionally filtered by project.",
  12467. "summary": "List saved permissions",
  12468. "x-codeSamples": [
  12469. {
  12470. "lang": "js",
  12471. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.list({\n ...\n})"
  12472. }
  12473. ]
  12474. }
  12475. },
  12476. "/api/permission/saved/{id}": {
  12477. "delete": {
  12478. "tags": ["permissions"],
  12479. "operationId": "v2.permission.saved.remove",
  12480. "parameters": [
  12481. {
  12482. "name": "id",
  12483. "in": "path",
  12484. "schema": {
  12485. "type": "string"
  12486. },
  12487. "required": true
  12488. }
  12489. ],
  12490. "security": [],
  12491. "responses": {
  12492. "204": {
  12493. "description": "<No Content>"
  12494. },
  12495. "400": {
  12496. "description": "InvalidRequestError",
  12497. "content": {
  12498. "application/json": {
  12499. "schema": {
  12500. "$ref": "#/components/schemas/InvalidRequestError"
  12501. }
  12502. }
  12503. }
  12504. },
  12505. "401": {
  12506. "description": "UnauthorizedError",
  12507. "content": {
  12508. "application/json": {
  12509. "schema": {
  12510. "$ref": "#/components/schemas/UnauthorizedError"
  12511. }
  12512. }
  12513. }
  12514. }
  12515. },
  12516. "description": "Remove a saved permission by ID.",
  12517. "summary": "Remove saved permission",
  12518. "x-codeSamples": [
  12519. {
  12520. "lang": "js",
  12521. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.remove({\n ...\n})"
  12522. }
  12523. ]
  12524. }
  12525. },
  12526. "/api/session/{sessionID}/permission": {
  12527. "get": {
  12528. "tags": ["permissions"],
  12529. "operationId": "v2.session.permission.list",
  12530. "parameters": [
  12531. {
  12532. "name": "sessionID",
  12533. "in": "path",
  12534. "schema": {
  12535. "type": "string",
  12536. "pattern": "^ses"
  12537. },
  12538. "required": true
  12539. }
  12540. ],
  12541. "security": [],
  12542. "responses": {
  12543. "200": {
  12544. "description": "Success",
  12545. "content": {
  12546. "application/json": {
  12547. "schema": {
  12548. "type": "object",
  12549. "properties": {
  12550. "data": {
  12551. "type": "array",
  12552. "items": {
  12553. "$ref": "#/components/schemas/PermissionV2Request"
  12554. }
  12555. }
  12556. },
  12557. "required": ["data"],
  12558. "additionalProperties": false
  12559. }
  12560. }
  12561. }
  12562. },
  12563. "400": {
  12564. "description": "InvalidRequestError",
  12565. "content": {
  12566. "application/json": {
  12567. "schema": {
  12568. "$ref": "#/components/schemas/InvalidRequestError"
  12569. }
  12570. }
  12571. }
  12572. },
  12573. "401": {
  12574. "description": "UnauthorizedError",
  12575. "content": {
  12576. "application/json": {
  12577. "schema": {
  12578. "$ref": "#/components/schemas/UnauthorizedError"
  12579. }
  12580. }
  12581. }
  12582. },
  12583. "404": {
  12584. "description": "SessionNotFoundError",
  12585. "content": {
  12586. "application/json": {
  12587. "schema": {
  12588. "anyOf": [
  12589. {
  12590. "$ref": "#/components/schemas/SessionNotFoundError"
  12591. },
  12592. {
  12593. "$ref": "#/components/schemas/SessionNotFoundError"
  12594. }
  12595. ]
  12596. }
  12597. }
  12598. }
  12599. }
  12600. },
  12601. "description": "Retrieve pending permission requests owned by a session.",
  12602. "summary": "List session permission requests",
  12603. "x-codeSamples": [
  12604. {
  12605. "lang": "js",
  12606. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.list({\n ...\n})"
  12607. }
  12608. ]
  12609. }
  12610. },
  12611. "/api/session/{sessionID}/permission/{requestID}/reply": {
  12612. "post": {
  12613. "tags": ["permissions"],
  12614. "operationId": "v2.session.permission.reply",
  12615. "parameters": [
  12616. {
  12617. "name": "sessionID",
  12618. "in": "path",
  12619. "schema": {
  12620. "type": "string",
  12621. "pattern": "^ses"
  12622. },
  12623. "required": true
  12624. },
  12625. {
  12626. "name": "requestID",
  12627. "in": "path",
  12628. "schema": {
  12629. "type": "string",
  12630. "pattern": "^per"
  12631. },
  12632. "required": true
  12633. }
  12634. ],
  12635. "security": [],
  12636. "responses": {
  12637. "204": {
  12638. "description": "<No Content>"
  12639. },
  12640. "400": {
  12641. "description": "InvalidRequestError",
  12642. "content": {
  12643. "application/json": {
  12644. "schema": {
  12645. "$ref": "#/components/schemas/InvalidRequestError"
  12646. }
  12647. }
  12648. }
  12649. },
  12650. "401": {
  12651. "description": "UnauthorizedError",
  12652. "content": {
  12653. "application/json": {
  12654. "schema": {
  12655. "$ref": "#/components/schemas/UnauthorizedError"
  12656. }
  12657. }
  12658. }
  12659. },
  12660. "404": {
  12661. "description": "SessionNotFoundError | PermissionNotFoundError",
  12662. "content": {
  12663. "application/json": {
  12664. "schema": {
  12665. "anyOf": [
  12666. {
  12667. "$ref": "#/components/schemas/PermissionNotFoundError"
  12668. },
  12669. {
  12670. "$ref": "#/components/schemas/SessionNotFoundError"
  12671. },
  12672. {
  12673. "$ref": "#/components/schemas/SessionNotFoundError"
  12674. }
  12675. ]
  12676. }
  12677. }
  12678. }
  12679. }
  12680. },
  12681. "description": "Respond to a pending permission request owned by a session.",
  12682. "summary": "Reply to pending permission request",
  12683. "requestBody": {
  12684. "content": {
  12685. "application/json": {
  12686. "schema": {
  12687. "type": "object",
  12688. "properties": {
  12689. "reply": {
  12690. "$ref": "#/components/schemas/PermissionV2Reply"
  12691. },
  12692. "message": {
  12693. "type": "string"
  12694. }
  12695. },
  12696. "required": ["reply"],
  12697. "additionalProperties": false
  12698. }
  12699. }
  12700. },
  12701. "required": true
  12702. },
  12703. "x-codeSamples": [
  12704. {
  12705. "lang": "js",
  12706. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.reply({\n ...\n})"
  12707. }
  12708. ]
  12709. }
  12710. },
  12711. "/api/fs/read/*": {
  12712. "get": {
  12713. "tags": ["filesystem"],
  12714. "operationId": "v2.fs.read",
  12715. "parameters": [
  12716. {
  12717. "name": "location",
  12718. "in": "query",
  12719. "schema": {
  12720. "type": "object",
  12721. "properties": {
  12722. "directory": {
  12723. "type": "string"
  12724. },
  12725. "workspace": {
  12726. "type": "string"
  12727. }
  12728. },
  12729. "additionalProperties": false
  12730. },
  12731. "required": false,
  12732. "style": "deepObject",
  12733. "explode": true
  12734. }
  12735. ],
  12736. "security": [],
  12737. "responses": {
  12738. "200": {
  12739. "description": "Success",
  12740. "content": {
  12741. "application/octet-stream": {
  12742. "schema": {
  12743. "type": "string",
  12744. "format": "binary"
  12745. }
  12746. }
  12747. }
  12748. },
  12749. "400": {
  12750. "description": "InvalidRequestError",
  12751. "content": {
  12752. "application/json": {
  12753. "schema": {
  12754. "$ref": "#/components/schemas/InvalidRequestError"
  12755. }
  12756. }
  12757. }
  12758. },
  12759. "401": {
  12760. "description": "UnauthorizedError",
  12761. "content": {
  12762. "application/json": {
  12763. "schema": {
  12764. "$ref": "#/components/schemas/UnauthorizedError"
  12765. }
  12766. }
  12767. }
  12768. }
  12769. },
  12770. "description": "Serve one file relative to the requested location.",
  12771. "summary": "Read file",
  12772. "x-codeSamples": [
  12773. {
  12774. "lang": "js",
  12775. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.read({\n ...\n})"
  12776. }
  12777. ]
  12778. }
  12779. },
  12780. "/api/fs/list": {
  12781. "get": {
  12782. "tags": ["filesystem"],
  12783. "operationId": "v2.fs.list",
  12784. "parameters": [
  12785. {
  12786. "name": "location",
  12787. "in": "query",
  12788. "schema": {
  12789. "type": "object",
  12790. "properties": {
  12791. "directory": {
  12792. "type": "string"
  12793. },
  12794. "workspace": {
  12795. "type": "string"
  12796. }
  12797. },
  12798. "additionalProperties": false
  12799. },
  12800. "required": false,
  12801. "style": "deepObject",
  12802. "explode": true
  12803. },
  12804. {
  12805. "name": "path",
  12806. "in": "query",
  12807. "schema": {
  12808. "type": "string"
  12809. },
  12810. "required": false
  12811. }
  12812. ],
  12813. "security": [],
  12814. "responses": {
  12815. "200": {
  12816. "description": "Success",
  12817. "content": {
  12818. "application/json": {
  12819. "schema": {
  12820. "type": "object",
  12821. "properties": {
  12822. "location": {
  12823. "$ref": "#/components/schemas/LocationInfo"
  12824. },
  12825. "data": {
  12826. "type": "array",
  12827. "items": {
  12828. "$ref": "#/components/schemas/FileSystemEntry"
  12829. }
  12830. }
  12831. },
  12832. "required": ["location", "data"],
  12833. "additionalProperties": false
  12834. }
  12835. }
  12836. }
  12837. },
  12838. "400": {
  12839. "description": "InvalidRequestError",
  12840. "content": {
  12841. "application/json": {
  12842. "schema": {
  12843. "$ref": "#/components/schemas/InvalidRequestError"
  12844. }
  12845. }
  12846. }
  12847. },
  12848. "401": {
  12849. "description": "UnauthorizedError",
  12850. "content": {
  12851. "application/json": {
  12852. "schema": {
  12853. "$ref": "#/components/schemas/UnauthorizedError"
  12854. }
  12855. }
  12856. }
  12857. }
  12858. },
  12859. "description": "List direct children of one directory relative to the requested location.",
  12860. "summary": "List directory",
  12861. "x-codeSamples": [
  12862. {
  12863. "lang": "js",
  12864. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.list({\n ...\n})"
  12865. }
  12866. ]
  12867. }
  12868. },
  12869. "/api/fs/find": {
  12870. "get": {
  12871. "tags": ["filesystem"],
  12872. "operationId": "v2.fs.find",
  12873. "parameters": [
  12874. {
  12875. "name": "location",
  12876. "in": "query",
  12877. "schema": {
  12878. "type": "object",
  12879. "properties": {
  12880. "directory": {
  12881. "type": "string"
  12882. },
  12883. "workspace": {
  12884. "type": "string"
  12885. }
  12886. },
  12887. "additionalProperties": false
  12888. },
  12889. "required": false,
  12890. "style": "deepObject",
  12891. "explode": true
  12892. },
  12893. {
  12894. "name": "query",
  12895. "in": "query",
  12896. "schema": {
  12897. "type": "string"
  12898. },
  12899. "required": true
  12900. },
  12901. {
  12902. "name": "type",
  12903. "in": "query",
  12904. "schema": {
  12905. "type": "string",
  12906. "enum": ["file", "directory"]
  12907. },
  12908. "required": false
  12909. },
  12910. {
  12911. "name": "limit",
  12912. "in": "query",
  12913. "schema": {
  12914. "type": "string"
  12915. },
  12916. "required": false
  12917. }
  12918. ],
  12919. "security": [],
  12920. "responses": {
  12921. "200": {
  12922. "description": "Success",
  12923. "content": {
  12924. "application/json": {
  12925. "schema": {
  12926. "type": "object",
  12927. "properties": {
  12928. "location": {
  12929. "$ref": "#/components/schemas/LocationInfo"
  12930. },
  12931. "data": {
  12932. "type": "array",
  12933. "items": {
  12934. "$ref": "#/components/schemas/FileSystemEntry"
  12935. }
  12936. }
  12937. },
  12938. "required": ["location", "data"],
  12939. "additionalProperties": false
  12940. }
  12941. }
  12942. }
  12943. },
  12944. "400": {
  12945. "description": "InvalidRequestError",
  12946. "content": {
  12947. "application/json": {
  12948. "schema": {
  12949. "$ref": "#/components/schemas/InvalidRequestError"
  12950. }
  12951. }
  12952. }
  12953. },
  12954. "401": {
  12955. "description": "UnauthorizedError",
  12956. "content": {
  12957. "application/json": {
  12958. "schema": {
  12959. "$ref": "#/components/schemas/UnauthorizedError"
  12960. }
  12961. }
  12962. }
  12963. }
  12964. },
  12965. "description": "Find recursively ranked filesystem entries relative to the requested location.",
  12966. "summary": "Find files",
  12967. "x-codeSamples": [
  12968. {
  12969. "lang": "js",
  12970. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.find({\n ...\n})"
  12971. }
  12972. ]
  12973. }
  12974. },
  12975. "/api/command": {
  12976. "get": {
  12977. "tags": ["commands"],
  12978. "operationId": "v2.command.list",
  12979. "parameters": [
  12980. {
  12981. "name": "location",
  12982. "in": "query",
  12983. "schema": {
  12984. "type": "object",
  12985. "properties": {
  12986. "directory": {
  12987. "type": "string"
  12988. },
  12989. "workspace": {
  12990. "type": "string"
  12991. }
  12992. },
  12993. "additionalProperties": false
  12994. },
  12995. "required": false,
  12996. "style": "deepObject",
  12997. "explode": true
  12998. }
  12999. ],
  13000. "security": [],
  13001. "responses": {
  13002. "200": {
  13003. "description": "Success",
  13004. "content": {
  13005. "application/json": {
  13006. "schema": {
  13007. "type": "object",
  13008. "properties": {
  13009. "location": {
  13010. "$ref": "#/components/schemas/LocationInfo"
  13011. },
  13012. "data": {
  13013. "type": "array",
  13014. "items": {
  13015. "$ref": "#/components/schemas/CommandV2Info"
  13016. }
  13017. }
  13018. },
  13019. "required": ["location", "data"],
  13020. "additionalProperties": false
  13021. }
  13022. }
  13023. }
  13024. },
  13025. "400": {
  13026. "description": "InvalidRequestError",
  13027. "content": {
  13028. "application/json": {
  13029. "schema": {
  13030. "$ref": "#/components/schemas/InvalidRequestError"
  13031. }
  13032. }
  13033. }
  13034. },
  13035. "401": {
  13036. "description": "UnauthorizedError",
  13037. "content": {
  13038. "application/json": {
  13039. "schema": {
  13040. "$ref": "#/components/schemas/UnauthorizedError"
  13041. }
  13042. }
  13043. }
  13044. }
  13045. },
  13046. "description": "Retrieve currently registered commands.",
  13047. "summary": "List commands",
  13048. "x-codeSamples": [
  13049. {
  13050. "lang": "js",
  13051. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.command.list({\n ...\n})"
  13052. }
  13053. ]
  13054. }
  13055. },
  13056. "/api/skill": {
  13057. "get": {
  13058. "tags": ["skills"],
  13059. "operationId": "v2.skill.list",
  13060. "parameters": [
  13061. {
  13062. "name": "location",
  13063. "in": "query",
  13064. "schema": {
  13065. "type": "object",
  13066. "properties": {
  13067. "directory": {
  13068. "type": "string"
  13069. },
  13070. "workspace": {
  13071. "type": "string"
  13072. }
  13073. },
  13074. "additionalProperties": false
  13075. },
  13076. "required": false,
  13077. "style": "deepObject",
  13078. "explode": true
  13079. }
  13080. ],
  13081. "security": [],
  13082. "responses": {
  13083. "200": {
  13084. "description": "Success",
  13085. "content": {
  13086. "application/json": {
  13087. "schema": {
  13088. "type": "object",
  13089. "properties": {
  13090. "location": {
  13091. "$ref": "#/components/schemas/LocationInfo"
  13092. },
  13093. "data": {
  13094. "type": "array",
  13095. "items": {
  13096. "$ref": "#/components/schemas/SkillV2Info"
  13097. }
  13098. }
  13099. },
  13100. "required": ["location", "data"],
  13101. "additionalProperties": false
  13102. }
  13103. }
  13104. }
  13105. },
  13106. "400": {
  13107. "description": "InvalidRequestError",
  13108. "content": {
  13109. "application/json": {
  13110. "schema": {
  13111. "$ref": "#/components/schemas/InvalidRequestError"
  13112. }
  13113. }
  13114. }
  13115. },
  13116. "401": {
  13117. "description": "UnauthorizedError",
  13118. "content": {
  13119. "application/json": {
  13120. "schema": {
  13121. "$ref": "#/components/schemas/UnauthorizedError"
  13122. }
  13123. }
  13124. }
  13125. }
  13126. },
  13127. "description": "Retrieve currently registered skills.",
  13128. "summary": "List skills",
  13129. "x-codeSamples": [
  13130. {
  13131. "lang": "js",
  13132. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.skill.list({\n ...\n})"
  13133. }
  13134. ]
  13135. }
  13136. },
  13137. "/api/event": {
  13138. "get": {
  13139. "tags": ["events"],
  13140. "operationId": "v2.event.subscribe",
  13141. "parameters": [],
  13142. "security": [],
  13143. "responses": {
  13144. "200": {
  13145. "description": "Event stream",
  13146. "content": {
  13147. "text/event-stream": {
  13148. "schema": {
  13149. "$ref": "#/components/schemas/V2Event"
  13150. }
  13151. }
  13152. }
  13153. },
  13154. "400": {
  13155. "description": "InvalidRequestError",
  13156. "content": {
  13157. "application/json": {
  13158. "schema": {
  13159. "$ref": "#/components/schemas/InvalidRequestError"
  13160. }
  13161. }
  13162. }
  13163. },
  13164. "401": {
  13165. "description": "UnauthorizedError",
  13166. "content": {
  13167. "application/json": {
  13168. "schema": {
  13169. "$ref": "#/components/schemas/UnauthorizedError"
  13170. }
  13171. }
  13172. }
  13173. }
  13174. },
  13175. "description": "Subscribe to native event payloads for the server.",
  13176. "summary": "Subscribe to events",
  13177. "x-codeSamples": [
  13178. {
  13179. "lang": "js",
  13180. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.event.subscribe({\n ...\n})"
  13181. }
  13182. ]
  13183. }
  13184. },
  13185. "/api/pty": {
  13186. "get": {
  13187. "tags": ["pty"],
  13188. "operationId": "v2.pty.list",
  13189. "parameters": [
  13190. {
  13191. "name": "location",
  13192. "in": "query",
  13193. "schema": {
  13194. "type": "object",
  13195. "properties": {
  13196. "directory": {
  13197. "type": "string"
  13198. },
  13199. "workspace": {
  13200. "type": "string"
  13201. }
  13202. },
  13203. "additionalProperties": false
  13204. },
  13205. "required": false,
  13206. "style": "deepObject",
  13207. "explode": true
  13208. }
  13209. ],
  13210. "security": [],
  13211. "responses": {
  13212. "200": {
  13213. "description": "Success",
  13214. "content": {
  13215. "application/json": {
  13216. "schema": {
  13217. "type": "object",
  13218. "properties": {
  13219. "location": {
  13220. "$ref": "#/components/schemas/LocationInfo"
  13221. },
  13222. "data": {
  13223. "type": "array",
  13224. "items": {
  13225. "$ref": "#/components/schemas/Pty"
  13226. }
  13227. }
  13228. },
  13229. "required": ["location", "data"],
  13230. "additionalProperties": false
  13231. }
  13232. }
  13233. }
  13234. },
  13235. "400": {
  13236. "description": "InvalidRequestError",
  13237. "content": {
  13238. "application/json": {
  13239. "schema": {
  13240. "$ref": "#/components/schemas/InvalidRequestError"
  13241. }
  13242. }
  13243. }
  13244. },
  13245. "401": {
  13246. "description": "UnauthorizedError",
  13247. "content": {
  13248. "application/json": {
  13249. "schema": {
  13250. "$ref": "#/components/schemas/UnauthorizedError"
  13251. }
  13252. }
  13253. }
  13254. }
  13255. },
  13256. "description": "List PTY sessions for a location, including exited sessions retained until removal.",
  13257. "summary": "List PTY sessions",
  13258. "x-codeSamples": [
  13259. {
  13260. "lang": "js",
  13261. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.list({\n ...\n})"
  13262. }
  13263. ]
  13264. },
  13265. "post": {
  13266. "tags": ["pty"],
  13267. "operationId": "v2.pty.create",
  13268. "parameters": [
  13269. {
  13270. "name": "location",
  13271. "in": "query",
  13272. "schema": {
  13273. "type": "object",
  13274. "properties": {
  13275. "directory": {
  13276. "type": "string"
  13277. },
  13278. "workspace": {
  13279. "type": "string"
  13280. }
  13281. },
  13282. "additionalProperties": false
  13283. },
  13284. "required": false,
  13285. "style": "deepObject",
  13286. "explode": true
  13287. }
  13288. ],
  13289. "security": [],
  13290. "responses": {
  13291. "200": {
  13292. "description": "Success",
  13293. "content": {
  13294. "application/json": {
  13295. "schema": {
  13296. "type": "object",
  13297. "properties": {
  13298. "location": {
  13299. "$ref": "#/components/schemas/LocationInfo"
  13300. },
  13301. "data": {
  13302. "$ref": "#/components/schemas/Pty"
  13303. }
  13304. },
  13305. "required": ["location", "data"],
  13306. "additionalProperties": false
  13307. }
  13308. }
  13309. }
  13310. },
  13311. "400": {
  13312. "description": "InvalidRequestError",
  13313. "content": {
  13314. "application/json": {
  13315. "schema": {
  13316. "$ref": "#/components/schemas/InvalidRequestError"
  13317. }
  13318. }
  13319. }
  13320. },
  13321. "401": {
  13322. "description": "UnauthorizedError",
  13323. "content": {
  13324. "application/json": {
  13325. "schema": {
  13326. "$ref": "#/components/schemas/UnauthorizedError"
  13327. }
  13328. }
  13329. }
  13330. }
  13331. },
  13332. "description": "Create a pseudo-terminal session for a location.",
  13333. "summary": "Create PTY session",
  13334. "requestBody": {
  13335. "content": {
  13336. "application/json": {
  13337. "schema": {
  13338. "type": "object",
  13339. "properties": {
  13340. "command": {
  13341. "type": "string"
  13342. },
  13343. "args": {
  13344. "type": "array",
  13345. "items": {
  13346. "type": "string"
  13347. }
  13348. },
  13349. "cwd": {
  13350. "type": "string"
  13351. },
  13352. "title": {
  13353. "type": "string"
  13354. },
  13355. "env": {
  13356. "type": "object",
  13357. "additionalProperties": {
  13358. "type": "string"
  13359. }
  13360. }
  13361. },
  13362. "additionalProperties": false
  13363. }
  13364. }
  13365. },
  13366. "required": true
  13367. },
  13368. "x-codeSamples": [
  13369. {
  13370. "lang": "js",
  13371. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.create({\n ...\n})"
  13372. }
  13373. ]
  13374. }
  13375. },
  13376. "/api/pty/{ptyID}": {
  13377. "get": {
  13378. "tags": ["pty"],
  13379. "operationId": "v2.pty.get",
  13380. "parameters": [
  13381. {
  13382. "name": "ptyID",
  13383. "in": "path",
  13384. "schema": {
  13385. "type": "string",
  13386. "pattern": "^pty"
  13387. },
  13388. "required": true
  13389. },
  13390. {
  13391. "name": "location",
  13392. "in": "query",
  13393. "schema": {
  13394. "type": "object",
  13395. "properties": {
  13396. "directory": {
  13397. "type": "string"
  13398. },
  13399. "workspace": {
  13400. "type": "string"
  13401. }
  13402. },
  13403. "additionalProperties": false
  13404. },
  13405. "required": false,
  13406. "style": "deepObject",
  13407. "explode": true
  13408. }
  13409. ],
  13410. "security": [],
  13411. "responses": {
  13412. "200": {
  13413. "description": "Success",
  13414. "content": {
  13415. "application/json": {
  13416. "schema": {
  13417. "type": "object",
  13418. "properties": {
  13419. "location": {
  13420. "$ref": "#/components/schemas/LocationInfo"
  13421. },
  13422. "data": {
  13423. "$ref": "#/components/schemas/Pty"
  13424. }
  13425. },
  13426. "required": ["location", "data"],
  13427. "additionalProperties": false
  13428. }
  13429. }
  13430. }
  13431. },
  13432. "400": {
  13433. "description": "InvalidRequestError",
  13434. "content": {
  13435. "application/json": {
  13436. "schema": {
  13437. "$ref": "#/components/schemas/InvalidRequestError"
  13438. }
  13439. }
  13440. }
  13441. },
  13442. "401": {
  13443. "description": "UnauthorizedError",
  13444. "content": {
  13445. "application/json": {
  13446. "schema": {
  13447. "$ref": "#/components/schemas/UnauthorizedError"
  13448. }
  13449. }
  13450. }
  13451. },
  13452. "404": {
  13453. "description": "PtyNotFoundError",
  13454. "content": {
  13455. "application/json": {
  13456. "schema": {
  13457. "$ref": "#/components/schemas/PtyNotFoundError"
  13458. }
  13459. }
  13460. }
  13461. }
  13462. },
  13463. "description": "Get one PTY session, including its exit code once exited.",
  13464. "summary": "Get PTY session",
  13465. "x-codeSamples": [
  13466. {
  13467. "lang": "js",
  13468. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.get({\n ...\n})"
  13469. }
  13470. ]
  13471. },
  13472. "put": {
  13473. "tags": ["pty"],
  13474. "operationId": "v2.pty.update",
  13475. "parameters": [
  13476. {
  13477. "name": "ptyID",
  13478. "in": "path",
  13479. "schema": {
  13480. "type": "string",
  13481. "pattern": "^pty"
  13482. },
  13483. "required": true
  13484. },
  13485. {
  13486. "name": "location",
  13487. "in": "query",
  13488. "schema": {
  13489. "type": "object",
  13490. "properties": {
  13491. "directory": {
  13492. "type": "string"
  13493. },
  13494. "workspace": {
  13495. "type": "string"
  13496. }
  13497. },
  13498. "additionalProperties": false
  13499. },
  13500. "required": false,
  13501. "style": "deepObject",
  13502. "explode": true
  13503. }
  13504. ],
  13505. "security": [],
  13506. "responses": {
  13507. "200": {
  13508. "description": "Success",
  13509. "content": {
  13510. "application/json": {
  13511. "schema": {
  13512. "type": "object",
  13513. "properties": {
  13514. "location": {
  13515. "$ref": "#/components/schemas/LocationInfo"
  13516. },
  13517. "data": {
  13518. "$ref": "#/components/schemas/Pty"
  13519. }
  13520. },
  13521. "required": ["location", "data"],
  13522. "additionalProperties": false
  13523. }
  13524. }
  13525. }
  13526. },
  13527. "400": {
  13528. "description": "InvalidRequestError",
  13529. "content": {
  13530. "application/json": {
  13531. "schema": {
  13532. "$ref": "#/components/schemas/InvalidRequestError"
  13533. }
  13534. }
  13535. }
  13536. },
  13537. "401": {
  13538. "description": "UnauthorizedError",
  13539. "content": {
  13540. "application/json": {
  13541. "schema": {
  13542. "$ref": "#/components/schemas/UnauthorizedError"
  13543. }
  13544. }
  13545. }
  13546. },
  13547. "404": {
  13548. "description": "PtyNotFoundError",
  13549. "content": {
  13550. "application/json": {
  13551. "schema": {
  13552. "$ref": "#/components/schemas/PtyNotFoundError"
  13553. }
  13554. }
  13555. }
  13556. }
  13557. },
  13558. "description": "Update the title or viewport size of one PTY session.",
  13559. "summary": "Update PTY session",
  13560. "requestBody": {
  13561. "content": {
  13562. "application/json": {
  13563. "schema": {
  13564. "type": "object",
  13565. "properties": {
  13566. "title": {
  13567. "type": "string"
  13568. },
  13569. "size": {
  13570. "type": "object",
  13571. "properties": {
  13572. "rows": {
  13573. "type": "integer",
  13574. "exclusiveMinimum": 0
  13575. },
  13576. "cols": {
  13577. "type": "integer",
  13578. "exclusiveMinimum": 0
  13579. }
  13580. },
  13581. "required": ["rows", "cols"],
  13582. "additionalProperties": false
  13583. }
  13584. },
  13585. "additionalProperties": false
  13586. }
  13587. }
  13588. },
  13589. "required": true
  13590. },
  13591. "x-codeSamples": [
  13592. {
  13593. "lang": "js",
  13594. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.update({\n ...\n})"
  13595. }
  13596. ]
  13597. },
  13598. "delete": {
  13599. "tags": ["pty"],
  13600. "operationId": "v2.pty.remove",
  13601. "parameters": [
  13602. {
  13603. "name": "ptyID",
  13604. "in": "path",
  13605. "schema": {
  13606. "type": "string",
  13607. "pattern": "^pty"
  13608. },
  13609. "required": true
  13610. },
  13611. {
  13612. "name": "location",
  13613. "in": "query",
  13614. "schema": {
  13615. "type": "object",
  13616. "properties": {
  13617. "directory": {
  13618. "type": "string"
  13619. },
  13620. "workspace": {
  13621. "type": "string"
  13622. }
  13623. },
  13624. "additionalProperties": false
  13625. },
  13626. "required": false,
  13627. "style": "deepObject",
  13628. "explode": true
  13629. }
  13630. ],
  13631. "security": [],
  13632. "responses": {
  13633. "204": {
  13634. "description": "<No Content>"
  13635. },
  13636. "400": {
  13637. "description": "InvalidRequestError",
  13638. "content": {
  13639. "application/json": {
  13640. "schema": {
  13641. "$ref": "#/components/schemas/InvalidRequestError"
  13642. }
  13643. }
  13644. }
  13645. },
  13646. "401": {
  13647. "description": "UnauthorizedError",
  13648. "content": {
  13649. "application/json": {
  13650. "schema": {
  13651. "$ref": "#/components/schemas/UnauthorizedError"
  13652. }
  13653. }
  13654. }
  13655. },
  13656. "404": {
  13657. "description": "PtyNotFoundError",
  13658. "content": {
  13659. "application/json": {
  13660. "schema": {
  13661. "$ref": "#/components/schemas/PtyNotFoundError"
  13662. }
  13663. }
  13664. }
  13665. }
  13666. },
  13667. "description": "Terminate and remove one PTY session.",
  13668. "summary": "Remove PTY session",
  13669. "x-codeSamples": [
  13670. {
  13671. "lang": "js",
  13672. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.remove({\n ...\n})"
  13673. }
  13674. ]
  13675. }
  13676. },
  13677. "/api/pty/{ptyID}/connect-token": {
  13678. "post": {
  13679. "tags": ["pty"],
  13680. "operationId": "v2.pty.connectToken",
  13681. "parameters": [
  13682. {
  13683. "name": "ptyID",
  13684. "in": "path",
  13685. "schema": {
  13686. "type": "string",
  13687. "pattern": "^pty"
  13688. },
  13689. "required": true
  13690. },
  13691. {
  13692. "name": "location",
  13693. "in": "query",
  13694. "schema": {
  13695. "type": "object",
  13696. "properties": {
  13697. "directory": {
  13698. "type": "string"
  13699. },
  13700. "workspace": {
  13701. "type": "string"
  13702. }
  13703. },
  13704. "additionalProperties": false
  13705. },
  13706. "required": false,
  13707. "style": "deepObject",
  13708. "explode": true
  13709. }
  13710. ],
  13711. "security": [],
  13712. "responses": {
  13713. "200": {
  13714. "description": "Success",
  13715. "content": {
  13716. "application/json": {
  13717. "schema": {
  13718. "type": "object",
  13719. "properties": {
  13720. "location": {
  13721. "$ref": "#/components/schemas/LocationInfo"
  13722. },
  13723. "data": {
  13724. "type": "object",
  13725. "properties": {
  13726. "ticket": {
  13727. "type": "string"
  13728. },
  13729. "expires_in": {
  13730. "type": "integer",
  13731. "exclusiveMinimum": 0
  13732. }
  13733. },
  13734. "required": ["ticket", "expires_in"],
  13735. "additionalProperties": false
  13736. }
  13737. },
  13738. "required": ["location", "data"],
  13739. "additionalProperties": false
  13740. }
  13741. }
  13742. }
  13743. },
  13744. "400": {
  13745. "description": "InvalidRequestError",
  13746. "content": {
  13747. "application/json": {
  13748. "schema": {
  13749. "$ref": "#/components/schemas/InvalidRequestError"
  13750. }
  13751. }
  13752. }
  13753. },
  13754. "401": {
  13755. "description": "UnauthorizedError",
  13756. "content": {
  13757. "application/json": {
  13758. "schema": {
  13759. "$ref": "#/components/schemas/UnauthorizedError"
  13760. }
  13761. }
  13762. }
  13763. },
  13764. "403": {
  13765. "description": "ForbiddenError",
  13766. "content": {
  13767. "application/json": {
  13768. "schema": {
  13769. "$ref": "#/components/schemas/ForbiddenError"
  13770. }
  13771. }
  13772. }
  13773. },
  13774. "404": {
  13775. "description": "PtyNotFoundError",
  13776. "content": {
  13777. "application/json": {
  13778. "schema": {
  13779. "$ref": "#/components/schemas/PtyNotFoundError"
  13780. }
  13781. }
  13782. }
  13783. }
  13784. },
  13785. "description": "Create a short-lived single-use ticket for opening a PTY WebSocket connection.",
  13786. "summary": "Create PTY WebSocket token",
  13787. "x-codeSamples": [
  13788. {
  13789. "lang": "js",
  13790. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.connectToken({\n ...\n})"
  13791. }
  13792. ]
  13793. }
  13794. },
  13795. "/api/pty/{ptyID}/connect": {
  13796. "get": {
  13797. "tags": ["pty"],
  13798. "operationId": "v2.pty.connect",
  13799. "parameters": [
  13800. {
  13801. "name": "ptyID",
  13802. "in": "path",
  13803. "schema": {
  13804. "type": "string",
  13805. "pattern": "^pty"
  13806. },
  13807. "required": true
  13808. },
  13809. {
  13810. "in": "query",
  13811. "name": "location[directory]",
  13812. "schema": {
  13813. "type": "string"
  13814. }
  13815. },
  13816. {
  13817. "in": "query",
  13818. "name": "location[workspace]",
  13819. "schema": {
  13820. "type": "string"
  13821. }
  13822. },
  13823. {
  13824. "in": "query",
  13825. "name": "cursor",
  13826. "schema": {
  13827. "type": "string"
  13828. }
  13829. },
  13830. {
  13831. "in": "query",
  13832. "name": "ticket",
  13833. "schema": {
  13834. "type": "string"
  13835. }
  13836. }
  13837. ],
  13838. "security": [],
  13839. "responses": {
  13840. "200": {
  13841. "description": "Success",
  13842. "content": {
  13843. "application/json": {
  13844. "schema": {
  13845. "type": "boolean"
  13846. }
  13847. }
  13848. }
  13849. },
  13850. "400": {
  13851. "description": "InvalidRequestError",
  13852. "content": {
  13853. "application/json": {
  13854. "schema": {
  13855. "$ref": "#/components/schemas/InvalidRequestError"
  13856. }
  13857. }
  13858. }
  13859. },
  13860. "401": {
  13861. "description": "UnauthorizedError",
  13862. "content": {
  13863. "application/json": {
  13864. "schema": {
  13865. "$ref": "#/components/schemas/UnauthorizedError"
  13866. }
  13867. }
  13868. }
  13869. },
  13870. "403": {
  13871. "description": "ForbiddenError",
  13872. "content": {
  13873. "application/json": {
  13874. "schema": {
  13875. "$ref": "#/components/schemas/ForbiddenError"
  13876. }
  13877. }
  13878. }
  13879. },
  13880. "404": {
  13881. "description": "PtyNotFoundError",
  13882. "content": {
  13883. "application/json": {
  13884. "schema": {
  13885. "$ref": "#/components/schemas/PtyNotFoundError"
  13886. }
  13887. }
  13888. }
  13889. }
  13890. },
  13891. "description": "Establish a WebSocket connection streaming PTY output and accepting terminal input.",
  13892. "summary": "Connect to PTY session",
  13893. "x-codeSamples": [
  13894. {
  13895. "lang": "js",
  13896. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.connect({\n ...\n})"
  13897. }
  13898. ]
  13899. }
  13900. },
  13901. "/api/question/request": {
  13902. "get": {
  13903. "tags": ["session questions"],
  13904. "operationId": "v2.question.request.list",
  13905. "parameters": [
  13906. {
  13907. "name": "location",
  13908. "in": "query",
  13909. "schema": {
  13910. "type": "object",
  13911. "properties": {
  13912. "directory": {
  13913. "type": "string"
  13914. },
  13915. "workspace": {
  13916. "type": "string"
  13917. }
  13918. },
  13919. "additionalProperties": false
  13920. },
  13921. "required": false,
  13922. "style": "deepObject",
  13923. "explode": true
  13924. }
  13925. ],
  13926. "security": [],
  13927. "responses": {
  13928. "200": {
  13929. "description": "Success",
  13930. "content": {
  13931. "application/json": {
  13932. "schema": {
  13933. "type": "object",
  13934. "properties": {
  13935. "location": {
  13936. "$ref": "#/components/schemas/LocationInfo"
  13937. },
  13938. "data": {
  13939. "type": "array",
  13940. "items": {
  13941. "$ref": "#/components/schemas/QuestionV2Request"
  13942. }
  13943. }
  13944. },
  13945. "required": ["location", "data"],
  13946. "additionalProperties": false
  13947. }
  13948. }
  13949. }
  13950. },
  13951. "400": {
  13952. "description": "InvalidRequestError",
  13953. "content": {
  13954. "application/json": {
  13955. "schema": {
  13956. "$ref": "#/components/schemas/InvalidRequestError"
  13957. }
  13958. }
  13959. }
  13960. },
  13961. "401": {
  13962. "description": "UnauthorizedError",
  13963. "content": {
  13964. "application/json": {
  13965. "schema": {
  13966. "$ref": "#/components/schemas/UnauthorizedError"
  13967. }
  13968. }
  13969. }
  13970. }
  13971. },
  13972. "description": "Retrieve pending question requests for a location.",
  13973. "summary": "List pending question requests",
  13974. "x-codeSamples": [
  13975. {
  13976. "lang": "js",
  13977. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.question.request.list({\n ...\n})"
  13978. }
  13979. ]
  13980. }
  13981. },
  13982. "/api/session/{sessionID}/question": {
  13983. "get": {
  13984. "tags": ["session questions"],
  13985. "operationId": "v2.session.question.list",
  13986. "parameters": [
  13987. {
  13988. "name": "sessionID",
  13989. "in": "path",
  13990. "schema": {
  13991. "type": "string",
  13992. "pattern": "^ses"
  13993. },
  13994. "required": true
  13995. }
  13996. ],
  13997. "security": [],
  13998. "responses": {
  13999. "200": {
  14000. "description": "Success",
  14001. "content": {
  14002. "application/json": {
  14003. "schema": {
  14004. "type": "object",
  14005. "properties": {
  14006. "data": {
  14007. "type": "array",
  14008. "items": {
  14009. "$ref": "#/components/schemas/QuestionV2Request"
  14010. }
  14011. }
  14012. },
  14013. "required": ["data"],
  14014. "additionalProperties": false
  14015. }
  14016. }
  14017. }
  14018. },
  14019. "400": {
  14020. "description": "InvalidRequestError",
  14021. "content": {
  14022. "application/json": {
  14023. "schema": {
  14024. "$ref": "#/components/schemas/InvalidRequestError"
  14025. }
  14026. }
  14027. }
  14028. },
  14029. "401": {
  14030. "description": "UnauthorizedError",
  14031. "content": {
  14032. "application/json": {
  14033. "schema": {
  14034. "$ref": "#/components/schemas/UnauthorizedError"
  14035. }
  14036. }
  14037. }
  14038. },
  14039. "404": {
  14040. "description": "SessionNotFoundError",
  14041. "content": {
  14042. "application/json": {
  14043. "schema": {
  14044. "anyOf": [
  14045. {
  14046. "$ref": "#/components/schemas/SessionNotFoundError"
  14047. },
  14048. {
  14049. "$ref": "#/components/schemas/SessionNotFoundError"
  14050. }
  14051. ]
  14052. }
  14053. }
  14054. }
  14055. }
  14056. },
  14057. "description": "Retrieve pending question requests owned by a session.",
  14058. "summary": "List session question requests",
  14059. "x-codeSamples": [
  14060. {
  14061. "lang": "js",
  14062. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.list({\n ...\n})"
  14063. }
  14064. ]
  14065. }
  14066. },
  14067. "/api/session/{sessionID}/question/{requestID}/reply": {
  14068. "post": {
  14069. "tags": ["session questions"],
  14070. "operationId": "v2.session.question.reply",
  14071. "parameters": [
  14072. {
  14073. "name": "sessionID",
  14074. "in": "path",
  14075. "schema": {
  14076. "type": "string",
  14077. "pattern": "^ses"
  14078. },
  14079. "required": true
  14080. },
  14081. {
  14082. "name": "requestID",
  14083. "in": "path",
  14084. "schema": {
  14085. "type": "string",
  14086. "pattern": "^que"
  14087. },
  14088. "required": true
  14089. }
  14090. ],
  14091. "security": [],
  14092. "responses": {
  14093. "204": {
  14094. "description": "<No Content>"
  14095. },
  14096. "400": {
  14097. "description": "InvalidRequestError",
  14098. "content": {
  14099. "application/json": {
  14100. "schema": {
  14101. "$ref": "#/components/schemas/InvalidRequestError"
  14102. }
  14103. }
  14104. }
  14105. },
  14106. "401": {
  14107. "description": "UnauthorizedError",
  14108. "content": {
  14109. "application/json": {
  14110. "schema": {
  14111. "$ref": "#/components/schemas/UnauthorizedError"
  14112. }
  14113. }
  14114. }
  14115. },
  14116. "404": {
  14117. "description": "SessionNotFoundError | QuestionNotFoundError",
  14118. "content": {
  14119. "application/json": {
  14120. "schema": {
  14121. "anyOf": [
  14122. {
  14123. "$ref": "#/components/schemas/QuestionNotFoundError"
  14124. },
  14125. {
  14126. "$ref": "#/components/schemas/SessionNotFoundError"
  14127. },
  14128. {
  14129. "$ref": "#/components/schemas/SessionNotFoundError"
  14130. }
  14131. ]
  14132. }
  14133. }
  14134. }
  14135. }
  14136. },
  14137. "description": "Answer a pending question request owned by a session.",
  14138. "summary": "Reply to pending question request",
  14139. "requestBody": {
  14140. "content": {
  14141. "application/json": {
  14142. "schema": {
  14143. "$ref": "#/components/schemas/QuestionV2Reply"
  14144. }
  14145. }
  14146. },
  14147. "required": true
  14148. },
  14149. "x-codeSamples": [
  14150. {
  14151. "lang": "js",
  14152. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reply({\n ...\n})"
  14153. }
  14154. ]
  14155. }
  14156. },
  14157. "/api/session/{sessionID}/question/{requestID}/reject": {
  14158. "post": {
  14159. "tags": ["session questions"],
  14160. "operationId": "v2.session.question.reject",
  14161. "parameters": [
  14162. {
  14163. "name": "sessionID",
  14164. "in": "path",
  14165. "schema": {
  14166. "type": "string",
  14167. "pattern": "^ses"
  14168. },
  14169. "required": true
  14170. },
  14171. {
  14172. "name": "requestID",
  14173. "in": "path",
  14174. "schema": {
  14175. "type": "string",
  14176. "pattern": "^que"
  14177. },
  14178. "required": true
  14179. }
  14180. ],
  14181. "security": [],
  14182. "responses": {
  14183. "204": {
  14184. "description": "<No Content>"
  14185. },
  14186. "400": {
  14187. "description": "InvalidRequestError",
  14188. "content": {
  14189. "application/json": {
  14190. "schema": {
  14191. "$ref": "#/components/schemas/InvalidRequestError"
  14192. }
  14193. }
  14194. }
  14195. },
  14196. "401": {
  14197. "description": "UnauthorizedError",
  14198. "content": {
  14199. "application/json": {
  14200. "schema": {
  14201. "$ref": "#/components/schemas/UnauthorizedError"
  14202. }
  14203. }
  14204. }
  14205. },
  14206. "404": {
  14207. "description": "SessionNotFoundError | QuestionNotFoundError",
  14208. "content": {
  14209. "application/json": {
  14210. "schema": {
  14211. "anyOf": [
  14212. {
  14213. "$ref": "#/components/schemas/QuestionNotFoundError"
  14214. },
  14215. {
  14216. "$ref": "#/components/schemas/SessionNotFoundError"
  14217. },
  14218. {
  14219. "$ref": "#/components/schemas/SessionNotFoundError"
  14220. }
  14221. ]
  14222. }
  14223. }
  14224. }
  14225. }
  14226. },
  14227. "description": "Reject a pending question request owned by a session.",
  14228. "summary": "Reject pending question request",
  14229. "x-codeSamples": [
  14230. {
  14231. "lang": "js",
  14232. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reject({\n ...\n})"
  14233. }
  14234. ]
  14235. }
  14236. },
  14237. "/api/reference": {
  14238. "get": {
  14239. "tags": ["reference"],
  14240. "operationId": "v2.reference.list",
  14241. "parameters": [
  14242. {
  14243. "name": "location",
  14244. "in": "query",
  14245. "schema": {
  14246. "type": "object",
  14247. "properties": {
  14248. "directory": {
  14249. "type": "string"
  14250. },
  14251. "workspace": {
  14252. "type": "string"
  14253. }
  14254. },
  14255. "additionalProperties": false
  14256. },
  14257. "required": false,
  14258. "style": "deepObject",
  14259. "explode": true
  14260. }
  14261. ],
  14262. "security": [],
  14263. "responses": {
  14264. "200": {
  14265. "description": "Success",
  14266. "content": {
  14267. "application/json": {
  14268. "schema": {
  14269. "type": "object",
  14270. "properties": {
  14271. "location": {
  14272. "$ref": "#/components/schemas/LocationInfo"
  14273. },
  14274. "data": {
  14275. "type": "array",
  14276. "items": {
  14277. "$ref": "#/components/schemas/ReferenceInfo"
  14278. }
  14279. }
  14280. },
  14281. "required": ["location", "data"],
  14282. "additionalProperties": false
  14283. }
  14284. }
  14285. }
  14286. },
  14287. "400": {
  14288. "description": "InvalidRequestError",
  14289. "content": {
  14290. "application/json": {
  14291. "schema": {
  14292. "$ref": "#/components/schemas/InvalidRequestError"
  14293. }
  14294. }
  14295. }
  14296. },
  14297. "401": {
  14298. "description": "UnauthorizedError",
  14299. "content": {
  14300. "application/json": {
  14301. "schema": {
  14302. "$ref": "#/components/schemas/UnauthorizedError"
  14303. }
  14304. }
  14305. }
  14306. }
  14307. },
  14308. "description": "List references available in the requested location.",
  14309. "summary": "List references",
  14310. "x-codeSamples": [
  14311. {
  14312. "lang": "js",
  14313. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.reference.list({\n ...\n})"
  14314. }
  14315. ]
  14316. }
  14317. },
  14318. "/experimental/project/{projectID}/copy": {
  14319. "post": {
  14320. "tags": ["projectCopy"],
  14321. "operationId": "v2.projectCopy.create",
  14322. "parameters": [
  14323. {
  14324. "name": "projectID",
  14325. "in": "path",
  14326. "schema": {
  14327. "type": "string"
  14328. },
  14329. "required": true
  14330. },
  14331. {
  14332. "name": "location",
  14333. "in": "query",
  14334. "schema": {
  14335. "type": "object",
  14336. "properties": {
  14337. "directory": {
  14338. "type": "string"
  14339. },
  14340. "workspace": {
  14341. "type": "string"
  14342. }
  14343. },
  14344. "additionalProperties": false
  14345. },
  14346. "required": false,
  14347. "style": "deepObject",
  14348. "explode": true
  14349. }
  14350. ],
  14351. "responses": {
  14352. "200": {
  14353. "description": "ProjectCopy.Copy",
  14354. "content": {
  14355. "application/json": {
  14356. "schema": {
  14357. "$ref": "#/components/schemas/ProjectCopyCopy"
  14358. }
  14359. }
  14360. }
  14361. },
  14362. "400": {
  14363. "description": "ProjectCopyError | InvalidRequestError",
  14364. "content": {
  14365. "application/json": {
  14366. "schema": {
  14367. "anyOf": [
  14368. {
  14369. "$ref": "#/components/schemas/ProjectCopyError"
  14370. },
  14371. {
  14372. "$ref": "#/components/schemas/InvalidRequestError"
  14373. }
  14374. ]
  14375. }
  14376. }
  14377. }
  14378. }
  14379. },
  14380. "requestBody": {
  14381. "content": {
  14382. "application/json": {
  14383. "schema": {
  14384. "type": "object",
  14385. "properties": {
  14386. "strategy": {
  14387. "type": "string"
  14388. },
  14389. "directory": {
  14390. "type": "string"
  14391. },
  14392. "name": {
  14393. "type": "string"
  14394. }
  14395. },
  14396. "required": ["strategy", "directory"],
  14397. "additionalProperties": false
  14398. }
  14399. }
  14400. }
  14401. },
  14402. "x-codeSamples": [
  14403. {
  14404. "lang": "js",
  14405. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.create({\n ...\n})"
  14406. }
  14407. ]
  14408. },
  14409. "delete": {
  14410. "tags": ["projectCopy"],
  14411. "operationId": "v2.projectCopy.remove",
  14412. "parameters": [
  14413. {
  14414. "name": "projectID",
  14415. "in": "path",
  14416. "schema": {
  14417. "type": "string"
  14418. },
  14419. "required": true
  14420. },
  14421. {
  14422. "name": "location",
  14423. "in": "query",
  14424. "schema": {
  14425. "type": "object",
  14426. "properties": {
  14427. "directory": {
  14428. "type": "string"
  14429. },
  14430. "workspace": {
  14431. "type": "string"
  14432. }
  14433. },
  14434. "additionalProperties": false
  14435. },
  14436. "required": false,
  14437. "style": "deepObject",
  14438. "explode": true
  14439. }
  14440. ],
  14441. "responses": {
  14442. "204": {
  14443. "description": "<No Content>"
  14444. },
  14445. "400": {
  14446. "description": "ProjectCopyError | InvalidRequestError",
  14447. "content": {
  14448. "application/json": {
  14449. "schema": {
  14450. "anyOf": [
  14451. {
  14452. "$ref": "#/components/schemas/ProjectCopyError"
  14453. },
  14454. {
  14455. "$ref": "#/components/schemas/InvalidRequestError"
  14456. }
  14457. ]
  14458. }
  14459. }
  14460. }
  14461. }
  14462. },
  14463. "requestBody": {
  14464. "content": {
  14465. "application/json": {
  14466. "schema": {
  14467. "type": "object",
  14468. "properties": {
  14469. "directory": {
  14470. "type": "string"
  14471. },
  14472. "force": {
  14473. "type": "boolean"
  14474. }
  14475. },
  14476. "required": ["directory", "force"],
  14477. "additionalProperties": false
  14478. }
  14479. }
  14480. }
  14481. },
  14482. "x-codeSamples": [
  14483. {
  14484. "lang": "js",
  14485. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.remove({\n ...\n})"
  14486. }
  14487. ]
  14488. }
  14489. },
  14490. "/experimental/project/{projectID}/copy/refresh": {
  14491. "post": {
  14492. "tags": ["projectCopy"],
  14493. "operationId": "v2.projectCopy.refresh",
  14494. "parameters": [
  14495. {
  14496. "name": "projectID",
  14497. "in": "path",
  14498. "schema": {
  14499. "type": "string"
  14500. },
  14501. "required": true
  14502. },
  14503. {
  14504. "name": "location",
  14505. "in": "query",
  14506. "schema": {
  14507. "type": "object",
  14508. "properties": {
  14509. "directory": {
  14510. "type": "string"
  14511. },
  14512. "workspace": {
  14513. "type": "string"
  14514. }
  14515. },
  14516. "additionalProperties": false
  14517. },
  14518. "required": false,
  14519. "style": "deepObject",
  14520. "explode": true
  14521. }
  14522. ],
  14523. "responses": {
  14524. "204": {
  14525. "description": "<No Content>"
  14526. },
  14527. "400": {
  14528. "description": "ProjectCopyError | InvalidRequestError",
  14529. "content": {
  14530. "application/json": {
  14531. "schema": {
  14532. "anyOf": [
  14533. {
  14534. "$ref": "#/components/schemas/ProjectCopyError"
  14535. },
  14536. {
  14537. "$ref": "#/components/schemas/InvalidRequestError"
  14538. }
  14539. ]
  14540. }
  14541. }
  14542. }
  14543. }
  14544. },
  14545. "x-codeSamples": [
  14546. {
  14547. "lang": "js",
  14548. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.refresh({\n ...\n})"
  14549. }
  14550. ]
  14551. }
  14552. },
  14553. "/pty/{ptyID}/connect": {
  14554. "get": {
  14555. "tags": ["pty"],
  14556. "operationId": "pty.connect",
  14557. "parameters": [
  14558. {
  14559. "name": "ptyID",
  14560. "in": "path",
  14561. "schema": {
  14562. "type": "string",
  14563. "pattern": "^pty"
  14564. },
  14565. "required": true
  14566. },
  14567. {
  14568. "in": "query",
  14569. "name": "directory",
  14570. "schema": {
  14571. "type": "string"
  14572. }
  14573. },
  14574. {
  14575. "in": "query",
  14576. "name": "workspace",
  14577. "schema": {
  14578. "type": "string"
  14579. }
  14580. },
  14581. {
  14582. "in": "query",
  14583. "name": "cursor",
  14584. "schema": {
  14585. "type": "string"
  14586. }
  14587. },
  14588. {
  14589. "in": "query",
  14590. "name": "ticket",
  14591. "schema": {
  14592. "type": "string"
  14593. }
  14594. }
  14595. ],
  14596. "responses": {
  14597. "200": {
  14598. "description": "Connected session",
  14599. "content": {
  14600. "application/json": {
  14601. "schema": {
  14602. "type": "boolean",
  14603. "description": "Connected session"
  14604. }
  14605. }
  14606. }
  14607. },
  14608. "403": {
  14609. "description": "Forbidden",
  14610. "content": {
  14611. "application/json": {
  14612. "schema": {
  14613. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  14614. }
  14615. }
  14616. }
  14617. },
  14618. "404": {
  14619. "description": "Not found",
  14620. "content": {
  14621. "application/json": {
  14622. "schema": {
  14623. "$ref": "#/components/schemas/NotFoundError"
  14624. }
  14625. }
  14626. }
  14627. }
  14628. },
  14629. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  14630. "summary": "Connect to PTY session",
  14631. "x-codeSamples": [
  14632. {
  14633. "lang": "js",
  14634. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  14635. }
  14636. ]
  14637. }
  14638. }
  14639. },
  14640. "components": {
  14641. "schemas": {
  14642. "Event": {
  14643. "anyOf": [
  14644. {
  14645. "$ref": "#/components/schemas/EventModels-devRefreshed"
  14646. },
  14647. {
  14648. "$ref": "#/components/schemas/EventIntegrationUpdated"
  14649. },
  14650. {
  14651. "$ref": "#/components/schemas/EventIntegrationConnectionUpdated"
  14652. },
  14653. {
  14654. "$ref": "#/components/schemas/EventCatalogUpdated"
  14655. },
  14656. {
  14657. "$ref": "#/components/schemas/EventSessionCreated"
  14658. },
  14659. {
  14660. "$ref": "#/components/schemas/EventSessionUpdated"
  14661. },
  14662. {
  14663. "$ref": "#/components/schemas/EventSessionDeleted"
  14664. },
  14665. {
  14666. "$ref": "#/components/schemas/EventMessageUpdated"
  14667. },
  14668. {
  14669. "$ref": "#/components/schemas/EventMessageRemoved"
  14670. },
  14671. {
  14672. "$ref": "#/components/schemas/EventMessagePartUpdated"
  14673. },
  14674. {
  14675. "$ref": "#/components/schemas/EventMessagePartRemoved"
  14676. },
  14677. {
  14678. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  14679. },
  14680. {
  14681. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  14682. },
  14683. {
  14684. "$ref": "#/components/schemas/EventSessionNextMoved"
  14685. },
  14686. {
  14687. "$ref": "#/components/schemas/EventSessionNextPrompted"
  14688. },
  14689. {
  14690. "$ref": "#/components/schemas/EventSessionNextPromptAdmitted"
  14691. },
  14692. {
  14693. "$ref": "#/components/schemas/EventSessionNextContextUpdated"
  14694. },
  14695. {
  14696. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  14697. },
  14698. {
  14699. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  14700. },
  14701. {
  14702. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  14703. },
  14704. {
  14705. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  14706. },
  14707. {
  14708. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  14709. },
  14710. {
  14711. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  14712. },
  14713. {
  14714. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  14715. },
  14716. {
  14717. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  14718. },
  14719. {
  14720. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  14721. },
  14722. {
  14723. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  14724. },
  14725. {
  14726. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  14727. },
  14728. {
  14729. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  14730. },
  14731. {
  14732. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  14733. },
  14734. {
  14735. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  14736. },
  14737. {
  14738. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  14739. },
  14740. {
  14741. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  14742. },
  14743. {
  14744. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  14745. },
  14746. {
  14747. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  14748. },
  14749. {
  14750. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  14751. },
  14752. {
  14753. "$ref": "#/components/schemas/EventSessionNextRetried"
  14754. },
  14755. {
  14756. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  14757. },
  14758. {
  14759. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  14760. },
  14761. {
  14762. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  14763. },
  14764. {
  14765. "$ref": "#/components/schemas/EventMessagePartDelta"
  14766. },
  14767. {
  14768. "$ref": "#/components/schemas/EventSessionDiff"
  14769. },
  14770. {
  14771. "$ref": "#/components/schemas/EventSessionError"
  14772. },
  14773. {
  14774. "$ref": "#/components/schemas/EventInstallationUpdated"
  14775. },
  14776. {
  14777. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  14778. },
  14779. {
  14780. "$ref": "#/components/schemas/EventFileEdited"
  14781. },
  14782. {
  14783. "$ref": "#/components/schemas/EventReferenceUpdated"
  14784. },
  14785. {
  14786. "$ref": "#/components/schemas/EventPermissionV2Asked"
  14787. },
  14788. {
  14789. "$ref": "#/components/schemas/EventPermissionV2Replied"
  14790. },
  14791. {
  14792. "$ref": "#/components/schemas/EventPluginAdded"
  14793. },
  14794. {
  14795. "$ref": "#/components/schemas/EventProjectDirectoriesUpdated"
  14796. },
  14797. {
  14798. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  14799. },
  14800. {
  14801. "$ref": "#/components/schemas/EventPtyCreated"
  14802. },
  14803. {
  14804. "$ref": "#/components/schemas/EventPtyUpdated"
  14805. },
  14806. {
  14807. "$ref": "#/components/schemas/EventPtyExited"
  14808. },
  14809. {
  14810. "$ref": "#/components/schemas/EventPtyDeleted"
  14811. },
  14812. {
  14813. "$ref": "#/components/schemas/EventQuestionV2Asked"
  14814. },
  14815. {
  14816. "$ref": "#/components/schemas/EventQuestionV2Replied"
  14817. },
  14818. {
  14819. "$ref": "#/components/schemas/EventQuestionV2Rejected"
  14820. },
  14821. {
  14822. "$ref": "#/components/schemas/EventTodoUpdated"
  14823. },
  14824. {
  14825. "$ref": "#/components/schemas/EventLspUpdated"
  14826. },
  14827. {
  14828. "$ref": "#/components/schemas/EventPermissionAsked"
  14829. },
  14830. {
  14831. "$ref": "#/components/schemas/EventPermissionReplied"
  14832. },
  14833. {
  14834. "$ref": "#/components/schemas/Event.tui.prompt.append"
  14835. },
  14836. {
  14837. "$ref": "#/components/schemas/Event.tui.command.execute"
  14838. },
  14839. {
  14840. "$ref": "#/components/schemas/Event.tui.toast.show"
  14841. },
  14842. {
  14843. "$ref": "#/components/schemas/Event.tui.session.select"
  14844. },
  14845. {
  14846. "$ref": "#/components/schemas/EventMcpToolsChanged"
  14847. },
  14848. {
  14849. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  14850. },
  14851. {
  14852. "$ref": "#/components/schemas/EventCommandExecuted"
  14853. },
  14854. {
  14855. "$ref": "#/components/schemas/EventProjectUpdated"
  14856. },
  14857. {
  14858. "$ref": "#/components/schemas/EventSessionStatus"
  14859. },
  14860. {
  14861. "$ref": "#/components/schemas/EventSessionIdle"
  14862. },
  14863. {
  14864. "$ref": "#/components/schemas/EventQuestionAsked"
  14865. },
  14866. {
  14867. "$ref": "#/components/schemas/EventQuestionReplied"
  14868. },
  14869. {
  14870. "$ref": "#/components/schemas/EventQuestionRejected"
  14871. },
  14872. {
  14873. "$ref": "#/components/schemas/EventSessionCompacted"
  14874. },
  14875. {
  14876. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  14877. },
  14878. {
  14879. "$ref": "#/components/schemas/EventWorkspaceReady"
  14880. },
  14881. {
  14882. "$ref": "#/components/schemas/EventWorkspaceFailed"
  14883. },
  14884. {
  14885. "$ref": "#/components/schemas/EventWorkspaceStatus"
  14886. },
  14887. {
  14888. "$ref": "#/components/schemas/EventWorktreeReady"
  14889. },
  14890. {
  14891. "$ref": "#/components/schemas/EventWorktreeFailed"
  14892. },
  14893. {
  14894. "$ref": "#/components/schemas/EventServerConnected"
  14895. },
  14896. {
  14897. "$ref": "#/components/schemas/EventGlobalDisposed"
  14898. },
  14899. {
  14900. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  14901. }
  14902. ]
  14903. },
  14904. "QuestionReplied": {
  14905. "type": "object",
  14906. "properties": {
  14907. "sessionID": {
  14908. "type": "string",
  14909. "pattern": "^ses"
  14910. },
  14911. "requestID": {
  14912. "type": "string",
  14913. "pattern": "^que"
  14914. },
  14915. "answers": {
  14916. "type": "array",
  14917. "items": {
  14918. "$ref": "#/components/schemas/QuestionAnswer"
  14919. }
  14920. }
  14921. },
  14922. "required": ["sessionID", "requestID", "answers"],
  14923. "additionalProperties": false
  14924. },
  14925. "QuestionRejected": {
  14926. "type": "object",
  14927. "properties": {
  14928. "sessionID": {
  14929. "type": "string",
  14930. "pattern": "^ses"
  14931. },
  14932. "requestID": {
  14933. "type": "string",
  14934. "pattern": "^que"
  14935. }
  14936. },
  14937. "required": ["sessionID", "requestID"],
  14938. "additionalProperties": false
  14939. },
  14940. "OAuth": {
  14941. "type": "object",
  14942. "properties": {
  14943. "type": {
  14944. "type": "string",
  14945. "enum": ["oauth"]
  14946. },
  14947. "refresh": {
  14948. "type": "string"
  14949. },
  14950. "access": {
  14951. "type": "string"
  14952. },
  14953. "expires": {
  14954. "type": "integer",
  14955. "minimum": 0
  14956. },
  14957. "accountId": {
  14958. "type": "string"
  14959. },
  14960. "enterpriseUrl": {
  14961. "type": "string"
  14962. }
  14963. },
  14964. "required": ["type", "refresh", "access", "expires"],
  14965. "additionalProperties": false
  14966. },
  14967. "ApiAuth": {
  14968. "type": "object",
  14969. "properties": {
  14970. "type": {
  14971. "type": "string",
  14972. "enum": ["api"]
  14973. },
  14974. "key": {
  14975. "type": "string"
  14976. },
  14977. "metadata": {
  14978. "type": "object",
  14979. "additionalProperties": {
  14980. "type": "string"
  14981. }
  14982. }
  14983. },
  14984. "required": ["type", "key"],
  14985. "additionalProperties": false
  14986. },
  14987. "WellKnownAuth": {
  14988. "type": "object",
  14989. "properties": {
  14990. "type": {
  14991. "type": "string",
  14992. "enum": ["wellknown"]
  14993. },
  14994. "key": {
  14995. "type": "string"
  14996. },
  14997. "token": {
  14998. "type": "string"
  14999. }
  15000. },
  15001. "required": ["type", "key", "token"],
  15002. "additionalProperties": false
  15003. },
  15004. "Auth": {
  15005. "anyOf": [
  15006. {
  15007. "$ref": "#/components/schemas/OAuth"
  15008. },
  15009. {
  15010. "$ref": "#/components/schemas/ApiAuth"
  15011. },
  15012. {
  15013. "$ref": "#/components/schemas/WellKnownAuth"
  15014. }
  15015. ]
  15016. },
  15017. "effect_HttpApiError_BadRequest": {
  15018. "type": "object",
  15019. "properties": {
  15020. "_tag": {
  15021. "type": "string",
  15022. "enum": ["BadRequest"]
  15023. }
  15024. },
  15025. "required": ["_tag"],
  15026. "additionalProperties": false
  15027. },
  15028. "InvalidRequestError": {
  15029. "type": "object",
  15030. "properties": {
  15031. "_tag": {
  15032. "type": "string",
  15033. "enum": ["InvalidRequestError"]
  15034. },
  15035. "message": {
  15036. "type": "string"
  15037. },
  15038. "kind": {
  15039. "type": "string"
  15040. },
  15041. "field": {
  15042. "type": "string"
  15043. }
  15044. },
  15045. "required": ["_tag", "message"],
  15046. "additionalProperties": false
  15047. },
  15048. "MoveSessionError": {
  15049. "type": "object",
  15050. "properties": {
  15051. "name": {
  15052. "type": "string",
  15053. "enum": ["MoveSessionError"]
  15054. },
  15055. "data": {
  15056. "type": "object",
  15057. "properties": {
  15058. "message": {
  15059. "type": "string"
  15060. }
  15061. },
  15062. "required": ["message"],
  15063. "additionalProperties": false
  15064. }
  15065. },
  15066. "required": ["name", "data"],
  15067. "additionalProperties": false
  15068. },
  15069. "SnapshotFileDiff": {
  15070. "type": "object",
  15071. "properties": {
  15072. "file": {
  15073. "type": "string"
  15074. },
  15075. "patch": {
  15076. "type": "string"
  15077. },
  15078. "additions": {
  15079. "type": "number"
  15080. },
  15081. "deletions": {
  15082. "type": "number"
  15083. },
  15084. "status": {
  15085. "type": "string",
  15086. "enum": ["added", "deleted", "modified"]
  15087. }
  15088. },
  15089. "required": ["additions", "deletions"],
  15090. "additionalProperties": false
  15091. },
  15092. "PermissionAction": {
  15093. "type": "string",
  15094. "enum": ["allow", "deny", "ask"]
  15095. },
  15096. "PermissionRule": {
  15097. "type": "object",
  15098. "properties": {
  15099. "permission": {
  15100. "type": "string"
  15101. },
  15102. "pattern": {
  15103. "type": "string"
  15104. },
  15105. "action": {
  15106. "$ref": "#/components/schemas/PermissionAction"
  15107. }
  15108. },
  15109. "required": ["permission", "pattern", "action"],
  15110. "additionalProperties": false
  15111. },
  15112. "PermissionRuleset": {
  15113. "type": "array",
  15114. "items": {
  15115. "$ref": "#/components/schemas/PermissionRule"
  15116. }
  15117. },
  15118. "Session": {
  15119. "type": "object",
  15120. "properties": {
  15121. "id": {
  15122. "type": "string",
  15123. "pattern": "^ses"
  15124. },
  15125. "slug": {
  15126. "type": "string"
  15127. },
  15128. "projectID": {
  15129. "type": "string"
  15130. },
  15131. "workspaceID": {
  15132. "type": "string",
  15133. "pattern": "^wrk"
  15134. },
  15135. "directory": {
  15136. "type": "string"
  15137. },
  15138. "path": {
  15139. "type": "string"
  15140. },
  15141. "parentID": {
  15142. "type": "string",
  15143. "pattern": "^ses"
  15144. },
  15145. "summary": {
  15146. "type": "object",
  15147. "properties": {
  15148. "additions": {
  15149. "type": "number"
  15150. },
  15151. "deletions": {
  15152. "type": "number"
  15153. },
  15154. "files": {
  15155. "type": "number"
  15156. },
  15157. "diffs": {
  15158. "type": "array",
  15159. "items": {
  15160. "$ref": "#/components/schemas/SnapshotFileDiff"
  15161. }
  15162. }
  15163. },
  15164. "required": ["additions", "deletions", "files"],
  15165. "additionalProperties": false
  15166. },
  15167. "cost": {
  15168. "type": "number"
  15169. },
  15170. "tokens": {
  15171. "type": "object",
  15172. "properties": {
  15173. "input": {
  15174. "type": "number"
  15175. },
  15176. "output": {
  15177. "type": "number"
  15178. },
  15179. "reasoning": {
  15180. "type": "number"
  15181. },
  15182. "cache": {
  15183. "type": "object",
  15184. "properties": {
  15185. "read": {
  15186. "type": "number"
  15187. },
  15188. "write": {
  15189. "type": "number"
  15190. }
  15191. },
  15192. "required": ["read", "write"],
  15193. "additionalProperties": false
  15194. }
  15195. },
  15196. "required": ["input", "output", "reasoning", "cache"],
  15197. "additionalProperties": false
  15198. },
  15199. "share": {
  15200. "type": "object",
  15201. "properties": {
  15202. "url": {
  15203. "type": "string"
  15204. }
  15205. },
  15206. "required": ["url"],
  15207. "additionalProperties": false
  15208. },
  15209. "title": {
  15210. "type": "string"
  15211. },
  15212. "agent": {
  15213. "type": "string"
  15214. },
  15215. "model": {
  15216. "type": "object",
  15217. "properties": {
  15218. "id": {
  15219. "type": "string"
  15220. },
  15221. "providerID": {
  15222. "type": "string"
  15223. },
  15224. "variant": {
  15225. "type": "string"
  15226. }
  15227. },
  15228. "required": ["id", "providerID"],
  15229. "additionalProperties": false
  15230. },
  15231. "version": {
  15232. "type": "string"
  15233. },
  15234. "metadata": {
  15235. "type": "object"
  15236. },
  15237. "time": {
  15238. "type": "object",
  15239. "properties": {
  15240. "created": {
  15241. "type": "integer",
  15242. "minimum": 0
  15243. },
  15244. "updated": {
  15245. "type": "integer",
  15246. "minimum": 0
  15247. },
  15248. "compacting": {
  15249. "type": "integer",
  15250. "minimum": 0
  15251. },
  15252. "archived": {
  15253. "type": "number"
  15254. }
  15255. },
  15256. "required": ["created", "updated"],
  15257. "additionalProperties": false
  15258. },
  15259. "permission": {
  15260. "$ref": "#/components/schemas/PermissionRuleset"
  15261. },
  15262. "revert": {
  15263. "type": "object",
  15264. "properties": {
  15265. "messageID": {
  15266. "type": "string",
  15267. "pattern": "^msg"
  15268. },
  15269. "partID": {
  15270. "type": "string",
  15271. "pattern": "^prt"
  15272. },
  15273. "snapshot": {
  15274. "type": "string"
  15275. },
  15276. "diff": {
  15277. "type": "string"
  15278. }
  15279. },
  15280. "required": ["messageID"],
  15281. "additionalProperties": false
  15282. }
  15283. },
  15284. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  15285. "additionalProperties": false
  15286. },
  15287. "OutputFormatText": {
  15288. "type": "object",
  15289. "properties": {
  15290. "type": {
  15291. "type": "string",
  15292. "enum": ["text"]
  15293. }
  15294. },
  15295. "required": ["type"],
  15296. "additionalProperties": false
  15297. },
  15298. "JSONSchema": {
  15299. "type": "object"
  15300. },
  15301. "OutputFormatJsonSchema": {
  15302. "type": "object",
  15303. "properties": {
  15304. "type": {
  15305. "type": "string",
  15306. "enum": ["json_schema"]
  15307. },
  15308. "schema": {
  15309. "$ref": "#/components/schemas/JSONSchema"
  15310. },
  15311. "retryCount": {
  15312. "type": "integer",
  15313. "minimum": 0
  15314. }
  15315. },
  15316. "required": ["type", "schema"],
  15317. "additionalProperties": false
  15318. },
  15319. "OutputFormat": {
  15320. "anyOf": [
  15321. {
  15322. "$ref": "#/components/schemas/OutputFormatText"
  15323. },
  15324. {
  15325. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  15326. }
  15327. ]
  15328. },
  15329. "UserMessage": {
  15330. "type": "object",
  15331. "properties": {
  15332. "id": {
  15333. "type": "string",
  15334. "pattern": "^msg"
  15335. },
  15336. "sessionID": {
  15337. "type": "string",
  15338. "pattern": "^ses"
  15339. },
  15340. "role": {
  15341. "type": "string",
  15342. "enum": ["user"]
  15343. },
  15344. "time": {
  15345. "type": "object",
  15346. "properties": {
  15347. "created": {
  15348. "type": "number",
  15349. "minimum": 0
  15350. }
  15351. },
  15352. "required": ["created"],
  15353. "additionalProperties": false
  15354. },
  15355. "format": {
  15356. "$ref": "#/components/schemas/OutputFormat"
  15357. },
  15358. "summary": {
  15359. "type": "object",
  15360. "properties": {
  15361. "title": {
  15362. "type": "string"
  15363. },
  15364. "body": {
  15365. "type": "string"
  15366. },
  15367. "diffs": {
  15368. "type": "array",
  15369. "items": {
  15370. "$ref": "#/components/schemas/SnapshotFileDiff"
  15371. }
  15372. }
  15373. },
  15374. "required": ["diffs"],
  15375. "additionalProperties": false
  15376. },
  15377. "agent": {
  15378. "type": "string"
  15379. },
  15380. "model": {
  15381. "type": "object",
  15382. "properties": {
  15383. "providerID": {
  15384. "type": "string"
  15385. },
  15386. "modelID": {
  15387. "type": "string"
  15388. },
  15389. "variant": {
  15390. "type": "string"
  15391. }
  15392. },
  15393. "required": ["providerID", "modelID"],
  15394. "additionalProperties": false
  15395. },
  15396. "system": {
  15397. "type": "string"
  15398. },
  15399. "tools": {
  15400. "type": "object",
  15401. "additionalProperties": {
  15402. "type": "boolean"
  15403. }
  15404. }
  15405. },
  15406. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  15407. "additionalProperties": false
  15408. },
  15409. "ProviderAuthError": {
  15410. "type": "object",
  15411. "properties": {
  15412. "name": {
  15413. "type": "string",
  15414. "enum": ["ProviderAuthError"]
  15415. },
  15416. "data": {
  15417. "type": "object",
  15418. "properties": {
  15419. "providerID": {
  15420. "type": "string"
  15421. },
  15422. "message": {
  15423. "type": "string"
  15424. }
  15425. },
  15426. "required": ["providerID", "message"],
  15427. "additionalProperties": false
  15428. }
  15429. },
  15430. "required": ["name", "data"],
  15431. "additionalProperties": false
  15432. },
  15433. "UnknownError": {
  15434. "type": "object",
  15435. "properties": {
  15436. "name": {
  15437. "type": "string",
  15438. "enum": ["UnknownError"]
  15439. },
  15440. "data": {
  15441. "type": "object",
  15442. "properties": {
  15443. "message": {
  15444. "type": "string"
  15445. },
  15446. "ref": {
  15447. "type": "string"
  15448. }
  15449. },
  15450. "required": ["message"],
  15451. "additionalProperties": false
  15452. }
  15453. },
  15454. "required": ["name", "data"],
  15455. "additionalProperties": false
  15456. },
  15457. "MessageOutputLengthError": {
  15458. "type": "object",
  15459. "properties": {
  15460. "name": {
  15461. "type": "string",
  15462. "enum": ["MessageOutputLengthError"]
  15463. },
  15464. "data": {
  15465. "type": "object",
  15466. "properties": {}
  15467. }
  15468. },
  15469. "required": ["name", "data"],
  15470. "additionalProperties": false
  15471. },
  15472. "MessageAbortedError": {
  15473. "type": "object",
  15474. "properties": {
  15475. "name": {
  15476. "type": "string",
  15477. "enum": ["MessageAbortedError"]
  15478. },
  15479. "data": {
  15480. "type": "object",
  15481. "properties": {
  15482. "message": {
  15483. "type": "string"
  15484. }
  15485. },
  15486. "required": ["message"],
  15487. "additionalProperties": false
  15488. }
  15489. },
  15490. "required": ["name", "data"],
  15491. "additionalProperties": false
  15492. },
  15493. "StructuredOutputError": {
  15494. "type": "object",
  15495. "properties": {
  15496. "name": {
  15497. "type": "string",
  15498. "enum": ["StructuredOutputError"]
  15499. },
  15500. "data": {
  15501. "type": "object",
  15502. "properties": {
  15503. "message": {
  15504. "type": "string"
  15505. },
  15506. "retries": {
  15507. "type": "integer",
  15508. "minimum": 0
  15509. }
  15510. },
  15511. "required": ["message", "retries"],
  15512. "additionalProperties": false
  15513. }
  15514. },
  15515. "required": ["name", "data"],
  15516. "additionalProperties": false
  15517. },
  15518. "ContextOverflowError": {
  15519. "type": "object",
  15520. "properties": {
  15521. "name": {
  15522. "type": "string",
  15523. "enum": ["ContextOverflowError"]
  15524. },
  15525. "data": {
  15526. "type": "object",
  15527. "properties": {
  15528. "message": {
  15529. "type": "string"
  15530. },
  15531. "responseBody": {
  15532. "type": "string"
  15533. }
  15534. },
  15535. "required": ["message"],
  15536. "additionalProperties": false
  15537. }
  15538. },
  15539. "required": ["name", "data"],
  15540. "additionalProperties": false
  15541. },
  15542. "ContentFilterError": {
  15543. "type": "object",
  15544. "properties": {
  15545. "name": {
  15546. "type": "string",
  15547. "enum": ["ContentFilterError"]
  15548. },
  15549. "data": {
  15550. "type": "object",
  15551. "properties": {
  15552. "message": {
  15553. "type": "string"
  15554. }
  15555. },
  15556. "required": ["message"],
  15557. "additionalProperties": false
  15558. }
  15559. },
  15560. "required": ["name", "data"],
  15561. "additionalProperties": false
  15562. },
  15563. "APIError": {
  15564. "type": "object",
  15565. "properties": {
  15566. "name": {
  15567. "type": "string",
  15568. "enum": ["APIError"]
  15569. },
  15570. "data": {
  15571. "type": "object",
  15572. "properties": {
  15573. "message": {
  15574. "type": "string"
  15575. },
  15576. "statusCode": {
  15577. "type": "integer",
  15578. "minimum": 0
  15579. },
  15580. "isRetryable": {
  15581. "type": "boolean"
  15582. },
  15583. "responseHeaders": {
  15584. "type": "object",
  15585. "additionalProperties": {
  15586. "type": "string"
  15587. }
  15588. },
  15589. "responseBody": {
  15590. "type": "string"
  15591. },
  15592. "metadata": {
  15593. "type": "object",
  15594. "additionalProperties": {
  15595. "type": "string"
  15596. }
  15597. }
  15598. },
  15599. "required": ["message", "isRetryable"],
  15600. "additionalProperties": false
  15601. }
  15602. },
  15603. "required": ["name", "data"],
  15604. "additionalProperties": false
  15605. },
  15606. "AssistantMessage": {
  15607. "type": "object",
  15608. "properties": {
  15609. "id": {
  15610. "type": "string",
  15611. "pattern": "^msg"
  15612. },
  15613. "sessionID": {
  15614. "type": "string",
  15615. "pattern": "^ses"
  15616. },
  15617. "role": {
  15618. "type": "string",
  15619. "enum": ["assistant"]
  15620. },
  15621. "time": {
  15622. "type": "object",
  15623. "properties": {
  15624. "created": {
  15625. "type": "integer",
  15626. "minimum": 0
  15627. },
  15628. "completed": {
  15629. "type": "integer",
  15630. "minimum": 0
  15631. }
  15632. },
  15633. "required": ["created"],
  15634. "additionalProperties": false
  15635. },
  15636. "error": {
  15637. "anyOf": [
  15638. {
  15639. "$ref": "#/components/schemas/ProviderAuthError"
  15640. },
  15641. {
  15642. "$ref": "#/components/schemas/UnknownError"
  15643. },
  15644. {
  15645. "$ref": "#/components/schemas/MessageOutputLengthError"
  15646. },
  15647. {
  15648. "$ref": "#/components/schemas/MessageAbortedError"
  15649. },
  15650. {
  15651. "$ref": "#/components/schemas/StructuredOutputError"
  15652. },
  15653. {
  15654. "$ref": "#/components/schemas/ContextOverflowError"
  15655. },
  15656. {
  15657. "$ref": "#/components/schemas/ContentFilterError"
  15658. },
  15659. {
  15660. "$ref": "#/components/schemas/APIError"
  15661. }
  15662. ]
  15663. },
  15664. "parentID": {
  15665. "type": "string",
  15666. "pattern": "^msg"
  15667. },
  15668. "modelID": {
  15669. "type": "string"
  15670. },
  15671. "providerID": {
  15672. "type": "string"
  15673. },
  15674. "mode": {
  15675. "type": "string"
  15676. },
  15677. "agent": {
  15678. "type": "string"
  15679. },
  15680. "path": {
  15681. "type": "object",
  15682. "properties": {
  15683. "cwd": {
  15684. "type": "string"
  15685. },
  15686. "root": {
  15687. "type": "string"
  15688. }
  15689. },
  15690. "required": ["cwd", "root"],
  15691. "additionalProperties": false
  15692. },
  15693. "summary": {
  15694. "type": "boolean"
  15695. },
  15696. "cost": {
  15697. "type": "number"
  15698. },
  15699. "tokens": {
  15700. "type": "object",
  15701. "properties": {
  15702. "total": {
  15703. "type": "number"
  15704. },
  15705. "input": {
  15706. "type": "number"
  15707. },
  15708. "output": {
  15709. "type": "number"
  15710. },
  15711. "reasoning": {
  15712. "type": "number"
  15713. },
  15714. "cache": {
  15715. "type": "object",
  15716. "properties": {
  15717. "read": {
  15718. "type": "number"
  15719. },
  15720. "write": {
  15721. "type": "number"
  15722. }
  15723. },
  15724. "required": ["read", "write"],
  15725. "additionalProperties": false
  15726. }
  15727. },
  15728. "required": ["input", "output", "reasoning", "cache"],
  15729. "additionalProperties": false
  15730. },
  15731. "structured": {},
  15732. "variant": {
  15733. "type": "string"
  15734. },
  15735. "finish": {
  15736. "type": "string"
  15737. }
  15738. },
  15739. "required": [
  15740. "id",
  15741. "sessionID",
  15742. "role",
  15743. "time",
  15744. "parentID",
  15745. "modelID",
  15746. "providerID",
  15747. "mode",
  15748. "agent",
  15749. "path",
  15750. "cost",
  15751. "tokens"
  15752. ],
  15753. "additionalProperties": false
  15754. },
  15755. "Message": {
  15756. "anyOf": [
  15757. {
  15758. "$ref": "#/components/schemas/UserMessage"
  15759. },
  15760. {
  15761. "$ref": "#/components/schemas/AssistantMessage"
  15762. }
  15763. ]
  15764. },
  15765. "TextPart": {
  15766. "type": "object",
  15767. "properties": {
  15768. "id": {
  15769. "type": "string",
  15770. "pattern": "^prt"
  15771. },
  15772. "sessionID": {
  15773. "type": "string",
  15774. "pattern": "^ses"
  15775. },
  15776. "messageID": {
  15777. "type": "string",
  15778. "pattern": "^msg"
  15779. },
  15780. "type": {
  15781. "type": "string",
  15782. "enum": ["text"]
  15783. },
  15784. "text": {
  15785. "type": "string"
  15786. },
  15787. "synthetic": {
  15788. "type": "boolean"
  15789. },
  15790. "ignored": {
  15791. "type": "boolean"
  15792. },
  15793. "time": {
  15794. "type": "object",
  15795. "properties": {
  15796. "start": {
  15797. "type": "integer",
  15798. "minimum": 0
  15799. },
  15800. "end": {
  15801. "type": "integer",
  15802. "minimum": 0
  15803. }
  15804. },
  15805. "required": ["start"],
  15806. "additionalProperties": false
  15807. },
  15808. "metadata": {
  15809. "type": "object"
  15810. }
  15811. },
  15812. "required": ["id", "sessionID", "messageID", "type", "text"],
  15813. "additionalProperties": false
  15814. },
  15815. "SubtaskPart": {
  15816. "type": "object",
  15817. "properties": {
  15818. "id": {
  15819. "type": "string",
  15820. "pattern": "^prt"
  15821. },
  15822. "sessionID": {
  15823. "type": "string",
  15824. "pattern": "^ses"
  15825. },
  15826. "messageID": {
  15827. "type": "string",
  15828. "pattern": "^msg"
  15829. },
  15830. "type": {
  15831. "type": "string",
  15832. "enum": ["subtask"]
  15833. },
  15834. "prompt": {
  15835. "type": "string"
  15836. },
  15837. "description": {
  15838. "type": "string"
  15839. },
  15840. "agent": {
  15841. "type": "string"
  15842. },
  15843. "model": {
  15844. "type": "object",
  15845. "properties": {
  15846. "providerID": {
  15847. "type": "string"
  15848. },
  15849. "modelID": {
  15850. "type": "string"
  15851. }
  15852. },
  15853. "required": ["providerID", "modelID"],
  15854. "additionalProperties": false
  15855. },
  15856. "command": {
  15857. "type": "string"
  15858. }
  15859. },
  15860. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  15861. "additionalProperties": false
  15862. },
  15863. "ReasoningPart": {
  15864. "type": "object",
  15865. "properties": {
  15866. "id": {
  15867. "type": "string",
  15868. "pattern": "^prt"
  15869. },
  15870. "sessionID": {
  15871. "type": "string",
  15872. "pattern": "^ses"
  15873. },
  15874. "messageID": {
  15875. "type": "string",
  15876. "pattern": "^msg"
  15877. },
  15878. "type": {
  15879. "type": "string",
  15880. "enum": ["reasoning"]
  15881. },
  15882. "text": {
  15883. "type": "string"
  15884. },
  15885. "metadata": {
  15886. "type": "object"
  15887. },
  15888. "time": {
  15889. "type": "object",
  15890. "properties": {
  15891. "start": {
  15892. "type": "integer",
  15893. "minimum": 0
  15894. },
  15895. "end": {
  15896. "type": "integer",
  15897. "minimum": 0
  15898. }
  15899. },
  15900. "required": ["start"],
  15901. "additionalProperties": false
  15902. }
  15903. },
  15904. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  15905. "additionalProperties": false
  15906. },
  15907. "FilePartSourceText": {
  15908. "type": "object",
  15909. "properties": {
  15910. "value": {
  15911. "type": "string"
  15912. },
  15913. "start": {
  15914. "type": "number"
  15915. },
  15916. "end": {
  15917. "type": "number"
  15918. }
  15919. },
  15920. "required": ["value", "start", "end"],
  15921. "additionalProperties": false
  15922. },
  15923. "FileSource": {
  15924. "type": "object",
  15925. "properties": {
  15926. "text": {
  15927. "$ref": "#/components/schemas/FilePartSourceText"
  15928. },
  15929. "type": {
  15930. "type": "string",
  15931. "enum": ["file"]
  15932. },
  15933. "path": {
  15934. "type": "string"
  15935. }
  15936. },
  15937. "required": ["text", "type", "path"],
  15938. "additionalProperties": false
  15939. },
  15940. "Range": {
  15941. "type": "object",
  15942. "properties": {
  15943. "start": {
  15944. "type": "object",
  15945. "properties": {
  15946. "line": {
  15947. "type": "integer",
  15948. "minimum": 0
  15949. },
  15950. "character": {
  15951. "type": "integer",
  15952. "minimum": 0
  15953. }
  15954. },
  15955. "required": ["line", "character"],
  15956. "additionalProperties": false
  15957. },
  15958. "end": {
  15959. "type": "object",
  15960. "properties": {
  15961. "line": {
  15962. "type": "integer",
  15963. "minimum": 0
  15964. },
  15965. "character": {
  15966. "type": "integer",
  15967. "minimum": 0
  15968. }
  15969. },
  15970. "required": ["line", "character"],
  15971. "additionalProperties": false
  15972. }
  15973. },
  15974. "required": ["start", "end"],
  15975. "additionalProperties": false
  15976. },
  15977. "SymbolSource": {
  15978. "type": "object",
  15979. "properties": {
  15980. "text": {
  15981. "$ref": "#/components/schemas/FilePartSourceText"
  15982. },
  15983. "type": {
  15984. "type": "string",
  15985. "enum": ["symbol"]
  15986. },
  15987. "path": {
  15988. "type": "string"
  15989. },
  15990. "range": {
  15991. "$ref": "#/components/schemas/Range"
  15992. },
  15993. "name": {
  15994. "type": "string"
  15995. },
  15996. "kind": {
  15997. "type": "integer",
  15998. "minimum": 0
  15999. }
  16000. },
  16001. "required": ["text", "type", "path", "range", "name", "kind"],
  16002. "additionalProperties": false
  16003. },
  16004. "ResourceSource": {
  16005. "type": "object",
  16006. "properties": {
  16007. "text": {
  16008. "$ref": "#/components/schemas/FilePartSourceText"
  16009. },
  16010. "type": {
  16011. "type": "string",
  16012. "enum": ["resource"]
  16013. },
  16014. "clientName": {
  16015. "type": "string"
  16016. },
  16017. "uri": {
  16018. "type": "string"
  16019. }
  16020. },
  16021. "required": ["text", "type", "clientName", "uri"],
  16022. "additionalProperties": false
  16023. },
  16024. "FilePartSource": {
  16025. "anyOf": [
  16026. {
  16027. "$ref": "#/components/schemas/FileSource"
  16028. },
  16029. {
  16030. "$ref": "#/components/schemas/SymbolSource"
  16031. },
  16032. {
  16033. "$ref": "#/components/schemas/ResourceSource"
  16034. }
  16035. ]
  16036. },
  16037. "FilePart": {
  16038. "type": "object",
  16039. "properties": {
  16040. "id": {
  16041. "type": "string",
  16042. "pattern": "^prt"
  16043. },
  16044. "sessionID": {
  16045. "type": "string",
  16046. "pattern": "^ses"
  16047. },
  16048. "messageID": {
  16049. "type": "string",
  16050. "pattern": "^msg"
  16051. },
  16052. "type": {
  16053. "type": "string",
  16054. "enum": ["file"]
  16055. },
  16056. "mime": {
  16057. "type": "string"
  16058. },
  16059. "filename": {
  16060. "type": "string"
  16061. },
  16062. "url": {
  16063. "type": "string"
  16064. },
  16065. "source": {
  16066. "$ref": "#/components/schemas/FilePartSource"
  16067. }
  16068. },
  16069. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  16070. "additionalProperties": false
  16071. },
  16072. "ToolStatePending": {
  16073. "type": "object",
  16074. "properties": {
  16075. "status": {
  16076. "type": "string",
  16077. "enum": ["pending"]
  16078. },
  16079. "input": {
  16080. "type": "object"
  16081. },
  16082. "raw": {
  16083. "type": "string"
  16084. }
  16085. },
  16086. "required": ["status", "input", "raw"],
  16087. "additionalProperties": false
  16088. },
  16089. "ToolStateRunning": {
  16090. "type": "object",
  16091. "properties": {
  16092. "status": {
  16093. "type": "string",
  16094. "enum": ["running"]
  16095. },
  16096. "input": {
  16097. "type": "object"
  16098. },
  16099. "title": {
  16100. "type": "string"
  16101. },
  16102. "metadata": {
  16103. "type": "object"
  16104. },
  16105. "time": {
  16106. "type": "object",
  16107. "properties": {
  16108. "start": {
  16109. "type": "integer",
  16110. "minimum": 0
  16111. }
  16112. },
  16113. "required": ["start"],
  16114. "additionalProperties": false
  16115. }
  16116. },
  16117. "required": ["status", "input", "time"],
  16118. "additionalProperties": false
  16119. },
  16120. "ToolStateCompleted": {
  16121. "type": "object",
  16122. "properties": {
  16123. "status": {
  16124. "type": "string",
  16125. "enum": ["completed"]
  16126. },
  16127. "input": {
  16128. "type": "object"
  16129. },
  16130. "output": {
  16131. "type": "string"
  16132. },
  16133. "title": {
  16134. "type": "string"
  16135. },
  16136. "metadata": {
  16137. "type": "object"
  16138. },
  16139. "time": {
  16140. "type": "object",
  16141. "properties": {
  16142. "start": {
  16143. "type": "integer",
  16144. "minimum": 0
  16145. },
  16146. "end": {
  16147. "type": "integer",
  16148. "minimum": 0
  16149. },
  16150. "compacted": {
  16151. "type": "integer",
  16152. "minimum": 0
  16153. }
  16154. },
  16155. "required": ["start", "end"],
  16156. "additionalProperties": false
  16157. },
  16158. "attachments": {
  16159. "type": "array",
  16160. "items": {
  16161. "$ref": "#/components/schemas/FilePart"
  16162. }
  16163. }
  16164. },
  16165. "required": ["status", "input", "output", "title", "metadata", "time"],
  16166. "additionalProperties": false
  16167. },
  16168. "ToolStateError": {
  16169. "type": "object",
  16170. "properties": {
  16171. "status": {
  16172. "type": "string",
  16173. "enum": ["error"]
  16174. },
  16175. "input": {
  16176. "type": "object"
  16177. },
  16178. "error": {
  16179. "type": "string"
  16180. },
  16181. "metadata": {
  16182. "type": "object"
  16183. },
  16184. "time": {
  16185. "type": "object",
  16186. "properties": {
  16187. "start": {
  16188. "type": "integer",
  16189. "minimum": 0
  16190. },
  16191. "end": {
  16192. "type": "integer",
  16193. "minimum": 0
  16194. }
  16195. },
  16196. "required": ["start", "end"],
  16197. "additionalProperties": false
  16198. }
  16199. },
  16200. "required": ["status", "input", "error", "time"],
  16201. "additionalProperties": false
  16202. },
  16203. "ToolState": {
  16204. "anyOf": [
  16205. {
  16206. "$ref": "#/components/schemas/ToolStatePending"
  16207. },
  16208. {
  16209. "$ref": "#/components/schemas/ToolStateRunning"
  16210. },
  16211. {
  16212. "$ref": "#/components/schemas/ToolStateCompleted"
  16213. },
  16214. {
  16215. "$ref": "#/components/schemas/ToolStateError"
  16216. }
  16217. ]
  16218. },
  16219. "ToolPart": {
  16220. "type": "object",
  16221. "properties": {
  16222. "id": {
  16223. "type": "string",
  16224. "pattern": "^prt"
  16225. },
  16226. "sessionID": {
  16227. "type": "string",
  16228. "pattern": "^ses"
  16229. },
  16230. "messageID": {
  16231. "type": "string",
  16232. "pattern": "^msg"
  16233. },
  16234. "type": {
  16235. "type": "string",
  16236. "enum": ["tool"]
  16237. },
  16238. "callID": {
  16239. "type": "string"
  16240. },
  16241. "tool": {
  16242. "type": "string"
  16243. },
  16244. "state": {
  16245. "$ref": "#/components/schemas/ToolState"
  16246. },
  16247. "metadata": {
  16248. "type": "object"
  16249. }
  16250. },
  16251. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  16252. "additionalProperties": false
  16253. },
  16254. "StepStartPart": {
  16255. "type": "object",
  16256. "properties": {
  16257. "id": {
  16258. "type": "string",
  16259. "pattern": "^prt"
  16260. },
  16261. "sessionID": {
  16262. "type": "string",
  16263. "pattern": "^ses"
  16264. },
  16265. "messageID": {
  16266. "type": "string",
  16267. "pattern": "^msg"
  16268. },
  16269. "type": {
  16270. "type": "string",
  16271. "enum": ["step-start"]
  16272. },
  16273. "snapshot": {
  16274. "type": "string"
  16275. }
  16276. },
  16277. "required": ["id", "sessionID", "messageID", "type"],
  16278. "additionalProperties": false
  16279. },
  16280. "StepFinishPart": {
  16281. "type": "object",
  16282. "properties": {
  16283. "id": {
  16284. "type": "string",
  16285. "pattern": "^prt"
  16286. },
  16287. "sessionID": {
  16288. "type": "string",
  16289. "pattern": "^ses"
  16290. },
  16291. "messageID": {
  16292. "type": "string",
  16293. "pattern": "^msg"
  16294. },
  16295. "type": {
  16296. "type": "string",
  16297. "enum": ["step-finish"]
  16298. },
  16299. "reason": {
  16300. "type": "string"
  16301. },
  16302. "snapshot": {
  16303. "type": "string"
  16304. },
  16305. "cost": {
  16306. "type": "number"
  16307. },
  16308. "tokens": {
  16309. "type": "object",
  16310. "properties": {
  16311. "total": {
  16312. "type": "number"
  16313. },
  16314. "input": {
  16315. "type": "number"
  16316. },
  16317. "output": {
  16318. "type": "number"
  16319. },
  16320. "reasoning": {
  16321. "type": "number"
  16322. },
  16323. "cache": {
  16324. "type": "object",
  16325. "properties": {
  16326. "read": {
  16327. "type": "number"
  16328. },
  16329. "write": {
  16330. "type": "number"
  16331. }
  16332. },
  16333. "required": ["read", "write"],
  16334. "additionalProperties": false
  16335. }
  16336. },
  16337. "required": ["input", "output", "reasoning", "cache"],
  16338. "additionalProperties": false
  16339. }
  16340. },
  16341. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  16342. "additionalProperties": false
  16343. },
  16344. "SnapshotPart": {
  16345. "type": "object",
  16346. "properties": {
  16347. "id": {
  16348. "type": "string",
  16349. "pattern": "^prt"
  16350. },
  16351. "sessionID": {
  16352. "type": "string",
  16353. "pattern": "^ses"
  16354. },
  16355. "messageID": {
  16356. "type": "string",
  16357. "pattern": "^msg"
  16358. },
  16359. "type": {
  16360. "type": "string",
  16361. "enum": ["snapshot"]
  16362. },
  16363. "snapshot": {
  16364. "type": "string"
  16365. }
  16366. },
  16367. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  16368. "additionalProperties": false
  16369. },
  16370. "PatchPart": {
  16371. "type": "object",
  16372. "properties": {
  16373. "id": {
  16374. "type": "string",
  16375. "pattern": "^prt"
  16376. },
  16377. "sessionID": {
  16378. "type": "string",
  16379. "pattern": "^ses"
  16380. },
  16381. "messageID": {
  16382. "type": "string",
  16383. "pattern": "^msg"
  16384. },
  16385. "type": {
  16386. "type": "string",
  16387. "enum": ["patch"]
  16388. },
  16389. "hash": {
  16390. "type": "string"
  16391. },
  16392. "files": {
  16393. "type": "array",
  16394. "items": {
  16395. "type": "string"
  16396. }
  16397. }
  16398. },
  16399. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  16400. "additionalProperties": false
  16401. },
  16402. "AgentPart": {
  16403. "type": "object",
  16404. "properties": {
  16405. "id": {
  16406. "type": "string",
  16407. "pattern": "^prt"
  16408. },
  16409. "sessionID": {
  16410. "type": "string",
  16411. "pattern": "^ses"
  16412. },
  16413. "messageID": {
  16414. "type": "string",
  16415. "pattern": "^msg"
  16416. },
  16417. "type": {
  16418. "type": "string",
  16419. "enum": ["agent"]
  16420. },
  16421. "name": {
  16422. "type": "string"
  16423. },
  16424. "source": {
  16425. "type": "object",
  16426. "properties": {
  16427. "value": {
  16428. "type": "string"
  16429. },
  16430. "start": {
  16431. "type": "integer",
  16432. "minimum": 0
  16433. },
  16434. "end": {
  16435. "type": "integer",
  16436. "minimum": 0
  16437. }
  16438. },
  16439. "required": ["value", "start", "end"],
  16440. "additionalProperties": false
  16441. }
  16442. },
  16443. "required": ["id", "sessionID", "messageID", "type", "name"],
  16444. "additionalProperties": false
  16445. },
  16446. "RetryPart": {
  16447. "type": "object",
  16448. "properties": {
  16449. "id": {
  16450. "type": "string",
  16451. "pattern": "^prt"
  16452. },
  16453. "sessionID": {
  16454. "type": "string",
  16455. "pattern": "^ses"
  16456. },
  16457. "messageID": {
  16458. "type": "string",
  16459. "pattern": "^msg"
  16460. },
  16461. "type": {
  16462. "type": "string",
  16463. "enum": ["retry"]
  16464. },
  16465. "attempt": {
  16466. "type": "integer",
  16467. "minimum": 0
  16468. },
  16469. "error": {
  16470. "$ref": "#/components/schemas/APIError"
  16471. },
  16472. "time": {
  16473. "type": "object",
  16474. "properties": {
  16475. "created": {
  16476. "type": "integer",
  16477. "minimum": 0
  16478. }
  16479. },
  16480. "required": ["created"],
  16481. "additionalProperties": false
  16482. }
  16483. },
  16484. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  16485. "additionalProperties": false
  16486. },
  16487. "CompactionPart": {
  16488. "type": "object",
  16489. "properties": {
  16490. "id": {
  16491. "type": "string",
  16492. "pattern": "^prt"
  16493. },
  16494. "sessionID": {
  16495. "type": "string",
  16496. "pattern": "^ses"
  16497. },
  16498. "messageID": {
  16499. "type": "string",
  16500. "pattern": "^msg"
  16501. },
  16502. "type": {
  16503. "type": "string",
  16504. "enum": ["compaction"]
  16505. },
  16506. "auto": {
  16507. "type": "boolean"
  16508. },
  16509. "overflow": {
  16510. "type": "boolean"
  16511. },
  16512. "tail_start_id": {
  16513. "type": "string",
  16514. "pattern": "^msg"
  16515. }
  16516. },
  16517. "required": ["id", "sessionID", "messageID", "type", "auto"],
  16518. "additionalProperties": false
  16519. },
  16520. "Part": {
  16521. "anyOf": [
  16522. {
  16523. "$ref": "#/components/schemas/TextPart"
  16524. },
  16525. {
  16526. "$ref": "#/components/schemas/SubtaskPart"
  16527. },
  16528. {
  16529. "$ref": "#/components/schemas/ReasoningPart"
  16530. },
  16531. {
  16532. "$ref": "#/components/schemas/FilePart"
  16533. },
  16534. {
  16535. "$ref": "#/components/schemas/ToolPart"
  16536. },
  16537. {
  16538. "$ref": "#/components/schemas/StepStartPart"
  16539. },
  16540. {
  16541. "$ref": "#/components/schemas/StepFinishPart"
  16542. },
  16543. {
  16544. "$ref": "#/components/schemas/SnapshotPart"
  16545. },
  16546. {
  16547. "$ref": "#/components/schemas/PatchPart"
  16548. },
  16549. {
  16550. "$ref": "#/components/schemas/AgentPart"
  16551. },
  16552. {
  16553. "$ref": "#/components/schemas/RetryPart"
  16554. },
  16555. {
  16556. "$ref": "#/components/schemas/CompactionPart"
  16557. }
  16558. ]
  16559. },
  16560. "Prompt": {
  16561. "type": "object",
  16562. "properties": {
  16563. "text": {
  16564. "type": "string"
  16565. },
  16566. "files": {
  16567. "type": "array",
  16568. "items": {
  16569. "$ref": "#/components/schemas/PromptFileAttachment"
  16570. }
  16571. },
  16572. "agents": {
  16573. "type": "array",
  16574. "items": {
  16575. "$ref": "#/components/schemas/PromptAgentAttachment"
  16576. }
  16577. }
  16578. },
  16579. "required": ["text"],
  16580. "additionalProperties": false
  16581. },
  16582. "Pty": {
  16583. "type": "object",
  16584. "properties": {
  16585. "id": {
  16586. "type": "string",
  16587. "pattern": "^pty"
  16588. },
  16589. "title": {
  16590. "type": "string"
  16591. },
  16592. "command": {
  16593. "type": "string"
  16594. },
  16595. "args": {
  16596. "type": "array",
  16597. "items": {
  16598. "type": "string"
  16599. }
  16600. },
  16601. "cwd": {
  16602. "type": "string"
  16603. },
  16604. "status": {
  16605. "type": "string",
  16606. "enum": ["running", "exited"]
  16607. },
  16608. "pid": {
  16609. "type": "integer",
  16610. "minimum": 0
  16611. },
  16612. "exitCode": {
  16613. "type": "integer",
  16614. "minimum": 0
  16615. }
  16616. },
  16617. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  16618. "additionalProperties": false
  16619. },
  16620. "Todo": {
  16621. "type": "object",
  16622. "properties": {
  16623. "content": {
  16624. "type": "string",
  16625. "description": "Brief description of the task"
  16626. },
  16627. "status": {
  16628. "type": "string",
  16629. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  16630. },
  16631. "priority": {
  16632. "type": "string",
  16633. "description": "Priority level of the task: high, medium, low"
  16634. }
  16635. },
  16636. "required": ["content", "status", "priority"],
  16637. "additionalProperties": false
  16638. },
  16639. "SessionStatus": {
  16640. "anyOf": [
  16641. {
  16642. "type": "object",
  16643. "properties": {
  16644. "type": {
  16645. "type": "string",
  16646. "enum": ["idle"]
  16647. }
  16648. },
  16649. "required": ["type"],
  16650. "additionalProperties": false
  16651. },
  16652. {
  16653. "type": "object",
  16654. "properties": {
  16655. "type": {
  16656. "type": "string",
  16657. "enum": ["retry"]
  16658. },
  16659. "attempt": {
  16660. "type": "integer",
  16661. "minimum": 0
  16662. },
  16663. "message": {
  16664. "type": "string"
  16665. },
  16666. "action": {
  16667. "type": "object",
  16668. "properties": {
  16669. "reason": {
  16670. "type": "string"
  16671. },
  16672. "provider": {
  16673. "type": "string"
  16674. },
  16675. "title": {
  16676. "type": "string"
  16677. },
  16678. "message": {
  16679. "type": "string"
  16680. },
  16681. "label": {
  16682. "type": "string"
  16683. },
  16684. "link": {
  16685. "type": "string"
  16686. }
  16687. },
  16688. "required": ["reason", "provider", "title", "message", "label"],
  16689. "additionalProperties": false
  16690. },
  16691. "next": {
  16692. "type": "integer",
  16693. "minimum": 0
  16694. }
  16695. },
  16696. "required": ["type", "attempt", "message", "next"],
  16697. "additionalProperties": false
  16698. },
  16699. {
  16700. "type": "object",
  16701. "properties": {
  16702. "type": {
  16703. "type": "string",
  16704. "enum": ["busy"]
  16705. }
  16706. },
  16707. "required": ["type"],
  16708. "additionalProperties": false
  16709. }
  16710. ]
  16711. },
  16712. "QuestionOption": {
  16713. "type": "object",
  16714. "properties": {
  16715. "label": {
  16716. "type": "string",
  16717. "description": "Display text (1-5 words, concise)"
  16718. },
  16719. "description": {
  16720. "type": "string",
  16721. "description": "Explanation of choice"
  16722. }
  16723. },
  16724. "required": ["label", "description"],
  16725. "additionalProperties": false
  16726. },
  16727. "QuestionInfo": {
  16728. "type": "object",
  16729. "properties": {
  16730. "question": {
  16731. "type": "string",
  16732. "description": "Complete question"
  16733. },
  16734. "header": {
  16735. "type": "string",
  16736. "description": "Very short label (max 30 chars)"
  16737. },
  16738. "options": {
  16739. "type": "array",
  16740. "items": {
  16741. "$ref": "#/components/schemas/QuestionOption"
  16742. },
  16743. "description": "Available choices"
  16744. },
  16745. "multiple": {
  16746. "type": "boolean"
  16747. },
  16748. "custom": {
  16749. "type": "boolean"
  16750. }
  16751. },
  16752. "required": ["question", "header", "options"],
  16753. "additionalProperties": false
  16754. },
  16755. "QuestionTool": {
  16756. "type": "object",
  16757. "properties": {
  16758. "messageID": {
  16759. "type": "string",
  16760. "pattern": "^msg"
  16761. },
  16762. "callID": {
  16763. "type": "string"
  16764. }
  16765. },
  16766. "required": ["messageID", "callID"],
  16767. "additionalProperties": false
  16768. },
  16769. "QuestionAnswer": {
  16770. "type": "array",
  16771. "items": {
  16772. "type": "string"
  16773. }
  16774. },
  16775. "GlobalEvent": {
  16776. "type": "object",
  16777. "properties": {
  16778. "directory": {
  16779. "type": "string"
  16780. },
  16781. "project": {
  16782. "type": "string"
  16783. },
  16784. "workspace": {
  16785. "type": "string"
  16786. },
  16787. "payload": {
  16788. "anyOf": [
  16789. {
  16790. "type": "object",
  16791. "properties": {
  16792. "id": {
  16793. "type": "string",
  16794. "pattern": "^evt_"
  16795. },
  16796. "type": {
  16797. "type": "string",
  16798. "enum": ["models-dev.refreshed"]
  16799. },
  16800. "properties": {
  16801. "type": "object",
  16802. "properties": {}
  16803. }
  16804. },
  16805. "required": ["id", "type", "properties"],
  16806. "additionalProperties": false
  16807. },
  16808. {
  16809. "type": "object",
  16810. "properties": {
  16811. "id": {
  16812. "type": "string",
  16813. "pattern": "^evt_"
  16814. },
  16815. "type": {
  16816. "type": "string",
  16817. "enum": ["integration.updated"]
  16818. },
  16819. "properties": {
  16820. "type": "object",
  16821. "properties": {}
  16822. }
  16823. },
  16824. "required": ["id", "type", "properties"],
  16825. "additionalProperties": false
  16826. },
  16827. {
  16828. "type": "object",
  16829. "properties": {
  16830. "id": {
  16831. "type": "string",
  16832. "pattern": "^evt_"
  16833. },
  16834. "type": {
  16835. "type": "string",
  16836. "enum": ["integration.connection.updated"]
  16837. },
  16838. "properties": {
  16839. "type": "object",
  16840. "properties": {
  16841. "integrationID": {
  16842. "type": "string"
  16843. }
  16844. },
  16845. "required": ["integrationID"],
  16846. "additionalProperties": false
  16847. }
  16848. },
  16849. "required": ["id", "type", "properties"],
  16850. "additionalProperties": false
  16851. },
  16852. {
  16853. "type": "object",
  16854. "properties": {
  16855. "id": {
  16856. "type": "string",
  16857. "pattern": "^evt_"
  16858. },
  16859. "type": {
  16860. "type": "string",
  16861. "enum": ["catalog.updated"]
  16862. },
  16863. "properties": {
  16864. "type": "object",
  16865. "properties": {}
  16866. }
  16867. },
  16868. "required": ["id", "type", "properties"],
  16869. "additionalProperties": false
  16870. },
  16871. {
  16872. "type": "object",
  16873. "properties": {
  16874. "id": {
  16875. "type": "string",
  16876. "pattern": "^evt_"
  16877. },
  16878. "type": {
  16879. "type": "string",
  16880. "enum": ["session.created"]
  16881. },
  16882. "properties": {
  16883. "type": "object",
  16884. "properties": {
  16885. "sessionID": {
  16886. "type": "string",
  16887. "pattern": "^ses"
  16888. },
  16889. "info": {
  16890. "$ref": "#/components/schemas/Session"
  16891. }
  16892. },
  16893. "required": ["sessionID", "info"],
  16894. "additionalProperties": false
  16895. }
  16896. },
  16897. "required": ["id", "type", "properties"],
  16898. "additionalProperties": false
  16899. },
  16900. {
  16901. "type": "object",
  16902. "properties": {
  16903. "id": {
  16904. "type": "string",
  16905. "pattern": "^evt_"
  16906. },
  16907. "type": {
  16908. "type": "string",
  16909. "enum": ["session.updated"]
  16910. },
  16911. "properties": {
  16912. "type": "object",
  16913. "properties": {
  16914. "sessionID": {
  16915. "type": "string",
  16916. "pattern": "^ses"
  16917. },
  16918. "info": {
  16919. "$ref": "#/components/schemas/Session"
  16920. }
  16921. },
  16922. "required": ["sessionID", "info"],
  16923. "additionalProperties": false
  16924. }
  16925. },
  16926. "required": ["id", "type", "properties"],
  16927. "additionalProperties": false
  16928. },
  16929. {
  16930. "type": "object",
  16931. "properties": {
  16932. "id": {
  16933. "type": "string",
  16934. "pattern": "^evt_"
  16935. },
  16936. "type": {
  16937. "type": "string",
  16938. "enum": ["session.deleted"]
  16939. },
  16940. "properties": {
  16941. "type": "object",
  16942. "properties": {
  16943. "sessionID": {
  16944. "type": "string",
  16945. "pattern": "^ses"
  16946. },
  16947. "info": {
  16948. "$ref": "#/components/schemas/Session"
  16949. }
  16950. },
  16951. "required": ["sessionID", "info"],
  16952. "additionalProperties": false
  16953. }
  16954. },
  16955. "required": ["id", "type", "properties"],
  16956. "additionalProperties": false
  16957. },
  16958. {
  16959. "type": "object",
  16960. "properties": {
  16961. "id": {
  16962. "type": "string",
  16963. "pattern": "^evt_"
  16964. },
  16965. "type": {
  16966. "type": "string",
  16967. "enum": ["message.updated"]
  16968. },
  16969. "properties": {
  16970. "type": "object",
  16971. "properties": {
  16972. "sessionID": {
  16973. "type": "string",
  16974. "pattern": "^ses"
  16975. },
  16976. "info": {
  16977. "$ref": "#/components/schemas/Message"
  16978. }
  16979. },
  16980. "required": ["sessionID", "info"],
  16981. "additionalProperties": false
  16982. }
  16983. },
  16984. "required": ["id", "type", "properties"],
  16985. "additionalProperties": false
  16986. },
  16987. {
  16988. "type": "object",
  16989. "properties": {
  16990. "id": {
  16991. "type": "string",
  16992. "pattern": "^evt_"
  16993. },
  16994. "type": {
  16995. "type": "string",
  16996. "enum": ["message.removed"]
  16997. },
  16998. "properties": {
  16999. "type": "object",
  17000. "properties": {
  17001. "sessionID": {
  17002. "type": "string",
  17003. "pattern": "^ses"
  17004. },
  17005. "messageID": {
  17006. "type": "string",
  17007. "pattern": "^msg"
  17008. }
  17009. },
  17010. "required": ["sessionID", "messageID"],
  17011. "additionalProperties": false
  17012. }
  17013. },
  17014. "required": ["id", "type", "properties"],
  17015. "additionalProperties": false
  17016. },
  17017. {
  17018. "type": "object",
  17019. "properties": {
  17020. "id": {
  17021. "type": "string",
  17022. "pattern": "^evt_"
  17023. },
  17024. "type": {
  17025. "type": "string",
  17026. "enum": ["message.part.updated"]
  17027. },
  17028. "properties": {
  17029. "type": "object",
  17030. "properties": {
  17031. "sessionID": {
  17032. "type": "string",
  17033. "pattern": "^ses"
  17034. },
  17035. "part": {
  17036. "$ref": "#/components/schemas/Part"
  17037. },
  17038. "time": {
  17039. "type": "number"
  17040. }
  17041. },
  17042. "required": ["sessionID", "part", "time"],
  17043. "additionalProperties": false
  17044. }
  17045. },
  17046. "required": ["id", "type", "properties"],
  17047. "additionalProperties": false
  17048. },
  17049. {
  17050. "type": "object",
  17051. "properties": {
  17052. "id": {
  17053. "type": "string",
  17054. "pattern": "^evt_"
  17055. },
  17056. "type": {
  17057. "type": "string",
  17058. "enum": ["message.part.removed"]
  17059. },
  17060. "properties": {
  17061. "type": "object",
  17062. "properties": {
  17063. "sessionID": {
  17064. "type": "string",
  17065. "pattern": "^ses"
  17066. },
  17067. "messageID": {
  17068. "type": "string",
  17069. "pattern": "^msg"
  17070. },
  17071. "partID": {
  17072. "type": "string",
  17073. "pattern": "^prt"
  17074. }
  17075. },
  17076. "required": ["sessionID", "messageID", "partID"],
  17077. "additionalProperties": false
  17078. }
  17079. },
  17080. "required": ["id", "type", "properties"],
  17081. "additionalProperties": false
  17082. },
  17083. {
  17084. "type": "object",
  17085. "properties": {
  17086. "id": {
  17087. "type": "string",
  17088. "pattern": "^evt_"
  17089. },
  17090. "type": {
  17091. "type": "string",
  17092. "enum": ["session.next.agent.switched"]
  17093. },
  17094. "properties": {
  17095. "type": "object",
  17096. "properties": {
  17097. "timestamp": {
  17098. "type": "number"
  17099. },
  17100. "sessionID": {
  17101. "type": "string",
  17102. "pattern": "^ses"
  17103. },
  17104. "messageID": {
  17105. "type": "string",
  17106. "pattern": "^msg_"
  17107. },
  17108. "agent": {
  17109. "type": "string"
  17110. }
  17111. },
  17112. "required": ["timestamp", "sessionID", "messageID", "agent"],
  17113. "additionalProperties": false
  17114. }
  17115. },
  17116. "required": ["id", "type", "properties"],
  17117. "additionalProperties": false
  17118. },
  17119. {
  17120. "type": "object",
  17121. "properties": {
  17122. "id": {
  17123. "type": "string",
  17124. "pattern": "^evt_"
  17125. },
  17126. "type": {
  17127. "type": "string",
  17128. "enum": ["session.next.model.switched"]
  17129. },
  17130. "properties": {
  17131. "type": "object",
  17132. "properties": {
  17133. "timestamp": {
  17134. "type": "number"
  17135. },
  17136. "sessionID": {
  17137. "type": "string",
  17138. "pattern": "^ses"
  17139. },
  17140. "messageID": {
  17141. "type": "string",
  17142. "pattern": "^msg_"
  17143. },
  17144. "model": {
  17145. "type": "object",
  17146. "properties": {
  17147. "id": {
  17148. "type": "string"
  17149. },
  17150. "providerID": {
  17151. "type": "string"
  17152. },
  17153. "variant": {
  17154. "type": "string"
  17155. }
  17156. },
  17157. "required": ["id", "providerID"],
  17158. "additionalProperties": false
  17159. }
  17160. },
  17161. "required": ["timestamp", "sessionID", "messageID", "model"],
  17162. "additionalProperties": false
  17163. }
  17164. },
  17165. "required": ["id", "type", "properties"],
  17166. "additionalProperties": false
  17167. },
  17168. {
  17169. "type": "object",
  17170. "properties": {
  17171. "id": {
  17172. "type": "string",
  17173. "pattern": "^evt_"
  17174. },
  17175. "type": {
  17176. "type": "string",
  17177. "enum": ["session.next.moved"]
  17178. },
  17179. "properties": {
  17180. "type": "object",
  17181. "properties": {
  17182. "timestamp": {
  17183. "type": "number"
  17184. },
  17185. "sessionID": {
  17186. "type": "string",
  17187. "pattern": "^ses"
  17188. },
  17189. "location": {
  17190. "$ref": "#/components/schemas/LocationRef"
  17191. },
  17192. "subdirectory": {
  17193. "type": "string"
  17194. }
  17195. },
  17196. "required": ["timestamp", "sessionID", "location"],
  17197. "additionalProperties": false
  17198. }
  17199. },
  17200. "required": ["id", "type", "properties"],
  17201. "additionalProperties": false
  17202. },
  17203. {
  17204. "type": "object",
  17205. "properties": {
  17206. "id": {
  17207. "type": "string",
  17208. "pattern": "^evt_"
  17209. },
  17210. "type": {
  17211. "type": "string",
  17212. "enum": ["session.next.prompted"]
  17213. },
  17214. "properties": {
  17215. "type": "object",
  17216. "properties": {
  17217. "timestamp": {
  17218. "type": "number"
  17219. },
  17220. "sessionID": {
  17221. "type": "string",
  17222. "pattern": "^ses"
  17223. },
  17224. "messageID": {
  17225. "type": "string",
  17226. "pattern": "^msg_"
  17227. },
  17228. "prompt": {
  17229. "$ref": "#/components/schemas/Prompt"
  17230. },
  17231. "delivery": {
  17232. "type": "string",
  17233. "enum": ["steer", "queue"]
  17234. }
  17235. },
  17236. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  17237. "additionalProperties": false
  17238. }
  17239. },
  17240. "required": ["id", "type", "properties"],
  17241. "additionalProperties": false
  17242. },
  17243. {
  17244. "type": "object",
  17245. "properties": {
  17246. "id": {
  17247. "type": "string",
  17248. "pattern": "^evt_"
  17249. },
  17250. "type": {
  17251. "type": "string",
  17252. "enum": ["session.next.prompt.admitted"]
  17253. },
  17254. "properties": {
  17255. "type": "object",
  17256. "properties": {
  17257. "timestamp": {
  17258. "type": "number"
  17259. },
  17260. "sessionID": {
  17261. "type": "string",
  17262. "pattern": "^ses"
  17263. },
  17264. "messageID": {
  17265. "type": "string",
  17266. "pattern": "^msg_"
  17267. },
  17268. "prompt": {
  17269. "$ref": "#/components/schemas/Prompt"
  17270. },
  17271. "delivery": {
  17272. "type": "string",
  17273. "enum": ["steer", "queue"]
  17274. }
  17275. },
  17276. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  17277. "additionalProperties": false
  17278. }
  17279. },
  17280. "required": ["id", "type", "properties"],
  17281. "additionalProperties": false
  17282. },
  17283. {
  17284. "type": "object",
  17285. "properties": {
  17286. "id": {
  17287. "type": "string",
  17288. "pattern": "^evt_"
  17289. },
  17290. "type": {
  17291. "type": "string",
  17292. "enum": ["session.next.context.updated"]
  17293. },
  17294. "properties": {
  17295. "type": "object",
  17296. "properties": {
  17297. "timestamp": {
  17298. "type": "number"
  17299. },
  17300. "sessionID": {
  17301. "type": "string",
  17302. "pattern": "^ses"
  17303. },
  17304. "messageID": {
  17305. "type": "string",
  17306. "pattern": "^msg_"
  17307. },
  17308. "text": {
  17309. "type": "string"
  17310. }
  17311. },
  17312. "required": ["timestamp", "sessionID", "messageID", "text"],
  17313. "additionalProperties": false
  17314. }
  17315. },
  17316. "required": ["id", "type", "properties"],
  17317. "additionalProperties": false
  17318. },
  17319. {
  17320. "type": "object",
  17321. "properties": {
  17322. "id": {
  17323. "type": "string",
  17324. "pattern": "^evt_"
  17325. },
  17326. "type": {
  17327. "type": "string",
  17328. "enum": ["session.next.synthetic"]
  17329. },
  17330. "properties": {
  17331. "type": "object",
  17332. "properties": {
  17333. "timestamp": {
  17334. "type": "number"
  17335. },
  17336. "sessionID": {
  17337. "type": "string",
  17338. "pattern": "^ses"
  17339. },
  17340. "messageID": {
  17341. "type": "string",
  17342. "pattern": "^msg_"
  17343. },
  17344. "text": {
  17345. "type": "string"
  17346. }
  17347. },
  17348. "required": ["timestamp", "sessionID", "messageID", "text"],
  17349. "additionalProperties": false
  17350. }
  17351. },
  17352. "required": ["id", "type", "properties"],
  17353. "additionalProperties": false
  17354. },
  17355. {
  17356. "type": "object",
  17357. "properties": {
  17358. "id": {
  17359. "type": "string",
  17360. "pattern": "^evt_"
  17361. },
  17362. "type": {
  17363. "type": "string",
  17364. "enum": ["session.next.shell.started"]
  17365. },
  17366. "properties": {
  17367. "type": "object",
  17368. "properties": {
  17369. "timestamp": {
  17370. "type": "number"
  17371. },
  17372. "sessionID": {
  17373. "type": "string",
  17374. "pattern": "^ses"
  17375. },
  17376. "messageID": {
  17377. "type": "string",
  17378. "pattern": "^msg_"
  17379. },
  17380. "callID": {
  17381. "type": "string"
  17382. },
  17383. "command": {
  17384. "type": "string"
  17385. }
  17386. },
  17387. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  17388. "additionalProperties": false
  17389. }
  17390. },
  17391. "required": ["id", "type", "properties"],
  17392. "additionalProperties": false
  17393. },
  17394. {
  17395. "type": "object",
  17396. "properties": {
  17397. "id": {
  17398. "type": "string",
  17399. "pattern": "^evt_"
  17400. },
  17401. "type": {
  17402. "type": "string",
  17403. "enum": ["session.next.shell.ended"]
  17404. },
  17405. "properties": {
  17406. "type": "object",
  17407. "properties": {
  17408. "timestamp": {
  17409. "type": "number"
  17410. },
  17411. "sessionID": {
  17412. "type": "string",
  17413. "pattern": "^ses"
  17414. },
  17415. "callID": {
  17416. "type": "string"
  17417. },
  17418. "output": {
  17419. "type": "string"
  17420. }
  17421. },
  17422. "required": ["timestamp", "sessionID", "callID", "output"],
  17423. "additionalProperties": false
  17424. }
  17425. },
  17426. "required": ["id", "type", "properties"],
  17427. "additionalProperties": false
  17428. },
  17429. {
  17430. "type": "object",
  17431. "properties": {
  17432. "id": {
  17433. "type": "string",
  17434. "pattern": "^evt_"
  17435. },
  17436. "type": {
  17437. "type": "string",
  17438. "enum": ["session.next.step.started"]
  17439. },
  17440. "properties": {
  17441. "type": "object",
  17442. "properties": {
  17443. "timestamp": {
  17444. "type": "number"
  17445. },
  17446. "sessionID": {
  17447. "type": "string",
  17448. "pattern": "^ses"
  17449. },
  17450. "assistantMessageID": {
  17451. "type": "string",
  17452. "pattern": "^msg_"
  17453. },
  17454. "agent": {
  17455. "type": "string"
  17456. },
  17457. "model": {
  17458. "type": "object",
  17459. "properties": {
  17460. "id": {
  17461. "type": "string"
  17462. },
  17463. "providerID": {
  17464. "type": "string"
  17465. },
  17466. "variant": {
  17467. "type": "string"
  17468. }
  17469. },
  17470. "required": ["id", "providerID"],
  17471. "additionalProperties": false
  17472. },
  17473. "snapshot": {
  17474. "type": "string"
  17475. }
  17476. },
  17477. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  17478. "additionalProperties": false
  17479. }
  17480. },
  17481. "required": ["id", "type", "properties"],
  17482. "additionalProperties": false
  17483. },
  17484. {
  17485. "type": "object",
  17486. "properties": {
  17487. "id": {
  17488. "type": "string",
  17489. "pattern": "^evt_"
  17490. },
  17491. "type": {
  17492. "type": "string",
  17493. "enum": ["session.next.step.ended"]
  17494. },
  17495. "properties": {
  17496. "type": "object",
  17497. "properties": {
  17498. "timestamp": {
  17499. "type": "number"
  17500. },
  17501. "sessionID": {
  17502. "type": "string",
  17503. "pattern": "^ses"
  17504. },
  17505. "assistantMessageID": {
  17506. "type": "string",
  17507. "pattern": "^msg_"
  17508. },
  17509. "finish": {
  17510. "type": "string"
  17511. },
  17512. "cost": {
  17513. "type": "number"
  17514. },
  17515. "tokens": {
  17516. "type": "object",
  17517. "properties": {
  17518. "input": {
  17519. "type": "number"
  17520. },
  17521. "output": {
  17522. "type": "number"
  17523. },
  17524. "reasoning": {
  17525. "type": "number"
  17526. },
  17527. "cache": {
  17528. "type": "object",
  17529. "properties": {
  17530. "read": {
  17531. "type": "number"
  17532. },
  17533. "write": {
  17534. "type": "number"
  17535. }
  17536. },
  17537. "required": ["read", "write"],
  17538. "additionalProperties": false
  17539. }
  17540. },
  17541. "required": ["input", "output", "reasoning", "cache"],
  17542. "additionalProperties": false
  17543. },
  17544. "snapshot": {
  17545. "type": "string"
  17546. }
  17547. },
  17548. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  17549. "additionalProperties": false
  17550. }
  17551. },
  17552. "required": ["id", "type", "properties"],
  17553. "additionalProperties": false
  17554. },
  17555. {
  17556. "type": "object",
  17557. "properties": {
  17558. "id": {
  17559. "type": "string",
  17560. "pattern": "^evt_"
  17561. },
  17562. "type": {
  17563. "type": "string",
  17564. "enum": ["session.next.step.failed"]
  17565. },
  17566. "properties": {
  17567. "type": "object",
  17568. "properties": {
  17569. "timestamp": {
  17570. "type": "number"
  17571. },
  17572. "sessionID": {
  17573. "type": "string",
  17574. "pattern": "^ses"
  17575. },
  17576. "assistantMessageID": {
  17577. "type": "string",
  17578. "pattern": "^msg_"
  17579. },
  17580. "error": {
  17581. "$ref": "#/components/schemas/SessionErrorUnknown"
  17582. }
  17583. },
  17584. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  17585. "additionalProperties": false
  17586. }
  17587. },
  17588. "required": ["id", "type", "properties"],
  17589. "additionalProperties": false
  17590. },
  17591. {
  17592. "type": "object",
  17593. "properties": {
  17594. "id": {
  17595. "type": "string",
  17596. "pattern": "^evt_"
  17597. },
  17598. "type": {
  17599. "type": "string",
  17600. "enum": ["session.next.text.started"]
  17601. },
  17602. "properties": {
  17603. "type": "object",
  17604. "properties": {
  17605. "timestamp": {
  17606. "type": "number"
  17607. },
  17608. "sessionID": {
  17609. "type": "string",
  17610. "pattern": "^ses"
  17611. },
  17612. "assistantMessageID": {
  17613. "type": "string",
  17614. "pattern": "^msg_"
  17615. },
  17616. "textID": {
  17617. "type": "string"
  17618. }
  17619. },
  17620. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  17621. "additionalProperties": false
  17622. }
  17623. },
  17624. "required": ["id", "type", "properties"],
  17625. "additionalProperties": false
  17626. },
  17627. {
  17628. "type": "object",
  17629. "properties": {
  17630. "id": {
  17631. "type": "string",
  17632. "pattern": "^evt_"
  17633. },
  17634. "type": {
  17635. "type": "string",
  17636. "enum": ["session.next.text.delta"]
  17637. },
  17638. "properties": {
  17639. "type": "object",
  17640. "properties": {
  17641. "timestamp": {
  17642. "type": "number"
  17643. },
  17644. "sessionID": {
  17645. "type": "string",
  17646. "pattern": "^ses"
  17647. },
  17648. "assistantMessageID": {
  17649. "type": "string",
  17650. "pattern": "^msg_"
  17651. },
  17652. "textID": {
  17653. "type": "string"
  17654. },
  17655. "delta": {
  17656. "type": "string"
  17657. }
  17658. },
  17659. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  17660. "additionalProperties": false
  17661. }
  17662. },
  17663. "required": ["id", "type", "properties"],
  17664. "additionalProperties": false
  17665. },
  17666. {
  17667. "type": "object",
  17668. "properties": {
  17669. "id": {
  17670. "type": "string",
  17671. "pattern": "^evt_"
  17672. },
  17673. "type": {
  17674. "type": "string",
  17675. "enum": ["session.next.text.ended"]
  17676. },
  17677. "properties": {
  17678. "type": "object",
  17679. "properties": {
  17680. "timestamp": {
  17681. "type": "number"
  17682. },
  17683. "sessionID": {
  17684. "type": "string",
  17685. "pattern": "^ses"
  17686. },
  17687. "assistantMessageID": {
  17688. "type": "string",
  17689. "pattern": "^msg_"
  17690. },
  17691. "textID": {
  17692. "type": "string"
  17693. },
  17694. "text": {
  17695. "type": "string"
  17696. }
  17697. },
  17698. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  17699. "additionalProperties": false
  17700. }
  17701. },
  17702. "required": ["id", "type", "properties"],
  17703. "additionalProperties": false
  17704. },
  17705. {
  17706. "type": "object",
  17707. "properties": {
  17708. "id": {
  17709. "type": "string",
  17710. "pattern": "^evt_"
  17711. },
  17712. "type": {
  17713. "type": "string",
  17714. "enum": ["session.next.reasoning.started"]
  17715. },
  17716. "properties": {
  17717. "type": "object",
  17718. "properties": {
  17719. "timestamp": {
  17720. "type": "number"
  17721. },
  17722. "sessionID": {
  17723. "type": "string",
  17724. "pattern": "^ses"
  17725. },
  17726. "assistantMessageID": {
  17727. "type": "string",
  17728. "pattern": "^msg_"
  17729. },
  17730. "reasoningID": {
  17731. "type": "string"
  17732. },
  17733. "providerMetadata": {
  17734. "type": "object",
  17735. "additionalProperties": {
  17736. "type": "object"
  17737. }
  17738. }
  17739. },
  17740. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  17741. "additionalProperties": false
  17742. }
  17743. },
  17744. "required": ["id", "type", "properties"],
  17745. "additionalProperties": false
  17746. },
  17747. {
  17748. "type": "object",
  17749. "properties": {
  17750. "id": {
  17751. "type": "string",
  17752. "pattern": "^evt_"
  17753. },
  17754. "type": {
  17755. "type": "string",
  17756. "enum": ["session.next.reasoning.delta"]
  17757. },
  17758. "properties": {
  17759. "type": "object",
  17760. "properties": {
  17761. "timestamp": {
  17762. "type": "number"
  17763. },
  17764. "sessionID": {
  17765. "type": "string",
  17766. "pattern": "^ses"
  17767. },
  17768. "assistantMessageID": {
  17769. "type": "string",
  17770. "pattern": "^msg_"
  17771. },
  17772. "reasoningID": {
  17773. "type": "string"
  17774. },
  17775. "delta": {
  17776. "type": "string"
  17777. }
  17778. },
  17779. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  17780. "additionalProperties": false
  17781. }
  17782. },
  17783. "required": ["id", "type", "properties"],
  17784. "additionalProperties": false
  17785. },
  17786. {
  17787. "type": "object",
  17788. "properties": {
  17789. "id": {
  17790. "type": "string",
  17791. "pattern": "^evt_"
  17792. },
  17793. "type": {
  17794. "type": "string",
  17795. "enum": ["session.next.reasoning.ended"]
  17796. },
  17797. "properties": {
  17798. "type": "object",
  17799. "properties": {
  17800. "timestamp": {
  17801. "type": "number"
  17802. },
  17803. "sessionID": {
  17804. "type": "string",
  17805. "pattern": "^ses"
  17806. },
  17807. "assistantMessageID": {
  17808. "type": "string",
  17809. "pattern": "^msg_"
  17810. },
  17811. "reasoningID": {
  17812. "type": "string"
  17813. },
  17814. "text": {
  17815. "type": "string"
  17816. },
  17817. "providerMetadata": {
  17818. "type": "object",
  17819. "additionalProperties": {
  17820. "type": "object"
  17821. }
  17822. }
  17823. },
  17824. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  17825. "additionalProperties": false
  17826. }
  17827. },
  17828. "required": ["id", "type", "properties"],
  17829. "additionalProperties": false
  17830. },
  17831. {
  17832. "type": "object",
  17833. "properties": {
  17834. "id": {
  17835. "type": "string",
  17836. "pattern": "^evt_"
  17837. },
  17838. "type": {
  17839. "type": "string",
  17840. "enum": ["session.next.tool.input.started"]
  17841. },
  17842. "properties": {
  17843. "type": "object",
  17844. "properties": {
  17845. "timestamp": {
  17846. "type": "number"
  17847. },
  17848. "sessionID": {
  17849. "type": "string",
  17850. "pattern": "^ses"
  17851. },
  17852. "assistantMessageID": {
  17853. "type": "string",
  17854. "pattern": "^msg_"
  17855. },
  17856. "callID": {
  17857. "type": "string"
  17858. },
  17859. "name": {
  17860. "type": "string"
  17861. }
  17862. },
  17863. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  17864. "additionalProperties": false
  17865. }
  17866. },
  17867. "required": ["id", "type", "properties"],
  17868. "additionalProperties": false
  17869. },
  17870. {
  17871. "type": "object",
  17872. "properties": {
  17873. "id": {
  17874. "type": "string",
  17875. "pattern": "^evt_"
  17876. },
  17877. "type": {
  17878. "type": "string",
  17879. "enum": ["session.next.tool.input.delta"]
  17880. },
  17881. "properties": {
  17882. "type": "object",
  17883. "properties": {
  17884. "timestamp": {
  17885. "type": "number"
  17886. },
  17887. "sessionID": {
  17888. "type": "string",
  17889. "pattern": "^ses"
  17890. },
  17891. "assistantMessageID": {
  17892. "type": "string",
  17893. "pattern": "^msg_"
  17894. },
  17895. "callID": {
  17896. "type": "string"
  17897. },
  17898. "delta": {
  17899. "type": "string"
  17900. }
  17901. },
  17902. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  17903. "additionalProperties": false
  17904. }
  17905. },
  17906. "required": ["id", "type", "properties"],
  17907. "additionalProperties": false
  17908. },
  17909. {
  17910. "type": "object",
  17911. "properties": {
  17912. "id": {
  17913. "type": "string",
  17914. "pattern": "^evt_"
  17915. },
  17916. "type": {
  17917. "type": "string",
  17918. "enum": ["session.next.tool.input.ended"]
  17919. },
  17920. "properties": {
  17921. "type": "object",
  17922. "properties": {
  17923. "timestamp": {
  17924. "type": "number"
  17925. },
  17926. "sessionID": {
  17927. "type": "string",
  17928. "pattern": "^ses"
  17929. },
  17930. "assistantMessageID": {
  17931. "type": "string",
  17932. "pattern": "^msg_"
  17933. },
  17934. "callID": {
  17935. "type": "string"
  17936. },
  17937. "text": {
  17938. "type": "string"
  17939. }
  17940. },
  17941. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  17942. "additionalProperties": false
  17943. }
  17944. },
  17945. "required": ["id", "type", "properties"],
  17946. "additionalProperties": false
  17947. },
  17948. {
  17949. "type": "object",
  17950. "properties": {
  17951. "id": {
  17952. "type": "string",
  17953. "pattern": "^evt_"
  17954. },
  17955. "type": {
  17956. "type": "string",
  17957. "enum": ["session.next.tool.called"]
  17958. },
  17959. "properties": {
  17960. "type": "object",
  17961. "properties": {
  17962. "timestamp": {
  17963. "type": "number"
  17964. },
  17965. "sessionID": {
  17966. "type": "string",
  17967. "pattern": "^ses"
  17968. },
  17969. "assistantMessageID": {
  17970. "type": "string",
  17971. "pattern": "^msg_"
  17972. },
  17973. "callID": {
  17974. "type": "string"
  17975. },
  17976. "tool": {
  17977. "type": "string"
  17978. },
  17979. "input": {
  17980. "type": "object"
  17981. },
  17982. "provider": {
  17983. "type": "object",
  17984. "properties": {
  17985. "executed": {
  17986. "type": "boolean"
  17987. },
  17988. "metadata": {
  17989. "type": "object",
  17990. "additionalProperties": {
  17991. "type": "object"
  17992. }
  17993. }
  17994. },
  17995. "required": ["executed"],
  17996. "additionalProperties": false
  17997. }
  17998. },
  17999. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  18000. "additionalProperties": false
  18001. }
  18002. },
  18003. "required": ["id", "type", "properties"],
  18004. "additionalProperties": false
  18005. },
  18006. {
  18007. "type": "object",
  18008. "properties": {
  18009. "id": {
  18010. "type": "string",
  18011. "pattern": "^evt_"
  18012. },
  18013. "type": {
  18014. "type": "string",
  18015. "enum": ["session.next.tool.progress"]
  18016. },
  18017. "properties": {
  18018. "type": "object",
  18019. "properties": {
  18020. "timestamp": {
  18021. "type": "number"
  18022. },
  18023. "sessionID": {
  18024. "type": "string",
  18025. "pattern": "^ses"
  18026. },
  18027. "assistantMessageID": {
  18028. "type": "string",
  18029. "pattern": "^msg_"
  18030. },
  18031. "callID": {
  18032. "type": "string"
  18033. },
  18034. "structured": {
  18035. "type": "object"
  18036. },
  18037. "content": {
  18038. "type": "array",
  18039. "items": {
  18040. "anyOf": [
  18041. {
  18042. "$ref": "#/components/schemas/ToolTextContent"
  18043. },
  18044. {
  18045. "$ref": "#/components/schemas/ToolFileContent"
  18046. }
  18047. ]
  18048. }
  18049. }
  18050. },
  18051. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  18052. "additionalProperties": false
  18053. }
  18054. },
  18055. "required": ["id", "type", "properties"],
  18056. "additionalProperties": false
  18057. },
  18058. {
  18059. "type": "object",
  18060. "properties": {
  18061. "id": {
  18062. "type": "string",
  18063. "pattern": "^evt_"
  18064. },
  18065. "type": {
  18066. "type": "string",
  18067. "enum": ["session.next.tool.success"]
  18068. },
  18069. "properties": {
  18070. "type": "object",
  18071. "properties": {
  18072. "timestamp": {
  18073. "type": "number"
  18074. },
  18075. "sessionID": {
  18076. "type": "string",
  18077. "pattern": "^ses"
  18078. },
  18079. "assistantMessageID": {
  18080. "type": "string",
  18081. "pattern": "^msg_"
  18082. },
  18083. "callID": {
  18084. "type": "string"
  18085. },
  18086. "structured": {
  18087. "type": "object"
  18088. },
  18089. "content": {
  18090. "type": "array",
  18091. "items": {
  18092. "anyOf": [
  18093. {
  18094. "$ref": "#/components/schemas/ToolTextContent"
  18095. },
  18096. {
  18097. "$ref": "#/components/schemas/ToolFileContent"
  18098. }
  18099. ]
  18100. }
  18101. },
  18102. "outputPaths": {
  18103. "type": "array",
  18104. "items": {
  18105. "type": "string"
  18106. }
  18107. },
  18108. "result": {},
  18109. "provider": {
  18110. "type": "object",
  18111. "properties": {
  18112. "executed": {
  18113. "type": "boolean"
  18114. },
  18115. "metadata": {
  18116. "type": "object",
  18117. "additionalProperties": {
  18118. "type": "object"
  18119. }
  18120. }
  18121. },
  18122. "required": ["executed"],
  18123. "additionalProperties": false
  18124. }
  18125. },
  18126. "required": [
  18127. "timestamp",
  18128. "sessionID",
  18129. "assistantMessageID",
  18130. "callID",
  18131. "structured",
  18132. "content",
  18133. "provider"
  18134. ],
  18135. "additionalProperties": false
  18136. }
  18137. },
  18138. "required": ["id", "type", "properties"],
  18139. "additionalProperties": false
  18140. },
  18141. {
  18142. "type": "object",
  18143. "properties": {
  18144. "id": {
  18145. "type": "string",
  18146. "pattern": "^evt_"
  18147. },
  18148. "type": {
  18149. "type": "string",
  18150. "enum": ["session.next.tool.failed"]
  18151. },
  18152. "properties": {
  18153. "type": "object",
  18154. "properties": {
  18155. "timestamp": {
  18156. "type": "number"
  18157. },
  18158. "sessionID": {
  18159. "type": "string",
  18160. "pattern": "^ses"
  18161. },
  18162. "assistantMessageID": {
  18163. "type": "string",
  18164. "pattern": "^msg_"
  18165. },
  18166. "callID": {
  18167. "type": "string"
  18168. },
  18169. "error": {
  18170. "$ref": "#/components/schemas/SessionErrorUnknown"
  18171. },
  18172. "result": {},
  18173. "provider": {
  18174. "type": "object",
  18175. "properties": {
  18176. "executed": {
  18177. "type": "boolean"
  18178. },
  18179. "metadata": {
  18180. "type": "object",
  18181. "additionalProperties": {
  18182. "type": "object"
  18183. }
  18184. }
  18185. },
  18186. "required": ["executed"],
  18187. "additionalProperties": false
  18188. }
  18189. },
  18190. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  18191. "additionalProperties": false
  18192. }
  18193. },
  18194. "required": ["id", "type", "properties"],
  18195. "additionalProperties": false
  18196. },
  18197. {
  18198. "type": "object",
  18199. "properties": {
  18200. "id": {
  18201. "type": "string",
  18202. "pattern": "^evt_"
  18203. },
  18204. "type": {
  18205. "type": "string",
  18206. "enum": ["session.next.retried"]
  18207. },
  18208. "properties": {
  18209. "type": "object",
  18210. "properties": {
  18211. "timestamp": {
  18212. "type": "number"
  18213. },
  18214. "sessionID": {
  18215. "type": "string",
  18216. "pattern": "^ses"
  18217. },
  18218. "attempt": {
  18219. "type": "number"
  18220. },
  18221. "error": {
  18222. "$ref": "#/components/schemas/SessionNextRetry_error"
  18223. }
  18224. },
  18225. "required": ["timestamp", "sessionID", "attempt", "error"],
  18226. "additionalProperties": false
  18227. }
  18228. },
  18229. "required": ["id", "type", "properties"],
  18230. "additionalProperties": false
  18231. },
  18232. {
  18233. "type": "object",
  18234. "properties": {
  18235. "id": {
  18236. "type": "string",
  18237. "pattern": "^evt_"
  18238. },
  18239. "type": {
  18240. "type": "string",
  18241. "enum": ["session.next.compaction.started"]
  18242. },
  18243. "properties": {
  18244. "type": "object",
  18245. "properties": {
  18246. "timestamp": {
  18247. "type": "number"
  18248. },
  18249. "sessionID": {
  18250. "type": "string",
  18251. "pattern": "^ses"
  18252. },
  18253. "messageID": {
  18254. "type": "string",
  18255. "pattern": "^msg_"
  18256. },
  18257. "reason": {
  18258. "type": "string",
  18259. "enum": ["auto", "manual"]
  18260. }
  18261. },
  18262. "required": ["timestamp", "sessionID", "messageID", "reason"],
  18263. "additionalProperties": false
  18264. }
  18265. },
  18266. "required": ["id", "type", "properties"],
  18267. "additionalProperties": false
  18268. },
  18269. {
  18270. "type": "object",
  18271. "properties": {
  18272. "id": {
  18273. "type": "string",
  18274. "pattern": "^evt_"
  18275. },
  18276. "type": {
  18277. "type": "string",
  18278. "enum": ["session.next.compaction.delta"]
  18279. },
  18280. "properties": {
  18281. "type": "object",
  18282. "properties": {
  18283. "timestamp": {
  18284. "type": "number"
  18285. },
  18286. "sessionID": {
  18287. "type": "string",
  18288. "pattern": "^ses"
  18289. },
  18290. "messageID": {
  18291. "type": "string",
  18292. "pattern": "^msg_"
  18293. },
  18294. "text": {
  18295. "type": "string"
  18296. }
  18297. },
  18298. "required": ["timestamp", "sessionID", "messageID", "text"],
  18299. "additionalProperties": false
  18300. }
  18301. },
  18302. "required": ["id", "type", "properties"],
  18303. "additionalProperties": false
  18304. },
  18305. {
  18306. "type": "object",
  18307. "properties": {
  18308. "id": {
  18309. "type": "string",
  18310. "pattern": "^evt_"
  18311. },
  18312. "type": {
  18313. "type": "string",
  18314. "enum": ["session.next.compaction.ended"]
  18315. },
  18316. "properties": {
  18317. "type": "object",
  18318. "properties": {
  18319. "timestamp": {
  18320. "type": "number"
  18321. },
  18322. "sessionID": {
  18323. "type": "string",
  18324. "pattern": "^ses"
  18325. },
  18326. "messageID": {
  18327. "type": "string",
  18328. "pattern": "^msg_"
  18329. },
  18330. "reason": {
  18331. "type": "string",
  18332. "enum": ["auto", "manual"]
  18333. },
  18334. "text": {
  18335. "type": "string"
  18336. },
  18337. "recent": {
  18338. "type": "string"
  18339. }
  18340. },
  18341. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  18342. "additionalProperties": false
  18343. }
  18344. },
  18345. "required": ["id", "type", "properties"],
  18346. "additionalProperties": false
  18347. },
  18348. {
  18349. "type": "object",
  18350. "properties": {
  18351. "id": {
  18352. "type": "string",
  18353. "pattern": "^evt_"
  18354. },
  18355. "type": {
  18356. "type": "string",
  18357. "enum": ["message.part.delta"]
  18358. },
  18359. "properties": {
  18360. "type": "object",
  18361. "properties": {
  18362. "sessionID": {
  18363. "type": "string",
  18364. "pattern": "^ses"
  18365. },
  18366. "messageID": {
  18367. "type": "string",
  18368. "pattern": "^msg"
  18369. },
  18370. "partID": {
  18371. "type": "string",
  18372. "pattern": "^prt"
  18373. },
  18374. "field": {
  18375. "type": "string"
  18376. },
  18377. "delta": {
  18378. "type": "string"
  18379. }
  18380. },
  18381. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  18382. "additionalProperties": false
  18383. }
  18384. },
  18385. "required": ["id", "type", "properties"],
  18386. "additionalProperties": false
  18387. },
  18388. {
  18389. "type": "object",
  18390. "properties": {
  18391. "id": {
  18392. "type": "string",
  18393. "pattern": "^evt_"
  18394. },
  18395. "type": {
  18396. "type": "string",
  18397. "enum": ["session.diff"]
  18398. },
  18399. "properties": {
  18400. "type": "object",
  18401. "properties": {
  18402. "sessionID": {
  18403. "type": "string",
  18404. "pattern": "^ses"
  18405. },
  18406. "diff": {
  18407. "type": "array",
  18408. "items": {
  18409. "$ref": "#/components/schemas/SnapshotFileDiff"
  18410. }
  18411. }
  18412. },
  18413. "required": ["sessionID", "diff"],
  18414. "additionalProperties": false
  18415. }
  18416. },
  18417. "required": ["id", "type", "properties"],
  18418. "additionalProperties": false
  18419. },
  18420. {
  18421. "type": "object",
  18422. "properties": {
  18423. "id": {
  18424. "type": "string",
  18425. "pattern": "^evt_"
  18426. },
  18427. "type": {
  18428. "type": "string",
  18429. "enum": ["session.error"]
  18430. },
  18431. "properties": {
  18432. "type": "object",
  18433. "properties": {
  18434. "sessionID": {
  18435. "type": "string",
  18436. "pattern": "^ses"
  18437. },
  18438. "error": {
  18439. "anyOf": [
  18440. {
  18441. "$ref": "#/components/schemas/ProviderAuthError"
  18442. },
  18443. {
  18444. "$ref": "#/components/schemas/UnknownError"
  18445. },
  18446. {
  18447. "$ref": "#/components/schemas/MessageOutputLengthError"
  18448. },
  18449. {
  18450. "$ref": "#/components/schemas/MessageAbortedError"
  18451. },
  18452. {
  18453. "$ref": "#/components/schemas/StructuredOutputError"
  18454. },
  18455. {
  18456. "$ref": "#/components/schemas/ContextOverflowError"
  18457. },
  18458. {
  18459. "$ref": "#/components/schemas/ContentFilterError"
  18460. },
  18461. {
  18462. "$ref": "#/components/schemas/APIError"
  18463. }
  18464. ]
  18465. }
  18466. },
  18467. "additionalProperties": false
  18468. }
  18469. },
  18470. "required": ["id", "type", "properties"],
  18471. "additionalProperties": false
  18472. },
  18473. {
  18474. "type": "object",
  18475. "properties": {
  18476. "id": {
  18477. "type": "string",
  18478. "pattern": "^evt_"
  18479. },
  18480. "type": {
  18481. "type": "string",
  18482. "enum": ["installation.updated"]
  18483. },
  18484. "properties": {
  18485. "type": "object",
  18486. "properties": {
  18487. "version": {
  18488. "type": "string"
  18489. }
  18490. },
  18491. "required": ["version"],
  18492. "additionalProperties": false
  18493. }
  18494. },
  18495. "required": ["id", "type", "properties"],
  18496. "additionalProperties": false
  18497. },
  18498. {
  18499. "type": "object",
  18500. "properties": {
  18501. "id": {
  18502. "type": "string",
  18503. "pattern": "^evt_"
  18504. },
  18505. "type": {
  18506. "type": "string",
  18507. "enum": ["installation.update-available"]
  18508. },
  18509. "properties": {
  18510. "type": "object",
  18511. "properties": {
  18512. "version": {
  18513. "type": "string"
  18514. }
  18515. },
  18516. "required": ["version"],
  18517. "additionalProperties": false
  18518. }
  18519. },
  18520. "required": ["id", "type", "properties"],
  18521. "additionalProperties": false
  18522. },
  18523. {
  18524. "type": "object",
  18525. "properties": {
  18526. "id": {
  18527. "type": "string",
  18528. "pattern": "^evt_"
  18529. },
  18530. "type": {
  18531. "type": "string",
  18532. "enum": ["file.edited"]
  18533. },
  18534. "properties": {
  18535. "type": "object",
  18536. "properties": {
  18537. "file": {
  18538. "type": "string"
  18539. }
  18540. },
  18541. "required": ["file"],
  18542. "additionalProperties": false
  18543. }
  18544. },
  18545. "required": ["id", "type", "properties"],
  18546. "additionalProperties": false
  18547. },
  18548. {
  18549. "type": "object",
  18550. "properties": {
  18551. "id": {
  18552. "type": "string",
  18553. "pattern": "^evt_"
  18554. },
  18555. "type": {
  18556. "type": "string",
  18557. "enum": ["reference.updated"]
  18558. },
  18559. "properties": {
  18560. "type": "object",
  18561. "properties": {}
  18562. }
  18563. },
  18564. "required": ["id", "type", "properties"],
  18565. "additionalProperties": false
  18566. },
  18567. {
  18568. "type": "object",
  18569. "properties": {
  18570. "id": {
  18571. "type": "string",
  18572. "pattern": "^evt_"
  18573. },
  18574. "type": {
  18575. "type": "string",
  18576. "enum": ["permission.v2.asked"]
  18577. },
  18578. "properties": {
  18579. "type": "object",
  18580. "properties": {
  18581. "id": {
  18582. "type": "string",
  18583. "pattern": "^per"
  18584. },
  18585. "sessionID": {
  18586. "type": "string",
  18587. "pattern": "^ses"
  18588. },
  18589. "action": {
  18590. "type": "string"
  18591. },
  18592. "resources": {
  18593. "type": "array",
  18594. "items": {
  18595. "type": "string"
  18596. }
  18597. },
  18598. "save": {
  18599. "type": "array",
  18600. "items": {
  18601. "type": "string"
  18602. }
  18603. },
  18604. "metadata": {
  18605. "type": "object"
  18606. },
  18607. "source": {
  18608. "$ref": "#/components/schemas/PermissionV2Source"
  18609. }
  18610. },
  18611. "required": ["id", "sessionID", "action", "resources"],
  18612. "additionalProperties": false
  18613. }
  18614. },
  18615. "required": ["id", "type", "properties"],
  18616. "additionalProperties": false
  18617. },
  18618. {
  18619. "type": "object",
  18620. "properties": {
  18621. "id": {
  18622. "type": "string",
  18623. "pattern": "^evt_"
  18624. },
  18625. "type": {
  18626. "type": "string",
  18627. "enum": ["permission.v2.replied"]
  18628. },
  18629. "properties": {
  18630. "type": "object",
  18631. "properties": {
  18632. "sessionID": {
  18633. "type": "string",
  18634. "pattern": "^ses"
  18635. },
  18636. "requestID": {
  18637. "type": "string",
  18638. "pattern": "^per"
  18639. },
  18640. "reply": {
  18641. "$ref": "#/components/schemas/PermissionV2Reply"
  18642. }
  18643. },
  18644. "required": ["sessionID", "requestID", "reply"],
  18645. "additionalProperties": false
  18646. }
  18647. },
  18648. "required": ["id", "type", "properties"],
  18649. "additionalProperties": false
  18650. },
  18651. {
  18652. "type": "object",
  18653. "properties": {
  18654. "id": {
  18655. "type": "string",
  18656. "pattern": "^evt_"
  18657. },
  18658. "type": {
  18659. "type": "string",
  18660. "enum": ["plugin.added"]
  18661. },
  18662. "properties": {
  18663. "type": "object",
  18664. "properties": {
  18665. "id": {
  18666. "type": "string"
  18667. }
  18668. },
  18669. "required": ["id"],
  18670. "additionalProperties": false
  18671. }
  18672. },
  18673. "required": ["id", "type", "properties"],
  18674. "additionalProperties": false
  18675. },
  18676. {
  18677. "type": "object",
  18678. "properties": {
  18679. "id": {
  18680. "type": "string",
  18681. "pattern": "^evt_"
  18682. },
  18683. "type": {
  18684. "type": "string",
  18685. "enum": ["project.directories.updated"]
  18686. },
  18687. "properties": {
  18688. "type": "object",
  18689. "properties": {
  18690. "projectID": {
  18691. "type": "string"
  18692. }
  18693. },
  18694. "required": ["projectID"],
  18695. "additionalProperties": false
  18696. }
  18697. },
  18698. "required": ["id", "type", "properties"],
  18699. "additionalProperties": false
  18700. },
  18701. {
  18702. "type": "object",
  18703. "properties": {
  18704. "id": {
  18705. "type": "string",
  18706. "pattern": "^evt_"
  18707. },
  18708. "type": {
  18709. "type": "string",
  18710. "enum": ["file.watcher.updated"]
  18711. },
  18712. "properties": {
  18713. "type": "object",
  18714. "properties": {
  18715. "file": {
  18716. "type": "string"
  18717. },
  18718. "event": {
  18719. "type": "string",
  18720. "enum": ["add", "change", "unlink"]
  18721. }
  18722. },
  18723. "required": ["file", "event"],
  18724. "additionalProperties": false
  18725. }
  18726. },
  18727. "required": ["id", "type", "properties"],
  18728. "additionalProperties": false
  18729. },
  18730. {
  18731. "type": "object",
  18732. "properties": {
  18733. "id": {
  18734. "type": "string",
  18735. "pattern": "^evt_"
  18736. },
  18737. "type": {
  18738. "type": "string",
  18739. "enum": ["pty.created"]
  18740. },
  18741. "properties": {
  18742. "type": "object",
  18743. "properties": {
  18744. "info": {
  18745. "$ref": "#/components/schemas/Pty"
  18746. }
  18747. },
  18748. "required": ["info"],
  18749. "additionalProperties": false
  18750. }
  18751. },
  18752. "required": ["id", "type", "properties"],
  18753. "additionalProperties": false
  18754. },
  18755. {
  18756. "type": "object",
  18757. "properties": {
  18758. "id": {
  18759. "type": "string",
  18760. "pattern": "^evt_"
  18761. },
  18762. "type": {
  18763. "type": "string",
  18764. "enum": ["pty.updated"]
  18765. },
  18766. "properties": {
  18767. "type": "object",
  18768. "properties": {
  18769. "info": {
  18770. "$ref": "#/components/schemas/Pty"
  18771. }
  18772. },
  18773. "required": ["info"],
  18774. "additionalProperties": false
  18775. }
  18776. },
  18777. "required": ["id", "type", "properties"],
  18778. "additionalProperties": false
  18779. },
  18780. {
  18781. "type": "object",
  18782. "properties": {
  18783. "id": {
  18784. "type": "string",
  18785. "pattern": "^evt_"
  18786. },
  18787. "type": {
  18788. "type": "string",
  18789. "enum": ["pty.exited"]
  18790. },
  18791. "properties": {
  18792. "type": "object",
  18793. "properties": {
  18794. "id": {
  18795. "type": "string",
  18796. "pattern": "^pty"
  18797. },
  18798. "exitCode": {
  18799. "type": "integer",
  18800. "minimum": 0
  18801. }
  18802. },
  18803. "required": ["id", "exitCode"],
  18804. "additionalProperties": false
  18805. }
  18806. },
  18807. "required": ["id", "type", "properties"],
  18808. "additionalProperties": false
  18809. },
  18810. {
  18811. "type": "object",
  18812. "properties": {
  18813. "id": {
  18814. "type": "string",
  18815. "pattern": "^evt_"
  18816. },
  18817. "type": {
  18818. "type": "string",
  18819. "enum": ["pty.deleted"]
  18820. },
  18821. "properties": {
  18822. "type": "object",
  18823. "properties": {
  18824. "id": {
  18825. "type": "string",
  18826. "pattern": "^pty"
  18827. }
  18828. },
  18829. "required": ["id"],
  18830. "additionalProperties": false
  18831. }
  18832. },
  18833. "required": ["id", "type", "properties"],
  18834. "additionalProperties": false
  18835. },
  18836. {
  18837. "type": "object",
  18838. "properties": {
  18839. "id": {
  18840. "type": "string",
  18841. "pattern": "^evt_"
  18842. },
  18843. "type": {
  18844. "type": "string",
  18845. "enum": ["question.v2.asked"]
  18846. },
  18847. "properties": {
  18848. "type": "object",
  18849. "properties": {
  18850. "id": {
  18851. "type": "string",
  18852. "pattern": "^que"
  18853. },
  18854. "sessionID": {
  18855. "type": "string",
  18856. "pattern": "^ses"
  18857. },
  18858. "questions": {
  18859. "type": "array",
  18860. "items": {
  18861. "$ref": "#/components/schemas/QuestionV2Info"
  18862. },
  18863. "description": "Questions to ask"
  18864. },
  18865. "tool": {
  18866. "$ref": "#/components/schemas/QuestionV2Tool"
  18867. }
  18868. },
  18869. "required": ["id", "sessionID", "questions"],
  18870. "additionalProperties": false
  18871. }
  18872. },
  18873. "required": ["id", "type", "properties"],
  18874. "additionalProperties": false
  18875. },
  18876. {
  18877. "type": "object",
  18878. "properties": {
  18879. "id": {
  18880. "type": "string",
  18881. "pattern": "^evt_"
  18882. },
  18883. "type": {
  18884. "type": "string",
  18885. "enum": ["question.v2.replied"]
  18886. },
  18887. "properties": {
  18888. "type": "object",
  18889. "properties": {
  18890. "sessionID": {
  18891. "type": "string",
  18892. "pattern": "^ses"
  18893. },
  18894. "requestID": {
  18895. "type": "string",
  18896. "pattern": "^que"
  18897. },
  18898. "answers": {
  18899. "type": "array",
  18900. "items": {
  18901. "$ref": "#/components/schemas/QuestionV2Answer"
  18902. }
  18903. }
  18904. },
  18905. "required": ["sessionID", "requestID", "answers"],
  18906. "additionalProperties": false
  18907. }
  18908. },
  18909. "required": ["id", "type", "properties"],
  18910. "additionalProperties": false
  18911. },
  18912. {
  18913. "type": "object",
  18914. "properties": {
  18915. "id": {
  18916. "type": "string",
  18917. "pattern": "^evt_"
  18918. },
  18919. "type": {
  18920. "type": "string",
  18921. "enum": ["question.v2.rejected"]
  18922. },
  18923. "properties": {
  18924. "type": "object",
  18925. "properties": {
  18926. "sessionID": {
  18927. "type": "string",
  18928. "pattern": "^ses"
  18929. },
  18930. "requestID": {
  18931. "type": "string",
  18932. "pattern": "^que"
  18933. }
  18934. },
  18935. "required": ["sessionID", "requestID"],
  18936. "additionalProperties": false
  18937. }
  18938. },
  18939. "required": ["id", "type", "properties"],
  18940. "additionalProperties": false
  18941. },
  18942. {
  18943. "type": "object",
  18944. "properties": {
  18945. "id": {
  18946. "type": "string",
  18947. "pattern": "^evt_"
  18948. },
  18949. "type": {
  18950. "type": "string",
  18951. "enum": ["todo.updated"]
  18952. },
  18953. "properties": {
  18954. "type": "object",
  18955. "properties": {
  18956. "sessionID": {
  18957. "type": "string",
  18958. "pattern": "^ses"
  18959. },
  18960. "todos": {
  18961. "type": "array",
  18962. "items": {
  18963. "$ref": "#/components/schemas/Todo"
  18964. }
  18965. }
  18966. },
  18967. "required": ["sessionID", "todos"],
  18968. "additionalProperties": false
  18969. }
  18970. },
  18971. "required": ["id", "type", "properties"],
  18972. "additionalProperties": false
  18973. },
  18974. {
  18975. "type": "object",
  18976. "properties": {
  18977. "id": {
  18978. "type": "string",
  18979. "pattern": "^evt_"
  18980. },
  18981. "type": {
  18982. "type": "string",
  18983. "enum": ["lsp.updated"]
  18984. },
  18985. "properties": {
  18986. "type": "object",
  18987. "properties": {}
  18988. }
  18989. },
  18990. "required": ["id", "type", "properties"],
  18991. "additionalProperties": false
  18992. },
  18993. {
  18994. "type": "object",
  18995. "properties": {
  18996. "id": {
  18997. "type": "string",
  18998. "pattern": "^evt_"
  18999. },
  19000. "type": {
  19001. "type": "string",
  19002. "enum": ["permission.asked"]
  19003. },
  19004. "properties": {
  19005. "type": "object",
  19006. "properties": {
  19007. "id": {
  19008. "type": "string",
  19009. "pattern": "^per"
  19010. },
  19011. "sessionID": {
  19012. "type": "string",
  19013. "pattern": "^ses"
  19014. },
  19015. "permission": {
  19016. "type": "string"
  19017. },
  19018. "patterns": {
  19019. "type": "array",
  19020. "items": {
  19021. "type": "string"
  19022. }
  19023. },
  19024. "metadata": {
  19025. "type": "object"
  19026. },
  19027. "always": {
  19028. "type": "array",
  19029. "items": {
  19030. "type": "string"
  19031. }
  19032. },
  19033. "tool": {
  19034. "type": "object",
  19035. "properties": {
  19036. "messageID": {
  19037. "type": "string"
  19038. },
  19039. "callID": {
  19040. "type": "string"
  19041. }
  19042. },
  19043. "required": ["messageID", "callID"],
  19044. "additionalProperties": false
  19045. }
  19046. },
  19047. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  19048. "additionalProperties": false
  19049. }
  19050. },
  19051. "required": ["id", "type", "properties"],
  19052. "additionalProperties": false
  19053. },
  19054. {
  19055. "type": "object",
  19056. "properties": {
  19057. "id": {
  19058. "type": "string",
  19059. "pattern": "^evt_"
  19060. },
  19061. "type": {
  19062. "type": "string",
  19063. "enum": ["permission.replied"]
  19064. },
  19065. "properties": {
  19066. "type": "object",
  19067. "properties": {
  19068. "sessionID": {
  19069. "type": "string",
  19070. "pattern": "^ses"
  19071. },
  19072. "requestID": {
  19073. "type": "string",
  19074. "pattern": "^per"
  19075. },
  19076. "reply": {
  19077. "type": "string",
  19078. "enum": ["once", "always", "reject"]
  19079. }
  19080. },
  19081. "required": ["sessionID", "requestID", "reply"],
  19082. "additionalProperties": false
  19083. }
  19084. },
  19085. "required": ["id", "type", "properties"],
  19086. "additionalProperties": false
  19087. },
  19088. {
  19089. "type": "object",
  19090. "properties": {
  19091. "id": {
  19092. "type": "string",
  19093. "pattern": "^evt_"
  19094. },
  19095. "type": {
  19096. "type": "string",
  19097. "enum": ["tui.prompt.append"]
  19098. },
  19099. "properties": {
  19100. "type": "object",
  19101. "properties": {
  19102. "text": {
  19103. "type": "string"
  19104. }
  19105. },
  19106. "required": ["text"],
  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": ["tui.command.execute"]
  19123. },
  19124. "properties": {
  19125. "type": "object",
  19126. "properties": {
  19127. "command": {
  19128. "anyOf": [
  19129. {
  19130. "type": "string",
  19131. "enum": [
  19132. "session.list",
  19133. "session.new",
  19134. "session.share",
  19135. "session.interrupt",
  19136. "session.compact",
  19137. "session.page.up",
  19138. "session.page.down",
  19139. "session.line.up",
  19140. "session.line.down",
  19141. "session.half.page.up",
  19142. "session.half.page.down",
  19143. "session.first",
  19144. "session.last",
  19145. "prompt.clear",
  19146. "prompt.submit",
  19147. "agent.cycle"
  19148. ]
  19149. },
  19150. {
  19151. "type": "string"
  19152. }
  19153. ]
  19154. }
  19155. },
  19156. "required": ["command"],
  19157. "additionalProperties": false
  19158. }
  19159. },
  19160. "required": ["id", "type", "properties"],
  19161. "additionalProperties": false
  19162. },
  19163. {
  19164. "type": "object",
  19165. "properties": {
  19166. "id": {
  19167. "type": "string",
  19168. "pattern": "^evt_"
  19169. },
  19170. "type": {
  19171. "type": "string",
  19172. "enum": ["tui.toast.show"]
  19173. },
  19174. "properties": {
  19175. "type": "object",
  19176. "properties": {
  19177. "title": {
  19178. "type": "string"
  19179. },
  19180. "message": {
  19181. "type": "string"
  19182. },
  19183. "variant": {
  19184. "type": "string",
  19185. "enum": ["info", "success", "warning", "error"]
  19186. },
  19187. "duration": {
  19188. "type": "integer",
  19189. "exclusiveMinimum": 0
  19190. }
  19191. },
  19192. "required": ["message", "variant"],
  19193. "additionalProperties": false
  19194. }
  19195. },
  19196. "required": ["id", "type", "properties"],
  19197. "additionalProperties": false
  19198. },
  19199. {
  19200. "type": "object",
  19201. "properties": {
  19202. "id": {
  19203. "type": "string",
  19204. "pattern": "^evt_"
  19205. },
  19206. "type": {
  19207. "type": "string",
  19208. "enum": ["tui.session.select"]
  19209. },
  19210. "properties": {
  19211. "type": "object",
  19212. "properties": {
  19213. "sessionID": {
  19214. "type": "string",
  19215. "pattern": "^ses",
  19216. "description": "Session ID to navigate to"
  19217. }
  19218. },
  19219. "required": ["sessionID"],
  19220. "additionalProperties": false
  19221. }
  19222. },
  19223. "required": ["id", "type", "properties"],
  19224. "additionalProperties": false
  19225. },
  19226. {
  19227. "type": "object",
  19228. "properties": {
  19229. "id": {
  19230. "type": "string",
  19231. "pattern": "^evt_"
  19232. },
  19233. "type": {
  19234. "type": "string",
  19235. "enum": ["mcp.tools.changed"]
  19236. },
  19237. "properties": {
  19238. "type": "object",
  19239. "properties": {
  19240. "server": {
  19241. "type": "string"
  19242. }
  19243. },
  19244. "required": ["server"],
  19245. "additionalProperties": false
  19246. }
  19247. },
  19248. "required": ["id", "type", "properties"],
  19249. "additionalProperties": false
  19250. },
  19251. {
  19252. "type": "object",
  19253. "properties": {
  19254. "id": {
  19255. "type": "string",
  19256. "pattern": "^evt_"
  19257. },
  19258. "type": {
  19259. "type": "string",
  19260. "enum": ["mcp.browser.open.failed"]
  19261. },
  19262. "properties": {
  19263. "type": "object",
  19264. "properties": {
  19265. "mcpName": {
  19266. "type": "string"
  19267. },
  19268. "url": {
  19269. "type": "string"
  19270. }
  19271. },
  19272. "required": ["mcpName", "url"],
  19273. "additionalProperties": false
  19274. }
  19275. },
  19276. "required": ["id", "type", "properties"],
  19277. "additionalProperties": false
  19278. },
  19279. {
  19280. "type": "object",
  19281. "properties": {
  19282. "id": {
  19283. "type": "string",
  19284. "pattern": "^evt_"
  19285. },
  19286. "type": {
  19287. "type": "string",
  19288. "enum": ["command.executed"]
  19289. },
  19290. "properties": {
  19291. "type": "object",
  19292. "properties": {
  19293. "name": {
  19294. "type": "string"
  19295. },
  19296. "sessionID": {
  19297. "type": "string",
  19298. "pattern": "^ses"
  19299. },
  19300. "arguments": {
  19301. "type": "string"
  19302. },
  19303. "messageID": {
  19304. "type": "string",
  19305. "pattern": "^msg"
  19306. }
  19307. },
  19308. "required": ["name", "sessionID", "arguments", "messageID"],
  19309. "additionalProperties": false
  19310. }
  19311. },
  19312. "required": ["id", "type", "properties"],
  19313. "additionalProperties": false
  19314. },
  19315. {
  19316. "type": "object",
  19317. "properties": {
  19318. "id": {
  19319. "type": "string",
  19320. "pattern": "^evt_"
  19321. },
  19322. "type": {
  19323. "type": "string",
  19324. "enum": ["project.updated"]
  19325. },
  19326. "properties": {
  19327. "type": "object",
  19328. "properties": {
  19329. "id": {
  19330. "type": "string"
  19331. },
  19332. "worktree": {
  19333. "type": "string"
  19334. },
  19335. "vcs": {
  19336. "type": "string",
  19337. "enum": ["git"]
  19338. },
  19339. "name": {
  19340. "type": "string"
  19341. },
  19342. "icon": {
  19343. "type": "object",
  19344. "properties": {
  19345. "url": {
  19346. "type": "string"
  19347. },
  19348. "override": {
  19349. "type": "string"
  19350. },
  19351. "color": {
  19352. "type": "string"
  19353. }
  19354. },
  19355. "additionalProperties": false
  19356. },
  19357. "commands": {
  19358. "type": "object",
  19359. "properties": {
  19360. "start": {
  19361. "type": "string",
  19362. "description": "Startup script to run when creating a new workspace (worktree)"
  19363. }
  19364. },
  19365. "additionalProperties": false
  19366. },
  19367. "time": {
  19368. "type": "object",
  19369. "properties": {
  19370. "created": {
  19371. "type": "integer",
  19372. "minimum": 0
  19373. },
  19374. "updated": {
  19375. "type": "integer",
  19376. "minimum": 0
  19377. },
  19378. "initialized": {
  19379. "type": "integer",
  19380. "minimum": 0
  19381. }
  19382. },
  19383. "required": ["created", "updated"],
  19384. "additionalProperties": false
  19385. },
  19386. "sandboxes": {
  19387. "type": "array",
  19388. "items": {
  19389. "type": "string"
  19390. }
  19391. }
  19392. },
  19393. "required": ["id", "worktree", "time", "sandboxes"],
  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": ["session.status"]
  19410. },
  19411. "properties": {
  19412. "type": "object",
  19413. "properties": {
  19414. "sessionID": {
  19415. "type": "string",
  19416. "pattern": "^ses"
  19417. },
  19418. "status": {
  19419. "$ref": "#/components/schemas/SessionStatus"
  19420. }
  19421. },
  19422. "required": ["sessionID", "status"],
  19423. "additionalProperties": false
  19424. }
  19425. },
  19426. "required": ["id", "type", "properties"],
  19427. "additionalProperties": false
  19428. },
  19429. {
  19430. "type": "object",
  19431. "properties": {
  19432. "id": {
  19433. "type": "string",
  19434. "pattern": "^evt_"
  19435. },
  19436. "type": {
  19437. "type": "string",
  19438. "enum": ["session.idle"]
  19439. },
  19440. "properties": {
  19441. "type": "object",
  19442. "properties": {
  19443. "sessionID": {
  19444. "type": "string",
  19445. "pattern": "^ses"
  19446. }
  19447. },
  19448. "required": ["sessionID"],
  19449. "additionalProperties": false
  19450. }
  19451. },
  19452. "required": ["id", "type", "properties"],
  19453. "additionalProperties": false
  19454. },
  19455. {
  19456. "type": "object",
  19457. "properties": {
  19458. "id": {
  19459. "type": "string",
  19460. "pattern": "^evt_"
  19461. },
  19462. "type": {
  19463. "type": "string",
  19464. "enum": ["question.asked"]
  19465. },
  19466. "properties": {
  19467. "type": "object",
  19468. "properties": {
  19469. "id": {
  19470. "type": "string",
  19471. "pattern": "^que"
  19472. },
  19473. "sessionID": {
  19474. "type": "string",
  19475. "pattern": "^ses"
  19476. },
  19477. "questions": {
  19478. "type": "array",
  19479. "items": {
  19480. "$ref": "#/components/schemas/QuestionInfo"
  19481. },
  19482. "description": "Questions to ask"
  19483. },
  19484. "tool": {
  19485. "$ref": "#/components/schemas/QuestionTool"
  19486. }
  19487. },
  19488. "required": ["id", "sessionID", "questions"],
  19489. "additionalProperties": false
  19490. }
  19491. },
  19492. "required": ["id", "type", "properties"],
  19493. "additionalProperties": false
  19494. },
  19495. {
  19496. "type": "object",
  19497. "properties": {
  19498. "id": {
  19499. "type": "string",
  19500. "pattern": "^evt_"
  19501. },
  19502. "type": {
  19503. "type": "string",
  19504. "enum": ["question.replied"]
  19505. },
  19506. "properties": {
  19507. "type": "object",
  19508. "properties": {
  19509. "sessionID": {
  19510. "type": "string",
  19511. "pattern": "^ses"
  19512. },
  19513. "requestID": {
  19514. "type": "string",
  19515. "pattern": "^que"
  19516. },
  19517. "answers": {
  19518. "type": "array",
  19519. "items": {
  19520. "$ref": "#/components/schemas/QuestionAnswer"
  19521. }
  19522. }
  19523. },
  19524. "required": ["sessionID", "requestID", "answers"],
  19525. "additionalProperties": false
  19526. }
  19527. },
  19528. "required": ["id", "type", "properties"],
  19529. "additionalProperties": false
  19530. },
  19531. {
  19532. "type": "object",
  19533. "properties": {
  19534. "id": {
  19535. "type": "string",
  19536. "pattern": "^evt_"
  19537. },
  19538. "type": {
  19539. "type": "string",
  19540. "enum": ["question.rejected"]
  19541. },
  19542. "properties": {
  19543. "type": "object",
  19544. "properties": {
  19545. "sessionID": {
  19546. "type": "string",
  19547. "pattern": "^ses"
  19548. },
  19549. "requestID": {
  19550. "type": "string",
  19551. "pattern": "^que"
  19552. }
  19553. },
  19554. "required": ["sessionID", "requestID"],
  19555. "additionalProperties": false
  19556. }
  19557. },
  19558. "required": ["id", "type", "properties"],
  19559. "additionalProperties": false
  19560. },
  19561. {
  19562. "type": "object",
  19563. "properties": {
  19564. "id": {
  19565. "type": "string",
  19566. "pattern": "^evt_"
  19567. },
  19568. "type": {
  19569. "type": "string",
  19570. "enum": ["session.compacted"]
  19571. },
  19572. "properties": {
  19573. "type": "object",
  19574. "properties": {
  19575. "sessionID": {
  19576. "type": "string",
  19577. "pattern": "^ses"
  19578. }
  19579. },
  19580. "required": ["sessionID"],
  19581. "additionalProperties": false
  19582. }
  19583. },
  19584. "required": ["id", "type", "properties"],
  19585. "additionalProperties": false
  19586. },
  19587. {
  19588. "type": "object",
  19589. "properties": {
  19590. "id": {
  19591. "type": "string",
  19592. "pattern": "^evt_"
  19593. },
  19594. "type": {
  19595. "type": "string",
  19596. "enum": ["vcs.branch.updated"]
  19597. },
  19598. "properties": {
  19599. "type": "object",
  19600. "properties": {
  19601. "branch": {
  19602. "type": "string"
  19603. }
  19604. },
  19605. "additionalProperties": false
  19606. }
  19607. },
  19608. "required": ["id", "type", "properties"],
  19609. "additionalProperties": false
  19610. },
  19611. {
  19612. "type": "object",
  19613. "properties": {
  19614. "id": {
  19615. "type": "string",
  19616. "pattern": "^evt_"
  19617. },
  19618. "type": {
  19619. "type": "string",
  19620. "enum": ["workspace.ready"]
  19621. },
  19622. "properties": {
  19623. "type": "object",
  19624. "properties": {
  19625. "name": {
  19626. "type": "string"
  19627. }
  19628. },
  19629. "required": ["name"],
  19630. "additionalProperties": false
  19631. }
  19632. },
  19633. "required": ["id", "type", "properties"],
  19634. "additionalProperties": false
  19635. },
  19636. {
  19637. "type": "object",
  19638. "properties": {
  19639. "id": {
  19640. "type": "string",
  19641. "pattern": "^evt_"
  19642. },
  19643. "type": {
  19644. "type": "string",
  19645. "enum": ["workspace.failed"]
  19646. },
  19647. "properties": {
  19648. "type": "object",
  19649. "properties": {
  19650. "message": {
  19651. "type": "string"
  19652. }
  19653. },
  19654. "required": ["message"],
  19655. "additionalProperties": false
  19656. }
  19657. },
  19658. "required": ["id", "type", "properties"],
  19659. "additionalProperties": false
  19660. },
  19661. {
  19662. "type": "object",
  19663. "properties": {
  19664. "id": {
  19665. "type": "string",
  19666. "pattern": "^evt_"
  19667. },
  19668. "type": {
  19669. "type": "string",
  19670. "enum": ["workspace.status"]
  19671. },
  19672. "properties": {
  19673. "type": "object",
  19674. "properties": {
  19675. "workspaceID": {
  19676. "type": "string",
  19677. "pattern": "^wrk"
  19678. },
  19679. "status": {
  19680. "type": "string",
  19681. "enum": ["connected", "connecting", "disconnected", "error"]
  19682. }
  19683. },
  19684. "required": ["workspaceID", "status"],
  19685. "additionalProperties": false
  19686. }
  19687. },
  19688. "required": ["id", "type", "properties"],
  19689. "additionalProperties": false
  19690. },
  19691. {
  19692. "type": "object",
  19693. "properties": {
  19694. "id": {
  19695. "type": "string",
  19696. "pattern": "^evt_"
  19697. },
  19698. "type": {
  19699. "type": "string",
  19700. "enum": ["worktree.ready"]
  19701. },
  19702. "properties": {
  19703. "type": "object",
  19704. "properties": {
  19705. "name": {
  19706. "type": "string"
  19707. },
  19708. "branch": {
  19709. "type": "string"
  19710. }
  19711. },
  19712. "required": ["name"],
  19713. "additionalProperties": false
  19714. }
  19715. },
  19716. "required": ["id", "type", "properties"],
  19717. "additionalProperties": false
  19718. },
  19719. {
  19720. "type": "object",
  19721. "properties": {
  19722. "id": {
  19723. "type": "string",
  19724. "pattern": "^evt_"
  19725. },
  19726. "type": {
  19727. "type": "string",
  19728. "enum": ["worktree.failed"]
  19729. },
  19730. "properties": {
  19731. "type": "object",
  19732. "properties": {
  19733. "message": {
  19734. "type": "string"
  19735. }
  19736. },
  19737. "required": ["message"],
  19738. "additionalProperties": false
  19739. }
  19740. },
  19741. "required": ["id", "type", "properties"],
  19742. "additionalProperties": false
  19743. },
  19744. {
  19745. "type": "object",
  19746. "properties": {
  19747. "id": {
  19748. "type": "string",
  19749. "pattern": "^evt_"
  19750. },
  19751. "type": {
  19752. "type": "string",
  19753. "enum": ["server.connected"]
  19754. },
  19755. "properties": {
  19756. "type": "object",
  19757. "properties": {}
  19758. }
  19759. },
  19760. "required": ["id", "type", "properties"],
  19761. "additionalProperties": false
  19762. },
  19763. {
  19764. "type": "object",
  19765. "properties": {
  19766. "id": {
  19767. "type": "string",
  19768. "pattern": "^evt_"
  19769. },
  19770. "type": {
  19771. "type": "string",
  19772. "enum": ["global.disposed"]
  19773. },
  19774. "properties": {
  19775. "type": "object",
  19776. "properties": {}
  19777. }
  19778. },
  19779. "required": ["id", "type", "properties"],
  19780. "additionalProperties": false
  19781. },
  19782. {
  19783. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  19784. },
  19785. {
  19786. "$ref": "#/components/schemas/SyncEventSessionCreated"
  19787. },
  19788. {
  19789. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  19790. },
  19791. {
  19792. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  19793. },
  19794. {
  19795. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  19796. },
  19797. {
  19798. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  19799. },
  19800. {
  19801. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  19802. },
  19803. {
  19804. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  19805. },
  19806. {
  19807. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  19808. },
  19809. {
  19810. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  19811. },
  19812. {
  19813. "$ref": "#/components/schemas/SyncEventSessionNextMoved"
  19814. },
  19815. {
  19816. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  19817. },
  19818. {
  19819. "$ref": "#/components/schemas/SyncEventSessionNextPromptAdmitted"
  19820. },
  19821. {
  19822. "$ref": "#/components/schemas/SyncEventSessionNextContextUpdated"
  19823. },
  19824. {
  19825. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  19826. },
  19827. {
  19828. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  19829. },
  19830. {
  19831. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  19832. },
  19833. {
  19834. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  19835. },
  19836. {
  19837. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  19838. },
  19839. {
  19840. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  19841. },
  19842. {
  19843. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  19844. },
  19845. {
  19846. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  19847. },
  19848. {
  19849. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  19850. },
  19851. {
  19852. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  19853. },
  19854. {
  19855. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  19856. },
  19857. {
  19858. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  19859. },
  19860. {
  19861. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  19862. },
  19863. {
  19864. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  19865. },
  19866. {
  19867. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  19868. },
  19869. {
  19870. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  19871. },
  19872. {
  19873. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  19874. },
  19875. {
  19876. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  19877. },
  19878. {
  19879. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  19880. }
  19881. ]
  19882. }
  19883. },
  19884. "required": ["directory", "payload"],
  19885. "additionalProperties": false
  19886. },
  19887. "LogLevel": {
  19888. "type": "string",
  19889. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  19890. "description": "Log level"
  19891. },
  19892. "ServerConfig": {
  19893. "type": "object",
  19894. "properties": {
  19895. "port": {
  19896. "type": "integer",
  19897. "exclusiveMinimum": 0
  19898. },
  19899. "hostname": {
  19900. "type": "string"
  19901. },
  19902. "mdns": {
  19903. "type": "boolean"
  19904. },
  19905. "mdnsDomain": {
  19906. "type": "string"
  19907. },
  19908. "cors": {
  19909. "type": "array",
  19910. "items": {
  19911. "type": "string"
  19912. }
  19913. }
  19914. },
  19915. "additionalProperties": false,
  19916. "description": "Server configuration for opencode serve and web commands"
  19917. },
  19918. "PermissionActionConfig": {
  19919. "type": "string",
  19920. "enum": ["ask", "allow", "deny"]
  19921. },
  19922. "PermissionObjectConfig": {
  19923. "type": "object",
  19924. "additionalProperties": {
  19925. "$ref": "#/components/schemas/PermissionActionConfig"
  19926. }
  19927. },
  19928. "PermissionRuleConfig": {
  19929. "anyOf": [
  19930. {
  19931. "$ref": "#/components/schemas/PermissionActionConfig"
  19932. },
  19933. {
  19934. "$ref": "#/components/schemas/PermissionObjectConfig"
  19935. }
  19936. ]
  19937. },
  19938. "PermissionConfig": {
  19939. "anyOf": [
  19940. {
  19941. "$ref": "#/components/schemas/PermissionActionConfig"
  19942. },
  19943. {
  19944. "type": "object",
  19945. "properties": {
  19946. "read": {
  19947. "$ref": "#/components/schemas/PermissionRuleConfig"
  19948. },
  19949. "edit": {
  19950. "$ref": "#/components/schemas/PermissionRuleConfig"
  19951. },
  19952. "glob": {
  19953. "$ref": "#/components/schemas/PermissionRuleConfig"
  19954. },
  19955. "grep": {
  19956. "$ref": "#/components/schemas/PermissionRuleConfig"
  19957. },
  19958. "list": {
  19959. "$ref": "#/components/schemas/PermissionRuleConfig"
  19960. },
  19961. "bash": {
  19962. "$ref": "#/components/schemas/PermissionRuleConfig"
  19963. },
  19964. "task": {
  19965. "$ref": "#/components/schemas/PermissionRuleConfig"
  19966. },
  19967. "external_directory": {
  19968. "$ref": "#/components/schemas/PermissionRuleConfig"
  19969. },
  19970. "todowrite": {
  19971. "$ref": "#/components/schemas/PermissionActionConfig"
  19972. },
  19973. "question": {
  19974. "$ref": "#/components/schemas/PermissionActionConfig"
  19975. },
  19976. "webfetch": {
  19977. "$ref": "#/components/schemas/PermissionActionConfig"
  19978. },
  19979. "websearch": {
  19980. "$ref": "#/components/schemas/PermissionActionConfig"
  19981. },
  19982. "lsp": {
  19983. "$ref": "#/components/schemas/PermissionRuleConfig"
  19984. },
  19985. "doom_loop": {
  19986. "$ref": "#/components/schemas/PermissionActionConfig"
  19987. },
  19988. "skill": {
  19989. "$ref": "#/components/schemas/PermissionRuleConfig"
  19990. }
  19991. },
  19992. "additionalProperties": {
  19993. "$ref": "#/components/schemas/PermissionRuleConfig"
  19994. }
  19995. }
  19996. ]
  19997. },
  19998. "AgentConfig": {
  19999. "type": "object",
  20000. "properties": {
  20001. "model": {
  20002. "type": "string"
  20003. },
  20004. "variant": {
  20005. "type": "string"
  20006. },
  20007. "temperature": {
  20008. "type": "number"
  20009. },
  20010. "top_p": {
  20011. "type": "number"
  20012. },
  20013. "prompt": {
  20014. "type": "string"
  20015. },
  20016. "tools": {
  20017. "type": "object",
  20018. "additionalProperties": {
  20019. "type": "boolean"
  20020. }
  20021. },
  20022. "disable": {
  20023. "type": "boolean"
  20024. },
  20025. "description": {
  20026. "type": "string"
  20027. },
  20028. "mode": {
  20029. "type": "string",
  20030. "enum": ["subagent", "primary", "all"]
  20031. },
  20032. "hidden": {
  20033. "type": "boolean"
  20034. },
  20035. "options": {
  20036. "type": "object"
  20037. },
  20038. "color": {
  20039. "anyOf": [
  20040. {
  20041. "type": "string",
  20042. "pattern": "^#[0-9a-fA-F]{6}$"
  20043. },
  20044. {
  20045. "type": "string",
  20046. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  20047. }
  20048. ],
  20049. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  20050. },
  20051. "steps": {
  20052. "type": "integer",
  20053. "exclusiveMinimum": 0
  20054. },
  20055. "maxSteps": {
  20056. "type": "integer",
  20057. "exclusiveMinimum": 0
  20058. },
  20059. "permission": {
  20060. "$ref": "#/components/schemas/PermissionConfig"
  20061. }
  20062. },
  20063. "additionalProperties": {}
  20064. },
  20065. "ProviderConfig": {
  20066. "type": "object",
  20067. "properties": {
  20068. "api": {
  20069. "type": "string"
  20070. },
  20071. "name": {
  20072. "type": "string"
  20073. },
  20074. "env": {
  20075. "type": "array",
  20076. "items": {
  20077. "type": "string"
  20078. }
  20079. },
  20080. "id": {
  20081. "type": "string"
  20082. },
  20083. "npm": {
  20084. "type": "string"
  20085. },
  20086. "whitelist": {
  20087. "type": "array",
  20088. "items": {
  20089. "type": "string"
  20090. }
  20091. },
  20092. "blacklist": {
  20093. "type": "array",
  20094. "items": {
  20095. "type": "string"
  20096. }
  20097. },
  20098. "options": {
  20099. "type": "object",
  20100. "properties": {
  20101. "apiKey": {
  20102. "type": "string"
  20103. },
  20104. "baseURL": {
  20105. "type": "string"
  20106. },
  20107. "enterpriseUrl": {
  20108. "type": "string"
  20109. },
  20110. "setCacheKey": {
  20111. "type": "boolean"
  20112. },
  20113. "timeout": {
  20114. "anyOf": [
  20115. {
  20116. "type": "integer",
  20117. "exclusiveMinimum": 0
  20118. },
  20119. {
  20120. "type": "boolean",
  20121. "enum": [false]
  20122. }
  20123. ],
  20124. "description": "Timeout in milliseconds for full requests to this provider. Set to false to disable timeout."
  20125. },
  20126. "headerTimeout": {
  20127. "anyOf": [
  20128. {
  20129. "type": "integer",
  20130. "exclusiveMinimum": 0
  20131. },
  20132. {
  20133. "type": "boolean",
  20134. "enum": [false]
  20135. }
  20136. ],
  20137. "description": "Timeout in milliseconds to wait for response headers. Provider integrations may set defaults. Set to false to disable timeout."
  20138. },
  20139. "chunkTimeout": {
  20140. "type": "integer",
  20141. "exclusiveMinimum": 0
  20142. }
  20143. },
  20144. "additionalProperties": {}
  20145. },
  20146. "models": {
  20147. "type": "object",
  20148. "additionalProperties": {
  20149. "type": "object",
  20150. "properties": {
  20151. "id": {
  20152. "type": "string"
  20153. },
  20154. "name": {
  20155. "type": "string"
  20156. },
  20157. "family": {
  20158. "type": "string"
  20159. },
  20160. "release_date": {
  20161. "type": "string"
  20162. },
  20163. "attachment": {
  20164. "type": "boolean"
  20165. },
  20166. "reasoning": {
  20167. "type": "boolean"
  20168. },
  20169. "temperature": {
  20170. "type": "boolean"
  20171. },
  20172. "tool_call": {
  20173. "type": "boolean"
  20174. },
  20175. "interleaved": {
  20176. "anyOf": [
  20177. {
  20178. "type": "boolean",
  20179. "enum": [true]
  20180. },
  20181. {
  20182. "type": "object",
  20183. "properties": {
  20184. "field": {
  20185. "type": "string",
  20186. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  20187. }
  20188. },
  20189. "required": ["field"],
  20190. "additionalProperties": false
  20191. }
  20192. ]
  20193. },
  20194. "cost": {
  20195. "type": "object",
  20196. "properties": {
  20197. "input": {
  20198. "type": "number"
  20199. },
  20200. "output": {
  20201. "type": "number"
  20202. },
  20203. "cache_read": {
  20204. "type": "number"
  20205. },
  20206. "cache_write": {
  20207. "type": "number"
  20208. },
  20209. "context_over_200k": {
  20210. "type": "object",
  20211. "properties": {
  20212. "input": {
  20213. "type": "number"
  20214. },
  20215. "output": {
  20216. "type": "number"
  20217. },
  20218. "cache_read": {
  20219. "type": "number"
  20220. },
  20221. "cache_write": {
  20222. "type": "number"
  20223. }
  20224. },
  20225. "required": ["input", "output"],
  20226. "additionalProperties": false
  20227. }
  20228. },
  20229. "required": ["input", "output"],
  20230. "additionalProperties": false
  20231. },
  20232. "limit": {
  20233. "type": "object",
  20234. "properties": {
  20235. "context": {
  20236. "type": "number"
  20237. },
  20238. "input": {
  20239. "type": "number"
  20240. },
  20241. "output": {
  20242. "type": "number"
  20243. }
  20244. },
  20245. "required": ["context", "output"],
  20246. "additionalProperties": false
  20247. },
  20248. "modalities": {
  20249. "type": "object",
  20250. "properties": {
  20251. "input": {
  20252. "type": "array",
  20253. "items": {
  20254. "type": "string",
  20255. "enum": ["text", "audio", "image", "video", "pdf"]
  20256. }
  20257. },
  20258. "output": {
  20259. "type": "array",
  20260. "items": {
  20261. "type": "string",
  20262. "enum": ["text", "audio", "image", "video", "pdf"]
  20263. }
  20264. }
  20265. },
  20266. "additionalProperties": false
  20267. },
  20268. "experimental": {
  20269. "type": "boolean"
  20270. },
  20271. "status": {
  20272. "type": "string",
  20273. "enum": ["alpha", "beta", "deprecated", "active"]
  20274. },
  20275. "provider": {
  20276. "type": "object",
  20277. "properties": {
  20278. "npm": {
  20279. "type": "string"
  20280. },
  20281. "api": {
  20282. "type": "string"
  20283. }
  20284. },
  20285. "additionalProperties": false
  20286. },
  20287. "options": {
  20288. "type": "object"
  20289. },
  20290. "headers": {
  20291. "type": "object",
  20292. "additionalProperties": {
  20293. "type": "string"
  20294. }
  20295. },
  20296. "variants": {
  20297. "type": "object",
  20298. "additionalProperties": {
  20299. "type": "object",
  20300. "properties": {
  20301. "disabled": {
  20302. "type": "boolean"
  20303. }
  20304. },
  20305. "additionalProperties": {}
  20306. },
  20307. "description": "Variant-specific configuration"
  20308. }
  20309. },
  20310. "additionalProperties": false
  20311. }
  20312. }
  20313. },
  20314. "additionalProperties": false
  20315. },
  20316. "McpLocalConfig": {
  20317. "type": "object",
  20318. "properties": {
  20319. "type": {
  20320. "type": "string",
  20321. "enum": ["local"],
  20322. "description": "Type of MCP server connection"
  20323. },
  20324. "command": {
  20325. "type": "array",
  20326. "items": {
  20327. "type": "string"
  20328. },
  20329. "description": "Command and arguments to run the MCP server"
  20330. },
  20331. "cwd": {
  20332. "type": "string"
  20333. },
  20334. "environment": {
  20335. "type": "object",
  20336. "additionalProperties": {
  20337. "type": "string"
  20338. }
  20339. },
  20340. "enabled": {
  20341. "type": "boolean"
  20342. },
  20343. "timeout": {
  20344. "type": "integer",
  20345. "exclusiveMinimum": 0
  20346. }
  20347. },
  20348. "required": ["type", "command"],
  20349. "additionalProperties": false
  20350. },
  20351. "McpOAuthConfig": {
  20352. "type": "object",
  20353. "properties": {
  20354. "clientId": {
  20355. "type": "string"
  20356. },
  20357. "clientSecret": {
  20358. "type": "string"
  20359. },
  20360. "scope": {
  20361. "type": "string"
  20362. },
  20363. "callbackPort": {
  20364. "type": "integer",
  20365. "minimum": 1,
  20366. "maximum": 65535
  20367. },
  20368. "redirectUri": {
  20369. "type": "string"
  20370. }
  20371. },
  20372. "additionalProperties": false
  20373. },
  20374. "McpRemoteConfig": {
  20375. "type": "object",
  20376. "properties": {
  20377. "type": {
  20378. "type": "string",
  20379. "enum": ["remote"],
  20380. "description": "Type of MCP server connection"
  20381. },
  20382. "url": {
  20383. "type": "string",
  20384. "description": "URL of the remote MCP server"
  20385. },
  20386. "enabled": {
  20387. "type": "boolean"
  20388. },
  20389. "headers": {
  20390. "type": "object",
  20391. "additionalProperties": {
  20392. "type": "string"
  20393. }
  20394. },
  20395. "oauth": {
  20396. "anyOf": [
  20397. {
  20398. "$ref": "#/components/schemas/McpOAuthConfig"
  20399. },
  20400. {
  20401. "type": "boolean",
  20402. "enum": [false]
  20403. }
  20404. ],
  20405. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  20406. },
  20407. "timeout": {
  20408. "type": "integer",
  20409. "exclusiveMinimum": 0
  20410. }
  20411. },
  20412. "required": ["type", "url"],
  20413. "additionalProperties": false
  20414. },
  20415. "LayoutConfig": {
  20416. "type": "string",
  20417. "enum": ["auto", "stretch"],
  20418. "description": "@deprecated Always uses stretch layout."
  20419. },
  20420. "ImageAttachmentConfig": {
  20421. "type": "object",
  20422. "properties": {
  20423. "auto_resize": {
  20424. "type": "boolean"
  20425. },
  20426. "max_width": {
  20427. "type": "integer",
  20428. "exclusiveMinimum": 0
  20429. },
  20430. "max_height": {
  20431. "type": "integer",
  20432. "exclusiveMinimum": 0
  20433. },
  20434. "max_base64_bytes": {
  20435. "type": "integer",
  20436. "exclusiveMinimum": 0
  20437. }
  20438. },
  20439. "additionalProperties": false
  20440. },
  20441. "AttachmentConfig": {
  20442. "type": "object",
  20443. "properties": {
  20444. "image": {
  20445. "$ref": "#/components/schemas/ImageAttachmentConfig"
  20446. }
  20447. },
  20448. "additionalProperties": false
  20449. },
  20450. "Config": {
  20451. "type": "object",
  20452. "properties": {
  20453. "$schema": {
  20454. "type": "string"
  20455. },
  20456. "shell": {
  20457. "type": "string"
  20458. },
  20459. "logLevel": {
  20460. "$ref": "#/components/schemas/LogLevel"
  20461. },
  20462. "server": {
  20463. "$ref": "#/components/schemas/ServerConfig"
  20464. },
  20465. "command": {
  20466. "type": "object",
  20467. "additionalProperties": {
  20468. "type": "object",
  20469. "properties": {
  20470. "template": {
  20471. "type": "string"
  20472. },
  20473. "description": {
  20474. "type": "string"
  20475. },
  20476. "agent": {
  20477. "type": "string"
  20478. },
  20479. "model": {
  20480. "type": "string"
  20481. },
  20482. "variant": {
  20483. "type": "string"
  20484. },
  20485. "subtask": {
  20486. "type": "boolean"
  20487. }
  20488. },
  20489. "required": ["template"],
  20490. "additionalProperties": false
  20491. }
  20492. },
  20493. "skills": {
  20494. "type": "object",
  20495. "properties": {
  20496. "paths": {
  20497. "type": "array",
  20498. "items": {
  20499. "type": "string"
  20500. }
  20501. },
  20502. "urls": {
  20503. "type": "array",
  20504. "items": {
  20505. "type": "string"
  20506. }
  20507. }
  20508. },
  20509. "additionalProperties": false
  20510. },
  20511. "references": {
  20512. "type": "object",
  20513. "additionalProperties": {
  20514. "anyOf": [
  20515. {
  20516. "type": "string"
  20517. },
  20518. {
  20519. "$ref": "#/components/schemas/ConfigV2ReferenceGit"
  20520. },
  20521. {
  20522. "$ref": "#/components/schemas/ConfigV2ReferenceLocal"
  20523. }
  20524. ]
  20525. }
  20526. },
  20527. "reference": {
  20528. "type": "object",
  20529. "additionalProperties": {
  20530. "anyOf": [
  20531. {
  20532. "type": "string"
  20533. },
  20534. {
  20535. "$ref": "#/components/schemas/ConfigV2ReferenceGit"
  20536. },
  20537. {
  20538. "$ref": "#/components/schemas/ConfigV2ReferenceLocal"
  20539. }
  20540. ]
  20541. }
  20542. },
  20543. "watcher": {
  20544. "type": "object",
  20545. "properties": {
  20546. "ignore": {
  20547. "type": "array",
  20548. "items": {
  20549. "type": "string"
  20550. }
  20551. }
  20552. },
  20553. "additionalProperties": false
  20554. },
  20555. "snapshot": {
  20556. "type": "boolean"
  20557. },
  20558. "plugin": {
  20559. "type": "array",
  20560. "items": {
  20561. "anyOf": [
  20562. {
  20563. "type": "string"
  20564. },
  20565. {
  20566. "type": "array",
  20567. "prefixItems": [
  20568. {
  20569. "type": "string"
  20570. },
  20571. {
  20572. "type": "object"
  20573. }
  20574. ],
  20575. "maxItems": 2,
  20576. "minItems": 2
  20577. }
  20578. ]
  20579. }
  20580. },
  20581. "share": {
  20582. "type": "string",
  20583. "enum": ["manual", "auto", "disabled"]
  20584. },
  20585. "autoshare": {
  20586. "type": "boolean"
  20587. },
  20588. "autoupdate": {
  20589. "anyOf": [
  20590. {
  20591. "type": "boolean"
  20592. },
  20593. {
  20594. "type": "string",
  20595. "enum": ["notify"]
  20596. }
  20597. ],
  20598. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  20599. },
  20600. "disabled_providers": {
  20601. "type": "array",
  20602. "items": {
  20603. "type": "string"
  20604. }
  20605. },
  20606. "enabled_providers": {
  20607. "type": "array",
  20608. "items": {
  20609. "type": "string"
  20610. }
  20611. },
  20612. "model": {
  20613. "type": "string"
  20614. },
  20615. "small_model": {
  20616. "type": "string"
  20617. },
  20618. "default_agent": {
  20619. "type": "string"
  20620. },
  20621. "username": {
  20622. "type": "string"
  20623. },
  20624. "mode": {
  20625. "type": "object",
  20626. "properties": {
  20627. "build": {
  20628. "$ref": "#/components/schemas/AgentConfig"
  20629. },
  20630. "plan": {
  20631. "$ref": "#/components/schemas/AgentConfig"
  20632. }
  20633. },
  20634. "additionalProperties": {
  20635. "$ref": "#/components/schemas/AgentConfig"
  20636. }
  20637. },
  20638. "agent": {
  20639. "type": "object",
  20640. "properties": {
  20641. "plan": {
  20642. "$ref": "#/components/schemas/AgentConfig"
  20643. },
  20644. "build": {
  20645. "$ref": "#/components/schemas/AgentConfig"
  20646. },
  20647. "general": {
  20648. "$ref": "#/components/schemas/AgentConfig"
  20649. },
  20650. "explore": {
  20651. "$ref": "#/components/schemas/AgentConfig"
  20652. },
  20653. "title": {
  20654. "$ref": "#/components/schemas/AgentConfig"
  20655. },
  20656. "summary": {
  20657. "$ref": "#/components/schemas/AgentConfig"
  20658. },
  20659. "compaction": {
  20660. "$ref": "#/components/schemas/AgentConfig"
  20661. }
  20662. },
  20663. "additionalProperties": {
  20664. "$ref": "#/components/schemas/AgentConfig"
  20665. }
  20666. },
  20667. "provider": {
  20668. "type": "object",
  20669. "additionalProperties": {
  20670. "$ref": "#/components/schemas/ProviderConfig"
  20671. }
  20672. },
  20673. "mcp": {
  20674. "type": "object",
  20675. "additionalProperties": {
  20676. "anyOf": [
  20677. {
  20678. "$ref": "#/components/schemas/McpLocalConfig"
  20679. },
  20680. {
  20681. "$ref": "#/components/schemas/McpRemoteConfig"
  20682. },
  20683. {
  20684. "type": "object",
  20685. "properties": {
  20686. "enabled": {
  20687. "type": "boolean"
  20688. }
  20689. },
  20690. "required": ["enabled"],
  20691. "additionalProperties": false
  20692. }
  20693. ]
  20694. }
  20695. },
  20696. "formatter": {
  20697. "anyOf": [
  20698. {
  20699. "type": "boolean"
  20700. },
  20701. {
  20702. "type": "object",
  20703. "additionalProperties": {
  20704. "type": "object",
  20705. "properties": {
  20706. "disabled": {
  20707. "type": "boolean"
  20708. },
  20709. "command": {
  20710. "type": "array",
  20711. "items": {
  20712. "type": "string"
  20713. }
  20714. },
  20715. "environment": {
  20716. "type": "object",
  20717. "additionalProperties": {
  20718. "type": "string"
  20719. }
  20720. },
  20721. "extensions": {
  20722. "type": "array",
  20723. "items": {
  20724. "type": "string"
  20725. }
  20726. }
  20727. },
  20728. "additionalProperties": false
  20729. }
  20730. }
  20731. ],
  20732. "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."
  20733. },
  20734. "lsp": {
  20735. "anyOf": [
  20736. {
  20737. "type": "boolean"
  20738. },
  20739. {
  20740. "type": "object",
  20741. "additionalProperties": {
  20742. "anyOf": [
  20743. {
  20744. "type": "object",
  20745. "properties": {
  20746. "disabled": {
  20747. "type": "boolean",
  20748. "enum": [true]
  20749. }
  20750. },
  20751. "required": ["disabled"],
  20752. "additionalProperties": false
  20753. },
  20754. {
  20755. "type": "object",
  20756. "properties": {
  20757. "command": {
  20758. "type": "array",
  20759. "items": {
  20760. "type": "string"
  20761. }
  20762. },
  20763. "extensions": {
  20764. "type": "array",
  20765. "items": {
  20766. "type": "string"
  20767. }
  20768. },
  20769. "disabled": {
  20770. "type": "boolean"
  20771. },
  20772. "env": {
  20773. "type": "object",
  20774. "additionalProperties": {
  20775. "type": "string"
  20776. }
  20777. },
  20778. "initialization": {
  20779. "type": "object"
  20780. }
  20781. },
  20782. "required": ["command"],
  20783. "additionalProperties": false
  20784. }
  20785. ]
  20786. }
  20787. }
  20788. ],
  20789. "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."
  20790. },
  20791. "instructions": {
  20792. "type": "array",
  20793. "items": {
  20794. "type": "string"
  20795. }
  20796. },
  20797. "layout": {
  20798. "$ref": "#/components/schemas/LayoutConfig"
  20799. },
  20800. "permission": {
  20801. "$ref": "#/components/schemas/PermissionConfig"
  20802. },
  20803. "tools": {
  20804. "type": "object",
  20805. "additionalProperties": {
  20806. "type": "boolean"
  20807. }
  20808. },
  20809. "attachment": {
  20810. "$ref": "#/components/schemas/AttachmentConfig"
  20811. },
  20812. "enterprise": {
  20813. "type": "object",
  20814. "properties": {
  20815. "url": {
  20816. "type": "string"
  20817. }
  20818. },
  20819. "additionalProperties": false
  20820. },
  20821. "tool_output": {
  20822. "type": "object",
  20823. "properties": {
  20824. "max_lines": {
  20825. "type": "integer",
  20826. "exclusiveMinimum": 0
  20827. },
  20828. "max_bytes": {
  20829. "type": "integer",
  20830. "exclusiveMinimum": 0
  20831. }
  20832. },
  20833. "additionalProperties": false
  20834. },
  20835. "compaction": {
  20836. "type": "object",
  20837. "properties": {
  20838. "auto": {
  20839. "type": "boolean"
  20840. },
  20841. "prune": {
  20842. "type": "boolean"
  20843. },
  20844. "tail_turns": {
  20845. "type": "integer",
  20846. "minimum": 0
  20847. },
  20848. "preserve_recent_tokens": {
  20849. "type": "integer",
  20850. "minimum": 0
  20851. },
  20852. "reserved": {
  20853. "type": "integer",
  20854. "minimum": 0
  20855. }
  20856. },
  20857. "additionalProperties": false
  20858. },
  20859. "experimental": {
  20860. "type": "object",
  20861. "properties": {
  20862. "disable_paste_summary": {
  20863. "type": "boolean"
  20864. },
  20865. "batch_tool": {
  20866. "type": "boolean"
  20867. },
  20868. "openTelemetry": {
  20869. "type": "boolean"
  20870. },
  20871. "primary_tools": {
  20872. "type": "array",
  20873. "items": {
  20874. "type": "string"
  20875. }
  20876. },
  20877. "continue_loop_on_deny": {
  20878. "type": "boolean"
  20879. },
  20880. "mcp_timeout": {
  20881. "type": "integer",
  20882. "exclusiveMinimum": 0
  20883. },
  20884. "policies": {
  20885. "type": "array",
  20886. "items": {
  20887. "$ref": "#/components/schemas/ConfigV2ExperimentalPolicy"
  20888. }
  20889. }
  20890. },
  20891. "additionalProperties": false
  20892. }
  20893. },
  20894. "additionalProperties": false
  20895. },
  20896. "Model": {
  20897. "type": "object",
  20898. "properties": {
  20899. "id": {
  20900. "type": "string"
  20901. },
  20902. "providerID": {
  20903. "type": "string"
  20904. },
  20905. "api": {
  20906. "type": "object",
  20907. "properties": {
  20908. "id": {
  20909. "type": "string"
  20910. },
  20911. "url": {
  20912. "type": "string"
  20913. },
  20914. "npm": {
  20915. "type": "string"
  20916. }
  20917. },
  20918. "required": ["id", "url", "npm"],
  20919. "additionalProperties": false
  20920. },
  20921. "name": {
  20922. "type": "string"
  20923. },
  20924. "family": {
  20925. "type": "string"
  20926. },
  20927. "capabilities": {
  20928. "type": "object",
  20929. "properties": {
  20930. "temperature": {
  20931. "type": "boolean"
  20932. },
  20933. "reasoning": {
  20934. "type": "boolean"
  20935. },
  20936. "attachment": {
  20937. "type": "boolean"
  20938. },
  20939. "toolcall": {
  20940. "type": "boolean"
  20941. },
  20942. "input": {
  20943. "type": "object",
  20944. "properties": {
  20945. "text": {
  20946. "type": "boolean"
  20947. },
  20948. "audio": {
  20949. "type": "boolean"
  20950. },
  20951. "image": {
  20952. "type": "boolean"
  20953. },
  20954. "video": {
  20955. "type": "boolean"
  20956. },
  20957. "pdf": {
  20958. "type": "boolean"
  20959. }
  20960. },
  20961. "required": ["text", "audio", "image", "video", "pdf"],
  20962. "additionalProperties": false
  20963. },
  20964. "output": {
  20965. "type": "object",
  20966. "properties": {
  20967. "text": {
  20968. "type": "boolean"
  20969. },
  20970. "audio": {
  20971. "type": "boolean"
  20972. },
  20973. "image": {
  20974. "type": "boolean"
  20975. },
  20976. "video": {
  20977. "type": "boolean"
  20978. },
  20979. "pdf": {
  20980. "type": "boolean"
  20981. }
  20982. },
  20983. "required": ["text", "audio", "image", "video", "pdf"],
  20984. "additionalProperties": false
  20985. },
  20986. "interleaved": {
  20987. "anyOf": [
  20988. {
  20989. "type": "boolean"
  20990. },
  20991. {
  20992. "type": "object",
  20993. "properties": {
  20994. "field": {
  20995. "type": "string",
  20996. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  20997. }
  20998. },
  20999. "required": ["field"],
  21000. "additionalProperties": false
  21001. }
  21002. ]
  21003. }
  21004. },
  21005. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  21006. "additionalProperties": false
  21007. },
  21008. "cost": {
  21009. "type": "object",
  21010. "properties": {
  21011. "input": {
  21012. "type": "number"
  21013. },
  21014. "output": {
  21015. "type": "number"
  21016. },
  21017. "cache": {
  21018. "type": "object",
  21019. "properties": {
  21020. "read": {
  21021. "type": "number"
  21022. },
  21023. "write": {
  21024. "type": "number"
  21025. }
  21026. },
  21027. "required": ["read", "write"],
  21028. "additionalProperties": false
  21029. },
  21030. "tiers": {
  21031. "type": "array",
  21032. "items": {
  21033. "type": "object",
  21034. "properties": {
  21035. "input": {
  21036. "type": "number"
  21037. },
  21038. "output": {
  21039. "type": "number"
  21040. },
  21041. "cache": {
  21042. "type": "object",
  21043. "properties": {
  21044. "read": {
  21045. "type": "number"
  21046. },
  21047. "write": {
  21048. "type": "number"
  21049. }
  21050. },
  21051. "required": ["read", "write"],
  21052. "additionalProperties": false
  21053. },
  21054. "tier": {
  21055. "type": "object",
  21056. "properties": {
  21057. "type": {
  21058. "type": "string",
  21059. "enum": ["context"]
  21060. },
  21061. "size": {
  21062. "type": "number"
  21063. }
  21064. },
  21065. "required": ["type", "size"],
  21066. "additionalProperties": false
  21067. }
  21068. },
  21069. "required": ["input", "output", "cache", "tier"],
  21070. "additionalProperties": false
  21071. }
  21072. },
  21073. "experimentalOver200K": {
  21074. "type": "object",
  21075. "properties": {
  21076. "input": {
  21077. "type": "number"
  21078. },
  21079. "output": {
  21080. "type": "number"
  21081. },
  21082. "cache": {
  21083. "type": "object",
  21084. "properties": {
  21085. "read": {
  21086. "type": "number"
  21087. },
  21088. "write": {
  21089. "type": "number"
  21090. }
  21091. },
  21092. "required": ["read", "write"],
  21093. "additionalProperties": false
  21094. }
  21095. },
  21096. "required": ["input", "output", "cache"],
  21097. "additionalProperties": false
  21098. }
  21099. },
  21100. "required": ["input", "output", "cache"],
  21101. "additionalProperties": false
  21102. },
  21103. "limit": {
  21104. "type": "object",
  21105. "properties": {
  21106. "context": {
  21107. "type": "number"
  21108. },
  21109. "input": {
  21110. "type": "number"
  21111. },
  21112. "output": {
  21113. "type": "number"
  21114. }
  21115. },
  21116. "required": ["context", "output"],
  21117. "additionalProperties": false
  21118. },
  21119. "status": {
  21120. "type": "string",
  21121. "enum": ["alpha", "beta", "deprecated", "active"]
  21122. },
  21123. "options": {
  21124. "type": "object"
  21125. },
  21126. "headers": {
  21127. "type": "object",
  21128. "additionalProperties": {
  21129. "type": "string"
  21130. }
  21131. },
  21132. "release_date": {
  21133. "type": "string"
  21134. },
  21135. "variants": {
  21136. "type": "object",
  21137. "additionalProperties": {
  21138. "type": "object"
  21139. }
  21140. }
  21141. },
  21142. "required": [
  21143. "id",
  21144. "providerID",
  21145. "api",
  21146. "name",
  21147. "capabilities",
  21148. "cost",
  21149. "limit",
  21150. "status",
  21151. "options",
  21152. "headers",
  21153. "release_date"
  21154. ],
  21155. "additionalProperties": false
  21156. },
  21157. "Provider": {
  21158. "type": "object",
  21159. "properties": {
  21160. "id": {
  21161. "type": "string"
  21162. },
  21163. "name": {
  21164. "type": "string"
  21165. },
  21166. "source": {
  21167. "type": "string",
  21168. "enum": ["env", "config", "custom", "api"]
  21169. },
  21170. "env": {
  21171. "type": "array",
  21172. "items": {
  21173. "type": "string"
  21174. }
  21175. },
  21176. "key": {
  21177. "type": "string"
  21178. },
  21179. "options": {
  21180. "type": "object"
  21181. },
  21182. "models": {
  21183. "type": "object",
  21184. "additionalProperties": {
  21185. "$ref": "#/components/schemas/Model"
  21186. }
  21187. }
  21188. },
  21189. "required": ["id", "name", "source", "env", "options", "models"],
  21190. "additionalProperties": false
  21191. },
  21192. "ExperimentalCapabilities": {
  21193. "type": "object",
  21194. "properties": {
  21195. "backgroundSubagents": {
  21196. "type": "boolean"
  21197. }
  21198. },
  21199. "required": ["backgroundSubagents"],
  21200. "additionalProperties": false
  21201. },
  21202. "ConsoleState": {
  21203. "type": "object",
  21204. "properties": {
  21205. "consoleManagedProviders": {
  21206. "type": "array",
  21207. "items": {
  21208. "type": "string"
  21209. }
  21210. },
  21211. "activeOrgName": {
  21212. "type": "string"
  21213. },
  21214. "switchableOrgCount": {
  21215. "type": "integer",
  21216. "minimum": 0
  21217. }
  21218. },
  21219. "required": ["consoleManagedProviders", "switchableOrgCount"],
  21220. "additionalProperties": false
  21221. },
  21222. "effect_HttpApiError_InternalServerError": {
  21223. "type": "object",
  21224. "properties": {
  21225. "_tag": {
  21226. "type": "string",
  21227. "enum": ["InternalServerError"]
  21228. }
  21229. },
  21230. "required": ["_tag"],
  21231. "additionalProperties": false
  21232. },
  21233. "ToolListItem": {
  21234. "type": "object",
  21235. "properties": {
  21236. "id": {
  21237. "type": "string"
  21238. },
  21239. "description": {
  21240. "type": "string"
  21241. },
  21242. "parameters": {}
  21243. },
  21244. "required": ["id", "description", "parameters"],
  21245. "additionalProperties": false
  21246. },
  21247. "ToolList": {
  21248. "type": "array",
  21249. "items": {
  21250. "$ref": "#/components/schemas/ToolListItem"
  21251. }
  21252. },
  21253. "ToolIDs": {
  21254. "type": "array",
  21255. "items": {
  21256. "type": "string"
  21257. }
  21258. },
  21259. "WorktreeError": {
  21260. "type": "object",
  21261. "properties": {
  21262. "name": {
  21263. "type": "string",
  21264. "enum": [
  21265. "WorktreeNotGitError",
  21266. "WorktreeNameGenerationFailedError",
  21267. "WorktreeCreateFailedError",
  21268. "WorktreeStartCommandFailedError",
  21269. "WorktreeRemoveFailedError",
  21270. "WorktreeResetFailedError",
  21271. "WorktreeListFailedError"
  21272. ]
  21273. },
  21274. "data": {
  21275. "type": "object",
  21276. "properties": {
  21277. "message": {
  21278. "type": "string"
  21279. }
  21280. },
  21281. "required": ["message"],
  21282. "additionalProperties": false
  21283. }
  21284. },
  21285. "required": ["name", "data"],
  21286. "additionalProperties": false
  21287. },
  21288. "WorktreeCreateInput": {
  21289. "type": "object",
  21290. "properties": {
  21291. "name": {
  21292. "type": "string"
  21293. },
  21294. "startCommand": {
  21295. "type": "string",
  21296. "description": "Additional startup script to run after the project's start command"
  21297. }
  21298. },
  21299. "additionalProperties": false
  21300. },
  21301. "Worktree": {
  21302. "type": "object",
  21303. "properties": {
  21304. "name": {
  21305. "type": "string"
  21306. },
  21307. "branch": {
  21308. "type": "string"
  21309. },
  21310. "directory": {
  21311. "type": "string"
  21312. }
  21313. },
  21314. "required": ["name", "directory"],
  21315. "additionalProperties": false
  21316. },
  21317. "WorktreeRemoveInput": {
  21318. "type": "object",
  21319. "properties": {
  21320. "directory": {
  21321. "type": "string"
  21322. }
  21323. },
  21324. "required": ["directory"],
  21325. "additionalProperties": false
  21326. },
  21327. "WorktreeResetInput": {
  21328. "type": "object",
  21329. "properties": {
  21330. "directory": {
  21331. "type": "string"
  21332. }
  21333. },
  21334. "required": ["directory"],
  21335. "additionalProperties": false
  21336. },
  21337. "ProjectSummary": {
  21338. "type": "object",
  21339. "properties": {
  21340. "id": {
  21341. "type": "string"
  21342. },
  21343. "name": {
  21344. "type": "string"
  21345. },
  21346. "worktree": {
  21347. "type": "string"
  21348. }
  21349. },
  21350. "required": ["id", "worktree"],
  21351. "additionalProperties": false
  21352. },
  21353. "GlobalSession": {
  21354. "type": "object",
  21355. "properties": {
  21356. "id": {
  21357. "type": "string",
  21358. "pattern": "^ses"
  21359. },
  21360. "slug": {
  21361. "type": "string"
  21362. },
  21363. "projectID": {
  21364. "type": "string"
  21365. },
  21366. "workspaceID": {
  21367. "type": "string",
  21368. "pattern": "^wrk"
  21369. },
  21370. "directory": {
  21371. "type": "string"
  21372. },
  21373. "path": {
  21374. "type": "string"
  21375. },
  21376. "parentID": {
  21377. "type": "string",
  21378. "pattern": "^ses"
  21379. },
  21380. "summary": {
  21381. "type": "object",
  21382. "properties": {
  21383. "additions": {
  21384. "type": "number"
  21385. },
  21386. "deletions": {
  21387. "type": "number"
  21388. },
  21389. "files": {
  21390. "type": "number"
  21391. },
  21392. "diffs": {
  21393. "type": "array",
  21394. "items": {
  21395. "$ref": "#/components/schemas/SnapshotFileDiff"
  21396. }
  21397. }
  21398. },
  21399. "required": ["additions", "deletions", "files"],
  21400. "additionalProperties": false
  21401. },
  21402. "cost": {
  21403. "type": "number"
  21404. },
  21405. "tokens": {
  21406. "type": "object",
  21407. "properties": {
  21408. "input": {
  21409. "type": "number"
  21410. },
  21411. "output": {
  21412. "type": "number"
  21413. },
  21414. "reasoning": {
  21415. "type": "number"
  21416. },
  21417. "cache": {
  21418. "type": "object",
  21419. "properties": {
  21420. "read": {
  21421. "type": "number"
  21422. },
  21423. "write": {
  21424. "type": "number"
  21425. }
  21426. },
  21427. "required": ["read", "write"],
  21428. "additionalProperties": false
  21429. }
  21430. },
  21431. "required": ["input", "output", "reasoning", "cache"],
  21432. "additionalProperties": false
  21433. },
  21434. "share": {
  21435. "type": "object",
  21436. "properties": {
  21437. "url": {
  21438. "type": "string"
  21439. }
  21440. },
  21441. "required": ["url"],
  21442. "additionalProperties": false
  21443. },
  21444. "title": {
  21445. "type": "string"
  21446. },
  21447. "agent": {
  21448. "type": "string"
  21449. },
  21450. "model": {
  21451. "type": "object",
  21452. "properties": {
  21453. "id": {
  21454. "type": "string"
  21455. },
  21456. "providerID": {
  21457. "type": "string"
  21458. },
  21459. "variant": {
  21460. "type": "string"
  21461. }
  21462. },
  21463. "required": ["id", "providerID"],
  21464. "additionalProperties": false
  21465. },
  21466. "version": {
  21467. "type": "string"
  21468. },
  21469. "metadata": {
  21470. "type": "object"
  21471. },
  21472. "time": {
  21473. "type": "object",
  21474. "properties": {
  21475. "created": {
  21476. "type": "integer",
  21477. "minimum": 0
  21478. },
  21479. "updated": {
  21480. "type": "integer",
  21481. "minimum": 0
  21482. },
  21483. "compacting": {
  21484. "type": "integer",
  21485. "minimum": 0
  21486. },
  21487. "archived": {
  21488. "type": "number"
  21489. }
  21490. },
  21491. "required": ["created", "updated"],
  21492. "additionalProperties": false
  21493. },
  21494. "permission": {
  21495. "$ref": "#/components/schemas/PermissionRuleset"
  21496. },
  21497. "revert": {
  21498. "type": "object",
  21499. "properties": {
  21500. "messageID": {
  21501. "type": "string",
  21502. "pattern": "^msg"
  21503. },
  21504. "partID": {
  21505. "type": "string",
  21506. "pattern": "^prt"
  21507. },
  21508. "snapshot": {
  21509. "type": "string"
  21510. },
  21511. "diff": {
  21512. "type": "string"
  21513. }
  21514. },
  21515. "required": ["messageID"],
  21516. "additionalProperties": false
  21517. },
  21518. "project": {
  21519. "anyOf": [
  21520. {
  21521. "$ref": "#/components/schemas/ProjectSummary"
  21522. },
  21523. {
  21524. "type": "null"
  21525. }
  21526. ]
  21527. }
  21528. },
  21529. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  21530. "additionalProperties": false
  21531. },
  21532. "McpResource": {
  21533. "type": "object",
  21534. "properties": {
  21535. "name": {
  21536. "type": "string"
  21537. },
  21538. "uri": {
  21539. "type": "string"
  21540. },
  21541. "description": {
  21542. "type": "string"
  21543. },
  21544. "mimeType": {
  21545. "type": "string"
  21546. },
  21547. "client": {
  21548. "type": "string"
  21549. }
  21550. },
  21551. "required": ["name", "uri", "client"],
  21552. "additionalProperties": false
  21553. },
  21554. "Symbol": {
  21555. "type": "object",
  21556. "properties": {
  21557. "name": {
  21558. "type": "string"
  21559. },
  21560. "kind": {
  21561. "type": "integer",
  21562. "minimum": 0
  21563. },
  21564. "location": {
  21565. "type": "object",
  21566. "properties": {
  21567. "uri": {
  21568. "type": "string"
  21569. },
  21570. "range": {
  21571. "$ref": "#/components/schemas/Range"
  21572. }
  21573. },
  21574. "required": ["uri", "range"],
  21575. "additionalProperties": false
  21576. }
  21577. },
  21578. "required": ["name", "kind", "location"],
  21579. "additionalProperties": false
  21580. },
  21581. "FileNode": {
  21582. "type": "object",
  21583. "properties": {
  21584. "name": {
  21585. "type": "string"
  21586. },
  21587. "path": {
  21588. "type": "string"
  21589. },
  21590. "absolute": {
  21591. "type": "string"
  21592. },
  21593. "type": {
  21594. "type": "string",
  21595. "enum": ["file", "directory"]
  21596. },
  21597. "ignored": {
  21598. "type": "boolean"
  21599. }
  21600. },
  21601. "required": ["name", "path", "absolute", "type", "ignored"],
  21602. "additionalProperties": false
  21603. },
  21604. "FileContent": {
  21605. "type": "object",
  21606. "properties": {
  21607. "type": {
  21608. "type": "string",
  21609. "enum": ["text", "binary"]
  21610. },
  21611. "content": {
  21612. "type": "string"
  21613. },
  21614. "diff": {
  21615. "type": "string"
  21616. },
  21617. "patch": {
  21618. "type": "object",
  21619. "properties": {
  21620. "oldFileName": {
  21621. "type": "string"
  21622. },
  21623. "newFileName": {
  21624. "type": "string"
  21625. },
  21626. "oldHeader": {
  21627. "type": "string"
  21628. },
  21629. "newHeader": {
  21630. "type": "string"
  21631. },
  21632. "hunks": {
  21633. "type": "array",
  21634. "items": {
  21635. "type": "object",
  21636. "properties": {
  21637. "oldStart": {
  21638. "type": "integer",
  21639. "minimum": 0
  21640. },
  21641. "oldLines": {
  21642. "type": "integer",
  21643. "minimum": 0
  21644. },
  21645. "newStart": {
  21646. "type": "integer",
  21647. "minimum": 0
  21648. },
  21649. "newLines": {
  21650. "type": "integer",
  21651. "minimum": 0
  21652. },
  21653. "lines": {
  21654. "type": "array",
  21655. "items": {
  21656. "type": "string"
  21657. }
  21658. }
  21659. },
  21660. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  21661. "additionalProperties": false
  21662. }
  21663. },
  21664. "index": {
  21665. "type": "string"
  21666. }
  21667. },
  21668. "required": ["oldFileName", "newFileName", "hunks"],
  21669. "additionalProperties": false
  21670. },
  21671. "encoding": {
  21672. "type": "string",
  21673. "enum": ["base64"]
  21674. },
  21675. "mimeType": {
  21676. "type": "string"
  21677. }
  21678. },
  21679. "required": ["type", "content"],
  21680. "additionalProperties": false
  21681. },
  21682. "File": {
  21683. "type": "object",
  21684. "properties": {
  21685. "path": {
  21686. "type": "string"
  21687. },
  21688. "added": {
  21689. "type": "integer",
  21690. "minimum": 0
  21691. },
  21692. "removed": {
  21693. "type": "integer",
  21694. "minimum": 0
  21695. },
  21696. "status": {
  21697. "type": "string",
  21698. "enum": ["added", "deleted", "modified"]
  21699. }
  21700. },
  21701. "required": ["path", "added", "removed", "status"],
  21702. "additionalProperties": false
  21703. },
  21704. "Path": {
  21705. "type": "object",
  21706. "properties": {
  21707. "home": {
  21708. "type": "string"
  21709. },
  21710. "state": {
  21711. "type": "string"
  21712. },
  21713. "config": {
  21714. "type": "string"
  21715. },
  21716. "worktree": {
  21717. "type": "string"
  21718. },
  21719. "directory": {
  21720. "type": "string"
  21721. }
  21722. },
  21723. "required": ["home", "state", "config", "worktree", "directory"],
  21724. "additionalProperties": false
  21725. },
  21726. "VcsInfo": {
  21727. "type": "object",
  21728. "properties": {
  21729. "branch": {
  21730. "type": "string"
  21731. },
  21732. "default_branch": {
  21733. "type": "string"
  21734. }
  21735. },
  21736. "additionalProperties": false
  21737. },
  21738. "VcsFileStatus": {
  21739. "type": "object",
  21740. "properties": {
  21741. "file": {
  21742. "type": "string"
  21743. },
  21744. "additions": {
  21745. "type": "number"
  21746. },
  21747. "deletions": {
  21748. "type": "number"
  21749. },
  21750. "status": {
  21751. "type": "string",
  21752. "enum": ["added", "deleted", "modified"]
  21753. }
  21754. },
  21755. "required": ["file", "additions", "deletions", "status"],
  21756. "additionalProperties": false
  21757. },
  21758. "VcsFileDiff": {
  21759. "type": "object",
  21760. "properties": {
  21761. "file": {
  21762. "type": "string"
  21763. },
  21764. "patch": {
  21765. "type": "string"
  21766. },
  21767. "additions": {
  21768. "type": "number"
  21769. },
  21770. "deletions": {
  21771. "type": "number"
  21772. },
  21773. "status": {
  21774. "type": "string",
  21775. "enum": ["added", "deleted", "modified"]
  21776. }
  21777. },
  21778. "required": ["file", "additions", "deletions"],
  21779. "additionalProperties": false
  21780. },
  21781. "VcsApplyError": {
  21782. "type": "object",
  21783. "properties": {
  21784. "name": {
  21785. "type": "string",
  21786. "enum": ["VcsApplyError"]
  21787. },
  21788. "data": {
  21789. "type": "object",
  21790. "properties": {
  21791. "message": {
  21792. "type": "string"
  21793. },
  21794. "reason": {
  21795. "type": "string",
  21796. "enum": ["non-git", "not-clean"]
  21797. }
  21798. },
  21799. "required": ["message", "reason"],
  21800. "additionalProperties": false
  21801. }
  21802. },
  21803. "required": ["name", "data"],
  21804. "additionalProperties": false
  21805. },
  21806. "Command": {
  21807. "type": "object",
  21808. "properties": {
  21809. "name": {
  21810. "type": "string"
  21811. },
  21812. "description": {
  21813. "type": "string"
  21814. },
  21815. "agent": {
  21816. "type": "string"
  21817. },
  21818. "model": {
  21819. "type": "string"
  21820. },
  21821. "source": {
  21822. "type": "string",
  21823. "enum": ["command", "mcp", "skill"]
  21824. },
  21825. "template": {
  21826. "type": "string"
  21827. },
  21828. "subtask": {
  21829. "type": "boolean"
  21830. },
  21831. "hints": {
  21832. "type": "array",
  21833. "items": {
  21834. "type": "string"
  21835. }
  21836. }
  21837. },
  21838. "required": ["name", "template", "hints"],
  21839. "additionalProperties": false
  21840. },
  21841. "Agent": {
  21842. "type": "object",
  21843. "properties": {
  21844. "name": {
  21845. "type": "string"
  21846. },
  21847. "description": {
  21848. "type": "string"
  21849. },
  21850. "mode": {
  21851. "type": "string",
  21852. "enum": ["subagent", "primary", "all"]
  21853. },
  21854. "native": {
  21855. "type": "boolean"
  21856. },
  21857. "hidden": {
  21858. "type": "boolean"
  21859. },
  21860. "topP": {
  21861. "type": "number"
  21862. },
  21863. "temperature": {
  21864. "type": "number"
  21865. },
  21866. "color": {
  21867. "type": "string"
  21868. },
  21869. "permission": {
  21870. "$ref": "#/components/schemas/PermissionRuleset"
  21871. },
  21872. "model": {
  21873. "type": "object",
  21874. "properties": {
  21875. "modelID": {
  21876. "type": "string"
  21877. },
  21878. "providerID": {
  21879. "type": "string"
  21880. }
  21881. },
  21882. "required": ["modelID", "providerID"],
  21883. "additionalProperties": false
  21884. },
  21885. "variant": {
  21886. "type": "string"
  21887. },
  21888. "prompt": {
  21889. "type": "string"
  21890. },
  21891. "options": {
  21892. "type": "object"
  21893. },
  21894. "steps": {
  21895. "type": "number"
  21896. }
  21897. },
  21898. "required": ["name", "mode", "permission", "options"],
  21899. "additionalProperties": false
  21900. },
  21901. "LSPStatus": {
  21902. "type": "object",
  21903. "properties": {
  21904. "id": {
  21905. "type": "string"
  21906. },
  21907. "name": {
  21908. "type": "string"
  21909. },
  21910. "root": {
  21911. "type": "string"
  21912. },
  21913. "status": {
  21914. "type": "string",
  21915. "enum": ["connected", "error"]
  21916. }
  21917. },
  21918. "required": ["id", "name", "root", "status"],
  21919. "additionalProperties": false
  21920. },
  21921. "FormatterStatus": {
  21922. "type": "object",
  21923. "properties": {
  21924. "name": {
  21925. "type": "string"
  21926. },
  21927. "extensions": {
  21928. "type": "array",
  21929. "items": {
  21930. "type": "string"
  21931. }
  21932. },
  21933. "enabled": {
  21934. "type": "boolean"
  21935. }
  21936. },
  21937. "required": ["name", "extensions", "enabled"],
  21938. "additionalProperties": false
  21939. },
  21940. "MCPStatusConnected": {
  21941. "type": "object",
  21942. "properties": {
  21943. "status": {
  21944. "type": "string",
  21945. "enum": ["connected"]
  21946. }
  21947. },
  21948. "required": ["status"],
  21949. "additionalProperties": false
  21950. },
  21951. "MCPStatusDisabled": {
  21952. "type": "object",
  21953. "properties": {
  21954. "status": {
  21955. "type": "string",
  21956. "enum": ["disabled"]
  21957. }
  21958. },
  21959. "required": ["status"],
  21960. "additionalProperties": false
  21961. },
  21962. "MCPStatusFailed": {
  21963. "type": "object",
  21964. "properties": {
  21965. "status": {
  21966. "type": "string",
  21967. "enum": ["failed"]
  21968. },
  21969. "error": {
  21970. "type": "string"
  21971. }
  21972. },
  21973. "required": ["status", "error"],
  21974. "additionalProperties": false
  21975. },
  21976. "MCPStatusNeedsAuth": {
  21977. "type": "object",
  21978. "properties": {
  21979. "status": {
  21980. "type": "string",
  21981. "enum": ["needs_auth"]
  21982. }
  21983. },
  21984. "required": ["status"],
  21985. "additionalProperties": false
  21986. },
  21987. "MCPStatusNeedsClientRegistration": {
  21988. "type": "object",
  21989. "properties": {
  21990. "status": {
  21991. "type": "string",
  21992. "enum": ["needs_client_registration"]
  21993. },
  21994. "error": {
  21995. "type": "string"
  21996. }
  21997. },
  21998. "required": ["status", "error"],
  21999. "additionalProperties": false
  22000. },
  22001. "MCPStatus": {
  22002. "anyOf": [
  22003. {
  22004. "$ref": "#/components/schemas/MCPStatusConnected"
  22005. },
  22006. {
  22007. "$ref": "#/components/schemas/MCPStatusDisabled"
  22008. },
  22009. {
  22010. "$ref": "#/components/schemas/MCPStatusFailed"
  22011. },
  22012. {
  22013. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  22014. },
  22015. {
  22016. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  22017. }
  22018. ]
  22019. },
  22020. "McpUnsupportedOAuthError": {
  22021. "type": "object",
  22022. "properties": {
  22023. "error": {
  22024. "type": "string"
  22025. }
  22026. },
  22027. "required": ["error"],
  22028. "additionalProperties": false
  22029. },
  22030. "McpServerNotFoundError": {
  22031. "type": "object",
  22032. "properties": {
  22033. "_tag": {
  22034. "type": "string",
  22035. "enum": ["McpServerNotFoundError"]
  22036. },
  22037. "name": {
  22038. "type": "string"
  22039. },
  22040. "message": {
  22041. "type": "string"
  22042. }
  22043. },
  22044. "required": ["_tag", "name", "message"],
  22045. "additionalProperties": false
  22046. },
  22047. "Project": {
  22048. "type": "object",
  22049. "properties": {
  22050. "id": {
  22051. "type": "string"
  22052. },
  22053. "worktree": {
  22054. "type": "string"
  22055. },
  22056. "vcs": {
  22057. "type": "string",
  22058. "enum": ["git"]
  22059. },
  22060. "name": {
  22061. "type": "string"
  22062. },
  22063. "icon": {
  22064. "type": "object",
  22065. "properties": {
  22066. "url": {
  22067. "type": "string"
  22068. },
  22069. "override": {
  22070. "type": "string"
  22071. },
  22072. "color": {
  22073. "type": "string"
  22074. }
  22075. },
  22076. "additionalProperties": false
  22077. },
  22078. "commands": {
  22079. "type": "object",
  22080. "properties": {
  22081. "start": {
  22082. "type": "string",
  22083. "description": "Startup script to run when creating a new workspace (worktree)"
  22084. }
  22085. },
  22086. "additionalProperties": false
  22087. },
  22088. "time": {
  22089. "type": "object",
  22090. "properties": {
  22091. "created": {
  22092. "type": "integer",
  22093. "minimum": 0
  22094. },
  22095. "updated": {
  22096. "type": "integer",
  22097. "minimum": 0
  22098. },
  22099. "initialized": {
  22100. "type": "integer",
  22101. "minimum": 0
  22102. }
  22103. },
  22104. "required": ["created", "updated"],
  22105. "additionalProperties": false
  22106. },
  22107. "sandboxes": {
  22108. "type": "array",
  22109. "items": {
  22110. "type": "string"
  22111. }
  22112. }
  22113. },
  22114. "required": ["id", "worktree", "time", "sandboxes"],
  22115. "additionalProperties": false
  22116. },
  22117. "ProjectNotFoundError": {
  22118. "type": "object",
  22119. "properties": {
  22120. "_tag": {
  22121. "type": "string",
  22122. "enum": ["ProjectNotFoundError"]
  22123. },
  22124. "projectID": {
  22125. "type": "string"
  22126. },
  22127. "message": {
  22128. "type": "string"
  22129. }
  22130. },
  22131. "required": ["_tag", "projectID", "message"],
  22132. "additionalProperties": false
  22133. },
  22134. "PtyNotFoundError": {
  22135. "type": "object",
  22136. "properties": {
  22137. "_tag": {
  22138. "type": "string",
  22139. "enum": ["PtyNotFoundError"]
  22140. },
  22141. "ptyID": {
  22142. "type": "string"
  22143. },
  22144. "message": {
  22145. "type": "string"
  22146. }
  22147. },
  22148. "required": ["_tag", "ptyID", "message"],
  22149. "additionalProperties": false
  22150. },
  22151. "PtyForbiddenError": {
  22152. "type": "object",
  22153. "properties": {
  22154. "_tag": {
  22155. "type": "string",
  22156. "enum": ["PtyForbiddenError"]
  22157. },
  22158. "message": {
  22159. "type": "string"
  22160. }
  22161. },
  22162. "required": ["_tag", "message"],
  22163. "additionalProperties": false
  22164. },
  22165. "QuestionRequest": {
  22166. "type": "object",
  22167. "properties": {
  22168. "id": {
  22169. "type": "string",
  22170. "pattern": "^que"
  22171. },
  22172. "sessionID": {
  22173. "type": "string",
  22174. "pattern": "^ses"
  22175. },
  22176. "questions": {
  22177. "type": "array",
  22178. "items": {
  22179. "$ref": "#/components/schemas/QuestionInfo"
  22180. },
  22181. "description": "Questions to ask"
  22182. },
  22183. "tool": {
  22184. "$ref": "#/components/schemas/QuestionTool"
  22185. }
  22186. },
  22187. "required": ["id", "sessionID", "questions"],
  22188. "additionalProperties": false
  22189. },
  22190. "QuestionNotFoundError": {
  22191. "type": "object",
  22192. "properties": {
  22193. "_tag": {
  22194. "type": "string",
  22195. "enum": ["QuestionNotFoundError"]
  22196. },
  22197. "requestID": {
  22198. "type": "string"
  22199. },
  22200. "message": {
  22201. "type": "string"
  22202. }
  22203. },
  22204. "required": ["_tag", "requestID", "message"],
  22205. "additionalProperties": false
  22206. },
  22207. "PermissionRequest": {
  22208. "type": "object",
  22209. "properties": {
  22210. "id": {
  22211. "type": "string",
  22212. "pattern": "^per"
  22213. },
  22214. "sessionID": {
  22215. "type": "string",
  22216. "pattern": "^ses"
  22217. },
  22218. "permission": {
  22219. "type": "string"
  22220. },
  22221. "patterns": {
  22222. "type": "array",
  22223. "items": {
  22224. "type": "string"
  22225. }
  22226. },
  22227. "metadata": {
  22228. "type": "object"
  22229. },
  22230. "always": {
  22231. "type": "array",
  22232. "items": {
  22233. "type": "string"
  22234. }
  22235. },
  22236. "tool": {
  22237. "type": "object",
  22238. "properties": {
  22239. "messageID": {
  22240. "type": "string"
  22241. },
  22242. "callID": {
  22243. "type": "string"
  22244. }
  22245. },
  22246. "required": ["messageID", "callID"],
  22247. "additionalProperties": false
  22248. }
  22249. },
  22250. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  22251. "additionalProperties": false
  22252. },
  22253. "PermissionNotFoundError": {
  22254. "type": "object",
  22255. "properties": {
  22256. "_tag": {
  22257. "type": "string",
  22258. "enum": ["PermissionNotFoundError"]
  22259. },
  22260. "requestID": {
  22261. "type": "string"
  22262. },
  22263. "message": {
  22264. "type": "string"
  22265. }
  22266. },
  22267. "required": ["_tag", "requestID", "message"],
  22268. "additionalProperties": false
  22269. },
  22270. "ProviderAuthMethod": {
  22271. "type": "object",
  22272. "properties": {
  22273. "type": {
  22274. "type": "string",
  22275. "enum": ["oauth", "api"]
  22276. },
  22277. "label": {
  22278. "type": "string"
  22279. },
  22280. "prompts": {
  22281. "type": "array",
  22282. "items": {
  22283. "anyOf": [
  22284. {
  22285. "type": "object",
  22286. "properties": {
  22287. "type": {
  22288. "type": "string",
  22289. "enum": ["text"]
  22290. },
  22291. "key": {
  22292. "type": "string"
  22293. },
  22294. "message": {
  22295. "type": "string"
  22296. },
  22297. "placeholder": {
  22298. "type": "string"
  22299. },
  22300. "when": {
  22301. "type": "object",
  22302. "properties": {
  22303. "key": {
  22304. "type": "string"
  22305. },
  22306. "op": {
  22307. "type": "string",
  22308. "enum": ["eq", "neq"]
  22309. },
  22310. "value": {
  22311. "type": "string"
  22312. }
  22313. },
  22314. "required": ["key", "op", "value"],
  22315. "additionalProperties": false
  22316. }
  22317. },
  22318. "required": ["type", "key", "message"],
  22319. "additionalProperties": false
  22320. },
  22321. {
  22322. "type": "object",
  22323. "properties": {
  22324. "type": {
  22325. "type": "string",
  22326. "enum": ["select"]
  22327. },
  22328. "key": {
  22329. "type": "string"
  22330. },
  22331. "message": {
  22332. "type": "string"
  22333. },
  22334. "options": {
  22335. "type": "array",
  22336. "items": {
  22337. "type": "object",
  22338. "properties": {
  22339. "label": {
  22340. "type": "string"
  22341. },
  22342. "value": {
  22343. "type": "string"
  22344. },
  22345. "hint": {
  22346. "type": "string"
  22347. }
  22348. },
  22349. "required": ["label", "value"],
  22350. "additionalProperties": false
  22351. }
  22352. },
  22353. "when": {
  22354. "type": "object",
  22355. "properties": {
  22356. "key": {
  22357. "type": "string"
  22358. },
  22359. "op": {
  22360. "type": "string",
  22361. "enum": ["eq", "neq"]
  22362. },
  22363. "value": {
  22364. "type": "string"
  22365. }
  22366. },
  22367. "required": ["key", "op", "value"],
  22368. "additionalProperties": false
  22369. }
  22370. },
  22371. "required": ["type", "key", "message", "options"],
  22372. "additionalProperties": false
  22373. }
  22374. ]
  22375. }
  22376. }
  22377. },
  22378. "required": ["type", "label"],
  22379. "additionalProperties": false
  22380. },
  22381. "ProviderAuthAuthorization": {
  22382. "type": "object",
  22383. "properties": {
  22384. "url": {
  22385. "type": "string"
  22386. },
  22387. "method": {
  22388. "type": "string",
  22389. "enum": ["auto", "code"]
  22390. },
  22391. "instructions": {
  22392. "type": "string"
  22393. }
  22394. },
  22395. "required": ["url", "method", "instructions"],
  22396. "additionalProperties": false
  22397. },
  22398. "ProviderAuthError1": {
  22399. "type": "object",
  22400. "properties": {
  22401. "name": {
  22402. "type": "string",
  22403. "enum": [
  22404. "BadRequest",
  22405. "ProviderAuthOauthMissing",
  22406. "ProviderAuthOauthCodeMissing",
  22407. "ProviderAuthOauthCallbackFailed",
  22408. "ProviderAuthValidationFailed"
  22409. ]
  22410. },
  22411. "data": {
  22412. "type": "object",
  22413. "properties": {
  22414. "providerID": {
  22415. "type": "string"
  22416. },
  22417. "field": {
  22418. "type": "string"
  22419. },
  22420. "message": {
  22421. "type": "string"
  22422. },
  22423. "kind": {
  22424. "type": "string"
  22425. }
  22426. },
  22427. "additionalProperties": false
  22428. }
  22429. },
  22430. "required": ["name", "data"],
  22431. "additionalProperties": false
  22432. },
  22433. "NotFoundError": {
  22434. "type": "object",
  22435. "required": ["name", "data"],
  22436. "properties": {
  22437. "name": {
  22438. "type": "string",
  22439. "enum": ["NotFoundError"]
  22440. },
  22441. "data": {
  22442. "type": "object",
  22443. "required": ["message"],
  22444. "properties": {
  22445. "message": {
  22446. "type": "string"
  22447. }
  22448. }
  22449. }
  22450. }
  22451. },
  22452. "TextPartInput": {
  22453. "type": "object",
  22454. "properties": {
  22455. "id": {
  22456. "type": "string",
  22457. "pattern": "^prt"
  22458. },
  22459. "type": {
  22460. "type": "string",
  22461. "enum": ["text"]
  22462. },
  22463. "text": {
  22464. "type": "string"
  22465. },
  22466. "synthetic": {
  22467. "type": "boolean"
  22468. },
  22469. "ignored": {
  22470. "type": "boolean"
  22471. },
  22472. "time": {
  22473. "type": "object",
  22474. "properties": {
  22475. "start": {
  22476. "type": "integer",
  22477. "minimum": 0
  22478. },
  22479. "end": {
  22480. "type": "integer",
  22481. "minimum": 0
  22482. }
  22483. },
  22484. "required": ["start"],
  22485. "additionalProperties": false
  22486. },
  22487. "metadata": {
  22488. "type": "object"
  22489. }
  22490. },
  22491. "required": ["type", "text"],
  22492. "additionalProperties": false
  22493. },
  22494. "FilePartInput": {
  22495. "type": "object",
  22496. "properties": {
  22497. "id": {
  22498. "type": "string",
  22499. "pattern": "^prt"
  22500. },
  22501. "type": {
  22502. "type": "string",
  22503. "enum": ["file"]
  22504. },
  22505. "mime": {
  22506. "type": "string"
  22507. },
  22508. "filename": {
  22509. "type": "string"
  22510. },
  22511. "url": {
  22512. "type": "string"
  22513. },
  22514. "source": {
  22515. "$ref": "#/components/schemas/FilePartSource"
  22516. }
  22517. },
  22518. "required": ["type", "mime", "url"],
  22519. "additionalProperties": false
  22520. },
  22521. "AgentPartInput": {
  22522. "type": "object",
  22523. "properties": {
  22524. "id": {
  22525. "type": "string",
  22526. "pattern": "^prt"
  22527. },
  22528. "type": {
  22529. "type": "string",
  22530. "enum": ["agent"]
  22531. },
  22532. "name": {
  22533. "type": "string"
  22534. },
  22535. "source": {
  22536. "type": "object",
  22537. "properties": {
  22538. "value": {
  22539. "type": "string"
  22540. },
  22541. "start": {
  22542. "type": "integer",
  22543. "minimum": 0
  22544. },
  22545. "end": {
  22546. "type": "integer",
  22547. "minimum": 0
  22548. }
  22549. },
  22550. "required": ["value", "start", "end"],
  22551. "additionalProperties": false
  22552. }
  22553. },
  22554. "required": ["type", "name"],
  22555. "additionalProperties": false
  22556. },
  22557. "SubtaskPartInput": {
  22558. "type": "object",
  22559. "properties": {
  22560. "id": {
  22561. "type": "string",
  22562. "pattern": "^prt"
  22563. },
  22564. "type": {
  22565. "type": "string",
  22566. "enum": ["subtask"]
  22567. },
  22568. "prompt": {
  22569. "type": "string"
  22570. },
  22571. "description": {
  22572. "type": "string"
  22573. },
  22574. "agent": {
  22575. "type": "string"
  22576. },
  22577. "model": {
  22578. "type": "object",
  22579. "properties": {
  22580. "providerID": {
  22581. "type": "string"
  22582. },
  22583. "modelID": {
  22584. "type": "string"
  22585. }
  22586. },
  22587. "required": ["providerID", "modelID"],
  22588. "additionalProperties": false
  22589. },
  22590. "command": {
  22591. "type": "string"
  22592. }
  22593. },
  22594. "required": ["type", "prompt", "description", "agent"],
  22595. "additionalProperties": false
  22596. },
  22597. "SessionBusyError": {
  22598. "type": "object",
  22599. "properties": {
  22600. "_tag": {
  22601. "type": "string",
  22602. "enum": ["SessionBusyError"]
  22603. },
  22604. "sessionID": {
  22605. "type": "string"
  22606. },
  22607. "message": {
  22608. "type": "string"
  22609. }
  22610. },
  22611. "required": ["_tag", "sessionID", "message"],
  22612. "additionalProperties": false
  22613. },
  22614. "EventTuiPromptAppend": {
  22615. "type": "object",
  22616. "properties": {
  22617. "type": {
  22618. "type": "string",
  22619. "enum": ["tui.prompt.append"]
  22620. },
  22621. "properties": {
  22622. "type": "object",
  22623. "properties": {
  22624. "text": {
  22625. "type": "string"
  22626. }
  22627. },
  22628. "required": ["text"],
  22629. "additionalProperties": false
  22630. }
  22631. },
  22632. "required": ["type", "properties"],
  22633. "additionalProperties": false
  22634. },
  22635. "EventTuiCommandExecute": {
  22636. "type": "object",
  22637. "properties": {
  22638. "type": {
  22639. "type": "string",
  22640. "enum": ["tui.command.execute"]
  22641. },
  22642. "properties": {
  22643. "type": "object",
  22644. "properties": {
  22645. "command": {
  22646. "anyOf": [
  22647. {
  22648. "type": "string",
  22649. "enum": [
  22650. "session.list",
  22651. "session.new",
  22652. "session.share",
  22653. "session.interrupt",
  22654. "session.compact",
  22655. "session.page.up",
  22656. "session.page.down",
  22657. "session.line.up",
  22658. "session.line.down",
  22659. "session.half.page.up",
  22660. "session.half.page.down",
  22661. "session.first",
  22662. "session.last",
  22663. "prompt.clear",
  22664. "prompt.submit",
  22665. "agent.cycle"
  22666. ]
  22667. },
  22668. {
  22669. "type": "string"
  22670. }
  22671. ]
  22672. }
  22673. },
  22674. "required": ["command"],
  22675. "additionalProperties": false
  22676. }
  22677. },
  22678. "required": ["type", "properties"],
  22679. "additionalProperties": false
  22680. },
  22681. "EventTuiToastShow": {
  22682. "type": "object",
  22683. "properties": {
  22684. "type": {
  22685. "type": "string",
  22686. "enum": ["tui.toast.show"]
  22687. },
  22688. "properties": {
  22689. "type": "object",
  22690. "properties": {
  22691. "title": {
  22692. "type": "string"
  22693. },
  22694. "message": {
  22695. "type": "string"
  22696. },
  22697. "variant": {
  22698. "type": "string",
  22699. "enum": ["info", "success", "warning", "error"]
  22700. },
  22701. "duration": {
  22702. "type": "integer",
  22703. "exclusiveMinimum": 0
  22704. }
  22705. },
  22706. "required": ["message", "variant"],
  22707. "additionalProperties": false
  22708. }
  22709. },
  22710. "required": ["type", "properties"],
  22711. "additionalProperties": false
  22712. },
  22713. "EventTuiSessionSelect": {
  22714. "type": "object",
  22715. "properties": {
  22716. "type": {
  22717. "type": "string",
  22718. "enum": ["tui.session.select"]
  22719. },
  22720. "properties": {
  22721. "type": "object",
  22722. "properties": {
  22723. "sessionID": {
  22724. "type": "string",
  22725. "pattern": "^ses",
  22726. "description": "Session ID to navigate to"
  22727. }
  22728. },
  22729. "required": ["sessionID"],
  22730. "additionalProperties": false
  22731. }
  22732. },
  22733. "required": ["type", "properties"],
  22734. "additionalProperties": false
  22735. },
  22736. "Workspace": {
  22737. "type": "object",
  22738. "properties": {
  22739. "id": {
  22740. "type": "string",
  22741. "pattern": "^wrk"
  22742. },
  22743. "type": {
  22744. "type": "string"
  22745. },
  22746. "name": {
  22747. "type": "string"
  22748. },
  22749. "branch": {
  22750. "anyOf": [
  22751. {
  22752. "type": "string"
  22753. },
  22754. {
  22755. "type": "null"
  22756. }
  22757. ]
  22758. },
  22759. "directory": {
  22760. "anyOf": [
  22761. {
  22762. "type": "string"
  22763. },
  22764. {
  22765. "type": "null"
  22766. }
  22767. ]
  22768. },
  22769. "extra": {
  22770. "anyOf": [
  22771. {},
  22772. {
  22773. "type": "null"
  22774. }
  22775. ]
  22776. },
  22777. "projectID": {
  22778. "type": "string"
  22779. },
  22780. "timeUsed": {
  22781. "anyOf": [
  22782. {
  22783. "type": "number"
  22784. },
  22785. {
  22786. "type": "string",
  22787. "enum": ["NaN"]
  22788. },
  22789. {
  22790. "type": "string",
  22791. "enum": ["Infinity"]
  22792. },
  22793. {
  22794. "type": "string",
  22795. "enum": ["-Infinity"]
  22796. },
  22797. {
  22798. "type": "string",
  22799. "enum": ["Infinity", "-Infinity", "NaN"]
  22800. }
  22801. ]
  22802. }
  22803. },
  22804. "required": ["id", "type", "name", "projectID", "timeUsed"],
  22805. "additionalProperties": false
  22806. },
  22807. "WorkspaceCreateError": {
  22808. "type": "object",
  22809. "properties": {
  22810. "name": {
  22811. "type": "string",
  22812. "enum": ["WorkspaceCreateError"]
  22813. },
  22814. "data": {
  22815. "type": "object",
  22816. "properties": {
  22817. "message": {
  22818. "type": "string"
  22819. }
  22820. },
  22821. "required": ["message"],
  22822. "additionalProperties": false
  22823. }
  22824. },
  22825. "required": ["name", "data"],
  22826. "additionalProperties": false
  22827. },
  22828. "WorkspaceWarpError": {
  22829. "type": "object",
  22830. "properties": {
  22831. "name": {
  22832. "type": "string",
  22833. "enum": ["WorkspaceWarpError"]
  22834. },
  22835. "data": {
  22836. "type": "object",
  22837. "properties": {
  22838. "message": {
  22839. "type": "string"
  22840. }
  22841. },
  22842. "required": ["message"],
  22843. "additionalProperties": false
  22844. }
  22845. },
  22846. "required": ["name", "data"],
  22847. "additionalProperties": false
  22848. },
  22849. "UnauthorizedError": {
  22850. "type": "object",
  22851. "properties": {
  22852. "_tag": {
  22853. "type": "string",
  22854. "enum": ["UnauthorizedError"]
  22855. },
  22856. "message": {
  22857. "type": "string"
  22858. }
  22859. },
  22860. "required": ["_tag", "message"],
  22861. "additionalProperties": false
  22862. },
  22863. "SessionsResponse": {
  22864. "type": "object",
  22865. "properties": {
  22866. "data": {
  22867. "type": "array",
  22868. "items": {
  22869. "$ref": "#/components/schemas/SessionV2Info"
  22870. }
  22871. },
  22872. "cursor": {
  22873. "type": "object",
  22874. "properties": {
  22875. "previous": {
  22876. "type": "string"
  22877. },
  22878. "next": {
  22879. "type": "string"
  22880. }
  22881. },
  22882. "additionalProperties": false
  22883. }
  22884. },
  22885. "required": ["data", "cursor"],
  22886. "additionalProperties": false
  22887. },
  22888. "InvalidCursorError": {
  22889. "type": "object",
  22890. "properties": {
  22891. "_tag": {
  22892. "type": "string",
  22893. "enum": ["InvalidCursorError"]
  22894. },
  22895. "message": {
  22896. "type": "string"
  22897. }
  22898. },
  22899. "required": ["_tag", "message"],
  22900. "additionalProperties": false
  22901. },
  22902. "SessionNotFoundError": {
  22903. "type": "object",
  22904. "properties": {
  22905. "_tag": {
  22906. "type": "string",
  22907. "enum": ["SessionNotFoundError"]
  22908. },
  22909. "sessionID": {
  22910. "type": "string"
  22911. },
  22912. "message": {
  22913. "type": "string"
  22914. }
  22915. },
  22916. "required": ["_tag", "sessionID", "message"],
  22917. "additionalProperties": false
  22918. },
  22919. "ConflictError": {
  22920. "type": "object",
  22921. "properties": {
  22922. "_tag": {
  22923. "type": "string",
  22924. "enum": ["ConflictError"]
  22925. },
  22926. "message": {
  22927. "type": "string"
  22928. },
  22929. "resource": {
  22930. "type": "string"
  22931. }
  22932. },
  22933. "required": ["_tag", "message"],
  22934. "additionalProperties": false
  22935. },
  22936. "ServiceUnavailableError": {
  22937. "type": "object",
  22938. "properties": {
  22939. "_tag": {
  22940. "type": "string",
  22941. "enum": ["ServiceUnavailableError"]
  22942. },
  22943. "message": {
  22944. "type": "string"
  22945. },
  22946. "service": {
  22947. "type": "string"
  22948. }
  22949. },
  22950. "required": ["_tag", "message"],
  22951. "additionalProperties": false
  22952. },
  22953. "UnknownError1": {
  22954. "type": "object",
  22955. "properties": {
  22956. "_tag": {
  22957. "type": "string",
  22958. "enum": ["UnknownError"]
  22959. },
  22960. "message": {
  22961. "type": "string"
  22962. },
  22963. "ref": {
  22964. "type": "string"
  22965. }
  22966. },
  22967. "required": ["_tag", "message"],
  22968. "additionalProperties": false
  22969. },
  22970. "SessionMessagesResponse": {
  22971. "type": "object",
  22972. "properties": {
  22973. "data": {
  22974. "type": "array",
  22975. "items": {
  22976. "$ref": "#/components/schemas/SessionMessage"
  22977. }
  22978. },
  22979. "cursor": {
  22980. "type": "object",
  22981. "properties": {
  22982. "previous": {
  22983. "type": "string"
  22984. },
  22985. "next": {
  22986. "type": "string"
  22987. }
  22988. },
  22989. "additionalProperties": false
  22990. }
  22991. },
  22992. "required": ["data", "cursor"],
  22993. "additionalProperties": false
  22994. },
  22995. "ProviderNotFoundError": {
  22996. "type": "object",
  22997. "properties": {
  22998. "_tag": {
  22999. "type": "string",
  23000. "enum": ["ProviderNotFoundError"]
  23001. },
  23002. "providerID": {
  23003. "type": "string"
  23004. },
  23005. "message": {
  23006. "type": "string"
  23007. }
  23008. },
  23009. "required": ["_tag", "providerID", "message"],
  23010. "additionalProperties": false
  23011. },
  23012. "V2Event": {
  23013. "anyOf": [
  23014. {
  23015. "$ref": "#/components/schemas/V2EventModels-devRefreshed"
  23016. },
  23017. {
  23018. "$ref": "#/components/schemas/V2EventIntegrationUpdated"
  23019. },
  23020. {
  23021. "$ref": "#/components/schemas/V2EventIntegrationConnectionUpdated"
  23022. },
  23023. {
  23024. "$ref": "#/components/schemas/V2EventCatalogUpdated"
  23025. },
  23026. {
  23027. "$ref": "#/components/schemas/V2EventSessionCreated"
  23028. },
  23029. {
  23030. "$ref": "#/components/schemas/V2EventSessionUpdated"
  23031. },
  23032. {
  23033. "$ref": "#/components/schemas/V2EventSessionDeleted"
  23034. },
  23035. {
  23036. "$ref": "#/components/schemas/V2EventMessageUpdated"
  23037. },
  23038. {
  23039. "$ref": "#/components/schemas/V2EventMessageRemoved"
  23040. },
  23041. {
  23042. "$ref": "#/components/schemas/V2EventMessagePartUpdated"
  23043. },
  23044. {
  23045. "$ref": "#/components/schemas/V2EventMessagePartRemoved"
  23046. },
  23047. {
  23048. "$ref": "#/components/schemas/V2EventSessionNextAgentSwitched"
  23049. },
  23050. {
  23051. "$ref": "#/components/schemas/V2EventSessionNextModelSwitched"
  23052. },
  23053. {
  23054. "$ref": "#/components/schemas/V2EventSessionNextMoved"
  23055. },
  23056. {
  23057. "$ref": "#/components/schemas/V2EventSessionNextPrompted"
  23058. },
  23059. {
  23060. "$ref": "#/components/schemas/V2EventSessionNextPromptAdmitted"
  23061. },
  23062. {
  23063. "$ref": "#/components/schemas/V2EventSessionNextContextUpdated"
  23064. },
  23065. {
  23066. "$ref": "#/components/schemas/V2EventSessionNextSynthetic"
  23067. },
  23068. {
  23069. "$ref": "#/components/schemas/V2EventSessionNextShellStarted"
  23070. },
  23071. {
  23072. "$ref": "#/components/schemas/V2EventSessionNextShellEnded"
  23073. },
  23074. {
  23075. "$ref": "#/components/schemas/V2EventSessionNextStepStarted"
  23076. },
  23077. {
  23078. "$ref": "#/components/schemas/V2EventSessionNextStepEnded"
  23079. },
  23080. {
  23081. "$ref": "#/components/schemas/V2EventSessionNextStepFailed"
  23082. },
  23083. {
  23084. "$ref": "#/components/schemas/V2EventSessionNextTextStarted"
  23085. },
  23086. {
  23087. "$ref": "#/components/schemas/V2EventSessionNextTextDelta"
  23088. },
  23089. {
  23090. "$ref": "#/components/schemas/V2EventSessionNextTextEnded"
  23091. },
  23092. {
  23093. "$ref": "#/components/schemas/V2EventSessionNextReasoningStarted"
  23094. },
  23095. {
  23096. "$ref": "#/components/schemas/V2EventSessionNextReasoningDelta"
  23097. },
  23098. {
  23099. "$ref": "#/components/schemas/V2EventSessionNextReasoningEnded"
  23100. },
  23101. {
  23102. "$ref": "#/components/schemas/V2EventSessionNextToolInputStarted"
  23103. },
  23104. {
  23105. "$ref": "#/components/schemas/V2EventSessionNextToolInputDelta"
  23106. },
  23107. {
  23108. "$ref": "#/components/schemas/V2EventSessionNextToolInputEnded"
  23109. },
  23110. {
  23111. "$ref": "#/components/schemas/V2EventSessionNextToolCalled"
  23112. },
  23113. {
  23114. "$ref": "#/components/schemas/V2EventSessionNextToolProgress"
  23115. },
  23116. {
  23117. "$ref": "#/components/schemas/V2EventSessionNextToolSuccess"
  23118. },
  23119. {
  23120. "$ref": "#/components/schemas/V2EventSessionNextToolFailed"
  23121. },
  23122. {
  23123. "$ref": "#/components/schemas/V2EventSessionNextRetried"
  23124. },
  23125. {
  23126. "$ref": "#/components/schemas/V2EventSessionNextCompactionStarted"
  23127. },
  23128. {
  23129. "$ref": "#/components/schemas/V2EventSessionNextCompactionDelta"
  23130. },
  23131. {
  23132. "$ref": "#/components/schemas/V2EventSessionNextCompactionEnded"
  23133. },
  23134. {
  23135. "$ref": "#/components/schemas/V2EventMessagePartDelta"
  23136. },
  23137. {
  23138. "$ref": "#/components/schemas/V2EventSessionDiff"
  23139. },
  23140. {
  23141. "$ref": "#/components/schemas/V2EventSessionError"
  23142. },
  23143. {
  23144. "$ref": "#/components/schemas/V2EventInstallationUpdated"
  23145. },
  23146. {
  23147. "$ref": "#/components/schemas/V2EventInstallationUpdate-available"
  23148. },
  23149. {
  23150. "$ref": "#/components/schemas/V2EventFileEdited"
  23151. },
  23152. {
  23153. "$ref": "#/components/schemas/V2EventReferenceUpdated"
  23154. },
  23155. {
  23156. "$ref": "#/components/schemas/V2EventPermissionV2Asked"
  23157. },
  23158. {
  23159. "$ref": "#/components/schemas/V2EventPermissionV2Replied"
  23160. },
  23161. {
  23162. "$ref": "#/components/schemas/V2EventPluginAdded"
  23163. },
  23164. {
  23165. "$ref": "#/components/schemas/V2EventProjectDirectoriesUpdated"
  23166. },
  23167. {
  23168. "$ref": "#/components/schemas/V2EventFileWatcherUpdated"
  23169. },
  23170. {
  23171. "$ref": "#/components/schemas/V2EventPtyCreated"
  23172. },
  23173. {
  23174. "$ref": "#/components/schemas/V2EventPtyUpdated"
  23175. },
  23176. {
  23177. "$ref": "#/components/schemas/V2EventPtyExited"
  23178. },
  23179. {
  23180. "$ref": "#/components/schemas/V2EventPtyDeleted"
  23181. },
  23182. {
  23183. "$ref": "#/components/schemas/V2EventQuestionV2Asked"
  23184. },
  23185. {
  23186. "$ref": "#/components/schemas/V2EventQuestionV2Replied"
  23187. },
  23188. {
  23189. "$ref": "#/components/schemas/V2EventQuestionV2Rejected"
  23190. },
  23191. {
  23192. "$ref": "#/components/schemas/V2EventTodoUpdated"
  23193. },
  23194. {
  23195. "$ref": "#/components/schemas/V2EventLspUpdated"
  23196. },
  23197. {
  23198. "$ref": "#/components/schemas/V2EventPermissionAsked"
  23199. },
  23200. {
  23201. "$ref": "#/components/schemas/V2EventPermissionReplied"
  23202. },
  23203. {
  23204. "$ref": "#/components/schemas/V2EventTuiPromptAppend"
  23205. },
  23206. {
  23207. "$ref": "#/components/schemas/V2EventTuiCommandExecute"
  23208. },
  23209. {
  23210. "$ref": "#/components/schemas/V2EventTuiToastShow"
  23211. },
  23212. {
  23213. "$ref": "#/components/schemas/V2EventTuiSessionSelect"
  23214. },
  23215. {
  23216. "$ref": "#/components/schemas/V2EventMcpToolsChanged"
  23217. },
  23218. {
  23219. "$ref": "#/components/schemas/V2EventMcpBrowserOpenFailed"
  23220. },
  23221. {
  23222. "$ref": "#/components/schemas/V2EventCommandExecuted"
  23223. },
  23224. {
  23225. "$ref": "#/components/schemas/V2EventProjectUpdated"
  23226. },
  23227. {
  23228. "$ref": "#/components/schemas/V2EventSessionStatus"
  23229. },
  23230. {
  23231. "$ref": "#/components/schemas/V2EventSessionIdle"
  23232. },
  23233. {
  23234. "$ref": "#/components/schemas/V2EventQuestionAsked"
  23235. },
  23236. {
  23237. "$ref": "#/components/schemas/V2EventQuestionReplied"
  23238. },
  23239. {
  23240. "$ref": "#/components/schemas/V2EventQuestionRejected"
  23241. },
  23242. {
  23243. "$ref": "#/components/schemas/V2EventSessionCompacted"
  23244. },
  23245. {
  23246. "$ref": "#/components/schemas/V2EventVcsBranchUpdated"
  23247. },
  23248. {
  23249. "$ref": "#/components/schemas/V2EventWorkspaceReady"
  23250. },
  23251. {
  23252. "$ref": "#/components/schemas/V2EventWorkspaceFailed"
  23253. },
  23254. {
  23255. "$ref": "#/components/schemas/V2EventWorkspaceStatus"
  23256. },
  23257. {
  23258. "$ref": "#/components/schemas/V2EventWorktreeReady"
  23259. },
  23260. {
  23261. "$ref": "#/components/schemas/V2EventWorktreeFailed"
  23262. },
  23263. {
  23264. "$ref": "#/components/schemas/V2EventServerConnected"
  23265. },
  23266. {
  23267. "$ref": "#/components/schemas/V2EventGlobalDisposed"
  23268. }
  23269. ]
  23270. },
  23271. "ForbiddenError": {
  23272. "type": "object",
  23273. "properties": {
  23274. "_tag": {
  23275. "type": "string",
  23276. "enum": ["ForbiddenError"]
  23277. },
  23278. "message": {
  23279. "type": "string"
  23280. }
  23281. },
  23282. "required": ["_tag", "message"],
  23283. "additionalProperties": false
  23284. },
  23285. "ProjectCopyError": {
  23286. "type": "object",
  23287. "properties": {
  23288. "name": {
  23289. "type": "string",
  23290. "enum": ["ProjectCopyError"]
  23291. },
  23292. "data": {
  23293. "type": "object",
  23294. "properties": {
  23295. "message": {
  23296. "type": "string"
  23297. },
  23298. "forceRequired": {
  23299. "type": "boolean"
  23300. }
  23301. },
  23302. "required": ["message"],
  23303. "additionalProperties": false
  23304. }
  23305. },
  23306. "required": ["name", "data"],
  23307. "additionalProperties": false
  23308. },
  23309. "effect_HttpApiError_Forbidden": {
  23310. "type": "object",
  23311. "properties": {
  23312. "_tag": {
  23313. "type": "string",
  23314. "enum": ["Forbidden"]
  23315. }
  23316. },
  23317. "required": ["_tag"],
  23318. "additionalProperties": false
  23319. },
  23320. "Event.tui.prompt.append": {
  23321. "type": "object",
  23322. "properties": {
  23323. "id": {
  23324. "type": "string",
  23325. "pattern": "^evt_"
  23326. },
  23327. "type": {
  23328. "type": "string",
  23329. "enum": ["tui.prompt.append"]
  23330. },
  23331. "properties": {
  23332. "type": "object",
  23333. "properties": {
  23334. "text": {
  23335. "type": "string"
  23336. }
  23337. },
  23338. "required": ["text"],
  23339. "additionalProperties": false
  23340. }
  23341. },
  23342. "required": ["id", "type", "properties"],
  23343. "additionalProperties": false
  23344. },
  23345. "Event.tui.command.execute": {
  23346. "type": "object",
  23347. "properties": {
  23348. "id": {
  23349. "type": "string",
  23350. "pattern": "^evt_"
  23351. },
  23352. "type": {
  23353. "type": "string",
  23354. "enum": ["tui.command.execute"]
  23355. },
  23356. "properties": {
  23357. "type": "object",
  23358. "properties": {
  23359. "command": {
  23360. "anyOf": [
  23361. {
  23362. "type": "string",
  23363. "enum": [
  23364. "session.list",
  23365. "session.new",
  23366. "session.share",
  23367. "session.interrupt",
  23368. "session.compact",
  23369. "session.page.up",
  23370. "session.page.down",
  23371. "session.line.up",
  23372. "session.line.down",
  23373. "session.half.page.up",
  23374. "session.half.page.down",
  23375. "session.first",
  23376. "session.last",
  23377. "prompt.clear",
  23378. "prompt.submit",
  23379. "agent.cycle"
  23380. ]
  23381. },
  23382. {
  23383. "type": "string"
  23384. }
  23385. ]
  23386. }
  23387. },
  23388. "required": ["command"],
  23389. "additionalProperties": false
  23390. }
  23391. },
  23392. "required": ["id", "type", "properties"],
  23393. "additionalProperties": false
  23394. },
  23395. "Event.tui.toast.show": {
  23396. "type": "object",
  23397. "properties": {
  23398. "id": {
  23399. "type": "string",
  23400. "pattern": "^evt_"
  23401. },
  23402. "type": {
  23403. "type": "string",
  23404. "enum": ["tui.toast.show"]
  23405. },
  23406. "properties": {
  23407. "type": "object",
  23408. "properties": {
  23409. "title": {
  23410. "type": "string"
  23411. },
  23412. "message": {
  23413. "type": "string"
  23414. },
  23415. "variant": {
  23416. "type": "string",
  23417. "enum": ["info", "success", "warning", "error"]
  23418. },
  23419. "duration": {
  23420. "type": "integer",
  23421. "exclusiveMinimum": 0
  23422. }
  23423. },
  23424. "required": ["message", "variant"],
  23425. "additionalProperties": false
  23426. }
  23427. },
  23428. "required": ["id", "type", "properties"],
  23429. "additionalProperties": false
  23430. },
  23431. "Event.tui.session.select": {
  23432. "type": "object",
  23433. "properties": {
  23434. "id": {
  23435. "type": "string",
  23436. "pattern": "^evt_"
  23437. },
  23438. "type": {
  23439. "type": "string",
  23440. "enum": ["tui.session.select"]
  23441. },
  23442. "properties": {
  23443. "type": "object",
  23444. "properties": {
  23445. "sessionID": {
  23446. "type": "string",
  23447. "pattern": "^ses",
  23448. "description": "Session ID to navigate to"
  23449. }
  23450. },
  23451. "required": ["sessionID"],
  23452. "additionalProperties": false
  23453. }
  23454. },
  23455. "required": ["id", "type", "properties"],
  23456. "additionalProperties": false
  23457. },
  23458. "CredentialValue": {
  23459. "anyOf": [
  23460. {
  23461. "$ref": "#/components/schemas/CredentialOAuth"
  23462. },
  23463. {
  23464. "$ref": "#/components/schemas/CredentialKey"
  23465. }
  23466. ]
  23467. },
  23468. "IntegrationInputs": {
  23469. "type": "object",
  23470. "additionalProperties": {
  23471. "type": "string"
  23472. }
  23473. },
  23474. "IntegrationMethod": {
  23475. "anyOf": [
  23476. {
  23477. "$ref": "#/components/schemas/IntegrationOAuthMethod"
  23478. },
  23479. {
  23480. "$ref": "#/components/schemas/IntegrationKeyMethod"
  23481. },
  23482. {
  23483. "$ref": "#/components/schemas/IntegrationEnvMethod"
  23484. }
  23485. ]
  23486. },
  23487. "IntegrationRef": {
  23488. "type": "object",
  23489. "properties": {
  23490. "id": {
  23491. "type": "string"
  23492. },
  23493. "name": {
  23494. "type": "string"
  23495. }
  23496. },
  23497. "required": ["id", "name"],
  23498. "additionalProperties": false
  23499. },
  23500. "SkillV2Source": {
  23501. "anyOf": [
  23502. {
  23503. "$ref": "#/components/schemas/SkillV2DirectorySource"
  23504. },
  23505. {
  23506. "$ref": "#/components/schemas/SkillV2UrlSource"
  23507. },
  23508. {
  23509. "$ref": "#/components/schemas/SkillV2EmbeddedSource"
  23510. }
  23511. ]
  23512. },
  23513. "MoveSessionDestination": {
  23514. "type": "object",
  23515. "properties": {
  23516. "directory": {
  23517. "type": "string"
  23518. }
  23519. },
  23520. "required": ["directory"],
  23521. "additionalProperties": false
  23522. },
  23523. "LocationRef": {
  23524. "type": "object",
  23525. "properties": {
  23526. "directory": {
  23527. "type": "string"
  23528. },
  23529. "workspaceID": {
  23530. "type": "string",
  23531. "pattern": "^wrk"
  23532. }
  23533. },
  23534. "required": ["directory"],
  23535. "additionalProperties": false
  23536. },
  23537. "PromptSource": {
  23538. "type": "object",
  23539. "properties": {
  23540. "start": {
  23541. "type": "number"
  23542. },
  23543. "end": {
  23544. "type": "number"
  23545. },
  23546. "text": {
  23547. "type": "string"
  23548. }
  23549. },
  23550. "required": ["start", "end", "text"],
  23551. "additionalProperties": false
  23552. },
  23553. "PromptFileAttachment": {
  23554. "type": "object",
  23555. "properties": {
  23556. "uri": {
  23557. "type": "string"
  23558. },
  23559. "mime": {
  23560. "type": "string"
  23561. },
  23562. "name": {
  23563. "type": "string"
  23564. },
  23565. "description": {
  23566. "type": "string"
  23567. },
  23568. "source": {
  23569. "$ref": "#/components/schemas/PromptSource"
  23570. }
  23571. },
  23572. "required": ["uri", "mime"],
  23573. "additionalProperties": false
  23574. },
  23575. "PromptAgentAttachment": {
  23576. "type": "object",
  23577. "properties": {
  23578. "name": {
  23579. "type": "string"
  23580. },
  23581. "source": {
  23582. "$ref": "#/components/schemas/PromptSource"
  23583. }
  23584. },
  23585. "required": ["name"],
  23586. "additionalProperties": false
  23587. },
  23588. "SessionErrorUnknown": {
  23589. "type": "object",
  23590. "properties": {
  23591. "type": {
  23592. "type": "string",
  23593. "enum": ["unknown"]
  23594. },
  23595. "message": {
  23596. "type": "string"
  23597. }
  23598. },
  23599. "required": ["type", "message"],
  23600. "additionalProperties": false
  23601. },
  23602. "ToolTextContent": {
  23603. "type": "object",
  23604. "properties": {
  23605. "type": {
  23606. "type": "string",
  23607. "enum": ["text"]
  23608. },
  23609. "text": {
  23610. "type": "string"
  23611. }
  23612. },
  23613. "required": ["type", "text"],
  23614. "additionalProperties": false
  23615. },
  23616. "ToolFileContent": {
  23617. "type": "object",
  23618. "properties": {
  23619. "type": {
  23620. "type": "string",
  23621. "enum": ["file"]
  23622. },
  23623. "uri": {
  23624. "type": "string"
  23625. },
  23626. "mime": {
  23627. "type": "string"
  23628. },
  23629. "name": {
  23630. "type": "string"
  23631. }
  23632. },
  23633. "required": ["type", "uri", "mime"],
  23634. "additionalProperties": false
  23635. },
  23636. "SessionNextRetry_error": {
  23637. "type": "object",
  23638. "properties": {
  23639. "message": {
  23640. "type": "string"
  23641. },
  23642. "statusCode": {
  23643. "type": "number"
  23644. },
  23645. "isRetryable": {
  23646. "type": "boolean"
  23647. },
  23648. "responseHeaders": {
  23649. "type": "object",
  23650. "additionalProperties": {
  23651. "type": "string"
  23652. }
  23653. },
  23654. "responseBody": {
  23655. "type": "string"
  23656. },
  23657. "metadata": {
  23658. "type": "object",
  23659. "additionalProperties": {
  23660. "type": "string"
  23661. }
  23662. }
  23663. },
  23664. "required": ["message", "isRetryable"],
  23665. "additionalProperties": false
  23666. },
  23667. "PermissionV2Source": {
  23668. "type": "object",
  23669. "properties": {
  23670. "type": {
  23671. "type": "string",
  23672. "enum": ["tool"]
  23673. },
  23674. "messageID": {
  23675. "type": "string"
  23676. },
  23677. "callID": {
  23678. "type": "string"
  23679. }
  23680. },
  23681. "required": ["type", "messageID", "callID"],
  23682. "additionalProperties": false
  23683. },
  23684. "PermissionV2Reply": {
  23685. "type": "string",
  23686. "enum": ["once", "always", "reject"]
  23687. },
  23688. "QuestionV2Option": {
  23689. "type": "object",
  23690. "properties": {
  23691. "label": {
  23692. "type": "string",
  23693. "description": "Display text (1-5 words, concise)"
  23694. },
  23695. "description": {
  23696. "type": "string",
  23697. "description": "Explanation of choice"
  23698. }
  23699. },
  23700. "required": ["label", "description"],
  23701. "additionalProperties": false
  23702. },
  23703. "QuestionV2Info": {
  23704. "type": "object",
  23705. "properties": {
  23706. "question": {
  23707. "type": "string",
  23708. "description": "Complete question"
  23709. },
  23710. "header": {
  23711. "type": "string",
  23712. "description": "Very short label (max 30 chars)"
  23713. },
  23714. "options": {
  23715. "type": "array",
  23716. "items": {
  23717. "$ref": "#/components/schemas/QuestionV2Option"
  23718. },
  23719. "description": "Available choices"
  23720. },
  23721. "multiple": {
  23722. "type": "boolean"
  23723. },
  23724. "custom": {
  23725. "type": "boolean"
  23726. }
  23727. },
  23728. "required": ["question", "header", "options"],
  23729. "additionalProperties": false
  23730. },
  23731. "QuestionV2Tool": {
  23732. "type": "object",
  23733. "properties": {
  23734. "messageID": {
  23735. "type": "string"
  23736. },
  23737. "callID": {
  23738. "type": "string"
  23739. }
  23740. },
  23741. "required": ["messageID", "callID"],
  23742. "additionalProperties": false
  23743. },
  23744. "QuestionV2Answer": {
  23745. "type": "array",
  23746. "items": {
  23747. "type": "string"
  23748. }
  23749. },
  23750. "EventServerInstanceDisposed": {
  23751. "type": "object",
  23752. "properties": {
  23753. "id": {
  23754. "type": "string"
  23755. },
  23756. "type": {
  23757. "type": "string",
  23758. "enum": ["server.instance.disposed"]
  23759. },
  23760. "properties": {
  23761. "type": "object",
  23762. "properties": {
  23763. "directory": {
  23764. "type": "string"
  23765. }
  23766. },
  23767. "required": ["directory"],
  23768. "additionalProperties": false
  23769. }
  23770. },
  23771. "required": ["id", "type", "properties"],
  23772. "additionalProperties": false
  23773. },
  23774. "SyncEventSessionCreated": {
  23775. "type": "object",
  23776. "properties": {
  23777. "type": {
  23778. "type": "string",
  23779. "enum": ["sync"]
  23780. },
  23781. "id": {
  23782. "type": "string",
  23783. "pattern": "^evt_"
  23784. },
  23785. "syncEvent": {
  23786. "type": "object",
  23787. "properties": {
  23788. "type": {
  23789. "type": "string",
  23790. "enum": ["session.created.1"]
  23791. },
  23792. "id": {
  23793. "type": "string",
  23794. "pattern": "^evt_"
  23795. },
  23796. "seq": {
  23797. "type": "number"
  23798. },
  23799. "aggregateID": {
  23800. "type": "string"
  23801. },
  23802. "data": {
  23803. "type": "object",
  23804. "properties": {
  23805. "sessionID": {
  23806. "type": "string",
  23807. "pattern": "^ses"
  23808. },
  23809. "info": {
  23810. "$ref": "#/components/schemas/Session"
  23811. }
  23812. },
  23813. "required": ["sessionID", "info"],
  23814. "additionalProperties": false
  23815. }
  23816. },
  23817. "required": ["type", "id", "seq", "aggregateID", "data"],
  23818. "additionalProperties": false
  23819. }
  23820. },
  23821. "required": ["type", "id", "syncEvent"],
  23822. "additionalProperties": false
  23823. },
  23824. "SyncEventSessionUpdated": {
  23825. "type": "object",
  23826. "properties": {
  23827. "type": {
  23828. "type": "string",
  23829. "enum": ["sync"]
  23830. },
  23831. "id": {
  23832. "type": "string",
  23833. "pattern": "^evt_"
  23834. },
  23835. "syncEvent": {
  23836. "type": "object",
  23837. "properties": {
  23838. "type": {
  23839. "type": "string",
  23840. "enum": ["session.updated.1"]
  23841. },
  23842. "id": {
  23843. "type": "string",
  23844. "pattern": "^evt_"
  23845. },
  23846. "seq": {
  23847. "type": "number"
  23848. },
  23849. "aggregateID": {
  23850. "type": "string"
  23851. },
  23852. "data": {
  23853. "type": "object",
  23854. "properties": {
  23855. "sessionID": {
  23856. "type": "string",
  23857. "pattern": "^ses"
  23858. },
  23859. "info": {
  23860. "$ref": "#/components/schemas/Session"
  23861. }
  23862. },
  23863. "required": ["sessionID", "info"],
  23864. "additionalProperties": false
  23865. }
  23866. },
  23867. "required": ["type", "id", "seq", "aggregateID", "data"],
  23868. "additionalProperties": false
  23869. }
  23870. },
  23871. "required": ["type", "id", "syncEvent"],
  23872. "additionalProperties": false
  23873. },
  23874. "SyncEventSessionDeleted": {
  23875. "type": "object",
  23876. "properties": {
  23877. "type": {
  23878. "type": "string",
  23879. "enum": ["sync"]
  23880. },
  23881. "id": {
  23882. "type": "string",
  23883. "pattern": "^evt_"
  23884. },
  23885. "syncEvent": {
  23886. "type": "object",
  23887. "properties": {
  23888. "type": {
  23889. "type": "string",
  23890. "enum": ["session.deleted.1"]
  23891. },
  23892. "id": {
  23893. "type": "string",
  23894. "pattern": "^evt_"
  23895. },
  23896. "seq": {
  23897. "type": "number"
  23898. },
  23899. "aggregateID": {
  23900. "type": "string"
  23901. },
  23902. "data": {
  23903. "type": "object",
  23904. "properties": {
  23905. "sessionID": {
  23906. "type": "string",
  23907. "pattern": "^ses"
  23908. },
  23909. "info": {
  23910. "$ref": "#/components/schemas/Session"
  23911. }
  23912. },
  23913. "required": ["sessionID", "info"],
  23914. "additionalProperties": false
  23915. }
  23916. },
  23917. "required": ["type", "id", "seq", "aggregateID", "data"],
  23918. "additionalProperties": false
  23919. }
  23920. },
  23921. "required": ["type", "id", "syncEvent"],
  23922. "additionalProperties": false
  23923. },
  23924. "SyncEventMessageUpdated": {
  23925. "type": "object",
  23926. "properties": {
  23927. "type": {
  23928. "type": "string",
  23929. "enum": ["sync"]
  23930. },
  23931. "id": {
  23932. "type": "string",
  23933. "pattern": "^evt_"
  23934. },
  23935. "syncEvent": {
  23936. "type": "object",
  23937. "properties": {
  23938. "type": {
  23939. "type": "string",
  23940. "enum": ["message.updated.1"]
  23941. },
  23942. "id": {
  23943. "type": "string",
  23944. "pattern": "^evt_"
  23945. },
  23946. "seq": {
  23947. "type": "number"
  23948. },
  23949. "aggregateID": {
  23950. "type": "string"
  23951. },
  23952. "data": {
  23953. "type": "object",
  23954. "properties": {
  23955. "sessionID": {
  23956. "type": "string",
  23957. "pattern": "^ses"
  23958. },
  23959. "info": {
  23960. "$ref": "#/components/schemas/Message"
  23961. }
  23962. },
  23963. "required": ["sessionID", "info"],
  23964. "additionalProperties": false
  23965. }
  23966. },
  23967. "required": ["type", "id", "seq", "aggregateID", "data"],
  23968. "additionalProperties": false
  23969. }
  23970. },
  23971. "required": ["type", "id", "syncEvent"],
  23972. "additionalProperties": false
  23973. },
  23974. "SyncEventMessageRemoved": {
  23975. "type": "object",
  23976. "properties": {
  23977. "type": {
  23978. "type": "string",
  23979. "enum": ["sync"]
  23980. },
  23981. "id": {
  23982. "type": "string",
  23983. "pattern": "^evt_"
  23984. },
  23985. "syncEvent": {
  23986. "type": "object",
  23987. "properties": {
  23988. "type": {
  23989. "type": "string",
  23990. "enum": ["message.removed.1"]
  23991. },
  23992. "id": {
  23993. "type": "string",
  23994. "pattern": "^evt_"
  23995. },
  23996. "seq": {
  23997. "type": "number"
  23998. },
  23999. "aggregateID": {
  24000. "type": "string"
  24001. },
  24002. "data": {
  24003. "type": "object",
  24004. "properties": {
  24005. "sessionID": {
  24006. "type": "string",
  24007. "pattern": "^ses"
  24008. },
  24009. "messageID": {
  24010. "type": "string",
  24011. "pattern": "^msg"
  24012. }
  24013. },
  24014. "required": ["sessionID", "messageID"],
  24015. "additionalProperties": false
  24016. }
  24017. },
  24018. "required": ["type", "id", "seq", "aggregateID", "data"],
  24019. "additionalProperties": false
  24020. }
  24021. },
  24022. "required": ["type", "id", "syncEvent"],
  24023. "additionalProperties": false
  24024. },
  24025. "SyncEventMessagePartUpdated": {
  24026. "type": "object",
  24027. "properties": {
  24028. "type": {
  24029. "type": "string",
  24030. "enum": ["sync"]
  24031. },
  24032. "id": {
  24033. "type": "string",
  24034. "pattern": "^evt_"
  24035. },
  24036. "syncEvent": {
  24037. "type": "object",
  24038. "properties": {
  24039. "type": {
  24040. "type": "string",
  24041. "enum": ["message.part.updated.1"]
  24042. },
  24043. "id": {
  24044. "type": "string",
  24045. "pattern": "^evt_"
  24046. },
  24047. "seq": {
  24048. "type": "number"
  24049. },
  24050. "aggregateID": {
  24051. "type": "string"
  24052. },
  24053. "data": {
  24054. "type": "object",
  24055. "properties": {
  24056. "sessionID": {
  24057. "type": "string",
  24058. "pattern": "^ses"
  24059. },
  24060. "part": {
  24061. "$ref": "#/components/schemas/Part"
  24062. },
  24063. "time": {
  24064. "type": "number"
  24065. }
  24066. },
  24067. "required": ["sessionID", "part", "time"],
  24068. "additionalProperties": false
  24069. }
  24070. },
  24071. "required": ["type", "id", "seq", "aggregateID", "data"],
  24072. "additionalProperties": false
  24073. }
  24074. },
  24075. "required": ["type", "id", "syncEvent"],
  24076. "additionalProperties": false
  24077. },
  24078. "SyncEventMessagePartRemoved": {
  24079. "type": "object",
  24080. "properties": {
  24081. "type": {
  24082. "type": "string",
  24083. "enum": ["sync"]
  24084. },
  24085. "id": {
  24086. "type": "string",
  24087. "pattern": "^evt_"
  24088. },
  24089. "syncEvent": {
  24090. "type": "object",
  24091. "properties": {
  24092. "type": {
  24093. "type": "string",
  24094. "enum": ["message.part.removed.1"]
  24095. },
  24096. "id": {
  24097. "type": "string",
  24098. "pattern": "^evt_"
  24099. },
  24100. "seq": {
  24101. "type": "number"
  24102. },
  24103. "aggregateID": {
  24104. "type": "string"
  24105. },
  24106. "data": {
  24107. "type": "object",
  24108. "properties": {
  24109. "sessionID": {
  24110. "type": "string",
  24111. "pattern": "^ses"
  24112. },
  24113. "messageID": {
  24114. "type": "string",
  24115. "pattern": "^msg"
  24116. },
  24117. "partID": {
  24118. "type": "string",
  24119. "pattern": "^prt"
  24120. }
  24121. },
  24122. "required": ["sessionID", "messageID", "partID"],
  24123. "additionalProperties": false
  24124. }
  24125. },
  24126. "required": ["type", "id", "seq", "aggregateID", "data"],
  24127. "additionalProperties": false
  24128. }
  24129. },
  24130. "required": ["type", "id", "syncEvent"],
  24131. "additionalProperties": false
  24132. },
  24133. "SyncEventSessionNextAgentSwitched": {
  24134. "type": "object",
  24135. "properties": {
  24136. "type": {
  24137. "type": "string",
  24138. "enum": ["sync"]
  24139. },
  24140. "id": {
  24141. "type": "string",
  24142. "pattern": "^evt_"
  24143. },
  24144. "syncEvent": {
  24145. "type": "object",
  24146. "properties": {
  24147. "type": {
  24148. "type": "string",
  24149. "enum": ["session.next.agent.switched.1"]
  24150. },
  24151. "id": {
  24152. "type": "string",
  24153. "pattern": "^evt_"
  24154. },
  24155. "seq": {
  24156. "type": "number"
  24157. },
  24158. "aggregateID": {
  24159. "type": "string"
  24160. },
  24161. "data": {
  24162. "type": "object",
  24163. "properties": {
  24164. "timestamp": {
  24165. "type": "number"
  24166. },
  24167. "sessionID": {
  24168. "type": "string",
  24169. "pattern": "^ses"
  24170. },
  24171. "messageID": {
  24172. "type": "string",
  24173. "pattern": "^msg_"
  24174. },
  24175. "agent": {
  24176. "type": "string"
  24177. }
  24178. },
  24179. "required": ["timestamp", "sessionID", "messageID", "agent"],
  24180. "additionalProperties": false
  24181. }
  24182. },
  24183. "required": ["type", "id", "seq", "aggregateID", "data"],
  24184. "additionalProperties": false
  24185. }
  24186. },
  24187. "required": ["type", "id", "syncEvent"],
  24188. "additionalProperties": false
  24189. },
  24190. "SyncEventSessionNextModelSwitched": {
  24191. "type": "object",
  24192. "properties": {
  24193. "type": {
  24194. "type": "string",
  24195. "enum": ["sync"]
  24196. },
  24197. "id": {
  24198. "type": "string",
  24199. "pattern": "^evt_"
  24200. },
  24201. "syncEvent": {
  24202. "type": "object",
  24203. "properties": {
  24204. "type": {
  24205. "type": "string",
  24206. "enum": ["session.next.model.switched.1"]
  24207. },
  24208. "id": {
  24209. "type": "string",
  24210. "pattern": "^evt_"
  24211. },
  24212. "seq": {
  24213. "type": "number"
  24214. },
  24215. "aggregateID": {
  24216. "type": "string"
  24217. },
  24218. "data": {
  24219. "type": "object",
  24220. "properties": {
  24221. "timestamp": {
  24222. "type": "number"
  24223. },
  24224. "sessionID": {
  24225. "type": "string",
  24226. "pattern": "^ses"
  24227. },
  24228. "messageID": {
  24229. "type": "string",
  24230. "pattern": "^msg_"
  24231. },
  24232. "model": {
  24233. "type": "object",
  24234. "properties": {
  24235. "id": {
  24236. "type": "string"
  24237. },
  24238. "providerID": {
  24239. "type": "string"
  24240. },
  24241. "variant": {
  24242. "type": "string"
  24243. }
  24244. },
  24245. "required": ["id", "providerID"],
  24246. "additionalProperties": false
  24247. }
  24248. },
  24249. "required": ["timestamp", "sessionID", "messageID", "model"],
  24250. "additionalProperties": false
  24251. }
  24252. },
  24253. "required": ["type", "id", "seq", "aggregateID", "data"],
  24254. "additionalProperties": false
  24255. }
  24256. },
  24257. "required": ["type", "id", "syncEvent"],
  24258. "additionalProperties": false
  24259. },
  24260. "SyncEventSessionNextMoved": {
  24261. "type": "object",
  24262. "properties": {
  24263. "type": {
  24264. "type": "string",
  24265. "enum": ["sync"]
  24266. },
  24267. "id": {
  24268. "type": "string",
  24269. "pattern": "^evt_"
  24270. },
  24271. "syncEvent": {
  24272. "type": "object",
  24273. "properties": {
  24274. "type": {
  24275. "type": "string",
  24276. "enum": ["session.next.moved.1"]
  24277. },
  24278. "id": {
  24279. "type": "string",
  24280. "pattern": "^evt_"
  24281. },
  24282. "seq": {
  24283. "type": "number"
  24284. },
  24285. "aggregateID": {
  24286. "type": "string"
  24287. },
  24288. "data": {
  24289. "type": "object",
  24290. "properties": {
  24291. "timestamp": {
  24292. "type": "number"
  24293. },
  24294. "sessionID": {
  24295. "type": "string",
  24296. "pattern": "^ses"
  24297. },
  24298. "location": {
  24299. "$ref": "#/components/schemas/LocationRef"
  24300. },
  24301. "subdirectory": {
  24302. "type": "string"
  24303. }
  24304. },
  24305. "required": ["timestamp", "sessionID", "location"],
  24306. "additionalProperties": false
  24307. }
  24308. },
  24309. "required": ["type", "id", "seq", "aggregateID", "data"],
  24310. "additionalProperties": false
  24311. }
  24312. },
  24313. "required": ["type", "id", "syncEvent"],
  24314. "additionalProperties": false
  24315. },
  24316. "SyncEventSessionNextPrompted": {
  24317. "type": "object",
  24318. "properties": {
  24319. "type": {
  24320. "type": "string",
  24321. "enum": ["sync"]
  24322. },
  24323. "id": {
  24324. "type": "string",
  24325. "pattern": "^evt_"
  24326. },
  24327. "syncEvent": {
  24328. "type": "object",
  24329. "properties": {
  24330. "type": {
  24331. "type": "string",
  24332. "enum": ["session.next.prompted.1"]
  24333. },
  24334. "id": {
  24335. "type": "string",
  24336. "pattern": "^evt_"
  24337. },
  24338. "seq": {
  24339. "type": "number"
  24340. },
  24341. "aggregateID": {
  24342. "type": "string"
  24343. },
  24344. "data": {
  24345. "type": "object",
  24346. "properties": {
  24347. "timestamp": {
  24348. "type": "number"
  24349. },
  24350. "sessionID": {
  24351. "type": "string",
  24352. "pattern": "^ses"
  24353. },
  24354. "messageID": {
  24355. "type": "string",
  24356. "pattern": "^msg_"
  24357. },
  24358. "prompt": {
  24359. "$ref": "#/components/schemas/Prompt"
  24360. },
  24361. "delivery": {
  24362. "type": "string",
  24363. "enum": ["steer", "queue"]
  24364. }
  24365. },
  24366. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  24367. "additionalProperties": false
  24368. }
  24369. },
  24370. "required": ["type", "id", "seq", "aggregateID", "data"],
  24371. "additionalProperties": false
  24372. }
  24373. },
  24374. "required": ["type", "id", "syncEvent"],
  24375. "additionalProperties": false
  24376. },
  24377. "SyncEventSessionNextPromptAdmitted": {
  24378. "type": "object",
  24379. "properties": {
  24380. "type": {
  24381. "type": "string",
  24382. "enum": ["sync"]
  24383. },
  24384. "id": {
  24385. "type": "string",
  24386. "pattern": "^evt_"
  24387. },
  24388. "syncEvent": {
  24389. "type": "object",
  24390. "properties": {
  24391. "type": {
  24392. "type": "string",
  24393. "enum": ["session.next.prompt.admitted.1"]
  24394. },
  24395. "id": {
  24396. "type": "string",
  24397. "pattern": "^evt_"
  24398. },
  24399. "seq": {
  24400. "type": "number"
  24401. },
  24402. "aggregateID": {
  24403. "type": "string"
  24404. },
  24405. "data": {
  24406. "type": "object",
  24407. "properties": {
  24408. "timestamp": {
  24409. "type": "number"
  24410. },
  24411. "sessionID": {
  24412. "type": "string",
  24413. "pattern": "^ses"
  24414. },
  24415. "messageID": {
  24416. "type": "string",
  24417. "pattern": "^msg_"
  24418. },
  24419. "prompt": {
  24420. "$ref": "#/components/schemas/Prompt"
  24421. },
  24422. "delivery": {
  24423. "type": "string",
  24424. "enum": ["steer", "queue"]
  24425. }
  24426. },
  24427. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  24428. "additionalProperties": false
  24429. }
  24430. },
  24431. "required": ["type", "id", "seq", "aggregateID", "data"],
  24432. "additionalProperties": false
  24433. }
  24434. },
  24435. "required": ["type", "id", "syncEvent"],
  24436. "additionalProperties": false
  24437. },
  24438. "SyncEventSessionNextContextUpdated": {
  24439. "type": "object",
  24440. "properties": {
  24441. "type": {
  24442. "type": "string",
  24443. "enum": ["sync"]
  24444. },
  24445. "id": {
  24446. "type": "string",
  24447. "pattern": "^evt_"
  24448. },
  24449. "syncEvent": {
  24450. "type": "object",
  24451. "properties": {
  24452. "type": {
  24453. "type": "string",
  24454. "enum": ["session.next.context.updated.1"]
  24455. },
  24456. "id": {
  24457. "type": "string",
  24458. "pattern": "^evt_"
  24459. },
  24460. "seq": {
  24461. "type": "number"
  24462. },
  24463. "aggregateID": {
  24464. "type": "string"
  24465. },
  24466. "data": {
  24467. "type": "object",
  24468. "properties": {
  24469. "timestamp": {
  24470. "type": "number"
  24471. },
  24472. "sessionID": {
  24473. "type": "string",
  24474. "pattern": "^ses"
  24475. },
  24476. "messageID": {
  24477. "type": "string",
  24478. "pattern": "^msg_"
  24479. },
  24480. "text": {
  24481. "type": "string"
  24482. }
  24483. },
  24484. "required": ["timestamp", "sessionID", "messageID", "text"],
  24485. "additionalProperties": false
  24486. }
  24487. },
  24488. "required": ["type", "id", "seq", "aggregateID", "data"],
  24489. "additionalProperties": false
  24490. }
  24491. },
  24492. "required": ["type", "id", "syncEvent"],
  24493. "additionalProperties": false
  24494. },
  24495. "SyncEventSessionNextSynthetic": {
  24496. "type": "object",
  24497. "properties": {
  24498. "type": {
  24499. "type": "string",
  24500. "enum": ["sync"]
  24501. },
  24502. "id": {
  24503. "type": "string",
  24504. "pattern": "^evt_"
  24505. },
  24506. "syncEvent": {
  24507. "type": "object",
  24508. "properties": {
  24509. "type": {
  24510. "type": "string",
  24511. "enum": ["session.next.synthetic.1"]
  24512. },
  24513. "id": {
  24514. "type": "string",
  24515. "pattern": "^evt_"
  24516. },
  24517. "seq": {
  24518. "type": "number"
  24519. },
  24520. "aggregateID": {
  24521. "type": "string"
  24522. },
  24523. "data": {
  24524. "type": "object",
  24525. "properties": {
  24526. "timestamp": {
  24527. "type": "number"
  24528. },
  24529. "sessionID": {
  24530. "type": "string",
  24531. "pattern": "^ses"
  24532. },
  24533. "messageID": {
  24534. "type": "string",
  24535. "pattern": "^msg_"
  24536. },
  24537. "text": {
  24538. "type": "string"
  24539. }
  24540. },
  24541. "required": ["timestamp", "sessionID", "messageID", "text"],
  24542. "additionalProperties": false
  24543. }
  24544. },
  24545. "required": ["type", "id", "seq", "aggregateID", "data"],
  24546. "additionalProperties": false
  24547. }
  24548. },
  24549. "required": ["type", "id", "syncEvent"],
  24550. "additionalProperties": false
  24551. },
  24552. "SyncEventSessionNextShellStarted": {
  24553. "type": "object",
  24554. "properties": {
  24555. "type": {
  24556. "type": "string",
  24557. "enum": ["sync"]
  24558. },
  24559. "id": {
  24560. "type": "string",
  24561. "pattern": "^evt_"
  24562. },
  24563. "syncEvent": {
  24564. "type": "object",
  24565. "properties": {
  24566. "type": {
  24567. "type": "string",
  24568. "enum": ["session.next.shell.started.1"]
  24569. },
  24570. "id": {
  24571. "type": "string",
  24572. "pattern": "^evt_"
  24573. },
  24574. "seq": {
  24575. "type": "number"
  24576. },
  24577. "aggregateID": {
  24578. "type": "string"
  24579. },
  24580. "data": {
  24581. "type": "object",
  24582. "properties": {
  24583. "timestamp": {
  24584. "type": "number"
  24585. },
  24586. "sessionID": {
  24587. "type": "string",
  24588. "pattern": "^ses"
  24589. },
  24590. "messageID": {
  24591. "type": "string",
  24592. "pattern": "^msg_"
  24593. },
  24594. "callID": {
  24595. "type": "string"
  24596. },
  24597. "command": {
  24598. "type": "string"
  24599. }
  24600. },
  24601. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  24602. "additionalProperties": false
  24603. }
  24604. },
  24605. "required": ["type", "id", "seq", "aggregateID", "data"],
  24606. "additionalProperties": false
  24607. }
  24608. },
  24609. "required": ["type", "id", "syncEvent"],
  24610. "additionalProperties": false
  24611. },
  24612. "SyncEventSessionNextShellEnded": {
  24613. "type": "object",
  24614. "properties": {
  24615. "type": {
  24616. "type": "string",
  24617. "enum": ["sync"]
  24618. },
  24619. "id": {
  24620. "type": "string",
  24621. "pattern": "^evt_"
  24622. },
  24623. "syncEvent": {
  24624. "type": "object",
  24625. "properties": {
  24626. "type": {
  24627. "type": "string",
  24628. "enum": ["session.next.shell.ended.1"]
  24629. },
  24630. "id": {
  24631. "type": "string",
  24632. "pattern": "^evt_"
  24633. },
  24634. "seq": {
  24635. "type": "number"
  24636. },
  24637. "aggregateID": {
  24638. "type": "string"
  24639. },
  24640. "data": {
  24641. "type": "object",
  24642. "properties": {
  24643. "timestamp": {
  24644. "type": "number"
  24645. },
  24646. "sessionID": {
  24647. "type": "string",
  24648. "pattern": "^ses"
  24649. },
  24650. "callID": {
  24651. "type": "string"
  24652. },
  24653. "output": {
  24654. "type": "string"
  24655. }
  24656. },
  24657. "required": ["timestamp", "sessionID", "callID", "output"],
  24658. "additionalProperties": false
  24659. }
  24660. },
  24661. "required": ["type", "id", "seq", "aggregateID", "data"],
  24662. "additionalProperties": false
  24663. }
  24664. },
  24665. "required": ["type", "id", "syncEvent"],
  24666. "additionalProperties": false
  24667. },
  24668. "SyncEventSessionNextStepStarted": {
  24669. "type": "object",
  24670. "properties": {
  24671. "type": {
  24672. "type": "string",
  24673. "enum": ["sync"]
  24674. },
  24675. "id": {
  24676. "type": "string",
  24677. "pattern": "^evt_"
  24678. },
  24679. "syncEvent": {
  24680. "type": "object",
  24681. "properties": {
  24682. "type": {
  24683. "type": "string",
  24684. "enum": ["session.next.step.started.1"]
  24685. },
  24686. "id": {
  24687. "type": "string",
  24688. "pattern": "^evt_"
  24689. },
  24690. "seq": {
  24691. "type": "number"
  24692. },
  24693. "aggregateID": {
  24694. "type": "string"
  24695. },
  24696. "data": {
  24697. "type": "object",
  24698. "properties": {
  24699. "timestamp": {
  24700. "type": "number"
  24701. },
  24702. "sessionID": {
  24703. "type": "string",
  24704. "pattern": "^ses"
  24705. },
  24706. "assistantMessageID": {
  24707. "type": "string",
  24708. "pattern": "^msg_"
  24709. },
  24710. "agent": {
  24711. "type": "string"
  24712. },
  24713. "model": {
  24714. "type": "object",
  24715. "properties": {
  24716. "id": {
  24717. "type": "string"
  24718. },
  24719. "providerID": {
  24720. "type": "string"
  24721. },
  24722. "variant": {
  24723. "type": "string"
  24724. }
  24725. },
  24726. "required": ["id", "providerID"],
  24727. "additionalProperties": false
  24728. },
  24729. "snapshot": {
  24730. "type": "string"
  24731. }
  24732. },
  24733. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  24734. "additionalProperties": false
  24735. }
  24736. },
  24737. "required": ["type", "id", "seq", "aggregateID", "data"],
  24738. "additionalProperties": false
  24739. }
  24740. },
  24741. "required": ["type", "id", "syncEvent"],
  24742. "additionalProperties": false
  24743. },
  24744. "SyncEventSessionNextStepEnded": {
  24745. "type": "object",
  24746. "properties": {
  24747. "type": {
  24748. "type": "string",
  24749. "enum": ["sync"]
  24750. },
  24751. "id": {
  24752. "type": "string",
  24753. "pattern": "^evt_"
  24754. },
  24755. "syncEvent": {
  24756. "type": "object",
  24757. "properties": {
  24758. "type": {
  24759. "type": "string",
  24760. "enum": ["session.next.step.ended.2"]
  24761. },
  24762. "id": {
  24763. "type": "string",
  24764. "pattern": "^evt_"
  24765. },
  24766. "seq": {
  24767. "type": "number"
  24768. },
  24769. "aggregateID": {
  24770. "type": "string"
  24771. },
  24772. "data": {
  24773. "type": "object",
  24774. "properties": {
  24775. "timestamp": {
  24776. "type": "number"
  24777. },
  24778. "sessionID": {
  24779. "type": "string",
  24780. "pattern": "^ses"
  24781. },
  24782. "assistantMessageID": {
  24783. "type": "string",
  24784. "pattern": "^msg_"
  24785. },
  24786. "finish": {
  24787. "type": "string"
  24788. },
  24789. "cost": {
  24790. "type": "number"
  24791. },
  24792. "tokens": {
  24793. "type": "object",
  24794. "properties": {
  24795. "input": {
  24796. "type": "number"
  24797. },
  24798. "output": {
  24799. "type": "number"
  24800. },
  24801. "reasoning": {
  24802. "type": "number"
  24803. },
  24804. "cache": {
  24805. "type": "object",
  24806. "properties": {
  24807. "read": {
  24808. "type": "number"
  24809. },
  24810. "write": {
  24811. "type": "number"
  24812. }
  24813. },
  24814. "required": ["read", "write"],
  24815. "additionalProperties": false
  24816. }
  24817. },
  24818. "required": ["input", "output", "reasoning", "cache"],
  24819. "additionalProperties": false
  24820. },
  24821. "snapshot": {
  24822. "type": "string"
  24823. }
  24824. },
  24825. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  24826. "additionalProperties": false
  24827. }
  24828. },
  24829. "required": ["type", "id", "seq", "aggregateID", "data"],
  24830. "additionalProperties": false
  24831. }
  24832. },
  24833. "required": ["type", "id", "syncEvent"],
  24834. "additionalProperties": false
  24835. },
  24836. "SyncEventSessionNextStepFailed": {
  24837. "type": "object",
  24838. "properties": {
  24839. "type": {
  24840. "type": "string",
  24841. "enum": ["sync"]
  24842. },
  24843. "id": {
  24844. "type": "string",
  24845. "pattern": "^evt_"
  24846. },
  24847. "syncEvent": {
  24848. "type": "object",
  24849. "properties": {
  24850. "type": {
  24851. "type": "string",
  24852. "enum": ["session.next.step.failed.2"]
  24853. },
  24854. "id": {
  24855. "type": "string",
  24856. "pattern": "^evt_"
  24857. },
  24858. "seq": {
  24859. "type": "number"
  24860. },
  24861. "aggregateID": {
  24862. "type": "string"
  24863. },
  24864. "data": {
  24865. "type": "object",
  24866. "properties": {
  24867. "timestamp": {
  24868. "type": "number"
  24869. },
  24870. "sessionID": {
  24871. "type": "string",
  24872. "pattern": "^ses"
  24873. },
  24874. "assistantMessageID": {
  24875. "type": "string",
  24876. "pattern": "^msg_"
  24877. },
  24878. "error": {
  24879. "$ref": "#/components/schemas/SessionErrorUnknown"
  24880. }
  24881. },
  24882. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  24883. "additionalProperties": false
  24884. }
  24885. },
  24886. "required": ["type", "id", "seq", "aggregateID", "data"],
  24887. "additionalProperties": false
  24888. }
  24889. },
  24890. "required": ["type", "id", "syncEvent"],
  24891. "additionalProperties": false
  24892. },
  24893. "SyncEventSessionNextTextStarted": {
  24894. "type": "object",
  24895. "properties": {
  24896. "type": {
  24897. "type": "string",
  24898. "enum": ["sync"]
  24899. },
  24900. "id": {
  24901. "type": "string",
  24902. "pattern": "^evt_"
  24903. },
  24904. "syncEvent": {
  24905. "type": "object",
  24906. "properties": {
  24907. "type": {
  24908. "type": "string",
  24909. "enum": ["session.next.text.started.1"]
  24910. },
  24911. "id": {
  24912. "type": "string",
  24913. "pattern": "^evt_"
  24914. },
  24915. "seq": {
  24916. "type": "number"
  24917. },
  24918. "aggregateID": {
  24919. "type": "string"
  24920. },
  24921. "data": {
  24922. "type": "object",
  24923. "properties": {
  24924. "timestamp": {
  24925. "type": "number"
  24926. },
  24927. "sessionID": {
  24928. "type": "string",
  24929. "pattern": "^ses"
  24930. },
  24931. "assistantMessageID": {
  24932. "type": "string",
  24933. "pattern": "^msg_"
  24934. },
  24935. "textID": {
  24936. "type": "string"
  24937. }
  24938. },
  24939. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  24940. "additionalProperties": false
  24941. }
  24942. },
  24943. "required": ["type", "id", "seq", "aggregateID", "data"],
  24944. "additionalProperties": false
  24945. }
  24946. },
  24947. "required": ["type", "id", "syncEvent"],
  24948. "additionalProperties": false
  24949. },
  24950. "SyncEventSessionNextTextEnded": {
  24951. "type": "object",
  24952. "properties": {
  24953. "type": {
  24954. "type": "string",
  24955. "enum": ["sync"]
  24956. },
  24957. "id": {
  24958. "type": "string",
  24959. "pattern": "^evt_"
  24960. },
  24961. "syncEvent": {
  24962. "type": "object",
  24963. "properties": {
  24964. "type": {
  24965. "type": "string",
  24966. "enum": ["session.next.text.ended.1"]
  24967. },
  24968. "id": {
  24969. "type": "string",
  24970. "pattern": "^evt_"
  24971. },
  24972. "seq": {
  24973. "type": "number"
  24974. },
  24975. "aggregateID": {
  24976. "type": "string"
  24977. },
  24978. "data": {
  24979. "type": "object",
  24980. "properties": {
  24981. "timestamp": {
  24982. "type": "number"
  24983. },
  24984. "sessionID": {
  24985. "type": "string",
  24986. "pattern": "^ses"
  24987. },
  24988. "assistantMessageID": {
  24989. "type": "string",
  24990. "pattern": "^msg_"
  24991. },
  24992. "textID": {
  24993. "type": "string"
  24994. },
  24995. "text": {
  24996. "type": "string"
  24997. }
  24998. },
  24999. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  25000. "additionalProperties": false
  25001. }
  25002. },
  25003. "required": ["type", "id", "seq", "aggregateID", "data"],
  25004. "additionalProperties": false
  25005. }
  25006. },
  25007. "required": ["type", "id", "syncEvent"],
  25008. "additionalProperties": false
  25009. },
  25010. "SyncEventSessionNextReasoningStarted": {
  25011. "type": "object",
  25012. "properties": {
  25013. "type": {
  25014. "type": "string",
  25015. "enum": ["sync"]
  25016. },
  25017. "id": {
  25018. "type": "string",
  25019. "pattern": "^evt_"
  25020. },
  25021. "syncEvent": {
  25022. "type": "object",
  25023. "properties": {
  25024. "type": {
  25025. "type": "string",
  25026. "enum": ["session.next.reasoning.started.1"]
  25027. },
  25028. "id": {
  25029. "type": "string",
  25030. "pattern": "^evt_"
  25031. },
  25032. "seq": {
  25033. "type": "number"
  25034. },
  25035. "aggregateID": {
  25036. "type": "string"
  25037. },
  25038. "data": {
  25039. "type": "object",
  25040. "properties": {
  25041. "timestamp": {
  25042. "type": "number"
  25043. },
  25044. "sessionID": {
  25045. "type": "string",
  25046. "pattern": "^ses"
  25047. },
  25048. "assistantMessageID": {
  25049. "type": "string",
  25050. "pattern": "^msg_"
  25051. },
  25052. "reasoningID": {
  25053. "type": "string"
  25054. },
  25055. "providerMetadata": {
  25056. "type": "object",
  25057. "additionalProperties": {
  25058. "type": "object"
  25059. }
  25060. }
  25061. },
  25062. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  25063. "additionalProperties": false
  25064. }
  25065. },
  25066. "required": ["type", "id", "seq", "aggregateID", "data"],
  25067. "additionalProperties": false
  25068. }
  25069. },
  25070. "required": ["type", "id", "syncEvent"],
  25071. "additionalProperties": false
  25072. },
  25073. "SyncEventSessionNextReasoningEnded": {
  25074. "type": "object",
  25075. "properties": {
  25076. "type": {
  25077. "type": "string",
  25078. "enum": ["sync"]
  25079. },
  25080. "id": {
  25081. "type": "string",
  25082. "pattern": "^evt_"
  25083. },
  25084. "syncEvent": {
  25085. "type": "object",
  25086. "properties": {
  25087. "type": {
  25088. "type": "string",
  25089. "enum": ["session.next.reasoning.ended.1"]
  25090. },
  25091. "id": {
  25092. "type": "string",
  25093. "pattern": "^evt_"
  25094. },
  25095. "seq": {
  25096. "type": "number"
  25097. },
  25098. "aggregateID": {
  25099. "type": "string"
  25100. },
  25101. "data": {
  25102. "type": "object",
  25103. "properties": {
  25104. "timestamp": {
  25105. "type": "number"
  25106. },
  25107. "sessionID": {
  25108. "type": "string",
  25109. "pattern": "^ses"
  25110. },
  25111. "assistantMessageID": {
  25112. "type": "string",
  25113. "pattern": "^msg_"
  25114. },
  25115. "reasoningID": {
  25116. "type": "string"
  25117. },
  25118. "text": {
  25119. "type": "string"
  25120. },
  25121. "providerMetadata": {
  25122. "type": "object",
  25123. "additionalProperties": {
  25124. "type": "object"
  25125. }
  25126. }
  25127. },
  25128. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  25129. "additionalProperties": false
  25130. }
  25131. },
  25132. "required": ["type", "id", "seq", "aggregateID", "data"],
  25133. "additionalProperties": false
  25134. }
  25135. },
  25136. "required": ["type", "id", "syncEvent"],
  25137. "additionalProperties": false
  25138. },
  25139. "SyncEventSessionNextToolInputStarted": {
  25140. "type": "object",
  25141. "properties": {
  25142. "type": {
  25143. "type": "string",
  25144. "enum": ["sync"]
  25145. },
  25146. "id": {
  25147. "type": "string",
  25148. "pattern": "^evt_"
  25149. },
  25150. "syncEvent": {
  25151. "type": "object",
  25152. "properties": {
  25153. "type": {
  25154. "type": "string",
  25155. "enum": ["session.next.tool.input.started.1"]
  25156. },
  25157. "id": {
  25158. "type": "string",
  25159. "pattern": "^evt_"
  25160. },
  25161. "seq": {
  25162. "type": "number"
  25163. },
  25164. "aggregateID": {
  25165. "type": "string"
  25166. },
  25167. "data": {
  25168. "type": "object",
  25169. "properties": {
  25170. "timestamp": {
  25171. "type": "number"
  25172. },
  25173. "sessionID": {
  25174. "type": "string",
  25175. "pattern": "^ses"
  25176. },
  25177. "assistantMessageID": {
  25178. "type": "string",
  25179. "pattern": "^msg_"
  25180. },
  25181. "callID": {
  25182. "type": "string"
  25183. },
  25184. "name": {
  25185. "type": "string"
  25186. }
  25187. },
  25188. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  25189. "additionalProperties": false
  25190. }
  25191. },
  25192. "required": ["type", "id", "seq", "aggregateID", "data"],
  25193. "additionalProperties": false
  25194. }
  25195. },
  25196. "required": ["type", "id", "syncEvent"],
  25197. "additionalProperties": false
  25198. },
  25199. "SyncEventSessionNextToolInputEnded": {
  25200. "type": "object",
  25201. "properties": {
  25202. "type": {
  25203. "type": "string",
  25204. "enum": ["sync"]
  25205. },
  25206. "id": {
  25207. "type": "string",
  25208. "pattern": "^evt_"
  25209. },
  25210. "syncEvent": {
  25211. "type": "object",
  25212. "properties": {
  25213. "type": {
  25214. "type": "string",
  25215. "enum": ["session.next.tool.input.ended.1"]
  25216. },
  25217. "id": {
  25218. "type": "string",
  25219. "pattern": "^evt_"
  25220. },
  25221. "seq": {
  25222. "type": "number"
  25223. },
  25224. "aggregateID": {
  25225. "type": "string"
  25226. },
  25227. "data": {
  25228. "type": "object",
  25229. "properties": {
  25230. "timestamp": {
  25231. "type": "number"
  25232. },
  25233. "sessionID": {
  25234. "type": "string",
  25235. "pattern": "^ses"
  25236. },
  25237. "assistantMessageID": {
  25238. "type": "string",
  25239. "pattern": "^msg_"
  25240. },
  25241. "callID": {
  25242. "type": "string"
  25243. },
  25244. "text": {
  25245. "type": "string"
  25246. }
  25247. },
  25248. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  25249. "additionalProperties": false
  25250. }
  25251. },
  25252. "required": ["type", "id", "seq", "aggregateID", "data"],
  25253. "additionalProperties": false
  25254. }
  25255. },
  25256. "required": ["type", "id", "syncEvent"],
  25257. "additionalProperties": false
  25258. },
  25259. "SyncEventSessionNextToolCalled": {
  25260. "type": "object",
  25261. "properties": {
  25262. "type": {
  25263. "type": "string",
  25264. "enum": ["sync"]
  25265. },
  25266. "id": {
  25267. "type": "string",
  25268. "pattern": "^evt_"
  25269. },
  25270. "syncEvent": {
  25271. "type": "object",
  25272. "properties": {
  25273. "type": {
  25274. "type": "string",
  25275. "enum": ["session.next.tool.called.1"]
  25276. },
  25277. "id": {
  25278. "type": "string",
  25279. "pattern": "^evt_"
  25280. },
  25281. "seq": {
  25282. "type": "number"
  25283. },
  25284. "aggregateID": {
  25285. "type": "string"
  25286. },
  25287. "data": {
  25288. "type": "object",
  25289. "properties": {
  25290. "timestamp": {
  25291. "type": "number"
  25292. },
  25293. "sessionID": {
  25294. "type": "string",
  25295. "pattern": "^ses"
  25296. },
  25297. "assistantMessageID": {
  25298. "type": "string",
  25299. "pattern": "^msg_"
  25300. },
  25301. "callID": {
  25302. "type": "string"
  25303. },
  25304. "tool": {
  25305. "type": "string"
  25306. },
  25307. "input": {
  25308. "type": "object"
  25309. },
  25310. "provider": {
  25311. "type": "object",
  25312. "properties": {
  25313. "executed": {
  25314. "type": "boolean"
  25315. },
  25316. "metadata": {
  25317. "type": "object",
  25318. "additionalProperties": {
  25319. "type": "object"
  25320. }
  25321. }
  25322. },
  25323. "required": ["executed"],
  25324. "additionalProperties": false
  25325. }
  25326. },
  25327. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  25328. "additionalProperties": false
  25329. }
  25330. },
  25331. "required": ["type", "id", "seq", "aggregateID", "data"],
  25332. "additionalProperties": false
  25333. }
  25334. },
  25335. "required": ["type", "id", "syncEvent"],
  25336. "additionalProperties": false
  25337. },
  25338. "SyncEventSessionNextToolProgress": {
  25339. "type": "object",
  25340. "properties": {
  25341. "type": {
  25342. "type": "string",
  25343. "enum": ["sync"]
  25344. },
  25345. "id": {
  25346. "type": "string",
  25347. "pattern": "^evt_"
  25348. },
  25349. "syncEvent": {
  25350. "type": "object",
  25351. "properties": {
  25352. "type": {
  25353. "type": "string",
  25354. "enum": ["session.next.tool.progress.1"]
  25355. },
  25356. "id": {
  25357. "type": "string",
  25358. "pattern": "^evt_"
  25359. },
  25360. "seq": {
  25361. "type": "number"
  25362. },
  25363. "aggregateID": {
  25364. "type": "string"
  25365. },
  25366. "data": {
  25367. "type": "object",
  25368. "properties": {
  25369. "timestamp": {
  25370. "type": "number"
  25371. },
  25372. "sessionID": {
  25373. "type": "string",
  25374. "pattern": "^ses"
  25375. },
  25376. "assistantMessageID": {
  25377. "type": "string",
  25378. "pattern": "^msg_"
  25379. },
  25380. "callID": {
  25381. "type": "string"
  25382. },
  25383. "structured": {
  25384. "type": "object"
  25385. },
  25386. "content": {
  25387. "type": "array",
  25388. "items": {
  25389. "anyOf": [
  25390. {
  25391. "$ref": "#/components/schemas/ToolTextContent"
  25392. },
  25393. {
  25394. "$ref": "#/components/schemas/ToolFileContent"
  25395. }
  25396. ]
  25397. }
  25398. }
  25399. },
  25400. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  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. "SyncEventSessionNextToolSuccess": {
  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.success.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. "structured": {
  25457. "type": "object"
  25458. },
  25459. "content": {
  25460. "type": "array",
  25461. "items": {
  25462. "anyOf": [
  25463. {
  25464. "$ref": "#/components/schemas/ToolTextContent"
  25465. },
  25466. {
  25467. "$ref": "#/components/schemas/ToolFileContent"
  25468. }
  25469. ]
  25470. }
  25471. },
  25472. "outputPaths": {
  25473. "type": "array",
  25474. "items": {
  25475. "type": "string"
  25476. }
  25477. },
  25478. "result": {},
  25479. "provider": {
  25480. "type": "object",
  25481. "properties": {
  25482. "executed": {
  25483. "type": "boolean"
  25484. },
  25485. "metadata": {
  25486. "type": "object",
  25487. "additionalProperties": {
  25488. "type": "object"
  25489. }
  25490. }
  25491. },
  25492. "required": ["executed"],
  25493. "additionalProperties": false
  25494. }
  25495. },
  25496. "required": [
  25497. "timestamp",
  25498. "sessionID",
  25499. "assistantMessageID",
  25500. "callID",
  25501. "structured",
  25502. "content",
  25503. "provider"
  25504. ],
  25505. "additionalProperties": false
  25506. }
  25507. },
  25508. "required": ["type", "id", "seq", "aggregateID", "data"],
  25509. "additionalProperties": false
  25510. }
  25511. },
  25512. "required": ["type", "id", "syncEvent"],
  25513. "additionalProperties": false
  25514. },
  25515. "SyncEventSessionNextToolFailed": {
  25516. "type": "object",
  25517. "properties": {
  25518. "type": {
  25519. "type": "string",
  25520. "enum": ["sync"]
  25521. },
  25522. "id": {
  25523. "type": "string",
  25524. "pattern": "^evt_"
  25525. },
  25526. "syncEvent": {
  25527. "type": "object",
  25528. "properties": {
  25529. "type": {
  25530. "type": "string",
  25531. "enum": ["session.next.tool.failed.1"]
  25532. },
  25533. "id": {
  25534. "type": "string",
  25535. "pattern": "^evt_"
  25536. },
  25537. "seq": {
  25538. "type": "number"
  25539. },
  25540. "aggregateID": {
  25541. "type": "string"
  25542. },
  25543. "data": {
  25544. "type": "object",
  25545. "properties": {
  25546. "timestamp": {
  25547. "type": "number"
  25548. },
  25549. "sessionID": {
  25550. "type": "string",
  25551. "pattern": "^ses"
  25552. },
  25553. "assistantMessageID": {
  25554. "type": "string",
  25555. "pattern": "^msg_"
  25556. },
  25557. "callID": {
  25558. "type": "string"
  25559. },
  25560. "error": {
  25561. "$ref": "#/components/schemas/SessionErrorUnknown"
  25562. },
  25563. "result": {},
  25564. "provider": {
  25565. "type": "object",
  25566. "properties": {
  25567. "executed": {
  25568. "type": "boolean"
  25569. },
  25570. "metadata": {
  25571. "type": "object",
  25572. "additionalProperties": {
  25573. "type": "object"
  25574. }
  25575. }
  25576. },
  25577. "required": ["executed"],
  25578. "additionalProperties": false
  25579. }
  25580. },
  25581. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  25582. "additionalProperties": false
  25583. }
  25584. },
  25585. "required": ["type", "id", "seq", "aggregateID", "data"],
  25586. "additionalProperties": false
  25587. }
  25588. },
  25589. "required": ["type", "id", "syncEvent"],
  25590. "additionalProperties": false
  25591. },
  25592. "SyncEventSessionNextRetried": {
  25593. "type": "object",
  25594. "properties": {
  25595. "type": {
  25596. "type": "string",
  25597. "enum": ["sync"]
  25598. },
  25599. "id": {
  25600. "type": "string",
  25601. "pattern": "^evt_"
  25602. },
  25603. "syncEvent": {
  25604. "type": "object",
  25605. "properties": {
  25606. "type": {
  25607. "type": "string",
  25608. "enum": ["session.next.retried.1"]
  25609. },
  25610. "id": {
  25611. "type": "string",
  25612. "pattern": "^evt_"
  25613. },
  25614. "seq": {
  25615. "type": "number"
  25616. },
  25617. "aggregateID": {
  25618. "type": "string"
  25619. },
  25620. "data": {
  25621. "type": "object",
  25622. "properties": {
  25623. "timestamp": {
  25624. "type": "number"
  25625. },
  25626. "sessionID": {
  25627. "type": "string",
  25628. "pattern": "^ses"
  25629. },
  25630. "attempt": {
  25631. "type": "number"
  25632. },
  25633. "error": {
  25634. "$ref": "#/components/schemas/SessionNextRetry_error"
  25635. }
  25636. },
  25637. "required": ["timestamp", "sessionID", "attempt", "error"],
  25638. "additionalProperties": false
  25639. }
  25640. },
  25641. "required": ["type", "id", "seq", "aggregateID", "data"],
  25642. "additionalProperties": false
  25643. }
  25644. },
  25645. "required": ["type", "id", "syncEvent"],
  25646. "additionalProperties": false
  25647. },
  25648. "SyncEventSessionNextCompactionStarted": {
  25649. "type": "object",
  25650. "properties": {
  25651. "type": {
  25652. "type": "string",
  25653. "enum": ["sync"]
  25654. },
  25655. "id": {
  25656. "type": "string",
  25657. "pattern": "^evt_"
  25658. },
  25659. "syncEvent": {
  25660. "type": "object",
  25661. "properties": {
  25662. "type": {
  25663. "type": "string",
  25664. "enum": ["session.next.compaction.started.1"]
  25665. },
  25666. "id": {
  25667. "type": "string",
  25668. "pattern": "^evt_"
  25669. },
  25670. "seq": {
  25671. "type": "number"
  25672. },
  25673. "aggregateID": {
  25674. "type": "string"
  25675. },
  25676. "data": {
  25677. "type": "object",
  25678. "properties": {
  25679. "timestamp": {
  25680. "type": "number"
  25681. },
  25682. "sessionID": {
  25683. "type": "string",
  25684. "pattern": "^ses"
  25685. },
  25686. "messageID": {
  25687. "type": "string",
  25688. "pattern": "^msg_"
  25689. },
  25690. "reason": {
  25691. "type": "string",
  25692. "enum": ["auto", "manual"]
  25693. }
  25694. },
  25695. "required": ["timestamp", "sessionID", "messageID", "reason"],
  25696. "additionalProperties": false
  25697. }
  25698. },
  25699. "required": ["type", "id", "seq", "aggregateID", "data"],
  25700. "additionalProperties": false
  25701. }
  25702. },
  25703. "required": ["type", "id", "syncEvent"],
  25704. "additionalProperties": false
  25705. },
  25706. "SyncEventSessionNextCompactionEnded": {
  25707. "type": "object",
  25708. "properties": {
  25709. "type": {
  25710. "type": "string",
  25711. "enum": ["sync"]
  25712. },
  25713. "id": {
  25714. "type": "string",
  25715. "pattern": "^evt_"
  25716. },
  25717. "syncEvent": {
  25718. "type": "object",
  25719. "properties": {
  25720. "type": {
  25721. "type": "string",
  25722. "enum": ["session.next.compaction.ended.1"]
  25723. },
  25724. "id": {
  25725. "type": "string",
  25726. "pattern": "^evt_"
  25727. },
  25728. "seq": {
  25729. "type": "number"
  25730. },
  25731. "aggregateID": {
  25732. "type": "string"
  25733. },
  25734. "data": {
  25735. "type": "object",
  25736. "properties": {
  25737. "timestamp": {
  25738. "type": "number"
  25739. },
  25740. "sessionID": {
  25741. "type": "string",
  25742. "pattern": "^ses"
  25743. },
  25744. "messageID": {
  25745. "type": "string",
  25746. "pattern": "^msg_"
  25747. },
  25748. "reason": {
  25749. "type": "string",
  25750. "enum": ["auto", "manual"]
  25751. },
  25752. "text": {
  25753. "type": "string"
  25754. },
  25755. "recent": {
  25756. "type": "string"
  25757. }
  25758. },
  25759. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  25760. "additionalProperties": false
  25761. }
  25762. },
  25763. "required": ["type", "id", "seq", "aggregateID", "data"],
  25764. "additionalProperties": false
  25765. }
  25766. },
  25767. "required": ["type", "id", "syncEvent"],
  25768. "additionalProperties": false
  25769. },
  25770. "ConfigV2ReferenceGit": {
  25771. "type": "object",
  25772. "properties": {
  25773. "repository": {
  25774. "type": "string"
  25775. },
  25776. "branch": {
  25777. "type": "string"
  25778. },
  25779. "description": {
  25780. "type": "string"
  25781. },
  25782. "hidden": {
  25783. "type": "boolean"
  25784. }
  25785. },
  25786. "required": ["repository"],
  25787. "additionalProperties": false
  25788. },
  25789. "ConfigV2ReferenceLocal": {
  25790. "type": "object",
  25791. "properties": {
  25792. "path": {
  25793. "type": "string"
  25794. },
  25795. "description": {
  25796. "type": "string"
  25797. },
  25798. "hidden": {
  25799. "type": "boolean"
  25800. }
  25801. },
  25802. "required": ["path"],
  25803. "additionalProperties": false
  25804. },
  25805. "PolicyEffect": {
  25806. "type": "string",
  25807. "enum": ["allow", "deny"]
  25808. },
  25809. "ConfigV2ExperimentalPolicy": {
  25810. "type": "object",
  25811. "properties": {
  25812. "action": {
  25813. "type": "string",
  25814. "enum": ["provider.use"]
  25815. },
  25816. "effect": {
  25817. "$ref": "#/components/schemas/PolicyEffect"
  25818. },
  25819. "resource": {
  25820. "type": "string"
  25821. }
  25822. },
  25823. "required": ["action", "effect", "resource"],
  25824. "additionalProperties": false
  25825. },
  25826. "ProjectDirectories": {
  25827. "type": "array",
  25828. "items": {
  25829. "type": "object",
  25830. "properties": {
  25831. "directory": {
  25832. "type": "string"
  25833. },
  25834. "strategy": {
  25835. "type": "string"
  25836. }
  25837. },
  25838. "required": ["directory"],
  25839. "additionalProperties": false
  25840. }
  25841. },
  25842. "LocationInfo": {
  25843. "type": "object",
  25844. "properties": {
  25845. "directory": {
  25846. "type": "string"
  25847. },
  25848. "workspaceID": {
  25849. "type": "string",
  25850. "pattern": "^wrk"
  25851. },
  25852. "project": {
  25853. "type": "object",
  25854. "properties": {
  25855. "id": {
  25856. "type": "string"
  25857. },
  25858. "directory": {
  25859. "type": "string"
  25860. }
  25861. },
  25862. "required": ["id", "directory"],
  25863. "additionalProperties": false
  25864. }
  25865. },
  25866. "required": ["directory", "project"],
  25867. "additionalProperties": false
  25868. },
  25869. "PermissionV2Effect": {
  25870. "type": "string",
  25871. "enum": ["allow", "deny", "ask"]
  25872. },
  25873. "PermissionV2Rule": {
  25874. "type": "object",
  25875. "properties": {
  25876. "action": {
  25877. "type": "string"
  25878. },
  25879. "resource": {
  25880. "type": "string"
  25881. },
  25882. "effect": {
  25883. "$ref": "#/components/schemas/PermissionV2Effect"
  25884. }
  25885. },
  25886. "required": ["action", "resource", "effect"],
  25887. "additionalProperties": false
  25888. },
  25889. "PermissionV2Ruleset": {
  25890. "type": "array",
  25891. "items": {
  25892. "$ref": "#/components/schemas/PermissionV2Rule"
  25893. }
  25894. },
  25895. "AgentV2Info": {
  25896. "type": "object",
  25897. "properties": {
  25898. "id": {
  25899. "type": "string"
  25900. },
  25901. "model": {
  25902. "type": "object",
  25903. "properties": {
  25904. "id": {
  25905. "type": "string"
  25906. },
  25907. "providerID": {
  25908. "type": "string"
  25909. },
  25910. "variant": {
  25911. "type": "string"
  25912. }
  25913. },
  25914. "required": ["id", "providerID"],
  25915. "additionalProperties": false
  25916. },
  25917. "request": {
  25918. "type": "object",
  25919. "properties": {
  25920. "headers": {
  25921. "type": "object",
  25922. "additionalProperties": {
  25923. "type": "string"
  25924. }
  25925. },
  25926. "body": {
  25927. "type": "object"
  25928. }
  25929. },
  25930. "required": ["headers", "body"],
  25931. "additionalProperties": false
  25932. },
  25933. "system": {
  25934. "type": "string"
  25935. },
  25936. "description": {
  25937. "type": "string"
  25938. },
  25939. "mode": {
  25940. "type": "string",
  25941. "enum": ["subagent", "primary", "all"]
  25942. },
  25943. "hidden": {
  25944. "type": "boolean"
  25945. },
  25946. "color": {
  25947. "anyOf": [
  25948. {
  25949. "type": "string",
  25950. "pattern": "^#[0-9a-fA-F]{6}$"
  25951. },
  25952. {
  25953. "type": "string",
  25954. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  25955. }
  25956. ]
  25957. },
  25958. "steps": {
  25959. "type": "integer",
  25960. "exclusiveMinimum": 0
  25961. },
  25962. "permissions": {
  25963. "$ref": "#/components/schemas/PermissionV2Ruleset"
  25964. }
  25965. },
  25966. "required": ["id", "request", "mode", "hidden", "permissions"],
  25967. "additionalProperties": false
  25968. },
  25969. "SessionV2Info": {
  25970. "type": "object",
  25971. "properties": {
  25972. "id": {
  25973. "type": "string",
  25974. "pattern": "^ses"
  25975. },
  25976. "parentID": {
  25977. "type": "string",
  25978. "pattern": "^ses"
  25979. },
  25980. "projectID": {
  25981. "type": "string"
  25982. },
  25983. "agent": {
  25984. "type": "string"
  25985. },
  25986. "model": {
  25987. "type": "object",
  25988. "properties": {
  25989. "id": {
  25990. "type": "string"
  25991. },
  25992. "providerID": {
  25993. "type": "string"
  25994. },
  25995. "variant": {
  25996. "type": "string"
  25997. }
  25998. },
  25999. "required": ["id", "providerID"],
  26000. "additionalProperties": false
  26001. },
  26002. "cost": {
  26003. "type": "number"
  26004. },
  26005. "tokens": {
  26006. "type": "object",
  26007. "properties": {
  26008. "input": {
  26009. "type": "number"
  26010. },
  26011. "output": {
  26012. "type": "number"
  26013. },
  26014. "reasoning": {
  26015. "type": "number"
  26016. },
  26017. "cache": {
  26018. "type": "object",
  26019. "properties": {
  26020. "read": {
  26021. "type": "number"
  26022. },
  26023. "write": {
  26024. "type": "number"
  26025. }
  26026. },
  26027. "required": ["read", "write"],
  26028. "additionalProperties": false
  26029. }
  26030. },
  26031. "required": ["input", "output", "reasoning", "cache"],
  26032. "additionalProperties": false
  26033. },
  26034. "time": {
  26035. "type": "object",
  26036. "properties": {
  26037. "created": {
  26038. "type": "number"
  26039. },
  26040. "updated": {
  26041. "type": "number"
  26042. },
  26043. "archived": {
  26044. "type": "number"
  26045. }
  26046. },
  26047. "required": ["created", "updated"],
  26048. "additionalProperties": false
  26049. },
  26050. "title": {
  26051. "type": "string"
  26052. },
  26053. "location": {
  26054. "$ref": "#/components/schemas/LocationRef"
  26055. },
  26056. "subpath": {
  26057. "type": "string"
  26058. }
  26059. },
  26060. "required": ["id", "projectID", "cost", "tokens", "time", "title", "location"],
  26061. "additionalProperties": false
  26062. },
  26063. "SessionInputAdmitted": {
  26064. "type": "object",
  26065. "properties": {
  26066. "admittedSeq": {
  26067. "type": "integer",
  26068. "minimum": 0
  26069. },
  26070. "id": {
  26071. "type": "string",
  26072. "pattern": "^msg_"
  26073. },
  26074. "sessionID": {
  26075. "type": "string",
  26076. "pattern": "^ses"
  26077. },
  26078. "prompt": {
  26079. "$ref": "#/components/schemas/Prompt"
  26080. },
  26081. "delivery": {
  26082. "type": "string",
  26083. "enum": ["steer", "queue"]
  26084. },
  26085. "timeCreated": {
  26086. "type": "number"
  26087. },
  26088. "promotedSeq": {
  26089. "type": "integer",
  26090. "minimum": 0
  26091. }
  26092. },
  26093. "required": ["admittedSeq", "id", "sessionID", "prompt", "delivery", "timeCreated"],
  26094. "additionalProperties": false
  26095. },
  26096. "SessionMessageAgentSwitched": {
  26097. "type": "object",
  26098. "properties": {
  26099. "id": {
  26100. "type": "string",
  26101. "pattern": "^msg_"
  26102. },
  26103. "metadata": {
  26104. "type": "object"
  26105. },
  26106. "time": {
  26107. "type": "object",
  26108. "properties": {
  26109. "created": {
  26110. "type": "number"
  26111. }
  26112. },
  26113. "required": ["created"],
  26114. "additionalProperties": false
  26115. },
  26116. "type": {
  26117. "type": "string",
  26118. "enum": ["agent-switched"]
  26119. },
  26120. "agent": {
  26121. "type": "string"
  26122. }
  26123. },
  26124. "required": ["id", "time", "type", "agent"],
  26125. "additionalProperties": false
  26126. },
  26127. "SessionMessageModelSwitched": {
  26128. "type": "object",
  26129. "properties": {
  26130. "id": {
  26131. "type": "string",
  26132. "pattern": "^msg_"
  26133. },
  26134. "metadata": {
  26135. "type": "object"
  26136. },
  26137. "time": {
  26138. "type": "object",
  26139. "properties": {
  26140. "created": {
  26141. "type": "number"
  26142. }
  26143. },
  26144. "required": ["created"],
  26145. "additionalProperties": false
  26146. },
  26147. "type": {
  26148. "type": "string",
  26149. "enum": ["model-switched"]
  26150. },
  26151. "model": {
  26152. "type": "object",
  26153. "properties": {
  26154. "id": {
  26155. "type": "string"
  26156. },
  26157. "providerID": {
  26158. "type": "string"
  26159. },
  26160. "variant": {
  26161. "type": "string"
  26162. }
  26163. },
  26164. "required": ["id", "providerID"],
  26165. "additionalProperties": false
  26166. }
  26167. },
  26168. "required": ["id", "time", "type", "model"],
  26169. "additionalProperties": false
  26170. },
  26171. "SessionMessageUser": {
  26172. "type": "object",
  26173. "properties": {
  26174. "id": {
  26175. "type": "string",
  26176. "pattern": "^msg_"
  26177. },
  26178. "metadata": {
  26179. "type": "object"
  26180. },
  26181. "time": {
  26182. "type": "object",
  26183. "properties": {
  26184. "created": {
  26185. "type": "number"
  26186. }
  26187. },
  26188. "required": ["created"],
  26189. "additionalProperties": false
  26190. },
  26191. "text": {
  26192. "type": "string"
  26193. },
  26194. "files": {
  26195. "type": "array",
  26196. "items": {
  26197. "$ref": "#/components/schemas/PromptFileAttachment"
  26198. }
  26199. },
  26200. "agents": {
  26201. "type": "array",
  26202. "items": {
  26203. "$ref": "#/components/schemas/PromptAgentAttachment"
  26204. }
  26205. },
  26206. "type": {
  26207. "type": "string",
  26208. "enum": ["user"]
  26209. }
  26210. },
  26211. "required": ["id", "time", "text", "type"],
  26212. "additionalProperties": false
  26213. },
  26214. "SessionMessageSynthetic": {
  26215. "type": "object",
  26216. "properties": {
  26217. "id": {
  26218. "type": "string",
  26219. "pattern": "^msg_"
  26220. },
  26221. "metadata": {
  26222. "type": "object"
  26223. },
  26224. "time": {
  26225. "type": "object",
  26226. "properties": {
  26227. "created": {
  26228. "type": "number"
  26229. }
  26230. },
  26231. "required": ["created"],
  26232. "additionalProperties": false
  26233. },
  26234. "sessionID": {
  26235. "type": "string",
  26236. "pattern": "^ses"
  26237. },
  26238. "text": {
  26239. "type": "string"
  26240. },
  26241. "type": {
  26242. "type": "string",
  26243. "enum": ["synthetic"]
  26244. }
  26245. },
  26246. "required": ["id", "time", "sessionID", "text", "type"],
  26247. "additionalProperties": false
  26248. },
  26249. "SessionMessageSystem": {
  26250. "type": "object",
  26251. "properties": {
  26252. "id": {
  26253. "type": "string",
  26254. "pattern": "^msg_"
  26255. },
  26256. "metadata": {
  26257. "type": "object"
  26258. },
  26259. "time": {
  26260. "type": "object",
  26261. "properties": {
  26262. "created": {
  26263. "type": "number"
  26264. }
  26265. },
  26266. "required": ["created"],
  26267. "additionalProperties": false
  26268. },
  26269. "type": {
  26270. "type": "string",
  26271. "enum": ["system"]
  26272. },
  26273. "text": {
  26274. "type": "string"
  26275. }
  26276. },
  26277. "required": ["id", "time", "type", "text"],
  26278. "additionalProperties": false
  26279. },
  26280. "SessionMessageShell": {
  26281. "type": "object",
  26282. "properties": {
  26283. "id": {
  26284. "type": "string",
  26285. "pattern": "^msg_"
  26286. },
  26287. "metadata": {
  26288. "type": "object"
  26289. },
  26290. "time": {
  26291. "type": "object",
  26292. "properties": {
  26293. "created": {
  26294. "type": "number"
  26295. },
  26296. "completed": {
  26297. "type": "number"
  26298. }
  26299. },
  26300. "required": ["created"],
  26301. "additionalProperties": false
  26302. },
  26303. "type": {
  26304. "type": "string",
  26305. "enum": ["shell"]
  26306. },
  26307. "callID": {
  26308. "type": "string"
  26309. },
  26310. "command": {
  26311. "type": "string"
  26312. },
  26313. "output": {
  26314. "type": "string"
  26315. }
  26316. },
  26317. "required": ["id", "time", "type", "callID", "command", "output"],
  26318. "additionalProperties": false
  26319. },
  26320. "SessionMessageAssistantText": {
  26321. "type": "object",
  26322. "properties": {
  26323. "type": {
  26324. "type": "string",
  26325. "enum": ["text"]
  26326. },
  26327. "id": {
  26328. "type": "string"
  26329. },
  26330. "text": {
  26331. "type": "string"
  26332. }
  26333. },
  26334. "required": ["type", "id", "text"],
  26335. "additionalProperties": false
  26336. },
  26337. "SessionMessageAssistantReasoning": {
  26338. "type": "object",
  26339. "properties": {
  26340. "type": {
  26341. "type": "string",
  26342. "enum": ["reasoning"]
  26343. },
  26344. "id": {
  26345. "type": "string"
  26346. },
  26347. "text": {
  26348. "type": "string"
  26349. },
  26350. "providerMetadata": {
  26351. "type": "object",
  26352. "additionalProperties": {
  26353. "type": "object"
  26354. }
  26355. }
  26356. },
  26357. "required": ["type", "id", "text"],
  26358. "additionalProperties": false
  26359. },
  26360. "SessionMessageToolStatePending": {
  26361. "type": "object",
  26362. "properties": {
  26363. "status": {
  26364. "type": "string",
  26365. "enum": ["pending"]
  26366. },
  26367. "input": {
  26368. "type": "string"
  26369. }
  26370. },
  26371. "required": ["status", "input"],
  26372. "additionalProperties": false
  26373. },
  26374. "SessionMessageToolStateRunning": {
  26375. "type": "object",
  26376. "properties": {
  26377. "status": {
  26378. "type": "string",
  26379. "enum": ["running"]
  26380. },
  26381. "input": {
  26382. "type": "object"
  26383. },
  26384. "structured": {
  26385. "type": "object"
  26386. },
  26387. "content": {
  26388. "type": "array",
  26389. "items": {
  26390. "anyOf": [
  26391. {
  26392. "$ref": "#/components/schemas/ToolTextContent"
  26393. },
  26394. {
  26395. "$ref": "#/components/schemas/ToolFileContent"
  26396. }
  26397. ]
  26398. }
  26399. }
  26400. },
  26401. "required": ["status", "input", "structured", "content"],
  26402. "additionalProperties": false
  26403. },
  26404. "SessionMessageToolStateCompleted": {
  26405. "type": "object",
  26406. "properties": {
  26407. "status": {
  26408. "type": "string",
  26409. "enum": ["completed"]
  26410. },
  26411. "input": {
  26412. "type": "object"
  26413. },
  26414. "attachments": {
  26415. "type": "array",
  26416. "items": {
  26417. "$ref": "#/components/schemas/PromptFileAttachment"
  26418. }
  26419. },
  26420. "content": {
  26421. "type": "array",
  26422. "items": {
  26423. "anyOf": [
  26424. {
  26425. "$ref": "#/components/schemas/ToolTextContent"
  26426. },
  26427. {
  26428. "$ref": "#/components/schemas/ToolFileContent"
  26429. }
  26430. ]
  26431. }
  26432. },
  26433. "outputPaths": {
  26434. "type": "array",
  26435. "items": {
  26436. "type": "string"
  26437. }
  26438. },
  26439. "structured": {
  26440. "type": "object"
  26441. },
  26442. "result": {}
  26443. },
  26444. "required": ["status", "input", "content", "structured"],
  26445. "additionalProperties": false
  26446. },
  26447. "SessionMessageToolStateError": {
  26448. "type": "object",
  26449. "properties": {
  26450. "status": {
  26451. "type": "string",
  26452. "enum": ["error"]
  26453. },
  26454. "input": {
  26455. "type": "object"
  26456. },
  26457. "content": {
  26458. "type": "array",
  26459. "items": {
  26460. "anyOf": [
  26461. {
  26462. "$ref": "#/components/schemas/ToolTextContent"
  26463. },
  26464. {
  26465. "$ref": "#/components/schemas/ToolFileContent"
  26466. }
  26467. ]
  26468. }
  26469. },
  26470. "structured": {
  26471. "type": "object"
  26472. },
  26473. "error": {
  26474. "$ref": "#/components/schemas/SessionErrorUnknown"
  26475. },
  26476. "result": {}
  26477. },
  26478. "required": ["status", "input", "content", "structured", "error"],
  26479. "additionalProperties": false
  26480. },
  26481. "SessionMessageAssistantTool": {
  26482. "type": "object",
  26483. "properties": {
  26484. "type": {
  26485. "type": "string",
  26486. "enum": ["tool"]
  26487. },
  26488. "id": {
  26489. "type": "string"
  26490. },
  26491. "name": {
  26492. "type": "string"
  26493. },
  26494. "provider": {
  26495. "type": "object",
  26496. "properties": {
  26497. "executed": {
  26498. "type": "boolean"
  26499. },
  26500. "metadata": {
  26501. "type": "object",
  26502. "additionalProperties": {
  26503. "type": "object"
  26504. }
  26505. },
  26506. "resultMetadata": {
  26507. "type": "object",
  26508. "additionalProperties": {
  26509. "type": "object"
  26510. }
  26511. }
  26512. },
  26513. "required": ["executed"],
  26514. "additionalProperties": false
  26515. },
  26516. "state": {
  26517. "anyOf": [
  26518. {
  26519. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  26520. },
  26521. {
  26522. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  26523. },
  26524. {
  26525. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  26526. },
  26527. {
  26528. "$ref": "#/components/schemas/SessionMessageToolStateError"
  26529. }
  26530. ]
  26531. },
  26532. "time": {
  26533. "type": "object",
  26534. "properties": {
  26535. "created": {
  26536. "type": "number"
  26537. },
  26538. "ran": {
  26539. "type": "number"
  26540. },
  26541. "completed": {
  26542. "type": "number"
  26543. },
  26544. "pruned": {
  26545. "type": "number"
  26546. }
  26547. },
  26548. "required": ["created"],
  26549. "additionalProperties": false
  26550. }
  26551. },
  26552. "required": ["type", "id", "name", "state", "time"],
  26553. "additionalProperties": false
  26554. },
  26555. "SessionMessageAssistant": {
  26556. "type": "object",
  26557. "properties": {
  26558. "id": {
  26559. "type": "string",
  26560. "pattern": "^msg_"
  26561. },
  26562. "metadata": {
  26563. "type": "object"
  26564. },
  26565. "time": {
  26566. "type": "object",
  26567. "properties": {
  26568. "created": {
  26569. "type": "number"
  26570. },
  26571. "completed": {
  26572. "type": "number"
  26573. }
  26574. },
  26575. "required": ["created"],
  26576. "additionalProperties": false
  26577. },
  26578. "type": {
  26579. "type": "string",
  26580. "enum": ["assistant"]
  26581. },
  26582. "agent": {
  26583. "type": "string"
  26584. },
  26585. "model": {
  26586. "type": "object",
  26587. "properties": {
  26588. "id": {
  26589. "type": "string"
  26590. },
  26591. "providerID": {
  26592. "type": "string"
  26593. },
  26594. "variant": {
  26595. "type": "string"
  26596. }
  26597. },
  26598. "required": ["id", "providerID"],
  26599. "additionalProperties": false
  26600. },
  26601. "content": {
  26602. "type": "array",
  26603. "items": {
  26604. "anyOf": [
  26605. {
  26606. "$ref": "#/components/schemas/SessionMessageAssistantText"
  26607. },
  26608. {
  26609. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  26610. },
  26611. {
  26612. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  26613. }
  26614. ]
  26615. }
  26616. },
  26617. "snapshot": {
  26618. "type": "object",
  26619. "properties": {
  26620. "start": {
  26621. "type": "string"
  26622. },
  26623. "end": {
  26624. "type": "string"
  26625. }
  26626. },
  26627. "additionalProperties": false
  26628. },
  26629. "finish": {
  26630. "type": "string"
  26631. },
  26632. "cost": {
  26633. "type": "number"
  26634. },
  26635. "tokens": {
  26636. "type": "object",
  26637. "properties": {
  26638. "input": {
  26639. "type": "number"
  26640. },
  26641. "output": {
  26642. "type": "number"
  26643. },
  26644. "reasoning": {
  26645. "type": "number"
  26646. },
  26647. "cache": {
  26648. "type": "object",
  26649. "properties": {
  26650. "read": {
  26651. "type": "number"
  26652. },
  26653. "write": {
  26654. "type": "number"
  26655. }
  26656. },
  26657. "required": ["read", "write"],
  26658. "additionalProperties": false
  26659. }
  26660. },
  26661. "required": ["input", "output", "reasoning", "cache"],
  26662. "additionalProperties": false
  26663. },
  26664. "error": {
  26665. "$ref": "#/components/schemas/SessionErrorUnknown"
  26666. }
  26667. },
  26668. "required": ["id", "time", "type", "agent", "model", "content"],
  26669. "additionalProperties": false
  26670. },
  26671. "SessionMessageCompaction": {
  26672. "type": "object",
  26673. "properties": {
  26674. "type": {
  26675. "type": "string",
  26676. "enum": ["compaction"]
  26677. },
  26678. "reason": {
  26679. "type": "string",
  26680. "enum": ["auto", "manual"]
  26681. },
  26682. "summary": {
  26683. "type": "string"
  26684. },
  26685. "recent": {
  26686. "type": "string"
  26687. },
  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. },
  26702. "required": ["created"],
  26703. "additionalProperties": false
  26704. }
  26705. },
  26706. "required": ["type", "reason", "summary", "recent", "id", "time"],
  26707. "additionalProperties": false
  26708. },
  26709. "SessionMessage": {
  26710. "anyOf": [
  26711. {
  26712. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  26713. },
  26714. {
  26715. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  26716. },
  26717. {
  26718. "$ref": "#/components/schemas/SessionMessageUser"
  26719. },
  26720. {
  26721. "$ref": "#/components/schemas/SessionMessageSynthetic"
  26722. },
  26723. {
  26724. "$ref": "#/components/schemas/SessionMessageSystem"
  26725. },
  26726. {
  26727. "$ref": "#/components/schemas/SessionMessageShell"
  26728. },
  26729. {
  26730. "$ref": "#/components/schemas/SessionMessageAssistant"
  26731. },
  26732. {
  26733. "$ref": "#/components/schemas/SessionMessageCompaction"
  26734. }
  26735. ]
  26736. },
  26737. "ModelV2Info": {
  26738. "type": "object",
  26739. "properties": {
  26740. "id": {
  26741. "type": "string"
  26742. },
  26743. "providerID": {
  26744. "type": "string"
  26745. },
  26746. "family": {
  26747. "type": "string"
  26748. },
  26749. "name": {
  26750. "type": "string"
  26751. },
  26752. "api": {
  26753. "anyOf": [
  26754. {
  26755. "type": "object",
  26756. "properties": {
  26757. "id": {
  26758. "type": "string"
  26759. },
  26760. "type": {
  26761. "type": "string",
  26762. "enum": ["aisdk"]
  26763. },
  26764. "package": {
  26765. "type": "string"
  26766. },
  26767. "url": {
  26768. "type": "string"
  26769. },
  26770. "settings": {
  26771. "type": "object"
  26772. }
  26773. },
  26774. "required": ["id", "type", "package"],
  26775. "additionalProperties": false
  26776. },
  26777. {
  26778. "type": "object",
  26779. "properties": {
  26780. "id": {
  26781. "type": "string"
  26782. },
  26783. "type": {
  26784. "type": "string",
  26785. "enum": ["native"]
  26786. },
  26787. "url": {
  26788. "type": "string"
  26789. },
  26790. "settings": {
  26791. "type": "object"
  26792. }
  26793. },
  26794. "required": ["id", "type", "settings"],
  26795. "additionalProperties": false
  26796. }
  26797. ]
  26798. },
  26799. "capabilities": {
  26800. "type": "object",
  26801. "properties": {
  26802. "tools": {
  26803. "type": "boolean"
  26804. },
  26805. "input": {
  26806. "type": "array",
  26807. "items": {
  26808. "type": "string"
  26809. }
  26810. },
  26811. "output": {
  26812. "type": "array",
  26813. "items": {
  26814. "type": "string"
  26815. }
  26816. }
  26817. },
  26818. "required": ["tools", "input", "output"],
  26819. "additionalProperties": false
  26820. },
  26821. "request": {
  26822. "type": "object",
  26823. "properties": {
  26824. "headers": {
  26825. "type": "object",
  26826. "additionalProperties": {
  26827. "type": "string"
  26828. }
  26829. },
  26830. "body": {
  26831. "type": "object"
  26832. },
  26833. "variant": {
  26834. "type": "string"
  26835. }
  26836. },
  26837. "required": ["headers", "body"],
  26838. "additionalProperties": false
  26839. },
  26840. "variants": {
  26841. "type": "array",
  26842. "items": {
  26843. "type": "object",
  26844. "properties": {
  26845. "id": {
  26846. "type": "string"
  26847. },
  26848. "headers": {
  26849. "type": "object",
  26850. "additionalProperties": {
  26851. "type": "string"
  26852. }
  26853. },
  26854. "body": {
  26855. "type": "object"
  26856. }
  26857. },
  26858. "required": ["id", "headers", "body"],
  26859. "additionalProperties": false
  26860. }
  26861. },
  26862. "time": {
  26863. "type": "object",
  26864. "properties": {
  26865. "released": {
  26866. "type": "number"
  26867. }
  26868. },
  26869. "required": ["released"],
  26870. "additionalProperties": false
  26871. },
  26872. "cost": {
  26873. "type": "array",
  26874. "items": {
  26875. "type": "object",
  26876. "properties": {
  26877. "tier": {
  26878. "type": "object",
  26879. "properties": {
  26880. "type": {
  26881. "type": "string",
  26882. "enum": ["context"]
  26883. },
  26884. "size": {
  26885. "type": "integer"
  26886. }
  26887. },
  26888. "required": ["type", "size"],
  26889. "additionalProperties": false
  26890. },
  26891. "input": {
  26892. "type": "number"
  26893. },
  26894. "output": {
  26895. "type": "number"
  26896. },
  26897. "cache": {
  26898. "type": "object",
  26899. "properties": {
  26900. "read": {
  26901. "type": "number"
  26902. },
  26903. "write": {
  26904. "type": "number"
  26905. }
  26906. },
  26907. "required": ["read", "write"],
  26908. "additionalProperties": false
  26909. }
  26910. },
  26911. "required": ["input", "output", "cache"],
  26912. "additionalProperties": false
  26913. }
  26914. },
  26915. "status": {
  26916. "type": "string",
  26917. "enum": ["alpha", "beta", "deprecated", "active"]
  26918. },
  26919. "enabled": {
  26920. "type": "boolean"
  26921. },
  26922. "limit": {
  26923. "type": "object",
  26924. "properties": {
  26925. "context": {
  26926. "type": "integer"
  26927. },
  26928. "input": {
  26929. "type": "integer"
  26930. },
  26931. "output": {
  26932. "type": "integer"
  26933. }
  26934. },
  26935. "required": ["context", "output"],
  26936. "additionalProperties": false
  26937. }
  26938. },
  26939. "required": [
  26940. "id",
  26941. "providerID",
  26942. "name",
  26943. "api",
  26944. "capabilities",
  26945. "request",
  26946. "variants",
  26947. "time",
  26948. "cost",
  26949. "status",
  26950. "enabled",
  26951. "limit"
  26952. ],
  26953. "additionalProperties": false
  26954. },
  26955. "ProviderV2Info": {
  26956. "type": "object",
  26957. "properties": {
  26958. "id": {
  26959. "type": "string"
  26960. },
  26961. "integrationID": {
  26962. "type": "string"
  26963. },
  26964. "name": {
  26965. "type": "string"
  26966. },
  26967. "disabled": {
  26968. "type": "boolean"
  26969. },
  26970. "api": {
  26971. "anyOf": [
  26972. {
  26973. "type": "object",
  26974. "properties": {
  26975. "type": {
  26976. "type": "string",
  26977. "enum": ["aisdk"]
  26978. },
  26979. "package": {
  26980. "type": "string"
  26981. },
  26982. "url": {
  26983. "type": "string"
  26984. },
  26985. "settings": {
  26986. "type": "object"
  26987. }
  26988. },
  26989. "required": ["type", "package"],
  26990. "additionalProperties": false
  26991. },
  26992. {
  26993. "type": "object",
  26994. "properties": {
  26995. "type": {
  26996. "type": "string",
  26997. "enum": ["native"]
  26998. },
  26999. "url": {
  27000. "type": "string"
  27001. },
  27002. "settings": {
  27003. "type": "object"
  27004. }
  27005. },
  27006. "required": ["type", "settings"],
  27007. "additionalProperties": false
  27008. }
  27009. ]
  27010. },
  27011. "request": {
  27012. "type": "object",
  27013. "properties": {
  27014. "headers": {
  27015. "type": "object",
  27016. "additionalProperties": {
  27017. "type": "string"
  27018. }
  27019. },
  27020. "body": {
  27021. "type": "object"
  27022. }
  27023. },
  27024. "required": ["headers", "body"],
  27025. "additionalProperties": false
  27026. }
  27027. },
  27028. "required": ["id", "name", "api", "request"],
  27029. "additionalProperties": false
  27030. },
  27031. "IntegrationWhen": {
  27032. "type": "object",
  27033. "properties": {
  27034. "key": {
  27035. "type": "string"
  27036. },
  27037. "op": {
  27038. "type": "string",
  27039. "enum": ["eq", "neq"]
  27040. },
  27041. "value": {
  27042. "type": "string"
  27043. }
  27044. },
  27045. "required": ["key", "op", "value"],
  27046. "additionalProperties": false
  27047. },
  27048. "IntegrationTextPrompt": {
  27049. "type": "object",
  27050. "properties": {
  27051. "type": {
  27052. "type": "string",
  27053. "enum": ["text"]
  27054. },
  27055. "key": {
  27056. "type": "string"
  27057. },
  27058. "message": {
  27059. "type": "string"
  27060. },
  27061. "placeholder": {
  27062. "type": "string"
  27063. },
  27064. "when": {
  27065. "$ref": "#/components/schemas/IntegrationWhen"
  27066. }
  27067. },
  27068. "required": ["type", "key", "message"],
  27069. "additionalProperties": false
  27070. },
  27071. "IntegrationSelectPrompt": {
  27072. "type": "object",
  27073. "properties": {
  27074. "type": {
  27075. "type": "string",
  27076. "enum": ["select"]
  27077. },
  27078. "key": {
  27079. "type": "string"
  27080. },
  27081. "message": {
  27082. "type": "string"
  27083. },
  27084. "options": {
  27085. "type": "array",
  27086. "items": {
  27087. "type": "object",
  27088. "properties": {
  27089. "label": {
  27090. "type": "string"
  27091. },
  27092. "value": {
  27093. "type": "string"
  27094. },
  27095. "hint": {
  27096. "type": "string"
  27097. }
  27098. },
  27099. "required": ["label", "value"],
  27100. "additionalProperties": false
  27101. }
  27102. },
  27103. "when": {
  27104. "$ref": "#/components/schemas/IntegrationWhen"
  27105. }
  27106. },
  27107. "required": ["type", "key", "message", "options"],
  27108. "additionalProperties": false
  27109. },
  27110. "IntegrationOAuthMethod": {
  27111. "type": "object",
  27112. "properties": {
  27113. "id": {
  27114. "type": "string"
  27115. },
  27116. "type": {
  27117. "type": "string",
  27118. "enum": ["oauth"]
  27119. },
  27120. "label": {
  27121. "type": "string"
  27122. },
  27123. "prompts": {
  27124. "type": "array",
  27125. "items": {
  27126. "anyOf": [
  27127. {
  27128. "$ref": "#/components/schemas/IntegrationTextPrompt"
  27129. },
  27130. {
  27131. "$ref": "#/components/schemas/IntegrationSelectPrompt"
  27132. }
  27133. ]
  27134. }
  27135. }
  27136. },
  27137. "required": ["id", "type", "label"],
  27138. "additionalProperties": false
  27139. },
  27140. "IntegrationKeyMethod": {
  27141. "type": "object",
  27142. "properties": {
  27143. "type": {
  27144. "type": "string",
  27145. "enum": ["key"]
  27146. },
  27147. "label": {
  27148. "type": "string"
  27149. }
  27150. },
  27151. "required": ["type"],
  27152. "additionalProperties": false
  27153. },
  27154. "IntegrationEnvMethod": {
  27155. "type": "object",
  27156. "properties": {
  27157. "type": {
  27158. "type": "string",
  27159. "enum": ["env"]
  27160. },
  27161. "names": {
  27162. "type": "array",
  27163. "items": {
  27164. "type": "string"
  27165. }
  27166. }
  27167. },
  27168. "required": ["type", "names"],
  27169. "additionalProperties": false
  27170. },
  27171. "ConnectionCredentialInfo": {
  27172. "type": "object",
  27173. "properties": {
  27174. "type": {
  27175. "type": "string",
  27176. "enum": ["credential"]
  27177. },
  27178. "id": {
  27179. "type": "string"
  27180. },
  27181. "label": {
  27182. "type": "string"
  27183. }
  27184. },
  27185. "required": ["type", "id", "label"],
  27186. "additionalProperties": false
  27187. },
  27188. "ConnectionEnvInfo": {
  27189. "type": "object",
  27190. "properties": {
  27191. "type": {
  27192. "type": "string",
  27193. "enum": ["env"]
  27194. },
  27195. "name": {
  27196. "type": "string"
  27197. }
  27198. },
  27199. "required": ["type", "name"],
  27200. "additionalProperties": false
  27201. },
  27202. "ConnectionInfo": {
  27203. "anyOf": [
  27204. {
  27205. "$ref": "#/components/schemas/ConnectionCredentialInfo"
  27206. },
  27207. {
  27208. "$ref": "#/components/schemas/ConnectionEnvInfo"
  27209. }
  27210. ]
  27211. },
  27212. "IntegrationInfo": {
  27213. "type": "object",
  27214. "properties": {
  27215. "id": {
  27216. "type": "string"
  27217. },
  27218. "name": {
  27219. "type": "string"
  27220. },
  27221. "methods": {
  27222. "type": "array",
  27223. "items": {
  27224. "$ref": "#/components/schemas/IntegrationMethod"
  27225. }
  27226. },
  27227. "connections": {
  27228. "type": "array",
  27229. "items": {
  27230. "$ref": "#/components/schemas/ConnectionInfo"
  27231. }
  27232. }
  27233. },
  27234. "required": ["id", "name", "methods", "connections"],
  27235. "additionalProperties": false
  27236. },
  27237. "IntegrationAttempt": {
  27238. "type": "object",
  27239. "properties": {
  27240. "attemptID": {
  27241. "type": "string"
  27242. },
  27243. "url": {
  27244. "type": "string"
  27245. },
  27246. "instructions": {
  27247. "type": "string"
  27248. },
  27249. "mode": {
  27250. "type": "string",
  27251. "enum": ["auto", "code"]
  27252. },
  27253. "time": {
  27254. "type": "object",
  27255. "properties": {
  27256. "created": {
  27257. "anyOf": [
  27258. {
  27259. "type": "number"
  27260. },
  27261. {
  27262. "type": "string",
  27263. "enum": ["NaN"]
  27264. },
  27265. {
  27266. "type": "string",
  27267. "enum": ["Infinity"]
  27268. },
  27269. {
  27270. "type": "string",
  27271. "enum": ["-Infinity"]
  27272. },
  27273. {
  27274. "type": "string",
  27275. "enum": ["Infinity", "-Infinity", "NaN"]
  27276. }
  27277. ]
  27278. },
  27279. "expires": {
  27280. "anyOf": [
  27281. {
  27282. "type": "number"
  27283. },
  27284. {
  27285. "type": "string",
  27286. "enum": ["NaN"]
  27287. },
  27288. {
  27289. "type": "string",
  27290. "enum": ["Infinity"]
  27291. },
  27292. {
  27293. "type": "string",
  27294. "enum": ["-Infinity"]
  27295. },
  27296. {
  27297. "type": "string",
  27298. "enum": ["Infinity", "-Infinity", "NaN"]
  27299. }
  27300. ]
  27301. }
  27302. },
  27303. "required": ["created", "expires"],
  27304. "additionalProperties": false
  27305. }
  27306. },
  27307. "required": ["attemptID", "url", "instructions", "mode", "time"],
  27308. "additionalProperties": false
  27309. },
  27310. "PermissionV2Request": {
  27311. "type": "object",
  27312. "properties": {
  27313. "id": {
  27314. "type": "string",
  27315. "pattern": "^per"
  27316. },
  27317. "sessionID": {
  27318. "type": "string",
  27319. "pattern": "^ses"
  27320. },
  27321. "action": {
  27322. "type": "string"
  27323. },
  27324. "resources": {
  27325. "type": "array",
  27326. "items": {
  27327. "type": "string"
  27328. }
  27329. },
  27330. "save": {
  27331. "type": "array",
  27332. "items": {
  27333. "type": "string"
  27334. }
  27335. },
  27336. "metadata": {
  27337. "type": "object"
  27338. },
  27339. "source": {
  27340. "$ref": "#/components/schemas/PermissionV2Source"
  27341. }
  27342. },
  27343. "required": ["id", "sessionID", "action", "resources"],
  27344. "additionalProperties": false
  27345. },
  27346. "PermissionSavedInfo": {
  27347. "type": "object",
  27348. "properties": {
  27349. "id": {
  27350. "type": "string"
  27351. },
  27352. "projectID": {
  27353. "type": "string"
  27354. },
  27355. "action": {
  27356. "type": "string"
  27357. },
  27358. "resource": {
  27359. "type": "string"
  27360. }
  27361. },
  27362. "required": ["id", "projectID", "action", "resource"],
  27363. "additionalProperties": false
  27364. },
  27365. "FileSystemEntry": {
  27366. "type": "object",
  27367. "properties": {
  27368. "path": {
  27369. "type": "string"
  27370. },
  27371. "type": {
  27372. "type": "string",
  27373. "enum": ["file", "directory"]
  27374. }
  27375. },
  27376. "required": ["path", "type"],
  27377. "additionalProperties": false
  27378. },
  27379. "CommandV2Info": {
  27380. "type": "object",
  27381. "properties": {
  27382. "name": {
  27383. "type": "string"
  27384. },
  27385. "template": {
  27386. "type": "string"
  27387. },
  27388. "description": {
  27389. "type": "string"
  27390. },
  27391. "agent": {
  27392. "type": "string"
  27393. },
  27394. "model": {
  27395. "type": "object",
  27396. "properties": {
  27397. "id": {
  27398. "type": "string"
  27399. },
  27400. "providerID": {
  27401. "type": "string"
  27402. },
  27403. "variant": {
  27404. "type": "string"
  27405. }
  27406. },
  27407. "required": ["id", "providerID"],
  27408. "additionalProperties": false
  27409. },
  27410. "subtask": {
  27411. "type": "boolean"
  27412. }
  27413. },
  27414. "required": ["name", "template"],
  27415. "additionalProperties": false
  27416. },
  27417. "SkillV2Info": {
  27418. "type": "object",
  27419. "properties": {
  27420. "name": {
  27421. "type": "string"
  27422. },
  27423. "description": {
  27424. "type": "string"
  27425. },
  27426. "slash": {
  27427. "type": "boolean"
  27428. },
  27429. "location": {
  27430. "type": "string"
  27431. },
  27432. "content": {
  27433. "type": "string"
  27434. }
  27435. },
  27436. "required": ["name", "location", "content"],
  27437. "additionalProperties": false
  27438. },
  27439. "V2EventModels-devRefreshed": {
  27440. "type": "object",
  27441. "properties": {
  27442. "id": {
  27443. "type": "string",
  27444. "pattern": "^evt_"
  27445. },
  27446. "metadata": {
  27447. "type": "object"
  27448. },
  27449. "durable": {
  27450. "type": "object",
  27451. "properties": {
  27452. "aggregateID": {
  27453. "type": "string"
  27454. },
  27455. "seq": {
  27456. "type": "integer"
  27457. },
  27458. "version": {
  27459. "type": "integer"
  27460. }
  27461. },
  27462. "required": ["aggregateID", "seq", "version"],
  27463. "additionalProperties": false
  27464. },
  27465. "location": {
  27466. "$ref": "#/components/schemas/LocationRef"
  27467. },
  27468. "type": {
  27469. "type": "string",
  27470. "enum": ["models-dev.refreshed"]
  27471. },
  27472. "data": {
  27473. "type": "object",
  27474. "properties": {}
  27475. }
  27476. },
  27477. "required": ["id", "type", "data"],
  27478. "additionalProperties": false
  27479. },
  27480. "V2EventIntegrationUpdated": {
  27481. "type": "object",
  27482. "properties": {
  27483. "id": {
  27484. "type": "string",
  27485. "pattern": "^evt_"
  27486. },
  27487. "metadata": {
  27488. "type": "object"
  27489. },
  27490. "durable": {
  27491. "type": "object",
  27492. "properties": {
  27493. "aggregateID": {
  27494. "type": "string"
  27495. },
  27496. "seq": {
  27497. "type": "integer"
  27498. },
  27499. "version": {
  27500. "type": "integer"
  27501. }
  27502. },
  27503. "required": ["aggregateID", "seq", "version"],
  27504. "additionalProperties": false
  27505. },
  27506. "location": {
  27507. "$ref": "#/components/schemas/LocationRef"
  27508. },
  27509. "type": {
  27510. "type": "string",
  27511. "enum": ["integration.updated"]
  27512. },
  27513. "data": {
  27514. "type": "object",
  27515. "properties": {}
  27516. }
  27517. },
  27518. "required": ["id", "type", "data"],
  27519. "additionalProperties": false
  27520. },
  27521. "V2EventIntegrationConnectionUpdated": {
  27522. "type": "object",
  27523. "properties": {
  27524. "id": {
  27525. "type": "string",
  27526. "pattern": "^evt_"
  27527. },
  27528. "metadata": {
  27529. "type": "object"
  27530. },
  27531. "durable": {
  27532. "type": "object",
  27533. "properties": {
  27534. "aggregateID": {
  27535. "type": "string"
  27536. },
  27537. "seq": {
  27538. "type": "integer"
  27539. },
  27540. "version": {
  27541. "type": "integer"
  27542. }
  27543. },
  27544. "required": ["aggregateID", "seq", "version"],
  27545. "additionalProperties": false
  27546. },
  27547. "location": {
  27548. "$ref": "#/components/schemas/LocationRef"
  27549. },
  27550. "type": {
  27551. "type": "string",
  27552. "enum": ["integration.connection.updated"]
  27553. },
  27554. "data": {
  27555. "type": "object",
  27556. "properties": {
  27557. "integrationID": {
  27558. "type": "string"
  27559. }
  27560. },
  27561. "required": ["integrationID"],
  27562. "additionalProperties": false
  27563. }
  27564. },
  27565. "required": ["id", "type", "data"],
  27566. "additionalProperties": false
  27567. },
  27568. "V2EventCatalogUpdated": {
  27569. "type": "object",
  27570. "properties": {
  27571. "id": {
  27572. "type": "string",
  27573. "pattern": "^evt_"
  27574. },
  27575. "metadata": {
  27576. "type": "object"
  27577. },
  27578. "durable": {
  27579. "type": "object",
  27580. "properties": {
  27581. "aggregateID": {
  27582. "type": "string"
  27583. },
  27584. "seq": {
  27585. "type": "integer"
  27586. },
  27587. "version": {
  27588. "type": "integer"
  27589. }
  27590. },
  27591. "required": ["aggregateID", "seq", "version"],
  27592. "additionalProperties": false
  27593. },
  27594. "location": {
  27595. "$ref": "#/components/schemas/LocationRef"
  27596. },
  27597. "type": {
  27598. "type": "string",
  27599. "enum": ["catalog.updated"]
  27600. },
  27601. "data": {
  27602. "type": "object",
  27603. "properties": {}
  27604. }
  27605. },
  27606. "required": ["id", "type", "data"],
  27607. "additionalProperties": false
  27608. },
  27609. "V2EventSessionCreated": {
  27610. "type": "object",
  27611. "properties": {
  27612. "id": {
  27613. "type": "string",
  27614. "pattern": "^evt_"
  27615. },
  27616. "metadata": {
  27617. "type": "object"
  27618. },
  27619. "durable": {
  27620. "type": "object",
  27621. "properties": {
  27622. "aggregateID": {
  27623. "type": "string"
  27624. },
  27625. "seq": {
  27626. "type": "integer"
  27627. },
  27628. "version": {
  27629. "type": "integer"
  27630. }
  27631. },
  27632. "required": ["aggregateID", "seq", "version"],
  27633. "additionalProperties": false
  27634. },
  27635. "location": {
  27636. "$ref": "#/components/schemas/LocationRef"
  27637. },
  27638. "type": {
  27639. "type": "string",
  27640. "enum": ["session.created"]
  27641. },
  27642. "data": {
  27643. "type": "object",
  27644. "properties": {
  27645. "sessionID": {
  27646. "type": "string",
  27647. "pattern": "^ses"
  27648. },
  27649. "info": {
  27650. "$ref": "#/components/schemas/Session"
  27651. }
  27652. },
  27653. "required": ["sessionID", "info"],
  27654. "additionalProperties": false
  27655. }
  27656. },
  27657. "required": ["id", "type", "data"],
  27658. "additionalProperties": false
  27659. },
  27660. "V2EventSessionUpdated": {
  27661. "type": "object",
  27662. "properties": {
  27663. "id": {
  27664. "type": "string",
  27665. "pattern": "^evt_"
  27666. },
  27667. "metadata": {
  27668. "type": "object"
  27669. },
  27670. "durable": {
  27671. "type": "object",
  27672. "properties": {
  27673. "aggregateID": {
  27674. "type": "string"
  27675. },
  27676. "seq": {
  27677. "type": "integer"
  27678. },
  27679. "version": {
  27680. "type": "integer"
  27681. }
  27682. },
  27683. "required": ["aggregateID", "seq", "version"],
  27684. "additionalProperties": false
  27685. },
  27686. "location": {
  27687. "$ref": "#/components/schemas/LocationRef"
  27688. },
  27689. "type": {
  27690. "type": "string",
  27691. "enum": ["session.updated"]
  27692. },
  27693. "data": {
  27694. "type": "object",
  27695. "properties": {
  27696. "sessionID": {
  27697. "type": "string",
  27698. "pattern": "^ses"
  27699. },
  27700. "info": {
  27701. "$ref": "#/components/schemas/Session"
  27702. }
  27703. },
  27704. "required": ["sessionID", "info"],
  27705. "additionalProperties": false
  27706. }
  27707. },
  27708. "required": ["id", "type", "data"],
  27709. "additionalProperties": false
  27710. },
  27711. "V2EventSessionDeleted": {
  27712. "type": "object",
  27713. "properties": {
  27714. "id": {
  27715. "type": "string",
  27716. "pattern": "^evt_"
  27717. },
  27718. "metadata": {
  27719. "type": "object"
  27720. },
  27721. "durable": {
  27722. "type": "object",
  27723. "properties": {
  27724. "aggregateID": {
  27725. "type": "string"
  27726. },
  27727. "seq": {
  27728. "type": "integer"
  27729. },
  27730. "version": {
  27731. "type": "integer"
  27732. }
  27733. },
  27734. "required": ["aggregateID", "seq", "version"],
  27735. "additionalProperties": false
  27736. },
  27737. "location": {
  27738. "$ref": "#/components/schemas/LocationRef"
  27739. },
  27740. "type": {
  27741. "type": "string",
  27742. "enum": ["session.deleted"]
  27743. },
  27744. "data": {
  27745. "type": "object",
  27746. "properties": {
  27747. "sessionID": {
  27748. "type": "string",
  27749. "pattern": "^ses"
  27750. },
  27751. "info": {
  27752. "$ref": "#/components/schemas/Session"
  27753. }
  27754. },
  27755. "required": ["sessionID", "info"],
  27756. "additionalProperties": false
  27757. }
  27758. },
  27759. "required": ["id", "type", "data"],
  27760. "additionalProperties": false
  27761. },
  27762. "V2EventMessageUpdated": {
  27763. "type": "object",
  27764. "properties": {
  27765. "id": {
  27766. "type": "string",
  27767. "pattern": "^evt_"
  27768. },
  27769. "metadata": {
  27770. "type": "object"
  27771. },
  27772. "durable": {
  27773. "type": "object",
  27774. "properties": {
  27775. "aggregateID": {
  27776. "type": "string"
  27777. },
  27778. "seq": {
  27779. "type": "integer"
  27780. },
  27781. "version": {
  27782. "type": "integer"
  27783. }
  27784. },
  27785. "required": ["aggregateID", "seq", "version"],
  27786. "additionalProperties": false
  27787. },
  27788. "location": {
  27789. "$ref": "#/components/schemas/LocationRef"
  27790. },
  27791. "type": {
  27792. "type": "string",
  27793. "enum": ["message.updated"]
  27794. },
  27795. "data": {
  27796. "type": "object",
  27797. "properties": {
  27798. "sessionID": {
  27799. "type": "string",
  27800. "pattern": "^ses"
  27801. },
  27802. "info": {
  27803. "$ref": "#/components/schemas/Message"
  27804. }
  27805. },
  27806. "required": ["sessionID", "info"],
  27807. "additionalProperties": false
  27808. }
  27809. },
  27810. "required": ["id", "type", "data"],
  27811. "additionalProperties": false
  27812. },
  27813. "V2EventMessageRemoved": {
  27814. "type": "object",
  27815. "properties": {
  27816. "id": {
  27817. "type": "string",
  27818. "pattern": "^evt_"
  27819. },
  27820. "metadata": {
  27821. "type": "object"
  27822. },
  27823. "durable": {
  27824. "type": "object",
  27825. "properties": {
  27826. "aggregateID": {
  27827. "type": "string"
  27828. },
  27829. "seq": {
  27830. "type": "integer"
  27831. },
  27832. "version": {
  27833. "type": "integer"
  27834. }
  27835. },
  27836. "required": ["aggregateID", "seq", "version"],
  27837. "additionalProperties": false
  27838. },
  27839. "location": {
  27840. "$ref": "#/components/schemas/LocationRef"
  27841. },
  27842. "type": {
  27843. "type": "string",
  27844. "enum": ["message.removed"]
  27845. },
  27846. "data": {
  27847. "type": "object",
  27848. "properties": {
  27849. "sessionID": {
  27850. "type": "string",
  27851. "pattern": "^ses"
  27852. },
  27853. "messageID": {
  27854. "type": "string",
  27855. "pattern": "^msg"
  27856. }
  27857. },
  27858. "required": ["sessionID", "messageID"],
  27859. "additionalProperties": false
  27860. }
  27861. },
  27862. "required": ["id", "type", "data"],
  27863. "additionalProperties": false
  27864. },
  27865. "V2EventMessagePartUpdated": {
  27866. "type": "object",
  27867. "properties": {
  27868. "id": {
  27869. "type": "string",
  27870. "pattern": "^evt_"
  27871. },
  27872. "metadata": {
  27873. "type": "object"
  27874. },
  27875. "durable": {
  27876. "type": "object",
  27877. "properties": {
  27878. "aggregateID": {
  27879. "type": "string"
  27880. },
  27881. "seq": {
  27882. "type": "integer"
  27883. },
  27884. "version": {
  27885. "type": "integer"
  27886. }
  27887. },
  27888. "required": ["aggregateID", "seq", "version"],
  27889. "additionalProperties": false
  27890. },
  27891. "location": {
  27892. "$ref": "#/components/schemas/LocationRef"
  27893. },
  27894. "type": {
  27895. "type": "string",
  27896. "enum": ["message.part.updated"]
  27897. },
  27898. "data": {
  27899. "type": "object",
  27900. "properties": {
  27901. "sessionID": {
  27902. "type": "string",
  27903. "pattern": "^ses"
  27904. },
  27905. "part": {
  27906. "$ref": "#/components/schemas/Part"
  27907. },
  27908. "time": {
  27909. "type": "number"
  27910. }
  27911. },
  27912. "required": ["sessionID", "part", "time"],
  27913. "additionalProperties": false
  27914. }
  27915. },
  27916. "required": ["id", "type", "data"],
  27917. "additionalProperties": false
  27918. },
  27919. "V2EventMessagePartRemoved": {
  27920. "type": "object",
  27921. "properties": {
  27922. "id": {
  27923. "type": "string",
  27924. "pattern": "^evt_"
  27925. },
  27926. "metadata": {
  27927. "type": "object"
  27928. },
  27929. "durable": {
  27930. "type": "object",
  27931. "properties": {
  27932. "aggregateID": {
  27933. "type": "string"
  27934. },
  27935. "seq": {
  27936. "type": "integer"
  27937. },
  27938. "version": {
  27939. "type": "integer"
  27940. }
  27941. },
  27942. "required": ["aggregateID", "seq", "version"],
  27943. "additionalProperties": false
  27944. },
  27945. "location": {
  27946. "$ref": "#/components/schemas/LocationRef"
  27947. },
  27948. "type": {
  27949. "type": "string",
  27950. "enum": ["message.part.removed"]
  27951. },
  27952. "data": {
  27953. "type": "object",
  27954. "properties": {
  27955. "sessionID": {
  27956. "type": "string",
  27957. "pattern": "^ses"
  27958. },
  27959. "messageID": {
  27960. "type": "string",
  27961. "pattern": "^msg"
  27962. },
  27963. "partID": {
  27964. "type": "string",
  27965. "pattern": "^prt"
  27966. }
  27967. },
  27968. "required": ["sessionID", "messageID", "partID"],
  27969. "additionalProperties": false
  27970. }
  27971. },
  27972. "required": ["id", "type", "data"],
  27973. "additionalProperties": false
  27974. },
  27975. "V2EventSessionNextAgentSwitched": {
  27976. "type": "object",
  27977. "properties": {
  27978. "id": {
  27979. "type": "string",
  27980. "pattern": "^evt_"
  27981. },
  27982. "metadata": {
  27983. "type": "object"
  27984. },
  27985. "durable": {
  27986. "type": "object",
  27987. "properties": {
  27988. "aggregateID": {
  27989. "type": "string"
  27990. },
  27991. "seq": {
  27992. "type": "integer"
  27993. },
  27994. "version": {
  27995. "type": "integer"
  27996. }
  27997. },
  27998. "required": ["aggregateID", "seq", "version"],
  27999. "additionalProperties": false
  28000. },
  28001. "location": {
  28002. "$ref": "#/components/schemas/LocationRef"
  28003. },
  28004. "type": {
  28005. "type": "string",
  28006. "enum": ["session.next.agent.switched"]
  28007. },
  28008. "data": {
  28009. "type": "object",
  28010. "properties": {
  28011. "timestamp": {
  28012. "type": "number"
  28013. },
  28014. "sessionID": {
  28015. "type": "string",
  28016. "pattern": "^ses"
  28017. },
  28018. "messageID": {
  28019. "type": "string",
  28020. "pattern": "^msg_"
  28021. },
  28022. "agent": {
  28023. "type": "string"
  28024. }
  28025. },
  28026. "required": ["timestamp", "sessionID", "messageID", "agent"],
  28027. "additionalProperties": false
  28028. }
  28029. },
  28030. "required": ["id", "type", "data"],
  28031. "additionalProperties": false
  28032. },
  28033. "V2EventSessionNextModelSwitched": {
  28034. "type": "object",
  28035. "properties": {
  28036. "id": {
  28037. "type": "string",
  28038. "pattern": "^evt_"
  28039. },
  28040. "metadata": {
  28041. "type": "object"
  28042. },
  28043. "durable": {
  28044. "type": "object",
  28045. "properties": {
  28046. "aggregateID": {
  28047. "type": "string"
  28048. },
  28049. "seq": {
  28050. "type": "integer"
  28051. },
  28052. "version": {
  28053. "type": "integer"
  28054. }
  28055. },
  28056. "required": ["aggregateID", "seq", "version"],
  28057. "additionalProperties": false
  28058. },
  28059. "location": {
  28060. "$ref": "#/components/schemas/LocationRef"
  28061. },
  28062. "type": {
  28063. "type": "string",
  28064. "enum": ["session.next.model.switched"]
  28065. },
  28066. "data": {
  28067. "type": "object",
  28068. "properties": {
  28069. "timestamp": {
  28070. "type": "number"
  28071. },
  28072. "sessionID": {
  28073. "type": "string",
  28074. "pattern": "^ses"
  28075. },
  28076. "messageID": {
  28077. "type": "string",
  28078. "pattern": "^msg_"
  28079. },
  28080. "model": {
  28081. "type": "object",
  28082. "properties": {
  28083. "id": {
  28084. "type": "string"
  28085. },
  28086. "providerID": {
  28087. "type": "string"
  28088. },
  28089. "variant": {
  28090. "type": "string"
  28091. }
  28092. },
  28093. "required": ["id", "providerID"],
  28094. "additionalProperties": false
  28095. }
  28096. },
  28097. "required": ["timestamp", "sessionID", "messageID", "model"],
  28098. "additionalProperties": false
  28099. }
  28100. },
  28101. "required": ["id", "type", "data"],
  28102. "additionalProperties": false
  28103. },
  28104. "V2EventSessionNextMoved": {
  28105. "type": "object",
  28106. "properties": {
  28107. "id": {
  28108. "type": "string",
  28109. "pattern": "^evt_"
  28110. },
  28111. "metadata": {
  28112. "type": "object"
  28113. },
  28114. "durable": {
  28115. "type": "object",
  28116. "properties": {
  28117. "aggregateID": {
  28118. "type": "string"
  28119. },
  28120. "seq": {
  28121. "type": "integer"
  28122. },
  28123. "version": {
  28124. "type": "integer"
  28125. }
  28126. },
  28127. "required": ["aggregateID", "seq", "version"],
  28128. "additionalProperties": false
  28129. },
  28130. "location": {
  28131. "$ref": "#/components/schemas/LocationRef"
  28132. },
  28133. "type": {
  28134. "type": "string",
  28135. "enum": ["session.next.moved"]
  28136. },
  28137. "data": {
  28138. "type": "object",
  28139. "properties": {
  28140. "timestamp": {
  28141. "type": "number"
  28142. },
  28143. "sessionID": {
  28144. "type": "string",
  28145. "pattern": "^ses"
  28146. },
  28147. "location": {
  28148. "$ref": "#/components/schemas/LocationRef"
  28149. },
  28150. "subdirectory": {
  28151. "type": "string"
  28152. }
  28153. },
  28154. "required": ["timestamp", "sessionID", "location"],
  28155. "additionalProperties": false
  28156. }
  28157. },
  28158. "required": ["id", "type", "data"],
  28159. "additionalProperties": false
  28160. },
  28161. "V2EventSessionNextPrompted": {
  28162. "type": "object",
  28163. "properties": {
  28164. "id": {
  28165. "type": "string",
  28166. "pattern": "^evt_"
  28167. },
  28168. "metadata": {
  28169. "type": "object"
  28170. },
  28171. "durable": {
  28172. "type": "object",
  28173. "properties": {
  28174. "aggregateID": {
  28175. "type": "string"
  28176. },
  28177. "seq": {
  28178. "type": "integer"
  28179. },
  28180. "version": {
  28181. "type": "integer"
  28182. }
  28183. },
  28184. "required": ["aggregateID", "seq", "version"],
  28185. "additionalProperties": false
  28186. },
  28187. "location": {
  28188. "$ref": "#/components/schemas/LocationRef"
  28189. },
  28190. "type": {
  28191. "type": "string",
  28192. "enum": ["session.next.prompted"]
  28193. },
  28194. "data": {
  28195. "type": "object",
  28196. "properties": {
  28197. "timestamp": {
  28198. "type": "number"
  28199. },
  28200. "sessionID": {
  28201. "type": "string",
  28202. "pattern": "^ses"
  28203. },
  28204. "messageID": {
  28205. "type": "string",
  28206. "pattern": "^msg_"
  28207. },
  28208. "prompt": {
  28209. "$ref": "#/components/schemas/Prompt"
  28210. },
  28211. "delivery": {
  28212. "type": "string",
  28213. "enum": ["steer", "queue"]
  28214. }
  28215. },
  28216. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  28217. "additionalProperties": false
  28218. }
  28219. },
  28220. "required": ["id", "type", "data"],
  28221. "additionalProperties": false
  28222. },
  28223. "V2EventSessionNextPromptAdmitted": {
  28224. "type": "object",
  28225. "properties": {
  28226. "id": {
  28227. "type": "string",
  28228. "pattern": "^evt_"
  28229. },
  28230. "metadata": {
  28231. "type": "object"
  28232. },
  28233. "durable": {
  28234. "type": "object",
  28235. "properties": {
  28236. "aggregateID": {
  28237. "type": "string"
  28238. },
  28239. "seq": {
  28240. "type": "integer"
  28241. },
  28242. "version": {
  28243. "type": "integer"
  28244. }
  28245. },
  28246. "required": ["aggregateID", "seq", "version"],
  28247. "additionalProperties": false
  28248. },
  28249. "location": {
  28250. "$ref": "#/components/schemas/LocationRef"
  28251. },
  28252. "type": {
  28253. "type": "string",
  28254. "enum": ["session.next.prompt.admitted"]
  28255. },
  28256. "data": {
  28257. "type": "object",
  28258. "properties": {
  28259. "timestamp": {
  28260. "type": "number"
  28261. },
  28262. "sessionID": {
  28263. "type": "string",
  28264. "pattern": "^ses"
  28265. },
  28266. "messageID": {
  28267. "type": "string",
  28268. "pattern": "^msg_"
  28269. },
  28270. "prompt": {
  28271. "$ref": "#/components/schemas/Prompt"
  28272. },
  28273. "delivery": {
  28274. "type": "string",
  28275. "enum": ["steer", "queue"]
  28276. }
  28277. },
  28278. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  28279. "additionalProperties": false
  28280. }
  28281. },
  28282. "required": ["id", "type", "data"],
  28283. "additionalProperties": false
  28284. },
  28285. "V2EventSessionNextContextUpdated": {
  28286. "type": "object",
  28287. "properties": {
  28288. "id": {
  28289. "type": "string",
  28290. "pattern": "^evt_"
  28291. },
  28292. "metadata": {
  28293. "type": "object"
  28294. },
  28295. "durable": {
  28296. "type": "object",
  28297. "properties": {
  28298. "aggregateID": {
  28299. "type": "string"
  28300. },
  28301. "seq": {
  28302. "type": "integer"
  28303. },
  28304. "version": {
  28305. "type": "integer"
  28306. }
  28307. },
  28308. "required": ["aggregateID", "seq", "version"],
  28309. "additionalProperties": false
  28310. },
  28311. "location": {
  28312. "$ref": "#/components/schemas/LocationRef"
  28313. },
  28314. "type": {
  28315. "type": "string",
  28316. "enum": ["session.next.context.updated"]
  28317. },
  28318. "data": {
  28319. "type": "object",
  28320. "properties": {
  28321. "timestamp": {
  28322. "type": "number"
  28323. },
  28324. "sessionID": {
  28325. "type": "string",
  28326. "pattern": "^ses"
  28327. },
  28328. "messageID": {
  28329. "type": "string",
  28330. "pattern": "^msg_"
  28331. },
  28332. "text": {
  28333. "type": "string"
  28334. }
  28335. },
  28336. "required": ["timestamp", "sessionID", "messageID", "text"],
  28337. "additionalProperties": false
  28338. }
  28339. },
  28340. "required": ["id", "type", "data"],
  28341. "additionalProperties": false
  28342. },
  28343. "V2EventSessionNextSynthetic": {
  28344. "type": "object",
  28345. "properties": {
  28346. "id": {
  28347. "type": "string",
  28348. "pattern": "^evt_"
  28349. },
  28350. "metadata": {
  28351. "type": "object"
  28352. },
  28353. "durable": {
  28354. "type": "object",
  28355. "properties": {
  28356. "aggregateID": {
  28357. "type": "string"
  28358. },
  28359. "seq": {
  28360. "type": "integer"
  28361. },
  28362. "version": {
  28363. "type": "integer"
  28364. }
  28365. },
  28366. "required": ["aggregateID", "seq", "version"],
  28367. "additionalProperties": false
  28368. },
  28369. "location": {
  28370. "$ref": "#/components/schemas/LocationRef"
  28371. },
  28372. "type": {
  28373. "type": "string",
  28374. "enum": ["session.next.synthetic"]
  28375. },
  28376. "data": {
  28377. "type": "object",
  28378. "properties": {
  28379. "timestamp": {
  28380. "type": "number"
  28381. },
  28382. "sessionID": {
  28383. "type": "string",
  28384. "pattern": "^ses"
  28385. },
  28386. "messageID": {
  28387. "type": "string",
  28388. "pattern": "^msg_"
  28389. },
  28390. "text": {
  28391. "type": "string"
  28392. }
  28393. },
  28394. "required": ["timestamp", "sessionID", "messageID", "text"],
  28395. "additionalProperties": false
  28396. }
  28397. },
  28398. "required": ["id", "type", "data"],
  28399. "additionalProperties": false
  28400. },
  28401. "V2EventSessionNextShellStarted": {
  28402. "type": "object",
  28403. "properties": {
  28404. "id": {
  28405. "type": "string",
  28406. "pattern": "^evt_"
  28407. },
  28408. "metadata": {
  28409. "type": "object"
  28410. },
  28411. "durable": {
  28412. "type": "object",
  28413. "properties": {
  28414. "aggregateID": {
  28415. "type": "string"
  28416. },
  28417. "seq": {
  28418. "type": "integer"
  28419. },
  28420. "version": {
  28421. "type": "integer"
  28422. }
  28423. },
  28424. "required": ["aggregateID", "seq", "version"],
  28425. "additionalProperties": false
  28426. },
  28427. "location": {
  28428. "$ref": "#/components/schemas/LocationRef"
  28429. },
  28430. "type": {
  28431. "type": "string",
  28432. "enum": ["session.next.shell.started"]
  28433. },
  28434. "data": {
  28435. "type": "object",
  28436. "properties": {
  28437. "timestamp": {
  28438. "type": "number"
  28439. },
  28440. "sessionID": {
  28441. "type": "string",
  28442. "pattern": "^ses"
  28443. },
  28444. "messageID": {
  28445. "type": "string",
  28446. "pattern": "^msg_"
  28447. },
  28448. "callID": {
  28449. "type": "string"
  28450. },
  28451. "command": {
  28452. "type": "string"
  28453. }
  28454. },
  28455. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  28456. "additionalProperties": false
  28457. }
  28458. },
  28459. "required": ["id", "type", "data"],
  28460. "additionalProperties": false
  28461. },
  28462. "V2EventSessionNextShellEnded": {
  28463. "type": "object",
  28464. "properties": {
  28465. "id": {
  28466. "type": "string",
  28467. "pattern": "^evt_"
  28468. },
  28469. "metadata": {
  28470. "type": "object"
  28471. },
  28472. "durable": {
  28473. "type": "object",
  28474. "properties": {
  28475. "aggregateID": {
  28476. "type": "string"
  28477. },
  28478. "seq": {
  28479. "type": "integer"
  28480. },
  28481. "version": {
  28482. "type": "integer"
  28483. }
  28484. },
  28485. "required": ["aggregateID", "seq", "version"],
  28486. "additionalProperties": false
  28487. },
  28488. "location": {
  28489. "$ref": "#/components/schemas/LocationRef"
  28490. },
  28491. "type": {
  28492. "type": "string",
  28493. "enum": ["session.next.shell.ended"]
  28494. },
  28495. "data": {
  28496. "type": "object",
  28497. "properties": {
  28498. "timestamp": {
  28499. "type": "number"
  28500. },
  28501. "sessionID": {
  28502. "type": "string",
  28503. "pattern": "^ses"
  28504. },
  28505. "callID": {
  28506. "type": "string"
  28507. },
  28508. "output": {
  28509. "type": "string"
  28510. }
  28511. },
  28512. "required": ["timestamp", "sessionID", "callID", "output"],
  28513. "additionalProperties": false
  28514. }
  28515. },
  28516. "required": ["id", "type", "data"],
  28517. "additionalProperties": false
  28518. },
  28519. "V2EventSessionNextStepStarted": {
  28520. "type": "object",
  28521. "properties": {
  28522. "id": {
  28523. "type": "string",
  28524. "pattern": "^evt_"
  28525. },
  28526. "metadata": {
  28527. "type": "object"
  28528. },
  28529. "durable": {
  28530. "type": "object",
  28531. "properties": {
  28532. "aggregateID": {
  28533. "type": "string"
  28534. },
  28535. "seq": {
  28536. "type": "integer"
  28537. },
  28538. "version": {
  28539. "type": "integer"
  28540. }
  28541. },
  28542. "required": ["aggregateID", "seq", "version"],
  28543. "additionalProperties": false
  28544. },
  28545. "location": {
  28546. "$ref": "#/components/schemas/LocationRef"
  28547. },
  28548. "type": {
  28549. "type": "string",
  28550. "enum": ["session.next.step.started"]
  28551. },
  28552. "data": {
  28553. "type": "object",
  28554. "properties": {
  28555. "timestamp": {
  28556. "type": "number"
  28557. },
  28558. "sessionID": {
  28559. "type": "string",
  28560. "pattern": "^ses"
  28561. },
  28562. "assistantMessageID": {
  28563. "type": "string",
  28564. "pattern": "^msg_"
  28565. },
  28566. "agent": {
  28567. "type": "string"
  28568. },
  28569. "model": {
  28570. "type": "object",
  28571. "properties": {
  28572. "id": {
  28573. "type": "string"
  28574. },
  28575. "providerID": {
  28576. "type": "string"
  28577. },
  28578. "variant": {
  28579. "type": "string"
  28580. }
  28581. },
  28582. "required": ["id", "providerID"],
  28583. "additionalProperties": false
  28584. },
  28585. "snapshot": {
  28586. "type": "string"
  28587. }
  28588. },
  28589. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  28590. "additionalProperties": false
  28591. }
  28592. },
  28593. "required": ["id", "type", "data"],
  28594. "additionalProperties": false
  28595. },
  28596. "V2EventSessionNextStepEnded": {
  28597. "type": "object",
  28598. "properties": {
  28599. "id": {
  28600. "type": "string",
  28601. "pattern": "^evt_"
  28602. },
  28603. "metadata": {
  28604. "type": "object"
  28605. },
  28606. "durable": {
  28607. "type": "object",
  28608. "properties": {
  28609. "aggregateID": {
  28610. "type": "string"
  28611. },
  28612. "seq": {
  28613. "type": "integer"
  28614. },
  28615. "version": {
  28616. "type": "integer"
  28617. }
  28618. },
  28619. "required": ["aggregateID", "seq", "version"],
  28620. "additionalProperties": false
  28621. },
  28622. "location": {
  28623. "$ref": "#/components/schemas/LocationRef"
  28624. },
  28625. "type": {
  28626. "type": "string",
  28627. "enum": ["session.next.step.ended"]
  28628. },
  28629. "data": {
  28630. "type": "object",
  28631. "properties": {
  28632. "timestamp": {
  28633. "type": "number"
  28634. },
  28635. "sessionID": {
  28636. "type": "string",
  28637. "pattern": "^ses"
  28638. },
  28639. "assistantMessageID": {
  28640. "type": "string",
  28641. "pattern": "^msg_"
  28642. },
  28643. "finish": {
  28644. "type": "string"
  28645. },
  28646. "cost": {
  28647. "type": "number"
  28648. },
  28649. "tokens": {
  28650. "type": "object",
  28651. "properties": {
  28652. "input": {
  28653. "type": "number"
  28654. },
  28655. "output": {
  28656. "type": "number"
  28657. },
  28658. "reasoning": {
  28659. "type": "number"
  28660. },
  28661. "cache": {
  28662. "type": "object",
  28663. "properties": {
  28664. "read": {
  28665. "type": "number"
  28666. },
  28667. "write": {
  28668. "type": "number"
  28669. }
  28670. },
  28671. "required": ["read", "write"],
  28672. "additionalProperties": false
  28673. }
  28674. },
  28675. "required": ["input", "output", "reasoning", "cache"],
  28676. "additionalProperties": false
  28677. },
  28678. "snapshot": {
  28679. "type": "string"
  28680. }
  28681. },
  28682. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  28683. "additionalProperties": false
  28684. }
  28685. },
  28686. "required": ["id", "type", "data"],
  28687. "additionalProperties": false
  28688. },
  28689. "V2EventSessionNextStepFailed": {
  28690. "type": "object",
  28691. "properties": {
  28692. "id": {
  28693. "type": "string",
  28694. "pattern": "^evt_"
  28695. },
  28696. "metadata": {
  28697. "type": "object"
  28698. },
  28699. "durable": {
  28700. "type": "object",
  28701. "properties": {
  28702. "aggregateID": {
  28703. "type": "string"
  28704. },
  28705. "seq": {
  28706. "type": "integer"
  28707. },
  28708. "version": {
  28709. "type": "integer"
  28710. }
  28711. },
  28712. "required": ["aggregateID", "seq", "version"],
  28713. "additionalProperties": false
  28714. },
  28715. "location": {
  28716. "$ref": "#/components/schemas/LocationRef"
  28717. },
  28718. "type": {
  28719. "type": "string",
  28720. "enum": ["session.next.step.failed"]
  28721. },
  28722. "data": {
  28723. "type": "object",
  28724. "properties": {
  28725. "timestamp": {
  28726. "type": "number"
  28727. },
  28728. "sessionID": {
  28729. "type": "string",
  28730. "pattern": "^ses"
  28731. },
  28732. "assistantMessageID": {
  28733. "type": "string",
  28734. "pattern": "^msg_"
  28735. },
  28736. "error": {
  28737. "$ref": "#/components/schemas/SessionErrorUnknown"
  28738. }
  28739. },
  28740. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  28741. "additionalProperties": false
  28742. }
  28743. },
  28744. "required": ["id", "type", "data"],
  28745. "additionalProperties": false
  28746. },
  28747. "V2EventSessionNextTextStarted": {
  28748. "type": "object",
  28749. "properties": {
  28750. "id": {
  28751. "type": "string",
  28752. "pattern": "^evt_"
  28753. },
  28754. "metadata": {
  28755. "type": "object"
  28756. },
  28757. "durable": {
  28758. "type": "object",
  28759. "properties": {
  28760. "aggregateID": {
  28761. "type": "string"
  28762. },
  28763. "seq": {
  28764. "type": "integer"
  28765. },
  28766. "version": {
  28767. "type": "integer"
  28768. }
  28769. },
  28770. "required": ["aggregateID", "seq", "version"],
  28771. "additionalProperties": false
  28772. },
  28773. "location": {
  28774. "$ref": "#/components/schemas/LocationRef"
  28775. },
  28776. "type": {
  28777. "type": "string",
  28778. "enum": ["session.next.text.started"]
  28779. },
  28780. "data": {
  28781. "type": "object",
  28782. "properties": {
  28783. "timestamp": {
  28784. "type": "number"
  28785. },
  28786. "sessionID": {
  28787. "type": "string",
  28788. "pattern": "^ses"
  28789. },
  28790. "assistantMessageID": {
  28791. "type": "string",
  28792. "pattern": "^msg_"
  28793. },
  28794. "textID": {
  28795. "type": "string"
  28796. }
  28797. },
  28798. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  28799. "additionalProperties": false
  28800. }
  28801. },
  28802. "required": ["id", "type", "data"],
  28803. "additionalProperties": false
  28804. },
  28805. "V2EventSessionNextTextDelta": {
  28806. "type": "object",
  28807. "properties": {
  28808. "id": {
  28809. "type": "string",
  28810. "pattern": "^evt_"
  28811. },
  28812. "metadata": {
  28813. "type": "object"
  28814. },
  28815. "durable": {
  28816. "type": "object",
  28817. "properties": {
  28818. "aggregateID": {
  28819. "type": "string"
  28820. },
  28821. "seq": {
  28822. "type": "integer"
  28823. },
  28824. "version": {
  28825. "type": "integer"
  28826. }
  28827. },
  28828. "required": ["aggregateID", "seq", "version"],
  28829. "additionalProperties": false
  28830. },
  28831. "location": {
  28832. "$ref": "#/components/schemas/LocationRef"
  28833. },
  28834. "type": {
  28835. "type": "string",
  28836. "enum": ["session.next.text.delta"]
  28837. },
  28838. "data": {
  28839. "type": "object",
  28840. "properties": {
  28841. "timestamp": {
  28842. "type": "number"
  28843. },
  28844. "sessionID": {
  28845. "type": "string",
  28846. "pattern": "^ses"
  28847. },
  28848. "assistantMessageID": {
  28849. "type": "string",
  28850. "pattern": "^msg_"
  28851. },
  28852. "textID": {
  28853. "type": "string"
  28854. },
  28855. "delta": {
  28856. "type": "string"
  28857. }
  28858. },
  28859. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  28860. "additionalProperties": false
  28861. }
  28862. },
  28863. "required": ["id", "type", "data"],
  28864. "additionalProperties": false
  28865. },
  28866. "V2EventSessionNextTextEnded": {
  28867. "type": "object",
  28868. "properties": {
  28869. "id": {
  28870. "type": "string",
  28871. "pattern": "^evt_"
  28872. },
  28873. "metadata": {
  28874. "type": "object"
  28875. },
  28876. "durable": {
  28877. "type": "object",
  28878. "properties": {
  28879. "aggregateID": {
  28880. "type": "string"
  28881. },
  28882. "seq": {
  28883. "type": "integer"
  28884. },
  28885. "version": {
  28886. "type": "integer"
  28887. }
  28888. },
  28889. "required": ["aggregateID", "seq", "version"],
  28890. "additionalProperties": false
  28891. },
  28892. "location": {
  28893. "$ref": "#/components/schemas/LocationRef"
  28894. },
  28895. "type": {
  28896. "type": "string",
  28897. "enum": ["session.next.text.ended"]
  28898. },
  28899. "data": {
  28900. "type": "object",
  28901. "properties": {
  28902. "timestamp": {
  28903. "type": "number"
  28904. },
  28905. "sessionID": {
  28906. "type": "string",
  28907. "pattern": "^ses"
  28908. },
  28909. "assistantMessageID": {
  28910. "type": "string",
  28911. "pattern": "^msg_"
  28912. },
  28913. "textID": {
  28914. "type": "string"
  28915. },
  28916. "text": {
  28917. "type": "string"
  28918. }
  28919. },
  28920. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  28921. "additionalProperties": false
  28922. }
  28923. },
  28924. "required": ["id", "type", "data"],
  28925. "additionalProperties": false
  28926. },
  28927. "V2EventSessionNextReasoningStarted": {
  28928. "type": "object",
  28929. "properties": {
  28930. "id": {
  28931. "type": "string",
  28932. "pattern": "^evt_"
  28933. },
  28934. "metadata": {
  28935. "type": "object"
  28936. },
  28937. "durable": {
  28938. "type": "object",
  28939. "properties": {
  28940. "aggregateID": {
  28941. "type": "string"
  28942. },
  28943. "seq": {
  28944. "type": "integer"
  28945. },
  28946. "version": {
  28947. "type": "integer"
  28948. }
  28949. },
  28950. "required": ["aggregateID", "seq", "version"],
  28951. "additionalProperties": false
  28952. },
  28953. "location": {
  28954. "$ref": "#/components/schemas/LocationRef"
  28955. },
  28956. "type": {
  28957. "type": "string",
  28958. "enum": ["session.next.reasoning.started"]
  28959. },
  28960. "data": {
  28961. "type": "object",
  28962. "properties": {
  28963. "timestamp": {
  28964. "type": "number"
  28965. },
  28966. "sessionID": {
  28967. "type": "string",
  28968. "pattern": "^ses"
  28969. },
  28970. "assistantMessageID": {
  28971. "type": "string",
  28972. "pattern": "^msg_"
  28973. },
  28974. "reasoningID": {
  28975. "type": "string"
  28976. },
  28977. "providerMetadata": {
  28978. "type": "object",
  28979. "additionalProperties": {
  28980. "type": "object"
  28981. }
  28982. }
  28983. },
  28984. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  28985. "additionalProperties": false
  28986. }
  28987. },
  28988. "required": ["id", "type", "data"],
  28989. "additionalProperties": false
  28990. },
  28991. "V2EventSessionNextReasoningDelta": {
  28992. "type": "object",
  28993. "properties": {
  28994. "id": {
  28995. "type": "string",
  28996. "pattern": "^evt_"
  28997. },
  28998. "metadata": {
  28999. "type": "object"
  29000. },
  29001. "durable": {
  29002. "type": "object",
  29003. "properties": {
  29004. "aggregateID": {
  29005. "type": "string"
  29006. },
  29007. "seq": {
  29008. "type": "integer"
  29009. },
  29010. "version": {
  29011. "type": "integer"
  29012. }
  29013. },
  29014. "required": ["aggregateID", "seq", "version"],
  29015. "additionalProperties": false
  29016. },
  29017. "location": {
  29018. "$ref": "#/components/schemas/LocationRef"
  29019. },
  29020. "type": {
  29021. "type": "string",
  29022. "enum": ["session.next.reasoning.delta"]
  29023. },
  29024. "data": {
  29025. "type": "object",
  29026. "properties": {
  29027. "timestamp": {
  29028. "type": "number"
  29029. },
  29030. "sessionID": {
  29031. "type": "string",
  29032. "pattern": "^ses"
  29033. },
  29034. "assistantMessageID": {
  29035. "type": "string",
  29036. "pattern": "^msg_"
  29037. },
  29038. "reasoningID": {
  29039. "type": "string"
  29040. },
  29041. "delta": {
  29042. "type": "string"
  29043. }
  29044. },
  29045. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  29046. "additionalProperties": false
  29047. }
  29048. },
  29049. "required": ["id", "type", "data"],
  29050. "additionalProperties": false
  29051. },
  29052. "V2EventSessionNextReasoningEnded": {
  29053. "type": "object",
  29054. "properties": {
  29055. "id": {
  29056. "type": "string",
  29057. "pattern": "^evt_"
  29058. },
  29059. "metadata": {
  29060. "type": "object"
  29061. },
  29062. "durable": {
  29063. "type": "object",
  29064. "properties": {
  29065. "aggregateID": {
  29066. "type": "string"
  29067. },
  29068. "seq": {
  29069. "type": "integer"
  29070. },
  29071. "version": {
  29072. "type": "integer"
  29073. }
  29074. },
  29075. "required": ["aggregateID", "seq", "version"],
  29076. "additionalProperties": false
  29077. },
  29078. "location": {
  29079. "$ref": "#/components/schemas/LocationRef"
  29080. },
  29081. "type": {
  29082. "type": "string",
  29083. "enum": ["session.next.reasoning.ended"]
  29084. },
  29085. "data": {
  29086. "type": "object",
  29087. "properties": {
  29088. "timestamp": {
  29089. "type": "number"
  29090. },
  29091. "sessionID": {
  29092. "type": "string",
  29093. "pattern": "^ses"
  29094. },
  29095. "assistantMessageID": {
  29096. "type": "string",
  29097. "pattern": "^msg_"
  29098. },
  29099. "reasoningID": {
  29100. "type": "string"
  29101. },
  29102. "text": {
  29103. "type": "string"
  29104. },
  29105. "providerMetadata": {
  29106. "type": "object",
  29107. "additionalProperties": {
  29108. "type": "object"
  29109. }
  29110. }
  29111. },
  29112. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  29113. "additionalProperties": false
  29114. }
  29115. },
  29116. "required": ["id", "type", "data"],
  29117. "additionalProperties": false
  29118. },
  29119. "V2EventSessionNextToolInputStarted": {
  29120. "type": "object",
  29121. "properties": {
  29122. "id": {
  29123. "type": "string",
  29124. "pattern": "^evt_"
  29125. },
  29126. "metadata": {
  29127. "type": "object"
  29128. },
  29129. "durable": {
  29130. "type": "object",
  29131. "properties": {
  29132. "aggregateID": {
  29133. "type": "string"
  29134. },
  29135. "seq": {
  29136. "type": "integer"
  29137. },
  29138. "version": {
  29139. "type": "integer"
  29140. }
  29141. },
  29142. "required": ["aggregateID", "seq", "version"],
  29143. "additionalProperties": false
  29144. },
  29145. "location": {
  29146. "$ref": "#/components/schemas/LocationRef"
  29147. },
  29148. "type": {
  29149. "type": "string",
  29150. "enum": ["session.next.tool.input.started"]
  29151. },
  29152. "data": {
  29153. "type": "object",
  29154. "properties": {
  29155. "timestamp": {
  29156. "type": "number"
  29157. },
  29158. "sessionID": {
  29159. "type": "string",
  29160. "pattern": "^ses"
  29161. },
  29162. "assistantMessageID": {
  29163. "type": "string",
  29164. "pattern": "^msg_"
  29165. },
  29166. "callID": {
  29167. "type": "string"
  29168. },
  29169. "name": {
  29170. "type": "string"
  29171. }
  29172. },
  29173. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  29174. "additionalProperties": false
  29175. }
  29176. },
  29177. "required": ["id", "type", "data"],
  29178. "additionalProperties": false
  29179. },
  29180. "V2EventSessionNextToolInputDelta": {
  29181. "type": "object",
  29182. "properties": {
  29183. "id": {
  29184. "type": "string",
  29185. "pattern": "^evt_"
  29186. },
  29187. "metadata": {
  29188. "type": "object"
  29189. },
  29190. "durable": {
  29191. "type": "object",
  29192. "properties": {
  29193. "aggregateID": {
  29194. "type": "string"
  29195. },
  29196. "seq": {
  29197. "type": "integer"
  29198. },
  29199. "version": {
  29200. "type": "integer"
  29201. }
  29202. },
  29203. "required": ["aggregateID", "seq", "version"],
  29204. "additionalProperties": false
  29205. },
  29206. "location": {
  29207. "$ref": "#/components/schemas/LocationRef"
  29208. },
  29209. "type": {
  29210. "type": "string",
  29211. "enum": ["session.next.tool.input.delta"]
  29212. },
  29213. "data": {
  29214. "type": "object",
  29215. "properties": {
  29216. "timestamp": {
  29217. "type": "number"
  29218. },
  29219. "sessionID": {
  29220. "type": "string",
  29221. "pattern": "^ses"
  29222. },
  29223. "assistantMessageID": {
  29224. "type": "string",
  29225. "pattern": "^msg_"
  29226. },
  29227. "callID": {
  29228. "type": "string"
  29229. },
  29230. "delta": {
  29231. "type": "string"
  29232. }
  29233. },
  29234. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  29235. "additionalProperties": false
  29236. }
  29237. },
  29238. "required": ["id", "type", "data"],
  29239. "additionalProperties": false
  29240. },
  29241. "V2EventSessionNextToolInputEnded": {
  29242. "type": "object",
  29243. "properties": {
  29244. "id": {
  29245. "type": "string",
  29246. "pattern": "^evt_"
  29247. },
  29248. "metadata": {
  29249. "type": "object"
  29250. },
  29251. "durable": {
  29252. "type": "object",
  29253. "properties": {
  29254. "aggregateID": {
  29255. "type": "string"
  29256. },
  29257. "seq": {
  29258. "type": "integer"
  29259. },
  29260. "version": {
  29261. "type": "integer"
  29262. }
  29263. },
  29264. "required": ["aggregateID", "seq", "version"],
  29265. "additionalProperties": false
  29266. },
  29267. "location": {
  29268. "$ref": "#/components/schemas/LocationRef"
  29269. },
  29270. "type": {
  29271. "type": "string",
  29272. "enum": ["session.next.tool.input.ended"]
  29273. },
  29274. "data": {
  29275. "type": "object",
  29276. "properties": {
  29277. "timestamp": {
  29278. "type": "number"
  29279. },
  29280. "sessionID": {
  29281. "type": "string",
  29282. "pattern": "^ses"
  29283. },
  29284. "assistantMessageID": {
  29285. "type": "string",
  29286. "pattern": "^msg_"
  29287. },
  29288. "callID": {
  29289. "type": "string"
  29290. },
  29291. "text": {
  29292. "type": "string"
  29293. }
  29294. },
  29295. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  29296. "additionalProperties": false
  29297. }
  29298. },
  29299. "required": ["id", "type", "data"],
  29300. "additionalProperties": false
  29301. },
  29302. "V2EventSessionNextToolCalled": {
  29303. "type": "object",
  29304. "properties": {
  29305. "id": {
  29306. "type": "string",
  29307. "pattern": "^evt_"
  29308. },
  29309. "metadata": {
  29310. "type": "object"
  29311. },
  29312. "durable": {
  29313. "type": "object",
  29314. "properties": {
  29315. "aggregateID": {
  29316. "type": "string"
  29317. },
  29318. "seq": {
  29319. "type": "integer"
  29320. },
  29321. "version": {
  29322. "type": "integer"
  29323. }
  29324. },
  29325. "required": ["aggregateID", "seq", "version"],
  29326. "additionalProperties": false
  29327. },
  29328. "location": {
  29329. "$ref": "#/components/schemas/LocationRef"
  29330. },
  29331. "type": {
  29332. "type": "string",
  29333. "enum": ["session.next.tool.called"]
  29334. },
  29335. "data": {
  29336. "type": "object",
  29337. "properties": {
  29338. "timestamp": {
  29339. "type": "number"
  29340. },
  29341. "sessionID": {
  29342. "type": "string",
  29343. "pattern": "^ses"
  29344. },
  29345. "assistantMessageID": {
  29346. "type": "string",
  29347. "pattern": "^msg_"
  29348. },
  29349. "callID": {
  29350. "type": "string"
  29351. },
  29352. "tool": {
  29353. "type": "string"
  29354. },
  29355. "input": {
  29356. "type": "object"
  29357. },
  29358. "provider": {
  29359. "type": "object",
  29360. "properties": {
  29361. "executed": {
  29362. "type": "boolean"
  29363. },
  29364. "metadata": {
  29365. "type": "object",
  29366. "additionalProperties": {
  29367. "type": "object"
  29368. }
  29369. }
  29370. },
  29371. "required": ["executed"],
  29372. "additionalProperties": false
  29373. }
  29374. },
  29375. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  29376. "additionalProperties": false
  29377. }
  29378. },
  29379. "required": ["id", "type", "data"],
  29380. "additionalProperties": false
  29381. },
  29382. "V2EventSessionNextToolProgress": {
  29383. "type": "object",
  29384. "properties": {
  29385. "id": {
  29386. "type": "string",
  29387. "pattern": "^evt_"
  29388. },
  29389. "metadata": {
  29390. "type": "object"
  29391. },
  29392. "durable": {
  29393. "type": "object",
  29394. "properties": {
  29395. "aggregateID": {
  29396. "type": "string"
  29397. },
  29398. "seq": {
  29399. "type": "integer"
  29400. },
  29401. "version": {
  29402. "type": "integer"
  29403. }
  29404. },
  29405. "required": ["aggregateID", "seq", "version"],
  29406. "additionalProperties": false
  29407. },
  29408. "location": {
  29409. "$ref": "#/components/schemas/LocationRef"
  29410. },
  29411. "type": {
  29412. "type": "string",
  29413. "enum": ["session.next.tool.progress"]
  29414. },
  29415. "data": {
  29416. "type": "object",
  29417. "properties": {
  29418. "timestamp": {
  29419. "type": "number"
  29420. },
  29421. "sessionID": {
  29422. "type": "string",
  29423. "pattern": "^ses"
  29424. },
  29425. "assistantMessageID": {
  29426. "type": "string",
  29427. "pattern": "^msg_"
  29428. },
  29429. "callID": {
  29430. "type": "string"
  29431. },
  29432. "structured": {
  29433. "type": "object"
  29434. },
  29435. "content": {
  29436. "type": "array",
  29437. "items": {
  29438. "anyOf": [
  29439. {
  29440. "$ref": "#/components/schemas/ToolTextContent"
  29441. },
  29442. {
  29443. "$ref": "#/components/schemas/ToolFileContent"
  29444. }
  29445. ]
  29446. }
  29447. }
  29448. },
  29449. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  29450. "additionalProperties": false
  29451. }
  29452. },
  29453. "required": ["id", "type", "data"],
  29454. "additionalProperties": false
  29455. },
  29456. "V2EventSessionNextToolSuccess": {
  29457. "type": "object",
  29458. "properties": {
  29459. "id": {
  29460. "type": "string",
  29461. "pattern": "^evt_"
  29462. },
  29463. "metadata": {
  29464. "type": "object"
  29465. },
  29466. "durable": {
  29467. "type": "object",
  29468. "properties": {
  29469. "aggregateID": {
  29470. "type": "string"
  29471. },
  29472. "seq": {
  29473. "type": "integer"
  29474. },
  29475. "version": {
  29476. "type": "integer"
  29477. }
  29478. },
  29479. "required": ["aggregateID", "seq", "version"],
  29480. "additionalProperties": false
  29481. },
  29482. "location": {
  29483. "$ref": "#/components/schemas/LocationRef"
  29484. },
  29485. "type": {
  29486. "type": "string",
  29487. "enum": ["session.next.tool.success"]
  29488. },
  29489. "data": {
  29490. "type": "object",
  29491. "properties": {
  29492. "timestamp": {
  29493. "type": "number"
  29494. },
  29495. "sessionID": {
  29496. "type": "string",
  29497. "pattern": "^ses"
  29498. },
  29499. "assistantMessageID": {
  29500. "type": "string",
  29501. "pattern": "^msg_"
  29502. },
  29503. "callID": {
  29504. "type": "string"
  29505. },
  29506. "structured": {
  29507. "type": "object"
  29508. },
  29509. "content": {
  29510. "type": "array",
  29511. "items": {
  29512. "anyOf": [
  29513. {
  29514. "$ref": "#/components/schemas/ToolTextContent"
  29515. },
  29516. {
  29517. "$ref": "#/components/schemas/ToolFileContent"
  29518. }
  29519. ]
  29520. }
  29521. },
  29522. "outputPaths": {
  29523. "type": "array",
  29524. "items": {
  29525. "type": "string"
  29526. }
  29527. },
  29528. "result": {},
  29529. "provider": {
  29530. "type": "object",
  29531. "properties": {
  29532. "executed": {
  29533. "type": "boolean"
  29534. },
  29535. "metadata": {
  29536. "type": "object",
  29537. "additionalProperties": {
  29538. "type": "object"
  29539. }
  29540. }
  29541. },
  29542. "required": ["executed"],
  29543. "additionalProperties": false
  29544. }
  29545. },
  29546. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  29547. "additionalProperties": false
  29548. }
  29549. },
  29550. "required": ["id", "type", "data"],
  29551. "additionalProperties": false
  29552. },
  29553. "V2EventSessionNextToolFailed": {
  29554. "type": "object",
  29555. "properties": {
  29556. "id": {
  29557. "type": "string",
  29558. "pattern": "^evt_"
  29559. },
  29560. "metadata": {
  29561. "type": "object"
  29562. },
  29563. "durable": {
  29564. "type": "object",
  29565. "properties": {
  29566. "aggregateID": {
  29567. "type": "string"
  29568. },
  29569. "seq": {
  29570. "type": "integer"
  29571. },
  29572. "version": {
  29573. "type": "integer"
  29574. }
  29575. },
  29576. "required": ["aggregateID", "seq", "version"],
  29577. "additionalProperties": false
  29578. },
  29579. "location": {
  29580. "$ref": "#/components/schemas/LocationRef"
  29581. },
  29582. "type": {
  29583. "type": "string",
  29584. "enum": ["session.next.tool.failed"]
  29585. },
  29586. "data": {
  29587. "type": "object",
  29588. "properties": {
  29589. "timestamp": {
  29590. "type": "number"
  29591. },
  29592. "sessionID": {
  29593. "type": "string",
  29594. "pattern": "^ses"
  29595. },
  29596. "assistantMessageID": {
  29597. "type": "string",
  29598. "pattern": "^msg_"
  29599. },
  29600. "callID": {
  29601. "type": "string"
  29602. },
  29603. "error": {
  29604. "$ref": "#/components/schemas/SessionErrorUnknown"
  29605. },
  29606. "result": {},
  29607. "provider": {
  29608. "type": "object",
  29609. "properties": {
  29610. "executed": {
  29611. "type": "boolean"
  29612. },
  29613. "metadata": {
  29614. "type": "object",
  29615. "additionalProperties": {
  29616. "type": "object"
  29617. }
  29618. }
  29619. },
  29620. "required": ["executed"],
  29621. "additionalProperties": false
  29622. }
  29623. },
  29624. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  29625. "additionalProperties": false
  29626. }
  29627. },
  29628. "required": ["id", "type", "data"],
  29629. "additionalProperties": false
  29630. },
  29631. "V2EventSessionNextRetried": {
  29632. "type": "object",
  29633. "properties": {
  29634. "id": {
  29635. "type": "string",
  29636. "pattern": "^evt_"
  29637. },
  29638. "metadata": {
  29639. "type": "object"
  29640. },
  29641. "durable": {
  29642. "type": "object",
  29643. "properties": {
  29644. "aggregateID": {
  29645. "type": "string"
  29646. },
  29647. "seq": {
  29648. "type": "integer"
  29649. },
  29650. "version": {
  29651. "type": "integer"
  29652. }
  29653. },
  29654. "required": ["aggregateID", "seq", "version"],
  29655. "additionalProperties": false
  29656. },
  29657. "location": {
  29658. "$ref": "#/components/schemas/LocationRef"
  29659. },
  29660. "type": {
  29661. "type": "string",
  29662. "enum": ["session.next.retried"]
  29663. },
  29664. "data": {
  29665. "type": "object",
  29666. "properties": {
  29667. "timestamp": {
  29668. "type": "number"
  29669. },
  29670. "sessionID": {
  29671. "type": "string",
  29672. "pattern": "^ses"
  29673. },
  29674. "attempt": {
  29675. "type": "number"
  29676. },
  29677. "error": {
  29678. "$ref": "#/components/schemas/SessionNextRetry_error"
  29679. }
  29680. },
  29681. "required": ["timestamp", "sessionID", "attempt", "error"],
  29682. "additionalProperties": false
  29683. }
  29684. },
  29685. "required": ["id", "type", "data"],
  29686. "additionalProperties": false
  29687. },
  29688. "V2EventSessionNextCompactionStarted": {
  29689. "type": "object",
  29690. "properties": {
  29691. "id": {
  29692. "type": "string",
  29693. "pattern": "^evt_"
  29694. },
  29695. "metadata": {
  29696. "type": "object"
  29697. },
  29698. "durable": {
  29699. "type": "object",
  29700. "properties": {
  29701. "aggregateID": {
  29702. "type": "string"
  29703. },
  29704. "seq": {
  29705. "type": "integer"
  29706. },
  29707. "version": {
  29708. "type": "integer"
  29709. }
  29710. },
  29711. "required": ["aggregateID", "seq", "version"],
  29712. "additionalProperties": false
  29713. },
  29714. "location": {
  29715. "$ref": "#/components/schemas/LocationRef"
  29716. },
  29717. "type": {
  29718. "type": "string",
  29719. "enum": ["session.next.compaction.started"]
  29720. },
  29721. "data": {
  29722. "type": "object",
  29723. "properties": {
  29724. "timestamp": {
  29725. "type": "number"
  29726. },
  29727. "sessionID": {
  29728. "type": "string",
  29729. "pattern": "^ses"
  29730. },
  29731. "messageID": {
  29732. "type": "string",
  29733. "pattern": "^msg_"
  29734. },
  29735. "reason": {
  29736. "type": "string",
  29737. "enum": ["auto", "manual"]
  29738. }
  29739. },
  29740. "required": ["timestamp", "sessionID", "messageID", "reason"],
  29741. "additionalProperties": false
  29742. }
  29743. },
  29744. "required": ["id", "type", "data"],
  29745. "additionalProperties": false
  29746. },
  29747. "V2EventSessionNextCompactionDelta": {
  29748. "type": "object",
  29749. "properties": {
  29750. "id": {
  29751. "type": "string",
  29752. "pattern": "^evt_"
  29753. },
  29754. "metadata": {
  29755. "type": "object"
  29756. },
  29757. "durable": {
  29758. "type": "object",
  29759. "properties": {
  29760. "aggregateID": {
  29761. "type": "string"
  29762. },
  29763. "seq": {
  29764. "type": "integer"
  29765. },
  29766. "version": {
  29767. "type": "integer"
  29768. }
  29769. },
  29770. "required": ["aggregateID", "seq", "version"],
  29771. "additionalProperties": false
  29772. },
  29773. "location": {
  29774. "$ref": "#/components/schemas/LocationRef"
  29775. },
  29776. "type": {
  29777. "type": "string",
  29778. "enum": ["session.next.compaction.delta"]
  29779. },
  29780. "data": {
  29781. "type": "object",
  29782. "properties": {
  29783. "timestamp": {
  29784. "type": "number"
  29785. },
  29786. "sessionID": {
  29787. "type": "string",
  29788. "pattern": "^ses"
  29789. },
  29790. "messageID": {
  29791. "type": "string",
  29792. "pattern": "^msg_"
  29793. },
  29794. "text": {
  29795. "type": "string"
  29796. }
  29797. },
  29798. "required": ["timestamp", "sessionID", "messageID", "text"],
  29799. "additionalProperties": false
  29800. }
  29801. },
  29802. "required": ["id", "type", "data"],
  29803. "additionalProperties": false
  29804. },
  29805. "V2EventSessionNextCompactionEnded": {
  29806. "type": "object",
  29807. "properties": {
  29808. "id": {
  29809. "type": "string",
  29810. "pattern": "^evt_"
  29811. },
  29812. "metadata": {
  29813. "type": "object"
  29814. },
  29815. "durable": {
  29816. "type": "object",
  29817. "properties": {
  29818. "aggregateID": {
  29819. "type": "string"
  29820. },
  29821. "seq": {
  29822. "type": "integer"
  29823. },
  29824. "version": {
  29825. "type": "integer"
  29826. }
  29827. },
  29828. "required": ["aggregateID", "seq", "version"],
  29829. "additionalProperties": false
  29830. },
  29831. "location": {
  29832. "$ref": "#/components/schemas/LocationRef"
  29833. },
  29834. "type": {
  29835. "type": "string",
  29836. "enum": ["session.next.compaction.ended"]
  29837. },
  29838. "data": {
  29839. "type": "object",
  29840. "properties": {
  29841. "timestamp": {
  29842. "type": "number"
  29843. },
  29844. "sessionID": {
  29845. "type": "string",
  29846. "pattern": "^ses"
  29847. },
  29848. "messageID": {
  29849. "type": "string",
  29850. "pattern": "^msg_"
  29851. },
  29852. "reason": {
  29853. "type": "string",
  29854. "enum": ["auto", "manual"]
  29855. },
  29856. "text": {
  29857. "type": "string"
  29858. },
  29859. "recent": {
  29860. "type": "string"
  29861. }
  29862. },
  29863. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  29864. "additionalProperties": false
  29865. }
  29866. },
  29867. "required": ["id", "type", "data"],
  29868. "additionalProperties": false
  29869. },
  29870. "V2EventMessagePartDelta": {
  29871. "type": "object",
  29872. "properties": {
  29873. "id": {
  29874. "type": "string",
  29875. "pattern": "^evt_"
  29876. },
  29877. "metadata": {
  29878. "type": "object"
  29879. },
  29880. "durable": {
  29881. "type": "object",
  29882. "properties": {
  29883. "aggregateID": {
  29884. "type": "string"
  29885. },
  29886. "seq": {
  29887. "type": "integer"
  29888. },
  29889. "version": {
  29890. "type": "integer"
  29891. }
  29892. },
  29893. "required": ["aggregateID", "seq", "version"],
  29894. "additionalProperties": false
  29895. },
  29896. "location": {
  29897. "$ref": "#/components/schemas/LocationRef"
  29898. },
  29899. "type": {
  29900. "type": "string",
  29901. "enum": ["message.part.delta"]
  29902. },
  29903. "data": {
  29904. "type": "object",
  29905. "properties": {
  29906. "sessionID": {
  29907. "type": "string",
  29908. "pattern": "^ses"
  29909. },
  29910. "messageID": {
  29911. "type": "string",
  29912. "pattern": "^msg"
  29913. },
  29914. "partID": {
  29915. "type": "string",
  29916. "pattern": "^prt"
  29917. },
  29918. "field": {
  29919. "type": "string"
  29920. },
  29921. "delta": {
  29922. "type": "string"
  29923. }
  29924. },
  29925. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  29926. "additionalProperties": false
  29927. }
  29928. },
  29929. "required": ["id", "type", "data"],
  29930. "additionalProperties": false
  29931. },
  29932. "V2EventSessionDiff": {
  29933. "type": "object",
  29934. "properties": {
  29935. "id": {
  29936. "type": "string",
  29937. "pattern": "^evt_"
  29938. },
  29939. "metadata": {
  29940. "type": "object"
  29941. },
  29942. "durable": {
  29943. "type": "object",
  29944. "properties": {
  29945. "aggregateID": {
  29946. "type": "string"
  29947. },
  29948. "seq": {
  29949. "type": "integer"
  29950. },
  29951. "version": {
  29952. "type": "integer"
  29953. }
  29954. },
  29955. "required": ["aggregateID", "seq", "version"],
  29956. "additionalProperties": false
  29957. },
  29958. "location": {
  29959. "$ref": "#/components/schemas/LocationRef"
  29960. },
  29961. "type": {
  29962. "type": "string",
  29963. "enum": ["session.diff"]
  29964. },
  29965. "data": {
  29966. "type": "object",
  29967. "properties": {
  29968. "sessionID": {
  29969. "type": "string",
  29970. "pattern": "^ses"
  29971. },
  29972. "diff": {
  29973. "type": "array",
  29974. "items": {
  29975. "$ref": "#/components/schemas/SnapshotFileDiff"
  29976. }
  29977. }
  29978. },
  29979. "required": ["sessionID", "diff"],
  29980. "additionalProperties": false
  29981. }
  29982. },
  29983. "required": ["id", "type", "data"],
  29984. "additionalProperties": false
  29985. },
  29986. "V2EventSessionError": {
  29987. "type": "object",
  29988. "properties": {
  29989. "id": {
  29990. "type": "string",
  29991. "pattern": "^evt_"
  29992. },
  29993. "metadata": {
  29994. "type": "object"
  29995. },
  29996. "durable": {
  29997. "type": "object",
  29998. "properties": {
  29999. "aggregateID": {
  30000. "type": "string"
  30001. },
  30002. "seq": {
  30003. "type": "integer"
  30004. },
  30005. "version": {
  30006. "type": "integer"
  30007. }
  30008. },
  30009. "required": ["aggregateID", "seq", "version"],
  30010. "additionalProperties": false
  30011. },
  30012. "location": {
  30013. "$ref": "#/components/schemas/LocationRef"
  30014. },
  30015. "type": {
  30016. "type": "string",
  30017. "enum": ["session.error"]
  30018. },
  30019. "data": {
  30020. "type": "object",
  30021. "properties": {
  30022. "sessionID": {
  30023. "type": "string",
  30024. "pattern": "^ses"
  30025. },
  30026. "error": {
  30027. "anyOf": [
  30028. {
  30029. "$ref": "#/components/schemas/ProviderAuthError"
  30030. },
  30031. {
  30032. "$ref": "#/components/schemas/UnknownError"
  30033. },
  30034. {
  30035. "$ref": "#/components/schemas/MessageOutputLengthError"
  30036. },
  30037. {
  30038. "$ref": "#/components/schemas/MessageAbortedError"
  30039. },
  30040. {
  30041. "$ref": "#/components/schemas/StructuredOutputError"
  30042. },
  30043. {
  30044. "$ref": "#/components/schemas/ContextOverflowError"
  30045. },
  30046. {
  30047. "$ref": "#/components/schemas/ContentFilterError"
  30048. },
  30049. {
  30050. "$ref": "#/components/schemas/APIError"
  30051. }
  30052. ]
  30053. }
  30054. },
  30055. "additionalProperties": false
  30056. }
  30057. },
  30058. "required": ["id", "type", "data"],
  30059. "additionalProperties": false
  30060. },
  30061. "V2EventInstallationUpdated": {
  30062. "type": "object",
  30063. "properties": {
  30064. "id": {
  30065. "type": "string",
  30066. "pattern": "^evt_"
  30067. },
  30068. "metadata": {
  30069. "type": "object"
  30070. },
  30071. "durable": {
  30072. "type": "object",
  30073. "properties": {
  30074. "aggregateID": {
  30075. "type": "string"
  30076. },
  30077. "seq": {
  30078. "type": "integer"
  30079. },
  30080. "version": {
  30081. "type": "integer"
  30082. }
  30083. },
  30084. "required": ["aggregateID", "seq", "version"],
  30085. "additionalProperties": false
  30086. },
  30087. "location": {
  30088. "$ref": "#/components/schemas/LocationRef"
  30089. },
  30090. "type": {
  30091. "type": "string",
  30092. "enum": ["installation.updated"]
  30093. },
  30094. "data": {
  30095. "type": "object",
  30096. "properties": {
  30097. "version": {
  30098. "type": "string"
  30099. }
  30100. },
  30101. "required": ["version"],
  30102. "additionalProperties": false
  30103. }
  30104. },
  30105. "required": ["id", "type", "data"],
  30106. "additionalProperties": false
  30107. },
  30108. "V2EventInstallationUpdate-available": {
  30109. "type": "object",
  30110. "properties": {
  30111. "id": {
  30112. "type": "string",
  30113. "pattern": "^evt_"
  30114. },
  30115. "metadata": {
  30116. "type": "object"
  30117. },
  30118. "durable": {
  30119. "type": "object",
  30120. "properties": {
  30121. "aggregateID": {
  30122. "type": "string"
  30123. },
  30124. "seq": {
  30125. "type": "integer"
  30126. },
  30127. "version": {
  30128. "type": "integer"
  30129. }
  30130. },
  30131. "required": ["aggregateID", "seq", "version"],
  30132. "additionalProperties": false
  30133. },
  30134. "location": {
  30135. "$ref": "#/components/schemas/LocationRef"
  30136. },
  30137. "type": {
  30138. "type": "string",
  30139. "enum": ["installation.update-available"]
  30140. },
  30141. "data": {
  30142. "type": "object",
  30143. "properties": {
  30144. "version": {
  30145. "type": "string"
  30146. }
  30147. },
  30148. "required": ["version"],
  30149. "additionalProperties": false
  30150. }
  30151. },
  30152. "required": ["id", "type", "data"],
  30153. "additionalProperties": false
  30154. },
  30155. "V2EventFileEdited": {
  30156. "type": "object",
  30157. "properties": {
  30158. "id": {
  30159. "type": "string",
  30160. "pattern": "^evt_"
  30161. },
  30162. "metadata": {
  30163. "type": "object"
  30164. },
  30165. "durable": {
  30166. "type": "object",
  30167. "properties": {
  30168. "aggregateID": {
  30169. "type": "string"
  30170. },
  30171. "seq": {
  30172. "type": "integer"
  30173. },
  30174. "version": {
  30175. "type": "integer"
  30176. }
  30177. },
  30178. "required": ["aggregateID", "seq", "version"],
  30179. "additionalProperties": false
  30180. },
  30181. "location": {
  30182. "$ref": "#/components/schemas/LocationRef"
  30183. },
  30184. "type": {
  30185. "type": "string",
  30186. "enum": ["file.edited"]
  30187. },
  30188. "data": {
  30189. "type": "object",
  30190. "properties": {
  30191. "file": {
  30192. "type": "string"
  30193. }
  30194. },
  30195. "required": ["file"],
  30196. "additionalProperties": false
  30197. }
  30198. },
  30199. "required": ["id", "type", "data"],
  30200. "additionalProperties": false
  30201. },
  30202. "V2EventReferenceUpdated": {
  30203. "type": "object",
  30204. "properties": {
  30205. "id": {
  30206. "type": "string",
  30207. "pattern": "^evt_"
  30208. },
  30209. "metadata": {
  30210. "type": "object"
  30211. },
  30212. "durable": {
  30213. "type": "object",
  30214. "properties": {
  30215. "aggregateID": {
  30216. "type": "string"
  30217. },
  30218. "seq": {
  30219. "type": "integer"
  30220. },
  30221. "version": {
  30222. "type": "integer"
  30223. }
  30224. },
  30225. "required": ["aggregateID", "seq", "version"],
  30226. "additionalProperties": false
  30227. },
  30228. "location": {
  30229. "$ref": "#/components/schemas/LocationRef"
  30230. },
  30231. "type": {
  30232. "type": "string",
  30233. "enum": ["reference.updated"]
  30234. },
  30235. "data": {
  30236. "type": "object",
  30237. "properties": {}
  30238. }
  30239. },
  30240. "required": ["id", "type", "data"],
  30241. "additionalProperties": false
  30242. },
  30243. "V2EventPermissionV2Asked": {
  30244. "type": "object",
  30245. "properties": {
  30246. "id": {
  30247. "type": "string",
  30248. "pattern": "^evt_"
  30249. },
  30250. "metadata": {
  30251. "type": "object"
  30252. },
  30253. "durable": {
  30254. "type": "object",
  30255. "properties": {
  30256. "aggregateID": {
  30257. "type": "string"
  30258. },
  30259. "seq": {
  30260. "type": "integer"
  30261. },
  30262. "version": {
  30263. "type": "integer"
  30264. }
  30265. },
  30266. "required": ["aggregateID", "seq", "version"],
  30267. "additionalProperties": false
  30268. },
  30269. "location": {
  30270. "$ref": "#/components/schemas/LocationRef"
  30271. },
  30272. "type": {
  30273. "type": "string",
  30274. "enum": ["permission.v2.asked"]
  30275. },
  30276. "data": {
  30277. "type": "object",
  30278. "properties": {
  30279. "id": {
  30280. "type": "string",
  30281. "pattern": "^per"
  30282. },
  30283. "sessionID": {
  30284. "type": "string",
  30285. "pattern": "^ses"
  30286. },
  30287. "action": {
  30288. "type": "string"
  30289. },
  30290. "resources": {
  30291. "type": "array",
  30292. "items": {
  30293. "type": "string"
  30294. }
  30295. },
  30296. "save": {
  30297. "type": "array",
  30298. "items": {
  30299. "type": "string"
  30300. }
  30301. },
  30302. "metadata": {
  30303. "type": "object"
  30304. },
  30305. "source": {
  30306. "$ref": "#/components/schemas/PermissionV2Source"
  30307. }
  30308. },
  30309. "required": ["id", "sessionID", "action", "resources"],
  30310. "additionalProperties": false
  30311. }
  30312. },
  30313. "required": ["id", "type", "data"],
  30314. "additionalProperties": false
  30315. },
  30316. "V2EventPermissionV2Replied": {
  30317. "type": "object",
  30318. "properties": {
  30319. "id": {
  30320. "type": "string",
  30321. "pattern": "^evt_"
  30322. },
  30323. "metadata": {
  30324. "type": "object"
  30325. },
  30326. "durable": {
  30327. "type": "object",
  30328. "properties": {
  30329. "aggregateID": {
  30330. "type": "string"
  30331. },
  30332. "seq": {
  30333. "type": "integer"
  30334. },
  30335. "version": {
  30336. "type": "integer"
  30337. }
  30338. },
  30339. "required": ["aggregateID", "seq", "version"],
  30340. "additionalProperties": false
  30341. },
  30342. "location": {
  30343. "$ref": "#/components/schemas/LocationRef"
  30344. },
  30345. "type": {
  30346. "type": "string",
  30347. "enum": ["permission.v2.replied"]
  30348. },
  30349. "data": {
  30350. "type": "object",
  30351. "properties": {
  30352. "sessionID": {
  30353. "type": "string",
  30354. "pattern": "^ses"
  30355. },
  30356. "requestID": {
  30357. "type": "string",
  30358. "pattern": "^per"
  30359. },
  30360. "reply": {
  30361. "$ref": "#/components/schemas/PermissionV2Reply"
  30362. }
  30363. },
  30364. "required": ["sessionID", "requestID", "reply"],
  30365. "additionalProperties": false
  30366. }
  30367. },
  30368. "required": ["id", "type", "data"],
  30369. "additionalProperties": false
  30370. },
  30371. "V2EventPluginAdded": {
  30372. "type": "object",
  30373. "properties": {
  30374. "id": {
  30375. "type": "string",
  30376. "pattern": "^evt_"
  30377. },
  30378. "metadata": {
  30379. "type": "object"
  30380. },
  30381. "durable": {
  30382. "type": "object",
  30383. "properties": {
  30384. "aggregateID": {
  30385. "type": "string"
  30386. },
  30387. "seq": {
  30388. "type": "integer"
  30389. },
  30390. "version": {
  30391. "type": "integer"
  30392. }
  30393. },
  30394. "required": ["aggregateID", "seq", "version"],
  30395. "additionalProperties": false
  30396. },
  30397. "location": {
  30398. "$ref": "#/components/schemas/LocationRef"
  30399. },
  30400. "type": {
  30401. "type": "string",
  30402. "enum": ["plugin.added"]
  30403. },
  30404. "data": {
  30405. "type": "object",
  30406. "properties": {
  30407. "id": {
  30408. "type": "string"
  30409. }
  30410. },
  30411. "required": ["id"],
  30412. "additionalProperties": false
  30413. }
  30414. },
  30415. "required": ["id", "type", "data"],
  30416. "additionalProperties": false
  30417. },
  30418. "V2EventProjectDirectoriesUpdated": {
  30419. "type": "object",
  30420. "properties": {
  30421. "id": {
  30422. "type": "string",
  30423. "pattern": "^evt_"
  30424. },
  30425. "metadata": {
  30426. "type": "object"
  30427. },
  30428. "durable": {
  30429. "type": "object",
  30430. "properties": {
  30431. "aggregateID": {
  30432. "type": "string"
  30433. },
  30434. "seq": {
  30435. "type": "integer"
  30436. },
  30437. "version": {
  30438. "type": "integer"
  30439. }
  30440. },
  30441. "required": ["aggregateID", "seq", "version"],
  30442. "additionalProperties": false
  30443. },
  30444. "location": {
  30445. "$ref": "#/components/schemas/LocationRef"
  30446. },
  30447. "type": {
  30448. "type": "string",
  30449. "enum": ["project.directories.updated"]
  30450. },
  30451. "data": {
  30452. "type": "object",
  30453. "properties": {
  30454. "projectID": {
  30455. "type": "string"
  30456. }
  30457. },
  30458. "required": ["projectID"],
  30459. "additionalProperties": false
  30460. }
  30461. },
  30462. "required": ["id", "type", "data"],
  30463. "additionalProperties": false
  30464. },
  30465. "V2EventFileWatcherUpdated": {
  30466. "type": "object",
  30467. "properties": {
  30468. "id": {
  30469. "type": "string",
  30470. "pattern": "^evt_"
  30471. },
  30472. "metadata": {
  30473. "type": "object"
  30474. },
  30475. "durable": {
  30476. "type": "object",
  30477. "properties": {
  30478. "aggregateID": {
  30479. "type": "string"
  30480. },
  30481. "seq": {
  30482. "type": "integer"
  30483. },
  30484. "version": {
  30485. "type": "integer"
  30486. }
  30487. },
  30488. "required": ["aggregateID", "seq", "version"],
  30489. "additionalProperties": false
  30490. },
  30491. "location": {
  30492. "$ref": "#/components/schemas/LocationRef"
  30493. },
  30494. "type": {
  30495. "type": "string",
  30496. "enum": ["file.watcher.updated"]
  30497. },
  30498. "data": {
  30499. "type": "object",
  30500. "properties": {
  30501. "file": {
  30502. "type": "string"
  30503. },
  30504. "event": {
  30505. "type": "string",
  30506. "enum": ["add", "change", "unlink"]
  30507. }
  30508. },
  30509. "required": ["file", "event"],
  30510. "additionalProperties": false
  30511. }
  30512. },
  30513. "required": ["id", "type", "data"],
  30514. "additionalProperties": false
  30515. },
  30516. "V2EventPtyCreated": {
  30517. "type": "object",
  30518. "properties": {
  30519. "id": {
  30520. "type": "string",
  30521. "pattern": "^evt_"
  30522. },
  30523. "metadata": {
  30524. "type": "object"
  30525. },
  30526. "durable": {
  30527. "type": "object",
  30528. "properties": {
  30529. "aggregateID": {
  30530. "type": "string"
  30531. },
  30532. "seq": {
  30533. "type": "integer"
  30534. },
  30535. "version": {
  30536. "type": "integer"
  30537. }
  30538. },
  30539. "required": ["aggregateID", "seq", "version"],
  30540. "additionalProperties": false
  30541. },
  30542. "location": {
  30543. "$ref": "#/components/schemas/LocationRef"
  30544. },
  30545. "type": {
  30546. "type": "string",
  30547. "enum": ["pty.created"]
  30548. },
  30549. "data": {
  30550. "type": "object",
  30551. "properties": {
  30552. "info": {
  30553. "$ref": "#/components/schemas/Pty"
  30554. }
  30555. },
  30556. "required": ["info"],
  30557. "additionalProperties": false
  30558. }
  30559. },
  30560. "required": ["id", "type", "data"],
  30561. "additionalProperties": false
  30562. },
  30563. "V2EventPtyUpdated": {
  30564. "type": "object",
  30565. "properties": {
  30566. "id": {
  30567. "type": "string",
  30568. "pattern": "^evt_"
  30569. },
  30570. "metadata": {
  30571. "type": "object"
  30572. },
  30573. "durable": {
  30574. "type": "object",
  30575. "properties": {
  30576. "aggregateID": {
  30577. "type": "string"
  30578. },
  30579. "seq": {
  30580. "type": "integer"
  30581. },
  30582. "version": {
  30583. "type": "integer"
  30584. }
  30585. },
  30586. "required": ["aggregateID", "seq", "version"],
  30587. "additionalProperties": false
  30588. },
  30589. "location": {
  30590. "$ref": "#/components/schemas/LocationRef"
  30591. },
  30592. "type": {
  30593. "type": "string",
  30594. "enum": ["pty.updated"]
  30595. },
  30596. "data": {
  30597. "type": "object",
  30598. "properties": {
  30599. "info": {
  30600. "$ref": "#/components/schemas/Pty"
  30601. }
  30602. },
  30603. "required": ["info"],
  30604. "additionalProperties": false
  30605. }
  30606. },
  30607. "required": ["id", "type", "data"],
  30608. "additionalProperties": false
  30609. },
  30610. "V2EventPtyExited": {
  30611. "type": "object",
  30612. "properties": {
  30613. "id": {
  30614. "type": "string",
  30615. "pattern": "^evt_"
  30616. },
  30617. "metadata": {
  30618. "type": "object"
  30619. },
  30620. "durable": {
  30621. "type": "object",
  30622. "properties": {
  30623. "aggregateID": {
  30624. "type": "string"
  30625. },
  30626. "seq": {
  30627. "type": "integer"
  30628. },
  30629. "version": {
  30630. "type": "integer"
  30631. }
  30632. },
  30633. "required": ["aggregateID", "seq", "version"],
  30634. "additionalProperties": false
  30635. },
  30636. "location": {
  30637. "$ref": "#/components/schemas/LocationRef"
  30638. },
  30639. "type": {
  30640. "type": "string",
  30641. "enum": ["pty.exited"]
  30642. },
  30643. "data": {
  30644. "type": "object",
  30645. "properties": {
  30646. "id": {
  30647. "type": "string",
  30648. "pattern": "^pty"
  30649. },
  30650. "exitCode": {
  30651. "type": "integer",
  30652. "minimum": 0
  30653. }
  30654. },
  30655. "required": ["id", "exitCode"],
  30656. "additionalProperties": false
  30657. }
  30658. },
  30659. "required": ["id", "type", "data"],
  30660. "additionalProperties": false
  30661. },
  30662. "V2EventPtyDeleted": {
  30663. "type": "object",
  30664. "properties": {
  30665. "id": {
  30666. "type": "string",
  30667. "pattern": "^evt_"
  30668. },
  30669. "metadata": {
  30670. "type": "object"
  30671. },
  30672. "durable": {
  30673. "type": "object",
  30674. "properties": {
  30675. "aggregateID": {
  30676. "type": "string"
  30677. },
  30678. "seq": {
  30679. "type": "integer"
  30680. },
  30681. "version": {
  30682. "type": "integer"
  30683. }
  30684. },
  30685. "required": ["aggregateID", "seq", "version"],
  30686. "additionalProperties": false
  30687. },
  30688. "location": {
  30689. "$ref": "#/components/schemas/LocationRef"
  30690. },
  30691. "type": {
  30692. "type": "string",
  30693. "enum": ["pty.deleted"]
  30694. },
  30695. "data": {
  30696. "type": "object",
  30697. "properties": {
  30698. "id": {
  30699. "type": "string",
  30700. "pattern": "^pty"
  30701. }
  30702. },
  30703. "required": ["id"],
  30704. "additionalProperties": false
  30705. }
  30706. },
  30707. "required": ["id", "type", "data"],
  30708. "additionalProperties": false
  30709. },
  30710. "V2EventQuestionV2Asked": {
  30711. "type": "object",
  30712. "properties": {
  30713. "id": {
  30714. "type": "string",
  30715. "pattern": "^evt_"
  30716. },
  30717. "metadata": {
  30718. "type": "object"
  30719. },
  30720. "durable": {
  30721. "type": "object",
  30722. "properties": {
  30723. "aggregateID": {
  30724. "type": "string"
  30725. },
  30726. "seq": {
  30727. "type": "integer"
  30728. },
  30729. "version": {
  30730. "type": "integer"
  30731. }
  30732. },
  30733. "required": ["aggregateID", "seq", "version"],
  30734. "additionalProperties": false
  30735. },
  30736. "location": {
  30737. "$ref": "#/components/schemas/LocationRef"
  30738. },
  30739. "type": {
  30740. "type": "string",
  30741. "enum": ["question.v2.asked"]
  30742. },
  30743. "data": {
  30744. "type": "object",
  30745. "properties": {
  30746. "id": {
  30747. "type": "string",
  30748. "pattern": "^que"
  30749. },
  30750. "sessionID": {
  30751. "type": "string",
  30752. "pattern": "^ses"
  30753. },
  30754. "questions": {
  30755. "type": "array",
  30756. "items": {
  30757. "$ref": "#/components/schemas/QuestionV2Info"
  30758. },
  30759. "description": "Questions to ask"
  30760. },
  30761. "tool": {
  30762. "$ref": "#/components/schemas/QuestionV2Tool"
  30763. }
  30764. },
  30765. "required": ["id", "sessionID", "questions"],
  30766. "additionalProperties": false
  30767. }
  30768. },
  30769. "required": ["id", "type", "data"],
  30770. "additionalProperties": false
  30771. },
  30772. "V2EventQuestionV2Replied": {
  30773. "type": "object",
  30774. "properties": {
  30775. "id": {
  30776. "type": "string",
  30777. "pattern": "^evt_"
  30778. },
  30779. "metadata": {
  30780. "type": "object"
  30781. },
  30782. "durable": {
  30783. "type": "object",
  30784. "properties": {
  30785. "aggregateID": {
  30786. "type": "string"
  30787. },
  30788. "seq": {
  30789. "type": "integer"
  30790. },
  30791. "version": {
  30792. "type": "integer"
  30793. }
  30794. },
  30795. "required": ["aggregateID", "seq", "version"],
  30796. "additionalProperties": false
  30797. },
  30798. "location": {
  30799. "$ref": "#/components/schemas/LocationRef"
  30800. },
  30801. "type": {
  30802. "type": "string",
  30803. "enum": ["question.v2.replied"]
  30804. },
  30805. "data": {
  30806. "type": "object",
  30807. "properties": {
  30808. "sessionID": {
  30809. "type": "string",
  30810. "pattern": "^ses"
  30811. },
  30812. "requestID": {
  30813. "type": "string",
  30814. "pattern": "^que"
  30815. },
  30816. "answers": {
  30817. "type": "array",
  30818. "items": {
  30819. "$ref": "#/components/schemas/QuestionV2Answer"
  30820. }
  30821. }
  30822. },
  30823. "required": ["sessionID", "requestID", "answers"],
  30824. "additionalProperties": false
  30825. }
  30826. },
  30827. "required": ["id", "type", "data"],
  30828. "additionalProperties": false
  30829. },
  30830. "V2EventQuestionV2Rejected": {
  30831. "type": "object",
  30832. "properties": {
  30833. "id": {
  30834. "type": "string",
  30835. "pattern": "^evt_"
  30836. },
  30837. "metadata": {
  30838. "type": "object"
  30839. },
  30840. "durable": {
  30841. "type": "object",
  30842. "properties": {
  30843. "aggregateID": {
  30844. "type": "string"
  30845. },
  30846. "seq": {
  30847. "type": "integer"
  30848. },
  30849. "version": {
  30850. "type": "integer"
  30851. }
  30852. },
  30853. "required": ["aggregateID", "seq", "version"],
  30854. "additionalProperties": false
  30855. },
  30856. "location": {
  30857. "$ref": "#/components/schemas/LocationRef"
  30858. },
  30859. "type": {
  30860. "type": "string",
  30861. "enum": ["question.v2.rejected"]
  30862. },
  30863. "data": {
  30864. "type": "object",
  30865. "properties": {
  30866. "sessionID": {
  30867. "type": "string",
  30868. "pattern": "^ses"
  30869. },
  30870. "requestID": {
  30871. "type": "string",
  30872. "pattern": "^que"
  30873. }
  30874. },
  30875. "required": ["sessionID", "requestID"],
  30876. "additionalProperties": false
  30877. }
  30878. },
  30879. "required": ["id", "type", "data"],
  30880. "additionalProperties": false
  30881. },
  30882. "V2EventTodoUpdated": {
  30883. "type": "object",
  30884. "properties": {
  30885. "id": {
  30886. "type": "string",
  30887. "pattern": "^evt_"
  30888. },
  30889. "metadata": {
  30890. "type": "object"
  30891. },
  30892. "durable": {
  30893. "type": "object",
  30894. "properties": {
  30895. "aggregateID": {
  30896. "type": "string"
  30897. },
  30898. "seq": {
  30899. "type": "integer"
  30900. },
  30901. "version": {
  30902. "type": "integer"
  30903. }
  30904. },
  30905. "required": ["aggregateID", "seq", "version"],
  30906. "additionalProperties": false
  30907. },
  30908. "location": {
  30909. "$ref": "#/components/schemas/LocationRef"
  30910. },
  30911. "type": {
  30912. "type": "string",
  30913. "enum": ["todo.updated"]
  30914. },
  30915. "data": {
  30916. "type": "object",
  30917. "properties": {
  30918. "sessionID": {
  30919. "type": "string",
  30920. "pattern": "^ses"
  30921. },
  30922. "todos": {
  30923. "type": "array",
  30924. "items": {
  30925. "$ref": "#/components/schemas/Todo"
  30926. }
  30927. }
  30928. },
  30929. "required": ["sessionID", "todos"],
  30930. "additionalProperties": false
  30931. }
  30932. },
  30933. "required": ["id", "type", "data"],
  30934. "additionalProperties": false
  30935. },
  30936. "V2EventLspUpdated": {
  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": ["lsp.updated"]
  30968. },
  30969. "data": {
  30970. "type": "object",
  30971. "properties": {}
  30972. }
  30973. },
  30974. "required": ["id", "type", "data"],
  30975. "additionalProperties": false
  30976. },
  30977. "V2EventPermissionAsked": {
  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.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. "permission": {
  31022. "type": "string"
  31023. },
  31024. "patterns": {
  31025. "type": "array",
  31026. "items": {
  31027. "type": "string"
  31028. }
  31029. },
  31030. "metadata": {
  31031. "type": "object"
  31032. },
  31033. "always": {
  31034. "type": "array",
  31035. "items": {
  31036. "type": "string"
  31037. }
  31038. },
  31039. "tool": {
  31040. "type": "object",
  31041. "properties": {
  31042. "messageID": {
  31043. "type": "string"
  31044. },
  31045. "callID": {
  31046. "type": "string"
  31047. }
  31048. },
  31049. "required": ["messageID", "callID"],
  31050. "additionalProperties": false
  31051. }
  31052. },
  31053. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  31054. "additionalProperties": false
  31055. }
  31056. },
  31057. "required": ["id", "type", "data"],
  31058. "additionalProperties": false
  31059. },
  31060. "V2EventPermissionReplied": {
  31061. "type": "object",
  31062. "properties": {
  31063. "id": {
  31064. "type": "string",
  31065. "pattern": "^evt_"
  31066. },
  31067. "metadata": {
  31068. "type": "object"
  31069. },
  31070. "durable": {
  31071. "type": "object",
  31072. "properties": {
  31073. "aggregateID": {
  31074. "type": "string"
  31075. },
  31076. "seq": {
  31077. "type": "integer"
  31078. },
  31079. "version": {
  31080. "type": "integer"
  31081. }
  31082. },
  31083. "required": ["aggregateID", "seq", "version"],
  31084. "additionalProperties": false
  31085. },
  31086. "location": {
  31087. "$ref": "#/components/schemas/LocationRef"
  31088. },
  31089. "type": {
  31090. "type": "string",
  31091. "enum": ["permission.replied"]
  31092. },
  31093. "data": {
  31094. "type": "object",
  31095. "properties": {
  31096. "sessionID": {
  31097. "type": "string",
  31098. "pattern": "^ses"
  31099. },
  31100. "requestID": {
  31101. "type": "string",
  31102. "pattern": "^per"
  31103. },
  31104. "reply": {
  31105. "type": "string",
  31106. "enum": ["once", "always", "reject"]
  31107. }
  31108. },
  31109. "required": ["sessionID", "requestID", "reply"],
  31110. "additionalProperties": false
  31111. }
  31112. },
  31113. "required": ["id", "type", "data"],
  31114. "additionalProperties": false
  31115. },
  31116. "V2EventTuiPromptAppend": {
  31117. "type": "object",
  31118. "properties": {
  31119. "id": {
  31120. "type": "string",
  31121. "pattern": "^evt_"
  31122. },
  31123. "metadata": {
  31124. "type": "object"
  31125. },
  31126. "durable": {
  31127. "type": "object",
  31128. "properties": {
  31129. "aggregateID": {
  31130. "type": "string"
  31131. },
  31132. "seq": {
  31133. "type": "integer"
  31134. },
  31135. "version": {
  31136. "type": "integer"
  31137. }
  31138. },
  31139. "required": ["aggregateID", "seq", "version"],
  31140. "additionalProperties": false
  31141. },
  31142. "location": {
  31143. "$ref": "#/components/schemas/LocationRef"
  31144. },
  31145. "type": {
  31146. "type": "string",
  31147. "enum": ["tui.prompt.append"]
  31148. },
  31149. "data": {
  31150. "type": "object",
  31151. "properties": {
  31152. "text": {
  31153. "type": "string"
  31154. }
  31155. },
  31156. "required": ["text"],
  31157. "additionalProperties": false
  31158. }
  31159. },
  31160. "required": ["id", "type", "data"],
  31161. "additionalProperties": false
  31162. },
  31163. "V2EventTuiCommandExecute": {
  31164. "type": "object",
  31165. "properties": {
  31166. "id": {
  31167. "type": "string",
  31168. "pattern": "^evt_"
  31169. },
  31170. "metadata": {
  31171. "type": "object"
  31172. },
  31173. "durable": {
  31174. "type": "object",
  31175. "properties": {
  31176. "aggregateID": {
  31177. "type": "string"
  31178. },
  31179. "seq": {
  31180. "type": "integer"
  31181. },
  31182. "version": {
  31183. "type": "integer"
  31184. }
  31185. },
  31186. "required": ["aggregateID", "seq", "version"],
  31187. "additionalProperties": false
  31188. },
  31189. "location": {
  31190. "$ref": "#/components/schemas/LocationRef"
  31191. },
  31192. "type": {
  31193. "type": "string",
  31194. "enum": ["tui.command.execute"]
  31195. },
  31196. "data": {
  31197. "type": "object",
  31198. "properties": {
  31199. "command": {
  31200. "anyOf": [
  31201. {
  31202. "type": "string",
  31203. "enum": [
  31204. "session.list",
  31205. "session.new",
  31206. "session.share",
  31207. "session.interrupt",
  31208. "session.compact",
  31209. "session.page.up",
  31210. "session.page.down",
  31211. "session.line.up",
  31212. "session.line.down",
  31213. "session.half.page.up",
  31214. "session.half.page.down",
  31215. "session.first",
  31216. "session.last",
  31217. "prompt.clear",
  31218. "prompt.submit",
  31219. "agent.cycle"
  31220. ]
  31221. },
  31222. {
  31223. "type": "string"
  31224. }
  31225. ]
  31226. }
  31227. },
  31228. "required": ["command"],
  31229. "additionalProperties": false
  31230. }
  31231. },
  31232. "required": ["id", "type", "data"],
  31233. "additionalProperties": false
  31234. },
  31235. "V2EventTuiToastShow": {
  31236. "type": "object",
  31237. "properties": {
  31238. "id": {
  31239. "type": "string",
  31240. "pattern": "^evt_"
  31241. },
  31242. "metadata": {
  31243. "type": "object"
  31244. },
  31245. "durable": {
  31246. "type": "object",
  31247. "properties": {
  31248. "aggregateID": {
  31249. "type": "string"
  31250. },
  31251. "seq": {
  31252. "type": "integer"
  31253. },
  31254. "version": {
  31255. "type": "integer"
  31256. }
  31257. },
  31258. "required": ["aggregateID", "seq", "version"],
  31259. "additionalProperties": false
  31260. },
  31261. "location": {
  31262. "$ref": "#/components/schemas/LocationRef"
  31263. },
  31264. "type": {
  31265. "type": "string",
  31266. "enum": ["tui.toast.show"]
  31267. },
  31268. "data": {
  31269. "type": "object",
  31270. "properties": {
  31271. "title": {
  31272. "type": "string"
  31273. },
  31274. "message": {
  31275. "type": "string"
  31276. },
  31277. "variant": {
  31278. "type": "string",
  31279. "enum": ["info", "success", "warning", "error"]
  31280. },
  31281. "duration": {
  31282. "type": "integer",
  31283. "exclusiveMinimum": 0
  31284. }
  31285. },
  31286. "required": ["message", "variant"],
  31287. "additionalProperties": false
  31288. }
  31289. },
  31290. "required": ["id", "type", "data"],
  31291. "additionalProperties": false
  31292. },
  31293. "V2EventTuiSessionSelect": {
  31294. "type": "object",
  31295. "properties": {
  31296. "id": {
  31297. "type": "string",
  31298. "pattern": "^evt_"
  31299. },
  31300. "metadata": {
  31301. "type": "object"
  31302. },
  31303. "durable": {
  31304. "type": "object",
  31305. "properties": {
  31306. "aggregateID": {
  31307. "type": "string"
  31308. },
  31309. "seq": {
  31310. "type": "integer"
  31311. },
  31312. "version": {
  31313. "type": "integer"
  31314. }
  31315. },
  31316. "required": ["aggregateID", "seq", "version"],
  31317. "additionalProperties": false
  31318. },
  31319. "location": {
  31320. "$ref": "#/components/schemas/LocationRef"
  31321. },
  31322. "type": {
  31323. "type": "string",
  31324. "enum": ["tui.session.select"]
  31325. },
  31326. "data": {
  31327. "type": "object",
  31328. "properties": {
  31329. "sessionID": {
  31330. "type": "string",
  31331. "pattern": "^ses",
  31332. "description": "Session ID to navigate to"
  31333. }
  31334. },
  31335. "required": ["sessionID"],
  31336. "additionalProperties": false
  31337. }
  31338. },
  31339. "required": ["id", "type", "data"],
  31340. "additionalProperties": false
  31341. },
  31342. "V2EventMcpToolsChanged": {
  31343. "type": "object",
  31344. "properties": {
  31345. "id": {
  31346. "type": "string",
  31347. "pattern": "^evt_"
  31348. },
  31349. "metadata": {
  31350. "type": "object"
  31351. },
  31352. "durable": {
  31353. "type": "object",
  31354. "properties": {
  31355. "aggregateID": {
  31356. "type": "string"
  31357. },
  31358. "seq": {
  31359. "type": "integer"
  31360. },
  31361. "version": {
  31362. "type": "integer"
  31363. }
  31364. },
  31365. "required": ["aggregateID", "seq", "version"],
  31366. "additionalProperties": false
  31367. },
  31368. "location": {
  31369. "$ref": "#/components/schemas/LocationRef"
  31370. },
  31371. "type": {
  31372. "type": "string",
  31373. "enum": ["mcp.tools.changed"]
  31374. },
  31375. "data": {
  31376. "type": "object",
  31377. "properties": {
  31378. "server": {
  31379. "type": "string"
  31380. }
  31381. },
  31382. "required": ["server"],
  31383. "additionalProperties": false
  31384. }
  31385. },
  31386. "required": ["id", "type", "data"],
  31387. "additionalProperties": false
  31388. },
  31389. "V2EventMcpBrowserOpenFailed": {
  31390. "type": "object",
  31391. "properties": {
  31392. "id": {
  31393. "type": "string",
  31394. "pattern": "^evt_"
  31395. },
  31396. "metadata": {
  31397. "type": "object"
  31398. },
  31399. "durable": {
  31400. "type": "object",
  31401. "properties": {
  31402. "aggregateID": {
  31403. "type": "string"
  31404. },
  31405. "seq": {
  31406. "type": "integer"
  31407. },
  31408. "version": {
  31409. "type": "integer"
  31410. }
  31411. },
  31412. "required": ["aggregateID", "seq", "version"],
  31413. "additionalProperties": false
  31414. },
  31415. "location": {
  31416. "$ref": "#/components/schemas/LocationRef"
  31417. },
  31418. "type": {
  31419. "type": "string",
  31420. "enum": ["mcp.browser.open.failed"]
  31421. },
  31422. "data": {
  31423. "type": "object",
  31424. "properties": {
  31425. "mcpName": {
  31426. "type": "string"
  31427. },
  31428. "url": {
  31429. "type": "string"
  31430. }
  31431. },
  31432. "required": ["mcpName", "url"],
  31433. "additionalProperties": false
  31434. }
  31435. },
  31436. "required": ["id", "type", "data"],
  31437. "additionalProperties": false
  31438. },
  31439. "V2EventCommandExecuted": {
  31440. "type": "object",
  31441. "properties": {
  31442. "id": {
  31443. "type": "string",
  31444. "pattern": "^evt_"
  31445. },
  31446. "metadata": {
  31447. "type": "object"
  31448. },
  31449. "durable": {
  31450. "type": "object",
  31451. "properties": {
  31452. "aggregateID": {
  31453. "type": "string"
  31454. },
  31455. "seq": {
  31456. "type": "integer"
  31457. },
  31458. "version": {
  31459. "type": "integer"
  31460. }
  31461. },
  31462. "required": ["aggregateID", "seq", "version"],
  31463. "additionalProperties": false
  31464. },
  31465. "location": {
  31466. "$ref": "#/components/schemas/LocationRef"
  31467. },
  31468. "type": {
  31469. "type": "string",
  31470. "enum": ["command.executed"]
  31471. },
  31472. "data": {
  31473. "type": "object",
  31474. "properties": {
  31475. "name": {
  31476. "type": "string"
  31477. },
  31478. "sessionID": {
  31479. "type": "string",
  31480. "pattern": "^ses"
  31481. },
  31482. "arguments": {
  31483. "type": "string"
  31484. },
  31485. "messageID": {
  31486. "type": "string",
  31487. "pattern": "^msg"
  31488. }
  31489. },
  31490. "required": ["name", "sessionID", "arguments", "messageID"],
  31491. "additionalProperties": false
  31492. }
  31493. },
  31494. "required": ["id", "type", "data"],
  31495. "additionalProperties": false
  31496. },
  31497. "V2EventProjectUpdated": {
  31498. "type": "object",
  31499. "properties": {
  31500. "id": {
  31501. "type": "string",
  31502. "pattern": "^evt_"
  31503. },
  31504. "metadata": {
  31505. "type": "object"
  31506. },
  31507. "durable": {
  31508. "type": "object",
  31509. "properties": {
  31510. "aggregateID": {
  31511. "type": "string"
  31512. },
  31513. "seq": {
  31514. "type": "integer"
  31515. },
  31516. "version": {
  31517. "type": "integer"
  31518. }
  31519. },
  31520. "required": ["aggregateID", "seq", "version"],
  31521. "additionalProperties": false
  31522. },
  31523. "location": {
  31524. "$ref": "#/components/schemas/LocationRef"
  31525. },
  31526. "type": {
  31527. "type": "string",
  31528. "enum": ["project.updated"]
  31529. },
  31530. "data": {
  31531. "type": "object",
  31532. "properties": {
  31533. "id": {
  31534. "type": "string"
  31535. },
  31536. "worktree": {
  31537. "type": "string"
  31538. },
  31539. "vcs": {
  31540. "type": "string",
  31541. "enum": ["git"]
  31542. },
  31543. "name": {
  31544. "type": "string"
  31545. },
  31546. "icon": {
  31547. "type": "object",
  31548. "properties": {
  31549. "url": {
  31550. "type": "string"
  31551. },
  31552. "override": {
  31553. "type": "string"
  31554. },
  31555. "color": {
  31556. "type": "string"
  31557. }
  31558. },
  31559. "additionalProperties": false
  31560. },
  31561. "commands": {
  31562. "type": "object",
  31563. "properties": {
  31564. "start": {
  31565. "type": "string",
  31566. "description": "Startup script to run when creating a new workspace (worktree)"
  31567. }
  31568. },
  31569. "additionalProperties": false
  31570. },
  31571. "time": {
  31572. "type": "object",
  31573. "properties": {
  31574. "created": {
  31575. "type": "integer",
  31576. "minimum": 0
  31577. },
  31578. "updated": {
  31579. "type": "integer",
  31580. "minimum": 0
  31581. },
  31582. "initialized": {
  31583. "type": "integer",
  31584. "minimum": 0
  31585. }
  31586. },
  31587. "required": ["created", "updated"],
  31588. "additionalProperties": false
  31589. },
  31590. "sandboxes": {
  31591. "type": "array",
  31592. "items": {
  31593. "type": "string"
  31594. }
  31595. }
  31596. },
  31597. "required": ["id", "worktree", "time", "sandboxes"],
  31598. "additionalProperties": false
  31599. }
  31600. },
  31601. "required": ["id", "type", "data"],
  31602. "additionalProperties": false
  31603. },
  31604. "V2EventSessionStatus": {
  31605. "type": "object",
  31606. "properties": {
  31607. "id": {
  31608. "type": "string",
  31609. "pattern": "^evt_"
  31610. },
  31611. "metadata": {
  31612. "type": "object"
  31613. },
  31614. "durable": {
  31615. "type": "object",
  31616. "properties": {
  31617. "aggregateID": {
  31618. "type": "string"
  31619. },
  31620. "seq": {
  31621. "type": "integer"
  31622. },
  31623. "version": {
  31624. "type": "integer"
  31625. }
  31626. },
  31627. "required": ["aggregateID", "seq", "version"],
  31628. "additionalProperties": false
  31629. },
  31630. "location": {
  31631. "$ref": "#/components/schemas/LocationRef"
  31632. },
  31633. "type": {
  31634. "type": "string",
  31635. "enum": ["session.status"]
  31636. },
  31637. "data": {
  31638. "type": "object",
  31639. "properties": {
  31640. "sessionID": {
  31641. "type": "string",
  31642. "pattern": "^ses"
  31643. },
  31644. "status": {
  31645. "$ref": "#/components/schemas/SessionStatus"
  31646. }
  31647. },
  31648. "required": ["sessionID", "status"],
  31649. "additionalProperties": false
  31650. }
  31651. },
  31652. "required": ["id", "type", "data"],
  31653. "additionalProperties": false
  31654. },
  31655. "V2EventSessionIdle": {
  31656. "type": "object",
  31657. "properties": {
  31658. "id": {
  31659. "type": "string",
  31660. "pattern": "^evt_"
  31661. },
  31662. "metadata": {
  31663. "type": "object"
  31664. },
  31665. "durable": {
  31666. "type": "object",
  31667. "properties": {
  31668. "aggregateID": {
  31669. "type": "string"
  31670. },
  31671. "seq": {
  31672. "type": "integer"
  31673. },
  31674. "version": {
  31675. "type": "integer"
  31676. }
  31677. },
  31678. "required": ["aggregateID", "seq", "version"],
  31679. "additionalProperties": false
  31680. },
  31681. "location": {
  31682. "$ref": "#/components/schemas/LocationRef"
  31683. },
  31684. "type": {
  31685. "type": "string",
  31686. "enum": ["session.idle"]
  31687. },
  31688. "data": {
  31689. "type": "object",
  31690. "properties": {
  31691. "sessionID": {
  31692. "type": "string",
  31693. "pattern": "^ses"
  31694. }
  31695. },
  31696. "required": ["sessionID"],
  31697. "additionalProperties": false
  31698. }
  31699. },
  31700. "required": ["id", "type", "data"],
  31701. "additionalProperties": false
  31702. },
  31703. "V2EventQuestionAsked": {
  31704. "type": "object",
  31705. "properties": {
  31706. "id": {
  31707. "type": "string",
  31708. "pattern": "^evt_"
  31709. },
  31710. "metadata": {
  31711. "type": "object"
  31712. },
  31713. "durable": {
  31714. "type": "object",
  31715. "properties": {
  31716. "aggregateID": {
  31717. "type": "string"
  31718. },
  31719. "seq": {
  31720. "type": "integer"
  31721. },
  31722. "version": {
  31723. "type": "integer"
  31724. }
  31725. },
  31726. "required": ["aggregateID", "seq", "version"],
  31727. "additionalProperties": false
  31728. },
  31729. "location": {
  31730. "$ref": "#/components/schemas/LocationRef"
  31731. },
  31732. "type": {
  31733. "type": "string",
  31734. "enum": ["question.asked"]
  31735. },
  31736. "data": {
  31737. "type": "object",
  31738. "properties": {
  31739. "id": {
  31740. "type": "string",
  31741. "pattern": "^que"
  31742. },
  31743. "sessionID": {
  31744. "type": "string",
  31745. "pattern": "^ses"
  31746. },
  31747. "questions": {
  31748. "type": "array",
  31749. "items": {
  31750. "$ref": "#/components/schemas/QuestionInfo"
  31751. },
  31752. "description": "Questions to ask"
  31753. },
  31754. "tool": {
  31755. "$ref": "#/components/schemas/QuestionTool"
  31756. }
  31757. },
  31758. "required": ["id", "sessionID", "questions"],
  31759. "additionalProperties": false
  31760. }
  31761. },
  31762. "required": ["id", "type", "data"],
  31763. "additionalProperties": false
  31764. },
  31765. "V2EventQuestionReplied": {
  31766. "type": "object",
  31767. "properties": {
  31768. "id": {
  31769. "type": "string",
  31770. "pattern": "^evt_"
  31771. },
  31772. "metadata": {
  31773. "type": "object"
  31774. },
  31775. "durable": {
  31776. "type": "object",
  31777. "properties": {
  31778. "aggregateID": {
  31779. "type": "string"
  31780. },
  31781. "seq": {
  31782. "type": "integer"
  31783. },
  31784. "version": {
  31785. "type": "integer"
  31786. }
  31787. },
  31788. "required": ["aggregateID", "seq", "version"],
  31789. "additionalProperties": false
  31790. },
  31791. "location": {
  31792. "$ref": "#/components/schemas/LocationRef"
  31793. },
  31794. "type": {
  31795. "type": "string",
  31796. "enum": ["question.replied"]
  31797. },
  31798. "data": {
  31799. "type": "object",
  31800. "properties": {
  31801. "sessionID": {
  31802. "type": "string",
  31803. "pattern": "^ses"
  31804. },
  31805. "requestID": {
  31806. "type": "string",
  31807. "pattern": "^que"
  31808. },
  31809. "answers": {
  31810. "type": "array",
  31811. "items": {
  31812. "$ref": "#/components/schemas/QuestionAnswer"
  31813. }
  31814. }
  31815. },
  31816. "required": ["sessionID", "requestID", "answers"],
  31817. "additionalProperties": false
  31818. }
  31819. },
  31820. "required": ["id", "type", "data"],
  31821. "additionalProperties": false
  31822. },
  31823. "V2EventQuestionRejected": {
  31824. "type": "object",
  31825. "properties": {
  31826. "id": {
  31827. "type": "string",
  31828. "pattern": "^evt_"
  31829. },
  31830. "metadata": {
  31831. "type": "object"
  31832. },
  31833. "durable": {
  31834. "type": "object",
  31835. "properties": {
  31836. "aggregateID": {
  31837. "type": "string"
  31838. },
  31839. "seq": {
  31840. "type": "integer"
  31841. },
  31842. "version": {
  31843. "type": "integer"
  31844. }
  31845. },
  31846. "required": ["aggregateID", "seq", "version"],
  31847. "additionalProperties": false
  31848. },
  31849. "location": {
  31850. "$ref": "#/components/schemas/LocationRef"
  31851. },
  31852. "type": {
  31853. "type": "string",
  31854. "enum": ["question.rejected"]
  31855. },
  31856. "data": {
  31857. "type": "object",
  31858. "properties": {
  31859. "sessionID": {
  31860. "type": "string",
  31861. "pattern": "^ses"
  31862. },
  31863. "requestID": {
  31864. "type": "string",
  31865. "pattern": "^que"
  31866. }
  31867. },
  31868. "required": ["sessionID", "requestID"],
  31869. "additionalProperties": false
  31870. }
  31871. },
  31872. "required": ["id", "type", "data"],
  31873. "additionalProperties": false
  31874. },
  31875. "V2EventSessionCompacted": {
  31876. "type": "object",
  31877. "properties": {
  31878. "id": {
  31879. "type": "string",
  31880. "pattern": "^evt_"
  31881. },
  31882. "metadata": {
  31883. "type": "object"
  31884. },
  31885. "durable": {
  31886. "type": "object",
  31887. "properties": {
  31888. "aggregateID": {
  31889. "type": "string"
  31890. },
  31891. "seq": {
  31892. "type": "integer"
  31893. },
  31894. "version": {
  31895. "type": "integer"
  31896. }
  31897. },
  31898. "required": ["aggregateID", "seq", "version"],
  31899. "additionalProperties": false
  31900. },
  31901. "location": {
  31902. "$ref": "#/components/schemas/LocationRef"
  31903. },
  31904. "type": {
  31905. "type": "string",
  31906. "enum": ["session.compacted"]
  31907. },
  31908. "data": {
  31909. "type": "object",
  31910. "properties": {
  31911. "sessionID": {
  31912. "type": "string",
  31913. "pattern": "^ses"
  31914. }
  31915. },
  31916. "required": ["sessionID"],
  31917. "additionalProperties": false
  31918. }
  31919. },
  31920. "required": ["id", "type", "data"],
  31921. "additionalProperties": false
  31922. },
  31923. "V2EventVcsBranchUpdated": {
  31924. "type": "object",
  31925. "properties": {
  31926. "id": {
  31927. "type": "string",
  31928. "pattern": "^evt_"
  31929. },
  31930. "metadata": {
  31931. "type": "object"
  31932. },
  31933. "durable": {
  31934. "type": "object",
  31935. "properties": {
  31936. "aggregateID": {
  31937. "type": "string"
  31938. },
  31939. "seq": {
  31940. "type": "integer"
  31941. },
  31942. "version": {
  31943. "type": "integer"
  31944. }
  31945. },
  31946. "required": ["aggregateID", "seq", "version"],
  31947. "additionalProperties": false
  31948. },
  31949. "location": {
  31950. "$ref": "#/components/schemas/LocationRef"
  31951. },
  31952. "type": {
  31953. "type": "string",
  31954. "enum": ["vcs.branch.updated"]
  31955. },
  31956. "data": {
  31957. "type": "object",
  31958. "properties": {
  31959. "branch": {
  31960. "type": "string"
  31961. }
  31962. },
  31963. "additionalProperties": false
  31964. }
  31965. },
  31966. "required": ["id", "type", "data"],
  31967. "additionalProperties": false
  31968. },
  31969. "V2EventWorkspaceReady": {
  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": ["workspace.ready"]
  32001. },
  32002. "data": {
  32003. "type": "object",
  32004. "properties": {
  32005. "name": {
  32006. "type": "string"
  32007. }
  32008. },
  32009. "required": ["name"],
  32010. "additionalProperties": false
  32011. }
  32012. },
  32013. "required": ["id", "type", "data"],
  32014. "additionalProperties": false
  32015. },
  32016. "V2EventWorkspaceFailed": {
  32017. "type": "object",
  32018. "properties": {
  32019. "id": {
  32020. "type": "string",
  32021. "pattern": "^evt_"
  32022. },
  32023. "metadata": {
  32024. "type": "object"
  32025. },
  32026. "durable": {
  32027. "type": "object",
  32028. "properties": {
  32029. "aggregateID": {
  32030. "type": "string"
  32031. },
  32032. "seq": {
  32033. "type": "integer"
  32034. },
  32035. "version": {
  32036. "type": "integer"
  32037. }
  32038. },
  32039. "required": ["aggregateID", "seq", "version"],
  32040. "additionalProperties": false
  32041. },
  32042. "location": {
  32043. "$ref": "#/components/schemas/LocationRef"
  32044. },
  32045. "type": {
  32046. "type": "string",
  32047. "enum": ["workspace.failed"]
  32048. },
  32049. "data": {
  32050. "type": "object",
  32051. "properties": {
  32052. "message": {
  32053. "type": "string"
  32054. }
  32055. },
  32056. "required": ["message"],
  32057. "additionalProperties": false
  32058. }
  32059. },
  32060. "required": ["id", "type", "data"],
  32061. "additionalProperties": false
  32062. },
  32063. "V2EventWorkspaceStatus": {
  32064. "type": "object",
  32065. "properties": {
  32066. "id": {
  32067. "type": "string",
  32068. "pattern": "^evt_"
  32069. },
  32070. "metadata": {
  32071. "type": "object"
  32072. },
  32073. "durable": {
  32074. "type": "object",
  32075. "properties": {
  32076. "aggregateID": {
  32077. "type": "string"
  32078. },
  32079. "seq": {
  32080. "type": "integer"
  32081. },
  32082. "version": {
  32083. "type": "integer"
  32084. }
  32085. },
  32086. "required": ["aggregateID", "seq", "version"],
  32087. "additionalProperties": false
  32088. },
  32089. "location": {
  32090. "$ref": "#/components/schemas/LocationRef"
  32091. },
  32092. "type": {
  32093. "type": "string",
  32094. "enum": ["workspace.status"]
  32095. },
  32096. "data": {
  32097. "type": "object",
  32098. "properties": {
  32099. "workspaceID": {
  32100. "type": "string",
  32101. "pattern": "^wrk"
  32102. },
  32103. "status": {
  32104. "type": "string",
  32105. "enum": ["connected", "connecting", "disconnected", "error"]
  32106. }
  32107. },
  32108. "required": ["workspaceID", "status"],
  32109. "additionalProperties": false
  32110. }
  32111. },
  32112. "required": ["id", "type", "data"],
  32113. "additionalProperties": false
  32114. },
  32115. "V2EventWorktreeReady": {
  32116. "type": "object",
  32117. "properties": {
  32118. "id": {
  32119. "type": "string",
  32120. "pattern": "^evt_"
  32121. },
  32122. "metadata": {
  32123. "type": "object"
  32124. },
  32125. "durable": {
  32126. "type": "object",
  32127. "properties": {
  32128. "aggregateID": {
  32129. "type": "string"
  32130. },
  32131. "seq": {
  32132. "type": "integer"
  32133. },
  32134. "version": {
  32135. "type": "integer"
  32136. }
  32137. },
  32138. "required": ["aggregateID", "seq", "version"],
  32139. "additionalProperties": false
  32140. },
  32141. "location": {
  32142. "$ref": "#/components/schemas/LocationRef"
  32143. },
  32144. "type": {
  32145. "type": "string",
  32146. "enum": ["worktree.ready"]
  32147. },
  32148. "data": {
  32149. "type": "object",
  32150. "properties": {
  32151. "name": {
  32152. "type": "string"
  32153. },
  32154. "branch": {
  32155. "type": "string"
  32156. }
  32157. },
  32158. "required": ["name"],
  32159. "additionalProperties": false
  32160. }
  32161. },
  32162. "required": ["id", "type", "data"],
  32163. "additionalProperties": false
  32164. },
  32165. "V2EventWorktreeFailed": {
  32166. "type": "object",
  32167. "properties": {
  32168. "id": {
  32169. "type": "string",
  32170. "pattern": "^evt_"
  32171. },
  32172. "metadata": {
  32173. "type": "object"
  32174. },
  32175. "durable": {
  32176. "type": "object",
  32177. "properties": {
  32178. "aggregateID": {
  32179. "type": "string"
  32180. },
  32181. "seq": {
  32182. "type": "integer"
  32183. },
  32184. "version": {
  32185. "type": "integer"
  32186. }
  32187. },
  32188. "required": ["aggregateID", "seq", "version"],
  32189. "additionalProperties": false
  32190. },
  32191. "location": {
  32192. "$ref": "#/components/schemas/LocationRef"
  32193. },
  32194. "type": {
  32195. "type": "string",
  32196. "enum": ["worktree.failed"]
  32197. },
  32198. "data": {
  32199. "type": "object",
  32200. "properties": {
  32201. "message": {
  32202. "type": "string"
  32203. }
  32204. },
  32205. "required": ["message"],
  32206. "additionalProperties": false
  32207. }
  32208. },
  32209. "required": ["id", "type", "data"],
  32210. "additionalProperties": false
  32211. },
  32212. "V2EventServerConnected": {
  32213. "type": "object",
  32214. "properties": {
  32215. "id": {
  32216. "type": "string",
  32217. "pattern": "^evt_"
  32218. },
  32219. "metadata": {
  32220. "type": "object"
  32221. },
  32222. "durable": {
  32223. "type": "object",
  32224. "properties": {
  32225. "aggregateID": {
  32226. "type": "string"
  32227. },
  32228. "seq": {
  32229. "type": "integer"
  32230. },
  32231. "version": {
  32232. "type": "integer"
  32233. }
  32234. },
  32235. "required": ["aggregateID", "seq", "version"],
  32236. "additionalProperties": false
  32237. },
  32238. "location": {
  32239. "$ref": "#/components/schemas/LocationRef"
  32240. },
  32241. "type": {
  32242. "type": "string",
  32243. "enum": ["server.connected"]
  32244. },
  32245. "data": {
  32246. "type": "object",
  32247. "properties": {}
  32248. }
  32249. },
  32250. "required": ["id", "type", "data"],
  32251. "additionalProperties": false
  32252. },
  32253. "V2EventGlobalDisposed": {
  32254. "type": "object",
  32255. "properties": {
  32256. "id": {
  32257. "type": "string",
  32258. "pattern": "^evt_"
  32259. },
  32260. "metadata": {
  32261. "type": "object"
  32262. },
  32263. "durable": {
  32264. "type": "object",
  32265. "properties": {
  32266. "aggregateID": {
  32267. "type": "string"
  32268. },
  32269. "seq": {
  32270. "type": "integer"
  32271. },
  32272. "version": {
  32273. "type": "integer"
  32274. }
  32275. },
  32276. "required": ["aggregateID", "seq", "version"],
  32277. "additionalProperties": false
  32278. },
  32279. "location": {
  32280. "$ref": "#/components/schemas/LocationRef"
  32281. },
  32282. "type": {
  32283. "type": "string",
  32284. "enum": ["global.disposed"]
  32285. },
  32286. "data": {
  32287. "type": "object",
  32288. "properties": {}
  32289. }
  32290. },
  32291. "required": ["id", "type", "data"],
  32292. "additionalProperties": false
  32293. },
  32294. "QuestionV2Request": {
  32295. "type": "object",
  32296. "properties": {
  32297. "id": {
  32298. "type": "string",
  32299. "pattern": "^que"
  32300. },
  32301. "sessionID": {
  32302. "type": "string",
  32303. "pattern": "^ses"
  32304. },
  32305. "questions": {
  32306. "type": "array",
  32307. "items": {
  32308. "$ref": "#/components/schemas/QuestionV2Info"
  32309. },
  32310. "description": "Questions to ask"
  32311. },
  32312. "tool": {
  32313. "$ref": "#/components/schemas/QuestionV2Tool"
  32314. }
  32315. },
  32316. "required": ["id", "sessionID", "questions"],
  32317. "additionalProperties": false
  32318. },
  32319. "QuestionV2Reply": {
  32320. "type": "object",
  32321. "properties": {
  32322. "answers": {
  32323. "type": "array",
  32324. "items": {
  32325. "$ref": "#/components/schemas/QuestionV2Answer"
  32326. },
  32327. "description": "User answers in order of questions (each answer is an array of selected labels)"
  32328. }
  32329. },
  32330. "required": ["answers"],
  32331. "additionalProperties": false
  32332. },
  32333. "ReferenceLocalSource": {
  32334. "type": "object",
  32335. "properties": {
  32336. "type": {
  32337. "type": "string",
  32338. "enum": ["local"]
  32339. },
  32340. "path": {
  32341. "type": "string"
  32342. },
  32343. "description": {
  32344. "type": "string"
  32345. },
  32346. "hidden": {
  32347. "type": "boolean"
  32348. }
  32349. },
  32350. "required": ["type", "path"],
  32351. "additionalProperties": false
  32352. },
  32353. "ReferenceGitSource": {
  32354. "type": "object",
  32355. "properties": {
  32356. "type": {
  32357. "type": "string",
  32358. "enum": ["git"]
  32359. },
  32360. "repository": {
  32361. "type": "string"
  32362. },
  32363. "branch": {
  32364. "type": "string"
  32365. },
  32366. "description": {
  32367. "type": "string"
  32368. },
  32369. "hidden": {
  32370. "type": "boolean"
  32371. }
  32372. },
  32373. "required": ["type", "repository"],
  32374. "additionalProperties": false
  32375. },
  32376. "ReferenceInfo": {
  32377. "type": "object",
  32378. "properties": {
  32379. "name": {
  32380. "type": "string"
  32381. },
  32382. "path": {
  32383. "type": "string"
  32384. },
  32385. "description": {
  32386. "type": "string"
  32387. },
  32388. "hidden": {
  32389. "type": "boolean"
  32390. },
  32391. "source": {
  32392. "anyOf": [
  32393. {
  32394. "$ref": "#/components/schemas/ReferenceLocalSource"
  32395. },
  32396. {
  32397. "$ref": "#/components/schemas/ReferenceGitSource"
  32398. }
  32399. ]
  32400. }
  32401. },
  32402. "required": ["name", "path", "source"],
  32403. "additionalProperties": false
  32404. },
  32405. "ProjectCopyCopy": {
  32406. "type": "object",
  32407. "properties": {
  32408. "directory": {
  32409. "type": "string"
  32410. }
  32411. },
  32412. "required": ["directory"],
  32413. "additionalProperties": false
  32414. },
  32415. "EventModels-devRefreshed": {
  32416. "type": "object",
  32417. "properties": {
  32418. "id": {
  32419. "type": "string",
  32420. "pattern": "^evt_"
  32421. },
  32422. "type": {
  32423. "type": "string",
  32424. "enum": ["models-dev.refreshed"]
  32425. },
  32426. "properties": {
  32427. "type": "object",
  32428. "properties": {}
  32429. }
  32430. },
  32431. "required": ["id", "type", "properties"],
  32432. "additionalProperties": false
  32433. },
  32434. "EventIntegrationUpdated": {
  32435. "type": "object",
  32436. "properties": {
  32437. "id": {
  32438. "type": "string",
  32439. "pattern": "^evt_"
  32440. },
  32441. "type": {
  32442. "type": "string",
  32443. "enum": ["integration.updated"]
  32444. },
  32445. "properties": {
  32446. "type": "object",
  32447. "properties": {}
  32448. }
  32449. },
  32450. "required": ["id", "type", "properties"],
  32451. "additionalProperties": false
  32452. },
  32453. "EventIntegrationConnectionUpdated": {
  32454. "type": "object",
  32455. "properties": {
  32456. "id": {
  32457. "type": "string",
  32458. "pattern": "^evt_"
  32459. },
  32460. "type": {
  32461. "type": "string",
  32462. "enum": ["integration.connection.updated"]
  32463. },
  32464. "properties": {
  32465. "type": "object",
  32466. "properties": {
  32467. "integrationID": {
  32468. "type": "string"
  32469. }
  32470. },
  32471. "required": ["integrationID"],
  32472. "additionalProperties": false
  32473. }
  32474. },
  32475. "required": ["id", "type", "properties"],
  32476. "additionalProperties": false
  32477. },
  32478. "EventCatalogUpdated": {
  32479. "type": "object",
  32480. "properties": {
  32481. "id": {
  32482. "type": "string",
  32483. "pattern": "^evt_"
  32484. },
  32485. "type": {
  32486. "type": "string",
  32487. "enum": ["catalog.updated"]
  32488. },
  32489. "properties": {
  32490. "type": "object",
  32491. "properties": {}
  32492. }
  32493. },
  32494. "required": ["id", "type", "properties"],
  32495. "additionalProperties": false
  32496. },
  32497. "EventSessionCreated": {
  32498. "type": "object",
  32499. "properties": {
  32500. "id": {
  32501. "type": "string",
  32502. "pattern": "^evt_"
  32503. },
  32504. "type": {
  32505. "type": "string",
  32506. "enum": ["session.created"]
  32507. },
  32508. "properties": {
  32509. "type": "object",
  32510. "properties": {
  32511. "sessionID": {
  32512. "type": "string",
  32513. "pattern": "^ses"
  32514. },
  32515. "info": {
  32516. "$ref": "#/components/schemas/Session"
  32517. }
  32518. },
  32519. "required": ["sessionID", "info"],
  32520. "additionalProperties": false
  32521. }
  32522. },
  32523. "required": ["id", "type", "properties"],
  32524. "additionalProperties": false
  32525. },
  32526. "EventSessionUpdated": {
  32527. "type": "object",
  32528. "properties": {
  32529. "id": {
  32530. "type": "string",
  32531. "pattern": "^evt_"
  32532. },
  32533. "type": {
  32534. "type": "string",
  32535. "enum": ["session.updated"]
  32536. },
  32537. "properties": {
  32538. "type": "object",
  32539. "properties": {
  32540. "sessionID": {
  32541. "type": "string",
  32542. "pattern": "^ses"
  32543. },
  32544. "info": {
  32545. "$ref": "#/components/schemas/Session"
  32546. }
  32547. },
  32548. "required": ["sessionID", "info"],
  32549. "additionalProperties": false
  32550. }
  32551. },
  32552. "required": ["id", "type", "properties"],
  32553. "additionalProperties": false
  32554. },
  32555. "EventSessionDeleted": {
  32556. "type": "object",
  32557. "properties": {
  32558. "id": {
  32559. "type": "string",
  32560. "pattern": "^evt_"
  32561. },
  32562. "type": {
  32563. "type": "string",
  32564. "enum": ["session.deleted"]
  32565. },
  32566. "properties": {
  32567. "type": "object",
  32568. "properties": {
  32569. "sessionID": {
  32570. "type": "string",
  32571. "pattern": "^ses"
  32572. },
  32573. "info": {
  32574. "$ref": "#/components/schemas/Session"
  32575. }
  32576. },
  32577. "required": ["sessionID", "info"],
  32578. "additionalProperties": false
  32579. }
  32580. },
  32581. "required": ["id", "type", "properties"],
  32582. "additionalProperties": false
  32583. },
  32584. "EventMessageUpdated": {
  32585. "type": "object",
  32586. "properties": {
  32587. "id": {
  32588. "type": "string",
  32589. "pattern": "^evt_"
  32590. },
  32591. "type": {
  32592. "type": "string",
  32593. "enum": ["message.updated"]
  32594. },
  32595. "properties": {
  32596. "type": "object",
  32597. "properties": {
  32598. "sessionID": {
  32599. "type": "string",
  32600. "pattern": "^ses"
  32601. },
  32602. "info": {
  32603. "$ref": "#/components/schemas/Message"
  32604. }
  32605. },
  32606. "required": ["sessionID", "info"],
  32607. "additionalProperties": false
  32608. }
  32609. },
  32610. "required": ["id", "type", "properties"],
  32611. "additionalProperties": false
  32612. },
  32613. "EventMessageRemoved": {
  32614. "type": "object",
  32615. "properties": {
  32616. "id": {
  32617. "type": "string",
  32618. "pattern": "^evt_"
  32619. },
  32620. "type": {
  32621. "type": "string",
  32622. "enum": ["message.removed"]
  32623. },
  32624. "properties": {
  32625. "type": "object",
  32626. "properties": {
  32627. "sessionID": {
  32628. "type": "string",
  32629. "pattern": "^ses"
  32630. },
  32631. "messageID": {
  32632. "type": "string",
  32633. "pattern": "^msg"
  32634. }
  32635. },
  32636. "required": ["sessionID", "messageID"],
  32637. "additionalProperties": false
  32638. }
  32639. },
  32640. "required": ["id", "type", "properties"],
  32641. "additionalProperties": false
  32642. },
  32643. "EventMessagePartUpdated": {
  32644. "type": "object",
  32645. "properties": {
  32646. "id": {
  32647. "type": "string",
  32648. "pattern": "^evt_"
  32649. },
  32650. "type": {
  32651. "type": "string",
  32652. "enum": ["message.part.updated"]
  32653. },
  32654. "properties": {
  32655. "type": "object",
  32656. "properties": {
  32657. "sessionID": {
  32658. "type": "string",
  32659. "pattern": "^ses"
  32660. },
  32661. "part": {
  32662. "$ref": "#/components/schemas/Part"
  32663. },
  32664. "time": {
  32665. "type": "number"
  32666. }
  32667. },
  32668. "required": ["sessionID", "part", "time"],
  32669. "additionalProperties": false
  32670. }
  32671. },
  32672. "required": ["id", "type", "properties"],
  32673. "additionalProperties": false
  32674. },
  32675. "EventMessagePartRemoved": {
  32676. "type": "object",
  32677. "properties": {
  32678. "id": {
  32679. "type": "string",
  32680. "pattern": "^evt_"
  32681. },
  32682. "type": {
  32683. "type": "string",
  32684. "enum": ["message.part.removed"]
  32685. },
  32686. "properties": {
  32687. "type": "object",
  32688. "properties": {
  32689. "sessionID": {
  32690. "type": "string",
  32691. "pattern": "^ses"
  32692. },
  32693. "messageID": {
  32694. "type": "string",
  32695. "pattern": "^msg"
  32696. },
  32697. "partID": {
  32698. "type": "string",
  32699. "pattern": "^prt"
  32700. }
  32701. },
  32702. "required": ["sessionID", "messageID", "partID"],
  32703. "additionalProperties": false
  32704. }
  32705. },
  32706. "required": ["id", "type", "properties"],
  32707. "additionalProperties": false
  32708. },
  32709. "EventSessionNextAgentSwitched": {
  32710. "type": "object",
  32711. "properties": {
  32712. "id": {
  32713. "type": "string",
  32714. "pattern": "^evt_"
  32715. },
  32716. "type": {
  32717. "type": "string",
  32718. "enum": ["session.next.agent.switched"]
  32719. },
  32720. "properties": {
  32721. "type": "object",
  32722. "properties": {
  32723. "timestamp": {
  32724. "type": "number"
  32725. },
  32726. "sessionID": {
  32727. "type": "string",
  32728. "pattern": "^ses"
  32729. },
  32730. "messageID": {
  32731. "type": "string",
  32732. "pattern": "^msg_"
  32733. },
  32734. "agent": {
  32735. "type": "string"
  32736. }
  32737. },
  32738. "required": ["timestamp", "sessionID", "messageID", "agent"],
  32739. "additionalProperties": false
  32740. }
  32741. },
  32742. "required": ["id", "type", "properties"],
  32743. "additionalProperties": false
  32744. },
  32745. "EventSessionNextModelSwitched": {
  32746. "type": "object",
  32747. "properties": {
  32748. "id": {
  32749. "type": "string",
  32750. "pattern": "^evt_"
  32751. },
  32752. "type": {
  32753. "type": "string",
  32754. "enum": ["session.next.model.switched"]
  32755. },
  32756. "properties": {
  32757. "type": "object",
  32758. "properties": {
  32759. "timestamp": {
  32760. "type": "number"
  32761. },
  32762. "sessionID": {
  32763. "type": "string",
  32764. "pattern": "^ses"
  32765. },
  32766. "messageID": {
  32767. "type": "string",
  32768. "pattern": "^msg_"
  32769. },
  32770. "model": {
  32771. "type": "object",
  32772. "properties": {
  32773. "id": {
  32774. "type": "string"
  32775. },
  32776. "providerID": {
  32777. "type": "string"
  32778. },
  32779. "variant": {
  32780. "type": "string"
  32781. }
  32782. },
  32783. "required": ["id", "providerID"],
  32784. "additionalProperties": false
  32785. }
  32786. },
  32787. "required": ["timestamp", "sessionID", "messageID", "model"],
  32788. "additionalProperties": false
  32789. }
  32790. },
  32791. "required": ["id", "type", "properties"],
  32792. "additionalProperties": false
  32793. },
  32794. "EventSessionNextMoved": {
  32795. "type": "object",
  32796. "properties": {
  32797. "id": {
  32798. "type": "string",
  32799. "pattern": "^evt_"
  32800. },
  32801. "type": {
  32802. "type": "string",
  32803. "enum": ["session.next.moved"]
  32804. },
  32805. "properties": {
  32806. "type": "object",
  32807. "properties": {
  32808. "timestamp": {
  32809. "type": "number"
  32810. },
  32811. "sessionID": {
  32812. "type": "string",
  32813. "pattern": "^ses"
  32814. },
  32815. "location": {
  32816. "$ref": "#/components/schemas/LocationRef"
  32817. },
  32818. "subdirectory": {
  32819. "type": "string"
  32820. }
  32821. },
  32822. "required": ["timestamp", "sessionID", "location"],
  32823. "additionalProperties": false
  32824. }
  32825. },
  32826. "required": ["id", "type", "properties"],
  32827. "additionalProperties": false
  32828. },
  32829. "EventSessionNextPrompted": {
  32830. "type": "object",
  32831. "properties": {
  32832. "id": {
  32833. "type": "string",
  32834. "pattern": "^evt_"
  32835. },
  32836. "type": {
  32837. "type": "string",
  32838. "enum": ["session.next.prompted"]
  32839. },
  32840. "properties": {
  32841. "type": "object",
  32842. "properties": {
  32843. "timestamp": {
  32844. "type": "number"
  32845. },
  32846. "sessionID": {
  32847. "type": "string",
  32848. "pattern": "^ses"
  32849. },
  32850. "messageID": {
  32851. "type": "string",
  32852. "pattern": "^msg_"
  32853. },
  32854. "prompt": {
  32855. "$ref": "#/components/schemas/Prompt"
  32856. },
  32857. "delivery": {
  32858. "type": "string",
  32859. "enum": ["steer", "queue"]
  32860. }
  32861. },
  32862. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  32863. "additionalProperties": false
  32864. }
  32865. },
  32866. "required": ["id", "type", "properties"],
  32867. "additionalProperties": false
  32868. },
  32869. "EventSessionNextPromptAdmitted": {
  32870. "type": "object",
  32871. "properties": {
  32872. "id": {
  32873. "type": "string",
  32874. "pattern": "^evt_"
  32875. },
  32876. "type": {
  32877. "type": "string",
  32878. "enum": ["session.next.prompt.admitted"]
  32879. },
  32880. "properties": {
  32881. "type": "object",
  32882. "properties": {
  32883. "timestamp": {
  32884. "type": "number"
  32885. },
  32886. "sessionID": {
  32887. "type": "string",
  32888. "pattern": "^ses"
  32889. },
  32890. "messageID": {
  32891. "type": "string",
  32892. "pattern": "^msg_"
  32893. },
  32894. "prompt": {
  32895. "$ref": "#/components/schemas/Prompt"
  32896. },
  32897. "delivery": {
  32898. "type": "string",
  32899. "enum": ["steer", "queue"]
  32900. }
  32901. },
  32902. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  32903. "additionalProperties": false
  32904. }
  32905. },
  32906. "required": ["id", "type", "properties"],
  32907. "additionalProperties": false
  32908. },
  32909. "EventSessionNextContextUpdated": {
  32910. "type": "object",
  32911. "properties": {
  32912. "id": {
  32913. "type": "string",
  32914. "pattern": "^evt_"
  32915. },
  32916. "type": {
  32917. "type": "string",
  32918. "enum": ["session.next.context.updated"]
  32919. },
  32920. "properties": {
  32921. "type": "object",
  32922. "properties": {
  32923. "timestamp": {
  32924. "type": "number"
  32925. },
  32926. "sessionID": {
  32927. "type": "string",
  32928. "pattern": "^ses"
  32929. },
  32930. "messageID": {
  32931. "type": "string",
  32932. "pattern": "^msg_"
  32933. },
  32934. "text": {
  32935. "type": "string"
  32936. }
  32937. },
  32938. "required": ["timestamp", "sessionID", "messageID", "text"],
  32939. "additionalProperties": false
  32940. }
  32941. },
  32942. "required": ["id", "type", "properties"],
  32943. "additionalProperties": false
  32944. },
  32945. "EventSessionNextSynthetic": {
  32946. "type": "object",
  32947. "properties": {
  32948. "id": {
  32949. "type": "string",
  32950. "pattern": "^evt_"
  32951. },
  32952. "type": {
  32953. "type": "string",
  32954. "enum": ["session.next.synthetic"]
  32955. },
  32956. "properties": {
  32957. "type": "object",
  32958. "properties": {
  32959. "timestamp": {
  32960. "type": "number"
  32961. },
  32962. "sessionID": {
  32963. "type": "string",
  32964. "pattern": "^ses"
  32965. },
  32966. "messageID": {
  32967. "type": "string",
  32968. "pattern": "^msg_"
  32969. },
  32970. "text": {
  32971. "type": "string"
  32972. }
  32973. },
  32974. "required": ["timestamp", "sessionID", "messageID", "text"],
  32975. "additionalProperties": false
  32976. }
  32977. },
  32978. "required": ["id", "type", "properties"],
  32979. "additionalProperties": false
  32980. },
  32981. "EventSessionNextShellStarted": {
  32982. "type": "object",
  32983. "properties": {
  32984. "id": {
  32985. "type": "string",
  32986. "pattern": "^evt_"
  32987. },
  32988. "type": {
  32989. "type": "string",
  32990. "enum": ["session.next.shell.started"]
  32991. },
  32992. "properties": {
  32993. "type": "object",
  32994. "properties": {
  32995. "timestamp": {
  32996. "type": "number"
  32997. },
  32998. "sessionID": {
  32999. "type": "string",
  33000. "pattern": "^ses"
  33001. },
  33002. "messageID": {
  33003. "type": "string",
  33004. "pattern": "^msg_"
  33005. },
  33006. "callID": {
  33007. "type": "string"
  33008. },
  33009. "command": {
  33010. "type": "string"
  33011. }
  33012. },
  33013. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  33014. "additionalProperties": false
  33015. }
  33016. },
  33017. "required": ["id", "type", "properties"],
  33018. "additionalProperties": false
  33019. },
  33020. "EventSessionNextShellEnded": {
  33021. "type": "object",
  33022. "properties": {
  33023. "id": {
  33024. "type": "string",
  33025. "pattern": "^evt_"
  33026. },
  33027. "type": {
  33028. "type": "string",
  33029. "enum": ["session.next.shell.ended"]
  33030. },
  33031. "properties": {
  33032. "type": "object",
  33033. "properties": {
  33034. "timestamp": {
  33035. "type": "number"
  33036. },
  33037. "sessionID": {
  33038. "type": "string",
  33039. "pattern": "^ses"
  33040. },
  33041. "callID": {
  33042. "type": "string"
  33043. },
  33044. "output": {
  33045. "type": "string"
  33046. }
  33047. },
  33048. "required": ["timestamp", "sessionID", "callID", "output"],
  33049. "additionalProperties": false
  33050. }
  33051. },
  33052. "required": ["id", "type", "properties"],
  33053. "additionalProperties": false
  33054. },
  33055. "EventSessionNextStepStarted": {
  33056. "type": "object",
  33057. "properties": {
  33058. "id": {
  33059. "type": "string",
  33060. "pattern": "^evt_"
  33061. },
  33062. "type": {
  33063. "type": "string",
  33064. "enum": ["session.next.step.started"]
  33065. },
  33066. "properties": {
  33067. "type": "object",
  33068. "properties": {
  33069. "timestamp": {
  33070. "type": "number"
  33071. },
  33072. "sessionID": {
  33073. "type": "string",
  33074. "pattern": "^ses"
  33075. },
  33076. "assistantMessageID": {
  33077. "type": "string",
  33078. "pattern": "^msg_"
  33079. },
  33080. "agent": {
  33081. "type": "string"
  33082. },
  33083. "model": {
  33084. "type": "object",
  33085. "properties": {
  33086. "id": {
  33087. "type": "string"
  33088. },
  33089. "providerID": {
  33090. "type": "string"
  33091. },
  33092. "variant": {
  33093. "type": "string"
  33094. }
  33095. },
  33096. "required": ["id", "providerID"],
  33097. "additionalProperties": false
  33098. },
  33099. "snapshot": {
  33100. "type": "string"
  33101. }
  33102. },
  33103. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  33104. "additionalProperties": false
  33105. }
  33106. },
  33107. "required": ["id", "type", "properties"],
  33108. "additionalProperties": false
  33109. },
  33110. "EventSessionNextStepEnded": {
  33111. "type": "object",
  33112. "properties": {
  33113. "id": {
  33114. "type": "string",
  33115. "pattern": "^evt_"
  33116. },
  33117. "type": {
  33118. "type": "string",
  33119. "enum": ["session.next.step.ended"]
  33120. },
  33121. "properties": {
  33122. "type": "object",
  33123. "properties": {
  33124. "timestamp": {
  33125. "type": "number"
  33126. },
  33127. "sessionID": {
  33128. "type": "string",
  33129. "pattern": "^ses"
  33130. },
  33131. "assistantMessageID": {
  33132. "type": "string",
  33133. "pattern": "^msg_"
  33134. },
  33135. "finish": {
  33136. "type": "string"
  33137. },
  33138. "cost": {
  33139. "type": "number"
  33140. },
  33141. "tokens": {
  33142. "type": "object",
  33143. "properties": {
  33144. "input": {
  33145. "type": "number"
  33146. },
  33147. "output": {
  33148. "type": "number"
  33149. },
  33150. "reasoning": {
  33151. "type": "number"
  33152. },
  33153. "cache": {
  33154. "type": "object",
  33155. "properties": {
  33156. "read": {
  33157. "type": "number"
  33158. },
  33159. "write": {
  33160. "type": "number"
  33161. }
  33162. },
  33163. "required": ["read", "write"],
  33164. "additionalProperties": false
  33165. }
  33166. },
  33167. "required": ["input", "output", "reasoning", "cache"],
  33168. "additionalProperties": false
  33169. },
  33170. "snapshot": {
  33171. "type": "string"
  33172. }
  33173. },
  33174. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  33175. "additionalProperties": false
  33176. }
  33177. },
  33178. "required": ["id", "type", "properties"],
  33179. "additionalProperties": false
  33180. },
  33181. "EventSessionNextStepFailed": {
  33182. "type": "object",
  33183. "properties": {
  33184. "id": {
  33185. "type": "string",
  33186. "pattern": "^evt_"
  33187. },
  33188. "type": {
  33189. "type": "string",
  33190. "enum": ["session.next.step.failed"]
  33191. },
  33192. "properties": {
  33193. "type": "object",
  33194. "properties": {
  33195. "timestamp": {
  33196. "type": "number"
  33197. },
  33198. "sessionID": {
  33199. "type": "string",
  33200. "pattern": "^ses"
  33201. },
  33202. "assistantMessageID": {
  33203. "type": "string",
  33204. "pattern": "^msg_"
  33205. },
  33206. "error": {
  33207. "$ref": "#/components/schemas/SessionErrorUnknown"
  33208. }
  33209. },
  33210. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  33211. "additionalProperties": false
  33212. }
  33213. },
  33214. "required": ["id", "type", "properties"],
  33215. "additionalProperties": false
  33216. },
  33217. "EventSessionNextTextStarted": {
  33218. "type": "object",
  33219. "properties": {
  33220. "id": {
  33221. "type": "string",
  33222. "pattern": "^evt_"
  33223. },
  33224. "type": {
  33225. "type": "string",
  33226. "enum": ["session.next.text.started"]
  33227. },
  33228. "properties": {
  33229. "type": "object",
  33230. "properties": {
  33231. "timestamp": {
  33232. "type": "number"
  33233. },
  33234. "sessionID": {
  33235. "type": "string",
  33236. "pattern": "^ses"
  33237. },
  33238. "assistantMessageID": {
  33239. "type": "string",
  33240. "pattern": "^msg_"
  33241. },
  33242. "textID": {
  33243. "type": "string"
  33244. }
  33245. },
  33246. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  33247. "additionalProperties": false
  33248. }
  33249. },
  33250. "required": ["id", "type", "properties"],
  33251. "additionalProperties": false
  33252. },
  33253. "EventSessionNextTextDelta": {
  33254. "type": "object",
  33255. "properties": {
  33256. "id": {
  33257. "type": "string",
  33258. "pattern": "^evt_"
  33259. },
  33260. "type": {
  33261. "type": "string",
  33262. "enum": ["session.next.text.delta"]
  33263. },
  33264. "properties": {
  33265. "type": "object",
  33266. "properties": {
  33267. "timestamp": {
  33268. "type": "number"
  33269. },
  33270. "sessionID": {
  33271. "type": "string",
  33272. "pattern": "^ses"
  33273. },
  33274. "assistantMessageID": {
  33275. "type": "string",
  33276. "pattern": "^msg_"
  33277. },
  33278. "textID": {
  33279. "type": "string"
  33280. },
  33281. "delta": {
  33282. "type": "string"
  33283. }
  33284. },
  33285. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  33286. "additionalProperties": false
  33287. }
  33288. },
  33289. "required": ["id", "type", "properties"],
  33290. "additionalProperties": false
  33291. },
  33292. "EventSessionNextTextEnded": {
  33293. "type": "object",
  33294. "properties": {
  33295. "id": {
  33296. "type": "string",
  33297. "pattern": "^evt_"
  33298. },
  33299. "type": {
  33300. "type": "string",
  33301. "enum": ["session.next.text.ended"]
  33302. },
  33303. "properties": {
  33304. "type": "object",
  33305. "properties": {
  33306. "timestamp": {
  33307. "type": "number"
  33308. },
  33309. "sessionID": {
  33310. "type": "string",
  33311. "pattern": "^ses"
  33312. },
  33313. "assistantMessageID": {
  33314. "type": "string",
  33315. "pattern": "^msg_"
  33316. },
  33317. "textID": {
  33318. "type": "string"
  33319. },
  33320. "text": {
  33321. "type": "string"
  33322. }
  33323. },
  33324. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  33325. "additionalProperties": false
  33326. }
  33327. },
  33328. "required": ["id", "type", "properties"],
  33329. "additionalProperties": false
  33330. },
  33331. "EventSessionNextReasoningStarted": {
  33332. "type": "object",
  33333. "properties": {
  33334. "id": {
  33335. "type": "string",
  33336. "pattern": "^evt_"
  33337. },
  33338. "type": {
  33339. "type": "string",
  33340. "enum": ["session.next.reasoning.started"]
  33341. },
  33342. "properties": {
  33343. "type": "object",
  33344. "properties": {
  33345. "timestamp": {
  33346. "type": "number"
  33347. },
  33348. "sessionID": {
  33349. "type": "string",
  33350. "pattern": "^ses"
  33351. },
  33352. "assistantMessageID": {
  33353. "type": "string",
  33354. "pattern": "^msg_"
  33355. },
  33356. "reasoningID": {
  33357. "type": "string"
  33358. },
  33359. "providerMetadata": {
  33360. "type": "object",
  33361. "additionalProperties": {
  33362. "type": "object"
  33363. }
  33364. }
  33365. },
  33366. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  33367. "additionalProperties": false
  33368. }
  33369. },
  33370. "required": ["id", "type", "properties"],
  33371. "additionalProperties": false
  33372. },
  33373. "EventSessionNextReasoningDelta": {
  33374. "type": "object",
  33375. "properties": {
  33376. "id": {
  33377. "type": "string",
  33378. "pattern": "^evt_"
  33379. },
  33380. "type": {
  33381. "type": "string",
  33382. "enum": ["session.next.reasoning.delta"]
  33383. },
  33384. "properties": {
  33385. "type": "object",
  33386. "properties": {
  33387. "timestamp": {
  33388. "type": "number"
  33389. },
  33390. "sessionID": {
  33391. "type": "string",
  33392. "pattern": "^ses"
  33393. },
  33394. "assistantMessageID": {
  33395. "type": "string",
  33396. "pattern": "^msg_"
  33397. },
  33398. "reasoningID": {
  33399. "type": "string"
  33400. },
  33401. "delta": {
  33402. "type": "string"
  33403. }
  33404. },
  33405. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  33406. "additionalProperties": false
  33407. }
  33408. },
  33409. "required": ["id", "type", "properties"],
  33410. "additionalProperties": false
  33411. },
  33412. "EventSessionNextReasoningEnded": {
  33413. "type": "object",
  33414. "properties": {
  33415. "id": {
  33416. "type": "string",
  33417. "pattern": "^evt_"
  33418. },
  33419. "type": {
  33420. "type": "string",
  33421. "enum": ["session.next.reasoning.ended"]
  33422. },
  33423. "properties": {
  33424. "type": "object",
  33425. "properties": {
  33426. "timestamp": {
  33427. "type": "number"
  33428. },
  33429. "sessionID": {
  33430. "type": "string",
  33431. "pattern": "^ses"
  33432. },
  33433. "assistantMessageID": {
  33434. "type": "string",
  33435. "pattern": "^msg_"
  33436. },
  33437. "reasoningID": {
  33438. "type": "string"
  33439. },
  33440. "text": {
  33441. "type": "string"
  33442. },
  33443. "providerMetadata": {
  33444. "type": "object",
  33445. "additionalProperties": {
  33446. "type": "object"
  33447. }
  33448. }
  33449. },
  33450. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  33451. "additionalProperties": false
  33452. }
  33453. },
  33454. "required": ["id", "type", "properties"],
  33455. "additionalProperties": false
  33456. },
  33457. "EventSessionNextToolInputStarted": {
  33458. "type": "object",
  33459. "properties": {
  33460. "id": {
  33461. "type": "string",
  33462. "pattern": "^evt_"
  33463. },
  33464. "type": {
  33465. "type": "string",
  33466. "enum": ["session.next.tool.input.started"]
  33467. },
  33468. "properties": {
  33469. "type": "object",
  33470. "properties": {
  33471. "timestamp": {
  33472. "type": "number"
  33473. },
  33474. "sessionID": {
  33475. "type": "string",
  33476. "pattern": "^ses"
  33477. },
  33478. "assistantMessageID": {
  33479. "type": "string",
  33480. "pattern": "^msg_"
  33481. },
  33482. "callID": {
  33483. "type": "string"
  33484. },
  33485. "name": {
  33486. "type": "string"
  33487. }
  33488. },
  33489. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  33490. "additionalProperties": false
  33491. }
  33492. },
  33493. "required": ["id", "type", "properties"],
  33494. "additionalProperties": false
  33495. },
  33496. "EventSessionNextToolInputDelta": {
  33497. "type": "object",
  33498. "properties": {
  33499. "id": {
  33500. "type": "string",
  33501. "pattern": "^evt_"
  33502. },
  33503. "type": {
  33504. "type": "string",
  33505. "enum": ["session.next.tool.input.delta"]
  33506. },
  33507. "properties": {
  33508. "type": "object",
  33509. "properties": {
  33510. "timestamp": {
  33511. "type": "number"
  33512. },
  33513. "sessionID": {
  33514. "type": "string",
  33515. "pattern": "^ses"
  33516. },
  33517. "assistantMessageID": {
  33518. "type": "string",
  33519. "pattern": "^msg_"
  33520. },
  33521. "callID": {
  33522. "type": "string"
  33523. },
  33524. "delta": {
  33525. "type": "string"
  33526. }
  33527. },
  33528. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  33529. "additionalProperties": false
  33530. }
  33531. },
  33532. "required": ["id", "type", "properties"],
  33533. "additionalProperties": false
  33534. },
  33535. "EventSessionNextToolInputEnded": {
  33536. "type": "object",
  33537. "properties": {
  33538. "id": {
  33539. "type": "string",
  33540. "pattern": "^evt_"
  33541. },
  33542. "type": {
  33543. "type": "string",
  33544. "enum": ["session.next.tool.input.ended"]
  33545. },
  33546. "properties": {
  33547. "type": "object",
  33548. "properties": {
  33549. "timestamp": {
  33550. "type": "number"
  33551. },
  33552. "sessionID": {
  33553. "type": "string",
  33554. "pattern": "^ses"
  33555. },
  33556. "assistantMessageID": {
  33557. "type": "string",
  33558. "pattern": "^msg_"
  33559. },
  33560. "callID": {
  33561. "type": "string"
  33562. },
  33563. "text": {
  33564. "type": "string"
  33565. }
  33566. },
  33567. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  33568. "additionalProperties": false
  33569. }
  33570. },
  33571. "required": ["id", "type", "properties"],
  33572. "additionalProperties": false
  33573. },
  33574. "EventSessionNextToolCalled": {
  33575. "type": "object",
  33576. "properties": {
  33577. "id": {
  33578. "type": "string",
  33579. "pattern": "^evt_"
  33580. },
  33581. "type": {
  33582. "type": "string",
  33583. "enum": ["session.next.tool.called"]
  33584. },
  33585. "properties": {
  33586. "type": "object",
  33587. "properties": {
  33588. "timestamp": {
  33589. "type": "number"
  33590. },
  33591. "sessionID": {
  33592. "type": "string",
  33593. "pattern": "^ses"
  33594. },
  33595. "assistantMessageID": {
  33596. "type": "string",
  33597. "pattern": "^msg_"
  33598. },
  33599. "callID": {
  33600. "type": "string"
  33601. },
  33602. "tool": {
  33603. "type": "string"
  33604. },
  33605. "input": {
  33606. "type": "object"
  33607. },
  33608. "provider": {
  33609. "type": "object",
  33610. "properties": {
  33611. "executed": {
  33612. "type": "boolean"
  33613. },
  33614. "metadata": {
  33615. "type": "object",
  33616. "additionalProperties": {
  33617. "type": "object"
  33618. }
  33619. }
  33620. },
  33621. "required": ["executed"],
  33622. "additionalProperties": false
  33623. }
  33624. },
  33625. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  33626. "additionalProperties": false
  33627. }
  33628. },
  33629. "required": ["id", "type", "properties"],
  33630. "additionalProperties": false
  33631. },
  33632. "EventSessionNextToolProgress": {
  33633. "type": "object",
  33634. "properties": {
  33635. "id": {
  33636. "type": "string",
  33637. "pattern": "^evt_"
  33638. },
  33639. "type": {
  33640. "type": "string",
  33641. "enum": ["session.next.tool.progress"]
  33642. },
  33643. "properties": {
  33644. "type": "object",
  33645. "properties": {
  33646. "timestamp": {
  33647. "type": "number"
  33648. },
  33649. "sessionID": {
  33650. "type": "string",
  33651. "pattern": "^ses"
  33652. },
  33653. "assistantMessageID": {
  33654. "type": "string",
  33655. "pattern": "^msg_"
  33656. },
  33657. "callID": {
  33658. "type": "string"
  33659. },
  33660. "structured": {
  33661. "type": "object"
  33662. },
  33663. "content": {
  33664. "type": "array",
  33665. "items": {
  33666. "anyOf": [
  33667. {
  33668. "$ref": "#/components/schemas/ToolTextContent"
  33669. },
  33670. {
  33671. "$ref": "#/components/schemas/ToolFileContent"
  33672. }
  33673. ]
  33674. }
  33675. }
  33676. },
  33677. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  33678. "additionalProperties": false
  33679. }
  33680. },
  33681. "required": ["id", "type", "properties"],
  33682. "additionalProperties": false
  33683. },
  33684. "EventSessionNextToolSuccess": {
  33685. "type": "object",
  33686. "properties": {
  33687. "id": {
  33688. "type": "string",
  33689. "pattern": "^evt_"
  33690. },
  33691. "type": {
  33692. "type": "string",
  33693. "enum": ["session.next.tool.success"]
  33694. },
  33695. "properties": {
  33696. "type": "object",
  33697. "properties": {
  33698. "timestamp": {
  33699. "type": "number"
  33700. },
  33701. "sessionID": {
  33702. "type": "string",
  33703. "pattern": "^ses"
  33704. },
  33705. "assistantMessageID": {
  33706. "type": "string",
  33707. "pattern": "^msg_"
  33708. },
  33709. "callID": {
  33710. "type": "string"
  33711. },
  33712. "structured": {
  33713. "type": "object"
  33714. },
  33715. "content": {
  33716. "type": "array",
  33717. "items": {
  33718. "anyOf": [
  33719. {
  33720. "$ref": "#/components/schemas/ToolTextContent"
  33721. },
  33722. {
  33723. "$ref": "#/components/schemas/ToolFileContent"
  33724. }
  33725. ]
  33726. }
  33727. },
  33728. "outputPaths": {
  33729. "type": "array",
  33730. "items": {
  33731. "type": "string"
  33732. }
  33733. },
  33734. "result": {},
  33735. "provider": {
  33736. "type": "object",
  33737. "properties": {
  33738. "executed": {
  33739. "type": "boolean"
  33740. },
  33741. "metadata": {
  33742. "type": "object",
  33743. "additionalProperties": {
  33744. "type": "object"
  33745. }
  33746. }
  33747. },
  33748. "required": ["executed"],
  33749. "additionalProperties": false
  33750. }
  33751. },
  33752. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  33753. "additionalProperties": false
  33754. }
  33755. },
  33756. "required": ["id", "type", "properties"],
  33757. "additionalProperties": false
  33758. },
  33759. "EventSessionNextToolFailed": {
  33760. "type": "object",
  33761. "properties": {
  33762. "id": {
  33763. "type": "string",
  33764. "pattern": "^evt_"
  33765. },
  33766. "type": {
  33767. "type": "string",
  33768. "enum": ["session.next.tool.failed"]
  33769. },
  33770. "properties": {
  33771. "type": "object",
  33772. "properties": {
  33773. "timestamp": {
  33774. "type": "number"
  33775. },
  33776. "sessionID": {
  33777. "type": "string",
  33778. "pattern": "^ses"
  33779. },
  33780. "assistantMessageID": {
  33781. "type": "string",
  33782. "pattern": "^msg_"
  33783. },
  33784. "callID": {
  33785. "type": "string"
  33786. },
  33787. "error": {
  33788. "$ref": "#/components/schemas/SessionErrorUnknown"
  33789. },
  33790. "result": {},
  33791. "provider": {
  33792. "type": "object",
  33793. "properties": {
  33794. "executed": {
  33795. "type": "boolean"
  33796. },
  33797. "metadata": {
  33798. "type": "object",
  33799. "additionalProperties": {
  33800. "type": "object"
  33801. }
  33802. }
  33803. },
  33804. "required": ["executed"],
  33805. "additionalProperties": false
  33806. }
  33807. },
  33808. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  33809. "additionalProperties": false
  33810. }
  33811. },
  33812. "required": ["id", "type", "properties"],
  33813. "additionalProperties": false
  33814. },
  33815. "EventSessionNextRetried": {
  33816. "type": "object",
  33817. "properties": {
  33818. "id": {
  33819. "type": "string",
  33820. "pattern": "^evt_"
  33821. },
  33822. "type": {
  33823. "type": "string",
  33824. "enum": ["session.next.retried"]
  33825. },
  33826. "properties": {
  33827. "type": "object",
  33828. "properties": {
  33829. "timestamp": {
  33830. "type": "number"
  33831. },
  33832. "sessionID": {
  33833. "type": "string",
  33834. "pattern": "^ses"
  33835. },
  33836. "attempt": {
  33837. "type": "number"
  33838. },
  33839. "error": {
  33840. "$ref": "#/components/schemas/SessionNextRetry_error"
  33841. }
  33842. },
  33843. "required": ["timestamp", "sessionID", "attempt", "error"],
  33844. "additionalProperties": false
  33845. }
  33846. },
  33847. "required": ["id", "type", "properties"],
  33848. "additionalProperties": false
  33849. },
  33850. "EventSessionNextCompactionStarted": {
  33851. "type": "object",
  33852. "properties": {
  33853. "id": {
  33854. "type": "string",
  33855. "pattern": "^evt_"
  33856. },
  33857. "type": {
  33858. "type": "string",
  33859. "enum": ["session.next.compaction.started"]
  33860. },
  33861. "properties": {
  33862. "type": "object",
  33863. "properties": {
  33864. "timestamp": {
  33865. "type": "number"
  33866. },
  33867. "sessionID": {
  33868. "type": "string",
  33869. "pattern": "^ses"
  33870. },
  33871. "messageID": {
  33872. "type": "string",
  33873. "pattern": "^msg_"
  33874. },
  33875. "reason": {
  33876. "type": "string",
  33877. "enum": ["auto", "manual"]
  33878. }
  33879. },
  33880. "required": ["timestamp", "sessionID", "messageID", "reason"],
  33881. "additionalProperties": false
  33882. }
  33883. },
  33884. "required": ["id", "type", "properties"],
  33885. "additionalProperties": false
  33886. },
  33887. "EventSessionNextCompactionDelta": {
  33888. "type": "object",
  33889. "properties": {
  33890. "id": {
  33891. "type": "string",
  33892. "pattern": "^evt_"
  33893. },
  33894. "type": {
  33895. "type": "string",
  33896. "enum": ["session.next.compaction.delta"]
  33897. },
  33898. "properties": {
  33899. "type": "object",
  33900. "properties": {
  33901. "timestamp": {
  33902. "type": "number"
  33903. },
  33904. "sessionID": {
  33905. "type": "string",
  33906. "pattern": "^ses"
  33907. },
  33908. "messageID": {
  33909. "type": "string",
  33910. "pattern": "^msg_"
  33911. },
  33912. "text": {
  33913. "type": "string"
  33914. }
  33915. },
  33916. "required": ["timestamp", "sessionID", "messageID", "text"],
  33917. "additionalProperties": false
  33918. }
  33919. },
  33920. "required": ["id", "type", "properties"],
  33921. "additionalProperties": false
  33922. },
  33923. "EventSessionNextCompactionEnded": {
  33924. "type": "object",
  33925. "properties": {
  33926. "id": {
  33927. "type": "string",
  33928. "pattern": "^evt_"
  33929. },
  33930. "type": {
  33931. "type": "string",
  33932. "enum": ["session.next.compaction.ended"]
  33933. },
  33934. "properties": {
  33935. "type": "object",
  33936. "properties": {
  33937. "timestamp": {
  33938. "type": "number"
  33939. },
  33940. "sessionID": {
  33941. "type": "string",
  33942. "pattern": "^ses"
  33943. },
  33944. "messageID": {
  33945. "type": "string",
  33946. "pattern": "^msg_"
  33947. },
  33948. "reason": {
  33949. "type": "string",
  33950. "enum": ["auto", "manual"]
  33951. },
  33952. "text": {
  33953. "type": "string"
  33954. },
  33955. "recent": {
  33956. "type": "string"
  33957. }
  33958. },
  33959. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  33960. "additionalProperties": false
  33961. }
  33962. },
  33963. "required": ["id", "type", "properties"],
  33964. "additionalProperties": false
  33965. },
  33966. "EventMessagePartDelta": {
  33967. "type": "object",
  33968. "properties": {
  33969. "id": {
  33970. "type": "string",
  33971. "pattern": "^evt_"
  33972. },
  33973. "type": {
  33974. "type": "string",
  33975. "enum": ["message.part.delta"]
  33976. },
  33977. "properties": {
  33978. "type": "object",
  33979. "properties": {
  33980. "sessionID": {
  33981. "type": "string",
  33982. "pattern": "^ses"
  33983. },
  33984. "messageID": {
  33985. "type": "string",
  33986. "pattern": "^msg"
  33987. },
  33988. "partID": {
  33989. "type": "string",
  33990. "pattern": "^prt"
  33991. },
  33992. "field": {
  33993. "type": "string"
  33994. },
  33995. "delta": {
  33996. "type": "string"
  33997. }
  33998. },
  33999. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  34000. "additionalProperties": false
  34001. }
  34002. },
  34003. "required": ["id", "type", "properties"],
  34004. "additionalProperties": false
  34005. },
  34006. "EventSessionDiff": {
  34007. "type": "object",
  34008. "properties": {
  34009. "id": {
  34010. "type": "string",
  34011. "pattern": "^evt_"
  34012. },
  34013. "type": {
  34014. "type": "string",
  34015. "enum": ["session.diff"]
  34016. },
  34017. "properties": {
  34018. "type": "object",
  34019. "properties": {
  34020. "sessionID": {
  34021. "type": "string",
  34022. "pattern": "^ses"
  34023. },
  34024. "diff": {
  34025. "type": "array",
  34026. "items": {
  34027. "$ref": "#/components/schemas/SnapshotFileDiff"
  34028. }
  34029. }
  34030. },
  34031. "required": ["sessionID", "diff"],
  34032. "additionalProperties": false
  34033. }
  34034. },
  34035. "required": ["id", "type", "properties"],
  34036. "additionalProperties": false
  34037. },
  34038. "EventSessionError": {
  34039. "type": "object",
  34040. "properties": {
  34041. "id": {
  34042. "type": "string",
  34043. "pattern": "^evt_"
  34044. },
  34045. "type": {
  34046. "type": "string",
  34047. "enum": ["session.error"]
  34048. },
  34049. "properties": {
  34050. "type": "object",
  34051. "properties": {
  34052. "sessionID": {
  34053. "type": "string",
  34054. "pattern": "^ses"
  34055. },
  34056. "error": {
  34057. "anyOf": [
  34058. {
  34059. "$ref": "#/components/schemas/ProviderAuthError"
  34060. },
  34061. {
  34062. "$ref": "#/components/schemas/UnknownError"
  34063. },
  34064. {
  34065. "$ref": "#/components/schemas/MessageOutputLengthError"
  34066. },
  34067. {
  34068. "$ref": "#/components/schemas/MessageAbortedError"
  34069. },
  34070. {
  34071. "$ref": "#/components/schemas/StructuredOutputError"
  34072. },
  34073. {
  34074. "$ref": "#/components/schemas/ContextOverflowError"
  34075. },
  34076. {
  34077. "$ref": "#/components/schemas/ContentFilterError"
  34078. },
  34079. {
  34080. "$ref": "#/components/schemas/APIError"
  34081. }
  34082. ]
  34083. }
  34084. },
  34085. "additionalProperties": false
  34086. }
  34087. },
  34088. "required": ["id", "type", "properties"],
  34089. "additionalProperties": false
  34090. },
  34091. "EventInstallationUpdated": {
  34092. "type": "object",
  34093. "properties": {
  34094. "id": {
  34095. "type": "string",
  34096. "pattern": "^evt_"
  34097. },
  34098. "type": {
  34099. "type": "string",
  34100. "enum": ["installation.updated"]
  34101. },
  34102. "properties": {
  34103. "type": "object",
  34104. "properties": {
  34105. "version": {
  34106. "type": "string"
  34107. }
  34108. },
  34109. "required": ["version"],
  34110. "additionalProperties": false
  34111. }
  34112. },
  34113. "required": ["id", "type", "properties"],
  34114. "additionalProperties": false
  34115. },
  34116. "EventInstallationUpdate-available": {
  34117. "type": "object",
  34118. "properties": {
  34119. "id": {
  34120. "type": "string",
  34121. "pattern": "^evt_"
  34122. },
  34123. "type": {
  34124. "type": "string",
  34125. "enum": ["installation.update-available"]
  34126. },
  34127. "properties": {
  34128. "type": "object",
  34129. "properties": {
  34130. "version": {
  34131. "type": "string"
  34132. }
  34133. },
  34134. "required": ["version"],
  34135. "additionalProperties": false
  34136. }
  34137. },
  34138. "required": ["id", "type", "properties"],
  34139. "additionalProperties": false
  34140. },
  34141. "EventFileEdited": {
  34142. "type": "object",
  34143. "properties": {
  34144. "id": {
  34145. "type": "string",
  34146. "pattern": "^evt_"
  34147. },
  34148. "type": {
  34149. "type": "string",
  34150. "enum": ["file.edited"]
  34151. },
  34152. "properties": {
  34153. "type": "object",
  34154. "properties": {
  34155. "file": {
  34156. "type": "string"
  34157. }
  34158. },
  34159. "required": ["file"],
  34160. "additionalProperties": false
  34161. }
  34162. },
  34163. "required": ["id", "type", "properties"],
  34164. "additionalProperties": false
  34165. },
  34166. "EventReferenceUpdated": {
  34167. "type": "object",
  34168. "properties": {
  34169. "id": {
  34170. "type": "string",
  34171. "pattern": "^evt_"
  34172. },
  34173. "type": {
  34174. "type": "string",
  34175. "enum": ["reference.updated"]
  34176. },
  34177. "properties": {
  34178. "type": "object",
  34179. "properties": {}
  34180. }
  34181. },
  34182. "required": ["id", "type", "properties"],
  34183. "additionalProperties": false
  34184. },
  34185. "EventPermissionV2Asked": {
  34186. "type": "object",
  34187. "properties": {
  34188. "id": {
  34189. "type": "string",
  34190. "pattern": "^evt_"
  34191. },
  34192. "type": {
  34193. "type": "string",
  34194. "enum": ["permission.v2.asked"]
  34195. },
  34196. "properties": {
  34197. "type": "object",
  34198. "properties": {
  34199. "id": {
  34200. "type": "string",
  34201. "pattern": "^per"
  34202. },
  34203. "sessionID": {
  34204. "type": "string",
  34205. "pattern": "^ses"
  34206. },
  34207. "action": {
  34208. "type": "string"
  34209. },
  34210. "resources": {
  34211. "type": "array",
  34212. "items": {
  34213. "type": "string"
  34214. }
  34215. },
  34216. "save": {
  34217. "type": "array",
  34218. "items": {
  34219. "type": "string"
  34220. }
  34221. },
  34222. "metadata": {
  34223. "type": "object"
  34224. },
  34225. "source": {
  34226. "$ref": "#/components/schemas/PermissionV2Source"
  34227. }
  34228. },
  34229. "required": ["id", "sessionID", "action", "resources"],
  34230. "additionalProperties": false
  34231. }
  34232. },
  34233. "required": ["id", "type", "properties"],
  34234. "additionalProperties": false
  34235. },
  34236. "EventPermissionV2Replied": {
  34237. "type": "object",
  34238. "properties": {
  34239. "id": {
  34240. "type": "string",
  34241. "pattern": "^evt_"
  34242. },
  34243. "type": {
  34244. "type": "string",
  34245. "enum": ["permission.v2.replied"]
  34246. },
  34247. "properties": {
  34248. "type": "object",
  34249. "properties": {
  34250. "sessionID": {
  34251. "type": "string",
  34252. "pattern": "^ses"
  34253. },
  34254. "requestID": {
  34255. "type": "string",
  34256. "pattern": "^per"
  34257. },
  34258. "reply": {
  34259. "$ref": "#/components/schemas/PermissionV2Reply"
  34260. }
  34261. },
  34262. "required": ["sessionID", "requestID", "reply"],
  34263. "additionalProperties": false
  34264. }
  34265. },
  34266. "required": ["id", "type", "properties"],
  34267. "additionalProperties": false
  34268. },
  34269. "EventPluginAdded": {
  34270. "type": "object",
  34271. "properties": {
  34272. "id": {
  34273. "type": "string",
  34274. "pattern": "^evt_"
  34275. },
  34276. "type": {
  34277. "type": "string",
  34278. "enum": ["plugin.added"]
  34279. },
  34280. "properties": {
  34281. "type": "object",
  34282. "properties": {
  34283. "id": {
  34284. "type": "string"
  34285. }
  34286. },
  34287. "required": ["id"],
  34288. "additionalProperties": false
  34289. }
  34290. },
  34291. "required": ["id", "type", "properties"],
  34292. "additionalProperties": false
  34293. },
  34294. "EventProjectDirectoriesUpdated": {
  34295. "type": "object",
  34296. "properties": {
  34297. "id": {
  34298. "type": "string",
  34299. "pattern": "^evt_"
  34300. },
  34301. "type": {
  34302. "type": "string",
  34303. "enum": ["project.directories.updated"]
  34304. },
  34305. "properties": {
  34306. "type": "object",
  34307. "properties": {
  34308. "projectID": {
  34309. "type": "string"
  34310. }
  34311. },
  34312. "required": ["projectID"],
  34313. "additionalProperties": false
  34314. }
  34315. },
  34316. "required": ["id", "type", "properties"],
  34317. "additionalProperties": false
  34318. },
  34319. "EventFileWatcherUpdated": {
  34320. "type": "object",
  34321. "properties": {
  34322. "id": {
  34323. "type": "string",
  34324. "pattern": "^evt_"
  34325. },
  34326. "type": {
  34327. "type": "string",
  34328. "enum": ["file.watcher.updated"]
  34329. },
  34330. "properties": {
  34331. "type": "object",
  34332. "properties": {
  34333. "file": {
  34334. "type": "string"
  34335. },
  34336. "event": {
  34337. "type": "string",
  34338. "enum": ["add", "change", "unlink"]
  34339. }
  34340. },
  34341. "required": ["file", "event"],
  34342. "additionalProperties": false
  34343. }
  34344. },
  34345. "required": ["id", "type", "properties"],
  34346. "additionalProperties": false
  34347. },
  34348. "EventPtyCreated": {
  34349. "type": "object",
  34350. "properties": {
  34351. "id": {
  34352. "type": "string",
  34353. "pattern": "^evt_"
  34354. },
  34355. "type": {
  34356. "type": "string",
  34357. "enum": ["pty.created"]
  34358. },
  34359. "properties": {
  34360. "type": "object",
  34361. "properties": {
  34362. "info": {
  34363. "$ref": "#/components/schemas/Pty"
  34364. }
  34365. },
  34366. "required": ["info"],
  34367. "additionalProperties": false
  34368. }
  34369. },
  34370. "required": ["id", "type", "properties"],
  34371. "additionalProperties": false
  34372. },
  34373. "EventPtyUpdated": {
  34374. "type": "object",
  34375. "properties": {
  34376. "id": {
  34377. "type": "string",
  34378. "pattern": "^evt_"
  34379. },
  34380. "type": {
  34381. "type": "string",
  34382. "enum": ["pty.updated"]
  34383. },
  34384. "properties": {
  34385. "type": "object",
  34386. "properties": {
  34387. "info": {
  34388. "$ref": "#/components/schemas/Pty"
  34389. }
  34390. },
  34391. "required": ["info"],
  34392. "additionalProperties": false
  34393. }
  34394. },
  34395. "required": ["id", "type", "properties"],
  34396. "additionalProperties": false
  34397. },
  34398. "EventPtyExited": {
  34399. "type": "object",
  34400. "properties": {
  34401. "id": {
  34402. "type": "string",
  34403. "pattern": "^evt_"
  34404. },
  34405. "type": {
  34406. "type": "string",
  34407. "enum": ["pty.exited"]
  34408. },
  34409. "properties": {
  34410. "type": "object",
  34411. "properties": {
  34412. "id": {
  34413. "type": "string",
  34414. "pattern": "^pty"
  34415. },
  34416. "exitCode": {
  34417. "type": "integer",
  34418. "minimum": 0
  34419. }
  34420. },
  34421. "required": ["id", "exitCode"],
  34422. "additionalProperties": false
  34423. }
  34424. },
  34425. "required": ["id", "type", "properties"],
  34426. "additionalProperties": false
  34427. },
  34428. "EventPtyDeleted": {
  34429. "type": "object",
  34430. "properties": {
  34431. "id": {
  34432. "type": "string",
  34433. "pattern": "^evt_"
  34434. },
  34435. "type": {
  34436. "type": "string",
  34437. "enum": ["pty.deleted"]
  34438. },
  34439. "properties": {
  34440. "type": "object",
  34441. "properties": {
  34442. "id": {
  34443. "type": "string",
  34444. "pattern": "^pty"
  34445. }
  34446. },
  34447. "required": ["id"],
  34448. "additionalProperties": false
  34449. }
  34450. },
  34451. "required": ["id", "type", "properties"],
  34452. "additionalProperties": false
  34453. },
  34454. "EventQuestionV2Asked": {
  34455. "type": "object",
  34456. "properties": {
  34457. "id": {
  34458. "type": "string",
  34459. "pattern": "^evt_"
  34460. },
  34461. "type": {
  34462. "type": "string",
  34463. "enum": ["question.v2.asked"]
  34464. },
  34465. "properties": {
  34466. "type": "object",
  34467. "properties": {
  34468. "id": {
  34469. "type": "string",
  34470. "pattern": "^que"
  34471. },
  34472. "sessionID": {
  34473. "type": "string",
  34474. "pattern": "^ses"
  34475. },
  34476. "questions": {
  34477. "type": "array",
  34478. "items": {
  34479. "$ref": "#/components/schemas/QuestionV2Info"
  34480. },
  34481. "description": "Questions to ask"
  34482. },
  34483. "tool": {
  34484. "$ref": "#/components/schemas/QuestionV2Tool"
  34485. }
  34486. },
  34487. "required": ["id", "sessionID", "questions"],
  34488. "additionalProperties": false
  34489. }
  34490. },
  34491. "required": ["id", "type", "properties"],
  34492. "additionalProperties": false
  34493. },
  34494. "EventQuestionV2Replied": {
  34495. "type": "object",
  34496. "properties": {
  34497. "id": {
  34498. "type": "string",
  34499. "pattern": "^evt_"
  34500. },
  34501. "type": {
  34502. "type": "string",
  34503. "enum": ["question.v2.replied"]
  34504. },
  34505. "properties": {
  34506. "type": "object",
  34507. "properties": {
  34508. "sessionID": {
  34509. "type": "string",
  34510. "pattern": "^ses"
  34511. },
  34512. "requestID": {
  34513. "type": "string",
  34514. "pattern": "^que"
  34515. },
  34516. "answers": {
  34517. "type": "array",
  34518. "items": {
  34519. "$ref": "#/components/schemas/QuestionV2Answer"
  34520. }
  34521. }
  34522. },
  34523. "required": ["sessionID", "requestID", "answers"],
  34524. "additionalProperties": false
  34525. }
  34526. },
  34527. "required": ["id", "type", "properties"],
  34528. "additionalProperties": false
  34529. },
  34530. "EventQuestionV2Rejected": {
  34531. "type": "object",
  34532. "properties": {
  34533. "id": {
  34534. "type": "string",
  34535. "pattern": "^evt_"
  34536. },
  34537. "type": {
  34538. "type": "string",
  34539. "enum": ["question.v2.rejected"]
  34540. },
  34541. "properties": {
  34542. "type": "object",
  34543. "properties": {
  34544. "sessionID": {
  34545. "type": "string",
  34546. "pattern": "^ses"
  34547. },
  34548. "requestID": {
  34549. "type": "string",
  34550. "pattern": "^que"
  34551. }
  34552. },
  34553. "required": ["sessionID", "requestID"],
  34554. "additionalProperties": false
  34555. }
  34556. },
  34557. "required": ["id", "type", "properties"],
  34558. "additionalProperties": false
  34559. },
  34560. "EventTodoUpdated": {
  34561. "type": "object",
  34562. "properties": {
  34563. "id": {
  34564. "type": "string",
  34565. "pattern": "^evt_"
  34566. },
  34567. "type": {
  34568. "type": "string",
  34569. "enum": ["todo.updated"]
  34570. },
  34571. "properties": {
  34572. "type": "object",
  34573. "properties": {
  34574. "sessionID": {
  34575. "type": "string",
  34576. "pattern": "^ses"
  34577. },
  34578. "todos": {
  34579. "type": "array",
  34580. "items": {
  34581. "$ref": "#/components/schemas/Todo"
  34582. }
  34583. }
  34584. },
  34585. "required": ["sessionID", "todos"],
  34586. "additionalProperties": false
  34587. }
  34588. },
  34589. "required": ["id", "type", "properties"],
  34590. "additionalProperties": false
  34591. },
  34592. "EventLspUpdated": {
  34593. "type": "object",
  34594. "properties": {
  34595. "id": {
  34596. "type": "string",
  34597. "pattern": "^evt_"
  34598. },
  34599. "type": {
  34600. "type": "string",
  34601. "enum": ["lsp.updated"]
  34602. },
  34603. "properties": {
  34604. "type": "object",
  34605. "properties": {}
  34606. }
  34607. },
  34608. "required": ["id", "type", "properties"],
  34609. "additionalProperties": false
  34610. },
  34611. "EventPermissionAsked": {
  34612. "type": "object",
  34613. "properties": {
  34614. "id": {
  34615. "type": "string",
  34616. "pattern": "^evt_"
  34617. },
  34618. "type": {
  34619. "type": "string",
  34620. "enum": ["permission.asked"]
  34621. },
  34622. "properties": {
  34623. "type": "object",
  34624. "properties": {
  34625. "id": {
  34626. "type": "string",
  34627. "pattern": "^per"
  34628. },
  34629. "sessionID": {
  34630. "type": "string",
  34631. "pattern": "^ses"
  34632. },
  34633. "permission": {
  34634. "type": "string"
  34635. },
  34636. "patterns": {
  34637. "type": "array",
  34638. "items": {
  34639. "type": "string"
  34640. }
  34641. },
  34642. "metadata": {
  34643. "type": "object"
  34644. },
  34645. "always": {
  34646. "type": "array",
  34647. "items": {
  34648. "type": "string"
  34649. }
  34650. },
  34651. "tool": {
  34652. "type": "object",
  34653. "properties": {
  34654. "messageID": {
  34655. "type": "string"
  34656. },
  34657. "callID": {
  34658. "type": "string"
  34659. }
  34660. },
  34661. "required": ["messageID", "callID"],
  34662. "additionalProperties": false
  34663. }
  34664. },
  34665. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  34666. "additionalProperties": false
  34667. }
  34668. },
  34669. "required": ["id", "type", "properties"],
  34670. "additionalProperties": false
  34671. },
  34672. "EventPermissionReplied": {
  34673. "type": "object",
  34674. "properties": {
  34675. "id": {
  34676. "type": "string",
  34677. "pattern": "^evt_"
  34678. },
  34679. "type": {
  34680. "type": "string",
  34681. "enum": ["permission.replied"]
  34682. },
  34683. "properties": {
  34684. "type": "object",
  34685. "properties": {
  34686. "sessionID": {
  34687. "type": "string",
  34688. "pattern": "^ses"
  34689. },
  34690. "requestID": {
  34691. "type": "string",
  34692. "pattern": "^per"
  34693. },
  34694. "reply": {
  34695. "type": "string",
  34696. "enum": ["once", "always", "reject"]
  34697. }
  34698. },
  34699. "required": ["sessionID", "requestID", "reply"],
  34700. "additionalProperties": false
  34701. }
  34702. },
  34703. "required": ["id", "type", "properties"],
  34704. "additionalProperties": false
  34705. },
  34706. "EventMcpToolsChanged": {
  34707. "type": "object",
  34708. "properties": {
  34709. "id": {
  34710. "type": "string",
  34711. "pattern": "^evt_"
  34712. },
  34713. "type": {
  34714. "type": "string",
  34715. "enum": ["mcp.tools.changed"]
  34716. },
  34717. "properties": {
  34718. "type": "object",
  34719. "properties": {
  34720. "server": {
  34721. "type": "string"
  34722. }
  34723. },
  34724. "required": ["server"],
  34725. "additionalProperties": false
  34726. }
  34727. },
  34728. "required": ["id", "type", "properties"],
  34729. "additionalProperties": false
  34730. },
  34731. "EventMcpBrowserOpenFailed": {
  34732. "type": "object",
  34733. "properties": {
  34734. "id": {
  34735. "type": "string",
  34736. "pattern": "^evt_"
  34737. },
  34738. "type": {
  34739. "type": "string",
  34740. "enum": ["mcp.browser.open.failed"]
  34741. },
  34742. "properties": {
  34743. "type": "object",
  34744. "properties": {
  34745. "mcpName": {
  34746. "type": "string"
  34747. },
  34748. "url": {
  34749. "type": "string"
  34750. }
  34751. },
  34752. "required": ["mcpName", "url"],
  34753. "additionalProperties": false
  34754. }
  34755. },
  34756. "required": ["id", "type", "properties"],
  34757. "additionalProperties": false
  34758. },
  34759. "EventCommandExecuted": {
  34760. "type": "object",
  34761. "properties": {
  34762. "id": {
  34763. "type": "string",
  34764. "pattern": "^evt_"
  34765. },
  34766. "type": {
  34767. "type": "string",
  34768. "enum": ["command.executed"]
  34769. },
  34770. "properties": {
  34771. "type": "object",
  34772. "properties": {
  34773. "name": {
  34774. "type": "string"
  34775. },
  34776. "sessionID": {
  34777. "type": "string",
  34778. "pattern": "^ses"
  34779. },
  34780. "arguments": {
  34781. "type": "string"
  34782. },
  34783. "messageID": {
  34784. "type": "string",
  34785. "pattern": "^msg"
  34786. }
  34787. },
  34788. "required": ["name", "sessionID", "arguments", "messageID"],
  34789. "additionalProperties": false
  34790. }
  34791. },
  34792. "required": ["id", "type", "properties"],
  34793. "additionalProperties": false
  34794. },
  34795. "EventProjectUpdated": {
  34796. "type": "object",
  34797. "properties": {
  34798. "id": {
  34799. "type": "string",
  34800. "pattern": "^evt_"
  34801. },
  34802. "type": {
  34803. "type": "string",
  34804. "enum": ["project.updated"]
  34805. },
  34806. "properties": {
  34807. "type": "object",
  34808. "properties": {
  34809. "id": {
  34810. "type": "string"
  34811. },
  34812. "worktree": {
  34813. "type": "string"
  34814. },
  34815. "vcs": {
  34816. "type": "string",
  34817. "enum": ["git"]
  34818. },
  34819. "name": {
  34820. "type": "string"
  34821. },
  34822. "icon": {
  34823. "type": "object",
  34824. "properties": {
  34825. "url": {
  34826. "type": "string"
  34827. },
  34828. "override": {
  34829. "type": "string"
  34830. },
  34831. "color": {
  34832. "type": "string"
  34833. }
  34834. },
  34835. "additionalProperties": false
  34836. },
  34837. "commands": {
  34838. "type": "object",
  34839. "properties": {
  34840. "start": {
  34841. "type": "string",
  34842. "description": "Startup script to run when creating a new workspace (worktree)"
  34843. }
  34844. },
  34845. "additionalProperties": false
  34846. },
  34847. "time": {
  34848. "type": "object",
  34849. "properties": {
  34850. "created": {
  34851. "type": "integer",
  34852. "minimum": 0
  34853. },
  34854. "updated": {
  34855. "type": "integer",
  34856. "minimum": 0
  34857. },
  34858. "initialized": {
  34859. "type": "integer",
  34860. "minimum": 0
  34861. }
  34862. },
  34863. "required": ["created", "updated"],
  34864. "additionalProperties": false
  34865. },
  34866. "sandboxes": {
  34867. "type": "array",
  34868. "items": {
  34869. "type": "string"
  34870. }
  34871. }
  34872. },
  34873. "required": ["id", "worktree", "time", "sandboxes"],
  34874. "additionalProperties": false
  34875. }
  34876. },
  34877. "required": ["id", "type", "properties"],
  34878. "additionalProperties": false
  34879. },
  34880. "EventSessionStatus": {
  34881. "type": "object",
  34882. "properties": {
  34883. "id": {
  34884. "type": "string",
  34885. "pattern": "^evt_"
  34886. },
  34887. "type": {
  34888. "type": "string",
  34889. "enum": ["session.status"]
  34890. },
  34891. "properties": {
  34892. "type": "object",
  34893. "properties": {
  34894. "sessionID": {
  34895. "type": "string",
  34896. "pattern": "^ses"
  34897. },
  34898. "status": {
  34899. "$ref": "#/components/schemas/SessionStatus"
  34900. }
  34901. },
  34902. "required": ["sessionID", "status"],
  34903. "additionalProperties": false
  34904. }
  34905. },
  34906. "required": ["id", "type", "properties"],
  34907. "additionalProperties": false
  34908. },
  34909. "EventSessionIdle": {
  34910. "type": "object",
  34911. "properties": {
  34912. "id": {
  34913. "type": "string",
  34914. "pattern": "^evt_"
  34915. },
  34916. "type": {
  34917. "type": "string",
  34918. "enum": ["session.idle"]
  34919. },
  34920. "properties": {
  34921. "type": "object",
  34922. "properties": {
  34923. "sessionID": {
  34924. "type": "string",
  34925. "pattern": "^ses"
  34926. }
  34927. },
  34928. "required": ["sessionID"],
  34929. "additionalProperties": false
  34930. }
  34931. },
  34932. "required": ["id", "type", "properties"],
  34933. "additionalProperties": false
  34934. },
  34935. "EventQuestionAsked": {
  34936. "type": "object",
  34937. "properties": {
  34938. "id": {
  34939. "type": "string",
  34940. "pattern": "^evt_"
  34941. },
  34942. "type": {
  34943. "type": "string",
  34944. "enum": ["question.asked"]
  34945. },
  34946. "properties": {
  34947. "type": "object",
  34948. "properties": {
  34949. "id": {
  34950. "type": "string",
  34951. "pattern": "^que"
  34952. },
  34953. "sessionID": {
  34954. "type": "string",
  34955. "pattern": "^ses"
  34956. },
  34957. "questions": {
  34958. "type": "array",
  34959. "items": {
  34960. "$ref": "#/components/schemas/QuestionInfo"
  34961. },
  34962. "description": "Questions to ask"
  34963. },
  34964. "tool": {
  34965. "$ref": "#/components/schemas/QuestionTool"
  34966. }
  34967. },
  34968. "required": ["id", "sessionID", "questions"],
  34969. "additionalProperties": false
  34970. }
  34971. },
  34972. "required": ["id", "type", "properties"],
  34973. "additionalProperties": false
  34974. },
  34975. "EventQuestionReplied": {
  34976. "type": "object",
  34977. "properties": {
  34978. "id": {
  34979. "type": "string",
  34980. "pattern": "^evt_"
  34981. },
  34982. "type": {
  34983. "type": "string",
  34984. "enum": ["question.replied"]
  34985. },
  34986. "properties": {
  34987. "type": "object",
  34988. "properties": {
  34989. "sessionID": {
  34990. "type": "string",
  34991. "pattern": "^ses"
  34992. },
  34993. "requestID": {
  34994. "type": "string",
  34995. "pattern": "^que"
  34996. },
  34997. "answers": {
  34998. "type": "array",
  34999. "items": {
  35000. "$ref": "#/components/schemas/QuestionAnswer"
  35001. }
  35002. }
  35003. },
  35004. "required": ["sessionID", "requestID", "answers"],
  35005. "additionalProperties": false
  35006. }
  35007. },
  35008. "required": ["id", "type", "properties"],
  35009. "additionalProperties": false
  35010. },
  35011. "EventQuestionRejected": {
  35012. "type": "object",
  35013. "properties": {
  35014. "id": {
  35015. "type": "string",
  35016. "pattern": "^evt_"
  35017. },
  35018. "type": {
  35019. "type": "string",
  35020. "enum": ["question.rejected"]
  35021. },
  35022. "properties": {
  35023. "type": "object",
  35024. "properties": {
  35025. "sessionID": {
  35026. "type": "string",
  35027. "pattern": "^ses"
  35028. },
  35029. "requestID": {
  35030. "type": "string",
  35031. "pattern": "^que"
  35032. }
  35033. },
  35034. "required": ["sessionID", "requestID"],
  35035. "additionalProperties": false
  35036. }
  35037. },
  35038. "required": ["id", "type", "properties"],
  35039. "additionalProperties": false
  35040. },
  35041. "EventSessionCompacted": {
  35042. "type": "object",
  35043. "properties": {
  35044. "id": {
  35045. "type": "string",
  35046. "pattern": "^evt_"
  35047. },
  35048. "type": {
  35049. "type": "string",
  35050. "enum": ["session.compacted"]
  35051. },
  35052. "properties": {
  35053. "type": "object",
  35054. "properties": {
  35055. "sessionID": {
  35056. "type": "string",
  35057. "pattern": "^ses"
  35058. }
  35059. },
  35060. "required": ["sessionID"],
  35061. "additionalProperties": false
  35062. }
  35063. },
  35064. "required": ["id", "type", "properties"],
  35065. "additionalProperties": false
  35066. },
  35067. "EventVcsBranchUpdated": {
  35068. "type": "object",
  35069. "properties": {
  35070. "id": {
  35071. "type": "string",
  35072. "pattern": "^evt_"
  35073. },
  35074. "type": {
  35075. "type": "string",
  35076. "enum": ["vcs.branch.updated"]
  35077. },
  35078. "properties": {
  35079. "type": "object",
  35080. "properties": {
  35081. "branch": {
  35082. "type": "string"
  35083. }
  35084. },
  35085. "additionalProperties": false
  35086. }
  35087. },
  35088. "required": ["id", "type", "properties"],
  35089. "additionalProperties": false
  35090. },
  35091. "EventWorkspaceReady": {
  35092. "type": "object",
  35093. "properties": {
  35094. "id": {
  35095. "type": "string",
  35096. "pattern": "^evt_"
  35097. },
  35098. "type": {
  35099. "type": "string",
  35100. "enum": ["workspace.ready"]
  35101. },
  35102. "properties": {
  35103. "type": "object",
  35104. "properties": {
  35105. "name": {
  35106. "type": "string"
  35107. }
  35108. },
  35109. "required": ["name"],
  35110. "additionalProperties": false
  35111. }
  35112. },
  35113. "required": ["id", "type", "properties"],
  35114. "additionalProperties": false
  35115. },
  35116. "EventWorkspaceFailed": {
  35117. "type": "object",
  35118. "properties": {
  35119. "id": {
  35120. "type": "string",
  35121. "pattern": "^evt_"
  35122. },
  35123. "type": {
  35124. "type": "string",
  35125. "enum": ["workspace.failed"]
  35126. },
  35127. "properties": {
  35128. "type": "object",
  35129. "properties": {
  35130. "message": {
  35131. "type": "string"
  35132. }
  35133. },
  35134. "required": ["message"],
  35135. "additionalProperties": false
  35136. }
  35137. },
  35138. "required": ["id", "type", "properties"],
  35139. "additionalProperties": false
  35140. },
  35141. "EventWorkspaceStatus": {
  35142. "type": "object",
  35143. "properties": {
  35144. "id": {
  35145. "type": "string",
  35146. "pattern": "^evt_"
  35147. },
  35148. "type": {
  35149. "type": "string",
  35150. "enum": ["workspace.status"]
  35151. },
  35152. "properties": {
  35153. "type": "object",
  35154. "properties": {
  35155. "workspaceID": {
  35156. "type": "string",
  35157. "pattern": "^wrk"
  35158. },
  35159. "status": {
  35160. "type": "string",
  35161. "enum": ["connected", "connecting", "disconnected", "error"]
  35162. }
  35163. },
  35164. "required": ["workspaceID", "status"],
  35165. "additionalProperties": false
  35166. }
  35167. },
  35168. "required": ["id", "type", "properties"],
  35169. "additionalProperties": false
  35170. },
  35171. "EventWorktreeReady": {
  35172. "type": "object",
  35173. "properties": {
  35174. "id": {
  35175. "type": "string",
  35176. "pattern": "^evt_"
  35177. },
  35178. "type": {
  35179. "type": "string",
  35180. "enum": ["worktree.ready"]
  35181. },
  35182. "properties": {
  35183. "type": "object",
  35184. "properties": {
  35185. "name": {
  35186. "type": "string"
  35187. },
  35188. "branch": {
  35189. "type": "string"
  35190. }
  35191. },
  35192. "required": ["name"],
  35193. "additionalProperties": false
  35194. }
  35195. },
  35196. "required": ["id", "type", "properties"],
  35197. "additionalProperties": false
  35198. },
  35199. "EventWorktreeFailed": {
  35200. "type": "object",
  35201. "properties": {
  35202. "id": {
  35203. "type": "string",
  35204. "pattern": "^evt_"
  35205. },
  35206. "type": {
  35207. "type": "string",
  35208. "enum": ["worktree.failed"]
  35209. },
  35210. "properties": {
  35211. "type": "object",
  35212. "properties": {
  35213. "message": {
  35214. "type": "string"
  35215. }
  35216. },
  35217. "required": ["message"],
  35218. "additionalProperties": false
  35219. }
  35220. },
  35221. "required": ["id", "type", "properties"],
  35222. "additionalProperties": false
  35223. },
  35224. "EventServerConnected": {
  35225. "type": "object",
  35226. "properties": {
  35227. "id": {
  35228. "type": "string",
  35229. "pattern": "^evt_"
  35230. },
  35231. "type": {
  35232. "type": "string",
  35233. "enum": ["server.connected"]
  35234. },
  35235. "properties": {
  35236. "type": "object",
  35237. "properties": {}
  35238. }
  35239. },
  35240. "required": ["id", "type", "properties"],
  35241. "additionalProperties": false
  35242. },
  35243. "EventGlobalDisposed": {
  35244. "type": "object",
  35245. "properties": {
  35246. "id": {
  35247. "type": "string",
  35248. "pattern": "^evt_"
  35249. },
  35250. "type": {
  35251. "type": "string",
  35252. "enum": ["global.disposed"]
  35253. },
  35254. "properties": {
  35255. "type": "object",
  35256. "properties": {}
  35257. }
  35258. },
  35259. "required": ["id", "type", "properties"],
  35260. "additionalProperties": false
  35261. },
  35262. "CredentialOAuth": {
  35263. "type": "object",
  35264. "properties": {
  35265. "type": {
  35266. "type": "string",
  35267. "enum": ["oauth"]
  35268. },
  35269. "methodID": {
  35270. "type": "string"
  35271. },
  35272. "refresh": {
  35273. "type": "string"
  35274. },
  35275. "access": {
  35276. "type": "string"
  35277. },
  35278. "expires": {
  35279. "type": "integer",
  35280. "minimum": 0
  35281. },
  35282. "metadata": {
  35283. "type": "object"
  35284. }
  35285. },
  35286. "required": ["type", "methodID", "refresh", "access", "expires"],
  35287. "additionalProperties": false
  35288. },
  35289. "CredentialKey": {
  35290. "type": "object",
  35291. "properties": {
  35292. "type": {
  35293. "type": "string",
  35294. "enum": ["key"]
  35295. },
  35296. "key": {
  35297. "type": "string"
  35298. },
  35299. "metadata": {
  35300. "type": "object"
  35301. }
  35302. },
  35303. "required": ["type", "key"],
  35304. "additionalProperties": false
  35305. },
  35306. "SkillV2DirectorySource": {
  35307. "type": "object",
  35308. "properties": {
  35309. "type": {
  35310. "type": "string",
  35311. "enum": ["directory"]
  35312. },
  35313. "path": {
  35314. "type": "string"
  35315. }
  35316. },
  35317. "required": ["type", "path"],
  35318. "additionalProperties": false
  35319. },
  35320. "SkillV2UrlSource": {
  35321. "type": "object",
  35322. "properties": {
  35323. "type": {
  35324. "type": "string",
  35325. "enum": ["url"]
  35326. },
  35327. "url": {
  35328. "type": "string"
  35329. }
  35330. },
  35331. "required": ["type", "url"],
  35332. "additionalProperties": false
  35333. },
  35334. "SkillV2EmbeddedSource": {
  35335. "type": "object",
  35336. "properties": {
  35337. "type": {
  35338. "type": "string",
  35339. "enum": ["embedded"]
  35340. },
  35341. "skill": {
  35342. "$ref": "#/components/schemas/SkillV2Info"
  35343. }
  35344. },
  35345. "required": ["type", "skill"],
  35346. "additionalProperties": false
  35347. },
  35348. "BadRequestError": {
  35349. "type": "object",
  35350. "required": ["name", "data"],
  35351. "properties": {
  35352. "name": {
  35353. "type": "string",
  35354. "enum": ["BadRequest"]
  35355. },
  35356. "data": {
  35357. "type": "object",
  35358. "required": ["message"],
  35359. "properties": {
  35360. "message": {
  35361. "type": "string"
  35362. },
  35363. "kind": {
  35364. "type": "string",
  35365. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  35366. }
  35367. }
  35368. }
  35369. }
  35370. }
  35371. }
  35372. },
  35373. "security": [],
  35374. "tags": [
  35375. {
  35376. "name": "control",
  35377. "description": "Control plane routes."
  35378. },
  35379. {
  35380. "name": "controlPlane",
  35381. "description": "Control-plane orchestration routes."
  35382. },
  35383. {
  35384. "name": "global",
  35385. "description": "Global server routes."
  35386. },
  35387. {
  35388. "name": "event",
  35389. "description": "Instance event stream route."
  35390. },
  35391. {
  35392. "name": "config",
  35393. "description": "Experimental HttpApi config routes."
  35394. },
  35395. {
  35396. "name": "experimental",
  35397. "description": "Experimental HttpApi read-only routes."
  35398. },
  35399. {
  35400. "name": "file",
  35401. "description": "Experimental HttpApi file routes."
  35402. },
  35403. {
  35404. "name": "instance",
  35405. "description": "Experimental HttpApi instance read routes."
  35406. },
  35407. {
  35408. "name": "mcp",
  35409. "description": "Experimental HttpApi MCP routes."
  35410. },
  35411. {
  35412. "name": "project",
  35413. "description": "Experimental HttpApi project routes."
  35414. },
  35415. {
  35416. "name": "projectCopy",
  35417. "description": "Project copy naming routes."
  35418. },
  35419. {
  35420. "name": "pty",
  35421. "description": "Experimental HttpApi PTY routes."
  35422. },
  35423. {
  35424. "name": "question",
  35425. "description": "Question routes."
  35426. },
  35427. {
  35428. "name": "permission",
  35429. "description": "Experimental HttpApi permission routes."
  35430. },
  35431. {
  35432. "name": "provider",
  35433. "description": "Experimental HttpApi provider routes."
  35434. },
  35435. {
  35436. "name": "session",
  35437. "description": "Experimental HttpApi session routes."
  35438. },
  35439. {
  35440. "name": "sync",
  35441. "description": "Experimental HttpApi sync routes."
  35442. },
  35443. {
  35444. "name": "tui",
  35445. "description": "Experimental HttpApi TUI routes."
  35446. },
  35447. {
  35448. "name": "workspace",
  35449. "description": "Experimental HttpApi workspace routes."
  35450. },
  35451. {
  35452. "name": "opencode HttpApi",
  35453. "description": "Experimental HttpApi surface for selected instance routes."
  35454. },
  35455. {
  35456. "name": "opencode HttpApi",
  35457. "description": "Experimental HttpApi surface for selected instance routes."
  35458. },
  35459. {
  35460. "name": "opencode HttpApi",
  35461. "description": "Experimental HttpApi surface for selected instance routes."
  35462. },
  35463. {
  35464. "name": "sessions",
  35465. "description": "Experimental session routes."
  35466. },
  35467. {
  35468. "name": "messages",
  35469. "description": "Experimental message routes."
  35470. },
  35471. {
  35472. "name": "models",
  35473. "description": "Experimental model routes."
  35474. },
  35475. {
  35476. "name": "providers",
  35477. "description": "Experimental provider routes."
  35478. },
  35479. {
  35480. "name": "integrations",
  35481. "description": "Integration discovery and authentication routes."
  35482. },
  35483. {
  35484. "name": "opencode HttpApi",
  35485. "description": "Experimental HttpApi surface for selected instance routes."
  35486. },
  35487. {
  35488. "name": "permissions",
  35489. "description": "Experimental permission routes."
  35490. },
  35491. {
  35492. "name": "filesystem",
  35493. "description": "Experimental location-scoped filesystem routes."
  35494. },
  35495. {
  35496. "name": "commands",
  35497. "description": "Experimental command routes."
  35498. },
  35499. {
  35500. "name": "skills",
  35501. "description": "Experimental skill routes."
  35502. },
  35503. {
  35504. "name": "events",
  35505. "description": "Experimental event stream route."
  35506. },
  35507. {
  35508. "name": "pty",
  35509. "description": "Experimental location-scoped PTY routes."
  35510. },
  35511. {
  35512. "name": "session questions",
  35513. "description": "Experimental session question routes."
  35514. },
  35515. {
  35516. "name": "reference",
  35517. "description": "Location-scoped project references."
  35518. },
  35519. {
  35520. "name": "projectCopy",
  35521. "description": "Project copy management routes."
  35522. },
  35523. {
  35524. "name": "pty",
  35525. "description": "PTY websocket route."
  35526. }
  35527. ]
  35528. }