openapi.json 1018 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132251332513425135251362513725138251392514025141251422514325144251452514625147251482514925150251512515225153251542515525156251572515825159251602516125162251632516425165251662516725168251692517025171251722517325174251752517625177251782517925180251812518225183251842518525186251872518825189251902519125192251932519425195251962519725198251992520025201252022520325204252052520625207252082520925210252112521225213252142521525216252172521825219252202522125222252232522425225252262522725228252292523025231252322523325234252352523625237252382523925240252412524225243252442524525246252472524825249252502525125252252532525425255252562525725258252592526025261252622526325264252652526625267252682526925270252712527225273252742527525276252772527825279252802528125282252832528425285252862528725288252892529025291252922529325294252952529625297252982529925300253012530225303253042530525306253072530825309253102531125312253132531425315253162531725318253192532025321253222532325324253252532625327253282532925330253312533225333253342533525336253372533825339253402534125342253432534425345253462534725348253492535025351253522535325354253552535625357253582535925360253612536225363253642536525366253672536825369253702537125372253732537425375253762537725378253792538025381253822538325384253852538625387253882538925390253912539225393253942539525396253972539825399254002540125402254032540425405254062540725408254092541025411254122541325414254152541625417254182541925420254212542225423254242542525426254272542825429254302543125432254332543425435254362543725438254392544025441254422544325444254452544625447254482544925450254512545225453254542545525456254572545825459254602546125462254632546425465254662546725468254692547025471254722547325474254752547625477254782547925480254812548225483254842548525486254872548825489254902549125492254932549425495254962549725498254992550025501255022550325504255052550625507255082550925510255112551225513255142551525516255172551825519255202552125522255232552425525255262552725528255292553025531255322553325534255352553625537255382553925540255412554225543255442554525546255472554825549255502555125552255532555425555255562555725558255592556025561255622556325564255652556625567255682556925570255712557225573255742557525576255772557825579255802558125582255832558425585255862558725588255892559025591255922559325594255952559625597255982559925600256012560225603256042560525606256072560825609256102561125612256132561425615256162561725618256192562025621256222562325624256252562625627256282562925630256312563225633256342563525636256372563825639256402564125642256432564425645256462564725648256492565025651256522565325654256552565625657256582565925660256612566225663256642566525666256672566825669256702567125672256732567425675256762567725678256792568025681256822568325684256852568625687256882568925690256912569225693256942569525696256972569825699257002570125702257032570425705257062570725708257092571025711257122571325714257152571625717257182571925720257212572225723257242572525726257272572825729257302573125732257332573425735257362573725738257392574025741257422574325744257452574625747257482574925750257512575225753257542575525756257572575825759257602576125762257632576425765257662576725768257692577025771257722577325774257752577625777257782577925780257812578225783257842578525786257872578825789257902579125792257932579425795257962579725798257992580025801258022580325804258052580625807258082580925810258112581225813258142581525816258172581825819258202582125822258232582425825258262582725828258292583025831258322583325834258352583625837258382583925840258412584225843258442584525846258472584825849258502585125852258532585425855258562585725858258592586025861258622586325864258652586625867258682586925870258712587225873258742587525876258772587825879258802588125882258832588425885258862588725888258892589025891258922589325894258952589625897258982589925900259012590225903259042590525906259072590825909259102591125912259132591425915259162591725918259192592025921259222592325924259252592625927259282592925930259312593225933259342593525936259372593825939259402594125942259432594425945259462594725948259492595025951259522595325954259552595625957259582595925960259612596225963259642596525966259672596825969259702597125972259732597425975259762597725978259792598025981259822598325984259852598625987259882598925990259912599225993259942599525996259972599825999260002600126002260032600426005260062600726008260092601026011260122601326014260152601626017260182601926020260212602226023260242602526026260272602826029260302603126032260332603426035260362603726038260392604026041260422604326044260452604626047260482604926050260512605226053260542605526056260572605826059260602606126062260632606426065260662606726068260692607026071260722607326074260752607626077260782607926080260812608226083260842608526086260872608826089260902609126092260932609426095260962609726098260992610026101261022610326104261052610626107261082610926110261112611226113261142611526116261172611826119261202612126122261232612426125261262612726128261292613026131261322613326134261352613626137261382613926140261412614226143261442614526146261472614826149261502615126152261532615426155261562615726158261592616026161261622616326164261652616626167261682616926170261712617226173261742617526176261772617826179261802618126182261832618426185261862618726188261892619026191261922619326194261952619626197261982619926200262012620226203262042620526206262072620826209262102621126212262132621426215262162621726218262192622026221262222622326224262252622626227262282622926230262312623226233262342623526236262372623826239262402624126242262432624426245262462624726248262492625026251262522625326254262552625626257262582625926260262612626226263262642626526266262672626826269262702627126272262732627426275262762627726278262792628026281262822628326284262852628626287262882628926290262912629226293262942629526296262972629826299263002630126302263032630426305263062630726308263092631026311263122631326314263152631626317263182631926320263212632226323263242632526326263272632826329263302633126332263332633426335263362633726338263392634026341263422634326344263452634626347263482634926350263512635226353263542635526356263572635826359263602636126362263632636426365263662636726368263692637026371263722637326374263752637626377263782637926380263812638226383263842638526386263872638826389263902639126392263932639426395263962639726398263992640026401264022640326404264052640626407264082640926410264112641226413264142641526416264172641826419264202642126422264232642426425264262642726428264292643026431264322643326434264352643626437264382643926440264412644226443264442644526446264472644826449264502645126452264532645426455264562645726458264592646026461264622646326464264652646626467264682646926470264712647226473264742647526476264772647826479264802648126482264832648426485264862648726488264892649026491264922649326494264952649626497264982649926500265012650226503265042650526506265072650826509265102651126512265132651426515265162651726518265192652026521265222652326524265252652626527265282652926530265312653226533265342653526536265372653826539265402654126542265432654426545265462654726548265492655026551265522655326554265552655626557265582655926560265612656226563265642656526566265672656826569265702657126572265732657426575265762657726578265792658026581265822658326584265852658626587265882658926590265912659226593265942659526596265972659826599266002660126602266032660426605266062660726608266092661026611266122661326614266152661626617266182661926620266212662226623266242662526626266272662826629266302663126632266332663426635266362663726638266392664026641266422664326644266452664626647266482664926650266512665226653266542665526656266572665826659266602666126662266632666426665266662666726668266692667026671266722667326674266752667626677266782667926680266812668226683266842668526686266872668826689266902669126692266932669426695266962669726698266992670026701267022670326704267052670626707267082670926710267112671226713267142671526716267172671826719267202672126722267232672426725267262672726728267292673026731267322673326734267352673626737267382673926740267412674226743267442674526746267472674826749267502675126752267532675426755267562675726758267592676026761267622676326764267652676626767267682676926770267712677226773267742677526776267772677826779267802678126782267832678426785267862678726788267892679026791267922679326794267952679626797267982679926800268012680226803268042680526806268072680826809268102681126812268132681426815268162681726818268192682026821268222682326824268252682626827268282682926830268312683226833268342683526836268372683826839268402684126842268432684426845268462684726848268492685026851268522685326854268552685626857268582685926860268612686226863268642686526866268672686826869268702687126872268732687426875268762687726878268792688026881268822688326884268852688626887268882688926890268912689226893268942689526896268972689826899269002690126902269032690426905269062690726908269092691026911269122691326914269152691626917269182691926920269212692226923269242692526926269272692826929269302693126932269332693426935269362693726938269392694026941269422694326944269452694626947269482694926950269512695226953269542695526956269572695826959269602696126962269632696426965269662696726968269692697026971269722697326974269752697626977269782697926980269812698226983269842698526986269872698826989269902699126992269932699426995269962699726998269992700027001270022700327004270052700627007270082700927010270112701227013270142701527016270172701827019270202702127022270232702427025270262702727028270292703027031270322703327034270352703627037270382703927040270412704227043270442704527046270472704827049270502705127052270532705427055270562705727058270592706027061270622706327064270652706627067270682706927070270712707227073270742707527076270772707827079270802708127082270832708427085270862708727088270892709027091270922709327094270952709627097270982709927100271012710227103271042710527106271072710827109271102711127112271132711427115271162711727118271192712027121271222712327124271252712627127271282712927130271312713227133271342713527136271372713827139271402714127142271432714427145271462714727148271492715027151271522715327154271552715627157271582715927160271612716227163271642716527166271672716827169271702717127172271732717427175271762717727178271792718027181271822718327184271852718627187271882718927190271912719227193271942719527196271972719827199272002720127202272032720427205272062720727208272092721027211272122721327214272152721627217272182721927220272212722227223272242722527226272272722827229272302723127232272332723427235272362723727238272392724027241272422724327244272452724627247272482724927250272512725227253272542725527256272572725827259272602726127262272632726427265272662726727268272692727027271272722727327274272752727627277272782727927280272812728227283272842728527286272872728827289272902729127292272932729427295272962729727298272992730027301273022730327304273052730627307273082730927310273112731227313273142731527316273172731827319273202732127322273232732427325273262732727328273292733027331273322733327334273352733627337273382733927340273412734227343273442734527346273472734827349273502735127352273532735427355273562735727358273592736027361273622736327364273652736627367273682736927370273712737227373273742737527376273772737827379273802738127382273832738427385273862738727388273892739027391273922739327394273952739627397273982739927400274012740227403274042740527406274072740827409274102741127412274132741427415274162741727418274192742027421274222742327424274252742627427274282742927430274312743227433274342743527436274372743827439274402744127442274432744427445274462744727448274492745027451274522745327454274552745627457274582745927460274612746227463274642746527466274672746827469274702747127472274732747427475274762747727478274792748027481274822748327484274852748627487274882748927490274912749227493274942749527496274972749827499275002750127502275032750427505275062750727508275092751027511275122751327514275152751627517275182751927520275212752227523275242752527526275272752827529275302753127532275332753427535275362753727538275392754027541275422754327544275452754627547275482754927550275512755227553275542755527556275572755827559275602756127562275632756427565275662756727568275692757027571275722757327574275752757627577275782757927580275812758227583275842758527586275872758827589275902759127592275932759427595275962759727598275992760027601276022760327604276052760627607276082760927610276112761227613276142761527616276172761827619276202762127622276232762427625276262762727628276292763027631276322763327634276352763627637276382763927640276412764227643276442764527646276472764827649276502765127652276532765427655276562765727658276592766027661276622766327664276652766627667276682766927670276712767227673276742767527676276772767827679276802768127682276832768427685276862768727688276892769027691276922769327694276952769627697276982769927700277012770227703277042770527706277072770827709277102771127712277132771427715277162771727718277192772027721277222772327724277252772627727277282772927730277312773227733277342773527736277372773827739277402774127742277432774427745277462774727748277492775027751277522775327754277552775627757277582775927760277612776227763277642776527766277672776827769277702777127772277732777427775277762777727778277792778027781277822778327784277852778627787277882778927790277912779227793277942779527796277972779827799278002780127802278032780427805278062780727808278092781027811278122781327814278152781627817278182781927820278212782227823278242782527826278272782827829278302783127832278332783427835278362783727838278392784027841278422784327844278452784627847278482784927850278512785227853278542785527856278572785827859278602786127862278632786427865278662786727868278692787027871278722787327874278752787627877278782787927880278812788227883278842788527886278872788827889278902789127892278932789427895278962789727898278992790027901279022790327904279052790627907279082790927910279112791227913279142791527916279172791827919279202792127922279232792427925279262792727928279292793027931279322793327934279352793627937279382793927940279412794227943279442794527946279472794827949279502795127952279532795427955279562795727958279592796027961279622796327964279652796627967279682796927970279712797227973279742797527976279772797827979279802798127982279832798427985279862798727988279892799027991279922799327994279952799627997279982799928000280012800228003280042800528006280072800828009280102801128012280132801428015280162801728018280192802028021280222802328024280252802628027280282802928030280312803228033280342803528036280372803828039280402804128042280432804428045280462804728048280492805028051280522805328054280552805628057280582805928060280612806228063280642806528066280672806828069280702807128072280732807428075280762807728078280792808028081280822808328084280852808628087280882808928090280912809228093280942809528096280972809828099281002810128102281032810428105281062810728108281092811028111281122811328114281152811628117281182811928120281212812228123281242812528126281272812828129281302813128132281332813428135281362813728138281392814028141281422814328144281452814628147281482814928150281512815228153281542815528156281572815828159281602816128162281632816428165281662816728168281692817028171281722817328174281752817628177281782817928180281812818228183281842818528186281872818828189281902819128192281932819428195281962819728198281992820028201282022820328204282052820628207282082820928210282112821228213282142821528216282172821828219282202822128222282232822428225282262822728228282292823028231282322823328234282352823628237282382823928240282412824228243282442824528246282472824828249282502825128252282532825428255282562825728258282592826028261282622826328264282652826628267282682826928270282712827228273282742827528276282772827828279282802828128282282832828428285282862828728288282892829028291282922829328294282952829628297282982829928300283012830228303283042830528306283072830828309283102831128312283132831428315283162831728318283192832028321283222832328324283252832628327283282832928330283312833228333283342833528336283372833828339283402834128342283432834428345283462834728348283492835028351283522835328354283552835628357283582835928360283612836228363283642836528366283672836828369283702837128372283732837428375283762837728378283792838028381283822838328384283852838628387283882838928390283912839228393283942839528396283972839828399284002840128402284032840428405284062840728408284092841028411284122841328414284152841628417284182841928420284212842228423284242842528426284272842828429284302843128432284332843428435284362843728438284392844028441284422844328444284452844628447284482844928450284512845228453284542845528456284572845828459284602846128462284632846428465284662846728468284692847028471284722847328474284752847628477284782847928480284812848228483284842848528486284872848828489284902849128492284932849428495284962849728498284992850028501285022850328504285052850628507285082850928510285112851228513285142851528516285172851828519285202852128522285232852428525285262852728528285292853028531285322853328534285352853628537285382853928540285412854228543285442854528546285472854828549285502855128552285532855428555285562855728558285592856028561285622856328564285652856628567285682856928570285712857228573285742857528576285772857828579285802858128582285832858428585285862858728588285892859028591285922859328594285952859628597285982859928600286012860228603286042860528606286072860828609286102861128612286132861428615286162861728618286192862028621286222862328624286252862628627286282862928630286312863228633286342863528636286372863828639286402864128642286432864428645286462864728648286492865028651286522865328654286552865628657286582865928660286612866228663286642866528666286672866828669286702867128672286732867428675286762867728678286792868028681286822868328684286852868628687286882868928690286912869228693286942869528696286972869828699287002870128702287032870428705287062870728708287092871028711287122871328714287152871628717287182871928720287212872228723287242872528726287272872828729287302873128732287332873428735287362873728738287392874028741287422874328744287452874628747287482874928750287512875228753287542875528756287572875828759287602876128762287632876428765287662876728768287692877028771287722877328774287752877628777287782877928780287812878228783287842878528786287872878828789287902879128792287932879428795287962879728798287992880028801288022880328804288052880628807288082880928810288112881228813288142881528816288172881828819288202882128822288232882428825288262882728828288292883028831288322883328834288352883628837288382883928840288412884228843288442884528846288472884828849288502885128852288532885428855288562885728858288592886028861288622886328864288652886628867288682886928870288712887228873288742887528876288772887828879288802888128882288832888428885288862888728888288892889028891288922889328894288952889628897288982889928900289012890228903289042890528906289072890828909289102891128912289132891428915289162891728918289192892028921289222892328924289252892628927289282892928930289312893228933289342893528936289372893828939289402894128942289432894428945289462894728948289492895028951289522895328954289552895628957289582895928960289612896228963289642896528966289672896828969289702897128972289732897428975289762897728978289792898028981289822898328984289852898628987289882898928990289912899228993289942899528996289972899828999290002900129002290032900429005290062900729008290092901029011290122901329014290152901629017290182901929020290212902229023290242902529026290272902829029290302903129032290332903429035290362903729038290392904029041290422904329044290452904629047290482904929050290512905229053290542905529056290572905829059290602906129062290632906429065290662906729068290692907029071290722907329074290752907629077290782907929080290812908229083290842908529086290872908829089290902909129092290932909429095290962909729098290992910029101291022910329104291052910629107291082910929110291112911229113291142911529116291172911829119291202912129122291232912429125291262912729128291292913029131291322913329134291352913629137291382913929140291412914229143291442914529146291472914829149291502915129152291532915429155291562915729158291592916029161291622916329164291652916629167291682916929170291712917229173291742917529176291772917829179291802918129182291832918429185291862918729188291892919029191291922919329194291952919629197291982919929200292012920229203292042920529206292072920829209292102921129212292132921429215292162921729218292192922029221292222922329224292252922629227292282922929230292312923229233292342923529236292372923829239292402924129242292432924429245292462924729248292492925029251292522925329254292552925629257292582925929260292612926229263292642926529266292672926829269292702927129272292732927429275292762927729278292792928029281292822928329284292852928629287292882928929290292912929229293292942929529296292972929829299293002930129302293032930429305293062930729308293092931029311293122931329314293152931629317293182931929320293212932229323293242932529326293272932829329293302933129332293332933429335293362933729338293392934029341293422934329344293452934629347293482934929350293512935229353293542935529356293572935829359293602936129362293632936429365293662936729368293692937029371293722937329374293752937629377293782937929380293812938229383293842938529386293872938829389293902939129392293932939429395293962939729398293992940029401294022940329404294052940629407294082940929410294112941229413294142941529416294172941829419294202942129422294232942429425294262942729428294292943029431294322943329434294352943629437294382943929440294412944229443294442944529446294472944829449294502945129452294532945429455294562945729458294592946029461294622946329464294652946629467294682946929470294712947229473294742947529476294772947829479294802948129482294832948429485294862948729488294892949029491294922949329494294952949629497294982949929500295012950229503295042950529506295072950829509295102951129512295132951429515295162951729518295192952029521295222952329524295252952629527295282952929530295312953229533295342953529536295372953829539295402954129542295432954429545295462954729548295492955029551295522955329554295552955629557295582955929560295612956229563295642956529566295672956829569295702957129572295732957429575295762957729578295792958029581295822958329584295852958629587295882958929590295912959229593295942959529596295972959829599296002960129602296032960429605296062960729608296092961029611296122961329614296152961629617296182961929620296212962229623296242962529626296272962829629296302963129632296332963429635296362963729638296392964029641296422964329644296452964629647296482964929650296512965229653296542965529656296572965829659296602966129662296632966429665296662966729668296692967029671296722967329674296752967629677296782967929680296812968229683296842968529686296872968829689296902969129692296932969429695296962969729698296992970029701297022970329704297052970629707297082970929710297112971229713297142971529716297172971829719297202972129722297232972429725297262972729728297292973029731297322973329734297352973629737297382973929740297412974229743297442974529746297472974829749297502975129752297532975429755297562975729758297592976029761297622976329764297652976629767297682976929770297712977229773297742977529776297772977829779297802978129782297832978429785297862978729788297892979029791297922979329794297952979629797297982979929800298012980229803298042980529806298072980829809298102981129812298132981429815298162981729818298192982029821298222982329824298252982629827298282982929830298312983229833298342983529836298372983829839298402984129842298432984429845298462984729848298492985029851298522985329854298552985629857298582985929860298612986229863298642986529866298672986829869298702987129872298732987429875298762987729878298792988029881298822988329884298852988629887298882988929890298912989229893298942989529896298972989829899299002990129902299032990429905299062990729908299092991029911299122991329914299152991629917299182991929920299212992229923299242992529926299272992829929299302993129932299332993429935299362993729938299392994029941299422994329944299452994629947299482994929950299512995229953299542995529956299572995829959299602996129962299632996429965299662996729968299692997029971299722997329974299752997629977299782997929980299812998229983299842998529986299872998829989299902999129992299932999429995299962999729998299993000030001300023000330004300053000630007300083000930010300113001230013300143001530016300173001830019300203002130022300233002430025300263002730028300293003030031300323003330034300353003630037300383003930040300413004230043300443004530046300473004830049300503005130052300533005430055300563005730058300593006030061300623006330064300653006630067300683006930070300713007230073300743007530076300773007830079300803008130082300833008430085300863008730088300893009030091300923009330094300953009630097300983009930100301013010230103301043010530106301073010830109301103011130112301133011430115301163011730118301193012030121301223012330124301253012630127301283012930130301313013230133301343013530136301373013830139301403014130142301433014430145301463014730148301493015030151301523015330154301553015630157301583015930160301613016230163301643016530166301673016830169301703017130172301733017430175301763017730178301793018030181301823018330184301853018630187301883018930190301913019230193301943019530196301973019830199302003020130202302033020430205302063020730208302093021030211302123021330214302153021630217302183021930220302213022230223302243022530226302273022830229302303023130232302333023430235302363023730238302393024030241302423024330244302453024630247302483024930250302513025230253302543025530256302573025830259302603026130262302633026430265302663026730268302693027030271302723027330274302753027630277302783027930280302813028230283302843028530286302873028830289302903029130292302933029430295302963029730298302993030030301303023030330304303053030630307303083030930310303113031230313303143031530316303173031830319303203032130322303233032430325303263032730328303293033030331303323033330334303353033630337303383033930340303413034230343303443034530346303473034830349303503035130352303533035430355303563035730358303593036030361303623036330364303653036630367303683036930370303713037230373303743037530376303773037830379303803038130382303833038430385303863038730388303893039030391303923039330394303953039630397303983039930400304013040230403304043040530406304073040830409304103041130412304133041430415304163041730418304193042030421304223042330424304253042630427304283042930430304313043230433304343043530436304373043830439304403044130442304433044430445304463044730448304493045030451304523045330454304553045630457304583045930460304613046230463304643046530466304673046830469304703047130472304733047430475304763047730478304793048030481304823048330484304853048630487304883048930490304913049230493304943049530496304973049830499305003050130502305033050430505305063050730508305093051030511305123051330514305153051630517305183051930520305213052230523305243052530526305273052830529305303053130532305333053430535305363053730538305393054030541305423054330544305453054630547305483054930550305513055230553305543055530556305573055830559305603056130562305633056430565305663056730568305693057030571305723057330574305753057630577305783057930580305813058230583305843058530586305873058830589305903059130592305933059430595305963059730598305993060030601306023060330604306053060630607306083060930610306113061230613306143061530616306173061830619306203062130622306233062430625306263062730628306293063030631306323063330634306353063630637306383063930640306413064230643306443064530646306473064830649306503065130652306533065430655306563065730658306593066030661306623066330664306653066630667306683066930670306713067230673306743067530676306773067830679306803068130682306833068430685306863068730688306893069030691306923069330694306953069630697306983069930700307013070230703307043070530706307073070830709307103071130712307133071430715307163071730718307193072030721307223072330724307253072630727307283072930730307313073230733307343073530736307373073830739307403074130742307433074430745307463074730748307493075030751307523075330754307553075630757307583075930760307613076230763307643076530766307673076830769307703077130772307733077430775307763077730778307793078030781307823078330784307853078630787307883078930790307913079230793307943079530796307973079830799308003080130802308033080430805308063080730808308093081030811308123081330814308153081630817308183081930820308213082230823308243082530826308273082830829308303083130832308333083430835308363083730838308393084030841308423084330844308453084630847308483084930850308513085230853308543085530856308573085830859308603086130862308633086430865308663086730868308693087030871308723087330874308753087630877308783087930880308813088230883308843088530886308873088830889308903089130892308933089430895308963089730898308993090030901309023090330904309053090630907309083090930910309113091230913309143091530916309173091830919309203092130922309233092430925309263092730928309293093030931309323093330934309353093630937309383093930940309413094230943309443094530946309473094830949309503095130952309533095430955309563095730958309593096030961309623096330964309653096630967309683096930970309713097230973309743097530976309773097830979309803098130982309833098430985309863098730988309893099030991309923099330994309953099630997309983099931000310013100231003310043100531006310073100831009310103101131012310133101431015310163101731018310193102031021310223102331024310253102631027310283102931030310313103231033310343103531036310373103831039310403104131042310433104431045310463104731048310493105031051310523105331054310553105631057310583105931060310613106231063310643106531066310673106831069310703107131072310733107431075310763107731078310793108031081310823108331084310853108631087310883108931090310913109231093310943109531096310973109831099311003110131102311033110431105311063110731108311093111031111311123111331114311153111631117311183111931120311213112231123311243112531126311273112831129311303113131132311333113431135311363113731138311393114031141311423114331144311453114631147311483114931150311513115231153311543115531156311573115831159311603116131162311633116431165311663116731168311693117031171311723117331174311753117631177311783117931180311813118231183311843118531186311873118831189311903119131192311933119431195311963119731198311993120031201312023120331204312053120631207312083120931210312113121231213312143121531216312173121831219312203122131222312233122431225312263122731228312293123031231312323123331234312353123631237312383123931240312413124231243312443124531246312473124831249312503125131252312533125431255312563125731258312593126031261312623126331264312653126631267312683126931270312713127231273312743127531276312773127831279312803128131282312833128431285312863128731288312893129031291312923129331294312953129631297312983129931300313013130231303313043130531306313073130831309313103131131312313133131431315313163131731318313193132031321313223132331324313253132631327313283132931330313313133231333313343133531336313373133831339313403134131342313433134431345313463134731348313493135031351313523135331354313553135631357313583135931360313613136231363313643136531366313673136831369313703137131372313733137431375313763137731378313793138031381313823138331384313853138631387313883138931390313913139231393313943139531396313973139831399314003140131402314033140431405314063140731408314093141031411314123141331414314153141631417314183141931420314213142231423314243142531426314273142831429314303143131432314333143431435314363143731438314393144031441314423144331444314453144631447314483144931450314513145231453314543145531456314573145831459314603146131462314633146431465314663146731468314693147031471314723147331474314753147631477314783147931480314813148231483314843148531486314873148831489314903149131492314933149431495314963149731498314993150031501315023150331504315053150631507315083150931510315113151231513315143151531516315173151831519315203152131522315233152431525315263152731528315293153031531315323153331534315353153631537315383153931540315413154231543315443154531546315473154831549315503155131552315533155431555315563155731558315593156031561315623156331564315653156631567315683156931570315713157231573315743157531576315773157831579315803158131582315833158431585315863158731588315893159031591315923159331594315953159631597315983159931600316013160231603316043160531606316073160831609316103161131612316133161431615316163161731618316193162031621316223162331624316253162631627316283162931630316313163231633316343163531636316373163831639316403164131642316433164431645316463164731648316493165031651316523165331654316553165631657316583165931660316613166231663316643166531666316673166831669316703167131672316733167431675316763167731678316793168031681316823168331684316853168631687316883168931690316913169231693316943169531696316973169831699317003170131702317033170431705317063170731708317093171031711317123171331714317153171631717317183171931720317213172231723317243172531726317273172831729317303173131732317333173431735317363173731738317393174031741317423174331744317453174631747317483174931750317513175231753317543175531756317573175831759317603176131762317633176431765317663176731768317693177031771317723177331774317753177631777317783177931780317813178231783317843178531786317873178831789317903179131792317933179431795317963179731798317993180031801318023180331804318053180631807318083180931810318113181231813318143181531816318173181831819318203182131822318233182431825318263182731828318293183031831318323183331834318353183631837318383183931840318413184231843318443184531846318473184831849318503185131852318533185431855318563185731858318593186031861318623186331864318653186631867318683186931870318713187231873318743187531876318773187831879318803188131882318833188431885318863188731888318893189031891318923189331894318953189631897318983189931900319013190231903319043190531906319073190831909319103191131912319133191431915319163191731918319193192031921319223192331924319253192631927319283192931930319313193231933319343193531936319373193831939319403194131942319433194431945319463194731948319493195031951319523195331954319553195631957319583195931960319613196231963319643196531966319673196831969319703197131972319733197431975319763197731978319793198031981319823198331984319853198631987319883198931990319913199231993319943199531996319973199831999320003200132002320033200432005320063200732008320093201032011320123201332014320153201632017320183201932020320213202232023320243202532026320273202832029320303203132032320333203432035320363203732038320393204032041320423204332044320453204632047320483204932050320513205232053320543205532056320573205832059320603206132062320633206432065320663206732068320693207032071320723207332074320753207632077320783207932080320813208232083320843208532086320873208832089320903209132092320933209432095320963209732098320993210032101321023210332104321053210632107321083210932110321113211232113321143211532116321173211832119321203212132122321233212432125321263212732128321293213032131321323213332134321353213632137321383213932140321413214232143321443214532146321473214832149321503215132152321533215432155321563215732158321593216032161321623216332164321653216632167321683216932170321713217232173321743217532176321773217832179321803218132182321833218432185321863218732188321893219032191321923219332194321953219632197321983219932200322013220232203322043220532206322073220832209322103221132212322133221432215322163221732218322193222032221322223222332224322253222632227322283222932230322313223232233322343223532236322373223832239322403224132242322433224432245322463224732248322493225032251322523225332254322553225632257322583225932260322613226232263322643226532266322673226832269322703227132272322733227432275322763227732278322793228032281322823228332284322853228632287322883228932290322913229232293322943229532296322973229832299323003230132302323033230432305323063230732308323093231032311323123231332314323153231632317323183231932320323213232232323323243232532326323273232832329323303233132332323333233432335323363233732338323393234032341323423234332344323453234632347323483234932350323513235232353323543235532356323573235832359323603236132362323633236432365323663236732368323693237032371323723237332374323753237632377323783237932380323813238232383323843238532386323873238832389323903239132392323933239432395323963239732398323993240032401324023240332404324053240632407324083240932410324113241232413324143241532416324173241832419324203242132422324233242432425324263242732428324293243032431324323243332434324353243632437324383243932440324413244232443324443244532446324473244832449324503245132452324533245432455324563245732458324593246032461324623246332464324653246632467324683246932470324713247232473324743247532476324773247832479324803248132482324833248432485324863248732488324893249032491324923249332494324953249632497324983249932500325013250232503325043250532506325073250832509325103251132512325133251432515325163251732518325193252032521325223252332524325253252632527325283252932530325313253232533325343253532536325373253832539325403254132542325433254432545325463254732548325493255032551325523255332554325553255632557325583255932560325613256232563325643256532566325673256832569325703257132572325733257432575325763257732578325793258032581325823258332584325853258632587325883258932590325913259232593325943259532596325973259832599326003260132602326033260432605326063260732608326093261032611326123261332614326153261632617326183261932620326213262232623326243262532626326273262832629326303263132632326333263432635326363263732638326393264032641326423264332644326453264632647326483264932650326513265232653326543265532656326573265832659326603266132662326633266432665326663266732668326693267032671326723267332674326753267632677326783267932680326813268232683326843268532686326873268832689326903269132692326933269432695326963269732698326993270032701327023270332704327053270632707327083270932710327113271232713327143271532716327173271832719327203272132722327233272432725327263272732728327293273032731327323273332734327353273632737327383273932740327413274232743327443274532746327473274832749327503275132752327533275432755327563275732758327593276032761327623276332764327653276632767327683276932770327713277232773327743277532776327773277832779327803278132782327833278432785327863278732788327893279032791327923279332794327953279632797327983279932800328013280232803328043280532806328073280832809328103281132812328133281432815328163281732818328193282032821328223282332824328253282632827328283282932830328313283232833328343283532836328373283832839328403284132842328433284432845328463284732848328493285032851328523285332854328553285632857328583285932860328613286232863328643286532866328673286832869328703287132872328733287432875328763287732878328793288032881328823288332884328853288632887328883288932890328913289232893328943289532896328973289832899329003290132902329033290432905329063290732908329093291032911329123291332914329153291632917329183291932920329213292232923329243292532926329273292832929329303293132932329333293432935329363293732938329393294032941329423294332944329453294632947329483294932950329513295232953329543295532956329573295832959329603296132962329633296432965329663296732968329693297032971329723297332974329753297632977329783297932980329813298232983329843298532986329873298832989329903299132992329933299432995329963299732998329993300033001330023300333004330053300633007330083300933010330113301233013330143301533016330173301833019330203302133022330233302433025330263302733028330293303033031330323303333034330353303633037330383303933040330413304233043330443304533046330473304833049330503305133052330533305433055330563305733058330593306033061330623306333064330653306633067330683306933070330713307233073330743307533076330773307833079330803308133082330833308433085330863308733088330893309033091330923309333094330953309633097330983309933100331013310233103331043310533106331073310833109331103311133112331133311433115331163311733118331193312033121331223312333124331253312633127331283312933130331313313233133331343313533136331373313833139331403314133142331433314433145331463314733148331493315033151331523315333154331553315633157331583315933160331613316233163331643316533166331673316833169331703317133172331733317433175331763317733178331793318033181331823318333184331853318633187331883318933190331913319233193331943319533196331973319833199332003320133202332033320433205332063320733208332093321033211332123321333214332153321633217332183321933220332213322233223332243322533226332273322833229332303323133232332333323433235332363323733238332393324033241332423324333244332453324633247332483324933250332513325233253332543325533256332573325833259332603326133262332633326433265332663326733268332693327033271332723327333274332753327633277332783327933280332813328233283332843328533286332873328833289332903329133292332933329433295332963329733298332993330033301333023330333304333053330633307333083330933310333113331233313333143331533316333173331833319333203332133322333233332433325333263332733328333293333033331333323333333334333353333633337333383333933340333413334233343333443334533346333473334833349333503335133352333533335433355333563335733358333593336033361333623336333364333653336633367333683336933370333713337233373333743337533376333773337833379333803338133382333833338433385333863338733388333893339033391333923339333394333953339633397333983339933400334013340233403334043340533406334073340833409334103341133412334133341433415334163341733418334193342033421334223342333424334253342633427334283342933430334313343233433334343343533436334373343833439334403344133442334433344433445334463344733448334493345033451334523345333454334553345633457334583345933460334613346233463334643346533466334673346833469334703347133472334733347433475334763347733478334793348033481334823348333484334853348633487334883348933490334913349233493334943349533496334973349833499335003350133502335033350433505335063350733508335093351033511335123351333514335153351633517335183351933520335213352233523335243352533526335273352833529335303353133532335333353433535335363353733538335393354033541335423354333544335453354633547335483354933550335513355233553335543355533556335573355833559335603356133562335633356433565335663356733568335693357033571335723357333574335753357633577335783357933580335813358233583335843358533586335873358833589335903359133592335933359433595335963359733598335993360033601336023360333604336053360633607336083360933610336113361233613336143361533616336173361833619336203362133622336233362433625336263362733628336293363033631336323363333634336353363633637336383363933640336413364233643336443364533646336473364833649336503365133652336533365433655336563365733658336593366033661336623366333664336653366633667336683366933670336713367233673336743367533676336773367833679336803368133682336833368433685336863368733688336893369033691336923369333694336953369633697336983369933700337013370233703337043370533706337073370833709337103371133712337133371433715337163371733718337193372033721337223372333724337253372633727337283372933730337313373233733337343373533736337373373833739337403374133742337433374433745337463374733748337493375033751337523375333754337553375633757337583375933760337613376233763337643376533766337673376833769337703377133772337733377433775337763377733778337793378033781337823378333784337853378633787337883378933790337913379233793337943379533796337973379833799338003380133802338033380433805338063380733808338093381033811338123381333814338153381633817338183381933820338213382233823338243382533826338273382833829338303383133832338333383433835338363383733838338393384033841338423384333844338453384633847338483384933850338513385233853338543385533856338573385833859338603386133862338633386433865338663386733868338693387033871338723387333874338753387633877338783387933880338813388233883338843388533886338873388833889338903389133892338933389433895338963389733898338993390033901339023390333904339053390633907339083390933910339113391233913339143391533916339173391833919339203392133922339233392433925339263392733928339293393033931339323393333934339353393633937339383393933940339413394233943339443394533946339473394833949339503395133952339533395433955339563395733958339593396033961339623396333964339653396633967339683396933970339713397233973339743397533976339773397833979339803398133982339833398433985339863398733988339893399033991339923399333994339953399633997339983399934000340013400234003340043400534006340073400834009340103401134012340133401434015340163401734018340193402034021340223402334024340253402634027340283402934030340313403234033340343403534036340373403834039340403404134042340433404434045340463404734048340493405034051340523405334054340553405634057340583405934060340613406234063340643406534066340673406834069340703407134072340733407434075340763407734078340793408034081340823408334084340853408634087340883408934090340913409234093340943409534096340973409834099341003410134102341033410434105341063410734108341093411034111341123411334114341153411634117341183411934120341213412234123341243412534126341273412834129341303413134132341333413434135341363413734138341393414034141341423414334144341453414634147341483414934150341513415234153341543415534156341573415834159341603416134162341633416434165341663416734168341693417034171341723417334174341753417634177341783417934180341813418234183341843418534186341873418834189341903419134192341933419434195341963419734198341993420034201342023420334204342053420634207342083420934210342113421234213342143421534216342173421834219342203422134222342233422434225342263422734228342293423034231342323423334234342353423634237342383423934240342413424234243342443424534246342473424834249342503425134252342533425434255342563425734258342593426034261342623426334264342653426634267342683426934270342713427234273342743427534276342773427834279342803428134282342833428434285342863428734288342893429034291342923429334294342953429634297342983429934300343013430234303343043430534306343073430834309343103431134312343133431434315343163431734318343193432034321343223432334324343253432634327343283432934330343313433234333343343433534336343373433834339343403434134342343433434434345343463434734348343493435034351343523435334354343553435634357343583435934360343613436234363343643436534366343673436834369343703437134372343733437434375343763437734378343793438034381343823438334384343853438634387343883438934390343913439234393343943439534396343973439834399344003440134402344033440434405344063440734408344093441034411344123441334414344153441634417344183441934420344213442234423344243442534426344273442834429344303443134432344333443434435344363443734438344393444034441344423444334444344453444634447344483444934450344513445234453344543445534456344573445834459344603446134462344633446434465344663446734468344693447034471344723447334474344753447634477344783447934480344813448234483344843448534486344873448834489344903449134492344933449434495344963449734498344993450034501345023450334504345053450634507345083450934510345113451234513345143451534516345173451834519345203452134522345233452434525345263452734528345293453034531345323453334534345353453634537345383453934540345413454234543345443454534546345473454834549345503455134552345533455434555345563455734558345593456034561345623456334564345653456634567345683456934570345713457234573345743457534576345773457834579345803458134582345833458434585345863458734588345893459034591345923459334594345953459634597345983459934600346013460234603346043460534606346073460834609346103461134612346133461434615346163461734618346193462034621346223462334624346253462634627346283462934630346313463234633346343463534636346373463834639346403464134642346433464434645346463464734648346493465034651346523465334654346553465634657346583465934660346613466234663346643466534666346673466834669346703467134672346733467434675346763467734678346793468034681346823468334684346853468634687346883468934690346913469234693346943469534696346973469834699347003470134702347033470434705347063470734708347093471034711347123471334714347153471634717347183471934720347213472234723347243472534726347273472834729347303473134732347333473434735347363473734738347393474034741347423474334744347453474634747347483474934750347513475234753347543475534756347573475834759347603476134762347633476434765347663476734768347693477034771347723477334774347753477634777347783477934780347813478234783347843478534786347873478834789347903479134792347933479434795347963479734798347993480034801348023480334804348053480634807348083480934810348113481234813348143481534816348173481834819348203482134822348233482434825348263482734828348293483034831348323483334834348353483634837348383483934840348413484234843348443484534846348473484834849348503485134852348533485434855348563485734858348593486034861348623486334864348653486634867348683486934870348713487234873348743487534876348773487834879348803488134882348833488434885348863488734888348893489034891348923489334894348953489634897348983489934900349013490234903349043490534906349073490834909349103491134912349133491434915349163491734918349193492034921349223492334924349253492634927349283492934930349313493234933349343493534936349373493834939349403494134942349433494434945349463494734948349493495034951349523495334954349553495634957349583495934960349613496234963349643496534966349673496834969349703497134972349733497434975349763497734978349793498034981349823498334984349853498634987349883498934990349913499234993349943499534996349973499834999350003500135002350033500435005350063500735008350093501035011350123501335014350153501635017350183501935020350213502235023350243502535026350273502835029350303503135032350333503435035350363503735038350393504035041350423504335044350453504635047350483504935050350513505235053350543505535056350573505835059350603506135062350633506435065350663506735068350693507035071350723507335074350753507635077350783507935080350813508235083350843508535086350873508835089350903509135092350933509435095350963509735098350993510035101351023510335104351053510635107351083510935110351113511235113351143511535116351173511835119351203512135122351233512435125351263512735128351293513035131351323513335134351353513635137351383513935140351413514235143351443514535146351473514835149351503515135152351533515435155351563515735158351593516035161351623516335164351653516635167351683516935170351713517235173351743517535176351773517835179351803518135182351833518435185351863518735188351893519035191351923519335194351953519635197351983519935200352013520235203352043520535206352073520835209352103521135212352133521435215352163521735218352193522035221352223522335224352253522635227352283522935230352313523235233352343523535236352373523835239352403524135242352433524435245352463524735248352493525035251352523525335254352553525635257352583525935260352613526235263352643526535266352673526835269352703527135272352733527435275352763527735278352793528035281352823528335284352853528635287352883528935290352913529235293352943529535296352973529835299353003530135302353033530435305353063530735308353093531035311353123531335314353153531635317353183531935320353213532235323353243532535326353273532835329353303533135332353333533435335353363533735338353393534035341353423534335344353453534635347353483534935350353513535235353353543535535356353573535835359353603536135362353633536435365353663536735368353693537035371353723537335374353753537635377353783537935380353813538235383353843538535386353873538835389353903539135392353933539435395353963539735398353993540035401354023540335404354053540635407354083540935410354113541235413354143541535416354173541835419354203542135422354233542435425354263542735428354293543035431354323543335434354353543635437354383543935440354413544235443354443544535446354473544835449354503545135452354533545435455354563545735458354593546035461354623546335464354653546635467354683546935470354713547235473354743547535476354773547835479354803548135482354833548435485354863548735488354893549035491354923549335494354953549635497354983549935500355013550235503355043550535506355073550835509355103551135512355133551435515355163551735518355193552035521355223552335524355253552635527355283552935530355313553235533355343553535536355373553835539355403554135542355433554435545355463554735548355493555035551355523555335554355553555635557355583555935560355613556235563355643556535566355673556835569355703557135572355733557435575355763557735578355793558035581355823558335584355853558635587355883558935590355913559235593355943559535596355973559835599356003560135602356033560435605356063560735608356093561035611356123561335614356153561635617356183561935620356213562235623356243562535626356273562835629356303563135632356333563435635356363563735638356393564035641356423564335644356453564635647356483564935650356513565235653356543565535656356573565835659356603566135662356633566435665356663566735668356693567035671356723567335674356753567635677356783567935680356813568235683356843568535686356873568835689356903569135692356933569435695356963569735698356993570035701357023570335704357053570635707357083570935710357113571235713357143571535716357173571835719357203572135722357233572435725357263572735728357293573035731357323573335734357353573635737357383573935740357413574235743357443574535746357473574835749357503575135752357533575435755357563575735758357593576035761357623576335764357653576635767357683576935770357713577235773357743577535776357773577835779357803578135782357833578435785357863578735788357893579035791357923579335794357953579635797357983579935800358013580235803358043580535806358073580835809358103581135812358133581435815358163581735818358193582035821358223582335824358253582635827358283582935830358313583235833358343583535836358373583835839358403584135842358433584435845358463584735848358493585035851358523585335854358553585635857358583585935860358613586235863358643586535866358673586835869358703587135872358733587435875358763587735878358793588035881358823588335884358853588635887358883588935890358913589235893358943589535896358973589835899359003590135902359033590435905359063590735908359093591035911359123591335914359153591635917359183591935920359213592235923359243592535926359273592835929359303593135932359333593435935359363593735938359393594035941359423594335944359453594635947359483594935950359513595235953359543595535956359573595835959359603596135962359633596435965359663596735968359693597035971359723597335974359753597635977359783597935980359813598235983359843598535986359873598835989359903599135992359933599435995359963599735998359993600036001360023600336004360053600636007360083600936010360113601236013360143601536016360173601836019360203602136022360233602436025
  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 session activity.",
  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 session activity.",
  10472. "summary": "Switch session model",
  10473. "requestBody": {
  10474. "content": {
  10475. "application/json": {
  10476. "schema": {
  10477. "type": "object",
  10478. "properties": {
  10479. "model": {
  10480. "type": "object",
  10481. "properties": {
  10482. "id": {
  10483. "type": "string"
  10484. },
  10485. "providerID": {
  10486. "type": "string"
  10487. },
  10488. "variant": {
  10489. "type": "string"
  10490. }
  10491. },
  10492. "required": ["id", "providerID"],
  10493. "additionalProperties": false
  10494. }
  10495. },
  10496. "required": ["model"],
  10497. "additionalProperties": false
  10498. }
  10499. }
  10500. },
  10501. "required": true
  10502. },
  10503. "x-codeSamples": [
  10504. {
  10505. "lang": "js",
  10506. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.switchModel({\n ...\n})"
  10507. }
  10508. ]
  10509. }
  10510. },
  10511. "/api/session/{sessionID}/prompt": {
  10512. "post": {
  10513. "tags": ["sessions"],
  10514. "operationId": "v2.session.prompt",
  10515. "parameters": [
  10516. {
  10517. "name": "sessionID",
  10518. "in": "path",
  10519. "schema": {
  10520. "type": "string",
  10521. "pattern": "^ses"
  10522. },
  10523. "required": true
  10524. }
  10525. ],
  10526. "security": [],
  10527. "responses": {
  10528. "200": {
  10529. "description": "Success",
  10530. "content": {
  10531. "application/json": {
  10532. "schema": {
  10533. "type": "object",
  10534. "properties": {
  10535. "data": {
  10536. "$ref": "#/components/schemas/SessionInputAdmitted"
  10537. }
  10538. },
  10539. "required": ["data"],
  10540. "additionalProperties": false
  10541. }
  10542. }
  10543. }
  10544. },
  10545. "400": {
  10546. "description": "InvalidRequestError",
  10547. "content": {
  10548. "application/json": {
  10549. "schema": {
  10550. "$ref": "#/components/schemas/InvalidRequestError"
  10551. }
  10552. }
  10553. }
  10554. },
  10555. "401": {
  10556. "description": "UnauthorizedError",
  10557. "content": {
  10558. "application/json": {
  10559. "schema": {
  10560. "$ref": "#/components/schemas/UnauthorizedError"
  10561. }
  10562. }
  10563. }
  10564. },
  10565. "404": {
  10566. "description": "SessionNotFoundError",
  10567. "content": {
  10568. "application/json": {
  10569. "schema": {
  10570. "anyOf": [
  10571. {
  10572. "$ref": "#/components/schemas/SessionNotFoundError"
  10573. },
  10574. {
  10575. "$ref": "#/components/schemas/SessionNotFoundError"
  10576. }
  10577. ]
  10578. }
  10579. }
  10580. }
  10581. },
  10582. "409": {
  10583. "description": "ConflictError",
  10584. "content": {
  10585. "application/json": {
  10586. "schema": {
  10587. "$ref": "#/components/schemas/ConflictError"
  10588. }
  10589. }
  10590. }
  10591. }
  10592. },
  10593. "description": "Durably admit one session input and schedule agent-loop execution unless resume is false.",
  10594. "summary": "Send message",
  10595. "requestBody": {
  10596. "content": {
  10597. "application/json": {
  10598. "schema": {
  10599. "type": "object",
  10600. "properties": {
  10601. "id": {
  10602. "type": "string",
  10603. "pattern": "^msg_"
  10604. },
  10605. "prompt": {
  10606. "$ref": "#/components/schemas/Prompt"
  10607. },
  10608. "delivery": {
  10609. "type": "string",
  10610. "enum": ["steer", "queue"]
  10611. },
  10612. "resume": {
  10613. "type": "boolean"
  10614. }
  10615. },
  10616. "required": ["prompt"],
  10617. "additionalProperties": false
  10618. }
  10619. }
  10620. },
  10621. "required": true
  10622. },
  10623. "x-codeSamples": [
  10624. {
  10625. "lang": "js",
  10626. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  10627. }
  10628. ]
  10629. }
  10630. },
  10631. "/api/session/{sessionID}/compact": {
  10632. "post": {
  10633. "tags": ["sessions"],
  10634. "operationId": "v2.session.compact",
  10635. "parameters": [
  10636. {
  10637. "name": "sessionID",
  10638. "in": "path",
  10639. "schema": {
  10640. "type": "string",
  10641. "pattern": "^ses"
  10642. },
  10643. "required": true
  10644. }
  10645. ],
  10646. "security": [],
  10647. "responses": {
  10648. "204": {
  10649. "description": "<No Content>"
  10650. },
  10651. "400": {
  10652. "description": "InvalidRequestError",
  10653. "content": {
  10654. "application/json": {
  10655. "schema": {
  10656. "$ref": "#/components/schemas/InvalidRequestError"
  10657. }
  10658. }
  10659. }
  10660. },
  10661. "401": {
  10662. "description": "UnauthorizedError",
  10663. "content": {
  10664. "application/json": {
  10665. "schema": {
  10666. "$ref": "#/components/schemas/UnauthorizedError"
  10667. }
  10668. }
  10669. }
  10670. },
  10671. "404": {
  10672. "description": "SessionNotFoundError",
  10673. "content": {
  10674. "application/json": {
  10675. "schema": {
  10676. "anyOf": [
  10677. {
  10678. "$ref": "#/components/schemas/SessionNotFoundError"
  10679. },
  10680. {
  10681. "$ref": "#/components/schemas/SessionNotFoundError"
  10682. }
  10683. ]
  10684. }
  10685. }
  10686. }
  10687. },
  10688. "503": {
  10689. "description": "ServiceUnavailableError",
  10690. "content": {
  10691. "application/json": {
  10692. "schema": {
  10693. "$ref": "#/components/schemas/ServiceUnavailableError"
  10694. }
  10695. }
  10696. }
  10697. }
  10698. },
  10699. "description": "Compact a session conversation.",
  10700. "summary": "Compact session",
  10701. "x-codeSamples": [
  10702. {
  10703. "lang": "js",
  10704. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  10705. }
  10706. ]
  10707. }
  10708. },
  10709. "/api/session/{sessionID}/wait": {
  10710. "post": {
  10711. "tags": ["sessions"],
  10712. "operationId": "v2.session.wait",
  10713. "parameters": [
  10714. {
  10715. "name": "sessionID",
  10716. "in": "path",
  10717. "schema": {
  10718. "type": "string",
  10719. "pattern": "^ses"
  10720. },
  10721. "required": true
  10722. }
  10723. ],
  10724. "security": [],
  10725. "responses": {
  10726. "204": {
  10727. "description": "<No Content>"
  10728. },
  10729. "400": {
  10730. "description": "InvalidRequestError",
  10731. "content": {
  10732. "application/json": {
  10733. "schema": {
  10734. "$ref": "#/components/schemas/InvalidRequestError"
  10735. }
  10736. }
  10737. }
  10738. },
  10739. "401": {
  10740. "description": "UnauthorizedError",
  10741. "content": {
  10742. "application/json": {
  10743. "schema": {
  10744. "$ref": "#/components/schemas/UnauthorizedError"
  10745. }
  10746. }
  10747. }
  10748. },
  10749. "404": {
  10750. "description": "SessionNotFoundError",
  10751. "content": {
  10752. "application/json": {
  10753. "schema": {
  10754. "anyOf": [
  10755. {
  10756. "$ref": "#/components/schemas/SessionNotFoundError"
  10757. },
  10758. {
  10759. "$ref": "#/components/schemas/SessionNotFoundError"
  10760. }
  10761. ]
  10762. }
  10763. }
  10764. }
  10765. },
  10766. "503": {
  10767. "description": "ServiceUnavailableError",
  10768. "content": {
  10769. "application/json": {
  10770. "schema": {
  10771. "$ref": "#/components/schemas/ServiceUnavailableError"
  10772. }
  10773. }
  10774. }
  10775. }
  10776. },
  10777. "description": "Wait for a session agent loop to become idle.",
  10778. "summary": "Wait for session",
  10779. "x-codeSamples": [
  10780. {
  10781. "lang": "js",
  10782. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  10783. }
  10784. ]
  10785. }
  10786. },
  10787. "/api/session/{sessionID}/context": {
  10788. "get": {
  10789. "tags": ["sessions"],
  10790. "operationId": "v2.session.context",
  10791. "parameters": [
  10792. {
  10793. "name": "sessionID",
  10794. "in": "path",
  10795. "schema": {
  10796. "type": "string",
  10797. "pattern": "^ses"
  10798. },
  10799. "required": true
  10800. }
  10801. ],
  10802. "security": [],
  10803. "responses": {
  10804. "200": {
  10805. "description": "Success",
  10806. "content": {
  10807. "application/json": {
  10808. "schema": {
  10809. "type": "object",
  10810. "properties": {
  10811. "data": {
  10812. "type": "array",
  10813. "items": {
  10814. "$ref": "#/components/schemas/SessionMessage"
  10815. }
  10816. }
  10817. },
  10818. "required": ["data"],
  10819. "additionalProperties": false
  10820. }
  10821. }
  10822. }
  10823. },
  10824. "400": {
  10825. "description": "InvalidRequestError",
  10826. "content": {
  10827. "application/json": {
  10828. "schema": {
  10829. "$ref": "#/components/schemas/InvalidRequestError"
  10830. }
  10831. }
  10832. }
  10833. },
  10834. "401": {
  10835. "description": "UnauthorizedError",
  10836. "content": {
  10837. "application/json": {
  10838. "schema": {
  10839. "$ref": "#/components/schemas/UnauthorizedError"
  10840. }
  10841. }
  10842. }
  10843. },
  10844. "404": {
  10845. "description": "SessionNotFoundError",
  10846. "content": {
  10847. "application/json": {
  10848. "schema": {
  10849. "anyOf": [
  10850. {
  10851. "$ref": "#/components/schemas/SessionNotFoundError"
  10852. },
  10853. {
  10854. "$ref": "#/components/schemas/SessionNotFoundError"
  10855. }
  10856. ]
  10857. }
  10858. }
  10859. }
  10860. },
  10861. "500": {
  10862. "description": "UnknownError",
  10863. "content": {
  10864. "application/json": {
  10865. "schema": {
  10866. "$ref": "#/components/schemas/UnknownError1"
  10867. }
  10868. }
  10869. }
  10870. }
  10871. },
  10872. "description": "Retrieve the active context messages for a session (all messages after the last compaction).",
  10873. "summary": "Get session context",
  10874. "x-codeSamples": [
  10875. {
  10876. "lang": "js",
  10877. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  10878. }
  10879. ]
  10880. }
  10881. },
  10882. "/api/session/{sessionID}/message": {
  10883. "get": {
  10884. "tags": ["messages"],
  10885. "operationId": "v2.session.messages",
  10886. "parameters": [
  10887. {
  10888. "name": "sessionID",
  10889. "in": "path",
  10890. "schema": {
  10891. "type": "string",
  10892. "pattern": "^ses"
  10893. },
  10894. "required": true
  10895. },
  10896. {
  10897. "name": "limit",
  10898. "in": "query",
  10899. "schema": {
  10900. "type": "number"
  10901. },
  10902. "required": false
  10903. },
  10904. {
  10905. "name": "order",
  10906. "in": "query",
  10907. "schema": {
  10908. "type": "string",
  10909. "enum": ["asc", "desc"]
  10910. },
  10911. "required": false
  10912. },
  10913. {
  10914. "name": "cursor",
  10915. "in": "query",
  10916. "schema": {
  10917. "type": "string",
  10918. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."
  10919. },
  10920. "required": false
  10921. }
  10922. ],
  10923. "security": [],
  10924. "responses": {
  10925. "200": {
  10926. "description": "SessionMessagesResponse",
  10927. "content": {
  10928. "application/json": {
  10929. "schema": {
  10930. "$ref": "#/components/schemas/SessionMessagesResponse"
  10931. }
  10932. }
  10933. }
  10934. },
  10935. "400": {
  10936. "description": "InvalidCursorError | InvalidRequestError",
  10937. "content": {
  10938. "application/json": {
  10939. "schema": {
  10940. "anyOf": [
  10941. {
  10942. "$ref": "#/components/schemas/InvalidCursorError"
  10943. },
  10944. {
  10945. "$ref": "#/components/schemas/InvalidRequestError"
  10946. }
  10947. ]
  10948. }
  10949. }
  10950. }
  10951. },
  10952. "401": {
  10953. "description": "UnauthorizedError",
  10954. "content": {
  10955. "application/json": {
  10956. "schema": {
  10957. "$ref": "#/components/schemas/UnauthorizedError"
  10958. }
  10959. }
  10960. }
  10961. },
  10962. "404": {
  10963. "description": "SessionNotFoundError",
  10964. "content": {
  10965. "application/json": {
  10966. "schema": {
  10967. "anyOf": [
  10968. {
  10969. "$ref": "#/components/schemas/SessionNotFoundError"
  10970. },
  10971. {
  10972. "$ref": "#/components/schemas/SessionNotFoundError"
  10973. }
  10974. ]
  10975. }
  10976. }
  10977. }
  10978. },
  10979. "500": {
  10980. "description": "UnknownError",
  10981. "content": {
  10982. "application/json": {
  10983. "schema": {
  10984. "$ref": "#/components/schemas/UnknownError1"
  10985. }
  10986. }
  10987. }
  10988. }
  10989. },
  10990. "description": "Retrieve projected messages for a session. Items keep the requested order across pages; use cursor.next or cursor.previous to move through the ordered timeline.",
  10991. "summary": "Get session messages",
  10992. "x-codeSamples": [
  10993. {
  10994. "lang": "js",
  10995. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  10996. }
  10997. ]
  10998. }
  10999. },
  11000. "/api/model": {
  11001. "get": {
  11002. "tags": ["models"],
  11003. "operationId": "v2.model.list",
  11004. "parameters": [
  11005. {
  11006. "name": "location",
  11007. "in": "query",
  11008. "schema": {
  11009. "type": "object",
  11010. "properties": {
  11011. "directory": {
  11012. "type": "string"
  11013. },
  11014. "workspace": {
  11015. "type": "string"
  11016. }
  11017. },
  11018. "additionalProperties": false
  11019. },
  11020. "required": false,
  11021. "style": "deepObject",
  11022. "explode": true
  11023. }
  11024. ],
  11025. "security": [],
  11026. "responses": {
  11027. "200": {
  11028. "description": "Success",
  11029. "content": {
  11030. "application/json": {
  11031. "schema": {
  11032. "type": "object",
  11033. "properties": {
  11034. "location": {
  11035. "$ref": "#/components/schemas/LocationInfo"
  11036. },
  11037. "data": {
  11038. "type": "array",
  11039. "items": {
  11040. "$ref": "#/components/schemas/ModelV2Info"
  11041. }
  11042. }
  11043. },
  11044. "required": ["location", "data"],
  11045. "additionalProperties": false
  11046. }
  11047. }
  11048. }
  11049. },
  11050. "400": {
  11051. "description": "InvalidRequestError",
  11052. "content": {
  11053. "application/json": {
  11054. "schema": {
  11055. "$ref": "#/components/schemas/InvalidRequestError"
  11056. }
  11057. }
  11058. }
  11059. },
  11060. "401": {
  11061. "description": "UnauthorizedError",
  11062. "content": {
  11063. "application/json": {
  11064. "schema": {
  11065. "$ref": "#/components/schemas/UnauthorizedError"
  11066. }
  11067. }
  11068. }
  11069. },
  11070. "503": {
  11071. "description": "ServiceUnavailableError",
  11072. "content": {
  11073. "application/json": {
  11074. "schema": {
  11075. "$ref": "#/components/schemas/ServiceUnavailableError"
  11076. }
  11077. }
  11078. }
  11079. }
  11080. },
  11081. "description": "Retrieve available models ordered by release date.",
  11082. "summary": "List models",
  11083. "x-codeSamples": [
  11084. {
  11085. "lang": "js",
  11086. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.model.list({\n ...\n})"
  11087. }
  11088. ]
  11089. }
  11090. },
  11091. "/api/provider": {
  11092. "get": {
  11093. "tags": ["providers"],
  11094. "operationId": "v2.provider.list",
  11095. "parameters": [
  11096. {
  11097. "name": "location",
  11098. "in": "query",
  11099. "schema": {
  11100. "type": "object",
  11101. "properties": {
  11102. "directory": {
  11103. "type": "string"
  11104. },
  11105. "workspace": {
  11106. "type": "string"
  11107. }
  11108. },
  11109. "additionalProperties": false
  11110. },
  11111. "required": false,
  11112. "style": "deepObject",
  11113. "explode": true
  11114. }
  11115. ],
  11116. "security": [],
  11117. "responses": {
  11118. "200": {
  11119. "description": "Success",
  11120. "content": {
  11121. "application/json": {
  11122. "schema": {
  11123. "type": "object",
  11124. "properties": {
  11125. "location": {
  11126. "$ref": "#/components/schemas/LocationInfo"
  11127. },
  11128. "data": {
  11129. "type": "array",
  11130. "items": {
  11131. "$ref": "#/components/schemas/ProviderV2Info"
  11132. }
  11133. }
  11134. },
  11135. "required": ["location", "data"],
  11136. "additionalProperties": false
  11137. }
  11138. }
  11139. }
  11140. },
  11141. "400": {
  11142. "description": "InvalidRequestError",
  11143. "content": {
  11144. "application/json": {
  11145. "schema": {
  11146. "$ref": "#/components/schemas/InvalidRequestError"
  11147. }
  11148. }
  11149. }
  11150. },
  11151. "401": {
  11152. "description": "UnauthorizedError",
  11153. "content": {
  11154. "application/json": {
  11155. "schema": {
  11156. "$ref": "#/components/schemas/UnauthorizedError"
  11157. }
  11158. }
  11159. }
  11160. },
  11161. "503": {
  11162. "description": "ServiceUnavailableError",
  11163. "content": {
  11164. "application/json": {
  11165. "schema": {
  11166. "$ref": "#/components/schemas/ServiceUnavailableError"
  11167. }
  11168. }
  11169. }
  11170. }
  11171. },
  11172. "description": "Retrieve active AI providers so clients can show provider availability and configuration.",
  11173. "summary": "List providers",
  11174. "x-codeSamples": [
  11175. {
  11176. "lang": "js",
  11177. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.list({\n ...\n})"
  11178. }
  11179. ]
  11180. }
  11181. },
  11182. "/api/provider/{providerID}": {
  11183. "get": {
  11184. "tags": ["providers"],
  11185. "operationId": "v2.provider.get",
  11186. "parameters": [
  11187. {
  11188. "name": "providerID",
  11189. "in": "path",
  11190. "schema": {
  11191. "type": "string"
  11192. },
  11193. "required": true
  11194. },
  11195. {
  11196. "name": "location",
  11197. "in": "query",
  11198. "schema": {
  11199. "type": "object",
  11200. "properties": {
  11201. "directory": {
  11202. "type": "string"
  11203. },
  11204. "workspace": {
  11205. "type": "string"
  11206. }
  11207. },
  11208. "additionalProperties": false
  11209. },
  11210. "required": false,
  11211. "style": "deepObject",
  11212. "explode": true
  11213. }
  11214. ],
  11215. "security": [],
  11216. "responses": {
  11217. "200": {
  11218. "description": "Success",
  11219. "content": {
  11220. "application/json": {
  11221. "schema": {
  11222. "type": "object",
  11223. "properties": {
  11224. "location": {
  11225. "$ref": "#/components/schemas/LocationInfo"
  11226. },
  11227. "data": {
  11228. "$ref": "#/components/schemas/ProviderV2Info"
  11229. }
  11230. },
  11231. "required": ["location", "data"],
  11232. "additionalProperties": false
  11233. }
  11234. }
  11235. }
  11236. },
  11237. "400": {
  11238. "description": "InvalidRequestError",
  11239. "content": {
  11240. "application/json": {
  11241. "schema": {
  11242. "$ref": "#/components/schemas/InvalidRequestError"
  11243. }
  11244. }
  11245. }
  11246. },
  11247. "401": {
  11248. "description": "UnauthorizedError",
  11249. "content": {
  11250. "application/json": {
  11251. "schema": {
  11252. "$ref": "#/components/schemas/UnauthorizedError"
  11253. }
  11254. }
  11255. }
  11256. },
  11257. "404": {
  11258. "description": "ProviderNotFoundError",
  11259. "content": {
  11260. "application/json": {
  11261. "schema": {
  11262. "$ref": "#/components/schemas/ProviderNotFoundError"
  11263. }
  11264. }
  11265. }
  11266. },
  11267. "503": {
  11268. "description": "ServiceUnavailableError",
  11269. "content": {
  11270. "application/json": {
  11271. "schema": {
  11272. "$ref": "#/components/schemas/ServiceUnavailableError"
  11273. }
  11274. }
  11275. }
  11276. }
  11277. },
  11278. "description": "Retrieve a single AI provider so clients can inspect its availability and endpoint settings.",
  11279. "summary": "Get provider",
  11280. "x-codeSamples": [
  11281. {
  11282. "lang": "js",
  11283. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.get({\n ...\n})"
  11284. }
  11285. ]
  11286. }
  11287. },
  11288. "/api/integration": {
  11289. "get": {
  11290. "tags": ["integrations"],
  11291. "operationId": "v2.integration.list",
  11292. "parameters": [
  11293. {
  11294. "name": "location",
  11295. "in": "query",
  11296. "schema": {
  11297. "type": "object",
  11298. "properties": {
  11299. "directory": {
  11300. "type": "string"
  11301. },
  11302. "workspace": {
  11303. "type": "string"
  11304. }
  11305. },
  11306. "additionalProperties": false
  11307. },
  11308. "required": false,
  11309. "style": "deepObject",
  11310. "explode": true
  11311. }
  11312. ],
  11313. "security": [],
  11314. "responses": {
  11315. "200": {
  11316. "description": "Success",
  11317. "content": {
  11318. "application/json": {
  11319. "schema": {
  11320. "type": "object",
  11321. "properties": {
  11322. "location": {
  11323. "$ref": "#/components/schemas/LocationInfo"
  11324. },
  11325. "data": {
  11326. "type": "array",
  11327. "items": {
  11328. "$ref": "#/components/schemas/IntegrationInfo"
  11329. }
  11330. }
  11331. },
  11332. "required": ["location", "data"],
  11333. "additionalProperties": false
  11334. }
  11335. }
  11336. }
  11337. },
  11338. "400": {
  11339. "description": "InvalidRequestError",
  11340. "content": {
  11341. "application/json": {
  11342. "schema": {
  11343. "$ref": "#/components/schemas/InvalidRequestError"
  11344. }
  11345. }
  11346. }
  11347. },
  11348. "401": {
  11349. "description": "UnauthorizedError",
  11350. "content": {
  11351. "application/json": {
  11352. "schema": {
  11353. "$ref": "#/components/schemas/UnauthorizedError"
  11354. }
  11355. }
  11356. }
  11357. }
  11358. },
  11359. "description": "Retrieve available integrations and their authentication methods.",
  11360. "summary": "List integrations",
  11361. "x-codeSamples": [
  11362. {
  11363. "lang": "js",
  11364. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.list({\n ...\n})"
  11365. }
  11366. ]
  11367. }
  11368. },
  11369. "/api/integration/{integrationID}": {
  11370. "get": {
  11371. "tags": ["integrations"],
  11372. "operationId": "v2.integration.get",
  11373. "parameters": [
  11374. {
  11375. "name": "integrationID",
  11376. "in": "path",
  11377. "schema": {
  11378. "type": "string"
  11379. },
  11380. "required": true
  11381. },
  11382. {
  11383. "name": "location",
  11384. "in": "query",
  11385. "schema": {
  11386. "type": "object",
  11387. "properties": {
  11388. "directory": {
  11389. "type": "string"
  11390. },
  11391. "workspace": {
  11392. "type": "string"
  11393. }
  11394. },
  11395. "additionalProperties": false
  11396. },
  11397. "required": false,
  11398. "style": "deepObject",
  11399. "explode": true
  11400. }
  11401. ],
  11402. "security": [],
  11403. "responses": {
  11404. "200": {
  11405. "description": "Success",
  11406. "content": {
  11407. "application/json": {
  11408. "schema": {
  11409. "type": "object",
  11410. "properties": {
  11411. "location": {
  11412. "$ref": "#/components/schemas/LocationInfo"
  11413. },
  11414. "data": {
  11415. "$ref": "#/components/schemas/IntegrationInfo"
  11416. }
  11417. },
  11418. "required": ["location", "data"],
  11419. "additionalProperties": false
  11420. }
  11421. }
  11422. }
  11423. },
  11424. "400": {
  11425. "description": "InvalidRequestError",
  11426. "content": {
  11427. "application/json": {
  11428. "schema": {
  11429. "$ref": "#/components/schemas/InvalidRequestError"
  11430. }
  11431. }
  11432. }
  11433. },
  11434. "401": {
  11435. "description": "UnauthorizedError",
  11436. "content": {
  11437. "application/json": {
  11438. "schema": {
  11439. "$ref": "#/components/schemas/UnauthorizedError"
  11440. }
  11441. }
  11442. }
  11443. }
  11444. },
  11445. "description": "Retrieve one integration and its authentication methods.",
  11446. "summary": "Get integration",
  11447. "x-codeSamples": [
  11448. {
  11449. "lang": "js",
  11450. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.get({\n ...\n})"
  11451. }
  11452. ]
  11453. }
  11454. },
  11455. "/api/integration/{integrationID}/connect/key": {
  11456. "post": {
  11457. "tags": ["integrations"],
  11458. "operationId": "v2.integration.connect.key",
  11459. "parameters": [
  11460. {
  11461. "name": "integrationID",
  11462. "in": "path",
  11463. "schema": {
  11464. "type": "string"
  11465. },
  11466. "required": true
  11467. },
  11468. {
  11469. "name": "location",
  11470. "in": "query",
  11471. "schema": {
  11472. "type": "object",
  11473. "properties": {
  11474. "directory": {
  11475. "type": "string"
  11476. },
  11477. "workspace": {
  11478. "type": "string"
  11479. }
  11480. },
  11481. "additionalProperties": false
  11482. },
  11483. "required": false,
  11484. "style": "deepObject",
  11485. "explode": true
  11486. }
  11487. ],
  11488. "security": [],
  11489. "responses": {
  11490. "204": {
  11491. "description": "<No Content>"
  11492. },
  11493. "400": {
  11494. "description": "InvalidRequestError",
  11495. "content": {
  11496. "application/json": {
  11497. "schema": {
  11498. "anyOf": [
  11499. {
  11500. "$ref": "#/components/schemas/InvalidRequestError"
  11501. },
  11502. {
  11503. "$ref": "#/components/schemas/InvalidRequestError"
  11504. }
  11505. ]
  11506. }
  11507. }
  11508. }
  11509. },
  11510. "401": {
  11511. "description": "UnauthorizedError",
  11512. "content": {
  11513. "application/json": {
  11514. "schema": {
  11515. "$ref": "#/components/schemas/UnauthorizedError"
  11516. }
  11517. }
  11518. }
  11519. }
  11520. },
  11521. "description": "Run a key authentication method and store the resulting credential.",
  11522. "summary": "Connect with key",
  11523. "requestBody": {
  11524. "content": {
  11525. "application/json": {
  11526. "schema": {
  11527. "type": "object",
  11528. "properties": {
  11529. "key": {
  11530. "type": "string"
  11531. },
  11532. "label": {
  11533. "type": "string"
  11534. }
  11535. },
  11536. "required": ["key"],
  11537. "additionalProperties": false
  11538. }
  11539. }
  11540. },
  11541. "required": true
  11542. },
  11543. "x-codeSamples": [
  11544. {
  11545. "lang": "js",
  11546. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.connect.key({\n ...\n})"
  11547. }
  11548. ]
  11549. }
  11550. },
  11551. "/api/integration/{integrationID}/connect/oauth": {
  11552. "post": {
  11553. "tags": ["integrations"],
  11554. "operationId": "v2.integration.connect.oauth",
  11555. "parameters": [
  11556. {
  11557. "name": "integrationID",
  11558. "in": "path",
  11559. "schema": {
  11560. "type": "string"
  11561. },
  11562. "required": true
  11563. },
  11564. {
  11565. "name": "location",
  11566. "in": "query",
  11567. "schema": {
  11568. "type": "object",
  11569. "properties": {
  11570. "directory": {
  11571. "type": "string"
  11572. },
  11573. "workspace": {
  11574. "type": "string"
  11575. }
  11576. },
  11577. "additionalProperties": false
  11578. },
  11579. "required": false,
  11580. "style": "deepObject",
  11581. "explode": true
  11582. }
  11583. ],
  11584. "security": [],
  11585. "responses": {
  11586. "200": {
  11587. "description": "Success",
  11588. "content": {
  11589. "application/json": {
  11590. "schema": {
  11591. "type": "object",
  11592. "properties": {
  11593. "location": {
  11594. "$ref": "#/components/schemas/LocationInfo"
  11595. },
  11596. "data": {
  11597. "$ref": "#/components/schemas/IntegrationAttempt"
  11598. }
  11599. },
  11600. "required": ["location", "data"],
  11601. "additionalProperties": false
  11602. }
  11603. }
  11604. }
  11605. },
  11606. "400": {
  11607. "description": "InvalidRequestError",
  11608. "content": {
  11609. "application/json": {
  11610. "schema": {
  11611. "anyOf": [
  11612. {
  11613. "$ref": "#/components/schemas/InvalidRequestError"
  11614. },
  11615. {
  11616. "$ref": "#/components/schemas/InvalidRequestError"
  11617. }
  11618. ]
  11619. }
  11620. }
  11621. }
  11622. },
  11623. "401": {
  11624. "description": "UnauthorizedError",
  11625. "content": {
  11626. "application/json": {
  11627. "schema": {
  11628. "$ref": "#/components/schemas/UnauthorizedError"
  11629. }
  11630. }
  11631. }
  11632. }
  11633. },
  11634. "description": "Start an OAuth attempt and return the authorization details.",
  11635. "summary": "Begin OAuth connection",
  11636. "requestBody": {
  11637. "content": {
  11638. "application/json": {
  11639. "schema": {
  11640. "type": "object",
  11641. "properties": {
  11642. "methodID": {
  11643. "type": "string"
  11644. },
  11645. "inputs": {
  11646. "type": "object",
  11647. "additionalProperties": {
  11648. "type": "string"
  11649. }
  11650. },
  11651. "label": {
  11652. "type": "string"
  11653. }
  11654. },
  11655. "required": ["methodID", "inputs"],
  11656. "additionalProperties": false
  11657. }
  11658. }
  11659. },
  11660. "required": true
  11661. },
  11662. "x-codeSamples": [
  11663. {
  11664. "lang": "js",
  11665. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.connect.oauth({\n ...\n})"
  11666. }
  11667. ]
  11668. }
  11669. },
  11670. "/api/integration/attempt/{attemptID}": {
  11671. "get": {
  11672. "tags": ["integrations"],
  11673. "operationId": "v2.integration.attempt.status",
  11674. "parameters": [
  11675. {
  11676. "name": "attemptID",
  11677. "in": "path",
  11678. "schema": {
  11679. "type": "string"
  11680. },
  11681. "required": true
  11682. },
  11683. {
  11684. "name": "location",
  11685. "in": "query",
  11686. "schema": {
  11687. "type": "object",
  11688. "properties": {
  11689. "directory": {
  11690. "type": "string"
  11691. },
  11692. "workspace": {
  11693. "type": "string"
  11694. }
  11695. },
  11696. "additionalProperties": false
  11697. },
  11698. "required": false,
  11699. "style": "deepObject",
  11700. "explode": true
  11701. }
  11702. ],
  11703. "security": [],
  11704. "responses": {
  11705. "200": {
  11706. "description": "Success",
  11707. "content": {
  11708. "application/json": {
  11709. "schema": {
  11710. "type": "object",
  11711. "properties": {
  11712. "location": {
  11713. "$ref": "#/components/schemas/LocationInfo"
  11714. },
  11715. "data": {
  11716. "anyOf": [
  11717. {
  11718. "type": "object",
  11719. "properties": {
  11720. "status": {
  11721. "type": "string",
  11722. "enum": ["pending"]
  11723. },
  11724. "time": {
  11725. "type": "object",
  11726. "properties": {
  11727. "created": {
  11728. "anyOf": [
  11729. {
  11730. "type": "number"
  11731. },
  11732. {
  11733. "type": "string",
  11734. "enum": ["NaN"]
  11735. },
  11736. {
  11737. "type": "string",
  11738. "enum": ["Infinity"]
  11739. },
  11740. {
  11741. "type": "string",
  11742. "enum": ["-Infinity"]
  11743. },
  11744. {
  11745. "type": "string",
  11746. "enum": ["Infinity", "-Infinity", "NaN"]
  11747. }
  11748. ]
  11749. },
  11750. "expires": {
  11751. "anyOf": [
  11752. {
  11753. "type": "number"
  11754. },
  11755. {
  11756. "type": "string",
  11757. "enum": ["NaN"]
  11758. },
  11759. {
  11760. "type": "string",
  11761. "enum": ["Infinity"]
  11762. },
  11763. {
  11764. "type": "string",
  11765. "enum": ["-Infinity"]
  11766. },
  11767. {
  11768. "type": "string",
  11769. "enum": ["Infinity", "-Infinity", "NaN"]
  11770. }
  11771. ]
  11772. }
  11773. },
  11774. "required": ["created", "expires"],
  11775. "additionalProperties": false
  11776. }
  11777. },
  11778. "required": ["status", "time"],
  11779. "additionalProperties": false
  11780. },
  11781. {
  11782. "type": "object",
  11783. "properties": {
  11784. "status": {
  11785. "type": "string",
  11786. "enum": ["complete"]
  11787. },
  11788. "time": {
  11789. "type": "object",
  11790. "properties": {
  11791. "created": {
  11792. "anyOf": [
  11793. {
  11794. "type": "number"
  11795. },
  11796. {
  11797. "type": "string",
  11798. "enum": ["NaN"]
  11799. },
  11800. {
  11801. "type": "string",
  11802. "enum": ["Infinity"]
  11803. },
  11804. {
  11805. "type": "string",
  11806. "enum": ["-Infinity"]
  11807. },
  11808. {
  11809. "type": "string",
  11810. "enum": ["Infinity", "-Infinity", "NaN"]
  11811. }
  11812. ]
  11813. },
  11814. "expires": {
  11815. "anyOf": [
  11816. {
  11817. "type": "number"
  11818. },
  11819. {
  11820. "type": "string",
  11821. "enum": ["NaN"]
  11822. },
  11823. {
  11824. "type": "string",
  11825. "enum": ["Infinity"]
  11826. },
  11827. {
  11828. "type": "string",
  11829. "enum": ["-Infinity"]
  11830. },
  11831. {
  11832. "type": "string",
  11833. "enum": ["Infinity", "-Infinity", "NaN"]
  11834. }
  11835. ]
  11836. }
  11837. },
  11838. "required": ["created", "expires"],
  11839. "additionalProperties": false
  11840. }
  11841. },
  11842. "required": ["status", "time"],
  11843. "additionalProperties": false
  11844. },
  11845. {
  11846. "type": "object",
  11847. "properties": {
  11848. "status": {
  11849. "type": "string",
  11850. "enum": ["failed"]
  11851. },
  11852. "message": {
  11853. "type": "string"
  11854. },
  11855. "time": {
  11856. "type": "object",
  11857. "properties": {
  11858. "created": {
  11859. "anyOf": [
  11860. {
  11861. "type": "number"
  11862. },
  11863. {
  11864. "type": "string",
  11865. "enum": ["NaN"]
  11866. },
  11867. {
  11868. "type": "string",
  11869. "enum": ["Infinity"]
  11870. },
  11871. {
  11872. "type": "string",
  11873. "enum": ["-Infinity"]
  11874. },
  11875. {
  11876. "type": "string",
  11877. "enum": ["Infinity", "-Infinity", "NaN"]
  11878. }
  11879. ]
  11880. },
  11881. "expires": {
  11882. "anyOf": [
  11883. {
  11884. "type": "number"
  11885. },
  11886. {
  11887. "type": "string",
  11888. "enum": ["NaN"]
  11889. },
  11890. {
  11891. "type": "string",
  11892. "enum": ["Infinity"]
  11893. },
  11894. {
  11895. "type": "string",
  11896. "enum": ["-Infinity"]
  11897. },
  11898. {
  11899. "type": "string",
  11900. "enum": ["Infinity", "-Infinity", "NaN"]
  11901. }
  11902. ]
  11903. }
  11904. },
  11905. "required": ["created", "expires"],
  11906. "additionalProperties": false
  11907. }
  11908. },
  11909. "required": ["status", "message", "time"],
  11910. "additionalProperties": false
  11911. },
  11912. {
  11913. "type": "object",
  11914. "properties": {
  11915. "status": {
  11916. "type": "string",
  11917. "enum": ["expired"]
  11918. },
  11919. "time": {
  11920. "type": "object",
  11921. "properties": {
  11922. "created": {
  11923. "anyOf": [
  11924. {
  11925. "type": "number"
  11926. },
  11927. {
  11928. "type": "string",
  11929. "enum": ["NaN"]
  11930. },
  11931. {
  11932. "type": "string",
  11933. "enum": ["Infinity"]
  11934. },
  11935. {
  11936. "type": "string",
  11937. "enum": ["-Infinity"]
  11938. },
  11939. {
  11940. "type": "string",
  11941. "enum": ["Infinity", "-Infinity", "NaN"]
  11942. }
  11943. ]
  11944. },
  11945. "expires": {
  11946. "anyOf": [
  11947. {
  11948. "type": "number"
  11949. },
  11950. {
  11951. "type": "string",
  11952. "enum": ["NaN"]
  11953. },
  11954. {
  11955. "type": "string",
  11956. "enum": ["Infinity"]
  11957. },
  11958. {
  11959. "type": "string",
  11960. "enum": ["-Infinity"]
  11961. },
  11962. {
  11963. "type": "string",
  11964. "enum": ["Infinity", "-Infinity", "NaN"]
  11965. }
  11966. ]
  11967. }
  11968. },
  11969. "required": ["created", "expires"],
  11970. "additionalProperties": false
  11971. }
  11972. },
  11973. "required": ["status", "time"],
  11974. "additionalProperties": false
  11975. }
  11976. ]
  11977. }
  11978. },
  11979. "required": ["location", "data"],
  11980. "additionalProperties": false
  11981. }
  11982. }
  11983. }
  11984. },
  11985. "400": {
  11986. "description": "InvalidRequestError",
  11987. "content": {
  11988. "application/json": {
  11989. "schema": {
  11990. "$ref": "#/components/schemas/InvalidRequestError"
  11991. }
  11992. }
  11993. }
  11994. },
  11995. "401": {
  11996. "description": "UnauthorizedError",
  11997. "content": {
  11998. "application/json": {
  11999. "schema": {
  12000. "$ref": "#/components/schemas/UnauthorizedError"
  12001. }
  12002. }
  12003. }
  12004. }
  12005. },
  12006. "description": "Poll the current status of an OAuth attempt.",
  12007. "summary": "Get OAuth attempt status",
  12008. "x-codeSamples": [
  12009. {
  12010. "lang": "js",
  12011. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.attempt.status({\n ...\n})"
  12012. }
  12013. ]
  12014. },
  12015. "delete": {
  12016. "tags": ["integrations"],
  12017. "operationId": "v2.integration.attempt.cancel",
  12018. "parameters": [
  12019. {
  12020. "name": "attemptID",
  12021. "in": "path",
  12022. "schema": {
  12023. "type": "string"
  12024. },
  12025. "required": true
  12026. },
  12027. {
  12028. "name": "location",
  12029. "in": "query",
  12030. "schema": {
  12031. "type": "object",
  12032. "properties": {
  12033. "directory": {
  12034. "type": "string"
  12035. },
  12036. "workspace": {
  12037. "type": "string"
  12038. }
  12039. },
  12040. "additionalProperties": false
  12041. },
  12042. "required": false,
  12043. "style": "deepObject",
  12044. "explode": true
  12045. }
  12046. ],
  12047. "security": [],
  12048. "responses": {
  12049. "204": {
  12050. "description": "<No Content>"
  12051. },
  12052. "400": {
  12053. "description": "InvalidRequestError",
  12054. "content": {
  12055. "application/json": {
  12056. "schema": {
  12057. "$ref": "#/components/schemas/InvalidRequestError"
  12058. }
  12059. }
  12060. }
  12061. },
  12062. "401": {
  12063. "description": "UnauthorizedError",
  12064. "content": {
  12065. "application/json": {
  12066. "schema": {
  12067. "$ref": "#/components/schemas/UnauthorizedError"
  12068. }
  12069. }
  12070. }
  12071. }
  12072. },
  12073. "description": "Cancel an OAuth attempt and release its resources.",
  12074. "summary": "Cancel OAuth connection",
  12075. "x-codeSamples": [
  12076. {
  12077. "lang": "js",
  12078. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.attempt.cancel({\n ...\n})"
  12079. }
  12080. ]
  12081. }
  12082. },
  12083. "/api/integration/attempt/{attemptID}/complete": {
  12084. "post": {
  12085. "tags": ["integrations"],
  12086. "operationId": "v2.integration.attempt.complete",
  12087. "parameters": [
  12088. {
  12089. "name": "attemptID",
  12090. "in": "path",
  12091. "schema": {
  12092. "type": "string"
  12093. },
  12094. "required": true
  12095. },
  12096. {
  12097. "name": "location",
  12098. "in": "query",
  12099. "schema": {
  12100. "type": "object",
  12101. "properties": {
  12102. "directory": {
  12103. "type": "string"
  12104. },
  12105. "workspace": {
  12106. "type": "string"
  12107. }
  12108. },
  12109. "additionalProperties": false
  12110. },
  12111. "required": false,
  12112. "style": "deepObject",
  12113. "explode": true
  12114. }
  12115. ],
  12116. "security": [],
  12117. "responses": {
  12118. "204": {
  12119. "description": "<No Content>"
  12120. },
  12121. "400": {
  12122. "description": "InvalidRequestError",
  12123. "content": {
  12124. "application/json": {
  12125. "schema": {
  12126. "anyOf": [
  12127. {
  12128. "$ref": "#/components/schemas/InvalidRequestError"
  12129. },
  12130. {
  12131. "$ref": "#/components/schemas/InvalidRequestError"
  12132. }
  12133. ]
  12134. }
  12135. }
  12136. }
  12137. },
  12138. "401": {
  12139. "description": "UnauthorizedError",
  12140. "content": {
  12141. "application/json": {
  12142. "schema": {
  12143. "$ref": "#/components/schemas/UnauthorizedError"
  12144. }
  12145. }
  12146. }
  12147. }
  12148. },
  12149. "description": "Complete a code-based OAuth attempt and store the resulting credential.",
  12150. "summary": "Complete OAuth connection",
  12151. "requestBody": {
  12152. "content": {
  12153. "application/json": {
  12154. "schema": {
  12155. "type": "object",
  12156. "properties": {
  12157. "code": {
  12158. "type": "string"
  12159. }
  12160. },
  12161. "additionalProperties": false
  12162. }
  12163. }
  12164. },
  12165. "required": true
  12166. },
  12167. "x-codeSamples": [
  12168. {
  12169. "lang": "js",
  12170. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.attempt.complete({\n ...\n})"
  12171. }
  12172. ]
  12173. }
  12174. },
  12175. "/api/credential/{credentialID}": {
  12176. "patch": {
  12177. "tags": ["opencode HttpApi"],
  12178. "operationId": "v2.credential.update",
  12179. "parameters": [
  12180. {
  12181. "name": "credentialID",
  12182. "in": "path",
  12183. "schema": {
  12184. "type": "string"
  12185. },
  12186. "required": true
  12187. },
  12188. {
  12189. "name": "location",
  12190. "in": "query",
  12191. "schema": {
  12192. "type": "object",
  12193. "properties": {
  12194. "directory": {
  12195. "type": "string"
  12196. },
  12197. "workspace": {
  12198. "type": "string"
  12199. }
  12200. },
  12201. "additionalProperties": false
  12202. },
  12203. "required": false,
  12204. "style": "deepObject",
  12205. "explode": true
  12206. }
  12207. ],
  12208. "security": [],
  12209. "responses": {
  12210. "204": {
  12211. "description": "<No Content>"
  12212. },
  12213. "400": {
  12214. "description": "InvalidRequestError",
  12215. "content": {
  12216. "application/json": {
  12217. "schema": {
  12218. "$ref": "#/components/schemas/InvalidRequestError"
  12219. }
  12220. }
  12221. }
  12222. },
  12223. "401": {
  12224. "description": "UnauthorizedError",
  12225. "content": {
  12226. "application/json": {
  12227. "schema": {
  12228. "$ref": "#/components/schemas/UnauthorizedError"
  12229. }
  12230. }
  12231. }
  12232. }
  12233. },
  12234. "description": "Update a stored credential label.",
  12235. "summary": "Update credential",
  12236. "requestBody": {
  12237. "content": {
  12238. "application/json": {
  12239. "schema": {
  12240. "type": "object",
  12241. "properties": {
  12242. "label": {
  12243. "type": "string"
  12244. }
  12245. },
  12246. "required": ["label"],
  12247. "additionalProperties": false
  12248. }
  12249. }
  12250. },
  12251. "required": true
  12252. },
  12253. "x-codeSamples": [
  12254. {
  12255. "lang": "js",
  12256. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.credential.update({\n ...\n})"
  12257. }
  12258. ]
  12259. },
  12260. "delete": {
  12261. "tags": ["opencode HttpApi"],
  12262. "operationId": "v2.credential.remove",
  12263. "parameters": [
  12264. {
  12265. "name": "credentialID",
  12266. "in": "path",
  12267. "schema": {
  12268. "type": "string"
  12269. },
  12270. "required": true
  12271. },
  12272. {
  12273. "name": "location",
  12274. "in": "query",
  12275. "schema": {
  12276. "type": "object",
  12277. "properties": {
  12278. "directory": {
  12279. "type": "string"
  12280. },
  12281. "workspace": {
  12282. "type": "string"
  12283. }
  12284. },
  12285. "additionalProperties": false
  12286. },
  12287. "required": false,
  12288. "style": "deepObject",
  12289. "explode": true
  12290. }
  12291. ],
  12292. "security": [],
  12293. "responses": {
  12294. "204": {
  12295. "description": "<No Content>"
  12296. },
  12297. "400": {
  12298. "description": "InvalidRequestError",
  12299. "content": {
  12300. "application/json": {
  12301. "schema": {
  12302. "$ref": "#/components/schemas/InvalidRequestError"
  12303. }
  12304. }
  12305. }
  12306. },
  12307. "401": {
  12308. "description": "UnauthorizedError",
  12309. "content": {
  12310. "application/json": {
  12311. "schema": {
  12312. "$ref": "#/components/schemas/UnauthorizedError"
  12313. }
  12314. }
  12315. }
  12316. }
  12317. },
  12318. "description": "Remove a stored integration credential.",
  12319. "summary": "Remove credential",
  12320. "x-codeSamples": [
  12321. {
  12322. "lang": "js",
  12323. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.credential.remove({\n ...\n})"
  12324. }
  12325. ]
  12326. }
  12327. },
  12328. "/api/permission/request": {
  12329. "get": {
  12330. "tags": ["permissions"],
  12331. "operationId": "v2.permission.request.list",
  12332. "parameters": [
  12333. {
  12334. "name": "location",
  12335. "in": "query",
  12336. "schema": {
  12337. "type": "object",
  12338. "properties": {
  12339. "directory": {
  12340. "type": "string"
  12341. },
  12342. "workspace": {
  12343. "type": "string"
  12344. }
  12345. },
  12346. "additionalProperties": false
  12347. },
  12348. "required": false,
  12349. "style": "deepObject",
  12350. "explode": true
  12351. }
  12352. ],
  12353. "security": [],
  12354. "responses": {
  12355. "200": {
  12356. "description": "Success",
  12357. "content": {
  12358. "application/json": {
  12359. "schema": {
  12360. "type": "object",
  12361. "properties": {
  12362. "location": {
  12363. "$ref": "#/components/schemas/LocationInfo"
  12364. },
  12365. "data": {
  12366. "type": "array",
  12367. "items": {
  12368. "$ref": "#/components/schemas/PermissionV2Request"
  12369. }
  12370. }
  12371. },
  12372. "required": ["location", "data"],
  12373. "additionalProperties": false
  12374. }
  12375. }
  12376. }
  12377. },
  12378. "400": {
  12379. "description": "InvalidRequestError",
  12380. "content": {
  12381. "application/json": {
  12382. "schema": {
  12383. "$ref": "#/components/schemas/InvalidRequestError"
  12384. }
  12385. }
  12386. }
  12387. },
  12388. "401": {
  12389. "description": "UnauthorizedError",
  12390. "content": {
  12391. "application/json": {
  12392. "schema": {
  12393. "$ref": "#/components/schemas/UnauthorizedError"
  12394. }
  12395. }
  12396. }
  12397. }
  12398. },
  12399. "description": "Retrieve pending permission requests for a location.",
  12400. "summary": "List pending permission requests",
  12401. "x-codeSamples": [
  12402. {
  12403. "lang": "js",
  12404. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.request.list({\n ...\n})"
  12405. }
  12406. ]
  12407. }
  12408. },
  12409. "/api/permission/saved": {
  12410. "get": {
  12411. "tags": ["permissions"],
  12412. "operationId": "v2.permission.saved.list",
  12413. "parameters": [
  12414. {
  12415. "name": "projectID",
  12416. "in": "query",
  12417. "schema": {
  12418. "type": "string"
  12419. },
  12420. "required": false
  12421. }
  12422. ],
  12423. "security": [],
  12424. "responses": {
  12425. "200": {
  12426. "description": "Success",
  12427. "content": {
  12428. "application/json": {
  12429. "schema": {
  12430. "type": "object",
  12431. "properties": {
  12432. "data": {
  12433. "type": "array",
  12434. "items": {
  12435. "$ref": "#/components/schemas/PermissionSavedInfo"
  12436. }
  12437. }
  12438. },
  12439. "required": ["data"],
  12440. "additionalProperties": false
  12441. }
  12442. }
  12443. }
  12444. },
  12445. "400": {
  12446. "description": "InvalidRequestError",
  12447. "content": {
  12448. "application/json": {
  12449. "schema": {
  12450. "$ref": "#/components/schemas/InvalidRequestError"
  12451. }
  12452. }
  12453. }
  12454. },
  12455. "401": {
  12456. "description": "UnauthorizedError",
  12457. "content": {
  12458. "application/json": {
  12459. "schema": {
  12460. "$ref": "#/components/schemas/UnauthorizedError"
  12461. }
  12462. }
  12463. }
  12464. }
  12465. },
  12466. "description": "Retrieve saved permissions, optionally filtered by project.",
  12467. "summary": "List saved permissions",
  12468. "x-codeSamples": [
  12469. {
  12470. "lang": "js",
  12471. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.list({\n ...\n})"
  12472. }
  12473. ]
  12474. }
  12475. },
  12476. "/api/permission/saved/{id}": {
  12477. "delete": {
  12478. "tags": ["permissions"],
  12479. "operationId": "v2.permission.saved.remove",
  12480. "parameters": [
  12481. {
  12482. "name": "id",
  12483. "in": "path",
  12484. "schema": {
  12485. "type": "string"
  12486. },
  12487. "required": true
  12488. }
  12489. ],
  12490. "security": [],
  12491. "responses": {
  12492. "204": {
  12493. "description": "<No Content>"
  12494. },
  12495. "400": {
  12496. "description": "InvalidRequestError",
  12497. "content": {
  12498. "application/json": {
  12499. "schema": {
  12500. "$ref": "#/components/schemas/InvalidRequestError"
  12501. }
  12502. }
  12503. }
  12504. },
  12505. "401": {
  12506. "description": "UnauthorizedError",
  12507. "content": {
  12508. "application/json": {
  12509. "schema": {
  12510. "$ref": "#/components/schemas/UnauthorizedError"
  12511. }
  12512. }
  12513. }
  12514. }
  12515. },
  12516. "description": "Remove a saved permission by ID.",
  12517. "summary": "Remove saved permission",
  12518. "x-codeSamples": [
  12519. {
  12520. "lang": "js",
  12521. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.remove({\n ...\n})"
  12522. }
  12523. ]
  12524. }
  12525. },
  12526. "/api/session/{sessionID}/permission": {
  12527. "get": {
  12528. "tags": ["permissions"],
  12529. "operationId": "v2.session.permission.list",
  12530. "parameters": [
  12531. {
  12532. "name": "sessionID",
  12533. "in": "path",
  12534. "schema": {
  12535. "type": "string",
  12536. "pattern": "^ses"
  12537. },
  12538. "required": true
  12539. }
  12540. ],
  12541. "security": [],
  12542. "responses": {
  12543. "200": {
  12544. "description": "Success",
  12545. "content": {
  12546. "application/json": {
  12547. "schema": {
  12548. "type": "object",
  12549. "properties": {
  12550. "data": {
  12551. "type": "array",
  12552. "items": {
  12553. "$ref": "#/components/schemas/PermissionV2Request"
  12554. }
  12555. }
  12556. },
  12557. "required": ["data"],
  12558. "additionalProperties": false
  12559. }
  12560. }
  12561. }
  12562. },
  12563. "400": {
  12564. "description": "InvalidRequestError",
  12565. "content": {
  12566. "application/json": {
  12567. "schema": {
  12568. "$ref": "#/components/schemas/InvalidRequestError"
  12569. }
  12570. }
  12571. }
  12572. },
  12573. "401": {
  12574. "description": "UnauthorizedError",
  12575. "content": {
  12576. "application/json": {
  12577. "schema": {
  12578. "$ref": "#/components/schemas/UnauthorizedError"
  12579. }
  12580. }
  12581. }
  12582. },
  12583. "404": {
  12584. "description": "SessionNotFoundError",
  12585. "content": {
  12586. "application/json": {
  12587. "schema": {
  12588. "anyOf": [
  12589. {
  12590. "$ref": "#/components/schemas/SessionNotFoundError"
  12591. },
  12592. {
  12593. "$ref": "#/components/schemas/SessionNotFoundError"
  12594. }
  12595. ]
  12596. }
  12597. }
  12598. }
  12599. }
  12600. },
  12601. "description": "Retrieve pending permission requests owned by a session.",
  12602. "summary": "List session permission requests",
  12603. "x-codeSamples": [
  12604. {
  12605. "lang": "js",
  12606. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.list({\n ...\n})"
  12607. }
  12608. ]
  12609. }
  12610. },
  12611. "/api/session/{sessionID}/permission/{requestID}/reply": {
  12612. "post": {
  12613. "tags": ["permissions"],
  12614. "operationId": "v2.session.permission.reply",
  12615. "parameters": [
  12616. {
  12617. "name": "sessionID",
  12618. "in": "path",
  12619. "schema": {
  12620. "type": "string",
  12621. "pattern": "^ses"
  12622. },
  12623. "required": true
  12624. },
  12625. {
  12626. "name": "requestID",
  12627. "in": "path",
  12628. "schema": {
  12629. "type": "string",
  12630. "pattern": "^per"
  12631. },
  12632. "required": true
  12633. }
  12634. ],
  12635. "security": [],
  12636. "responses": {
  12637. "204": {
  12638. "description": "<No Content>"
  12639. },
  12640. "400": {
  12641. "description": "InvalidRequestError",
  12642. "content": {
  12643. "application/json": {
  12644. "schema": {
  12645. "$ref": "#/components/schemas/InvalidRequestError"
  12646. }
  12647. }
  12648. }
  12649. },
  12650. "401": {
  12651. "description": "UnauthorizedError",
  12652. "content": {
  12653. "application/json": {
  12654. "schema": {
  12655. "$ref": "#/components/schemas/UnauthorizedError"
  12656. }
  12657. }
  12658. }
  12659. },
  12660. "404": {
  12661. "description": "SessionNotFoundError | PermissionNotFoundError",
  12662. "content": {
  12663. "application/json": {
  12664. "schema": {
  12665. "anyOf": [
  12666. {
  12667. "$ref": "#/components/schemas/PermissionNotFoundError"
  12668. },
  12669. {
  12670. "$ref": "#/components/schemas/SessionNotFoundError"
  12671. },
  12672. {
  12673. "$ref": "#/components/schemas/SessionNotFoundError"
  12674. }
  12675. ]
  12676. }
  12677. }
  12678. }
  12679. }
  12680. },
  12681. "description": "Respond to a pending permission request owned by a session.",
  12682. "summary": "Reply to pending permission request",
  12683. "requestBody": {
  12684. "content": {
  12685. "application/json": {
  12686. "schema": {
  12687. "type": "object",
  12688. "properties": {
  12689. "reply": {
  12690. "$ref": "#/components/schemas/PermissionV2Reply"
  12691. },
  12692. "message": {
  12693. "type": "string"
  12694. }
  12695. },
  12696. "required": ["reply"],
  12697. "additionalProperties": false
  12698. }
  12699. }
  12700. },
  12701. "required": true
  12702. },
  12703. "x-codeSamples": [
  12704. {
  12705. "lang": "js",
  12706. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.reply({\n ...\n})"
  12707. }
  12708. ]
  12709. }
  12710. },
  12711. "/api/fs/read/*": {
  12712. "get": {
  12713. "tags": ["filesystem"],
  12714. "operationId": "v2.fs.read",
  12715. "parameters": [
  12716. {
  12717. "name": "location",
  12718. "in": "query",
  12719. "schema": {
  12720. "type": "object",
  12721. "properties": {
  12722. "directory": {
  12723. "type": "string"
  12724. },
  12725. "workspace": {
  12726. "type": "string"
  12727. }
  12728. },
  12729. "additionalProperties": false
  12730. },
  12731. "required": false,
  12732. "style": "deepObject",
  12733. "explode": true
  12734. }
  12735. ],
  12736. "security": [],
  12737. "responses": {
  12738. "200": {
  12739. "description": "Success",
  12740. "content": {
  12741. "application/octet-stream": {
  12742. "schema": {
  12743. "type": "string",
  12744. "format": "binary"
  12745. }
  12746. }
  12747. }
  12748. },
  12749. "400": {
  12750. "description": "InvalidRequestError",
  12751. "content": {
  12752. "application/json": {
  12753. "schema": {
  12754. "$ref": "#/components/schemas/InvalidRequestError"
  12755. }
  12756. }
  12757. }
  12758. },
  12759. "401": {
  12760. "description": "UnauthorizedError",
  12761. "content": {
  12762. "application/json": {
  12763. "schema": {
  12764. "$ref": "#/components/schemas/UnauthorizedError"
  12765. }
  12766. }
  12767. }
  12768. }
  12769. },
  12770. "description": "Serve one file relative to the requested location.",
  12771. "summary": "Read file",
  12772. "x-codeSamples": [
  12773. {
  12774. "lang": "js",
  12775. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.read({\n ...\n})"
  12776. }
  12777. ]
  12778. }
  12779. },
  12780. "/api/fs/list": {
  12781. "get": {
  12782. "tags": ["filesystem"],
  12783. "operationId": "v2.fs.list",
  12784. "parameters": [
  12785. {
  12786. "name": "location",
  12787. "in": "query",
  12788. "schema": {
  12789. "type": "object",
  12790. "properties": {
  12791. "directory": {
  12792. "type": "string"
  12793. },
  12794. "workspace": {
  12795. "type": "string"
  12796. }
  12797. },
  12798. "additionalProperties": false
  12799. },
  12800. "required": false,
  12801. "style": "deepObject",
  12802. "explode": true
  12803. },
  12804. {
  12805. "name": "path",
  12806. "in": "query",
  12807. "schema": {
  12808. "type": "string"
  12809. },
  12810. "required": false
  12811. }
  12812. ],
  12813. "security": [],
  12814. "responses": {
  12815. "200": {
  12816. "description": "Success",
  12817. "content": {
  12818. "application/json": {
  12819. "schema": {
  12820. "type": "object",
  12821. "properties": {
  12822. "location": {
  12823. "$ref": "#/components/schemas/LocationInfo"
  12824. },
  12825. "data": {
  12826. "type": "array",
  12827. "items": {
  12828. "$ref": "#/components/schemas/FileSystemEntry"
  12829. }
  12830. }
  12831. },
  12832. "required": ["location", "data"],
  12833. "additionalProperties": false
  12834. }
  12835. }
  12836. }
  12837. },
  12838. "400": {
  12839. "description": "InvalidRequestError",
  12840. "content": {
  12841. "application/json": {
  12842. "schema": {
  12843. "$ref": "#/components/schemas/InvalidRequestError"
  12844. }
  12845. }
  12846. }
  12847. },
  12848. "401": {
  12849. "description": "UnauthorizedError",
  12850. "content": {
  12851. "application/json": {
  12852. "schema": {
  12853. "$ref": "#/components/schemas/UnauthorizedError"
  12854. }
  12855. }
  12856. }
  12857. }
  12858. },
  12859. "description": "List direct children of one directory relative to the requested location.",
  12860. "summary": "List directory",
  12861. "x-codeSamples": [
  12862. {
  12863. "lang": "js",
  12864. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.list({\n ...\n})"
  12865. }
  12866. ]
  12867. }
  12868. },
  12869. "/api/fs/find": {
  12870. "get": {
  12871. "tags": ["filesystem"],
  12872. "operationId": "v2.fs.find",
  12873. "parameters": [
  12874. {
  12875. "name": "location",
  12876. "in": "query",
  12877. "schema": {
  12878. "type": "object",
  12879. "properties": {
  12880. "directory": {
  12881. "type": "string"
  12882. },
  12883. "workspace": {
  12884. "type": "string"
  12885. }
  12886. },
  12887. "additionalProperties": false
  12888. },
  12889. "required": false,
  12890. "style": "deepObject",
  12891. "explode": true
  12892. },
  12893. {
  12894. "name": "query",
  12895. "in": "query",
  12896. "schema": {
  12897. "type": "string"
  12898. },
  12899. "required": true
  12900. },
  12901. {
  12902. "name": "type",
  12903. "in": "query",
  12904. "schema": {
  12905. "type": "string",
  12906. "enum": ["file", "directory"]
  12907. },
  12908. "required": false
  12909. },
  12910. {
  12911. "name": "limit",
  12912. "in": "query",
  12913. "schema": {
  12914. "type": "string"
  12915. },
  12916. "required": false
  12917. }
  12918. ],
  12919. "security": [],
  12920. "responses": {
  12921. "200": {
  12922. "description": "Success",
  12923. "content": {
  12924. "application/json": {
  12925. "schema": {
  12926. "type": "object",
  12927. "properties": {
  12928. "location": {
  12929. "$ref": "#/components/schemas/LocationInfo"
  12930. },
  12931. "data": {
  12932. "type": "array",
  12933. "items": {
  12934. "$ref": "#/components/schemas/FileSystemEntry"
  12935. }
  12936. }
  12937. },
  12938. "required": ["location", "data"],
  12939. "additionalProperties": false
  12940. }
  12941. }
  12942. }
  12943. },
  12944. "400": {
  12945. "description": "InvalidRequestError",
  12946. "content": {
  12947. "application/json": {
  12948. "schema": {
  12949. "$ref": "#/components/schemas/InvalidRequestError"
  12950. }
  12951. }
  12952. }
  12953. },
  12954. "401": {
  12955. "description": "UnauthorizedError",
  12956. "content": {
  12957. "application/json": {
  12958. "schema": {
  12959. "$ref": "#/components/schemas/UnauthorizedError"
  12960. }
  12961. }
  12962. }
  12963. }
  12964. },
  12965. "description": "Find recursively ranked filesystem entries relative to the requested location.",
  12966. "summary": "Find files",
  12967. "x-codeSamples": [
  12968. {
  12969. "lang": "js",
  12970. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.find({\n ...\n})"
  12971. }
  12972. ]
  12973. }
  12974. },
  12975. "/api/command": {
  12976. "get": {
  12977. "tags": ["commands"],
  12978. "operationId": "v2.command.list",
  12979. "parameters": [
  12980. {
  12981. "name": "location",
  12982. "in": "query",
  12983. "schema": {
  12984. "type": "object",
  12985. "properties": {
  12986. "directory": {
  12987. "type": "string"
  12988. },
  12989. "workspace": {
  12990. "type": "string"
  12991. }
  12992. },
  12993. "additionalProperties": false
  12994. },
  12995. "required": false,
  12996. "style": "deepObject",
  12997. "explode": true
  12998. }
  12999. ],
  13000. "security": [],
  13001. "responses": {
  13002. "200": {
  13003. "description": "Success",
  13004. "content": {
  13005. "application/json": {
  13006. "schema": {
  13007. "type": "object",
  13008. "properties": {
  13009. "location": {
  13010. "$ref": "#/components/schemas/LocationInfo"
  13011. },
  13012. "data": {
  13013. "type": "array",
  13014. "items": {
  13015. "$ref": "#/components/schemas/CommandV2Info"
  13016. }
  13017. }
  13018. },
  13019. "required": ["location", "data"],
  13020. "additionalProperties": false
  13021. }
  13022. }
  13023. }
  13024. },
  13025. "400": {
  13026. "description": "InvalidRequestError",
  13027. "content": {
  13028. "application/json": {
  13029. "schema": {
  13030. "$ref": "#/components/schemas/InvalidRequestError"
  13031. }
  13032. }
  13033. }
  13034. },
  13035. "401": {
  13036. "description": "UnauthorizedError",
  13037. "content": {
  13038. "application/json": {
  13039. "schema": {
  13040. "$ref": "#/components/schemas/UnauthorizedError"
  13041. }
  13042. }
  13043. }
  13044. }
  13045. },
  13046. "description": "Retrieve currently registered commands.",
  13047. "summary": "List commands",
  13048. "x-codeSamples": [
  13049. {
  13050. "lang": "js",
  13051. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.command.list({\n ...\n})"
  13052. }
  13053. ]
  13054. }
  13055. },
  13056. "/api/skill": {
  13057. "get": {
  13058. "tags": ["skills"],
  13059. "operationId": "v2.skill.list",
  13060. "parameters": [
  13061. {
  13062. "name": "location",
  13063. "in": "query",
  13064. "schema": {
  13065. "type": "object",
  13066. "properties": {
  13067. "directory": {
  13068. "type": "string"
  13069. },
  13070. "workspace": {
  13071. "type": "string"
  13072. }
  13073. },
  13074. "additionalProperties": false
  13075. },
  13076. "required": false,
  13077. "style": "deepObject",
  13078. "explode": true
  13079. }
  13080. ],
  13081. "security": [],
  13082. "responses": {
  13083. "200": {
  13084. "description": "Success",
  13085. "content": {
  13086. "application/json": {
  13087. "schema": {
  13088. "type": "object",
  13089. "properties": {
  13090. "location": {
  13091. "$ref": "#/components/schemas/LocationInfo"
  13092. },
  13093. "data": {
  13094. "type": "array",
  13095. "items": {
  13096. "$ref": "#/components/schemas/SkillV2Info"
  13097. }
  13098. }
  13099. },
  13100. "required": ["location", "data"],
  13101. "additionalProperties": false
  13102. }
  13103. }
  13104. }
  13105. },
  13106. "400": {
  13107. "description": "InvalidRequestError",
  13108. "content": {
  13109. "application/json": {
  13110. "schema": {
  13111. "$ref": "#/components/schemas/InvalidRequestError"
  13112. }
  13113. }
  13114. }
  13115. },
  13116. "401": {
  13117. "description": "UnauthorizedError",
  13118. "content": {
  13119. "application/json": {
  13120. "schema": {
  13121. "$ref": "#/components/schemas/UnauthorizedError"
  13122. }
  13123. }
  13124. }
  13125. }
  13126. },
  13127. "description": "Retrieve currently registered skills.",
  13128. "summary": "List skills",
  13129. "x-codeSamples": [
  13130. {
  13131. "lang": "js",
  13132. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.skill.list({\n ...\n})"
  13133. }
  13134. ]
  13135. }
  13136. },
  13137. "/api/event": {
  13138. "get": {
  13139. "tags": ["events"],
  13140. "operationId": "v2.event.subscribe",
  13141. "parameters": [],
  13142. "security": [],
  13143. "responses": {
  13144. "200": {
  13145. "description": "Event stream",
  13146. "content": {
  13147. "text/event-stream": {
  13148. "schema": {
  13149. "$ref": "#/components/schemas/V2Event"
  13150. }
  13151. }
  13152. }
  13153. },
  13154. "400": {
  13155. "description": "InvalidRequestError",
  13156. "content": {
  13157. "application/json": {
  13158. "schema": {
  13159. "$ref": "#/components/schemas/InvalidRequestError"
  13160. }
  13161. }
  13162. }
  13163. },
  13164. "401": {
  13165. "description": "UnauthorizedError",
  13166. "content": {
  13167. "application/json": {
  13168. "schema": {
  13169. "$ref": "#/components/schemas/UnauthorizedError"
  13170. }
  13171. }
  13172. }
  13173. }
  13174. },
  13175. "description": "Subscribe to native event payloads for the server.",
  13176. "summary": "Subscribe to events",
  13177. "x-codeSamples": [
  13178. {
  13179. "lang": "js",
  13180. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.event.subscribe({\n ...\n})"
  13181. }
  13182. ]
  13183. }
  13184. },
  13185. "/api/pty": {
  13186. "get": {
  13187. "tags": ["pty"],
  13188. "operationId": "v2.pty.list",
  13189. "parameters": [
  13190. {
  13191. "name": "location",
  13192. "in": "query",
  13193. "schema": {
  13194. "type": "object",
  13195. "properties": {
  13196. "directory": {
  13197. "type": "string"
  13198. },
  13199. "workspace": {
  13200. "type": "string"
  13201. }
  13202. },
  13203. "additionalProperties": false
  13204. },
  13205. "required": false,
  13206. "style": "deepObject",
  13207. "explode": true
  13208. }
  13209. ],
  13210. "security": [],
  13211. "responses": {
  13212. "200": {
  13213. "description": "Success",
  13214. "content": {
  13215. "application/json": {
  13216. "schema": {
  13217. "type": "object",
  13218. "properties": {
  13219. "location": {
  13220. "$ref": "#/components/schemas/LocationInfo"
  13221. },
  13222. "data": {
  13223. "type": "array",
  13224. "items": {
  13225. "$ref": "#/components/schemas/Pty"
  13226. }
  13227. }
  13228. },
  13229. "required": ["location", "data"],
  13230. "additionalProperties": false
  13231. }
  13232. }
  13233. }
  13234. },
  13235. "400": {
  13236. "description": "InvalidRequestError",
  13237. "content": {
  13238. "application/json": {
  13239. "schema": {
  13240. "$ref": "#/components/schemas/InvalidRequestError"
  13241. }
  13242. }
  13243. }
  13244. },
  13245. "401": {
  13246. "description": "UnauthorizedError",
  13247. "content": {
  13248. "application/json": {
  13249. "schema": {
  13250. "$ref": "#/components/schemas/UnauthorizedError"
  13251. }
  13252. }
  13253. }
  13254. }
  13255. },
  13256. "description": "List PTY sessions for a location, including exited sessions retained until removal.",
  13257. "summary": "List PTY sessions",
  13258. "x-codeSamples": [
  13259. {
  13260. "lang": "js",
  13261. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.list({\n ...\n})"
  13262. }
  13263. ]
  13264. },
  13265. "post": {
  13266. "tags": ["pty"],
  13267. "operationId": "v2.pty.create",
  13268. "parameters": [
  13269. {
  13270. "name": "location",
  13271. "in": "query",
  13272. "schema": {
  13273. "type": "object",
  13274. "properties": {
  13275. "directory": {
  13276. "type": "string"
  13277. },
  13278. "workspace": {
  13279. "type": "string"
  13280. }
  13281. },
  13282. "additionalProperties": false
  13283. },
  13284. "required": false,
  13285. "style": "deepObject",
  13286. "explode": true
  13287. }
  13288. ],
  13289. "security": [],
  13290. "responses": {
  13291. "200": {
  13292. "description": "Success",
  13293. "content": {
  13294. "application/json": {
  13295. "schema": {
  13296. "type": "object",
  13297. "properties": {
  13298. "location": {
  13299. "$ref": "#/components/schemas/LocationInfo"
  13300. },
  13301. "data": {
  13302. "$ref": "#/components/schemas/Pty"
  13303. }
  13304. },
  13305. "required": ["location", "data"],
  13306. "additionalProperties": false
  13307. }
  13308. }
  13309. }
  13310. },
  13311. "400": {
  13312. "description": "InvalidRequestError",
  13313. "content": {
  13314. "application/json": {
  13315. "schema": {
  13316. "$ref": "#/components/schemas/InvalidRequestError"
  13317. }
  13318. }
  13319. }
  13320. },
  13321. "401": {
  13322. "description": "UnauthorizedError",
  13323. "content": {
  13324. "application/json": {
  13325. "schema": {
  13326. "$ref": "#/components/schemas/UnauthorizedError"
  13327. }
  13328. }
  13329. }
  13330. }
  13331. },
  13332. "description": "Create a pseudo-terminal session for a location.",
  13333. "summary": "Create PTY session",
  13334. "requestBody": {
  13335. "content": {
  13336. "application/json": {
  13337. "schema": {
  13338. "type": "object",
  13339. "properties": {
  13340. "command": {
  13341. "type": "string"
  13342. },
  13343. "args": {
  13344. "type": "array",
  13345. "items": {
  13346. "type": "string"
  13347. }
  13348. },
  13349. "cwd": {
  13350. "type": "string"
  13351. },
  13352. "title": {
  13353. "type": "string"
  13354. },
  13355. "env": {
  13356. "type": "object",
  13357. "additionalProperties": {
  13358. "type": "string"
  13359. }
  13360. }
  13361. },
  13362. "additionalProperties": false
  13363. }
  13364. }
  13365. },
  13366. "required": true
  13367. },
  13368. "x-codeSamples": [
  13369. {
  13370. "lang": "js",
  13371. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.create({\n ...\n})"
  13372. }
  13373. ]
  13374. }
  13375. },
  13376. "/api/pty/{ptyID}": {
  13377. "get": {
  13378. "tags": ["pty"],
  13379. "operationId": "v2.pty.get",
  13380. "parameters": [
  13381. {
  13382. "name": "ptyID",
  13383. "in": "path",
  13384. "schema": {
  13385. "type": "string",
  13386. "pattern": "^pty"
  13387. },
  13388. "required": true
  13389. },
  13390. {
  13391. "name": "location",
  13392. "in": "query",
  13393. "schema": {
  13394. "type": "object",
  13395. "properties": {
  13396. "directory": {
  13397. "type": "string"
  13398. },
  13399. "workspace": {
  13400. "type": "string"
  13401. }
  13402. },
  13403. "additionalProperties": false
  13404. },
  13405. "required": false,
  13406. "style": "deepObject",
  13407. "explode": true
  13408. }
  13409. ],
  13410. "security": [],
  13411. "responses": {
  13412. "200": {
  13413. "description": "Success",
  13414. "content": {
  13415. "application/json": {
  13416. "schema": {
  13417. "type": "object",
  13418. "properties": {
  13419. "location": {
  13420. "$ref": "#/components/schemas/LocationInfo"
  13421. },
  13422. "data": {
  13423. "$ref": "#/components/schemas/Pty"
  13424. }
  13425. },
  13426. "required": ["location", "data"],
  13427. "additionalProperties": false
  13428. }
  13429. }
  13430. }
  13431. },
  13432. "400": {
  13433. "description": "InvalidRequestError",
  13434. "content": {
  13435. "application/json": {
  13436. "schema": {
  13437. "$ref": "#/components/schemas/InvalidRequestError"
  13438. }
  13439. }
  13440. }
  13441. },
  13442. "401": {
  13443. "description": "UnauthorizedError",
  13444. "content": {
  13445. "application/json": {
  13446. "schema": {
  13447. "$ref": "#/components/schemas/UnauthorizedError"
  13448. }
  13449. }
  13450. }
  13451. },
  13452. "404": {
  13453. "description": "PtyNotFoundError",
  13454. "content": {
  13455. "application/json": {
  13456. "schema": {
  13457. "$ref": "#/components/schemas/PtyNotFoundError"
  13458. }
  13459. }
  13460. }
  13461. }
  13462. },
  13463. "description": "Get one PTY session, including its exit code once exited.",
  13464. "summary": "Get PTY session",
  13465. "x-codeSamples": [
  13466. {
  13467. "lang": "js",
  13468. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.get({\n ...\n})"
  13469. }
  13470. ]
  13471. },
  13472. "put": {
  13473. "tags": ["pty"],
  13474. "operationId": "v2.pty.update",
  13475. "parameters": [
  13476. {
  13477. "name": "ptyID",
  13478. "in": "path",
  13479. "schema": {
  13480. "type": "string",
  13481. "pattern": "^pty"
  13482. },
  13483. "required": true
  13484. },
  13485. {
  13486. "name": "location",
  13487. "in": "query",
  13488. "schema": {
  13489. "type": "object",
  13490. "properties": {
  13491. "directory": {
  13492. "type": "string"
  13493. },
  13494. "workspace": {
  13495. "type": "string"
  13496. }
  13497. },
  13498. "additionalProperties": false
  13499. },
  13500. "required": false,
  13501. "style": "deepObject",
  13502. "explode": true
  13503. }
  13504. ],
  13505. "security": [],
  13506. "responses": {
  13507. "200": {
  13508. "description": "Success",
  13509. "content": {
  13510. "application/json": {
  13511. "schema": {
  13512. "type": "object",
  13513. "properties": {
  13514. "location": {
  13515. "$ref": "#/components/schemas/LocationInfo"
  13516. },
  13517. "data": {
  13518. "$ref": "#/components/schemas/Pty"
  13519. }
  13520. },
  13521. "required": ["location", "data"],
  13522. "additionalProperties": false
  13523. }
  13524. }
  13525. }
  13526. },
  13527. "400": {
  13528. "description": "InvalidRequestError",
  13529. "content": {
  13530. "application/json": {
  13531. "schema": {
  13532. "$ref": "#/components/schemas/InvalidRequestError"
  13533. }
  13534. }
  13535. }
  13536. },
  13537. "401": {
  13538. "description": "UnauthorizedError",
  13539. "content": {
  13540. "application/json": {
  13541. "schema": {
  13542. "$ref": "#/components/schemas/UnauthorizedError"
  13543. }
  13544. }
  13545. }
  13546. },
  13547. "404": {
  13548. "description": "PtyNotFoundError",
  13549. "content": {
  13550. "application/json": {
  13551. "schema": {
  13552. "$ref": "#/components/schemas/PtyNotFoundError"
  13553. }
  13554. }
  13555. }
  13556. }
  13557. },
  13558. "description": "Update the title or viewport size of one PTY session.",
  13559. "summary": "Update PTY session",
  13560. "requestBody": {
  13561. "content": {
  13562. "application/json": {
  13563. "schema": {
  13564. "type": "object",
  13565. "properties": {
  13566. "title": {
  13567. "type": "string"
  13568. },
  13569. "size": {
  13570. "type": "object",
  13571. "properties": {
  13572. "rows": {
  13573. "type": "integer",
  13574. "exclusiveMinimum": 0
  13575. },
  13576. "cols": {
  13577. "type": "integer",
  13578. "exclusiveMinimum": 0
  13579. }
  13580. },
  13581. "required": ["rows", "cols"],
  13582. "additionalProperties": false
  13583. }
  13584. },
  13585. "additionalProperties": false
  13586. }
  13587. }
  13588. },
  13589. "required": true
  13590. },
  13591. "x-codeSamples": [
  13592. {
  13593. "lang": "js",
  13594. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.update({\n ...\n})"
  13595. }
  13596. ]
  13597. },
  13598. "delete": {
  13599. "tags": ["pty"],
  13600. "operationId": "v2.pty.remove",
  13601. "parameters": [
  13602. {
  13603. "name": "ptyID",
  13604. "in": "path",
  13605. "schema": {
  13606. "type": "string",
  13607. "pattern": "^pty"
  13608. },
  13609. "required": true
  13610. },
  13611. {
  13612. "name": "location",
  13613. "in": "query",
  13614. "schema": {
  13615. "type": "object",
  13616. "properties": {
  13617. "directory": {
  13618. "type": "string"
  13619. },
  13620. "workspace": {
  13621. "type": "string"
  13622. }
  13623. },
  13624. "additionalProperties": false
  13625. },
  13626. "required": false,
  13627. "style": "deepObject",
  13628. "explode": true
  13629. }
  13630. ],
  13631. "security": [],
  13632. "responses": {
  13633. "204": {
  13634. "description": "<No Content>"
  13635. },
  13636. "400": {
  13637. "description": "InvalidRequestError",
  13638. "content": {
  13639. "application/json": {
  13640. "schema": {
  13641. "$ref": "#/components/schemas/InvalidRequestError"
  13642. }
  13643. }
  13644. }
  13645. },
  13646. "401": {
  13647. "description": "UnauthorizedError",
  13648. "content": {
  13649. "application/json": {
  13650. "schema": {
  13651. "$ref": "#/components/schemas/UnauthorizedError"
  13652. }
  13653. }
  13654. }
  13655. },
  13656. "404": {
  13657. "description": "PtyNotFoundError",
  13658. "content": {
  13659. "application/json": {
  13660. "schema": {
  13661. "$ref": "#/components/schemas/PtyNotFoundError"
  13662. }
  13663. }
  13664. }
  13665. }
  13666. },
  13667. "description": "Terminate and remove one PTY session.",
  13668. "summary": "Remove PTY session",
  13669. "x-codeSamples": [
  13670. {
  13671. "lang": "js",
  13672. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.remove({\n ...\n})"
  13673. }
  13674. ]
  13675. }
  13676. },
  13677. "/api/pty/{ptyID}/connect-token": {
  13678. "post": {
  13679. "tags": ["pty"],
  13680. "operationId": "v2.pty.connectToken",
  13681. "parameters": [
  13682. {
  13683. "name": "ptyID",
  13684. "in": "path",
  13685. "schema": {
  13686. "type": "string",
  13687. "pattern": "^pty"
  13688. },
  13689. "required": true
  13690. },
  13691. {
  13692. "name": "location",
  13693. "in": "query",
  13694. "schema": {
  13695. "type": "object",
  13696. "properties": {
  13697. "directory": {
  13698. "type": "string"
  13699. },
  13700. "workspace": {
  13701. "type": "string"
  13702. }
  13703. },
  13704. "additionalProperties": false
  13705. },
  13706. "required": false,
  13707. "style": "deepObject",
  13708. "explode": true
  13709. }
  13710. ],
  13711. "security": [],
  13712. "responses": {
  13713. "200": {
  13714. "description": "Success",
  13715. "content": {
  13716. "application/json": {
  13717. "schema": {
  13718. "type": "object",
  13719. "properties": {
  13720. "location": {
  13721. "$ref": "#/components/schemas/LocationInfo"
  13722. },
  13723. "data": {
  13724. "type": "object",
  13725. "properties": {
  13726. "ticket": {
  13727. "type": "string"
  13728. },
  13729. "expires_in": {
  13730. "type": "integer",
  13731. "exclusiveMinimum": 0
  13732. }
  13733. },
  13734. "required": ["ticket", "expires_in"],
  13735. "additionalProperties": false
  13736. }
  13737. },
  13738. "required": ["location", "data"],
  13739. "additionalProperties": false
  13740. }
  13741. }
  13742. }
  13743. },
  13744. "400": {
  13745. "description": "InvalidRequestError",
  13746. "content": {
  13747. "application/json": {
  13748. "schema": {
  13749. "$ref": "#/components/schemas/InvalidRequestError"
  13750. }
  13751. }
  13752. }
  13753. },
  13754. "401": {
  13755. "description": "UnauthorizedError",
  13756. "content": {
  13757. "application/json": {
  13758. "schema": {
  13759. "$ref": "#/components/schemas/UnauthorizedError"
  13760. }
  13761. }
  13762. }
  13763. },
  13764. "403": {
  13765. "description": "ForbiddenError",
  13766. "content": {
  13767. "application/json": {
  13768. "schema": {
  13769. "$ref": "#/components/schemas/ForbiddenError"
  13770. }
  13771. }
  13772. }
  13773. },
  13774. "404": {
  13775. "description": "PtyNotFoundError",
  13776. "content": {
  13777. "application/json": {
  13778. "schema": {
  13779. "$ref": "#/components/schemas/PtyNotFoundError"
  13780. }
  13781. }
  13782. }
  13783. }
  13784. },
  13785. "description": "Create a short-lived single-use ticket for opening a PTY WebSocket connection.",
  13786. "summary": "Create PTY WebSocket token",
  13787. "x-codeSamples": [
  13788. {
  13789. "lang": "js",
  13790. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.connectToken({\n ...\n})"
  13791. }
  13792. ]
  13793. }
  13794. },
  13795. "/api/pty/{ptyID}/connect": {
  13796. "get": {
  13797. "tags": ["pty"],
  13798. "operationId": "v2.pty.connect",
  13799. "parameters": [
  13800. {
  13801. "name": "ptyID",
  13802. "in": "path",
  13803. "schema": {
  13804. "type": "string",
  13805. "pattern": "^pty"
  13806. },
  13807. "required": true
  13808. },
  13809. {
  13810. "in": "query",
  13811. "name": "location[directory]",
  13812. "schema": {
  13813. "type": "string"
  13814. }
  13815. },
  13816. {
  13817. "in": "query",
  13818. "name": "location[workspace]",
  13819. "schema": {
  13820. "type": "string"
  13821. }
  13822. },
  13823. {
  13824. "in": "query",
  13825. "name": "cursor",
  13826. "schema": {
  13827. "type": "string"
  13828. }
  13829. },
  13830. {
  13831. "in": "query",
  13832. "name": "ticket",
  13833. "schema": {
  13834. "type": "string"
  13835. }
  13836. }
  13837. ],
  13838. "security": [],
  13839. "responses": {
  13840. "200": {
  13841. "description": "Success",
  13842. "content": {
  13843. "application/json": {
  13844. "schema": {
  13845. "type": "boolean"
  13846. }
  13847. }
  13848. }
  13849. },
  13850. "400": {
  13851. "description": "InvalidRequestError",
  13852. "content": {
  13853. "application/json": {
  13854. "schema": {
  13855. "$ref": "#/components/schemas/InvalidRequestError"
  13856. }
  13857. }
  13858. }
  13859. },
  13860. "401": {
  13861. "description": "UnauthorizedError",
  13862. "content": {
  13863. "application/json": {
  13864. "schema": {
  13865. "$ref": "#/components/schemas/UnauthorizedError"
  13866. }
  13867. }
  13868. }
  13869. },
  13870. "403": {
  13871. "description": "ForbiddenError",
  13872. "content": {
  13873. "application/json": {
  13874. "schema": {
  13875. "$ref": "#/components/schemas/ForbiddenError"
  13876. }
  13877. }
  13878. }
  13879. },
  13880. "404": {
  13881. "description": "PtyNotFoundError",
  13882. "content": {
  13883. "application/json": {
  13884. "schema": {
  13885. "$ref": "#/components/schemas/PtyNotFoundError"
  13886. }
  13887. }
  13888. }
  13889. }
  13890. },
  13891. "description": "Establish a WebSocket connection streaming PTY output and accepting terminal input.",
  13892. "summary": "Connect to PTY session",
  13893. "x-codeSamples": [
  13894. {
  13895. "lang": "js",
  13896. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.connect({\n ...\n})"
  13897. }
  13898. ]
  13899. }
  13900. },
  13901. "/api/question/request": {
  13902. "get": {
  13903. "tags": ["session questions"],
  13904. "operationId": "v2.question.request.list",
  13905. "parameters": [
  13906. {
  13907. "name": "location",
  13908. "in": "query",
  13909. "schema": {
  13910. "type": "object",
  13911. "properties": {
  13912. "directory": {
  13913. "type": "string"
  13914. },
  13915. "workspace": {
  13916. "type": "string"
  13917. }
  13918. },
  13919. "additionalProperties": false
  13920. },
  13921. "required": false,
  13922. "style": "deepObject",
  13923. "explode": true
  13924. }
  13925. ],
  13926. "security": [],
  13927. "responses": {
  13928. "200": {
  13929. "description": "Success",
  13930. "content": {
  13931. "application/json": {
  13932. "schema": {
  13933. "type": "object",
  13934. "properties": {
  13935. "location": {
  13936. "$ref": "#/components/schemas/LocationInfo"
  13937. },
  13938. "data": {
  13939. "type": "array",
  13940. "items": {
  13941. "$ref": "#/components/schemas/QuestionV2Request"
  13942. }
  13943. }
  13944. },
  13945. "required": ["location", "data"],
  13946. "additionalProperties": false
  13947. }
  13948. }
  13949. }
  13950. },
  13951. "400": {
  13952. "description": "InvalidRequestError",
  13953. "content": {
  13954. "application/json": {
  13955. "schema": {
  13956. "$ref": "#/components/schemas/InvalidRequestError"
  13957. }
  13958. }
  13959. }
  13960. },
  13961. "401": {
  13962. "description": "UnauthorizedError",
  13963. "content": {
  13964. "application/json": {
  13965. "schema": {
  13966. "$ref": "#/components/schemas/UnauthorizedError"
  13967. }
  13968. }
  13969. }
  13970. }
  13971. },
  13972. "description": "Retrieve pending question requests for a location.",
  13973. "summary": "List pending question requests",
  13974. "x-codeSamples": [
  13975. {
  13976. "lang": "js",
  13977. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.question.request.list({\n ...\n})"
  13978. }
  13979. ]
  13980. }
  13981. },
  13982. "/api/session/{sessionID}/question": {
  13983. "get": {
  13984. "tags": ["session questions"],
  13985. "operationId": "v2.session.question.list",
  13986. "parameters": [
  13987. {
  13988. "name": "sessionID",
  13989. "in": "path",
  13990. "schema": {
  13991. "type": "string",
  13992. "pattern": "^ses"
  13993. },
  13994. "required": true
  13995. }
  13996. ],
  13997. "security": [],
  13998. "responses": {
  13999. "200": {
  14000. "description": "Success",
  14001. "content": {
  14002. "application/json": {
  14003. "schema": {
  14004. "type": "object",
  14005. "properties": {
  14006. "data": {
  14007. "type": "array",
  14008. "items": {
  14009. "$ref": "#/components/schemas/QuestionV2Request"
  14010. }
  14011. }
  14012. },
  14013. "required": ["data"],
  14014. "additionalProperties": false
  14015. }
  14016. }
  14017. }
  14018. },
  14019. "400": {
  14020. "description": "InvalidRequestError",
  14021. "content": {
  14022. "application/json": {
  14023. "schema": {
  14024. "$ref": "#/components/schemas/InvalidRequestError"
  14025. }
  14026. }
  14027. }
  14028. },
  14029. "401": {
  14030. "description": "UnauthorizedError",
  14031. "content": {
  14032. "application/json": {
  14033. "schema": {
  14034. "$ref": "#/components/schemas/UnauthorizedError"
  14035. }
  14036. }
  14037. }
  14038. },
  14039. "404": {
  14040. "description": "SessionNotFoundError",
  14041. "content": {
  14042. "application/json": {
  14043. "schema": {
  14044. "anyOf": [
  14045. {
  14046. "$ref": "#/components/schemas/SessionNotFoundError"
  14047. },
  14048. {
  14049. "$ref": "#/components/schemas/SessionNotFoundError"
  14050. }
  14051. ]
  14052. }
  14053. }
  14054. }
  14055. }
  14056. },
  14057. "description": "Retrieve pending question requests owned by a session.",
  14058. "summary": "List session question requests",
  14059. "x-codeSamples": [
  14060. {
  14061. "lang": "js",
  14062. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.list({\n ...\n})"
  14063. }
  14064. ]
  14065. }
  14066. },
  14067. "/api/session/{sessionID}/question/{requestID}/reply": {
  14068. "post": {
  14069. "tags": ["session questions"],
  14070. "operationId": "v2.session.question.reply",
  14071. "parameters": [
  14072. {
  14073. "name": "sessionID",
  14074. "in": "path",
  14075. "schema": {
  14076. "type": "string",
  14077. "pattern": "^ses"
  14078. },
  14079. "required": true
  14080. },
  14081. {
  14082. "name": "requestID",
  14083. "in": "path",
  14084. "schema": {
  14085. "type": "string",
  14086. "pattern": "^que"
  14087. },
  14088. "required": true
  14089. }
  14090. ],
  14091. "security": [],
  14092. "responses": {
  14093. "204": {
  14094. "description": "<No Content>"
  14095. },
  14096. "400": {
  14097. "description": "InvalidRequestError",
  14098. "content": {
  14099. "application/json": {
  14100. "schema": {
  14101. "$ref": "#/components/schemas/InvalidRequestError"
  14102. }
  14103. }
  14104. }
  14105. },
  14106. "401": {
  14107. "description": "UnauthorizedError",
  14108. "content": {
  14109. "application/json": {
  14110. "schema": {
  14111. "$ref": "#/components/schemas/UnauthorizedError"
  14112. }
  14113. }
  14114. }
  14115. },
  14116. "404": {
  14117. "description": "SessionNotFoundError | QuestionNotFoundError",
  14118. "content": {
  14119. "application/json": {
  14120. "schema": {
  14121. "anyOf": [
  14122. {
  14123. "$ref": "#/components/schemas/QuestionNotFoundError"
  14124. },
  14125. {
  14126. "$ref": "#/components/schemas/SessionNotFoundError"
  14127. },
  14128. {
  14129. "$ref": "#/components/schemas/SessionNotFoundError"
  14130. }
  14131. ]
  14132. }
  14133. }
  14134. }
  14135. }
  14136. },
  14137. "description": "Answer a pending question request owned by a session.",
  14138. "summary": "Reply to pending question request",
  14139. "requestBody": {
  14140. "content": {
  14141. "application/json": {
  14142. "schema": {
  14143. "$ref": "#/components/schemas/QuestionV2Reply"
  14144. }
  14145. }
  14146. },
  14147. "required": true
  14148. },
  14149. "x-codeSamples": [
  14150. {
  14151. "lang": "js",
  14152. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reply({\n ...\n})"
  14153. }
  14154. ]
  14155. }
  14156. },
  14157. "/api/session/{sessionID}/question/{requestID}/reject": {
  14158. "post": {
  14159. "tags": ["session questions"],
  14160. "operationId": "v2.session.question.reject",
  14161. "parameters": [
  14162. {
  14163. "name": "sessionID",
  14164. "in": "path",
  14165. "schema": {
  14166. "type": "string",
  14167. "pattern": "^ses"
  14168. },
  14169. "required": true
  14170. },
  14171. {
  14172. "name": "requestID",
  14173. "in": "path",
  14174. "schema": {
  14175. "type": "string",
  14176. "pattern": "^que"
  14177. },
  14178. "required": true
  14179. }
  14180. ],
  14181. "security": [],
  14182. "responses": {
  14183. "204": {
  14184. "description": "<No Content>"
  14185. },
  14186. "400": {
  14187. "description": "InvalidRequestError",
  14188. "content": {
  14189. "application/json": {
  14190. "schema": {
  14191. "$ref": "#/components/schemas/InvalidRequestError"
  14192. }
  14193. }
  14194. }
  14195. },
  14196. "401": {
  14197. "description": "UnauthorizedError",
  14198. "content": {
  14199. "application/json": {
  14200. "schema": {
  14201. "$ref": "#/components/schemas/UnauthorizedError"
  14202. }
  14203. }
  14204. }
  14205. },
  14206. "404": {
  14207. "description": "SessionNotFoundError | QuestionNotFoundError",
  14208. "content": {
  14209. "application/json": {
  14210. "schema": {
  14211. "anyOf": [
  14212. {
  14213. "$ref": "#/components/schemas/QuestionNotFoundError"
  14214. },
  14215. {
  14216. "$ref": "#/components/schemas/SessionNotFoundError"
  14217. },
  14218. {
  14219. "$ref": "#/components/schemas/SessionNotFoundError"
  14220. }
  14221. ]
  14222. }
  14223. }
  14224. }
  14225. }
  14226. },
  14227. "description": "Reject a pending question request owned by a session.",
  14228. "summary": "Reject pending question request",
  14229. "x-codeSamples": [
  14230. {
  14231. "lang": "js",
  14232. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reject({\n ...\n})"
  14233. }
  14234. ]
  14235. }
  14236. },
  14237. "/api/reference": {
  14238. "get": {
  14239. "tags": ["reference"],
  14240. "operationId": "v2.reference.list",
  14241. "parameters": [
  14242. {
  14243. "name": "location",
  14244. "in": "query",
  14245. "schema": {
  14246. "type": "object",
  14247. "properties": {
  14248. "directory": {
  14249. "type": "string"
  14250. },
  14251. "workspace": {
  14252. "type": "string"
  14253. }
  14254. },
  14255. "additionalProperties": false
  14256. },
  14257. "required": false,
  14258. "style": "deepObject",
  14259. "explode": true
  14260. }
  14261. ],
  14262. "security": [],
  14263. "responses": {
  14264. "200": {
  14265. "description": "Success",
  14266. "content": {
  14267. "application/json": {
  14268. "schema": {
  14269. "type": "object",
  14270. "properties": {
  14271. "location": {
  14272. "$ref": "#/components/schemas/LocationInfo"
  14273. },
  14274. "data": {
  14275. "type": "array",
  14276. "items": {
  14277. "$ref": "#/components/schemas/ReferenceInfo"
  14278. }
  14279. }
  14280. },
  14281. "required": ["location", "data"],
  14282. "additionalProperties": false
  14283. }
  14284. }
  14285. }
  14286. },
  14287. "400": {
  14288. "description": "InvalidRequestError",
  14289. "content": {
  14290. "application/json": {
  14291. "schema": {
  14292. "$ref": "#/components/schemas/InvalidRequestError"
  14293. }
  14294. }
  14295. }
  14296. },
  14297. "401": {
  14298. "description": "UnauthorizedError",
  14299. "content": {
  14300. "application/json": {
  14301. "schema": {
  14302. "$ref": "#/components/schemas/UnauthorizedError"
  14303. }
  14304. }
  14305. }
  14306. }
  14307. },
  14308. "description": "List references available in the requested location.",
  14309. "summary": "List references",
  14310. "x-codeSamples": [
  14311. {
  14312. "lang": "js",
  14313. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.reference.list({\n ...\n})"
  14314. }
  14315. ]
  14316. }
  14317. },
  14318. "/experimental/project/{projectID}/copy": {
  14319. "post": {
  14320. "tags": ["projectCopy"],
  14321. "operationId": "v2.projectCopy.create",
  14322. "parameters": [
  14323. {
  14324. "name": "projectID",
  14325. "in": "path",
  14326. "schema": {
  14327. "type": "string"
  14328. },
  14329. "required": true
  14330. },
  14331. {
  14332. "name": "location",
  14333. "in": "query",
  14334. "schema": {
  14335. "type": "object",
  14336. "properties": {
  14337. "directory": {
  14338. "type": "string"
  14339. },
  14340. "workspace": {
  14341. "type": "string"
  14342. }
  14343. },
  14344. "additionalProperties": false
  14345. },
  14346. "required": false,
  14347. "style": "deepObject",
  14348. "explode": true
  14349. }
  14350. ],
  14351. "responses": {
  14352. "200": {
  14353. "description": "ProjectCopy.Copy",
  14354. "content": {
  14355. "application/json": {
  14356. "schema": {
  14357. "$ref": "#/components/schemas/ProjectCopyCopy"
  14358. }
  14359. }
  14360. }
  14361. },
  14362. "400": {
  14363. "description": "ProjectCopyError | InvalidRequestError",
  14364. "content": {
  14365. "application/json": {
  14366. "schema": {
  14367. "anyOf": [
  14368. {
  14369. "$ref": "#/components/schemas/ProjectCopyError"
  14370. },
  14371. {
  14372. "$ref": "#/components/schemas/InvalidRequestError"
  14373. }
  14374. ]
  14375. }
  14376. }
  14377. }
  14378. }
  14379. },
  14380. "requestBody": {
  14381. "content": {
  14382. "application/json": {
  14383. "schema": {
  14384. "type": "object",
  14385. "properties": {
  14386. "strategy": {
  14387. "type": "string"
  14388. },
  14389. "directory": {
  14390. "type": "string"
  14391. },
  14392. "name": {
  14393. "type": "string"
  14394. }
  14395. },
  14396. "required": ["strategy", "directory"],
  14397. "additionalProperties": false
  14398. }
  14399. }
  14400. }
  14401. },
  14402. "x-codeSamples": [
  14403. {
  14404. "lang": "js",
  14405. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.create({\n ...\n})"
  14406. }
  14407. ]
  14408. },
  14409. "delete": {
  14410. "tags": ["projectCopy"],
  14411. "operationId": "v2.projectCopy.remove",
  14412. "parameters": [
  14413. {
  14414. "name": "projectID",
  14415. "in": "path",
  14416. "schema": {
  14417. "type": "string"
  14418. },
  14419. "required": true
  14420. },
  14421. {
  14422. "name": "location",
  14423. "in": "query",
  14424. "schema": {
  14425. "type": "object",
  14426. "properties": {
  14427. "directory": {
  14428. "type": "string"
  14429. },
  14430. "workspace": {
  14431. "type": "string"
  14432. }
  14433. },
  14434. "additionalProperties": false
  14435. },
  14436. "required": false,
  14437. "style": "deepObject",
  14438. "explode": true
  14439. }
  14440. ],
  14441. "responses": {
  14442. "204": {
  14443. "description": "<No Content>"
  14444. },
  14445. "400": {
  14446. "description": "ProjectCopyError | InvalidRequestError",
  14447. "content": {
  14448. "application/json": {
  14449. "schema": {
  14450. "anyOf": [
  14451. {
  14452. "$ref": "#/components/schemas/ProjectCopyError"
  14453. },
  14454. {
  14455. "$ref": "#/components/schemas/InvalidRequestError"
  14456. }
  14457. ]
  14458. }
  14459. }
  14460. }
  14461. }
  14462. },
  14463. "requestBody": {
  14464. "content": {
  14465. "application/json": {
  14466. "schema": {
  14467. "type": "object",
  14468. "properties": {
  14469. "directory": {
  14470. "type": "string"
  14471. },
  14472. "force": {
  14473. "type": "boolean"
  14474. }
  14475. },
  14476. "required": ["directory", "force"],
  14477. "additionalProperties": false
  14478. }
  14479. }
  14480. }
  14481. },
  14482. "x-codeSamples": [
  14483. {
  14484. "lang": "js",
  14485. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.remove({\n ...\n})"
  14486. }
  14487. ]
  14488. }
  14489. },
  14490. "/experimental/project/{projectID}/copy/refresh": {
  14491. "post": {
  14492. "tags": ["projectCopy"],
  14493. "operationId": "v2.projectCopy.refresh",
  14494. "parameters": [
  14495. {
  14496. "name": "projectID",
  14497. "in": "path",
  14498. "schema": {
  14499. "type": "string"
  14500. },
  14501. "required": true
  14502. },
  14503. {
  14504. "name": "location",
  14505. "in": "query",
  14506. "schema": {
  14507. "type": "object",
  14508. "properties": {
  14509. "directory": {
  14510. "type": "string"
  14511. },
  14512. "workspace": {
  14513. "type": "string"
  14514. }
  14515. },
  14516. "additionalProperties": false
  14517. },
  14518. "required": false,
  14519. "style": "deepObject",
  14520. "explode": true
  14521. }
  14522. ],
  14523. "responses": {
  14524. "204": {
  14525. "description": "<No Content>"
  14526. },
  14527. "400": {
  14528. "description": "ProjectCopyError | InvalidRequestError",
  14529. "content": {
  14530. "application/json": {
  14531. "schema": {
  14532. "anyOf": [
  14533. {
  14534. "$ref": "#/components/schemas/ProjectCopyError"
  14535. },
  14536. {
  14537. "$ref": "#/components/schemas/InvalidRequestError"
  14538. }
  14539. ]
  14540. }
  14541. }
  14542. }
  14543. }
  14544. },
  14545. "x-codeSamples": [
  14546. {
  14547. "lang": "js",
  14548. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.refresh({\n ...\n})"
  14549. }
  14550. ]
  14551. }
  14552. },
  14553. "/pty/{ptyID}/connect": {
  14554. "get": {
  14555. "tags": ["pty"],
  14556. "operationId": "pty.connect",
  14557. "parameters": [
  14558. {
  14559. "name": "ptyID",
  14560. "in": "path",
  14561. "schema": {
  14562. "type": "string",
  14563. "pattern": "^pty"
  14564. },
  14565. "required": true
  14566. },
  14567. {
  14568. "in": "query",
  14569. "name": "directory",
  14570. "schema": {
  14571. "type": "string"
  14572. }
  14573. },
  14574. {
  14575. "in": "query",
  14576. "name": "workspace",
  14577. "schema": {
  14578. "type": "string"
  14579. }
  14580. },
  14581. {
  14582. "in": "query",
  14583. "name": "cursor",
  14584. "schema": {
  14585. "type": "string"
  14586. }
  14587. },
  14588. {
  14589. "in": "query",
  14590. "name": "ticket",
  14591. "schema": {
  14592. "type": "string"
  14593. }
  14594. }
  14595. ],
  14596. "responses": {
  14597. "200": {
  14598. "description": "Connected session",
  14599. "content": {
  14600. "application/json": {
  14601. "schema": {
  14602. "type": "boolean",
  14603. "description": "Connected session"
  14604. }
  14605. }
  14606. }
  14607. },
  14608. "403": {
  14609. "description": "Forbidden",
  14610. "content": {
  14611. "application/json": {
  14612. "schema": {
  14613. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  14614. }
  14615. }
  14616. }
  14617. },
  14618. "404": {
  14619. "description": "Not found",
  14620. "content": {
  14621. "application/json": {
  14622. "schema": {
  14623. "$ref": "#/components/schemas/NotFoundError"
  14624. }
  14625. }
  14626. }
  14627. }
  14628. },
  14629. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  14630. "summary": "Connect to PTY session",
  14631. "x-codeSamples": [
  14632. {
  14633. "lang": "js",
  14634. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  14635. }
  14636. ]
  14637. }
  14638. }
  14639. },
  14640. "components": {
  14641. "schemas": {
  14642. "Event": {
  14643. "anyOf": [
  14644. {
  14645. "$ref": "#/components/schemas/EventModels-devRefreshed"
  14646. },
  14647. {
  14648. "$ref": "#/components/schemas/EventIntegrationUpdated"
  14649. },
  14650. {
  14651. "$ref": "#/components/schemas/EventCatalogUpdated"
  14652. },
  14653. {
  14654. "$ref": "#/components/schemas/EventSessionCreated"
  14655. },
  14656. {
  14657. "$ref": "#/components/schemas/EventSessionUpdated"
  14658. },
  14659. {
  14660. "$ref": "#/components/schemas/EventSessionDeleted"
  14661. },
  14662. {
  14663. "$ref": "#/components/schemas/EventMessageUpdated"
  14664. },
  14665. {
  14666. "$ref": "#/components/schemas/EventMessageRemoved"
  14667. },
  14668. {
  14669. "$ref": "#/components/schemas/EventMessagePartUpdated"
  14670. },
  14671. {
  14672. "$ref": "#/components/schemas/EventMessagePartRemoved"
  14673. },
  14674. {
  14675. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  14676. },
  14677. {
  14678. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  14679. },
  14680. {
  14681. "$ref": "#/components/schemas/EventSessionNextMoved"
  14682. },
  14683. {
  14684. "$ref": "#/components/schemas/EventSessionNextPrompted"
  14685. },
  14686. {
  14687. "$ref": "#/components/schemas/EventSessionNextPromptAdmitted"
  14688. },
  14689. {
  14690. "$ref": "#/components/schemas/EventSessionNextPromptPromoted"
  14691. },
  14692. {
  14693. "$ref": "#/components/schemas/EventSessionNextInterruptRequested"
  14694. },
  14695. {
  14696. "$ref": "#/components/schemas/EventSessionNextContextUpdated"
  14697. },
  14698. {
  14699. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  14700. },
  14701. {
  14702. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  14703. },
  14704. {
  14705. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  14706. },
  14707. {
  14708. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  14709. },
  14710. {
  14711. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  14712. },
  14713. {
  14714. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  14715. },
  14716. {
  14717. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  14718. },
  14719. {
  14720. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  14721. },
  14722. {
  14723. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  14724. },
  14725. {
  14726. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  14727. },
  14728. {
  14729. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  14730. },
  14731. {
  14732. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  14733. },
  14734. {
  14735. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  14736. },
  14737. {
  14738. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  14739. },
  14740. {
  14741. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  14742. },
  14743. {
  14744. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  14745. },
  14746. {
  14747. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  14748. },
  14749. {
  14750. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  14751. },
  14752. {
  14753. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  14754. },
  14755. {
  14756. "$ref": "#/components/schemas/EventSessionNextRetried"
  14757. },
  14758. {
  14759. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  14760. },
  14761. {
  14762. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  14763. },
  14764. {
  14765. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  14766. },
  14767. {
  14768. "$ref": "#/components/schemas/EventMessagePartDelta"
  14769. },
  14770. {
  14771. "$ref": "#/components/schemas/EventSessionDiff"
  14772. },
  14773. {
  14774. "$ref": "#/components/schemas/EventSessionError"
  14775. },
  14776. {
  14777. "$ref": "#/components/schemas/EventInstallationUpdated"
  14778. },
  14779. {
  14780. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  14781. },
  14782. {
  14783. "$ref": "#/components/schemas/EventFileEdited"
  14784. },
  14785. {
  14786. "$ref": "#/components/schemas/EventPluginAdded"
  14787. },
  14788. {
  14789. "$ref": "#/components/schemas/EventPermissionV2Asked"
  14790. },
  14791. {
  14792. "$ref": "#/components/schemas/EventPermissionV2Replied"
  14793. },
  14794. {
  14795. "$ref": "#/components/schemas/EventReferenceUpdated"
  14796. },
  14797. {
  14798. "$ref": "#/components/schemas/EventProjectDirectoriesUpdated"
  14799. },
  14800. {
  14801. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  14802. },
  14803. {
  14804. "$ref": "#/components/schemas/EventPtyCreated"
  14805. },
  14806. {
  14807. "$ref": "#/components/schemas/EventPtyUpdated"
  14808. },
  14809. {
  14810. "$ref": "#/components/schemas/EventPtyExited"
  14811. },
  14812. {
  14813. "$ref": "#/components/schemas/EventPtyDeleted"
  14814. },
  14815. {
  14816. "$ref": "#/components/schemas/EventQuestionV2Asked"
  14817. },
  14818. {
  14819. "$ref": "#/components/schemas/EventQuestionV2Replied"
  14820. },
  14821. {
  14822. "$ref": "#/components/schemas/EventQuestionV2Rejected"
  14823. },
  14824. {
  14825. "$ref": "#/components/schemas/EventTodoUpdated"
  14826. },
  14827. {
  14828. "$ref": "#/components/schemas/EventLspUpdated"
  14829. },
  14830. {
  14831. "$ref": "#/components/schemas/EventPermissionAsked"
  14832. },
  14833. {
  14834. "$ref": "#/components/schemas/EventPermissionReplied"
  14835. },
  14836. {
  14837. "$ref": "#/components/schemas/Event.tui.prompt.append"
  14838. },
  14839. {
  14840. "$ref": "#/components/schemas/Event.tui.command.execute"
  14841. },
  14842. {
  14843. "$ref": "#/components/schemas/Event.tui.toast.show"
  14844. },
  14845. {
  14846. "$ref": "#/components/schemas/Event.tui.session.select"
  14847. },
  14848. {
  14849. "$ref": "#/components/schemas/EventMcpToolsChanged"
  14850. },
  14851. {
  14852. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  14853. },
  14854. {
  14855. "$ref": "#/components/schemas/EventCommandExecuted"
  14856. },
  14857. {
  14858. "$ref": "#/components/schemas/EventProjectUpdated"
  14859. },
  14860. {
  14861. "$ref": "#/components/schemas/EventSessionStatus"
  14862. },
  14863. {
  14864. "$ref": "#/components/schemas/EventSessionIdle"
  14865. },
  14866. {
  14867. "$ref": "#/components/schemas/EventQuestionAsked"
  14868. },
  14869. {
  14870. "$ref": "#/components/schemas/EventQuestionReplied"
  14871. },
  14872. {
  14873. "$ref": "#/components/schemas/EventQuestionRejected"
  14874. },
  14875. {
  14876. "$ref": "#/components/schemas/EventSessionCompacted"
  14877. },
  14878. {
  14879. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  14880. },
  14881. {
  14882. "$ref": "#/components/schemas/EventWorkspaceReady"
  14883. },
  14884. {
  14885. "$ref": "#/components/schemas/EventWorkspaceFailed"
  14886. },
  14887. {
  14888. "$ref": "#/components/schemas/EventWorkspaceStatus"
  14889. },
  14890. {
  14891. "$ref": "#/components/schemas/EventWorktreeReady"
  14892. },
  14893. {
  14894. "$ref": "#/components/schemas/EventWorktreeFailed"
  14895. },
  14896. {
  14897. "$ref": "#/components/schemas/EventServerConnected"
  14898. },
  14899. {
  14900. "$ref": "#/components/schemas/EventGlobalDisposed"
  14901. },
  14902. {
  14903. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  14904. }
  14905. ]
  14906. },
  14907. "QuestionReplied": {
  14908. "type": "object",
  14909. "properties": {
  14910. "sessionID": {
  14911. "type": "string",
  14912. "pattern": "^ses"
  14913. },
  14914. "requestID": {
  14915. "type": "string",
  14916. "pattern": "^que"
  14917. },
  14918. "answers": {
  14919. "type": "array",
  14920. "items": {
  14921. "$ref": "#/components/schemas/QuestionAnswer"
  14922. }
  14923. }
  14924. },
  14925. "required": ["sessionID", "requestID", "answers"],
  14926. "additionalProperties": false
  14927. },
  14928. "QuestionRejected": {
  14929. "type": "object",
  14930. "properties": {
  14931. "sessionID": {
  14932. "type": "string",
  14933. "pattern": "^ses"
  14934. },
  14935. "requestID": {
  14936. "type": "string",
  14937. "pattern": "^que"
  14938. }
  14939. },
  14940. "required": ["sessionID", "requestID"],
  14941. "additionalProperties": false
  14942. },
  14943. "OAuth": {
  14944. "type": "object",
  14945. "properties": {
  14946. "type": {
  14947. "type": "string",
  14948. "enum": ["oauth"]
  14949. },
  14950. "refresh": {
  14951. "type": "string"
  14952. },
  14953. "access": {
  14954. "type": "string"
  14955. },
  14956. "expires": {
  14957. "type": "integer",
  14958. "minimum": 0
  14959. },
  14960. "accountId": {
  14961. "type": "string"
  14962. },
  14963. "enterpriseUrl": {
  14964. "type": "string"
  14965. }
  14966. },
  14967. "required": ["type", "refresh", "access", "expires"],
  14968. "additionalProperties": false
  14969. },
  14970. "ApiAuth": {
  14971. "type": "object",
  14972. "properties": {
  14973. "type": {
  14974. "type": "string",
  14975. "enum": ["api"]
  14976. },
  14977. "key": {
  14978. "type": "string"
  14979. },
  14980. "metadata": {
  14981. "type": "object",
  14982. "additionalProperties": {
  14983. "type": "string"
  14984. }
  14985. }
  14986. },
  14987. "required": ["type", "key"],
  14988. "additionalProperties": false
  14989. },
  14990. "WellKnownAuth": {
  14991. "type": "object",
  14992. "properties": {
  14993. "type": {
  14994. "type": "string",
  14995. "enum": ["wellknown"]
  14996. },
  14997. "key": {
  14998. "type": "string"
  14999. },
  15000. "token": {
  15001. "type": "string"
  15002. }
  15003. },
  15004. "required": ["type", "key", "token"],
  15005. "additionalProperties": false
  15006. },
  15007. "Auth": {
  15008. "anyOf": [
  15009. {
  15010. "$ref": "#/components/schemas/OAuth"
  15011. },
  15012. {
  15013. "$ref": "#/components/schemas/ApiAuth"
  15014. },
  15015. {
  15016. "$ref": "#/components/schemas/WellKnownAuth"
  15017. }
  15018. ]
  15019. },
  15020. "effect_HttpApiError_BadRequest": {
  15021. "type": "object",
  15022. "properties": {
  15023. "_tag": {
  15024. "type": "string",
  15025. "enum": ["BadRequest"]
  15026. }
  15027. },
  15028. "required": ["_tag"],
  15029. "additionalProperties": false
  15030. },
  15031. "InvalidRequestError": {
  15032. "type": "object",
  15033. "properties": {
  15034. "_tag": {
  15035. "type": "string",
  15036. "enum": ["InvalidRequestError"]
  15037. },
  15038. "message": {
  15039. "type": "string"
  15040. },
  15041. "kind": {
  15042. "type": "string"
  15043. },
  15044. "field": {
  15045. "type": "string"
  15046. }
  15047. },
  15048. "required": ["_tag", "message"],
  15049. "additionalProperties": false
  15050. },
  15051. "MoveSessionError": {
  15052. "type": "object",
  15053. "properties": {
  15054. "name": {
  15055. "type": "string",
  15056. "enum": ["MoveSessionError"]
  15057. },
  15058. "data": {
  15059. "type": "object",
  15060. "properties": {
  15061. "message": {
  15062. "type": "string"
  15063. }
  15064. },
  15065. "required": ["message"],
  15066. "additionalProperties": false
  15067. }
  15068. },
  15069. "required": ["name", "data"],
  15070. "additionalProperties": false
  15071. },
  15072. "SnapshotFileDiff": {
  15073. "type": "object",
  15074. "properties": {
  15075. "file": {
  15076. "type": "string"
  15077. },
  15078. "patch": {
  15079. "type": "string"
  15080. },
  15081. "additions": {
  15082. "type": "number"
  15083. },
  15084. "deletions": {
  15085. "type": "number"
  15086. },
  15087. "status": {
  15088. "type": "string",
  15089. "enum": ["added", "deleted", "modified"]
  15090. }
  15091. },
  15092. "required": ["additions", "deletions"],
  15093. "additionalProperties": false
  15094. },
  15095. "PermissionAction": {
  15096. "type": "string",
  15097. "enum": ["allow", "deny", "ask"]
  15098. },
  15099. "PermissionRule": {
  15100. "type": "object",
  15101. "properties": {
  15102. "permission": {
  15103. "type": "string"
  15104. },
  15105. "pattern": {
  15106. "type": "string"
  15107. },
  15108. "action": {
  15109. "$ref": "#/components/schemas/PermissionAction"
  15110. }
  15111. },
  15112. "required": ["permission", "pattern", "action"],
  15113. "additionalProperties": false
  15114. },
  15115. "PermissionRuleset": {
  15116. "type": "array",
  15117. "items": {
  15118. "$ref": "#/components/schemas/PermissionRule"
  15119. }
  15120. },
  15121. "Session": {
  15122. "type": "object",
  15123. "properties": {
  15124. "id": {
  15125. "type": "string",
  15126. "pattern": "^ses"
  15127. },
  15128. "slug": {
  15129. "type": "string"
  15130. },
  15131. "projectID": {
  15132. "type": "string"
  15133. },
  15134. "workspaceID": {
  15135. "type": "string",
  15136. "pattern": "^wrk"
  15137. },
  15138. "directory": {
  15139. "type": "string"
  15140. },
  15141. "path": {
  15142. "type": "string"
  15143. },
  15144. "parentID": {
  15145. "type": "string",
  15146. "pattern": "^ses"
  15147. },
  15148. "summary": {
  15149. "type": "object",
  15150. "properties": {
  15151. "additions": {
  15152. "type": "number"
  15153. },
  15154. "deletions": {
  15155. "type": "number"
  15156. },
  15157. "files": {
  15158. "type": "number"
  15159. },
  15160. "diffs": {
  15161. "type": "array",
  15162. "items": {
  15163. "$ref": "#/components/schemas/SnapshotFileDiff"
  15164. }
  15165. }
  15166. },
  15167. "required": ["additions", "deletions", "files"],
  15168. "additionalProperties": false
  15169. },
  15170. "cost": {
  15171. "type": "number"
  15172. },
  15173. "tokens": {
  15174. "type": "object",
  15175. "properties": {
  15176. "input": {
  15177. "type": "number"
  15178. },
  15179. "output": {
  15180. "type": "number"
  15181. },
  15182. "reasoning": {
  15183. "type": "number"
  15184. },
  15185. "cache": {
  15186. "type": "object",
  15187. "properties": {
  15188. "read": {
  15189. "type": "number"
  15190. },
  15191. "write": {
  15192. "type": "number"
  15193. }
  15194. },
  15195. "required": ["read", "write"],
  15196. "additionalProperties": false
  15197. }
  15198. },
  15199. "required": ["input", "output", "reasoning", "cache"],
  15200. "additionalProperties": false
  15201. },
  15202. "share": {
  15203. "type": "object",
  15204. "properties": {
  15205. "url": {
  15206. "type": "string"
  15207. }
  15208. },
  15209. "required": ["url"],
  15210. "additionalProperties": false
  15211. },
  15212. "title": {
  15213. "type": "string"
  15214. },
  15215. "agent": {
  15216. "type": "string"
  15217. },
  15218. "model": {
  15219. "type": "object",
  15220. "properties": {
  15221. "id": {
  15222. "type": "string"
  15223. },
  15224. "providerID": {
  15225. "type": "string"
  15226. },
  15227. "variant": {
  15228. "type": "string"
  15229. }
  15230. },
  15231. "required": ["id", "providerID"],
  15232. "additionalProperties": false
  15233. },
  15234. "version": {
  15235. "type": "string"
  15236. },
  15237. "metadata": {
  15238. "type": "object"
  15239. },
  15240. "time": {
  15241. "type": "object",
  15242. "properties": {
  15243. "created": {
  15244. "type": "integer",
  15245. "minimum": 0
  15246. },
  15247. "updated": {
  15248. "type": "integer",
  15249. "minimum": 0
  15250. },
  15251. "compacting": {
  15252. "type": "integer",
  15253. "minimum": 0
  15254. },
  15255. "archived": {
  15256. "type": "number"
  15257. }
  15258. },
  15259. "required": ["created", "updated"],
  15260. "additionalProperties": false
  15261. },
  15262. "permission": {
  15263. "$ref": "#/components/schemas/PermissionRuleset"
  15264. },
  15265. "revert": {
  15266. "type": "object",
  15267. "properties": {
  15268. "messageID": {
  15269. "type": "string",
  15270. "pattern": "^msg"
  15271. },
  15272. "partID": {
  15273. "type": "string",
  15274. "pattern": "^prt"
  15275. },
  15276. "snapshot": {
  15277. "type": "string"
  15278. },
  15279. "diff": {
  15280. "type": "string"
  15281. }
  15282. },
  15283. "required": ["messageID"],
  15284. "additionalProperties": false
  15285. }
  15286. },
  15287. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  15288. "additionalProperties": false
  15289. },
  15290. "OutputFormatText": {
  15291. "type": "object",
  15292. "properties": {
  15293. "type": {
  15294. "type": "string",
  15295. "enum": ["text"]
  15296. }
  15297. },
  15298. "required": ["type"],
  15299. "additionalProperties": false
  15300. },
  15301. "JSONSchema": {
  15302. "type": "object"
  15303. },
  15304. "OutputFormatJsonSchema": {
  15305. "type": "object",
  15306. "properties": {
  15307. "type": {
  15308. "type": "string",
  15309. "enum": ["json_schema"]
  15310. },
  15311. "schema": {
  15312. "$ref": "#/components/schemas/JSONSchema"
  15313. },
  15314. "retryCount": {
  15315. "type": "integer",
  15316. "minimum": 0
  15317. }
  15318. },
  15319. "required": ["type", "schema"],
  15320. "additionalProperties": false
  15321. },
  15322. "OutputFormat": {
  15323. "anyOf": [
  15324. {
  15325. "$ref": "#/components/schemas/OutputFormatText"
  15326. },
  15327. {
  15328. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  15329. }
  15330. ]
  15331. },
  15332. "UserMessage": {
  15333. "type": "object",
  15334. "properties": {
  15335. "id": {
  15336. "type": "string",
  15337. "pattern": "^msg"
  15338. },
  15339. "sessionID": {
  15340. "type": "string",
  15341. "pattern": "^ses"
  15342. },
  15343. "role": {
  15344. "type": "string",
  15345. "enum": ["user"]
  15346. },
  15347. "time": {
  15348. "type": "object",
  15349. "properties": {
  15350. "created": {
  15351. "type": "number",
  15352. "minimum": 0
  15353. }
  15354. },
  15355. "required": ["created"],
  15356. "additionalProperties": false
  15357. },
  15358. "format": {
  15359. "$ref": "#/components/schemas/OutputFormat"
  15360. },
  15361. "summary": {
  15362. "type": "object",
  15363. "properties": {
  15364. "title": {
  15365. "type": "string"
  15366. },
  15367. "body": {
  15368. "type": "string"
  15369. },
  15370. "diffs": {
  15371. "type": "array",
  15372. "items": {
  15373. "$ref": "#/components/schemas/SnapshotFileDiff"
  15374. }
  15375. }
  15376. },
  15377. "required": ["diffs"],
  15378. "additionalProperties": false
  15379. },
  15380. "agent": {
  15381. "type": "string"
  15382. },
  15383. "model": {
  15384. "type": "object",
  15385. "properties": {
  15386. "providerID": {
  15387. "type": "string"
  15388. },
  15389. "modelID": {
  15390. "type": "string"
  15391. },
  15392. "variant": {
  15393. "type": "string"
  15394. }
  15395. },
  15396. "required": ["providerID", "modelID"],
  15397. "additionalProperties": false
  15398. },
  15399. "system": {
  15400. "type": "string"
  15401. },
  15402. "tools": {
  15403. "type": "object",
  15404. "additionalProperties": {
  15405. "type": "boolean"
  15406. }
  15407. }
  15408. },
  15409. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  15410. "additionalProperties": false
  15411. },
  15412. "ProviderAuthError": {
  15413. "type": "object",
  15414. "properties": {
  15415. "name": {
  15416. "type": "string",
  15417. "enum": ["ProviderAuthError"]
  15418. },
  15419. "data": {
  15420. "type": "object",
  15421. "properties": {
  15422. "providerID": {
  15423. "type": "string"
  15424. },
  15425. "message": {
  15426. "type": "string"
  15427. }
  15428. },
  15429. "required": ["providerID", "message"],
  15430. "additionalProperties": false
  15431. }
  15432. },
  15433. "required": ["name", "data"],
  15434. "additionalProperties": false
  15435. },
  15436. "UnknownError": {
  15437. "type": "object",
  15438. "properties": {
  15439. "name": {
  15440. "type": "string",
  15441. "enum": ["UnknownError"]
  15442. },
  15443. "data": {
  15444. "type": "object",
  15445. "properties": {
  15446. "message": {
  15447. "type": "string"
  15448. },
  15449. "ref": {
  15450. "type": "string"
  15451. }
  15452. },
  15453. "required": ["message"],
  15454. "additionalProperties": false
  15455. }
  15456. },
  15457. "required": ["name", "data"],
  15458. "additionalProperties": false
  15459. },
  15460. "MessageOutputLengthError": {
  15461. "type": "object",
  15462. "properties": {
  15463. "name": {
  15464. "type": "string",
  15465. "enum": ["MessageOutputLengthError"]
  15466. },
  15467. "data": {
  15468. "type": "object",
  15469. "properties": {}
  15470. }
  15471. },
  15472. "required": ["name", "data"],
  15473. "additionalProperties": false
  15474. },
  15475. "MessageAbortedError": {
  15476. "type": "object",
  15477. "properties": {
  15478. "name": {
  15479. "type": "string",
  15480. "enum": ["MessageAbortedError"]
  15481. },
  15482. "data": {
  15483. "type": "object",
  15484. "properties": {
  15485. "message": {
  15486. "type": "string"
  15487. }
  15488. },
  15489. "required": ["message"],
  15490. "additionalProperties": false
  15491. }
  15492. },
  15493. "required": ["name", "data"],
  15494. "additionalProperties": false
  15495. },
  15496. "StructuredOutputError": {
  15497. "type": "object",
  15498. "properties": {
  15499. "name": {
  15500. "type": "string",
  15501. "enum": ["StructuredOutputError"]
  15502. },
  15503. "data": {
  15504. "type": "object",
  15505. "properties": {
  15506. "message": {
  15507. "type": "string"
  15508. },
  15509. "retries": {
  15510. "type": "integer",
  15511. "minimum": 0
  15512. }
  15513. },
  15514. "required": ["message", "retries"],
  15515. "additionalProperties": false
  15516. }
  15517. },
  15518. "required": ["name", "data"],
  15519. "additionalProperties": false
  15520. },
  15521. "ContextOverflowError": {
  15522. "type": "object",
  15523. "properties": {
  15524. "name": {
  15525. "type": "string",
  15526. "enum": ["ContextOverflowError"]
  15527. },
  15528. "data": {
  15529. "type": "object",
  15530. "properties": {
  15531. "message": {
  15532. "type": "string"
  15533. },
  15534. "responseBody": {
  15535. "type": "string"
  15536. }
  15537. },
  15538. "required": ["message"],
  15539. "additionalProperties": false
  15540. }
  15541. },
  15542. "required": ["name", "data"],
  15543. "additionalProperties": false
  15544. },
  15545. "ContentFilterError": {
  15546. "type": "object",
  15547. "properties": {
  15548. "name": {
  15549. "type": "string",
  15550. "enum": ["ContentFilterError"]
  15551. },
  15552. "data": {
  15553. "type": "object",
  15554. "properties": {
  15555. "message": {
  15556. "type": "string"
  15557. }
  15558. },
  15559. "required": ["message"],
  15560. "additionalProperties": false
  15561. }
  15562. },
  15563. "required": ["name", "data"],
  15564. "additionalProperties": false
  15565. },
  15566. "APIError": {
  15567. "type": "object",
  15568. "properties": {
  15569. "name": {
  15570. "type": "string",
  15571. "enum": ["APIError"]
  15572. },
  15573. "data": {
  15574. "type": "object",
  15575. "properties": {
  15576. "message": {
  15577. "type": "string"
  15578. },
  15579. "statusCode": {
  15580. "type": "integer",
  15581. "minimum": 0
  15582. },
  15583. "isRetryable": {
  15584. "type": "boolean"
  15585. },
  15586. "responseHeaders": {
  15587. "type": "object",
  15588. "additionalProperties": {
  15589. "type": "string"
  15590. }
  15591. },
  15592. "responseBody": {
  15593. "type": "string"
  15594. },
  15595. "metadata": {
  15596. "type": "object",
  15597. "additionalProperties": {
  15598. "type": "string"
  15599. }
  15600. }
  15601. },
  15602. "required": ["message", "isRetryable"],
  15603. "additionalProperties": false
  15604. }
  15605. },
  15606. "required": ["name", "data"],
  15607. "additionalProperties": false
  15608. },
  15609. "AssistantMessage": {
  15610. "type": "object",
  15611. "properties": {
  15612. "id": {
  15613. "type": "string",
  15614. "pattern": "^msg"
  15615. },
  15616. "sessionID": {
  15617. "type": "string",
  15618. "pattern": "^ses"
  15619. },
  15620. "role": {
  15621. "type": "string",
  15622. "enum": ["assistant"]
  15623. },
  15624. "time": {
  15625. "type": "object",
  15626. "properties": {
  15627. "created": {
  15628. "type": "integer",
  15629. "minimum": 0
  15630. },
  15631. "completed": {
  15632. "type": "integer",
  15633. "minimum": 0
  15634. }
  15635. },
  15636. "required": ["created"],
  15637. "additionalProperties": false
  15638. },
  15639. "error": {
  15640. "anyOf": [
  15641. {
  15642. "$ref": "#/components/schemas/ProviderAuthError"
  15643. },
  15644. {
  15645. "$ref": "#/components/schemas/UnknownError"
  15646. },
  15647. {
  15648. "$ref": "#/components/schemas/MessageOutputLengthError"
  15649. },
  15650. {
  15651. "$ref": "#/components/schemas/MessageAbortedError"
  15652. },
  15653. {
  15654. "$ref": "#/components/schemas/StructuredOutputError"
  15655. },
  15656. {
  15657. "$ref": "#/components/schemas/ContextOverflowError"
  15658. },
  15659. {
  15660. "$ref": "#/components/schemas/ContentFilterError"
  15661. },
  15662. {
  15663. "$ref": "#/components/schemas/APIError"
  15664. }
  15665. ]
  15666. },
  15667. "parentID": {
  15668. "type": "string",
  15669. "pattern": "^msg"
  15670. },
  15671. "modelID": {
  15672. "type": "string"
  15673. },
  15674. "providerID": {
  15675. "type": "string"
  15676. },
  15677. "mode": {
  15678. "type": "string"
  15679. },
  15680. "agent": {
  15681. "type": "string"
  15682. },
  15683. "path": {
  15684. "type": "object",
  15685. "properties": {
  15686. "cwd": {
  15687. "type": "string"
  15688. },
  15689. "root": {
  15690. "type": "string"
  15691. }
  15692. },
  15693. "required": ["cwd", "root"],
  15694. "additionalProperties": false
  15695. },
  15696. "summary": {
  15697. "type": "boolean"
  15698. },
  15699. "cost": {
  15700. "type": "number"
  15701. },
  15702. "tokens": {
  15703. "type": "object",
  15704. "properties": {
  15705. "total": {
  15706. "type": "number"
  15707. },
  15708. "input": {
  15709. "type": "number"
  15710. },
  15711. "output": {
  15712. "type": "number"
  15713. },
  15714. "reasoning": {
  15715. "type": "number"
  15716. },
  15717. "cache": {
  15718. "type": "object",
  15719. "properties": {
  15720. "read": {
  15721. "type": "number"
  15722. },
  15723. "write": {
  15724. "type": "number"
  15725. }
  15726. },
  15727. "required": ["read", "write"],
  15728. "additionalProperties": false
  15729. }
  15730. },
  15731. "required": ["input", "output", "reasoning", "cache"],
  15732. "additionalProperties": false
  15733. },
  15734. "structured": {},
  15735. "variant": {
  15736. "type": "string"
  15737. },
  15738. "finish": {
  15739. "type": "string"
  15740. }
  15741. },
  15742. "required": [
  15743. "id",
  15744. "sessionID",
  15745. "role",
  15746. "time",
  15747. "parentID",
  15748. "modelID",
  15749. "providerID",
  15750. "mode",
  15751. "agent",
  15752. "path",
  15753. "cost",
  15754. "tokens"
  15755. ],
  15756. "additionalProperties": false
  15757. },
  15758. "Message": {
  15759. "anyOf": [
  15760. {
  15761. "$ref": "#/components/schemas/UserMessage"
  15762. },
  15763. {
  15764. "$ref": "#/components/schemas/AssistantMessage"
  15765. }
  15766. ]
  15767. },
  15768. "TextPart": {
  15769. "type": "object",
  15770. "properties": {
  15771. "id": {
  15772. "type": "string",
  15773. "pattern": "^prt"
  15774. },
  15775. "sessionID": {
  15776. "type": "string",
  15777. "pattern": "^ses"
  15778. },
  15779. "messageID": {
  15780. "type": "string",
  15781. "pattern": "^msg"
  15782. },
  15783. "type": {
  15784. "type": "string",
  15785. "enum": ["text"]
  15786. },
  15787. "text": {
  15788. "type": "string"
  15789. },
  15790. "synthetic": {
  15791. "type": "boolean"
  15792. },
  15793. "ignored": {
  15794. "type": "boolean"
  15795. },
  15796. "time": {
  15797. "type": "object",
  15798. "properties": {
  15799. "start": {
  15800. "type": "integer",
  15801. "minimum": 0
  15802. },
  15803. "end": {
  15804. "type": "integer",
  15805. "minimum": 0
  15806. }
  15807. },
  15808. "required": ["start"],
  15809. "additionalProperties": false
  15810. },
  15811. "metadata": {
  15812. "type": "object"
  15813. }
  15814. },
  15815. "required": ["id", "sessionID", "messageID", "type", "text"],
  15816. "additionalProperties": false
  15817. },
  15818. "SubtaskPart": {
  15819. "type": "object",
  15820. "properties": {
  15821. "id": {
  15822. "type": "string",
  15823. "pattern": "^prt"
  15824. },
  15825. "sessionID": {
  15826. "type": "string",
  15827. "pattern": "^ses"
  15828. },
  15829. "messageID": {
  15830. "type": "string",
  15831. "pattern": "^msg"
  15832. },
  15833. "type": {
  15834. "type": "string",
  15835. "enum": ["subtask"]
  15836. },
  15837. "prompt": {
  15838. "type": "string"
  15839. },
  15840. "description": {
  15841. "type": "string"
  15842. },
  15843. "agent": {
  15844. "type": "string"
  15845. },
  15846. "model": {
  15847. "type": "object",
  15848. "properties": {
  15849. "providerID": {
  15850. "type": "string"
  15851. },
  15852. "modelID": {
  15853. "type": "string"
  15854. }
  15855. },
  15856. "required": ["providerID", "modelID"],
  15857. "additionalProperties": false
  15858. },
  15859. "command": {
  15860. "type": "string"
  15861. }
  15862. },
  15863. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  15864. "additionalProperties": false
  15865. },
  15866. "ReasoningPart": {
  15867. "type": "object",
  15868. "properties": {
  15869. "id": {
  15870. "type": "string",
  15871. "pattern": "^prt"
  15872. },
  15873. "sessionID": {
  15874. "type": "string",
  15875. "pattern": "^ses"
  15876. },
  15877. "messageID": {
  15878. "type": "string",
  15879. "pattern": "^msg"
  15880. },
  15881. "type": {
  15882. "type": "string",
  15883. "enum": ["reasoning"]
  15884. },
  15885. "text": {
  15886. "type": "string"
  15887. },
  15888. "metadata": {
  15889. "type": "object"
  15890. },
  15891. "time": {
  15892. "type": "object",
  15893. "properties": {
  15894. "start": {
  15895. "type": "integer",
  15896. "minimum": 0
  15897. },
  15898. "end": {
  15899. "type": "integer",
  15900. "minimum": 0
  15901. }
  15902. },
  15903. "required": ["start"],
  15904. "additionalProperties": false
  15905. }
  15906. },
  15907. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  15908. "additionalProperties": false
  15909. },
  15910. "FilePartSourceText": {
  15911. "type": "object",
  15912. "properties": {
  15913. "value": {
  15914. "type": "string"
  15915. },
  15916. "start": {
  15917. "type": "number"
  15918. },
  15919. "end": {
  15920. "type": "number"
  15921. }
  15922. },
  15923. "required": ["value", "start", "end"],
  15924. "additionalProperties": false
  15925. },
  15926. "FileSource": {
  15927. "type": "object",
  15928. "properties": {
  15929. "text": {
  15930. "$ref": "#/components/schemas/FilePartSourceText"
  15931. },
  15932. "type": {
  15933. "type": "string",
  15934. "enum": ["file"]
  15935. },
  15936. "path": {
  15937. "type": "string"
  15938. }
  15939. },
  15940. "required": ["text", "type", "path"],
  15941. "additionalProperties": false
  15942. },
  15943. "Range": {
  15944. "type": "object",
  15945. "properties": {
  15946. "start": {
  15947. "type": "object",
  15948. "properties": {
  15949. "line": {
  15950. "type": "integer",
  15951. "minimum": 0
  15952. },
  15953. "character": {
  15954. "type": "integer",
  15955. "minimum": 0
  15956. }
  15957. },
  15958. "required": ["line", "character"],
  15959. "additionalProperties": false
  15960. },
  15961. "end": {
  15962. "type": "object",
  15963. "properties": {
  15964. "line": {
  15965. "type": "integer",
  15966. "minimum": 0
  15967. },
  15968. "character": {
  15969. "type": "integer",
  15970. "minimum": 0
  15971. }
  15972. },
  15973. "required": ["line", "character"],
  15974. "additionalProperties": false
  15975. }
  15976. },
  15977. "required": ["start", "end"],
  15978. "additionalProperties": false
  15979. },
  15980. "SymbolSource": {
  15981. "type": "object",
  15982. "properties": {
  15983. "text": {
  15984. "$ref": "#/components/schemas/FilePartSourceText"
  15985. },
  15986. "type": {
  15987. "type": "string",
  15988. "enum": ["symbol"]
  15989. },
  15990. "path": {
  15991. "type": "string"
  15992. },
  15993. "range": {
  15994. "$ref": "#/components/schemas/Range"
  15995. },
  15996. "name": {
  15997. "type": "string"
  15998. },
  15999. "kind": {
  16000. "type": "integer",
  16001. "minimum": 0
  16002. }
  16003. },
  16004. "required": ["text", "type", "path", "range", "name", "kind"],
  16005. "additionalProperties": false
  16006. },
  16007. "ResourceSource": {
  16008. "type": "object",
  16009. "properties": {
  16010. "text": {
  16011. "$ref": "#/components/schemas/FilePartSourceText"
  16012. },
  16013. "type": {
  16014. "type": "string",
  16015. "enum": ["resource"]
  16016. },
  16017. "clientName": {
  16018. "type": "string"
  16019. },
  16020. "uri": {
  16021. "type": "string"
  16022. }
  16023. },
  16024. "required": ["text", "type", "clientName", "uri"],
  16025. "additionalProperties": false
  16026. },
  16027. "FilePartSource": {
  16028. "anyOf": [
  16029. {
  16030. "$ref": "#/components/schemas/FileSource"
  16031. },
  16032. {
  16033. "$ref": "#/components/schemas/SymbolSource"
  16034. },
  16035. {
  16036. "$ref": "#/components/schemas/ResourceSource"
  16037. }
  16038. ]
  16039. },
  16040. "FilePart": {
  16041. "type": "object",
  16042. "properties": {
  16043. "id": {
  16044. "type": "string",
  16045. "pattern": "^prt"
  16046. },
  16047. "sessionID": {
  16048. "type": "string",
  16049. "pattern": "^ses"
  16050. },
  16051. "messageID": {
  16052. "type": "string",
  16053. "pattern": "^msg"
  16054. },
  16055. "type": {
  16056. "type": "string",
  16057. "enum": ["file"]
  16058. },
  16059. "mime": {
  16060. "type": "string"
  16061. },
  16062. "filename": {
  16063. "type": "string"
  16064. },
  16065. "url": {
  16066. "type": "string"
  16067. },
  16068. "source": {
  16069. "$ref": "#/components/schemas/FilePartSource"
  16070. }
  16071. },
  16072. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  16073. "additionalProperties": false
  16074. },
  16075. "ToolStatePending": {
  16076. "type": "object",
  16077. "properties": {
  16078. "status": {
  16079. "type": "string",
  16080. "enum": ["pending"]
  16081. },
  16082. "input": {
  16083. "type": "object"
  16084. },
  16085. "raw": {
  16086. "type": "string"
  16087. }
  16088. },
  16089. "required": ["status", "input", "raw"],
  16090. "additionalProperties": false
  16091. },
  16092. "ToolStateRunning": {
  16093. "type": "object",
  16094. "properties": {
  16095. "status": {
  16096. "type": "string",
  16097. "enum": ["running"]
  16098. },
  16099. "input": {
  16100. "type": "object"
  16101. },
  16102. "title": {
  16103. "type": "string"
  16104. },
  16105. "metadata": {
  16106. "type": "object"
  16107. },
  16108. "time": {
  16109. "type": "object",
  16110. "properties": {
  16111. "start": {
  16112. "type": "integer",
  16113. "minimum": 0
  16114. }
  16115. },
  16116. "required": ["start"],
  16117. "additionalProperties": false
  16118. }
  16119. },
  16120. "required": ["status", "input", "time"],
  16121. "additionalProperties": false
  16122. },
  16123. "ToolStateCompleted": {
  16124. "type": "object",
  16125. "properties": {
  16126. "status": {
  16127. "type": "string",
  16128. "enum": ["completed"]
  16129. },
  16130. "input": {
  16131. "type": "object"
  16132. },
  16133. "output": {
  16134. "type": "string"
  16135. },
  16136. "title": {
  16137. "type": "string"
  16138. },
  16139. "metadata": {
  16140. "type": "object"
  16141. },
  16142. "time": {
  16143. "type": "object",
  16144. "properties": {
  16145. "start": {
  16146. "type": "integer",
  16147. "minimum": 0
  16148. },
  16149. "end": {
  16150. "type": "integer",
  16151. "minimum": 0
  16152. },
  16153. "compacted": {
  16154. "type": "integer",
  16155. "minimum": 0
  16156. }
  16157. },
  16158. "required": ["start", "end"],
  16159. "additionalProperties": false
  16160. },
  16161. "attachments": {
  16162. "type": "array",
  16163. "items": {
  16164. "$ref": "#/components/schemas/FilePart"
  16165. }
  16166. }
  16167. },
  16168. "required": ["status", "input", "output", "title", "metadata", "time"],
  16169. "additionalProperties": false
  16170. },
  16171. "ToolStateError": {
  16172. "type": "object",
  16173. "properties": {
  16174. "status": {
  16175. "type": "string",
  16176. "enum": ["error"]
  16177. },
  16178. "input": {
  16179. "type": "object"
  16180. },
  16181. "error": {
  16182. "type": "string"
  16183. },
  16184. "metadata": {
  16185. "type": "object"
  16186. },
  16187. "time": {
  16188. "type": "object",
  16189. "properties": {
  16190. "start": {
  16191. "type": "integer",
  16192. "minimum": 0
  16193. },
  16194. "end": {
  16195. "type": "integer",
  16196. "minimum": 0
  16197. }
  16198. },
  16199. "required": ["start", "end"],
  16200. "additionalProperties": false
  16201. }
  16202. },
  16203. "required": ["status", "input", "error", "time"],
  16204. "additionalProperties": false
  16205. },
  16206. "ToolState": {
  16207. "anyOf": [
  16208. {
  16209. "$ref": "#/components/schemas/ToolStatePending"
  16210. },
  16211. {
  16212. "$ref": "#/components/schemas/ToolStateRunning"
  16213. },
  16214. {
  16215. "$ref": "#/components/schemas/ToolStateCompleted"
  16216. },
  16217. {
  16218. "$ref": "#/components/schemas/ToolStateError"
  16219. }
  16220. ]
  16221. },
  16222. "ToolPart": {
  16223. "type": "object",
  16224. "properties": {
  16225. "id": {
  16226. "type": "string",
  16227. "pattern": "^prt"
  16228. },
  16229. "sessionID": {
  16230. "type": "string",
  16231. "pattern": "^ses"
  16232. },
  16233. "messageID": {
  16234. "type": "string",
  16235. "pattern": "^msg"
  16236. },
  16237. "type": {
  16238. "type": "string",
  16239. "enum": ["tool"]
  16240. },
  16241. "callID": {
  16242. "type": "string"
  16243. },
  16244. "tool": {
  16245. "type": "string"
  16246. },
  16247. "state": {
  16248. "$ref": "#/components/schemas/ToolState"
  16249. },
  16250. "metadata": {
  16251. "type": "object"
  16252. }
  16253. },
  16254. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  16255. "additionalProperties": false
  16256. },
  16257. "StepStartPart": {
  16258. "type": "object",
  16259. "properties": {
  16260. "id": {
  16261. "type": "string",
  16262. "pattern": "^prt"
  16263. },
  16264. "sessionID": {
  16265. "type": "string",
  16266. "pattern": "^ses"
  16267. },
  16268. "messageID": {
  16269. "type": "string",
  16270. "pattern": "^msg"
  16271. },
  16272. "type": {
  16273. "type": "string",
  16274. "enum": ["step-start"]
  16275. },
  16276. "snapshot": {
  16277. "type": "string"
  16278. }
  16279. },
  16280. "required": ["id", "sessionID", "messageID", "type"],
  16281. "additionalProperties": false
  16282. },
  16283. "StepFinishPart": {
  16284. "type": "object",
  16285. "properties": {
  16286. "id": {
  16287. "type": "string",
  16288. "pattern": "^prt"
  16289. },
  16290. "sessionID": {
  16291. "type": "string",
  16292. "pattern": "^ses"
  16293. },
  16294. "messageID": {
  16295. "type": "string",
  16296. "pattern": "^msg"
  16297. },
  16298. "type": {
  16299. "type": "string",
  16300. "enum": ["step-finish"]
  16301. },
  16302. "reason": {
  16303. "type": "string"
  16304. },
  16305. "snapshot": {
  16306. "type": "string"
  16307. },
  16308. "cost": {
  16309. "type": "number"
  16310. },
  16311. "tokens": {
  16312. "type": "object",
  16313. "properties": {
  16314. "total": {
  16315. "type": "number"
  16316. },
  16317. "input": {
  16318. "type": "number"
  16319. },
  16320. "output": {
  16321. "type": "number"
  16322. },
  16323. "reasoning": {
  16324. "type": "number"
  16325. },
  16326. "cache": {
  16327. "type": "object",
  16328. "properties": {
  16329. "read": {
  16330. "type": "number"
  16331. },
  16332. "write": {
  16333. "type": "number"
  16334. }
  16335. },
  16336. "required": ["read", "write"],
  16337. "additionalProperties": false
  16338. }
  16339. },
  16340. "required": ["input", "output", "reasoning", "cache"],
  16341. "additionalProperties": false
  16342. }
  16343. },
  16344. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  16345. "additionalProperties": false
  16346. },
  16347. "SnapshotPart": {
  16348. "type": "object",
  16349. "properties": {
  16350. "id": {
  16351. "type": "string",
  16352. "pattern": "^prt"
  16353. },
  16354. "sessionID": {
  16355. "type": "string",
  16356. "pattern": "^ses"
  16357. },
  16358. "messageID": {
  16359. "type": "string",
  16360. "pattern": "^msg"
  16361. },
  16362. "type": {
  16363. "type": "string",
  16364. "enum": ["snapshot"]
  16365. },
  16366. "snapshot": {
  16367. "type": "string"
  16368. }
  16369. },
  16370. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  16371. "additionalProperties": false
  16372. },
  16373. "PatchPart": {
  16374. "type": "object",
  16375. "properties": {
  16376. "id": {
  16377. "type": "string",
  16378. "pattern": "^prt"
  16379. },
  16380. "sessionID": {
  16381. "type": "string",
  16382. "pattern": "^ses"
  16383. },
  16384. "messageID": {
  16385. "type": "string",
  16386. "pattern": "^msg"
  16387. },
  16388. "type": {
  16389. "type": "string",
  16390. "enum": ["patch"]
  16391. },
  16392. "hash": {
  16393. "type": "string"
  16394. },
  16395. "files": {
  16396. "type": "array",
  16397. "items": {
  16398. "type": "string"
  16399. }
  16400. }
  16401. },
  16402. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  16403. "additionalProperties": false
  16404. },
  16405. "AgentPart": {
  16406. "type": "object",
  16407. "properties": {
  16408. "id": {
  16409. "type": "string",
  16410. "pattern": "^prt"
  16411. },
  16412. "sessionID": {
  16413. "type": "string",
  16414. "pattern": "^ses"
  16415. },
  16416. "messageID": {
  16417. "type": "string",
  16418. "pattern": "^msg"
  16419. },
  16420. "type": {
  16421. "type": "string",
  16422. "enum": ["agent"]
  16423. },
  16424. "name": {
  16425. "type": "string"
  16426. },
  16427. "source": {
  16428. "type": "object",
  16429. "properties": {
  16430. "value": {
  16431. "type": "string"
  16432. },
  16433. "start": {
  16434. "type": "integer",
  16435. "minimum": 0
  16436. },
  16437. "end": {
  16438. "type": "integer",
  16439. "minimum": 0
  16440. }
  16441. },
  16442. "required": ["value", "start", "end"],
  16443. "additionalProperties": false
  16444. }
  16445. },
  16446. "required": ["id", "sessionID", "messageID", "type", "name"],
  16447. "additionalProperties": false
  16448. },
  16449. "RetryPart": {
  16450. "type": "object",
  16451. "properties": {
  16452. "id": {
  16453. "type": "string",
  16454. "pattern": "^prt"
  16455. },
  16456. "sessionID": {
  16457. "type": "string",
  16458. "pattern": "^ses"
  16459. },
  16460. "messageID": {
  16461. "type": "string",
  16462. "pattern": "^msg"
  16463. },
  16464. "type": {
  16465. "type": "string",
  16466. "enum": ["retry"]
  16467. },
  16468. "attempt": {
  16469. "type": "integer",
  16470. "minimum": 0
  16471. },
  16472. "error": {
  16473. "$ref": "#/components/schemas/APIError"
  16474. },
  16475. "time": {
  16476. "type": "object",
  16477. "properties": {
  16478. "created": {
  16479. "type": "integer",
  16480. "minimum": 0
  16481. }
  16482. },
  16483. "required": ["created"],
  16484. "additionalProperties": false
  16485. }
  16486. },
  16487. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  16488. "additionalProperties": false
  16489. },
  16490. "CompactionPart": {
  16491. "type": "object",
  16492. "properties": {
  16493. "id": {
  16494. "type": "string",
  16495. "pattern": "^prt"
  16496. },
  16497. "sessionID": {
  16498. "type": "string",
  16499. "pattern": "^ses"
  16500. },
  16501. "messageID": {
  16502. "type": "string",
  16503. "pattern": "^msg"
  16504. },
  16505. "type": {
  16506. "type": "string",
  16507. "enum": ["compaction"]
  16508. },
  16509. "auto": {
  16510. "type": "boolean"
  16511. },
  16512. "overflow": {
  16513. "type": "boolean"
  16514. },
  16515. "tail_start_id": {
  16516. "type": "string",
  16517. "pattern": "^msg"
  16518. }
  16519. },
  16520. "required": ["id", "sessionID", "messageID", "type", "auto"],
  16521. "additionalProperties": false
  16522. },
  16523. "Part": {
  16524. "anyOf": [
  16525. {
  16526. "$ref": "#/components/schemas/TextPart"
  16527. },
  16528. {
  16529. "$ref": "#/components/schemas/SubtaskPart"
  16530. },
  16531. {
  16532. "$ref": "#/components/schemas/ReasoningPart"
  16533. },
  16534. {
  16535. "$ref": "#/components/schemas/FilePart"
  16536. },
  16537. {
  16538. "$ref": "#/components/schemas/ToolPart"
  16539. },
  16540. {
  16541. "$ref": "#/components/schemas/StepStartPart"
  16542. },
  16543. {
  16544. "$ref": "#/components/schemas/StepFinishPart"
  16545. },
  16546. {
  16547. "$ref": "#/components/schemas/SnapshotPart"
  16548. },
  16549. {
  16550. "$ref": "#/components/schemas/PatchPart"
  16551. },
  16552. {
  16553. "$ref": "#/components/schemas/AgentPart"
  16554. },
  16555. {
  16556. "$ref": "#/components/schemas/RetryPart"
  16557. },
  16558. {
  16559. "$ref": "#/components/schemas/CompactionPart"
  16560. }
  16561. ]
  16562. },
  16563. "Prompt": {
  16564. "type": "object",
  16565. "properties": {
  16566. "text": {
  16567. "type": "string"
  16568. },
  16569. "files": {
  16570. "type": "array",
  16571. "items": {
  16572. "$ref": "#/components/schemas/PromptFileAttachment"
  16573. }
  16574. },
  16575. "agents": {
  16576. "type": "array",
  16577. "items": {
  16578. "$ref": "#/components/schemas/PromptAgentAttachment"
  16579. }
  16580. }
  16581. },
  16582. "required": ["text"],
  16583. "additionalProperties": false
  16584. },
  16585. "Pty": {
  16586. "type": "object",
  16587. "properties": {
  16588. "id": {
  16589. "type": "string",
  16590. "pattern": "^pty"
  16591. },
  16592. "title": {
  16593. "type": "string"
  16594. },
  16595. "command": {
  16596. "type": "string"
  16597. },
  16598. "args": {
  16599. "type": "array",
  16600. "items": {
  16601. "type": "string"
  16602. }
  16603. },
  16604. "cwd": {
  16605. "type": "string"
  16606. },
  16607. "status": {
  16608. "type": "string",
  16609. "enum": ["running", "exited"]
  16610. },
  16611. "pid": {
  16612. "type": "integer",
  16613. "minimum": 0
  16614. },
  16615. "exitCode": {
  16616. "type": "integer",
  16617. "minimum": 0
  16618. }
  16619. },
  16620. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  16621. "additionalProperties": false
  16622. },
  16623. "Todo": {
  16624. "type": "object",
  16625. "properties": {
  16626. "content": {
  16627. "type": "string",
  16628. "description": "Brief description of the task"
  16629. },
  16630. "status": {
  16631. "type": "string",
  16632. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  16633. },
  16634. "priority": {
  16635. "type": "string",
  16636. "description": "Priority level of the task: high, medium, low"
  16637. }
  16638. },
  16639. "required": ["content", "status", "priority"],
  16640. "additionalProperties": false
  16641. },
  16642. "SessionStatus": {
  16643. "anyOf": [
  16644. {
  16645. "type": "object",
  16646. "properties": {
  16647. "type": {
  16648. "type": "string",
  16649. "enum": ["idle"]
  16650. }
  16651. },
  16652. "required": ["type"],
  16653. "additionalProperties": false
  16654. },
  16655. {
  16656. "type": "object",
  16657. "properties": {
  16658. "type": {
  16659. "type": "string",
  16660. "enum": ["retry"]
  16661. },
  16662. "attempt": {
  16663. "type": "integer",
  16664. "minimum": 0
  16665. },
  16666. "message": {
  16667. "type": "string"
  16668. },
  16669. "action": {
  16670. "type": "object",
  16671. "properties": {
  16672. "reason": {
  16673. "type": "string"
  16674. },
  16675. "provider": {
  16676. "type": "string"
  16677. },
  16678. "title": {
  16679. "type": "string"
  16680. },
  16681. "message": {
  16682. "type": "string"
  16683. },
  16684. "label": {
  16685. "type": "string"
  16686. },
  16687. "link": {
  16688. "type": "string"
  16689. }
  16690. },
  16691. "required": ["reason", "provider", "title", "message", "label"],
  16692. "additionalProperties": false
  16693. },
  16694. "next": {
  16695. "type": "integer",
  16696. "minimum": 0
  16697. }
  16698. },
  16699. "required": ["type", "attempt", "message", "next"],
  16700. "additionalProperties": false
  16701. },
  16702. {
  16703. "type": "object",
  16704. "properties": {
  16705. "type": {
  16706. "type": "string",
  16707. "enum": ["busy"]
  16708. }
  16709. },
  16710. "required": ["type"],
  16711. "additionalProperties": false
  16712. }
  16713. ]
  16714. },
  16715. "QuestionOption": {
  16716. "type": "object",
  16717. "properties": {
  16718. "label": {
  16719. "type": "string",
  16720. "description": "Display text (1-5 words, concise)"
  16721. },
  16722. "description": {
  16723. "type": "string",
  16724. "description": "Explanation of choice"
  16725. }
  16726. },
  16727. "required": ["label", "description"],
  16728. "additionalProperties": false
  16729. },
  16730. "QuestionInfo": {
  16731. "type": "object",
  16732. "properties": {
  16733. "question": {
  16734. "type": "string",
  16735. "description": "Complete question"
  16736. },
  16737. "header": {
  16738. "type": "string",
  16739. "description": "Very short label (max 30 chars)"
  16740. },
  16741. "options": {
  16742. "type": "array",
  16743. "items": {
  16744. "$ref": "#/components/schemas/QuestionOption"
  16745. },
  16746. "description": "Available choices"
  16747. },
  16748. "multiple": {
  16749. "type": "boolean"
  16750. },
  16751. "custom": {
  16752. "type": "boolean"
  16753. }
  16754. },
  16755. "required": ["question", "header", "options"],
  16756. "additionalProperties": false
  16757. },
  16758. "QuestionTool": {
  16759. "type": "object",
  16760. "properties": {
  16761. "messageID": {
  16762. "type": "string",
  16763. "pattern": "^msg"
  16764. },
  16765. "callID": {
  16766. "type": "string"
  16767. }
  16768. },
  16769. "required": ["messageID", "callID"],
  16770. "additionalProperties": false
  16771. },
  16772. "QuestionAnswer": {
  16773. "type": "array",
  16774. "items": {
  16775. "type": "string"
  16776. }
  16777. },
  16778. "GlobalEvent": {
  16779. "type": "object",
  16780. "properties": {
  16781. "directory": {
  16782. "type": "string"
  16783. },
  16784. "project": {
  16785. "type": "string"
  16786. },
  16787. "workspace": {
  16788. "type": "string"
  16789. },
  16790. "payload": {
  16791. "anyOf": [
  16792. {
  16793. "type": "object",
  16794. "properties": {
  16795. "id": {
  16796. "type": "string",
  16797. "pattern": "^evt_"
  16798. },
  16799. "type": {
  16800. "type": "string",
  16801. "enum": ["models-dev.refreshed"]
  16802. },
  16803. "properties": {
  16804. "type": "object",
  16805. "properties": {}
  16806. }
  16807. },
  16808. "required": ["id", "type", "properties"],
  16809. "additionalProperties": false
  16810. },
  16811. {
  16812. "type": "object",
  16813. "properties": {
  16814. "id": {
  16815. "type": "string",
  16816. "pattern": "^evt_"
  16817. },
  16818. "type": {
  16819. "type": "string",
  16820. "enum": ["integration.updated"]
  16821. },
  16822. "properties": {
  16823. "type": "object",
  16824. "properties": {}
  16825. }
  16826. },
  16827. "required": ["id", "type", "properties"],
  16828. "additionalProperties": false
  16829. },
  16830. {
  16831. "type": "object",
  16832. "properties": {
  16833. "id": {
  16834. "type": "string",
  16835. "pattern": "^evt_"
  16836. },
  16837. "type": {
  16838. "type": "string",
  16839. "enum": ["catalog.updated"]
  16840. },
  16841. "properties": {
  16842. "type": "object",
  16843. "properties": {}
  16844. }
  16845. },
  16846. "required": ["id", "type", "properties"],
  16847. "additionalProperties": false
  16848. },
  16849. {
  16850. "type": "object",
  16851. "properties": {
  16852. "id": {
  16853. "type": "string",
  16854. "pattern": "^evt_"
  16855. },
  16856. "type": {
  16857. "type": "string",
  16858. "enum": ["session.created"]
  16859. },
  16860. "properties": {
  16861. "type": "object",
  16862. "properties": {
  16863. "sessionID": {
  16864. "type": "string",
  16865. "pattern": "^ses"
  16866. },
  16867. "info": {
  16868. "$ref": "#/components/schemas/Session"
  16869. }
  16870. },
  16871. "required": ["sessionID", "info"],
  16872. "additionalProperties": false
  16873. }
  16874. },
  16875. "required": ["id", "type", "properties"],
  16876. "additionalProperties": false
  16877. },
  16878. {
  16879. "type": "object",
  16880. "properties": {
  16881. "id": {
  16882. "type": "string",
  16883. "pattern": "^evt_"
  16884. },
  16885. "type": {
  16886. "type": "string",
  16887. "enum": ["session.updated"]
  16888. },
  16889. "properties": {
  16890. "type": "object",
  16891. "properties": {
  16892. "sessionID": {
  16893. "type": "string",
  16894. "pattern": "^ses"
  16895. },
  16896. "info": {
  16897. "$ref": "#/components/schemas/Session"
  16898. }
  16899. },
  16900. "required": ["sessionID", "info"],
  16901. "additionalProperties": false
  16902. }
  16903. },
  16904. "required": ["id", "type", "properties"],
  16905. "additionalProperties": false
  16906. },
  16907. {
  16908. "type": "object",
  16909. "properties": {
  16910. "id": {
  16911. "type": "string",
  16912. "pattern": "^evt_"
  16913. },
  16914. "type": {
  16915. "type": "string",
  16916. "enum": ["session.deleted"]
  16917. },
  16918. "properties": {
  16919. "type": "object",
  16920. "properties": {
  16921. "sessionID": {
  16922. "type": "string",
  16923. "pattern": "^ses"
  16924. },
  16925. "info": {
  16926. "$ref": "#/components/schemas/Session"
  16927. }
  16928. },
  16929. "required": ["sessionID", "info"],
  16930. "additionalProperties": false
  16931. }
  16932. },
  16933. "required": ["id", "type", "properties"],
  16934. "additionalProperties": false
  16935. },
  16936. {
  16937. "type": "object",
  16938. "properties": {
  16939. "id": {
  16940. "type": "string",
  16941. "pattern": "^evt_"
  16942. },
  16943. "type": {
  16944. "type": "string",
  16945. "enum": ["message.updated"]
  16946. },
  16947. "properties": {
  16948. "type": "object",
  16949. "properties": {
  16950. "sessionID": {
  16951. "type": "string",
  16952. "pattern": "^ses"
  16953. },
  16954. "info": {
  16955. "$ref": "#/components/schemas/Message"
  16956. }
  16957. },
  16958. "required": ["sessionID", "info"],
  16959. "additionalProperties": false
  16960. }
  16961. },
  16962. "required": ["id", "type", "properties"],
  16963. "additionalProperties": false
  16964. },
  16965. {
  16966. "type": "object",
  16967. "properties": {
  16968. "id": {
  16969. "type": "string",
  16970. "pattern": "^evt_"
  16971. },
  16972. "type": {
  16973. "type": "string",
  16974. "enum": ["message.removed"]
  16975. },
  16976. "properties": {
  16977. "type": "object",
  16978. "properties": {
  16979. "sessionID": {
  16980. "type": "string",
  16981. "pattern": "^ses"
  16982. },
  16983. "messageID": {
  16984. "type": "string",
  16985. "pattern": "^msg"
  16986. }
  16987. },
  16988. "required": ["sessionID", "messageID"],
  16989. "additionalProperties": false
  16990. }
  16991. },
  16992. "required": ["id", "type", "properties"],
  16993. "additionalProperties": false
  16994. },
  16995. {
  16996. "type": "object",
  16997. "properties": {
  16998. "id": {
  16999. "type": "string",
  17000. "pattern": "^evt_"
  17001. },
  17002. "type": {
  17003. "type": "string",
  17004. "enum": ["message.part.updated"]
  17005. },
  17006. "properties": {
  17007. "type": "object",
  17008. "properties": {
  17009. "sessionID": {
  17010. "type": "string",
  17011. "pattern": "^ses"
  17012. },
  17013. "part": {
  17014. "$ref": "#/components/schemas/Part"
  17015. },
  17016. "time": {
  17017. "type": "number"
  17018. }
  17019. },
  17020. "required": ["sessionID", "part", "time"],
  17021. "additionalProperties": false
  17022. }
  17023. },
  17024. "required": ["id", "type", "properties"],
  17025. "additionalProperties": false
  17026. },
  17027. {
  17028. "type": "object",
  17029. "properties": {
  17030. "id": {
  17031. "type": "string",
  17032. "pattern": "^evt_"
  17033. },
  17034. "type": {
  17035. "type": "string",
  17036. "enum": ["message.part.removed"]
  17037. },
  17038. "properties": {
  17039. "type": "object",
  17040. "properties": {
  17041. "sessionID": {
  17042. "type": "string",
  17043. "pattern": "^ses"
  17044. },
  17045. "messageID": {
  17046. "type": "string",
  17047. "pattern": "^msg"
  17048. },
  17049. "partID": {
  17050. "type": "string",
  17051. "pattern": "^prt"
  17052. }
  17053. },
  17054. "required": ["sessionID", "messageID", "partID"],
  17055. "additionalProperties": false
  17056. }
  17057. },
  17058. "required": ["id", "type", "properties"],
  17059. "additionalProperties": false
  17060. },
  17061. {
  17062. "type": "object",
  17063. "properties": {
  17064. "id": {
  17065. "type": "string",
  17066. "pattern": "^evt_"
  17067. },
  17068. "type": {
  17069. "type": "string",
  17070. "enum": ["session.next.agent.switched"]
  17071. },
  17072. "properties": {
  17073. "type": "object",
  17074. "properties": {
  17075. "timestamp": {
  17076. "type": "number"
  17077. },
  17078. "sessionID": {
  17079. "type": "string",
  17080. "pattern": "^ses"
  17081. },
  17082. "messageID": {
  17083. "type": "string",
  17084. "pattern": "^msg_"
  17085. },
  17086. "agent": {
  17087. "type": "string"
  17088. }
  17089. },
  17090. "required": ["timestamp", "sessionID", "messageID", "agent"],
  17091. "additionalProperties": false
  17092. }
  17093. },
  17094. "required": ["id", "type", "properties"],
  17095. "additionalProperties": false
  17096. },
  17097. {
  17098. "type": "object",
  17099. "properties": {
  17100. "id": {
  17101. "type": "string",
  17102. "pattern": "^evt_"
  17103. },
  17104. "type": {
  17105. "type": "string",
  17106. "enum": ["session.next.model.switched"]
  17107. },
  17108. "properties": {
  17109. "type": "object",
  17110. "properties": {
  17111. "timestamp": {
  17112. "type": "number"
  17113. },
  17114. "sessionID": {
  17115. "type": "string",
  17116. "pattern": "^ses"
  17117. },
  17118. "messageID": {
  17119. "type": "string",
  17120. "pattern": "^msg_"
  17121. },
  17122. "model": {
  17123. "type": "object",
  17124. "properties": {
  17125. "id": {
  17126. "type": "string"
  17127. },
  17128. "providerID": {
  17129. "type": "string"
  17130. },
  17131. "variant": {
  17132. "type": "string"
  17133. }
  17134. },
  17135. "required": ["id", "providerID"],
  17136. "additionalProperties": false
  17137. }
  17138. },
  17139. "required": ["timestamp", "sessionID", "messageID", "model"],
  17140. "additionalProperties": false
  17141. }
  17142. },
  17143. "required": ["id", "type", "properties"],
  17144. "additionalProperties": false
  17145. },
  17146. {
  17147. "type": "object",
  17148. "properties": {
  17149. "id": {
  17150. "type": "string",
  17151. "pattern": "^evt_"
  17152. },
  17153. "type": {
  17154. "type": "string",
  17155. "enum": ["session.next.moved"]
  17156. },
  17157. "properties": {
  17158. "type": "object",
  17159. "properties": {
  17160. "timestamp": {
  17161. "type": "number"
  17162. },
  17163. "sessionID": {
  17164. "type": "string",
  17165. "pattern": "^ses"
  17166. },
  17167. "location": {
  17168. "$ref": "#/components/schemas/LocationRef"
  17169. },
  17170. "subdirectory": {
  17171. "type": "string"
  17172. }
  17173. },
  17174. "required": ["timestamp", "sessionID", "location"],
  17175. "additionalProperties": false
  17176. }
  17177. },
  17178. "required": ["id", "type", "properties"],
  17179. "additionalProperties": false
  17180. },
  17181. {
  17182. "type": "object",
  17183. "properties": {
  17184. "id": {
  17185. "type": "string",
  17186. "pattern": "^evt_"
  17187. },
  17188. "type": {
  17189. "type": "string",
  17190. "enum": ["session.next.prompted"]
  17191. },
  17192. "properties": {
  17193. "type": "object",
  17194. "properties": {
  17195. "timestamp": {
  17196. "type": "number"
  17197. },
  17198. "sessionID": {
  17199. "type": "string",
  17200. "pattern": "^ses"
  17201. },
  17202. "messageID": {
  17203. "type": "string",
  17204. "pattern": "^msg_"
  17205. },
  17206. "prompt": {
  17207. "$ref": "#/components/schemas/Prompt"
  17208. },
  17209. "delivery": {
  17210. "type": "string",
  17211. "enum": ["steer", "queue"]
  17212. }
  17213. },
  17214. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  17215. "additionalProperties": false
  17216. }
  17217. },
  17218. "required": ["id", "type", "properties"],
  17219. "additionalProperties": false
  17220. },
  17221. {
  17222. "type": "object",
  17223. "properties": {
  17224. "id": {
  17225. "type": "string",
  17226. "pattern": "^evt_"
  17227. },
  17228. "type": {
  17229. "type": "string",
  17230. "enum": ["session.next.prompt.admitted"]
  17231. },
  17232. "properties": {
  17233. "type": "object",
  17234. "properties": {
  17235. "timestamp": {
  17236. "type": "number"
  17237. },
  17238. "sessionID": {
  17239. "type": "string",
  17240. "pattern": "^ses"
  17241. },
  17242. "messageID": {
  17243. "type": "string",
  17244. "pattern": "^msg_"
  17245. },
  17246. "prompt": {
  17247. "$ref": "#/components/schemas/Prompt"
  17248. },
  17249. "delivery": {
  17250. "type": "string",
  17251. "enum": ["steer", "queue"]
  17252. }
  17253. },
  17254. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  17255. "additionalProperties": false
  17256. }
  17257. },
  17258. "required": ["id", "type", "properties"],
  17259. "additionalProperties": false
  17260. },
  17261. {
  17262. "type": "object",
  17263. "properties": {
  17264. "id": {
  17265. "type": "string",
  17266. "pattern": "^evt_"
  17267. },
  17268. "type": {
  17269. "type": "string",
  17270. "enum": ["session.next.prompt.promoted"]
  17271. },
  17272. "properties": {
  17273. "type": "object",
  17274. "properties": {
  17275. "timestamp": {
  17276. "type": "number"
  17277. },
  17278. "sessionID": {
  17279. "type": "string",
  17280. "pattern": "^ses"
  17281. },
  17282. "messageID": {
  17283. "type": "string",
  17284. "pattern": "^msg_"
  17285. },
  17286. "prompt": {
  17287. "$ref": "#/components/schemas/Prompt"
  17288. },
  17289. "timeCreated": {
  17290. "type": "number"
  17291. }
  17292. },
  17293. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  17294. "additionalProperties": false
  17295. }
  17296. },
  17297. "required": ["id", "type", "properties"],
  17298. "additionalProperties": false
  17299. },
  17300. {
  17301. "type": "object",
  17302. "properties": {
  17303. "id": {
  17304. "type": "string",
  17305. "pattern": "^evt_"
  17306. },
  17307. "type": {
  17308. "type": "string",
  17309. "enum": ["session.next.interrupt.requested"]
  17310. },
  17311. "properties": {
  17312. "type": "object",
  17313. "properties": {
  17314. "timestamp": {
  17315. "type": "number"
  17316. },
  17317. "sessionID": {
  17318. "type": "string",
  17319. "pattern": "^ses"
  17320. }
  17321. },
  17322. "required": ["timestamp", "sessionID"],
  17323. "additionalProperties": false
  17324. }
  17325. },
  17326. "required": ["id", "type", "properties"],
  17327. "additionalProperties": false
  17328. },
  17329. {
  17330. "type": "object",
  17331. "properties": {
  17332. "id": {
  17333. "type": "string",
  17334. "pattern": "^evt_"
  17335. },
  17336. "type": {
  17337. "type": "string",
  17338. "enum": ["session.next.context.updated"]
  17339. },
  17340. "properties": {
  17341. "type": "object",
  17342. "properties": {
  17343. "timestamp": {
  17344. "type": "number"
  17345. },
  17346. "sessionID": {
  17347. "type": "string",
  17348. "pattern": "^ses"
  17349. },
  17350. "messageID": {
  17351. "type": "string",
  17352. "pattern": "^msg_"
  17353. },
  17354. "text": {
  17355. "type": "string"
  17356. }
  17357. },
  17358. "required": ["timestamp", "sessionID", "messageID", "text"],
  17359. "additionalProperties": false
  17360. }
  17361. },
  17362. "required": ["id", "type", "properties"],
  17363. "additionalProperties": false
  17364. },
  17365. {
  17366. "type": "object",
  17367. "properties": {
  17368. "id": {
  17369. "type": "string",
  17370. "pattern": "^evt_"
  17371. },
  17372. "type": {
  17373. "type": "string",
  17374. "enum": ["session.next.synthetic"]
  17375. },
  17376. "properties": {
  17377. "type": "object",
  17378. "properties": {
  17379. "timestamp": {
  17380. "type": "number"
  17381. },
  17382. "sessionID": {
  17383. "type": "string",
  17384. "pattern": "^ses"
  17385. },
  17386. "messageID": {
  17387. "type": "string",
  17388. "pattern": "^msg_"
  17389. },
  17390. "text": {
  17391. "type": "string"
  17392. }
  17393. },
  17394. "required": ["timestamp", "sessionID", "messageID", "text"],
  17395. "additionalProperties": false
  17396. }
  17397. },
  17398. "required": ["id", "type", "properties"],
  17399. "additionalProperties": false
  17400. },
  17401. {
  17402. "type": "object",
  17403. "properties": {
  17404. "id": {
  17405. "type": "string",
  17406. "pattern": "^evt_"
  17407. },
  17408. "type": {
  17409. "type": "string",
  17410. "enum": ["session.next.shell.started"]
  17411. },
  17412. "properties": {
  17413. "type": "object",
  17414. "properties": {
  17415. "timestamp": {
  17416. "type": "number"
  17417. },
  17418. "sessionID": {
  17419. "type": "string",
  17420. "pattern": "^ses"
  17421. },
  17422. "messageID": {
  17423. "type": "string",
  17424. "pattern": "^msg_"
  17425. },
  17426. "callID": {
  17427. "type": "string"
  17428. },
  17429. "command": {
  17430. "type": "string"
  17431. }
  17432. },
  17433. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  17434. "additionalProperties": false
  17435. }
  17436. },
  17437. "required": ["id", "type", "properties"],
  17438. "additionalProperties": false
  17439. },
  17440. {
  17441. "type": "object",
  17442. "properties": {
  17443. "id": {
  17444. "type": "string",
  17445. "pattern": "^evt_"
  17446. },
  17447. "type": {
  17448. "type": "string",
  17449. "enum": ["session.next.shell.ended"]
  17450. },
  17451. "properties": {
  17452. "type": "object",
  17453. "properties": {
  17454. "timestamp": {
  17455. "type": "number"
  17456. },
  17457. "sessionID": {
  17458. "type": "string",
  17459. "pattern": "^ses"
  17460. },
  17461. "callID": {
  17462. "type": "string"
  17463. },
  17464. "output": {
  17465. "type": "string"
  17466. }
  17467. },
  17468. "required": ["timestamp", "sessionID", "callID", "output"],
  17469. "additionalProperties": false
  17470. }
  17471. },
  17472. "required": ["id", "type", "properties"],
  17473. "additionalProperties": false
  17474. },
  17475. {
  17476. "type": "object",
  17477. "properties": {
  17478. "id": {
  17479. "type": "string",
  17480. "pattern": "^evt_"
  17481. },
  17482. "type": {
  17483. "type": "string",
  17484. "enum": ["session.next.step.started"]
  17485. },
  17486. "properties": {
  17487. "type": "object",
  17488. "properties": {
  17489. "timestamp": {
  17490. "type": "number"
  17491. },
  17492. "sessionID": {
  17493. "type": "string",
  17494. "pattern": "^ses"
  17495. },
  17496. "assistantMessageID": {
  17497. "type": "string",
  17498. "pattern": "^msg_"
  17499. },
  17500. "agent": {
  17501. "type": "string"
  17502. },
  17503. "model": {
  17504. "type": "object",
  17505. "properties": {
  17506. "id": {
  17507. "type": "string"
  17508. },
  17509. "providerID": {
  17510. "type": "string"
  17511. },
  17512. "variant": {
  17513. "type": "string"
  17514. }
  17515. },
  17516. "required": ["id", "providerID"],
  17517. "additionalProperties": false
  17518. },
  17519. "snapshot": {
  17520. "type": "string"
  17521. }
  17522. },
  17523. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  17524. "additionalProperties": false
  17525. }
  17526. },
  17527. "required": ["id", "type", "properties"],
  17528. "additionalProperties": false
  17529. },
  17530. {
  17531. "type": "object",
  17532. "properties": {
  17533. "id": {
  17534. "type": "string",
  17535. "pattern": "^evt_"
  17536. },
  17537. "type": {
  17538. "type": "string",
  17539. "enum": ["session.next.step.ended"]
  17540. },
  17541. "properties": {
  17542. "type": "object",
  17543. "properties": {
  17544. "timestamp": {
  17545. "type": "number"
  17546. },
  17547. "sessionID": {
  17548. "type": "string",
  17549. "pattern": "^ses"
  17550. },
  17551. "assistantMessageID": {
  17552. "type": "string",
  17553. "pattern": "^msg_"
  17554. },
  17555. "finish": {
  17556. "type": "string"
  17557. },
  17558. "cost": {
  17559. "type": "number"
  17560. },
  17561. "tokens": {
  17562. "type": "object",
  17563. "properties": {
  17564. "input": {
  17565. "type": "number"
  17566. },
  17567. "output": {
  17568. "type": "number"
  17569. },
  17570. "reasoning": {
  17571. "type": "number"
  17572. },
  17573. "cache": {
  17574. "type": "object",
  17575. "properties": {
  17576. "read": {
  17577. "type": "number"
  17578. },
  17579. "write": {
  17580. "type": "number"
  17581. }
  17582. },
  17583. "required": ["read", "write"],
  17584. "additionalProperties": false
  17585. }
  17586. },
  17587. "required": ["input", "output", "reasoning", "cache"],
  17588. "additionalProperties": false
  17589. },
  17590. "snapshot": {
  17591. "type": "string"
  17592. }
  17593. },
  17594. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  17595. "additionalProperties": false
  17596. }
  17597. },
  17598. "required": ["id", "type", "properties"],
  17599. "additionalProperties": false
  17600. },
  17601. {
  17602. "type": "object",
  17603. "properties": {
  17604. "id": {
  17605. "type": "string",
  17606. "pattern": "^evt_"
  17607. },
  17608. "type": {
  17609. "type": "string",
  17610. "enum": ["session.next.step.failed"]
  17611. },
  17612. "properties": {
  17613. "type": "object",
  17614. "properties": {
  17615. "timestamp": {
  17616. "type": "number"
  17617. },
  17618. "sessionID": {
  17619. "type": "string",
  17620. "pattern": "^ses"
  17621. },
  17622. "assistantMessageID": {
  17623. "type": "string",
  17624. "pattern": "^msg_"
  17625. },
  17626. "error": {
  17627. "$ref": "#/components/schemas/SessionErrorUnknown"
  17628. }
  17629. },
  17630. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  17631. "additionalProperties": false
  17632. }
  17633. },
  17634. "required": ["id", "type", "properties"],
  17635. "additionalProperties": false
  17636. },
  17637. {
  17638. "type": "object",
  17639. "properties": {
  17640. "id": {
  17641. "type": "string",
  17642. "pattern": "^evt_"
  17643. },
  17644. "type": {
  17645. "type": "string",
  17646. "enum": ["session.next.text.started"]
  17647. },
  17648. "properties": {
  17649. "type": "object",
  17650. "properties": {
  17651. "timestamp": {
  17652. "type": "number"
  17653. },
  17654. "sessionID": {
  17655. "type": "string",
  17656. "pattern": "^ses"
  17657. },
  17658. "assistantMessageID": {
  17659. "type": "string",
  17660. "pattern": "^msg_"
  17661. },
  17662. "textID": {
  17663. "type": "string"
  17664. }
  17665. },
  17666. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  17667. "additionalProperties": false
  17668. }
  17669. },
  17670. "required": ["id", "type", "properties"],
  17671. "additionalProperties": false
  17672. },
  17673. {
  17674. "type": "object",
  17675. "properties": {
  17676. "id": {
  17677. "type": "string",
  17678. "pattern": "^evt_"
  17679. },
  17680. "type": {
  17681. "type": "string",
  17682. "enum": ["session.next.text.delta"]
  17683. },
  17684. "properties": {
  17685. "type": "object",
  17686. "properties": {
  17687. "timestamp": {
  17688. "type": "number"
  17689. },
  17690. "sessionID": {
  17691. "type": "string",
  17692. "pattern": "^ses"
  17693. },
  17694. "assistantMessageID": {
  17695. "type": "string",
  17696. "pattern": "^msg_"
  17697. },
  17698. "textID": {
  17699. "type": "string"
  17700. },
  17701. "delta": {
  17702. "type": "string"
  17703. }
  17704. },
  17705. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  17706. "additionalProperties": false
  17707. }
  17708. },
  17709. "required": ["id", "type", "properties"],
  17710. "additionalProperties": false
  17711. },
  17712. {
  17713. "type": "object",
  17714. "properties": {
  17715. "id": {
  17716. "type": "string",
  17717. "pattern": "^evt_"
  17718. },
  17719. "type": {
  17720. "type": "string",
  17721. "enum": ["session.next.text.ended"]
  17722. },
  17723. "properties": {
  17724. "type": "object",
  17725. "properties": {
  17726. "timestamp": {
  17727. "type": "number"
  17728. },
  17729. "sessionID": {
  17730. "type": "string",
  17731. "pattern": "^ses"
  17732. },
  17733. "assistantMessageID": {
  17734. "type": "string",
  17735. "pattern": "^msg_"
  17736. },
  17737. "textID": {
  17738. "type": "string"
  17739. },
  17740. "text": {
  17741. "type": "string"
  17742. }
  17743. },
  17744. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  17745. "additionalProperties": false
  17746. }
  17747. },
  17748. "required": ["id", "type", "properties"],
  17749. "additionalProperties": false
  17750. },
  17751. {
  17752. "type": "object",
  17753. "properties": {
  17754. "id": {
  17755. "type": "string",
  17756. "pattern": "^evt_"
  17757. },
  17758. "type": {
  17759. "type": "string",
  17760. "enum": ["session.next.reasoning.started"]
  17761. },
  17762. "properties": {
  17763. "type": "object",
  17764. "properties": {
  17765. "timestamp": {
  17766. "type": "number"
  17767. },
  17768. "sessionID": {
  17769. "type": "string",
  17770. "pattern": "^ses"
  17771. },
  17772. "assistantMessageID": {
  17773. "type": "string",
  17774. "pattern": "^msg_"
  17775. },
  17776. "reasoningID": {
  17777. "type": "string"
  17778. },
  17779. "providerMetadata": {
  17780. "type": "object",
  17781. "additionalProperties": {
  17782. "type": "object"
  17783. }
  17784. }
  17785. },
  17786. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  17787. "additionalProperties": false
  17788. }
  17789. },
  17790. "required": ["id", "type", "properties"],
  17791. "additionalProperties": false
  17792. },
  17793. {
  17794. "type": "object",
  17795. "properties": {
  17796. "id": {
  17797. "type": "string",
  17798. "pattern": "^evt_"
  17799. },
  17800. "type": {
  17801. "type": "string",
  17802. "enum": ["session.next.reasoning.delta"]
  17803. },
  17804. "properties": {
  17805. "type": "object",
  17806. "properties": {
  17807. "timestamp": {
  17808. "type": "number"
  17809. },
  17810. "sessionID": {
  17811. "type": "string",
  17812. "pattern": "^ses"
  17813. },
  17814. "assistantMessageID": {
  17815. "type": "string",
  17816. "pattern": "^msg_"
  17817. },
  17818. "reasoningID": {
  17819. "type": "string"
  17820. },
  17821. "delta": {
  17822. "type": "string"
  17823. }
  17824. },
  17825. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  17826. "additionalProperties": false
  17827. }
  17828. },
  17829. "required": ["id", "type", "properties"],
  17830. "additionalProperties": false
  17831. },
  17832. {
  17833. "type": "object",
  17834. "properties": {
  17835. "id": {
  17836. "type": "string",
  17837. "pattern": "^evt_"
  17838. },
  17839. "type": {
  17840. "type": "string",
  17841. "enum": ["session.next.reasoning.ended"]
  17842. },
  17843. "properties": {
  17844. "type": "object",
  17845. "properties": {
  17846. "timestamp": {
  17847. "type": "number"
  17848. },
  17849. "sessionID": {
  17850. "type": "string",
  17851. "pattern": "^ses"
  17852. },
  17853. "assistantMessageID": {
  17854. "type": "string",
  17855. "pattern": "^msg_"
  17856. },
  17857. "reasoningID": {
  17858. "type": "string"
  17859. },
  17860. "text": {
  17861. "type": "string"
  17862. },
  17863. "providerMetadata": {
  17864. "type": "object",
  17865. "additionalProperties": {
  17866. "type": "object"
  17867. }
  17868. }
  17869. },
  17870. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  17871. "additionalProperties": false
  17872. }
  17873. },
  17874. "required": ["id", "type", "properties"],
  17875. "additionalProperties": false
  17876. },
  17877. {
  17878. "type": "object",
  17879. "properties": {
  17880. "id": {
  17881. "type": "string",
  17882. "pattern": "^evt_"
  17883. },
  17884. "type": {
  17885. "type": "string",
  17886. "enum": ["session.next.tool.input.started"]
  17887. },
  17888. "properties": {
  17889. "type": "object",
  17890. "properties": {
  17891. "timestamp": {
  17892. "type": "number"
  17893. },
  17894. "sessionID": {
  17895. "type": "string",
  17896. "pattern": "^ses"
  17897. },
  17898. "assistantMessageID": {
  17899. "type": "string",
  17900. "pattern": "^msg_"
  17901. },
  17902. "callID": {
  17903. "type": "string"
  17904. },
  17905. "name": {
  17906. "type": "string"
  17907. }
  17908. },
  17909. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  17910. "additionalProperties": false
  17911. }
  17912. },
  17913. "required": ["id", "type", "properties"],
  17914. "additionalProperties": false
  17915. },
  17916. {
  17917. "type": "object",
  17918. "properties": {
  17919. "id": {
  17920. "type": "string",
  17921. "pattern": "^evt_"
  17922. },
  17923. "type": {
  17924. "type": "string",
  17925. "enum": ["session.next.tool.input.delta"]
  17926. },
  17927. "properties": {
  17928. "type": "object",
  17929. "properties": {
  17930. "timestamp": {
  17931. "type": "number"
  17932. },
  17933. "sessionID": {
  17934. "type": "string",
  17935. "pattern": "^ses"
  17936. },
  17937. "assistantMessageID": {
  17938. "type": "string",
  17939. "pattern": "^msg_"
  17940. },
  17941. "callID": {
  17942. "type": "string"
  17943. },
  17944. "delta": {
  17945. "type": "string"
  17946. }
  17947. },
  17948. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  17949. "additionalProperties": false
  17950. }
  17951. },
  17952. "required": ["id", "type", "properties"],
  17953. "additionalProperties": false
  17954. },
  17955. {
  17956. "type": "object",
  17957. "properties": {
  17958. "id": {
  17959. "type": "string",
  17960. "pattern": "^evt_"
  17961. },
  17962. "type": {
  17963. "type": "string",
  17964. "enum": ["session.next.tool.input.ended"]
  17965. },
  17966. "properties": {
  17967. "type": "object",
  17968. "properties": {
  17969. "timestamp": {
  17970. "type": "number"
  17971. },
  17972. "sessionID": {
  17973. "type": "string",
  17974. "pattern": "^ses"
  17975. },
  17976. "assistantMessageID": {
  17977. "type": "string",
  17978. "pattern": "^msg_"
  17979. },
  17980. "callID": {
  17981. "type": "string"
  17982. },
  17983. "text": {
  17984. "type": "string"
  17985. }
  17986. },
  17987. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  17988. "additionalProperties": false
  17989. }
  17990. },
  17991. "required": ["id", "type", "properties"],
  17992. "additionalProperties": false
  17993. },
  17994. {
  17995. "type": "object",
  17996. "properties": {
  17997. "id": {
  17998. "type": "string",
  17999. "pattern": "^evt_"
  18000. },
  18001. "type": {
  18002. "type": "string",
  18003. "enum": ["session.next.tool.called"]
  18004. },
  18005. "properties": {
  18006. "type": "object",
  18007. "properties": {
  18008. "timestamp": {
  18009. "type": "number"
  18010. },
  18011. "sessionID": {
  18012. "type": "string",
  18013. "pattern": "^ses"
  18014. },
  18015. "assistantMessageID": {
  18016. "type": "string",
  18017. "pattern": "^msg_"
  18018. },
  18019. "callID": {
  18020. "type": "string"
  18021. },
  18022. "tool": {
  18023. "type": "string"
  18024. },
  18025. "input": {
  18026. "type": "object"
  18027. },
  18028. "provider": {
  18029. "type": "object",
  18030. "properties": {
  18031. "executed": {
  18032. "type": "boolean"
  18033. },
  18034. "metadata": {
  18035. "type": "object",
  18036. "additionalProperties": {
  18037. "type": "object"
  18038. }
  18039. }
  18040. },
  18041. "required": ["executed"],
  18042. "additionalProperties": false
  18043. }
  18044. },
  18045. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  18046. "additionalProperties": false
  18047. }
  18048. },
  18049. "required": ["id", "type", "properties"],
  18050. "additionalProperties": false
  18051. },
  18052. {
  18053. "type": "object",
  18054. "properties": {
  18055. "id": {
  18056. "type": "string",
  18057. "pattern": "^evt_"
  18058. },
  18059. "type": {
  18060. "type": "string",
  18061. "enum": ["session.next.tool.progress"]
  18062. },
  18063. "properties": {
  18064. "type": "object",
  18065. "properties": {
  18066. "timestamp": {
  18067. "type": "number"
  18068. },
  18069. "sessionID": {
  18070. "type": "string",
  18071. "pattern": "^ses"
  18072. },
  18073. "assistantMessageID": {
  18074. "type": "string",
  18075. "pattern": "^msg_"
  18076. },
  18077. "callID": {
  18078. "type": "string"
  18079. },
  18080. "structured": {
  18081. "type": "object"
  18082. },
  18083. "content": {
  18084. "type": "array",
  18085. "items": {
  18086. "anyOf": [
  18087. {
  18088. "$ref": "#/components/schemas/ToolTextContent"
  18089. },
  18090. {
  18091. "$ref": "#/components/schemas/ToolFileContent"
  18092. }
  18093. ]
  18094. }
  18095. }
  18096. },
  18097. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  18098. "additionalProperties": false
  18099. }
  18100. },
  18101. "required": ["id", "type", "properties"],
  18102. "additionalProperties": false
  18103. },
  18104. {
  18105. "type": "object",
  18106. "properties": {
  18107. "id": {
  18108. "type": "string",
  18109. "pattern": "^evt_"
  18110. },
  18111. "type": {
  18112. "type": "string",
  18113. "enum": ["session.next.tool.success"]
  18114. },
  18115. "properties": {
  18116. "type": "object",
  18117. "properties": {
  18118. "timestamp": {
  18119. "type": "number"
  18120. },
  18121. "sessionID": {
  18122. "type": "string",
  18123. "pattern": "^ses"
  18124. },
  18125. "assistantMessageID": {
  18126. "type": "string",
  18127. "pattern": "^msg_"
  18128. },
  18129. "callID": {
  18130. "type": "string"
  18131. },
  18132. "structured": {
  18133. "type": "object"
  18134. },
  18135. "content": {
  18136. "type": "array",
  18137. "items": {
  18138. "anyOf": [
  18139. {
  18140. "$ref": "#/components/schemas/ToolTextContent"
  18141. },
  18142. {
  18143. "$ref": "#/components/schemas/ToolFileContent"
  18144. }
  18145. ]
  18146. }
  18147. },
  18148. "outputPaths": {
  18149. "type": "array",
  18150. "items": {
  18151. "type": "string"
  18152. }
  18153. },
  18154. "result": {},
  18155. "provider": {
  18156. "type": "object",
  18157. "properties": {
  18158. "executed": {
  18159. "type": "boolean"
  18160. },
  18161. "metadata": {
  18162. "type": "object",
  18163. "additionalProperties": {
  18164. "type": "object"
  18165. }
  18166. }
  18167. },
  18168. "required": ["executed"],
  18169. "additionalProperties": false
  18170. }
  18171. },
  18172. "required": [
  18173. "timestamp",
  18174. "sessionID",
  18175. "assistantMessageID",
  18176. "callID",
  18177. "structured",
  18178. "content",
  18179. "provider"
  18180. ],
  18181. "additionalProperties": false
  18182. }
  18183. },
  18184. "required": ["id", "type", "properties"],
  18185. "additionalProperties": false
  18186. },
  18187. {
  18188. "type": "object",
  18189. "properties": {
  18190. "id": {
  18191. "type": "string",
  18192. "pattern": "^evt_"
  18193. },
  18194. "type": {
  18195. "type": "string",
  18196. "enum": ["session.next.tool.failed"]
  18197. },
  18198. "properties": {
  18199. "type": "object",
  18200. "properties": {
  18201. "timestamp": {
  18202. "type": "number"
  18203. },
  18204. "sessionID": {
  18205. "type": "string",
  18206. "pattern": "^ses"
  18207. },
  18208. "assistantMessageID": {
  18209. "type": "string",
  18210. "pattern": "^msg_"
  18211. },
  18212. "callID": {
  18213. "type": "string"
  18214. },
  18215. "error": {
  18216. "$ref": "#/components/schemas/SessionErrorUnknown"
  18217. },
  18218. "result": {},
  18219. "provider": {
  18220. "type": "object",
  18221. "properties": {
  18222. "executed": {
  18223. "type": "boolean"
  18224. },
  18225. "metadata": {
  18226. "type": "object",
  18227. "additionalProperties": {
  18228. "type": "object"
  18229. }
  18230. }
  18231. },
  18232. "required": ["executed"],
  18233. "additionalProperties": false
  18234. }
  18235. },
  18236. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  18237. "additionalProperties": false
  18238. }
  18239. },
  18240. "required": ["id", "type", "properties"],
  18241. "additionalProperties": false
  18242. },
  18243. {
  18244. "type": "object",
  18245. "properties": {
  18246. "id": {
  18247. "type": "string",
  18248. "pattern": "^evt_"
  18249. },
  18250. "type": {
  18251. "type": "string",
  18252. "enum": ["session.next.retried"]
  18253. },
  18254. "properties": {
  18255. "type": "object",
  18256. "properties": {
  18257. "timestamp": {
  18258. "type": "number"
  18259. },
  18260. "sessionID": {
  18261. "type": "string",
  18262. "pattern": "^ses"
  18263. },
  18264. "attempt": {
  18265. "type": "number"
  18266. },
  18267. "error": {
  18268. "$ref": "#/components/schemas/SessionNextRetry_error"
  18269. }
  18270. },
  18271. "required": ["timestamp", "sessionID", "attempt", "error"],
  18272. "additionalProperties": false
  18273. }
  18274. },
  18275. "required": ["id", "type", "properties"],
  18276. "additionalProperties": false
  18277. },
  18278. {
  18279. "type": "object",
  18280. "properties": {
  18281. "id": {
  18282. "type": "string",
  18283. "pattern": "^evt_"
  18284. },
  18285. "type": {
  18286. "type": "string",
  18287. "enum": ["session.next.compaction.started"]
  18288. },
  18289. "properties": {
  18290. "type": "object",
  18291. "properties": {
  18292. "timestamp": {
  18293. "type": "number"
  18294. },
  18295. "sessionID": {
  18296. "type": "string",
  18297. "pattern": "^ses"
  18298. },
  18299. "messageID": {
  18300. "type": "string",
  18301. "pattern": "^msg_"
  18302. },
  18303. "reason": {
  18304. "type": "string",
  18305. "enum": ["auto", "manual"]
  18306. }
  18307. },
  18308. "required": ["timestamp", "sessionID", "messageID", "reason"],
  18309. "additionalProperties": false
  18310. }
  18311. },
  18312. "required": ["id", "type", "properties"],
  18313. "additionalProperties": false
  18314. },
  18315. {
  18316. "type": "object",
  18317. "properties": {
  18318. "id": {
  18319. "type": "string",
  18320. "pattern": "^evt_"
  18321. },
  18322. "type": {
  18323. "type": "string",
  18324. "enum": ["session.next.compaction.delta"]
  18325. },
  18326. "properties": {
  18327. "type": "object",
  18328. "properties": {
  18329. "timestamp": {
  18330. "type": "number"
  18331. },
  18332. "sessionID": {
  18333. "type": "string",
  18334. "pattern": "^ses"
  18335. },
  18336. "messageID": {
  18337. "type": "string",
  18338. "pattern": "^msg_"
  18339. },
  18340. "text": {
  18341. "type": "string"
  18342. }
  18343. },
  18344. "required": ["timestamp", "sessionID", "messageID", "text"],
  18345. "additionalProperties": false
  18346. }
  18347. },
  18348. "required": ["id", "type", "properties"],
  18349. "additionalProperties": false
  18350. },
  18351. {
  18352. "type": "object",
  18353. "properties": {
  18354. "id": {
  18355. "type": "string",
  18356. "pattern": "^evt_"
  18357. },
  18358. "type": {
  18359. "type": "string",
  18360. "enum": ["session.next.compaction.ended"]
  18361. },
  18362. "properties": {
  18363. "type": "object",
  18364. "properties": {
  18365. "timestamp": {
  18366. "type": "number"
  18367. },
  18368. "sessionID": {
  18369. "type": "string",
  18370. "pattern": "^ses"
  18371. },
  18372. "messageID": {
  18373. "type": "string",
  18374. "pattern": "^msg_"
  18375. },
  18376. "reason": {
  18377. "type": "string",
  18378. "enum": ["auto", "manual"]
  18379. },
  18380. "text": {
  18381. "type": "string"
  18382. },
  18383. "recent": {
  18384. "type": "string"
  18385. }
  18386. },
  18387. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  18388. "additionalProperties": false
  18389. }
  18390. },
  18391. "required": ["id", "type", "properties"],
  18392. "additionalProperties": false
  18393. },
  18394. {
  18395. "type": "object",
  18396. "properties": {
  18397. "id": {
  18398. "type": "string",
  18399. "pattern": "^evt_"
  18400. },
  18401. "type": {
  18402. "type": "string",
  18403. "enum": ["message.part.delta"]
  18404. },
  18405. "properties": {
  18406. "type": "object",
  18407. "properties": {
  18408. "sessionID": {
  18409. "type": "string",
  18410. "pattern": "^ses"
  18411. },
  18412. "messageID": {
  18413. "type": "string",
  18414. "pattern": "^msg"
  18415. },
  18416. "partID": {
  18417. "type": "string",
  18418. "pattern": "^prt"
  18419. },
  18420. "field": {
  18421. "type": "string"
  18422. },
  18423. "delta": {
  18424. "type": "string"
  18425. }
  18426. },
  18427. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  18428. "additionalProperties": false
  18429. }
  18430. },
  18431. "required": ["id", "type", "properties"],
  18432. "additionalProperties": false
  18433. },
  18434. {
  18435. "type": "object",
  18436. "properties": {
  18437. "id": {
  18438. "type": "string",
  18439. "pattern": "^evt_"
  18440. },
  18441. "type": {
  18442. "type": "string",
  18443. "enum": ["session.diff"]
  18444. },
  18445. "properties": {
  18446. "type": "object",
  18447. "properties": {
  18448. "sessionID": {
  18449. "type": "string",
  18450. "pattern": "^ses"
  18451. },
  18452. "diff": {
  18453. "type": "array",
  18454. "items": {
  18455. "$ref": "#/components/schemas/SnapshotFileDiff"
  18456. }
  18457. }
  18458. },
  18459. "required": ["sessionID", "diff"],
  18460. "additionalProperties": false
  18461. }
  18462. },
  18463. "required": ["id", "type", "properties"],
  18464. "additionalProperties": false
  18465. },
  18466. {
  18467. "type": "object",
  18468. "properties": {
  18469. "id": {
  18470. "type": "string",
  18471. "pattern": "^evt_"
  18472. },
  18473. "type": {
  18474. "type": "string",
  18475. "enum": ["session.error"]
  18476. },
  18477. "properties": {
  18478. "type": "object",
  18479. "properties": {
  18480. "sessionID": {
  18481. "type": "string",
  18482. "pattern": "^ses"
  18483. },
  18484. "error": {
  18485. "anyOf": [
  18486. {
  18487. "$ref": "#/components/schemas/ProviderAuthError"
  18488. },
  18489. {
  18490. "$ref": "#/components/schemas/UnknownError"
  18491. },
  18492. {
  18493. "$ref": "#/components/schemas/MessageOutputLengthError"
  18494. },
  18495. {
  18496. "$ref": "#/components/schemas/MessageAbortedError"
  18497. },
  18498. {
  18499. "$ref": "#/components/schemas/StructuredOutputError"
  18500. },
  18501. {
  18502. "$ref": "#/components/schemas/ContextOverflowError"
  18503. },
  18504. {
  18505. "$ref": "#/components/schemas/ContentFilterError"
  18506. },
  18507. {
  18508. "$ref": "#/components/schemas/APIError"
  18509. }
  18510. ]
  18511. }
  18512. },
  18513. "additionalProperties": false
  18514. }
  18515. },
  18516. "required": ["id", "type", "properties"],
  18517. "additionalProperties": false
  18518. },
  18519. {
  18520. "type": "object",
  18521. "properties": {
  18522. "id": {
  18523. "type": "string",
  18524. "pattern": "^evt_"
  18525. },
  18526. "type": {
  18527. "type": "string",
  18528. "enum": ["installation.updated"]
  18529. },
  18530. "properties": {
  18531. "type": "object",
  18532. "properties": {
  18533. "version": {
  18534. "type": "string"
  18535. }
  18536. },
  18537. "required": ["version"],
  18538. "additionalProperties": false
  18539. }
  18540. },
  18541. "required": ["id", "type", "properties"],
  18542. "additionalProperties": false
  18543. },
  18544. {
  18545. "type": "object",
  18546. "properties": {
  18547. "id": {
  18548. "type": "string",
  18549. "pattern": "^evt_"
  18550. },
  18551. "type": {
  18552. "type": "string",
  18553. "enum": ["installation.update-available"]
  18554. },
  18555. "properties": {
  18556. "type": "object",
  18557. "properties": {
  18558. "version": {
  18559. "type": "string"
  18560. }
  18561. },
  18562. "required": ["version"],
  18563. "additionalProperties": false
  18564. }
  18565. },
  18566. "required": ["id", "type", "properties"],
  18567. "additionalProperties": false
  18568. },
  18569. {
  18570. "type": "object",
  18571. "properties": {
  18572. "id": {
  18573. "type": "string",
  18574. "pattern": "^evt_"
  18575. },
  18576. "type": {
  18577. "type": "string",
  18578. "enum": ["file.edited"]
  18579. },
  18580. "properties": {
  18581. "type": "object",
  18582. "properties": {
  18583. "file": {
  18584. "type": "string"
  18585. }
  18586. },
  18587. "required": ["file"],
  18588. "additionalProperties": false
  18589. }
  18590. },
  18591. "required": ["id", "type", "properties"],
  18592. "additionalProperties": false
  18593. },
  18594. {
  18595. "type": "object",
  18596. "properties": {
  18597. "id": {
  18598. "type": "string",
  18599. "pattern": "^evt_"
  18600. },
  18601. "type": {
  18602. "type": "string",
  18603. "enum": ["plugin.added"]
  18604. },
  18605. "properties": {
  18606. "type": "object",
  18607. "properties": {
  18608. "id": {
  18609. "type": "string"
  18610. }
  18611. },
  18612. "required": ["id"],
  18613. "additionalProperties": false
  18614. }
  18615. },
  18616. "required": ["id", "type", "properties"],
  18617. "additionalProperties": false
  18618. },
  18619. {
  18620. "type": "object",
  18621. "properties": {
  18622. "id": {
  18623. "type": "string",
  18624. "pattern": "^evt_"
  18625. },
  18626. "type": {
  18627. "type": "string",
  18628. "enum": ["permission.v2.asked"]
  18629. },
  18630. "properties": {
  18631. "type": "object",
  18632. "properties": {
  18633. "id": {
  18634. "type": "string",
  18635. "pattern": "^per"
  18636. },
  18637. "sessionID": {
  18638. "type": "string",
  18639. "pattern": "^ses"
  18640. },
  18641. "action": {
  18642. "type": "string"
  18643. },
  18644. "resources": {
  18645. "type": "array",
  18646. "items": {
  18647. "type": "string"
  18648. }
  18649. },
  18650. "save": {
  18651. "type": "array",
  18652. "items": {
  18653. "type": "string"
  18654. }
  18655. },
  18656. "metadata": {
  18657. "type": "object"
  18658. },
  18659. "source": {
  18660. "$ref": "#/components/schemas/PermissionV2Source"
  18661. }
  18662. },
  18663. "required": ["id", "sessionID", "action", "resources"],
  18664. "additionalProperties": false
  18665. }
  18666. },
  18667. "required": ["id", "type", "properties"],
  18668. "additionalProperties": false
  18669. },
  18670. {
  18671. "type": "object",
  18672. "properties": {
  18673. "id": {
  18674. "type": "string",
  18675. "pattern": "^evt_"
  18676. },
  18677. "type": {
  18678. "type": "string",
  18679. "enum": ["permission.v2.replied"]
  18680. },
  18681. "properties": {
  18682. "type": "object",
  18683. "properties": {
  18684. "sessionID": {
  18685. "type": "string",
  18686. "pattern": "^ses"
  18687. },
  18688. "requestID": {
  18689. "type": "string",
  18690. "pattern": "^per"
  18691. },
  18692. "reply": {
  18693. "$ref": "#/components/schemas/PermissionV2Reply"
  18694. }
  18695. },
  18696. "required": ["sessionID", "requestID", "reply"],
  18697. "additionalProperties": false
  18698. }
  18699. },
  18700. "required": ["id", "type", "properties"],
  18701. "additionalProperties": false
  18702. },
  18703. {
  18704. "type": "object",
  18705. "properties": {
  18706. "id": {
  18707. "type": "string",
  18708. "pattern": "^evt_"
  18709. },
  18710. "type": {
  18711. "type": "string",
  18712. "enum": ["reference.updated"]
  18713. },
  18714. "properties": {
  18715. "type": "object",
  18716. "properties": {}
  18717. }
  18718. },
  18719. "required": ["id", "type", "properties"],
  18720. "additionalProperties": false
  18721. },
  18722. {
  18723. "type": "object",
  18724. "properties": {
  18725. "id": {
  18726. "type": "string",
  18727. "pattern": "^evt_"
  18728. },
  18729. "type": {
  18730. "type": "string",
  18731. "enum": ["project.directories.updated"]
  18732. },
  18733. "properties": {
  18734. "type": "object",
  18735. "properties": {
  18736. "projectID": {
  18737. "type": "string"
  18738. }
  18739. },
  18740. "required": ["projectID"],
  18741. "additionalProperties": false
  18742. }
  18743. },
  18744. "required": ["id", "type", "properties"],
  18745. "additionalProperties": false
  18746. },
  18747. {
  18748. "type": "object",
  18749. "properties": {
  18750. "id": {
  18751. "type": "string",
  18752. "pattern": "^evt_"
  18753. },
  18754. "type": {
  18755. "type": "string",
  18756. "enum": ["file.watcher.updated"]
  18757. },
  18758. "properties": {
  18759. "type": "object",
  18760. "properties": {
  18761. "file": {
  18762. "type": "string"
  18763. },
  18764. "event": {
  18765. "type": "string",
  18766. "enum": ["add", "change", "unlink"]
  18767. }
  18768. },
  18769. "required": ["file", "event"],
  18770. "additionalProperties": false
  18771. }
  18772. },
  18773. "required": ["id", "type", "properties"],
  18774. "additionalProperties": false
  18775. },
  18776. {
  18777. "type": "object",
  18778. "properties": {
  18779. "id": {
  18780. "type": "string",
  18781. "pattern": "^evt_"
  18782. },
  18783. "type": {
  18784. "type": "string",
  18785. "enum": ["pty.created"]
  18786. },
  18787. "properties": {
  18788. "type": "object",
  18789. "properties": {
  18790. "info": {
  18791. "$ref": "#/components/schemas/Pty"
  18792. }
  18793. },
  18794. "required": ["info"],
  18795. "additionalProperties": false
  18796. }
  18797. },
  18798. "required": ["id", "type", "properties"],
  18799. "additionalProperties": false
  18800. },
  18801. {
  18802. "type": "object",
  18803. "properties": {
  18804. "id": {
  18805. "type": "string",
  18806. "pattern": "^evt_"
  18807. },
  18808. "type": {
  18809. "type": "string",
  18810. "enum": ["pty.updated"]
  18811. },
  18812. "properties": {
  18813. "type": "object",
  18814. "properties": {
  18815. "info": {
  18816. "$ref": "#/components/schemas/Pty"
  18817. }
  18818. },
  18819. "required": ["info"],
  18820. "additionalProperties": false
  18821. }
  18822. },
  18823. "required": ["id", "type", "properties"],
  18824. "additionalProperties": false
  18825. },
  18826. {
  18827. "type": "object",
  18828. "properties": {
  18829. "id": {
  18830. "type": "string",
  18831. "pattern": "^evt_"
  18832. },
  18833. "type": {
  18834. "type": "string",
  18835. "enum": ["pty.exited"]
  18836. },
  18837. "properties": {
  18838. "type": "object",
  18839. "properties": {
  18840. "id": {
  18841. "type": "string",
  18842. "pattern": "^pty"
  18843. },
  18844. "exitCode": {
  18845. "type": "integer",
  18846. "minimum": 0
  18847. }
  18848. },
  18849. "required": ["id", "exitCode"],
  18850. "additionalProperties": false
  18851. }
  18852. },
  18853. "required": ["id", "type", "properties"],
  18854. "additionalProperties": false
  18855. },
  18856. {
  18857. "type": "object",
  18858. "properties": {
  18859. "id": {
  18860. "type": "string",
  18861. "pattern": "^evt_"
  18862. },
  18863. "type": {
  18864. "type": "string",
  18865. "enum": ["pty.deleted"]
  18866. },
  18867. "properties": {
  18868. "type": "object",
  18869. "properties": {
  18870. "id": {
  18871. "type": "string",
  18872. "pattern": "^pty"
  18873. }
  18874. },
  18875. "required": ["id"],
  18876. "additionalProperties": false
  18877. }
  18878. },
  18879. "required": ["id", "type", "properties"],
  18880. "additionalProperties": false
  18881. },
  18882. {
  18883. "type": "object",
  18884. "properties": {
  18885. "id": {
  18886. "type": "string",
  18887. "pattern": "^evt_"
  18888. },
  18889. "type": {
  18890. "type": "string",
  18891. "enum": ["question.v2.asked"]
  18892. },
  18893. "properties": {
  18894. "type": "object",
  18895. "properties": {
  18896. "id": {
  18897. "type": "string",
  18898. "pattern": "^que"
  18899. },
  18900. "sessionID": {
  18901. "type": "string",
  18902. "pattern": "^ses"
  18903. },
  18904. "questions": {
  18905. "type": "array",
  18906. "items": {
  18907. "$ref": "#/components/schemas/QuestionV2Info"
  18908. },
  18909. "description": "Questions to ask"
  18910. },
  18911. "tool": {
  18912. "$ref": "#/components/schemas/QuestionV2Tool"
  18913. }
  18914. },
  18915. "required": ["id", "sessionID", "questions"],
  18916. "additionalProperties": false
  18917. }
  18918. },
  18919. "required": ["id", "type", "properties"],
  18920. "additionalProperties": false
  18921. },
  18922. {
  18923. "type": "object",
  18924. "properties": {
  18925. "id": {
  18926. "type": "string",
  18927. "pattern": "^evt_"
  18928. },
  18929. "type": {
  18930. "type": "string",
  18931. "enum": ["question.v2.replied"]
  18932. },
  18933. "properties": {
  18934. "type": "object",
  18935. "properties": {
  18936. "sessionID": {
  18937. "type": "string",
  18938. "pattern": "^ses"
  18939. },
  18940. "requestID": {
  18941. "type": "string",
  18942. "pattern": "^que"
  18943. },
  18944. "answers": {
  18945. "type": "array",
  18946. "items": {
  18947. "$ref": "#/components/schemas/QuestionV2Answer"
  18948. }
  18949. }
  18950. },
  18951. "required": ["sessionID", "requestID", "answers"],
  18952. "additionalProperties": false
  18953. }
  18954. },
  18955. "required": ["id", "type", "properties"],
  18956. "additionalProperties": false
  18957. },
  18958. {
  18959. "type": "object",
  18960. "properties": {
  18961. "id": {
  18962. "type": "string",
  18963. "pattern": "^evt_"
  18964. },
  18965. "type": {
  18966. "type": "string",
  18967. "enum": ["question.v2.rejected"]
  18968. },
  18969. "properties": {
  18970. "type": "object",
  18971. "properties": {
  18972. "sessionID": {
  18973. "type": "string",
  18974. "pattern": "^ses"
  18975. },
  18976. "requestID": {
  18977. "type": "string",
  18978. "pattern": "^que"
  18979. }
  18980. },
  18981. "required": ["sessionID", "requestID"],
  18982. "additionalProperties": false
  18983. }
  18984. },
  18985. "required": ["id", "type", "properties"],
  18986. "additionalProperties": false
  18987. },
  18988. {
  18989. "type": "object",
  18990. "properties": {
  18991. "id": {
  18992. "type": "string",
  18993. "pattern": "^evt_"
  18994. },
  18995. "type": {
  18996. "type": "string",
  18997. "enum": ["todo.updated"]
  18998. },
  18999. "properties": {
  19000. "type": "object",
  19001. "properties": {
  19002. "sessionID": {
  19003. "type": "string",
  19004. "pattern": "^ses"
  19005. },
  19006. "todos": {
  19007. "type": "array",
  19008. "items": {
  19009. "$ref": "#/components/schemas/Todo"
  19010. }
  19011. }
  19012. },
  19013. "required": ["sessionID", "todos"],
  19014. "additionalProperties": false
  19015. }
  19016. },
  19017. "required": ["id", "type", "properties"],
  19018. "additionalProperties": false
  19019. },
  19020. {
  19021. "type": "object",
  19022. "properties": {
  19023. "id": {
  19024. "type": "string",
  19025. "pattern": "^evt_"
  19026. },
  19027. "type": {
  19028. "type": "string",
  19029. "enum": ["lsp.updated"]
  19030. },
  19031. "properties": {
  19032. "type": "object",
  19033. "properties": {}
  19034. }
  19035. },
  19036. "required": ["id", "type", "properties"],
  19037. "additionalProperties": false
  19038. },
  19039. {
  19040. "type": "object",
  19041. "properties": {
  19042. "id": {
  19043. "type": "string",
  19044. "pattern": "^evt_"
  19045. },
  19046. "type": {
  19047. "type": "string",
  19048. "enum": ["permission.asked"]
  19049. },
  19050. "properties": {
  19051. "type": "object",
  19052. "properties": {
  19053. "id": {
  19054. "type": "string",
  19055. "pattern": "^per"
  19056. },
  19057. "sessionID": {
  19058. "type": "string",
  19059. "pattern": "^ses"
  19060. },
  19061. "permission": {
  19062. "type": "string"
  19063. },
  19064. "patterns": {
  19065. "type": "array",
  19066. "items": {
  19067. "type": "string"
  19068. }
  19069. },
  19070. "metadata": {
  19071. "type": "object"
  19072. },
  19073. "always": {
  19074. "type": "array",
  19075. "items": {
  19076. "type": "string"
  19077. }
  19078. },
  19079. "tool": {
  19080. "type": "object",
  19081. "properties": {
  19082. "messageID": {
  19083. "type": "string"
  19084. },
  19085. "callID": {
  19086. "type": "string"
  19087. }
  19088. },
  19089. "required": ["messageID", "callID"],
  19090. "additionalProperties": false
  19091. }
  19092. },
  19093. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  19094. "additionalProperties": false
  19095. }
  19096. },
  19097. "required": ["id", "type", "properties"],
  19098. "additionalProperties": false
  19099. },
  19100. {
  19101. "type": "object",
  19102. "properties": {
  19103. "id": {
  19104. "type": "string",
  19105. "pattern": "^evt_"
  19106. },
  19107. "type": {
  19108. "type": "string",
  19109. "enum": ["permission.replied"]
  19110. },
  19111. "properties": {
  19112. "type": "object",
  19113. "properties": {
  19114. "sessionID": {
  19115. "type": "string",
  19116. "pattern": "^ses"
  19117. },
  19118. "requestID": {
  19119. "type": "string",
  19120. "pattern": "^per"
  19121. },
  19122. "reply": {
  19123. "type": "string",
  19124. "enum": ["once", "always", "reject"]
  19125. }
  19126. },
  19127. "required": ["sessionID", "requestID", "reply"],
  19128. "additionalProperties": false
  19129. }
  19130. },
  19131. "required": ["id", "type", "properties"],
  19132. "additionalProperties": false
  19133. },
  19134. {
  19135. "type": "object",
  19136. "properties": {
  19137. "id": {
  19138. "type": "string",
  19139. "pattern": "^evt_"
  19140. },
  19141. "type": {
  19142. "type": "string",
  19143. "enum": ["tui.prompt.append"]
  19144. },
  19145. "properties": {
  19146. "type": "object",
  19147. "properties": {
  19148. "text": {
  19149. "type": "string"
  19150. }
  19151. },
  19152. "required": ["text"],
  19153. "additionalProperties": false
  19154. }
  19155. },
  19156. "required": ["id", "type", "properties"],
  19157. "additionalProperties": false
  19158. },
  19159. {
  19160. "type": "object",
  19161. "properties": {
  19162. "id": {
  19163. "type": "string",
  19164. "pattern": "^evt_"
  19165. },
  19166. "type": {
  19167. "type": "string",
  19168. "enum": ["tui.command.execute"]
  19169. },
  19170. "properties": {
  19171. "type": "object",
  19172. "properties": {
  19173. "command": {
  19174. "anyOf": [
  19175. {
  19176. "type": "string",
  19177. "enum": [
  19178. "session.list",
  19179. "session.new",
  19180. "session.share",
  19181. "session.interrupt",
  19182. "session.compact",
  19183. "session.page.up",
  19184. "session.page.down",
  19185. "session.line.up",
  19186. "session.line.down",
  19187. "session.half.page.up",
  19188. "session.half.page.down",
  19189. "session.first",
  19190. "session.last",
  19191. "prompt.clear",
  19192. "prompt.submit",
  19193. "agent.cycle"
  19194. ]
  19195. },
  19196. {
  19197. "type": "string"
  19198. }
  19199. ]
  19200. }
  19201. },
  19202. "required": ["command"],
  19203. "additionalProperties": false
  19204. }
  19205. },
  19206. "required": ["id", "type", "properties"],
  19207. "additionalProperties": false
  19208. },
  19209. {
  19210. "type": "object",
  19211. "properties": {
  19212. "id": {
  19213. "type": "string",
  19214. "pattern": "^evt_"
  19215. },
  19216. "type": {
  19217. "type": "string",
  19218. "enum": ["tui.toast.show"]
  19219. },
  19220. "properties": {
  19221. "type": "object",
  19222. "properties": {
  19223. "title": {
  19224. "type": "string"
  19225. },
  19226. "message": {
  19227. "type": "string"
  19228. },
  19229. "variant": {
  19230. "type": "string",
  19231. "enum": ["info", "success", "warning", "error"]
  19232. },
  19233. "duration": {
  19234. "type": "integer",
  19235. "exclusiveMinimum": 0
  19236. }
  19237. },
  19238. "required": ["message", "variant"],
  19239. "additionalProperties": false
  19240. }
  19241. },
  19242. "required": ["id", "type", "properties"],
  19243. "additionalProperties": false
  19244. },
  19245. {
  19246. "type": "object",
  19247. "properties": {
  19248. "id": {
  19249. "type": "string",
  19250. "pattern": "^evt_"
  19251. },
  19252. "type": {
  19253. "type": "string",
  19254. "enum": ["tui.session.select"]
  19255. },
  19256. "properties": {
  19257. "type": "object",
  19258. "properties": {
  19259. "sessionID": {
  19260. "type": "string",
  19261. "pattern": "^ses",
  19262. "description": "Session ID to navigate to"
  19263. }
  19264. },
  19265. "required": ["sessionID"],
  19266. "additionalProperties": false
  19267. }
  19268. },
  19269. "required": ["id", "type", "properties"],
  19270. "additionalProperties": false
  19271. },
  19272. {
  19273. "type": "object",
  19274. "properties": {
  19275. "id": {
  19276. "type": "string",
  19277. "pattern": "^evt_"
  19278. },
  19279. "type": {
  19280. "type": "string",
  19281. "enum": ["mcp.tools.changed"]
  19282. },
  19283. "properties": {
  19284. "type": "object",
  19285. "properties": {
  19286. "server": {
  19287. "type": "string"
  19288. }
  19289. },
  19290. "required": ["server"],
  19291. "additionalProperties": false
  19292. }
  19293. },
  19294. "required": ["id", "type", "properties"],
  19295. "additionalProperties": false
  19296. },
  19297. {
  19298. "type": "object",
  19299. "properties": {
  19300. "id": {
  19301. "type": "string",
  19302. "pattern": "^evt_"
  19303. },
  19304. "type": {
  19305. "type": "string",
  19306. "enum": ["mcp.browser.open.failed"]
  19307. },
  19308. "properties": {
  19309. "type": "object",
  19310. "properties": {
  19311. "mcpName": {
  19312. "type": "string"
  19313. },
  19314. "url": {
  19315. "type": "string"
  19316. }
  19317. },
  19318. "required": ["mcpName", "url"],
  19319. "additionalProperties": false
  19320. }
  19321. },
  19322. "required": ["id", "type", "properties"],
  19323. "additionalProperties": false
  19324. },
  19325. {
  19326. "type": "object",
  19327. "properties": {
  19328. "id": {
  19329. "type": "string",
  19330. "pattern": "^evt_"
  19331. },
  19332. "type": {
  19333. "type": "string",
  19334. "enum": ["command.executed"]
  19335. },
  19336. "properties": {
  19337. "type": "object",
  19338. "properties": {
  19339. "name": {
  19340. "type": "string"
  19341. },
  19342. "sessionID": {
  19343. "type": "string",
  19344. "pattern": "^ses"
  19345. },
  19346. "arguments": {
  19347. "type": "string"
  19348. },
  19349. "messageID": {
  19350. "type": "string",
  19351. "pattern": "^msg"
  19352. }
  19353. },
  19354. "required": ["name", "sessionID", "arguments", "messageID"],
  19355. "additionalProperties": false
  19356. }
  19357. },
  19358. "required": ["id", "type", "properties"],
  19359. "additionalProperties": false
  19360. },
  19361. {
  19362. "type": "object",
  19363. "properties": {
  19364. "id": {
  19365. "type": "string",
  19366. "pattern": "^evt_"
  19367. },
  19368. "type": {
  19369. "type": "string",
  19370. "enum": ["project.updated"]
  19371. },
  19372. "properties": {
  19373. "type": "object",
  19374. "properties": {
  19375. "id": {
  19376. "type": "string"
  19377. },
  19378. "worktree": {
  19379. "type": "string"
  19380. },
  19381. "vcs": {
  19382. "type": "string",
  19383. "enum": ["git"]
  19384. },
  19385. "name": {
  19386. "type": "string"
  19387. },
  19388. "icon": {
  19389. "type": "object",
  19390. "properties": {
  19391. "url": {
  19392. "type": "string"
  19393. },
  19394. "override": {
  19395. "type": "string"
  19396. },
  19397. "color": {
  19398. "type": "string"
  19399. }
  19400. },
  19401. "additionalProperties": false
  19402. },
  19403. "commands": {
  19404. "type": "object",
  19405. "properties": {
  19406. "start": {
  19407. "type": "string",
  19408. "description": "Startup script to run when creating a new workspace (worktree)"
  19409. }
  19410. },
  19411. "additionalProperties": false
  19412. },
  19413. "time": {
  19414. "type": "object",
  19415. "properties": {
  19416. "created": {
  19417. "type": "integer",
  19418. "minimum": 0
  19419. },
  19420. "updated": {
  19421. "type": "integer",
  19422. "minimum": 0
  19423. },
  19424. "initialized": {
  19425. "type": "integer",
  19426. "minimum": 0
  19427. }
  19428. },
  19429. "required": ["created", "updated"],
  19430. "additionalProperties": false
  19431. },
  19432. "sandboxes": {
  19433. "type": "array",
  19434. "items": {
  19435. "type": "string"
  19436. }
  19437. }
  19438. },
  19439. "required": ["id", "worktree", "time", "sandboxes"],
  19440. "additionalProperties": false
  19441. }
  19442. },
  19443. "required": ["id", "type", "properties"],
  19444. "additionalProperties": false
  19445. },
  19446. {
  19447. "type": "object",
  19448. "properties": {
  19449. "id": {
  19450. "type": "string",
  19451. "pattern": "^evt_"
  19452. },
  19453. "type": {
  19454. "type": "string",
  19455. "enum": ["session.status"]
  19456. },
  19457. "properties": {
  19458. "type": "object",
  19459. "properties": {
  19460. "sessionID": {
  19461. "type": "string",
  19462. "pattern": "^ses"
  19463. },
  19464. "status": {
  19465. "$ref": "#/components/schemas/SessionStatus"
  19466. }
  19467. },
  19468. "required": ["sessionID", "status"],
  19469. "additionalProperties": false
  19470. }
  19471. },
  19472. "required": ["id", "type", "properties"],
  19473. "additionalProperties": false
  19474. },
  19475. {
  19476. "type": "object",
  19477. "properties": {
  19478. "id": {
  19479. "type": "string",
  19480. "pattern": "^evt_"
  19481. },
  19482. "type": {
  19483. "type": "string",
  19484. "enum": ["session.idle"]
  19485. },
  19486. "properties": {
  19487. "type": "object",
  19488. "properties": {
  19489. "sessionID": {
  19490. "type": "string",
  19491. "pattern": "^ses"
  19492. }
  19493. },
  19494. "required": ["sessionID"],
  19495. "additionalProperties": false
  19496. }
  19497. },
  19498. "required": ["id", "type", "properties"],
  19499. "additionalProperties": false
  19500. },
  19501. {
  19502. "type": "object",
  19503. "properties": {
  19504. "id": {
  19505. "type": "string",
  19506. "pattern": "^evt_"
  19507. },
  19508. "type": {
  19509. "type": "string",
  19510. "enum": ["question.asked"]
  19511. },
  19512. "properties": {
  19513. "type": "object",
  19514. "properties": {
  19515. "id": {
  19516. "type": "string",
  19517. "pattern": "^que"
  19518. },
  19519. "sessionID": {
  19520. "type": "string",
  19521. "pattern": "^ses"
  19522. },
  19523. "questions": {
  19524. "type": "array",
  19525. "items": {
  19526. "$ref": "#/components/schemas/QuestionInfo"
  19527. },
  19528. "description": "Questions to ask"
  19529. },
  19530. "tool": {
  19531. "$ref": "#/components/schemas/QuestionTool"
  19532. }
  19533. },
  19534. "required": ["id", "sessionID", "questions"],
  19535. "additionalProperties": false
  19536. }
  19537. },
  19538. "required": ["id", "type", "properties"],
  19539. "additionalProperties": false
  19540. },
  19541. {
  19542. "type": "object",
  19543. "properties": {
  19544. "id": {
  19545. "type": "string",
  19546. "pattern": "^evt_"
  19547. },
  19548. "type": {
  19549. "type": "string",
  19550. "enum": ["question.replied"]
  19551. },
  19552. "properties": {
  19553. "type": "object",
  19554. "properties": {
  19555. "sessionID": {
  19556. "type": "string",
  19557. "pattern": "^ses"
  19558. },
  19559. "requestID": {
  19560. "type": "string",
  19561. "pattern": "^que"
  19562. },
  19563. "answers": {
  19564. "type": "array",
  19565. "items": {
  19566. "$ref": "#/components/schemas/QuestionAnswer"
  19567. }
  19568. }
  19569. },
  19570. "required": ["sessionID", "requestID", "answers"],
  19571. "additionalProperties": false
  19572. }
  19573. },
  19574. "required": ["id", "type", "properties"],
  19575. "additionalProperties": false
  19576. },
  19577. {
  19578. "type": "object",
  19579. "properties": {
  19580. "id": {
  19581. "type": "string",
  19582. "pattern": "^evt_"
  19583. },
  19584. "type": {
  19585. "type": "string",
  19586. "enum": ["question.rejected"]
  19587. },
  19588. "properties": {
  19589. "type": "object",
  19590. "properties": {
  19591. "sessionID": {
  19592. "type": "string",
  19593. "pattern": "^ses"
  19594. },
  19595. "requestID": {
  19596. "type": "string",
  19597. "pattern": "^que"
  19598. }
  19599. },
  19600. "required": ["sessionID", "requestID"],
  19601. "additionalProperties": false
  19602. }
  19603. },
  19604. "required": ["id", "type", "properties"],
  19605. "additionalProperties": false
  19606. },
  19607. {
  19608. "type": "object",
  19609. "properties": {
  19610. "id": {
  19611. "type": "string",
  19612. "pattern": "^evt_"
  19613. },
  19614. "type": {
  19615. "type": "string",
  19616. "enum": ["session.compacted"]
  19617. },
  19618. "properties": {
  19619. "type": "object",
  19620. "properties": {
  19621. "sessionID": {
  19622. "type": "string",
  19623. "pattern": "^ses"
  19624. }
  19625. },
  19626. "required": ["sessionID"],
  19627. "additionalProperties": false
  19628. }
  19629. },
  19630. "required": ["id", "type", "properties"],
  19631. "additionalProperties": false
  19632. },
  19633. {
  19634. "type": "object",
  19635. "properties": {
  19636. "id": {
  19637. "type": "string",
  19638. "pattern": "^evt_"
  19639. },
  19640. "type": {
  19641. "type": "string",
  19642. "enum": ["vcs.branch.updated"]
  19643. },
  19644. "properties": {
  19645. "type": "object",
  19646. "properties": {
  19647. "branch": {
  19648. "type": "string"
  19649. }
  19650. },
  19651. "additionalProperties": false
  19652. }
  19653. },
  19654. "required": ["id", "type", "properties"],
  19655. "additionalProperties": false
  19656. },
  19657. {
  19658. "type": "object",
  19659. "properties": {
  19660. "id": {
  19661. "type": "string",
  19662. "pattern": "^evt_"
  19663. },
  19664. "type": {
  19665. "type": "string",
  19666. "enum": ["workspace.ready"]
  19667. },
  19668. "properties": {
  19669. "type": "object",
  19670. "properties": {
  19671. "name": {
  19672. "type": "string"
  19673. }
  19674. },
  19675. "required": ["name"],
  19676. "additionalProperties": false
  19677. }
  19678. },
  19679. "required": ["id", "type", "properties"],
  19680. "additionalProperties": false
  19681. },
  19682. {
  19683. "type": "object",
  19684. "properties": {
  19685. "id": {
  19686. "type": "string",
  19687. "pattern": "^evt_"
  19688. },
  19689. "type": {
  19690. "type": "string",
  19691. "enum": ["workspace.failed"]
  19692. },
  19693. "properties": {
  19694. "type": "object",
  19695. "properties": {
  19696. "message": {
  19697. "type": "string"
  19698. }
  19699. },
  19700. "required": ["message"],
  19701. "additionalProperties": false
  19702. }
  19703. },
  19704. "required": ["id", "type", "properties"],
  19705. "additionalProperties": false
  19706. },
  19707. {
  19708. "type": "object",
  19709. "properties": {
  19710. "id": {
  19711. "type": "string",
  19712. "pattern": "^evt_"
  19713. },
  19714. "type": {
  19715. "type": "string",
  19716. "enum": ["workspace.status"]
  19717. },
  19718. "properties": {
  19719. "type": "object",
  19720. "properties": {
  19721. "workspaceID": {
  19722. "type": "string",
  19723. "pattern": "^wrk"
  19724. },
  19725. "status": {
  19726. "type": "string",
  19727. "enum": ["connected", "connecting", "disconnected", "error"]
  19728. }
  19729. },
  19730. "required": ["workspaceID", "status"],
  19731. "additionalProperties": false
  19732. }
  19733. },
  19734. "required": ["id", "type", "properties"],
  19735. "additionalProperties": false
  19736. },
  19737. {
  19738. "type": "object",
  19739. "properties": {
  19740. "id": {
  19741. "type": "string",
  19742. "pattern": "^evt_"
  19743. },
  19744. "type": {
  19745. "type": "string",
  19746. "enum": ["worktree.ready"]
  19747. },
  19748. "properties": {
  19749. "type": "object",
  19750. "properties": {
  19751. "name": {
  19752. "type": "string"
  19753. },
  19754. "branch": {
  19755. "type": "string"
  19756. }
  19757. },
  19758. "required": ["name"],
  19759. "additionalProperties": false
  19760. }
  19761. },
  19762. "required": ["id", "type", "properties"],
  19763. "additionalProperties": false
  19764. },
  19765. {
  19766. "type": "object",
  19767. "properties": {
  19768. "id": {
  19769. "type": "string",
  19770. "pattern": "^evt_"
  19771. },
  19772. "type": {
  19773. "type": "string",
  19774. "enum": ["worktree.failed"]
  19775. },
  19776. "properties": {
  19777. "type": "object",
  19778. "properties": {
  19779. "message": {
  19780. "type": "string"
  19781. }
  19782. },
  19783. "required": ["message"],
  19784. "additionalProperties": false
  19785. }
  19786. },
  19787. "required": ["id", "type", "properties"],
  19788. "additionalProperties": false
  19789. },
  19790. {
  19791. "type": "object",
  19792. "properties": {
  19793. "id": {
  19794. "type": "string",
  19795. "pattern": "^evt_"
  19796. },
  19797. "type": {
  19798. "type": "string",
  19799. "enum": ["server.connected"]
  19800. },
  19801. "properties": {
  19802. "type": "object",
  19803. "properties": {}
  19804. }
  19805. },
  19806. "required": ["id", "type", "properties"],
  19807. "additionalProperties": false
  19808. },
  19809. {
  19810. "type": "object",
  19811. "properties": {
  19812. "id": {
  19813. "type": "string",
  19814. "pattern": "^evt_"
  19815. },
  19816. "type": {
  19817. "type": "string",
  19818. "enum": ["global.disposed"]
  19819. },
  19820. "properties": {
  19821. "type": "object",
  19822. "properties": {}
  19823. }
  19824. },
  19825. "required": ["id", "type", "properties"],
  19826. "additionalProperties": false
  19827. },
  19828. {
  19829. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  19830. },
  19831. {
  19832. "$ref": "#/components/schemas/SyncEventSessionCreated"
  19833. },
  19834. {
  19835. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  19836. },
  19837. {
  19838. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  19839. },
  19840. {
  19841. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  19842. },
  19843. {
  19844. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  19845. },
  19846. {
  19847. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  19848. },
  19849. {
  19850. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  19851. },
  19852. {
  19853. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  19854. },
  19855. {
  19856. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  19857. },
  19858. {
  19859. "$ref": "#/components/schemas/SyncEventSessionNextMoved"
  19860. },
  19861. {
  19862. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  19863. },
  19864. {
  19865. "$ref": "#/components/schemas/SyncEventSessionNextPromptAdmitted"
  19866. },
  19867. {
  19868. "$ref": "#/components/schemas/SyncEventSessionNextPromptPromoted"
  19869. },
  19870. {
  19871. "$ref": "#/components/schemas/SyncEventSessionNextInterruptRequested"
  19872. },
  19873. {
  19874. "$ref": "#/components/schemas/SyncEventSessionNextContextUpdated"
  19875. },
  19876. {
  19877. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  19878. },
  19879. {
  19880. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  19881. },
  19882. {
  19883. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  19884. },
  19885. {
  19886. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  19887. },
  19888. {
  19889. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  19890. },
  19891. {
  19892. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  19893. },
  19894. {
  19895. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  19896. },
  19897. {
  19898. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  19899. },
  19900. {
  19901. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  19902. },
  19903. {
  19904. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  19905. },
  19906. {
  19907. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  19908. },
  19909. {
  19910. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  19911. },
  19912. {
  19913. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  19914. },
  19915. {
  19916. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  19917. },
  19918. {
  19919. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  19920. },
  19921. {
  19922. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  19923. },
  19924. {
  19925. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  19926. },
  19927. {
  19928. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  19929. },
  19930. {
  19931. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  19932. }
  19933. ]
  19934. }
  19935. },
  19936. "required": ["directory", "payload"],
  19937. "additionalProperties": false
  19938. },
  19939. "LogLevel": {
  19940. "type": "string",
  19941. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  19942. "description": "Log level"
  19943. },
  19944. "ServerConfig": {
  19945. "type": "object",
  19946. "properties": {
  19947. "port": {
  19948. "type": "integer",
  19949. "exclusiveMinimum": 0
  19950. },
  19951. "hostname": {
  19952. "type": "string"
  19953. },
  19954. "mdns": {
  19955. "type": "boolean"
  19956. },
  19957. "mdnsDomain": {
  19958. "type": "string"
  19959. },
  19960. "cors": {
  19961. "type": "array",
  19962. "items": {
  19963. "type": "string"
  19964. }
  19965. }
  19966. },
  19967. "additionalProperties": false,
  19968. "description": "Server configuration for opencode serve and web commands"
  19969. },
  19970. "PermissionActionConfig": {
  19971. "type": "string",
  19972. "enum": ["ask", "allow", "deny"]
  19973. },
  19974. "PermissionObjectConfig": {
  19975. "type": "object",
  19976. "additionalProperties": {
  19977. "$ref": "#/components/schemas/PermissionActionConfig"
  19978. }
  19979. },
  19980. "PermissionRuleConfig": {
  19981. "anyOf": [
  19982. {
  19983. "$ref": "#/components/schemas/PermissionActionConfig"
  19984. },
  19985. {
  19986. "$ref": "#/components/schemas/PermissionObjectConfig"
  19987. }
  19988. ]
  19989. },
  19990. "PermissionConfig": {
  19991. "anyOf": [
  19992. {
  19993. "$ref": "#/components/schemas/PermissionActionConfig"
  19994. },
  19995. {
  19996. "type": "object",
  19997. "properties": {
  19998. "read": {
  19999. "$ref": "#/components/schemas/PermissionRuleConfig"
  20000. },
  20001. "edit": {
  20002. "$ref": "#/components/schemas/PermissionRuleConfig"
  20003. },
  20004. "glob": {
  20005. "$ref": "#/components/schemas/PermissionRuleConfig"
  20006. },
  20007. "grep": {
  20008. "$ref": "#/components/schemas/PermissionRuleConfig"
  20009. },
  20010. "list": {
  20011. "$ref": "#/components/schemas/PermissionRuleConfig"
  20012. },
  20013. "bash": {
  20014. "$ref": "#/components/schemas/PermissionRuleConfig"
  20015. },
  20016. "task": {
  20017. "$ref": "#/components/schemas/PermissionRuleConfig"
  20018. },
  20019. "external_directory": {
  20020. "$ref": "#/components/schemas/PermissionRuleConfig"
  20021. },
  20022. "todowrite": {
  20023. "$ref": "#/components/schemas/PermissionActionConfig"
  20024. },
  20025. "question": {
  20026. "$ref": "#/components/schemas/PermissionActionConfig"
  20027. },
  20028. "webfetch": {
  20029. "$ref": "#/components/schemas/PermissionActionConfig"
  20030. },
  20031. "websearch": {
  20032. "$ref": "#/components/schemas/PermissionActionConfig"
  20033. },
  20034. "lsp": {
  20035. "$ref": "#/components/schemas/PermissionRuleConfig"
  20036. },
  20037. "doom_loop": {
  20038. "$ref": "#/components/schemas/PermissionActionConfig"
  20039. },
  20040. "skill": {
  20041. "$ref": "#/components/schemas/PermissionRuleConfig"
  20042. }
  20043. },
  20044. "additionalProperties": {
  20045. "$ref": "#/components/schemas/PermissionRuleConfig"
  20046. }
  20047. }
  20048. ]
  20049. },
  20050. "AgentConfig": {
  20051. "type": "object",
  20052. "properties": {
  20053. "model": {
  20054. "type": "string"
  20055. },
  20056. "variant": {
  20057. "type": "string"
  20058. },
  20059. "temperature": {
  20060. "type": "number"
  20061. },
  20062. "top_p": {
  20063. "type": "number"
  20064. },
  20065. "prompt": {
  20066. "type": "string"
  20067. },
  20068. "tools": {
  20069. "type": "object",
  20070. "additionalProperties": {
  20071. "type": "boolean"
  20072. }
  20073. },
  20074. "disable": {
  20075. "type": "boolean"
  20076. },
  20077. "description": {
  20078. "type": "string"
  20079. },
  20080. "mode": {
  20081. "type": "string",
  20082. "enum": ["subagent", "primary", "all"]
  20083. },
  20084. "hidden": {
  20085. "type": "boolean"
  20086. },
  20087. "options": {
  20088. "type": "object"
  20089. },
  20090. "color": {
  20091. "anyOf": [
  20092. {
  20093. "type": "string",
  20094. "pattern": "^#[0-9a-fA-F]{6}$"
  20095. },
  20096. {
  20097. "type": "string",
  20098. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  20099. }
  20100. ],
  20101. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  20102. },
  20103. "steps": {
  20104. "type": "integer",
  20105. "exclusiveMinimum": 0
  20106. },
  20107. "maxSteps": {
  20108. "type": "integer",
  20109. "exclusiveMinimum": 0
  20110. },
  20111. "permission": {
  20112. "$ref": "#/components/schemas/PermissionConfig"
  20113. }
  20114. },
  20115. "additionalProperties": {}
  20116. },
  20117. "ProviderConfig": {
  20118. "type": "object",
  20119. "properties": {
  20120. "api": {
  20121. "type": "string"
  20122. },
  20123. "name": {
  20124. "type": "string"
  20125. },
  20126. "env": {
  20127. "type": "array",
  20128. "items": {
  20129. "type": "string"
  20130. }
  20131. },
  20132. "id": {
  20133. "type": "string"
  20134. },
  20135. "npm": {
  20136. "type": "string"
  20137. },
  20138. "whitelist": {
  20139. "type": "array",
  20140. "items": {
  20141. "type": "string"
  20142. }
  20143. },
  20144. "blacklist": {
  20145. "type": "array",
  20146. "items": {
  20147. "type": "string"
  20148. }
  20149. },
  20150. "options": {
  20151. "type": "object",
  20152. "properties": {
  20153. "apiKey": {
  20154. "type": "string"
  20155. },
  20156. "baseURL": {
  20157. "type": "string"
  20158. },
  20159. "enterpriseUrl": {
  20160. "type": "string"
  20161. },
  20162. "setCacheKey": {
  20163. "type": "boolean"
  20164. },
  20165. "timeout": {
  20166. "anyOf": [
  20167. {
  20168. "type": "integer",
  20169. "exclusiveMinimum": 0
  20170. },
  20171. {
  20172. "type": "boolean",
  20173. "enum": [false]
  20174. }
  20175. ],
  20176. "description": "Timeout in milliseconds for full requests to this provider. Set to false to disable timeout."
  20177. },
  20178. "headerTimeout": {
  20179. "anyOf": [
  20180. {
  20181. "type": "integer",
  20182. "exclusiveMinimum": 0
  20183. },
  20184. {
  20185. "type": "boolean",
  20186. "enum": [false]
  20187. }
  20188. ],
  20189. "description": "Timeout in milliseconds to wait for response headers. Provider integrations may set defaults. Set to false to disable timeout."
  20190. },
  20191. "chunkTimeout": {
  20192. "type": "integer",
  20193. "exclusiveMinimum": 0
  20194. }
  20195. },
  20196. "additionalProperties": {}
  20197. },
  20198. "models": {
  20199. "type": "object",
  20200. "additionalProperties": {
  20201. "type": "object",
  20202. "properties": {
  20203. "id": {
  20204. "type": "string"
  20205. },
  20206. "name": {
  20207. "type": "string"
  20208. },
  20209. "family": {
  20210. "type": "string"
  20211. },
  20212. "release_date": {
  20213. "type": "string"
  20214. },
  20215. "attachment": {
  20216. "type": "boolean"
  20217. },
  20218. "reasoning": {
  20219. "type": "boolean"
  20220. },
  20221. "temperature": {
  20222. "type": "boolean"
  20223. },
  20224. "tool_call": {
  20225. "type": "boolean"
  20226. },
  20227. "interleaved": {
  20228. "anyOf": [
  20229. {
  20230. "type": "boolean",
  20231. "enum": [true]
  20232. },
  20233. {
  20234. "type": "object",
  20235. "properties": {
  20236. "field": {
  20237. "type": "string",
  20238. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  20239. }
  20240. },
  20241. "required": ["field"],
  20242. "additionalProperties": false
  20243. }
  20244. ]
  20245. },
  20246. "cost": {
  20247. "type": "object",
  20248. "properties": {
  20249. "input": {
  20250. "type": "number"
  20251. },
  20252. "output": {
  20253. "type": "number"
  20254. },
  20255. "cache_read": {
  20256. "type": "number"
  20257. },
  20258. "cache_write": {
  20259. "type": "number"
  20260. },
  20261. "context_over_200k": {
  20262. "type": "object",
  20263. "properties": {
  20264. "input": {
  20265. "type": "number"
  20266. },
  20267. "output": {
  20268. "type": "number"
  20269. },
  20270. "cache_read": {
  20271. "type": "number"
  20272. },
  20273. "cache_write": {
  20274. "type": "number"
  20275. }
  20276. },
  20277. "required": ["input", "output"],
  20278. "additionalProperties": false
  20279. }
  20280. },
  20281. "required": ["input", "output"],
  20282. "additionalProperties": false
  20283. },
  20284. "limit": {
  20285. "type": "object",
  20286. "properties": {
  20287. "context": {
  20288. "type": "number"
  20289. },
  20290. "input": {
  20291. "type": "number"
  20292. },
  20293. "output": {
  20294. "type": "number"
  20295. }
  20296. },
  20297. "required": ["context", "output"],
  20298. "additionalProperties": false
  20299. },
  20300. "modalities": {
  20301. "type": "object",
  20302. "properties": {
  20303. "input": {
  20304. "type": "array",
  20305. "items": {
  20306. "type": "string",
  20307. "enum": ["text", "audio", "image", "video", "pdf"]
  20308. }
  20309. },
  20310. "output": {
  20311. "type": "array",
  20312. "items": {
  20313. "type": "string",
  20314. "enum": ["text", "audio", "image", "video", "pdf"]
  20315. }
  20316. }
  20317. },
  20318. "additionalProperties": false
  20319. },
  20320. "experimental": {
  20321. "type": "boolean"
  20322. },
  20323. "status": {
  20324. "type": "string",
  20325. "enum": ["alpha", "beta", "deprecated", "active"]
  20326. },
  20327. "provider": {
  20328. "type": "object",
  20329. "properties": {
  20330. "npm": {
  20331. "type": "string"
  20332. },
  20333. "api": {
  20334. "type": "string"
  20335. }
  20336. },
  20337. "additionalProperties": false
  20338. },
  20339. "options": {
  20340. "type": "object"
  20341. },
  20342. "headers": {
  20343. "type": "object",
  20344. "additionalProperties": {
  20345. "type": "string"
  20346. }
  20347. },
  20348. "variants": {
  20349. "type": "object",
  20350. "additionalProperties": {
  20351. "type": "object",
  20352. "properties": {
  20353. "disabled": {
  20354. "type": "boolean"
  20355. }
  20356. },
  20357. "additionalProperties": {}
  20358. },
  20359. "description": "Variant-specific configuration"
  20360. }
  20361. },
  20362. "additionalProperties": false
  20363. }
  20364. }
  20365. },
  20366. "additionalProperties": false
  20367. },
  20368. "McpLocalConfig": {
  20369. "type": "object",
  20370. "properties": {
  20371. "type": {
  20372. "type": "string",
  20373. "enum": ["local"],
  20374. "description": "Type of MCP server connection"
  20375. },
  20376. "command": {
  20377. "type": "array",
  20378. "items": {
  20379. "type": "string"
  20380. },
  20381. "description": "Command and arguments to run the MCP server"
  20382. },
  20383. "cwd": {
  20384. "type": "string"
  20385. },
  20386. "environment": {
  20387. "type": "object",
  20388. "additionalProperties": {
  20389. "type": "string"
  20390. }
  20391. },
  20392. "enabled": {
  20393. "type": "boolean"
  20394. },
  20395. "timeout": {
  20396. "type": "integer",
  20397. "exclusiveMinimum": 0
  20398. }
  20399. },
  20400. "required": ["type", "command"],
  20401. "additionalProperties": false
  20402. },
  20403. "McpOAuthConfig": {
  20404. "type": "object",
  20405. "properties": {
  20406. "clientId": {
  20407. "type": "string"
  20408. },
  20409. "clientSecret": {
  20410. "type": "string"
  20411. },
  20412. "scope": {
  20413. "type": "string"
  20414. },
  20415. "callbackPort": {
  20416. "type": "integer",
  20417. "minimum": 1,
  20418. "maximum": 65535
  20419. },
  20420. "redirectUri": {
  20421. "type": "string"
  20422. }
  20423. },
  20424. "additionalProperties": false
  20425. },
  20426. "McpRemoteConfig": {
  20427. "type": "object",
  20428. "properties": {
  20429. "type": {
  20430. "type": "string",
  20431. "enum": ["remote"],
  20432. "description": "Type of MCP server connection"
  20433. },
  20434. "url": {
  20435. "type": "string",
  20436. "description": "URL of the remote MCP server"
  20437. },
  20438. "enabled": {
  20439. "type": "boolean"
  20440. },
  20441. "headers": {
  20442. "type": "object",
  20443. "additionalProperties": {
  20444. "type": "string"
  20445. }
  20446. },
  20447. "oauth": {
  20448. "anyOf": [
  20449. {
  20450. "$ref": "#/components/schemas/McpOAuthConfig"
  20451. },
  20452. {
  20453. "type": "boolean",
  20454. "enum": [false]
  20455. }
  20456. ],
  20457. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  20458. },
  20459. "timeout": {
  20460. "type": "integer",
  20461. "exclusiveMinimum": 0
  20462. }
  20463. },
  20464. "required": ["type", "url"],
  20465. "additionalProperties": false
  20466. },
  20467. "LayoutConfig": {
  20468. "type": "string",
  20469. "enum": ["auto", "stretch"],
  20470. "description": "@deprecated Always uses stretch layout."
  20471. },
  20472. "ImageAttachmentConfig": {
  20473. "type": "object",
  20474. "properties": {
  20475. "auto_resize": {
  20476. "type": "boolean"
  20477. },
  20478. "max_width": {
  20479. "type": "integer",
  20480. "exclusiveMinimum": 0
  20481. },
  20482. "max_height": {
  20483. "type": "integer",
  20484. "exclusiveMinimum": 0
  20485. },
  20486. "max_base64_bytes": {
  20487. "type": "integer",
  20488. "exclusiveMinimum": 0
  20489. }
  20490. },
  20491. "additionalProperties": false
  20492. },
  20493. "AttachmentConfig": {
  20494. "type": "object",
  20495. "properties": {
  20496. "image": {
  20497. "$ref": "#/components/schemas/ImageAttachmentConfig"
  20498. }
  20499. },
  20500. "additionalProperties": false
  20501. },
  20502. "Config": {
  20503. "type": "object",
  20504. "properties": {
  20505. "$schema": {
  20506. "type": "string"
  20507. },
  20508. "shell": {
  20509. "type": "string"
  20510. },
  20511. "logLevel": {
  20512. "$ref": "#/components/schemas/LogLevel"
  20513. },
  20514. "server": {
  20515. "$ref": "#/components/schemas/ServerConfig"
  20516. },
  20517. "command": {
  20518. "type": "object",
  20519. "additionalProperties": {
  20520. "type": "object",
  20521. "properties": {
  20522. "template": {
  20523. "type": "string"
  20524. },
  20525. "description": {
  20526. "type": "string"
  20527. },
  20528. "agent": {
  20529. "type": "string"
  20530. },
  20531. "model": {
  20532. "type": "string"
  20533. },
  20534. "variant": {
  20535. "type": "string"
  20536. },
  20537. "subtask": {
  20538. "type": "boolean"
  20539. }
  20540. },
  20541. "required": ["template"],
  20542. "additionalProperties": false
  20543. }
  20544. },
  20545. "skills": {
  20546. "type": "object",
  20547. "properties": {
  20548. "paths": {
  20549. "type": "array",
  20550. "items": {
  20551. "type": "string"
  20552. }
  20553. },
  20554. "urls": {
  20555. "type": "array",
  20556. "items": {
  20557. "type": "string"
  20558. }
  20559. }
  20560. },
  20561. "additionalProperties": false
  20562. },
  20563. "references": {
  20564. "type": "object",
  20565. "additionalProperties": {
  20566. "anyOf": [
  20567. {
  20568. "type": "string"
  20569. },
  20570. {
  20571. "$ref": "#/components/schemas/ConfigV2ReferenceGit"
  20572. },
  20573. {
  20574. "$ref": "#/components/schemas/ConfigV2ReferenceLocal"
  20575. }
  20576. ]
  20577. }
  20578. },
  20579. "reference": {
  20580. "type": "object",
  20581. "additionalProperties": {
  20582. "anyOf": [
  20583. {
  20584. "type": "string"
  20585. },
  20586. {
  20587. "$ref": "#/components/schemas/ConfigV2ReferenceGit"
  20588. },
  20589. {
  20590. "$ref": "#/components/schemas/ConfigV2ReferenceLocal"
  20591. }
  20592. ]
  20593. }
  20594. },
  20595. "watcher": {
  20596. "type": "object",
  20597. "properties": {
  20598. "ignore": {
  20599. "type": "array",
  20600. "items": {
  20601. "type": "string"
  20602. }
  20603. }
  20604. },
  20605. "additionalProperties": false
  20606. },
  20607. "snapshot": {
  20608. "type": "boolean"
  20609. },
  20610. "plugin": {
  20611. "type": "array",
  20612. "items": {
  20613. "anyOf": [
  20614. {
  20615. "type": "string"
  20616. },
  20617. {
  20618. "type": "array",
  20619. "prefixItems": [
  20620. {
  20621. "type": "string"
  20622. },
  20623. {
  20624. "type": "object"
  20625. }
  20626. ],
  20627. "maxItems": 2,
  20628. "minItems": 2
  20629. }
  20630. ]
  20631. }
  20632. },
  20633. "share": {
  20634. "type": "string",
  20635. "enum": ["manual", "auto", "disabled"]
  20636. },
  20637. "autoshare": {
  20638. "type": "boolean"
  20639. },
  20640. "autoupdate": {
  20641. "anyOf": [
  20642. {
  20643. "type": "boolean"
  20644. },
  20645. {
  20646. "type": "string",
  20647. "enum": ["notify"]
  20648. }
  20649. ],
  20650. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  20651. },
  20652. "disabled_providers": {
  20653. "type": "array",
  20654. "items": {
  20655. "type": "string"
  20656. }
  20657. },
  20658. "enabled_providers": {
  20659. "type": "array",
  20660. "items": {
  20661. "type": "string"
  20662. }
  20663. },
  20664. "model": {
  20665. "type": "string"
  20666. },
  20667. "small_model": {
  20668. "type": "string"
  20669. },
  20670. "default_agent": {
  20671. "type": "string"
  20672. },
  20673. "username": {
  20674. "type": "string"
  20675. },
  20676. "mode": {
  20677. "type": "object",
  20678. "properties": {
  20679. "build": {
  20680. "$ref": "#/components/schemas/AgentConfig"
  20681. },
  20682. "plan": {
  20683. "$ref": "#/components/schemas/AgentConfig"
  20684. }
  20685. },
  20686. "additionalProperties": {
  20687. "$ref": "#/components/schemas/AgentConfig"
  20688. }
  20689. },
  20690. "agent": {
  20691. "type": "object",
  20692. "properties": {
  20693. "plan": {
  20694. "$ref": "#/components/schemas/AgentConfig"
  20695. },
  20696. "build": {
  20697. "$ref": "#/components/schemas/AgentConfig"
  20698. },
  20699. "general": {
  20700. "$ref": "#/components/schemas/AgentConfig"
  20701. },
  20702. "explore": {
  20703. "$ref": "#/components/schemas/AgentConfig"
  20704. },
  20705. "title": {
  20706. "$ref": "#/components/schemas/AgentConfig"
  20707. },
  20708. "summary": {
  20709. "$ref": "#/components/schemas/AgentConfig"
  20710. },
  20711. "compaction": {
  20712. "$ref": "#/components/schemas/AgentConfig"
  20713. }
  20714. },
  20715. "additionalProperties": {
  20716. "$ref": "#/components/schemas/AgentConfig"
  20717. }
  20718. },
  20719. "provider": {
  20720. "type": "object",
  20721. "additionalProperties": {
  20722. "$ref": "#/components/schemas/ProviderConfig"
  20723. }
  20724. },
  20725. "mcp": {
  20726. "type": "object",
  20727. "additionalProperties": {
  20728. "anyOf": [
  20729. {
  20730. "$ref": "#/components/schemas/McpLocalConfig"
  20731. },
  20732. {
  20733. "$ref": "#/components/schemas/McpRemoteConfig"
  20734. },
  20735. {
  20736. "type": "object",
  20737. "properties": {
  20738. "enabled": {
  20739. "type": "boolean"
  20740. }
  20741. },
  20742. "required": ["enabled"],
  20743. "additionalProperties": false
  20744. }
  20745. ]
  20746. }
  20747. },
  20748. "formatter": {
  20749. "anyOf": [
  20750. {
  20751. "type": "boolean"
  20752. },
  20753. {
  20754. "type": "object",
  20755. "additionalProperties": {
  20756. "type": "object",
  20757. "properties": {
  20758. "disabled": {
  20759. "type": "boolean"
  20760. },
  20761. "command": {
  20762. "type": "array",
  20763. "items": {
  20764. "type": "string"
  20765. }
  20766. },
  20767. "environment": {
  20768. "type": "object",
  20769. "additionalProperties": {
  20770. "type": "string"
  20771. }
  20772. },
  20773. "extensions": {
  20774. "type": "array",
  20775. "items": {
  20776. "type": "string"
  20777. }
  20778. }
  20779. },
  20780. "additionalProperties": false
  20781. }
  20782. }
  20783. ],
  20784. "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."
  20785. },
  20786. "lsp": {
  20787. "anyOf": [
  20788. {
  20789. "type": "boolean"
  20790. },
  20791. {
  20792. "type": "object",
  20793. "additionalProperties": {
  20794. "anyOf": [
  20795. {
  20796. "type": "object",
  20797. "properties": {
  20798. "disabled": {
  20799. "type": "boolean",
  20800. "enum": [true]
  20801. }
  20802. },
  20803. "required": ["disabled"],
  20804. "additionalProperties": false
  20805. },
  20806. {
  20807. "type": "object",
  20808. "properties": {
  20809. "command": {
  20810. "type": "array",
  20811. "items": {
  20812. "type": "string"
  20813. }
  20814. },
  20815. "extensions": {
  20816. "type": "array",
  20817. "items": {
  20818. "type": "string"
  20819. }
  20820. },
  20821. "disabled": {
  20822. "type": "boolean"
  20823. },
  20824. "env": {
  20825. "type": "object",
  20826. "additionalProperties": {
  20827. "type": "string"
  20828. }
  20829. },
  20830. "initialization": {
  20831. "type": "object"
  20832. }
  20833. },
  20834. "required": ["command"],
  20835. "additionalProperties": false
  20836. }
  20837. ]
  20838. }
  20839. }
  20840. ],
  20841. "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."
  20842. },
  20843. "instructions": {
  20844. "type": "array",
  20845. "items": {
  20846. "type": "string"
  20847. }
  20848. },
  20849. "layout": {
  20850. "$ref": "#/components/schemas/LayoutConfig"
  20851. },
  20852. "permission": {
  20853. "$ref": "#/components/schemas/PermissionConfig"
  20854. },
  20855. "tools": {
  20856. "type": "object",
  20857. "additionalProperties": {
  20858. "type": "boolean"
  20859. }
  20860. },
  20861. "attachment": {
  20862. "$ref": "#/components/schemas/AttachmentConfig"
  20863. },
  20864. "enterprise": {
  20865. "type": "object",
  20866. "properties": {
  20867. "url": {
  20868. "type": "string"
  20869. }
  20870. },
  20871. "additionalProperties": false
  20872. },
  20873. "tool_output": {
  20874. "type": "object",
  20875. "properties": {
  20876. "max_lines": {
  20877. "type": "integer",
  20878. "exclusiveMinimum": 0
  20879. },
  20880. "max_bytes": {
  20881. "type": "integer",
  20882. "exclusiveMinimum": 0
  20883. }
  20884. },
  20885. "additionalProperties": false
  20886. },
  20887. "compaction": {
  20888. "type": "object",
  20889. "properties": {
  20890. "auto": {
  20891. "type": "boolean"
  20892. },
  20893. "prune": {
  20894. "type": "boolean"
  20895. },
  20896. "tail_turns": {
  20897. "type": "integer",
  20898. "minimum": 0
  20899. },
  20900. "preserve_recent_tokens": {
  20901. "type": "integer",
  20902. "minimum": 0
  20903. },
  20904. "reserved": {
  20905. "type": "integer",
  20906. "minimum": 0
  20907. }
  20908. },
  20909. "additionalProperties": false
  20910. },
  20911. "experimental": {
  20912. "type": "object",
  20913. "properties": {
  20914. "disable_paste_summary": {
  20915. "type": "boolean"
  20916. },
  20917. "batch_tool": {
  20918. "type": "boolean"
  20919. },
  20920. "openTelemetry": {
  20921. "type": "boolean"
  20922. },
  20923. "primary_tools": {
  20924. "type": "array",
  20925. "items": {
  20926. "type": "string"
  20927. }
  20928. },
  20929. "continue_loop_on_deny": {
  20930. "type": "boolean"
  20931. },
  20932. "mcp_timeout": {
  20933. "type": "integer",
  20934. "exclusiveMinimum": 0
  20935. },
  20936. "policies": {
  20937. "type": "array",
  20938. "items": {
  20939. "$ref": "#/components/schemas/ConfigV2ExperimentalPolicy"
  20940. }
  20941. }
  20942. },
  20943. "additionalProperties": false
  20944. }
  20945. },
  20946. "additionalProperties": false
  20947. },
  20948. "Model": {
  20949. "type": "object",
  20950. "properties": {
  20951. "id": {
  20952. "type": "string"
  20953. },
  20954. "providerID": {
  20955. "type": "string"
  20956. },
  20957. "api": {
  20958. "type": "object",
  20959. "properties": {
  20960. "id": {
  20961. "type": "string"
  20962. },
  20963. "url": {
  20964. "type": "string"
  20965. },
  20966. "npm": {
  20967. "type": "string"
  20968. }
  20969. },
  20970. "required": ["id", "url", "npm"],
  20971. "additionalProperties": false
  20972. },
  20973. "name": {
  20974. "type": "string"
  20975. },
  20976. "family": {
  20977. "type": "string"
  20978. },
  20979. "capabilities": {
  20980. "type": "object",
  20981. "properties": {
  20982. "temperature": {
  20983. "type": "boolean"
  20984. },
  20985. "reasoning": {
  20986. "type": "boolean"
  20987. },
  20988. "attachment": {
  20989. "type": "boolean"
  20990. },
  20991. "toolcall": {
  20992. "type": "boolean"
  20993. },
  20994. "input": {
  20995. "type": "object",
  20996. "properties": {
  20997. "text": {
  20998. "type": "boolean"
  20999. },
  21000. "audio": {
  21001. "type": "boolean"
  21002. },
  21003. "image": {
  21004. "type": "boolean"
  21005. },
  21006. "video": {
  21007. "type": "boolean"
  21008. },
  21009. "pdf": {
  21010. "type": "boolean"
  21011. }
  21012. },
  21013. "required": ["text", "audio", "image", "video", "pdf"],
  21014. "additionalProperties": false
  21015. },
  21016. "output": {
  21017. "type": "object",
  21018. "properties": {
  21019. "text": {
  21020. "type": "boolean"
  21021. },
  21022. "audio": {
  21023. "type": "boolean"
  21024. },
  21025. "image": {
  21026. "type": "boolean"
  21027. },
  21028. "video": {
  21029. "type": "boolean"
  21030. },
  21031. "pdf": {
  21032. "type": "boolean"
  21033. }
  21034. },
  21035. "required": ["text", "audio", "image", "video", "pdf"],
  21036. "additionalProperties": false
  21037. },
  21038. "interleaved": {
  21039. "anyOf": [
  21040. {
  21041. "type": "boolean"
  21042. },
  21043. {
  21044. "type": "object",
  21045. "properties": {
  21046. "field": {
  21047. "type": "string",
  21048. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  21049. }
  21050. },
  21051. "required": ["field"],
  21052. "additionalProperties": false
  21053. }
  21054. ]
  21055. }
  21056. },
  21057. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  21058. "additionalProperties": false
  21059. },
  21060. "cost": {
  21061. "type": "object",
  21062. "properties": {
  21063. "input": {
  21064. "type": "number"
  21065. },
  21066. "output": {
  21067. "type": "number"
  21068. },
  21069. "cache": {
  21070. "type": "object",
  21071. "properties": {
  21072. "read": {
  21073. "type": "number"
  21074. },
  21075. "write": {
  21076. "type": "number"
  21077. }
  21078. },
  21079. "required": ["read", "write"],
  21080. "additionalProperties": false
  21081. },
  21082. "tiers": {
  21083. "type": "array",
  21084. "items": {
  21085. "type": "object",
  21086. "properties": {
  21087. "input": {
  21088. "type": "number"
  21089. },
  21090. "output": {
  21091. "type": "number"
  21092. },
  21093. "cache": {
  21094. "type": "object",
  21095. "properties": {
  21096. "read": {
  21097. "type": "number"
  21098. },
  21099. "write": {
  21100. "type": "number"
  21101. }
  21102. },
  21103. "required": ["read", "write"],
  21104. "additionalProperties": false
  21105. },
  21106. "tier": {
  21107. "type": "object",
  21108. "properties": {
  21109. "type": {
  21110. "type": "string",
  21111. "enum": ["context"]
  21112. },
  21113. "size": {
  21114. "type": "number"
  21115. }
  21116. },
  21117. "required": ["type", "size"],
  21118. "additionalProperties": false
  21119. }
  21120. },
  21121. "required": ["input", "output", "cache", "tier"],
  21122. "additionalProperties": false
  21123. }
  21124. },
  21125. "experimentalOver200K": {
  21126. "type": "object",
  21127. "properties": {
  21128. "input": {
  21129. "type": "number"
  21130. },
  21131. "output": {
  21132. "type": "number"
  21133. },
  21134. "cache": {
  21135. "type": "object",
  21136. "properties": {
  21137. "read": {
  21138. "type": "number"
  21139. },
  21140. "write": {
  21141. "type": "number"
  21142. }
  21143. },
  21144. "required": ["read", "write"],
  21145. "additionalProperties": false
  21146. }
  21147. },
  21148. "required": ["input", "output", "cache"],
  21149. "additionalProperties": false
  21150. }
  21151. },
  21152. "required": ["input", "output", "cache"],
  21153. "additionalProperties": false
  21154. },
  21155. "limit": {
  21156. "type": "object",
  21157. "properties": {
  21158. "context": {
  21159. "type": "number"
  21160. },
  21161. "input": {
  21162. "type": "number"
  21163. },
  21164. "output": {
  21165. "type": "number"
  21166. }
  21167. },
  21168. "required": ["context", "output"],
  21169. "additionalProperties": false
  21170. },
  21171. "status": {
  21172. "type": "string",
  21173. "enum": ["alpha", "beta", "deprecated", "active"]
  21174. },
  21175. "options": {
  21176. "type": "object"
  21177. },
  21178. "headers": {
  21179. "type": "object",
  21180. "additionalProperties": {
  21181. "type": "string"
  21182. }
  21183. },
  21184. "release_date": {
  21185. "type": "string"
  21186. },
  21187. "variants": {
  21188. "type": "object",
  21189. "additionalProperties": {
  21190. "type": "object"
  21191. }
  21192. }
  21193. },
  21194. "required": [
  21195. "id",
  21196. "providerID",
  21197. "api",
  21198. "name",
  21199. "capabilities",
  21200. "cost",
  21201. "limit",
  21202. "status",
  21203. "options",
  21204. "headers",
  21205. "release_date"
  21206. ],
  21207. "additionalProperties": false
  21208. },
  21209. "Provider": {
  21210. "type": "object",
  21211. "properties": {
  21212. "id": {
  21213. "type": "string"
  21214. },
  21215. "name": {
  21216. "type": "string"
  21217. },
  21218. "source": {
  21219. "type": "string",
  21220. "enum": ["env", "config", "custom", "api"]
  21221. },
  21222. "env": {
  21223. "type": "array",
  21224. "items": {
  21225. "type": "string"
  21226. }
  21227. },
  21228. "key": {
  21229. "type": "string"
  21230. },
  21231. "options": {
  21232. "type": "object"
  21233. },
  21234. "models": {
  21235. "type": "object",
  21236. "additionalProperties": {
  21237. "$ref": "#/components/schemas/Model"
  21238. }
  21239. }
  21240. },
  21241. "required": ["id", "name", "source", "env", "options", "models"],
  21242. "additionalProperties": false
  21243. },
  21244. "ExperimentalCapabilities": {
  21245. "type": "object",
  21246. "properties": {
  21247. "backgroundSubagents": {
  21248. "type": "boolean"
  21249. }
  21250. },
  21251. "required": ["backgroundSubagents"],
  21252. "additionalProperties": false
  21253. },
  21254. "ConsoleState": {
  21255. "type": "object",
  21256. "properties": {
  21257. "consoleManagedProviders": {
  21258. "type": "array",
  21259. "items": {
  21260. "type": "string"
  21261. }
  21262. },
  21263. "activeOrgName": {
  21264. "type": "string"
  21265. },
  21266. "switchableOrgCount": {
  21267. "type": "integer",
  21268. "minimum": 0
  21269. }
  21270. },
  21271. "required": ["consoleManagedProviders", "switchableOrgCount"],
  21272. "additionalProperties": false
  21273. },
  21274. "effect_HttpApiError_InternalServerError": {
  21275. "type": "object",
  21276. "properties": {
  21277. "_tag": {
  21278. "type": "string",
  21279. "enum": ["InternalServerError"]
  21280. }
  21281. },
  21282. "required": ["_tag"],
  21283. "additionalProperties": false
  21284. },
  21285. "ToolListItem": {
  21286. "type": "object",
  21287. "properties": {
  21288. "id": {
  21289. "type": "string"
  21290. },
  21291. "description": {
  21292. "type": "string"
  21293. },
  21294. "parameters": {}
  21295. },
  21296. "required": ["id", "description", "parameters"],
  21297. "additionalProperties": false
  21298. },
  21299. "ToolList": {
  21300. "type": "array",
  21301. "items": {
  21302. "$ref": "#/components/schemas/ToolListItem"
  21303. }
  21304. },
  21305. "ToolIDs": {
  21306. "type": "array",
  21307. "items": {
  21308. "type": "string"
  21309. }
  21310. },
  21311. "WorktreeError": {
  21312. "type": "object",
  21313. "properties": {
  21314. "name": {
  21315. "type": "string",
  21316. "enum": [
  21317. "WorktreeNotGitError",
  21318. "WorktreeNameGenerationFailedError",
  21319. "WorktreeCreateFailedError",
  21320. "WorktreeStartCommandFailedError",
  21321. "WorktreeRemoveFailedError",
  21322. "WorktreeResetFailedError",
  21323. "WorktreeListFailedError"
  21324. ]
  21325. },
  21326. "data": {
  21327. "type": "object",
  21328. "properties": {
  21329. "message": {
  21330. "type": "string"
  21331. }
  21332. },
  21333. "required": ["message"],
  21334. "additionalProperties": false
  21335. }
  21336. },
  21337. "required": ["name", "data"],
  21338. "additionalProperties": false
  21339. },
  21340. "WorktreeCreateInput": {
  21341. "type": "object",
  21342. "properties": {
  21343. "name": {
  21344. "type": "string"
  21345. },
  21346. "startCommand": {
  21347. "type": "string",
  21348. "description": "Additional startup script to run after the project's start command"
  21349. }
  21350. },
  21351. "additionalProperties": false
  21352. },
  21353. "Worktree": {
  21354. "type": "object",
  21355. "properties": {
  21356. "name": {
  21357. "type": "string"
  21358. },
  21359. "branch": {
  21360. "type": "string"
  21361. },
  21362. "directory": {
  21363. "type": "string"
  21364. }
  21365. },
  21366. "required": ["name", "directory"],
  21367. "additionalProperties": false
  21368. },
  21369. "WorktreeRemoveInput": {
  21370. "type": "object",
  21371. "properties": {
  21372. "directory": {
  21373. "type": "string"
  21374. }
  21375. },
  21376. "required": ["directory"],
  21377. "additionalProperties": false
  21378. },
  21379. "WorktreeResetInput": {
  21380. "type": "object",
  21381. "properties": {
  21382. "directory": {
  21383. "type": "string"
  21384. }
  21385. },
  21386. "required": ["directory"],
  21387. "additionalProperties": false
  21388. },
  21389. "ProjectSummary": {
  21390. "type": "object",
  21391. "properties": {
  21392. "id": {
  21393. "type": "string"
  21394. },
  21395. "name": {
  21396. "type": "string"
  21397. },
  21398. "worktree": {
  21399. "type": "string"
  21400. }
  21401. },
  21402. "required": ["id", "worktree"],
  21403. "additionalProperties": false
  21404. },
  21405. "GlobalSession": {
  21406. "type": "object",
  21407. "properties": {
  21408. "id": {
  21409. "type": "string",
  21410. "pattern": "^ses"
  21411. },
  21412. "slug": {
  21413. "type": "string"
  21414. },
  21415. "projectID": {
  21416. "type": "string"
  21417. },
  21418. "workspaceID": {
  21419. "type": "string",
  21420. "pattern": "^wrk"
  21421. },
  21422. "directory": {
  21423. "type": "string"
  21424. },
  21425. "path": {
  21426. "type": "string"
  21427. },
  21428. "parentID": {
  21429. "type": "string",
  21430. "pattern": "^ses"
  21431. },
  21432. "summary": {
  21433. "type": "object",
  21434. "properties": {
  21435. "additions": {
  21436. "type": "number"
  21437. },
  21438. "deletions": {
  21439. "type": "number"
  21440. },
  21441. "files": {
  21442. "type": "number"
  21443. },
  21444. "diffs": {
  21445. "type": "array",
  21446. "items": {
  21447. "$ref": "#/components/schemas/SnapshotFileDiff"
  21448. }
  21449. }
  21450. },
  21451. "required": ["additions", "deletions", "files"],
  21452. "additionalProperties": false
  21453. },
  21454. "cost": {
  21455. "type": "number"
  21456. },
  21457. "tokens": {
  21458. "type": "object",
  21459. "properties": {
  21460. "input": {
  21461. "type": "number"
  21462. },
  21463. "output": {
  21464. "type": "number"
  21465. },
  21466. "reasoning": {
  21467. "type": "number"
  21468. },
  21469. "cache": {
  21470. "type": "object",
  21471. "properties": {
  21472. "read": {
  21473. "type": "number"
  21474. },
  21475. "write": {
  21476. "type": "number"
  21477. }
  21478. },
  21479. "required": ["read", "write"],
  21480. "additionalProperties": false
  21481. }
  21482. },
  21483. "required": ["input", "output", "reasoning", "cache"],
  21484. "additionalProperties": false
  21485. },
  21486. "share": {
  21487. "type": "object",
  21488. "properties": {
  21489. "url": {
  21490. "type": "string"
  21491. }
  21492. },
  21493. "required": ["url"],
  21494. "additionalProperties": false
  21495. },
  21496. "title": {
  21497. "type": "string"
  21498. },
  21499. "agent": {
  21500. "type": "string"
  21501. },
  21502. "model": {
  21503. "type": "object",
  21504. "properties": {
  21505. "id": {
  21506. "type": "string"
  21507. },
  21508. "providerID": {
  21509. "type": "string"
  21510. },
  21511. "variant": {
  21512. "type": "string"
  21513. }
  21514. },
  21515. "required": ["id", "providerID"],
  21516. "additionalProperties": false
  21517. },
  21518. "version": {
  21519. "type": "string"
  21520. },
  21521. "metadata": {
  21522. "type": "object"
  21523. },
  21524. "time": {
  21525. "type": "object",
  21526. "properties": {
  21527. "created": {
  21528. "type": "integer",
  21529. "minimum": 0
  21530. },
  21531. "updated": {
  21532. "type": "integer",
  21533. "minimum": 0
  21534. },
  21535. "compacting": {
  21536. "type": "integer",
  21537. "minimum": 0
  21538. },
  21539. "archived": {
  21540. "type": "number"
  21541. }
  21542. },
  21543. "required": ["created", "updated"],
  21544. "additionalProperties": false
  21545. },
  21546. "permission": {
  21547. "$ref": "#/components/schemas/PermissionRuleset"
  21548. },
  21549. "revert": {
  21550. "type": "object",
  21551. "properties": {
  21552. "messageID": {
  21553. "type": "string",
  21554. "pattern": "^msg"
  21555. },
  21556. "partID": {
  21557. "type": "string",
  21558. "pattern": "^prt"
  21559. },
  21560. "snapshot": {
  21561. "type": "string"
  21562. },
  21563. "diff": {
  21564. "type": "string"
  21565. }
  21566. },
  21567. "required": ["messageID"],
  21568. "additionalProperties": false
  21569. },
  21570. "project": {
  21571. "anyOf": [
  21572. {
  21573. "$ref": "#/components/schemas/ProjectSummary"
  21574. },
  21575. {
  21576. "type": "null"
  21577. }
  21578. ]
  21579. }
  21580. },
  21581. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  21582. "additionalProperties": false
  21583. },
  21584. "McpResource": {
  21585. "type": "object",
  21586. "properties": {
  21587. "name": {
  21588. "type": "string"
  21589. },
  21590. "uri": {
  21591. "type": "string"
  21592. },
  21593. "description": {
  21594. "type": "string"
  21595. },
  21596. "mimeType": {
  21597. "type": "string"
  21598. },
  21599. "client": {
  21600. "type": "string"
  21601. }
  21602. },
  21603. "required": ["name", "uri", "client"],
  21604. "additionalProperties": false
  21605. },
  21606. "Symbol": {
  21607. "type": "object",
  21608. "properties": {
  21609. "name": {
  21610. "type": "string"
  21611. },
  21612. "kind": {
  21613. "type": "integer",
  21614. "minimum": 0
  21615. },
  21616. "location": {
  21617. "type": "object",
  21618. "properties": {
  21619. "uri": {
  21620. "type": "string"
  21621. },
  21622. "range": {
  21623. "$ref": "#/components/schemas/Range"
  21624. }
  21625. },
  21626. "required": ["uri", "range"],
  21627. "additionalProperties": false
  21628. }
  21629. },
  21630. "required": ["name", "kind", "location"],
  21631. "additionalProperties": false
  21632. },
  21633. "FileNode": {
  21634. "type": "object",
  21635. "properties": {
  21636. "name": {
  21637. "type": "string"
  21638. },
  21639. "path": {
  21640. "type": "string"
  21641. },
  21642. "absolute": {
  21643. "type": "string"
  21644. },
  21645. "type": {
  21646. "type": "string",
  21647. "enum": ["file", "directory"]
  21648. },
  21649. "ignored": {
  21650. "type": "boolean"
  21651. }
  21652. },
  21653. "required": ["name", "path", "absolute", "type", "ignored"],
  21654. "additionalProperties": false
  21655. },
  21656. "FileContent": {
  21657. "type": "object",
  21658. "properties": {
  21659. "type": {
  21660. "type": "string",
  21661. "enum": ["text", "binary"]
  21662. },
  21663. "content": {
  21664. "type": "string"
  21665. },
  21666. "diff": {
  21667. "type": "string"
  21668. },
  21669. "patch": {
  21670. "type": "object",
  21671. "properties": {
  21672. "oldFileName": {
  21673. "type": "string"
  21674. },
  21675. "newFileName": {
  21676. "type": "string"
  21677. },
  21678. "oldHeader": {
  21679. "type": "string"
  21680. },
  21681. "newHeader": {
  21682. "type": "string"
  21683. },
  21684. "hunks": {
  21685. "type": "array",
  21686. "items": {
  21687. "type": "object",
  21688. "properties": {
  21689. "oldStart": {
  21690. "type": "integer",
  21691. "minimum": 0
  21692. },
  21693. "oldLines": {
  21694. "type": "integer",
  21695. "minimum": 0
  21696. },
  21697. "newStart": {
  21698. "type": "integer",
  21699. "minimum": 0
  21700. },
  21701. "newLines": {
  21702. "type": "integer",
  21703. "minimum": 0
  21704. },
  21705. "lines": {
  21706. "type": "array",
  21707. "items": {
  21708. "type": "string"
  21709. }
  21710. }
  21711. },
  21712. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  21713. "additionalProperties": false
  21714. }
  21715. },
  21716. "index": {
  21717. "type": "string"
  21718. }
  21719. },
  21720. "required": ["oldFileName", "newFileName", "hunks"],
  21721. "additionalProperties": false
  21722. },
  21723. "encoding": {
  21724. "type": "string",
  21725. "enum": ["base64"]
  21726. },
  21727. "mimeType": {
  21728. "type": "string"
  21729. }
  21730. },
  21731. "required": ["type", "content"],
  21732. "additionalProperties": false
  21733. },
  21734. "File": {
  21735. "type": "object",
  21736. "properties": {
  21737. "path": {
  21738. "type": "string"
  21739. },
  21740. "added": {
  21741. "type": "integer",
  21742. "minimum": 0
  21743. },
  21744. "removed": {
  21745. "type": "integer",
  21746. "minimum": 0
  21747. },
  21748. "status": {
  21749. "type": "string",
  21750. "enum": ["added", "deleted", "modified"]
  21751. }
  21752. },
  21753. "required": ["path", "added", "removed", "status"],
  21754. "additionalProperties": false
  21755. },
  21756. "Path": {
  21757. "type": "object",
  21758. "properties": {
  21759. "home": {
  21760. "type": "string"
  21761. },
  21762. "state": {
  21763. "type": "string"
  21764. },
  21765. "config": {
  21766. "type": "string"
  21767. },
  21768. "worktree": {
  21769. "type": "string"
  21770. },
  21771. "directory": {
  21772. "type": "string"
  21773. }
  21774. },
  21775. "required": ["home", "state", "config", "worktree", "directory"],
  21776. "additionalProperties": false
  21777. },
  21778. "VcsInfo": {
  21779. "type": "object",
  21780. "properties": {
  21781. "branch": {
  21782. "type": "string"
  21783. },
  21784. "default_branch": {
  21785. "type": "string"
  21786. }
  21787. },
  21788. "additionalProperties": false
  21789. },
  21790. "VcsFileStatus": {
  21791. "type": "object",
  21792. "properties": {
  21793. "file": {
  21794. "type": "string"
  21795. },
  21796. "additions": {
  21797. "type": "number"
  21798. },
  21799. "deletions": {
  21800. "type": "number"
  21801. },
  21802. "status": {
  21803. "type": "string",
  21804. "enum": ["added", "deleted", "modified"]
  21805. }
  21806. },
  21807. "required": ["file", "additions", "deletions", "status"],
  21808. "additionalProperties": false
  21809. },
  21810. "VcsFileDiff": {
  21811. "type": "object",
  21812. "properties": {
  21813. "file": {
  21814. "type": "string"
  21815. },
  21816. "patch": {
  21817. "type": "string"
  21818. },
  21819. "additions": {
  21820. "type": "number"
  21821. },
  21822. "deletions": {
  21823. "type": "number"
  21824. },
  21825. "status": {
  21826. "type": "string",
  21827. "enum": ["added", "deleted", "modified"]
  21828. }
  21829. },
  21830. "required": ["file", "additions", "deletions"],
  21831. "additionalProperties": false
  21832. },
  21833. "VcsApplyError": {
  21834. "type": "object",
  21835. "properties": {
  21836. "name": {
  21837. "type": "string",
  21838. "enum": ["VcsApplyError"]
  21839. },
  21840. "data": {
  21841. "type": "object",
  21842. "properties": {
  21843. "message": {
  21844. "type": "string"
  21845. },
  21846. "reason": {
  21847. "type": "string",
  21848. "enum": ["non-git", "not-clean"]
  21849. }
  21850. },
  21851. "required": ["message", "reason"],
  21852. "additionalProperties": false
  21853. }
  21854. },
  21855. "required": ["name", "data"],
  21856. "additionalProperties": false
  21857. },
  21858. "Command": {
  21859. "type": "object",
  21860. "properties": {
  21861. "name": {
  21862. "type": "string"
  21863. },
  21864. "description": {
  21865. "type": "string"
  21866. },
  21867. "agent": {
  21868. "type": "string"
  21869. },
  21870. "model": {
  21871. "type": "string"
  21872. },
  21873. "source": {
  21874. "type": "string",
  21875. "enum": ["command", "mcp", "skill"]
  21876. },
  21877. "template": {
  21878. "type": "string"
  21879. },
  21880. "subtask": {
  21881. "type": "boolean"
  21882. },
  21883. "hints": {
  21884. "type": "array",
  21885. "items": {
  21886. "type": "string"
  21887. }
  21888. }
  21889. },
  21890. "required": ["name", "template", "hints"],
  21891. "additionalProperties": false
  21892. },
  21893. "Agent": {
  21894. "type": "object",
  21895. "properties": {
  21896. "name": {
  21897. "type": "string"
  21898. },
  21899. "description": {
  21900. "type": "string"
  21901. },
  21902. "mode": {
  21903. "type": "string",
  21904. "enum": ["subagent", "primary", "all"]
  21905. },
  21906. "native": {
  21907. "type": "boolean"
  21908. },
  21909. "hidden": {
  21910. "type": "boolean"
  21911. },
  21912. "topP": {
  21913. "type": "number"
  21914. },
  21915. "temperature": {
  21916. "type": "number"
  21917. },
  21918. "color": {
  21919. "type": "string"
  21920. },
  21921. "permission": {
  21922. "$ref": "#/components/schemas/PermissionRuleset"
  21923. },
  21924. "model": {
  21925. "type": "object",
  21926. "properties": {
  21927. "modelID": {
  21928. "type": "string"
  21929. },
  21930. "providerID": {
  21931. "type": "string"
  21932. }
  21933. },
  21934. "required": ["modelID", "providerID"],
  21935. "additionalProperties": false
  21936. },
  21937. "variant": {
  21938. "type": "string"
  21939. },
  21940. "prompt": {
  21941. "type": "string"
  21942. },
  21943. "options": {
  21944. "type": "object"
  21945. },
  21946. "steps": {
  21947. "type": "number"
  21948. }
  21949. },
  21950. "required": ["name", "mode", "permission", "options"],
  21951. "additionalProperties": false
  21952. },
  21953. "LSPStatus": {
  21954. "type": "object",
  21955. "properties": {
  21956. "id": {
  21957. "type": "string"
  21958. },
  21959. "name": {
  21960. "type": "string"
  21961. },
  21962. "root": {
  21963. "type": "string"
  21964. },
  21965. "status": {
  21966. "type": "string",
  21967. "enum": ["connected", "error"]
  21968. }
  21969. },
  21970. "required": ["id", "name", "root", "status"],
  21971. "additionalProperties": false
  21972. },
  21973. "FormatterStatus": {
  21974. "type": "object",
  21975. "properties": {
  21976. "name": {
  21977. "type": "string"
  21978. },
  21979. "extensions": {
  21980. "type": "array",
  21981. "items": {
  21982. "type": "string"
  21983. }
  21984. },
  21985. "enabled": {
  21986. "type": "boolean"
  21987. }
  21988. },
  21989. "required": ["name", "extensions", "enabled"],
  21990. "additionalProperties": false
  21991. },
  21992. "MCPStatusConnected": {
  21993. "type": "object",
  21994. "properties": {
  21995. "status": {
  21996. "type": "string",
  21997. "enum": ["connected"]
  21998. }
  21999. },
  22000. "required": ["status"],
  22001. "additionalProperties": false
  22002. },
  22003. "MCPStatusDisabled": {
  22004. "type": "object",
  22005. "properties": {
  22006. "status": {
  22007. "type": "string",
  22008. "enum": ["disabled"]
  22009. }
  22010. },
  22011. "required": ["status"],
  22012. "additionalProperties": false
  22013. },
  22014. "MCPStatusFailed": {
  22015. "type": "object",
  22016. "properties": {
  22017. "status": {
  22018. "type": "string",
  22019. "enum": ["failed"]
  22020. },
  22021. "error": {
  22022. "type": "string"
  22023. }
  22024. },
  22025. "required": ["status", "error"],
  22026. "additionalProperties": false
  22027. },
  22028. "MCPStatusNeedsAuth": {
  22029. "type": "object",
  22030. "properties": {
  22031. "status": {
  22032. "type": "string",
  22033. "enum": ["needs_auth"]
  22034. }
  22035. },
  22036. "required": ["status"],
  22037. "additionalProperties": false
  22038. },
  22039. "MCPStatusNeedsClientRegistration": {
  22040. "type": "object",
  22041. "properties": {
  22042. "status": {
  22043. "type": "string",
  22044. "enum": ["needs_client_registration"]
  22045. },
  22046. "error": {
  22047. "type": "string"
  22048. }
  22049. },
  22050. "required": ["status", "error"],
  22051. "additionalProperties": false
  22052. },
  22053. "MCPStatus": {
  22054. "anyOf": [
  22055. {
  22056. "$ref": "#/components/schemas/MCPStatusConnected"
  22057. },
  22058. {
  22059. "$ref": "#/components/schemas/MCPStatusDisabled"
  22060. },
  22061. {
  22062. "$ref": "#/components/schemas/MCPStatusFailed"
  22063. },
  22064. {
  22065. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  22066. },
  22067. {
  22068. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  22069. }
  22070. ]
  22071. },
  22072. "McpUnsupportedOAuthError": {
  22073. "type": "object",
  22074. "properties": {
  22075. "error": {
  22076. "type": "string"
  22077. }
  22078. },
  22079. "required": ["error"],
  22080. "additionalProperties": false
  22081. },
  22082. "McpServerNotFoundError": {
  22083. "type": "object",
  22084. "properties": {
  22085. "_tag": {
  22086. "type": "string",
  22087. "enum": ["McpServerNotFoundError"]
  22088. },
  22089. "name": {
  22090. "type": "string"
  22091. },
  22092. "message": {
  22093. "type": "string"
  22094. }
  22095. },
  22096. "required": ["_tag", "name", "message"],
  22097. "additionalProperties": false
  22098. },
  22099. "Project": {
  22100. "type": "object",
  22101. "properties": {
  22102. "id": {
  22103. "type": "string"
  22104. },
  22105. "worktree": {
  22106. "type": "string"
  22107. },
  22108. "vcs": {
  22109. "type": "string",
  22110. "enum": ["git"]
  22111. },
  22112. "name": {
  22113. "type": "string"
  22114. },
  22115. "icon": {
  22116. "type": "object",
  22117. "properties": {
  22118. "url": {
  22119. "type": "string"
  22120. },
  22121. "override": {
  22122. "type": "string"
  22123. },
  22124. "color": {
  22125. "type": "string"
  22126. }
  22127. },
  22128. "additionalProperties": false
  22129. },
  22130. "commands": {
  22131. "type": "object",
  22132. "properties": {
  22133. "start": {
  22134. "type": "string",
  22135. "description": "Startup script to run when creating a new workspace (worktree)"
  22136. }
  22137. },
  22138. "additionalProperties": false
  22139. },
  22140. "time": {
  22141. "type": "object",
  22142. "properties": {
  22143. "created": {
  22144. "type": "integer",
  22145. "minimum": 0
  22146. },
  22147. "updated": {
  22148. "type": "integer",
  22149. "minimum": 0
  22150. },
  22151. "initialized": {
  22152. "type": "integer",
  22153. "minimum": 0
  22154. }
  22155. },
  22156. "required": ["created", "updated"],
  22157. "additionalProperties": false
  22158. },
  22159. "sandboxes": {
  22160. "type": "array",
  22161. "items": {
  22162. "type": "string"
  22163. }
  22164. }
  22165. },
  22166. "required": ["id", "worktree", "time", "sandboxes"],
  22167. "additionalProperties": false
  22168. },
  22169. "ProjectNotFoundError": {
  22170. "type": "object",
  22171. "properties": {
  22172. "_tag": {
  22173. "type": "string",
  22174. "enum": ["ProjectNotFoundError"]
  22175. },
  22176. "projectID": {
  22177. "type": "string"
  22178. },
  22179. "message": {
  22180. "type": "string"
  22181. }
  22182. },
  22183. "required": ["_tag", "projectID", "message"],
  22184. "additionalProperties": false
  22185. },
  22186. "PtyNotFoundError": {
  22187. "type": "object",
  22188. "properties": {
  22189. "_tag": {
  22190. "type": "string",
  22191. "enum": ["PtyNotFoundError"]
  22192. },
  22193. "ptyID": {
  22194. "type": "string"
  22195. },
  22196. "message": {
  22197. "type": "string"
  22198. }
  22199. },
  22200. "required": ["_tag", "ptyID", "message"],
  22201. "additionalProperties": false
  22202. },
  22203. "PtyForbiddenError": {
  22204. "type": "object",
  22205. "properties": {
  22206. "_tag": {
  22207. "type": "string",
  22208. "enum": ["PtyForbiddenError"]
  22209. },
  22210. "message": {
  22211. "type": "string"
  22212. }
  22213. },
  22214. "required": ["_tag", "message"],
  22215. "additionalProperties": false
  22216. },
  22217. "QuestionRequest": {
  22218. "type": "object",
  22219. "properties": {
  22220. "id": {
  22221. "type": "string",
  22222. "pattern": "^que"
  22223. },
  22224. "sessionID": {
  22225. "type": "string",
  22226. "pattern": "^ses"
  22227. },
  22228. "questions": {
  22229. "type": "array",
  22230. "items": {
  22231. "$ref": "#/components/schemas/QuestionInfo"
  22232. },
  22233. "description": "Questions to ask"
  22234. },
  22235. "tool": {
  22236. "$ref": "#/components/schemas/QuestionTool"
  22237. }
  22238. },
  22239. "required": ["id", "sessionID", "questions"],
  22240. "additionalProperties": false
  22241. },
  22242. "QuestionNotFoundError": {
  22243. "type": "object",
  22244. "properties": {
  22245. "_tag": {
  22246. "type": "string",
  22247. "enum": ["QuestionNotFoundError"]
  22248. },
  22249. "requestID": {
  22250. "type": "string"
  22251. },
  22252. "message": {
  22253. "type": "string"
  22254. }
  22255. },
  22256. "required": ["_tag", "requestID", "message"],
  22257. "additionalProperties": false
  22258. },
  22259. "PermissionRequest": {
  22260. "type": "object",
  22261. "properties": {
  22262. "id": {
  22263. "type": "string",
  22264. "pattern": "^per"
  22265. },
  22266. "sessionID": {
  22267. "type": "string",
  22268. "pattern": "^ses"
  22269. },
  22270. "permission": {
  22271. "type": "string"
  22272. },
  22273. "patterns": {
  22274. "type": "array",
  22275. "items": {
  22276. "type": "string"
  22277. }
  22278. },
  22279. "metadata": {
  22280. "type": "object"
  22281. },
  22282. "always": {
  22283. "type": "array",
  22284. "items": {
  22285. "type": "string"
  22286. }
  22287. },
  22288. "tool": {
  22289. "type": "object",
  22290. "properties": {
  22291. "messageID": {
  22292. "type": "string"
  22293. },
  22294. "callID": {
  22295. "type": "string"
  22296. }
  22297. },
  22298. "required": ["messageID", "callID"],
  22299. "additionalProperties": false
  22300. }
  22301. },
  22302. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  22303. "additionalProperties": false
  22304. },
  22305. "PermissionNotFoundError": {
  22306. "type": "object",
  22307. "properties": {
  22308. "_tag": {
  22309. "type": "string",
  22310. "enum": ["PermissionNotFoundError"]
  22311. },
  22312. "requestID": {
  22313. "type": "string"
  22314. },
  22315. "message": {
  22316. "type": "string"
  22317. }
  22318. },
  22319. "required": ["_tag", "requestID", "message"],
  22320. "additionalProperties": false
  22321. },
  22322. "ProviderAuthMethod": {
  22323. "type": "object",
  22324. "properties": {
  22325. "type": {
  22326. "type": "string",
  22327. "enum": ["oauth", "api"]
  22328. },
  22329. "label": {
  22330. "type": "string"
  22331. },
  22332. "prompts": {
  22333. "type": "array",
  22334. "items": {
  22335. "anyOf": [
  22336. {
  22337. "type": "object",
  22338. "properties": {
  22339. "type": {
  22340. "type": "string",
  22341. "enum": ["text"]
  22342. },
  22343. "key": {
  22344. "type": "string"
  22345. },
  22346. "message": {
  22347. "type": "string"
  22348. },
  22349. "placeholder": {
  22350. "type": "string"
  22351. },
  22352. "when": {
  22353. "type": "object",
  22354. "properties": {
  22355. "key": {
  22356. "type": "string"
  22357. },
  22358. "op": {
  22359. "type": "string",
  22360. "enum": ["eq", "neq"]
  22361. },
  22362. "value": {
  22363. "type": "string"
  22364. }
  22365. },
  22366. "required": ["key", "op", "value"],
  22367. "additionalProperties": false
  22368. }
  22369. },
  22370. "required": ["type", "key", "message"],
  22371. "additionalProperties": false
  22372. },
  22373. {
  22374. "type": "object",
  22375. "properties": {
  22376. "type": {
  22377. "type": "string",
  22378. "enum": ["select"]
  22379. },
  22380. "key": {
  22381. "type": "string"
  22382. },
  22383. "message": {
  22384. "type": "string"
  22385. },
  22386. "options": {
  22387. "type": "array",
  22388. "items": {
  22389. "type": "object",
  22390. "properties": {
  22391. "label": {
  22392. "type": "string"
  22393. },
  22394. "value": {
  22395. "type": "string"
  22396. },
  22397. "hint": {
  22398. "type": "string"
  22399. }
  22400. },
  22401. "required": ["label", "value"],
  22402. "additionalProperties": false
  22403. }
  22404. },
  22405. "when": {
  22406. "type": "object",
  22407. "properties": {
  22408. "key": {
  22409. "type": "string"
  22410. },
  22411. "op": {
  22412. "type": "string",
  22413. "enum": ["eq", "neq"]
  22414. },
  22415. "value": {
  22416. "type": "string"
  22417. }
  22418. },
  22419. "required": ["key", "op", "value"],
  22420. "additionalProperties": false
  22421. }
  22422. },
  22423. "required": ["type", "key", "message", "options"],
  22424. "additionalProperties": false
  22425. }
  22426. ]
  22427. }
  22428. }
  22429. },
  22430. "required": ["type", "label"],
  22431. "additionalProperties": false
  22432. },
  22433. "ProviderAuthAuthorization": {
  22434. "type": "object",
  22435. "properties": {
  22436. "url": {
  22437. "type": "string"
  22438. },
  22439. "method": {
  22440. "type": "string",
  22441. "enum": ["auto", "code"]
  22442. },
  22443. "instructions": {
  22444. "type": "string"
  22445. }
  22446. },
  22447. "required": ["url", "method", "instructions"],
  22448. "additionalProperties": false
  22449. },
  22450. "ProviderAuthError1": {
  22451. "type": "object",
  22452. "properties": {
  22453. "name": {
  22454. "type": "string",
  22455. "enum": [
  22456. "BadRequest",
  22457. "ProviderAuthOauthMissing",
  22458. "ProviderAuthOauthCodeMissing",
  22459. "ProviderAuthOauthCallbackFailed",
  22460. "ProviderAuthValidationFailed"
  22461. ]
  22462. },
  22463. "data": {
  22464. "type": "object",
  22465. "properties": {
  22466. "providerID": {
  22467. "type": "string"
  22468. },
  22469. "field": {
  22470. "type": "string"
  22471. },
  22472. "message": {
  22473. "type": "string"
  22474. },
  22475. "kind": {
  22476. "type": "string"
  22477. }
  22478. },
  22479. "additionalProperties": false
  22480. }
  22481. },
  22482. "required": ["name", "data"],
  22483. "additionalProperties": false
  22484. },
  22485. "NotFoundError": {
  22486. "type": "object",
  22487. "required": ["name", "data"],
  22488. "properties": {
  22489. "name": {
  22490. "type": "string",
  22491. "enum": ["NotFoundError"]
  22492. },
  22493. "data": {
  22494. "type": "object",
  22495. "required": ["message"],
  22496. "properties": {
  22497. "message": {
  22498. "type": "string"
  22499. }
  22500. }
  22501. }
  22502. }
  22503. },
  22504. "TextPartInput": {
  22505. "type": "object",
  22506. "properties": {
  22507. "id": {
  22508. "type": "string",
  22509. "pattern": "^prt"
  22510. },
  22511. "type": {
  22512. "type": "string",
  22513. "enum": ["text"]
  22514. },
  22515. "text": {
  22516. "type": "string"
  22517. },
  22518. "synthetic": {
  22519. "type": "boolean"
  22520. },
  22521. "ignored": {
  22522. "type": "boolean"
  22523. },
  22524. "time": {
  22525. "type": "object",
  22526. "properties": {
  22527. "start": {
  22528. "type": "integer",
  22529. "minimum": 0
  22530. },
  22531. "end": {
  22532. "type": "integer",
  22533. "minimum": 0
  22534. }
  22535. },
  22536. "required": ["start"],
  22537. "additionalProperties": false
  22538. },
  22539. "metadata": {
  22540. "type": "object"
  22541. }
  22542. },
  22543. "required": ["type", "text"],
  22544. "additionalProperties": false
  22545. },
  22546. "FilePartInput": {
  22547. "type": "object",
  22548. "properties": {
  22549. "id": {
  22550. "type": "string",
  22551. "pattern": "^prt"
  22552. },
  22553. "type": {
  22554. "type": "string",
  22555. "enum": ["file"]
  22556. },
  22557. "mime": {
  22558. "type": "string"
  22559. },
  22560. "filename": {
  22561. "type": "string"
  22562. },
  22563. "url": {
  22564. "type": "string"
  22565. },
  22566. "source": {
  22567. "$ref": "#/components/schemas/FilePartSource"
  22568. }
  22569. },
  22570. "required": ["type", "mime", "url"],
  22571. "additionalProperties": false
  22572. },
  22573. "AgentPartInput": {
  22574. "type": "object",
  22575. "properties": {
  22576. "id": {
  22577. "type": "string",
  22578. "pattern": "^prt"
  22579. },
  22580. "type": {
  22581. "type": "string",
  22582. "enum": ["agent"]
  22583. },
  22584. "name": {
  22585. "type": "string"
  22586. },
  22587. "source": {
  22588. "type": "object",
  22589. "properties": {
  22590. "value": {
  22591. "type": "string"
  22592. },
  22593. "start": {
  22594. "type": "integer",
  22595. "minimum": 0
  22596. },
  22597. "end": {
  22598. "type": "integer",
  22599. "minimum": 0
  22600. }
  22601. },
  22602. "required": ["value", "start", "end"],
  22603. "additionalProperties": false
  22604. }
  22605. },
  22606. "required": ["type", "name"],
  22607. "additionalProperties": false
  22608. },
  22609. "SubtaskPartInput": {
  22610. "type": "object",
  22611. "properties": {
  22612. "id": {
  22613. "type": "string",
  22614. "pattern": "^prt"
  22615. },
  22616. "type": {
  22617. "type": "string",
  22618. "enum": ["subtask"]
  22619. },
  22620. "prompt": {
  22621. "type": "string"
  22622. },
  22623. "description": {
  22624. "type": "string"
  22625. },
  22626. "agent": {
  22627. "type": "string"
  22628. },
  22629. "model": {
  22630. "type": "object",
  22631. "properties": {
  22632. "providerID": {
  22633. "type": "string"
  22634. },
  22635. "modelID": {
  22636. "type": "string"
  22637. }
  22638. },
  22639. "required": ["providerID", "modelID"],
  22640. "additionalProperties": false
  22641. },
  22642. "command": {
  22643. "type": "string"
  22644. }
  22645. },
  22646. "required": ["type", "prompt", "description", "agent"],
  22647. "additionalProperties": false
  22648. },
  22649. "SessionBusyError": {
  22650. "type": "object",
  22651. "properties": {
  22652. "_tag": {
  22653. "type": "string",
  22654. "enum": ["SessionBusyError"]
  22655. },
  22656. "sessionID": {
  22657. "type": "string"
  22658. },
  22659. "message": {
  22660. "type": "string"
  22661. }
  22662. },
  22663. "required": ["_tag", "sessionID", "message"],
  22664. "additionalProperties": false
  22665. },
  22666. "EventTuiPromptAppend": {
  22667. "type": "object",
  22668. "properties": {
  22669. "type": {
  22670. "type": "string",
  22671. "enum": ["tui.prompt.append"]
  22672. },
  22673. "properties": {
  22674. "type": "object",
  22675. "properties": {
  22676. "text": {
  22677. "type": "string"
  22678. }
  22679. },
  22680. "required": ["text"],
  22681. "additionalProperties": false
  22682. }
  22683. },
  22684. "required": ["type", "properties"],
  22685. "additionalProperties": false
  22686. },
  22687. "EventTuiCommandExecute": {
  22688. "type": "object",
  22689. "properties": {
  22690. "type": {
  22691. "type": "string",
  22692. "enum": ["tui.command.execute"]
  22693. },
  22694. "properties": {
  22695. "type": "object",
  22696. "properties": {
  22697. "command": {
  22698. "anyOf": [
  22699. {
  22700. "type": "string",
  22701. "enum": [
  22702. "session.list",
  22703. "session.new",
  22704. "session.share",
  22705. "session.interrupt",
  22706. "session.compact",
  22707. "session.page.up",
  22708. "session.page.down",
  22709. "session.line.up",
  22710. "session.line.down",
  22711. "session.half.page.up",
  22712. "session.half.page.down",
  22713. "session.first",
  22714. "session.last",
  22715. "prompt.clear",
  22716. "prompt.submit",
  22717. "agent.cycle"
  22718. ]
  22719. },
  22720. {
  22721. "type": "string"
  22722. }
  22723. ]
  22724. }
  22725. },
  22726. "required": ["command"],
  22727. "additionalProperties": false
  22728. }
  22729. },
  22730. "required": ["type", "properties"],
  22731. "additionalProperties": false
  22732. },
  22733. "EventTuiToastShow": {
  22734. "type": "object",
  22735. "properties": {
  22736. "type": {
  22737. "type": "string",
  22738. "enum": ["tui.toast.show"]
  22739. },
  22740. "properties": {
  22741. "type": "object",
  22742. "properties": {
  22743. "title": {
  22744. "type": "string"
  22745. },
  22746. "message": {
  22747. "type": "string"
  22748. },
  22749. "variant": {
  22750. "type": "string",
  22751. "enum": ["info", "success", "warning", "error"]
  22752. },
  22753. "duration": {
  22754. "type": "integer",
  22755. "exclusiveMinimum": 0
  22756. }
  22757. },
  22758. "required": ["message", "variant"],
  22759. "additionalProperties": false
  22760. }
  22761. },
  22762. "required": ["type", "properties"],
  22763. "additionalProperties": false
  22764. },
  22765. "EventTuiSessionSelect": {
  22766. "type": "object",
  22767. "properties": {
  22768. "type": {
  22769. "type": "string",
  22770. "enum": ["tui.session.select"]
  22771. },
  22772. "properties": {
  22773. "type": "object",
  22774. "properties": {
  22775. "sessionID": {
  22776. "type": "string",
  22777. "pattern": "^ses",
  22778. "description": "Session ID to navigate to"
  22779. }
  22780. },
  22781. "required": ["sessionID"],
  22782. "additionalProperties": false
  22783. }
  22784. },
  22785. "required": ["type", "properties"],
  22786. "additionalProperties": false
  22787. },
  22788. "Workspace": {
  22789. "type": "object",
  22790. "properties": {
  22791. "id": {
  22792. "type": "string",
  22793. "pattern": "^wrk"
  22794. },
  22795. "type": {
  22796. "type": "string"
  22797. },
  22798. "name": {
  22799. "type": "string"
  22800. },
  22801. "branch": {
  22802. "anyOf": [
  22803. {
  22804. "type": "string"
  22805. },
  22806. {
  22807. "type": "null"
  22808. }
  22809. ]
  22810. },
  22811. "directory": {
  22812. "anyOf": [
  22813. {
  22814. "type": "string"
  22815. },
  22816. {
  22817. "type": "null"
  22818. }
  22819. ]
  22820. },
  22821. "extra": {
  22822. "anyOf": [
  22823. {},
  22824. {
  22825. "type": "null"
  22826. }
  22827. ]
  22828. },
  22829. "projectID": {
  22830. "type": "string"
  22831. },
  22832. "timeUsed": {
  22833. "anyOf": [
  22834. {
  22835. "type": "number"
  22836. },
  22837. {
  22838. "type": "string",
  22839. "enum": ["NaN"]
  22840. },
  22841. {
  22842. "type": "string",
  22843. "enum": ["Infinity"]
  22844. },
  22845. {
  22846. "type": "string",
  22847. "enum": ["-Infinity"]
  22848. },
  22849. {
  22850. "type": "string",
  22851. "enum": ["Infinity", "-Infinity", "NaN"]
  22852. }
  22853. ]
  22854. }
  22855. },
  22856. "required": ["id", "type", "name", "projectID", "timeUsed"],
  22857. "additionalProperties": false
  22858. },
  22859. "WorkspaceCreateError": {
  22860. "type": "object",
  22861. "properties": {
  22862. "name": {
  22863. "type": "string",
  22864. "enum": ["WorkspaceCreateError"]
  22865. },
  22866. "data": {
  22867. "type": "object",
  22868. "properties": {
  22869. "message": {
  22870. "type": "string"
  22871. }
  22872. },
  22873. "required": ["message"],
  22874. "additionalProperties": false
  22875. }
  22876. },
  22877. "required": ["name", "data"],
  22878. "additionalProperties": false
  22879. },
  22880. "WorkspaceWarpError": {
  22881. "type": "object",
  22882. "properties": {
  22883. "name": {
  22884. "type": "string",
  22885. "enum": ["WorkspaceWarpError"]
  22886. },
  22887. "data": {
  22888. "type": "object",
  22889. "properties": {
  22890. "message": {
  22891. "type": "string"
  22892. }
  22893. },
  22894. "required": ["message"],
  22895. "additionalProperties": false
  22896. }
  22897. },
  22898. "required": ["name", "data"],
  22899. "additionalProperties": false
  22900. },
  22901. "UnauthorizedError": {
  22902. "type": "object",
  22903. "properties": {
  22904. "_tag": {
  22905. "type": "string",
  22906. "enum": ["UnauthorizedError"]
  22907. },
  22908. "message": {
  22909. "type": "string"
  22910. }
  22911. },
  22912. "required": ["_tag", "message"],
  22913. "additionalProperties": false
  22914. },
  22915. "SessionsResponse": {
  22916. "type": "object",
  22917. "properties": {
  22918. "data": {
  22919. "type": "array",
  22920. "items": {
  22921. "$ref": "#/components/schemas/SessionV2Info"
  22922. }
  22923. },
  22924. "cursor": {
  22925. "type": "object",
  22926. "properties": {
  22927. "previous": {
  22928. "type": "string"
  22929. },
  22930. "next": {
  22931. "type": "string"
  22932. }
  22933. },
  22934. "additionalProperties": false
  22935. }
  22936. },
  22937. "required": ["data", "cursor"],
  22938. "additionalProperties": false
  22939. },
  22940. "InvalidCursorError": {
  22941. "type": "object",
  22942. "properties": {
  22943. "_tag": {
  22944. "type": "string",
  22945. "enum": ["InvalidCursorError"]
  22946. },
  22947. "message": {
  22948. "type": "string"
  22949. }
  22950. },
  22951. "required": ["_tag", "message"],
  22952. "additionalProperties": false
  22953. },
  22954. "SessionNotFoundError": {
  22955. "type": "object",
  22956. "properties": {
  22957. "_tag": {
  22958. "type": "string",
  22959. "enum": ["SessionNotFoundError"]
  22960. },
  22961. "sessionID": {
  22962. "type": "string"
  22963. },
  22964. "message": {
  22965. "type": "string"
  22966. }
  22967. },
  22968. "required": ["_tag", "sessionID", "message"],
  22969. "additionalProperties": false
  22970. },
  22971. "ConflictError": {
  22972. "type": "object",
  22973. "properties": {
  22974. "_tag": {
  22975. "type": "string",
  22976. "enum": ["ConflictError"]
  22977. },
  22978. "message": {
  22979. "type": "string"
  22980. },
  22981. "resource": {
  22982. "type": "string"
  22983. }
  22984. },
  22985. "required": ["_tag", "message"],
  22986. "additionalProperties": false
  22987. },
  22988. "ServiceUnavailableError": {
  22989. "type": "object",
  22990. "properties": {
  22991. "_tag": {
  22992. "type": "string",
  22993. "enum": ["ServiceUnavailableError"]
  22994. },
  22995. "message": {
  22996. "type": "string"
  22997. },
  22998. "service": {
  22999. "type": "string"
  23000. }
  23001. },
  23002. "required": ["_tag", "message"],
  23003. "additionalProperties": false
  23004. },
  23005. "UnknownError1": {
  23006. "type": "object",
  23007. "properties": {
  23008. "_tag": {
  23009. "type": "string",
  23010. "enum": ["UnknownError"]
  23011. },
  23012. "message": {
  23013. "type": "string"
  23014. },
  23015. "ref": {
  23016. "type": "string"
  23017. }
  23018. },
  23019. "required": ["_tag", "message"],
  23020. "additionalProperties": false
  23021. },
  23022. "SessionMessagesResponse": {
  23023. "type": "object",
  23024. "properties": {
  23025. "data": {
  23026. "type": "array",
  23027. "items": {
  23028. "$ref": "#/components/schemas/SessionMessage"
  23029. }
  23030. },
  23031. "cursor": {
  23032. "type": "object",
  23033. "properties": {
  23034. "previous": {
  23035. "type": "string"
  23036. },
  23037. "next": {
  23038. "type": "string"
  23039. }
  23040. },
  23041. "additionalProperties": false
  23042. }
  23043. },
  23044. "required": ["data", "cursor"],
  23045. "additionalProperties": false
  23046. },
  23047. "ProviderNotFoundError": {
  23048. "type": "object",
  23049. "properties": {
  23050. "_tag": {
  23051. "type": "string",
  23052. "enum": ["ProviderNotFoundError"]
  23053. },
  23054. "providerID": {
  23055. "type": "string"
  23056. },
  23057. "message": {
  23058. "type": "string"
  23059. }
  23060. },
  23061. "required": ["_tag", "providerID", "message"],
  23062. "additionalProperties": false
  23063. },
  23064. "V2Event": {
  23065. "anyOf": [
  23066. {
  23067. "$ref": "#/components/schemas/V2EventModels-devRefreshed"
  23068. },
  23069. {
  23070. "$ref": "#/components/schemas/V2EventIntegrationUpdated"
  23071. },
  23072. {
  23073. "$ref": "#/components/schemas/V2EventCatalogUpdated"
  23074. },
  23075. {
  23076. "$ref": "#/components/schemas/V2EventSessionCreated"
  23077. },
  23078. {
  23079. "$ref": "#/components/schemas/V2EventSessionUpdated"
  23080. },
  23081. {
  23082. "$ref": "#/components/schemas/V2EventSessionDeleted"
  23083. },
  23084. {
  23085. "$ref": "#/components/schemas/V2EventMessageUpdated"
  23086. },
  23087. {
  23088. "$ref": "#/components/schemas/V2EventMessageRemoved"
  23089. },
  23090. {
  23091. "$ref": "#/components/schemas/V2EventMessagePartUpdated"
  23092. },
  23093. {
  23094. "$ref": "#/components/schemas/V2EventMessagePartRemoved"
  23095. },
  23096. {
  23097. "$ref": "#/components/schemas/V2EventSessionNextAgentSwitched"
  23098. },
  23099. {
  23100. "$ref": "#/components/schemas/V2EventSessionNextModelSwitched"
  23101. },
  23102. {
  23103. "$ref": "#/components/schemas/V2EventSessionNextMoved"
  23104. },
  23105. {
  23106. "$ref": "#/components/schemas/V2EventSessionNextPrompted"
  23107. },
  23108. {
  23109. "$ref": "#/components/schemas/V2EventSessionNextPromptAdmitted"
  23110. },
  23111. {
  23112. "$ref": "#/components/schemas/V2EventSessionNextPromptPromoted"
  23113. },
  23114. {
  23115. "$ref": "#/components/schemas/V2EventSessionNextInterruptRequested"
  23116. },
  23117. {
  23118. "$ref": "#/components/schemas/V2EventSessionNextContextUpdated"
  23119. },
  23120. {
  23121. "$ref": "#/components/schemas/V2EventSessionNextSynthetic"
  23122. },
  23123. {
  23124. "$ref": "#/components/schemas/V2EventSessionNextShellStarted"
  23125. },
  23126. {
  23127. "$ref": "#/components/schemas/V2EventSessionNextShellEnded"
  23128. },
  23129. {
  23130. "$ref": "#/components/schemas/V2EventSessionNextStepStarted"
  23131. },
  23132. {
  23133. "$ref": "#/components/schemas/V2EventSessionNextStepEnded"
  23134. },
  23135. {
  23136. "$ref": "#/components/schemas/V2EventSessionNextStepFailed"
  23137. },
  23138. {
  23139. "$ref": "#/components/schemas/V2EventSessionNextTextStarted"
  23140. },
  23141. {
  23142. "$ref": "#/components/schemas/V2EventSessionNextTextDelta"
  23143. },
  23144. {
  23145. "$ref": "#/components/schemas/V2EventSessionNextTextEnded"
  23146. },
  23147. {
  23148. "$ref": "#/components/schemas/V2EventSessionNextReasoningStarted"
  23149. },
  23150. {
  23151. "$ref": "#/components/schemas/V2EventSessionNextReasoningDelta"
  23152. },
  23153. {
  23154. "$ref": "#/components/schemas/V2EventSessionNextReasoningEnded"
  23155. },
  23156. {
  23157. "$ref": "#/components/schemas/V2EventSessionNextToolInputStarted"
  23158. },
  23159. {
  23160. "$ref": "#/components/schemas/V2EventSessionNextToolInputDelta"
  23161. },
  23162. {
  23163. "$ref": "#/components/schemas/V2EventSessionNextToolInputEnded"
  23164. },
  23165. {
  23166. "$ref": "#/components/schemas/V2EventSessionNextToolCalled"
  23167. },
  23168. {
  23169. "$ref": "#/components/schemas/V2EventSessionNextToolProgress"
  23170. },
  23171. {
  23172. "$ref": "#/components/schemas/V2EventSessionNextToolSuccess"
  23173. },
  23174. {
  23175. "$ref": "#/components/schemas/V2EventSessionNextToolFailed"
  23176. },
  23177. {
  23178. "$ref": "#/components/schemas/V2EventSessionNextRetried"
  23179. },
  23180. {
  23181. "$ref": "#/components/schemas/V2EventSessionNextCompactionStarted"
  23182. },
  23183. {
  23184. "$ref": "#/components/schemas/V2EventSessionNextCompactionDelta"
  23185. },
  23186. {
  23187. "$ref": "#/components/schemas/V2EventSessionNextCompactionEnded"
  23188. },
  23189. {
  23190. "$ref": "#/components/schemas/V2EventMessagePartDelta"
  23191. },
  23192. {
  23193. "$ref": "#/components/schemas/V2EventSessionDiff"
  23194. },
  23195. {
  23196. "$ref": "#/components/schemas/V2EventSessionError"
  23197. },
  23198. {
  23199. "$ref": "#/components/schemas/V2EventInstallationUpdated"
  23200. },
  23201. {
  23202. "$ref": "#/components/schemas/V2EventInstallationUpdate-available"
  23203. },
  23204. {
  23205. "$ref": "#/components/schemas/V2EventFileEdited"
  23206. },
  23207. {
  23208. "$ref": "#/components/schemas/V2EventPluginAdded"
  23209. },
  23210. {
  23211. "$ref": "#/components/schemas/V2EventPermissionV2Asked"
  23212. },
  23213. {
  23214. "$ref": "#/components/schemas/V2EventPermissionV2Replied"
  23215. },
  23216. {
  23217. "$ref": "#/components/schemas/V2EventReferenceUpdated"
  23218. },
  23219. {
  23220. "$ref": "#/components/schemas/V2EventProjectDirectoriesUpdated"
  23221. },
  23222. {
  23223. "$ref": "#/components/schemas/V2EventFileWatcherUpdated"
  23224. },
  23225. {
  23226. "$ref": "#/components/schemas/V2EventPtyCreated"
  23227. },
  23228. {
  23229. "$ref": "#/components/schemas/V2EventPtyUpdated"
  23230. },
  23231. {
  23232. "$ref": "#/components/schemas/V2EventPtyExited"
  23233. },
  23234. {
  23235. "$ref": "#/components/schemas/V2EventPtyDeleted"
  23236. },
  23237. {
  23238. "$ref": "#/components/schemas/V2EventQuestionV2Asked"
  23239. },
  23240. {
  23241. "$ref": "#/components/schemas/V2EventQuestionV2Replied"
  23242. },
  23243. {
  23244. "$ref": "#/components/schemas/V2EventQuestionV2Rejected"
  23245. },
  23246. {
  23247. "$ref": "#/components/schemas/V2EventTodoUpdated"
  23248. },
  23249. {
  23250. "$ref": "#/components/schemas/V2EventLspUpdated"
  23251. },
  23252. {
  23253. "$ref": "#/components/schemas/V2EventPermissionAsked"
  23254. },
  23255. {
  23256. "$ref": "#/components/schemas/V2EventPermissionReplied"
  23257. },
  23258. {
  23259. "$ref": "#/components/schemas/V2EventTuiPromptAppend"
  23260. },
  23261. {
  23262. "$ref": "#/components/schemas/V2EventTuiCommandExecute"
  23263. },
  23264. {
  23265. "$ref": "#/components/schemas/V2EventTuiToastShow"
  23266. },
  23267. {
  23268. "$ref": "#/components/schemas/V2EventTuiSessionSelect"
  23269. },
  23270. {
  23271. "$ref": "#/components/schemas/V2EventMcpToolsChanged"
  23272. },
  23273. {
  23274. "$ref": "#/components/schemas/V2EventMcpBrowserOpenFailed"
  23275. },
  23276. {
  23277. "$ref": "#/components/schemas/V2EventCommandExecuted"
  23278. },
  23279. {
  23280. "$ref": "#/components/schemas/V2EventProjectUpdated"
  23281. },
  23282. {
  23283. "$ref": "#/components/schemas/V2EventSessionStatus"
  23284. },
  23285. {
  23286. "$ref": "#/components/schemas/V2EventSessionIdle"
  23287. },
  23288. {
  23289. "$ref": "#/components/schemas/V2EventQuestionAsked"
  23290. },
  23291. {
  23292. "$ref": "#/components/schemas/V2EventQuestionReplied"
  23293. },
  23294. {
  23295. "$ref": "#/components/schemas/V2EventQuestionRejected"
  23296. },
  23297. {
  23298. "$ref": "#/components/schemas/V2EventSessionCompacted"
  23299. },
  23300. {
  23301. "$ref": "#/components/schemas/V2EventVcsBranchUpdated"
  23302. },
  23303. {
  23304. "$ref": "#/components/schemas/V2EventWorkspaceReady"
  23305. },
  23306. {
  23307. "$ref": "#/components/schemas/V2EventWorkspaceFailed"
  23308. },
  23309. {
  23310. "$ref": "#/components/schemas/V2EventWorkspaceStatus"
  23311. },
  23312. {
  23313. "$ref": "#/components/schemas/V2EventWorktreeReady"
  23314. },
  23315. {
  23316. "$ref": "#/components/schemas/V2EventWorktreeFailed"
  23317. },
  23318. {
  23319. "$ref": "#/components/schemas/V2EventServerConnected"
  23320. },
  23321. {
  23322. "$ref": "#/components/schemas/V2EventGlobalDisposed"
  23323. },
  23324. {
  23325. "$ref": "#/components/schemas/V2EventServerConnected"
  23326. }
  23327. ]
  23328. },
  23329. "ForbiddenError": {
  23330. "type": "object",
  23331. "properties": {
  23332. "_tag": {
  23333. "type": "string",
  23334. "enum": ["ForbiddenError"]
  23335. },
  23336. "message": {
  23337. "type": "string"
  23338. }
  23339. },
  23340. "required": ["_tag", "message"],
  23341. "additionalProperties": false
  23342. },
  23343. "ProjectCopyError": {
  23344. "type": "object",
  23345. "properties": {
  23346. "name": {
  23347. "type": "string",
  23348. "enum": ["ProjectCopyError"]
  23349. },
  23350. "data": {
  23351. "type": "object",
  23352. "properties": {
  23353. "message": {
  23354. "type": "string"
  23355. },
  23356. "forceRequired": {
  23357. "type": "boolean"
  23358. }
  23359. },
  23360. "required": ["message"],
  23361. "additionalProperties": false
  23362. }
  23363. },
  23364. "required": ["name", "data"],
  23365. "additionalProperties": false
  23366. },
  23367. "effect_HttpApiError_Forbidden": {
  23368. "type": "object",
  23369. "properties": {
  23370. "_tag": {
  23371. "type": "string",
  23372. "enum": ["Forbidden"]
  23373. }
  23374. },
  23375. "required": ["_tag"],
  23376. "additionalProperties": false
  23377. },
  23378. "Event.tui.prompt.append": {
  23379. "type": "object",
  23380. "properties": {
  23381. "id": {
  23382. "type": "string",
  23383. "pattern": "^evt_"
  23384. },
  23385. "type": {
  23386. "type": "string",
  23387. "enum": ["tui.prompt.append"]
  23388. },
  23389. "properties": {
  23390. "type": "object",
  23391. "properties": {
  23392. "text": {
  23393. "type": "string"
  23394. }
  23395. },
  23396. "required": ["text"],
  23397. "additionalProperties": false
  23398. }
  23399. },
  23400. "required": ["id", "type", "properties"],
  23401. "additionalProperties": false
  23402. },
  23403. "Event.tui.command.execute": {
  23404. "type": "object",
  23405. "properties": {
  23406. "id": {
  23407. "type": "string",
  23408. "pattern": "^evt_"
  23409. },
  23410. "type": {
  23411. "type": "string",
  23412. "enum": ["tui.command.execute"]
  23413. },
  23414. "properties": {
  23415. "type": "object",
  23416. "properties": {
  23417. "command": {
  23418. "anyOf": [
  23419. {
  23420. "type": "string",
  23421. "enum": [
  23422. "session.list",
  23423. "session.new",
  23424. "session.share",
  23425. "session.interrupt",
  23426. "session.compact",
  23427. "session.page.up",
  23428. "session.page.down",
  23429. "session.line.up",
  23430. "session.line.down",
  23431. "session.half.page.up",
  23432. "session.half.page.down",
  23433. "session.first",
  23434. "session.last",
  23435. "prompt.clear",
  23436. "prompt.submit",
  23437. "agent.cycle"
  23438. ]
  23439. },
  23440. {
  23441. "type": "string"
  23442. }
  23443. ]
  23444. }
  23445. },
  23446. "required": ["command"],
  23447. "additionalProperties": false
  23448. }
  23449. },
  23450. "required": ["id", "type", "properties"],
  23451. "additionalProperties": false
  23452. },
  23453. "Event.tui.toast.show": {
  23454. "type": "object",
  23455. "properties": {
  23456. "id": {
  23457. "type": "string",
  23458. "pattern": "^evt_"
  23459. },
  23460. "type": {
  23461. "type": "string",
  23462. "enum": ["tui.toast.show"]
  23463. },
  23464. "properties": {
  23465. "type": "object",
  23466. "properties": {
  23467. "title": {
  23468. "type": "string"
  23469. },
  23470. "message": {
  23471. "type": "string"
  23472. },
  23473. "variant": {
  23474. "type": "string",
  23475. "enum": ["info", "success", "warning", "error"]
  23476. },
  23477. "duration": {
  23478. "type": "integer",
  23479. "exclusiveMinimum": 0
  23480. }
  23481. },
  23482. "required": ["message", "variant"],
  23483. "additionalProperties": false
  23484. }
  23485. },
  23486. "required": ["id", "type", "properties"],
  23487. "additionalProperties": false
  23488. },
  23489. "Event.tui.session.select": {
  23490. "type": "object",
  23491. "properties": {
  23492. "id": {
  23493. "type": "string",
  23494. "pattern": "^evt_"
  23495. },
  23496. "type": {
  23497. "type": "string",
  23498. "enum": ["tui.session.select"]
  23499. },
  23500. "properties": {
  23501. "type": "object",
  23502. "properties": {
  23503. "sessionID": {
  23504. "type": "string",
  23505. "pattern": "^ses",
  23506. "description": "Session ID to navigate to"
  23507. }
  23508. },
  23509. "required": ["sessionID"],
  23510. "additionalProperties": false
  23511. }
  23512. },
  23513. "required": ["id", "type", "properties"],
  23514. "additionalProperties": false
  23515. },
  23516. "MoveSessionDestination": {
  23517. "type": "object",
  23518. "properties": {
  23519. "directory": {
  23520. "type": "string"
  23521. }
  23522. },
  23523. "required": ["directory"],
  23524. "additionalProperties": false
  23525. },
  23526. "LocationRef": {
  23527. "type": "object",
  23528. "properties": {
  23529. "directory": {
  23530. "type": "string"
  23531. },
  23532. "workspaceID": {
  23533. "type": "string",
  23534. "pattern": "^wrk"
  23535. }
  23536. },
  23537. "required": ["directory"],
  23538. "additionalProperties": false
  23539. },
  23540. "PromptSource": {
  23541. "type": "object",
  23542. "properties": {
  23543. "start": {
  23544. "type": "number"
  23545. },
  23546. "end": {
  23547. "type": "number"
  23548. },
  23549. "text": {
  23550. "type": "string"
  23551. }
  23552. },
  23553. "required": ["start", "end", "text"],
  23554. "additionalProperties": false
  23555. },
  23556. "PromptFileAttachment": {
  23557. "type": "object",
  23558. "properties": {
  23559. "uri": {
  23560. "type": "string"
  23561. },
  23562. "mime": {
  23563. "type": "string"
  23564. },
  23565. "name": {
  23566. "type": "string"
  23567. },
  23568. "description": {
  23569. "type": "string"
  23570. },
  23571. "source": {
  23572. "$ref": "#/components/schemas/PromptSource"
  23573. }
  23574. },
  23575. "required": ["uri", "mime"],
  23576. "additionalProperties": false
  23577. },
  23578. "PromptAgentAttachment": {
  23579. "type": "object",
  23580. "properties": {
  23581. "name": {
  23582. "type": "string"
  23583. },
  23584. "source": {
  23585. "$ref": "#/components/schemas/PromptSource"
  23586. }
  23587. },
  23588. "required": ["name"],
  23589. "additionalProperties": false
  23590. },
  23591. "SessionErrorUnknown": {
  23592. "type": "object",
  23593. "properties": {
  23594. "type": {
  23595. "type": "string",
  23596. "enum": ["unknown"]
  23597. },
  23598. "message": {
  23599. "type": "string"
  23600. }
  23601. },
  23602. "required": ["type", "message"],
  23603. "additionalProperties": false
  23604. },
  23605. "ToolTextContent": {
  23606. "type": "object",
  23607. "properties": {
  23608. "type": {
  23609. "type": "string",
  23610. "enum": ["text"]
  23611. },
  23612. "text": {
  23613. "type": "string"
  23614. }
  23615. },
  23616. "required": ["type", "text"],
  23617. "additionalProperties": false
  23618. },
  23619. "ToolFileContent": {
  23620. "type": "object",
  23621. "properties": {
  23622. "type": {
  23623. "type": "string",
  23624. "enum": ["file"]
  23625. },
  23626. "uri": {
  23627. "type": "string"
  23628. },
  23629. "mime": {
  23630. "type": "string"
  23631. },
  23632. "name": {
  23633. "type": "string"
  23634. }
  23635. },
  23636. "required": ["type", "uri", "mime"],
  23637. "additionalProperties": false
  23638. },
  23639. "SessionNextRetry_error": {
  23640. "type": "object",
  23641. "properties": {
  23642. "message": {
  23643. "type": "string"
  23644. },
  23645. "statusCode": {
  23646. "type": "number"
  23647. },
  23648. "isRetryable": {
  23649. "type": "boolean"
  23650. },
  23651. "responseHeaders": {
  23652. "type": "object",
  23653. "additionalProperties": {
  23654. "type": "string"
  23655. }
  23656. },
  23657. "responseBody": {
  23658. "type": "string"
  23659. },
  23660. "metadata": {
  23661. "type": "object",
  23662. "additionalProperties": {
  23663. "type": "string"
  23664. }
  23665. }
  23666. },
  23667. "required": ["message", "isRetryable"],
  23668. "additionalProperties": false
  23669. },
  23670. "PermissionV2Source": {
  23671. "type": "object",
  23672. "properties": {
  23673. "type": {
  23674. "type": "string",
  23675. "enum": ["tool"]
  23676. },
  23677. "messageID": {
  23678. "type": "string"
  23679. },
  23680. "callID": {
  23681. "type": "string"
  23682. }
  23683. },
  23684. "required": ["type", "messageID", "callID"],
  23685. "additionalProperties": false
  23686. },
  23687. "PermissionV2Reply": {
  23688. "type": "string",
  23689. "enum": ["once", "always", "reject"]
  23690. },
  23691. "QuestionV2Option": {
  23692. "type": "object",
  23693. "properties": {
  23694. "label": {
  23695. "type": "string",
  23696. "description": "Display text (1-5 words, concise)"
  23697. },
  23698. "description": {
  23699. "type": "string",
  23700. "description": "Explanation of choice"
  23701. }
  23702. },
  23703. "required": ["label", "description"],
  23704. "additionalProperties": false
  23705. },
  23706. "QuestionV2Info": {
  23707. "type": "object",
  23708. "properties": {
  23709. "question": {
  23710. "type": "string",
  23711. "description": "Complete question"
  23712. },
  23713. "header": {
  23714. "type": "string",
  23715. "description": "Very short label (max 30 chars)"
  23716. },
  23717. "options": {
  23718. "type": "array",
  23719. "items": {
  23720. "$ref": "#/components/schemas/QuestionV2Option"
  23721. },
  23722. "description": "Available choices"
  23723. },
  23724. "multiple": {
  23725. "type": "boolean"
  23726. },
  23727. "custom": {
  23728. "type": "boolean"
  23729. }
  23730. },
  23731. "required": ["question", "header", "options"],
  23732. "additionalProperties": false
  23733. },
  23734. "QuestionV2Tool": {
  23735. "type": "object",
  23736. "properties": {
  23737. "messageID": {
  23738. "type": "string"
  23739. },
  23740. "callID": {
  23741. "type": "string"
  23742. }
  23743. },
  23744. "required": ["messageID", "callID"],
  23745. "additionalProperties": false
  23746. },
  23747. "QuestionV2Answer": {
  23748. "type": "array",
  23749. "items": {
  23750. "type": "string"
  23751. }
  23752. },
  23753. "EventServerInstanceDisposed": {
  23754. "type": "object",
  23755. "properties": {
  23756. "id": {
  23757. "type": "string"
  23758. },
  23759. "type": {
  23760. "type": "string",
  23761. "enum": ["server.instance.disposed"]
  23762. },
  23763. "properties": {
  23764. "type": "object",
  23765. "properties": {
  23766. "directory": {
  23767. "type": "string"
  23768. }
  23769. },
  23770. "required": ["directory"],
  23771. "additionalProperties": false
  23772. }
  23773. },
  23774. "required": ["id", "type", "properties"],
  23775. "additionalProperties": false
  23776. },
  23777. "SyncEventSessionCreated": {
  23778. "type": "object",
  23779. "properties": {
  23780. "type": {
  23781. "type": "string",
  23782. "enum": ["sync"]
  23783. },
  23784. "id": {
  23785. "type": "string",
  23786. "pattern": "^evt_"
  23787. },
  23788. "syncEvent": {
  23789. "type": "object",
  23790. "properties": {
  23791. "type": {
  23792. "type": "string",
  23793. "enum": ["session.created.1"]
  23794. },
  23795. "id": {
  23796. "type": "string",
  23797. "pattern": "^evt_"
  23798. },
  23799. "seq": {
  23800. "type": "number"
  23801. },
  23802. "aggregateID": {
  23803. "type": "string"
  23804. },
  23805. "data": {
  23806. "type": "object",
  23807. "properties": {
  23808. "sessionID": {
  23809. "type": "string",
  23810. "pattern": "^ses"
  23811. },
  23812. "info": {
  23813. "$ref": "#/components/schemas/Session"
  23814. }
  23815. },
  23816. "required": ["sessionID", "info"],
  23817. "additionalProperties": false
  23818. }
  23819. },
  23820. "required": ["type", "id", "seq", "aggregateID", "data"],
  23821. "additionalProperties": false
  23822. }
  23823. },
  23824. "required": ["type", "id", "syncEvent"],
  23825. "additionalProperties": false
  23826. },
  23827. "SyncEventSessionUpdated": {
  23828. "type": "object",
  23829. "properties": {
  23830. "type": {
  23831. "type": "string",
  23832. "enum": ["sync"]
  23833. },
  23834. "id": {
  23835. "type": "string",
  23836. "pattern": "^evt_"
  23837. },
  23838. "syncEvent": {
  23839. "type": "object",
  23840. "properties": {
  23841. "type": {
  23842. "type": "string",
  23843. "enum": ["session.updated.1"]
  23844. },
  23845. "id": {
  23846. "type": "string",
  23847. "pattern": "^evt_"
  23848. },
  23849. "seq": {
  23850. "type": "number"
  23851. },
  23852. "aggregateID": {
  23853. "type": "string"
  23854. },
  23855. "data": {
  23856. "type": "object",
  23857. "properties": {
  23858. "sessionID": {
  23859. "type": "string",
  23860. "pattern": "^ses"
  23861. },
  23862. "info": {
  23863. "$ref": "#/components/schemas/Session"
  23864. }
  23865. },
  23866. "required": ["sessionID", "info"],
  23867. "additionalProperties": false
  23868. }
  23869. },
  23870. "required": ["type", "id", "seq", "aggregateID", "data"],
  23871. "additionalProperties": false
  23872. }
  23873. },
  23874. "required": ["type", "id", "syncEvent"],
  23875. "additionalProperties": false
  23876. },
  23877. "SyncEventSessionDeleted": {
  23878. "type": "object",
  23879. "properties": {
  23880. "type": {
  23881. "type": "string",
  23882. "enum": ["sync"]
  23883. },
  23884. "id": {
  23885. "type": "string",
  23886. "pattern": "^evt_"
  23887. },
  23888. "syncEvent": {
  23889. "type": "object",
  23890. "properties": {
  23891. "type": {
  23892. "type": "string",
  23893. "enum": ["session.deleted.1"]
  23894. },
  23895. "id": {
  23896. "type": "string",
  23897. "pattern": "^evt_"
  23898. },
  23899. "seq": {
  23900. "type": "number"
  23901. },
  23902. "aggregateID": {
  23903. "type": "string"
  23904. },
  23905. "data": {
  23906. "type": "object",
  23907. "properties": {
  23908. "sessionID": {
  23909. "type": "string",
  23910. "pattern": "^ses"
  23911. },
  23912. "info": {
  23913. "$ref": "#/components/schemas/Session"
  23914. }
  23915. },
  23916. "required": ["sessionID", "info"],
  23917. "additionalProperties": false
  23918. }
  23919. },
  23920. "required": ["type", "id", "seq", "aggregateID", "data"],
  23921. "additionalProperties": false
  23922. }
  23923. },
  23924. "required": ["type", "id", "syncEvent"],
  23925. "additionalProperties": false
  23926. },
  23927. "SyncEventMessageUpdated": {
  23928. "type": "object",
  23929. "properties": {
  23930. "type": {
  23931. "type": "string",
  23932. "enum": ["sync"]
  23933. },
  23934. "id": {
  23935. "type": "string",
  23936. "pattern": "^evt_"
  23937. },
  23938. "syncEvent": {
  23939. "type": "object",
  23940. "properties": {
  23941. "type": {
  23942. "type": "string",
  23943. "enum": ["message.updated.1"]
  23944. },
  23945. "id": {
  23946. "type": "string",
  23947. "pattern": "^evt_"
  23948. },
  23949. "seq": {
  23950. "type": "number"
  23951. },
  23952. "aggregateID": {
  23953. "type": "string"
  23954. },
  23955. "data": {
  23956. "type": "object",
  23957. "properties": {
  23958. "sessionID": {
  23959. "type": "string",
  23960. "pattern": "^ses"
  23961. },
  23962. "info": {
  23963. "$ref": "#/components/schemas/Message"
  23964. }
  23965. },
  23966. "required": ["sessionID", "info"],
  23967. "additionalProperties": false
  23968. }
  23969. },
  23970. "required": ["type", "id", "seq", "aggregateID", "data"],
  23971. "additionalProperties": false
  23972. }
  23973. },
  23974. "required": ["type", "id", "syncEvent"],
  23975. "additionalProperties": false
  23976. },
  23977. "SyncEventMessageRemoved": {
  23978. "type": "object",
  23979. "properties": {
  23980. "type": {
  23981. "type": "string",
  23982. "enum": ["sync"]
  23983. },
  23984. "id": {
  23985. "type": "string",
  23986. "pattern": "^evt_"
  23987. },
  23988. "syncEvent": {
  23989. "type": "object",
  23990. "properties": {
  23991. "type": {
  23992. "type": "string",
  23993. "enum": ["message.removed.1"]
  23994. },
  23995. "id": {
  23996. "type": "string",
  23997. "pattern": "^evt_"
  23998. },
  23999. "seq": {
  24000. "type": "number"
  24001. },
  24002. "aggregateID": {
  24003. "type": "string"
  24004. },
  24005. "data": {
  24006. "type": "object",
  24007. "properties": {
  24008. "sessionID": {
  24009. "type": "string",
  24010. "pattern": "^ses"
  24011. },
  24012. "messageID": {
  24013. "type": "string",
  24014. "pattern": "^msg"
  24015. }
  24016. },
  24017. "required": ["sessionID", "messageID"],
  24018. "additionalProperties": false
  24019. }
  24020. },
  24021. "required": ["type", "id", "seq", "aggregateID", "data"],
  24022. "additionalProperties": false
  24023. }
  24024. },
  24025. "required": ["type", "id", "syncEvent"],
  24026. "additionalProperties": false
  24027. },
  24028. "SyncEventMessagePartUpdated": {
  24029. "type": "object",
  24030. "properties": {
  24031. "type": {
  24032. "type": "string",
  24033. "enum": ["sync"]
  24034. },
  24035. "id": {
  24036. "type": "string",
  24037. "pattern": "^evt_"
  24038. },
  24039. "syncEvent": {
  24040. "type": "object",
  24041. "properties": {
  24042. "type": {
  24043. "type": "string",
  24044. "enum": ["message.part.updated.1"]
  24045. },
  24046. "id": {
  24047. "type": "string",
  24048. "pattern": "^evt_"
  24049. },
  24050. "seq": {
  24051. "type": "number"
  24052. },
  24053. "aggregateID": {
  24054. "type": "string"
  24055. },
  24056. "data": {
  24057. "type": "object",
  24058. "properties": {
  24059. "sessionID": {
  24060. "type": "string",
  24061. "pattern": "^ses"
  24062. },
  24063. "part": {
  24064. "$ref": "#/components/schemas/Part"
  24065. },
  24066. "time": {
  24067. "type": "number"
  24068. }
  24069. },
  24070. "required": ["sessionID", "part", "time"],
  24071. "additionalProperties": false
  24072. }
  24073. },
  24074. "required": ["type", "id", "seq", "aggregateID", "data"],
  24075. "additionalProperties": false
  24076. }
  24077. },
  24078. "required": ["type", "id", "syncEvent"],
  24079. "additionalProperties": false
  24080. },
  24081. "SyncEventMessagePartRemoved": {
  24082. "type": "object",
  24083. "properties": {
  24084. "type": {
  24085. "type": "string",
  24086. "enum": ["sync"]
  24087. },
  24088. "id": {
  24089. "type": "string",
  24090. "pattern": "^evt_"
  24091. },
  24092. "syncEvent": {
  24093. "type": "object",
  24094. "properties": {
  24095. "type": {
  24096. "type": "string",
  24097. "enum": ["message.part.removed.1"]
  24098. },
  24099. "id": {
  24100. "type": "string",
  24101. "pattern": "^evt_"
  24102. },
  24103. "seq": {
  24104. "type": "number"
  24105. },
  24106. "aggregateID": {
  24107. "type": "string"
  24108. },
  24109. "data": {
  24110. "type": "object",
  24111. "properties": {
  24112. "sessionID": {
  24113. "type": "string",
  24114. "pattern": "^ses"
  24115. },
  24116. "messageID": {
  24117. "type": "string",
  24118. "pattern": "^msg"
  24119. },
  24120. "partID": {
  24121. "type": "string",
  24122. "pattern": "^prt"
  24123. }
  24124. },
  24125. "required": ["sessionID", "messageID", "partID"],
  24126. "additionalProperties": false
  24127. }
  24128. },
  24129. "required": ["type", "id", "seq", "aggregateID", "data"],
  24130. "additionalProperties": false
  24131. }
  24132. },
  24133. "required": ["type", "id", "syncEvent"],
  24134. "additionalProperties": false
  24135. },
  24136. "SyncEventSessionNextAgentSwitched": {
  24137. "type": "object",
  24138. "properties": {
  24139. "type": {
  24140. "type": "string",
  24141. "enum": ["sync"]
  24142. },
  24143. "id": {
  24144. "type": "string",
  24145. "pattern": "^evt_"
  24146. },
  24147. "syncEvent": {
  24148. "type": "object",
  24149. "properties": {
  24150. "type": {
  24151. "type": "string",
  24152. "enum": ["session.next.agent.switched.1"]
  24153. },
  24154. "id": {
  24155. "type": "string",
  24156. "pattern": "^evt_"
  24157. },
  24158. "seq": {
  24159. "type": "number"
  24160. },
  24161. "aggregateID": {
  24162. "type": "string"
  24163. },
  24164. "data": {
  24165. "type": "object",
  24166. "properties": {
  24167. "timestamp": {
  24168. "type": "number"
  24169. },
  24170. "sessionID": {
  24171. "type": "string",
  24172. "pattern": "^ses"
  24173. },
  24174. "messageID": {
  24175. "type": "string",
  24176. "pattern": "^msg_"
  24177. },
  24178. "agent": {
  24179. "type": "string"
  24180. }
  24181. },
  24182. "required": ["timestamp", "sessionID", "messageID", "agent"],
  24183. "additionalProperties": false
  24184. }
  24185. },
  24186. "required": ["type", "id", "seq", "aggregateID", "data"],
  24187. "additionalProperties": false
  24188. }
  24189. },
  24190. "required": ["type", "id", "syncEvent"],
  24191. "additionalProperties": false
  24192. },
  24193. "SyncEventSessionNextModelSwitched": {
  24194. "type": "object",
  24195. "properties": {
  24196. "type": {
  24197. "type": "string",
  24198. "enum": ["sync"]
  24199. },
  24200. "id": {
  24201. "type": "string",
  24202. "pattern": "^evt_"
  24203. },
  24204. "syncEvent": {
  24205. "type": "object",
  24206. "properties": {
  24207. "type": {
  24208. "type": "string",
  24209. "enum": ["session.next.model.switched.1"]
  24210. },
  24211. "id": {
  24212. "type": "string",
  24213. "pattern": "^evt_"
  24214. },
  24215. "seq": {
  24216. "type": "number"
  24217. },
  24218. "aggregateID": {
  24219. "type": "string"
  24220. },
  24221. "data": {
  24222. "type": "object",
  24223. "properties": {
  24224. "timestamp": {
  24225. "type": "number"
  24226. },
  24227. "sessionID": {
  24228. "type": "string",
  24229. "pattern": "^ses"
  24230. },
  24231. "messageID": {
  24232. "type": "string",
  24233. "pattern": "^msg_"
  24234. },
  24235. "model": {
  24236. "type": "object",
  24237. "properties": {
  24238. "id": {
  24239. "type": "string"
  24240. },
  24241. "providerID": {
  24242. "type": "string"
  24243. },
  24244. "variant": {
  24245. "type": "string"
  24246. }
  24247. },
  24248. "required": ["id", "providerID"],
  24249. "additionalProperties": false
  24250. }
  24251. },
  24252. "required": ["timestamp", "sessionID", "messageID", "model"],
  24253. "additionalProperties": false
  24254. }
  24255. },
  24256. "required": ["type", "id", "seq", "aggregateID", "data"],
  24257. "additionalProperties": false
  24258. }
  24259. },
  24260. "required": ["type", "id", "syncEvent"],
  24261. "additionalProperties": false
  24262. },
  24263. "SyncEventSessionNextMoved": {
  24264. "type": "object",
  24265. "properties": {
  24266. "type": {
  24267. "type": "string",
  24268. "enum": ["sync"]
  24269. },
  24270. "id": {
  24271. "type": "string",
  24272. "pattern": "^evt_"
  24273. },
  24274. "syncEvent": {
  24275. "type": "object",
  24276. "properties": {
  24277. "type": {
  24278. "type": "string",
  24279. "enum": ["session.next.moved.1"]
  24280. },
  24281. "id": {
  24282. "type": "string",
  24283. "pattern": "^evt_"
  24284. },
  24285. "seq": {
  24286. "type": "number"
  24287. },
  24288. "aggregateID": {
  24289. "type": "string"
  24290. },
  24291. "data": {
  24292. "type": "object",
  24293. "properties": {
  24294. "timestamp": {
  24295. "type": "number"
  24296. },
  24297. "sessionID": {
  24298. "type": "string",
  24299. "pattern": "^ses"
  24300. },
  24301. "location": {
  24302. "$ref": "#/components/schemas/LocationRef"
  24303. },
  24304. "subdirectory": {
  24305. "type": "string"
  24306. }
  24307. },
  24308. "required": ["timestamp", "sessionID", "location"],
  24309. "additionalProperties": false
  24310. }
  24311. },
  24312. "required": ["type", "id", "seq", "aggregateID", "data"],
  24313. "additionalProperties": false
  24314. }
  24315. },
  24316. "required": ["type", "id", "syncEvent"],
  24317. "additionalProperties": false
  24318. },
  24319. "SyncEventSessionNextPrompted": {
  24320. "type": "object",
  24321. "properties": {
  24322. "type": {
  24323. "type": "string",
  24324. "enum": ["sync"]
  24325. },
  24326. "id": {
  24327. "type": "string",
  24328. "pattern": "^evt_"
  24329. },
  24330. "syncEvent": {
  24331. "type": "object",
  24332. "properties": {
  24333. "type": {
  24334. "type": "string",
  24335. "enum": ["session.next.prompted.1"]
  24336. },
  24337. "id": {
  24338. "type": "string",
  24339. "pattern": "^evt_"
  24340. },
  24341. "seq": {
  24342. "type": "number"
  24343. },
  24344. "aggregateID": {
  24345. "type": "string"
  24346. },
  24347. "data": {
  24348. "type": "object",
  24349. "properties": {
  24350. "timestamp": {
  24351. "type": "number"
  24352. },
  24353. "sessionID": {
  24354. "type": "string",
  24355. "pattern": "^ses"
  24356. },
  24357. "messageID": {
  24358. "type": "string",
  24359. "pattern": "^msg_"
  24360. },
  24361. "prompt": {
  24362. "$ref": "#/components/schemas/Prompt"
  24363. },
  24364. "delivery": {
  24365. "type": "string",
  24366. "enum": ["steer", "queue"]
  24367. }
  24368. },
  24369. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  24370. "additionalProperties": false
  24371. }
  24372. },
  24373. "required": ["type", "id", "seq", "aggregateID", "data"],
  24374. "additionalProperties": false
  24375. }
  24376. },
  24377. "required": ["type", "id", "syncEvent"],
  24378. "additionalProperties": false
  24379. },
  24380. "SyncEventSessionNextPromptAdmitted": {
  24381. "type": "object",
  24382. "properties": {
  24383. "type": {
  24384. "type": "string",
  24385. "enum": ["sync"]
  24386. },
  24387. "id": {
  24388. "type": "string",
  24389. "pattern": "^evt_"
  24390. },
  24391. "syncEvent": {
  24392. "type": "object",
  24393. "properties": {
  24394. "type": {
  24395. "type": "string",
  24396. "enum": ["session.next.prompt.admitted.1"]
  24397. },
  24398. "id": {
  24399. "type": "string",
  24400. "pattern": "^evt_"
  24401. },
  24402. "seq": {
  24403. "type": "number"
  24404. },
  24405. "aggregateID": {
  24406. "type": "string"
  24407. },
  24408. "data": {
  24409. "type": "object",
  24410. "properties": {
  24411. "timestamp": {
  24412. "type": "number"
  24413. },
  24414. "sessionID": {
  24415. "type": "string",
  24416. "pattern": "^ses"
  24417. },
  24418. "messageID": {
  24419. "type": "string",
  24420. "pattern": "^msg_"
  24421. },
  24422. "prompt": {
  24423. "$ref": "#/components/schemas/Prompt"
  24424. },
  24425. "delivery": {
  24426. "type": "string",
  24427. "enum": ["steer", "queue"]
  24428. }
  24429. },
  24430. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  24431. "additionalProperties": false
  24432. }
  24433. },
  24434. "required": ["type", "id", "seq", "aggregateID", "data"],
  24435. "additionalProperties": false
  24436. }
  24437. },
  24438. "required": ["type", "id", "syncEvent"],
  24439. "additionalProperties": false
  24440. },
  24441. "SyncEventSessionNextPromptPromoted": {
  24442. "type": "object",
  24443. "properties": {
  24444. "type": {
  24445. "type": "string",
  24446. "enum": ["sync"]
  24447. },
  24448. "id": {
  24449. "type": "string",
  24450. "pattern": "^evt_"
  24451. },
  24452. "syncEvent": {
  24453. "type": "object",
  24454. "properties": {
  24455. "type": {
  24456. "type": "string",
  24457. "enum": ["session.next.prompt.promoted.1"]
  24458. },
  24459. "id": {
  24460. "type": "string",
  24461. "pattern": "^evt_"
  24462. },
  24463. "seq": {
  24464. "type": "number"
  24465. },
  24466. "aggregateID": {
  24467. "type": "string"
  24468. },
  24469. "data": {
  24470. "type": "object",
  24471. "properties": {
  24472. "timestamp": {
  24473. "type": "number"
  24474. },
  24475. "sessionID": {
  24476. "type": "string",
  24477. "pattern": "^ses"
  24478. },
  24479. "messageID": {
  24480. "type": "string",
  24481. "pattern": "^msg_"
  24482. },
  24483. "prompt": {
  24484. "$ref": "#/components/schemas/Prompt"
  24485. },
  24486. "timeCreated": {
  24487. "type": "number"
  24488. }
  24489. },
  24490. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  24491. "additionalProperties": false
  24492. }
  24493. },
  24494. "required": ["type", "id", "seq", "aggregateID", "data"],
  24495. "additionalProperties": false
  24496. }
  24497. },
  24498. "required": ["type", "id", "syncEvent"],
  24499. "additionalProperties": false
  24500. },
  24501. "SyncEventSessionNextInterruptRequested": {
  24502. "type": "object",
  24503. "properties": {
  24504. "type": {
  24505. "type": "string",
  24506. "enum": ["sync"]
  24507. },
  24508. "id": {
  24509. "type": "string",
  24510. "pattern": "^evt_"
  24511. },
  24512. "syncEvent": {
  24513. "type": "object",
  24514. "properties": {
  24515. "type": {
  24516. "type": "string",
  24517. "enum": ["session.next.interrupt.requested.1"]
  24518. },
  24519. "id": {
  24520. "type": "string",
  24521. "pattern": "^evt_"
  24522. },
  24523. "seq": {
  24524. "type": "number"
  24525. },
  24526. "aggregateID": {
  24527. "type": "string"
  24528. },
  24529. "data": {
  24530. "type": "object",
  24531. "properties": {
  24532. "timestamp": {
  24533. "type": "number"
  24534. },
  24535. "sessionID": {
  24536. "type": "string",
  24537. "pattern": "^ses"
  24538. }
  24539. },
  24540. "required": ["timestamp", "sessionID"],
  24541. "additionalProperties": false
  24542. }
  24543. },
  24544. "required": ["type", "id", "seq", "aggregateID", "data"],
  24545. "additionalProperties": false
  24546. }
  24547. },
  24548. "required": ["type", "id", "syncEvent"],
  24549. "additionalProperties": false
  24550. },
  24551. "SyncEventSessionNextContextUpdated": {
  24552. "type": "object",
  24553. "properties": {
  24554. "type": {
  24555. "type": "string",
  24556. "enum": ["sync"]
  24557. },
  24558. "id": {
  24559. "type": "string",
  24560. "pattern": "^evt_"
  24561. },
  24562. "syncEvent": {
  24563. "type": "object",
  24564. "properties": {
  24565. "type": {
  24566. "type": "string",
  24567. "enum": ["session.next.context.updated.1"]
  24568. },
  24569. "id": {
  24570. "type": "string",
  24571. "pattern": "^evt_"
  24572. },
  24573. "seq": {
  24574. "type": "number"
  24575. },
  24576. "aggregateID": {
  24577. "type": "string"
  24578. },
  24579. "data": {
  24580. "type": "object",
  24581. "properties": {
  24582. "timestamp": {
  24583. "type": "number"
  24584. },
  24585. "sessionID": {
  24586. "type": "string",
  24587. "pattern": "^ses"
  24588. },
  24589. "messageID": {
  24590. "type": "string",
  24591. "pattern": "^msg_"
  24592. },
  24593. "text": {
  24594. "type": "string"
  24595. }
  24596. },
  24597. "required": ["timestamp", "sessionID", "messageID", "text"],
  24598. "additionalProperties": false
  24599. }
  24600. },
  24601. "required": ["type", "id", "seq", "aggregateID", "data"],
  24602. "additionalProperties": false
  24603. }
  24604. },
  24605. "required": ["type", "id", "syncEvent"],
  24606. "additionalProperties": false
  24607. },
  24608. "SyncEventSessionNextSynthetic": {
  24609. "type": "object",
  24610. "properties": {
  24611. "type": {
  24612. "type": "string",
  24613. "enum": ["sync"]
  24614. },
  24615. "id": {
  24616. "type": "string",
  24617. "pattern": "^evt_"
  24618. },
  24619. "syncEvent": {
  24620. "type": "object",
  24621. "properties": {
  24622. "type": {
  24623. "type": "string",
  24624. "enum": ["session.next.synthetic.1"]
  24625. },
  24626. "id": {
  24627. "type": "string",
  24628. "pattern": "^evt_"
  24629. },
  24630. "seq": {
  24631. "type": "number"
  24632. },
  24633. "aggregateID": {
  24634. "type": "string"
  24635. },
  24636. "data": {
  24637. "type": "object",
  24638. "properties": {
  24639. "timestamp": {
  24640. "type": "number"
  24641. },
  24642. "sessionID": {
  24643. "type": "string",
  24644. "pattern": "^ses"
  24645. },
  24646. "messageID": {
  24647. "type": "string",
  24648. "pattern": "^msg_"
  24649. },
  24650. "text": {
  24651. "type": "string"
  24652. }
  24653. },
  24654. "required": ["timestamp", "sessionID", "messageID", "text"],
  24655. "additionalProperties": false
  24656. }
  24657. },
  24658. "required": ["type", "id", "seq", "aggregateID", "data"],
  24659. "additionalProperties": false
  24660. }
  24661. },
  24662. "required": ["type", "id", "syncEvent"],
  24663. "additionalProperties": false
  24664. },
  24665. "SyncEventSessionNextShellStarted": {
  24666. "type": "object",
  24667. "properties": {
  24668. "type": {
  24669. "type": "string",
  24670. "enum": ["sync"]
  24671. },
  24672. "id": {
  24673. "type": "string",
  24674. "pattern": "^evt_"
  24675. },
  24676. "syncEvent": {
  24677. "type": "object",
  24678. "properties": {
  24679. "type": {
  24680. "type": "string",
  24681. "enum": ["session.next.shell.started.1"]
  24682. },
  24683. "id": {
  24684. "type": "string",
  24685. "pattern": "^evt_"
  24686. },
  24687. "seq": {
  24688. "type": "number"
  24689. },
  24690. "aggregateID": {
  24691. "type": "string"
  24692. },
  24693. "data": {
  24694. "type": "object",
  24695. "properties": {
  24696. "timestamp": {
  24697. "type": "number"
  24698. },
  24699. "sessionID": {
  24700. "type": "string",
  24701. "pattern": "^ses"
  24702. },
  24703. "messageID": {
  24704. "type": "string",
  24705. "pattern": "^msg_"
  24706. },
  24707. "callID": {
  24708. "type": "string"
  24709. },
  24710. "command": {
  24711. "type": "string"
  24712. }
  24713. },
  24714. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  24715. "additionalProperties": false
  24716. }
  24717. },
  24718. "required": ["type", "id", "seq", "aggregateID", "data"],
  24719. "additionalProperties": false
  24720. }
  24721. },
  24722. "required": ["type", "id", "syncEvent"],
  24723. "additionalProperties": false
  24724. },
  24725. "SyncEventSessionNextShellEnded": {
  24726. "type": "object",
  24727. "properties": {
  24728. "type": {
  24729. "type": "string",
  24730. "enum": ["sync"]
  24731. },
  24732. "id": {
  24733. "type": "string",
  24734. "pattern": "^evt_"
  24735. },
  24736. "syncEvent": {
  24737. "type": "object",
  24738. "properties": {
  24739. "type": {
  24740. "type": "string",
  24741. "enum": ["session.next.shell.ended.1"]
  24742. },
  24743. "id": {
  24744. "type": "string",
  24745. "pattern": "^evt_"
  24746. },
  24747. "seq": {
  24748. "type": "number"
  24749. },
  24750. "aggregateID": {
  24751. "type": "string"
  24752. },
  24753. "data": {
  24754. "type": "object",
  24755. "properties": {
  24756. "timestamp": {
  24757. "type": "number"
  24758. },
  24759. "sessionID": {
  24760. "type": "string",
  24761. "pattern": "^ses"
  24762. },
  24763. "callID": {
  24764. "type": "string"
  24765. },
  24766. "output": {
  24767. "type": "string"
  24768. }
  24769. },
  24770. "required": ["timestamp", "sessionID", "callID", "output"],
  24771. "additionalProperties": false
  24772. }
  24773. },
  24774. "required": ["type", "id", "seq", "aggregateID", "data"],
  24775. "additionalProperties": false
  24776. }
  24777. },
  24778. "required": ["type", "id", "syncEvent"],
  24779. "additionalProperties": false
  24780. },
  24781. "SyncEventSessionNextStepStarted": {
  24782. "type": "object",
  24783. "properties": {
  24784. "type": {
  24785. "type": "string",
  24786. "enum": ["sync"]
  24787. },
  24788. "id": {
  24789. "type": "string",
  24790. "pattern": "^evt_"
  24791. },
  24792. "syncEvent": {
  24793. "type": "object",
  24794. "properties": {
  24795. "type": {
  24796. "type": "string",
  24797. "enum": ["session.next.step.started.1"]
  24798. },
  24799. "id": {
  24800. "type": "string",
  24801. "pattern": "^evt_"
  24802. },
  24803. "seq": {
  24804. "type": "number"
  24805. },
  24806. "aggregateID": {
  24807. "type": "string"
  24808. },
  24809. "data": {
  24810. "type": "object",
  24811. "properties": {
  24812. "timestamp": {
  24813. "type": "number"
  24814. },
  24815. "sessionID": {
  24816. "type": "string",
  24817. "pattern": "^ses"
  24818. },
  24819. "assistantMessageID": {
  24820. "type": "string",
  24821. "pattern": "^msg_"
  24822. },
  24823. "agent": {
  24824. "type": "string"
  24825. },
  24826. "model": {
  24827. "type": "object",
  24828. "properties": {
  24829. "id": {
  24830. "type": "string"
  24831. },
  24832. "providerID": {
  24833. "type": "string"
  24834. },
  24835. "variant": {
  24836. "type": "string"
  24837. }
  24838. },
  24839. "required": ["id", "providerID"],
  24840. "additionalProperties": false
  24841. },
  24842. "snapshot": {
  24843. "type": "string"
  24844. }
  24845. },
  24846. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  24847. "additionalProperties": false
  24848. }
  24849. },
  24850. "required": ["type", "id", "seq", "aggregateID", "data"],
  24851. "additionalProperties": false
  24852. }
  24853. },
  24854. "required": ["type", "id", "syncEvent"],
  24855. "additionalProperties": false
  24856. },
  24857. "SyncEventSessionNextStepEnded": {
  24858. "type": "object",
  24859. "properties": {
  24860. "type": {
  24861. "type": "string",
  24862. "enum": ["sync"]
  24863. },
  24864. "id": {
  24865. "type": "string",
  24866. "pattern": "^evt_"
  24867. },
  24868. "syncEvent": {
  24869. "type": "object",
  24870. "properties": {
  24871. "type": {
  24872. "type": "string",
  24873. "enum": ["session.next.step.ended.2"]
  24874. },
  24875. "id": {
  24876. "type": "string",
  24877. "pattern": "^evt_"
  24878. },
  24879. "seq": {
  24880. "type": "number"
  24881. },
  24882. "aggregateID": {
  24883. "type": "string"
  24884. },
  24885. "data": {
  24886. "type": "object",
  24887. "properties": {
  24888. "timestamp": {
  24889. "type": "number"
  24890. },
  24891. "sessionID": {
  24892. "type": "string",
  24893. "pattern": "^ses"
  24894. },
  24895. "assistantMessageID": {
  24896. "type": "string",
  24897. "pattern": "^msg_"
  24898. },
  24899. "finish": {
  24900. "type": "string"
  24901. },
  24902. "cost": {
  24903. "type": "number"
  24904. },
  24905. "tokens": {
  24906. "type": "object",
  24907. "properties": {
  24908. "input": {
  24909. "type": "number"
  24910. },
  24911. "output": {
  24912. "type": "number"
  24913. },
  24914. "reasoning": {
  24915. "type": "number"
  24916. },
  24917. "cache": {
  24918. "type": "object",
  24919. "properties": {
  24920. "read": {
  24921. "type": "number"
  24922. },
  24923. "write": {
  24924. "type": "number"
  24925. }
  24926. },
  24927. "required": ["read", "write"],
  24928. "additionalProperties": false
  24929. }
  24930. },
  24931. "required": ["input", "output", "reasoning", "cache"],
  24932. "additionalProperties": false
  24933. },
  24934. "snapshot": {
  24935. "type": "string"
  24936. }
  24937. },
  24938. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  24939. "additionalProperties": false
  24940. }
  24941. },
  24942. "required": ["type", "id", "seq", "aggregateID", "data"],
  24943. "additionalProperties": false
  24944. }
  24945. },
  24946. "required": ["type", "id", "syncEvent"],
  24947. "additionalProperties": false
  24948. },
  24949. "SyncEventSessionNextStepFailed": {
  24950. "type": "object",
  24951. "properties": {
  24952. "type": {
  24953. "type": "string",
  24954. "enum": ["sync"]
  24955. },
  24956. "id": {
  24957. "type": "string",
  24958. "pattern": "^evt_"
  24959. },
  24960. "syncEvent": {
  24961. "type": "object",
  24962. "properties": {
  24963. "type": {
  24964. "type": "string",
  24965. "enum": ["session.next.step.failed.2"]
  24966. },
  24967. "id": {
  24968. "type": "string",
  24969. "pattern": "^evt_"
  24970. },
  24971. "seq": {
  24972. "type": "number"
  24973. },
  24974. "aggregateID": {
  24975. "type": "string"
  24976. },
  24977. "data": {
  24978. "type": "object",
  24979. "properties": {
  24980. "timestamp": {
  24981. "type": "number"
  24982. },
  24983. "sessionID": {
  24984. "type": "string",
  24985. "pattern": "^ses"
  24986. },
  24987. "assistantMessageID": {
  24988. "type": "string",
  24989. "pattern": "^msg_"
  24990. },
  24991. "error": {
  24992. "$ref": "#/components/schemas/SessionErrorUnknown"
  24993. }
  24994. },
  24995. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  24996. "additionalProperties": false
  24997. }
  24998. },
  24999. "required": ["type", "id", "seq", "aggregateID", "data"],
  25000. "additionalProperties": false
  25001. }
  25002. },
  25003. "required": ["type", "id", "syncEvent"],
  25004. "additionalProperties": false
  25005. },
  25006. "SyncEventSessionNextTextStarted": {
  25007. "type": "object",
  25008. "properties": {
  25009. "type": {
  25010. "type": "string",
  25011. "enum": ["sync"]
  25012. },
  25013. "id": {
  25014. "type": "string",
  25015. "pattern": "^evt_"
  25016. },
  25017. "syncEvent": {
  25018. "type": "object",
  25019. "properties": {
  25020. "type": {
  25021. "type": "string",
  25022. "enum": ["session.next.text.started.1"]
  25023. },
  25024. "id": {
  25025. "type": "string",
  25026. "pattern": "^evt_"
  25027. },
  25028. "seq": {
  25029. "type": "number"
  25030. },
  25031. "aggregateID": {
  25032. "type": "string"
  25033. },
  25034. "data": {
  25035. "type": "object",
  25036. "properties": {
  25037. "timestamp": {
  25038. "type": "number"
  25039. },
  25040. "sessionID": {
  25041. "type": "string",
  25042. "pattern": "^ses"
  25043. },
  25044. "assistantMessageID": {
  25045. "type": "string",
  25046. "pattern": "^msg_"
  25047. },
  25048. "textID": {
  25049. "type": "string"
  25050. }
  25051. },
  25052. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  25053. "additionalProperties": false
  25054. }
  25055. },
  25056. "required": ["type", "id", "seq", "aggregateID", "data"],
  25057. "additionalProperties": false
  25058. }
  25059. },
  25060. "required": ["type", "id", "syncEvent"],
  25061. "additionalProperties": false
  25062. },
  25063. "SyncEventSessionNextTextEnded": {
  25064. "type": "object",
  25065. "properties": {
  25066. "type": {
  25067. "type": "string",
  25068. "enum": ["sync"]
  25069. },
  25070. "id": {
  25071. "type": "string",
  25072. "pattern": "^evt_"
  25073. },
  25074. "syncEvent": {
  25075. "type": "object",
  25076. "properties": {
  25077. "type": {
  25078. "type": "string",
  25079. "enum": ["session.next.text.ended.1"]
  25080. },
  25081. "id": {
  25082. "type": "string",
  25083. "pattern": "^evt_"
  25084. },
  25085. "seq": {
  25086. "type": "number"
  25087. },
  25088. "aggregateID": {
  25089. "type": "string"
  25090. },
  25091. "data": {
  25092. "type": "object",
  25093. "properties": {
  25094. "timestamp": {
  25095. "type": "number"
  25096. },
  25097. "sessionID": {
  25098. "type": "string",
  25099. "pattern": "^ses"
  25100. },
  25101. "assistantMessageID": {
  25102. "type": "string",
  25103. "pattern": "^msg_"
  25104. },
  25105. "textID": {
  25106. "type": "string"
  25107. },
  25108. "text": {
  25109. "type": "string"
  25110. }
  25111. },
  25112. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  25113. "additionalProperties": false
  25114. }
  25115. },
  25116. "required": ["type", "id", "seq", "aggregateID", "data"],
  25117. "additionalProperties": false
  25118. }
  25119. },
  25120. "required": ["type", "id", "syncEvent"],
  25121. "additionalProperties": false
  25122. },
  25123. "SyncEventSessionNextReasoningStarted": {
  25124. "type": "object",
  25125. "properties": {
  25126. "type": {
  25127. "type": "string",
  25128. "enum": ["sync"]
  25129. },
  25130. "id": {
  25131. "type": "string",
  25132. "pattern": "^evt_"
  25133. },
  25134. "syncEvent": {
  25135. "type": "object",
  25136. "properties": {
  25137. "type": {
  25138. "type": "string",
  25139. "enum": ["session.next.reasoning.started.1"]
  25140. },
  25141. "id": {
  25142. "type": "string",
  25143. "pattern": "^evt_"
  25144. },
  25145. "seq": {
  25146. "type": "number"
  25147. },
  25148. "aggregateID": {
  25149. "type": "string"
  25150. },
  25151. "data": {
  25152. "type": "object",
  25153. "properties": {
  25154. "timestamp": {
  25155. "type": "number"
  25156. },
  25157. "sessionID": {
  25158. "type": "string",
  25159. "pattern": "^ses"
  25160. },
  25161. "assistantMessageID": {
  25162. "type": "string",
  25163. "pattern": "^msg_"
  25164. },
  25165. "reasoningID": {
  25166. "type": "string"
  25167. },
  25168. "providerMetadata": {
  25169. "type": "object",
  25170. "additionalProperties": {
  25171. "type": "object"
  25172. }
  25173. }
  25174. },
  25175. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  25176. "additionalProperties": false
  25177. }
  25178. },
  25179. "required": ["type", "id", "seq", "aggregateID", "data"],
  25180. "additionalProperties": false
  25181. }
  25182. },
  25183. "required": ["type", "id", "syncEvent"],
  25184. "additionalProperties": false
  25185. },
  25186. "SyncEventSessionNextReasoningEnded": {
  25187. "type": "object",
  25188. "properties": {
  25189. "type": {
  25190. "type": "string",
  25191. "enum": ["sync"]
  25192. },
  25193. "id": {
  25194. "type": "string",
  25195. "pattern": "^evt_"
  25196. },
  25197. "syncEvent": {
  25198. "type": "object",
  25199. "properties": {
  25200. "type": {
  25201. "type": "string",
  25202. "enum": ["session.next.reasoning.ended.1"]
  25203. },
  25204. "id": {
  25205. "type": "string",
  25206. "pattern": "^evt_"
  25207. },
  25208. "seq": {
  25209. "type": "number"
  25210. },
  25211. "aggregateID": {
  25212. "type": "string"
  25213. },
  25214. "data": {
  25215. "type": "object",
  25216. "properties": {
  25217. "timestamp": {
  25218. "type": "number"
  25219. },
  25220. "sessionID": {
  25221. "type": "string",
  25222. "pattern": "^ses"
  25223. },
  25224. "assistantMessageID": {
  25225. "type": "string",
  25226. "pattern": "^msg_"
  25227. },
  25228. "reasoningID": {
  25229. "type": "string"
  25230. },
  25231. "text": {
  25232. "type": "string"
  25233. },
  25234. "providerMetadata": {
  25235. "type": "object",
  25236. "additionalProperties": {
  25237. "type": "object"
  25238. }
  25239. }
  25240. },
  25241. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  25242. "additionalProperties": false
  25243. }
  25244. },
  25245. "required": ["type", "id", "seq", "aggregateID", "data"],
  25246. "additionalProperties": false
  25247. }
  25248. },
  25249. "required": ["type", "id", "syncEvent"],
  25250. "additionalProperties": false
  25251. },
  25252. "SyncEventSessionNextToolInputStarted": {
  25253. "type": "object",
  25254. "properties": {
  25255. "type": {
  25256. "type": "string",
  25257. "enum": ["sync"]
  25258. },
  25259. "id": {
  25260. "type": "string",
  25261. "pattern": "^evt_"
  25262. },
  25263. "syncEvent": {
  25264. "type": "object",
  25265. "properties": {
  25266. "type": {
  25267. "type": "string",
  25268. "enum": ["session.next.tool.input.started.1"]
  25269. },
  25270. "id": {
  25271. "type": "string",
  25272. "pattern": "^evt_"
  25273. },
  25274. "seq": {
  25275. "type": "number"
  25276. },
  25277. "aggregateID": {
  25278. "type": "string"
  25279. },
  25280. "data": {
  25281. "type": "object",
  25282. "properties": {
  25283. "timestamp": {
  25284. "type": "number"
  25285. },
  25286. "sessionID": {
  25287. "type": "string",
  25288. "pattern": "^ses"
  25289. },
  25290. "assistantMessageID": {
  25291. "type": "string",
  25292. "pattern": "^msg_"
  25293. },
  25294. "callID": {
  25295. "type": "string"
  25296. },
  25297. "name": {
  25298. "type": "string"
  25299. }
  25300. },
  25301. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  25302. "additionalProperties": false
  25303. }
  25304. },
  25305. "required": ["type", "id", "seq", "aggregateID", "data"],
  25306. "additionalProperties": false
  25307. }
  25308. },
  25309. "required": ["type", "id", "syncEvent"],
  25310. "additionalProperties": false
  25311. },
  25312. "SyncEventSessionNextToolInputEnded": {
  25313. "type": "object",
  25314. "properties": {
  25315. "type": {
  25316. "type": "string",
  25317. "enum": ["sync"]
  25318. },
  25319. "id": {
  25320. "type": "string",
  25321. "pattern": "^evt_"
  25322. },
  25323. "syncEvent": {
  25324. "type": "object",
  25325. "properties": {
  25326. "type": {
  25327. "type": "string",
  25328. "enum": ["session.next.tool.input.ended.1"]
  25329. },
  25330. "id": {
  25331. "type": "string",
  25332. "pattern": "^evt_"
  25333. },
  25334. "seq": {
  25335. "type": "number"
  25336. },
  25337. "aggregateID": {
  25338. "type": "string"
  25339. },
  25340. "data": {
  25341. "type": "object",
  25342. "properties": {
  25343. "timestamp": {
  25344. "type": "number"
  25345. },
  25346. "sessionID": {
  25347. "type": "string",
  25348. "pattern": "^ses"
  25349. },
  25350. "assistantMessageID": {
  25351. "type": "string",
  25352. "pattern": "^msg_"
  25353. },
  25354. "callID": {
  25355. "type": "string"
  25356. },
  25357. "text": {
  25358. "type": "string"
  25359. }
  25360. },
  25361. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  25362. "additionalProperties": false
  25363. }
  25364. },
  25365. "required": ["type", "id", "seq", "aggregateID", "data"],
  25366. "additionalProperties": false
  25367. }
  25368. },
  25369. "required": ["type", "id", "syncEvent"],
  25370. "additionalProperties": false
  25371. },
  25372. "SyncEventSessionNextToolCalled": {
  25373. "type": "object",
  25374. "properties": {
  25375. "type": {
  25376. "type": "string",
  25377. "enum": ["sync"]
  25378. },
  25379. "id": {
  25380. "type": "string",
  25381. "pattern": "^evt_"
  25382. },
  25383. "syncEvent": {
  25384. "type": "object",
  25385. "properties": {
  25386. "type": {
  25387. "type": "string",
  25388. "enum": ["session.next.tool.called.1"]
  25389. },
  25390. "id": {
  25391. "type": "string",
  25392. "pattern": "^evt_"
  25393. },
  25394. "seq": {
  25395. "type": "number"
  25396. },
  25397. "aggregateID": {
  25398. "type": "string"
  25399. },
  25400. "data": {
  25401. "type": "object",
  25402. "properties": {
  25403. "timestamp": {
  25404. "type": "number"
  25405. },
  25406. "sessionID": {
  25407. "type": "string",
  25408. "pattern": "^ses"
  25409. },
  25410. "assistantMessageID": {
  25411. "type": "string",
  25412. "pattern": "^msg_"
  25413. },
  25414. "callID": {
  25415. "type": "string"
  25416. },
  25417. "tool": {
  25418. "type": "string"
  25419. },
  25420. "input": {
  25421. "type": "object"
  25422. },
  25423. "provider": {
  25424. "type": "object",
  25425. "properties": {
  25426. "executed": {
  25427. "type": "boolean"
  25428. },
  25429. "metadata": {
  25430. "type": "object",
  25431. "additionalProperties": {
  25432. "type": "object"
  25433. }
  25434. }
  25435. },
  25436. "required": ["executed"],
  25437. "additionalProperties": false
  25438. }
  25439. },
  25440. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  25441. "additionalProperties": false
  25442. }
  25443. },
  25444. "required": ["type", "id", "seq", "aggregateID", "data"],
  25445. "additionalProperties": false
  25446. }
  25447. },
  25448. "required": ["type", "id", "syncEvent"],
  25449. "additionalProperties": false
  25450. },
  25451. "SyncEventSessionNextToolProgress": {
  25452. "type": "object",
  25453. "properties": {
  25454. "type": {
  25455. "type": "string",
  25456. "enum": ["sync"]
  25457. },
  25458. "id": {
  25459. "type": "string",
  25460. "pattern": "^evt_"
  25461. },
  25462. "syncEvent": {
  25463. "type": "object",
  25464. "properties": {
  25465. "type": {
  25466. "type": "string",
  25467. "enum": ["session.next.tool.progress.1"]
  25468. },
  25469. "id": {
  25470. "type": "string",
  25471. "pattern": "^evt_"
  25472. },
  25473. "seq": {
  25474. "type": "number"
  25475. },
  25476. "aggregateID": {
  25477. "type": "string"
  25478. },
  25479. "data": {
  25480. "type": "object",
  25481. "properties": {
  25482. "timestamp": {
  25483. "type": "number"
  25484. },
  25485. "sessionID": {
  25486. "type": "string",
  25487. "pattern": "^ses"
  25488. },
  25489. "assistantMessageID": {
  25490. "type": "string",
  25491. "pattern": "^msg_"
  25492. },
  25493. "callID": {
  25494. "type": "string"
  25495. },
  25496. "structured": {
  25497. "type": "object"
  25498. },
  25499. "content": {
  25500. "type": "array",
  25501. "items": {
  25502. "anyOf": [
  25503. {
  25504. "$ref": "#/components/schemas/ToolTextContent"
  25505. },
  25506. {
  25507. "$ref": "#/components/schemas/ToolFileContent"
  25508. }
  25509. ]
  25510. }
  25511. }
  25512. },
  25513. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  25514. "additionalProperties": false
  25515. }
  25516. },
  25517. "required": ["type", "id", "seq", "aggregateID", "data"],
  25518. "additionalProperties": false
  25519. }
  25520. },
  25521. "required": ["type", "id", "syncEvent"],
  25522. "additionalProperties": false
  25523. },
  25524. "SyncEventSessionNextToolSuccess": {
  25525. "type": "object",
  25526. "properties": {
  25527. "type": {
  25528. "type": "string",
  25529. "enum": ["sync"]
  25530. },
  25531. "id": {
  25532. "type": "string",
  25533. "pattern": "^evt_"
  25534. },
  25535. "syncEvent": {
  25536. "type": "object",
  25537. "properties": {
  25538. "type": {
  25539. "type": "string",
  25540. "enum": ["session.next.tool.success.1"]
  25541. },
  25542. "id": {
  25543. "type": "string",
  25544. "pattern": "^evt_"
  25545. },
  25546. "seq": {
  25547. "type": "number"
  25548. },
  25549. "aggregateID": {
  25550. "type": "string"
  25551. },
  25552. "data": {
  25553. "type": "object",
  25554. "properties": {
  25555. "timestamp": {
  25556. "type": "number"
  25557. },
  25558. "sessionID": {
  25559. "type": "string",
  25560. "pattern": "^ses"
  25561. },
  25562. "assistantMessageID": {
  25563. "type": "string",
  25564. "pattern": "^msg_"
  25565. },
  25566. "callID": {
  25567. "type": "string"
  25568. },
  25569. "structured": {
  25570. "type": "object"
  25571. },
  25572. "content": {
  25573. "type": "array",
  25574. "items": {
  25575. "anyOf": [
  25576. {
  25577. "$ref": "#/components/schemas/ToolTextContent"
  25578. },
  25579. {
  25580. "$ref": "#/components/schemas/ToolFileContent"
  25581. }
  25582. ]
  25583. }
  25584. },
  25585. "outputPaths": {
  25586. "type": "array",
  25587. "items": {
  25588. "type": "string"
  25589. }
  25590. },
  25591. "result": {},
  25592. "provider": {
  25593. "type": "object",
  25594. "properties": {
  25595. "executed": {
  25596. "type": "boolean"
  25597. },
  25598. "metadata": {
  25599. "type": "object",
  25600. "additionalProperties": {
  25601. "type": "object"
  25602. }
  25603. }
  25604. },
  25605. "required": ["executed"],
  25606. "additionalProperties": false
  25607. }
  25608. },
  25609. "required": [
  25610. "timestamp",
  25611. "sessionID",
  25612. "assistantMessageID",
  25613. "callID",
  25614. "structured",
  25615. "content",
  25616. "provider"
  25617. ],
  25618. "additionalProperties": false
  25619. }
  25620. },
  25621. "required": ["type", "id", "seq", "aggregateID", "data"],
  25622. "additionalProperties": false
  25623. }
  25624. },
  25625. "required": ["type", "id", "syncEvent"],
  25626. "additionalProperties": false
  25627. },
  25628. "SyncEventSessionNextToolFailed": {
  25629. "type": "object",
  25630. "properties": {
  25631. "type": {
  25632. "type": "string",
  25633. "enum": ["sync"]
  25634. },
  25635. "id": {
  25636. "type": "string",
  25637. "pattern": "^evt_"
  25638. },
  25639. "syncEvent": {
  25640. "type": "object",
  25641. "properties": {
  25642. "type": {
  25643. "type": "string",
  25644. "enum": ["session.next.tool.failed.1"]
  25645. },
  25646. "id": {
  25647. "type": "string",
  25648. "pattern": "^evt_"
  25649. },
  25650. "seq": {
  25651. "type": "number"
  25652. },
  25653. "aggregateID": {
  25654. "type": "string"
  25655. },
  25656. "data": {
  25657. "type": "object",
  25658. "properties": {
  25659. "timestamp": {
  25660. "type": "number"
  25661. },
  25662. "sessionID": {
  25663. "type": "string",
  25664. "pattern": "^ses"
  25665. },
  25666. "assistantMessageID": {
  25667. "type": "string",
  25668. "pattern": "^msg_"
  25669. },
  25670. "callID": {
  25671. "type": "string"
  25672. },
  25673. "error": {
  25674. "$ref": "#/components/schemas/SessionErrorUnknown"
  25675. },
  25676. "result": {},
  25677. "provider": {
  25678. "type": "object",
  25679. "properties": {
  25680. "executed": {
  25681. "type": "boolean"
  25682. },
  25683. "metadata": {
  25684. "type": "object",
  25685. "additionalProperties": {
  25686. "type": "object"
  25687. }
  25688. }
  25689. },
  25690. "required": ["executed"],
  25691. "additionalProperties": false
  25692. }
  25693. },
  25694. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  25695. "additionalProperties": false
  25696. }
  25697. },
  25698. "required": ["type", "id", "seq", "aggregateID", "data"],
  25699. "additionalProperties": false
  25700. }
  25701. },
  25702. "required": ["type", "id", "syncEvent"],
  25703. "additionalProperties": false
  25704. },
  25705. "SyncEventSessionNextRetried": {
  25706. "type": "object",
  25707. "properties": {
  25708. "type": {
  25709. "type": "string",
  25710. "enum": ["sync"]
  25711. },
  25712. "id": {
  25713. "type": "string",
  25714. "pattern": "^evt_"
  25715. },
  25716. "syncEvent": {
  25717. "type": "object",
  25718. "properties": {
  25719. "type": {
  25720. "type": "string",
  25721. "enum": ["session.next.retried.1"]
  25722. },
  25723. "id": {
  25724. "type": "string",
  25725. "pattern": "^evt_"
  25726. },
  25727. "seq": {
  25728. "type": "number"
  25729. },
  25730. "aggregateID": {
  25731. "type": "string"
  25732. },
  25733. "data": {
  25734. "type": "object",
  25735. "properties": {
  25736. "timestamp": {
  25737. "type": "number"
  25738. },
  25739. "sessionID": {
  25740. "type": "string",
  25741. "pattern": "^ses"
  25742. },
  25743. "attempt": {
  25744. "type": "number"
  25745. },
  25746. "error": {
  25747. "$ref": "#/components/schemas/SessionNextRetry_error"
  25748. }
  25749. },
  25750. "required": ["timestamp", "sessionID", "attempt", "error"],
  25751. "additionalProperties": false
  25752. }
  25753. },
  25754. "required": ["type", "id", "seq", "aggregateID", "data"],
  25755. "additionalProperties": false
  25756. }
  25757. },
  25758. "required": ["type", "id", "syncEvent"],
  25759. "additionalProperties": false
  25760. },
  25761. "SyncEventSessionNextCompactionStarted": {
  25762. "type": "object",
  25763. "properties": {
  25764. "type": {
  25765. "type": "string",
  25766. "enum": ["sync"]
  25767. },
  25768. "id": {
  25769. "type": "string",
  25770. "pattern": "^evt_"
  25771. },
  25772. "syncEvent": {
  25773. "type": "object",
  25774. "properties": {
  25775. "type": {
  25776. "type": "string",
  25777. "enum": ["session.next.compaction.started.1"]
  25778. },
  25779. "id": {
  25780. "type": "string",
  25781. "pattern": "^evt_"
  25782. },
  25783. "seq": {
  25784. "type": "number"
  25785. },
  25786. "aggregateID": {
  25787. "type": "string"
  25788. },
  25789. "data": {
  25790. "type": "object",
  25791. "properties": {
  25792. "timestamp": {
  25793. "type": "number"
  25794. },
  25795. "sessionID": {
  25796. "type": "string",
  25797. "pattern": "^ses"
  25798. },
  25799. "messageID": {
  25800. "type": "string",
  25801. "pattern": "^msg_"
  25802. },
  25803. "reason": {
  25804. "type": "string",
  25805. "enum": ["auto", "manual"]
  25806. }
  25807. },
  25808. "required": ["timestamp", "sessionID", "messageID", "reason"],
  25809. "additionalProperties": false
  25810. }
  25811. },
  25812. "required": ["type", "id", "seq", "aggregateID", "data"],
  25813. "additionalProperties": false
  25814. }
  25815. },
  25816. "required": ["type", "id", "syncEvent"],
  25817. "additionalProperties": false
  25818. },
  25819. "SyncEventSessionNextCompactionEnded": {
  25820. "type": "object",
  25821. "properties": {
  25822. "type": {
  25823. "type": "string",
  25824. "enum": ["sync"]
  25825. },
  25826. "id": {
  25827. "type": "string",
  25828. "pattern": "^evt_"
  25829. },
  25830. "syncEvent": {
  25831. "type": "object",
  25832. "properties": {
  25833. "type": {
  25834. "type": "string",
  25835. "enum": ["session.next.compaction.ended.2"]
  25836. },
  25837. "id": {
  25838. "type": "string",
  25839. "pattern": "^evt_"
  25840. },
  25841. "seq": {
  25842. "type": "number"
  25843. },
  25844. "aggregateID": {
  25845. "type": "string"
  25846. },
  25847. "data": {
  25848. "type": "object",
  25849. "properties": {
  25850. "timestamp": {
  25851. "type": "number"
  25852. },
  25853. "sessionID": {
  25854. "type": "string",
  25855. "pattern": "^ses"
  25856. },
  25857. "messageID": {
  25858. "type": "string",
  25859. "pattern": "^msg_"
  25860. },
  25861. "reason": {
  25862. "type": "string",
  25863. "enum": ["auto", "manual"]
  25864. },
  25865. "text": {
  25866. "type": "string"
  25867. },
  25868. "recent": {
  25869. "type": "string"
  25870. }
  25871. },
  25872. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  25873. "additionalProperties": false
  25874. }
  25875. },
  25876. "required": ["type", "id", "seq", "aggregateID", "data"],
  25877. "additionalProperties": false
  25878. }
  25879. },
  25880. "required": ["type", "id", "syncEvent"],
  25881. "additionalProperties": false
  25882. },
  25883. "ConfigV2ReferenceGit": {
  25884. "type": "object",
  25885. "properties": {
  25886. "repository": {
  25887. "type": "string"
  25888. },
  25889. "branch": {
  25890. "type": "string"
  25891. },
  25892. "description": {
  25893. "type": "string"
  25894. },
  25895. "hidden": {
  25896. "type": "boolean"
  25897. }
  25898. },
  25899. "required": ["repository"],
  25900. "additionalProperties": false
  25901. },
  25902. "ConfigV2ReferenceLocal": {
  25903. "type": "object",
  25904. "properties": {
  25905. "path": {
  25906. "type": "string"
  25907. },
  25908. "description": {
  25909. "type": "string"
  25910. },
  25911. "hidden": {
  25912. "type": "boolean"
  25913. }
  25914. },
  25915. "required": ["path"],
  25916. "additionalProperties": false
  25917. },
  25918. "PolicyEffect": {
  25919. "type": "string",
  25920. "enum": ["allow", "deny"]
  25921. },
  25922. "ConfigV2ExperimentalPolicy": {
  25923. "type": "object",
  25924. "properties": {
  25925. "action": {
  25926. "type": "string",
  25927. "enum": ["provider.use"]
  25928. },
  25929. "effect": {
  25930. "$ref": "#/components/schemas/PolicyEffect"
  25931. },
  25932. "resource": {
  25933. "type": "string"
  25934. }
  25935. },
  25936. "required": ["action", "effect", "resource"],
  25937. "additionalProperties": false
  25938. },
  25939. "ProjectDirectories": {
  25940. "type": "array",
  25941. "items": {
  25942. "type": "object",
  25943. "properties": {
  25944. "directory": {
  25945. "type": "string"
  25946. },
  25947. "strategy": {
  25948. "type": "string"
  25949. }
  25950. },
  25951. "required": ["directory"],
  25952. "additionalProperties": false
  25953. }
  25954. },
  25955. "LocationInfo": {
  25956. "type": "object",
  25957. "properties": {
  25958. "directory": {
  25959. "type": "string"
  25960. },
  25961. "workspaceID": {
  25962. "type": "string",
  25963. "pattern": "^wrk"
  25964. },
  25965. "project": {
  25966. "type": "object",
  25967. "properties": {
  25968. "id": {
  25969. "type": "string"
  25970. },
  25971. "directory": {
  25972. "type": "string"
  25973. }
  25974. },
  25975. "required": ["id", "directory"],
  25976. "additionalProperties": false
  25977. }
  25978. },
  25979. "required": ["directory", "project"],
  25980. "additionalProperties": false
  25981. },
  25982. "PermissionV2Effect": {
  25983. "type": "string",
  25984. "enum": ["allow", "deny", "ask"]
  25985. },
  25986. "PermissionV2Rule": {
  25987. "type": "object",
  25988. "properties": {
  25989. "action": {
  25990. "type": "string"
  25991. },
  25992. "resource": {
  25993. "type": "string"
  25994. },
  25995. "effect": {
  25996. "$ref": "#/components/schemas/PermissionV2Effect"
  25997. }
  25998. },
  25999. "required": ["action", "resource", "effect"],
  26000. "additionalProperties": false
  26001. },
  26002. "PermissionV2Ruleset": {
  26003. "type": "array",
  26004. "items": {
  26005. "$ref": "#/components/schemas/PermissionV2Rule"
  26006. }
  26007. },
  26008. "AgentV2Info": {
  26009. "type": "object",
  26010. "properties": {
  26011. "id": {
  26012. "type": "string"
  26013. },
  26014. "model": {
  26015. "type": "object",
  26016. "properties": {
  26017. "id": {
  26018. "type": "string"
  26019. },
  26020. "providerID": {
  26021. "type": "string"
  26022. },
  26023. "variant": {
  26024. "type": "string"
  26025. }
  26026. },
  26027. "required": ["id", "providerID"],
  26028. "additionalProperties": false
  26029. },
  26030. "request": {
  26031. "type": "object",
  26032. "properties": {
  26033. "headers": {
  26034. "type": "object",
  26035. "additionalProperties": {
  26036. "type": "string"
  26037. }
  26038. },
  26039. "body": {
  26040. "type": "object"
  26041. }
  26042. },
  26043. "required": ["headers", "body"],
  26044. "additionalProperties": false
  26045. },
  26046. "system": {
  26047. "type": "string"
  26048. },
  26049. "description": {
  26050. "type": "string"
  26051. },
  26052. "mode": {
  26053. "type": "string",
  26054. "enum": ["subagent", "primary", "all"]
  26055. },
  26056. "hidden": {
  26057. "type": "boolean"
  26058. },
  26059. "color": {
  26060. "anyOf": [
  26061. {
  26062. "type": "string",
  26063. "pattern": "^#[0-9a-fA-F]{6}$"
  26064. },
  26065. {
  26066. "type": "string",
  26067. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  26068. }
  26069. ]
  26070. },
  26071. "steps": {
  26072. "type": "integer",
  26073. "exclusiveMinimum": 0
  26074. },
  26075. "permissions": {
  26076. "$ref": "#/components/schemas/PermissionV2Ruleset"
  26077. }
  26078. },
  26079. "required": ["id", "request", "mode", "hidden", "permissions"],
  26080. "additionalProperties": false
  26081. },
  26082. "SessionV2Info": {
  26083. "type": "object",
  26084. "properties": {
  26085. "id": {
  26086. "type": "string",
  26087. "pattern": "^ses"
  26088. },
  26089. "parentID": {
  26090. "type": "string",
  26091. "pattern": "^ses"
  26092. },
  26093. "projectID": {
  26094. "type": "string"
  26095. },
  26096. "agent": {
  26097. "type": "string"
  26098. },
  26099. "model": {
  26100. "type": "object",
  26101. "properties": {
  26102. "id": {
  26103. "type": "string"
  26104. },
  26105. "providerID": {
  26106. "type": "string"
  26107. },
  26108. "variant": {
  26109. "type": "string"
  26110. }
  26111. },
  26112. "required": ["id", "providerID"],
  26113. "additionalProperties": false
  26114. },
  26115. "cost": {
  26116. "type": "number"
  26117. },
  26118. "tokens": {
  26119. "type": "object",
  26120. "properties": {
  26121. "input": {
  26122. "type": "number"
  26123. },
  26124. "output": {
  26125. "type": "number"
  26126. },
  26127. "reasoning": {
  26128. "type": "number"
  26129. },
  26130. "cache": {
  26131. "type": "object",
  26132. "properties": {
  26133. "read": {
  26134. "type": "number"
  26135. },
  26136. "write": {
  26137. "type": "number"
  26138. }
  26139. },
  26140. "required": ["read", "write"],
  26141. "additionalProperties": false
  26142. }
  26143. },
  26144. "required": ["input", "output", "reasoning", "cache"],
  26145. "additionalProperties": false
  26146. },
  26147. "time": {
  26148. "type": "object",
  26149. "properties": {
  26150. "created": {
  26151. "type": "number"
  26152. },
  26153. "updated": {
  26154. "type": "number"
  26155. },
  26156. "archived": {
  26157. "type": "number"
  26158. }
  26159. },
  26160. "required": ["created", "updated"],
  26161. "additionalProperties": false
  26162. },
  26163. "title": {
  26164. "type": "string"
  26165. },
  26166. "location": {
  26167. "$ref": "#/components/schemas/LocationRef"
  26168. },
  26169. "subpath": {
  26170. "type": "string"
  26171. }
  26172. },
  26173. "required": ["id", "projectID", "cost", "tokens", "time", "title", "location"],
  26174. "additionalProperties": false
  26175. },
  26176. "SessionInputAdmitted": {
  26177. "type": "object",
  26178. "properties": {
  26179. "admittedSeq": {
  26180. "type": "integer",
  26181. "minimum": 0
  26182. },
  26183. "id": {
  26184. "type": "string",
  26185. "pattern": "^msg_"
  26186. },
  26187. "sessionID": {
  26188. "type": "string",
  26189. "pattern": "^ses"
  26190. },
  26191. "prompt": {
  26192. "$ref": "#/components/schemas/Prompt"
  26193. },
  26194. "delivery": {
  26195. "type": "string",
  26196. "enum": ["steer", "queue"]
  26197. },
  26198. "timeCreated": {
  26199. "type": "number"
  26200. },
  26201. "promotedSeq": {
  26202. "type": "integer",
  26203. "minimum": 0
  26204. }
  26205. },
  26206. "required": ["admittedSeq", "id", "sessionID", "prompt", "delivery", "timeCreated"],
  26207. "additionalProperties": false
  26208. },
  26209. "SessionMessageAgentSwitched": {
  26210. "type": "object",
  26211. "properties": {
  26212. "id": {
  26213. "type": "string",
  26214. "pattern": "^msg_"
  26215. },
  26216. "metadata": {
  26217. "type": "object"
  26218. },
  26219. "time": {
  26220. "type": "object",
  26221. "properties": {
  26222. "created": {
  26223. "type": "number"
  26224. }
  26225. },
  26226. "required": ["created"],
  26227. "additionalProperties": false
  26228. },
  26229. "type": {
  26230. "type": "string",
  26231. "enum": ["agent-switched"]
  26232. },
  26233. "agent": {
  26234. "type": "string"
  26235. }
  26236. },
  26237. "required": ["id", "time", "type", "agent"],
  26238. "additionalProperties": false
  26239. },
  26240. "SessionMessageModelSwitched": {
  26241. "type": "object",
  26242. "properties": {
  26243. "id": {
  26244. "type": "string",
  26245. "pattern": "^msg_"
  26246. },
  26247. "metadata": {
  26248. "type": "object"
  26249. },
  26250. "time": {
  26251. "type": "object",
  26252. "properties": {
  26253. "created": {
  26254. "type": "number"
  26255. }
  26256. },
  26257. "required": ["created"],
  26258. "additionalProperties": false
  26259. },
  26260. "type": {
  26261. "type": "string",
  26262. "enum": ["model-switched"]
  26263. },
  26264. "model": {
  26265. "type": "object",
  26266. "properties": {
  26267. "id": {
  26268. "type": "string"
  26269. },
  26270. "providerID": {
  26271. "type": "string"
  26272. },
  26273. "variant": {
  26274. "type": "string"
  26275. }
  26276. },
  26277. "required": ["id", "providerID"],
  26278. "additionalProperties": false
  26279. }
  26280. },
  26281. "required": ["id", "time", "type", "model"],
  26282. "additionalProperties": false
  26283. },
  26284. "SessionMessageUser": {
  26285. "type": "object",
  26286. "properties": {
  26287. "id": {
  26288. "type": "string",
  26289. "pattern": "^msg_"
  26290. },
  26291. "metadata": {
  26292. "type": "object"
  26293. },
  26294. "time": {
  26295. "type": "object",
  26296. "properties": {
  26297. "created": {
  26298. "type": "number"
  26299. }
  26300. },
  26301. "required": ["created"],
  26302. "additionalProperties": false
  26303. },
  26304. "text": {
  26305. "type": "string"
  26306. },
  26307. "files": {
  26308. "type": "array",
  26309. "items": {
  26310. "$ref": "#/components/schemas/PromptFileAttachment"
  26311. }
  26312. },
  26313. "agents": {
  26314. "type": "array",
  26315. "items": {
  26316. "$ref": "#/components/schemas/PromptAgentAttachment"
  26317. }
  26318. },
  26319. "type": {
  26320. "type": "string",
  26321. "enum": ["user"]
  26322. }
  26323. },
  26324. "required": ["id", "time", "text", "type"],
  26325. "additionalProperties": false
  26326. },
  26327. "SessionMessageSynthetic": {
  26328. "type": "object",
  26329. "properties": {
  26330. "id": {
  26331. "type": "string",
  26332. "pattern": "^msg_"
  26333. },
  26334. "metadata": {
  26335. "type": "object"
  26336. },
  26337. "time": {
  26338. "type": "object",
  26339. "properties": {
  26340. "created": {
  26341. "type": "number"
  26342. }
  26343. },
  26344. "required": ["created"],
  26345. "additionalProperties": false
  26346. },
  26347. "sessionID": {
  26348. "type": "string",
  26349. "pattern": "^ses"
  26350. },
  26351. "text": {
  26352. "type": "string"
  26353. },
  26354. "type": {
  26355. "type": "string",
  26356. "enum": ["synthetic"]
  26357. }
  26358. },
  26359. "required": ["id", "time", "sessionID", "text", "type"],
  26360. "additionalProperties": false
  26361. },
  26362. "SessionMessageSystem": {
  26363. "type": "object",
  26364. "properties": {
  26365. "id": {
  26366. "type": "string",
  26367. "pattern": "^msg_"
  26368. },
  26369. "metadata": {
  26370. "type": "object"
  26371. },
  26372. "time": {
  26373. "type": "object",
  26374. "properties": {
  26375. "created": {
  26376. "type": "number"
  26377. }
  26378. },
  26379. "required": ["created"],
  26380. "additionalProperties": false
  26381. },
  26382. "type": {
  26383. "type": "string",
  26384. "enum": ["system"]
  26385. },
  26386. "text": {
  26387. "type": "string"
  26388. }
  26389. },
  26390. "required": ["id", "time", "type", "text"],
  26391. "additionalProperties": false
  26392. },
  26393. "SessionMessageShell": {
  26394. "type": "object",
  26395. "properties": {
  26396. "id": {
  26397. "type": "string",
  26398. "pattern": "^msg_"
  26399. },
  26400. "metadata": {
  26401. "type": "object"
  26402. },
  26403. "time": {
  26404. "type": "object",
  26405. "properties": {
  26406. "created": {
  26407. "type": "number"
  26408. },
  26409. "completed": {
  26410. "type": "number"
  26411. }
  26412. },
  26413. "required": ["created"],
  26414. "additionalProperties": false
  26415. },
  26416. "type": {
  26417. "type": "string",
  26418. "enum": ["shell"]
  26419. },
  26420. "callID": {
  26421. "type": "string"
  26422. },
  26423. "command": {
  26424. "type": "string"
  26425. },
  26426. "output": {
  26427. "type": "string"
  26428. }
  26429. },
  26430. "required": ["id", "time", "type", "callID", "command", "output"],
  26431. "additionalProperties": false
  26432. },
  26433. "SessionMessageAssistantText": {
  26434. "type": "object",
  26435. "properties": {
  26436. "type": {
  26437. "type": "string",
  26438. "enum": ["text"]
  26439. },
  26440. "id": {
  26441. "type": "string"
  26442. },
  26443. "text": {
  26444. "type": "string"
  26445. }
  26446. },
  26447. "required": ["type", "id", "text"],
  26448. "additionalProperties": false
  26449. },
  26450. "SessionMessageAssistantReasoning": {
  26451. "type": "object",
  26452. "properties": {
  26453. "type": {
  26454. "type": "string",
  26455. "enum": ["reasoning"]
  26456. },
  26457. "id": {
  26458. "type": "string"
  26459. },
  26460. "text": {
  26461. "type": "string"
  26462. },
  26463. "providerMetadata": {
  26464. "type": "object",
  26465. "additionalProperties": {
  26466. "type": "object"
  26467. }
  26468. }
  26469. },
  26470. "required": ["type", "id", "text"],
  26471. "additionalProperties": false
  26472. },
  26473. "SessionMessageToolStatePending": {
  26474. "type": "object",
  26475. "properties": {
  26476. "status": {
  26477. "type": "string",
  26478. "enum": ["pending"]
  26479. },
  26480. "input": {
  26481. "type": "string"
  26482. }
  26483. },
  26484. "required": ["status", "input"],
  26485. "additionalProperties": false
  26486. },
  26487. "SessionMessageToolStateRunning": {
  26488. "type": "object",
  26489. "properties": {
  26490. "status": {
  26491. "type": "string",
  26492. "enum": ["running"]
  26493. },
  26494. "input": {
  26495. "type": "object"
  26496. },
  26497. "structured": {
  26498. "type": "object"
  26499. },
  26500. "content": {
  26501. "type": "array",
  26502. "items": {
  26503. "anyOf": [
  26504. {
  26505. "$ref": "#/components/schemas/ToolTextContent"
  26506. },
  26507. {
  26508. "$ref": "#/components/schemas/ToolFileContent"
  26509. }
  26510. ]
  26511. }
  26512. }
  26513. },
  26514. "required": ["status", "input", "structured", "content"],
  26515. "additionalProperties": false
  26516. },
  26517. "SessionMessageToolStateCompleted": {
  26518. "type": "object",
  26519. "properties": {
  26520. "status": {
  26521. "type": "string",
  26522. "enum": ["completed"]
  26523. },
  26524. "input": {
  26525. "type": "object"
  26526. },
  26527. "attachments": {
  26528. "type": "array",
  26529. "items": {
  26530. "$ref": "#/components/schemas/PromptFileAttachment"
  26531. }
  26532. },
  26533. "content": {
  26534. "type": "array",
  26535. "items": {
  26536. "anyOf": [
  26537. {
  26538. "$ref": "#/components/schemas/ToolTextContent"
  26539. },
  26540. {
  26541. "$ref": "#/components/schemas/ToolFileContent"
  26542. }
  26543. ]
  26544. }
  26545. },
  26546. "outputPaths": {
  26547. "type": "array",
  26548. "items": {
  26549. "type": "string"
  26550. }
  26551. },
  26552. "structured": {
  26553. "type": "object"
  26554. },
  26555. "result": {}
  26556. },
  26557. "required": ["status", "input", "content", "structured"],
  26558. "additionalProperties": false
  26559. },
  26560. "SessionMessageToolStateError": {
  26561. "type": "object",
  26562. "properties": {
  26563. "status": {
  26564. "type": "string",
  26565. "enum": ["error"]
  26566. },
  26567. "input": {
  26568. "type": "object"
  26569. },
  26570. "content": {
  26571. "type": "array",
  26572. "items": {
  26573. "anyOf": [
  26574. {
  26575. "$ref": "#/components/schemas/ToolTextContent"
  26576. },
  26577. {
  26578. "$ref": "#/components/schemas/ToolFileContent"
  26579. }
  26580. ]
  26581. }
  26582. },
  26583. "structured": {
  26584. "type": "object"
  26585. },
  26586. "error": {
  26587. "$ref": "#/components/schemas/SessionErrorUnknown"
  26588. },
  26589. "result": {}
  26590. },
  26591. "required": ["status", "input", "content", "structured", "error"],
  26592. "additionalProperties": false
  26593. },
  26594. "SessionMessageAssistantTool": {
  26595. "type": "object",
  26596. "properties": {
  26597. "type": {
  26598. "type": "string",
  26599. "enum": ["tool"]
  26600. },
  26601. "id": {
  26602. "type": "string"
  26603. },
  26604. "name": {
  26605. "type": "string"
  26606. },
  26607. "provider": {
  26608. "type": "object",
  26609. "properties": {
  26610. "executed": {
  26611. "type": "boolean"
  26612. },
  26613. "metadata": {
  26614. "type": "object",
  26615. "additionalProperties": {
  26616. "type": "object"
  26617. }
  26618. },
  26619. "resultMetadata": {
  26620. "type": "object",
  26621. "additionalProperties": {
  26622. "type": "object"
  26623. }
  26624. }
  26625. },
  26626. "required": ["executed"],
  26627. "additionalProperties": false
  26628. },
  26629. "state": {
  26630. "anyOf": [
  26631. {
  26632. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  26633. },
  26634. {
  26635. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  26636. },
  26637. {
  26638. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  26639. },
  26640. {
  26641. "$ref": "#/components/schemas/SessionMessageToolStateError"
  26642. }
  26643. ]
  26644. },
  26645. "time": {
  26646. "type": "object",
  26647. "properties": {
  26648. "created": {
  26649. "type": "number"
  26650. },
  26651. "ran": {
  26652. "type": "number"
  26653. },
  26654. "completed": {
  26655. "type": "number"
  26656. },
  26657. "pruned": {
  26658. "type": "number"
  26659. }
  26660. },
  26661. "required": ["created"],
  26662. "additionalProperties": false
  26663. }
  26664. },
  26665. "required": ["type", "id", "name", "state", "time"],
  26666. "additionalProperties": false
  26667. },
  26668. "SessionMessageAssistant": {
  26669. "type": "object",
  26670. "properties": {
  26671. "id": {
  26672. "type": "string",
  26673. "pattern": "^msg_"
  26674. },
  26675. "metadata": {
  26676. "type": "object"
  26677. },
  26678. "time": {
  26679. "type": "object",
  26680. "properties": {
  26681. "created": {
  26682. "type": "number"
  26683. },
  26684. "completed": {
  26685. "type": "number"
  26686. }
  26687. },
  26688. "required": ["created"],
  26689. "additionalProperties": false
  26690. },
  26691. "type": {
  26692. "type": "string",
  26693. "enum": ["assistant"]
  26694. },
  26695. "agent": {
  26696. "type": "string"
  26697. },
  26698. "model": {
  26699. "type": "object",
  26700. "properties": {
  26701. "id": {
  26702. "type": "string"
  26703. },
  26704. "providerID": {
  26705. "type": "string"
  26706. },
  26707. "variant": {
  26708. "type": "string"
  26709. }
  26710. },
  26711. "required": ["id", "providerID"],
  26712. "additionalProperties": false
  26713. },
  26714. "content": {
  26715. "type": "array",
  26716. "items": {
  26717. "anyOf": [
  26718. {
  26719. "$ref": "#/components/schemas/SessionMessageAssistantText"
  26720. },
  26721. {
  26722. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  26723. },
  26724. {
  26725. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  26726. }
  26727. ]
  26728. }
  26729. },
  26730. "snapshot": {
  26731. "type": "object",
  26732. "properties": {
  26733. "start": {
  26734. "type": "string"
  26735. },
  26736. "end": {
  26737. "type": "string"
  26738. }
  26739. },
  26740. "additionalProperties": false
  26741. },
  26742. "finish": {
  26743. "type": "string"
  26744. },
  26745. "cost": {
  26746. "type": "number"
  26747. },
  26748. "tokens": {
  26749. "type": "object",
  26750. "properties": {
  26751. "input": {
  26752. "type": "number"
  26753. },
  26754. "output": {
  26755. "type": "number"
  26756. },
  26757. "reasoning": {
  26758. "type": "number"
  26759. },
  26760. "cache": {
  26761. "type": "object",
  26762. "properties": {
  26763. "read": {
  26764. "type": "number"
  26765. },
  26766. "write": {
  26767. "type": "number"
  26768. }
  26769. },
  26770. "required": ["read", "write"],
  26771. "additionalProperties": false
  26772. }
  26773. },
  26774. "required": ["input", "output", "reasoning", "cache"],
  26775. "additionalProperties": false
  26776. },
  26777. "error": {
  26778. "$ref": "#/components/schemas/SessionErrorUnknown"
  26779. }
  26780. },
  26781. "required": ["id", "time", "type", "agent", "model", "content"],
  26782. "additionalProperties": false
  26783. },
  26784. "SessionMessageCompaction": {
  26785. "type": "object",
  26786. "properties": {
  26787. "type": {
  26788. "type": "string",
  26789. "enum": ["compaction"]
  26790. },
  26791. "reason": {
  26792. "type": "string",
  26793. "enum": ["auto", "manual"]
  26794. },
  26795. "summary": {
  26796. "type": "string"
  26797. },
  26798. "recent": {
  26799. "type": "string"
  26800. },
  26801. "id": {
  26802. "type": "string",
  26803. "pattern": "^msg_"
  26804. },
  26805. "metadata": {
  26806. "type": "object"
  26807. },
  26808. "time": {
  26809. "type": "object",
  26810. "properties": {
  26811. "created": {
  26812. "type": "number"
  26813. }
  26814. },
  26815. "required": ["created"],
  26816. "additionalProperties": false
  26817. }
  26818. },
  26819. "required": ["type", "reason", "summary", "recent", "id", "time"],
  26820. "additionalProperties": false
  26821. },
  26822. "SessionMessage": {
  26823. "anyOf": [
  26824. {
  26825. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  26826. },
  26827. {
  26828. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  26829. },
  26830. {
  26831. "$ref": "#/components/schemas/SessionMessageUser"
  26832. },
  26833. {
  26834. "$ref": "#/components/schemas/SessionMessageSynthetic"
  26835. },
  26836. {
  26837. "$ref": "#/components/schemas/SessionMessageSystem"
  26838. },
  26839. {
  26840. "$ref": "#/components/schemas/SessionMessageShell"
  26841. },
  26842. {
  26843. "$ref": "#/components/schemas/SessionMessageAssistant"
  26844. },
  26845. {
  26846. "$ref": "#/components/schemas/SessionMessageCompaction"
  26847. }
  26848. ]
  26849. },
  26850. "ModelV2Info": {
  26851. "type": "object",
  26852. "properties": {
  26853. "id": {
  26854. "type": "string"
  26855. },
  26856. "providerID": {
  26857. "type": "string"
  26858. },
  26859. "family": {
  26860. "type": "string"
  26861. },
  26862. "name": {
  26863. "type": "string"
  26864. },
  26865. "api": {
  26866. "anyOf": [
  26867. {
  26868. "type": "object",
  26869. "properties": {
  26870. "id": {
  26871. "type": "string"
  26872. },
  26873. "type": {
  26874. "type": "string",
  26875. "enum": ["aisdk"]
  26876. },
  26877. "package": {
  26878. "type": "string"
  26879. },
  26880. "url": {
  26881. "type": "string"
  26882. },
  26883. "settings": {
  26884. "type": "object"
  26885. }
  26886. },
  26887. "required": ["id", "type", "package"],
  26888. "additionalProperties": false
  26889. },
  26890. {
  26891. "type": "object",
  26892. "properties": {
  26893. "id": {
  26894. "type": "string"
  26895. },
  26896. "type": {
  26897. "type": "string",
  26898. "enum": ["native"]
  26899. },
  26900. "url": {
  26901. "type": "string"
  26902. },
  26903. "settings": {
  26904. "type": "object"
  26905. }
  26906. },
  26907. "required": ["id", "type", "settings"],
  26908. "additionalProperties": false
  26909. }
  26910. ]
  26911. },
  26912. "capabilities": {
  26913. "type": "object",
  26914. "properties": {
  26915. "tools": {
  26916. "type": "boolean"
  26917. },
  26918. "input": {
  26919. "type": "array",
  26920. "items": {
  26921. "type": "string"
  26922. }
  26923. },
  26924. "output": {
  26925. "type": "array",
  26926. "items": {
  26927. "type": "string"
  26928. }
  26929. }
  26930. },
  26931. "required": ["tools", "input", "output"],
  26932. "additionalProperties": false
  26933. },
  26934. "request": {
  26935. "type": "object",
  26936. "properties": {
  26937. "headers": {
  26938. "type": "object",
  26939. "additionalProperties": {
  26940. "type": "string"
  26941. }
  26942. },
  26943. "body": {
  26944. "type": "object"
  26945. },
  26946. "generation": {
  26947. "type": "object",
  26948. "properties": {
  26949. "maxTokens": {
  26950. "anyOf": [
  26951. {
  26952. "type": "number"
  26953. },
  26954. {
  26955. "type": "string",
  26956. "enum": ["NaN"]
  26957. },
  26958. {
  26959. "type": "string",
  26960. "enum": ["Infinity"]
  26961. },
  26962. {
  26963. "type": "string",
  26964. "enum": ["-Infinity"]
  26965. },
  26966. {
  26967. "type": "string",
  26968. "enum": ["Infinity", "-Infinity", "NaN"]
  26969. }
  26970. ]
  26971. },
  26972. "temperature": {
  26973. "anyOf": [
  26974. {
  26975. "type": "number"
  26976. },
  26977. {
  26978. "type": "string",
  26979. "enum": ["NaN"]
  26980. },
  26981. {
  26982. "type": "string",
  26983. "enum": ["Infinity"]
  26984. },
  26985. {
  26986. "type": "string",
  26987. "enum": ["-Infinity"]
  26988. },
  26989. {
  26990. "type": "string",
  26991. "enum": ["Infinity", "-Infinity", "NaN"]
  26992. }
  26993. ]
  26994. },
  26995. "topP": {
  26996. "anyOf": [
  26997. {
  26998. "type": "number"
  26999. },
  27000. {
  27001. "type": "string",
  27002. "enum": ["NaN"]
  27003. },
  27004. {
  27005. "type": "string",
  27006. "enum": ["Infinity"]
  27007. },
  27008. {
  27009. "type": "string",
  27010. "enum": ["-Infinity"]
  27011. },
  27012. {
  27013. "type": "string",
  27014. "enum": ["Infinity", "-Infinity", "NaN"]
  27015. }
  27016. ]
  27017. },
  27018. "topK": {
  27019. "anyOf": [
  27020. {
  27021. "type": "number"
  27022. },
  27023. {
  27024. "type": "string",
  27025. "enum": ["NaN"]
  27026. },
  27027. {
  27028. "type": "string",
  27029. "enum": ["Infinity"]
  27030. },
  27031. {
  27032. "type": "string",
  27033. "enum": ["-Infinity"]
  27034. },
  27035. {
  27036. "type": "string",
  27037. "enum": ["Infinity", "-Infinity", "NaN"]
  27038. }
  27039. ]
  27040. },
  27041. "frequencyPenalty": {
  27042. "anyOf": [
  27043. {
  27044. "type": "number"
  27045. },
  27046. {
  27047. "type": "string",
  27048. "enum": ["NaN"]
  27049. },
  27050. {
  27051. "type": "string",
  27052. "enum": ["Infinity"]
  27053. },
  27054. {
  27055. "type": "string",
  27056. "enum": ["-Infinity"]
  27057. },
  27058. {
  27059. "type": "string",
  27060. "enum": ["Infinity", "-Infinity", "NaN"]
  27061. }
  27062. ]
  27063. },
  27064. "presencePenalty": {
  27065. "anyOf": [
  27066. {
  27067. "type": "number"
  27068. },
  27069. {
  27070. "type": "string",
  27071. "enum": ["NaN"]
  27072. },
  27073. {
  27074. "type": "string",
  27075. "enum": ["Infinity"]
  27076. },
  27077. {
  27078. "type": "string",
  27079. "enum": ["-Infinity"]
  27080. },
  27081. {
  27082. "type": "string",
  27083. "enum": ["Infinity", "-Infinity", "NaN"]
  27084. }
  27085. ]
  27086. },
  27087. "seed": {
  27088. "anyOf": [
  27089. {
  27090. "type": "number"
  27091. },
  27092. {
  27093. "type": "string",
  27094. "enum": ["NaN"]
  27095. },
  27096. {
  27097. "type": "string",
  27098. "enum": ["Infinity"]
  27099. },
  27100. {
  27101. "type": "string",
  27102. "enum": ["-Infinity"]
  27103. },
  27104. {
  27105. "type": "string",
  27106. "enum": ["Infinity", "-Infinity", "NaN"]
  27107. }
  27108. ]
  27109. },
  27110. "stop": {
  27111. "type": "array",
  27112. "items": {
  27113. "type": "string"
  27114. }
  27115. }
  27116. },
  27117. "additionalProperties": false
  27118. },
  27119. "options": {
  27120. "type": "object"
  27121. },
  27122. "variant": {
  27123. "type": "string"
  27124. }
  27125. },
  27126. "required": ["headers", "body"],
  27127. "additionalProperties": false
  27128. },
  27129. "variants": {
  27130. "type": "array",
  27131. "items": {
  27132. "type": "object",
  27133. "properties": {
  27134. "id": {
  27135. "type": "string"
  27136. },
  27137. "headers": {
  27138. "type": "object",
  27139. "additionalProperties": {
  27140. "type": "string"
  27141. }
  27142. },
  27143. "body": {
  27144. "type": "object"
  27145. },
  27146. "generation": {
  27147. "type": "object",
  27148. "properties": {
  27149. "maxTokens": {
  27150. "anyOf": [
  27151. {
  27152. "type": "number"
  27153. },
  27154. {
  27155. "type": "string",
  27156. "enum": ["NaN"]
  27157. },
  27158. {
  27159. "type": "string",
  27160. "enum": ["Infinity"]
  27161. },
  27162. {
  27163. "type": "string",
  27164. "enum": ["-Infinity"]
  27165. },
  27166. {
  27167. "type": "string",
  27168. "enum": ["Infinity", "-Infinity", "NaN"]
  27169. }
  27170. ]
  27171. },
  27172. "temperature": {
  27173. "anyOf": [
  27174. {
  27175. "type": "number"
  27176. },
  27177. {
  27178. "type": "string",
  27179. "enum": ["NaN"]
  27180. },
  27181. {
  27182. "type": "string",
  27183. "enum": ["Infinity"]
  27184. },
  27185. {
  27186. "type": "string",
  27187. "enum": ["-Infinity"]
  27188. },
  27189. {
  27190. "type": "string",
  27191. "enum": ["Infinity", "-Infinity", "NaN"]
  27192. }
  27193. ]
  27194. },
  27195. "topP": {
  27196. "anyOf": [
  27197. {
  27198. "type": "number"
  27199. },
  27200. {
  27201. "type": "string",
  27202. "enum": ["NaN"]
  27203. },
  27204. {
  27205. "type": "string",
  27206. "enum": ["Infinity"]
  27207. },
  27208. {
  27209. "type": "string",
  27210. "enum": ["-Infinity"]
  27211. },
  27212. {
  27213. "type": "string",
  27214. "enum": ["Infinity", "-Infinity", "NaN"]
  27215. }
  27216. ]
  27217. },
  27218. "topK": {
  27219. "anyOf": [
  27220. {
  27221. "type": "number"
  27222. },
  27223. {
  27224. "type": "string",
  27225. "enum": ["NaN"]
  27226. },
  27227. {
  27228. "type": "string",
  27229. "enum": ["Infinity"]
  27230. },
  27231. {
  27232. "type": "string",
  27233. "enum": ["-Infinity"]
  27234. },
  27235. {
  27236. "type": "string",
  27237. "enum": ["Infinity", "-Infinity", "NaN"]
  27238. }
  27239. ]
  27240. },
  27241. "frequencyPenalty": {
  27242. "anyOf": [
  27243. {
  27244. "type": "number"
  27245. },
  27246. {
  27247. "type": "string",
  27248. "enum": ["NaN"]
  27249. },
  27250. {
  27251. "type": "string",
  27252. "enum": ["Infinity"]
  27253. },
  27254. {
  27255. "type": "string",
  27256. "enum": ["-Infinity"]
  27257. },
  27258. {
  27259. "type": "string",
  27260. "enum": ["Infinity", "-Infinity", "NaN"]
  27261. }
  27262. ]
  27263. },
  27264. "presencePenalty": {
  27265. "anyOf": [
  27266. {
  27267. "type": "number"
  27268. },
  27269. {
  27270. "type": "string",
  27271. "enum": ["NaN"]
  27272. },
  27273. {
  27274. "type": "string",
  27275. "enum": ["Infinity"]
  27276. },
  27277. {
  27278. "type": "string",
  27279. "enum": ["-Infinity"]
  27280. },
  27281. {
  27282. "type": "string",
  27283. "enum": ["Infinity", "-Infinity", "NaN"]
  27284. }
  27285. ]
  27286. },
  27287. "seed": {
  27288. "anyOf": [
  27289. {
  27290. "type": "number"
  27291. },
  27292. {
  27293. "type": "string",
  27294. "enum": ["NaN"]
  27295. },
  27296. {
  27297. "type": "string",
  27298. "enum": ["Infinity"]
  27299. },
  27300. {
  27301. "type": "string",
  27302. "enum": ["-Infinity"]
  27303. },
  27304. {
  27305. "type": "string",
  27306. "enum": ["Infinity", "-Infinity", "NaN"]
  27307. }
  27308. ]
  27309. },
  27310. "stop": {
  27311. "type": "array",
  27312. "items": {
  27313. "type": "string"
  27314. }
  27315. }
  27316. },
  27317. "additionalProperties": false
  27318. },
  27319. "options": {
  27320. "type": "object"
  27321. }
  27322. },
  27323. "required": ["id", "headers", "body"],
  27324. "additionalProperties": false
  27325. }
  27326. },
  27327. "time": {
  27328. "type": "object",
  27329. "properties": {
  27330. "released": {
  27331. "type": "number"
  27332. }
  27333. },
  27334. "required": ["released"],
  27335. "additionalProperties": false
  27336. },
  27337. "cost": {
  27338. "type": "array",
  27339. "items": {
  27340. "type": "object",
  27341. "properties": {
  27342. "tier": {
  27343. "type": "object",
  27344. "properties": {
  27345. "type": {
  27346. "type": "string",
  27347. "enum": ["context"]
  27348. },
  27349. "size": {
  27350. "type": "integer"
  27351. }
  27352. },
  27353. "required": ["type", "size"],
  27354. "additionalProperties": false
  27355. },
  27356. "input": {
  27357. "type": "number"
  27358. },
  27359. "output": {
  27360. "type": "number"
  27361. },
  27362. "cache": {
  27363. "type": "object",
  27364. "properties": {
  27365. "read": {
  27366. "type": "number"
  27367. },
  27368. "write": {
  27369. "type": "number"
  27370. }
  27371. },
  27372. "required": ["read", "write"],
  27373. "additionalProperties": false
  27374. }
  27375. },
  27376. "required": ["input", "output", "cache"],
  27377. "additionalProperties": false
  27378. }
  27379. },
  27380. "status": {
  27381. "type": "string",
  27382. "enum": ["alpha", "beta", "deprecated", "active"]
  27383. },
  27384. "enabled": {
  27385. "type": "boolean"
  27386. },
  27387. "limit": {
  27388. "type": "object",
  27389. "properties": {
  27390. "context": {
  27391. "type": "integer"
  27392. },
  27393. "input": {
  27394. "type": "integer"
  27395. },
  27396. "output": {
  27397. "type": "integer"
  27398. }
  27399. },
  27400. "required": ["context", "output"],
  27401. "additionalProperties": false
  27402. }
  27403. },
  27404. "required": [
  27405. "id",
  27406. "providerID",
  27407. "name",
  27408. "api",
  27409. "capabilities",
  27410. "request",
  27411. "variants",
  27412. "time",
  27413. "cost",
  27414. "status",
  27415. "enabled",
  27416. "limit"
  27417. ],
  27418. "additionalProperties": false
  27419. },
  27420. "ProviderV2Info": {
  27421. "type": "object",
  27422. "properties": {
  27423. "id": {
  27424. "type": "string"
  27425. },
  27426. "name": {
  27427. "type": "string"
  27428. },
  27429. "disabled": {
  27430. "type": "boolean"
  27431. },
  27432. "api": {
  27433. "anyOf": [
  27434. {
  27435. "type": "object",
  27436. "properties": {
  27437. "type": {
  27438. "type": "string",
  27439. "enum": ["aisdk"]
  27440. },
  27441. "package": {
  27442. "type": "string"
  27443. },
  27444. "url": {
  27445. "type": "string"
  27446. },
  27447. "settings": {
  27448. "type": "object"
  27449. }
  27450. },
  27451. "required": ["type", "package"],
  27452. "additionalProperties": false
  27453. },
  27454. {
  27455. "type": "object",
  27456. "properties": {
  27457. "type": {
  27458. "type": "string",
  27459. "enum": ["native"]
  27460. },
  27461. "url": {
  27462. "type": "string"
  27463. },
  27464. "settings": {
  27465. "type": "object"
  27466. }
  27467. },
  27468. "required": ["type", "settings"],
  27469. "additionalProperties": false
  27470. }
  27471. ]
  27472. },
  27473. "request": {
  27474. "type": "object",
  27475. "properties": {
  27476. "headers": {
  27477. "type": "object",
  27478. "additionalProperties": {
  27479. "type": "string"
  27480. }
  27481. },
  27482. "body": {
  27483. "type": "object"
  27484. }
  27485. },
  27486. "required": ["headers", "body"],
  27487. "additionalProperties": false
  27488. }
  27489. },
  27490. "required": ["id", "name", "api", "request"],
  27491. "additionalProperties": false
  27492. },
  27493. "IntegrationWhen": {
  27494. "type": "object",
  27495. "properties": {
  27496. "key": {
  27497. "type": "string"
  27498. },
  27499. "op": {
  27500. "type": "string",
  27501. "enum": ["eq", "neq"]
  27502. },
  27503. "value": {
  27504. "type": "string"
  27505. }
  27506. },
  27507. "required": ["key", "op", "value"],
  27508. "additionalProperties": false
  27509. },
  27510. "IntegrationTextPrompt": {
  27511. "type": "object",
  27512. "properties": {
  27513. "type": {
  27514. "type": "string",
  27515. "enum": ["text"]
  27516. },
  27517. "key": {
  27518. "type": "string"
  27519. },
  27520. "message": {
  27521. "type": "string"
  27522. },
  27523. "placeholder": {
  27524. "type": "string"
  27525. },
  27526. "when": {
  27527. "$ref": "#/components/schemas/IntegrationWhen"
  27528. }
  27529. },
  27530. "required": ["type", "key", "message"],
  27531. "additionalProperties": false
  27532. },
  27533. "IntegrationSelectPrompt": {
  27534. "type": "object",
  27535. "properties": {
  27536. "type": {
  27537. "type": "string",
  27538. "enum": ["select"]
  27539. },
  27540. "key": {
  27541. "type": "string"
  27542. },
  27543. "message": {
  27544. "type": "string"
  27545. },
  27546. "options": {
  27547. "type": "array",
  27548. "items": {
  27549. "type": "object",
  27550. "properties": {
  27551. "label": {
  27552. "type": "string"
  27553. },
  27554. "value": {
  27555. "type": "string"
  27556. },
  27557. "hint": {
  27558. "type": "string"
  27559. }
  27560. },
  27561. "required": ["label", "value"],
  27562. "additionalProperties": false
  27563. }
  27564. },
  27565. "when": {
  27566. "$ref": "#/components/schemas/IntegrationWhen"
  27567. }
  27568. },
  27569. "required": ["type", "key", "message", "options"],
  27570. "additionalProperties": false
  27571. },
  27572. "IntegrationOAuthMethod": {
  27573. "type": "object",
  27574. "properties": {
  27575. "id": {
  27576. "type": "string"
  27577. },
  27578. "type": {
  27579. "type": "string",
  27580. "enum": ["oauth"]
  27581. },
  27582. "label": {
  27583. "type": "string"
  27584. },
  27585. "prompts": {
  27586. "type": "array",
  27587. "items": {
  27588. "anyOf": [
  27589. {
  27590. "$ref": "#/components/schemas/IntegrationTextPrompt"
  27591. },
  27592. {
  27593. "$ref": "#/components/schemas/IntegrationSelectPrompt"
  27594. }
  27595. ]
  27596. }
  27597. }
  27598. },
  27599. "required": ["id", "type", "label"],
  27600. "additionalProperties": false
  27601. },
  27602. "IntegrationKeyMethod": {
  27603. "type": "object",
  27604. "properties": {
  27605. "type": {
  27606. "type": "string",
  27607. "enum": ["key"]
  27608. },
  27609. "label": {
  27610. "type": "string"
  27611. }
  27612. },
  27613. "required": ["type"],
  27614. "additionalProperties": false
  27615. },
  27616. "IntegrationEnvMethod": {
  27617. "type": "object",
  27618. "properties": {
  27619. "type": {
  27620. "type": "string",
  27621. "enum": ["env"]
  27622. },
  27623. "names": {
  27624. "type": "array",
  27625. "items": {
  27626. "type": "string"
  27627. }
  27628. }
  27629. },
  27630. "required": ["type", "names"],
  27631. "additionalProperties": false
  27632. },
  27633. "ConnectionCredentialInfo": {
  27634. "type": "object",
  27635. "properties": {
  27636. "type": {
  27637. "type": "string",
  27638. "enum": ["credential"]
  27639. },
  27640. "id": {
  27641. "type": "string"
  27642. },
  27643. "label": {
  27644. "type": "string"
  27645. }
  27646. },
  27647. "required": ["type", "id", "label"],
  27648. "additionalProperties": false
  27649. },
  27650. "ConnectionEnvInfo": {
  27651. "type": "object",
  27652. "properties": {
  27653. "type": {
  27654. "type": "string",
  27655. "enum": ["env"]
  27656. },
  27657. "name": {
  27658. "type": "string"
  27659. }
  27660. },
  27661. "required": ["type", "name"],
  27662. "additionalProperties": false
  27663. },
  27664. "ConnectionInfo": {
  27665. "anyOf": [
  27666. {
  27667. "$ref": "#/components/schemas/ConnectionCredentialInfo"
  27668. },
  27669. {
  27670. "$ref": "#/components/schemas/ConnectionEnvInfo"
  27671. }
  27672. ]
  27673. },
  27674. "IntegrationInfo": {
  27675. "type": "object",
  27676. "properties": {
  27677. "id": {
  27678. "type": "string"
  27679. },
  27680. "name": {
  27681. "type": "string"
  27682. },
  27683. "methods": {
  27684. "type": "array",
  27685. "items": {
  27686. "anyOf": [
  27687. {
  27688. "$ref": "#/components/schemas/IntegrationOAuthMethod"
  27689. },
  27690. {
  27691. "$ref": "#/components/schemas/IntegrationKeyMethod"
  27692. },
  27693. {
  27694. "$ref": "#/components/schemas/IntegrationEnvMethod"
  27695. }
  27696. ]
  27697. }
  27698. },
  27699. "connections": {
  27700. "type": "array",
  27701. "items": {
  27702. "$ref": "#/components/schemas/ConnectionInfo"
  27703. }
  27704. }
  27705. },
  27706. "required": ["id", "name", "methods", "connections"],
  27707. "additionalProperties": false
  27708. },
  27709. "IntegrationAttempt": {
  27710. "type": "object",
  27711. "properties": {
  27712. "attemptID": {
  27713. "type": "string"
  27714. },
  27715. "url": {
  27716. "type": "string"
  27717. },
  27718. "instructions": {
  27719. "type": "string"
  27720. },
  27721. "mode": {
  27722. "type": "string",
  27723. "enum": ["auto", "code"]
  27724. },
  27725. "time": {
  27726. "type": "object",
  27727. "properties": {
  27728. "created": {
  27729. "anyOf": [
  27730. {
  27731. "type": "number"
  27732. },
  27733. {
  27734. "type": "string",
  27735. "enum": ["NaN"]
  27736. },
  27737. {
  27738. "type": "string",
  27739. "enum": ["Infinity"]
  27740. },
  27741. {
  27742. "type": "string",
  27743. "enum": ["-Infinity"]
  27744. },
  27745. {
  27746. "type": "string",
  27747. "enum": ["Infinity", "-Infinity", "NaN"]
  27748. }
  27749. ]
  27750. },
  27751. "expires": {
  27752. "anyOf": [
  27753. {
  27754. "type": "number"
  27755. },
  27756. {
  27757. "type": "string",
  27758. "enum": ["NaN"]
  27759. },
  27760. {
  27761. "type": "string",
  27762. "enum": ["Infinity"]
  27763. },
  27764. {
  27765. "type": "string",
  27766. "enum": ["-Infinity"]
  27767. },
  27768. {
  27769. "type": "string",
  27770. "enum": ["Infinity", "-Infinity", "NaN"]
  27771. }
  27772. ]
  27773. }
  27774. },
  27775. "required": ["created", "expires"],
  27776. "additionalProperties": false
  27777. }
  27778. },
  27779. "required": ["attemptID", "url", "instructions", "mode", "time"],
  27780. "additionalProperties": false
  27781. },
  27782. "PermissionV2Request": {
  27783. "type": "object",
  27784. "properties": {
  27785. "id": {
  27786. "type": "string",
  27787. "pattern": "^per"
  27788. },
  27789. "sessionID": {
  27790. "type": "string",
  27791. "pattern": "^ses"
  27792. },
  27793. "action": {
  27794. "type": "string"
  27795. },
  27796. "resources": {
  27797. "type": "array",
  27798. "items": {
  27799. "type": "string"
  27800. }
  27801. },
  27802. "save": {
  27803. "type": "array",
  27804. "items": {
  27805. "type": "string"
  27806. }
  27807. },
  27808. "metadata": {
  27809. "type": "object"
  27810. },
  27811. "source": {
  27812. "$ref": "#/components/schemas/PermissionV2Source"
  27813. }
  27814. },
  27815. "required": ["id", "sessionID", "action", "resources"],
  27816. "additionalProperties": false
  27817. },
  27818. "PermissionSavedInfo": {
  27819. "type": "object",
  27820. "properties": {
  27821. "id": {
  27822. "type": "string"
  27823. },
  27824. "projectID": {
  27825. "type": "string"
  27826. },
  27827. "action": {
  27828. "type": "string"
  27829. },
  27830. "resource": {
  27831. "type": "string"
  27832. }
  27833. },
  27834. "required": ["id", "projectID", "action", "resource"],
  27835. "additionalProperties": false
  27836. },
  27837. "FileSystemEntry": {
  27838. "type": "object",
  27839. "properties": {
  27840. "path": {
  27841. "type": "string"
  27842. },
  27843. "type": {
  27844. "type": "string",
  27845. "enum": ["file", "directory"]
  27846. },
  27847. "mime": {
  27848. "type": "string"
  27849. }
  27850. },
  27851. "required": ["path", "type", "mime"],
  27852. "additionalProperties": false
  27853. },
  27854. "CommandV2Info": {
  27855. "type": "object",
  27856. "properties": {
  27857. "name": {
  27858. "type": "string"
  27859. },
  27860. "template": {
  27861. "type": "string"
  27862. },
  27863. "description": {
  27864. "type": "string"
  27865. },
  27866. "agent": {
  27867. "type": "string"
  27868. },
  27869. "model": {
  27870. "type": "object",
  27871. "properties": {
  27872. "id": {
  27873. "type": "string"
  27874. },
  27875. "providerID": {
  27876. "type": "string"
  27877. },
  27878. "variant": {
  27879. "type": "string"
  27880. }
  27881. },
  27882. "required": ["id", "providerID"],
  27883. "additionalProperties": false
  27884. },
  27885. "subtask": {
  27886. "type": "boolean"
  27887. }
  27888. },
  27889. "required": ["name", "template"],
  27890. "additionalProperties": false
  27891. },
  27892. "SkillV2Info": {
  27893. "type": "object",
  27894. "properties": {
  27895. "name": {
  27896. "type": "string"
  27897. },
  27898. "description": {
  27899. "type": "string"
  27900. },
  27901. "slash": {
  27902. "type": "boolean"
  27903. },
  27904. "location": {
  27905. "type": "string"
  27906. },
  27907. "content": {
  27908. "type": "string"
  27909. }
  27910. },
  27911. "required": ["name", "location", "content"],
  27912. "additionalProperties": false
  27913. },
  27914. "V2EventModels-devRefreshed": {
  27915. "type": "object",
  27916. "properties": {
  27917. "id": {
  27918. "type": "string",
  27919. "pattern": "^evt_"
  27920. },
  27921. "metadata": {
  27922. "type": "object"
  27923. },
  27924. "durable": {
  27925. "type": "object",
  27926. "properties": {
  27927. "aggregateID": {
  27928. "type": "string"
  27929. },
  27930. "seq": {
  27931. "type": "integer"
  27932. },
  27933. "version": {
  27934. "type": "integer"
  27935. }
  27936. },
  27937. "required": ["aggregateID", "seq", "version"],
  27938. "additionalProperties": false
  27939. },
  27940. "location": {
  27941. "$ref": "#/components/schemas/LocationRef"
  27942. },
  27943. "type": {
  27944. "type": "string",
  27945. "enum": ["models-dev.refreshed"]
  27946. },
  27947. "data": {
  27948. "type": "object",
  27949. "properties": {}
  27950. }
  27951. },
  27952. "required": ["id", "type", "data"],
  27953. "additionalProperties": false
  27954. },
  27955. "V2EventIntegrationUpdated": {
  27956. "type": "object",
  27957. "properties": {
  27958. "id": {
  27959. "type": "string",
  27960. "pattern": "^evt_"
  27961. },
  27962. "metadata": {
  27963. "type": "object"
  27964. },
  27965. "durable": {
  27966. "type": "object",
  27967. "properties": {
  27968. "aggregateID": {
  27969. "type": "string"
  27970. },
  27971. "seq": {
  27972. "type": "integer"
  27973. },
  27974. "version": {
  27975. "type": "integer"
  27976. }
  27977. },
  27978. "required": ["aggregateID", "seq", "version"],
  27979. "additionalProperties": false
  27980. },
  27981. "location": {
  27982. "$ref": "#/components/schemas/LocationRef"
  27983. },
  27984. "type": {
  27985. "type": "string",
  27986. "enum": ["integration.updated"]
  27987. },
  27988. "data": {
  27989. "type": "object",
  27990. "properties": {}
  27991. }
  27992. },
  27993. "required": ["id", "type", "data"],
  27994. "additionalProperties": false
  27995. },
  27996. "V2EventCatalogUpdated": {
  27997. "type": "object",
  27998. "properties": {
  27999. "id": {
  28000. "type": "string",
  28001. "pattern": "^evt_"
  28002. },
  28003. "metadata": {
  28004. "type": "object"
  28005. },
  28006. "durable": {
  28007. "type": "object",
  28008. "properties": {
  28009. "aggregateID": {
  28010. "type": "string"
  28011. },
  28012. "seq": {
  28013. "type": "integer"
  28014. },
  28015. "version": {
  28016. "type": "integer"
  28017. }
  28018. },
  28019. "required": ["aggregateID", "seq", "version"],
  28020. "additionalProperties": false
  28021. },
  28022. "location": {
  28023. "$ref": "#/components/schemas/LocationRef"
  28024. },
  28025. "type": {
  28026. "type": "string",
  28027. "enum": ["catalog.updated"]
  28028. },
  28029. "data": {
  28030. "type": "object",
  28031. "properties": {}
  28032. }
  28033. },
  28034. "required": ["id", "type", "data"],
  28035. "additionalProperties": false
  28036. },
  28037. "V2EventSessionCreated": {
  28038. "type": "object",
  28039. "properties": {
  28040. "id": {
  28041. "type": "string",
  28042. "pattern": "^evt_"
  28043. },
  28044. "metadata": {
  28045. "type": "object"
  28046. },
  28047. "durable": {
  28048. "type": "object",
  28049. "properties": {
  28050. "aggregateID": {
  28051. "type": "string"
  28052. },
  28053. "seq": {
  28054. "type": "integer"
  28055. },
  28056. "version": {
  28057. "type": "integer"
  28058. }
  28059. },
  28060. "required": ["aggregateID", "seq", "version"],
  28061. "additionalProperties": false
  28062. },
  28063. "location": {
  28064. "$ref": "#/components/schemas/LocationRef"
  28065. },
  28066. "type": {
  28067. "type": "string",
  28068. "enum": ["session.created"]
  28069. },
  28070. "data": {
  28071. "type": "object",
  28072. "properties": {
  28073. "sessionID": {
  28074. "type": "string",
  28075. "pattern": "^ses"
  28076. },
  28077. "info": {
  28078. "$ref": "#/components/schemas/Session"
  28079. }
  28080. },
  28081. "required": ["sessionID", "info"],
  28082. "additionalProperties": false
  28083. }
  28084. },
  28085. "required": ["id", "type", "data"],
  28086. "additionalProperties": false
  28087. },
  28088. "V2EventSessionUpdated": {
  28089. "type": "object",
  28090. "properties": {
  28091. "id": {
  28092. "type": "string",
  28093. "pattern": "^evt_"
  28094. },
  28095. "metadata": {
  28096. "type": "object"
  28097. },
  28098. "durable": {
  28099. "type": "object",
  28100. "properties": {
  28101. "aggregateID": {
  28102. "type": "string"
  28103. },
  28104. "seq": {
  28105. "type": "integer"
  28106. },
  28107. "version": {
  28108. "type": "integer"
  28109. }
  28110. },
  28111. "required": ["aggregateID", "seq", "version"],
  28112. "additionalProperties": false
  28113. },
  28114. "location": {
  28115. "$ref": "#/components/schemas/LocationRef"
  28116. },
  28117. "type": {
  28118. "type": "string",
  28119. "enum": ["session.updated"]
  28120. },
  28121. "data": {
  28122. "type": "object",
  28123. "properties": {
  28124. "sessionID": {
  28125. "type": "string",
  28126. "pattern": "^ses"
  28127. },
  28128. "info": {
  28129. "$ref": "#/components/schemas/Session"
  28130. }
  28131. },
  28132. "required": ["sessionID", "info"],
  28133. "additionalProperties": false
  28134. }
  28135. },
  28136. "required": ["id", "type", "data"],
  28137. "additionalProperties": false
  28138. },
  28139. "V2EventSessionDeleted": {
  28140. "type": "object",
  28141. "properties": {
  28142. "id": {
  28143. "type": "string",
  28144. "pattern": "^evt_"
  28145. },
  28146. "metadata": {
  28147. "type": "object"
  28148. },
  28149. "durable": {
  28150. "type": "object",
  28151. "properties": {
  28152. "aggregateID": {
  28153. "type": "string"
  28154. },
  28155. "seq": {
  28156. "type": "integer"
  28157. },
  28158. "version": {
  28159. "type": "integer"
  28160. }
  28161. },
  28162. "required": ["aggregateID", "seq", "version"],
  28163. "additionalProperties": false
  28164. },
  28165. "location": {
  28166. "$ref": "#/components/schemas/LocationRef"
  28167. },
  28168. "type": {
  28169. "type": "string",
  28170. "enum": ["session.deleted"]
  28171. },
  28172. "data": {
  28173. "type": "object",
  28174. "properties": {
  28175. "sessionID": {
  28176. "type": "string",
  28177. "pattern": "^ses"
  28178. },
  28179. "info": {
  28180. "$ref": "#/components/schemas/Session"
  28181. }
  28182. },
  28183. "required": ["sessionID", "info"],
  28184. "additionalProperties": false
  28185. }
  28186. },
  28187. "required": ["id", "type", "data"],
  28188. "additionalProperties": false
  28189. },
  28190. "V2EventMessageUpdated": {
  28191. "type": "object",
  28192. "properties": {
  28193. "id": {
  28194. "type": "string",
  28195. "pattern": "^evt_"
  28196. },
  28197. "metadata": {
  28198. "type": "object"
  28199. },
  28200. "durable": {
  28201. "type": "object",
  28202. "properties": {
  28203. "aggregateID": {
  28204. "type": "string"
  28205. },
  28206. "seq": {
  28207. "type": "integer"
  28208. },
  28209. "version": {
  28210. "type": "integer"
  28211. }
  28212. },
  28213. "required": ["aggregateID", "seq", "version"],
  28214. "additionalProperties": false
  28215. },
  28216. "location": {
  28217. "$ref": "#/components/schemas/LocationRef"
  28218. },
  28219. "type": {
  28220. "type": "string",
  28221. "enum": ["message.updated"]
  28222. },
  28223. "data": {
  28224. "type": "object",
  28225. "properties": {
  28226. "sessionID": {
  28227. "type": "string",
  28228. "pattern": "^ses"
  28229. },
  28230. "info": {
  28231. "$ref": "#/components/schemas/Message"
  28232. }
  28233. },
  28234. "required": ["sessionID", "info"],
  28235. "additionalProperties": false
  28236. }
  28237. },
  28238. "required": ["id", "type", "data"],
  28239. "additionalProperties": false
  28240. },
  28241. "V2EventMessageRemoved": {
  28242. "type": "object",
  28243. "properties": {
  28244. "id": {
  28245. "type": "string",
  28246. "pattern": "^evt_"
  28247. },
  28248. "metadata": {
  28249. "type": "object"
  28250. },
  28251. "durable": {
  28252. "type": "object",
  28253. "properties": {
  28254. "aggregateID": {
  28255. "type": "string"
  28256. },
  28257. "seq": {
  28258. "type": "integer"
  28259. },
  28260. "version": {
  28261. "type": "integer"
  28262. }
  28263. },
  28264. "required": ["aggregateID", "seq", "version"],
  28265. "additionalProperties": false
  28266. },
  28267. "location": {
  28268. "$ref": "#/components/schemas/LocationRef"
  28269. },
  28270. "type": {
  28271. "type": "string",
  28272. "enum": ["message.removed"]
  28273. },
  28274. "data": {
  28275. "type": "object",
  28276. "properties": {
  28277. "sessionID": {
  28278. "type": "string",
  28279. "pattern": "^ses"
  28280. },
  28281. "messageID": {
  28282. "type": "string",
  28283. "pattern": "^msg"
  28284. }
  28285. },
  28286. "required": ["sessionID", "messageID"],
  28287. "additionalProperties": false
  28288. }
  28289. },
  28290. "required": ["id", "type", "data"],
  28291. "additionalProperties": false
  28292. },
  28293. "V2EventMessagePartUpdated": {
  28294. "type": "object",
  28295. "properties": {
  28296. "id": {
  28297. "type": "string",
  28298. "pattern": "^evt_"
  28299. },
  28300. "metadata": {
  28301. "type": "object"
  28302. },
  28303. "durable": {
  28304. "type": "object",
  28305. "properties": {
  28306. "aggregateID": {
  28307. "type": "string"
  28308. },
  28309. "seq": {
  28310. "type": "integer"
  28311. },
  28312. "version": {
  28313. "type": "integer"
  28314. }
  28315. },
  28316. "required": ["aggregateID", "seq", "version"],
  28317. "additionalProperties": false
  28318. },
  28319. "location": {
  28320. "$ref": "#/components/schemas/LocationRef"
  28321. },
  28322. "type": {
  28323. "type": "string",
  28324. "enum": ["message.part.updated"]
  28325. },
  28326. "data": {
  28327. "type": "object",
  28328. "properties": {
  28329. "sessionID": {
  28330. "type": "string",
  28331. "pattern": "^ses"
  28332. },
  28333. "part": {
  28334. "$ref": "#/components/schemas/Part"
  28335. },
  28336. "time": {
  28337. "type": "number"
  28338. }
  28339. },
  28340. "required": ["sessionID", "part", "time"],
  28341. "additionalProperties": false
  28342. }
  28343. },
  28344. "required": ["id", "type", "data"],
  28345. "additionalProperties": false
  28346. },
  28347. "V2EventMessagePartRemoved": {
  28348. "type": "object",
  28349. "properties": {
  28350. "id": {
  28351. "type": "string",
  28352. "pattern": "^evt_"
  28353. },
  28354. "metadata": {
  28355. "type": "object"
  28356. },
  28357. "durable": {
  28358. "type": "object",
  28359. "properties": {
  28360. "aggregateID": {
  28361. "type": "string"
  28362. },
  28363. "seq": {
  28364. "type": "integer"
  28365. },
  28366. "version": {
  28367. "type": "integer"
  28368. }
  28369. },
  28370. "required": ["aggregateID", "seq", "version"],
  28371. "additionalProperties": false
  28372. },
  28373. "location": {
  28374. "$ref": "#/components/schemas/LocationRef"
  28375. },
  28376. "type": {
  28377. "type": "string",
  28378. "enum": ["message.part.removed"]
  28379. },
  28380. "data": {
  28381. "type": "object",
  28382. "properties": {
  28383. "sessionID": {
  28384. "type": "string",
  28385. "pattern": "^ses"
  28386. },
  28387. "messageID": {
  28388. "type": "string",
  28389. "pattern": "^msg"
  28390. },
  28391. "partID": {
  28392. "type": "string",
  28393. "pattern": "^prt"
  28394. }
  28395. },
  28396. "required": ["sessionID", "messageID", "partID"],
  28397. "additionalProperties": false
  28398. }
  28399. },
  28400. "required": ["id", "type", "data"],
  28401. "additionalProperties": false
  28402. },
  28403. "V2EventSessionNextAgentSwitched": {
  28404. "type": "object",
  28405. "properties": {
  28406. "id": {
  28407. "type": "string",
  28408. "pattern": "^evt_"
  28409. },
  28410. "metadata": {
  28411. "type": "object"
  28412. },
  28413. "durable": {
  28414. "type": "object",
  28415. "properties": {
  28416. "aggregateID": {
  28417. "type": "string"
  28418. },
  28419. "seq": {
  28420. "type": "integer"
  28421. },
  28422. "version": {
  28423. "type": "integer"
  28424. }
  28425. },
  28426. "required": ["aggregateID", "seq", "version"],
  28427. "additionalProperties": false
  28428. },
  28429. "location": {
  28430. "$ref": "#/components/schemas/LocationRef"
  28431. },
  28432. "type": {
  28433. "type": "string",
  28434. "enum": ["session.next.agent.switched"]
  28435. },
  28436. "data": {
  28437. "type": "object",
  28438. "properties": {
  28439. "timestamp": {
  28440. "type": "number"
  28441. },
  28442. "sessionID": {
  28443. "type": "string",
  28444. "pattern": "^ses"
  28445. },
  28446. "messageID": {
  28447. "type": "string",
  28448. "pattern": "^msg_"
  28449. },
  28450. "agent": {
  28451. "type": "string"
  28452. }
  28453. },
  28454. "required": ["timestamp", "sessionID", "messageID", "agent"],
  28455. "additionalProperties": false
  28456. }
  28457. },
  28458. "required": ["id", "type", "data"],
  28459. "additionalProperties": false
  28460. },
  28461. "V2EventSessionNextModelSwitched": {
  28462. "type": "object",
  28463. "properties": {
  28464. "id": {
  28465. "type": "string",
  28466. "pattern": "^evt_"
  28467. },
  28468. "metadata": {
  28469. "type": "object"
  28470. },
  28471. "durable": {
  28472. "type": "object",
  28473. "properties": {
  28474. "aggregateID": {
  28475. "type": "string"
  28476. },
  28477. "seq": {
  28478. "type": "integer"
  28479. },
  28480. "version": {
  28481. "type": "integer"
  28482. }
  28483. },
  28484. "required": ["aggregateID", "seq", "version"],
  28485. "additionalProperties": false
  28486. },
  28487. "location": {
  28488. "$ref": "#/components/schemas/LocationRef"
  28489. },
  28490. "type": {
  28491. "type": "string",
  28492. "enum": ["session.next.model.switched"]
  28493. },
  28494. "data": {
  28495. "type": "object",
  28496. "properties": {
  28497. "timestamp": {
  28498. "type": "number"
  28499. },
  28500. "sessionID": {
  28501. "type": "string",
  28502. "pattern": "^ses"
  28503. },
  28504. "messageID": {
  28505. "type": "string",
  28506. "pattern": "^msg_"
  28507. },
  28508. "model": {
  28509. "type": "object",
  28510. "properties": {
  28511. "id": {
  28512. "type": "string"
  28513. },
  28514. "providerID": {
  28515. "type": "string"
  28516. },
  28517. "variant": {
  28518. "type": "string"
  28519. }
  28520. },
  28521. "required": ["id", "providerID"],
  28522. "additionalProperties": false
  28523. }
  28524. },
  28525. "required": ["timestamp", "sessionID", "messageID", "model"],
  28526. "additionalProperties": false
  28527. }
  28528. },
  28529. "required": ["id", "type", "data"],
  28530. "additionalProperties": false
  28531. },
  28532. "V2EventSessionNextMoved": {
  28533. "type": "object",
  28534. "properties": {
  28535. "id": {
  28536. "type": "string",
  28537. "pattern": "^evt_"
  28538. },
  28539. "metadata": {
  28540. "type": "object"
  28541. },
  28542. "durable": {
  28543. "type": "object",
  28544. "properties": {
  28545. "aggregateID": {
  28546. "type": "string"
  28547. },
  28548. "seq": {
  28549. "type": "integer"
  28550. },
  28551. "version": {
  28552. "type": "integer"
  28553. }
  28554. },
  28555. "required": ["aggregateID", "seq", "version"],
  28556. "additionalProperties": false
  28557. },
  28558. "location": {
  28559. "$ref": "#/components/schemas/LocationRef"
  28560. },
  28561. "type": {
  28562. "type": "string",
  28563. "enum": ["session.next.moved"]
  28564. },
  28565. "data": {
  28566. "type": "object",
  28567. "properties": {
  28568. "timestamp": {
  28569. "type": "number"
  28570. },
  28571. "sessionID": {
  28572. "type": "string",
  28573. "pattern": "^ses"
  28574. },
  28575. "location": {
  28576. "$ref": "#/components/schemas/LocationRef"
  28577. },
  28578. "subdirectory": {
  28579. "type": "string"
  28580. }
  28581. },
  28582. "required": ["timestamp", "sessionID", "location"],
  28583. "additionalProperties": false
  28584. }
  28585. },
  28586. "required": ["id", "type", "data"],
  28587. "additionalProperties": false
  28588. },
  28589. "V2EventSessionNextPrompted": {
  28590. "type": "object",
  28591. "properties": {
  28592. "id": {
  28593. "type": "string",
  28594. "pattern": "^evt_"
  28595. },
  28596. "metadata": {
  28597. "type": "object"
  28598. },
  28599. "durable": {
  28600. "type": "object",
  28601. "properties": {
  28602. "aggregateID": {
  28603. "type": "string"
  28604. },
  28605. "seq": {
  28606. "type": "integer"
  28607. },
  28608. "version": {
  28609. "type": "integer"
  28610. }
  28611. },
  28612. "required": ["aggregateID", "seq", "version"],
  28613. "additionalProperties": false
  28614. },
  28615. "location": {
  28616. "$ref": "#/components/schemas/LocationRef"
  28617. },
  28618. "type": {
  28619. "type": "string",
  28620. "enum": ["session.next.prompted"]
  28621. },
  28622. "data": {
  28623. "type": "object",
  28624. "properties": {
  28625. "timestamp": {
  28626. "type": "number"
  28627. },
  28628. "sessionID": {
  28629. "type": "string",
  28630. "pattern": "^ses"
  28631. },
  28632. "messageID": {
  28633. "type": "string",
  28634. "pattern": "^msg_"
  28635. },
  28636. "prompt": {
  28637. "$ref": "#/components/schemas/Prompt"
  28638. },
  28639. "delivery": {
  28640. "type": "string",
  28641. "enum": ["steer", "queue"]
  28642. }
  28643. },
  28644. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  28645. "additionalProperties": false
  28646. }
  28647. },
  28648. "required": ["id", "type", "data"],
  28649. "additionalProperties": false
  28650. },
  28651. "V2EventSessionNextPromptAdmitted": {
  28652. "type": "object",
  28653. "properties": {
  28654. "id": {
  28655. "type": "string",
  28656. "pattern": "^evt_"
  28657. },
  28658. "metadata": {
  28659. "type": "object"
  28660. },
  28661. "durable": {
  28662. "type": "object",
  28663. "properties": {
  28664. "aggregateID": {
  28665. "type": "string"
  28666. },
  28667. "seq": {
  28668. "type": "integer"
  28669. },
  28670. "version": {
  28671. "type": "integer"
  28672. }
  28673. },
  28674. "required": ["aggregateID", "seq", "version"],
  28675. "additionalProperties": false
  28676. },
  28677. "location": {
  28678. "$ref": "#/components/schemas/LocationRef"
  28679. },
  28680. "type": {
  28681. "type": "string",
  28682. "enum": ["session.next.prompt.admitted"]
  28683. },
  28684. "data": {
  28685. "type": "object",
  28686. "properties": {
  28687. "timestamp": {
  28688. "type": "number"
  28689. },
  28690. "sessionID": {
  28691. "type": "string",
  28692. "pattern": "^ses"
  28693. },
  28694. "messageID": {
  28695. "type": "string",
  28696. "pattern": "^msg_"
  28697. },
  28698. "prompt": {
  28699. "$ref": "#/components/schemas/Prompt"
  28700. },
  28701. "delivery": {
  28702. "type": "string",
  28703. "enum": ["steer", "queue"]
  28704. }
  28705. },
  28706. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  28707. "additionalProperties": false
  28708. }
  28709. },
  28710. "required": ["id", "type", "data"],
  28711. "additionalProperties": false
  28712. },
  28713. "V2EventSessionNextPromptPromoted": {
  28714. "type": "object",
  28715. "properties": {
  28716. "id": {
  28717. "type": "string",
  28718. "pattern": "^evt_"
  28719. },
  28720. "metadata": {
  28721. "type": "object"
  28722. },
  28723. "durable": {
  28724. "type": "object",
  28725. "properties": {
  28726. "aggregateID": {
  28727. "type": "string"
  28728. },
  28729. "seq": {
  28730. "type": "integer"
  28731. },
  28732. "version": {
  28733. "type": "integer"
  28734. }
  28735. },
  28736. "required": ["aggregateID", "seq", "version"],
  28737. "additionalProperties": false
  28738. },
  28739. "location": {
  28740. "$ref": "#/components/schemas/LocationRef"
  28741. },
  28742. "type": {
  28743. "type": "string",
  28744. "enum": ["session.next.prompt.promoted"]
  28745. },
  28746. "data": {
  28747. "type": "object",
  28748. "properties": {
  28749. "timestamp": {
  28750. "type": "number"
  28751. },
  28752. "sessionID": {
  28753. "type": "string",
  28754. "pattern": "^ses"
  28755. },
  28756. "messageID": {
  28757. "type": "string",
  28758. "pattern": "^msg_"
  28759. },
  28760. "prompt": {
  28761. "$ref": "#/components/schemas/Prompt"
  28762. },
  28763. "timeCreated": {
  28764. "type": "number"
  28765. }
  28766. },
  28767. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  28768. "additionalProperties": false
  28769. }
  28770. },
  28771. "required": ["id", "type", "data"],
  28772. "additionalProperties": false
  28773. },
  28774. "V2EventSessionNextInterruptRequested": {
  28775. "type": "object",
  28776. "properties": {
  28777. "id": {
  28778. "type": "string",
  28779. "pattern": "^evt_"
  28780. },
  28781. "metadata": {
  28782. "type": "object"
  28783. },
  28784. "durable": {
  28785. "type": "object",
  28786. "properties": {
  28787. "aggregateID": {
  28788. "type": "string"
  28789. },
  28790. "seq": {
  28791. "type": "integer"
  28792. },
  28793. "version": {
  28794. "type": "integer"
  28795. }
  28796. },
  28797. "required": ["aggregateID", "seq", "version"],
  28798. "additionalProperties": false
  28799. },
  28800. "location": {
  28801. "$ref": "#/components/schemas/LocationRef"
  28802. },
  28803. "type": {
  28804. "type": "string",
  28805. "enum": ["session.next.interrupt.requested"]
  28806. },
  28807. "data": {
  28808. "type": "object",
  28809. "properties": {
  28810. "timestamp": {
  28811. "type": "number"
  28812. },
  28813. "sessionID": {
  28814. "type": "string",
  28815. "pattern": "^ses"
  28816. }
  28817. },
  28818. "required": ["timestamp", "sessionID"],
  28819. "additionalProperties": false
  28820. }
  28821. },
  28822. "required": ["id", "type", "data"],
  28823. "additionalProperties": false
  28824. },
  28825. "V2EventSessionNextContextUpdated": {
  28826. "type": "object",
  28827. "properties": {
  28828. "id": {
  28829. "type": "string",
  28830. "pattern": "^evt_"
  28831. },
  28832. "metadata": {
  28833. "type": "object"
  28834. },
  28835. "durable": {
  28836. "type": "object",
  28837. "properties": {
  28838. "aggregateID": {
  28839. "type": "string"
  28840. },
  28841. "seq": {
  28842. "type": "integer"
  28843. },
  28844. "version": {
  28845. "type": "integer"
  28846. }
  28847. },
  28848. "required": ["aggregateID", "seq", "version"],
  28849. "additionalProperties": false
  28850. },
  28851. "location": {
  28852. "$ref": "#/components/schemas/LocationRef"
  28853. },
  28854. "type": {
  28855. "type": "string",
  28856. "enum": ["session.next.context.updated"]
  28857. },
  28858. "data": {
  28859. "type": "object",
  28860. "properties": {
  28861. "timestamp": {
  28862. "type": "number"
  28863. },
  28864. "sessionID": {
  28865. "type": "string",
  28866. "pattern": "^ses"
  28867. },
  28868. "messageID": {
  28869. "type": "string",
  28870. "pattern": "^msg_"
  28871. },
  28872. "text": {
  28873. "type": "string"
  28874. }
  28875. },
  28876. "required": ["timestamp", "sessionID", "messageID", "text"],
  28877. "additionalProperties": false
  28878. }
  28879. },
  28880. "required": ["id", "type", "data"],
  28881. "additionalProperties": false
  28882. },
  28883. "V2EventSessionNextSynthetic": {
  28884. "type": "object",
  28885. "properties": {
  28886. "id": {
  28887. "type": "string",
  28888. "pattern": "^evt_"
  28889. },
  28890. "metadata": {
  28891. "type": "object"
  28892. },
  28893. "durable": {
  28894. "type": "object",
  28895. "properties": {
  28896. "aggregateID": {
  28897. "type": "string"
  28898. },
  28899. "seq": {
  28900. "type": "integer"
  28901. },
  28902. "version": {
  28903. "type": "integer"
  28904. }
  28905. },
  28906. "required": ["aggregateID", "seq", "version"],
  28907. "additionalProperties": false
  28908. },
  28909. "location": {
  28910. "$ref": "#/components/schemas/LocationRef"
  28911. },
  28912. "type": {
  28913. "type": "string",
  28914. "enum": ["session.next.synthetic"]
  28915. },
  28916. "data": {
  28917. "type": "object",
  28918. "properties": {
  28919. "timestamp": {
  28920. "type": "number"
  28921. },
  28922. "sessionID": {
  28923. "type": "string",
  28924. "pattern": "^ses"
  28925. },
  28926. "messageID": {
  28927. "type": "string",
  28928. "pattern": "^msg_"
  28929. },
  28930. "text": {
  28931. "type": "string"
  28932. }
  28933. },
  28934. "required": ["timestamp", "sessionID", "messageID", "text"],
  28935. "additionalProperties": false
  28936. }
  28937. },
  28938. "required": ["id", "type", "data"],
  28939. "additionalProperties": false
  28940. },
  28941. "V2EventSessionNextShellStarted": {
  28942. "type": "object",
  28943. "properties": {
  28944. "id": {
  28945. "type": "string",
  28946. "pattern": "^evt_"
  28947. },
  28948. "metadata": {
  28949. "type": "object"
  28950. },
  28951. "durable": {
  28952. "type": "object",
  28953. "properties": {
  28954. "aggregateID": {
  28955. "type": "string"
  28956. },
  28957. "seq": {
  28958. "type": "integer"
  28959. },
  28960. "version": {
  28961. "type": "integer"
  28962. }
  28963. },
  28964. "required": ["aggregateID", "seq", "version"],
  28965. "additionalProperties": false
  28966. },
  28967. "location": {
  28968. "$ref": "#/components/schemas/LocationRef"
  28969. },
  28970. "type": {
  28971. "type": "string",
  28972. "enum": ["session.next.shell.started"]
  28973. },
  28974. "data": {
  28975. "type": "object",
  28976. "properties": {
  28977. "timestamp": {
  28978. "type": "number"
  28979. },
  28980. "sessionID": {
  28981. "type": "string",
  28982. "pattern": "^ses"
  28983. },
  28984. "messageID": {
  28985. "type": "string",
  28986. "pattern": "^msg_"
  28987. },
  28988. "callID": {
  28989. "type": "string"
  28990. },
  28991. "command": {
  28992. "type": "string"
  28993. }
  28994. },
  28995. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  28996. "additionalProperties": false
  28997. }
  28998. },
  28999. "required": ["id", "type", "data"],
  29000. "additionalProperties": false
  29001. },
  29002. "V2EventSessionNextShellEnded": {
  29003. "type": "object",
  29004. "properties": {
  29005. "id": {
  29006. "type": "string",
  29007. "pattern": "^evt_"
  29008. },
  29009. "metadata": {
  29010. "type": "object"
  29011. },
  29012. "durable": {
  29013. "type": "object",
  29014. "properties": {
  29015. "aggregateID": {
  29016. "type": "string"
  29017. },
  29018. "seq": {
  29019. "type": "integer"
  29020. },
  29021. "version": {
  29022. "type": "integer"
  29023. }
  29024. },
  29025. "required": ["aggregateID", "seq", "version"],
  29026. "additionalProperties": false
  29027. },
  29028. "location": {
  29029. "$ref": "#/components/schemas/LocationRef"
  29030. },
  29031. "type": {
  29032. "type": "string",
  29033. "enum": ["session.next.shell.ended"]
  29034. },
  29035. "data": {
  29036. "type": "object",
  29037. "properties": {
  29038. "timestamp": {
  29039. "type": "number"
  29040. },
  29041. "sessionID": {
  29042. "type": "string",
  29043. "pattern": "^ses"
  29044. },
  29045. "callID": {
  29046. "type": "string"
  29047. },
  29048. "output": {
  29049. "type": "string"
  29050. }
  29051. },
  29052. "required": ["timestamp", "sessionID", "callID", "output"],
  29053. "additionalProperties": false
  29054. }
  29055. },
  29056. "required": ["id", "type", "data"],
  29057. "additionalProperties": false
  29058. },
  29059. "V2EventSessionNextStepStarted": {
  29060. "type": "object",
  29061. "properties": {
  29062. "id": {
  29063. "type": "string",
  29064. "pattern": "^evt_"
  29065. },
  29066. "metadata": {
  29067. "type": "object"
  29068. },
  29069. "durable": {
  29070. "type": "object",
  29071. "properties": {
  29072. "aggregateID": {
  29073. "type": "string"
  29074. },
  29075. "seq": {
  29076. "type": "integer"
  29077. },
  29078. "version": {
  29079. "type": "integer"
  29080. }
  29081. },
  29082. "required": ["aggregateID", "seq", "version"],
  29083. "additionalProperties": false
  29084. },
  29085. "location": {
  29086. "$ref": "#/components/schemas/LocationRef"
  29087. },
  29088. "type": {
  29089. "type": "string",
  29090. "enum": ["session.next.step.started"]
  29091. },
  29092. "data": {
  29093. "type": "object",
  29094. "properties": {
  29095. "timestamp": {
  29096. "type": "number"
  29097. },
  29098. "sessionID": {
  29099. "type": "string",
  29100. "pattern": "^ses"
  29101. },
  29102. "assistantMessageID": {
  29103. "type": "string",
  29104. "pattern": "^msg_"
  29105. },
  29106. "agent": {
  29107. "type": "string"
  29108. },
  29109. "model": {
  29110. "type": "object",
  29111. "properties": {
  29112. "id": {
  29113. "type": "string"
  29114. },
  29115. "providerID": {
  29116. "type": "string"
  29117. },
  29118. "variant": {
  29119. "type": "string"
  29120. }
  29121. },
  29122. "required": ["id", "providerID"],
  29123. "additionalProperties": false
  29124. },
  29125. "snapshot": {
  29126. "type": "string"
  29127. }
  29128. },
  29129. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  29130. "additionalProperties": false
  29131. }
  29132. },
  29133. "required": ["id", "type", "data"],
  29134. "additionalProperties": false
  29135. },
  29136. "V2EventSessionNextStepEnded": {
  29137. "type": "object",
  29138. "properties": {
  29139. "id": {
  29140. "type": "string",
  29141. "pattern": "^evt_"
  29142. },
  29143. "metadata": {
  29144. "type": "object"
  29145. },
  29146. "durable": {
  29147. "type": "object",
  29148. "properties": {
  29149. "aggregateID": {
  29150. "type": "string"
  29151. },
  29152. "seq": {
  29153. "type": "integer"
  29154. },
  29155. "version": {
  29156. "type": "integer"
  29157. }
  29158. },
  29159. "required": ["aggregateID", "seq", "version"],
  29160. "additionalProperties": false
  29161. },
  29162. "location": {
  29163. "$ref": "#/components/schemas/LocationRef"
  29164. },
  29165. "type": {
  29166. "type": "string",
  29167. "enum": ["session.next.step.ended"]
  29168. },
  29169. "data": {
  29170. "type": "object",
  29171. "properties": {
  29172. "timestamp": {
  29173. "type": "number"
  29174. },
  29175. "sessionID": {
  29176. "type": "string",
  29177. "pattern": "^ses"
  29178. },
  29179. "assistantMessageID": {
  29180. "type": "string",
  29181. "pattern": "^msg_"
  29182. },
  29183. "finish": {
  29184. "type": "string"
  29185. },
  29186. "cost": {
  29187. "type": "number"
  29188. },
  29189. "tokens": {
  29190. "type": "object",
  29191. "properties": {
  29192. "input": {
  29193. "type": "number"
  29194. },
  29195. "output": {
  29196. "type": "number"
  29197. },
  29198. "reasoning": {
  29199. "type": "number"
  29200. },
  29201. "cache": {
  29202. "type": "object",
  29203. "properties": {
  29204. "read": {
  29205. "type": "number"
  29206. },
  29207. "write": {
  29208. "type": "number"
  29209. }
  29210. },
  29211. "required": ["read", "write"],
  29212. "additionalProperties": false
  29213. }
  29214. },
  29215. "required": ["input", "output", "reasoning", "cache"],
  29216. "additionalProperties": false
  29217. },
  29218. "snapshot": {
  29219. "type": "string"
  29220. }
  29221. },
  29222. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  29223. "additionalProperties": false
  29224. }
  29225. },
  29226. "required": ["id", "type", "data"],
  29227. "additionalProperties": false
  29228. },
  29229. "V2EventSessionNextStepFailed": {
  29230. "type": "object",
  29231. "properties": {
  29232. "id": {
  29233. "type": "string",
  29234. "pattern": "^evt_"
  29235. },
  29236. "metadata": {
  29237. "type": "object"
  29238. },
  29239. "durable": {
  29240. "type": "object",
  29241. "properties": {
  29242. "aggregateID": {
  29243. "type": "string"
  29244. },
  29245. "seq": {
  29246. "type": "integer"
  29247. },
  29248. "version": {
  29249. "type": "integer"
  29250. }
  29251. },
  29252. "required": ["aggregateID", "seq", "version"],
  29253. "additionalProperties": false
  29254. },
  29255. "location": {
  29256. "$ref": "#/components/schemas/LocationRef"
  29257. },
  29258. "type": {
  29259. "type": "string",
  29260. "enum": ["session.next.step.failed"]
  29261. },
  29262. "data": {
  29263. "type": "object",
  29264. "properties": {
  29265. "timestamp": {
  29266. "type": "number"
  29267. },
  29268. "sessionID": {
  29269. "type": "string",
  29270. "pattern": "^ses"
  29271. },
  29272. "assistantMessageID": {
  29273. "type": "string",
  29274. "pattern": "^msg_"
  29275. },
  29276. "error": {
  29277. "$ref": "#/components/schemas/SessionErrorUnknown"
  29278. }
  29279. },
  29280. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  29281. "additionalProperties": false
  29282. }
  29283. },
  29284. "required": ["id", "type", "data"],
  29285. "additionalProperties": false
  29286. },
  29287. "V2EventSessionNextTextStarted": {
  29288. "type": "object",
  29289. "properties": {
  29290. "id": {
  29291. "type": "string",
  29292. "pattern": "^evt_"
  29293. },
  29294. "metadata": {
  29295. "type": "object"
  29296. },
  29297. "durable": {
  29298. "type": "object",
  29299. "properties": {
  29300. "aggregateID": {
  29301. "type": "string"
  29302. },
  29303. "seq": {
  29304. "type": "integer"
  29305. },
  29306. "version": {
  29307. "type": "integer"
  29308. }
  29309. },
  29310. "required": ["aggregateID", "seq", "version"],
  29311. "additionalProperties": false
  29312. },
  29313. "location": {
  29314. "$ref": "#/components/schemas/LocationRef"
  29315. },
  29316. "type": {
  29317. "type": "string",
  29318. "enum": ["session.next.text.started"]
  29319. },
  29320. "data": {
  29321. "type": "object",
  29322. "properties": {
  29323. "timestamp": {
  29324. "type": "number"
  29325. },
  29326. "sessionID": {
  29327. "type": "string",
  29328. "pattern": "^ses"
  29329. },
  29330. "assistantMessageID": {
  29331. "type": "string",
  29332. "pattern": "^msg_"
  29333. },
  29334. "textID": {
  29335. "type": "string"
  29336. }
  29337. },
  29338. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  29339. "additionalProperties": false
  29340. }
  29341. },
  29342. "required": ["id", "type", "data"],
  29343. "additionalProperties": false
  29344. },
  29345. "V2EventSessionNextTextDelta": {
  29346. "type": "object",
  29347. "properties": {
  29348. "id": {
  29349. "type": "string",
  29350. "pattern": "^evt_"
  29351. },
  29352. "metadata": {
  29353. "type": "object"
  29354. },
  29355. "durable": {
  29356. "type": "object",
  29357. "properties": {
  29358. "aggregateID": {
  29359. "type": "string"
  29360. },
  29361. "seq": {
  29362. "type": "integer"
  29363. },
  29364. "version": {
  29365. "type": "integer"
  29366. }
  29367. },
  29368. "required": ["aggregateID", "seq", "version"],
  29369. "additionalProperties": false
  29370. },
  29371. "location": {
  29372. "$ref": "#/components/schemas/LocationRef"
  29373. },
  29374. "type": {
  29375. "type": "string",
  29376. "enum": ["session.next.text.delta"]
  29377. },
  29378. "data": {
  29379. "type": "object",
  29380. "properties": {
  29381. "timestamp": {
  29382. "type": "number"
  29383. },
  29384. "sessionID": {
  29385. "type": "string",
  29386. "pattern": "^ses"
  29387. },
  29388. "assistantMessageID": {
  29389. "type": "string",
  29390. "pattern": "^msg_"
  29391. },
  29392. "textID": {
  29393. "type": "string"
  29394. },
  29395. "delta": {
  29396. "type": "string"
  29397. }
  29398. },
  29399. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  29400. "additionalProperties": false
  29401. }
  29402. },
  29403. "required": ["id", "type", "data"],
  29404. "additionalProperties": false
  29405. },
  29406. "V2EventSessionNextTextEnded": {
  29407. "type": "object",
  29408. "properties": {
  29409. "id": {
  29410. "type": "string",
  29411. "pattern": "^evt_"
  29412. },
  29413. "metadata": {
  29414. "type": "object"
  29415. },
  29416. "durable": {
  29417. "type": "object",
  29418. "properties": {
  29419. "aggregateID": {
  29420. "type": "string"
  29421. },
  29422. "seq": {
  29423. "type": "integer"
  29424. },
  29425. "version": {
  29426. "type": "integer"
  29427. }
  29428. },
  29429. "required": ["aggregateID", "seq", "version"],
  29430. "additionalProperties": false
  29431. },
  29432. "location": {
  29433. "$ref": "#/components/schemas/LocationRef"
  29434. },
  29435. "type": {
  29436. "type": "string",
  29437. "enum": ["session.next.text.ended"]
  29438. },
  29439. "data": {
  29440. "type": "object",
  29441. "properties": {
  29442. "timestamp": {
  29443. "type": "number"
  29444. },
  29445. "sessionID": {
  29446. "type": "string",
  29447. "pattern": "^ses"
  29448. },
  29449. "assistantMessageID": {
  29450. "type": "string",
  29451. "pattern": "^msg_"
  29452. },
  29453. "textID": {
  29454. "type": "string"
  29455. },
  29456. "text": {
  29457. "type": "string"
  29458. }
  29459. },
  29460. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  29461. "additionalProperties": false
  29462. }
  29463. },
  29464. "required": ["id", "type", "data"],
  29465. "additionalProperties": false
  29466. },
  29467. "V2EventSessionNextReasoningStarted": {
  29468. "type": "object",
  29469. "properties": {
  29470. "id": {
  29471. "type": "string",
  29472. "pattern": "^evt_"
  29473. },
  29474. "metadata": {
  29475. "type": "object"
  29476. },
  29477. "durable": {
  29478. "type": "object",
  29479. "properties": {
  29480. "aggregateID": {
  29481. "type": "string"
  29482. },
  29483. "seq": {
  29484. "type": "integer"
  29485. },
  29486. "version": {
  29487. "type": "integer"
  29488. }
  29489. },
  29490. "required": ["aggregateID", "seq", "version"],
  29491. "additionalProperties": false
  29492. },
  29493. "location": {
  29494. "$ref": "#/components/schemas/LocationRef"
  29495. },
  29496. "type": {
  29497. "type": "string",
  29498. "enum": ["session.next.reasoning.started"]
  29499. },
  29500. "data": {
  29501. "type": "object",
  29502. "properties": {
  29503. "timestamp": {
  29504. "type": "number"
  29505. },
  29506. "sessionID": {
  29507. "type": "string",
  29508. "pattern": "^ses"
  29509. },
  29510. "assistantMessageID": {
  29511. "type": "string",
  29512. "pattern": "^msg_"
  29513. },
  29514. "reasoningID": {
  29515. "type": "string"
  29516. },
  29517. "providerMetadata": {
  29518. "type": "object",
  29519. "additionalProperties": {
  29520. "type": "object"
  29521. }
  29522. }
  29523. },
  29524. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  29525. "additionalProperties": false
  29526. }
  29527. },
  29528. "required": ["id", "type", "data"],
  29529. "additionalProperties": false
  29530. },
  29531. "V2EventSessionNextReasoningDelta": {
  29532. "type": "object",
  29533. "properties": {
  29534. "id": {
  29535. "type": "string",
  29536. "pattern": "^evt_"
  29537. },
  29538. "metadata": {
  29539. "type": "object"
  29540. },
  29541. "durable": {
  29542. "type": "object",
  29543. "properties": {
  29544. "aggregateID": {
  29545. "type": "string"
  29546. },
  29547. "seq": {
  29548. "type": "integer"
  29549. },
  29550. "version": {
  29551. "type": "integer"
  29552. }
  29553. },
  29554. "required": ["aggregateID", "seq", "version"],
  29555. "additionalProperties": false
  29556. },
  29557. "location": {
  29558. "$ref": "#/components/schemas/LocationRef"
  29559. },
  29560. "type": {
  29561. "type": "string",
  29562. "enum": ["session.next.reasoning.delta"]
  29563. },
  29564. "data": {
  29565. "type": "object",
  29566. "properties": {
  29567. "timestamp": {
  29568. "type": "number"
  29569. },
  29570. "sessionID": {
  29571. "type": "string",
  29572. "pattern": "^ses"
  29573. },
  29574. "assistantMessageID": {
  29575. "type": "string",
  29576. "pattern": "^msg_"
  29577. },
  29578. "reasoningID": {
  29579. "type": "string"
  29580. },
  29581. "delta": {
  29582. "type": "string"
  29583. }
  29584. },
  29585. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  29586. "additionalProperties": false
  29587. }
  29588. },
  29589. "required": ["id", "type", "data"],
  29590. "additionalProperties": false
  29591. },
  29592. "V2EventSessionNextReasoningEnded": {
  29593. "type": "object",
  29594. "properties": {
  29595. "id": {
  29596. "type": "string",
  29597. "pattern": "^evt_"
  29598. },
  29599. "metadata": {
  29600. "type": "object"
  29601. },
  29602. "durable": {
  29603. "type": "object",
  29604. "properties": {
  29605. "aggregateID": {
  29606. "type": "string"
  29607. },
  29608. "seq": {
  29609. "type": "integer"
  29610. },
  29611. "version": {
  29612. "type": "integer"
  29613. }
  29614. },
  29615. "required": ["aggregateID", "seq", "version"],
  29616. "additionalProperties": false
  29617. },
  29618. "location": {
  29619. "$ref": "#/components/schemas/LocationRef"
  29620. },
  29621. "type": {
  29622. "type": "string",
  29623. "enum": ["session.next.reasoning.ended"]
  29624. },
  29625. "data": {
  29626. "type": "object",
  29627. "properties": {
  29628. "timestamp": {
  29629. "type": "number"
  29630. },
  29631. "sessionID": {
  29632. "type": "string",
  29633. "pattern": "^ses"
  29634. },
  29635. "assistantMessageID": {
  29636. "type": "string",
  29637. "pattern": "^msg_"
  29638. },
  29639. "reasoningID": {
  29640. "type": "string"
  29641. },
  29642. "text": {
  29643. "type": "string"
  29644. },
  29645. "providerMetadata": {
  29646. "type": "object",
  29647. "additionalProperties": {
  29648. "type": "object"
  29649. }
  29650. }
  29651. },
  29652. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  29653. "additionalProperties": false
  29654. }
  29655. },
  29656. "required": ["id", "type", "data"],
  29657. "additionalProperties": false
  29658. },
  29659. "V2EventSessionNextToolInputStarted": {
  29660. "type": "object",
  29661. "properties": {
  29662. "id": {
  29663. "type": "string",
  29664. "pattern": "^evt_"
  29665. },
  29666. "metadata": {
  29667. "type": "object"
  29668. },
  29669. "durable": {
  29670. "type": "object",
  29671. "properties": {
  29672. "aggregateID": {
  29673. "type": "string"
  29674. },
  29675. "seq": {
  29676. "type": "integer"
  29677. },
  29678. "version": {
  29679. "type": "integer"
  29680. }
  29681. },
  29682. "required": ["aggregateID", "seq", "version"],
  29683. "additionalProperties": false
  29684. },
  29685. "location": {
  29686. "$ref": "#/components/schemas/LocationRef"
  29687. },
  29688. "type": {
  29689. "type": "string",
  29690. "enum": ["session.next.tool.input.started"]
  29691. },
  29692. "data": {
  29693. "type": "object",
  29694. "properties": {
  29695. "timestamp": {
  29696. "type": "number"
  29697. },
  29698. "sessionID": {
  29699. "type": "string",
  29700. "pattern": "^ses"
  29701. },
  29702. "assistantMessageID": {
  29703. "type": "string",
  29704. "pattern": "^msg_"
  29705. },
  29706. "callID": {
  29707. "type": "string"
  29708. },
  29709. "name": {
  29710. "type": "string"
  29711. }
  29712. },
  29713. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  29714. "additionalProperties": false
  29715. }
  29716. },
  29717. "required": ["id", "type", "data"],
  29718. "additionalProperties": false
  29719. },
  29720. "V2EventSessionNextToolInputDelta": {
  29721. "type": "object",
  29722. "properties": {
  29723. "id": {
  29724. "type": "string",
  29725. "pattern": "^evt_"
  29726. },
  29727. "metadata": {
  29728. "type": "object"
  29729. },
  29730. "durable": {
  29731. "type": "object",
  29732. "properties": {
  29733. "aggregateID": {
  29734. "type": "string"
  29735. },
  29736. "seq": {
  29737. "type": "integer"
  29738. },
  29739. "version": {
  29740. "type": "integer"
  29741. }
  29742. },
  29743. "required": ["aggregateID", "seq", "version"],
  29744. "additionalProperties": false
  29745. },
  29746. "location": {
  29747. "$ref": "#/components/schemas/LocationRef"
  29748. },
  29749. "type": {
  29750. "type": "string",
  29751. "enum": ["session.next.tool.input.delta"]
  29752. },
  29753. "data": {
  29754. "type": "object",
  29755. "properties": {
  29756. "timestamp": {
  29757. "type": "number"
  29758. },
  29759. "sessionID": {
  29760. "type": "string",
  29761. "pattern": "^ses"
  29762. },
  29763. "assistantMessageID": {
  29764. "type": "string",
  29765. "pattern": "^msg_"
  29766. },
  29767. "callID": {
  29768. "type": "string"
  29769. },
  29770. "delta": {
  29771. "type": "string"
  29772. }
  29773. },
  29774. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  29775. "additionalProperties": false
  29776. }
  29777. },
  29778. "required": ["id", "type", "data"],
  29779. "additionalProperties": false
  29780. },
  29781. "V2EventSessionNextToolInputEnded": {
  29782. "type": "object",
  29783. "properties": {
  29784. "id": {
  29785. "type": "string",
  29786. "pattern": "^evt_"
  29787. },
  29788. "metadata": {
  29789. "type": "object"
  29790. },
  29791. "durable": {
  29792. "type": "object",
  29793. "properties": {
  29794. "aggregateID": {
  29795. "type": "string"
  29796. },
  29797. "seq": {
  29798. "type": "integer"
  29799. },
  29800. "version": {
  29801. "type": "integer"
  29802. }
  29803. },
  29804. "required": ["aggregateID", "seq", "version"],
  29805. "additionalProperties": false
  29806. },
  29807. "location": {
  29808. "$ref": "#/components/schemas/LocationRef"
  29809. },
  29810. "type": {
  29811. "type": "string",
  29812. "enum": ["session.next.tool.input.ended"]
  29813. },
  29814. "data": {
  29815. "type": "object",
  29816. "properties": {
  29817. "timestamp": {
  29818. "type": "number"
  29819. },
  29820. "sessionID": {
  29821. "type": "string",
  29822. "pattern": "^ses"
  29823. },
  29824. "assistantMessageID": {
  29825. "type": "string",
  29826. "pattern": "^msg_"
  29827. },
  29828. "callID": {
  29829. "type": "string"
  29830. },
  29831. "text": {
  29832. "type": "string"
  29833. }
  29834. },
  29835. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  29836. "additionalProperties": false
  29837. }
  29838. },
  29839. "required": ["id", "type", "data"],
  29840. "additionalProperties": false
  29841. },
  29842. "V2EventSessionNextToolCalled": {
  29843. "type": "object",
  29844. "properties": {
  29845. "id": {
  29846. "type": "string",
  29847. "pattern": "^evt_"
  29848. },
  29849. "metadata": {
  29850. "type": "object"
  29851. },
  29852. "durable": {
  29853. "type": "object",
  29854. "properties": {
  29855. "aggregateID": {
  29856. "type": "string"
  29857. },
  29858. "seq": {
  29859. "type": "integer"
  29860. },
  29861. "version": {
  29862. "type": "integer"
  29863. }
  29864. },
  29865. "required": ["aggregateID", "seq", "version"],
  29866. "additionalProperties": false
  29867. },
  29868. "location": {
  29869. "$ref": "#/components/schemas/LocationRef"
  29870. },
  29871. "type": {
  29872. "type": "string",
  29873. "enum": ["session.next.tool.called"]
  29874. },
  29875. "data": {
  29876. "type": "object",
  29877. "properties": {
  29878. "timestamp": {
  29879. "type": "number"
  29880. },
  29881. "sessionID": {
  29882. "type": "string",
  29883. "pattern": "^ses"
  29884. },
  29885. "assistantMessageID": {
  29886. "type": "string",
  29887. "pattern": "^msg_"
  29888. },
  29889. "callID": {
  29890. "type": "string"
  29891. },
  29892. "tool": {
  29893. "type": "string"
  29894. },
  29895. "input": {
  29896. "type": "object"
  29897. },
  29898. "provider": {
  29899. "type": "object",
  29900. "properties": {
  29901. "executed": {
  29902. "type": "boolean"
  29903. },
  29904. "metadata": {
  29905. "type": "object",
  29906. "additionalProperties": {
  29907. "type": "object"
  29908. }
  29909. }
  29910. },
  29911. "required": ["executed"],
  29912. "additionalProperties": false
  29913. }
  29914. },
  29915. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  29916. "additionalProperties": false
  29917. }
  29918. },
  29919. "required": ["id", "type", "data"],
  29920. "additionalProperties": false
  29921. },
  29922. "V2EventSessionNextToolProgress": {
  29923. "type": "object",
  29924. "properties": {
  29925. "id": {
  29926. "type": "string",
  29927. "pattern": "^evt_"
  29928. },
  29929. "metadata": {
  29930. "type": "object"
  29931. },
  29932. "durable": {
  29933. "type": "object",
  29934. "properties": {
  29935. "aggregateID": {
  29936. "type": "string"
  29937. },
  29938. "seq": {
  29939. "type": "integer"
  29940. },
  29941. "version": {
  29942. "type": "integer"
  29943. }
  29944. },
  29945. "required": ["aggregateID", "seq", "version"],
  29946. "additionalProperties": false
  29947. },
  29948. "location": {
  29949. "$ref": "#/components/schemas/LocationRef"
  29950. },
  29951. "type": {
  29952. "type": "string",
  29953. "enum": ["session.next.tool.progress"]
  29954. },
  29955. "data": {
  29956. "type": "object",
  29957. "properties": {
  29958. "timestamp": {
  29959. "type": "number"
  29960. },
  29961. "sessionID": {
  29962. "type": "string",
  29963. "pattern": "^ses"
  29964. },
  29965. "assistantMessageID": {
  29966. "type": "string",
  29967. "pattern": "^msg_"
  29968. },
  29969. "callID": {
  29970. "type": "string"
  29971. },
  29972. "structured": {
  29973. "type": "object"
  29974. },
  29975. "content": {
  29976. "type": "array",
  29977. "items": {
  29978. "anyOf": [
  29979. {
  29980. "$ref": "#/components/schemas/ToolTextContent"
  29981. },
  29982. {
  29983. "$ref": "#/components/schemas/ToolFileContent"
  29984. }
  29985. ]
  29986. }
  29987. }
  29988. },
  29989. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  29990. "additionalProperties": false
  29991. }
  29992. },
  29993. "required": ["id", "type", "data"],
  29994. "additionalProperties": false
  29995. },
  29996. "V2EventSessionNextToolSuccess": {
  29997. "type": "object",
  29998. "properties": {
  29999. "id": {
  30000. "type": "string",
  30001. "pattern": "^evt_"
  30002. },
  30003. "metadata": {
  30004. "type": "object"
  30005. },
  30006. "durable": {
  30007. "type": "object",
  30008. "properties": {
  30009. "aggregateID": {
  30010. "type": "string"
  30011. },
  30012. "seq": {
  30013. "type": "integer"
  30014. },
  30015. "version": {
  30016. "type": "integer"
  30017. }
  30018. },
  30019. "required": ["aggregateID", "seq", "version"],
  30020. "additionalProperties": false
  30021. },
  30022. "location": {
  30023. "$ref": "#/components/schemas/LocationRef"
  30024. },
  30025. "type": {
  30026. "type": "string",
  30027. "enum": ["session.next.tool.success"]
  30028. },
  30029. "data": {
  30030. "type": "object",
  30031. "properties": {
  30032. "timestamp": {
  30033. "type": "number"
  30034. },
  30035. "sessionID": {
  30036. "type": "string",
  30037. "pattern": "^ses"
  30038. },
  30039. "assistantMessageID": {
  30040. "type": "string",
  30041. "pattern": "^msg_"
  30042. },
  30043. "callID": {
  30044. "type": "string"
  30045. },
  30046. "structured": {
  30047. "type": "object"
  30048. },
  30049. "content": {
  30050. "type": "array",
  30051. "items": {
  30052. "anyOf": [
  30053. {
  30054. "$ref": "#/components/schemas/ToolTextContent"
  30055. },
  30056. {
  30057. "$ref": "#/components/schemas/ToolFileContent"
  30058. }
  30059. ]
  30060. }
  30061. },
  30062. "outputPaths": {
  30063. "type": "array",
  30064. "items": {
  30065. "type": "string"
  30066. }
  30067. },
  30068. "result": {},
  30069. "provider": {
  30070. "type": "object",
  30071. "properties": {
  30072. "executed": {
  30073. "type": "boolean"
  30074. },
  30075. "metadata": {
  30076. "type": "object",
  30077. "additionalProperties": {
  30078. "type": "object"
  30079. }
  30080. }
  30081. },
  30082. "required": ["executed"],
  30083. "additionalProperties": false
  30084. }
  30085. },
  30086. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  30087. "additionalProperties": false
  30088. }
  30089. },
  30090. "required": ["id", "type", "data"],
  30091. "additionalProperties": false
  30092. },
  30093. "V2EventSessionNextToolFailed": {
  30094. "type": "object",
  30095. "properties": {
  30096. "id": {
  30097. "type": "string",
  30098. "pattern": "^evt_"
  30099. },
  30100. "metadata": {
  30101. "type": "object"
  30102. },
  30103. "durable": {
  30104. "type": "object",
  30105. "properties": {
  30106. "aggregateID": {
  30107. "type": "string"
  30108. },
  30109. "seq": {
  30110. "type": "integer"
  30111. },
  30112. "version": {
  30113. "type": "integer"
  30114. }
  30115. },
  30116. "required": ["aggregateID", "seq", "version"],
  30117. "additionalProperties": false
  30118. },
  30119. "location": {
  30120. "$ref": "#/components/schemas/LocationRef"
  30121. },
  30122. "type": {
  30123. "type": "string",
  30124. "enum": ["session.next.tool.failed"]
  30125. },
  30126. "data": {
  30127. "type": "object",
  30128. "properties": {
  30129. "timestamp": {
  30130. "type": "number"
  30131. },
  30132. "sessionID": {
  30133. "type": "string",
  30134. "pattern": "^ses"
  30135. },
  30136. "assistantMessageID": {
  30137. "type": "string",
  30138. "pattern": "^msg_"
  30139. },
  30140. "callID": {
  30141. "type": "string"
  30142. },
  30143. "error": {
  30144. "$ref": "#/components/schemas/SessionErrorUnknown"
  30145. },
  30146. "result": {},
  30147. "provider": {
  30148. "type": "object",
  30149. "properties": {
  30150. "executed": {
  30151. "type": "boolean"
  30152. },
  30153. "metadata": {
  30154. "type": "object",
  30155. "additionalProperties": {
  30156. "type": "object"
  30157. }
  30158. }
  30159. },
  30160. "required": ["executed"],
  30161. "additionalProperties": false
  30162. }
  30163. },
  30164. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  30165. "additionalProperties": false
  30166. }
  30167. },
  30168. "required": ["id", "type", "data"],
  30169. "additionalProperties": false
  30170. },
  30171. "V2EventSessionNextRetried": {
  30172. "type": "object",
  30173. "properties": {
  30174. "id": {
  30175. "type": "string",
  30176. "pattern": "^evt_"
  30177. },
  30178. "metadata": {
  30179. "type": "object"
  30180. },
  30181. "durable": {
  30182. "type": "object",
  30183. "properties": {
  30184. "aggregateID": {
  30185. "type": "string"
  30186. },
  30187. "seq": {
  30188. "type": "integer"
  30189. },
  30190. "version": {
  30191. "type": "integer"
  30192. }
  30193. },
  30194. "required": ["aggregateID", "seq", "version"],
  30195. "additionalProperties": false
  30196. },
  30197. "location": {
  30198. "$ref": "#/components/schemas/LocationRef"
  30199. },
  30200. "type": {
  30201. "type": "string",
  30202. "enum": ["session.next.retried"]
  30203. },
  30204. "data": {
  30205. "type": "object",
  30206. "properties": {
  30207. "timestamp": {
  30208. "type": "number"
  30209. },
  30210. "sessionID": {
  30211. "type": "string",
  30212. "pattern": "^ses"
  30213. },
  30214. "attempt": {
  30215. "type": "number"
  30216. },
  30217. "error": {
  30218. "$ref": "#/components/schemas/SessionNextRetry_error"
  30219. }
  30220. },
  30221. "required": ["timestamp", "sessionID", "attempt", "error"],
  30222. "additionalProperties": false
  30223. }
  30224. },
  30225. "required": ["id", "type", "data"],
  30226. "additionalProperties": false
  30227. },
  30228. "V2EventSessionNextCompactionStarted": {
  30229. "type": "object",
  30230. "properties": {
  30231. "id": {
  30232. "type": "string",
  30233. "pattern": "^evt_"
  30234. },
  30235. "metadata": {
  30236. "type": "object"
  30237. },
  30238. "durable": {
  30239. "type": "object",
  30240. "properties": {
  30241. "aggregateID": {
  30242. "type": "string"
  30243. },
  30244. "seq": {
  30245. "type": "integer"
  30246. },
  30247. "version": {
  30248. "type": "integer"
  30249. }
  30250. },
  30251. "required": ["aggregateID", "seq", "version"],
  30252. "additionalProperties": false
  30253. },
  30254. "location": {
  30255. "$ref": "#/components/schemas/LocationRef"
  30256. },
  30257. "type": {
  30258. "type": "string",
  30259. "enum": ["session.next.compaction.started"]
  30260. },
  30261. "data": {
  30262. "type": "object",
  30263. "properties": {
  30264. "timestamp": {
  30265. "type": "number"
  30266. },
  30267. "sessionID": {
  30268. "type": "string",
  30269. "pattern": "^ses"
  30270. },
  30271. "messageID": {
  30272. "type": "string",
  30273. "pattern": "^msg_"
  30274. },
  30275. "reason": {
  30276. "type": "string",
  30277. "enum": ["auto", "manual"]
  30278. }
  30279. },
  30280. "required": ["timestamp", "sessionID", "messageID", "reason"],
  30281. "additionalProperties": false
  30282. }
  30283. },
  30284. "required": ["id", "type", "data"],
  30285. "additionalProperties": false
  30286. },
  30287. "V2EventSessionNextCompactionDelta": {
  30288. "type": "object",
  30289. "properties": {
  30290. "id": {
  30291. "type": "string",
  30292. "pattern": "^evt_"
  30293. },
  30294. "metadata": {
  30295. "type": "object"
  30296. },
  30297. "durable": {
  30298. "type": "object",
  30299. "properties": {
  30300. "aggregateID": {
  30301. "type": "string"
  30302. },
  30303. "seq": {
  30304. "type": "integer"
  30305. },
  30306. "version": {
  30307. "type": "integer"
  30308. }
  30309. },
  30310. "required": ["aggregateID", "seq", "version"],
  30311. "additionalProperties": false
  30312. },
  30313. "location": {
  30314. "$ref": "#/components/schemas/LocationRef"
  30315. },
  30316. "type": {
  30317. "type": "string",
  30318. "enum": ["session.next.compaction.delta"]
  30319. },
  30320. "data": {
  30321. "type": "object",
  30322. "properties": {
  30323. "timestamp": {
  30324. "type": "number"
  30325. },
  30326. "sessionID": {
  30327. "type": "string",
  30328. "pattern": "^ses"
  30329. },
  30330. "messageID": {
  30331. "type": "string",
  30332. "pattern": "^msg_"
  30333. },
  30334. "text": {
  30335. "type": "string"
  30336. }
  30337. },
  30338. "required": ["timestamp", "sessionID", "messageID", "text"],
  30339. "additionalProperties": false
  30340. }
  30341. },
  30342. "required": ["id", "type", "data"],
  30343. "additionalProperties": false
  30344. },
  30345. "V2EventSessionNextCompactionEnded": {
  30346. "type": "object",
  30347. "properties": {
  30348. "id": {
  30349. "type": "string",
  30350. "pattern": "^evt_"
  30351. },
  30352. "metadata": {
  30353. "type": "object"
  30354. },
  30355. "durable": {
  30356. "type": "object",
  30357. "properties": {
  30358. "aggregateID": {
  30359. "type": "string"
  30360. },
  30361. "seq": {
  30362. "type": "integer"
  30363. },
  30364. "version": {
  30365. "type": "integer"
  30366. }
  30367. },
  30368. "required": ["aggregateID", "seq", "version"],
  30369. "additionalProperties": false
  30370. },
  30371. "location": {
  30372. "$ref": "#/components/schemas/LocationRef"
  30373. },
  30374. "type": {
  30375. "type": "string",
  30376. "enum": ["session.next.compaction.ended"]
  30377. },
  30378. "data": {
  30379. "type": "object",
  30380. "properties": {
  30381. "timestamp": {
  30382. "type": "number"
  30383. },
  30384. "sessionID": {
  30385. "type": "string",
  30386. "pattern": "^ses"
  30387. },
  30388. "messageID": {
  30389. "type": "string",
  30390. "pattern": "^msg_"
  30391. },
  30392. "reason": {
  30393. "type": "string",
  30394. "enum": ["auto", "manual"]
  30395. },
  30396. "text": {
  30397. "type": "string"
  30398. },
  30399. "recent": {
  30400. "type": "string"
  30401. }
  30402. },
  30403. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  30404. "additionalProperties": false
  30405. }
  30406. },
  30407. "required": ["id", "type", "data"],
  30408. "additionalProperties": false
  30409. },
  30410. "V2EventMessagePartDelta": {
  30411. "type": "object",
  30412. "properties": {
  30413. "id": {
  30414. "type": "string",
  30415. "pattern": "^evt_"
  30416. },
  30417. "metadata": {
  30418. "type": "object"
  30419. },
  30420. "durable": {
  30421. "type": "object",
  30422. "properties": {
  30423. "aggregateID": {
  30424. "type": "string"
  30425. },
  30426. "seq": {
  30427. "type": "integer"
  30428. },
  30429. "version": {
  30430. "type": "integer"
  30431. }
  30432. },
  30433. "required": ["aggregateID", "seq", "version"],
  30434. "additionalProperties": false
  30435. },
  30436. "location": {
  30437. "$ref": "#/components/schemas/LocationRef"
  30438. },
  30439. "type": {
  30440. "type": "string",
  30441. "enum": ["message.part.delta"]
  30442. },
  30443. "data": {
  30444. "type": "object",
  30445. "properties": {
  30446. "sessionID": {
  30447. "type": "string",
  30448. "pattern": "^ses"
  30449. },
  30450. "messageID": {
  30451. "type": "string",
  30452. "pattern": "^msg"
  30453. },
  30454. "partID": {
  30455. "type": "string",
  30456. "pattern": "^prt"
  30457. },
  30458. "field": {
  30459. "type": "string"
  30460. },
  30461. "delta": {
  30462. "type": "string"
  30463. }
  30464. },
  30465. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  30466. "additionalProperties": false
  30467. }
  30468. },
  30469. "required": ["id", "type", "data"],
  30470. "additionalProperties": false
  30471. },
  30472. "V2EventSessionDiff": {
  30473. "type": "object",
  30474. "properties": {
  30475. "id": {
  30476. "type": "string",
  30477. "pattern": "^evt_"
  30478. },
  30479. "metadata": {
  30480. "type": "object"
  30481. },
  30482. "durable": {
  30483. "type": "object",
  30484. "properties": {
  30485. "aggregateID": {
  30486. "type": "string"
  30487. },
  30488. "seq": {
  30489. "type": "integer"
  30490. },
  30491. "version": {
  30492. "type": "integer"
  30493. }
  30494. },
  30495. "required": ["aggregateID", "seq", "version"],
  30496. "additionalProperties": false
  30497. },
  30498. "location": {
  30499. "$ref": "#/components/schemas/LocationRef"
  30500. },
  30501. "type": {
  30502. "type": "string",
  30503. "enum": ["session.diff"]
  30504. },
  30505. "data": {
  30506. "type": "object",
  30507. "properties": {
  30508. "sessionID": {
  30509. "type": "string",
  30510. "pattern": "^ses"
  30511. },
  30512. "diff": {
  30513. "type": "array",
  30514. "items": {
  30515. "$ref": "#/components/schemas/SnapshotFileDiff"
  30516. }
  30517. }
  30518. },
  30519. "required": ["sessionID", "diff"],
  30520. "additionalProperties": false
  30521. }
  30522. },
  30523. "required": ["id", "type", "data"],
  30524. "additionalProperties": false
  30525. },
  30526. "V2EventSessionError": {
  30527. "type": "object",
  30528. "properties": {
  30529. "id": {
  30530. "type": "string",
  30531. "pattern": "^evt_"
  30532. },
  30533. "metadata": {
  30534. "type": "object"
  30535. },
  30536. "durable": {
  30537. "type": "object",
  30538. "properties": {
  30539. "aggregateID": {
  30540. "type": "string"
  30541. },
  30542. "seq": {
  30543. "type": "integer"
  30544. },
  30545. "version": {
  30546. "type": "integer"
  30547. }
  30548. },
  30549. "required": ["aggregateID", "seq", "version"],
  30550. "additionalProperties": false
  30551. },
  30552. "location": {
  30553. "$ref": "#/components/schemas/LocationRef"
  30554. },
  30555. "type": {
  30556. "type": "string",
  30557. "enum": ["session.error"]
  30558. },
  30559. "data": {
  30560. "type": "object",
  30561. "properties": {
  30562. "sessionID": {
  30563. "type": "string",
  30564. "pattern": "^ses"
  30565. },
  30566. "error": {
  30567. "anyOf": [
  30568. {
  30569. "$ref": "#/components/schemas/ProviderAuthError"
  30570. },
  30571. {
  30572. "$ref": "#/components/schemas/UnknownError"
  30573. },
  30574. {
  30575. "$ref": "#/components/schemas/MessageOutputLengthError"
  30576. },
  30577. {
  30578. "$ref": "#/components/schemas/MessageAbortedError"
  30579. },
  30580. {
  30581. "$ref": "#/components/schemas/StructuredOutputError"
  30582. },
  30583. {
  30584. "$ref": "#/components/schemas/ContextOverflowError"
  30585. },
  30586. {
  30587. "$ref": "#/components/schemas/ContentFilterError"
  30588. },
  30589. {
  30590. "$ref": "#/components/schemas/APIError"
  30591. }
  30592. ]
  30593. }
  30594. },
  30595. "additionalProperties": false
  30596. }
  30597. },
  30598. "required": ["id", "type", "data"],
  30599. "additionalProperties": false
  30600. },
  30601. "V2EventInstallationUpdated": {
  30602. "type": "object",
  30603. "properties": {
  30604. "id": {
  30605. "type": "string",
  30606. "pattern": "^evt_"
  30607. },
  30608. "metadata": {
  30609. "type": "object"
  30610. },
  30611. "durable": {
  30612. "type": "object",
  30613. "properties": {
  30614. "aggregateID": {
  30615. "type": "string"
  30616. },
  30617. "seq": {
  30618. "type": "integer"
  30619. },
  30620. "version": {
  30621. "type": "integer"
  30622. }
  30623. },
  30624. "required": ["aggregateID", "seq", "version"],
  30625. "additionalProperties": false
  30626. },
  30627. "location": {
  30628. "$ref": "#/components/schemas/LocationRef"
  30629. },
  30630. "type": {
  30631. "type": "string",
  30632. "enum": ["installation.updated"]
  30633. },
  30634. "data": {
  30635. "type": "object",
  30636. "properties": {
  30637. "version": {
  30638. "type": "string"
  30639. }
  30640. },
  30641. "required": ["version"],
  30642. "additionalProperties": false
  30643. }
  30644. },
  30645. "required": ["id", "type", "data"],
  30646. "additionalProperties": false
  30647. },
  30648. "V2EventInstallationUpdate-available": {
  30649. "type": "object",
  30650. "properties": {
  30651. "id": {
  30652. "type": "string",
  30653. "pattern": "^evt_"
  30654. },
  30655. "metadata": {
  30656. "type": "object"
  30657. },
  30658. "durable": {
  30659. "type": "object",
  30660. "properties": {
  30661. "aggregateID": {
  30662. "type": "string"
  30663. },
  30664. "seq": {
  30665. "type": "integer"
  30666. },
  30667. "version": {
  30668. "type": "integer"
  30669. }
  30670. },
  30671. "required": ["aggregateID", "seq", "version"],
  30672. "additionalProperties": false
  30673. },
  30674. "location": {
  30675. "$ref": "#/components/schemas/LocationRef"
  30676. },
  30677. "type": {
  30678. "type": "string",
  30679. "enum": ["installation.update-available"]
  30680. },
  30681. "data": {
  30682. "type": "object",
  30683. "properties": {
  30684. "version": {
  30685. "type": "string"
  30686. }
  30687. },
  30688. "required": ["version"],
  30689. "additionalProperties": false
  30690. }
  30691. },
  30692. "required": ["id", "type", "data"],
  30693. "additionalProperties": false
  30694. },
  30695. "V2EventFileEdited": {
  30696. "type": "object",
  30697. "properties": {
  30698. "id": {
  30699. "type": "string",
  30700. "pattern": "^evt_"
  30701. },
  30702. "metadata": {
  30703. "type": "object"
  30704. },
  30705. "durable": {
  30706. "type": "object",
  30707. "properties": {
  30708. "aggregateID": {
  30709. "type": "string"
  30710. },
  30711. "seq": {
  30712. "type": "integer"
  30713. },
  30714. "version": {
  30715. "type": "integer"
  30716. }
  30717. },
  30718. "required": ["aggregateID", "seq", "version"],
  30719. "additionalProperties": false
  30720. },
  30721. "location": {
  30722. "$ref": "#/components/schemas/LocationRef"
  30723. },
  30724. "type": {
  30725. "type": "string",
  30726. "enum": ["file.edited"]
  30727. },
  30728. "data": {
  30729. "type": "object",
  30730. "properties": {
  30731. "file": {
  30732. "type": "string"
  30733. }
  30734. },
  30735. "required": ["file"],
  30736. "additionalProperties": false
  30737. }
  30738. },
  30739. "required": ["id", "type", "data"],
  30740. "additionalProperties": false
  30741. },
  30742. "V2EventPluginAdded": {
  30743. "type": "object",
  30744. "properties": {
  30745. "id": {
  30746. "type": "string",
  30747. "pattern": "^evt_"
  30748. },
  30749. "metadata": {
  30750. "type": "object"
  30751. },
  30752. "durable": {
  30753. "type": "object",
  30754. "properties": {
  30755. "aggregateID": {
  30756. "type": "string"
  30757. },
  30758. "seq": {
  30759. "type": "integer"
  30760. },
  30761. "version": {
  30762. "type": "integer"
  30763. }
  30764. },
  30765. "required": ["aggregateID", "seq", "version"],
  30766. "additionalProperties": false
  30767. },
  30768. "location": {
  30769. "$ref": "#/components/schemas/LocationRef"
  30770. },
  30771. "type": {
  30772. "type": "string",
  30773. "enum": ["plugin.added"]
  30774. },
  30775. "data": {
  30776. "type": "object",
  30777. "properties": {
  30778. "id": {
  30779. "type": "string"
  30780. }
  30781. },
  30782. "required": ["id"],
  30783. "additionalProperties": false
  30784. }
  30785. },
  30786. "required": ["id", "type", "data"],
  30787. "additionalProperties": false
  30788. },
  30789. "V2EventPermissionV2Asked": {
  30790. "type": "object",
  30791. "properties": {
  30792. "id": {
  30793. "type": "string",
  30794. "pattern": "^evt_"
  30795. },
  30796. "metadata": {
  30797. "type": "object"
  30798. },
  30799. "durable": {
  30800. "type": "object",
  30801. "properties": {
  30802. "aggregateID": {
  30803. "type": "string"
  30804. },
  30805. "seq": {
  30806. "type": "integer"
  30807. },
  30808. "version": {
  30809. "type": "integer"
  30810. }
  30811. },
  30812. "required": ["aggregateID", "seq", "version"],
  30813. "additionalProperties": false
  30814. },
  30815. "location": {
  30816. "$ref": "#/components/schemas/LocationRef"
  30817. },
  30818. "type": {
  30819. "type": "string",
  30820. "enum": ["permission.v2.asked"]
  30821. },
  30822. "data": {
  30823. "type": "object",
  30824. "properties": {
  30825. "id": {
  30826. "type": "string",
  30827. "pattern": "^per"
  30828. },
  30829. "sessionID": {
  30830. "type": "string",
  30831. "pattern": "^ses"
  30832. },
  30833. "action": {
  30834. "type": "string"
  30835. },
  30836. "resources": {
  30837. "type": "array",
  30838. "items": {
  30839. "type": "string"
  30840. }
  30841. },
  30842. "save": {
  30843. "type": "array",
  30844. "items": {
  30845. "type": "string"
  30846. }
  30847. },
  30848. "metadata": {
  30849. "type": "object"
  30850. },
  30851. "source": {
  30852. "$ref": "#/components/schemas/PermissionV2Source"
  30853. }
  30854. },
  30855. "required": ["id", "sessionID", "action", "resources"],
  30856. "additionalProperties": false
  30857. }
  30858. },
  30859. "required": ["id", "type", "data"],
  30860. "additionalProperties": false
  30861. },
  30862. "V2EventPermissionV2Replied": {
  30863. "type": "object",
  30864. "properties": {
  30865. "id": {
  30866. "type": "string",
  30867. "pattern": "^evt_"
  30868. },
  30869. "metadata": {
  30870. "type": "object"
  30871. },
  30872. "durable": {
  30873. "type": "object",
  30874. "properties": {
  30875. "aggregateID": {
  30876. "type": "string"
  30877. },
  30878. "seq": {
  30879. "type": "integer"
  30880. },
  30881. "version": {
  30882. "type": "integer"
  30883. }
  30884. },
  30885. "required": ["aggregateID", "seq", "version"],
  30886. "additionalProperties": false
  30887. },
  30888. "location": {
  30889. "$ref": "#/components/schemas/LocationRef"
  30890. },
  30891. "type": {
  30892. "type": "string",
  30893. "enum": ["permission.v2.replied"]
  30894. },
  30895. "data": {
  30896. "type": "object",
  30897. "properties": {
  30898. "sessionID": {
  30899. "type": "string",
  30900. "pattern": "^ses"
  30901. },
  30902. "requestID": {
  30903. "type": "string",
  30904. "pattern": "^per"
  30905. },
  30906. "reply": {
  30907. "$ref": "#/components/schemas/PermissionV2Reply"
  30908. }
  30909. },
  30910. "required": ["sessionID", "requestID", "reply"],
  30911. "additionalProperties": false
  30912. }
  30913. },
  30914. "required": ["id", "type", "data"],
  30915. "additionalProperties": false
  30916. },
  30917. "V2EventReferenceUpdated": {
  30918. "type": "object",
  30919. "properties": {
  30920. "id": {
  30921. "type": "string",
  30922. "pattern": "^evt_"
  30923. },
  30924. "metadata": {
  30925. "type": "object"
  30926. },
  30927. "durable": {
  30928. "type": "object",
  30929. "properties": {
  30930. "aggregateID": {
  30931. "type": "string"
  30932. },
  30933. "seq": {
  30934. "type": "integer"
  30935. },
  30936. "version": {
  30937. "type": "integer"
  30938. }
  30939. },
  30940. "required": ["aggregateID", "seq", "version"],
  30941. "additionalProperties": false
  30942. },
  30943. "location": {
  30944. "$ref": "#/components/schemas/LocationRef"
  30945. },
  30946. "type": {
  30947. "type": "string",
  30948. "enum": ["reference.updated"]
  30949. },
  30950. "data": {
  30951. "type": "object",
  30952. "properties": {}
  30953. }
  30954. },
  30955. "required": ["id", "type", "data"],
  30956. "additionalProperties": false
  30957. },
  30958. "V2EventProjectDirectoriesUpdated": {
  30959. "type": "object",
  30960. "properties": {
  30961. "id": {
  30962. "type": "string",
  30963. "pattern": "^evt_"
  30964. },
  30965. "metadata": {
  30966. "type": "object"
  30967. },
  30968. "durable": {
  30969. "type": "object",
  30970. "properties": {
  30971. "aggregateID": {
  30972. "type": "string"
  30973. },
  30974. "seq": {
  30975. "type": "integer"
  30976. },
  30977. "version": {
  30978. "type": "integer"
  30979. }
  30980. },
  30981. "required": ["aggregateID", "seq", "version"],
  30982. "additionalProperties": false
  30983. },
  30984. "location": {
  30985. "$ref": "#/components/schemas/LocationRef"
  30986. },
  30987. "type": {
  30988. "type": "string",
  30989. "enum": ["project.directories.updated"]
  30990. },
  30991. "data": {
  30992. "type": "object",
  30993. "properties": {
  30994. "projectID": {
  30995. "type": "string"
  30996. }
  30997. },
  30998. "required": ["projectID"],
  30999. "additionalProperties": false
  31000. }
  31001. },
  31002. "required": ["id", "type", "data"],
  31003. "additionalProperties": false
  31004. },
  31005. "V2EventFileWatcherUpdated": {
  31006. "type": "object",
  31007. "properties": {
  31008. "id": {
  31009. "type": "string",
  31010. "pattern": "^evt_"
  31011. },
  31012. "metadata": {
  31013. "type": "object"
  31014. },
  31015. "durable": {
  31016. "type": "object",
  31017. "properties": {
  31018. "aggregateID": {
  31019. "type": "string"
  31020. },
  31021. "seq": {
  31022. "type": "integer"
  31023. },
  31024. "version": {
  31025. "type": "integer"
  31026. }
  31027. },
  31028. "required": ["aggregateID", "seq", "version"],
  31029. "additionalProperties": false
  31030. },
  31031. "location": {
  31032. "$ref": "#/components/schemas/LocationRef"
  31033. },
  31034. "type": {
  31035. "type": "string",
  31036. "enum": ["file.watcher.updated"]
  31037. },
  31038. "data": {
  31039. "type": "object",
  31040. "properties": {
  31041. "file": {
  31042. "type": "string"
  31043. },
  31044. "event": {
  31045. "type": "string",
  31046. "enum": ["add", "change", "unlink"]
  31047. }
  31048. },
  31049. "required": ["file", "event"],
  31050. "additionalProperties": false
  31051. }
  31052. },
  31053. "required": ["id", "type", "data"],
  31054. "additionalProperties": false
  31055. },
  31056. "V2EventPtyCreated": {
  31057. "type": "object",
  31058. "properties": {
  31059. "id": {
  31060. "type": "string",
  31061. "pattern": "^evt_"
  31062. },
  31063. "metadata": {
  31064. "type": "object"
  31065. },
  31066. "durable": {
  31067. "type": "object",
  31068. "properties": {
  31069. "aggregateID": {
  31070. "type": "string"
  31071. },
  31072. "seq": {
  31073. "type": "integer"
  31074. },
  31075. "version": {
  31076. "type": "integer"
  31077. }
  31078. },
  31079. "required": ["aggregateID", "seq", "version"],
  31080. "additionalProperties": false
  31081. },
  31082. "location": {
  31083. "$ref": "#/components/schemas/LocationRef"
  31084. },
  31085. "type": {
  31086. "type": "string",
  31087. "enum": ["pty.created"]
  31088. },
  31089. "data": {
  31090. "type": "object",
  31091. "properties": {
  31092. "info": {
  31093. "$ref": "#/components/schemas/Pty"
  31094. }
  31095. },
  31096. "required": ["info"],
  31097. "additionalProperties": false
  31098. }
  31099. },
  31100. "required": ["id", "type", "data"],
  31101. "additionalProperties": false
  31102. },
  31103. "V2EventPtyUpdated": {
  31104. "type": "object",
  31105. "properties": {
  31106. "id": {
  31107. "type": "string",
  31108. "pattern": "^evt_"
  31109. },
  31110. "metadata": {
  31111. "type": "object"
  31112. },
  31113. "durable": {
  31114. "type": "object",
  31115. "properties": {
  31116. "aggregateID": {
  31117. "type": "string"
  31118. },
  31119. "seq": {
  31120. "type": "integer"
  31121. },
  31122. "version": {
  31123. "type": "integer"
  31124. }
  31125. },
  31126. "required": ["aggregateID", "seq", "version"],
  31127. "additionalProperties": false
  31128. },
  31129. "location": {
  31130. "$ref": "#/components/schemas/LocationRef"
  31131. },
  31132. "type": {
  31133. "type": "string",
  31134. "enum": ["pty.updated"]
  31135. },
  31136. "data": {
  31137. "type": "object",
  31138. "properties": {
  31139. "info": {
  31140. "$ref": "#/components/schemas/Pty"
  31141. }
  31142. },
  31143. "required": ["info"],
  31144. "additionalProperties": false
  31145. }
  31146. },
  31147. "required": ["id", "type", "data"],
  31148. "additionalProperties": false
  31149. },
  31150. "V2EventPtyExited": {
  31151. "type": "object",
  31152. "properties": {
  31153. "id": {
  31154. "type": "string",
  31155. "pattern": "^evt_"
  31156. },
  31157. "metadata": {
  31158. "type": "object"
  31159. },
  31160. "durable": {
  31161. "type": "object",
  31162. "properties": {
  31163. "aggregateID": {
  31164. "type": "string"
  31165. },
  31166. "seq": {
  31167. "type": "integer"
  31168. },
  31169. "version": {
  31170. "type": "integer"
  31171. }
  31172. },
  31173. "required": ["aggregateID", "seq", "version"],
  31174. "additionalProperties": false
  31175. },
  31176. "location": {
  31177. "$ref": "#/components/schemas/LocationRef"
  31178. },
  31179. "type": {
  31180. "type": "string",
  31181. "enum": ["pty.exited"]
  31182. },
  31183. "data": {
  31184. "type": "object",
  31185. "properties": {
  31186. "id": {
  31187. "type": "string",
  31188. "pattern": "^pty"
  31189. },
  31190. "exitCode": {
  31191. "type": "integer",
  31192. "minimum": 0
  31193. }
  31194. },
  31195. "required": ["id", "exitCode"],
  31196. "additionalProperties": false
  31197. }
  31198. },
  31199. "required": ["id", "type", "data"],
  31200. "additionalProperties": false
  31201. },
  31202. "V2EventPtyDeleted": {
  31203. "type": "object",
  31204. "properties": {
  31205. "id": {
  31206. "type": "string",
  31207. "pattern": "^evt_"
  31208. },
  31209. "metadata": {
  31210. "type": "object"
  31211. },
  31212. "durable": {
  31213. "type": "object",
  31214. "properties": {
  31215. "aggregateID": {
  31216. "type": "string"
  31217. },
  31218. "seq": {
  31219. "type": "integer"
  31220. },
  31221. "version": {
  31222. "type": "integer"
  31223. }
  31224. },
  31225. "required": ["aggregateID", "seq", "version"],
  31226. "additionalProperties": false
  31227. },
  31228. "location": {
  31229. "$ref": "#/components/schemas/LocationRef"
  31230. },
  31231. "type": {
  31232. "type": "string",
  31233. "enum": ["pty.deleted"]
  31234. },
  31235. "data": {
  31236. "type": "object",
  31237. "properties": {
  31238. "id": {
  31239. "type": "string",
  31240. "pattern": "^pty"
  31241. }
  31242. },
  31243. "required": ["id"],
  31244. "additionalProperties": false
  31245. }
  31246. },
  31247. "required": ["id", "type", "data"],
  31248. "additionalProperties": false
  31249. },
  31250. "V2EventQuestionV2Asked": {
  31251. "type": "object",
  31252. "properties": {
  31253. "id": {
  31254. "type": "string",
  31255. "pattern": "^evt_"
  31256. },
  31257. "metadata": {
  31258. "type": "object"
  31259. },
  31260. "durable": {
  31261. "type": "object",
  31262. "properties": {
  31263. "aggregateID": {
  31264. "type": "string"
  31265. },
  31266. "seq": {
  31267. "type": "integer"
  31268. },
  31269. "version": {
  31270. "type": "integer"
  31271. }
  31272. },
  31273. "required": ["aggregateID", "seq", "version"],
  31274. "additionalProperties": false
  31275. },
  31276. "location": {
  31277. "$ref": "#/components/schemas/LocationRef"
  31278. },
  31279. "type": {
  31280. "type": "string",
  31281. "enum": ["question.v2.asked"]
  31282. },
  31283. "data": {
  31284. "type": "object",
  31285. "properties": {
  31286. "id": {
  31287. "type": "string",
  31288. "pattern": "^que"
  31289. },
  31290. "sessionID": {
  31291. "type": "string",
  31292. "pattern": "^ses"
  31293. },
  31294. "questions": {
  31295. "type": "array",
  31296. "items": {
  31297. "$ref": "#/components/schemas/QuestionV2Info"
  31298. },
  31299. "description": "Questions to ask"
  31300. },
  31301. "tool": {
  31302. "$ref": "#/components/schemas/QuestionV2Tool"
  31303. }
  31304. },
  31305. "required": ["id", "sessionID", "questions"],
  31306. "additionalProperties": false
  31307. }
  31308. },
  31309. "required": ["id", "type", "data"],
  31310. "additionalProperties": false
  31311. },
  31312. "V2EventQuestionV2Replied": {
  31313. "type": "object",
  31314. "properties": {
  31315. "id": {
  31316. "type": "string",
  31317. "pattern": "^evt_"
  31318. },
  31319. "metadata": {
  31320. "type": "object"
  31321. },
  31322. "durable": {
  31323. "type": "object",
  31324. "properties": {
  31325. "aggregateID": {
  31326. "type": "string"
  31327. },
  31328. "seq": {
  31329. "type": "integer"
  31330. },
  31331. "version": {
  31332. "type": "integer"
  31333. }
  31334. },
  31335. "required": ["aggregateID", "seq", "version"],
  31336. "additionalProperties": false
  31337. },
  31338. "location": {
  31339. "$ref": "#/components/schemas/LocationRef"
  31340. },
  31341. "type": {
  31342. "type": "string",
  31343. "enum": ["question.v2.replied"]
  31344. },
  31345. "data": {
  31346. "type": "object",
  31347. "properties": {
  31348. "sessionID": {
  31349. "type": "string",
  31350. "pattern": "^ses"
  31351. },
  31352. "requestID": {
  31353. "type": "string",
  31354. "pattern": "^que"
  31355. },
  31356. "answers": {
  31357. "type": "array",
  31358. "items": {
  31359. "$ref": "#/components/schemas/QuestionV2Answer"
  31360. }
  31361. }
  31362. },
  31363. "required": ["sessionID", "requestID", "answers"],
  31364. "additionalProperties": false
  31365. }
  31366. },
  31367. "required": ["id", "type", "data"],
  31368. "additionalProperties": false
  31369. },
  31370. "V2EventQuestionV2Rejected": {
  31371. "type": "object",
  31372. "properties": {
  31373. "id": {
  31374. "type": "string",
  31375. "pattern": "^evt_"
  31376. },
  31377. "metadata": {
  31378. "type": "object"
  31379. },
  31380. "durable": {
  31381. "type": "object",
  31382. "properties": {
  31383. "aggregateID": {
  31384. "type": "string"
  31385. },
  31386. "seq": {
  31387. "type": "integer"
  31388. },
  31389. "version": {
  31390. "type": "integer"
  31391. }
  31392. },
  31393. "required": ["aggregateID", "seq", "version"],
  31394. "additionalProperties": false
  31395. },
  31396. "location": {
  31397. "$ref": "#/components/schemas/LocationRef"
  31398. },
  31399. "type": {
  31400. "type": "string",
  31401. "enum": ["question.v2.rejected"]
  31402. },
  31403. "data": {
  31404. "type": "object",
  31405. "properties": {
  31406. "sessionID": {
  31407. "type": "string",
  31408. "pattern": "^ses"
  31409. },
  31410. "requestID": {
  31411. "type": "string",
  31412. "pattern": "^que"
  31413. }
  31414. },
  31415. "required": ["sessionID", "requestID"],
  31416. "additionalProperties": false
  31417. }
  31418. },
  31419. "required": ["id", "type", "data"],
  31420. "additionalProperties": false
  31421. },
  31422. "V2EventTodoUpdated": {
  31423. "type": "object",
  31424. "properties": {
  31425. "id": {
  31426. "type": "string",
  31427. "pattern": "^evt_"
  31428. },
  31429. "metadata": {
  31430. "type": "object"
  31431. },
  31432. "durable": {
  31433. "type": "object",
  31434. "properties": {
  31435. "aggregateID": {
  31436. "type": "string"
  31437. },
  31438. "seq": {
  31439. "type": "integer"
  31440. },
  31441. "version": {
  31442. "type": "integer"
  31443. }
  31444. },
  31445. "required": ["aggregateID", "seq", "version"],
  31446. "additionalProperties": false
  31447. },
  31448. "location": {
  31449. "$ref": "#/components/schemas/LocationRef"
  31450. },
  31451. "type": {
  31452. "type": "string",
  31453. "enum": ["todo.updated"]
  31454. },
  31455. "data": {
  31456. "type": "object",
  31457. "properties": {
  31458. "sessionID": {
  31459. "type": "string",
  31460. "pattern": "^ses"
  31461. },
  31462. "todos": {
  31463. "type": "array",
  31464. "items": {
  31465. "$ref": "#/components/schemas/Todo"
  31466. }
  31467. }
  31468. },
  31469. "required": ["sessionID", "todos"],
  31470. "additionalProperties": false
  31471. }
  31472. },
  31473. "required": ["id", "type", "data"],
  31474. "additionalProperties": false
  31475. },
  31476. "V2EventLspUpdated": {
  31477. "type": "object",
  31478. "properties": {
  31479. "id": {
  31480. "type": "string",
  31481. "pattern": "^evt_"
  31482. },
  31483. "metadata": {
  31484. "type": "object"
  31485. },
  31486. "durable": {
  31487. "type": "object",
  31488. "properties": {
  31489. "aggregateID": {
  31490. "type": "string"
  31491. },
  31492. "seq": {
  31493. "type": "integer"
  31494. },
  31495. "version": {
  31496. "type": "integer"
  31497. }
  31498. },
  31499. "required": ["aggregateID", "seq", "version"],
  31500. "additionalProperties": false
  31501. },
  31502. "location": {
  31503. "$ref": "#/components/schemas/LocationRef"
  31504. },
  31505. "type": {
  31506. "type": "string",
  31507. "enum": ["lsp.updated"]
  31508. },
  31509. "data": {
  31510. "type": "object",
  31511. "properties": {}
  31512. }
  31513. },
  31514. "required": ["id", "type", "data"],
  31515. "additionalProperties": false
  31516. },
  31517. "V2EventPermissionAsked": {
  31518. "type": "object",
  31519. "properties": {
  31520. "id": {
  31521. "type": "string",
  31522. "pattern": "^evt_"
  31523. },
  31524. "metadata": {
  31525. "type": "object"
  31526. },
  31527. "durable": {
  31528. "type": "object",
  31529. "properties": {
  31530. "aggregateID": {
  31531. "type": "string"
  31532. },
  31533. "seq": {
  31534. "type": "integer"
  31535. },
  31536. "version": {
  31537. "type": "integer"
  31538. }
  31539. },
  31540. "required": ["aggregateID", "seq", "version"],
  31541. "additionalProperties": false
  31542. },
  31543. "location": {
  31544. "$ref": "#/components/schemas/LocationRef"
  31545. },
  31546. "type": {
  31547. "type": "string",
  31548. "enum": ["permission.asked"]
  31549. },
  31550. "data": {
  31551. "type": "object",
  31552. "properties": {
  31553. "id": {
  31554. "type": "string",
  31555. "pattern": "^per"
  31556. },
  31557. "sessionID": {
  31558. "type": "string",
  31559. "pattern": "^ses"
  31560. },
  31561. "permission": {
  31562. "type": "string"
  31563. },
  31564. "patterns": {
  31565. "type": "array",
  31566. "items": {
  31567. "type": "string"
  31568. }
  31569. },
  31570. "metadata": {
  31571. "type": "object"
  31572. },
  31573. "always": {
  31574. "type": "array",
  31575. "items": {
  31576. "type": "string"
  31577. }
  31578. },
  31579. "tool": {
  31580. "type": "object",
  31581. "properties": {
  31582. "messageID": {
  31583. "type": "string"
  31584. },
  31585. "callID": {
  31586. "type": "string"
  31587. }
  31588. },
  31589. "required": ["messageID", "callID"],
  31590. "additionalProperties": false
  31591. }
  31592. },
  31593. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  31594. "additionalProperties": false
  31595. }
  31596. },
  31597. "required": ["id", "type", "data"],
  31598. "additionalProperties": false
  31599. },
  31600. "V2EventPermissionReplied": {
  31601. "type": "object",
  31602. "properties": {
  31603. "id": {
  31604. "type": "string",
  31605. "pattern": "^evt_"
  31606. },
  31607. "metadata": {
  31608. "type": "object"
  31609. },
  31610. "durable": {
  31611. "type": "object",
  31612. "properties": {
  31613. "aggregateID": {
  31614. "type": "string"
  31615. },
  31616. "seq": {
  31617. "type": "integer"
  31618. },
  31619. "version": {
  31620. "type": "integer"
  31621. }
  31622. },
  31623. "required": ["aggregateID", "seq", "version"],
  31624. "additionalProperties": false
  31625. },
  31626. "location": {
  31627. "$ref": "#/components/schemas/LocationRef"
  31628. },
  31629. "type": {
  31630. "type": "string",
  31631. "enum": ["permission.replied"]
  31632. },
  31633. "data": {
  31634. "type": "object",
  31635. "properties": {
  31636. "sessionID": {
  31637. "type": "string",
  31638. "pattern": "^ses"
  31639. },
  31640. "requestID": {
  31641. "type": "string",
  31642. "pattern": "^per"
  31643. },
  31644. "reply": {
  31645. "type": "string",
  31646. "enum": ["once", "always", "reject"]
  31647. }
  31648. },
  31649. "required": ["sessionID", "requestID", "reply"],
  31650. "additionalProperties": false
  31651. }
  31652. },
  31653. "required": ["id", "type", "data"],
  31654. "additionalProperties": false
  31655. },
  31656. "V2EventTuiPromptAppend": {
  31657. "type": "object",
  31658. "properties": {
  31659. "id": {
  31660. "type": "string",
  31661. "pattern": "^evt_"
  31662. },
  31663. "metadata": {
  31664. "type": "object"
  31665. },
  31666. "durable": {
  31667. "type": "object",
  31668. "properties": {
  31669. "aggregateID": {
  31670. "type": "string"
  31671. },
  31672. "seq": {
  31673. "type": "integer"
  31674. },
  31675. "version": {
  31676. "type": "integer"
  31677. }
  31678. },
  31679. "required": ["aggregateID", "seq", "version"],
  31680. "additionalProperties": false
  31681. },
  31682. "location": {
  31683. "$ref": "#/components/schemas/LocationRef"
  31684. },
  31685. "type": {
  31686. "type": "string",
  31687. "enum": ["tui.prompt.append"]
  31688. },
  31689. "data": {
  31690. "type": "object",
  31691. "properties": {
  31692. "text": {
  31693. "type": "string"
  31694. }
  31695. },
  31696. "required": ["text"],
  31697. "additionalProperties": false
  31698. }
  31699. },
  31700. "required": ["id", "type", "data"],
  31701. "additionalProperties": false
  31702. },
  31703. "V2EventTuiCommandExecute": {
  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": ["tui.command.execute"]
  31735. },
  31736. "data": {
  31737. "type": "object",
  31738. "properties": {
  31739. "command": {
  31740. "anyOf": [
  31741. {
  31742. "type": "string",
  31743. "enum": [
  31744. "session.list",
  31745. "session.new",
  31746. "session.share",
  31747. "session.interrupt",
  31748. "session.compact",
  31749. "session.page.up",
  31750. "session.page.down",
  31751. "session.line.up",
  31752. "session.line.down",
  31753. "session.half.page.up",
  31754. "session.half.page.down",
  31755. "session.first",
  31756. "session.last",
  31757. "prompt.clear",
  31758. "prompt.submit",
  31759. "agent.cycle"
  31760. ]
  31761. },
  31762. {
  31763. "type": "string"
  31764. }
  31765. ]
  31766. }
  31767. },
  31768. "required": ["command"],
  31769. "additionalProperties": false
  31770. }
  31771. },
  31772. "required": ["id", "type", "data"],
  31773. "additionalProperties": false
  31774. },
  31775. "V2EventTuiToastShow": {
  31776. "type": "object",
  31777. "properties": {
  31778. "id": {
  31779. "type": "string",
  31780. "pattern": "^evt_"
  31781. },
  31782. "metadata": {
  31783. "type": "object"
  31784. },
  31785. "durable": {
  31786. "type": "object",
  31787. "properties": {
  31788. "aggregateID": {
  31789. "type": "string"
  31790. },
  31791. "seq": {
  31792. "type": "integer"
  31793. },
  31794. "version": {
  31795. "type": "integer"
  31796. }
  31797. },
  31798. "required": ["aggregateID", "seq", "version"],
  31799. "additionalProperties": false
  31800. },
  31801. "location": {
  31802. "$ref": "#/components/schemas/LocationRef"
  31803. },
  31804. "type": {
  31805. "type": "string",
  31806. "enum": ["tui.toast.show"]
  31807. },
  31808. "data": {
  31809. "type": "object",
  31810. "properties": {
  31811. "title": {
  31812. "type": "string"
  31813. },
  31814. "message": {
  31815. "type": "string"
  31816. },
  31817. "variant": {
  31818. "type": "string",
  31819. "enum": ["info", "success", "warning", "error"]
  31820. },
  31821. "duration": {
  31822. "type": "integer",
  31823. "exclusiveMinimum": 0
  31824. }
  31825. },
  31826. "required": ["message", "variant"],
  31827. "additionalProperties": false
  31828. }
  31829. },
  31830. "required": ["id", "type", "data"],
  31831. "additionalProperties": false
  31832. },
  31833. "V2EventTuiSessionSelect": {
  31834. "type": "object",
  31835. "properties": {
  31836. "id": {
  31837. "type": "string",
  31838. "pattern": "^evt_"
  31839. },
  31840. "metadata": {
  31841. "type": "object"
  31842. },
  31843. "durable": {
  31844. "type": "object",
  31845. "properties": {
  31846. "aggregateID": {
  31847. "type": "string"
  31848. },
  31849. "seq": {
  31850. "type": "integer"
  31851. },
  31852. "version": {
  31853. "type": "integer"
  31854. }
  31855. },
  31856. "required": ["aggregateID", "seq", "version"],
  31857. "additionalProperties": false
  31858. },
  31859. "location": {
  31860. "$ref": "#/components/schemas/LocationRef"
  31861. },
  31862. "type": {
  31863. "type": "string",
  31864. "enum": ["tui.session.select"]
  31865. },
  31866. "data": {
  31867. "type": "object",
  31868. "properties": {
  31869. "sessionID": {
  31870. "type": "string",
  31871. "pattern": "^ses",
  31872. "description": "Session ID to navigate to"
  31873. }
  31874. },
  31875. "required": ["sessionID"],
  31876. "additionalProperties": false
  31877. }
  31878. },
  31879. "required": ["id", "type", "data"],
  31880. "additionalProperties": false
  31881. },
  31882. "V2EventMcpToolsChanged": {
  31883. "type": "object",
  31884. "properties": {
  31885. "id": {
  31886. "type": "string",
  31887. "pattern": "^evt_"
  31888. },
  31889. "metadata": {
  31890. "type": "object"
  31891. },
  31892. "durable": {
  31893. "type": "object",
  31894. "properties": {
  31895. "aggregateID": {
  31896. "type": "string"
  31897. },
  31898. "seq": {
  31899. "type": "integer"
  31900. },
  31901. "version": {
  31902. "type": "integer"
  31903. }
  31904. },
  31905. "required": ["aggregateID", "seq", "version"],
  31906. "additionalProperties": false
  31907. },
  31908. "location": {
  31909. "$ref": "#/components/schemas/LocationRef"
  31910. },
  31911. "type": {
  31912. "type": "string",
  31913. "enum": ["mcp.tools.changed"]
  31914. },
  31915. "data": {
  31916. "type": "object",
  31917. "properties": {
  31918. "server": {
  31919. "type": "string"
  31920. }
  31921. },
  31922. "required": ["server"],
  31923. "additionalProperties": false
  31924. }
  31925. },
  31926. "required": ["id", "type", "data"],
  31927. "additionalProperties": false
  31928. },
  31929. "V2EventMcpBrowserOpenFailed": {
  31930. "type": "object",
  31931. "properties": {
  31932. "id": {
  31933. "type": "string",
  31934. "pattern": "^evt_"
  31935. },
  31936. "metadata": {
  31937. "type": "object"
  31938. },
  31939. "durable": {
  31940. "type": "object",
  31941. "properties": {
  31942. "aggregateID": {
  31943. "type": "string"
  31944. },
  31945. "seq": {
  31946. "type": "integer"
  31947. },
  31948. "version": {
  31949. "type": "integer"
  31950. }
  31951. },
  31952. "required": ["aggregateID", "seq", "version"],
  31953. "additionalProperties": false
  31954. },
  31955. "location": {
  31956. "$ref": "#/components/schemas/LocationRef"
  31957. },
  31958. "type": {
  31959. "type": "string",
  31960. "enum": ["mcp.browser.open.failed"]
  31961. },
  31962. "data": {
  31963. "type": "object",
  31964. "properties": {
  31965. "mcpName": {
  31966. "type": "string"
  31967. },
  31968. "url": {
  31969. "type": "string"
  31970. }
  31971. },
  31972. "required": ["mcpName", "url"],
  31973. "additionalProperties": false
  31974. }
  31975. },
  31976. "required": ["id", "type", "data"],
  31977. "additionalProperties": false
  31978. },
  31979. "V2EventCommandExecuted": {
  31980. "type": "object",
  31981. "properties": {
  31982. "id": {
  31983. "type": "string",
  31984. "pattern": "^evt_"
  31985. },
  31986. "metadata": {
  31987. "type": "object"
  31988. },
  31989. "durable": {
  31990. "type": "object",
  31991. "properties": {
  31992. "aggregateID": {
  31993. "type": "string"
  31994. },
  31995. "seq": {
  31996. "type": "integer"
  31997. },
  31998. "version": {
  31999. "type": "integer"
  32000. }
  32001. },
  32002. "required": ["aggregateID", "seq", "version"],
  32003. "additionalProperties": false
  32004. },
  32005. "location": {
  32006. "$ref": "#/components/schemas/LocationRef"
  32007. },
  32008. "type": {
  32009. "type": "string",
  32010. "enum": ["command.executed"]
  32011. },
  32012. "data": {
  32013. "type": "object",
  32014. "properties": {
  32015. "name": {
  32016. "type": "string"
  32017. },
  32018. "sessionID": {
  32019. "type": "string",
  32020. "pattern": "^ses"
  32021. },
  32022. "arguments": {
  32023. "type": "string"
  32024. },
  32025. "messageID": {
  32026. "type": "string",
  32027. "pattern": "^msg"
  32028. }
  32029. },
  32030. "required": ["name", "sessionID", "arguments", "messageID"],
  32031. "additionalProperties": false
  32032. }
  32033. },
  32034. "required": ["id", "type", "data"],
  32035. "additionalProperties": false
  32036. },
  32037. "V2EventProjectUpdated": {
  32038. "type": "object",
  32039. "properties": {
  32040. "id": {
  32041. "type": "string",
  32042. "pattern": "^evt_"
  32043. },
  32044. "metadata": {
  32045. "type": "object"
  32046. },
  32047. "durable": {
  32048. "type": "object",
  32049. "properties": {
  32050. "aggregateID": {
  32051. "type": "string"
  32052. },
  32053. "seq": {
  32054. "type": "integer"
  32055. },
  32056. "version": {
  32057. "type": "integer"
  32058. }
  32059. },
  32060. "required": ["aggregateID", "seq", "version"],
  32061. "additionalProperties": false
  32062. },
  32063. "location": {
  32064. "$ref": "#/components/schemas/LocationRef"
  32065. },
  32066. "type": {
  32067. "type": "string",
  32068. "enum": ["project.updated"]
  32069. },
  32070. "data": {
  32071. "type": "object",
  32072. "properties": {
  32073. "id": {
  32074. "type": "string"
  32075. },
  32076. "worktree": {
  32077. "type": "string"
  32078. },
  32079. "vcs": {
  32080. "type": "string",
  32081. "enum": ["git"]
  32082. },
  32083. "name": {
  32084. "type": "string"
  32085. },
  32086. "icon": {
  32087. "type": "object",
  32088. "properties": {
  32089. "url": {
  32090. "type": "string"
  32091. },
  32092. "override": {
  32093. "type": "string"
  32094. },
  32095. "color": {
  32096. "type": "string"
  32097. }
  32098. },
  32099. "additionalProperties": false
  32100. },
  32101. "commands": {
  32102. "type": "object",
  32103. "properties": {
  32104. "start": {
  32105. "type": "string",
  32106. "description": "Startup script to run when creating a new workspace (worktree)"
  32107. }
  32108. },
  32109. "additionalProperties": false
  32110. },
  32111. "time": {
  32112. "type": "object",
  32113. "properties": {
  32114. "created": {
  32115. "type": "integer",
  32116. "minimum": 0
  32117. },
  32118. "updated": {
  32119. "type": "integer",
  32120. "minimum": 0
  32121. },
  32122. "initialized": {
  32123. "type": "integer",
  32124. "minimum": 0
  32125. }
  32126. },
  32127. "required": ["created", "updated"],
  32128. "additionalProperties": false
  32129. },
  32130. "sandboxes": {
  32131. "type": "array",
  32132. "items": {
  32133. "type": "string"
  32134. }
  32135. }
  32136. },
  32137. "required": ["id", "worktree", "time", "sandboxes"],
  32138. "additionalProperties": false
  32139. }
  32140. },
  32141. "required": ["id", "type", "data"],
  32142. "additionalProperties": false
  32143. },
  32144. "V2EventSessionStatus": {
  32145. "type": "object",
  32146. "properties": {
  32147. "id": {
  32148. "type": "string",
  32149. "pattern": "^evt_"
  32150. },
  32151. "metadata": {
  32152. "type": "object"
  32153. },
  32154. "durable": {
  32155. "type": "object",
  32156. "properties": {
  32157. "aggregateID": {
  32158. "type": "string"
  32159. },
  32160. "seq": {
  32161. "type": "integer"
  32162. },
  32163. "version": {
  32164. "type": "integer"
  32165. }
  32166. },
  32167. "required": ["aggregateID", "seq", "version"],
  32168. "additionalProperties": false
  32169. },
  32170. "location": {
  32171. "$ref": "#/components/schemas/LocationRef"
  32172. },
  32173. "type": {
  32174. "type": "string",
  32175. "enum": ["session.status"]
  32176. },
  32177. "data": {
  32178. "type": "object",
  32179. "properties": {
  32180. "sessionID": {
  32181. "type": "string",
  32182. "pattern": "^ses"
  32183. },
  32184. "status": {
  32185. "$ref": "#/components/schemas/SessionStatus"
  32186. }
  32187. },
  32188. "required": ["sessionID", "status"],
  32189. "additionalProperties": false
  32190. }
  32191. },
  32192. "required": ["id", "type", "data"],
  32193. "additionalProperties": false
  32194. },
  32195. "V2EventSessionIdle": {
  32196. "type": "object",
  32197. "properties": {
  32198. "id": {
  32199. "type": "string",
  32200. "pattern": "^evt_"
  32201. },
  32202. "metadata": {
  32203. "type": "object"
  32204. },
  32205. "durable": {
  32206. "type": "object",
  32207. "properties": {
  32208. "aggregateID": {
  32209. "type": "string"
  32210. },
  32211. "seq": {
  32212. "type": "integer"
  32213. },
  32214. "version": {
  32215. "type": "integer"
  32216. }
  32217. },
  32218. "required": ["aggregateID", "seq", "version"],
  32219. "additionalProperties": false
  32220. },
  32221. "location": {
  32222. "$ref": "#/components/schemas/LocationRef"
  32223. },
  32224. "type": {
  32225. "type": "string",
  32226. "enum": ["session.idle"]
  32227. },
  32228. "data": {
  32229. "type": "object",
  32230. "properties": {
  32231. "sessionID": {
  32232. "type": "string",
  32233. "pattern": "^ses"
  32234. }
  32235. },
  32236. "required": ["sessionID"],
  32237. "additionalProperties": false
  32238. }
  32239. },
  32240. "required": ["id", "type", "data"],
  32241. "additionalProperties": false
  32242. },
  32243. "V2EventQuestionAsked": {
  32244. "type": "object",
  32245. "properties": {
  32246. "id": {
  32247. "type": "string",
  32248. "pattern": "^evt_"
  32249. },
  32250. "metadata": {
  32251. "type": "object"
  32252. },
  32253. "durable": {
  32254. "type": "object",
  32255. "properties": {
  32256. "aggregateID": {
  32257. "type": "string"
  32258. },
  32259. "seq": {
  32260. "type": "integer"
  32261. },
  32262. "version": {
  32263. "type": "integer"
  32264. }
  32265. },
  32266. "required": ["aggregateID", "seq", "version"],
  32267. "additionalProperties": false
  32268. },
  32269. "location": {
  32270. "$ref": "#/components/schemas/LocationRef"
  32271. },
  32272. "type": {
  32273. "type": "string",
  32274. "enum": ["question.asked"]
  32275. },
  32276. "data": {
  32277. "type": "object",
  32278. "properties": {
  32279. "id": {
  32280. "type": "string",
  32281. "pattern": "^que"
  32282. },
  32283. "sessionID": {
  32284. "type": "string",
  32285. "pattern": "^ses"
  32286. },
  32287. "questions": {
  32288. "type": "array",
  32289. "items": {
  32290. "$ref": "#/components/schemas/QuestionInfo"
  32291. },
  32292. "description": "Questions to ask"
  32293. },
  32294. "tool": {
  32295. "$ref": "#/components/schemas/QuestionTool"
  32296. }
  32297. },
  32298. "required": ["id", "sessionID", "questions"],
  32299. "additionalProperties": false
  32300. }
  32301. },
  32302. "required": ["id", "type", "data"],
  32303. "additionalProperties": false
  32304. },
  32305. "V2EventQuestionReplied": {
  32306. "type": "object",
  32307. "properties": {
  32308. "id": {
  32309. "type": "string",
  32310. "pattern": "^evt_"
  32311. },
  32312. "metadata": {
  32313. "type": "object"
  32314. },
  32315. "durable": {
  32316. "type": "object",
  32317. "properties": {
  32318. "aggregateID": {
  32319. "type": "string"
  32320. },
  32321. "seq": {
  32322. "type": "integer"
  32323. },
  32324. "version": {
  32325. "type": "integer"
  32326. }
  32327. },
  32328. "required": ["aggregateID", "seq", "version"],
  32329. "additionalProperties": false
  32330. },
  32331. "location": {
  32332. "$ref": "#/components/schemas/LocationRef"
  32333. },
  32334. "type": {
  32335. "type": "string",
  32336. "enum": ["question.replied"]
  32337. },
  32338. "data": {
  32339. "type": "object",
  32340. "properties": {
  32341. "sessionID": {
  32342. "type": "string",
  32343. "pattern": "^ses"
  32344. },
  32345. "requestID": {
  32346. "type": "string",
  32347. "pattern": "^que"
  32348. },
  32349. "answers": {
  32350. "type": "array",
  32351. "items": {
  32352. "$ref": "#/components/schemas/QuestionAnswer"
  32353. }
  32354. }
  32355. },
  32356. "required": ["sessionID", "requestID", "answers"],
  32357. "additionalProperties": false
  32358. }
  32359. },
  32360. "required": ["id", "type", "data"],
  32361. "additionalProperties": false
  32362. },
  32363. "V2EventQuestionRejected": {
  32364. "type": "object",
  32365. "properties": {
  32366. "id": {
  32367. "type": "string",
  32368. "pattern": "^evt_"
  32369. },
  32370. "metadata": {
  32371. "type": "object"
  32372. },
  32373. "durable": {
  32374. "type": "object",
  32375. "properties": {
  32376. "aggregateID": {
  32377. "type": "string"
  32378. },
  32379. "seq": {
  32380. "type": "integer"
  32381. },
  32382. "version": {
  32383. "type": "integer"
  32384. }
  32385. },
  32386. "required": ["aggregateID", "seq", "version"],
  32387. "additionalProperties": false
  32388. },
  32389. "location": {
  32390. "$ref": "#/components/schemas/LocationRef"
  32391. },
  32392. "type": {
  32393. "type": "string",
  32394. "enum": ["question.rejected"]
  32395. },
  32396. "data": {
  32397. "type": "object",
  32398. "properties": {
  32399. "sessionID": {
  32400. "type": "string",
  32401. "pattern": "^ses"
  32402. },
  32403. "requestID": {
  32404. "type": "string",
  32405. "pattern": "^que"
  32406. }
  32407. },
  32408. "required": ["sessionID", "requestID"],
  32409. "additionalProperties": false
  32410. }
  32411. },
  32412. "required": ["id", "type", "data"],
  32413. "additionalProperties": false
  32414. },
  32415. "V2EventSessionCompacted": {
  32416. "type": "object",
  32417. "properties": {
  32418. "id": {
  32419. "type": "string",
  32420. "pattern": "^evt_"
  32421. },
  32422. "metadata": {
  32423. "type": "object"
  32424. },
  32425. "durable": {
  32426. "type": "object",
  32427. "properties": {
  32428. "aggregateID": {
  32429. "type": "string"
  32430. },
  32431. "seq": {
  32432. "type": "integer"
  32433. },
  32434. "version": {
  32435. "type": "integer"
  32436. }
  32437. },
  32438. "required": ["aggregateID", "seq", "version"],
  32439. "additionalProperties": false
  32440. },
  32441. "location": {
  32442. "$ref": "#/components/schemas/LocationRef"
  32443. },
  32444. "type": {
  32445. "type": "string",
  32446. "enum": ["session.compacted"]
  32447. },
  32448. "data": {
  32449. "type": "object",
  32450. "properties": {
  32451. "sessionID": {
  32452. "type": "string",
  32453. "pattern": "^ses"
  32454. }
  32455. },
  32456. "required": ["sessionID"],
  32457. "additionalProperties": false
  32458. }
  32459. },
  32460. "required": ["id", "type", "data"],
  32461. "additionalProperties": false
  32462. },
  32463. "V2EventVcsBranchUpdated": {
  32464. "type": "object",
  32465. "properties": {
  32466. "id": {
  32467. "type": "string",
  32468. "pattern": "^evt_"
  32469. },
  32470. "metadata": {
  32471. "type": "object"
  32472. },
  32473. "durable": {
  32474. "type": "object",
  32475. "properties": {
  32476. "aggregateID": {
  32477. "type": "string"
  32478. },
  32479. "seq": {
  32480. "type": "integer"
  32481. },
  32482. "version": {
  32483. "type": "integer"
  32484. }
  32485. },
  32486. "required": ["aggregateID", "seq", "version"],
  32487. "additionalProperties": false
  32488. },
  32489. "location": {
  32490. "$ref": "#/components/schemas/LocationRef"
  32491. },
  32492. "type": {
  32493. "type": "string",
  32494. "enum": ["vcs.branch.updated"]
  32495. },
  32496. "data": {
  32497. "type": "object",
  32498. "properties": {
  32499. "branch": {
  32500. "type": "string"
  32501. }
  32502. },
  32503. "additionalProperties": false
  32504. }
  32505. },
  32506. "required": ["id", "type", "data"],
  32507. "additionalProperties": false
  32508. },
  32509. "V2EventWorkspaceReady": {
  32510. "type": "object",
  32511. "properties": {
  32512. "id": {
  32513. "type": "string",
  32514. "pattern": "^evt_"
  32515. },
  32516. "metadata": {
  32517. "type": "object"
  32518. },
  32519. "durable": {
  32520. "type": "object",
  32521. "properties": {
  32522. "aggregateID": {
  32523. "type": "string"
  32524. },
  32525. "seq": {
  32526. "type": "integer"
  32527. },
  32528. "version": {
  32529. "type": "integer"
  32530. }
  32531. },
  32532. "required": ["aggregateID", "seq", "version"],
  32533. "additionalProperties": false
  32534. },
  32535. "location": {
  32536. "$ref": "#/components/schemas/LocationRef"
  32537. },
  32538. "type": {
  32539. "type": "string",
  32540. "enum": ["workspace.ready"]
  32541. },
  32542. "data": {
  32543. "type": "object",
  32544. "properties": {
  32545. "name": {
  32546. "type": "string"
  32547. }
  32548. },
  32549. "required": ["name"],
  32550. "additionalProperties": false
  32551. }
  32552. },
  32553. "required": ["id", "type", "data"],
  32554. "additionalProperties": false
  32555. },
  32556. "V2EventWorkspaceFailed": {
  32557. "type": "object",
  32558. "properties": {
  32559. "id": {
  32560. "type": "string",
  32561. "pattern": "^evt_"
  32562. },
  32563. "metadata": {
  32564. "type": "object"
  32565. },
  32566. "durable": {
  32567. "type": "object",
  32568. "properties": {
  32569. "aggregateID": {
  32570. "type": "string"
  32571. },
  32572. "seq": {
  32573. "type": "integer"
  32574. },
  32575. "version": {
  32576. "type": "integer"
  32577. }
  32578. },
  32579. "required": ["aggregateID", "seq", "version"],
  32580. "additionalProperties": false
  32581. },
  32582. "location": {
  32583. "$ref": "#/components/schemas/LocationRef"
  32584. },
  32585. "type": {
  32586. "type": "string",
  32587. "enum": ["workspace.failed"]
  32588. },
  32589. "data": {
  32590. "type": "object",
  32591. "properties": {
  32592. "message": {
  32593. "type": "string"
  32594. }
  32595. },
  32596. "required": ["message"],
  32597. "additionalProperties": false
  32598. }
  32599. },
  32600. "required": ["id", "type", "data"],
  32601. "additionalProperties": false
  32602. },
  32603. "V2EventWorkspaceStatus": {
  32604. "type": "object",
  32605. "properties": {
  32606. "id": {
  32607. "type": "string",
  32608. "pattern": "^evt_"
  32609. },
  32610. "metadata": {
  32611. "type": "object"
  32612. },
  32613. "durable": {
  32614. "type": "object",
  32615. "properties": {
  32616. "aggregateID": {
  32617. "type": "string"
  32618. },
  32619. "seq": {
  32620. "type": "integer"
  32621. },
  32622. "version": {
  32623. "type": "integer"
  32624. }
  32625. },
  32626. "required": ["aggregateID", "seq", "version"],
  32627. "additionalProperties": false
  32628. },
  32629. "location": {
  32630. "$ref": "#/components/schemas/LocationRef"
  32631. },
  32632. "type": {
  32633. "type": "string",
  32634. "enum": ["workspace.status"]
  32635. },
  32636. "data": {
  32637. "type": "object",
  32638. "properties": {
  32639. "workspaceID": {
  32640. "type": "string",
  32641. "pattern": "^wrk"
  32642. },
  32643. "status": {
  32644. "type": "string",
  32645. "enum": ["connected", "connecting", "disconnected", "error"]
  32646. }
  32647. },
  32648. "required": ["workspaceID", "status"],
  32649. "additionalProperties": false
  32650. }
  32651. },
  32652. "required": ["id", "type", "data"],
  32653. "additionalProperties": false
  32654. },
  32655. "V2EventWorktreeReady": {
  32656. "type": "object",
  32657. "properties": {
  32658. "id": {
  32659. "type": "string",
  32660. "pattern": "^evt_"
  32661. },
  32662. "metadata": {
  32663. "type": "object"
  32664. },
  32665. "durable": {
  32666. "type": "object",
  32667. "properties": {
  32668. "aggregateID": {
  32669. "type": "string"
  32670. },
  32671. "seq": {
  32672. "type": "integer"
  32673. },
  32674. "version": {
  32675. "type": "integer"
  32676. }
  32677. },
  32678. "required": ["aggregateID", "seq", "version"],
  32679. "additionalProperties": false
  32680. },
  32681. "location": {
  32682. "$ref": "#/components/schemas/LocationRef"
  32683. },
  32684. "type": {
  32685. "type": "string",
  32686. "enum": ["worktree.ready"]
  32687. },
  32688. "data": {
  32689. "type": "object",
  32690. "properties": {
  32691. "name": {
  32692. "type": "string"
  32693. },
  32694. "branch": {
  32695. "type": "string"
  32696. }
  32697. },
  32698. "required": ["name"],
  32699. "additionalProperties": false
  32700. }
  32701. },
  32702. "required": ["id", "type", "data"],
  32703. "additionalProperties": false
  32704. },
  32705. "V2EventWorktreeFailed": {
  32706. "type": "object",
  32707. "properties": {
  32708. "id": {
  32709. "type": "string",
  32710. "pattern": "^evt_"
  32711. },
  32712. "metadata": {
  32713. "type": "object"
  32714. },
  32715. "durable": {
  32716. "type": "object",
  32717. "properties": {
  32718. "aggregateID": {
  32719. "type": "string"
  32720. },
  32721. "seq": {
  32722. "type": "integer"
  32723. },
  32724. "version": {
  32725. "type": "integer"
  32726. }
  32727. },
  32728. "required": ["aggregateID", "seq", "version"],
  32729. "additionalProperties": false
  32730. },
  32731. "location": {
  32732. "$ref": "#/components/schemas/LocationRef"
  32733. },
  32734. "type": {
  32735. "type": "string",
  32736. "enum": ["worktree.failed"]
  32737. },
  32738. "data": {
  32739. "type": "object",
  32740. "properties": {
  32741. "message": {
  32742. "type": "string"
  32743. }
  32744. },
  32745. "required": ["message"],
  32746. "additionalProperties": false
  32747. }
  32748. },
  32749. "required": ["id", "type", "data"],
  32750. "additionalProperties": false
  32751. },
  32752. "V2EventServerConnected": {
  32753. "type": "object",
  32754. "properties": {
  32755. "id": {
  32756. "type": "string",
  32757. "pattern": "^evt_"
  32758. },
  32759. "metadata": {
  32760. "type": "object"
  32761. },
  32762. "durable": {
  32763. "type": "object",
  32764. "properties": {
  32765. "aggregateID": {
  32766. "type": "string"
  32767. },
  32768. "seq": {
  32769. "type": "integer"
  32770. },
  32771. "version": {
  32772. "type": "integer"
  32773. }
  32774. },
  32775. "required": ["aggregateID", "seq", "version"],
  32776. "additionalProperties": false
  32777. },
  32778. "location": {
  32779. "$ref": "#/components/schemas/LocationRef"
  32780. },
  32781. "type": {
  32782. "type": "string",
  32783. "enum": ["server.connected"]
  32784. },
  32785. "data": {
  32786. "type": "object",
  32787. "properties": {}
  32788. }
  32789. },
  32790. "required": ["id", "type", "data"],
  32791. "additionalProperties": false
  32792. },
  32793. "V2EventGlobalDisposed": {
  32794. "type": "object",
  32795. "properties": {
  32796. "id": {
  32797. "type": "string",
  32798. "pattern": "^evt_"
  32799. },
  32800. "metadata": {
  32801. "type": "object"
  32802. },
  32803. "durable": {
  32804. "type": "object",
  32805. "properties": {
  32806. "aggregateID": {
  32807. "type": "string"
  32808. },
  32809. "seq": {
  32810. "type": "integer"
  32811. },
  32812. "version": {
  32813. "type": "integer"
  32814. }
  32815. },
  32816. "required": ["aggregateID", "seq", "version"],
  32817. "additionalProperties": false
  32818. },
  32819. "location": {
  32820. "$ref": "#/components/schemas/LocationRef"
  32821. },
  32822. "type": {
  32823. "type": "string",
  32824. "enum": ["global.disposed"]
  32825. },
  32826. "data": {
  32827. "type": "object",
  32828. "properties": {}
  32829. }
  32830. },
  32831. "required": ["id", "type", "data"],
  32832. "additionalProperties": false
  32833. },
  32834. "QuestionV2Request": {
  32835. "type": "object",
  32836. "properties": {
  32837. "id": {
  32838. "type": "string",
  32839. "pattern": "^que"
  32840. },
  32841. "sessionID": {
  32842. "type": "string",
  32843. "pattern": "^ses"
  32844. },
  32845. "questions": {
  32846. "type": "array",
  32847. "items": {
  32848. "$ref": "#/components/schemas/QuestionV2Info"
  32849. },
  32850. "description": "Questions to ask"
  32851. },
  32852. "tool": {
  32853. "$ref": "#/components/schemas/QuestionV2Tool"
  32854. }
  32855. },
  32856. "required": ["id", "sessionID", "questions"],
  32857. "additionalProperties": false
  32858. },
  32859. "QuestionV2Reply": {
  32860. "type": "object",
  32861. "properties": {
  32862. "answers": {
  32863. "type": "array",
  32864. "items": {
  32865. "$ref": "#/components/schemas/QuestionV2Answer"
  32866. },
  32867. "description": "User answers in order of questions (each answer is an array of selected labels)"
  32868. }
  32869. },
  32870. "required": ["answers"],
  32871. "additionalProperties": false
  32872. },
  32873. "ReferenceLocalSource": {
  32874. "type": "object",
  32875. "properties": {
  32876. "type": {
  32877. "type": "string",
  32878. "enum": ["local"]
  32879. },
  32880. "path": {
  32881. "type": "string"
  32882. },
  32883. "description": {
  32884. "type": "string"
  32885. },
  32886. "hidden": {
  32887. "type": "boolean"
  32888. }
  32889. },
  32890. "required": ["type", "path"],
  32891. "additionalProperties": false
  32892. },
  32893. "ReferenceGitSource": {
  32894. "type": "object",
  32895. "properties": {
  32896. "type": {
  32897. "type": "string",
  32898. "enum": ["git"]
  32899. },
  32900. "repository": {
  32901. "type": "string"
  32902. },
  32903. "branch": {
  32904. "type": "string"
  32905. },
  32906. "description": {
  32907. "type": "string"
  32908. },
  32909. "hidden": {
  32910. "type": "boolean"
  32911. }
  32912. },
  32913. "required": ["type", "repository"],
  32914. "additionalProperties": false
  32915. },
  32916. "ReferenceInfo": {
  32917. "type": "object",
  32918. "properties": {
  32919. "name": {
  32920. "type": "string"
  32921. },
  32922. "path": {
  32923. "type": "string"
  32924. },
  32925. "description": {
  32926. "type": "string"
  32927. },
  32928. "hidden": {
  32929. "type": "boolean"
  32930. },
  32931. "source": {
  32932. "anyOf": [
  32933. {
  32934. "$ref": "#/components/schemas/ReferenceLocalSource"
  32935. },
  32936. {
  32937. "$ref": "#/components/schemas/ReferenceGitSource"
  32938. }
  32939. ]
  32940. }
  32941. },
  32942. "required": ["name", "path", "source"],
  32943. "additionalProperties": false
  32944. },
  32945. "ProjectCopyCopy": {
  32946. "type": "object",
  32947. "properties": {
  32948. "directory": {
  32949. "type": "string"
  32950. }
  32951. },
  32952. "required": ["directory"],
  32953. "additionalProperties": false
  32954. },
  32955. "EventModels-devRefreshed": {
  32956. "type": "object",
  32957. "properties": {
  32958. "id": {
  32959. "type": "string",
  32960. "pattern": "^evt_"
  32961. },
  32962. "type": {
  32963. "type": "string",
  32964. "enum": ["models-dev.refreshed"]
  32965. },
  32966. "properties": {
  32967. "type": "object",
  32968. "properties": {}
  32969. }
  32970. },
  32971. "required": ["id", "type", "properties"],
  32972. "additionalProperties": false
  32973. },
  32974. "EventIntegrationUpdated": {
  32975. "type": "object",
  32976. "properties": {
  32977. "id": {
  32978. "type": "string",
  32979. "pattern": "^evt_"
  32980. },
  32981. "type": {
  32982. "type": "string",
  32983. "enum": ["integration.updated"]
  32984. },
  32985. "properties": {
  32986. "type": "object",
  32987. "properties": {}
  32988. }
  32989. },
  32990. "required": ["id", "type", "properties"],
  32991. "additionalProperties": false
  32992. },
  32993. "EventCatalogUpdated": {
  32994. "type": "object",
  32995. "properties": {
  32996. "id": {
  32997. "type": "string",
  32998. "pattern": "^evt_"
  32999. },
  33000. "type": {
  33001. "type": "string",
  33002. "enum": ["catalog.updated"]
  33003. },
  33004. "properties": {
  33005. "type": "object",
  33006. "properties": {}
  33007. }
  33008. },
  33009. "required": ["id", "type", "properties"],
  33010. "additionalProperties": false
  33011. },
  33012. "EventSessionCreated": {
  33013. "type": "object",
  33014. "properties": {
  33015. "id": {
  33016. "type": "string",
  33017. "pattern": "^evt_"
  33018. },
  33019. "type": {
  33020. "type": "string",
  33021. "enum": ["session.created"]
  33022. },
  33023. "properties": {
  33024. "type": "object",
  33025. "properties": {
  33026. "sessionID": {
  33027. "type": "string",
  33028. "pattern": "^ses"
  33029. },
  33030. "info": {
  33031. "$ref": "#/components/schemas/Session"
  33032. }
  33033. },
  33034. "required": ["sessionID", "info"],
  33035. "additionalProperties": false
  33036. }
  33037. },
  33038. "required": ["id", "type", "properties"],
  33039. "additionalProperties": false
  33040. },
  33041. "EventSessionUpdated": {
  33042. "type": "object",
  33043. "properties": {
  33044. "id": {
  33045. "type": "string",
  33046. "pattern": "^evt_"
  33047. },
  33048. "type": {
  33049. "type": "string",
  33050. "enum": ["session.updated"]
  33051. },
  33052. "properties": {
  33053. "type": "object",
  33054. "properties": {
  33055. "sessionID": {
  33056. "type": "string",
  33057. "pattern": "^ses"
  33058. },
  33059. "info": {
  33060. "$ref": "#/components/schemas/Session"
  33061. }
  33062. },
  33063. "required": ["sessionID", "info"],
  33064. "additionalProperties": false
  33065. }
  33066. },
  33067. "required": ["id", "type", "properties"],
  33068. "additionalProperties": false
  33069. },
  33070. "EventSessionDeleted": {
  33071. "type": "object",
  33072. "properties": {
  33073. "id": {
  33074. "type": "string",
  33075. "pattern": "^evt_"
  33076. },
  33077. "type": {
  33078. "type": "string",
  33079. "enum": ["session.deleted"]
  33080. },
  33081. "properties": {
  33082. "type": "object",
  33083. "properties": {
  33084. "sessionID": {
  33085. "type": "string",
  33086. "pattern": "^ses"
  33087. },
  33088. "info": {
  33089. "$ref": "#/components/schemas/Session"
  33090. }
  33091. },
  33092. "required": ["sessionID", "info"],
  33093. "additionalProperties": false
  33094. }
  33095. },
  33096. "required": ["id", "type", "properties"],
  33097. "additionalProperties": false
  33098. },
  33099. "EventMessageUpdated": {
  33100. "type": "object",
  33101. "properties": {
  33102. "id": {
  33103. "type": "string",
  33104. "pattern": "^evt_"
  33105. },
  33106. "type": {
  33107. "type": "string",
  33108. "enum": ["message.updated"]
  33109. },
  33110. "properties": {
  33111. "type": "object",
  33112. "properties": {
  33113. "sessionID": {
  33114. "type": "string",
  33115. "pattern": "^ses"
  33116. },
  33117. "info": {
  33118. "$ref": "#/components/schemas/Message"
  33119. }
  33120. },
  33121. "required": ["sessionID", "info"],
  33122. "additionalProperties": false
  33123. }
  33124. },
  33125. "required": ["id", "type", "properties"],
  33126. "additionalProperties": false
  33127. },
  33128. "EventMessageRemoved": {
  33129. "type": "object",
  33130. "properties": {
  33131. "id": {
  33132. "type": "string",
  33133. "pattern": "^evt_"
  33134. },
  33135. "type": {
  33136. "type": "string",
  33137. "enum": ["message.removed"]
  33138. },
  33139. "properties": {
  33140. "type": "object",
  33141. "properties": {
  33142. "sessionID": {
  33143. "type": "string",
  33144. "pattern": "^ses"
  33145. },
  33146. "messageID": {
  33147. "type": "string",
  33148. "pattern": "^msg"
  33149. }
  33150. },
  33151. "required": ["sessionID", "messageID"],
  33152. "additionalProperties": false
  33153. }
  33154. },
  33155. "required": ["id", "type", "properties"],
  33156. "additionalProperties": false
  33157. },
  33158. "EventMessagePartUpdated": {
  33159. "type": "object",
  33160. "properties": {
  33161. "id": {
  33162. "type": "string",
  33163. "pattern": "^evt_"
  33164. },
  33165. "type": {
  33166. "type": "string",
  33167. "enum": ["message.part.updated"]
  33168. },
  33169. "properties": {
  33170. "type": "object",
  33171. "properties": {
  33172. "sessionID": {
  33173. "type": "string",
  33174. "pattern": "^ses"
  33175. },
  33176. "part": {
  33177. "$ref": "#/components/schemas/Part"
  33178. },
  33179. "time": {
  33180. "type": "number"
  33181. }
  33182. },
  33183. "required": ["sessionID", "part", "time"],
  33184. "additionalProperties": false
  33185. }
  33186. },
  33187. "required": ["id", "type", "properties"],
  33188. "additionalProperties": false
  33189. },
  33190. "EventMessagePartRemoved": {
  33191. "type": "object",
  33192. "properties": {
  33193. "id": {
  33194. "type": "string",
  33195. "pattern": "^evt_"
  33196. },
  33197. "type": {
  33198. "type": "string",
  33199. "enum": ["message.part.removed"]
  33200. },
  33201. "properties": {
  33202. "type": "object",
  33203. "properties": {
  33204. "sessionID": {
  33205. "type": "string",
  33206. "pattern": "^ses"
  33207. },
  33208. "messageID": {
  33209. "type": "string",
  33210. "pattern": "^msg"
  33211. },
  33212. "partID": {
  33213. "type": "string",
  33214. "pattern": "^prt"
  33215. }
  33216. },
  33217. "required": ["sessionID", "messageID", "partID"],
  33218. "additionalProperties": false
  33219. }
  33220. },
  33221. "required": ["id", "type", "properties"],
  33222. "additionalProperties": false
  33223. },
  33224. "EventSessionNextAgentSwitched": {
  33225. "type": "object",
  33226. "properties": {
  33227. "id": {
  33228. "type": "string",
  33229. "pattern": "^evt_"
  33230. },
  33231. "type": {
  33232. "type": "string",
  33233. "enum": ["session.next.agent.switched"]
  33234. },
  33235. "properties": {
  33236. "type": "object",
  33237. "properties": {
  33238. "timestamp": {
  33239. "type": "number"
  33240. },
  33241. "sessionID": {
  33242. "type": "string",
  33243. "pattern": "^ses"
  33244. },
  33245. "messageID": {
  33246. "type": "string",
  33247. "pattern": "^msg_"
  33248. },
  33249. "agent": {
  33250. "type": "string"
  33251. }
  33252. },
  33253. "required": ["timestamp", "sessionID", "messageID", "agent"],
  33254. "additionalProperties": false
  33255. }
  33256. },
  33257. "required": ["id", "type", "properties"],
  33258. "additionalProperties": false
  33259. },
  33260. "EventSessionNextModelSwitched": {
  33261. "type": "object",
  33262. "properties": {
  33263. "id": {
  33264. "type": "string",
  33265. "pattern": "^evt_"
  33266. },
  33267. "type": {
  33268. "type": "string",
  33269. "enum": ["session.next.model.switched"]
  33270. },
  33271. "properties": {
  33272. "type": "object",
  33273. "properties": {
  33274. "timestamp": {
  33275. "type": "number"
  33276. },
  33277. "sessionID": {
  33278. "type": "string",
  33279. "pattern": "^ses"
  33280. },
  33281. "messageID": {
  33282. "type": "string",
  33283. "pattern": "^msg_"
  33284. },
  33285. "model": {
  33286. "type": "object",
  33287. "properties": {
  33288. "id": {
  33289. "type": "string"
  33290. },
  33291. "providerID": {
  33292. "type": "string"
  33293. },
  33294. "variant": {
  33295. "type": "string"
  33296. }
  33297. },
  33298. "required": ["id", "providerID"],
  33299. "additionalProperties": false
  33300. }
  33301. },
  33302. "required": ["timestamp", "sessionID", "messageID", "model"],
  33303. "additionalProperties": false
  33304. }
  33305. },
  33306. "required": ["id", "type", "properties"],
  33307. "additionalProperties": false
  33308. },
  33309. "EventSessionNextMoved": {
  33310. "type": "object",
  33311. "properties": {
  33312. "id": {
  33313. "type": "string",
  33314. "pattern": "^evt_"
  33315. },
  33316. "type": {
  33317. "type": "string",
  33318. "enum": ["session.next.moved"]
  33319. },
  33320. "properties": {
  33321. "type": "object",
  33322. "properties": {
  33323. "timestamp": {
  33324. "type": "number"
  33325. },
  33326. "sessionID": {
  33327. "type": "string",
  33328. "pattern": "^ses"
  33329. },
  33330. "location": {
  33331. "$ref": "#/components/schemas/LocationRef"
  33332. },
  33333. "subdirectory": {
  33334. "type": "string"
  33335. }
  33336. },
  33337. "required": ["timestamp", "sessionID", "location"],
  33338. "additionalProperties": false
  33339. }
  33340. },
  33341. "required": ["id", "type", "properties"],
  33342. "additionalProperties": false
  33343. },
  33344. "EventSessionNextPrompted": {
  33345. "type": "object",
  33346. "properties": {
  33347. "id": {
  33348. "type": "string",
  33349. "pattern": "^evt_"
  33350. },
  33351. "type": {
  33352. "type": "string",
  33353. "enum": ["session.next.prompted"]
  33354. },
  33355. "properties": {
  33356. "type": "object",
  33357. "properties": {
  33358. "timestamp": {
  33359. "type": "number"
  33360. },
  33361. "sessionID": {
  33362. "type": "string",
  33363. "pattern": "^ses"
  33364. },
  33365. "messageID": {
  33366. "type": "string",
  33367. "pattern": "^msg_"
  33368. },
  33369. "prompt": {
  33370. "$ref": "#/components/schemas/Prompt"
  33371. },
  33372. "delivery": {
  33373. "type": "string",
  33374. "enum": ["steer", "queue"]
  33375. }
  33376. },
  33377. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  33378. "additionalProperties": false
  33379. }
  33380. },
  33381. "required": ["id", "type", "properties"],
  33382. "additionalProperties": false
  33383. },
  33384. "EventSessionNextPromptAdmitted": {
  33385. "type": "object",
  33386. "properties": {
  33387. "id": {
  33388. "type": "string",
  33389. "pattern": "^evt_"
  33390. },
  33391. "type": {
  33392. "type": "string",
  33393. "enum": ["session.next.prompt.admitted"]
  33394. },
  33395. "properties": {
  33396. "type": "object",
  33397. "properties": {
  33398. "timestamp": {
  33399. "type": "number"
  33400. },
  33401. "sessionID": {
  33402. "type": "string",
  33403. "pattern": "^ses"
  33404. },
  33405. "messageID": {
  33406. "type": "string",
  33407. "pattern": "^msg_"
  33408. },
  33409. "prompt": {
  33410. "$ref": "#/components/schemas/Prompt"
  33411. },
  33412. "delivery": {
  33413. "type": "string",
  33414. "enum": ["steer", "queue"]
  33415. }
  33416. },
  33417. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  33418. "additionalProperties": false
  33419. }
  33420. },
  33421. "required": ["id", "type", "properties"],
  33422. "additionalProperties": false
  33423. },
  33424. "EventSessionNextPromptPromoted": {
  33425. "type": "object",
  33426. "properties": {
  33427. "id": {
  33428. "type": "string",
  33429. "pattern": "^evt_"
  33430. },
  33431. "type": {
  33432. "type": "string",
  33433. "enum": ["session.next.prompt.promoted"]
  33434. },
  33435. "properties": {
  33436. "type": "object",
  33437. "properties": {
  33438. "timestamp": {
  33439. "type": "number"
  33440. },
  33441. "sessionID": {
  33442. "type": "string",
  33443. "pattern": "^ses"
  33444. },
  33445. "messageID": {
  33446. "type": "string",
  33447. "pattern": "^msg_"
  33448. },
  33449. "prompt": {
  33450. "$ref": "#/components/schemas/Prompt"
  33451. },
  33452. "timeCreated": {
  33453. "type": "number"
  33454. }
  33455. },
  33456. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  33457. "additionalProperties": false
  33458. }
  33459. },
  33460. "required": ["id", "type", "properties"],
  33461. "additionalProperties": false
  33462. },
  33463. "EventSessionNextInterruptRequested": {
  33464. "type": "object",
  33465. "properties": {
  33466. "id": {
  33467. "type": "string",
  33468. "pattern": "^evt_"
  33469. },
  33470. "type": {
  33471. "type": "string",
  33472. "enum": ["session.next.interrupt.requested"]
  33473. },
  33474. "properties": {
  33475. "type": "object",
  33476. "properties": {
  33477. "timestamp": {
  33478. "type": "number"
  33479. },
  33480. "sessionID": {
  33481. "type": "string",
  33482. "pattern": "^ses"
  33483. }
  33484. },
  33485. "required": ["timestamp", "sessionID"],
  33486. "additionalProperties": false
  33487. }
  33488. },
  33489. "required": ["id", "type", "properties"],
  33490. "additionalProperties": false
  33491. },
  33492. "EventSessionNextContextUpdated": {
  33493. "type": "object",
  33494. "properties": {
  33495. "id": {
  33496. "type": "string",
  33497. "pattern": "^evt_"
  33498. },
  33499. "type": {
  33500. "type": "string",
  33501. "enum": ["session.next.context.updated"]
  33502. },
  33503. "properties": {
  33504. "type": "object",
  33505. "properties": {
  33506. "timestamp": {
  33507. "type": "number"
  33508. },
  33509. "sessionID": {
  33510. "type": "string",
  33511. "pattern": "^ses"
  33512. },
  33513. "messageID": {
  33514. "type": "string",
  33515. "pattern": "^msg_"
  33516. },
  33517. "text": {
  33518. "type": "string"
  33519. }
  33520. },
  33521. "required": ["timestamp", "sessionID", "messageID", "text"],
  33522. "additionalProperties": false
  33523. }
  33524. },
  33525. "required": ["id", "type", "properties"],
  33526. "additionalProperties": false
  33527. },
  33528. "EventSessionNextSynthetic": {
  33529. "type": "object",
  33530. "properties": {
  33531. "id": {
  33532. "type": "string",
  33533. "pattern": "^evt_"
  33534. },
  33535. "type": {
  33536. "type": "string",
  33537. "enum": ["session.next.synthetic"]
  33538. },
  33539. "properties": {
  33540. "type": "object",
  33541. "properties": {
  33542. "timestamp": {
  33543. "type": "number"
  33544. },
  33545. "sessionID": {
  33546. "type": "string",
  33547. "pattern": "^ses"
  33548. },
  33549. "messageID": {
  33550. "type": "string",
  33551. "pattern": "^msg_"
  33552. },
  33553. "text": {
  33554. "type": "string"
  33555. }
  33556. },
  33557. "required": ["timestamp", "sessionID", "messageID", "text"],
  33558. "additionalProperties": false
  33559. }
  33560. },
  33561. "required": ["id", "type", "properties"],
  33562. "additionalProperties": false
  33563. },
  33564. "EventSessionNextShellStarted": {
  33565. "type": "object",
  33566. "properties": {
  33567. "id": {
  33568. "type": "string",
  33569. "pattern": "^evt_"
  33570. },
  33571. "type": {
  33572. "type": "string",
  33573. "enum": ["session.next.shell.started"]
  33574. },
  33575. "properties": {
  33576. "type": "object",
  33577. "properties": {
  33578. "timestamp": {
  33579. "type": "number"
  33580. },
  33581. "sessionID": {
  33582. "type": "string",
  33583. "pattern": "^ses"
  33584. },
  33585. "messageID": {
  33586. "type": "string",
  33587. "pattern": "^msg_"
  33588. },
  33589. "callID": {
  33590. "type": "string"
  33591. },
  33592. "command": {
  33593. "type": "string"
  33594. }
  33595. },
  33596. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  33597. "additionalProperties": false
  33598. }
  33599. },
  33600. "required": ["id", "type", "properties"],
  33601. "additionalProperties": false
  33602. },
  33603. "EventSessionNextShellEnded": {
  33604. "type": "object",
  33605. "properties": {
  33606. "id": {
  33607. "type": "string",
  33608. "pattern": "^evt_"
  33609. },
  33610. "type": {
  33611. "type": "string",
  33612. "enum": ["session.next.shell.ended"]
  33613. },
  33614. "properties": {
  33615. "type": "object",
  33616. "properties": {
  33617. "timestamp": {
  33618. "type": "number"
  33619. },
  33620. "sessionID": {
  33621. "type": "string",
  33622. "pattern": "^ses"
  33623. },
  33624. "callID": {
  33625. "type": "string"
  33626. },
  33627. "output": {
  33628. "type": "string"
  33629. }
  33630. },
  33631. "required": ["timestamp", "sessionID", "callID", "output"],
  33632. "additionalProperties": false
  33633. }
  33634. },
  33635. "required": ["id", "type", "properties"],
  33636. "additionalProperties": false
  33637. },
  33638. "EventSessionNextStepStarted": {
  33639. "type": "object",
  33640. "properties": {
  33641. "id": {
  33642. "type": "string",
  33643. "pattern": "^evt_"
  33644. },
  33645. "type": {
  33646. "type": "string",
  33647. "enum": ["session.next.step.started"]
  33648. },
  33649. "properties": {
  33650. "type": "object",
  33651. "properties": {
  33652. "timestamp": {
  33653. "type": "number"
  33654. },
  33655. "sessionID": {
  33656. "type": "string",
  33657. "pattern": "^ses"
  33658. },
  33659. "assistantMessageID": {
  33660. "type": "string",
  33661. "pattern": "^msg_"
  33662. },
  33663. "agent": {
  33664. "type": "string"
  33665. },
  33666. "model": {
  33667. "type": "object",
  33668. "properties": {
  33669. "id": {
  33670. "type": "string"
  33671. },
  33672. "providerID": {
  33673. "type": "string"
  33674. },
  33675. "variant": {
  33676. "type": "string"
  33677. }
  33678. },
  33679. "required": ["id", "providerID"],
  33680. "additionalProperties": false
  33681. },
  33682. "snapshot": {
  33683. "type": "string"
  33684. }
  33685. },
  33686. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  33687. "additionalProperties": false
  33688. }
  33689. },
  33690. "required": ["id", "type", "properties"],
  33691. "additionalProperties": false
  33692. },
  33693. "EventSessionNextStepEnded": {
  33694. "type": "object",
  33695. "properties": {
  33696. "id": {
  33697. "type": "string",
  33698. "pattern": "^evt_"
  33699. },
  33700. "type": {
  33701. "type": "string",
  33702. "enum": ["session.next.step.ended"]
  33703. },
  33704. "properties": {
  33705. "type": "object",
  33706. "properties": {
  33707. "timestamp": {
  33708. "type": "number"
  33709. },
  33710. "sessionID": {
  33711. "type": "string",
  33712. "pattern": "^ses"
  33713. },
  33714. "assistantMessageID": {
  33715. "type": "string",
  33716. "pattern": "^msg_"
  33717. },
  33718. "finish": {
  33719. "type": "string"
  33720. },
  33721. "cost": {
  33722. "type": "number"
  33723. },
  33724. "tokens": {
  33725. "type": "object",
  33726. "properties": {
  33727. "input": {
  33728. "type": "number"
  33729. },
  33730. "output": {
  33731. "type": "number"
  33732. },
  33733. "reasoning": {
  33734. "type": "number"
  33735. },
  33736. "cache": {
  33737. "type": "object",
  33738. "properties": {
  33739. "read": {
  33740. "type": "number"
  33741. },
  33742. "write": {
  33743. "type": "number"
  33744. }
  33745. },
  33746. "required": ["read", "write"],
  33747. "additionalProperties": false
  33748. }
  33749. },
  33750. "required": ["input", "output", "reasoning", "cache"],
  33751. "additionalProperties": false
  33752. },
  33753. "snapshot": {
  33754. "type": "string"
  33755. }
  33756. },
  33757. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  33758. "additionalProperties": false
  33759. }
  33760. },
  33761. "required": ["id", "type", "properties"],
  33762. "additionalProperties": false
  33763. },
  33764. "EventSessionNextStepFailed": {
  33765. "type": "object",
  33766. "properties": {
  33767. "id": {
  33768. "type": "string",
  33769. "pattern": "^evt_"
  33770. },
  33771. "type": {
  33772. "type": "string",
  33773. "enum": ["session.next.step.failed"]
  33774. },
  33775. "properties": {
  33776. "type": "object",
  33777. "properties": {
  33778. "timestamp": {
  33779. "type": "number"
  33780. },
  33781. "sessionID": {
  33782. "type": "string",
  33783. "pattern": "^ses"
  33784. },
  33785. "assistantMessageID": {
  33786. "type": "string",
  33787. "pattern": "^msg_"
  33788. },
  33789. "error": {
  33790. "$ref": "#/components/schemas/SessionErrorUnknown"
  33791. }
  33792. },
  33793. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  33794. "additionalProperties": false
  33795. }
  33796. },
  33797. "required": ["id", "type", "properties"],
  33798. "additionalProperties": false
  33799. },
  33800. "EventSessionNextTextStarted": {
  33801. "type": "object",
  33802. "properties": {
  33803. "id": {
  33804. "type": "string",
  33805. "pattern": "^evt_"
  33806. },
  33807. "type": {
  33808. "type": "string",
  33809. "enum": ["session.next.text.started"]
  33810. },
  33811. "properties": {
  33812. "type": "object",
  33813. "properties": {
  33814. "timestamp": {
  33815. "type": "number"
  33816. },
  33817. "sessionID": {
  33818. "type": "string",
  33819. "pattern": "^ses"
  33820. },
  33821. "assistantMessageID": {
  33822. "type": "string",
  33823. "pattern": "^msg_"
  33824. },
  33825. "textID": {
  33826. "type": "string"
  33827. }
  33828. },
  33829. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  33830. "additionalProperties": false
  33831. }
  33832. },
  33833. "required": ["id", "type", "properties"],
  33834. "additionalProperties": false
  33835. },
  33836. "EventSessionNextTextDelta": {
  33837. "type": "object",
  33838. "properties": {
  33839. "id": {
  33840. "type": "string",
  33841. "pattern": "^evt_"
  33842. },
  33843. "type": {
  33844. "type": "string",
  33845. "enum": ["session.next.text.delta"]
  33846. },
  33847. "properties": {
  33848. "type": "object",
  33849. "properties": {
  33850. "timestamp": {
  33851. "type": "number"
  33852. },
  33853. "sessionID": {
  33854. "type": "string",
  33855. "pattern": "^ses"
  33856. },
  33857. "assistantMessageID": {
  33858. "type": "string",
  33859. "pattern": "^msg_"
  33860. },
  33861. "textID": {
  33862. "type": "string"
  33863. },
  33864. "delta": {
  33865. "type": "string"
  33866. }
  33867. },
  33868. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  33869. "additionalProperties": false
  33870. }
  33871. },
  33872. "required": ["id", "type", "properties"],
  33873. "additionalProperties": false
  33874. },
  33875. "EventSessionNextTextEnded": {
  33876. "type": "object",
  33877. "properties": {
  33878. "id": {
  33879. "type": "string",
  33880. "pattern": "^evt_"
  33881. },
  33882. "type": {
  33883. "type": "string",
  33884. "enum": ["session.next.text.ended"]
  33885. },
  33886. "properties": {
  33887. "type": "object",
  33888. "properties": {
  33889. "timestamp": {
  33890. "type": "number"
  33891. },
  33892. "sessionID": {
  33893. "type": "string",
  33894. "pattern": "^ses"
  33895. },
  33896. "assistantMessageID": {
  33897. "type": "string",
  33898. "pattern": "^msg_"
  33899. },
  33900. "textID": {
  33901. "type": "string"
  33902. },
  33903. "text": {
  33904. "type": "string"
  33905. }
  33906. },
  33907. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  33908. "additionalProperties": false
  33909. }
  33910. },
  33911. "required": ["id", "type", "properties"],
  33912. "additionalProperties": false
  33913. },
  33914. "EventSessionNextReasoningStarted": {
  33915. "type": "object",
  33916. "properties": {
  33917. "id": {
  33918. "type": "string",
  33919. "pattern": "^evt_"
  33920. },
  33921. "type": {
  33922. "type": "string",
  33923. "enum": ["session.next.reasoning.started"]
  33924. },
  33925. "properties": {
  33926. "type": "object",
  33927. "properties": {
  33928. "timestamp": {
  33929. "type": "number"
  33930. },
  33931. "sessionID": {
  33932. "type": "string",
  33933. "pattern": "^ses"
  33934. },
  33935. "assistantMessageID": {
  33936. "type": "string",
  33937. "pattern": "^msg_"
  33938. },
  33939. "reasoningID": {
  33940. "type": "string"
  33941. },
  33942. "providerMetadata": {
  33943. "type": "object",
  33944. "additionalProperties": {
  33945. "type": "object"
  33946. }
  33947. }
  33948. },
  33949. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  33950. "additionalProperties": false
  33951. }
  33952. },
  33953. "required": ["id", "type", "properties"],
  33954. "additionalProperties": false
  33955. },
  33956. "EventSessionNextReasoningDelta": {
  33957. "type": "object",
  33958. "properties": {
  33959. "id": {
  33960. "type": "string",
  33961. "pattern": "^evt_"
  33962. },
  33963. "type": {
  33964. "type": "string",
  33965. "enum": ["session.next.reasoning.delta"]
  33966. },
  33967. "properties": {
  33968. "type": "object",
  33969. "properties": {
  33970. "timestamp": {
  33971. "type": "number"
  33972. },
  33973. "sessionID": {
  33974. "type": "string",
  33975. "pattern": "^ses"
  33976. },
  33977. "assistantMessageID": {
  33978. "type": "string",
  33979. "pattern": "^msg_"
  33980. },
  33981. "reasoningID": {
  33982. "type": "string"
  33983. },
  33984. "delta": {
  33985. "type": "string"
  33986. }
  33987. },
  33988. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  33989. "additionalProperties": false
  33990. }
  33991. },
  33992. "required": ["id", "type", "properties"],
  33993. "additionalProperties": false
  33994. },
  33995. "EventSessionNextReasoningEnded": {
  33996. "type": "object",
  33997. "properties": {
  33998. "id": {
  33999. "type": "string",
  34000. "pattern": "^evt_"
  34001. },
  34002. "type": {
  34003. "type": "string",
  34004. "enum": ["session.next.reasoning.ended"]
  34005. },
  34006. "properties": {
  34007. "type": "object",
  34008. "properties": {
  34009. "timestamp": {
  34010. "type": "number"
  34011. },
  34012. "sessionID": {
  34013. "type": "string",
  34014. "pattern": "^ses"
  34015. },
  34016. "assistantMessageID": {
  34017. "type": "string",
  34018. "pattern": "^msg_"
  34019. },
  34020. "reasoningID": {
  34021. "type": "string"
  34022. },
  34023. "text": {
  34024. "type": "string"
  34025. },
  34026. "providerMetadata": {
  34027. "type": "object",
  34028. "additionalProperties": {
  34029. "type": "object"
  34030. }
  34031. }
  34032. },
  34033. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  34034. "additionalProperties": false
  34035. }
  34036. },
  34037. "required": ["id", "type", "properties"],
  34038. "additionalProperties": false
  34039. },
  34040. "EventSessionNextToolInputStarted": {
  34041. "type": "object",
  34042. "properties": {
  34043. "id": {
  34044. "type": "string",
  34045. "pattern": "^evt_"
  34046. },
  34047. "type": {
  34048. "type": "string",
  34049. "enum": ["session.next.tool.input.started"]
  34050. },
  34051. "properties": {
  34052. "type": "object",
  34053. "properties": {
  34054. "timestamp": {
  34055. "type": "number"
  34056. },
  34057. "sessionID": {
  34058. "type": "string",
  34059. "pattern": "^ses"
  34060. },
  34061. "assistantMessageID": {
  34062. "type": "string",
  34063. "pattern": "^msg_"
  34064. },
  34065. "callID": {
  34066. "type": "string"
  34067. },
  34068. "name": {
  34069. "type": "string"
  34070. }
  34071. },
  34072. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  34073. "additionalProperties": false
  34074. }
  34075. },
  34076. "required": ["id", "type", "properties"],
  34077. "additionalProperties": false
  34078. },
  34079. "EventSessionNextToolInputDelta": {
  34080. "type": "object",
  34081. "properties": {
  34082. "id": {
  34083. "type": "string",
  34084. "pattern": "^evt_"
  34085. },
  34086. "type": {
  34087. "type": "string",
  34088. "enum": ["session.next.tool.input.delta"]
  34089. },
  34090. "properties": {
  34091. "type": "object",
  34092. "properties": {
  34093. "timestamp": {
  34094. "type": "number"
  34095. },
  34096. "sessionID": {
  34097. "type": "string",
  34098. "pattern": "^ses"
  34099. },
  34100. "assistantMessageID": {
  34101. "type": "string",
  34102. "pattern": "^msg_"
  34103. },
  34104. "callID": {
  34105. "type": "string"
  34106. },
  34107. "delta": {
  34108. "type": "string"
  34109. }
  34110. },
  34111. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  34112. "additionalProperties": false
  34113. }
  34114. },
  34115. "required": ["id", "type", "properties"],
  34116. "additionalProperties": false
  34117. },
  34118. "EventSessionNextToolInputEnded": {
  34119. "type": "object",
  34120. "properties": {
  34121. "id": {
  34122. "type": "string",
  34123. "pattern": "^evt_"
  34124. },
  34125. "type": {
  34126. "type": "string",
  34127. "enum": ["session.next.tool.input.ended"]
  34128. },
  34129. "properties": {
  34130. "type": "object",
  34131. "properties": {
  34132. "timestamp": {
  34133. "type": "number"
  34134. },
  34135. "sessionID": {
  34136. "type": "string",
  34137. "pattern": "^ses"
  34138. },
  34139. "assistantMessageID": {
  34140. "type": "string",
  34141. "pattern": "^msg_"
  34142. },
  34143. "callID": {
  34144. "type": "string"
  34145. },
  34146. "text": {
  34147. "type": "string"
  34148. }
  34149. },
  34150. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  34151. "additionalProperties": false
  34152. }
  34153. },
  34154. "required": ["id", "type", "properties"],
  34155. "additionalProperties": false
  34156. },
  34157. "EventSessionNextToolCalled": {
  34158. "type": "object",
  34159. "properties": {
  34160. "id": {
  34161. "type": "string",
  34162. "pattern": "^evt_"
  34163. },
  34164. "type": {
  34165. "type": "string",
  34166. "enum": ["session.next.tool.called"]
  34167. },
  34168. "properties": {
  34169. "type": "object",
  34170. "properties": {
  34171. "timestamp": {
  34172. "type": "number"
  34173. },
  34174. "sessionID": {
  34175. "type": "string",
  34176. "pattern": "^ses"
  34177. },
  34178. "assistantMessageID": {
  34179. "type": "string",
  34180. "pattern": "^msg_"
  34181. },
  34182. "callID": {
  34183. "type": "string"
  34184. },
  34185. "tool": {
  34186. "type": "string"
  34187. },
  34188. "input": {
  34189. "type": "object"
  34190. },
  34191. "provider": {
  34192. "type": "object",
  34193. "properties": {
  34194. "executed": {
  34195. "type": "boolean"
  34196. },
  34197. "metadata": {
  34198. "type": "object",
  34199. "additionalProperties": {
  34200. "type": "object"
  34201. }
  34202. }
  34203. },
  34204. "required": ["executed"],
  34205. "additionalProperties": false
  34206. }
  34207. },
  34208. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  34209. "additionalProperties": false
  34210. }
  34211. },
  34212. "required": ["id", "type", "properties"],
  34213. "additionalProperties": false
  34214. },
  34215. "EventSessionNextToolProgress": {
  34216. "type": "object",
  34217. "properties": {
  34218. "id": {
  34219. "type": "string",
  34220. "pattern": "^evt_"
  34221. },
  34222. "type": {
  34223. "type": "string",
  34224. "enum": ["session.next.tool.progress"]
  34225. },
  34226. "properties": {
  34227. "type": "object",
  34228. "properties": {
  34229. "timestamp": {
  34230. "type": "number"
  34231. },
  34232. "sessionID": {
  34233. "type": "string",
  34234. "pattern": "^ses"
  34235. },
  34236. "assistantMessageID": {
  34237. "type": "string",
  34238. "pattern": "^msg_"
  34239. },
  34240. "callID": {
  34241. "type": "string"
  34242. },
  34243. "structured": {
  34244. "type": "object"
  34245. },
  34246. "content": {
  34247. "type": "array",
  34248. "items": {
  34249. "anyOf": [
  34250. {
  34251. "$ref": "#/components/schemas/ToolTextContent"
  34252. },
  34253. {
  34254. "$ref": "#/components/schemas/ToolFileContent"
  34255. }
  34256. ]
  34257. }
  34258. }
  34259. },
  34260. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  34261. "additionalProperties": false
  34262. }
  34263. },
  34264. "required": ["id", "type", "properties"],
  34265. "additionalProperties": false
  34266. },
  34267. "EventSessionNextToolSuccess": {
  34268. "type": "object",
  34269. "properties": {
  34270. "id": {
  34271. "type": "string",
  34272. "pattern": "^evt_"
  34273. },
  34274. "type": {
  34275. "type": "string",
  34276. "enum": ["session.next.tool.success"]
  34277. },
  34278. "properties": {
  34279. "type": "object",
  34280. "properties": {
  34281. "timestamp": {
  34282. "type": "number"
  34283. },
  34284. "sessionID": {
  34285. "type": "string",
  34286. "pattern": "^ses"
  34287. },
  34288. "assistantMessageID": {
  34289. "type": "string",
  34290. "pattern": "^msg_"
  34291. },
  34292. "callID": {
  34293. "type": "string"
  34294. },
  34295. "structured": {
  34296. "type": "object"
  34297. },
  34298. "content": {
  34299. "type": "array",
  34300. "items": {
  34301. "anyOf": [
  34302. {
  34303. "$ref": "#/components/schemas/ToolTextContent"
  34304. },
  34305. {
  34306. "$ref": "#/components/schemas/ToolFileContent"
  34307. }
  34308. ]
  34309. }
  34310. },
  34311. "outputPaths": {
  34312. "type": "array",
  34313. "items": {
  34314. "type": "string"
  34315. }
  34316. },
  34317. "result": {},
  34318. "provider": {
  34319. "type": "object",
  34320. "properties": {
  34321. "executed": {
  34322. "type": "boolean"
  34323. },
  34324. "metadata": {
  34325. "type": "object",
  34326. "additionalProperties": {
  34327. "type": "object"
  34328. }
  34329. }
  34330. },
  34331. "required": ["executed"],
  34332. "additionalProperties": false
  34333. }
  34334. },
  34335. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  34336. "additionalProperties": false
  34337. }
  34338. },
  34339. "required": ["id", "type", "properties"],
  34340. "additionalProperties": false
  34341. },
  34342. "EventSessionNextToolFailed": {
  34343. "type": "object",
  34344. "properties": {
  34345. "id": {
  34346. "type": "string",
  34347. "pattern": "^evt_"
  34348. },
  34349. "type": {
  34350. "type": "string",
  34351. "enum": ["session.next.tool.failed"]
  34352. },
  34353. "properties": {
  34354. "type": "object",
  34355. "properties": {
  34356. "timestamp": {
  34357. "type": "number"
  34358. },
  34359. "sessionID": {
  34360. "type": "string",
  34361. "pattern": "^ses"
  34362. },
  34363. "assistantMessageID": {
  34364. "type": "string",
  34365. "pattern": "^msg_"
  34366. },
  34367. "callID": {
  34368. "type": "string"
  34369. },
  34370. "error": {
  34371. "$ref": "#/components/schemas/SessionErrorUnknown"
  34372. },
  34373. "result": {},
  34374. "provider": {
  34375. "type": "object",
  34376. "properties": {
  34377. "executed": {
  34378. "type": "boolean"
  34379. },
  34380. "metadata": {
  34381. "type": "object",
  34382. "additionalProperties": {
  34383. "type": "object"
  34384. }
  34385. }
  34386. },
  34387. "required": ["executed"],
  34388. "additionalProperties": false
  34389. }
  34390. },
  34391. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  34392. "additionalProperties": false
  34393. }
  34394. },
  34395. "required": ["id", "type", "properties"],
  34396. "additionalProperties": false
  34397. },
  34398. "EventSessionNextRetried": {
  34399. "type": "object",
  34400. "properties": {
  34401. "id": {
  34402. "type": "string",
  34403. "pattern": "^evt_"
  34404. },
  34405. "type": {
  34406. "type": "string",
  34407. "enum": ["session.next.retried"]
  34408. },
  34409. "properties": {
  34410. "type": "object",
  34411. "properties": {
  34412. "timestamp": {
  34413. "type": "number"
  34414. },
  34415. "sessionID": {
  34416. "type": "string",
  34417. "pattern": "^ses"
  34418. },
  34419. "attempt": {
  34420. "type": "number"
  34421. },
  34422. "error": {
  34423. "$ref": "#/components/schemas/SessionNextRetry_error"
  34424. }
  34425. },
  34426. "required": ["timestamp", "sessionID", "attempt", "error"],
  34427. "additionalProperties": false
  34428. }
  34429. },
  34430. "required": ["id", "type", "properties"],
  34431. "additionalProperties": false
  34432. },
  34433. "EventSessionNextCompactionStarted": {
  34434. "type": "object",
  34435. "properties": {
  34436. "id": {
  34437. "type": "string",
  34438. "pattern": "^evt_"
  34439. },
  34440. "type": {
  34441. "type": "string",
  34442. "enum": ["session.next.compaction.started"]
  34443. },
  34444. "properties": {
  34445. "type": "object",
  34446. "properties": {
  34447. "timestamp": {
  34448. "type": "number"
  34449. },
  34450. "sessionID": {
  34451. "type": "string",
  34452. "pattern": "^ses"
  34453. },
  34454. "messageID": {
  34455. "type": "string",
  34456. "pattern": "^msg_"
  34457. },
  34458. "reason": {
  34459. "type": "string",
  34460. "enum": ["auto", "manual"]
  34461. }
  34462. },
  34463. "required": ["timestamp", "sessionID", "messageID", "reason"],
  34464. "additionalProperties": false
  34465. }
  34466. },
  34467. "required": ["id", "type", "properties"],
  34468. "additionalProperties": false
  34469. },
  34470. "EventSessionNextCompactionDelta": {
  34471. "type": "object",
  34472. "properties": {
  34473. "id": {
  34474. "type": "string",
  34475. "pattern": "^evt_"
  34476. },
  34477. "type": {
  34478. "type": "string",
  34479. "enum": ["session.next.compaction.delta"]
  34480. },
  34481. "properties": {
  34482. "type": "object",
  34483. "properties": {
  34484. "timestamp": {
  34485. "type": "number"
  34486. },
  34487. "sessionID": {
  34488. "type": "string",
  34489. "pattern": "^ses"
  34490. },
  34491. "messageID": {
  34492. "type": "string",
  34493. "pattern": "^msg_"
  34494. },
  34495. "text": {
  34496. "type": "string"
  34497. }
  34498. },
  34499. "required": ["timestamp", "sessionID", "messageID", "text"],
  34500. "additionalProperties": false
  34501. }
  34502. },
  34503. "required": ["id", "type", "properties"],
  34504. "additionalProperties": false
  34505. },
  34506. "EventSessionNextCompactionEnded": {
  34507. "type": "object",
  34508. "properties": {
  34509. "id": {
  34510. "type": "string",
  34511. "pattern": "^evt_"
  34512. },
  34513. "type": {
  34514. "type": "string",
  34515. "enum": ["session.next.compaction.ended"]
  34516. },
  34517. "properties": {
  34518. "type": "object",
  34519. "properties": {
  34520. "timestamp": {
  34521. "type": "number"
  34522. },
  34523. "sessionID": {
  34524. "type": "string",
  34525. "pattern": "^ses"
  34526. },
  34527. "messageID": {
  34528. "type": "string",
  34529. "pattern": "^msg_"
  34530. },
  34531. "reason": {
  34532. "type": "string",
  34533. "enum": ["auto", "manual"]
  34534. },
  34535. "text": {
  34536. "type": "string"
  34537. },
  34538. "recent": {
  34539. "type": "string"
  34540. }
  34541. },
  34542. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  34543. "additionalProperties": false
  34544. }
  34545. },
  34546. "required": ["id", "type", "properties"],
  34547. "additionalProperties": false
  34548. },
  34549. "EventMessagePartDelta": {
  34550. "type": "object",
  34551. "properties": {
  34552. "id": {
  34553. "type": "string",
  34554. "pattern": "^evt_"
  34555. },
  34556. "type": {
  34557. "type": "string",
  34558. "enum": ["message.part.delta"]
  34559. },
  34560. "properties": {
  34561. "type": "object",
  34562. "properties": {
  34563. "sessionID": {
  34564. "type": "string",
  34565. "pattern": "^ses"
  34566. },
  34567. "messageID": {
  34568. "type": "string",
  34569. "pattern": "^msg"
  34570. },
  34571. "partID": {
  34572. "type": "string",
  34573. "pattern": "^prt"
  34574. },
  34575. "field": {
  34576. "type": "string"
  34577. },
  34578. "delta": {
  34579. "type": "string"
  34580. }
  34581. },
  34582. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  34583. "additionalProperties": false
  34584. }
  34585. },
  34586. "required": ["id", "type", "properties"],
  34587. "additionalProperties": false
  34588. },
  34589. "EventSessionDiff": {
  34590. "type": "object",
  34591. "properties": {
  34592. "id": {
  34593. "type": "string",
  34594. "pattern": "^evt_"
  34595. },
  34596. "type": {
  34597. "type": "string",
  34598. "enum": ["session.diff"]
  34599. },
  34600. "properties": {
  34601. "type": "object",
  34602. "properties": {
  34603. "sessionID": {
  34604. "type": "string",
  34605. "pattern": "^ses"
  34606. },
  34607. "diff": {
  34608. "type": "array",
  34609. "items": {
  34610. "$ref": "#/components/schemas/SnapshotFileDiff"
  34611. }
  34612. }
  34613. },
  34614. "required": ["sessionID", "diff"],
  34615. "additionalProperties": false
  34616. }
  34617. },
  34618. "required": ["id", "type", "properties"],
  34619. "additionalProperties": false
  34620. },
  34621. "EventSessionError": {
  34622. "type": "object",
  34623. "properties": {
  34624. "id": {
  34625. "type": "string",
  34626. "pattern": "^evt_"
  34627. },
  34628. "type": {
  34629. "type": "string",
  34630. "enum": ["session.error"]
  34631. },
  34632. "properties": {
  34633. "type": "object",
  34634. "properties": {
  34635. "sessionID": {
  34636. "type": "string",
  34637. "pattern": "^ses"
  34638. },
  34639. "error": {
  34640. "anyOf": [
  34641. {
  34642. "$ref": "#/components/schemas/ProviderAuthError"
  34643. },
  34644. {
  34645. "$ref": "#/components/schemas/UnknownError"
  34646. },
  34647. {
  34648. "$ref": "#/components/schemas/MessageOutputLengthError"
  34649. },
  34650. {
  34651. "$ref": "#/components/schemas/MessageAbortedError"
  34652. },
  34653. {
  34654. "$ref": "#/components/schemas/StructuredOutputError"
  34655. },
  34656. {
  34657. "$ref": "#/components/schemas/ContextOverflowError"
  34658. },
  34659. {
  34660. "$ref": "#/components/schemas/ContentFilterError"
  34661. },
  34662. {
  34663. "$ref": "#/components/schemas/APIError"
  34664. }
  34665. ]
  34666. }
  34667. },
  34668. "additionalProperties": false
  34669. }
  34670. },
  34671. "required": ["id", "type", "properties"],
  34672. "additionalProperties": false
  34673. },
  34674. "EventInstallationUpdated": {
  34675. "type": "object",
  34676. "properties": {
  34677. "id": {
  34678. "type": "string",
  34679. "pattern": "^evt_"
  34680. },
  34681. "type": {
  34682. "type": "string",
  34683. "enum": ["installation.updated"]
  34684. },
  34685. "properties": {
  34686. "type": "object",
  34687. "properties": {
  34688. "version": {
  34689. "type": "string"
  34690. }
  34691. },
  34692. "required": ["version"],
  34693. "additionalProperties": false
  34694. }
  34695. },
  34696. "required": ["id", "type", "properties"],
  34697. "additionalProperties": false
  34698. },
  34699. "EventInstallationUpdate-available": {
  34700. "type": "object",
  34701. "properties": {
  34702. "id": {
  34703. "type": "string",
  34704. "pattern": "^evt_"
  34705. },
  34706. "type": {
  34707. "type": "string",
  34708. "enum": ["installation.update-available"]
  34709. },
  34710. "properties": {
  34711. "type": "object",
  34712. "properties": {
  34713. "version": {
  34714. "type": "string"
  34715. }
  34716. },
  34717. "required": ["version"],
  34718. "additionalProperties": false
  34719. }
  34720. },
  34721. "required": ["id", "type", "properties"],
  34722. "additionalProperties": false
  34723. },
  34724. "EventFileEdited": {
  34725. "type": "object",
  34726. "properties": {
  34727. "id": {
  34728. "type": "string",
  34729. "pattern": "^evt_"
  34730. },
  34731. "type": {
  34732. "type": "string",
  34733. "enum": ["file.edited"]
  34734. },
  34735. "properties": {
  34736. "type": "object",
  34737. "properties": {
  34738. "file": {
  34739. "type": "string"
  34740. }
  34741. },
  34742. "required": ["file"],
  34743. "additionalProperties": false
  34744. }
  34745. },
  34746. "required": ["id", "type", "properties"],
  34747. "additionalProperties": false
  34748. },
  34749. "EventPluginAdded": {
  34750. "type": "object",
  34751. "properties": {
  34752. "id": {
  34753. "type": "string",
  34754. "pattern": "^evt_"
  34755. },
  34756. "type": {
  34757. "type": "string",
  34758. "enum": ["plugin.added"]
  34759. },
  34760. "properties": {
  34761. "type": "object",
  34762. "properties": {
  34763. "id": {
  34764. "type": "string"
  34765. }
  34766. },
  34767. "required": ["id"],
  34768. "additionalProperties": false
  34769. }
  34770. },
  34771. "required": ["id", "type", "properties"],
  34772. "additionalProperties": false
  34773. },
  34774. "EventPermissionV2Asked": {
  34775. "type": "object",
  34776. "properties": {
  34777. "id": {
  34778. "type": "string",
  34779. "pattern": "^evt_"
  34780. },
  34781. "type": {
  34782. "type": "string",
  34783. "enum": ["permission.v2.asked"]
  34784. },
  34785. "properties": {
  34786. "type": "object",
  34787. "properties": {
  34788. "id": {
  34789. "type": "string",
  34790. "pattern": "^per"
  34791. },
  34792. "sessionID": {
  34793. "type": "string",
  34794. "pattern": "^ses"
  34795. },
  34796. "action": {
  34797. "type": "string"
  34798. },
  34799. "resources": {
  34800. "type": "array",
  34801. "items": {
  34802. "type": "string"
  34803. }
  34804. },
  34805. "save": {
  34806. "type": "array",
  34807. "items": {
  34808. "type": "string"
  34809. }
  34810. },
  34811. "metadata": {
  34812. "type": "object"
  34813. },
  34814. "source": {
  34815. "$ref": "#/components/schemas/PermissionV2Source"
  34816. }
  34817. },
  34818. "required": ["id", "sessionID", "action", "resources"],
  34819. "additionalProperties": false
  34820. }
  34821. },
  34822. "required": ["id", "type", "properties"],
  34823. "additionalProperties": false
  34824. },
  34825. "EventPermissionV2Replied": {
  34826. "type": "object",
  34827. "properties": {
  34828. "id": {
  34829. "type": "string",
  34830. "pattern": "^evt_"
  34831. },
  34832. "type": {
  34833. "type": "string",
  34834. "enum": ["permission.v2.replied"]
  34835. },
  34836. "properties": {
  34837. "type": "object",
  34838. "properties": {
  34839. "sessionID": {
  34840. "type": "string",
  34841. "pattern": "^ses"
  34842. },
  34843. "requestID": {
  34844. "type": "string",
  34845. "pattern": "^per"
  34846. },
  34847. "reply": {
  34848. "$ref": "#/components/schemas/PermissionV2Reply"
  34849. }
  34850. },
  34851. "required": ["sessionID", "requestID", "reply"],
  34852. "additionalProperties": false
  34853. }
  34854. },
  34855. "required": ["id", "type", "properties"],
  34856. "additionalProperties": false
  34857. },
  34858. "EventReferenceUpdated": {
  34859. "type": "object",
  34860. "properties": {
  34861. "id": {
  34862. "type": "string",
  34863. "pattern": "^evt_"
  34864. },
  34865. "type": {
  34866. "type": "string",
  34867. "enum": ["reference.updated"]
  34868. },
  34869. "properties": {
  34870. "type": "object",
  34871. "properties": {}
  34872. }
  34873. },
  34874. "required": ["id", "type", "properties"],
  34875. "additionalProperties": false
  34876. },
  34877. "EventProjectDirectoriesUpdated": {
  34878. "type": "object",
  34879. "properties": {
  34880. "id": {
  34881. "type": "string",
  34882. "pattern": "^evt_"
  34883. },
  34884. "type": {
  34885. "type": "string",
  34886. "enum": ["project.directories.updated"]
  34887. },
  34888. "properties": {
  34889. "type": "object",
  34890. "properties": {
  34891. "projectID": {
  34892. "type": "string"
  34893. }
  34894. },
  34895. "required": ["projectID"],
  34896. "additionalProperties": false
  34897. }
  34898. },
  34899. "required": ["id", "type", "properties"],
  34900. "additionalProperties": false
  34901. },
  34902. "EventFileWatcherUpdated": {
  34903. "type": "object",
  34904. "properties": {
  34905. "id": {
  34906. "type": "string",
  34907. "pattern": "^evt_"
  34908. },
  34909. "type": {
  34910. "type": "string",
  34911. "enum": ["file.watcher.updated"]
  34912. },
  34913. "properties": {
  34914. "type": "object",
  34915. "properties": {
  34916. "file": {
  34917. "type": "string"
  34918. },
  34919. "event": {
  34920. "type": "string",
  34921. "enum": ["add", "change", "unlink"]
  34922. }
  34923. },
  34924. "required": ["file", "event"],
  34925. "additionalProperties": false
  34926. }
  34927. },
  34928. "required": ["id", "type", "properties"],
  34929. "additionalProperties": false
  34930. },
  34931. "EventPtyCreated": {
  34932. "type": "object",
  34933. "properties": {
  34934. "id": {
  34935. "type": "string",
  34936. "pattern": "^evt_"
  34937. },
  34938. "type": {
  34939. "type": "string",
  34940. "enum": ["pty.created"]
  34941. },
  34942. "properties": {
  34943. "type": "object",
  34944. "properties": {
  34945. "info": {
  34946. "$ref": "#/components/schemas/Pty"
  34947. }
  34948. },
  34949. "required": ["info"],
  34950. "additionalProperties": false
  34951. }
  34952. },
  34953. "required": ["id", "type", "properties"],
  34954. "additionalProperties": false
  34955. },
  34956. "EventPtyUpdated": {
  34957. "type": "object",
  34958. "properties": {
  34959. "id": {
  34960. "type": "string",
  34961. "pattern": "^evt_"
  34962. },
  34963. "type": {
  34964. "type": "string",
  34965. "enum": ["pty.updated"]
  34966. },
  34967. "properties": {
  34968. "type": "object",
  34969. "properties": {
  34970. "info": {
  34971. "$ref": "#/components/schemas/Pty"
  34972. }
  34973. },
  34974. "required": ["info"],
  34975. "additionalProperties": false
  34976. }
  34977. },
  34978. "required": ["id", "type", "properties"],
  34979. "additionalProperties": false
  34980. },
  34981. "EventPtyExited": {
  34982. "type": "object",
  34983. "properties": {
  34984. "id": {
  34985. "type": "string",
  34986. "pattern": "^evt_"
  34987. },
  34988. "type": {
  34989. "type": "string",
  34990. "enum": ["pty.exited"]
  34991. },
  34992. "properties": {
  34993. "type": "object",
  34994. "properties": {
  34995. "id": {
  34996. "type": "string",
  34997. "pattern": "^pty"
  34998. },
  34999. "exitCode": {
  35000. "type": "integer",
  35001. "minimum": 0
  35002. }
  35003. },
  35004. "required": ["id", "exitCode"],
  35005. "additionalProperties": false
  35006. }
  35007. },
  35008. "required": ["id", "type", "properties"],
  35009. "additionalProperties": false
  35010. },
  35011. "EventPtyDeleted": {
  35012. "type": "object",
  35013. "properties": {
  35014. "id": {
  35015. "type": "string",
  35016. "pattern": "^evt_"
  35017. },
  35018. "type": {
  35019. "type": "string",
  35020. "enum": ["pty.deleted"]
  35021. },
  35022. "properties": {
  35023. "type": "object",
  35024. "properties": {
  35025. "id": {
  35026. "type": "string",
  35027. "pattern": "^pty"
  35028. }
  35029. },
  35030. "required": ["id"],
  35031. "additionalProperties": false
  35032. }
  35033. },
  35034. "required": ["id", "type", "properties"],
  35035. "additionalProperties": false
  35036. },
  35037. "EventQuestionV2Asked": {
  35038. "type": "object",
  35039. "properties": {
  35040. "id": {
  35041. "type": "string",
  35042. "pattern": "^evt_"
  35043. },
  35044. "type": {
  35045. "type": "string",
  35046. "enum": ["question.v2.asked"]
  35047. },
  35048. "properties": {
  35049. "type": "object",
  35050. "properties": {
  35051. "id": {
  35052. "type": "string",
  35053. "pattern": "^que"
  35054. },
  35055. "sessionID": {
  35056. "type": "string",
  35057. "pattern": "^ses"
  35058. },
  35059. "questions": {
  35060. "type": "array",
  35061. "items": {
  35062. "$ref": "#/components/schemas/QuestionV2Info"
  35063. },
  35064. "description": "Questions to ask"
  35065. },
  35066. "tool": {
  35067. "$ref": "#/components/schemas/QuestionV2Tool"
  35068. }
  35069. },
  35070. "required": ["id", "sessionID", "questions"],
  35071. "additionalProperties": false
  35072. }
  35073. },
  35074. "required": ["id", "type", "properties"],
  35075. "additionalProperties": false
  35076. },
  35077. "EventQuestionV2Replied": {
  35078. "type": "object",
  35079. "properties": {
  35080. "id": {
  35081. "type": "string",
  35082. "pattern": "^evt_"
  35083. },
  35084. "type": {
  35085. "type": "string",
  35086. "enum": ["question.v2.replied"]
  35087. },
  35088. "properties": {
  35089. "type": "object",
  35090. "properties": {
  35091. "sessionID": {
  35092. "type": "string",
  35093. "pattern": "^ses"
  35094. },
  35095. "requestID": {
  35096. "type": "string",
  35097. "pattern": "^que"
  35098. },
  35099. "answers": {
  35100. "type": "array",
  35101. "items": {
  35102. "$ref": "#/components/schemas/QuestionV2Answer"
  35103. }
  35104. }
  35105. },
  35106. "required": ["sessionID", "requestID", "answers"],
  35107. "additionalProperties": false
  35108. }
  35109. },
  35110. "required": ["id", "type", "properties"],
  35111. "additionalProperties": false
  35112. },
  35113. "EventQuestionV2Rejected": {
  35114. "type": "object",
  35115. "properties": {
  35116. "id": {
  35117. "type": "string",
  35118. "pattern": "^evt_"
  35119. },
  35120. "type": {
  35121. "type": "string",
  35122. "enum": ["question.v2.rejected"]
  35123. },
  35124. "properties": {
  35125. "type": "object",
  35126. "properties": {
  35127. "sessionID": {
  35128. "type": "string",
  35129. "pattern": "^ses"
  35130. },
  35131. "requestID": {
  35132. "type": "string",
  35133. "pattern": "^que"
  35134. }
  35135. },
  35136. "required": ["sessionID", "requestID"],
  35137. "additionalProperties": false
  35138. }
  35139. },
  35140. "required": ["id", "type", "properties"],
  35141. "additionalProperties": false
  35142. },
  35143. "EventTodoUpdated": {
  35144. "type": "object",
  35145. "properties": {
  35146. "id": {
  35147. "type": "string",
  35148. "pattern": "^evt_"
  35149. },
  35150. "type": {
  35151. "type": "string",
  35152. "enum": ["todo.updated"]
  35153. },
  35154. "properties": {
  35155. "type": "object",
  35156. "properties": {
  35157. "sessionID": {
  35158. "type": "string",
  35159. "pattern": "^ses"
  35160. },
  35161. "todos": {
  35162. "type": "array",
  35163. "items": {
  35164. "$ref": "#/components/schemas/Todo"
  35165. }
  35166. }
  35167. },
  35168. "required": ["sessionID", "todos"],
  35169. "additionalProperties": false
  35170. }
  35171. },
  35172. "required": ["id", "type", "properties"],
  35173. "additionalProperties": false
  35174. },
  35175. "EventLspUpdated": {
  35176. "type": "object",
  35177. "properties": {
  35178. "id": {
  35179. "type": "string",
  35180. "pattern": "^evt_"
  35181. },
  35182. "type": {
  35183. "type": "string",
  35184. "enum": ["lsp.updated"]
  35185. },
  35186. "properties": {
  35187. "type": "object",
  35188. "properties": {}
  35189. }
  35190. },
  35191. "required": ["id", "type", "properties"],
  35192. "additionalProperties": false
  35193. },
  35194. "EventPermissionAsked": {
  35195. "type": "object",
  35196. "properties": {
  35197. "id": {
  35198. "type": "string",
  35199. "pattern": "^evt_"
  35200. },
  35201. "type": {
  35202. "type": "string",
  35203. "enum": ["permission.asked"]
  35204. },
  35205. "properties": {
  35206. "type": "object",
  35207. "properties": {
  35208. "id": {
  35209. "type": "string",
  35210. "pattern": "^per"
  35211. },
  35212. "sessionID": {
  35213. "type": "string",
  35214. "pattern": "^ses"
  35215. },
  35216. "permission": {
  35217. "type": "string"
  35218. },
  35219. "patterns": {
  35220. "type": "array",
  35221. "items": {
  35222. "type": "string"
  35223. }
  35224. },
  35225. "metadata": {
  35226. "type": "object"
  35227. },
  35228. "always": {
  35229. "type": "array",
  35230. "items": {
  35231. "type": "string"
  35232. }
  35233. },
  35234. "tool": {
  35235. "type": "object",
  35236. "properties": {
  35237. "messageID": {
  35238. "type": "string"
  35239. },
  35240. "callID": {
  35241. "type": "string"
  35242. }
  35243. },
  35244. "required": ["messageID", "callID"],
  35245. "additionalProperties": false
  35246. }
  35247. },
  35248. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  35249. "additionalProperties": false
  35250. }
  35251. },
  35252. "required": ["id", "type", "properties"],
  35253. "additionalProperties": false
  35254. },
  35255. "EventPermissionReplied": {
  35256. "type": "object",
  35257. "properties": {
  35258. "id": {
  35259. "type": "string",
  35260. "pattern": "^evt_"
  35261. },
  35262. "type": {
  35263. "type": "string",
  35264. "enum": ["permission.replied"]
  35265. },
  35266. "properties": {
  35267. "type": "object",
  35268. "properties": {
  35269. "sessionID": {
  35270. "type": "string",
  35271. "pattern": "^ses"
  35272. },
  35273. "requestID": {
  35274. "type": "string",
  35275. "pattern": "^per"
  35276. },
  35277. "reply": {
  35278. "type": "string",
  35279. "enum": ["once", "always", "reject"]
  35280. }
  35281. },
  35282. "required": ["sessionID", "requestID", "reply"],
  35283. "additionalProperties": false
  35284. }
  35285. },
  35286. "required": ["id", "type", "properties"],
  35287. "additionalProperties": false
  35288. },
  35289. "EventMcpToolsChanged": {
  35290. "type": "object",
  35291. "properties": {
  35292. "id": {
  35293. "type": "string",
  35294. "pattern": "^evt_"
  35295. },
  35296. "type": {
  35297. "type": "string",
  35298. "enum": ["mcp.tools.changed"]
  35299. },
  35300. "properties": {
  35301. "type": "object",
  35302. "properties": {
  35303. "server": {
  35304. "type": "string"
  35305. }
  35306. },
  35307. "required": ["server"],
  35308. "additionalProperties": false
  35309. }
  35310. },
  35311. "required": ["id", "type", "properties"],
  35312. "additionalProperties": false
  35313. },
  35314. "EventMcpBrowserOpenFailed": {
  35315. "type": "object",
  35316. "properties": {
  35317. "id": {
  35318. "type": "string",
  35319. "pattern": "^evt_"
  35320. },
  35321. "type": {
  35322. "type": "string",
  35323. "enum": ["mcp.browser.open.failed"]
  35324. },
  35325. "properties": {
  35326. "type": "object",
  35327. "properties": {
  35328. "mcpName": {
  35329. "type": "string"
  35330. },
  35331. "url": {
  35332. "type": "string"
  35333. }
  35334. },
  35335. "required": ["mcpName", "url"],
  35336. "additionalProperties": false
  35337. }
  35338. },
  35339. "required": ["id", "type", "properties"],
  35340. "additionalProperties": false
  35341. },
  35342. "EventCommandExecuted": {
  35343. "type": "object",
  35344. "properties": {
  35345. "id": {
  35346. "type": "string",
  35347. "pattern": "^evt_"
  35348. },
  35349. "type": {
  35350. "type": "string",
  35351. "enum": ["command.executed"]
  35352. },
  35353. "properties": {
  35354. "type": "object",
  35355. "properties": {
  35356. "name": {
  35357. "type": "string"
  35358. },
  35359. "sessionID": {
  35360. "type": "string",
  35361. "pattern": "^ses"
  35362. },
  35363. "arguments": {
  35364. "type": "string"
  35365. },
  35366. "messageID": {
  35367. "type": "string",
  35368. "pattern": "^msg"
  35369. }
  35370. },
  35371. "required": ["name", "sessionID", "arguments", "messageID"],
  35372. "additionalProperties": false
  35373. }
  35374. },
  35375. "required": ["id", "type", "properties"],
  35376. "additionalProperties": false
  35377. },
  35378. "EventProjectUpdated": {
  35379. "type": "object",
  35380. "properties": {
  35381. "id": {
  35382. "type": "string",
  35383. "pattern": "^evt_"
  35384. },
  35385. "type": {
  35386. "type": "string",
  35387. "enum": ["project.updated"]
  35388. },
  35389. "properties": {
  35390. "type": "object",
  35391. "properties": {
  35392. "id": {
  35393. "type": "string"
  35394. },
  35395. "worktree": {
  35396. "type": "string"
  35397. },
  35398. "vcs": {
  35399. "type": "string",
  35400. "enum": ["git"]
  35401. },
  35402. "name": {
  35403. "type": "string"
  35404. },
  35405. "icon": {
  35406. "type": "object",
  35407. "properties": {
  35408. "url": {
  35409. "type": "string"
  35410. },
  35411. "override": {
  35412. "type": "string"
  35413. },
  35414. "color": {
  35415. "type": "string"
  35416. }
  35417. },
  35418. "additionalProperties": false
  35419. },
  35420. "commands": {
  35421. "type": "object",
  35422. "properties": {
  35423. "start": {
  35424. "type": "string",
  35425. "description": "Startup script to run when creating a new workspace (worktree)"
  35426. }
  35427. },
  35428. "additionalProperties": false
  35429. },
  35430. "time": {
  35431. "type": "object",
  35432. "properties": {
  35433. "created": {
  35434. "type": "integer",
  35435. "minimum": 0
  35436. },
  35437. "updated": {
  35438. "type": "integer",
  35439. "minimum": 0
  35440. },
  35441. "initialized": {
  35442. "type": "integer",
  35443. "minimum": 0
  35444. }
  35445. },
  35446. "required": ["created", "updated"],
  35447. "additionalProperties": false
  35448. },
  35449. "sandboxes": {
  35450. "type": "array",
  35451. "items": {
  35452. "type": "string"
  35453. }
  35454. }
  35455. },
  35456. "required": ["id", "worktree", "time", "sandboxes"],
  35457. "additionalProperties": false
  35458. }
  35459. },
  35460. "required": ["id", "type", "properties"],
  35461. "additionalProperties": false
  35462. },
  35463. "EventSessionStatus": {
  35464. "type": "object",
  35465. "properties": {
  35466. "id": {
  35467. "type": "string",
  35468. "pattern": "^evt_"
  35469. },
  35470. "type": {
  35471. "type": "string",
  35472. "enum": ["session.status"]
  35473. },
  35474. "properties": {
  35475. "type": "object",
  35476. "properties": {
  35477. "sessionID": {
  35478. "type": "string",
  35479. "pattern": "^ses"
  35480. },
  35481. "status": {
  35482. "$ref": "#/components/schemas/SessionStatus"
  35483. }
  35484. },
  35485. "required": ["sessionID", "status"],
  35486. "additionalProperties": false
  35487. }
  35488. },
  35489. "required": ["id", "type", "properties"],
  35490. "additionalProperties": false
  35491. },
  35492. "EventSessionIdle": {
  35493. "type": "object",
  35494. "properties": {
  35495. "id": {
  35496. "type": "string",
  35497. "pattern": "^evt_"
  35498. },
  35499. "type": {
  35500. "type": "string",
  35501. "enum": ["session.idle"]
  35502. },
  35503. "properties": {
  35504. "type": "object",
  35505. "properties": {
  35506. "sessionID": {
  35507. "type": "string",
  35508. "pattern": "^ses"
  35509. }
  35510. },
  35511. "required": ["sessionID"],
  35512. "additionalProperties": false
  35513. }
  35514. },
  35515. "required": ["id", "type", "properties"],
  35516. "additionalProperties": false
  35517. },
  35518. "EventQuestionAsked": {
  35519. "type": "object",
  35520. "properties": {
  35521. "id": {
  35522. "type": "string",
  35523. "pattern": "^evt_"
  35524. },
  35525. "type": {
  35526. "type": "string",
  35527. "enum": ["question.asked"]
  35528. },
  35529. "properties": {
  35530. "type": "object",
  35531. "properties": {
  35532. "id": {
  35533. "type": "string",
  35534. "pattern": "^que"
  35535. },
  35536. "sessionID": {
  35537. "type": "string",
  35538. "pattern": "^ses"
  35539. },
  35540. "questions": {
  35541. "type": "array",
  35542. "items": {
  35543. "$ref": "#/components/schemas/QuestionInfo"
  35544. },
  35545. "description": "Questions to ask"
  35546. },
  35547. "tool": {
  35548. "$ref": "#/components/schemas/QuestionTool"
  35549. }
  35550. },
  35551. "required": ["id", "sessionID", "questions"],
  35552. "additionalProperties": false
  35553. }
  35554. },
  35555. "required": ["id", "type", "properties"],
  35556. "additionalProperties": false
  35557. },
  35558. "EventQuestionReplied": {
  35559. "type": "object",
  35560. "properties": {
  35561. "id": {
  35562. "type": "string",
  35563. "pattern": "^evt_"
  35564. },
  35565. "type": {
  35566. "type": "string",
  35567. "enum": ["question.replied"]
  35568. },
  35569. "properties": {
  35570. "type": "object",
  35571. "properties": {
  35572. "sessionID": {
  35573. "type": "string",
  35574. "pattern": "^ses"
  35575. },
  35576. "requestID": {
  35577. "type": "string",
  35578. "pattern": "^que"
  35579. },
  35580. "answers": {
  35581. "type": "array",
  35582. "items": {
  35583. "$ref": "#/components/schemas/QuestionAnswer"
  35584. }
  35585. }
  35586. },
  35587. "required": ["sessionID", "requestID", "answers"],
  35588. "additionalProperties": false
  35589. }
  35590. },
  35591. "required": ["id", "type", "properties"],
  35592. "additionalProperties": false
  35593. },
  35594. "EventQuestionRejected": {
  35595. "type": "object",
  35596. "properties": {
  35597. "id": {
  35598. "type": "string",
  35599. "pattern": "^evt_"
  35600. },
  35601. "type": {
  35602. "type": "string",
  35603. "enum": ["question.rejected"]
  35604. },
  35605. "properties": {
  35606. "type": "object",
  35607. "properties": {
  35608. "sessionID": {
  35609. "type": "string",
  35610. "pattern": "^ses"
  35611. },
  35612. "requestID": {
  35613. "type": "string",
  35614. "pattern": "^que"
  35615. }
  35616. },
  35617. "required": ["sessionID", "requestID"],
  35618. "additionalProperties": false
  35619. }
  35620. },
  35621. "required": ["id", "type", "properties"],
  35622. "additionalProperties": false
  35623. },
  35624. "EventSessionCompacted": {
  35625. "type": "object",
  35626. "properties": {
  35627. "id": {
  35628. "type": "string",
  35629. "pattern": "^evt_"
  35630. },
  35631. "type": {
  35632. "type": "string",
  35633. "enum": ["session.compacted"]
  35634. },
  35635. "properties": {
  35636. "type": "object",
  35637. "properties": {
  35638. "sessionID": {
  35639. "type": "string",
  35640. "pattern": "^ses"
  35641. }
  35642. },
  35643. "required": ["sessionID"],
  35644. "additionalProperties": false
  35645. }
  35646. },
  35647. "required": ["id", "type", "properties"],
  35648. "additionalProperties": false
  35649. },
  35650. "EventVcsBranchUpdated": {
  35651. "type": "object",
  35652. "properties": {
  35653. "id": {
  35654. "type": "string",
  35655. "pattern": "^evt_"
  35656. },
  35657. "type": {
  35658. "type": "string",
  35659. "enum": ["vcs.branch.updated"]
  35660. },
  35661. "properties": {
  35662. "type": "object",
  35663. "properties": {
  35664. "branch": {
  35665. "type": "string"
  35666. }
  35667. },
  35668. "additionalProperties": false
  35669. }
  35670. },
  35671. "required": ["id", "type", "properties"],
  35672. "additionalProperties": false
  35673. },
  35674. "EventWorkspaceReady": {
  35675. "type": "object",
  35676. "properties": {
  35677. "id": {
  35678. "type": "string",
  35679. "pattern": "^evt_"
  35680. },
  35681. "type": {
  35682. "type": "string",
  35683. "enum": ["workspace.ready"]
  35684. },
  35685. "properties": {
  35686. "type": "object",
  35687. "properties": {
  35688. "name": {
  35689. "type": "string"
  35690. }
  35691. },
  35692. "required": ["name"],
  35693. "additionalProperties": false
  35694. }
  35695. },
  35696. "required": ["id", "type", "properties"],
  35697. "additionalProperties": false
  35698. },
  35699. "EventWorkspaceFailed": {
  35700. "type": "object",
  35701. "properties": {
  35702. "id": {
  35703. "type": "string",
  35704. "pattern": "^evt_"
  35705. },
  35706. "type": {
  35707. "type": "string",
  35708. "enum": ["workspace.failed"]
  35709. },
  35710. "properties": {
  35711. "type": "object",
  35712. "properties": {
  35713. "message": {
  35714. "type": "string"
  35715. }
  35716. },
  35717. "required": ["message"],
  35718. "additionalProperties": false
  35719. }
  35720. },
  35721. "required": ["id", "type", "properties"],
  35722. "additionalProperties": false
  35723. },
  35724. "EventWorkspaceStatus": {
  35725. "type": "object",
  35726. "properties": {
  35727. "id": {
  35728. "type": "string",
  35729. "pattern": "^evt_"
  35730. },
  35731. "type": {
  35732. "type": "string",
  35733. "enum": ["workspace.status"]
  35734. },
  35735. "properties": {
  35736. "type": "object",
  35737. "properties": {
  35738. "workspaceID": {
  35739. "type": "string",
  35740. "pattern": "^wrk"
  35741. },
  35742. "status": {
  35743. "type": "string",
  35744. "enum": ["connected", "connecting", "disconnected", "error"]
  35745. }
  35746. },
  35747. "required": ["workspaceID", "status"],
  35748. "additionalProperties": false
  35749. }
  35750. },
  35751. "required": ["id", "type", "properties"],
  35752. "additionalProperties": false
  35753. },
  35754. "EventWorktreeReady": {
  35755. "type": "object",
  35756. "properties": {
  35757. "id": {
  35758. "type": "string",
  35759. "pattern": "^evt_"
  35760. },
  35761. "type": {
  35762. "type": "string",
  35763. "enum": ["worktree.ready"]
  35764. },
  35765. "properties": {
  35766. "type": "object",
  35767. "properties": {
  35768. "name": {
  35769. "type": "string"
  35770. },
  35771. "branch": {
  35772. "type": "string"
  35773. }
  35774. },
  35775. "required": ["name"],
  35776. "additionalProperties": false
  35777. }
  35778. },
  35779. "required": ["id", "type", "properties"],
  35780. "additionalProperties": false
  35781. },
  35782. "EventWorktreeFailed": {
  35783. "type": "object",
  35784. "properties": {
  35785. "id": {
  35786. "type": "string",
  35787. "pattern": "^evt_"
  35788. },
  35789. "type": {
  35790. "type": "string",
  35791. "enum": ["worktree.failed"]
  35792. },
  35793. "properties": {
  35794. "type": "object",
  35795. "properties": {
  35796. "message": {
  35797. "type": "string"
  35798. }
  35799. },
  35800. "required": ["message"],
  35801. "additionalProperties": false
  35802. }
  35803. },
  35804. "required": ["id", "type", "properties"],
  35805. "additionalProperties": false
  35806. },
  35807. "EventServerConnected": {
  35808. "type": "object",
  35809. "properties": {
  35810. "id": {
  35811. "type": "string",
  35812. "pattern": "^evt_"
  35813. },
  35814. "type": {
  35815. "type": "string",
  35816. "enum": ["server.connected"]
  35817. },
  35818. "properties": {
  35819. "type": "object",
  35820. "properties": {}
  35821. }
  35822. },
  35823. "required": ["id", "type", "properties"],
  35824. "additionalProperties": false
  35825. },
  35826. "EventGlobalDisposed": {
  35827. "type": "object",
  35828. "properties": {
  35829. "id": {
  35830. "type": "string",
  35831. "pattern": "^evt_"
  35832. },
  35833. "type": {
  35834. "type": "string",
  35835. "enum": ["global.disposed"]
  35836. },
  35837. "properties": {
  35838. "type": "object",
  35839. "properties": {}
  35840. }
  35841. },
  35842. "required": ["id", "type", "properties"],
  35843. "additionalProperties": false
  35844. },
  35845. "BadRequestError": {
  35846. "type": "object",
  35847. "required": ["name", "data"],
  35848. "properties": {
  35849. "name": {
  35850. "type": "string",
  35851. "enum": ["BadRequest"]
  35852. },
  35853. "data": {
  35854. "type": "object",
  35855. "required": ["message"],
  35856. "properties": {
  35857. "message": {
  35858. "type": "string"
  35859. },
  35860. "kind": {
  35861. "type": "string",
  35862. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  35863. }
  35864. }
  35865. }
  35866. }
  35867. }
  35868. }
  35869. },
  35870. "security": [],
  35871. "tags": [
  35872. {
  35873. "name": "control",
  35874. "description": "Control plane routes."
  35875. },
  35876. {
  35877. "name": "controlPlane",
  35878. "description": "Control-plane orchestration routes."
  35879. },
  35880. {
  35881. "name": "global",
  35882. "description": "Global server routes."
  35883. },
  35884. {
  35885. "name": "event",
  35886. "description": "Instance event stream route."
  35887. },
  35888. {
  35889. "name": "config",
  35890. "description": "Experimental HttpApi config routes."
  35891. },
  35892. {
  35893. "name": "experimental",
  35894. "description": "Experimental HttpApi read-only routes."
  35895. },
  35896. {
  35897. "name": "file",
  35898. "description": "Experimental HttpApi file routes."
  35899. },
  35900. {
  35901. "name": "instance",
  35902. "description": "Experimental HttpApi instance read routes."
  35903. },
  35904. {
  35905. "name": "mcp",
  35906. "description": "Experimental HttpApi MCP routes."
  35907. },
  35908. {
  35909. "name": "project",
  35910. "description": "Experimental HttpApi project routes."
  35911. },
  35912. {
  35913. "name": "projectCopy",
  35914. "description": "Project copy naming routes."
  35915. },
  35916. {
  35917. "name": "pty",
  35918. "description": "Experimental HttpApi PTY routes."
  35919. },
  35920. {
  35921. "name": "question",
  35922. "description": "Question routes."
  35923. },
  35924. {
  35925. "name": "permission",
  35926. "description": "Experimental HttpApi permission routes."
  35927. },
  35928. {
  35929. "name": "provider",
  35930. "description": "Experimental HttpApi provider routes."
  35931. },
  35932. {
  35933. "name": "session",
  35934. "description": "Experimental HttpApi session routes."
  35935. },
  35936. {
  35937. "name": "sync",
  35938. "description": "Experimental HttpApi sync routes."
  35939. },
  35940. {
  35941. "name": "tui",
  35942. "description": "Experimental HttpApi TUI routes."
  35943. },
  35944. {
  35945. "name": "workspace",
  35946. "description": "Experimental HttpApi workspace routes."
  35947. },
  35948. {
  35949. "name": "opencode HttpApi",
  35950. "description": "Experimental HttpApi surface for selected instance routes."
  35951. },
  35952. {
  35953. "name": "opencode HttpApi",
  35954. "description": "Experimental HttpApi surface for selected instance routes."
  35955. },
  35956. {
  35957. "name": "opencode HttpApi",
  35958. "description": "Experimental HttpApi surface for selected instance routes."
  35959. },
  35960. {
  35961. "name": "sessions",
  35962. "description": "Experimental session routes."
  35963. },
  35964. {
  35965. "name": "messages",
  35966. "description": "Experimental message routes."
  35967. },
  35968. {
  35969. "name": "models",
  35970. "description": "Experimental model routes."
  35971. },
  35972. {
  35973. "name": "providers",
  35974. "description": "Experimental provider routes."
  35975. },
  35976. {
  35977. "name": "integrations",
  35978. "description": "Integration discovery and authentication routes."
  35979. },
  35980. {
  35981. "name": "opencode HttpApi",
  35982. "description": "Experimental HttpApi surface for selected instance routes."
  35983. },
  35984. {
  35985. "name": "permissions",
  35986. "description": "Experimental permission routes."
  35987. },
  35988. {
  35989. "name": "filesystem",
  35990. "description": "Experimental location-scoped filesystem routes."
  35991. },
  35992. {
  35993. "name": "commands",
  35994. "description": "Experimental command routes."
  35995. },
  35996. {
  35997. "name": "skills",
  35998. "description": "Experimental skill routes."
  35999. },
  36000. {
  36001. "name": "events",
  36002. "description": "Experimental event stream route."
  36003. },
  36004. {
  36005. "name": "pty",
  36006. "description": "Experimental location-scoped PTY routes."
  36007. },
  36008. {
  36009. "name": "session questions",
  36010. "description": "Experimental session question routes."
  36011. },
  36012. {
  36013. "name": "reference",
  36014. "description": "Location-scoped project references."
  36015. },
  36016. {
  36017. "name": "projectCopy",
  36018. "description": "Project copy management routes."
  36019. },
  36020. {
  36021. "name": "pty",
  36022. "description": "PTY websocket route."
  36023. }
  36024. ]
  36025. }