openapi.json 1014 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132251332513425135251362513725138251392514025141251422514325144251452514625147251482514925150251512515225153251542515525156251572515825159251602516125162251632516425165251662516725168251692517025171251722517325174251752517625177251782517925180251812518225183251842518525186251872518825189251902519125192251932519425195251962519725198251992520025201252022520325204252052520625207252082520925210252112521225213252142521525216252172521825219252202522125222252232522425225252262522725228252292523025231252322523325234252352523625237252382523925240252412524225243252442524525246252472524825249252502525125252252532525425255252562525725258252592526025261252622526325264252652526625267252682526925270252712527225273252742527525276252772527825279252802528125282252832528425285252862528725288252892529025291252922529325294252952529625297252982529925300253012530225303253042530525306253072530825309253102531125312253132531425315253162531725318253192532025321253222532325324253252532625327253282532925330253312533225333253342533525336253372533825339253402534125342253432534425345253462534725348253492535025351253522535325354253552535625357253582535925360253612536225363253642536525366253672536825369253702537125372253732537425375253762537725378253792538025381253822538325384253852538625387253882538925390253912539225393253942539525396253972539825399254002540125402254032540425405254062540725408254092541025411254122541325414254152541625417254182541925420254212542225423254242542525426254272542825429254302543125432254332543425435254362543725438254392544025441254422544325444254452544625447254482544925450254512545225453254542545525456254572545825459254602546125462254632546425465254662546725468254692547025471254722547325474254752547625477254782547925480254812548225483254842548525486254872548825489254902549125492254932549425495254962549725498254992550025501255022550325504255052550625507255082550925510255112551225513255142551525516255172551825519255202552125522255232552425525255262552725528255292553025531255322553325534255352553625537255382553925540255412554225543255442554525546255472554825549255502555125552255532555425555255562555725558255592556025561255622556325564255652556625567255682556925570255712557225573255742557525576255772557825579255802558125582255832558425585255862558725588255892559025591255922559325594255952559625597255982559925600256012560225603256042560525606256072560825609256102561125612256132561425615256162561725618256192562025621256222562325624256252562625627256282562925630256312563225633256342563525636256372563825639256402564125642256432564425645256462564725648256492565025651256522565325654256552565625657256582565925660256612566225663256642566525666256672566825669256702567125672256732567425675256762567725678256792568025681256822568325684256852568625687256882568925690256912569225693256942569525696256972569825699257002570125702257032570425705257062570725708257092571025711257122571325714257152571625717257182571925720257212572225723257242572525726257272572825729257302573125732257332573425735257362573725738257392574025741257422574325744257452574625747257482574925750257512575225753257542575525756257572575825759257602576125762257632576425765257662576725768257692577025771257722577325774257752577625777257782577925780257812578225783257842578525786257872578825789257902579125792257932579425795257962579725798257992580025801258022580325804258052580625807258082580925810258112581225813258142581525816258172581825819258202582125822258232582425825258262582725828258292583025831258322583325834258352583625837258382583925840258412584225843258442584525846258472584825849258502585125852258532585425855258562585725858258592586025861258622586325864258652586625867258682586925870258712587225873258742587525876258772587825879258802588125882258832588425885258862588725888258892589025891258922589325894258952589625897258982589925900259012590225903259042590525906259072590825909259102591125912259132591425915259162591725918259192592025921259222592325924259252592625927259282592925930259312593225933259342593525936259372593825939259402594125942259432594425945259462594725948259492595025951259522595325954259552595625957259582595925960259612596225963259642596525966259672596825969259702597125972259732597425975259762597725978259792598025981259822598325984259852598625987259882598925990259912599225993259942599525996259972599825999260002600126002260032600426005260062600726008260092601026011260122601326014260152601626017260182601926020260212602226023260242602526026260272602826029260302603126032260332603426035260362603726038260392604026041260422604326044260452604626047260482604926050260512605226053260542605526056260572605826059260602606126062260632606426065260662606726068260692607026071260722607326074260752607626077260782607926080260812608226083260842608526086260872608826089260902609126092260932609426095260962609726098260992610026101261022610326104261052610626107261082610926110261112611226113261142611526116261172611826119261202612126122261232612426125261262612726128261292613026131261322613326134261352613626137261382613926140261412614226143261442614526146261472614826149261502615126152261532615426155261562615726158261592616026161261622616326164261652616626167261682616926170261712617226173261742617526176261772617826179261802618126182261832618426185261862618726188261892619026191261922619326194261952619626197261982619926200262012620226203262042620526206262072620826209262102621126212262132621426215262162621726218262192622026221262222622326224262252622626227262282622926230262312623226233262342623526236262372623826239262402624126242262432624426245262462624726248262492625026251262522625326254262552625626257262582625926260262612626226263262642626526266262672626826269262702627126272262732627426275262762627726278262792628026281262822628326284262852628626287262882628926290262912629226293262942629526296262972629826299263002630126302263032630426305263062630726308263092631026311263122631326314263152631626317263182631926320263212632226323263242632526326263272632826329263302633126332263332633426335263362633726338263392634026341263422634326344263452634626347263482634926350263512635226353263542635526356263572635826359263602636126362263632636426365263662636726368263692637026371263722637326374263752637626377263782637926380263812638226383263842638526386263872638826389263902639126392263932639426395263962639726398263992640026401264022640326404264052640626407264082640926410264112641226413264142641526416264172641826419264202642126422264232642426425264262642726428264292643026431264322643326434264352643626437264382643926440264412644226443264442644526446264472644826449264502645126452264532645426455264562645726458264592646026461264622646326464264652646626467264682646926470264712647226473264742647526476264772647826479264802648126482264832648426485264862648726488264892649026491264922649326494264952649626497264982649926500265012650226503265042650526506265072650826509265102651126512265132651426515265162651726518265192652026521265222652326524265252652626527265282652926530265312653226533265342653526536265372653826539265402654126542265432654426545265462654726548265492655026551265522655326554265552655626557265582655926560265612656226563265642656526566265672656826569265702657126572265732657426575265762657726578265792658026581265822658326584265852658626587265882658926590265912659226593265942659526596265972659826599266002660126602266032660426605266062660726608266092661026611266122661326614266152661626617266182661926620266212662226623266242662526626266272662826629266302663126632266332663426635266362663726638266392664026641266422664326644266452664626647266482664926650266512665226653266542665526656266572665826659266602666126662266632666426665266662666726668266692667026671266722667326674266752667626677266782667926680266812668226683266842668526686266872668826689266902669126692266932669426695266962669726698266992670026701267022670326704267052670626707267082670926710267112671226713267142671526716267172671826719267202672126722267232672426725267262672726728267292673026731267322673326734267352673626737267382673926740267412674226743267442674526746267472674826749267502675126752267532675426755267562675726758267592676026761267622676326764267652676626767267682676926770267712677226773267742677526776267772677826779267802678126782267832678426785267862678726788267892679026791267922679326794267952679626797267982679926800268012680226803268042680526806268072680826809268102681126812268132681426815268162681726818268192682026821268222682326824268252682626827268282682926830268312683226833268342683526836268372683826839268402684126842268432684426845268462684726848268492685026851268522685326854268552685626857268582685926860268612686226863268642686526866268672686826869268702687126872268732687426875268762687726878268792688026881268822688326884268852688626887268882688926890268912689226893268942689526896268972689826899269002690126902269032690426905269062690726908269092691026911269122691326914269152691626917269182691926920269212692226923269242692526926269272692826929269302693126932269332693426935269362693726938269392694026941269422694326944269452694626947269482694926950269512695226953269542695526956269572695826959269602696126962269632696426965269662696726968269692697026971269722697326974269752697626977269782697926980269812698226983269842698526986269872698826989269902699126992269932699426995269962699726998269992700027001270022700327004270052700627007270082700927010270112701227013270142701527016270172701827019270202702127022270232702427025270262702727028270292703027031270322703327034270352703627037270382703927040270412704227043270442704527046270472704827049270502705127052270532705427055270562705727058270592706027061270622706327064270652706627067270682706927070270712707227073270742707527076270772707827079270802708127082270832708427085270862708727088270892709027091270922709327094270952709627097270982709927100271012710227103271042710527106271072710827109271102711127112271132711427115271162711727118271192712027121271222712327124271252712627127271282712927130271312713227133271342713527136271372713827139271402714127142271432714427145271462714727148271492715027151271522715327154271552715627157271582715927160271612716227163271642716527166271672716827169271702717127172271732717427175271762717727178271792718027181271822718327184271852718627187271882718927190271912719227193271942719527196271972719827199272002720127202272032720427205272062720727208272092721027211272122721327214272152721627217272182721927220272212722227223272242722527226272272722827229272302723127232272332723427235272362723727238272392724027241272422724327244272452724627247272482724927250272512725227253272542725527256272572725827259272602726127262272632726427265272662726727268272692727027271272722727327274272752727627277272782727927280272812728227283272842728527286272872728827289272902729127292272932729427295272962729727298272992730027301273022730327304273052730627307273082730927310273112731227313273142731527316273172731827319273202732127322273232732427325273262732727328273292733027331273322733327334273352733627337273382733927340273412734227343273442734527346273472734827349273502735127352273532735427355273562735727358273592736027361273622736327364273652736627367273682736927370273712737227373273742737527376273772737827379273802738127382273832738427385273862738727388273892739027391273922739327394273952739627397273982739927400274012740227403274042740527406274072740827409274102741127412274132741427415274162741727418274192742027421274222742327424274252742627427274282742927430274312743227433274342743527436274372743827439274402744127442274432744427445274462744727448274492745027451274522745327454274552745627457274582745927460274612746227463274642746527466274672746827469274702747127472274732747427475274762747727478274792748027481274822748327484274852748627487274882748927490274912749227493274942749527496274972749827499275002750127502275032750427505275062750727508275092751027511275122751327514275152751627517275182751927520275212752227523275242752527526275272752827529275302753127532275332753427535275362753727538275392754027541275422754327544275452754627547275482754927550275512755227553275542755527556275572755827559275602756127562275632756427565275662756727568275692757027571275722757327574275752757627577275782757927580275812758227583275842758527586275872758827589275902759127592275932759427595275962759727598275992760027601276022760327604276052760627607276082760927610276112761227613276142761527616276172761827619276202762127622276232762427625276262762727628276292763027631276322763327634276352763627637276382763927640276412764227643276442764527646276472764827649276502765127652276532765427655276562765727658276592766027661276622766327664276652766627667276682766927670276712767227673276742767527676276772767827679276802768127682276832768427685276862768727688276892769027691276922769327694276952769627697276982769927700277012770227703277042770527706277072770827709277102771127712277132771427715277162771727718277192772027721277222772327724277252772627727277282772927730277312773227733277342773527736277372773827739277402774127742277432774427745277462774727748277492775027751277522775327754277552775627757277582775927760277612776227763277642776527766277672776827769277702777127772277732777427775277762777727778277792778027781277822778327784277852778627787277882778927790277912779227793277942779527796277972779827799278002780127802278032780427805278062780727808278092781027811278122781327814278152781627817278182781927820278212782227823278242782527826278272782827829278302783127832278332783427835278362783727838278392784027841278422784327844278452784627847278482784927850278512785227853278542785527856278572785827859278602786127862278632786427865278662786727868278692787027871278722787327874278752787627877278782787927880278812788227883278842788527886278872788827889278902789127892278932789427895278962789727898278992790027901279022790327904279052790627907279082790927910279112791227913279142791527916279172791827919279202792127922279232792427925279262792727928279292793027931279322793327934279352793627937279382793927940279412794227943279442794527946279472794827949279502795127952279532795427955279562795727958279592796027961279622796327964279652796627967279682796927970279712797227973279742797527976279772797827979279802798127982279832798427985279862798727988279892799027991279922799327994279952799627997279982799928000280012800228003280042800528006280072800828009280102801128012280132801428015280162801728018280192802028021280222802328024280252802628027280282802928030280312803228033280342803528036280372803828039280402804128042280432804428045280462804728048280492805028051280522805328054280552805628057280582805928060280612806228063280642806528066280672806828069280702807128072280732807428075280762807728078280792808028081280822808328084280852808628087280882808928090280912809228093280942809528096280972809828099281002810128102281032810428105281062810728108281092811028111281122811328114281152811628117281182811928120281212812228123281242812528126281272812828129281302813128132281332813428135281362813728138281392814028141281422814328144281452814628147281482814928150281512815228153281542815528156281572815828159281602816128162281632816428165281662816728168281692817028171281722817328174281752817628177281782817928180281812818228183281842818528186281872818828189281902819128192281932819428195281962819728198281992820028201282022820328204282052820628207282082820928210282112821228213282142821528216282172821828219282202822128222282232822428225282262822728228282292823028231282322823328234282352823628237282382823928240282412824228243282442824528246282472824828249282502825128252282532825428255282562825728258282592826028261282622826328264282652826628267282682826928270282712827228273282742827528276282772827828279282802828128282282832828428285282862828728288282892829028291282922829328294282952829628297282982829928300283012830228303283042830528306283072830828309283102831128312283132831428315283162831728318283192832028321283222832328324283252832628327283282832928330283312833228333283342833528336283372833828339283402834128342283432834428345283462834728348283492835028351283522835328354283552835628357283582835928360283612836228363283642836528366283672836828369283702837128372283732837428375283762837728378283792838028381283822838328384283852838628387283882838928390283912839228393283942839528396283972839828399284002840128402284032840428405284062840728408284092841028411284122841328414284152841628417284182841928420284212842228423284242842528426284272842828429284302843128432284332843428435284362843728438284392844028441284422844328444284452844628447284482844928450284512845228453284542845528456284572845828459284602846128462284632846428465284662846728468284692847028471284722847328474284752847628477284782847928480284812848228483284842848528486284872848828489284902849128492284932849428495284962849728498284992850028501285022850328504285052850628507285082850928510285112851228513285142851528516285172851828519285202852128522285232852428525285262852728528285292853028531285322853328534285352853628537285382853928540285412854228543285442854528546285472854828549285502855128552285532855428555285562855728558285592856028561285622856328564285652856628567285682856928570285712857228573285742857528576285772857828579285802858128582285832858428585285862858728588285892859028591285922859328594285952859628597285982859928600286012860228603286042860528606286072860828609286102861128612286132861428615286162861728618286192862028621286222862328624286252862628627286282862928630286312863228633286342863528636286372863828639286402864128642286432864428645286462864728648286492865028651286522865328654286552865628657286582865928660286612866228663286642866528666286672866828669286702867128672286732867428675286762867728678286792868028681286822868328684286852868628687286882868928690286912869228693286942869528696286972869828699287002870128702287032870428705287062870728708287092871028711287122871328714287152871628717287182871928720287212872228723287242872528726287272872828729287302873128732287332873428735287362873728738287392874028741287422874328744287452874628747287482874928750287512875228753287542875528756287572875828759287602876128762287632876428765287662876728768287692877028771287722877328774287752877628777287782877928780287812878228783287842878528786287872878828789287902879128792287932879428795287962879728798287992880028801288022880328804288052880628807288082880928810288112881228813288142881528816288172881828819288202882128822288232882428825288262882728828288292883028831288322883328834288352883628837288382883928840288412884228843288442884528846288472884828849288502885128852288532885428855288562885728858288592886028861288622886328864288652886628867288682886928870288712887228873288742887528876288772887828879288802888128882288832888428885288862888728888288892889028891288922889328894288952889628897288982889928900289012890228903289042890528906289072890828909289102891128912289132891428915289162891728918289192892028921289222892328924289252892628927289282892928930289312893228933289342893528936289372893828939289402894128942289432894428945289462894728948289492895028951289522895328954289552895628957289582895928960289612896228963289642896528966289672896828969289702897128972289732897428975289762897728978289792898028981289822898328984289852898628987289882898928990289912899228993289942899528996289972899828999290002900129002290032900429005290062900729008290092901029011290122901329014290152901629017290182901929020290212902229023290242902529026290272902829029290302903129032290332903429035290362903729038290392904029041290422904329044290452904629047290482904929050290512905229053290542905529056290572905829059290602906129062290632906429065290662906729068290692907029071290722907329074290752907629077290782907929080290812908229083290842908529086290872908829089290902909129092290932909429095290962909729098290992910029101291022910329104291052910629107291082910929110291112911229113291142911529116291172911829119291202912129122291232912429125291262912729128291292913029131291322913329134291352913629137291382913929140291412914229143291442914529146291472914829149291502915129152291532915429155291562915729158291592916029161291622916329164291652916629167291682916929170291712917229173291742917529176291772917829179291802918129182291832918429185291862918729188291892919029191291922919329194291952919629197291982919929200292012920229203292042920529206292072920829209292102921129212292132921429215292162921729218292192922029221292222922329224292252922629227292282922929230292312923229233292342923529236292372923829239292402924129242292432924429245292462924729248292492925029251292522925329254292552925629257292582925929260292612926229263292642926529266292672926829269292702927129272292732927429275292762927729278292792928029281292822928329284292852928629287292882928929290292912929229293292942929529296292972929829299293002930129302293032930429305293062930729308293092931029311293122931329314293152931629317293182931929320293212932229323293242932529326293272932829329293302933129332293332933429335293362933729338293392934029341293422934329344293452934629347293482934929350293512935229353293542935529356293572935829359293602936129362293632936429365293662936729368293692937029371293722937329374293752937629377293782937929380293812938229383293842938529386293872938829389293902939129392293932939429395293962939729398293992940029401294022940329404294052940629407294082940929410294112941229413294142941529416294172941829419294202942129422294232942429425294262942729428294292943029431294322943329434294352943629437294382943929440294412944229443294442944529446294472944829449294502945129452294532945429455294562945729458294592946029461294622946329464294652946629467294682946929470294712947229473294742947529476294772947829479294802948129482294832948429485294862948729488294892949029491294922949329494294952949629497294982949929500295012950229503295042950529506295072950829509295102951129512295132951429515295162951729518295192952029521295222952329524295252952629527295282952929530295312953229533295342953529536295372953829539295402954129542295432954429545295462954729548295492955029551295522955329554295552955629557295582955929560295612956229563295642956529566295672956829569295702957129572295732957429575295762957729578295792958029581295822958329584295852958629587295882958929590295912959229593295942959529596295972959829599296002960129602296032960429605296062960729608296092961029611296122961329614296152961629617296182961929620296212962229623296242962529626296272962829629296302963129632296332963429635296362963729638296392964029641296422964329644296452964629647296482964929650296512965229653296542965529656296572965829659296602966129662296632966429665296662966729668296692967029671296722967329674296752967629677296782967929680296812968229683296842968529686296872968829689296902969129692296932969429695296962969729698296992970029701297022970329704297052970629707297082970929710297112971229713297142971529716297172971829719297202972129722297232972429725297262972729728297292973029731297322973329734297352973629737297382973929740297412974229743297442974529746297472974829749297502975129752297532975429755297562975729758297592976029761297622976329764297652976629767297682976929770297712977229773297742977529776297772977829779297802978129782297832978429785297862978729788297892979029791297922979329794297952979629797297982979929800298012980229803298042980529806298072980829809298102981129812298132981429815298162981729818298192982029821298222982329824298252982629827298282982929830298312983229833298342983529836298372983829839298402984129842298432984429845298462984729848298492985029851298522985329854298552985629857298582985929860298612986229863298642986529866298672986829869298702987129872298732987429875298762987729878298792988029881298822988329884298852988629887298882988929890298912989229893298942989529896298972989829899299002990129902299032990429905299062990729908299092991029911299122991329914299152991629917299182991929920299212992229923299242992529926299272992829929299302993129932299332993429935299362993729938299392994029941299422994329944299452994629947299482994929950299512995229953299542995529956299572995829959299602996129962299632996429965299662996729968299692997029971299722997329974299752997629977299782997929980299812998229983299842998529986299872998829989299902999129992299932999429995299962999729998299993000030001300023000330004300053000630007300083000930010300113001230013300143001530016300173001830019300203002130022300233002430025300263002730028300293003030031300323003330034300353003630037300383003930040300413004230043300443004530046300473004830049300503005130052300533005430055300563005730058300593006030061300623006330064300653006630067300683006930070300713007230073300743007530076300773007830079300803008130082300833008430085300863008730088300893009030091300923009330094300953009630097300983009930100301013010230103301043010530106301073010830109301103011130112301133011430115301163011730118301193012030121301223012330124301253012630127301283012930130301313013230133301343013530136301373013830139301403014130142301433014430145301463014730148301493015030151301523015330154301553015630157301583015930160301613016230163301643016530166301673016830169301703017130172301733017430175301763017730178301793018030181301823018330184301853018630187301883018930190301913019230193301943019530196301973019830199302003020130202302033020430205302063020730208302093021030211302123021330214302153021630217302183021930220302213022230223302243022530226302273022830229302303023130232302333023430235302363023730238302393024030241302423024330244302453024630247302483024930250302513025230253302543025530256302573025830259302603026130262302633026430265302663026730268302693027030271302723027330274302753027630277302783027930280302813028230283302843028530286302873028830289302903029130292302933029430295302963029730298302993030030301303023030330304303053030630307303083030930310303113031230313303143031530316303173031830319303203032130322303233032430325303263032730328303293033030331303323033330334303353033630337303383033930340303413034230343303443034530346303473034830349303503035130352303533035430355303563035730358303593036030361303623036330364303653036630367303683036930370303713037230373303743037530376303773037830379303803038130382303833038430385303863038730388303893039030391303923039330394303953039630397303983039930400304013040230403304043040530406304073040830409304103041130412304133041430415304163041730418304193042030421304223042330424304253042630427304283042930430304313043230433304343043530436304373043830439304403044130442304433044430445304463044730448304493045030451304523045330454304553045630457304583045930460304613046230463304643046530466304673046830469304703047130472304733047430475304763047730478304793048030481304823048330484304853048630487304883048930490304913049230493304943049530496304973049830499305003050130502305033050430505305063050730508305093051030511305123051330514305153051630517305183051930520305213052230523305243052530526305273052830529305303053130532305333053430535305363053730538305393054030541305423054330544305453054630547305483054930550305513055230553305543055530556305573055830559305603056130562305633056430565305663056730568305693057030571305723057330574305753057630577305783057930580305813058230583305843058530586305873058830589305903059130592305933059430595305963059730598305993060030601306023060330604306053060630607306083060930610306113061230613306143061530616306173061830619306203062130622306233062430625306263062730628306293063030631306323063330634306353063630637306383063930640306413064230643306443064530646306473064830649306503065130652306533065430655306563065730658306593066030661306623066330664306653066630667306683066930670306713067230673306743067530676306773067830679306803068130682306833068430685306863068730688306893069030691306923069330694306953069630697306983069930700307013070230703307043070530706307073070830709307103071130712307133071430715307163071730718307193072030721307223072330724307253072630727307283072930730307313073230733307343073530736307373073830739307403074130742307433074430745307463074730748307493075030751307523075330754307553075630757307583075930760307613076230763307643076530766307673076830769307703077130772307733077430775307763077730778307793078030781307823078330784307853078630787307883078930790307913079230793307943079530796307973079830799308003080130802308033080430805308063080730808308093081030811308123081330814308153081630817308183081930820308213082230823308243082530826308273082830829308303083130832308333083430835308363083730838308393084030841308423084330844308453084630847308483084930850308513085230853308543085530856308573085830859308603086130862308633086430865308663086730868308693087030871308723087330874308753087630877308783087930880308813088230883308843088530886308873088830889308903089130892308933089430895308963089730898308993090030901309023090330904309053090630907309083090930910309113091230913309143091530916309173091830919309203092130922309233092430925309263092730928309293093030931309323093330934309353093630937309383093930940309413094230943309443094530946309473094830949309503095130952309533095430955309563095730958309593096030961309623096330964309653096630967309683096930970309713097230973309743097530976309773097830979309803098130982309833098430985309863098730988309893099030991309923099330994309953099630997309983099931000310013100231003310043100531006310073100831009310103101131012310133101431015310163101731018310193102031021310223102331024310253102631027310283102931030310313103231033310343103531036310373103831039310403104131042310433104431045310463104731048310493105031051310523105331054310553105631057310583105931060310613106231063310643106531066310673106831069310703107131072310733107431075310763107731078310793108031081310823108331084310853108631087310883108931090310913109231093310943109531096310973109831099311003110131102311033110431105311063110731108311093111031111311123111331114311153111631117311183111931120311213112231123311243112531126311273112831129311303113131132311333113431135311363113731138311393114031141311423114331144311453114631147311483114931150311513115231153311543115531156311573115831159311603116131162311633116431165311663116731168311693117031171311723117331174311753117631177311783117931180311813118231183311843118531186311873118831189311903119131192311933119431195311963119731198311993120031201312023120331204312053120631207312083120931210312113121231213312143121531216312173121831219312203122131222312233122431225312263122731228312293123031231312323123331234312353123631237312383123931240312413124231243312443124531246312473124831249312503125131252312533125431255312563125731258312593126031261312623126331264312653126631267312683126931270312713127231273312743127531276312773127831279312803128131282312833128431285312863128731288312893129031291312923129331294312953129631297312983129931300313013130231303313043130531306313073130831309313103131131312313133131431315313163131731318313193132031321313223132331324313253132631327313283132931330313313133231333313343133531336313373133831339313403134131342313433134431345313463134731348313493135031351313523135331354313553135631357313583135931360313613136231363313643136531366313673136831369313703137131372313733137431375313763137731378313793138031381313823138331384313853138631387313883138931390313913139231393313943139531396313973139831399314003140131402314033140431405314063140731408314093141031411314123141331414314153141631417314183141931420314213142231423314243142531426314273142831429314303143131432314333143431435314363143731438314393144031441314423144331444314453144631447314483144931450314513145231453314543145531456314573145831459314603146131462314633146431465314663146731468314693147031471314723147331474314753147631477314783147931480314813148231483314843148531486314873148831489314903149131492314933149431495314963149731498314993150031501315023150331504315053150631507315083150931510315113151231513315143151531516315173151831519315203152131522315233152431525315263152731528315293153031531315323153331534315353153631537315383153931540315413154231543315443154531546315473154831549315503155131552315533155431555315563155731558315593156031561315623156331564315653156631567315683156931570315713157231573315743157531576315773157831579315803158131582315833158431585315863158731588315893159031591315923159331594315953159631597315983159931600316013160231603316043160531606316073160831609316103161131612316133161431615316163161731618316193162031621316223162331624316253162631627316283162931630316313163231633316343163531636316373163831639316403164131642316433164431645316463164731648316493165031651316523165331654316553165631657316583165931660316613166231663316643166531666316673166831669316703167131672316733167431675316763167731678316793168031681316823168331684316853168631687316883168931690316913169231693316943169531696316973169831699317003170131702317033170431705317063170731708317093171031711317123171331714317153171631717317183171931720317213172231723317243172531726317273172831729317303173131732317333173431735317363173731738317393174031741317423174331744317453174631747317483174931750317513175231753317543175531756317573175831759317603176131762317633176431765317663176731768317693177031771317723177331774317753177631777317783177931780317813178231783317843178531786317873178831789317903179131792317933179431795317963179731798317993180031801318023180331804318053180631807318083180931810318113181231813318143181531816318173181831819318203182131822318233182431825318263182731828318293183031831318323183331834318353183631837318383183931840318413184231843318443184531846318473184831849318503185131852318533185431855318563185731858318593186031861318623186331864318653186631867318683186931870318713187231873318743187531876318773187831879318803188131882318833188431885318863188731888318893189031891318923189331894318953189631897318983189931900319013190231903319043190531906319073190831909319103191131912319133191431915319163191731918319193192031921319223192331924319253192631927319283192931930319313193231933319343193531936319373193831939319403194131942319433194431945319463194731948319493195031951319523195331954319553195631957319583195931960319613196231963319643196531966319673196831969319703197131972319733197431975319763197731978319793198031981319823198331984319853198631987319883198931990319913199231993319943199531996319973199831999320003200132002320033200432005320063200732008320093201032011320123201332014320153201632017320183201932020320213202232023320243202532026320273202832029320303203132032320333203432035320363203732038320393204032041320423204332044320453204632047320483204932050320513205232053320543205532056320573205832059320603206132062320633206432065320663206732068320693207032071320723207332074320753207632077320783207932080320813208232083320843208532086320873208832089320903209132092320933209432095320963209732098320993210032101321023210332104321053210632107321083210932110321113211232113321143211532116321173211832119321203212132122321233212432125321263212732128321293213032131321323213332134321353213632137321383213932140321413214232143321443214532146321473214832149321503215132152321533215432155321563215732158321593216032161321623216332164321653216632167321683216932170321713217232173321743217532176321773217832179321803218132182321833218432185321863218732188321893219032191321923219332194321953219632197321983219932200322013220232203322043220532206322073220832209322103221132212322133221432215322163221732218322193222032221322223222332224322253222632227322283222932230322313223232233322343223532236322373223832239322403224132242322433224432245322463224732248322493225032251322523225332254322553225632257322583225932260322613226232263322643226532266322673226832269322703227132272322733227432275322763227732278322793228032281322823228332284322853228632287322883228932290322913229232293322943229532296322973229832299323003230132302323033230432305323063230732308323093231032311323123231332314323153231632317323183231932320323213232232323323243232532326323273232832329323303233132332323333233432335323363233732338323393234032341323423234332344323453234632347323483234932350323513235232353323543235532356323573235832359323603236132362323633236432365323663236732368323693237032371323723237332374323753237632377323783237932380323813238232383323843238532386323873238832389323903239132392323933239432395323963239732398323993240032401324023240332404324053240632407324083240932410324113241232413324143241532416324173241832419324203242132422324233242432425324263242732428324293243032431324323243332434324353243632437324383243932440324413244232443324443244532446324473244832449324503245132452324533245432455324563245732458324593246032461324623246332464324653246632467324683246932470324713247232473324743247532476324773247832479324803248132482324833248432485324863248732488324893249032491324923249332494324953249632497324983249932500325013250232503325043250532506325073250832509325103251132512325133251432515325163251732518325193252032521325223252332524325253252632527325283252932530325313253232533325343253532536325373253832539325403254132542325433254432545325463254732548325493255032551325523255332554325553255632557325583255932560325613256232563325643256532566325673256832569325703257132572325733257432575325763257732578325793258032581325823258332584325853258632587325883258932590325913259232593325943259532596325973259832599326003260132602326033260432605326063260732608326093261032611326123261332614326153261632617326183261932620326213262232623326243262532626326273262832629326303263132632326333263432635326363263732638326393264032641326423264332644326453264632647326483264932650326513265232653326543265532656326573265832659326603266132662326633266432665326663266732668326693267032671326723267332674326753267632677326783267932680326813268232683326843268532686326873268832689326903269132692326933269432695326963269732698326993270032701327023270332704327053270632707327083270932710327113271232713327143271532716327173271832719327203272132722327233272432725327263272732728327293273032731327323273332734327353273632737327383273932740327413274232743327443274532746327473274832749327503275132752327533275432755327563275732758327593276032761327623276332764327653276632767327683276932770327713277232773327743277532776327773277832779327803278132782327833278432785327863278732788327893279032791327923279332794327953279632797327983279932800328013280232803328043280532806328073280832809328103281132812328133281432815328163281732818328193282032821328223282332824328253282632827328283282932830328313283232833328343283532836328373283832839328403284132842328433284432845328463284732848328493285032851328523285332854328553285632857328583285932860328613286232863328643286532866328673286832869328703287132872328733287432875328763287732878328793288032881328823288332884328853288632887328883288932890328913289232893328943289532896328973289832899329003290132902329033290432905329063290732908329093291032911329123291332914329153291632917329183291932920329213292232923329243292532926329273292832929329303293132932329333293432935329363293732938329393294032941329423294332944329453294632947329483294932950329513295232953329543295532956329573295832959329603296132962329633296432965329663296732968329693297032971329723297332974329753297632977329783297932980329813298232983329843298532986329873298832989329903299132992329933299432995329963299732998329993300033001330023300333004330053300633007330083300933010330113301233013330143301533016330173301833019330203302133022330233302433025330263302733028330293303033031330323303333034330353303633037330383303933040330413304233043330443304533046330473304833049330503305133052330533305433055330563305733058330593306033061330623306333064330653306633067330683306933070330713307233073330743307533076330773307833079330803308133082330833308433085330863308733088330893309033091330923309333094330953309633097330983309933100331013310233103331043310533106331073310833109331103311133112331133311433115331163311733118331193312033121331223312333124331253312633127331283312933130331313313233133331343313533136331373313833139331403314133142331433314433145331463314733148331493315033151331523315333154331553315633157331583315933160331613316233163331643316533166331673316833169331703317133172331733317433175331763317733178331793318033181331823318333184331853318633187331883318933190331913319233193331943319533196331973319833199332003320133202332033320433205332063320733208332093321033211332123321333214332153321633217332183321933220332213322233223332243322533226332273322833229332303323133232332333323433235332363323733238332393324033241332423324333244332453324633247332483324933250332513325233253332543325533256332573325833259332603326133262332633326433265332663326733268332693327033271332723327333274332753327633277332783327933280332813328233283332843328533286332873328833289332903329133292332933329433295332963329733298332993330033301333023330333304333053330633307333083330933310333113331233313333143331533316333173331833319333203332133322333233332433325333263332733328333293333033331333323333333334333353333633337333383333933340333413334233343333443334533346333473334833349333503335133352333533335433355333563335733358333593336033361333623336333364333653336633367333683336933370333713337233373333743337533376333773337833379333803338133382333833338433385333863338733388333893339033391333923339333394333953339633397333983339933400334013340233403334043340533406334073340833409334103341133412334133341433415334163341733418334193342033421334223342333424334253342633427334283342933430334313343233433334343343533436334373343833439334403344133442334433344433445334463344733448334493345033451334523345333454334553345633457334583345933460334613346233463334643346533466334673346833469334703347133472334733347433475334763347733478334793348033481334823348333484334853348633487334883348933490334913349233493334943349533496334973349833499335003350133502335033350433505335063350733508335093351033511335123351333514335153351633517335183351933520335213352233523335243352533526335273352833529335303353133532335333353433535335363353733538335393354033541335423354333544335453354633547335483354933550335513355233553335543355533556335573355833559335603356133562335633356433565335663356733568335693357033571335723357333574335753357633577335783357933580335813358233583335843358533586335873358833589335903359133592335933359433595335963359733598335993360033601336023360333604336053360633607336083360933610336113361233613336143361533616336173361833619336203362133622336233362433625336263362733628336293363033631336323363333634336353363633637336383363933640336413364233643336443364533646336473364833649336503365133652336533365433655336563365733658336593366033661336623366333664336653366633667336683366933670336713367233673336743367533676336773367833679336803368133682336833368433685336863368733688336893369033691336923369333694336953369633697336983369933700337013370233703337043370533706337073370833709337103371133712337133371433715337163371733718337193372033721337223372333724337253372633727337283372933730337313373233733337343373533736337373373833739337403374133742337433374433745337463374733748337493375033751337523375333754337553375633757337583375933760337613376233763337643376533766337673376833769337703377133772337733377433775337763377733778337793378033781337823378333784337853378633787337883378933790337913379233793337943379533796337973379833799338003380133802338033380433805338063380733808338093381033811338123381333814338153381633817338183381933820338213382233823338243382533826338273382833829338303383133832338333383433835338363383733838338393384033841338423384333844338453384633847338483384933850338513385233853338543385533856338573385833859338603386133862338633386433865338663386733868338693387033871338723387333874338753387633877338783387933880338813388233883338843388533886338873388833889338903389133892338933389433895338963389733898338993390033901339023390333904339053390633907339083390933910339113391233913339143391533916339173391833919339203392133922339233392433925339263392733928339293393033931339323393333934339353393633937339383393933940339413394233943339443394533946339473394833949339503395133952339533395433955339563395733958339593396033961339623396333964339653396633967339683396933970339713397233973339743397533976339773397833979339803398133982339833398433985339863398733988339893399033991339923399333994339953399633997339983399934000340013400234003340043400534006340073400834009340103401134012340133401434015340163401734018340193402034021340223402334024340253402634027340283402934030340313403234033340343403534036340373403834039340403404134042340433404434045340463404734048340493405034051340523405334054340553405634057340583405934060340613406234063340643406534066340673406834069340703407134072340733407434075340763407734078340793408034081340823408334084340853408634087340883408934090340913409234093340943409534096340973409834099341003410134102341033410434105341063410734108341093411034111341123411334114341153411634117341183411934120341213412234123341243412534126341273412834129341303413134132341333413434135341363413734138341393414034141341423414334144341453414634147341483414934150341513415234153341543415534156341573415834159341603416134162341633416434165341663416734168341693417034171341723417334174341753417634177341783417934180341813418234183341843418534186341873418834189341903419134192341933419434195341963419734198341993420034201342023420334204342053420634207342083420934210342113421234213342143421534216342173421834219342203422134222342233422434225342263422734228342293423034231342323423334234342353423634237342383423934240342413424234243342443424534246342473424834249342503425134252342533425434255342563425734258342593426034261342623426334264342653426634267342683426934270342713427234273342743427534276342773427834279342803428134282342833428434285342863428734288342893429034291342923429334294342953429634297342983429934300343013430234303343043430534306343073430834309343103431134312343133431434315343163431734318343193432034321343223432334324343253432634327343283432934330343313433234333343343433534336343373433834339343403434134342343433434434345343463434734348343493435034351343523435334354343553435634357343583435934360343613436234363343643436534366343673436834369343703437134372343733437434375343763437734378343793438034381343823438334384343853438634387343883438934390343913439234393343943439534396343973439834399344003440134402344033440434405344063440734408344093441034411344123441334414344153441634417344183441934420344213442234423344243442534426344273442834429344303443134432344333443434435344363443734438344393444034441344423444334444344453444634447344483444934450344513445234453344543445534456344573445834459344603446134462344633446434465344663446734468344693447034471344723447334474344753447634477344783447934480344813448234483344843448534486344873448834489344903449134492344933449434495344963449734498344993450034501345023450334504345053450634507345083450934510345113451234513345143451534516345173451834519345203452134522345233452434525345263452734528345293453034531345323453334534345353453634537345383453934540345413454234543345443454534546345473454834549345503455134552345533455434555345563455734558345593456034561345623456334564345653456634567345683456934570345713457234573345743457534576345773457834579345803458134582345833458434585345863458734588345893459034591345923459334594345953459634597345983459934600346013460234603346043460534606346073460834609346103461134612346133461434615346163461734618346193462034621346223462334624346253462634627346283462934630346313463234633346343463534636346373463834639346403464134642346433464434645346463464734648346493465034651346523465334654346553465634657346583465934660346613466234663346643466534666346673466834669346703467134672346733467434675346763467734678346793468034681346823468334684346853468634687346883468934690346913469234693346943469534696346973469834699347003470134702347033470434705347063470734708347093471034711347123471334714347153471634717347183471934720347213472234723347243472534726347273472834729347303473134732347333473434735347363473734738347393474034741347423474334744347453474634747347483474934750347513475234753347543475534756347573475834759347603476134762347633476434765347663476734768347693477034771347723477334774347753477634777347783477934780347813478234783347843478534786347873478834789347903479134792347933479434795347963479734798347993480034801348023480334804348053480634807348083480934810348113481234813348143481534816348173481834819348203482134822348233482434825348263482734828348293483034831348323483334834348353483634837348383483934840348413484234843348443484534846348473484834849348503485134852348533485434855348563485734858348593486034861348623486334864348653486634867348683486934870348713487234873348743487534876348773487834879348803488134882348833488434885348863488734888348893489034891348923489334894348953489634897348983489934900349013490234903349043490534906349073490834909349103491134912349133491434915349163491734918349193492034921349223492334924349253492634927349283492934930349313493234933349343493534936349373493834939349403494134942349433494434945349463494734948349493495034951349523495334954349553495634957349583495934960349613496234963349643496534966349673496834969349703497134972349733497434975349763497734978349793498034981349823498334984349853498634987349883498934990349913499234993349943499534996349973499834999350003500135002350033500435005350063500735008350093501035011350123501335014350153501635017350183501935020350213502235023350243502535026350273502835029350303503135032350333503435035350363503735038350393504035041350423504335044350453504635047350483504935050350513505235053350543505535056350573505835059350603506135062350633506435065350663506735068350693507035071350723507335074350753507635077350783507935080350813508235083350843508535086350873508835089350903509135092350933509435095350963509735098350993510035101351023510335104351053510635107351083510935110351113511235113351143511535116351173511835119351203512135122351233512435125351263512735128351293513035131351323513335134351353513635137351383513935140351413514235143351443514535146351473514835149351503515135152351533515435155351563515735158351593516035161351623516335164351653516635167351683516935170351713517235173351743517535176351773517835179351803518135182351833518435185351863518735188351893519035191351923519335194351953519635197351983519935200352013520235203352043520535206352073520835209352103521135212352133521435215352163521735218352193522035221352223522335224352253522635227352283522935230352313523235233352343523535236352373523835239352403524135242352433524435245352463524735248352493525035251352523525335254352553525635257352583525935260352613526235263352643526535266352673526835269352703527135272352733527435275352763527735278352793528035281352823528335284352853528635287352883528935290352913529235293352943529535296352973529835299353003530135302353033530435305353063530735308353093531035311353123531335314353153531635317353183531935320353213532235323353243532535326353273532835329353303533135332353333533435335353363533735338353393534035341353423534335344353453534635347353483534935350353513535235353353543535535356353573535835359353603536135362353633536435365353663536735368353693537035371353723537335374353753537635377353783537935380353813538235383353843538535386353873538835389353903539135392353933539435395353963539735398353993540035401354023540335404354053540635407354083540935410354113541235413354143541535416354173541835419354203542135422354233542435425354263542735428354293543035431354323543335434354353543635437354383543935440354413544235443354443544535446354473544835449354503545135452354533545435455354563545735458354593546035461354623546335464354653546635467354683546935470354713547235473354743547535476354773547835479354803548135482354833548435485354863548735488354893549035491354923549335494354953549635497354983549935500355013550235503355043550535506355073550835509355103551135512355133551435515355163551735518355193552035521355223552335524355253552635527355283552935530355313553235533355343553535536355373553835539355403554135542355433554435545355463554735548355493555035551355523555335554355553555635557355583555935560355613556235563355643556535566355673556835569355703557135572355733557435575355763557735578355793558035581355823558335584355853558635587355883558935590355913559235593355943559535596355973559835599356003560135602356033560435605356063560735608356093561035611356123561335614356153561635617356183561935620356213562235623356243562535626356273562835629356303563135632356333563435635356363563735638356393564035641356423564335644356453564635647356483564935650356513565235653356543565535656356573565835659356603566135662356633566435665356663566735668356693567035671356723567335674356753567635677356783567935680356813568235683356843568535686356873568835689356903569135692356933569435695356963569735698356993570035701357023570335704357053570635707357083570935710357113571235713357143571535716357173571835719357203572135722357233572435725357263572735728357293573035731357323573335734357353573635737357383573935740357413574235743357443574535746357473574835749357503575135752357533575435755357563575735758357593576035761357623576335764357653576635767357683576935770357713577235773357743577535776357773577835779357803578135782357833578435785357863578735788357893579035791357923579335794357953579635797357983579935800358013580235803358043580535806358073580835809358103581135812358133581435815358163581735818358193582035821358223582335824358253582635827358283582935830358313583235833358343583535836358373583835839358403584135842358433584435845358463584735848358493585035851358523585335854358553585635857
  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/EventSessionNextContextUpdated"
  14694. },
  14695. {
  14696. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  14697. },
  14698. {
  14699. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  14700. },
  14701. {
  14702. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  14703. },
  14704. {
  14705. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  14706. },
  14707. {
  14708. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  14709. },
  14710. {
  14711. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  14712. },
  14713. {
  14714. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  14715. },
  14716. {
  14717. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  14718. },
  14719. {
  14720. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  14721. },
  14722. {
  14723. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  14724. },
  14725. {
  14726. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  14727. },
  14728. {
  14729. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  14730. },
  14731. {
  14732. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  14733. },
  14734. {
  14735. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  14736. },
  14737. {
  14738. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  14739. },
  14740. {
  14741. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  14742. },
  14743. {
  14744. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  14745. },
  14746. {
  14747. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  14748. },
  14749. {
  14750. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  14751. },
  14752. {
  14753. "$ref": "#/components/schemas/EventSessionNextRetried"
  14754. },
  14755. {
  14756. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  14757. },
  14758. {
  14759. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  14760. },
  14761. {
  14762. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  14763. },
  14764. {
  14765. "$ref": "#/components/schemas/EventMessagePartDelta"
  14766. },
  14767. {
  14768. "$ref": "#/components/schemas/EventSessionDiff"
  14769. },
  14770. {
  14771. "$ref": "#/components/schemas/EventSessionError"
  14772. },
  14773. {
  14774. "$ref": "#/components/schemas/EventInstallationUpdated"
  14775. },
  14776. {
  14777. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  14778. },
  14779. {
  14780. "$ref": "#/components/schemas/EventFileEdited"
  14781. },
  14782. {
  14783. "$ref": "#/components/schemas/EventPluginAdded"
  14784. },
  14785. {
  14786. "$ref": "#/components/schemas/EventPermissionV2Asked"
  14787. },
  14788. {
  14789. "$ref": "#/components/schemas/EventPermissionV2Replied"
  14790. },
  14791. {
  14792. "$ref": "#/components/schemas/EventReferenceUpdated"
  14793. },
  14794. {
  14795. "$ref": "#/components/schemas/EventProjectDirectoriesUpdated"
  14796. },
  14797. {
  14798. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  14799. },
  14800. {
  14801. "$ref": "#/components/schemas/EventPtyCreated"
  14802. },
  14803. {
  14804. "$ref": "#/components/schemas/EventPtyUpdated"
  14805. },
  14806. {
  14807. "$ref": "#/components/schemas/EventPtyExited"
  14808. },
  14809. {
  14810. "$ref": "#/components/schemas/EventPtyDeleted"
  14811. },
  14812. {
  14813. "$ref": "#/components/schemas/EventQuestionV2Asked"
  14814. },
  14815. {
  14816. "$ref": "#/components/schemas/EventQuestionV2Replied"
  14817. },
  14818. {
  14819. "$ref": "#/components/schemas/EventQuestionV2Rejected"
  14820. },
  14821. {
  14822. "$ref": "#/components/schemas/EventTodoUpdated"
  14823. },
  14824. {
  14825. "$ref": "#/components/schemas/EventLspUpdated"
  14826. },
  14827. {
  14828. "$ref": "#/components/schemas/EventPermissionAsked"
  14829. },
  14830. {
  14831. "$ref": "#/components/schemas/EventPermissionReplied"
  14832. },
  14833. {
  14834. "$ref": "#/components/schemas/Event.tui.prompt.append"
  14835. },
  14836. {
  14837. "$ref": "#/components/schemas/Event.tui.command.execute"
  14838. },
  14839. {
  14840. "$ref": "#/components/schemas/Event.tui.toast.show"
  14841. },
  14842. {
  14843. "$ref": "#/components/schemas/Event.tui.session.select"
  14844. },
  14845. {
  14846. "$ref": "#/components/schemas/EventMcpToolsChanged"
  14847. },
  14848. {
  14849. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  14850. },
  14851. {
  14852. "$ref": "#/components/schemas/EventCommandExecuted"
  14853. },
  14854. {
  14855. "$ref": "#/components/schemas/EventProjectUpdated"
  14856. },
  14857. {
  14858. "$ref": "#/components/schemas/EventSessionStatus"
  14859. },
  14860. {
  14861. "$ref": "#/components/schemas/EventSessionIdle"
  14862. },
  14863. {
  14864. "$ref": "#/components/schemas/EventQuestionAsked"
  14865. },
  14866. {
  14867. "$ref": "#/components/schemas/EventQuestionReplied"
  14868. },
  14869. {
  14870. "$ref": "#/components/schemas/EventQuestionRejected"
  14871. },
  14872. {
  14873. "$ref": "#/components/schemas/EventSessionCompacted"
  14874. },
  14875. {
  14876. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  14877. },
  14878. {
  14879. "$ref": "#/components/schemas/EventWorkspaceReady"
  14880. },
  14881. {
  14882. "$ref": "#/components/schemas/EventWorkspaceFailed"
  14883. },
  14884. {
  14885. "$ref": "#/components/schemas/EventWorkspaceStatus"
  14886. },
  14887. {
  14888. "$ref": "#/components/schemas/EventWorktreeReady"
  14889. },
  14890. {
  14891. "$ref": "#/components/schemas/EventWorktreeFailed"
  14892. },
  14893. {
  14894. "$ref": "#/components/schemas/EventServerConnected"
  14895. },
  14896. {
  14897. "$ref": "#/components/schemas/EventGlobalDisposed"
  14898. },
  14899. {
  14900. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  14901. }
  14902. ]
  14903. },
  14904. "QuestionReplied": {
  14905. "type": "object",
  14906. "properties": {
  14907. "sessionID": {
  14908. "type": "string",
  14909. "pattern": "^ses"
  14910. },
  14911. "requestID": {
  14912. "type": "string",
  14913. "pattern": "^que"
  14914. },
  14915. "answers": {
  14916. "type": "array",
  14917. "items": {
  14918. "$ref": "#/components/schemas/QuestionAnswer"
  14919. }
  14920. }
  14921. },
  14922. "required": ["sessionID", "requestID", "answers"],
  14923. "additionalProperties": false
  14924. },
  14925. "QuestionRejected": {
  14926. "type": "object",
  14927. "properties": {
  14928. "sessionID": {
  14929. "type": "string",
  14930. "pattern": "^ses"
  14931. },
  14932. "requestID": {
  14933. "type": "string",
  14934. "pattern": "^que"
  14935. }
  14936. },
  14937. "required": ["sessionID", "requestID"],
  14938. "additionalProperties": false
  14939. },
  14940. "OAuth": {
  14941. "type": "object",
  14942. "properties": {
  14943. "type": {
  14944. "type": "string",
  14945. "enum": ["oauth"]
  14946. },
  14947. "refresh": {
  14948. "type": "string"
  14949. },
  14950. "access": {
  14951. "type": "string"
  14952. },
  14953. "expires": {
  14954. "type": "integer",
  14955. "minimum": 0
  14956. },
  14957. "accountId": {
  14958. "type": "string"
  14959. },
  14960. "enterpriseUrl": {
  14961. "type": "string"
  14962. }
  14963. },
  14964. "required": ["type", "refresh", "access", "expires"],
  14965. "additionalProperties": false
  14966. },
  14967. "ApiAuth": {
  14968. "type": "object",
  14969. "properties": {
  14970. "type": {
  14971. "type": "string",
  14972. "enum": ["api"]
  14973. },
  14974. "key": {
  14975. "type": "string"
  14976. },
  14977. "metadata": {
  14978. "type": "object",
  14979. "additionalProperties": {
  14980. "type": "string"
  14981. }
  14982. }
  14983. },
  14984. "required": ["type", "key"],
  14985. "additionalProperties": false
  14986. },
  14987. "WellKnownAuth": {
  14988. "type": "object",
  14989. "properties": {
  14990. "type": {
  14991. "type": "string",
  14992. "enum": ["wellknown"]
  14993. },
  14994. "key": {
  14995. "type": "string"
  14996. },
  14997. "token": {
  14998. "type": "string"
  14999. }
  15000. },
  15001. "required": ["type", "key", "token"],
  15002. "additionalProperties": false
  15003. },
  15004. "Auth": {
  15005. "anyOf": [
  15006. {
  15007. "$ref": "#/components/schemas/OAuth"
  15008. },
  15009. {
  15010. "$ref": "#/components/schemas/ApiAuth"
  15011. },
  15012. {
  15013. "$ref": "#/components/schemas/WellKnownAuth"
  15014. }
  15015. ]
  15016. },
  15017. "effect_HttpApiError_BadRequest": {
  15018. "type": "object",
  15019. "properties": {
  15020. "_tag": {
  15021. "type": "string",
  15022. "enum": ["BadRequest"]
  15023. }
  15024. },
  15025. "required": ["_tag"],
  15026. "additionalProperties": false
  15027. },
  15028. "InvalidRequestError": {
  15029. "type": "object",
  15030. "properties": {
  15031. "_tag": {
  15032. "type": "string",
  15033. "enum": ["InvalidRequestError"]
  15034. },
  15035. "message": {
  15036. "type": "string"
  15037. },
  15038. "kind": {
  15039. "type": "string"
  15040. },
  15041. "field": {
  15042. "type": "string"
  15043. }
  15044. },
  15045. "required": ["_tag", "message"],
  15046. "additionalProperties": false
  15047. },
  15048. "MoveSessionError": {
  15049. "type": "object",
  15050. "properties": {
  15051. "name": {
  15052. "type": "string",
  15053. "enum": ["MoveSessionError"]
  15054. },
  15055. "data": {
  15056. "type": "object",
  15057. "properties": {
  15058. "message": {
  15059. "type": "string"
  15060. }
  15061. },
  15062. "required": ["message"],
  15063. "additionalProperties": false
  15064. }
  15065. },
  15066. "required": ["name", "data"],
  15067. "additionalProperties": false
  15068. },
  15069. "SnapshotFileDiff": {
  15070. "type": "object",
  15071. "properties": {
  15072. "file": {
  15073. "type": "string"
  15074. },
  15075. "patch": {
  15076. "type": "string"
  15077. },
  15078. "additions": {
  15079. "type": "number"
  15080. },
  15081. "deletions": {
  15082. "type": "number"
  15083. },
  15084. "status": {
  15085. "type": "string",
  15086. "enum": ["added", "deleted", "modified"]
  15087. }
  15088. },
  15089. "required": ["additions", "deletions"],
  15090. "additionalProperties": false
  15091. },
  15092. "PermissionAction": {
  15093. "type": "string",
  15094. "enum": ["allow", "deny", "ask"]
  15095. },
  15096. "PermissionRule": {
  15097. "type": "object",
  15098. "properties": {
  15099. "permission": {
  15100. "type": "string"
  15101. },
  15102. "pattern": {
  15103. "type": "string"
  15104. },
  15105. "action": {
  15106. "$ref": "#/components/schemas/PermissionAction"
  15107. }
  15108. },
  15109. "required": ["permission", "pattern", "action"],
  15110. "additionalProperties": false
  15111. },
  15112. "PermissionRuleset": {
  15113. "type": "array",
  15114. "items": {
  15115. "$ref": "#/components/schemas/PermissionRule"
  15116. }
  15117. },
  15118. "Session": {
  15119. "type": "object",
  15120. "properties": {
  15121. "id": {
  15122. "type": "string",
  15123. "pattern": "^ses"
  15124. },
  15125. "slug": {
  15126. "type": "string"
  15127. },
  15128. "projectID": {
  15129. "type": "string"
  15130. },
  15131. "workspaceID": {
  15132. "type": "string",
  15133. "pattern": "^wrk"
  15134. },
  15135. "directory": {
  15136. "type": "string"
  15137. },
  15138. "path": {
  15139. "type": "string"
  15140. },
  15141. "parentID": {
  15142. "type": "string",
  15143. "pattern": "^ses"
  15144. },
  15145. "summary": {
  15146. "type": "object",
  15147. "properties": {
  15148. "additions": {
  15149. "type": "number"
  15150. },
  15151. "deletions": {
  15152. "type": "number"
  15153. },
  15154. "files": {
  15155. "type": "number"
  15156. },
  15157. "diffs": {
  15158. "type": "array",
  15159. "items": {
  15160. "$ref": "#/components/schemas/SnapshotFileDiff"
  15161. }
  15162. }
  15163. },
  15164. "required": ["additions", "deletions", "files"],
  15165. "additionalProperties": false
  15166. },
  15167. "cost": {
  15168. "type": "number"
  15169. },
  15170. "tokens": {
  15171. "type": "object",
  15172. "properties": {
  15173. "input": {
  15174. "type": "number"
  15175. },
  15176. "output": {
  15177. "type": "number"
  15178. },
  15179. "reasoning": {
  15180. "type": "number"
  15181. },
  15182. "cache": {
  15183. "type": "object",
  15184. "properties": {
  15185. "read": {
  15186. "type": "number"
  15187. },
  15188. "write": {
  15189. "type": "number"
  15190. }
  15191. },
  15192. "required": ["read", "write"],
  15193. "additionalProperties": false
  15194. }
  15195. },
  15196. "required": ["input", "output", "reasoning", "cache"],
  15197. "additionalProperties": false
  15198. },
  15199. "share": {
  15200. "type": "object",
  15201. "properties": {
  15202. "url": {
  15203. "type": "string"
  15204. }
  15205. },
  15206. "required": ["url"],
  15207. "additionalProperties": false
  15208. },
  15209. "title": {
  15210. "type": "string"
  15211. },
  15212. "agent": {
  15213. "type": "string"
  15214. },
  15215. "model": {
  15216. "type": "object",
  15217. "properties": {
  15218. "id": {
  15219. "type": "string"
  15220. },
  15221. "providerID": {
  15222. "type": "string"
  15223. },
  15224. "variant": {
  15225. "type": "string"
  15226. }
  15227. },
  15228. "required": ["id", "providerID"],
  15229. "additionalProperties": false
  15230. },
  15231. "version": {
  15232. "type": "string"
  15233. },
  15234. "metadata": {
  15235. "type": "object"
  15236. },
  15237. "time": {
  15238. "type": "object",
  15239. "properties": {
  15240. "created": {
  15241. "type": "integer",
  15242. "minimum": 0
  15243. },
  15244. "updated": {
  15245. "type": "integer",
  15246. "minimum": 0
  15247. },
  15248. "compacting": {
  15249. "type": "integer",
  15250. "minimum": 0
  15251. },
  15252. "archived": {
  15253. "type": "number"
  15254. }
  15255. },
  15256. "required": ["created", "updated"],
  15257. "additionalProperties": false
  15258. },
  15259. "permission": {
  15260. "$ref": "#/components/schemas/PermissionRuleset"
  15261. },
  15262. "revert": {
  15263. "type": "object",
  15264. "properties": {
  15265. "messageID": {
  15266. "type": "string",
  15267. "pattern": "^msg"
  15268. },
  15269. "partID": {
  15270. "type": "string",
  15271. "pattern": "^prt"
  15272. },
  15273. "snapshot": {
  15274. "type": "string"
  15275. },
  15276. "diff": {
  15277. "type": "string"
  15278. }
  15279. },
  15280. "required": ["messageID"],
  15281. "additionalProperties": false
  15282. }
  15283. },
  15284. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  15285. "additionalProperties": false
  15286. },
  15287. "OutputFormatText": {
  15288. "type": "object",
  15289. "properties": {
  15290. "type": {
  15291. "type": "string",
  15292. "enum": ["text"]
  15293. }
  15294. },
  15295. "required": ["type"],
  15296. "additionalProperties": false
  15297. },
  15298. "JSONSchema": {
  15299. "type": "object"
  15300. },
  15301. "OutputFormatJsonSchema": {
  15302. "type": "object",
  15303. "properties": {
  15304. "type": {
  15305. "type": "string",
  15306. "enum": ["json_schema"]
  15307. },
  15308. "schema": {
  15309. "$ref": "#/components/schemas/JSONSchema"
  15310. },
  15311. "retryCount": {
  15312. "type": "integer",
  15313. "minimum": 0
  15314. }
  15315. },
  15316. "required": ["type", "schema"],
  15317. "additionalProperties": false
  15318. },
  15319. "OutputFormat": {
  15320. "anyOf": [
  15321. {
  15322. "$ref": "#/components/schemas/OutputFormatText"
  15323. },
  15324. {
  15325. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  15326. }
  15327. ]
  15328. },
  15329. "UserMessage": {
  15330. "type": "object",
  15331. "properties": {
  15332. "id": {
  15333. "type": "string",
  15334. "pattern": "^msg"
  15335. },
  15336. "sessionID": {
  15337. "type": "string",
  15338. "pattern": "^ses"
  15339. },
  15340. "role": {
  15341. "type": "string",
  15342. "enum": ["user"]
  15343. },
  15344. "time": {
  15345. "type": "object",
  15346. "properties": {
  15347. "created": {
  15348. "type": "number",
  15349. "minimum": 0
  15350. }
  15351. },
  15352. "required": ["created"],
  15353. "additionalProperties": false
  15354. },
  15355. "format": {
  15356. "$ref": "#/components/schemas/OutputFormat"
  15357. },
  15358. "summary": {
  15359. "type": "object",
  15360. "properties": {
  15361. "title": {
  15362. "type": "string"
  15363. },
  15364. "body": {
  15365. "type": "string"
  15366. },
  15367. "diffs": {
  15368. "type": "array",
  15369. "items": {
  15370. "$ref": "#/components/schemas/SnapshotFileDiff"
  15371. }
  15372. }
  15373. },
  15374. "required": ["diffs"],
  15375. "additionalProperties": false
  15376. },
  15377. "agent": {
  15378. "type": "string"
  15379. },
  15380. "model": {
  15381. "type": "object",
  15382. "properties": {
  15383. "providerID": {
  15384. "type": "string"
  15385. },
  15386. "modelID": {
  15387. "type": "string"
  15388. },
  15389. "variant": {
  15390. "type": "string"
  15391. }
  15392. },
  15393. "required": ["providerID", "modelID"],
  15394. "additionalProperties": false
  15395. },
  15396. "system": {
  15397. "type": "string"
  15398. },
  15399. "tools": {
  15400. "type": "object",
  15401. "additionalProperties": {
  15402. "type": "boolean"
  15403. }
  15404. }
  15405. },
  15406. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  15407. "additionalProperties": false
  15408. },
  15409. "ProviderAuthError": {
  15410. "type": "object",
  15411. "properties": {
  15412. "name": {
  15413. "type": "string",
  15414. "enum": ["ProviderAuthError"]
  15415. },
  15416. "data": {
  15417. "type": "object",
  15418. "properties": {
  15419. "providerID": {
  15420. "type": "string"
  15421. },
  15422. "message": {
  15423. "type": "string"
  15424. }
  15425. },
  15426. "required": ["providerID", "message"],
  15427. "additionalProperties": false
  15428. }
  15429. },
  15430. "required": ["name", "data"],
  15431. "additionalProperties": false
  15432. },
  15433. "UnknownError": {
  15434. "type": "object",
  15435. "properties": {
  15436. "name": {
  15437. "type": "string",
  15438. "enum": ["UnknownError"]
  15439. },
  15440. "data": {
  15441. "type": "object",
  15442. "properties": {
  15443. "message": {
  15444. "type": "string"
  15445. },
  15446. "ref": {
  15447. "type": "string"
  15448. }
  15449. },
  15450. "required": ["message"],
  15451. "additionalProperties": false
  15452. }
  15453. },
  15454. "required": ["name", "data"],
  15455. "additionalProperties": false
  15456. },
  15457. "MessageOutputLengthError": {
  15458. "type": "object",
  15459. "properties": {
  15460. "name": {
  15461. "type": "string",
  15462. "enum": ["MessageOutputLengthError"]
  15463. },
  15464. "data": {
  15465. "type": "object",
  15466. "properties": {}
  15467. }
  15468. },
  15469. "required": ["name", "data"],
  15470. "additionalProperties": false
  15471. },
  15472. "MessageAbortedError": {
  15473. "type": "object",
  15474. "properties": {
  15475. "name": {
  15476. "type": "string",
  15477. "enum": ["MessageAbortedError"]
  15478. },
  15479. "data": {
  15480. "type": "object",
  15481. "properties": {
  15482. "message": {
  15483. "type": "string"
  15484. }
  15485. },
  15486. "required": ["message"],
  15487. "additionalProperties": false
  15488. }
  15489. },
  15490. "required": ["name", "data"],
  15491. "additionalProperties": false
  15492. },
  15493. "StructuredOutputError": {
  15494. "type": "object",
  15495. "properties": {
  15496. "name": {
  15497. "type": "string",
  15498. "enum": ["StructuredOutputError"]
  15499. },
  15500. "data": {
  15501. "type": "object",
  15502. "properties": {
  15503. "message": {
  15504. "type": "string"
  15505. },
  15506. "retries": {
  15507. "type": "integer",
  15508. "minimum": 0
  15509. }
  15510. },
  15511. "required": ["message", "retries"],
  15512. "additionalProperties": false
  15513. }
  15514. },
  15515. "required": ["name", "data"],
  15516. "additionalProperties": false
  15517. },
  15518. "ContextOverflowError": {
  15519. "type": "object",
  15520. "properties": {
  15521. "name": {
  15522. "type": "string",
  15523. "enum": ["ContextOverflowError"]
  15524. },
  15525. "data": {
  15526. "type": "object",
  15527. "properties": {
  15528. "message": {
  15529. "type": "string"
  15530. },
  15531. "responseBody": {
  15532. "type": "string"
  15533. }
  15534. },
  15535. "required": ["message"],
  15536. "additionalProperties": false
  15537. }
  15538. },
  15539. "required": ["name", "data"],
  15540. "additionalProperties": false
  15541. },
  15542. "ContentFilterError": {
  15543. "type": "object",
  15544. "properties": {
  15545. "name": {
  15546. "type": "string",
  15547. "enum": ["ContentFilterError"]
  15548. },
  15549. "data": {
  15550. "type": "object",
  15551. "properties": {
  15552. "message": {
  15553. "type": "string"
  15554. }
  15555. },
  15556. "required": ["message"],
  15557. "additionalProperties": false
  15558. }
  15559. },
  15560. "required": ["name", "data"],
  15561. "additionalProperties": false
  15562. },
  15563. "APIError": {
  15564. "type": "object",
  15565. "properties": {
  15566. "name": {
  15567. "type": "string",
  15568. "enum": ["APIError"]
  15569. },
  15570. "data": {
  15571. "type": "object",
  15572. "properties": {
  15573. "message": {
  15574. "type": "string"
  15575. },
  15576. "statusCode": {
  15577. "type": "integer",
  15578. "minimum": 0
  15579. },
  15580. "isRetryable": {
  15581. "type": "boolean"
  15582. },
  15583. "responseHeaders": {
  15584. "type": "object",
  15585. "additionalProperties": {
  15586. "type": "string"
  15587. }
  15588. },
  15589. "responseBody": {
  15590. "type": "string"
  15591. },
  15592. "metadata": {
  15593. "type": "object",
  15594. "additionalProperties": {
  15595. "type": "string"
  15596. }
  15597. }
  15598. },
  15599. "required": ["message", "isRetryable"],
  15600. "additionalProperties": false
  15601. }
  15602. },
  15603. "required": ["name", "data"],
  15604. "additionalProperties": false
  15605. },
  15606. "AssistantMessage": {
  15607. "type": "object",
  15608. "properties": {
  15609. "id": {
  15610. "type": "string",
  15611. "pattern": "^msg"
  15612. },
  15613. "sessionID": {
  15614. "type": "string",
  15615. "pattern": "^ses"
  15616. },
  15617. "role": {
  15618. "type": "string",
  15619. "enum": ["assistant"]
  15620. },
  15621. "time": {
  15622. "type": "object",
  15623. "properties": {
  15624. "created": {
  15625. "type": "integer",
  15626. "minimum": 0
  15627. },
  15628. "completed": {
  15629. "type": "integer",
  15630. "minimum": 0
  15631. }
  15632. },
  15633. "required": ["created"],
  15634. "additionalProperties": false
  15635. },
  15636. "error": {
  15637. "anyOf": [
  15638. {
  15639. "$ref": "#/components/schemas/ProviderAuthError"
  15640. },
  15641. {
  15642. "$ref": "#/components/schemas/UnknownError"
  15643. },
  15644. {
  15645. "$ref": "#/components/schemas/MessageOutputLengthError"
  15646. },
  15647. {
  15648. "$ref": "#/components/schemas/MessageAbortedError"
  15649. },
  15650. {
  15651. "$ref": "#/components/schemas/StructuredOutputError"
  15652. },
  15653. {
  15654. "$ref": "#/components/schemas/ContextOverflowError"
  15655. },
  15656. {
  15657. "$ref": "#/components/schemas/ContentFilterError"
  15658. },
  15659. {
  15660. "$ref": "#/components/schemas/APIError"
  15661. }
  15662. ]
  15663. },
  15664. "parentID": {
  15665. "type": "string",
  15666. "pattern": "^msg"
  15667. },
  15668. "modelID": {
  15669. "type": "string"
  15670. },
  15671. "providerID": {
  15672. "type": "string"
  15673. },
  15674. "mode": {
  15675. "type": "string"
  15676. },
  15677. "agent": {
  15678. "type": "string"
  15679. },
  15680. "path": {
  15681. "type": "object",
  15682. "properties": {
  15683. "cwd": {
  15684. "type": "string"
  15685. },
  15686. "root": {
  15687. "type": "string"
  15688. }
  15689. },
  15690. "required": ["cwd", "root"],
  15691. "additionalProperties": false
  15692. },
  15693. "summary": {
  15694. "type": "boolean"
  15695. },
  15696. "cost": {
  15697. "type": "number"
  15698. },
  15699. "tokens": {
  15700. "type": "object",
  15701. "properties": {
  15702. "total": {
  15703. "type": "number"
  15704. },
  15705. "input": {
  15706. "type": "number"
  15707. },
  15708. "output": {
  15709. "type": "number"
  15710. },
  15711. "reasoning": {
  15712. "type": "number"
  15713. },
  15714. "cache": {
  15715. "type": "object",
  15716. "properties": {
  15717. "read": {
  15718. "type": "number"
  15719. },
  15720. "write": {
  15721. "type": "number"
  15722. }
  15723. },
  15724. "required": ["read", "write"],
  15725. "additionalProperties": false
  15726. }
  15727. },
  15728. "required": ["input", "output", "reasoning", "cache"],
  15729. "additionalProperties": false
  15730. },
  15731. "structured": {},
  15732. "variant": {
  15733. "type": "string"
  15734. },
  15735. "finish": {
  15736. "type": "string"
  15737. }
  15738. },
  15739. "required": [
  15740. "id",
  15741. "sessionID",
  15742. "role",
  15743. "time",
  15744. "parentID",
  15745. "modelID",
  15746. "providerID",
  15747. "mode",
  15748. "agent",
  15749. "path",
  15750. "cost",
  15751. "tokens"
  15752. ],
  15753. "additionalProperties": false
  15754. },
  15755. "Message": {
  15756. "anyOf": [
  15757. {
  15758. "$ref": "#/components/schemas/UserMessage"
  15759. },
  15760. {
  15761. "$ref": "#/components/schemas/AssistantMessage"
  15762. }
  15763. ]
  15764. },
  15765. "TextPart": {
  15766. "type": "object",
  15767. "properties": {
  15768. "id": {
  15769. "type": "string",
  15770. "pattern": "^prt"
  15771. },
  15772. "sessionID": {
  15773. "type": "string",
  15774. "pattern": "^ses"
  15775. },
  15776. "messageID": {
  15777. "type": "string",
  15778. "pattern": "^msg"
  15779. },
  15780. "type": {
  15781. "type": "string",
  15782. "enum": ["text"]
  15783. },
  15784. "text": {
  15785. "type": "string"
  15786. },
  15787. "synthetic": {
  15788. "type": "boolean"
  15789. },
  15790. "ignored": {
  15791. "type": "boolean"
  15792. },
  15793. "time": {
  15794. "type": "object",
  15795. "properties": {
  15796. "start": {
  15797. "type": "integer",
  15798. "minimum": 0
  15799. },
  15800. "end": {
  15801. "type": "integer",
  15802. "minimum": 0
  15803. }
  15804. },
  15805. "required": ["start"],
  15806. "additionalProperties": false
  15807. },
  15808. "metadata": {
  15809. "type": "object"
  15810. }
  15811. },
  15812. "required": ["id", "sessionID", "messageID", "type", "text"],
  15813. "additionalProperties": false
  15814. },
  15815. "SubtaskPart": {
  15816. "type": "object",
  15817. "properties": {
  15818. "id": {
  15819. "type": "string",
  15820. "pattern": "^prt"
  15821. },
  15822. "sessionID": {
  15823. "type": "string",
  15824. "pattern": "^ses"
  15825. },
  15826. "messageID": {
  15827. "type": "string",
  15828. "pattern": "^msg"
  15829. },
  15830. "type": {
  15831. "type": "string",
  15832. "enum": ["subtask"]
  15833. },
  15834. "prompt": {
  15835. "type": "string"
  15836. },
  15837. "description": {
  15838. "type": "string"
  15839. },
  15840. "agent": {
  15841. "type": "string"
  15842. },
  15843. "model": {
  15844. "type": "object",
  15845. "properties": {
  15846. "providerID": {
  15847. "type": "string"
  15848. },
  15849. "modelID": {
  15850. "type": "string"
  15851. }
  15852. },
  15853. "required": ["providerID", "modelID"],
  15854. "additionalProperties": false
  15855. },
  15856. "command": {
  15857. "type": "string"
  15858. }
  15859. },
  15860. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  15861. "additionalProperties": false
  15862. },
  15863. "ReasoningPart": {
  15864. "type": "object",
  15865. "properties": {
  15866. "id": {
  15867. "type": "string",
  15868. "pattern": "^prt"
  15869. },
  15870. "sessionID": {
  15871. "type": "string",
  15872. "pattern": "^ses"
  15873. },
  15874. "messageID": {
  15875. "type": "string",
  15876. "pattern": "^msg"
  15877. },
  15878. "type": {
  15879. "type": "string",
  15880. "enum": ["reasoning"]
  15881. },
  15882. "text": {
  15883. "type": "string"
  15884. },
  15885. "metadata": {
  15886. "type": "object"
  15887. },
  15888. "time": {
  15889. "type": "object",
  15890. "properties": {
  15891. "start": {
  15892. "type": "integer",
  15893. "minimum": 0
  15894. },
  15895. "end": {
  15896. "type": "integer",
  15897. "minimum": 0
  15898. }
  15899. },
  15900. "required": ["start"],
  15901. "additionalProperties": false
  15902. }
  15903. },
  15904. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  15905. "additionalProperties": false
  15906. },
  15907. "FilePartSourceText": {
  15908. "type": "object",
  15909. "properties": {
  15910. "value": {
  15911. "type": "string"
  15912. },
  15913. "start": {
  15914. "type": "number"
  15915. },
  15916. "end": {
  15917. "type": "number"
  15918. }
  15919. },
  15920. "required": ["value", "start", "end"],
  15921. "additionalProperties": false
  15922. },
  15923. "FileSource": {
  15924. "type": "object",
  15925. "properties": {
  15926. "text": {
  15927. "$ref": "#/components/schemas/FilePartSourceText"
  15928. },
  15929. "type": {
  15930. "type": "string",
  15931. "enum": ["file"]
  15932. },
  15933. "path": {
  15934. "type": "string"
  15935. }
  15936. },
  15937. "required": ["text", "type", "path"],
  15938. "additionalProperties": false
  15939. },
  15940. "Range": {
  15941. "type": "object",
  15942. "properties": {
  15943. "start": {
  15944. "type": "object",
  15945. "properties": {
  15946. "line": {
  15947. "type": "integer",
  15948. "minimum": 0
  15949. },
  15950. "character": {
  15951. "type": "integer",
  15952. "minimum": 0
  15953. }
  15954. },
  15955. "required": ["line", "character"],
  15956. "additionalProperties": false
  15957. },
  15958. "end": {
  15959. "type": "object",
  15960. "properties": {
  15961. "line": {
  15962. "type": "integer",
  15963. "minimum": 0
  15964. },
  15965. "character": {
  15966. "type": "integer",
  15967. "minimum": 0
  15968. }
  15969. },
  15970. "required": ["line", "character"],
  15971. "additionalProperties": false
  15972. }
  15973. },
  15974. "required": ["start", "end"],
  15975. "additionalProperties": false
  15976. },
  15977. "SymbolSource": {
  15978. "type": "object",
  15979. "properties": {
  15980. "text": {
  15981. "$ref": "#/components/schemas/FilePartSourceText"
  15982. },
  15983. "type": {
  15984. "type": "string",
  15985. "enum": ["symbol"]
  15986. },
  15987. "path": {
  15988. "type": "string"
  15989. },
  15990. "range": {
  15991. "$ref": "#/components/schemas/Range"
  15992. },
  15993. "name": {
  15994. "type": "string"
  15995. },
  15996. "kind": {
  15997. "type": "integer",
  15998. "minimum": 0
  15999. }
  16000. },
  16001. "required": ["text", "type", "path", "range", "name", "kind"],
  16002. "additionalProperties": false
  16003. },
  16004. "ResourceSource": {
  16005. "type": "object",
  16006. "properties": {
  16007. "text": {
  16008. "$ref": "#/components/schemas/FilePartSourceText"
  16009. },
  16010. "type": {
  16011. "type": "string",
  16012. "enum": ["resource"]
  16013. },
  16014. "clientName": {
  16015. "type": "string"
  16016. },
  16017. "uri": {
  16018. "type": "string"
  16019. }
  16020. },
  16021. "required": ["text", "type", "clientName", "uri"],
  16022. "additionalProperties": false
  16023. },
  16024. "FilePartSource": {
  16025. "anyOf": [
  16026. {
  16027. "$ref": "#/components/schemas/FileSource"
  16028. },
  16029. {
  16030. "$ref": "#/components/schemas/SymbolSource"
  16031. },
  16032. {
  16033. "$ref": "#/components/schemas/ResourceSource"
  16034. }
  16035. ]
  16036. },
  16037. "FilePart": {
  16038. "type": "object",
  16039. "properties": {
  16040. "id": {
  16041. "type": "string",
  16042. "pattern": "^prt"
  16043. },
  16044. "sessionID": {
  16045. "type": "string",
  16046. "pattern": "^ses"
  16047. },
  16048. "messageID": {
  16049. "type": "string",
  16050. "pattern": "^msg"
  16051. },
  16052. "type": {
  16053. "type": "string",
  16054. "enum": ["file"]
  16055. },
  16056. "mime": {
  16057. "type": "string"
  16058. },
  16059. "filename": {
  16060. "type": "string"
  16061. },
  16062. "url": {
  16063. "type": "string"
  16064. },
  16065. "source": {
  16066. "$ref": "#/components/schemas/FilePartSource"
  16067. }
  16068. },
  16069. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  16070. "additionalProperties": false
  16071. },
  16072. "ToolStatePending": {
  16073. "type": "object",
  16074. "properties": {
  16075. "status": {
  16076. "type": "string",
  16077. "enum": ["pending"]
  16078. },
  16079. "input": {
  16080. "type": "object"
  16081. },
  16082. "raw": {
  16083. "type": "string"
  16084. }
  16085. },
  16086. "required": ["status", "input", "raw"],
  16087. "additionalProperties": false
  16088. },
  16089. "ToolStateRunning": {
  16090. "type": "object",
  16091. "properties": {
  16092. "status": {
  16093. "type": "string",
  16094. "enum": ["running"]
  16095. },
  16096. "input": {
  16097. "type": "object"
  16098. },
  16099. "title": {
  16100. "type": "string"
  16101. },
  16102. "metadata": {
  16103. "type": "object"
  16104. },
  16105. "time": {
  16106. "type": "object",
  16107. "properties": {
  16108. "start": {
  16109. "type": "integer",
  16110. "minimum": 0
  16111. }
  16112. },
  16113. "required": ["start"],
  16114. "additionalProperties": false
  16115. }
  16116. },
  16117. "required": ["status", "input", "time"],
  16118. "additionalProperties": false
  16119. },
  16120. "ToolStateCompleted": {
  16121. "type": "object",
  16122. "properties": {
  16123. "status": {
  16124. "type": "string",
  16125. "enum": ["completed"]
  16126. },
  16127. "input": {
  16128. "type": "object"
  16129. },
  16130. "output": {
  16131. "type": "string"
  16132. },
  16133. "title": {
  16134. "type": "string"
  16135. },
  16136. "metadata": {
  16137. "type": "object"
  16138. },
  16139. "time": {
  16140. "type": "object",
  16141. "properties": {
  16142. "start": {
  16143. "type": "integer",
  16144. "minimum": 0
  16145. },
  16146. "end": {
  16147. "type": "integer",
  16148. "minimum": 0
  16149. },
  16150. "compacted": {
  16151. "type": "integer",
  16152. "minimum": 0
  16153. }
  16154. },
  16155. "required": ["start", "end"],
  16156. "additionalProperties": false
  16157. },
  16158. "attachments": {
  16159. "type": "array",
  16160. "items": {
  16161. "$ref": "#/components/schemas/FilePart"
  16162. }
  16163. }
  16164. },
  16165. "required": ["status", "input", "output", "title", "metadata", "time"],
  16166. "additionalProperties": false
  16167. },
  16168. "ToolStateError": {
  16169. "type": "object",
  16170. "properties": {
  16171. "status": {
  16172. "type": "string",
  16173. "enum": ["error"]
  16174. },
  16175. "input": {
  16176. "type": "object"
  16177. },
  16178. "error": {
  16179. "type": "string"
  16180. },
  16181. "metadata": {
  16182. "type": "object"
  16183. },
  16184. "time": {
  16185. "type": "object",
  16186. "properties": {
  16187. "start": {
  16188. "type": "integer",
  16189. "minimum": 0
  16190. },
  16191. "end": {
  16192. "type": "integer",
  16193. "minimum": 0
  16194. }
  16195. },
  16196. "required": ["start", "end"],
  16197. "additionalProperties": false
  16198. }
  16199. },
  16200. "required": ["status", "input", "error", "time"],
  16201. "additionalProperties": false
  16202. },
  16203. "ToolState": {
  16204. "anyOf": [
  16205. {
  16206. "$ref": "#/components/schemas/ToolStatePending"
  16207. },
  16208. {
  16209. "$ref": "#/components/schemas/ToolStateRunning"
  16210. },
  16211. {
  16212. "$ref": "#/components/schemas/ToolStateCompleted"
  16213. },
  16214. {
  16215. "$ref": "#/components/schemas/ToolStateError"
  16216. }
  16217. ]
  16218. },
  16219. "ToolPart": {
  16220. "type": "object",
  16221. "properties": {
  16222. "id": {
  16223. "type": "string",
  16224. "pattern": "^prt"
  16225. },
  16226. "sessionID": {
  16227. "type": "string",
  16228. "pattern": "^ses"
  16229. },
  16230. "messageID": {
  16231. "type": "string",
  16232. "pattern": "^msg"
  16233. },
  16234. "type": {
  16235. "type": "string",
  16236. "enum": ["tool"]
  16237. },
  16238. "callID": {
  16239. "type": "string"
  16240. },
  16241. "tool": {
  16242. "type": "string"
  16243. },
  16244. "state": {
  16245. "$ref": "#/components/schemas/ToolState"
  16246. },
  16247. "metadata": {
  16248. "type": "object"
  16249. }
  16250. },
  16251. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  16252. "additionalProperties": false
  16253. },
  16254. "StepStartPart": {
  16255. "type": "object",
  16256. "properties": {
  16257. "id": {
  16258. "type": "string",
  16259. "pattern": "^prt"
  16260. },
  16261. "sessionID": {
  16262. "type": "string",
  16263. "pattern": "^ses"
  16264. },
  16265. "messageID": {
  16266. "type": "string",
  16267. "pattern": "^msg"
  16268. },
  16269. "type": {
  16270. "type": "string",
  16271. "enum": ["step-start"]
  16272. },
  16273. "snapshot": {
  16274. "type": "string"
  16275. }
  16276. },
  16277. "required": ["id", "sessionID", "messageID", "type"],
  16278. "additionalProperties": false
  16279. },
  16280. "StepFinishPart": {
  16281. "type": "object",
  16282. "properties": {
  16283. "id": {
  16284. "type": "string",
  16285. "pattern": "^prt"
  16286. },
  16287. "sessionID": {
  16288. "type": "string",
  16289. "pattern": "^ses"
  16290. },
  16291. "messageID": {
  16292. "type": "string",
  16293. "pattern": "^msg"
  16294. },
  16295. "type": {
  16296. "type": "string",
  16297. "enum": ["step-finish"]
  16298. },
  16299. "reason": {
  16300. "type": "string"
  16301. },
  16302. "snapshot": {
  16303. "type": "string"
  16304. },
  16305. "cost": {
  16306. "type": "number"
  16307. },
  16308. "tokens": {
  16309. "type": "object",
  16310. "properties": {
  16311. "total": {
  16312. "type": "number"
  16313. },
  16314. "input": {
  16315. "type": "number"
  16316. },
  16317. "output": {
  16318. "type": "number"
  16319. },
  16320. "reasoning": {
  16321. "type": "number"
  16322. },
  16323. "cache": {
  16324. "type": "object",
  16325. "properties": {
  16326. "read": {
  16327. "type": "number"
  16328. },
  16329. "write": {
  16330. "type": "number"
  16331. }
  16332. },
  16333. "required": ["read", "write"],
  16334. "additionalProperties": false
  16335. }
  16336. },
  16337. "required": ["input", "output", "reasoning", "cache"],
  16338. "additionalProperties": false
  16339. }
  16340. },
  16341. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  16342. "additionalProperties": false
  16343. },
  16344. "SnapshotPart": {
  16345. "type": "object",
  16346. "properties": {
  16347. "id": {
  16348. "type": "string",
  16349. "pattern": "^prt"
  16350. },
  16351. "sessionID": {
  16352. "type": "string",
  16353. "pattern": "^ses"
  16354. },
  16355. "messageID": {
  16356. "type": "string",
  16357. "pattern": "^msg"
  16358. },
  16359. "type": {
  16360. "type": "string",
  16361. "enum": ["snapshot"]
  16362. },
  16363. "snapshot": {
  16364. "type": "string"
  16365. }
  16366. },
  16367. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  16368. "additionalProperties": false
  16369. },
  16370. "PatchPart": {
  16371. "type": "object",
  16372. "properties": {
  16373. "id": {
  16374. "type": "string",
  16375. "pattern": "^prt"
  16376. },
  16377. "sessionID": {
  16378. "type": "string",
  16379. "pattern": "^ses"
  16380. },
  16381. "messageID": {
  16382. "type": "string",
  16383. "pattern": "^msg"
  16384. },
  16385. "type": {
  16386. "type": "string",
  16387. "enum": ["patch"]
  16388. },
  16389. "hash": {
  16390. "type": "string"
  16391. },
  16392. "files": {
  16393. "type": "array",
  16394. "items": {
  16395. "type": "string"
  16396. }
  16397. }
  16398. },
  16399. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  16400. "additionalProperties": false
  16401. },
  16402. "AgentPart": {
  16403. "type": "object",
  16404. "properties": {
  16405. "id": {
  16406. "type": "string",
  16407. "pattern": "^prt"
  16408. },
  16409. "sessionID": {
  16410. "type": "string",
  16411. "pattern": "^ses"
  16412. },
  16413. "messageID": {
  16414. "type": "string",
  16415. "pattern": "^msg"
  16416. },
  16417. "type": {
  16418. "type": "string",
  16419. "enum": ["agent"]
  16420. },
  16421. "name": {
  16422. "type": "string"
  16423. },
  16424. "source": {
  16425. "type": "object",
  16426. "properties": {
  16427. "value": {
  16428. "type": "string"
  16429. },
  16430. "start": {
  16431. "type": "integer",
  16432. "minimum": 0
  16433. },
  16434. "end": {
  16435. "type": "integer",
  16436. "minimum": 0
  16437. }
  16438. },
  16439. "required": ["value", "start", "end"],
  16440. "additionalProperties": false
  16441. }
  16442. },
  16443. "required": ["id", "sessionID", "messageID", "type", "name"],
  16444. "additionalProperties": false
  16445. },
  16446. "RetryPart": {
  16447. "type": "object",
  16448. "properties": {
  16449. "id": {
  16450. "type": "string",
  16451. "pattern": "^prt"
  16452. },
  16453. "sessionID": {
  16454. "type": "string",
  16455. "pattern": "^ses"
  16456. },
  16457. "messageID": {
  16458. "type": "string",
  16459. "pattern": "^msg"
  16460. },
  16461. "type": {
  16462. "type": "string",
  16463. "enum": ["retry"]
  16464. },
  16465. "attempt": {
  16466. "type": "integer",
  16467. "minimum": 0
  16468. },
  16469. "error": {
  16470. "$ref": "#/components/schemas/APIError"
  16471. },
  16472. "time": {
  16473. "type": "object",
  16474. "properties": {
  16475. "created": {
  16476. "type": "integer",
  16477. "minimum": 0
  16478. }
  16479. },
  16480. "required": ["created"],
  16481. "additionalProperties": false
  16482. }
  16483. },
  16484. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  16485. "additionalProperties": false
  16486. },
  16487. "CompactionPart": {
  16488. "type": "object",
  16489. "properties": {
  16490. "id": {
  16491. "type": "string",
  16492. "pattern": "^prt"
  16493. },
  16494. "sessionID": {
  16495. "type": "string",
  16496. "pattern": "^ses"
  16497. },
  16498. "messageID": {
  16499. "type": "string",
  16500. "pattern": "^msg"
  16501. },
  16502. "type": {
  16503. "type": "string",
  16504. "enum": ["compaction"]
  16505. },
  16506. "auto": {
  16507. "type": "boolean"
  16508. },
  16509. "overflow": {
  16510. "type": "boolean"
  16511. },
  16512. "tail_start_id": {
  16513. "type": "string",
  16514. "pattern": "^msg"
  16515. }
  16516. },
  16517. "required": ["id", "sessionID", "messageID", "type", "auto"],
  16518. "additionalProperties": false
  16519. },
  16520. "Part": {
  16521. "anyOf": [
  16522. {
  16523. "$ref": "#/components/schemas/TextPart"
  16524. },
  16525. {
  16526. "$ref": "#/components/schemas/SubtaskPart"
  16527. },
  16528. {
  16529. "$ref": "#/components/schemas/ReasoningPart"
  16530. },
  16531. {
  16532. "$ref": "#/components/schemas/FilePart"
  16533. },
  16534. {
  16535. "$ref": "#/components/schemas/ToolPart"
  16536. },
  16537. {
  16538. "$ref": "#/components/schemas/StepStartPart"
  16539. },
  16540. {
  16541. "$ref": "#/components/schemas/StepFinishPart"
  16542. },
  16543. {
  16544. "$ref": "#/components/schemas/SnapshotPart"
  16545. },
  16546. {
  16547. "$ref": "#/components/schemas/PatchPart"
  16548. },
  16549. {
  16550. "$ref": "#/components/schemas/AgentPart"
  16551. },
  16552. {
  16553. "$ref": "#/components/schemas/RetryPart"
  16554. },
  16555. {
  16556. "$ref": "#/components/schemas/CompactionPart"
  16557. }
  16558. ]
  16559. },
  16560. "Prompt": {
  16561. "type": "object",
  16562. "properties": {
  16563. "text": {
  16564. "type": "string"
  16565. },
  16566. "files": {
  16567. "type": "array",
  16568. "items": {
  16569. "$ref": "#/components/schemas/PromptFileAttachment"
  16570. }
  16571. },
  16572. "agents": {
  16573. "type": "array",
  16574. "items": {
  16575. "$ref": "#/components/schemas/PromptAgentAttachment"
  16576. }
  16577. }
  16578. },
  16579. "required": ["text"],
  16580. "additionalProperties": false
  16581. },
  16582. "Pty": {
  16583. "type": "object",
  16584. "properties": {
  16585. "id": {
  16586. "type": "string",
  16587. "pattern": "^pty"
  16588. },
  16589. "title": {
  16590. "type": "string"
  16591. },
  16592. "command": {
  16593. "type": "string"
  16594. },
  16595. "args": {
  16596. "type": "array",
  16597. "items": {
  16598. "type": "string"
  16599. }
  16600. },
  16601. "cwd": {
  16602. "type": "string"
  16603. },
  16604. "status": {
  16605. "type": "string",
  16606. "enum": ["running", "exited"]
  16607. },
  16608. "pid": {
  16609. "type": "integer",
  16610. "minimum": 0
  16611. },
  16612. "exitCode": {
  16613. "type": "integer",
  16614. "minimum": 0
  16615. }
  16616. },
  16617. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  16618. "additionalProperties": false
  16619. },
  16620. "Todo": {
  16621. "type": "object",
  16622. "properties": {
  16623. "content": {
  16624. "type": "string",
  16625. "description": "Brief description of the task"
  16626. },
  16627. "status": {
  16628. "type": "string",
  16629. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  16630. },
  16631. "priority": {
  16632. "type": "string",
  16633. "description": "Priority level of the task: high, medium, low"
  16634. }
  16635. },
  16636. "required": ["content", "status", "priority"],
  16637. "additionalProperties": false
  16638. },
  16639. "SessionStatus": {
  16640. "anyOf": [
  16641. {
  16642. "type": "object",
  16643. "properties": {
  16644. "type": {
  16645. "type": "string",
  16646. "enum": ["idle"]
  16647. }
  16648. },
  16649. "required": ["type"],
  16650. "additionalProperties": false
  16651. },
  16652. {
  16653. "type": "object",
  16654. "properties": {
  16655. "type": {
  16656. "type": "string",
  16657. "enum": ["retry"]
  16658. },
  16659. "attempt": {
  16660. "type": "integer",
  16661. "minimum": 0
  16662. },
  16663. "message": {
  16664. "type": "string"
  16665. },
  16666. "action": {
  16667. "type": "object",
  16668. "properties": {
  16669. "reason": {
  16670. "type": "string"
  16671. },
  16672. "provider": {
  16673. "type": "string"
  16674. },
  16675. "title": {
  16676. "type": "string"
  16677. },
  16678. "message": {
  16679. "type": "string"
  16680. },
  16681. "label": {
  16682. "type": "string"
  16683. },
  16684. "link": {
  16685. "type": "string"
  16686. }
  16687. },
  16688. "required": ["reason", "provider", "title", "message", "label"],
  16689. "additionalProperties": false
  16690. },
  16691. "next": {
  16692. "type": "integer",
  16693. "minimum": 0
  16694. }
  16695. },
  16696. "required": ["type", "attempt", "message", "next"],
  16697. "additionalProperties": false
  16698. },
  16699. {
  16700. "type": "object",
  16701. "properties": {
  16702. "type": {
  16703. "type": "string",
  16704. "enum": ["busy"]
  16705. }
  16706. },
  16707. "required": ["type"],
  16708. "additionalProperties": false
  16709. }
  16710. ]
  16711. },
  16712. "QuestionOption": {
  16713. "type": "object",
  16714. "properties": {
  16715. "label": {
  16716. "type": "string",
  16717. "description": "Display text (1-5 words, concise)"
  16718. },
  16719. "description": {
  16720. "type": "string",
  16721. "description": "Explanation of choice"
  16722. }
  16723. },
  16724. "required": ["label", "description"],
  16725. "additionalProperties": false
  16726. },
  16727. "QuestionInfo": {
  16728. "type": "object",
  16729. "properties": {
  16730. "question": {
  16731. "type": "string",
  16732. "description": "Complete question"
  16733. },
  16734. "header": {
  16735. "type": "string",
  16736. "description": "Very short label (max 30 chars)"
  16737. },
  16738. "options": {
  16739. "type": "array",
  16740. "items": {
  16741. "$ref": "#/components/schemas/QuestionOption"
  16742. },
  16743. "description": "Available choices"
  16744. },
  16745. "multiple": {
  16746. "type": "boolean"
  16747. },
  16748. "custom": {
  16749. "type": "boolean"
  16750. }
  16751. },
  16752. "required": ["question", "header", "options"],
  16753. "additionalProperties": false
  16754. },
  16755. "QuestionTool": {
  16756. "type": "object",
  16757. "properties": {
  16758. "messageID": {
  16759. "type": "string",
  16760. "pattern": "^msg"
  16761. },
  16762. "callID": {
  16763. "type": "string"
  16764. }
  16765. },
  16766. "required": ["messageID", "callID"],
  16767. "additionalProperties": false
  16768. },
  16769. "QuestionAnswer": {
  16770. "type": "array",
  16771. "items": {
  16772. "type": "string"
  16773. }
  16774. },
  16775. "GlobalEvent": {
  16776. "type": "object",
  16777. "properties": {
  16778. "directory": {
  16779. "type": "string"
  16780. },
  16781. "project": {
  16782. "type": "string"
  16783. },
  16784. "workspace": {
  16785. "type": "string"
  16786. },
  16787. "payload": {
  16788. "anyOf": [
  16789. {
  16790. "type": "object",
  16791. "properties": {
  16792. "id": {
  16793. "type": "string",
  16794. "pattern": "^evt_"
  16795. },
  16796. "type": {
  16797. "type": "string",
  16798. "enum": ["models-dev.refreshed"]
  16799. },
  16800. "properties": {
  16801. "type": "object",
  16802. "properties": {}
  16803. }
  16804. },
  16805. "required": ["id", "type", "properties"],
  16806. "additionalProperties": false
  16807. },
  16808. {
  16809. "type": "object",
  16810. "properties": {
  16811. "id": {
  16812. "type": "string",
  16813. "pattern": "^evt_"
  16814. },
  16815. "type": {
  16816. "type": "string",
  16817. "enum": ["integration.updated"]
  16818. },
  16819. "properties": {
  16820. "type": "object",
  16821. "properties": {}
  16822. }
  16823. },
  16824. "required": ["id", "type", "properties"],
  16825. "additionalProperties": false
  16826. },
  16827. {
  16828. "type": "object",
  16829. "properties": {
  16830. "id": {
  16831. "type": "string",
  16832. "pattern": "^evt_"
  16833. },
  16834. "type": {
  16835. "type": "string",
  16836. "enum": ["catalog.updated"]
  16837. },
  16838. "properties": {
  16839. "type": "object",
  16840. "properties": {}
  16841. }
  16842. },
  16843. "required": ["id", "type", "properties"],
  16844. "additionalProperties": false
  16845. },
  16846. {
  16847. "type": "object",
  16848. "properties": {
  16849. "id": {
  16850. "type": "string",
  16851. "pattern": "^evt_"
  16852. },
  16853. "type": {
  16854. "type": "string",
  16855. "enum": ["session.created"]
  16856. },
  16857. "properties": {
  16858. "type": "object",
  16859. "properties": {
  16860. "sessionID": {
  16861. "type": "string",
  16862. "pattern": "^ses"
  16863. },
  16864. "info": {
  16865. "$ref": "#/components/schemas/Session"
  16866. }
  16867. },
  16868. "required": ["sessionID", "info"],
  16869. "additionalProperties": false
  16870. }
  16871. },
  16872. "required": ["id", "type", "properties"],
  16873. "additionalProperties": false
  16874. },
  16875. {
  16876. "type": "object",
  16877. "properties": {
  16878. "id": {
  16879. "type": "string",
  16880. "pattern": "^evt_"
  16881. },
  16882. "type": {
  16883. "type": "string",
  16884. "enum": ["session.updated"]
  16885. },
  16886. "properties": {
  16887. "type": "object",
  16888. "properties": {
  16889. "sessionID": {
  16890. "type": "string",
  16891. "pattern": "^ses"
  16892. },
  16893. "info": {
  16894. "$ref": "#/components/schemas/Session"
  16895. }
  16896. },
  16897. "required": ["sessionID", "info"],
  16898. "additionalProperties": false
  16899. }
  16900. },
  16901. "required": ["id", "type", "properties"],
  16902. "additionalProperties": false
  16903. },
  16904. {
  16905. "type": "object",
  16906. "properties": {
  16907. "id": {
  16908. "type": "string",
  16909. "pattern": "^evt_"
  16910. },
  16911. "type": {
  16912. "type": "string",
  16913. "enum": ["session.deleted"]
  16914. },
  16915. "properties": {
  16916. "type": "object",
  16917. "properties": {
  16918. "sessionID": {
  16919. "type": "string",
  16920. "pattern": "^ses"
  16921. },
  16922. "info": {
  16923. "$ref": "#/components/schemas/Session"
  16924. }
  16925. },
  16926. "required": ["sessionID", "info"],
  16927. "additionalProperties": false
  16928. }
  16929. },
  16930. "required": ["id", "type", "properties"],
  16931. "additionalProperties": false
  16932. },
  16933. {
  16934. "type": "object",
  16935. "properties": {
  16936. "id": {
  16937. "type": "string",
  16938. "pattern": "^evt_"
  16939. },
  16940. "type": {
  16941. "type": "string",
  16942. "enum": ["message.updated"]
  16943. },
  16944. "properties": {
  16945. "type": "object",
  16946. "properties": {
  16947. "sessionID": {
  16948. "type": "string",
  16949. "pattern": "^ses"
  16950. },
  16951. "info": {
  16952. "$ref": "#/components/schemas/Message"
  16953. }
  16954. },
  16955. "required": ["sessionID", "info"],
  16956. "additionalProperties": false
  16957. }
  16958. },
  16959. "required": ["id", "type", "properties"],
  16960. "additionalProperties": false
  16961. },
  16962. {
  16963. "type": "object",
  16964. "properties": {
  16965. "id": {
  16966. "type": "string",
  16967. "pattern": "^evt_"
  16968. },
  16969. "type": {
  16970. "type": "string",
  16971. "enum": ["message.removed"]
  16972. },
  16973. "properties": {
  16974. "type": "object",
  16975. "properties": {
  16976. "sessionID": {
  16977. "type": "string",
  16978. "pattern": "^ses"
  16979. },
  16980. "messageID": {
  16981. "type": "string",
  16982. "pattern": "^msg"
  16983. }
  16984. },
  16985. "required": ["sessionID", "messageID"],
  16986. "additionalProperties": false
  16987. }
  16988. },
  16989. "required": ["id", "type", "properties"],
  16990. "additionalProperties": false
  16991. },
  16992. {
  16993. "type": "object",
  16994. "properties": {
  16995. "id": {
  16996. "type": "string",
  16997. "pattern": "^evt_"
  16998. },
  16999. "type": {
  17000. "type": "string",
  17001. "enum": ["message.part.updated"]
  17002. },
  17003. "properties": {
  17004. "type": "object",
  17005. "properties": {
  17006. "sessionID": {
  17007. "type": "string",
  17008. "pattern": "^ses"
  17009. },
  17010. "part": {
  17011. "$ref": "#/components/schemas/Part"
  17012. },
  17013. "time": {
  17014. "type": "number"
  17015. }
  17016. },
  17017. "required": ["sessionID", "part", "time"],
  17018. "additionalProperties": false
  17019. }
  17020. },
  17021. "required": ["id", "type", "properties"],
  17022. "additionalProperties": false
  17023. },
  17024. {
  17025. "type": "object",
  17026. "properties": {
  17027. "id": {
  17028. "type": "string",
  17029. "pattern": "^evt_"
  17030. },
  17031. "type": {
  17032. "type": "string",
  17033. "enum": ["message.part.removed"]
  17034. },
  17035. "properties": {
  17036. "type": "object",
  17037. "properties": {
  17038. "sessionID": {
  17039. "type": "string",
  17040. "pattern": "^ses"
  17041. },
  17042. "messageID": {
  17043. "type": "string",
  17044. "pattern": "^msg"
  17045. },
  17046. "partID": {
  17047. "type": "string",
  17048. "pattern": "^prt"
  17049. }
  17050. },
  17051. "required": ["sessionID", "messageID", "partID"],
  17052. "additionalProperties": false
  17053. }
  17054. },
  17055. "required": ["id", "type", "properties"],
  17056. "additionalProperties": false
  17057. },
  17058. {
  17059. "type": "object",
  17060. "properties": {
  17061. "id": {
  17062. "type": "string",
  17063. "pattern": "^evt_"
  17064. },
  17065. "type": {
  17066. "type": "string",
  17067. "enum": ["session.next.agent.switched"]
  17068. },
  17069. "properties": {
  17070. "type": "object",
  17071. "properties": {
  17072. "timestamp": {
  17073. "type": "number"
  17074. },
  17075. "sessionID": {
  17076. "type": "string",
  17077. "pattern": "^ses"
  17078. },
  17079. "messageID": {
  17080. "type": "string",
  17081. "pattern": "^msg_"
  17082. },
  17083. "agent": {
  17084. "type": "string"
  17085. }
  17086. },
  17087. "required": ["timestamp", "sessionID", "messageID", "agent"],
  17088. "additionalProperties": false
  17089. }
  17090. },
  17091. "required": ["id", "type", "properties"],
  17092. "additionalProperties": false
  17093. },
  17094. {
  17095. "type": "object",
  17096. "properties": {
  17097. "id": {
  17098. "type": "string",
  17099. "pattern": "^evt_"
  17100. },
  17101. "type": {
  17102. "type": "string",
  17103. "enum": ["session.next.model.switched"]
  17104. },
  17105. "properties": {
  17106. "type": "object",
  17107. "properties": {
  17108. "timestamp": {
  17109. "type": "number"
  17110. },
  17111. "sessionID": {
  17112. "type": "string",
  17113. "pattern": "^ses"
  17114. },
  17115. "messageID": {
  17116. "type": "string",
  17117. "pattern": "^msg_"
  17118. },
  17119. "model": {
  17120. "type": "object",
  17121. "properties": {
  17122. "id": {
  17123. "type": "string"
  17124. },
  17125. "providerID": {
  17126. "type": "string"
  17127. },
  17128. "variant": {
  17129. "type": "string"
  17130. }
  17131. },
  17132. "required": ["id", "providerID"],
  17133. "additionalProperties": false
  17134. }
  17135. },
  17136. "required": ["timestamp", "sessionID", "messageID", "model"],
  17137. "additionalProperties": false
  17138. }
  17139. },
  17140. "required": ["id", "type", "properties"],
  17141. "additionalProperties": false
  17142. },
  17143. {
  17144. "type": "object",
  17145. "properties": {
  17146. "id": {
  17147. "type": "string",
  17148. "pattern": "^evt_"
  17149. },
  17150. "type": {
  17151. "type": "string",
  17152. "enum": ["session.next.moved"]
  17153. },
  17154. "properties": {
  17155. "type": "object",
  17156. "properties": {
  17157. "timestamp": {
  17158. "type": "number"
  17159. },
  17160. "sessionID": {
  17161. "type": "string",
  17162. "pattern": "^ses"
  17163. },
  17164. "location": {
  17165. "$ref": "#/components/schemas/LocationRef"
  17166. },
  17167. "subdirectory": {
  17168. "type": "string"
  17169. }
  17170. },
  17171. "required": ["timestamp", "sessionID", "location"],
  17172. "additionalProperties": false
  17173. }
  17174. },
  17175. "required": ["id", "type", "properties"],
  17176. "additionalProperties": false
  17177. },
  17178. {
  17179. "type": "object",
  17180. "properties": {
  17181. "id": {
  17182. "type": "string",
  17183. "pattern": "^evt_"
  17184. },
  17185. "type": {
  17186. "type": "string",
  17187. "enum": ["session.next.prompted"]
  17188. },
  17189. "properties": {
  17190. "type": "object",
  17191. "properties": {
  17192. "timestamp": {
  17193. "type": "number"
  17194. },
  17195. "sessionID": {
  17196. "type": "string",
  17197. "pattern": "^ses"
  17198. },
  17199. "messageID": {
  17200. "type": "string",
  17201. "pattern": "^msg_"
  17202. },
  17203. "prompt": {
  17204. "$ref": "#/components/schemas/Prompt"
  17205. },
  17206. "delivery": {
  17207. "type": "string",
  17208. "enum": ["steer", "queue"]
  17209. }
  17210. },
  17211. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  17212. "additionalProperties": false
  17213. }
  17214. },
  17215. "required": ["id", "type", "properties"],
  17216. "additionalProperties": false
  17217. },
  17218. {
  17219. "type": "object",
  17220. "properties": {
  17221. "id": {
  17222. "type": "string",
  17223. "pattern": "^evt_"
  17224. },
  17225. "type": {
  17226. "type": "string",
  17227. "enum": ["session.next.prompt.admitted"]
  17228. },
  17229. "properties": {
  17230. "type": "object",
  17231. "properties": {
  17232. "timestamp": {
  17233. "type": "number"
  17234. },
  17235. "sessionID": {
  17236. "type": "string",
  17237. "pattern": "^ses"
  17238. },
  17239. "messageID": {
  17240. "type": "string",
  17241. "pattern": "^msg_"
  17242. },
  17243. "prompt": {
  17244. "$ref": "#/components/schemas/Prompt"
  17245. },
  17246. "delivery": {
  17247. "type": "string",
  17248. "enum": ["steer", "queue"]
  17249. }
  17250. },
  17251. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  17252. "additionalProperties": false
  17253. }
  17254. },
  17255. "required": ["id", "type", "properties"],
  17256. "additionalProperties": false
  17257. },
  17258. {
  17259. "type": "object",
  17260. "properties": {
  17261. "id": {
  17262. "type": "string",
  17263. "pattern": "^evt_"
  17264. },
  17265. "type": {
  17266. "type": "string",
  17267. "enum": ["session.next.prompt.promoted"]
  17268. },
  17269. "properties": {
  17270. "type": "object",
  17271. "properties": {
  17272. "timestamp": {
  17273. "type": "number"
  17274. },
  17275. "sessionID": {
  17276. "type": "string",
  17277. "pattern": "^ses"
  17278. },
  17279. "messageID": {
  17280. "type": "string",
  17281. "pattern": "^msg_"
  17282. },
  17283. "prompt": {
  17284. "$ref": "#/components/schemas/Prompt"
  17285. },
  17286. "timeCreated": {
  17287. "type": "number"
  17288. }
  17289. },
  17290. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  17291. "additionalProperties": false
  17292. }
  17293. },
  17294. "required": ["id", "type", "properties"],
  17295. "additionalProperties": false
  17296. },
  17297. {
  17298. "type": "object",
  17299. "properties": {
  17300. "id": {
  17301. "type": "string",
  17302. "pattern": "^evt_"
  17303. },
  17304. "type": {
  17305. "type": "string",
  17306. "enum": ["session.next.context.updated"]
  17307. },
  17308. "properties": {
  17309. "type": "object",
  17310. "properties": {
  17311. "timestamp": {
  17312. "type": "number"
  17313. },
  17314. "sessionID": {
  17315. "type": "string",
  17316. "pattern": "^ses"
  17317. },
  17318. "messageID": {
  17319. "type": "string",
  17320. "pattern": "^msg_"
  17321. },
  17322. "text": {
  17323. "type": "string"
  17324. }
  17325. },
  17326. "required": ["timestamp", "sessionID", "messageID", "text"],
  17327. "additionalProperties": false
  17328. }
  17329. },
  17330. "required": ["id", "type", "properties"],
  17331. "additionalProperties": false
  17332. },
  17333. {
  17334. "type": "object",
  17335. "properties": {
  17336. "id": {
  17337. "type": "string",
  17338. "pattern": "^evt_"
  17339. },
  17340. "type": {
  17341. "type": "string",
  17342. "enum": ["session.next.synthetic"]
  17343. },
  17344. "properties": {
  17345. "type": "object",
  17346. "properties": {
  17347. "timestamp": {
  17348. "type": "number"
  17349. },
  17350. "sessionID": {
  17351. "type": "string",
  17352. "pattern": "^ses"
  17353. },
  17354. "messageID": {
  17355. "type": "string",
  17356. "pattern": "^msg_"
  17357. },
  17358. "text": {
  17359. "type": "string"
  17360. }
  17361. },
  17362. "required": ["timestamp", "sessionID", "messageID", "text"],
  17363. "additionalProperties": false
  17364. }
  17365. },
  17366. "required": ["id", "type", "properties"],
  17367. "additionalProperties": false
  17368. },
  17369. {
  17370. "type": "object",
  17371. "properties": {
  17372. "id": {
  17373. "type": "string",
  17374. "pattern": "^evt_"
  17375. },
  17376. "type": {
  17377. "type": "string",
  17378. "enum": ["session.next.shell.started"]
  17379. },
  17380. "properties": {
  17381. "type": "object",
  17382. "properties": {
  17383. "timestamp": {
  17384. "type": "number"
  17385. },
  17386. "sessionID": {
  17387. "type": "string",
  17388. "pattern": "^ses"
  17389. },
  17390. "messageID": {
  17391. "type": "string",
  17392. "pattern": "^msg_"
  17393. },
  17394. "callID": {
  17395. "type": "string"
  17396. },
  17397. "command": {
  17398. "type": "string"
  17399. }
  17400. },
  17401. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  17402. "additionalProperties": false
  17403. }
  17404. },
  17405. "required": ["id", "type", "properties"],
  17406. "additionalProperties": false
  17407. },
  17408. {
  17409. "type": "object",
  17410. "properties": {
  17411. "id": {
  17412. "type": "string",
  17413. "pattern": "^evt_"
  17414. },
  17415. "type": {
  17416. "type": "string",
  17417. "enum": ["session.next.shell.ended"]
  17418. },
  17419. "properties": {
  17420. "type": "object",
  17421. "properties": {
  17422. "timestamp": {
  17423. "type": "number"
  17424. },
  17425. "sessionID": {
  17426. "type": "string",
  17427. "pattern": "^ses"
  17428. },
  17429. "callID": {
  17430. "type": "string"
  17431. },
  17432. "output": {
  17433. "type": "string"
  17434. }
  17435. },
  17436. "required": ["timestamp", "sessionID", "callID", "output"],
  17437. "additionalProperties": false
  17438. }
  17439. },
  17440. "required": ["id", "type", "properties"],
  17441. "additionalProperties": false
  17442. },
  17443. {
  17444. "type": "object",
  17445. "properties": {
  17446. "id": {
  17447. "type": "string",
  17448. "pattern": "^evt_"
  17449. },
  17450. "type": {
  17451. "type": "string",
  17452. "enum": ["session.next.step.started"]
  17453. },
  17454. "properties": {
  17455. "type": "object",
  17456. "properties": {
  17457. "timestamp": {
  17458. "type": "number"
  17459. },
  17460. "sessionID": {
  17461. "type": "string",
  17462. "pattern": "^ses"
  17463. },
  17464. "assistantMessageID": {
  17465. "type": "string",
  17466. "pattern": "^msg_"
  17467. },
  17468. "agent": {
  17469. "type": "string"
  17470. },
  17471. "model": {
  17472. "type": "object",
  17473. "properties": {
  17474. "id": {
  17475. "type": "string"
  17476. },
  17477. "providerID": {
  17478. "type": "string"
  17479. },
  17480. "variant": {
  17481. "type": "string"
  17482. }
  17483. },
  17484. "required": ["id", "providerID"],
  17485. "additionalProperties": false
  17486. },
  17487. "snapshot": {
  17488. "type": "string"
  17489. }
  17490. },
  17491. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  17492. "additionalProperties": false
  17493. }
  17494. },
  17495. "required": ["id", "type", "properties"],
  17496. "additionalProperties": false
  17497. },
  17498. {
  17499. "type": "object",
  17500. "properties": {
  17501. "id": {
  17502. "type": "string",
  17503. "pattern": "^evt_"
  17504. },
  17505. "type": {
  17506. "type": "string",
  17507. "enum": ["session.next.step.ended"]
  17508. },
  17509. "properties": {
  17510. "type": "object",
  17511. "properties": {
  17512. "timestamp": {
  17513. "type": "number"
  17514. },
  17515. "sessionID": {
  17516. "type": "string",
  17517. "pattern": "^ses"
  17518. },
  17519. "assistantMessageID": {
  17520. "type": "string",
  17521. "pattern": "^msg_"
  17522. },
  17523. "finish": {
  17524. "type": "string"
  17525. },
  17526. "cost": {
  17527. "type": "number"
  17528. },
  17529. "tokens": {
  17530. "type": "object",
  17531. "properties": {
  17532. "input": {
  17533. "type": "number"
  17534. },
  17535. "output": {
  17536. "type": "number"
  17537. },
  17538. "reasoning": {
  17539. "type": "number"
  17540. },
  17541. "cache": {
  17542. "type": "object",
  17543. "properties": {
  17544. "read": {
  17545. "type": "number"
  17546. },
  17547. "write": {
  17548. "type": "number"
  17549. }
  17550. },
  17551. "required": ["read", "write"],
  17552. "additionalProperties": false
  17553. }
  17554. },
  17555. "required": ["input", "output", "reasoning", "cache"],
  17556. "additionalProperties": false
  17557. },
  17558. "snapshot": {
  17559. "type": "string"
  17560. }
  17561. },
  17562. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  17563. "additionalProperties": false
  17564. }
  17565. },
  17566. "required": ["id", "type", "properties"],
  17567. "additionalProperties": false
  17568. },
  17569. {
  17570. "type": "object",
  17571. "properties": {
  17572. "id": {
  17573. "type": "string",
  17574. "pattern": "^evt_"
  17575. },
  17576. "type": {
  17577. "type": "string",
  17578. "enum": ["session.next.step.failed"]
  17579. },
  17580. "properties": {
  17581. "type": "object",
  17582. "properties": {
  17583. "timestamp": {
  17584. "type": "number"
  17585. },
  17586. "sessionID": {
  17587. "type": "string",
  17588. "pattern": "^ses"
  17589. },
  17590. "assistantMessageID": {
  17591. "type": "string",
  17592. "pattern": "^msg_"
  17593. },
  17594. "error": {
  17595. "$ref": "#/components/schemas/SessionErrorUnknown"
  17596. }
  17597. },
  17598. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  17599. "additionalProperties": false
  17600. }
  17601. },
  17602. "required": ["id", "type", "properties"],
  17603. "additionalProperties": false
  17604. },
  17605. {
  17606. "type": "object",
  17607. "properties": {
  17608. "id": {
  17609. "type": "string",
  17610. "pattern": "^evt_"
  17611. },
  17612. "type": {
  17613. "type": "string",
  17614. "enum": ["session.next.text.started"]
  17615. },
  17616. "properties": {
  17617. "type": "object",
  17618. "properties": {
  17619. "timestamp": {
  17620. "type": "number"
  17621. },
  17622. "sessionID": {
  17623. "type": "string",
  17624. "pattern": "^ses"
  17625. },
  17626. "assistantMessageID": {
  17627. "type": "string",
  17628. "pattern": "^msg_"
  17629. },
  17630. "textID": {
  17631. "type": "string"
  17632. }
  17633. },
  17634. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  17635. "additionalProperties": false
  17636. }
  17637. },
  17638. "required": ["id", "type", "properties"],
  17639. "additionalProperties": false
  17640. },
  17641. {
  17642. "type": "object",
  17643. "properties": {
  17644. "id": {
  17645. "type": "string",
  17646. "pattern": "^evt_"
  17647. },
  17648. "type": {
  17649. "type": "string",
  17650. "enum": ["session.next.text.delta"]
  17651. },
  17652. "properties": {
  17653. "type": "object",
  17654. "properties": {
  17655. "timestamp": {
  17656. "type": "number"
  17657. },
  17658. "sessionID": {
  17659. "type": "string",
  17660. "pattern": "^ses"
  17661. },
  17662. "assistantMessageID": {
  17663. "type": "string",
  17664. "pattern": "^msg_"
  17665. },
  17666. "textID": {
  17667. "type": "string"
  17668. },
  17669. "delta": {
  17670. "type": "string"
  17671. }
  17672. },
  17673. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  17674. "additionalProperties": false
  17675. }
  17676. },
  17677. "required": ["id", "type", "properties"],
  17678. "additionalProperties": false
  17679. },
  17680. {
  17681. "type": "object",
  17682. "properties": {
  17683. "id": {
  17684. "type": "string",
  17685. "pattern": "^evt_"
  17686. },
  17687. "type": {
  17688. "type": "string",
  17689. "enum": ["session.next.text.ended"]
  17690. },
  17691. "properties": {
  17692. "type": "object",
  17693. "properties": {
  17694. "timestamp": {
  17695. "type": "number"
  17696. },
  17697. "sessionID": {
  17698. "type": "string",
  17699. "pattern": "^ses"
  17700. },
  17701. "assistantMessageID": {
  17702. "type": "string",
  17703. "pattern": "^msg_"
  17704. },
  17705. "textID": {
  17706. "type": "string"
  17707. },
  17708. "text": {
  17709. "type": "string"
  17710. }
  17711. },
  17712. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  17713. "additionalProperties": false
  17714. }
  17715. },
  17716. "required": ["id", "type", "properties"],
  17717. "additionalProperties": false
  17718. },
  17719. {
  17720. "type": "object",
  17721. "properties": {
  17722. "id": {
  17723. "type": "string",
  17724. "pattern": "^evt_"
  17725. },
  17726. "type": {
  17727. "type": "string",
  17728. "enum": ["session.next.reasoning.started"]
  17729. },
  17730. "properties": {
  17731. "type": "object",
  17732. "properties": {
  17733. "timestamp": {
  17734. "type": "number"
  17735. },
  17736. "sessionID": {
  17737. "type": "string",
  17738. "pattern": "^ses"
  17739. },
  17740. "assistantMessageID": {
  17741. "type": "string",
  17742. "pattern": "^msg_"
  17743. },
  17744. "reasoningID": {
  17745. "type": "string"
  17746. },
  17747. "providerMetadata": {
  17748. "type": "object",
  17749. "additionalProperties": {
  17750. "type": "object"
  17751. }
  17752. }
  17753. },
  17754. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  17755. "additionalProperties": false
  17756. }
  17757. },
  17758. "required": ["id", "type", "properties"],
  17759. "additionalProperties": false
  17760. },
  17761. {
  17762. "type": "object",
  17763. "properties": {
  17764. "id": {
  17765. "type": "string",
  17766. "pattern": "^evt_"
  17767. },
  17768. "type": {
  17769. "type": "string",
  17770. "enum": ["session.next.reasoning.delta"]
  17771. },
  17772. "properties": {
  17773. "type": "object",
  17774. "properties": {
  17775. "timestamp": {
  17776. "type": "number"
  17777. },
  17778. "sessionID": {
  17779. "type": "string",
  17780. "pattern": "^ses"
  17781. },
  17782. "assistantMessageID": {
  17783. "type": "string",
  17784. "pattern": "^msg_"
  17785. },
  17786. "reasoningID": {
  17787. "type": "string"
  17788. },
  17789. "delta": {
  17790. "type": "string"
  17791. }
  17792. },
  17793. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  17794. "additionalProperties": false
  17795. }
  17796. },
  17797. "required": ["id", "type", "properties"],
  17798. "additionalProperties": false
  17799. },
  17800. {
  17801. "type": "object",
  17802. "properties": {
  17803. "id": {
  17804. "type": "string",
  17805. "pattern": "^evt_"
  17806. },
  17807. "type": {
  17808. "type": "string",
  17809. "enum": ["session.next.reasoning.ended"]
  17810. },
  17811. "properties": {
  17812. "type": "object",
  17813. "properties": {
  17814. "timestamp": {
  17815. "type": "number"
  17816. },
  17817. "sessionID": {
  17818. "type": "string",
  17819. "pattern": "^ses"
  17820. },
  17821. "assistantMessageID": {
  17822. "type": "string",
  17823. "pattern": "^msg_"
  17824. },
  17825. "reasoningID": {
  17826. "type": "string"
  17827. },
  17828. "text": {
  17829. "type": "string"
  17830. },
  17831. "providerMetadata": {
  17832. "type": "object",
  17833. "additionalProperties": {
  17834. "type": "object"
  17835. }
  17836. }
  17837. },
  17838. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  17839. "additionalProperties": false
  17840. }
  17841. },
  17842. "required": ["id", "type", "properties"],
  17843. "additionalProperties": false
  17844. },
  17845. {
  17846. "type": "object",
  17847. "properties": {
  17848. "id": {
  17849. "type": "string",
  17850. "pattern": "^evt_"
  17851. },
  17852. "type": {
  17853. "type": "string",
  17854. "enum": ["session.next.tool.input.started"]
  17855. },
  17856. "properties": {
  17857. "type": "object",
  17858. "properties": {
  17859. "timestamp": {
  17860. "type": "number"
  17861. },
  17862. "sessionID": {
  17863. "type": "string",
  17864. "pattern": "^ses"
  17865. },
  17866. "assistantMessageID": {
  17867. "type": "string",
  17868. "pattern": "^msg_"
  17869. },
  17870. "callID": {
  17871. "type": "string"
  17872. },
  17873. "name": {
  17874. "type": "string"
  17875. }
  17876. },
  17877. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  17878. "additionalProperties": false
  17879. }
  17880. },
  17881. "required": ["id", "type", "properties"],
  17882. "additionalProperties": false
  17883. },
  17884. {
  17885. "type": "object",
  17886. "properties": {
  17887. "id": {
  17888. "type": "string",
  17889. "pattern": "^evt_"
  17890. },
  17891. "type": {
  17892. "type": "string",
  17893. "enum": ["session.next.tool.input.delta"]
  17894. },
  17895. "properties": {
  17896. "type": "object",
  17897. "properties": {
  17898. "timestamp": {
  17899. "type": "number"
  17900. },
  17901. "sessionID": {
  17902. "type": "string",
  17903. "pattern": "^ses"
  17904. },
  17905. "assistantMessageID": {
  17906. "type": "string",
  17907. "pattern": "^msg_"
  17908. },
  17909. "callID": {
  17910. "type": "string"
  17911. },
  17912. "delta": {
  17913. "type": "string"
  17914. }
  17915. },
  17916. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  17917. "additionalProperties": false
  17918. }
  17919. },
  17920. "required": ["id", "type", "properties"],
  17921. "additionalProperties": false
  17922. },
  17923. {
  17924. "type": "object",
  17925. "properties": {
  17926. "id": {
  17927. "type": "string",
  17928. "pattern": "^evt_"
  17929. },
  17930. "type": {
  17931. "type": "string",
  17932. "enum": ["session.next.tool.input.ended"]
  17933. },
  17934. "properties": {
  17935. "type": "object",
  17936. "properties": {
  17937. "timestamp": {
  17938. "type": "number"
  17939. },
  17940. "sessionID": {
  17941. "type": "string",
  17942. "pattern": "^ses"
  17943. },
  17944. "assistantMessageID": {
  17945. "type": "string",
  17946. "pattern": "^msg_"
  17947. },
  17948. "callID": {
  17949. "type": "string"
  17950. },
  17951. "text": {
  17952. "type": "string"
  17953. }
  17954. },
  17955. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  17956. "additionalProperties": false
  17957. }
  17958. },
  17959. "required": ["id", "type", "properties"],
  17960. "additionalProperties": false
  17961. },
  17962. {
  17963. "type": "object",
  17964. "properties": {
  17965. "id": {
  17966. "type": "string",
  17967. "pattern": "^evt_"
  17968. },
  17969. "type": {
  17970. "type": "string",
  17971. "enum": ["session.next.tool.called"]
  17972. },
  17973. "properties": {
  17974. "type": "object",
  17975. "properties": {
  17976. "timestamp": {
  17977. "type": "number"
  17978. },
  17979. "sessionID": {
  17980. "type": "string",
  17981. "pattern": "^ses"
  17982. },
  17983. "assistantMessageID": {
  17984. "type": "string",
  17985. "pattern": "^msg_"
  17986. },
  17987. "callID": {
  17988. "type": "string"
  17989. },
  17990. "tool": {
  17991. "type": "string"
  17992. },
  17993. "input": {
  17994. "type": "object"
  17995. },
  17996. "provider": {
  17997. "type": "object",
  17998. "properties": {
  17999. "executed": {
  18000. "type": "boolean"
  18001. },
  18002. "metadata": {
  18003. "type": "object",
  18004. "additionalProperties": {
  18005. "type": "object"
  18006. }
  18007. }
  18008. },
  18009. "required": ["executed"],
  18010. "additionalProperties": false
  18011. }
  18012. },
  18013. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  18014. "additionalProperties": false
  18015. }
  18016. },
  18017. "required": ["id", "type", "properties"],
  18018. "additionalProperties": false
  18019. },
  18020. {
  18021. "type": "object",
  18022. "properties": {
  18023. "id": {
  18024. "type": "string",
  18025. "pattern": "^evt_"
  18026. },
  18027. "type": {
  18028. "type": "string",
  18029. "enum": ["session.next.tool.progress"]
  18030. },
  18031. "properties": {
  18032. "type": "object",
  18033. "properties": {
  18034. "timestamp": {
  18035. "type": "number"
  18036. },
  18037. "sessionID": {
  18038. "type": "string",
  18039. "pattern": "^ses"
  18040. },
  18041. "assistantMessageID": {
  18042. "type": "string",
  18043. "pattern": "^msg_"
  18044. },
  18045. "callID": {
  18046. "type": "string"
  18047. },
  18048. "structured": {
  18049. "type": "object"
  18050. },
  18051. "content": {
  18052. "type": "array",
  18053. "items": {
  18054. "anyOf": [
  18055. {
  18056. "$ref": "#/components/schemas/ToolTextContent"
  18057. },
  18058. {
  18059. "$ref": "#/components/schemas/ToolFileContent"
  18060. }
  18061. ]
  18062. }
  18063. }
  18064. },
  18065. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  18066. "additionalProperties": false
  18067. }
  18068. },
  18069. "required": ["id", "type", "properties"],
  18070. "additionalProperties": false
  18071. },
  18072. {
  18073. "type": "object",
  18074. "properties": {
  18075. "id": {
  18076. "type": "string",
  18077. "pattern": "^evt_"
  18078. },
  18079. "type": {
  18080. "type": "string",
  18081. "enum": ["session.next.tool.success"]
  18082. },
  18083. "properties": {
  18084. "type": "object",
  18085. "properties": {
  18086. "timestamp": {
  18087. "type": "number"
  18088. },
  18089. "sessionID": {
  18090. "type": "string",
  18091. "pattern": "^ses"
  18092. },
  18093. "assistantMessageID": {
  18094. "type": "string",
  18095. "pattern": "^msg_"
  18096. },
  18097. "callID": {
  18098. "type": "string"
  18099. },
  18100. "structured": {
  18101. "type": "object"
  18102. },
  18103. "content": {
  18104. "type": "array",
  18105. "items": {
  18106. "anyOf": [
  18107. {
  18108. "$ref": "#/components/schemas/ToolTextContent"
  18109. },
  18110. {
  18111. "$ref": "#/components/schemas/ToolFileContent"
  18112. }
  18113. ]
  18114. }
  18115. },
  18116. "outputPaths": {
  18117. "type": "array",
  18118. "items": {
  18119. "type": "string"
  18120. }
  18121. },
  18122. "result": {},
  18123. "provider": {
  18124. "type": "object",
  18125. "properties": {
  18126. "executed": {
  18127. "type": "boolean"
  18128. },
  18129. "metadata": {
  18130. "type": "object",
  18131. "additionalProperties": {
  18132. "type": "object"
  18133. }
  18134. }
  18135. },
  18136. "required": ["executed"],
  18137. "additionalProperties": false
  18138. }
  18139. },
  18140. "required": [
  18141. "timestamp",
  18142. "sessionID",
  18143. "assistantMessageID",
  18144. "callID",
  18145. "structured",
  18146. "content",
  18147. "provider"
  18148. ],
  18149. "additionalProperties": false
  18150. }
  18151. },
  18152. "required": ["id", "type", "properties"],
  18153. "additionalProperties": false
  18154. },
  18155. {
  18156. "type": "object",
  18157. "properties": {
  18158. "id": {
  18159. "type": "string",
  18160. "pattern": "^evt_"
  18161. },
  18162. "type": {
  18163. "type": "string",
  18164. "enum": ["session.next.tool.failed"]
  18165. },
  18166. "properties": {
  18167. "type": "object",
  18168. "properties": {
  18169. "timestamp": {
  18170. "type": "number"
  18171. },
  18172. "sessionID": {
  18173. "type": "string",
  18174. "pattern": "^ses"
  18175. },
  18176. "assistantMessageID": {
  18177. "type": "string",
  18178. "pattern": "^msg_"
  18179. },
  18180. "callID": {
  18181. "type": "string"
  18182. },
  18183. "error": {
  18184. "$ref": "#/components/schemas/SessionErrorUnknown"
  18185. },
  18186. "result": {},
  18187. "provider": {
  18188. "type": "object",
  18189. "properties": {
  18190. "executed": {
  18191. "type": "boolean"
  18192. },
  18193. "metadata": {
  18194. "type": "object",
  18195. "additionalProperties": {
  18196. "type": "object"
  18197. }
  18198. }
  18199. },
  18200. "required": ["executed"],
  18201. "additionalProperties": false
  18202. }
  18203. },
  18204. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  18205. "additionalProperties": false
  18206. }
  18207. },
  18208. "required": ["id", "type", "properties"],
  18209. "additionalProperties": false
  18210. },
  18211. {
  18212. "type": "object",
  18213. "properties": {
  18214. "id": {
  18215. "type": "string",
  18216. "pattern": "^evt_"
  18217. },
  18218. "type": {
  18219. "type": "string",
  18220. "enum": ["session.next.retried"]
  18221. },
  18222. "properties": {
  18223. "type": "object",
  18224. "properties": {
  18225. "timestamp": {
  18226. "type": "number"
  18227. },
  18228. "sessionID": {
  18229. "type": "string",
  18230. "pattern": "^ses"
  18231. },
  18232. "attempt": {
  18233. "type": "number"
  18234. },
  18235. "error": {
  18236. "$ref": "#/components/schemas/SessionNextRetry_error"
  18237. }
  18238. },
  18239. "required": ["timestamp", "sessionID", "attempt", "error"],
  18240. "additionalProperties": false
  18241. }
  18242. },
  18243. "required": ["id", "type", "properties"],
  18244. "additionalProperties": false
  18245. },
  18246. {
  18247. "type": "object",
  18248. "properties": {
  18249. "id": {
  18250. "type": "string",
  18251. "pattern": "^evt_"
  18252. },
  18253. "type": {
  18254. "type": "string",
  18255. "enum": ["session.next.compaction.started"]
  18256. },
  18257. "properties": {
  18258. "type": "object",
  18259. "properties": {
  18260. "timestamp": {
  18261. "type": "number"
  18262. },
  18263. "sessionID": {
  18264. "type": "string",
  18265. "pattern": "^ses"
  18266. },
  18267. "messageID": {
  18268. "type": "string",
  18269. "pattern": "^msg_"
  18270. },
  18271. "reason": {
  18272. "type": "string",
  18273. "enum": ["auto", "manual"]
  18274. }
  18275. },
  18276. "required": ["timestamp", "sessionID", "messageID", "reason"],
  18277. "additionalProperties": false
  18278. }
  18279. },
  18280. "required": ["id", "type", "properties"],
  18281. "additionalProperties": false
  18282. },
  18283. {
  18284. "type": "object",
  18285. "properties": {
  18286. "id": {
  18287. "type": "string",
  18288. "pattern": "^evt_"
  18289. },
  18290. "type": {
  18291. "type": "string",
  18292. "enum": ["session.next.compaction.delta"]
  18293. },
  18294. "properties": {
  18295. "type": "object",
  18296. "properties": {
  18297. "timestamp": {
  18298. "type": "number"
  18299. },
  18300. "sessionID": {
  18301. "type": "string",
  18302. "pattern": "^ses"
  18303. },
  18304. "messageID": {
  18305. "type": "string",
  18306. "pattern": "^msg_"
  18307. },
  18308. "text": {
  18309. "type": "string"
  18310. }
  18311. },
  18312. "required": ["timestamp", "sessionID", "messageID", "text"],
  18313. "additionalProperties": false
  18314. }
  18315. },
  18316. "required": ["id", "type", "properties"],
  18317. "additionalProperties": false
  18318. },
  18319. {
  18320. "type": "object",
  18321. "properties": {
  18322. "id": {
  18323. "type": "string",
  18324. "pattern": "^evt_"
  18325. },
  18326. "type": {
  18327. "type": "string",
  18328. "enum": ["session.next.compaction.ended"]
  18329. },
  18330. "properties": {
  18331. "type": "object",
  18332. "properties": {
  18333. "timestamp": {
  18334. "type": "number"
  18335. },
  18336. "sessionID": {
  18337. "type": "string",
  18338. "pattern": "^ses"
  18339. },
  18340. "messageID": {
  18341. "type": "string",
  18342. "pattern": "^msg_"
  18343. },
  18344. "reason": {
  18345. "type": "string",
  18346. "enum": ["auto", "manual"]
  18347. },
  18348. "text": {
  18349. "type": "string"
  18350. },
  18351. "recent": {
  18352. "type": "string"
  18353. }
  18354. },
  18355. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  18356. "additionalProperties": false
  18357. }
  18358. },
  18359. "required": ["id", "type", "properties"],
  18360. "additionalProperties": false
  18361. },
  18362. {
  18363. "type": "object",
  18364. "properties": {
  18365. "id": {
  18366. "type": "string",
  18367. "pattern": "^evt_"
  18368. },
  18369. "type": {
  18370. "type": "string",
  18371. "enum": ["message.part.delta"]
  18372. },
  18373. "properties": {
  18374. "type": "object",
  18375. "properties": {
  18376. "sessionID": {
  18377. "type": "string",
  18378. "pattern": "^ses"
  18379. },
  18380. "messageID": {
  18381. "type": "string",
  18382. "pattern": "^msg"
  18383. },
  18384. "partID": {
  18385. "type": "string",
  18386. "pattern": "^prt"
  18387. },
  18388. "field": {
  18389. "type": "string"
  18390. },
  18391. "delta": {
  18392. "type": "string"
  18393. }
  18394. },
  18395. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  18396. "additionalProperties": false
  18397. }
  18398. },
  18399. "required": ["id", "type", "properties"],
  18400. "additionalProperties": false
  18401. },
  18402. {
  18403. "type": "object",
  18404. "properties": {
  18405. "id": {
  18406. "type": "string",
  18407. "pattern": "^evt_"
  18408. },
  18409. "type": {
  18410. "type": "string",
  18411. "enum": ["session.diff"]
  18412. },
  18413. "properties": {
  18414. "type": "object",
  18415. "properties": {
  18416. "sessionID": {
  18417. "type": "string",
  18418. "pattern": "^ses"
  18419. },
  18420. "diff": {
  18421. "type": "array",
  18422. "items": {
  18423. "$ref": "#/components/schemas/SnapshotFileDiff"
  18424. }
  18425. }
  18426. },
  18427. "required": ["sessionID", "diff"],
  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.error"]
  18444. },
  18445. "properties": {
  18446. "type": "object",
  18447. "properties": {
  18448. "sessionID": {
  18449. "type": "string",
  18450. "pattern": "^ses"
  18451. },
  18452. "error": {
  18453. "anyOf": [
  18454. {
  18455. "$ref": "#/components/schemas/ProviderAuthError"
  18456. },
  18457. {
  18458. "$ref": "#/components/schemas/UnknownError"
  18459. },
  18460. {
  18461. "$ref": "#/components/schemas/MessageOutputLengthError"
  18462. },
  18463. {
  18464. "$ref": "#/components/schemas/MessageAbortedError"
  18465. },
  18466. {
  18467. "$ref": "#/components/schemas/StructuredOutputError"
  18468. },
  18469. {
  18470. "$ref": "#/components/schemas/ContextOverflowError"
  18471. },
  18472. {
  18473. "$ref": "#/components/schemas/ContentFilterError"
  18474. },
  18475. {
  18476. "$ref": "#/components/schemas/APIError"
  18477. }
  18478. ]
  18479. }
  18480. },
  18481. "additionalProperties": false
  18482. }
  18483. },
  18484. "required": ["id", "type", "properties"],
  18485. "additionalProperties": false
  18486. },
  18487. {
  18488. "type": "object",
  18489. "properties": {
  18490. "id": {
  18491. "type": "string",
  18492. "pattern": "^evt_"
  18493. },
  18494. "type": {
  18495. "type": "string",
  18496. "enum": ["installation.updated"]
  18497. },
  18498. "properties": {
  18499. "type": "object",
  18500. "properties": {
  18501. "version": {
  18502. "type": "string"
  18503. }
  18504. },
  18505. "required": ["version"],
  18506. "additionalProperties": false
  18507. }
  18508. },
  18509. "required": ["id", "type", "properties"],
  18510. "additionalProperties": false
  18511. },
  18512. {
  18513. "type": "object",
  18514. "properties": {
  18515. "id": {
  18516. "type": "string",
  18517. "pattern": "^evt_"
  18518. },
  18519. "type": {
  18520. "type": "string",
  18521. "enum": ["installation.update-available"]
  18522. },
  18523. "properties": {
  18524. "type": "object",
  18525. "properties": {
  18526. "version": {
  18527. "type": "string"
  18528. }
  18529. },
  18530. "required": ["version"],
  18531. "additionalProperties": false
  18532. }
  18533. },
  18534. "required": ["id", "type", "properties"],
  18535. "additionalProperties": false
  18536. },
  18537. {
  18538. "type": "object",
  18539. "properties": {
  18540. "id": {
  18541. "type": "string",
  18542. "pattern": "^evt_"
  18543. },
  18544. "type": {
  18545. "type": "string",
  18546. "enum": ["file.edited"]
  18547. },
  18548. "properties": {
  18549. "type": "object",
  18550. "properties": {
  18551. "file": {
  18552. "type": "string"
  18553. }
  18554. },
  18555. "required": ["file"],
  18556. "additionalProperties": false
  18557. }
  18558. },
  18559. "required": ["id", "type", "properties"],
  18560. "additionalProperties": false
  18561. },
  18562. {
  18563. "type": "object",
  18564. "properties": {
  18565. "id": {
  18566. "type": "string",
  18567. "pattern": "^evt_"
  18568. },
  18569. "type": {
  18570. "type": "string",
  18571. "enum": ["plugin.added"]
  18572. },
  18573. "properties": {
  18574. "type": "object",
  18575. "properties": {
  18576. "id": {
  18577. "type": "string"
  18578. }
  18579. },
  18580. "required": ["id"],
  18581. "additionalProperties": false
  18582. }
  18583. },
  18584. "required": ["id", "type", "properties"],
  18585. "additionalProperties": false
  18586. },
  18587. {
  18588. "type": "object",
  18589. "properties": {
  18590. "id": {
  18591. "type": "string",
  18592. "pattern": "^evt_"
  18593. },
  18594. "type": {
  18595. "type": "string",
  18596. "enum": ["permission.v2.asked"]
  18597. },
  18598. "properties": {
  18599. "type": "object",
  18600. "properties": {
  18601. "id": {
  18602. "type": "string",
  18603. "pattern": "^per"
  18604. },
  18605. "sessionID": {
  18606. "type": "string",
  18607. "pattern": "^ses"
  18608. },
  18609. "action": {
  18610. "type": "string"
  18611. },
  18612. "resources": {
  18613. "type": "array",
  18614. "items": {
  18615. "type": "string"
  18616. }
  18617. },
  18618. "save": {
  18619. "type": "array",
  18620. "items": {
  18621. "type": "string"
  18622. }
  18623. },
  18624. "metadata": {
  18625. "type": "object"
  18626. },
  18627. "source": {
  18628. "$ref": "#/components/schemas/PermissionV2Source"
  18629. }
  18630. },
  18631. "required": ["id", "sessionID", "action", "resources"],
  18632. "additionalProperties": false
  18633. }
  18634. },
  18635. "required": ["id", "type", "properties"],
  18636. "additionalProperties": false
  18637. },
  18638. {
  18639. "type": "object",
  18640. "properties": {
  18641. "id": {
  18642. "type": "string",
  18643. "pattern": "^evt_"
  18644. },
  18645. "type": {
  18646. "type": "string",
  18647. "enum": ["permission.v2.replied"]
  18648. },
  18649. "properties": {
  18650. "type": "object",
  18651. "properties": {
  18652. "sessionID": {
  18653. "type": "string",
  18654. "pattern": "^ses"
  18655. },
  18656. "requestID": {
  18657. "type": "string",
  18658. "pattern": "^per"
  18659. },
  18660. "reply": {
  18661. "$ref": "#/components/schemas/PermissionV2Reply"
  18662. }
  18663. },
  18664. "required": ["sessionID", "requestID", "reply"],
  18665. "additionalProperties": false
  18666. }
  18667. },
  18668. "required": ["id", "type", "properties"],
  18669. "additionalProperties": false
  18670. },
  18671. {
  18672. "type": "object",
  18673. "properties": {
  18674. "id": {
  18675. "type": "string",
  18676. "pattern": "^evt_"
  18677. },
  18678. "type": {
  18679. "type": "string",
  18680. "enum": ["reference.updated"]
  18681. },
  18682. "properties": {
  18683. "type": "object",
  18684. "properties": {}
  18685. }
  18686. },
  18687. "required": ["id", "type", "properties"],
  18688. "additionalProperties": false
  18689. },
  18690. {
  18691. "type": "object",
  18692. "properties": {
  18693. "id": {
  18694. "type": "string",
  18695. "pattern": "^evt_"
  18696. },
  18697. "type": {
  18698. "type": "string",
  18699. "enum": ["project.directories.updated"]
  18700. },
  18701. "properties": {
  18702. "type": "object",
  18703. "properties": {
  18704. "projectID": {
  18705. "type": "string"
  18706. }
  18707. },
  18708. "required": ["projectID"],
  18709. "additionalProperties": false
  18710. }
  18711. },
  18712. "required": ["id", "type", "properties"],
  18713. "additionalProperties": false
  18714. },
  18715. {
  18716. "type": "object",
  18717. "properties": {
  18718. "id": {
  18719. "type": "string",
  18720. "pattern": "^evt_"
  18721. },
  18722. "type": {
  18723. "type": "string",
  18724. "enum": ["file.watcher.updated"]
  18725. },
  18726. "properties": {
  18727. "type": "object",
  18728. "properties": {
  18729. "file": {
  18730. "type": "string"
  18731. },
  18732. "event": {
  18733. "type": "string",
  18734. "enum": ["add", "change", "unlink"]
  18735. }
  18736. },
  18737. "required": ["file", "event"],
  18738. "additionalProperties": false
  18739. }
  18740. },
  18741. "required": ["id", "type", "properties"],
  18742. "additionalProperties": false
  18743. },
  18744. {
  18745. "type": "object",
  18746. "properties": {
  18747. "id": {
  18748. "type": "string",
  18749. "pattern": "^evt_"
  18750. },
  18751. "type": {
  18752. "type": "string",
  18753. "enum": ["pty.created"]
  18754. },
  18755. "properties": {
  18756. "type": "object",
  18757. "properties": {
  18758. "info": {
  18759. "$ref": "#/components/schemas/Pty"
  18760. }
  18761. },
  18762. "required": ["info"],
  18763. "additionalProperties": false
  18764. }
  18765. },
  18766. "required": ["id", "type", "properties"],
  18767. "additionalProperties": false
  18768. },
  18769. {
  18770. "type": "object",
  18771. "properties": {
  18772. "id": {
  18773. "type": "string",
  18774. "pattern": "^evt_"
  18775. },
  18776. "type": {
  18777. "type": "string",
  18778. "enum": ["pty.updated"]
  18779. },
  18780. "properties": {
  18781. "type": "object",
  18782. "properties": {
  18783. "info": {
  18784. "$ref": "#/components/schemas/Pty"
  18785. }
  18786. },
  18787. "required": ["info"],
  18788. "additionalProperties": false
  18789. }
  18790. },
  18791. "required": ["id", "type", "properties"],
  18792. "additionalProperties": false
  18793. },
  18794. {
  18795. "type": "object",
  18796. "properties": {
  18797. "id": {
  18798. "type": "string",
  18799. "pattern": "^evt_"
  18800. },
  18801. "type": {
  18802. "type": "string",
  18803. "enum": ["pty.exited"]
  18804. },
  18805. "properties": {
  18806. "type": "object",
  18807. "properties": {
  18808. "id": {
  18809. "type": "string",
  18810. "pattern": "^pty"
  18811. },
  18812. "exitCode": {
  18813. "type": "integer",
  18814. "minimum": 0
  18815. }
  18816. },
  18817. "required": ["id", "exitCode"],
  18818. "additionalProperties": false
  18819. }
  18820. },
  18821. "required": ["id", "type", "properties"],
  18822. "additionalProperties": false
  18823. },
  18824. {
  18825. "type": "object",
  18826. "properties": {
  18827. "id": {
  18828. "type": "string",
  18829. "pattern": "^evt_"
  18830. },
  18831. "type": {
  18832. "type": "string",
  18833. "enum": ["pty.deleted"]
  18834. },
  18835. "properties": {
  18836. "type": "object",
  18837. "properties": {
  18838. "id": {
  18839. "type": "string",
  18840. "pattern": "^pty"
  18841. }
  18842. },
  18843. "required": ["id"],
  18844. "additionalProperties": false
  18845. }
  18846. },
  18847. "required": ["id", "type", "properties"],
  18848. "additionalProperties": false
  18849. },
  18850. {
  18851. "type": "object",
  18852. "properties": {
  18853. "id": {
  18854. "type": "string",
  18855. "pattern": "^evt_"
  18856. },
  18857. "type": {
  18858. "type": "string",
  18859. "enum": ["question.v2.asked"]
  18860. },
  18861. "properties": {
  18862. "type": "object",
  18863. "properties": {
  18864. "id": {
  18865. "type": "string",
  18866. "pattern": "^que"
  18867. },
  18868. "sessionID": {
  18869. "type": "string",
  18870. "pattern": "^ses"
  18871. },
  18872. "questions": {
  18873. "type": "array",
  18874. "items": {
  18875. "$ref": "#/components/schemas/QuestionV2Info"
  18876. },
  18877. "description": "Questions to ask"
  18878. },
  18879. "tool": {
  18880. "$ref": "#/components/schemas/QuestionV2Tool"
  18881. }
  18882. },
  18883. "required": ["id", "sessionID", "questions"],
  18884. "additionalProperties": false
  18885. }
  18886. },
  18887. "required": ["id", "type", "properties"],
  18888. "additionalProperties": false
  18889. },
  18890. {
  18891. "type": "object",
  18892. "properties": {
  18893. "id": {
  18894. "type": "string",
  18895. "pattern": "^evt_"
  18896. },
  18897. "type": {
  18898. "type": "string",
  18899. "enum": ["question.v2.replied"]
  18900. },
  18901. "properties": {
  18902. "type": "object",
  18903. "properties": {
  18904. "sessionID": {
  18905. "type": "string",
  18906. "pattern": "^ses"
  18907. },
  18908. "requestID": {
  18909. "type": "string",
  18910. "pattern": "^que"
  18911. },
  18912. "answers": {
  18913. "type": "array",
  18914. "items": {
  18915. "$ref": "#/components/schemas/QuestionV2Answer"
  18916. }
  18917. }
  18918. },
  18919. "required": ["sessionID", "requestID", "answers"],
  18920. "additionalProperties": false
  18921. }
  18922. },
  18923. "required": ["id", "type", "properties"],
  18924. "additionalProperties": false
  18925. },
  18926. {
  18927. "type": "object",
  18928. "properties": {
  18929. "id": {
  18930. "type": "string",
  18931. "pattern": "^evt_"
  18932. },
  18933. "type": {
  18934. "type": "string",
  18935. "enum": ["question.v2.rejected"]
  18936. },
  18937. "properties": {
  18938. "type": "object",
  18939. "properties": {
  18940. "sessionID": {
  18941. "type": "string",
  18942. "pattern": "^ses"
  18943. },
  18944. "requestID": {
  18945. "type": "string",
  18946. "pattern": "^que"
  18947. }
  18948. },
  18949. "required": ["sessionID", "requestID"],
  18950. "additionalProperties": false
  18951. }
  18952. },
  18953. "required": ["id", "type", "properties"],
  18954. "additionalProperties": false
  18955. },
  18956. {
  18957. "type": "object",
  18958. "properties": {
  18959. "id": {
  18960. "type": "string",
  18961. "pattern": "^evt_"
  18962. },
  18963. "type": {
  18964. "type": "string",
  18965. "enum": ["todo.updated"]
  18966. },
  18967. "properties": {
  18968. "type": "object",
  18969. "properties": {
  18970. "sessionID": {
  18971. "type": "string",
  18972. "pattern": "^ses"
  18973. },
  18974. "todos": {
  18975. "type": "array",
  18976. "items": {
  18977. "$ref": "#/components/schemas/Todo"
  18978. }
  18979. }
  18980. },
  18981. "required": ["sessionID", "todos"],
  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": ["lsp.updated"]
  18998. },
  18999. "properties": {
  19000. "type": "object",
  19001. "properties": {}
  19002. }
  19003. },
  19004. "required": ["id", "type", "properties"],
  19005. "additionalProperties": false
  19006. },
  19007. {
  19008. "type": "object",
  19009. "properties": {
  19010. "id": {
  19011. "type": "string",
  19012. "pattern": "^evt_"
  19013. },
  19014. "type": {
  19015. "type": "string",
  19016. "enum": ["permission.asked"]
  19017. },
  19018. "properties": {
  19019. "type": "object",
  19020. "properties": {
  19021. "id": {
  19022. "type": "string",
  19023. "pattern": "^per"
  19024. },
  19025. "sessionID": {
  19026. "type": "string",
  19027. "pattern": "^ses"
  19028. },
  19029. "permission": {
  19030. "type": "string"
  19031. },
  19032. "patterns": {
  19033. "type": "array",
  19034. "items": {
  19035. "type": "string"
  19036. }
  19037. },
  19038. "metadata": {
  19039. "type": "object"
  19040. },
  19041. "always": {
  19042. "type": "array",
  19043. "items": {
  19044. "type": "string"
  19045. }
  19046. },
  19047. "tool": {
  19048. "type": "object",
  19049. "properties": {
  19050. "messageID": {
  19051. "type": "string"
  19052. },
  19053. "callID": {
  19054. "type": "string"
  19055. }
  19056. },
  19057. "required": ["messageID", "callID"],
  19058. "additionalProperties": false
  19059. }
  19060. },
  19061. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  19062. "additionalProperties": false
  19063. }
  19064. },
  19065. "required": ["id", "type", "properties"],
  19066. "additionalProperties": false
  19067. },
  19068. {
  19069. "type": "object",
  19070. "properties": {
  19071. "id": {
  19072. "type": "string",
  19073. "pattern": "^evt_"
  19074. },
  19075. "type": {
  19076. "type": "string",
  19077. "enum": ["permission.replied"]
  19078. },
  19079. "properties": {
  19080. "type": "object",
  19081. "properties": {
  19082. "sessionID": {
  19083. "type": "string",
  19084. "pattern": "^ses"
  19085. },
  19086. "requestID": {
  19087. "type": "string",
  19088. "pattern": "^per"
  19089. },
  19090. "reply": {
  19091. "type": "string",
  19092. "enum": ["once", "always", "reject"]
  19093. }
  19094. },
  19095. "required": ["sessionID", "requestID", "reply"],
  19096. "additionalProperties": false
  19097. }
  19098. },
  19099. "required": ["id", "type", "properties"],
  19100. "additionalProperties": false
  19101. },
  19102. {
  19103. "type": "object",
  19104. "properties": {
  19105. "id": {
  19106. "type": "string",
  19107. "pattern": "^evt_"
  19108. },
  19109. "type": {
  19110. "type": "string",
  19111. "enum": ["tui.prompt.append"]
  19112. },
  19113. "properties": {
  19114. "type": "object",
  19115. "properties": {
  19116. "text": {
  19117. "type": "string"
  19118. }
  19119. },
  19120. "required": ["text"],
  19121. "additionalProperties": false
  19122. }
  19123. },
  19124. "required": ["id", "type", "properties"],
  19125. "additionalProperties": false
  19126. },
  19127. {
  19128. "type": "object",
  19129. "properties": {
  19130. "id": {
  19131. "type": "string",
  19132. "pattern": "^evt_"
  19133. },
  19134. "type": {
  19135. "type": "string",
  19136. "enum": ["tui.command.execute"]
  19137. },
  19138. "properties": {
  19139. "type": "object",
  19140. "properties": {
  19141. "command": {
  19142. "anyOf": [
  19143. {
  19144. "type": "string",
  19145. "enum": [
  19146. "session.list",
  19147. "session.new",
  19148. "session.share",
  19149. "session.interrupt",
  19150. "session.compact",
  19151. "session.page.up",
  19152. "session.page.down",
  19153. "session.line.up",
  19154. "session.line.down",
  19155. "session.half.page.up",
  19156. "session.half.page.down",
  19157. "session.first",
  19158. "session.last",
  19159. "prompt.clear",
  19160. "prompt.submit",
  19161. "agent.cycle"
  19162. ]
  19163. },
  19164. {
  19165. "type": "string"
  19166. }
  19167. ]
  19168. }
  19169. },
  19170. "required": ["command"],
  19171. "additionalProperties": false
  19172. }
  19173. },
  19174. "required": ["id", "type", "properties"],
  19175. "additionalProperties": false
  19176. },
  19177. {
  19178. "type": "object",
  19179. "properties": {
  19180. "id": {
  19181. "type": "string",
  19182. "pattern": "^evt_"
  19183. },
  19184. "type": {
  19185. "type": "string",
  19186. "enum": ["tui.toast.show"]
  19187. },
  19188. "properties": {
  19189. "type": "object",
  19190. "properties": {
  19191. "title": {
  19192. "type": "string"
  19193. },
  19194. "message": {
  19195. "type": "string"
  19196. },
  19197. "variant": {
  19198. "type": "string",
  19199. "enum": ["info", "success", "warning", "error"]
  19200. },
  19201. "duration": {
  19202. "type": "integer",
  19203. "exclusiveMinimum": 0
  19204. }
  19205. },
  19206. "required": ["message", "variant"],
  19207. "additionalProperties": false
  19208. }
  19209. },
  19210. "required": ["id", "type", "properties"],
  19211. "additionalProperties": false
  19212. },
  19213. {
  19214. "type": "object",
  19215. "properties": {
  19216. "id": {
  19217. "type": "string",
  19218. "pattern": "^evt_"
  19219. },
  19220. "type": {
  19221. "type": "string",
  19222. "enum": ["tui.session.select"]
  19223. },
  19224. "properties": {
  19225. "type": "object",
  19226. "properties": {
  19227. "sessionID": {
  19228. "type": "string",
  19229. "pattern": "^ses",
  19230. "description": "Session ID to navigate to"
  19231. }
  19232. },
  19233. "required": ["sessionID"],
  19234. "additionalProperties": false
  19235. }
  19236. },
  19237. "required": ["id", "type", "properties"],
  19238. "additionalProperties": false
  19239. },
  19240. {
  19241. "type": "object",
  19242. "properties": {
  19243. "id": {
  19244. "type": "string",
  19245. "pattern": "^evt_"
  19246. },
  19247. "type": {
  19248. "type": "string",
  19249. "enum": ["mcp.tools.changed"]
  19250. },
  19251. "properties": {
  19252. "type": "object",
  19253. "properties": {
  19254. "server": {
  19255. "type": "string"
  19256. }
  19257. },
  19258. "required": ["server"],
  19259. "additionalProperties": false
  19260. }
  19261. },
  19262. "required": ["id", "type", "properties"],
  19263. "additionalProperties": false
  19264. },
  19265. {
  19266. "type": "object",
  19267. "properties": {
  19268. "id": {
  19269. "type": "string",
  19270. "pattern": "^evt_"
  19271. },
  19272. "type": {
  19273. "type": "string",
  19274. "enum": ["mcp.browser.open.failed"]
  19275. },
  19276. "properties": {
  19277. "type": "object",
  19278. "properties": {
  19279. "mcpName": {
  19280. "type": "string"
  19281. },
  19282. "url": {
  19283. "type": "string"
  19284. }
  19285. },
  19286. "required": ["mcpName", "url"],
  19287. "additionalProperties": false
  19288. }
  19289. },
  19290. "required": ["id", "type", "properties"],
  19291. "additionalProperties": false
  19292. },
  19293. {
  19294. "type": "object",
  19295. "properties": {
  19296. "id": {
  19297. "type": "string",
  19298. "pattern": "^evt_"
  19299. },
  19300. "type": {
  19301. "type": "string",
  19302. "enum": ["command.executed"]
  19303. },
  19304. "properties": {
  19305. "type": "object",
  19306. "properties": {
  19307. "name": {
  19308. "type": "string"
  19309. },
  19310. "sessionID": {
  19311. "type": "string",
  19312. "pattern": "^ses"
  19313. },
  19314. "arguments": {
  19315. "type": "string"
  19316. },
  19317. "messageID": {
  19318. "type": "string",
  19319. "pattern": "^msg"
  19320. }
  19321. },
  19322. "required": ["name", "sessionID", "arguments", "messageID"],
  19323. "additionalProperties": false
  19324. }
  19325. },
  19326. "required": ["id", "type", "properties"],
  19327. "additionalProperties": false
  19328. },
  19329. {
  19330. "type": "object",
  19331. "properties": {
  19332. "id": {
  19333. "type": "string",
  19334. "pattern": "^evt_"
  19335. },
  19336. "type": {
  19337. "type": "string",
  19338. "enum": ["project.updated"]
  19339. },
  19340. "properties": {
  19341. "type": "object",
  19342. "properties": {
  19343. "id": {
  19344. "type": "string"
  19345. },
  19346. "worktree": {
  19347. "type": "string"
  19348. },
  19349. "vcs": {
  19350. "type": "string",
  19351. "enum": ["git"]
  19352. },
  19353. "name": {
  19354. "type": "string"
  19355. },
  19356. "icon": {
  19357. "type": "object",
  19358. "properties": {
  19359. "url": {
  19360. "type": "string"
  19361. },
  19362. "override": {
  19363. "type": "string"
  19364. },
  19365. "color": {
  19366. "type": "string"
  19367. }
  19368. },
  19369. "additionalProperties": false
  19370. },
  19371. "commands": {
  19372. "type": "object",
  19373. "properties": {
  19374. "start": {
  19375. "type": "string",
  19376. "description": "Startup script to run when creating a new workspace (worktree)"
  19377. }
  19378. },
  19379. "additionalProperties": false
  19380. },
  19381. "time": {
  19382. "type": "object",
  19383. "properties": {
  19384. "created": {
  19385. "type": "integer",
  19386. "minimum": 0
  19387. },
  19388. "updated": {
  19389. "type": "integer",
  19390. "minimum": 0
  19391. },
  19392. "initialized": {
  19393. "type": "integer",
  19394. "minimum": 0
  19395. }
  19396. },
  19397. "required": ["created", "updated"],
  19398. "additionalProperties": false
  19399. },
  19400. "sandboxes": {
  19401. "type": "array",
  19402. "items": {
  19403. "type": "string"
  19404. }
  19405. }
  19406. },
  19407. "required": ["id", "worktree", "time", "sandboxes"],
  19408. "additionalProperties": false
  19409. }
  19410. },
  19411. "required": ["id", "type", "properties"],
  19412. "additionalProperties": false
  19413. },
  19414. {
  19415. "type": "object",
  19416. "properties": {
  19417. "id": {
  19418. "type": "string",
  19419. "pattern": "^evt_"
  19420. },
  19421. "type": {
  19422. "type": "string",
  19423. "enum": ["session.status"]
  19424. },
  19425. "properties": {
  19426. "type": "object",
  19427. "properties": {
  19428. "sessionID": {
  19429. "type": "string",
  19430. "pattern": "^ses"
  19431. },
  19432. "status": {
  19433. "$ref": "#/components/schemas/SessionStatus"
  19434. }
  19435. },
  19436. "required": ["sessionID", "status"],
  19437. "additionalProperties": false
  19438. }
  19439. },
  19440. "required": ["id", "type", "properties"],
  19441. "additionalProperties": false
  19442. },
  19443. {
  19444. "type": "object",
  19445. "properties": {
  19446. "id": {
  19447. "type": "string",
  19448. "pattern": "^evt_"
  19449. },
  19450. "type": {
  19451. "type": "string",
  19452. "enum": ["session.idle"]
  19453. },
  19454. "properties": {
  19455. "type": "object",
  19456. "properties": {
  19457. "sessionID": {
  19458. "type": "string",
  19459. "pattern": "^ses"
  19460. }
  19461. },
  19462. "required": ["sessionID"],
  19463. "additionalProperties": false
  19464. }
  19465. },
  19466. "required": ["id", "type", "properties"],
  19467. "additionalProperties": false
  19468. },
  19469. {
  19470. "type": "object",
  19471. "properties": {
  19472. "id": {
  19473. "type": "string",
  19474. "pattern": "^evt_"
  19475. },
  19476. "type": {
  19477. "type": "string",
  19478. "enum": ["question.asked"]
  19479. },
  19480. "properties": {
  19481. "type": "object",
  19482. "properties": {
  19483. "id": {
  19484. "type": "string",
  19485. "pattern": "^que"
  19486. },
  19487. "sessionID": {
  19488. "type": "string",
  19489. "pattern": "^ses"
  19490. },
  19491. "questions": {
  19492. "type": "array",
  19493. "items": {
  19494. "$ref": "#/components/schemas/QuestionInfo"
  19495. },
  19496. "description": "Questions to ask"
  19497. },
  19498. "tool": {
  19499. "$ref": "#/components/schemas/QuestionTool"
  19500. }
  19501. },
  19502. "required": ["id", "sessionID", "questions"],
  19503. "additionalProperties": false
  19504. }
  19505. },
  19506. "required": ["id", "type", "properties"],
  19507. "additionalProperties": false
  19508. },
  19509. {
  19510. "type": "object",
  19511. "properties": {
  19512. "id": {
  19513. "type": "string",
  19514. "pattern": "^evt_"
  19515. },
  19516. "type": {
  19517. "type": "string",
  19518. "enum": ["question.replied"]
  19519. },
  19520. "properties": {
  19521. "type": "object",
  19522. "properties": {
  19523. "sessionID": {
  19524. "type": "string",
  19525. "pattern": "^ses"
  19526. },
  19527. "requestID": {
  19528. "type": "string",
  19529. "pattern": "^que"
  19530. },
  19531. "answers": {
  19532. "type": "array",
  19533. "items": {
  19534. "$ref": "#/components/schemas/QuestionAnswer"
  19535. }
  19536. }
  19537. },
  19538. "required": ["sessionID", "requestID", "answers"],
  19539. "additionalProperties": false
  19540. }
  19541. },
  19542. "required": ["id", "type", "properties"],
  19543. "additionalProperties": false
  19544. },
  19545. {
  19546. "type": "object",
  19547. "properties": {
  19548. "id": {
  19549. "type": "string",
  19550. "pattern": "^evt_"
  19551. },
  19552. "type": {
  19553. "type": "string",
  19554. "enum": ["question.rejected"]
  19555. },
  19556. "properties": {
  19557. "type": "object",
  19558. "properties": {
  19559. "sessionID": {
  19560. "type": "string",
  19561. "pattern": "^ses"
  19562. },
  19563. "requestID": {
  19564. "type": "string",
  19565. "pattern": "^que"
  19566. }
  19567. },
  19568. "required": ["sessionID", "requestID"],
  19569. "additionalProperties": false
  19570. }
  19571. },
  19572. "required": ["id", "type", "properties"],
  19573. "additionalProperties": false
  19574. },
  19575. {
  19576. "type": "object",
  19577. "properties": {
  19578. "id": {
  19579. "type": "string",
  19580. "pattern": "^evt_"
  19581. },
  19582. "type": {
  19583. "type": "string",
  19584. "enum": ["session.compacted"]
  19585. },
  19586. "properties": {
  19587. "type": "object",
  19588. "properties": {
  19589. "sessionID": {
  19590. "type": "string",
  19591. "pattern": "^ses"
  19592. }
  19593. },
  19594. "required": ["sessionID"],
  19595. "additionalProperties": false
  19596. }
  19597. },
  19598. "required": ["id", "type", "properties"],
  19599. "additionalProperties": false
  19600. },
  19601. {
  19602. "type": "object",
  19603. "properties": {
  19604. "id": {
  19605. "type": "string",
  19606. "pattern": "^evt_"
  19607. },
  19608. "type": {
  19609. "type": "string",
  19610. "enum": ["vcs.branch.updated"]
  19611. },
  19612. "properties": {
  19613. "type": "object",
  19614. "properties": {
  19615. "branch": {
  19616. "type": "string"
  19617. }
  19618. },
  19619. "additionalProperties": false
  19620. }
  19621. },
  19622. "required": ["id", "type", "properties"],
  19623. "additionalProperties": false
  19624. },
  19625. {
  19626. "type": "object",
  19627. "properties": {
  19628. "id": {
  19629. "type": "string",
  19630. "pattern": "^evt_"
  19631. },
  19632. "type": {
  19633. "type": "string",
  19634. "enum": ["workspace.ready"]
  19635. },
  19636. "properties": {
  19637. "type": "object",
  19638. "properties": {
  19639. "name": {
  19640. "type": "string"
  19641. }
  19642. },
  19643. "required": ["name"],
  19644. "additionalProperties": false
  19645. }
  19646. },
  19647. "required": ["id", "type", "properties"],
  19648. "additionalProperties": false
  19649. },
  19650. {
  19651. "type": "object",
  19652. "properties": {
  19653. "id": {
  19654. "type": "string",
  19655. "pattern": "^evt_"
  19656. },
  19657. "type": {
  19658. "type": "string",
  19659. "enum": ["workspace.failed"]
  19660. },
  19661. "properties": {
  19662. "type": "object",
  19663. "properties": {
  19664. "message": {
  19665. "type": "string"
  19666. }
  19667. },
  19668. "required": ["message"],
  19669. "additionalProperties": false
  19670. }
  19671. },
  19672. "required": ["id", "type", "properties"],
  19673. "additionalProperties": false
  19674. },
  19675. {
  19676. "type": "object",
  19677. "properties": {
  19678. "id": {
  19679. "type": "string",
  19680. "pattern": "^evt_"
  19681. },
  19682. "type": {
  19683. "type": "string",
  19684. "enum": ["workspace.status"]
  19685. },
  19686. "properties": {
  19687. "type": "object",
  19688. "properties": {
  19689. "workspaceID": {
  19690. "type": "string",
  19691. "pattern": "^wrk"
  19692. },
  19693. "status": {
  19694. "type": "string",
  19695. "enum": ["connected", "connecting", "disconnected", "error"]
  19696. }
  19697. },
  19698. "required": ["workspaceID", "status"],
  19699. "additionalProperties": false
  19700. }
  19701. },
  19702. "required": ["id", "type", "properties"],
  19703. "additionalProperties": false
  19704. },
  19705. {
  19706. "type": "object",
  19707. "properties": {
  19708. "id": {
  19709. "type": "string",
  19710. "pattern": "^evt_"
  19711. },
  19712. "type": {
  19713. "type": "string",
  19714. "enum": ["worktree.ready"]
  19715. },
  19716. "properties": {
  19717. "type": "object",
  19718. "properties": {
  19719. "name": {
  19720. "type": "string"
  19721. },
  19722. "branch": {
  19723. "type": "string"
  19724. }
  19725. },
  19726. "required": ["name"],
  19727. "additionalProperties": false
  19728. }
  19729. },
  19730. "required": ["id", "type", "properties"],
  19731. "additionalProperties": false
  19732. },
  19733. {
  19734. "type": "object",
  19735. "properties": {
  19736. "id": {
  19737. "type": "string",
  19738. "pattern": "^evt_"
  19739. },
  19740. "type": {
  19741. "type": "string",
  19742. "enum": ["worktree.failed"]
  19743. },
  19744. "properties": {
  19745. "type": "object",
  19746. "properties": {
  19747. "message": {
  19748. "type": "string"
  19749. }
  19750. },
  19751. "required": ["message"],
  19752. "additionalProperties": false
  19753. }
  19754. },
  19755. "required": ["id", "type", "properties"],
  19756. "additionalProperties": false
  19757. },
  19758. {
  19759. "type": "object",
  19760. "properties": {
  19761. "id": {
  19762. "type": "string",
  19763. "pattern": "^evt_"
  19764. },
  19765. "type": {
  19766. "type": "string",
  19767. "enum": ["server.connected"]
  19768. },
  19769. "properties": {
  19770. "type": "object",
  19771. "properties": {}
  19772. }
  19773. },
  19774. "required": ["id", "type", "properties"],
  19775. "additionalProperties": false
  19776. },
  19777. {
  19778. "type": "object",
  19779. "properties": {
  19780. "id": {
  19781. "type": "string",
  19782. "pattern": "^evt_"
  19783. },
  19784. "type": {
  19785. "type": "string",
  19786. "enum": ["global.disposed"]
  19787. },
  19788. "properties": {
  19789. "type": "object",
  19790. "properties": {}
  19791. }
  19792. },
  19793. "required": ["id", "type", "properties"],
  19794. "additionalProperties": false
  19795. },
  19796. {
  19797. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  19798. },
  19799. {
  19800. "$ref": "#/components/schemas/SyncEventSessionCreated"
  19801. },
  19802. {
  19803. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  19804. },
  19805. {
  19806. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  19807. },
  19808. {
  19809. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  19810. },
  19811. {
  19812. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  19813. },
  19814. {
  19815. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  19816. },
  19817. {
  19818. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  19819. },
  19820. {
  19821. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  19822. },
  19823. {
  19824. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  19825. },
  19826. {
  19827. "$ref": "#/components/schemas/SyncEventSessionNextMoved"
  19828. },
  19829. {
  19830. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  19831. },
  19832. {
  19833. "$ref": "#/components/schemas/SyncEventSessionNextPromptAdmitted"
  19834. },
  19835. {
  19836. "$ref": "#/components/schemas/SyncEventSessionNextPromptPromoted"
  19837. },
  19838. {
  19839. "$ref": "#/components/schemas/SyncEventSessionNextContextUpdated"
  19840. },
  19841. {
  19842. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  19843. },
  19844. {
  19845. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  19846. },
  19847. {
  19848. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  19849. },
  19850. {
  19851. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  19852. },
  19853. {
  19854. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  19855. },
  19856. {
  19857. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  19858. },
  19859. {
  19860. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  19861. },
  19862. {
  19863. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  19864. },
  19865. {
  19866. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  19867. },
  19868. {
  19869. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  19870. },
  19871. {
  19872. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  19873. },
  19874. {
  19875. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  19876. },
  19877. {
  19878. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  19879. },
  19880. {
  19881. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  19882. },
  19883. {
  19884. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  19885. },
  19886. {
  19887. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  19888. },
  19889. {
  19890. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  19891. },
  19892. {
  19893. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  19894. },
  19895. {
  19896. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  19897. }
  19898. ]
  19899. }
  19900. },
  19901. "required": ["directory", "payload"],
  19902. "additionalProperties": false
  19903. },
  19904. "LogLevel": {
  19905. "type": "string",
  19906. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  19907. "description": "Log level"
  19908. },
  19909. "ServerConfig": {
  19910. "type": "object",
  19911. "properties": {
  19912. "port": {
  19913. "type": "integer",
  19914. "exclusiveMinimum": 0
  19915. },
  19916. "hostname": {
  19917. "type": "string"
  19918. },
  19919. "mdns": {
  19920. "type": "boolean"
  19921. },
  19922. "mdnsDomain": {
  19923. "type": "string"
  19924. },
  19925. "cors": {
  19926. "type": "array",
  19927. "items": {
  19928. "type": "string"
  19929. }
  19930. }
  19931. },
  19932. "additionalProperties": false,
  19933. "description": "Server configuration for opencode serve and web commands"
  19934. },
  19935. "PermissionActionConfig": {
  19936. "type": "string",
  19937. "enum": ["ask", "allow", "deny"]
  19938. },
  19939. "PermissionObjectConfig": {
  19940. "type": "object",
  19941. "additionalProperties": {
  19942. "$ref": "#/components/schemas/PermissionActionConfig"
  19943. }
  19944. },
  19945. "PermissionRuleConfig": {
  19946. "anyOf": [
  19947. {
  19948. "$ref": "#/components/schemas/PermissionActionConfig"
  19949. },
  19950. {
  19951. "$ref": "#/components/schemas/PermissionObjectConfig"
  19952. }
  19953. ]
  19954. },
  19955. "PermissionConfig": {
  19956. "anyOf": [
  19957. {
  19958. "$ref": "#/components/schemas/PermissionActionConfig"
  19959. },
  19960. {
  19961. "type": "object",
  19962. "properties": {
  19963. "read": {
  19964. "$ref": "#/components/schemas/PermissionRuleConfig"
  19965. },
  19966. "edit": {
  19967. "$ref": "#/components/schemas/PermissionRuleConfig"
  19968. },
  19969. "glob": {
  19970. "$ref": "#/components/schemas/PermissionRuleConfig"
  19971. },
  19972. "grep": {
  19973. "$ref": "#/components/schemas/PermissionRuleConfig"
  19974. },
  19975. "list": {
  19976. "$ref": "#/components/schemas/PermissionRuleConfig"
  19977. },
  19978. "bash": {
  19979. "$ref": "#/components/schemas/PermissionRuleConfig"
  19980. },
  19981. "task": {
  19982. "$ref": "#/components/schemas/PermissionRuleConfig"
  19983. },
  19984. "external_directory": {
  19985. "$ref": "#/components/schemas/PermissionRuleConfig"
  19986. },
  19987. "todowrite": {
  19988. "$ref": "#/components/schemas/PermissionActionConfig"
  19989. },
  19990. "question": {
  19991. "$ref": "#/components/schemas/PermissionActionConfig"
  19992. },
  19993. "webfetch": {
  19994. "$ref": "#/components/schemas/PermissionActionConfig"
  19995. },
  19996. "websearch": {
  19997. "$ref": "#/components/schemas/PermissionActionConfig"
  19998. },
  19999. "lsp": {
  20000. "$ref": "#/components/schemas/PermissionRuleConfig"
  20001. },
  20002. "doom_loop": {
  20003. "$ref": "#/components/schemas/PermissionActionConfig"
  20004. },
  20005. "skill": {
  20006. "$ref": "#/components/schemas/PermissionRuleConfig"
  20007. }
  20008. },
  20009. "additionalProperties": {
  20010. "$ref": "#/components/schemas/PermissionRuleConfig"
  20011. }
  20012. }
  20013. ]
  20014. },
  20015. "AgentConfig": {
  20016. "type": "object",
  20017. "properties": {
  20018. "model": {
  20019. "type": "string"
  20020. },
  20021. "variant": {
  20022. "type": "string"
  20023. },
  20024. "temperature": {
  20025. "type": "number"
  20026. },
  20027. "top_p": {
  20028. "type": "number"
  20029. },
  20030. "prompt": {
  20031. "type": "string"
  20032. },
  20033. "tools": {
  20034. "type": "object",
  20035. "additionalProperties": {
  20036. "type": "boolean"
  20037. }
  20038. },
  20039. "disable": {
  20040. "type": "boolean"
  20041. },
  20042. "description": {
  20043. "type": "string"
  20044. },
  20045. "mode": {
  20046. "type": "string",
  20047. "enum": ["subagent", "primary", "all"]
  20048. },
  20049. "hidden": {
  20050. "type": "boolean"
  20051. },
  20052. "options": {
  20053. "type": "object"
  20054. },
  20055. "color": {
  20056. "anyOf": [
  20057. {
  20058. "type": "string",
  20059. "pattern": "^#[0-9a-fA-F]{6}$"
  20060. },
  20061. {
  20062. "type": "string",
  20063. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  20064. }
  20065. ],
  20066. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  20067. },
  20068. "steps": {
  20069. "type": "integer",
  20070. "exclusiveMinimum": 0
  20071. },
  20072. "maxSteps": {
  20073. "type": "integer",
  20074. "exclusiveMinimum": 0
  20075. },
  20076. "permission": {
  20077. "$ref": "#/components/schemas/PermissionConfig"
  20078. }
  20079. },
  20080. "additionalProperties": {}
  20081. },
  20082. "ProviderConfig": {
  20083. "type": "object",
  20084. "properties": {
  20085. "api": {
  20086. "type": "string"
  20087. },
  20088. "name": {
  20089. "type": "string"
  20090. },
  20091. "env": {
  20092. "type": "array",
  20093. "items": {
  20094. "type": "string"
  20095. }
  20096. },
  20097. "id": {
  20098. "type": "string"
  20099. },
  20100. "npm": {
  20101. "type": "string"
  20102. },
  20103. "whitelist": {
  20104. "type": "array",
  20105. "items": {
  20106. "type": "string"
  20107. }
  20108. },
  20109. "blacklist": {
  20110. "type": "array",
  20111. "items": {
  20112. "type": "string"
  20113. }
  20114. },
  20115. "options": {
  20116. "type": "object",
  20117. "properties": {
  20118. "apiKey": {
  20119. "type": "string"
  20120. },
  20121. "baseURL": {
  20122. "type": "string"
  20123. },
  20124. "enterpriseUrl": {
  20125. "type": "string"
  20126. },
  20127. "setCacheKey": {
  20128. "type": "boolean"
  20129. },
  20130. "timeout": {
  20131. "anyOf": [
  20132. {
  20133. "type": "integer",
  20134. "exclusiveMinimum": 0
  20135. },
  20136. {
  20137. "type": "boolean",
  20138. "enum": [false]
  20139. }
  20140. ],
  20141. "description": "Timeout in milliseconds for full requests to this provider. Set to false to disable timeout."
  20142. },
  20143. "headerTimeout": {
  20144. "anyOf": [
  20145. {
  20146. "type": "integer",
  20147. "exclusiveMinimum": 0
  20148. },
  20149. {
  20150. "type": "boolean",
  20151. "enum": [false]
  20152. }
  20153. ],
  20154. "description": "Timeout in milliseconds to wait for response headers. Provider integrations may set defaults. Set to false to disable timeout."
  20155. },
  20156. "chunkTimeout": {
  20157. "type": "integer",
  20158. "exclusiveMinimum": 0
  20159. }
  20160. },
  20161. "additionalProperties": {}
  20162. },
  20163. "models": {
  20164. "type": "object",
  20165. "additionalProperties": {
  20166. "type": "object",
  20167. "properties": {
  20168. "id": {
  20169. "type": "string"
  20170. },
  20171. "name": {
  20172. "type": "string"
  20173. },
  20174. "family": {
  20175. "type": "string"
  20176. },
  20177. "release_date": {
  20178. "type": "string"
  20179. },
  20180. "attachment": {
  20181. "type": "boolean"
  20182. },
  20183. "reasoning": {
  20184. "type": "boolean"
  20185. },
  20186. "temperature": {
  20187. "type": "boolean"
  20188. },
  20189. "tool_call": {
  20190. "type": "boolean"
  20191. },
  20192. "interleaved": {
  20193. "anyOf": [
  20194. {
  20195. "type": "boolean",
  20196. "enum": [true]
  20197. },
  20198. {
  20199. "type": "object",
  20200. "properties": {
  20201. "field": {
  20202. "type": "string",
  20203. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  20204. }
  20205. },
  20206. "required": ["field"],
  20207. "additionalProperties": false
  20208. }
  20209. ]
  20210. },
  20211. "cost": {
  20212. "type": "object",
  20213. "properties": {
  20214. "input": {
  20215. "type": "number"
  20216. },
  20217. "output": {
  20218. "type": "number"
  20219. },
  20220. "cache_read": {
  20221. "type": "number"
  20222. },
  20223. "cache_write": {
  20224. "type": "number"
  20225. },
  20226. "context_over_200k": {
  20227. "type": "object",
  20228. "properties": {
  20229. "input": {
  20230. "type": "number"
  20231. },
  20232. "output": {
  20233. "type": "number"
  20234. },
  20235. "cache_read": {
  20236. "type": "number"
  20237. },
  20238. "cache_write": {
  20239. "type": "number"
  20240. }
  20241. },
  20242. "required": ["input", "output"],
  20243. "additionalProperties": false
  20244. }
  20245. },
  20246. "required": ["input", "output"],
  20247. "additionalProperties": false
  20248. },
  20249. "limit": {
  20250. "type": "object",
  20251. "properties": {
  20252. "context": {
  20253. "type": "number"
  20254. },
  20255. "input": {
  20256. "type": "number"
  20257. },
  20258. "output": {
  20259. "type": "number"
  20260. }
  20261. },
  20262. "required": ["context", "output"],
  20263. "additionalProperties": false
  20264. },
  20265. "modalities": {
  20266. "type": "object",
  20267. "properties": {
  20268. "input": {
  20269. "type": "array",
  20270. "items": {
  20271. "type": "string",
  20272. "enum": ["text", "audio", "image", "video", "pdf"]
  20273. }
  20274. },
  20275. "output": {
  20276. "type": "array",
  20277. "items": {
  20278. "type": "string",
  20279. "enum": ["text", "audio", "image", "video", "pdf"]
  20280. }
  20281. }
  20282. },
  20283. "additionalProperties": false
  20284. },
  20285. "experimental": {
  20286. "type": "boolean"
  20287. },
  20288. "status": {
  20289. "type": "string",
  20290. "enum": ["alpha", "beta", "deprecated", "active"]
  20291. },
  20292. "provider": {
  20293. "type": "object",
  20294. "properties": {
  20295. "npm": {
  20296. "type": "string"
  20297. },
  20298. "api": {
  20299. "type": "string"
  20300. }
  20301. },
  20302. "additionalProperties": false
  20303. },
  20304. "options": {
  20305. "type": "object"
  20306. },
  20307. "headers": {
  20308. "type": "object",
  20309. "additionalProperties": {
  20310. "type": "string"
  20311. }
  20312. },
  20313. "variants": {
  20314. "type": "object",
  20315. "additionalProperties": {
  20316. "type": "object",
  20317. "properties": {
  20318. "disabled": {
  20319. "type": "boolean"
  20320. }
  20321. },
  20322. "additionalProperties": {}
  20323. },
  20324. "description": "Variant-specific configuration"
  20325. }
  20326. },
  20327. "additionalProperties": false
  20328. }
  20329. }
  20330. },
  20331. "additionalProperties": false
  20332. },
  20333. "McpLocalConfig": {
  20334. "type": "object",
  20335. "properties": {
  20336. "type": {
  20337. "type": "string",
  20338. "enum": ["local"],
  20339. "description": "Type of MCP server connection"
  20340. },
  20341. "command": {
  20342. "type": "array",
  20343. "items": {
  20344. "type": "string"
  20345. },
  20346. "description": "Command and arguments to run the MCP server"
  20347. },
  20348. "cwd": {
  20349. "type": "string"
  20350. },
  20351. "environment": {
  20352. "type": "object",
  20353. "additionalProperties": {
  20354. "type": "string"
  20355. }
  20356. },
  20357. "enabled": {
  20358. "type": "boolean"
  20359. },
  20360. "timeout": {
  20361. "type": "integer",
  20362. "exclusiveMinimum": 0
  20363. }
  20364. },
  20365. "required": ["type", "command"],
  20366. "additionalProperties": false
  20367. },
  20368. "McpOAuthConfig": {
  20369. "type": "object",
  20370. "properties": {
  20371. "clientId": {
  20372. "type": "string"
  20373. },
  20374. "clientSecret": {
  20375. "type": "string"
  20376. },
  20377. "scope": {
  20378. "type": "string"
  20379. },
  20380. "callbackPort": {
  20381. "type": "integer",
  20382. "minimum": 1,
  20383. "maximum": 65535
  20384. },
  20385. "redirectUri": {
  20386. "type": "string"
  20387. }
  20388. },
  20389. "additionalProperties": false
  20390. },
  20391. "McpRemoteConfig": {
  20392. "type": "object",
  20393. "properties": {
  20394. "type": {
  20395. "type": "string",
  20396. "enum": ["remote"],
  20397. "description": "Type of MCP server connection"
  20398. },
  20399. "url": {
  20400. "type": "string",
  20401. "description": "URL of the remote MCP server"
  20402. },
  20403. "enabled": {
  20404. "type": "boolean"
  20405. },
  20406. "headers": {
  20407. "type": "object",
  20408. "additionalProperties": {
  20409. "type": "string"
  20410. }
  20411. },
  20412. "oauth": {
  20413. "anyOf": [
  20414. {
  20415. "$ref": "#/components/schemas/McpOAuthConfig"
  20416. },
  20417. {
  20418. "type": "boolean",
  20419. "enum": [false]
  20420. }
  20421. ],
  20422. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  20423. },
  20424. "timeout": {
  20425. "type": "integer",
  20426. "exclusiveMinimum": 0
  20427. }
  20428. },
  20429. "required": ["type", "url"],
  20430. "additionalProperties": false
  20431. },
  20432. "LayoutConfig": {
  20433. "type": "string",
  20434. "enum": ["auto", "stretch"],
  20435. "description": "@deprecated Always uses stretch layout."
  20436. },
  20437. "ImageAttachmentConfig": {
  20438. "type": "object",
  20439. "properties": {
  20440. "auto_resize": {
  20441. "type": "boolean"
  20442. },
  20443. "max_width": {
  20444. "type": "integer",
  20445. "exclusiveMinimum": 0
  20446. },
  20447. "max_height": {
  20448. "type": "integer",
  20449. "exclusiveMinimum": 0
  20450. },
  20451. "max_base64_bytes": {
  20452. "type": "integer",
  20453. "exclusiveMinimum": 0
  20454. }
  20455. },
  20456. "additionalProperties": false
  20457. },
  20458. "AttachmentConfig": {
  20459. "type": "object",
  20460. "properties": {
  20461. "image": {
  20462. "$ref": "#/components/schemas/ImageAttachmentConfig"
  20463. }
  20464. },
  20465. "additionalProperties": false
  20466. },
  20467. "Config": {
  20468. "type": "object",
  20469. "properties": {
  20470. "$schema": {
  20471. "type": "string"
  20472. },
  20473. "shell": {
  20474. "type": "string"
  20475. },
  20476. "logLevel": {
  20477. "$ref": "#/components/schemas/LogLevel"
  20478. },
  20479. "server": {
  20480. "$ref": "#/components/schemas/ServerConfig"
  20481. },
  20482. "command": {
  20483. "type": "object",
  20484. "additionalProperties": {
  20485. "type": "object",
  20486. "properties": {
  20487. "template": {
  20488. "type": "string"
  20489. },
  20490. "description": {
  20491. "type": "string"
  20492. },
  20493. "agent": {
  20494. "type": "string"
  20495. },
  20496. "model": {
  20497. "type": "string"
  20498. },
  20499. "variant": {
  20500. "type": "string"
  20501. },
  20502. "subtask": {
  20503. "type": "boolean"
  20504. }
  20505. },
  20506. "required": ["template"],
  20507. "additionalProperties": false
  20508. }
  20509. },
  20510. "skills": {
  20511. "type": "object",
  20512. "properties": {
  20513. "paths": {
  20514. "type": "array",
  20515. "items": {
  20516. "type": "string"
  20517. }
  20518. },
  20519. "urls": {
  20520. "type": "array",
  20521. "items": {
  20522. "type": "string"
  20523. }
  20524. }
  20525. },
  20526. "additionalProperties": false
  20527. },
  20528. "references": {
  20529. "type": "object",
  20530. "additionalProperties": {
  20531. "anyOf": [
  20532. {
  20533. "type": "string"
  20534. },
  20535. {
  20536. "$ref": "#/components/schemas/ConfigV2ReferenceGit"
  20537. },
  20538. {
  20539. "$ref": "#/components/schemas/ConfigV2ReferenceLocal"
  20540. }
  20541. ]
  20542. }
  20543. },
  20544. "reference": {
  20545. "type": "object",
  20546. "additionalProperties": {
  20547. "anyOf": [
  20548. {
  20549. "type": "string"
  20550. },
  20551. {
  20552. "$ref": "#/components/schemas/ConfigV2ReferenceGit"
  20553. },
  20554. {
  20555. "$ref": "#/components/schemas/ConfigV2ReferenceLocal"
  20556. }
  20557. ]
  20558. }
  20559. },
  20560. "watcher": {
  20561. "type": "object",
  20562. "properties": {
  20563. "ignore": {
  20564. "type": "array",
  20565. "items": {
  20566. "type": "string"
  20567. }
  20568. }
  20569. },
  20570. "additionalProperties": false
  20571. },
  20572. "snapshot": {
  20573. "type": "boolean"
  20574. },
  20575. "plugin": {
  20576. "type": "array",
  20577. "items": {
  20578. "anyOf": [
  20579. {
  20580. "type": "string"
  20581. },
  20582. {
  20583. "type": "array",
  20584. "prefixItems": [
  20585. {
  20586. "type": "string"
  20587. },
  20588. {
  20589. "type": "object"
  20590. }
  20591. ],
  20592. "maxItems": 2,
  20593. "minItems": 2
  20594. }
  20595. ]
  20596. }
  20597. },
  20598. "share": {
  20599. "type": "string",
  20600. "enum": ["manual", "auto", "disabled"]
  20601. },
  20602. "autoshare": {
  20603. "type": "boolean"
  20604. },
  20605. "autoupdate": {
  20606. "anyOf": [
  20607. {
  20608. "type": "boolean"
  20609. },
  20610. {
  20611. "type": "string",
  20612. "enum": ["notify"]
  20613. }
  20614. ],
  20615. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  20616. },
  20617. "disabled_providers": {
  20618. "type": "array",
  20619. "items": {
  20620. "type": "string"
  20621. }
  20622. },
  20623. "enabled_providers": {
  20624. "type": "array",
  20625. "items": {
  20626. "type": "string"
  20627. }
  20628. },
  20629. "model": {
  20630. "type": "string"
  20631. },
  20632. "small_model": {
  20633. "type": "string"
  20634. },
  20635. "default_agent": {
  20636. "type": "string"
  20637. },
  20638. "username": {
  20639. "type": "string"
  20640. },
  20641. "mode": {
  20642. "type": "object",
  20643. "properties": {
  20644. "build": {
  20645. "$ref": "#/components/schemas/AgentConfig"
  20646. },
  20647. "plan": {
  20648. "$ref": "#/components/schemas/AgentConfig"
  20649. }
  20650. },
  20651. "additionalProperties": {
  20652. "$ref": "#/components/schemas/AgentConfig"
  20653. }
  20654. },
  20655. "agent": {
  20656. "type": "object",
  20657. "properties": {
  20658. "plan": {
  20659. "$ref": "#/components/schemas/AgentConfig"
  20660. },
  20661. "build": {
  20662. "$ref": "#/components/schemas/AgentConfig"
  20663. },
  20664. "general": {
  20665. "$ref": "#/components/schemas/AgentConfig"
  20666. },
  20667. "explore": {
  20668. "$ref": "#/components/schemas/AgentConfig"
  20669. },
  20670. "title": {
  20671. "$ref": "#/components/schemas/AgentConfig"
  20672. },
  20673. "summary": {
  20674. "$ref": "#/components/schemas/AgentConfig"
  20675. },
  20676. "compaction": {
  20677. "$ref": "#/components/schemas/AgentConfig"
  20678. }
  20679. },
  20680. "additionalProperties": {
  20681. "$ref": "#/components/schemas/AgentConfig"
  20682. }
  20683. },
  20684. "provider": {
  20685. "type": "object",
  20686. "additionalProperties": {
  20687. "$ref": "#/components/schemas/ProviderConfig"
  20688. }
  20689. },
  20690. "mcp": {
  20691. "type": "object",
  20692. "additionalProperties": {
  20693. "anyOf": [
  20694. {
  20695. "$ref": "#/components/schemas/McpLocalConfig"
  20696. },
  20697. {
  20698. "$ref": "#/components/schemas/McpRemoteConfig"
  20699. },
  20700. {
  20701. "type": "object",
  20702. "properties": {
  20703. "enabled": {
  20704. "type": "boolean"
  20705. }
  20706. },
  20707. "required": ["enabled"],
  20708. "additionalProperties": false
  20709. }
  20710. ]
  20711. }
  20712. },
  20713. "formatter": {
  20714. "anyOf": [
  20715. {
  20716. "type": "boolean"
  20717. },
  20718. {
  20719. "type": "object",
  20720. "additionalProperties": {
  20721. "type": "object",
  20722. "properties": {
  20723. "disabled": {
  20724. "type": "boolean"
  20725. },
  20726. "command": {
  20727. "type": "array",
  20728. "items": {
  20729. "type": "string"
  20730. }
  20731. },
  20732. "environment": {
  20733. "type": "object",
  20734. "additionalProperties": {
  20735. "type": "string"
  20736. }
  20737. },
  20738. "extensions": {
  20739. "type": "array",
  20740. "items": {
  20741. "type": "string"
  20742. }
  20743. }
  20744. },
  20745. "additionalProperties": false
  20746. }
  20747. }
  20748. ],
  20749. "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."
  20750. },
  20751. "lsp": {
  20752. "anyOf": [
  20753. {
  20754. "type": "boolean"
  20755. },
  20756. {
  20757. "type": "object",
  20758. "additionalProperties": {
  20759. "anyOf": [
  20760. {
  20761. "type": "object",
  20762. "properties": {
  20763. "disabled": {
  20764. "type": "boolean",
  20765. "enum": [true]
  20766. }
  20767. },
  20768. "required": ["disabled"],
  20769. "additionalProperties": false
  20770. },
  20771. {
  20772. "type": "object",
  20773. "properties": {
  20774. "command": {
  20775. "type": "array",
  20776. "items": {
  20777. "type": "string"
  20778. }
  20779. },
  20780. "extensions": {
  20781. "type": "array",
  20782. "items": {
  20783. "type": "string"
  20784. }
  20785. },
  20786. "disabled": {
  20787. "type": "boolean"
  20788. },
  20789. "env": {
  20790. "type": "object",
  20791. "additionalProperties": {
  20792. "type": "string"
  20793. }
  20794. },
  20795. "initialization": {
  20796. "type": "object"
  20797. }
  20798. },
  20799. "required": ["command"],
  20800. "additionalProperties": false
  20801. }
  20802. ]
  20803. }
  20804. }
  20805. ],
  20806. "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."
  20807. },
  20808. "instructions": {
  20809. "type": "array",
  20810. "items": {
  20811. "type": "string"
  20812. }
  20813. },
  20814. "layout": {
  20815. "$ref": "#/components/schemas/LayoutConfig"
  20816. },
  20817. "permission": {
  20818. "$ref": "#/components/schemas/PermissionConfig"
  20819. },
  20820. "tools": {
  20821. "type": "object",
  20822. "additionalProperties": {
  20823. "type": "boolean"
  20824. }
  20825. },
  20826. "attachment": {
  20827. "$ref": "#/components/schemas/AttachmentConfig"
  20828. },
  20829. "enterprise": {
  20830. "type": "object",
  20831. "properties": {
  20832. "url": {
  20833. "type": "string"
  20834. }
  20835. },
  20836. "additionalProperties": false
  20837. },
  20838. "tool_output": {
  20839. "type": "object",
  20840. "properties": {
  20841. "max_lines": {
  20842. "type": "integer",
  20843. "exclusiveMinimum": 0
  20844. },
  20845. "max_bytes": {
  20846. "type": "integer",
  20847. "exclusiveMinimum": 0
  20848. }
  20849. },
  20850. "additionalProperties": false
  20851. },
  20852. "compaction": {
  20853. "type": "object",
  20854. "properties": {
  20855. "auto": {
  20856. "type": "boolean"
  20857. },
  20858. "prune": {
  20859. "type": "boolean"
  20860. },
  20861. "tail_turns": {
  20862. "type": "integer",
  20863. "minimum": 0
  20864. },
  20865. "preserve_recent_tokens": {
  20866. "type": "integer",
  20867. "minimum": 0
  20868. },
  20869. "reserved": {
  20870. "type": "integer",
  20871. "minimum": 0
  20872. }
  20873. },
  20874. "additionalProperties": false
  20875. },
  20876. "experimental": {
  20877. "type": "object",
  20878. "properties": {
  20879. "disable_paste_summary": {
  20880. "type": "boolean"
  20881. },
  20882. "batch_tool": {
  20883. "type": "boolean"
  20884. },
  20885. "openTelemetry": {
  20886. "type": "boolean"
  20887. },
  20888. "primary_tools": {
  20889. "type": "array",
  20890. "items": {
  20891. "type": "string"
  20892. }
  20893. },
  20894. "continue_loop_on_deny": {
  20895. "type": "boolean"
  20896. },
  20897. "mcp_timeout": {
  20898. "type": "integer",
  20899. "exclusiveMinimum": 0
  20900. },
  20901. "policies": {
  20902. "type": "array",
  20903. "items": {
  20904. "$ref": "#/components/schemas/ConfigV2ExperimentalPolicy"
  20905. }
  20906. }
  20907. },
  20908. "additionalProperties": false
  20909. }
  20910. },
  20911. "additionalProperties": false
  20912. },
  20913. "Model": {
  20914. "type": "object",
  20915. "properties": {
  20916. "id": {
  20917. "type": "string"
  20918. },
  20919. "providerID": {
  20920. "type": "string"
  20921. },
  20922. "api": {
  20923. "type": "object",
  20924. "properties": {
  20925. "id": {
  20926. "type": "string"
  20927. },
  20928. "url": {
  20929. "type": "string"
  20930. },
  20931. "npm": {
  20932. "type": "string"
  20933. }
  20934. },
  20935. "required": ["id", "url", "npm"],
  20936. "additionalProperties": false
  20937. },
  20938. "name": {
  20939. "type": "string"
  20940. },
  20941. "family": {
  20942. "type": "string"
  20943. },
  20944. "capabilities": {
  20945. "type": "object",
  20946. "properties": {
  20947. "temperature": {
  20948. "type": "boolean"
  20949. },
  20950. "reasoning": {
  20951. "type": "boolean"
  20952. },
  20953. "attachment": {
  20954. "type": "boolean"
  20955. },
  20956. "toolcall": {
  20957. "type": "boolean"
  20958. },
  20959. "input": {
  20960. "type": "object",
  20961. "properties": {
  20962. "text": {
  20963. "type": "boolean"
  20964. },
  20965. "audio": {
  20966. "type": "boolean"
  20967. },
  20968. "image": {
  20969. "type": "boolean"
  20970. },
  20971. "video": {
  20972. "type": "boolean"
  20973. },
  20974. "pdf": {
  20975. "type": "boolean"
  20976. }
  20977. },
  20978. "required": ["text", "audio", "image", "video", "pdf"],
  20979. "additionalProperties": false
  20980. },
  20981. "output": {
  20982. "type": "object",
  20983. "properties": {
  20984. "text": {
  20985. "type": "boolean"
  20986. },
  20987. "audio": {
  20988. "type": "boolean"
  20989. },
  20990. "image": {
  20991. "type": "boolean"
  20992. },
  20993. "video": {
  20994. "type": "boolean"
  20995. },
  20996. "pdf": {
  20997. "type": "boolean"
  20998. }
  20999. },
  21000. "required": ["text", "audio", "image", "video", "pdf"],
  21001. "additionalProperties": false
  21002. },
  21003. "interleaved": {
  21004. "anyOf": [
  21005. {
  21006. "type": "boolean"
  21007. },
  21008. {
  21009. "type": "object",
  21010. "properties": {
  21011. "field": {
  21012. "type": "string",
  21013. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  21014. }
  21015. },
  21016. "required": ["field"],
  21017. "additionalProperties": false
  21018. }
  21019. ]
  21020. }
  21021. },
  21022. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  21023. "additionalProperties": false
  21024. },
  21025. "cost": {
  21026. "type": "object",
  21027. "properties": {
  21028. "input": {
  21029. "type": "number"
  21030. },
  21031. "output": {
  21032. "type": "number"
  21033. },
  21034. "cache": {
  21035. "type": "object",
  21036. "properties": {
  21037. "read": {
  21038. "type": "number"
  21039. },
  21040. "write": {
  21041. "type": "number"
  21042. }
  21043. },
  21044. "required": ["read", "write"],
  21045. "additionalProperties": false
  21046. },
  21047. "tiers": {
  21048. "type": "array",
  21049. "items": {
  21050. "type": "object",
  21051. "properties": {
  21052. "input": {
  21053. "type": "number"
  21054. },
  21055. "output": {
  21056. "type": "number"
  21057. },
  21058. "cache": {
  21059. "type": "object",
  21060. "properties": {
  21061. "read": {
  21062. "type": "number"
  21063. },
  21064. "write": {
  21065. "type": "number"
  21066. }
  21067. },
  21068. "required": ["read", "write"],
  21069. "additionalProperties": false
  21070. },
  21071. "tier": {
  21072. "type": "object",
  21073. "properties": {
  21074. "type": {
  21075. "type": "string",
  21076. "enum": ["context"]
  21077. },
  21078. "size": {
  21079. "type": "number"
  21080. }
  21081. },
  21082. "required": ["type", "size"],
  21083. "additionalProperties": false
  21084. }
  21085. },
  21086. "required": ["input", "output", "cache", "tier"],
  21087. "additionalProperties": false
  21088. }
  21089. },
  21090. "experimentalOver200K": {
  21091. "type": "object",
  21092. "properties": {
  21093. "input": {
  21094. "type": "number"
  21095. },
  21096. "output": {
  21097. "type": "number"
  21098. },
  21099. "cache": {
  21100. "type": "object",
  21101. "properties": {
  21102. "read": {
  21103. "type": "number"
  21104. },
  21105. "write": {
  21106. "type": "number"
  21107. }
  21108. },
  21109. "required": ["read", "write"],
  21110. "additionalProperties": false
  21111. }
  21112. },
  21113. "required": ["input", "output", "cache"],
  21114. "additionalProperties": false
  21115. }
  21116. },
  21117. "required": ["input", "output", "cache"],
  21118. "additionalProperties": false
  21119. },
  21120. "limit": {
  21121. "type": "object",
  21122. "properties": {
  21123. "context": {
  21124. "type": "number"
  21125. },
  21126. "input": {
  21127. "type": "number"
  21128. },
  21129. "output": {
  21130. "type": "number"
  21131. }
  21132. },
  21133. "required": ["context", "output"],
  21134. "additionalProperties": false
  21135. },
  21136. "status": {
  21137. "type": "string",
  21138. "enum": ["alpha", "beta", "deprecated", "active"]
  21139. },
  21140. "options": {
  21141. "type": "object"
  21142. },
  21143. "headers": {
  21144. "type": "object",
  21145. "additionalProperties": {
  21146. "type": "string"
  21147. }
  21148. },
  21149. "release_date": {
  21150. "type": "string"
  21151. },
  21152. "variants": {
  21153. "type": "object",
  21154. "additionalProperties": {
  21155. "type": "object"
  21156. }
  21157. }
  21158. },
  21159. "required": [
  21160. "id",
  21161. "providerID",
  21162. "api",
  21163. "name",
  21164. "capabilities",
  21165. "cost",
  21166. "limit",
  21167. "status",
  21168. "options",
  21169. "headers",
  21170. "release_date"
  21171. ],
  21172. "additionalProperties": false
  21173. },
  21174. "Provider": {
  21175. "type": "object",
  21176. "properties": {
  21177. "id": {
  21178. "type": "string"
  21179. },
  21180. "name": {
  21181. "type": "string"
  21182. },
  21183. "source": {
  21184. "type": "string",
  21185. "enum": ["env", "config", "custom", "api"]
  21186. },
  21187. "env": {
  21188. "type": "array",
  21189. "items": {
  21190. "type": "string"
  21191. }
  21192. },
  21193. "key": {
  21194. "type": "string"
  21195. },
  21196. "options": {
  21197. "type": "object"
  21198. },
  21199. "models": {
  21200. "type": "object",
  21201. "additionalProperties": {
  21202. "$ref": "#/components/schemas/Model"
  21203. }
  21204. }
  21205. },
  21206. "required": ["id", "name", "source", "env", "options", "models"],
  21207. "additionalProperties": false
  21208. },
  21209. "ExperimentalCapabilities": {
  21210. "type": "object",
  21211. "properties": {
  21212. "backgroundSubagents": {
  21213. "type": "boolean"
  21214. }
  21215. },
  21216. "required": ["backgroundSubagents"],
  21217. "additionalProperties": false
  21218. },
  21219. "ConsoleState": {
  21220. "type": "object",
  21221. "properties": {
  21222. "consoleManagedProviders": {
  21223. "type": "array",
  21224. "items": {
  21225. "type": "string"
  21226. }
  21227. },
  21228. "activeOrgName": {
  21229. "type": "string"
  21230. },
  21231. "switchableOrgCount": {
  21232. "type": "integer",
  21233. "minimum": 0
  21234. }
  21235. },
  21236. "required": ["consoleManagedProviders", "switchableOrgCount"],
  21237. "additionalProperties": false
  21238. },
  21239. "effect_HttpApiError_InternalServerError": {
  21240. "type": "object",
  21241. "properties": {
  21242. "_tag": {
  21243. "type": "string",
  21244. "enum": ["InternalServerError"]
  21245. }
  21246. },
  21247. "required": ["_tag"],
  21248. "additionalProperties": false
  21249. },
  21250. "ToolListItem": {
  21251. "type": "object",
  21252. "properties": {
  21253. "id": {
  21254. "type": "string"
  21255. },
  21256. "description": {
  21257. "type": "string"
  21258. },
  21259. "parameters": {}
  21260. },
  21261. "required": ["id", "description", "parameters"],
  21262. "additionalProperties": false
  21263. },
  21264. "ToolList": {
  21265. "type": "array",
  21266. "items": {
  21267. "$ref": "#/components/schemas/ToolListItem"
  21268. }
  21269. },
  21270. "ToolIDs": {
  21271. "type": "array",
  21272. "items": {
  21273. "type": "string"
  21274. }
  21275. },
  21276. "WorktreeError": {
  21277. "type": "object",
  21278. "properties": {
  21279. "name": {
  21280. "type": "string",
  21281. "enum": [
  21282. "WorktreeNotGitError",
  21283. "WorktreeNameGenerationFailedError",
  21284. "WorktreeCreateFailedError",
  21285. "WorktreeStartCommandFailedError",
  21286. "WorktreeRemoveFailedError",
  21287. "WorktreeResetFailedError",
  21288. "WorktreeListFailedError"
  21289. ]
  21290. },
  21291. "data": {
  21292. "type": "object",
  21293. "properties": {
  21294. "message": {
  21295. "type": "string"
  21296. }
  21297. },
  21298. "required": ["message"],
  21299. "additionalProperties": false
  21300. }
  21301. },
  21302. "required": ["name", "data"],
  21303. "additionalProperties": false
  21304. },
  21305. "WorktreeCreateInput": {
  21306. "type": "object",
  21307. "properties": {
  21308. "name": {
  21309. "type": "string"
  21310. },
  21311. "startCommand": {
  21312. "type": "string",
  21313. "description": "Additional startup script to run after the project's start command"
  21314. }
  21315. },
  21316. "additionalProperties": false
  21317. },
  21318. "Worktree": {
  21319. "type": "object",
  21320. "properties": {
  21321. "name": {
  21322. "type": "string"
  21323. },
  21324. "branch": {
  21325. "type": "string"
  21326. },
  21327. "directory": {
  21328. "type": "string"
  21329. }
  21330. },
  21331. "required": ["name", "directory"],
  21332. "additionalProperties": false
  21333. },
  21334. "WorktreeRemoveInput": {
  21335. "type": "object",
  21336. "properties": {
  21337. "directory": {
  21338. "type": "string"
  21339. }
  21340. },
  21341. "required": ["directory"],
  21342. "additionalProperties": false
  21343. },
  21344. "WorktreeResetInput": {
  21345. "type": "object",
  21346. "properties": {
  21347. "directory": {
  21348. "type": "string"
  21349. }
  21350. },
  21351. "required": ["directory"],
  21352. "additionalProperties": false
  21353. },
  21354. "ProjectSummary": {
  21355. "type": "object",
  21356. "properties": {
  21357. "id": {
  21358. "type": "string"
  21359. },
  21360. "name": {
  21361. "type": "string"
  21362. },
  21363. "worktree": {
  21364. "type": "string"
  21365. }
  21366. },
  21367. "required": ["id", "worktree"],
  21368. "additionalProperties": false
  21369. },
  21370. "GlobalSession": {
  21371. "type": "object",
  21372. "properties": {
  21373. "id": {
  21374. "type": "string",
  21375. "pattern": "^ses"
  21376. },
  21377. "slug": {
  21378. "type": "string"
  21379. },
  21380. "projectID": {
  21381. "type": "string"
  21382. },
  21383. "workspaceID": {
  21384. "type": "string",
  21385. "pattern": "^wrk"
  21386. },
  21387. "directory": {
  21388. "type": "string"
  21389. },
  21390. "path": {
  21391. "type": "string"
  21392. },
  21393. "parentID": {
  21394. "type": "string",
  21395. "pattern": "^ses"
  21396. },
  21397. "summary": {
  21398. "type": "object",
  21399. "properties": {
  21400. "additions": {
  21401. "type": "number"
  21402. },
  21403. "deletions": {
  21404. "type": "number"
  21405. },
  21406. "files": {
  21407. "type": "number"
  21408. },
  21409. "diffs": {
  21410. "type": "array",
  21411. "items": {
  21412. "$ref": "#/components/schemas/SnapshotFileDiff"
  21413. }
  21414. }
  21415. },
  21416. "required": ["additions", "deletions", "files"],
  21417. "additionalProperties": false
  21418. },
  21419. "cost": {
  21420. "type": "number"
  21421. },
  21422. "tokens": {
  21423. "type": "object",
  21424. "properties": {
  21425. "input": {
  21426. "type": "number"
  21427. },
  21428. "output": {
  21429. "type": "number"
  21430. },
  21431. "reasoning": {
  21432. "type": "number"
  21433. },
  21434. "cache": {
  21435. "type": "object",
  21436. "properties": {
  21437. "read": {
  21438. "type": "number"
  21439. },
  21440. "write": {
  21441. "type": "number"
  21442. }
  21443. },
  21444. "required": ["read", "write"],
  21445. "additionalProperties": false
  21446. }
  21447. },
  21448. "required": ["input", "output", "reasoning", "cache"],
  21449. "additionalProperties": false
  21450. },
  21451. "share": {
  21452. "type": "object",
  21453. "properties": {
  21454. "url": {
  21455. "type": "string"
  21456. }
  21457. },
  21458. "required": ["url"],
  21459. "additionalProperties": false
  21460. },
  21461. "title": {
  21462. "type": "string"
  21463. },
  21464. "agent": {
  21465. "type": "string"
  21466. },
  21467. "model": {
  21468. "type": "object",
  21469. "properties": {
  21470. "id": {
  21471. "type": "string"
  21472. },
  21473. "providerID": {
  21474. "type": "string"
  21475. },
  21476. "variant": {
  21477. "type": "string"
  21478. }
  21479. },
  21480. "required": ["id", "providerID"],
  21481. "additionalProperties": false
  21482. },
  21483. "version": {
  21484. "type": "string"
  21485. },
  21486. "metadata": {
  21487. "type": "object"
  21488. },
  21489. "time": {
  21490. "type": "object",
  21491. "properties": {
  21492. "created": {
  21493. "type": "integer",
  21494. "minimum": 0
  21495. },
  21496. "updated": {
  21497. "type": "integer",
  21498. "minimum": 0
  21499. },
  21500. "compacting": {
  21501. "type": "integer",
  21502. "minimum": 0
  21503. },
  21504. "archived": {
  21505. "type": "number"
  21506. }
  21507. },
  21508. "required": ["created", "updated"],
  21509. "additionalProperties": false
  21510. },
  21511. "permission": {
  21512. "$ref": "#/components/schemas/PermissionRuleset"
  21513. },
  21514. "revert": {
  21515. "type": "object",
  21516. "properties": {
  21517. "messageID": {
  21518. "type": "string",
  21519. "pattern": "^msg"
  21520. },
  21521. "partID": {
  21522. "type": "string",
  21523. "pattern": "^prt"
  21524. },
  21525. "snapshot": {
  21526. "type": "string"
  21527. },
  21528. "diff": {
  21529. "type": "string"
  21530. }
  21531. },
  21532. "required": ["messageID"],
  21533. "additionalProperties": false
  21534. },
  21535. "project": {
  21536. "anyOf": [
  21537. {
  21538. "$ref": "#/components/schemas/ProjectSummary"
  21539. },
  21540. {
  21541. "type": "null"
  21542. }
  21543. ]
  21544. }
  21545. },
  21546. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  21547. "additionalProperties": false
  21548. },
  21549. "McpResource": {
  21550. "type": "object",
  21551. "properties": {
  21552. "name": {
  21553. "type": "string"
  21554. },
  21555. "uri": {
  21556. "type": "string"
  21557. },
  21558. "description": {
  21559. "type": "string"
  21560. },
  21561. "mimeType": {
  21562. "type": "string"
  21563. },
  21564. "client": {
  21565. "type": "string"
  21566. }
  21567. },
  21568. "required": ["name", "uri", "client"],
  21569. "additionalProperties": false
  21570. },
  21571. "Symbol": {
  21572. "type": "object",
  21573. "properties": {
  21574. "name": {
  21575. "type": "string"
  21576. },
  21577. "kind": {
  21578. "type": "integer",
  21579. "minimum": 0
  21580. },
  21581. "location": {
  21582. "type": "object",
  21583. "properties": {
  21584. "uri": {
  21585. "type": "string"
  21586. },
  21587. "range": {
  21588. "$ref": "#/components/schemas/Range"
  21589. }
  21590. },
  21591. "required": ["uri", "range"],
  21592. "additionalProperties": false
  21593. }
  21594. },
  21595. "required": ["name", "kind", "location"],
  21596. "additionalProperties": false
  21597. },
  21598. "FileNode": {
  21599. "type": "object",
  21600. "properties": {
  21601. "name": {
  21602. "type": "string"
  21603. },
  21604. "path": {
  21605. "type": "string"
  21606. },
  21607. "absolute": {
  21608. "type": "string"
  21609. },
  21610. "type": {
  21611. "type": "string",
  21612. "enum": ["file", "directory"]
  21613. },
  21614. "ignored": {
  21615. "type": "boolean"
  21616. }
  21617. },
  21618. "required": ["name", "path", "absolute", "type", "ignored"],
  21619. "additionalProperties": false
  21620. },
  21621. "FileContent": {
  21622. "type": "object",
  21623. "properties": {
  21624. "type": {
  21625. "type": "string",
  21626. "enum": ["text", "binary"]
  21627. },
  21628. "content": {
  21629. "type": "string"
  21630. },
  21631. "diff": {
  21632. "type": "string"
  21633. },
  21634. "patch": {
  21635. "type": "object",
  21636. "properties": {
  21637. "oldFileName": {
  21638. "type": "string"
  21639. },
  21640. "newFileName": {
  21641. "type": "string"
  21642. },
  21643. "oldHeader": {
  21644. "type": "string"
  21645. },
  21646. "newHeader": {
  21647. "type": "string"
  21648. },
  21649. "hunks": {
  21650. "type": "array",
  21651. "items": {
  21652. "type": "object",
  21653. "properties": {
  21654. "oldStart": {
  21655. "type": "integer",
  21656. "minimum": 0
  21657. },
  21658. "oldLines": {
  21659. "type": "integer",
  21660. "minimum": 0
  21661. },
  21662. "newStart": {
  21663. "type": "integer",
  21664. "minimum": 0
  21665. },
  21666. "newLines": {
  21667. "type": "integer",
  21668. "minimum": 0
  21669. },
  21670. "lines": {
  21671. "type": "array",
  21672. "items": {
  21673. "type": "string"
  21674. }
  21675. }
  21676. },
  21677. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  21678. "additionalProperties": false
  21679. }
  21680. },
  21681. "index": {
  21682. "type": "string"
  21683. }
  21684. },
  21685. "required": ["oldFileName", "newFileName", "hunks"],
  21686. "additionalProperties": false
  21687. },
  21688. "encoding": {
  21689. "type": "string",
  21690. "enum": ["base64"]
  21691. },
  21692. "mimeType": {
  21693. "type": "string"
  21694. }
  21695. },
  21696. "required": ["type", "content"],
  21697. "additionalProperties": false
  21698. },
  21699. "File": {
  21700. "type": "object",
  21701. "properties": {
  21702. "path": {
  21703. "type": "string"
  21704. },
  21705. "added": {
  21706. "type": "integer",
  21707. "minimum": 0
  21708. },
  21709. "removed": {
  21710. "type": "integer",
  21711. "minimum": 0
  21712. },
  21713. "status": {
  21714. "type": "string",
  21715. "enum": ["added", "deleted", "modified"]
  21716. }
  21717. },
  21718. "required": ["path", "added", "removed", "status"],
  21719. "additionalProperties": false
  21720. },
  21721. "Path": {
  21722. "type": "object",
  21723. "properties": {
  21724. "home": {
  21725. "type": "string"
  21726. },
  21727. "state": {
  21728. "type": "string"
  21729. },
  21730. "config": {
  21731. "type": "string"
  21732. },
  21733. "worktree": {
  21734. "type": "string"
  21735. },
  21736. "directory": {
  21737. "type": "string"
  21738. }
  21739. },
  21740. "required": ["home", "state", "config", "worktree", "directory"],
  21741. "additionalProperties": false
  21742. },
  21743. "VcsInfo": {
  21744. "type": "object",
  21745. "properties": {
  21746. "branch": {
  21747. "type": "string"
  21748. },
  21749. "default_branch": {
  21750. "type": "string"
  21751. }
  21752. },
  21753. "additionalProperties": false
  21754. },
  21755. "VcsFileStatus": {
  21756. "type": "object",
  21757. "properties": {
  21758. "file": {
  21759. "type": "string"
  21760. },
  21761. "additions": {
  21762. "type": "number"
  21763. },
  21764. "deletions": {
  21765. "type": "number"
  21766. },
  21767. "status": {
  21768. "type": "string",
  21769. "enum": ["added", "deleted", "modified"]
  21770. }
  21771. },
  21772. "required": ["file", "additions", "deletions", "status"],
  21773. "additionalProperties": false
  21774. },
  21775. "VcsFileDiff": {
  21776. "type": "object",
  21777. "properties": {
  21778. "file": {
  21779. "type": "string"
  21780. },
  21781. "patch": {
  21782. "type": "string"
  21783. },
  21784. "additions": {
  21785. "type": "number"
  21786. },
  21787. "deletions": {
  21788. "type": "number"
  21789. },
  21790. "status": {
  21791. "type": "string",
  21792. "enum": ["added", "deleted", "modified"]
  21793. }
  21794. },
  21795. "required": ["file", "additions", "deletions"],
  21796. "additionalProperties": false
  21797. },
  21798. "VcsApplyError": {
  21799. "type": "object",
  21800. "properties": {
  21801. "name": {
  21802. "type": "string",
  21803. "enum": ["VcsApplyError"]
  21804. },
  21805. "data": {
  21806. "type": "object",
  21807. "properties": {
  21808. "message": {
  21809. "type": "string"
  21810. },
  21811. "reason": {
  21812. "type": "string",
  21813. "enum": ["non-git", "not-clean"]
  21814. }
  21815. },
  21816. "required": ["message", "reason"],
  21817. "additionalProperties": false
  21818. }
  21819. },
  21820. "required": ["name", "data"],
  21821. "additionalProperties": false
  21822. },
  21823. "Command": {
  21824. "type": "object",
  21825. "properties": {
  21826. "name": {
  21827. "type": "string"
  21828. },
  21829. "description": {
  21830. "type": "string"
  21831. },
  21832. "agent": {
  21833. "type": "string"
  21834. },
  21835. "model": {
  21836. "type": "string"
  21837. },
  21838. "source": {
  21839. "type": "string",
  21840. "enum": ["command", "mcp", "skill"]
  21841. },
  21842. "template": {
  21843. "type": "string"
  21844. },
  21845. "subtask": {
  21846. "type": "boolean"
  21847. },
  21848. "hints": {
  21849. "type": "array",
  21850. "items": {
  21851. "type": "string"
  21852. }
  21853. }
  21854. },
  21855. "required": ["name", "template", "hints"],
  21856. "additionalProperties": false
  21857. },
  21858. "Agent": {
  21859. "type": "object",
  21860. "properties": {
  21861. "name": {
  21862. "type": "string"
  21863. },
  21864. "description": {
  21865. "type": "string"
  21866. },
  21867. "mode": {
  21868. "type": "string",
  21869. "enum": ["subagent", "primary", "all"]
  21870. },
  21871. "native": {
  21872. "type": "boolean"
  21873. },
  21874. "hidden": {
  21875. "type": "boolean"
  21876. },
  21877. "topP": {
  21878. "type": "number"
  21879. },
  21880. "temperature": {
  21881. "type": "number"
  21882. },
  21883. "color": {
  21884. "type": "string"
  21885. },
  21886. "permission": {
  21887. "$ref": "#/components/schemas/PermissionRuleset"
  21888. },
  21889. "model": {
  21890. "type": "object",
  21891. "properties": {
  21892. "modelID": {
  21893. "type": "string"
  21894. },
  21895. "providerID": {
  21896. "type": "string"
  21897. }
  21898. },
  21899. "required": ["modelID", "providerID"],
  21900. "additionalProperties": false
  21901. },
  21902. "variant": {
  21903. "type": "string"
  21904. },
  21905. "prompt": {
  21906. "type": "string"
  21907. },
  21908. "options": {
  21909. "type": "object"
  21910. },
  21911. "steps": {
  21912. "type": "number"
  21913. }
  21914. },
  21915. "required": ["name", "mode", "permission", "options"],
  21916. "additionalProperties": false
  21917. },
  21918. "LSPStatus": {
  21919. "type": "object",
  21920. "properties": {
  21921. "id": {
  21922. "type": "string"
  21923. },
  21924. "name": {
  21925. "type": "string"
  21926. },
  21927. "root": {
  21928. "type": "string"
  21929. },
  21930. "status": {
  21931. "type": "string",
  21932. "enum": ["connected", "error"]
  21933. }
  21934. },
  21935. "required": ["id", "name", "root", "status"],
  21936. "additionalProperties": false
  21937. },
  21938. "FormatterStatus": {
  21939. "type": "object",
  21940. "properties": {
  21941. "name": {
  21942. "type": "string"
  21943. },
  21944. "extensions": {
  21945. "type": "array",
  21946. "items": {
  21947. "type": "string"
  21948. }
  21949. },
  21950. "enabled": {
  21951. "type": "boolean"
  21952. }
  21953. },
  21954. "required": ["name", "extensions", "enabled"],
  21955. "additionalProperties": false
  21956. },
  21957. "MCPStatusConnected": {
  21958. "type": "object",
  21959. "properties": {
  21960. "status": {
  21961. "type": "string",
  21962. "enum": ["connected"]
  21963. }
  21964. },
  21965. "required": ["status"],
  21966. "additionalProperties": false
  21967. },
  21968. "MCPStatusDisabled": {
  21969. "type": "object",
  21970. "properties": {
  21971. "status": {
  21972. "type": "string",
  21973. "enum": ["disabled"]
  21974. }
  21975. },
  21976. "required": ["status"],
  21977. "additionalProperties": false
  21978. },
  21979. "MCPStatusFailed": {
  21980. "type": "object",
  21981. "properties": {
  21982. "status": {
  21983. "type": "string",
  21984. "enum": ["failed"]
  21985. },
  21986. "error": {
  21987. "type": "string"
  21988. }
  21989. },
  21990. "required": ["status", "error"],
  21991. "additionalProperties": false
  21992. },
  21993. "MCPStatusNeedsAuth": {
  21994. "type": "object",
  21995. "properties": {
  21996. "status": {
  21997. "type": "string",
  21998. "enum": ["needs_auth"]
  21999. }
  22000. },
  22001. "required": ["status"],
  22002. "additionalProperties": false
  22003. },
  22004. "MCPStatusNeedsClientRegistration": {
  22005. "type": "object",
  22006. "properties": {
  22007. "status": {
  22008. "type": "string",
  22009. "enum": ["needs_client_registration"]
  22010. },
  22011. "error": {
  22012. "type": "string"
  22013. }
  22014. },
  22015. "required": ["status", "error"],
  22016. "additionalProperties": false
  22017. },
  22018. "MCPStatus": {
  22019. "anyOf": [
  22020. {
  22021. "$ref": "#/components/schemas/MCPStatusConnected"
  22022. },
  22023. {
  22024. "$ref": "#/components/schemas/MCPStatusDisabled"
  22025. },
  22026. {
  22027. "$ref": "#/components/schemas/MCPStatusFailed"
  22028. },
  22029. {
  22030. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  22031. },
  22032. {
  22033. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  22034. }
  22035. ]
  22036. },
  22037. "McpUnsupportedOAuthError": {
  22038. "type": "object",
  22039. "properties": {
  22040. "error": {
  22041. "type": "string"
  22042. }
  22043. },
  22044. "required": ["error"],
  22045. "additionalProperties": false
  22046. },
  22047. "McpServerNotFoundError": {
  22048. "type": "object",
  22049. "properties": {
  22050. "_tag": {
  22051. "type": "string",
  22052. "enum": ["McpServerNotFoundError"]
  22053. },
  22054. "name": {
  22055. "type": "string"
  22056. },
  22057. "message": {
  22058. "type": "string"
  22059. }
  22060. },
  22061. "required": ["_tag", "name", "message"],
  22062. "additionalProperties": false
  22063. },
  22064. "Project": {
  22065. "type": "object",
  22066. "properties": {
  22067. "id": {
  22068. "type": "string"
  22069. },
  22070. "worktree": {
  22071. "type": "string"
  22072. },
  22073. "vcs": {
  22074. "type": "string",
  22075. "enum": ["git"]
  22076. },
  22077. "name": {
  22078. "type": "string"
  22079. },
  22080. "icon": {
  22081. "type": "object",
  22082. "properties": {
  22083. "url": {
  22084. "type": "string"
  22085. },
  22086. "override": {
  22087. "type": "string"
  22088. },
  22089. "color": {
  22090. "type": "string"
  22091. }
  22092. },
  22093. "additionalProperties": false
  22094. },
  22095. "commands": {
  22096. "type": "object",
  22097. "properties": {
  22098. "start": {
  22099. "type": "string",
  22100. "description": "Startup script to run when creating a new workspace (worktree)"
  22101. }
  22102. },
  22103. "additionalProperties": false
  22104. },
  22105. "time": {
  22106. "type": "object",
  22107. "properties": {
  22108. "created": {
  22109. "type": "integer",
  22110. "minimum": 0
  22111. },
  22112. "updated": {
  22113. "type": "integer",
  22114. "minimum": 0
  22115. },
  22116. "initialized": {
  22117. "type": "integer",
  22118. "minimum": 0
  22119. }
  22120. },
  22121. "required": ["created", "updated"],
  22122. "additionalProperties": false
  22123. },
  22124. "sandboxes": {
  22125. "type": "array",
  22126. "items": {
  22127. "type": "string"
  22128. }
  22129. }
  22130. },
  22131. "required": ["id", "worktree", "time", "sandboxes"],
  22132. "additionalProperties": false
  22133. },
  22134. "ProjectNotFoundError": {
  22135. "type": "object",
  22136. "properties": {
  22137. "_tag": {
  22138. "type": "string",
  22139. "enum": ["ProjectNotFoundError"]
  22140. },
  22141. "projectID": {
  22142. "type": "string"
  22143. },
  22144. "message": {
  22145. "type": "string"
  22146. }
  22147. },
  22148. "required": ["_tag", "projectID", "message"],
  22149. "additionalProperties": false
  22150. },
  22151. "PtyNotFoundError": {
  22152. "type": "object",
  22153. "properties": {
  22154. "_tag": {
  22155. "type": "string",
  22156. "enum": ["PtyNotFoundError"]
  22157. },
  22158. "ptyID": {
  22159. "type": "string"
  22160. },
  22161. "message": {
  22162. "type": "string"
  22163. }
  22164. },
  22165. "required": ["_tag", "ptyID", "message"],
  22166. "additionalProperties": false
  22167. },
  22168. "PtyForbiddenError": {
  22169. "type": "object",
  22170. "properties": {
  22171. "_tag": {
  22172. "type": "string",
  22173. "enum": ["PtyForbiddenError"]
  22174. },
  22175. "message": {
  22176. "type": "string"
  22177. }
  22178. },
  22179. "required": ["_tag", "message"],
  22180. "additionalProperties": false
  22181. },
  22182. "QuestionRequest": {
  22183. "type": "object",
  22184. "properties": {
  22185. "id": {
  22186. "type": "string",
  22187. "pattern": "^que"
  22188. },
  22189. "sessionID": {
  22190. "type": "string",
  22191. "pattern": "^ses"
  22192. },
  22193. "questions": {
  22194. "type": "array",
  22195. "items": {
  22196. "$ref": "#/components/schemas/QuestionInfo"
  22197. },
  22198. "description": "Questions to ask"
  22199. },
  22200. "tool": {
  22201. "$ref": "#/components/schemas/QuestionTool"
  22202. }
  22203. },
  22204. "required": ["id", "sessionID", "questions"],
  22205. "additionalProperties": false
  22206. },
  22207. "QuestionNotFoundError": {
  22208. "type": "object",
  22209. "properties": {
  22210. "_tag": {
  22211. "type": "string",
  22212. "enum": ["QuestionNotFoundError"]
  22213. },
  22214. "requestID": {
  22215. "type": "string"
  22216. },
  22217. "message": {
  22218. "type": "string"
  22219. }
  22220. },
  22221. "required": ["_tag", "requestID", "message"],
  22222. "additionalProperties": false
  22223. },
  22224. "PermissionRequest": {
  22225. "type": "object",
  22226. "properties": {
  22227. "id": {
  22228. "type": "string",
  22229. "pattern": "^per"
  22230. },
  22231. "sessionID": {
  22232. "type": "string",
  22233. "pattern": "^ses"
  22234. },
  22235. "permission": {
  22236. "type": "string"
  22237. },
  22238. "patterns": {
  22239. "type": "array",
  22240. "items": {
  22241. "type": "string"
  22242. }
  22243. },
  22244. "metadata": {
  22245. "type": "object"
  22246. },
  22247. "always": {
  22248. "type": "array",
  22249. "items": {
  22250. "type": "string"
  22251. }
  22252. },
  22253. "tool": {
  22254. "type": "object",
  22255. "properties": {
  22256. "messageID": {
  22257. "type": "string"
  22258. },
  22259. "callID": {
  22260. "type": "string"
  22261. }
  22262. },
  22263. "required": ["messageID", "callID"],
  22264. "additionalProperties": false
  22265. }
  22266. },
  22267. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  22268. "additionalProperties": false
  22269. },
  22270. "PermissionNotFoundError": {
  22271. "type": "object",
  22272. "properties": {
  22273. "_tag": {
  22274. "type": "string",
  22275. "enum": ["PermissionNotFoundError"]
  22276. },
  22277. "requestID": {
  22278. "type": "string"
  22279. },
  22280. "message": {
  22281. "type": "string"
  22282. }
  22283. },
  22284. "required": ["_tag", "requestID", "message"],
  22285. "additionalProperties": false
  22286. },
  22287. "ProviderAuthMethod": {
  22288. "type": "object",
  22289. "properties": {
  22290. "type": {
  22291. "type": "string",
  22292. "enum": ["oauth", "api"]
  22293. },
  22294. "label": {
  22295. "type": "string"
  22296. },
  22297. "prompts": {
  22298. "type": "array",
  22299. "items": {
  22300. "anyOf": [
  22301. {
  22302. "type": "object",
  22303. "properties": {
  22304. "type": {
  22305. "type": "string",
  22306. "enum": ["text"]
  22307. },
  22308. "key": {
  22309. "type": "string"
  22310. },
  22311. "message": {
  22312. "type": "string"
  22313. },
  22314. "placeholder": {
  22315. "type": "string"
  22316. },
  22317. "when": {
  22318. "type": "object",
  22319. "properties": {
  22320. "key": {
  22321. "type": "string"
  22322. },
  22323. "op": {
  22324. "type": "string",
  22325. "enum": ["eq", "neq"]
  22326. },
  22327. "value": {
  22328. "type": "string"
  22329. }
  22330. },
  22331. "required": ["key", "op", "value"],
  22332. "additionalProperties": false
  22333. }
  22334. },
  22335. "required": ["type", "key", "message"],
  22336. "additionalProperties": false
  22337. },
  22338. {
  22339. "type": "object",
  22340. "properties": {
  22341. "type": {
  22342. "type": "string",
  22343. "enum": ["select"]
  22344. },
  22345. "key": {
  22346. "type": "string"
  22347. },
  22348. "message": {
  22349. "type": "string"
  22350. },
  22351. "options": {
  22352. "type": "array",
  22353. "items": {
  22354. "type": "object",
  22355. "properties": {
  22356. "label": {
  22357. "type": "string"
  22358. },
  22359. "value": {
  22360. "type": "string"
  22361. },
  22362. "hint": {
  22363. "type": "string"
  22364. }
  22365. },
  22366. "required": ["label", "value"],
  22367. "additionalProperties": false
  22368. }
  22369. },
  22370. "when": {
  22371. "type": "object",
  22372. "properties": {
  22373. "key": {
  22374. "type": "string"
  22375. },
  22376. "op": {
  22377. "type": "string",
  22378. "enum": ["eq", "neq"]
  22379. },
  22380. "value": {
  22381. "type": "string"
  22382. }
  22383. },
  22384. "required": ["key", "op", "value"],
  22385. "additionalProperties": false
  22386. }
  22387. },
  22388. "required": ["type", "key", "message", "options"],
  22389. "additionalProperties": false
  22390. }
  22391. ]
  22392. }
  22393. }
  22394. },
  22395. "required": ["type", "label"],
  22396. "additionalProperties": false
  22397. },
  22398. "ProviderAuthAuthorization": {
  22399. "type": "object",
  22400. "properties": {
  22401. "url": {
  22402. "type": "string"
  22403. },
  22404. "method": {
  22405. "type": "string",
  22406. "enum": ["auto", "code"]
  22407. },
  22408. "instructions": {
  22409. "type": "string"
  22410. }
  22411. },
  22412. "required": ["url", "method", "instructions"],
  22413. "additionalProperties": false
  22414. },
  22415. "ProviderAuthError1": {
  22416. "type": "object",
  22417. "properties": {
  22418. "name": {
  22419. "type": "string",
  22420. "enum": [
  22421. "BadRequest",
  22422. "ProviderAuthOauthMissing",
  22423. "ProviderAuthOauthCodeMissing",
  22424. "ProviderAuthOauthCallbackFailed",
  22425. "ProviderAuthValidationFailed"
  22426. ]
  22427. },
  22428. "data": {
  22429. "type": "object",
  22430. "properties": {
  22431. "providerID": {
  22432. "type": "string"
  22433. },
  22434. "field": {
  22435. "type": "string"
  22436. },
  22437. "message": {
  22438. "type": "string"
  22439. },
  22440. "kind": {
  22441. "type": "string"
  22442. }
  22443. },
  22444. "additionalProperties": false
  22445. }
  22446. },
  22447. "required": ["name", "data"],
  22448. "additionalProperties": false
  22449. },
  22450. "NotFoundError": {
  22451. "type": "object",
  22452. "required": ["name", "data"],
  22453. "properties": {
  22454. "name": {
  22455. "type": "string",
  22456. "enum": ["NotFoundError"]
  22457. },
  22458. "data": {
  22459. "type": "object",
  22460. "required": ["message"],
  22461. "properties": {
  22462. "message": {
  22463. "type": "string"
  22464. }
  22465. }
  22466. }
  22467. }
  22468. },
  22469. "TextPartInput": {
  22470. "type": "object",
  22471. "properties": {
  22472. "id": {
  22473. "type": "string",
  22474. "pattern": "^prt"
  22475. },
  22476. "type": {
  22477. "type": "string",
  22478. "enum": ["text"]
  22479. },
  22480. "text": {
  22481. "type": "string"
  22482. },
  22483. "synthetic": {
  22484. "type": "boolean"
  22485. },
  22486. "ignored": {
  22487. "type": "boolean"
  22488. },
  22489. "time": {
  22490. "type": "object",
  22491. "properties": {
  22492. "start": {
  22493. "type": "integer",
  22494. "minimum": 0
  22495. },
  22496. "end": {
  22497. "type": "integer",
  22498. "minimum": 0
  22499. }
  22500. },
  22501. "required": ["start"],
  22502. "additionalProperties": false
  22503. },
  22504. "metadata": {
  22505. "type": "object"
  22506. }
  22507. },
  22508. "required": ["type", "text"],
  22509. "additionalProperties": false
  22510. },
  22511. "FilePartInput": {
  22512. "type": "object",
  22513. "properties": {
  22514. "id": {
  22515. "type": "string",
  22516. "pattern": "^prt"
  22517. },
  22518. "type": {
  22519. "type": "string",
  22520. "enum": ["file"]
  22521. },
  22522. "mime": {
  22523. "type": "string"
  22524. },
  22525. "filename": {
  22526. "type": "string"
  22527. },
  22528. "url": {
  22529. "type": "string"
  22530. },
  22531. "source": {
  22532. "$ref": "#/components/schemas/FilePartSource"
  22533. }
  22534. },
  22535. "required": ["type", "mime", "url"],
  22536. "additionalProperties": false
  22537. },
  22538. "AgentPartInput": {
  22539. "type": "object",
  22540. "properties": {
  22541. "id": {
  22542. "type": "string",
  22543. "pattern": "^prt"
  22544. },
  22545. "type": {
  22546. "type": "string",
  22547. "enum": ["agent"]
  22548. },
  22549. "name": {
  22550. "type": "string"
  22551. },
  22552. "source": {
  22553. "type": "object",
  22554. "properties": {
  22555. "value": {
  22556. "type": "string"
  22557. },
  22558. "start": {
  22559. "type": "integer",
  22560. "minimum": 0
  22561. },
  22562. "end": {
  22563. "type": "integer",
  22564. "minimum": 0
  22565. }
  22566. },
  22567. "required": ["value", "start", "end"],
  22568. "additionalProperties": false
  22569. }
  22570. },
  22571. "required": ["type", "name"],
  22572. "additionalProperties": false
  22573. },
  22574. "SubtaskPartInput": {
  22575. "type": "object",
  22576. "properties": {
  22577. "id": {
  22578. "type": "string",
  22579. "pattern": "^prt"
  22580. },
  22581. "type": {
  22582. "type": "string",
  22583. "enum": ["subtask"]
  22584. },
  22585. "prompt": {
  22586. "type": "string"
  22587. },
  22588. "description": {
  22589. "type": "string"
  22590. },
  22591. "agent": {
  22592. "type": "string"
  22593. },
  22594. "model": {
  22595. "type": "object",
  22596. "properties": {
  22597. "providerID": {
  22598. "type": "string"
  22599. },
  22600. "modelID": {
  22601. "type": "string"
  22602. }
  22603. },
  22604. "required": ["providerID", "modelID"],
  22605. "additionalProperties": false
  22606. },
  22607. "command": {
  22608. "type": "string"
  22609. }
  22610. },
  22611. "required": ["type", "prompt", "description", "agent"],
  22612. "additionalProperties": false
  22613. },
  22614. "SessionBusyError": {
  22615. "type": "object",
  22616. "properties": {
  22617. "_tag": {
  22618. "type": "string",
  22619. "enum": ["SessionBusyError"]
  22620. },
  22621. "sessionID": {
  22622. "type": "string"
  22623. },
  22624. "message": {
  22625. "type": "string"
  22626. }
  22627. },
  22628. "required": ["_tag", "sessionID", "message"],
  22629. "additionalProperties": false
  22630. },
  22631. "EventTuiPromptAppend": {
  22632. "type": "object",
  22633. "properties": {
  22634. "type": {
  22635. "type": "string",
  22636. "enum": ["tui.prompt.append"]
  22637. },
  22638. "properties": {
  22639. "type": "object",
  22640. "properties": {
  22641. "text": {
  22642. "type": "string"
  22643. }
  22644. },
  22645. "required": ["text"],
  22646. "additionalProperties": false
  22647. }
  22648. },
  22649. "required": ["type", "properties"],
  22650. "additionalProperties": false
  22651. },
  22652. "EventTuiCommandExecute": {
  22653. "type": "object",
  22654. "properties": {
  22655. "type": {
  22656. "type": "string",
  22657. "enum": ["tui.command.execute"]
  22658. },
  22659. "properties": {
  22660. "type": "object",
  22661. "properties": {
  22662. "command": {
  22663. "anyOf": [
  22664. {
  22665. "type": "string",
  22666. "enum": [
  22667. "session.list",
  22668. "session.new",
  22669. "session.share",
  22670. "session.interrupt",
  22671. "session.compact",
  22672. "session.page.up",
  22673. "session.page.down",
  22674. "session.line.up",
  22675. "session.line.down",
  22676. "session.half.page.up",
  22677. "session.half.page.down",
  22678. "session.first",
  22679. "session.last",
  22680. "prompt.clear",
  22681. "prompt.submit",
  22682. "agent.cycle"
  22683. ]
  22684. },
  22685. {
  22686. "type": "string"
  22687. }
  22688. ]
  22689. }
  22690. },
  22691. "required": ["command"],
  22692. "additionalProperties": false
  22693. }
  22694. },
  22695. "required": ["type", "properties"],
  22696. "additionalProperties": false
  22697. },
  22698. "EventTuiToastShow": {
  22699. "type": "object",
  22700. "properties": {
  22701. "type": {
  22702. "type": "string",
  22703. "enum": ["tui.toast.show"]
  22704. },
  22705. "properties": {
  22706. "type": "object",
  22707. "properties": {
  22708. "title": {
  22709. "type": "string"
  22710. },
  22711. "message": {
  22712. "type": "string"
  22713. },
  22714. "variant": {
  22715. "type": "string",
  22716. "enum": ["info", "success", "warning", "error"]
  22717. },
  22718. "duration": {
  22719. "type": "integer",
  22720. "exclusiveMinimum": 0
  22721. }
  22722. },
  22723. "required": ["message", "variant"],
  22724. "additionalProperties": false
  22725. }
  22726. },
  22727. "required": ["type", "properties"],
  22728. "additionalProperties": false
  22729. },
  22730. "EventTuiSessionSelect": {
  22731. "type": "object",
  22732. "properties": {
  22733. "type": {
  22734. "type": "string",
  22735. "enum": ["tui.session.select"]
  22736. },
  22737. "properties": {
  22738. "type": "object",
  22739. "properties": {
  22740. "sessionID": {
  22741. "type": "string",
  22742. "pattern": "^ses",
  22743. "description": "Session ID to navigate to"
  22744. }
  22745. },
  22746. "required": ["sessionID"],
  22747. "additionalProperties": false
  22748. }
  22749. },
  22750. "required": ["type", "properties"],
  22751. "additionalProperties": false
  22752. },
  22753. "Workspace": {
  22754. "type": "object",
  22755. "properties": {
  22756. "id": {
  22757. "type": "string",
  22758. "pattern": "^wrk"
  22759. },
  22760. "type": {
  22761. "type": "string"
  22762. },
  22763. "name": {
  22764. "type": "string"
  22765. },
  22766. "branch": {
  22767. "anyOf": [
  22768. {
  22769. "type": "string"
  22770. },
  22771. {
  22772. "type": "null"
  22773. }
  22774. ]
  22775. },
  22776. "directory": {
  22777. "anyOf": [
  22778. {
  22779. "type": "string"
  22780. },
  22781. {
  22782. "type": "null"
  22783. }
  22784. ]
  22785. },
  22786. "extra": {
  22787. "anyOf": [
  22788. {},
  22789. {
  22790. "type": "null"
  22791. }
  22792. ]
  22793. },
  22794. "projectID": {
  22795. "type": "string"
  22796. },
  22797. "timeUsed": {
  22798. "anyOf": [
  22799. {
  22800. "type": "number"
  22801. },
  22802. {
  22803. "type": "string",
  22804. "enum": ["NaN"]
  22805. },
  22806. {
  22807. "type": "string",
  22808. "enum": ["Infinity"]
  22809. },
  22810. {
  22811. "type": "string",
  22812. "enum": ["-Infinity"]
  22813. },
  22814. {
  22815. "type": "string",
  22816. "enum": ["Infinity", "-Infinity", "NaN"]
  22817. }
  22818. ]
  22819. }
  22820. },
  22821. "required": ["id", "type", "name", "projectID", "timeUsed"],
  22822. "additionalProperties": false
  22823. },
  22824. "WorkspaceCreateError": {
  22825. "type": "object",
  22826. "properties": {
  22827. "name": {
  22828. "type": "string",
  22829. "enum": ["WorkspaceCreateError"]
  22830. },
  22831. "data": {
  22832. "type": "object",
  22833. "properties": {
  22834. "message": {
  22835. "type": "string"
  22836. }
  22837. },
  22838. "required": ["message"],
  22839. "additionalProperties": false
  22840. }
  22841. },
  22842. "required": ["name", "data"],
  22843. "additionalProperties": false
  22844. },
  22845. "WorkspaceWarpError": {
  22846. "type": "object",
  22847. "properties": {
  22848. "name": {
  22849. "type": "string",
  22850. "enum": ["WorkspaceWarpError"]
  22851. },
  22852. "data": {
  22853. "type": "object",
  22854. "properties": {
  22855. "message": {
  22856. "type": "string"
  22857. }
  22858. },
  22859. "required": ["message"],
  22860. "additionalProperties": false
  22861. }
  22862. },
  22863. "required": ["name", "data"],
  22864. "additionalProperties": false
  22865. },
  22866. "UnauthorizedError": {
  22867. "type": "object",
  22868. "properties": {
  22869. "_tag": {
  22870. "type": "string",
  22871. "enum": ["UnauthorizedError"]
  22872. },
  22873. "message": {
  22874. "type": "string"
  22875. }
  22876. },
  22877. "required": ["_tag", "message"],
  22878. "additionalProperties": false
  22879. },
  22880. "SessionsResponse": {
  22881. "type": "object",
  22882. "properties": {
  22883. "data": {
  22884. "type": "array",
  22885. "items": {
  22886. "$ref": "#/components/schemas/SessionV2Info"
  22887. }
  22888. },
  22889. "cursor": {
  22890. "type": "object",
  22891. "properties": {
  22892. "previous": {
  22893. "type": "string"
  22894. },
  22895. "next": {
  22896. "type": "string"
  22897. }
  22898. },
  22899. "additionalProperties": false
  22900. }
  22901. },
  22902. "required": ["data", "cursor"],
  22903. "additionalProperties": false
  22904. },
  22905. "InvalidCursorError": {
  22906. "type": "object",
  22907. "properties": {
  22908. "_tag": {
  22909. "type": "string",
  22910. "enum": ["InvalidCursorError"]
  22911. },
  22912. "message": {
  22913. "type": "string"
  22914. }
  22915. },
  22916. "required": ["_tag", "message"],
  22917. "additionalProperties": false
  22918. },
  22919. "SessionNotFoundError": {
  22920. "type": "object",
  22921. "properties": {
  22922. "_tag": {
  22923. "type": "string",
  22924. "enum": ["SessionNotFoundError"]
  22925. },
  22926. "sessionID": {
  22927. "type": "string"
  22928. },
  22929. "message": {
  22930. "type": "string"
  22931. }
  22932. },
  22933. "required": ["_tag", "sessionID", "message"],
  22934. "additionalProperties": false
  22935. },
  22936. "ConflictError": {
  22937. "type": "object",
  22938. "properties": {
  22939. "_tag": {
  22940. "type": "string",
  22941. "enum": ["ConflictError"]
  22942. },
  22943. "message": {
  22944. "type": "string"
  22945. },
  22946. "resource": {
  22947. "type": "string"
  22948. }
  22949. },
  22950. "required": ["_tag", "message"],
  22951. "additionalProperties": false
  22952. },
  22953. "ServiceUnavailableError": {
  22954. "type": "object",
  22955. "properties": {
  22956. "_tag": {
  22957. "type": "string",
  22958. "enum": ["ServiceUnavailableError"]
  22959. },
  22960. "message": {
  22961. "type": "string"
  22962. },
  22963. "service": {
  22964. "type": "string"
  22965. }
  22966. },
  22967. "required": ["_tag", "message"],
  22968. "additionalProperties": false
  22969. },
  22970. "UnknownError1": {
  22971. "type": "object",
  22972. "properties": {
  22973. "_tag": {
  22974. "type": "string",
  22975. "enum": ["UnknownError"]
  22976. },
  22977. "message": {
  22978. "type": "string"
  22979. },
  22980. "ref": {
  22981. "type": "string"
  22982. }
  22983. },
  22984. "required": ["_tag", "message"],
  22985. "additionalProperties": false
  22986. },
  22987. "SessionMessagesResponse": {
  22988. "type": "object",
  22989. "properties": {
  22990. "data": {
  22991. "type": "array",
  22992. "items": {
  22993. "$ref": "#/components/schemas/SessionMessage"
  22994. }
  22995. },
  22996. "cursor": {
  22997. "type": "object",
  22998. "properties": {
  22999. "previous": {
  23000. "type": "string"
  23001. },
  23002. "next": {
  23003. "type": "string"
  23004. }
  23005. },
  23006. "additionalProperties": false
  23007. }
  23008. },
  23009. "required": ["data", "cursor"],
  23010. "additionalProperties": false
  23011. },
  23012. "ProviderNotFoundError": {
  23013. "type": "object",
  23014. "properties": {
  23015. "_tag": {
  23016. "type": "string",
  23017. "enum": ["ProviderNotFoundError"]
  23018. },
  23019. "providerID": {
  23020. "type": "string"
  23021. },
  23022. "message": {
  23023. "type": "string"
  23024. }
  23025. },
  23026. "required": ["_tag", "providerID", "message"],
  23027. "additionalProperties": false
  23028. },
  23029. "V2Event": {
  23030. "anyOf": [
  23031. {
  23032. "$ref": "#/components/schemas/V2EventModels-devRefreshed"
  23033. },
  23034. {
  23035. "$ref": "#/components/schemas/V2EventIntegrationUpdated"
  23036. },
  23037. {
  23038. "$ref": "#/components/schemas/V2EventCatalogUpdated"
  23039. },
  23040. {
  23041. "$ref": "#/components/schemas/V2EventSessionCreated"
  23042. },
  23043. {
  23044. "$ref": "#/components/schemas/V2EventSessionUpdated"
  23045. },
  23046. {
  23047. "$ref": "#/components/schemas/V2EventSessionDeleted"
  23048. },
  23049. {
  23050. "$ref": "#/components/schemas/V2EventMessageUpdated"
  23051. },
  23052. {
  23053. "$ref": "#/components/schemas/V2EventMessageRemoved"
  23054. },
  23055. {
  23056. "$ref": "#/components/schemas/V2EventMessagePartUpdated"
  23057. },
  23058. {
  23059. "$ref": "#/components/schemas/V2EventMessagePartRemoved"
  23060. },
  23061. {
  23062. "$ref": "#/components/schemas/V2EventSessionNextAgentSwitched"
  23063. },
  23064. {
  23065. "$ref": "#/components/schemas/V2EventSessionNextModelSwitched"
  23066. },
  23067. {
  23068. "$ref": "#/components/schemas/V2EventSessionNextMoved"
  23069. },
  23070. {
  23071. "$ref": "#/components/schemas/V2EventSessionNextPrompted"
  23072. },
  23073. {
  23074. "$ref": "#/components/schemas/V2EventSessionNextPromptAdmitted"
  23075. },
  23076. {
  23077. "$ref": "#/components/schemas/V2EventSessionNextPromptPromoted"
  23078. },
  23079. {
  23080. "$ref": "#/components/schemas/V2EventSessionNextContextUpdated"
  23081. },
  23082. {
  23083. "$ref": "#/components/schemas/V2EventSessionNextSynthetic"
  23084. },
  23085. {
  23086. "$ref": "#/components/schemas/V2EventSessionNextShellStarted"
  23087. },
  23088. {
  23089. "$ref": "#/components/schemas/V2EventSessionNextShellEnded"
  23090. },
  23091. {
  23092. "$ref": "#/components/schemas/V2EventSessionNextStepStarted"
  23093. },
  23094. {
  23095. "$ref": "#/components/schemas/V2EventSessionNextStepEnded"
  23096. },
  23097. {
  23098. "$ref": "#/components/schemas/V2EventSessionNextStepFailed"
  23099. },
  23100. {
  23101. "$ref": "#/components/schemas/V2EventSessionNextTextStarted"
  23102. },
  23103. {
  23104. "$ref": "#/components/schemas/V2EventSessionNextTextDelta"
  23105. },
  23106. {
  23107. "$ref": "#/components/schemas/V2EventSessionNextTextEnded"
  23108. },
  23109. {
  23110. "$ref": "#/components/schemas/V2EventSessionNextReasoningStarted"
  23111. },
  23112. {
  23113. "$ref": "#/components/schemas/V2EventSessionNextReasoningDelta"
  23114. },
  23115. {
  23116. "$ref": "#/components/schemas/V2EventSessionNextReasoningEnded"
  23117. },
  23118. {
  23119. "$ref": "#/components/schemas/V2EventSessionNextToolInputStarted"
  23120. },
  23121. {
  23122. "$ref": "#/components/schemas/V2EventSessionNextToolInputDelta"
  23123. },
  23124. {
  23125. "$ref": "#/components/schemas/V2EventSessionNextToolInputEnded"
  23126. },
  23127. {
  23128. "$ref": "#/components/schemas/V2EventSessionNextToolCalled"
  23129. },
  23130. {
  23131. "$ref": "#/components/schemas/V2EventSessionNextToolProgress"
  23132. },
  23133. {
  23134. "$ref": "#/components/schemas/V2EventSessionNextToolSuccess"
  23135. },
  23136. {
  23137. "$ref": "#/components/schemas/V2EventSessionNextToolFailed"
  23138. },
  23139. {
  23140. "$ref": "#/components/schemas/V2EventSessionNextRetried"
  23141. },
  23142. {
  23143. "$ref": "#/components/schemas/V2EventSessionNextCompactionStarted"
  23144. },
  23145. {
  23146. "$ref": "#/components/schemas/V2EventSessionNextCompactionDelta"
  23147. },
  23148. {
  23149. "$ref": "#/components/schemas/V2EventSessionNextCompactionEnded"
  23150. },
  23151. {
  23152. "$ref": "#/components/schemas/V2EventMessagePartDelta"
  23153. },
  23154. {
  23155. "$ref": "#/components/schemas/V2EventSessionDiff"
  23156. },
  23157. {
  23158. "$ref": "#/components/schemas/V2EventSessionError"
  23159. },
  23160. {
  23161. "$ref": "#/components/schemas/V2EventInstallationUpdated"
  23162. },
  23163. {
  23164. "$ref": "#/components/schemas/V2EventInstallationUpdate-available"
  23165. },
  23166. {
  23167. "$ref": "#/components/schemas/V2EventFileEdited"
  23168. },
  23169. {
  23170. "$ref": "#/components/schemas/V2EventPluginAdded"
  23171. },
  23172. {
  23173. "$ref": "#/components/schemas/V2EventPermissionV2Asked"
  23174. },
  23175. {
  23176. "$ref": "#/components/schemas/V2EventPermissionV2Replied"
  23177. },
  23178. {
  23179. "$ref": "#/components/schemas/V2EventReferenceUpdated"
  23180. },
  23181. {
  23182. "$ref": "#/components/schemas/V2EventProjectDirectoriesUpdated"
  23183. },
  23184. {
  23185. "$ref": "#/components/schemas/V2EventFileWatcherUpdated"
  23186. },
  23187. {
  23188. "$ref": "#/components/schemas/V2EventPtyCreated"
  23189. },
  23190. {
  23191. "$ref": "#/components/schemas/V2EventPtyUpdated"
  23192. },
  23193. {
  23194. "$ref": "#/components/schemas/V2EventPtyExited"
  23195. },
  23196. {
  23197. "$ref": "#/components/schemas/V2EventPtyDeleted"
  23198. },
  23199. {
  23200. "$ref": "#/components/schemas/V2EventQuestionV2Asked"
  23201. },
  23202. {
  23203. "$ref": "#/components/schemas/V2EventQuestionV2Replied"
  23204. },
  23205. {
  23206. "$ref": "#/components/schemas/V2EventQuestionV2Rejected"
  23207. },
  23208. {
  23209. "$ref": "#/components/schemas/V2EventTodoUpdated"
  23210. },
  23211. {
  23212. "$ref": "#/components/schemas/V2EventLspUpdated"
  23213. },
  23214. {
  23215. "$ref": "#/components/schemas/V2EventPermissionAsked"
  23216. },
  23217. {
  23218. "$ref": "#/components/schemas/V2EventPermissionReplied"
  23219. },
  23220. {
  23221. "$ref": "#/components/schemas/V2EventTuiPromptAppend"
  23222. },
  23223. {
  23224. "$ref": "#/components/schemas/V2EventTuiCommandExecute"
  23225. },
  23226. {
  23227. "$ref": "#/components/schemas/V2EventTuiToastShow"
  23228. },
  23229. {
  23230. "$ref": "#/components/schemas/V2EventTuiSessionSelect"
  23231. },
  23232. {
  23233. "$ref": "#/components/schemas/V2EventMcpToolsChanged"
  23234. },
  23235. {
  23236. "$ref": "#/components/schemas/V2EventMcpBrowserOpenFailed"
  23237. },
  23238. {
  23239. "$ref": "#/components/schemas/V2EventCommandExecuted"
  23240. },
  23241. {
  23242. "$ref": "#/components/schemas/V2EventProjectUpdated"
  23243. },
  23244. {
  23245. "$ref": "#/components/schemas/V2EventSessionStatus"
  23246. },
  23247. {
  23248. "$ref": "#/components/schemas/V2EventSessionIdle"
  23249. },
  23250. {
  23251. "$ref": "#/components/schemas/V2EventQuestionAsked"
  23252. },
  23253. {
  23254. "$ref": "#/components/schemas/V2EventQuestionReplied"
  23255. },
  23256. {
  23257. "$ref": "#/components/schemas/V2EventQuestionRejected"
  23258. },
  23259. {
  23260. "$ref": "#/components/schemas/V2EventSessionCompacted"
  23261. },
  23262. {
  23263. "$ref": "#/components/schemas/V2EventVcsBranchUpdated"
  23264. },
  23265. {
  23266. "$ref": "#/components/schemas/V2EventWorkspaceReady"
  23267. },
  23268. {
  23269. "$ref": "#/components/schemas/V2EventWorkspaceFailed"
  23270. },
  23271. {
  23272. "$ref": "#/components/schemas/V2EventWorkspaceStatus"
  23273. },
  23274. {
  23275. "$ref": "#/components/schemas/V2EventWorktreeReady"
  23276. },
  23277. {
  23278. "$ref": "#/components/schemas/V2EventWorktreeFailed"
  23279. },
  23280. {
  23281. "$ref": "#/components/schemas/V2EventServerConnected"
  23282. },
  23283. {
  23284. "$ref": "#/components/schemas/V2EventGlobalDisposed"
  23285. },
  23286. {
  23287. "$ref": "#/components/schemas/V2EventServerConnected"
  23288. }
  23289. ]
  23290. },
  23291. "ForbiddenError": {
  23292. "type": "object",
  23293. "properties": {
  23294. "_tag": {
  23295. "type": "string",
  23296. "enum": ["ForbiddenError"]
  23297. },
  23298. "message": {
  23299. "type": "string"
  23300. }
  23301. },
  23302. "required": ["_tag", "message"],
  23303. "additionalProperties": false
  23304. },
  23305. "ProjectCopyError": {
  23306. "type": "object",
  23307. "properties": {
  23308. "name": {
  23309. "type": "string",
  23310. "enum": ["ProjectCopyError"]
  23311. },
  23312. "data": {
  23313. "type": "object",
  23314. "properties": {
  23315. "message": {
  23316. "type": "string"
  23317. },
  23318. "forceRequired": {
  23319. "type": "boolean"
  23320. }
  23321. },
  23322. "required": ["message"],
  23323. "additionalProperties": false
  23324. }
  23325. },
  23326. "required": ["name", "data"],
  23327. "additionalProperties": false
  23328. },
  23329. "effect_HttpApiError_Forbidden": {
  23330. "type": "object",
  23331. "properties": {
  23332. "_tag": {
  23333. "type": "string",
  23334. "enum": ["Forbidden"]
  23335. }
  23336. },
  23337. "required": ["_tag"],
  23338. "additionalProperties": false
  23339. },
  23340. "Event.tui.prompt.append": {
  23341. "type": "object",
  23342. "properties": {
  23343. "id": {
  23344. "type": "string",
  23345. "pattern": "^evt_"
  23346. },
  23347. "type": {
  23348. "type": "string",
  23349. "enum": ["tui.prompt.append"]
  23350. },
  23351. "properties": {
  23352. "type": "object",
  23353. "properties": {
  23354. "text": {
  23355. "type": "string"
  23356. }
  23357. },
  23358. "required": ["text"],
  23359. "additionalProperties": false
  23360. }
  23361. },
  23362. "required": ["id", "type", "properties"],
  23363. "additionalProperties": false
  23364. },
  23365. "Event.tui.command.execute": {
  23366. "type": "object",
  23367. "properties": {
  23368. "id": {
  23369. "type": "string",
  23370. "pattern": "^evt_"
  23371. },
  23372. "type": {
  23373. "type": "string",
  23374. "enum": ["tui.command.execute"]
  23375. },
  23376. "properties": {
  23377. "type": "object",
  23378. "properties": {
  23379. "command": {
  23380. "anyOf": [
  23381. {
  23382. "type": "string",
  23383. "enum": [
  23384. "session.list",
  23385. "session.new",
  23386. "session.share",
  23387. "session.interrupt",
  23388. "session.compact",
  23389. "session.page.up",
  23390. "session.page.down",
  23391. "session.line.up",
  23392. "session.line.down",
  23393. "session.half.page.up",
  23394. "session.half.page.down",
  23395. "session.first",
  23396. "session.last",
  23397. "prompt.clear",
  23398. "prompt.submit",
  23399. "agent.cycle"
  23400. ]
  23401. },
  23402. {
  23403. "type": "string"
  23404. }
  23405. ]
  23406. }
  23407. },
  23408. "required": ["command"],
  23409. "additionalProperties": false
  23410. }
  23411. },
  23412. "required": ["id", "type", "properties"],
  23413. "additionalProperties": false
  23414. },
  23415. "Event.tui.toast.show": {
  23416. "type": "object",
  23417. "properties": {
  23418. "id": {
  23419. "type": "string",
  23420. "pattern": "^evt_"
  23421. },
  23422. "type": {
  23423. "type": "string",
  23424. "enum": ["tui.toast.show"]
  23425. },
  23426. "properties": {
  23427. "type": "object",
  23428. "properties": {
  23429. "title": {
  23430. "type": "string"
  23431. },
  23432. "message": {
  23433. "type": "string"
  23434. },
  23435. "variant": {
  23436. "type": "string",
  23437. "enum": ["info", "success", "warning", "error"]
  23438. },
  23439. "duration": {
  23440. "type": "integer",
  23441. "exclusiveMinimum": 0
  23442. }
  23443. },
  23444. "required": ["message", "variant"],
  23445. "additionalProperties": false
  23446. }
  23447. },
  23448. "required": ["id", "type", "properties"],
  23449. "additionalProperties": false
  23450. },
  23451. "Event.tui.session.select": {
  23452. "type": "object",
  23453. "properties": {
  23454. "id": {
  23455. "type": "string",
  23456. "pattern": "^evt_"
  23457. },
  23458. "type": {
  23459. "type": "string",
  23460. "enum": ["tui.session.select"]
  23461. },
  23462. "properties": {
  23463. "type": "object",
  23464. "properties": {
  23465. "sessionID": {
  23466. "type": "string",
  23467. "pattern": "^ses",
  23468. "description": "Session ID to navigate to"
  23469. }
  23470. },
  23471. "required": ["sessionID"],
  23472. "additionalProperties": false
  23473. }
  23474. },
  23475. "required": ["id", "type", "properties"],
  23476. "additionalProperties": false
  23477. },
  23478. "MoveSessionDestination": {
  23479. "type": "object",
  23480. "properties": {
  23481. "directory": {
  23482. "type": "string"
  23483. }
  23484. },
  23485. "required": ["directory"],
  23486. "additionalProperties": false
  23487. },
  23488. "LocationRef": {
  23489. "type": "object",
  23490. "properties": {
  23491. "directory": {
  23492. "type": "string"
  23493. },
  23494. "workspaceID": {
  23495. "type": "string",
  23496. "pattern": "^wrk"
  23497. }
  23498. },
  23499. "required": ["directory"],
  23500. "additionalProperties": false
  23501. },
  23502. "PromptSource": {
  23503. "type": "object",
  23504. "properties": {
  23505. "start": {
  23506. "type": "number"
  23507. },
  23508. "end": {
  23509. "type": "number"
  23510. },
  23511. "text": {
  23512. "type": "string"
  23513. }
  23514. },
  23515. "required": ["start", "end", "text"],
  23516. "additionalProperties": false
  23517. },
  23518. "PromptFileAttachment": {
  23519. "type": "object",
  23520. "properties": {
  23521. "uri": {
  23522. "type": "string"
  23523. },
  23524. "mime": {
  23525. "type": "string"
  23526. },
  23527. "name": {
  23528. "type": "string"
  23529. },
  23530. "description": {
  23531. "type": "string"
  23532. },
  23533. "source": {
  23534. "$ref": "#/components/schemas/PromptSource"
  23535. }
  23536. },
  23537. "required": ["uri", "mime"],
  23538. "additionalProperties": false
  23539. },
  23540. "PromptAgentAttachment": {
  23541. "type": "object",
  23542. "properties": {
  23543. "name": {
  23544. "type": "string"
  23545. },
  23546. "source": {
  23547. "$ref": "#/components/schemas/PromptSource"
  23548. }
  23549. },
  23550. "required": ["name"],
  23551. "additionalProperties": false
  23552. },
  23553. "SessionErrorUnknown": {
  23554. "type": "object",
  23555. "properties": {
  23556. "type": {
  23557. "type": "string",
  23558. "enum": ["unknown"]
  23559. },
  23560. "message": {
  23561. "type": "string"
  23562. }
  23563. },
  23564. "required": ["type", "message"],
  23565. "additionalProperties": false
  23566. },
  23567. "ToolTextContent": {
  23568. "type": "object",
  23569. "properties": {
  23570. "type": {
  23571. "type": "string",
  23572. "enum": ["text"]
  23573. },
  23574. "text": {
  23575. "type": "string"
  23576. }
  23577. },
  23578. "required": ["type", "text"],
  23579. "additionalProperties": false
  23580. },
  23581. "ToolFileContent": {
  23582. "type": "object",
  23583. "properties": {
  23584. "type": {
  23585. "type": "string",
  23586. "enum": ["file"]
  23587. },
  23588. "uri": {
  23589. "type": "string"
  23590. },
  23591. "mime": {
  23592. "type": "string"
  23593. },
  23594. "name": {
  23595. "type": "string"
  23596. }
  23597. },
  23598. "required": ["type", "uri", "mime"],
  23599. "additionalProperties": false
  23600. },
  23601. "SessionNextRetry_error": {
  23602. "type": "object",
  23603. "properties": {
  23604. "message": {
  23605. "type": "string"
  23606. },
  23607. "statusCode": {
  23608. "type": "number"
  23609. },
  23610. "isRetryable": {
  23611. "type": "boolean"
  23612. },
  23613. "responseHeaders": {
  23614. "type": "object",
  23615. "additionalProperties": {
  23616. "type": "string"
  23617. }
  23618. },
  23619. "responseBody": {
  23620. "type": "string"
  23621. },
  23622. "metadata": {
  23623. "type": "object",
  23624. "additionalProperties": {
  23625. "type": "string"
  23626. }
  23627. }
  23628. },
  23629. "required": ["message", "isRetryable"],
  23630. "additionalProperties": false
  23631. },
  23632. "PermissionV2Source": {
  23633. "type": "object",
  23634. "properties": {
  23635. "type": {
  23636. "type": "string",
  23637. "enum": ["tool"]
  23638. },
  23639. "messageID": {
  23640. "type": "string"
  23641. },
  23642. "callID": {
  23643. "type": "string"
  23644. }
  23645. },
  23646. "required": ["type", "messageID", "callID"],
  23647. "additionalProperties": false
  23648. },
  23649. "PermissionV2Reply": {
  23650. "type": "string",
  23651. "enum": ["once", "always", "reject"]
  23652. },
  23653. "QuestionV2Option": {
  23654. "type": "object",
  23655. "properties": {
  23656. "label": {
  23657. "type": "string",
  23658. "description": "Display text (1-5 words, concise)"
  23659. },
  23660. "description": {
  23661. "type": "string",
  23662. "description": "Explanation of choice"
  23663. }
  23664. },
  23665. "required": ["label", "description"],
  23666. "additionalProperties": false
  23667. },
  23668. "QuestionV2Info": {
  23669. "type": "object",
  23670. "properties": {
  23671. "question": {
  23672. "type": "string",
  23673. "description": "Complete question"
  23674. },
  23675. "header": {
  23676. "type": "string",
  23677. "description": "Very short label (max 30 chars)"
  23678. },
  23679. "options": {
  23680. "type": "array",
  23681. "items": {
  23682. "$ref": "#/components/schemas/QuestionV2Option"
  23683. },
  23684. "description": "Available choices"
  23685. },
  23686. "multiple": {
  23687. "type": "boolean"
  23688. },
  23689. "custom": {
  23690. "type": "boolean"
  23691. }
  23692. },
  23693. "required": ["question", "header", "options"],
  23694. "additionalProperties": false
  23695. },
  23696. "QuestionV2Tool": {
  23697. "type": "object",
  23698. "properties": {
  23699. "messageID": {
  23700. "type": "string"
  23701. },
  23702. "callID": {
  23703. "type": "string"
  23704. }
  23705. },
  23706. "required": ["messageID", "callID"],
  23707. "additionalProperties": false
  23708. },
  23709. "QuestionV2Answer": {
  23710. "type": "array",
  23711. "items": {
  23712. "type": "string"
  23713. }
  23714. },
  23715. "EventServerInstanceDisposed": {
  23716. "type": "object",
  23717. "properties": {
  23718. "id": {
  23719. "type": "string"
  23720. },
  23721. "type": {
  23722. "type": "string",
  23723. "enum": ["server.instance.disposed"]
  23724. },
  23725. "properties": {
  23726. "type": "object",
  23727. "properties": {
  23728. "directory": {
  23729. "type": "string"
  23730. }
  23731. },
  23732. "required": ["directory"],
  23733. "additionalProperties": false
  23734. }
  23735. },
  23736. "required": ["id", "type", "properties"],
  23737. "additionalProperties": false
  23738. },
  23739. "SyncEventSessionCreated": {
  23740. "type": "object",
  23741. "properties": {
  23742. "type": {
  23743. "type": "string",
  23744. "enum": ["sync"]
  23745. },
  23746. "id": {
  23747. "type": "string",
  23748. "pattern": "^evt_"
  23749. },
  23750. "syncEvent": {
  23751. "type": "object",
  23752. "properties": {
  23753. "type": {
  23754. "type": "string",
  23755. "enum": ["session.created.1"]
  23756. },
  23757. "id": {
  23758. "type": "string",
  23759. "pattern": "^evt_"
  23760. },
  23761. "seq": {
  23762. "type": "number"
  23763. },
  23764. "aggregateID": {
  23765. "type": "string"
  23766. },
  23767. "data": {
  23768. "type": "object",
  23769. "properties": {
  23770. "sessionID": {
  23771. "type": "string",
  23772. "pattern": "^ses"
  23773. },
  23774. "info": {
  23775. "$ref": "#/components/schemas/Session"
  23776. }
  23777. },
  23778. "required": ["sessionID", "info"],
  23779. "additionalProperties": false
  23780. }
  23781. },
  23782. "required": ["type", "id", "seq", "aggregateID", "data"],
  23783. "additionalProperties": false
  23784. }
  23785. },
  23786. "required": ["type", "id", "syncEvent"],
  23787. "additionalProperties": false
  23788. },
  23789. "SyncEventSessionUpdated": {
  23790. "type": "object",
  23791. "properties": {
  23792. "type": {
  23793. "type": "string",
  23794. "enum": ["sync"]
  23795. },
  23796. "id": {
  23797. "type": "string",
  23798. "pattern": "^evt_"
  23799. },
  23800. "syncEvent": {
  23801. "type": "object",
  23802. "properties": {
  23803. "type": {
  23804. "type": "string",
  23805. "enum": ["session.updated.1"]
  23806. },
  23807. "id": {
  23808. "type": "string",
  23809. "pattern": "^evt_"
  23810. },
  23811. "seq": {
  23812. "type": "number"
  23813. },
  23814. "aggregateID": {
  23815. "type": "string"
  23816. },
  23817. "data": {
  23818. "type": "object",
  23819. "properties": {
  23820. "sessionID": {
  23821. "type": "string",
  23822. "pattern": "^ses"
  23823. },
  23824. "info": {
  23825. "$ref": "#/components/schemas/Session"
  23826. }
  23827. },
  23828. "required": ["sessionID", "info"],
  23829. "additionalProperties": false
  23830. }
  23831. },
  23832. "required": ["type", "id", "seq", "aggregateID", "data"],
  23833. "additionalProperties": false
  23834. }
  23835. },
  23836. "required": ["type", "id", "syncEvent"],
  23837. "additionalProperties": false
  23838. },
  23839. "SyncEventSessionDeleted": {
  23840. "type": "object",
  23841. "properties": {
  23842. "type": {
  23843. "type": "string",
  23844. "enum": ["sync"]
  23845. },
  23846. "id": {
  23847. "type": "string",
  23848. "pattern": "^evt_"
  23849. },
  23850. "syncEvent": {
  23851. "type": "object",
  23852. "properties": {
  23853. "type": {
  23854. "type": "string",
  23855. "enum": ["session.deleted.1"]
  23856. },
  23857. "id": {
  23858. "type": "string",
  23859. "pattern": "^evt_"
  23860. },
  23861. "seq": {
  23862. "type": "number"
  23863. },
  23864. "aggregateID": {
  23865. "type": "string"
  23866. },
  23867. "data": {
  23868. "type": "object",
  23869. "properties": {
  23870. "sessionID": {
  23871. "type": "string",
  23872. "pattern": "^ses"
  23873. },
  23874. "info": {
  23875. "$ref": "#/components/schemas/Session"
  23876. }
  23877. },
  23878. "required": ["sessionID", "info"],
  23879. "additionalProperties": false
  23880. }
  23881. },
  23882. "required": ["type", "id", "seq", "aggregateID", "data"],
  23883. "additionalProperties": false
  23884. }
  23885. },
  23886. "required": ["type", "id", "syncEvent"],
  23887. "additionalProperties": false
  23888. },
  23889. "SyncEventMessageUpdated": {
  23890. "type": "object",
  23891. "properties": {
  23892. "type": {
  23893. "type": "string",
  23894. "enum": ["sync"]
  23895. },
  23896. "id": {
  23897. "type": "string",
  23898. "pattern": "^evt_"
  23899. },
  23900. "syncEvent": {
  23901. "type": "object",
  23902. "properties": {
  23903. "type": {
  23904. "type": "string",
  23905. "enum": ["message.updated.1"]
  23906. },
  23907. "id": {
  23908. "type": "string",
  23909. "pattern": "^evt_"
  23910. },
  23911. "seq": {
  23912. "type": "number"
  23913. },
  23914. "aggregateID": {
  23915. "type": "string"
  23916. },
  23917. "data": {
  23918. "type": "object",
  23919. "properties": {
  23920. "sessionID": {
  23921. "type": "string",
  23922. "pattern": "^ses"
  23923. },
  23924. "info": {
  23925. "$ref": "#/components/schemas/Message"
  23926. }
  23927. },
  23928. "required": ["sessionID", "info"],
  23929. "additionalProperties": false
  23930. }
  23931. },
  23932. "required": ["type", "id", "seq", "aggregateID", "data"],
  23933. "additionalProperties": false
  23934. }
  23935. },
  23936. "required": ["type", "id", "syncEvent"],
  23937. "additionalProperties": false
  23938. },
  23939. "SyncEventMessageRemoved": {
  23940. "type": "object",
  23941. "properties": {
  23942. "type": {
  23943. "type": "string",
  23944. "enum": ["sync"]
  23945. },
  23946. "id": {
  23947. "type": "string",
  23948. "pattern": "^evt_"
  23949. },
  23950. "syncEvent": {
  23951. "type": "object",
  23952. "properties": {
  23953. "type": {
  23954. "type": "string",
  23955. "enum": ["message.removed.1"]
  23956. },
  23957. "id": {
  23958. "type": "string",
  23959. "pattern": "^evt_"
  23960. },
  23961. "seq": {
  23962. "type": "number"
  23963. },
  23964. "aggregateID": {
  23965. "type": "string"
  23966. },
  23967. "data": {
  23968. "type": "object",
  23969. "properties": {
  23970. "sessionID": {
  23971. "type": "string",
  23972. "pattern": "^ses"
  23973. },
  23974. "messageID": {
  23975. "type": "string",
  23976. "pattern": "^msg"
  23977. }
  23978. },
  23979. "required": ["sessionID", "messageID"],
  23980. "additionalProperties": false
  23981. }
  23982. },
  23983. "required": ["type", "id", "seq", "aggregateID", "data"],
  23984. "additionalProperties": false
  23985. }
  23986. },
  23987. "required": ["type", "id", "syncEvent"],
  23988. "additionalProperties": false
  23989. },
  23990. "SyncEventMessagePartUpdated": {
  23991. "type": "object",
  23992. "properties": {
  23993. "type": {
  23994. "type": "string",
  23995. "enum": ["sync"]
  23996. },
  23997. "id": {
  23998. "type": "string",
  23999. "pattern": "^evt_"
  24000. },
  24001. "syncEvent": {
  24002. "type": "object",
  24003. "properties": {
  24004. "type": {
  24005. "type": "string",
  24006. "enum": ["message.part.updated.1"]
  24007. },
  24008. "id": {
  24009. "type": "string",
  24010. "pattern": "^evt_"
  24011. },
  24012. "seq": {
  24013. "type": "number"
  24014. },
  24015. "aggregateID": {
  24016. "type": "string"
  24017. },
  24018. "data": {
  24019. "type": "object",
  24020. "properties": {
  24021. "sessionID": {
  24022. "type": "string",
  24023. "pattern": "^ses"
  24024. },
  24025. "part": {
  24026. "$ref": "#/components/schemas/Part"
  24027. },
  24028. "time": {
  24029. "type": "number"
  24030. }
  24031. },
  24032. "required": ["sessionID", "part", "time"],
  24033. "additionalProperties": false
  24034. }
  24035. },
  24036. "required": ["type", "id", "seq", "aggregateID", "data"],
  24037. "additionalProperties": false
  24038. }
  24039. },
  24040. "required": ["type", "id", "syncEvent"],
  24041. "additionalProperties": false
  24042. },
  24043. "SyncEventMessagePartRemoved": {
  24044. "type": "object",
  24045. "properties": {
  24046. "type": {
  24047. "type": "string",
  24048. "enum": ["sync"]
  24049. },
  24050. "id": {
  24051. "type": "string",
  24052. "pattern": "^evt_"
  24053. },
  24054. "syncEvent": {
  24055. "type": "object",
  24056. "properties": {
  24057. "type": {
  24058. "type": "string",
  24059. "enum": ["message.part.removed.1"]
  24060. },
  24061. "id": {
  24062. "type": "string",
  24063. "pattern": "^evt_"
  24064. },
  24065. "seq": {
  24066. "type": "number"
  24067. },
  24068. "aggregateID": {
  24069. "type": "string"
  24070. },
  24071. "data": {
  24072. "type": "object",
  24073. "properties": {
  24074. "sessionID": {
  24075. "type": "string",
  24076. "pattern": "^ses"
  24077. },
  24078. "messageID": {
  24079. "type": "string",
  24080. "pattern": "^msg"
  24081. },
  24082. "partID": {
  24083. "type": "string",
  24084. "pattern": "^prt"
  24085. }
  24086. },
  24087. "required": ["sessionID", "messageID", "partID"],
  24088. "additionalProperties": false
  24089. }
  24090. },
  24091. "required": ["type", "id", "seq", "aggregateID", "data"],
  24092. "additionalProperties": false
  24093. }
  24094. },
  24095. "required": ["type", "id", "syncEvent"],
  24096. "additionalProperties": false
  24097. },
  24098. "SyncEventSessionNextAgentSwitched": {
  24099. "type": "object",
  24100. "properties": {
  24101. "type": {
  24102. "type": "string",
  24103. "enum": ["sync"]
  24104. },
  24105. "id": {
  24106. "type": "string",
  24107. "pattern": "^evt_"
  24108. },
  24109. "syncEvent": {
  24110. "type": "object",
  24111. "properties": {
  24112. "type": {
  24113. "type": "string",
  24114. "enum": ["session.next.agent.switched.1"]
  24115. },
  24116. "id": {
  24117. "type": "string",
  24118. "pattern": "^evt_"
  24119. },
  24120. "seq": {
  24121. "type": "number"
  24122. },
  24123. "aggregateID": {
  24124. "type": "string"
  24125. },
  24126. "data": {
  24127. "type": "object",
  24128. "properties": {
  24129. "timestamp": {
  24130. "type": "number"
  24131. },
  24132. "sessionID": {
  24133. "type": "string",
  24134. "pattern": "^ses"
  24135. },
  24136. "messageID": {
  24137. "type": "string",
  24138. "pattern": "^msg_"
  24139. },
  24140. "agent": {
  24141. "type": "string"
  24142. }
  24143. },
  24144. "required": ["timestamp", "sessionID", "messageID", "agent"],
  24145. "additionalProperties": false
  24146. }
  24147. },
  24148. "required": ["type", "id", "seq", "aggregateID", "data"],
  24149. "additionalProperties": false
  24150. }
  24151. },
  24152. "required": ["type", "id", "syncEvent"],
  24153. "additionalProperties": false
  24154. },
  24155. "SyncEventSessionNextModelSwitched": {
  24156. "type": "object",
  24157. "properties": {
  24158. "type": {
  24159. "type": "string",
  24160. "enum": ["sync"]
  24161. },
  24162. "id": {
  24163. "type": "string",
  24164. "pattern": "^evt_"
  24165. },
  24166. "syncEvent": {
  24167. "type": "object",
  24168. "properties": {
  24169. "type": {
  24170. "type": "string",
  24171. "enum": ["session.next.model.switched.1"]
  24172. },
  24173. "id": {
  24174. "type": "string",
  24175. "pattern": "^evt_"
  24176. },
  24177. "seq": {
  24178. "type": "number"
  24179. },
  24180. "aggregateID": {
  24181. "type": "string"
  24182. },
  24183. "data": {
  24184. "type": "object",
  24185. "properties": {
  24186. "timestamp": {
  24187. "type": "number"
  24188. },
  24189. "sessionID": {
  24190. "type": "string",
  24191. "pattern": "^ses"
  24192. },
  24193. "messageID": {
  24194. "type": "string",
  24195. "pattern": "^msg_"
  24196. },
  24197. "model": {
  24198. "type": "object",
  24199. "properties": {
  24200. "id": {
  24201. "type": "string"
  24202. },
  24203. "providerID": {
  24204. "type": "string"
  24205. },
  24206. "variant": {
  24207. "type": "string"
  24208. }
  24209. },
  24210. "required": ["id", "providerID"],
  24211. "additionalProperties": false
  24212. }
  24213. },
  24214. "required": ["timestamp", "sessionID", "messageID", "model"],
  24215. "additionalProperties": false
  24216. }
  24217. },
  24218. "required": ["type", "id", "seq", "aggregateID", "data"],
  24219. "additionalProperties": false
  24220. }
  24221. },
  24222. "required": ["type", "id", "syncEvent"],
  24223. "additionalProperties": false
  24224. },
  24225. "SyncEventSessionNextMoved": {
  24226. "type": "object",
  24227. "properties": {
  24228. "type": {
  24229. "type": "string",
  24230. "enum": ["sync"]
  24231. },
  24232. "id": {
  24233. "type": "string",
  24234. "pattern": "^evt_"
  24235. },
  24236. "syncEvent": {
  24237. "type": "object",
  24238. "properties": {
  24239. "type": {
  24240. "type": "string",
  24241. "enum": ["session.next.moved.1"]
  24242. },
  24243. "id": {
  24244. "type": "string",
  24245. "pattern": "^evt_"
  24246. },
  24247. "seq": {
  24248. "type": "number"
  24249. },
  24250. "aggregateID": {
  24251. "type": "string"
  24252. },
  24253. "data": {
  24254. "type": "object",
  24255. "properties": {
  24256. "timestamp": {
  24257. "type": "number"
  24258. },
  24259. "sessionID": {
  24260. "type": "string",
  24261. "pattern": "^ses"
  24262. },
  24263. "location": {
  24264. "$ref": "#/components/schemas/LocationRef"
  24265. },
  24266. "subdirectory": {
  24267. "type": "string"
  24268. }
  24269. },
  24270. "required": ["timestamp", "sessionID", "location"],
  24271. "additionalProperties": false
  24272. }
  24273. },
  24274. "required": ["type", "id", "seq", "aggregateID", "data"],
  24275. "additionalProperties": false
  24276. }
  24277. },
  24278. "required": ["type", "id", "syncEvent"],
  24279. "additionalProperties": false
  24280. },
  24281. "SyncEventSessionNextPrompted": {
  24282. "type": "object",
  24283. "properties": {
  24284. "type": {
  24285. "type": "string",
  24286. "enum": ["sync"]
  24287. },
  24288. "id": {
  24289. "type": "string",
  24290. "pattern": "^evt_"
  24291. },
  24292. "syncEvent": {
  24293. "type": "object",
  24294. "properties": {
  24295. "type": {
  24296. "type": "string",
  24297. "enum": ["session.next.prompted.1"]
  24298. },
  24299. "id": {
  24300. "type": "string",
  24301. "pattern": "^evt_"
  24302. },
  24303. "seq": {
  24304. "type": "number"
  24305. },
  24306. "aggregateID": {
  24307. "type": "string"
  24308. },
  24309. "data": {
  24310. "type": "object",
  24311. "properties": {
  24312. "timestamp": {
  24313. "type": "number"
  24314. },
  24315. "sessionID": {
  24316. "type": "string",
  24317. "pattern": "^ses"
  24318. },
  24319. "messageID": {
  24320. "type": "string",
  24321. "pattern": "^msg_"
  24322. },
  24323. "prompt": {
  24324. "$ref": "#/components/schemas/Prompt"
  24325. },
  24326. "delivery": {
  24327. "type": "string",
  24328. "enum": ["steer", "queue"]
  24329. }
  24330. },
  24331. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  24332. "additionalProperties": false
  24333. }
  24334. },
  24335. "required": ["type", "id", "seq", "aggregateID", "data"],
  24336. "additionalProperties": false
  24337. }
  24338. },
  24339. "required": ["type", "id", "syncEvent"],
  24340. "additionalProperties": false
  24341. },
  24342. "SyncEventSessionNextPromptAdmitted": {
  24343. "type": "object",
  24344. "properties": {
  24345. "type": {
  24346. "type": "string",
  24347. "enum": ["sync"]
  24348. },
  24349. "id": {
  24350. "type": "string",
  24351. "pattern": "^evt_"
  24352. },
  24353. "syncEvent": {
  24354. "type": "object",
  24355. "properties": {
  24356. "type": {
  24357. "type": "string",
  24358. "enum": ["session.next.prompt.admitted.1"]
  24359. },
  24360. "id": {
  24361. "type": "string",
  24362. "pattern": "^evt_"
  24363. },
  24364. "seq": {
  24365. "type": "number"
  24366. },
  24367. "aggregateID": {
  24368. "type": "string"
  24369. },
  24370. "data": {
  24371. "type": "object",
  24372. "properties": {
  24373. "timestamp": {
  24374. "type": "number"
  24375. },
  24376. "sessionID": {
  24377. "type": "string",
  24378. "pattern": "^ses"
  24379. },
  24380. "messageID": {
  24381. "type": "string",
  24382. "pattern": "^msg_"
  24383. },
  24384. "prompt": {
  24385. "$ref": "#/components/schemas/Prompt"
  24386. },
  24387. "delivery": {
  24388. "type": "string",
  24389. "enum": ["steer", "queue"]
  24390. }
  24391. },
  24392. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  24393. "additionalProperties": false
  24394. }
  24395. },
  24396. "required": ["type", "id", "seq", "aggregateID", "data"],
  24397. "additionalProperties": false
  24398. }
  24399. },
  24400. "required": ["type", "id", "syncEvent"],
  24401. "additionalProperties": false
  24402. },
  24403. "SyncEventSessionNextPromptPromoted": {
  24404. "type": "object",
  24405. "properties": {
  24406. "type": {
  24407. "type": "string",
  24408. "enum": ["sync"]
  24409. },
  24410. "id": {
  24411. "type": "string",
  24412. "pattern": "^evt_"
  24413. },
  24414. "syncEvent": {
  24415. "type": "object",
  24416. "properties": {
  24417. "type": {
  24418. "type": "string",
  24419. "enum": ["session.next.prompt.promoted.1"]
  24420. },
  24421. "id": {
  24422. "type": "string",
  24423. "pattern": "^evt_"
  24424. },
  24425. "seq": {
  24426. "type": "number"
  24427. },
  24428. "aggregateID": {
  24429. "type": "string"
  24430. },
  24431. "data": {
  24432. "type": "object",
  24433. "properties": {
  24434. "timestamp": {
  24435. "type": "number"
  24436. },
  24437. "sessionID": {
  24438. "type": "string",
  24439. "pattern": "^ses"
  24440. },
  24441. "messageID": {
  24442. "type": "string",
  24443. "pattern": "^msg_"
  24444. },
  24445. "prompt": {
  24446. "$ref": "#/components/schemas/Prompt"
  24447. },
  24448. "timeCreated": {
  24449. "type": "number"
  24450. }
  24451. },
  24452. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  24453. "additionalProperties": false
  24454. }
  24455. },
  24456. "required": ["type", "id", "seq", "aggregateID", "data"],
  24457. "additionalProperties": false
  24458. }
  24459. },
  24460. "required": ["type", "id", "syncEvent"],
  24461. "additionalProperties": false
  24462. },
  24463. "SyncEventSessionNextContextUpdated": {
  24464. "type": "object",
  24465. "properties": {
  24466. "type": {
  24467. "type": "string",
  24468. "enum": ["sync"]
  24469. },
  24470. "id": {
  24471. "type": "string",
  24472. "pattern": "^evt_"
  24473. },
  24474. "syncEvent": {
  24475. "type": "object",
  24476. "properties": {
  24477. "type": {
  24478. "type": "string",
  24479. "enum": ["session.next.context.updated.1"]
  24480. },
  24481. "id": {
  24482. "type": "string",
  24483. "pattern": "^evt_"
  24484. },
  24485. "seq": {
  24486. "type": "number"
  24487. },
  24488. "aggregateID": {
  24489. "type": "string"
  24490. },
  24491. "data": {
  24492. "type": "object",
  24493. "properties": {
  24494. "timestamp": {
  24495. "type": "number"
  24496. },
  24497. "sessionID": {
  24498. "type": "string",
  24499. "pattern": "^ses"
  24500. },
  24501. "messageID": {
  24502. "type": "string",
  24503. "pattern": "^msg_"
  24504. },
  24505. "text": {
  24506. "type": "string"
  24507. }
  24508. },
  24509. "required": ["timestamp", "sessionID", "messageID", "text"],
  24510. "additionalProperties": false
  24511. }
  24512. },
  24513. "required": ["type", "id", "seq", "aggregateID", "data"],
  24514. "additionalProperties": false
  24515. }
  24516. },
  24517. "required": ["type", "id", "syncEvent"],
  24518. "additionalProperties": false
  24519. },
  24520. "SyncEventSessionNextSynthetic": {
  24521. "type": "object",
  24522. "properties": {
  24523. "type": {
  24524. "type": "string",
  24525. "enum": ["sync"]
  24526. },
  24527. "id": {
  24528. "type": "string",
  24529. "pattern": "^evt_"
  24530. },
  24531. "syncEvent": {
  24532. "type": "object",
  24533. "properties": {
  24534. "type": {
  24535. "type": "string",
  24536. "enum": ["session.next.synthetic.1"]
  24537. },
  24538. "id": {
  24539. "type": "string",
  24540. "pattern": "^evt_"
  24541. },
  24542. "seq": {
  24543. "type": "number"
  24544. },
  24545. "aggregateID": {
  24546. "type": "string"
  24547. },
  24548. "data": {
  24549. "type": "object",
  24550. "properties": {
  24551. "timestamp": {
  24552. "type": "number"
  24553. },
  24554. "sessionID": {
  24555. "type": "string",
  24556. "pattern": "^ses"
  24557. },
  24558. "messageID": {
  24559. "type": "string",
  24560. "pattern": "^msg_"
  24561. },
  24562. "text": {
  24563. "type": "string"
  24564. }
  24565. },
  24566. "required": ["timestamp", "sessionID", "messageID", "text"],
  24567. "additionalProperties": false
  24568. }
  24569. },
  24570. "required": ["type", "id", "seq", "aggregateID", "data"],
  24571. "additionalProperties": false
  24572. }
  24573. },
  24574. "required": ["type", "id", "syncEvent"],
  24575. "additionalProperties": false
  24576. },
  24577. "SyncEventSessionNextShellStarted": {
  24578. "type": "object",
  24579. "properties": {
  24580. "type": {
  24581. "type": "string",
  24582. "enum": ["sync"]
  24583. },
  24584. "id": {
  24585. "type": "string",
  24586. "pattern": "^evt_"
  24587. },
  24588. "syncEvent": {
  24589. "type": "object",
  24590. "properties": {
  24591. "type": {
  24592. "type": "string",
  24593. "enum": ["session.next.shell.started.1"]
  24594. },
  24595. "id": {
  24596. "type": "string",
  24597. "pattern": "^evt_"
  24598. },
  24599. "seq": {
  24600. "type": "number"
  24601. },
  24602. "aggregateID": {
  24603. "type": "string"
  24604. },
  24605. "data": {
  24606. "type": "object",
  24607. "properties": {
  24608. "timestamp": {
  24609. "type": "number"
  24610. },
  24611. "sessionID": {
  24612. "type": "string",
  24613. "pattern": "^ses"
  24614. },
  24615. "messageID": {
  24616. "type": "string",
  24617. "pattern": "^msg_"
  24618. },
  24619. "callID": {
  24620. "type": "string"
  24621. },
  24622. "command": {
  24623. "type": "string"
  24624. }
  24625. },
  24626. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  24627. "additionalProperties": false
  24628. }
  24629. },
  24630. "required": ["type", "id", "seq", "aggregateID", "data"],
  24631. "additionalProperties": false
  24632. }
  24633. },
  24634. "required": ["type", "id", "syncEvent"],
  24635. "additionalProperties": false
  24636. },
  24637. "SyncEventSessionNextShellEnded": {
  24638. "type": "object",
  24639. "properties": {
  24640. "type": {
  24641. "type": "string",
  24642. "enum": ["sync"]
  24643. },
  24644. "id": {
  24645. "type": "string",
  24646. "pattern": "^evt_"
  24647. },
  24648. "syncEvent": {
  24649. "type": "object",
  24650. "properties": {
  24651. "type": {
  24652. "type": "string",
  24653. "enum": ["session.next.shell.ended.1"]
  24654. },
  24655. "id": {
  24656. "type": "string",
  24657. "pattern": "^evt_"
  24658. },
  24659. "seq": {
  24660. "type": "number"
  24661. },
  24662. "aggregateID": {
  24663. "type": "string"
  24664. },
  24665. "data": {
  24666. "type": "object",
  24667. "properties": {
  24668. "timestamp": {
  24669. "type": "number"
  24670. },
  24671. "sessionID": {
  24672. "type": "string",
  24673. "pattern": "^ses"
  24674. },
  24675. "callID": {
  24676. "type": "string"
  24677. },
  24678. "output": {
  24679. "type": "string"
  24680. }
  24681. },
  24682. "required": ["timestamp", "sessionID", "callID", "output"],
  24683. "additionalProperties": false
  24684. }
  24685. },
  24686. "required": ["type", "id", "seq", "aggregateID", "data"],
  24687. "additionalProperties": false
  24688. }
  24689. },
  24690. "required": ["type", "id", "syncEvent"],
  24691. "additionalProperties": false
  24692. },
  24693. "SyncEventSessionNextStepStarted": {
  24694. "type": "object",
  24695. "properties": {
  24696. "type": {
  24697. "type": "string",
  24698. "enum": ["sync"]
  24699. },
  24700. "id": {
  24701. "type": "string",
  24702. "pattern": "^evt_"
  24703. },
  24704. "syncEvent": {
  24705. "type": "object",
  24706. "properties": {
  24707. "type": {
  24708. "type": "string",
  24709. "enum": ["session.next.step.started.1"]
  24710. },
  24711. "id": {
  24712. "type": "string",
  24713. "pattern": "^evt_"
  24714. },
  24715. "seq": {
  24716. "type": "number"
  24717. },
  24718. "aggregateID": {
  24719. "type": "string"
  24720. },
  24721. "data": {
  24722. "type": "object",
  24723. "properties": {
  24724. "timestamp": {
  24725. "type": "number"
  24726. },
  24727. "sessionID": {
  24728. "type": "string",
  24729. "pattern": "^ses"
  24730. },
  24731. "assistantMessageID": {
  24732. "type": "string",
  24733. "pattern": "^msg_"
  24734. },
  24735. "agent": {
  24736. "type": "string"
  24737. },
  24738. "model": {
  24739. "type": "object",
  24740. "properties": {
  24741. "id": {
  24742. "type": "string"
  24743. },
  24744. "providerID": {
  24745. "type": "string"
  24746. },
  24747. "variant": {
  24748. "type": "string"
  24749. }
  24750. },
  24751. "required": ["id", "providerID"],
  24752. "additionalProperties": false
  24753. },
  24754. "snapshot": {
  24755. "type": "string"
  24756. }
  24757. },
  24758. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  24759. "additionalProperties": false
  24760. }
  24761. },
  24762. "required": ["type", "id", "seq", "aggregateID", "data"],
  24763. "additionalProperties": false
  24764. }
  24765. },
  24766. "required": ["type", "id", "syncEvent"],
  24767. "additionalProperties": false
  24768. },
  24769. "SyncEventSessionNextStepEnded": {
  24770. "type": "object",
  24771. "properties": {
  24772. "type": {
  24773. "type": "string",
  24774. "enum": ["sync"]
  24775. },
  24776. "id": {
  24777. "type": "string",
  24778. "pattern": "^evt_"
  24779. },
  24780. "syncEvent": {
  24781. "type": "object",
  24782. "properties": {
  24783. "type": {
  24784. "type": "string",
  24785. "enum": ["session.next.step.ended.2"]
  24786. },
  24787. "id": {
  24788. "type": "string",
  24789. "pattern": "^evt_"
  24790. },
  24791. "seq": {
  24792. "type": "number"
  24793. },
  24794. "aggregateID": {
  24795. "type": "string"
  24796. },
  24797. "data": {
  24798. "type": "object",
  24799. "properties": {
  24800. "timestamp": {
  24801. "type": "number"
  24802. },
  24803. "sessionID": {
  24804. "type": "string",
  24805. "pattern": "^ses"
  24806. },
  24807. "assistantMessageID": {
  24808. "type": "string",
  24809. "pattern": "^msg_"
  24810. },
  24811. "finish": {
  24812. "type": "string"
  24813. },
  24814. "cost": {
  24815. "type": "number"
  24816. },
  24817. "tokens": {
  24818. "type": "object",
  24819. "properties": {
  24820. "input": {
  24821. "type": "number"
  24822. },
  24823. "output": {
  24824. "type": "number"
  24825. },
  24826. "reasoning": {
  24827. "type": "number"
  24828. },
  24829. "cache": {
  24830. "type": "object",
  24831. "properties": {
  24832. "read": {
  24833. "type": "number"
  24834. },
  24835. "write": {
  24836. "type": "number"
  24837. }
  24838. },
  24839. "required": ["read", "write"],
  24840. "additionalProperties": false
  24841. }
  24842. },
  24843. "required": ["input", "output", "reasoning", "cache"],
  24844. "additionalProperties": false
  24845. },
  24846. "snapshot": {
  24847. "type": "string"
  24848. }
  24849. },
  24850. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  24851. "additionalProperties": false
  24852. }
  24853. },
  24854. "required": ["type", "id", "seq", "aggregateID", "data"],
  24855. "additionalProperties": false
  24856. }
  24857. },
  24858. "required": ["type", "id", "syncEvent"],
  24859. "additionalProperties": false
  24860. },
  24861. "SyncEventSessionNextStepFailed": {
  24862. "type": "object",
  24863. "properties": {
  24864. "type": {
  24865. "type": "string",
  24866. "enum": ["sync"]
  24867. },
  24868. "id": {
  24869. "type": "string",
  24870. "pattern": "^evt_"
  24871. },
  24872. "syncEvent": {
  24873. "type": "object",
  24874. "properties": {
  24875. "type": {
  24876. "type": "string",
  24877. "enum": ["session.next.step.failed.2"]
  24878. },
  24879. "id": {
  24880. "type": "string",
  24881. "pattern": "^evt_"
  24882. },
  24883. "seq": {
  24884. "type": "number"
  24885. },
  24886. "aggregateID": {
  24887. "type": "string"
  24888. },
  24889. "data": {
  24890. "type": "object",
  24891. "properties": {
  24892. "timestamp": {
  24893. "type": "number"
  24894. },
  24895. "sessionID": {
  24896. "type": "string",
  24897. "pattern": "^ses"
  24898. },
  24899. "assistantMessageID": {
  24900. "type": "string",
  24901. "pattern": "^msg_"
  24902. },
  24903. "error": {
  24904. "$ref": "#/components/schemas/SessionErrorUnknown"
  24905. }
  24906. },
  24907. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  24908. "additionalProperties": false
  24909. }
  24910. },
  24911. "required": ["type", "id", "seq", "aggregateID", "data"],
  24912. "additionalProperties": false
  24913. }
  24914. },
  24915. "required": ["type", "id", "syncEvent"],
  24916. "additionalProperties": false
  24917. },
  24918. "SyncEventSessionNextTextStarted": {
  24919. "type": "object",
  24920. "properties": {
  24921. "type": {
  24922. "type": "string",
  24923. "enum": ["sync"]
  24924. },
  24925. "id": {
  24926. "type": "string",
  24927. "pattern": "^evt_"
  24928. },
  24929. "syncEvent": {
  24930. "type": "object",
  24931. "properties": {
  24932. "type": {
  24933. "type": "string",
  24934. "enum": ["session.next.text.started.1"]
  24935. },
  24936. "id": {
  24937. "type": "string",
  24938. "pattern": "^evt_"
  24939. },
  24940. "seq": {
  24941. "type": "number"
  24942. },
  24943. "aggregateID": {
  24944. "type": "string"
  24945. },
  24946. "data": {
  24947. "type": "object",
  24948. "properties": {
  24949. "timestamp": {
  24950. "type": "number"
  24951. },
  24952. "sessionID": {
  24953. "type": "string",
  24954. "pattern": "^ses"
  24955. },
  24956. "assistantMessageID": {
  24957. "type": "string",
  24958. "pattern": "^msg_"
  24959. },
  24960. "textID": {
  24961. "type": "string"
  24962. }
  24963. },
  24964. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  24965. "additionalProperties": false
  24966. }
  24967. },
  24968. "required": ["type", "id", "seq", "aggregateID", "data"],
  24969. "additionalProperties": false
  24970. }
  24971. },
  24972. "required": ["type", "id", "syncEvent"],
  24973. "additionalProperties": false
  24974. },
  24975. "SyncEventSessionNextTextEnded": {
  24976. "type": "object",
  24977. "properties": {
  24978. "type": {
  24979. "type": "string",
  24980. "enum": ["sync"]
  24981. },
  24982. "id": {
  24983. "type": "string",
  24984. "pattern": "^evt_"
  24985. },
  24986. "syncEvent": {
  24987. "type": "object",
  24988. "properties": {
  24989. "type": {
  24990. "type": "string",
  24991. "enum": ["session.next.text.ended.1"]
  24992. },
  24993. "id": {
  24994. "type": "string",
  24995. "pattern": "^evt_"
  24996. },
  24997. "seq": {
  24998. "type": "number"
  24999. },
  25000. "aggregateID": {
  25001. "type": "string"
  25002. },
  25003. "data": {
  25004. "type": "object",
  25005. "properties": {
  25006. "timestamp": {
  25007. "type": "number"
  25008. },
  25009. "sessionID": {
  25010. "type": "string",
  25011. "pattern": "^ses"
  25012. },
  25013. "assistantMessageID": {
  25014. "type": "string",
  25015. "pattern": "^msg_"
  25016. },
  25017. "textID": {
  25018. "type": "string"
  25019. },
  25020. "text": {
  25021. "type": "string"
  25022. }
  25023. },
  25024. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  25025. "additionalProperties": false
  25026. }
  25027. },
  25028. "required": ["type", "id", "seq", "aggregateID", "data"],
  25029. "additionalProperties": false
  25030. }
  25031. },
  25032. "required": ["type", "id", "syncEvent"],
  25033. "additionalProperties": false
  25034. },
  25035. "SyncEventSessionNextReasoningStarted": {
  25036. "type": "object",
  25037. "properties": {
  25038. "type": {
  25039. "type": "string",
  25040. "enum": ["sync"]
  25041. },
  25042. "id": {
  25043. "type": "string",
  25044. "pattern": "^evt_"
  25045. },
  25046. "syncEvent": {
  25047. "type": "object",
  25048. "properties": {
  25049. "type": {
  25050. "type": "string",
  25051. "enum": ["session.next.reasoning.started.1"]
  25052. },
  25053. "id": {
  25054. "type": "string",
  25055. "pattern": "^evt_"
  25056. },
  25057. "seq": {
  25058. "type": "number"
  25059. },
  25060. "aggregateID": {
  25061. "type": "string"
  25062. },
  25063. "data": {
  25064. "type": "object",
  25065. "properties": {
  25066. "timestamp": {
  25067. "type": "number"
  25068. },
  25069. "sessionID": {
  25070. "type": "string",
  25071. "pattern": "^ses"
  25072. },
  25073. "assistantMessageID": {
  25074. "type": "string",
  25075. "pattern": "^msg_"
  25076. },
  25077. "reasoningID": {
  25078. "type": "string"
  25079. },
  25080. "providerMetadata": {
  25081. "type": "object",
  25082. "additionalProperties": {
  25083. "type": "object"
  25084. }
  25085. }
  25086. },
  25087. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  25088. "additionalProperties": false
  25089. }
  25090. },
  25091. "required": ["type", "id", "seq", "aggregateID", "data"],
  25092. "additionalProperties": false
  25093. }
  25094. },
  25095. "required": ["type", "id", "syncEvent"],
  25096. "additionalProperties": false
  25097. },
  25098. "SyncEventSessionNextReasoningEnded": {
  25099. "type": "object",
  25100. "properties": {
  25101. "type": {
  25102. "type": "string",
  25103. "enum": ["sync"]
  25104. },
  25105. "id": {
  25106. "type": "string",
  25107. "pattern": "^evt_"
  25108. },
  25109. "syncEvent": {
  25110. "type": "object",
  25111. "properties": {
  25112. "type": {
  25113. "type": "string",
  25114. "enum": ["session.next.reasoning.ended.1"]
  25115. },
  25116. "id": {
  25117. "type": "string",
  25118. "pattern": "^evt_"
  25119. },
  25120. "seq": {
  25121. "type": "number"
  25122. },
  25123. "aggregateID": {
  25124. "type": "string"
  25125. },
  25126. "data": {
  25127. "type": "object",
  25128. "properties": {
  25129. "timestamp": {
  25130. "type": "number"
  25131. },
  25132. "sessionID": {
  25133. "type": "string",
  25134. "pattern": "^ses"
  25135. },
  25136. "assistantMessageID": {
  25137. "type": "string",
  25138. "pattern": "^msg_"
  25139. },
  25140. "reasoningID": {
  25141. "type": "string"
  25142. },
  25143. "text": {
  25144. "type": "string"
  25145. },
  25146. "providerMetadata": {
  25147. "type": "object",
  25148. "additionalProperties": {
  25149. "type": "object"
  25150. }
  25151. }
  25152. },
  25153. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  25154. "additionalProperties": false
  25155. }
  25156. },
  25157. "required": ["type", "id", "seq", "aggregateID", "data"],
  25158. "additionalProperties": false
  25159. }
  25160. },
  25161. "required": ["type", "id", "syncEvent"],
  25162. "additionalProperties": false
  25163. },
  25164. "SyncEventSessionNextToolInputStarted": {
  25165. "type": "object",
  25166. "properties": {
  25167. "type": {
  25168. "type": "string",
  25169. "enum": ["sync"]
  25170. },
  25171. "id": {
  25172. "type": "string",
  25173. "pattern": "^evt_"
  25174. },
  25175. "syncEvent": {
  25176. "type": "object",
  25177. "properties": {
  25178. "type": {
  25179. "type": "string",
  25180. "enum": ["session.next.tool.input.started.1"]
  25181. },
  25182. "id": {
  25183. "type": "string",
  25184. "pattern": "^evt_"
  25185. },
  25186. "seq": {
  25187. "type": "number"
  25188. },
  25189. "aggregateID": {
  25190. "type": "string"
  25191. },
  25192. "data": {
  25193. "type": "object",
  25194. "properties": {
  25195. "timestamp": {
  25196. "type": "number"
  25197. },
  25198. "sessionID": {
  25199. "type": "string",
  25200. "pattern": "^ses"
  25201. },
  25202. "assistantMessageID": {
  25203. "type": "string",
  25204. "pattern": "^msg_"
  25205. },
  25206. "callID": {
  25207. "type": "string"
  25208. },
  25209. "name": {
  25210. "type": "string"
  25211. }
  25212. },
  25213. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  25214. "additionalProperties": false
  25215. }
  25216. },
  25217. "required": ["type", "id", "seq", "aggregateID", "data"],
  25218. "additionalProperties": false
  25219. }
  25220. },
  25221. "required": ["type", "id", "syncEvent"],
  25222. "additionalProperties": false
  25223. },
  25224. "SyncEventSessionNextToolInputEnded": {
  25225. "type": "object",
  25226. "properties": {
  25227. "type": {
  25228. "type": "string",
  25229. "enum": ["sync"]
  25230. },
  25231. "id": {
  25232. "type": "string",
  25233. "pattern": "^evt_"
  25234. },
  25235. "syncEvent": {
  25236. "type": "object",
  25237. "properties": {
  25238. "type": {
  25239. "type": "string",
  25240. "enum": ["session.next.tool.input.ended.1"]
  25241. },
  25242. "id": {
  25243. "type": "string",
  25244. "pattern": "^evt_"
  25245. },
  25246. "seq": {
  25247. "type": "number"
  25248. },
  25249. "aggregateID": {
  25250. "type": "string"
  25251. },
  25252. "data": {
  25253. "type": "object",
  25254. "properties": {
  25255. "timestamp": {
  25256. "type": "number"
  25257. },
  25258. "sessionID": {
  25259. "type": "string",
  25260. "pattern": "^ses"
  25261. },
  25262. "assistantMessageID": {
  25263. "type": "string",
  25264. "pattern": "^msg_"
  25265. },
  25266. "callID": {
  25267. "type": "string"
  25268. },
  25269. "text": {
  25270. "type": "string"
  25271. }
  25272. },
  25273. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  25274. "additionalProperties": false
  25275. }
  25276. },
  25277. "required": ["type", "id", "seq", "aggregateID", "data"],
  25278. "additionalProperties": false
  25279. }
  25280. },
  25281. "required": ["type", "id", "syncEvent"],
  25282. "additionalProperties": false
  25283. },
  25284. "SyncEventSessionNextToolCalled": {
  25285. "type": "object",
  25286. "properties": {
  25287. "type": {
  25288. "type": "string",
  25289. "enum": ["sync"]
  25290. },
  25291. "id": {
  25292. "type": "string",
  25293. "pattern": "^evt_"
  25294. },
  25295. "syncEvent": {
  25296. "type": "object",
  25297. "properties": {
  25298. "type": {
  25299. "type": "string",
  25300. "enum": ["session.next.tool.called.1"]
  25301. },
  25302. "id": {
  25303. "type": "string",
  25304. "pattern": "^evt_"
  25305. },
  25306. "seq": {
  25307. "type": "number"
  25308. },
  25309. "aggregateID": {
  25310. "type": "string"
  25311. },
  25312. "data": {
  25313. "type": "object",
  25314. "properties": {
  25315. "timestamp": {
  25316. "type": "number"
  25317. },
  25318. "sessionID": {
  25319. "type": "string",
  25320. "pattern": "^ses"
  25321. },
  25322. "assistantMessageID": {
  25323. "type": "string",
  25324. "pattern": "^msg_"
  25325. },
  25326. "callID": {
  25327. "type": "string"
  25328. },
  25329. "tool": {
  25330. "type": "string"
  25331. },
  25332. "input": {
  25333. "type": "object"
  25334. },
  25335. "provider": {
  25336. "type": "object",
  25337. "properties": {
  25338. "executed": {
  25339. "type": "boolean"
  25340. },
  25341. "metadata": {
  25342. "type": "object",
  25343. "additionalProperties": {
  25344. "type": "object"
  25345. }
  25346. }
  25347. },
  25348. "required": ["executed"],
  25349. "additionalProperties": false
  25350. }
  25351. },
  25352. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  25353. "additionalProperties": false
  25354. }
  25355. },
  25356. "required": ["type", "id", "seq", "aggregateID", "data"],
  25357. "additionalProperties": false
  25358. }
  25359. },
  25360. "required": ["type", "id", "syncEvent"],
  25361. "additionalProperties": false
  25362. },
  25363. "SyncEventSessionNextToolProgress": {
  25364. "type": "object",
  25365. "properties": {
  25366. "type": {
  25367. "type": "string",
  25368. "enum": ["sync"]
  25369. },
  25370. "id": {
  25371. "type": "string",
  25372. "pattern": "^evt_"
  25373. },
  25374. "syncEvent": {
  25375. "type": "object",
  25376. "properties": {
  25377. "type": {
  25378. "type": "string",
  25379. "enum": ["session.next.tool.progress.1"]
  25380. },
  25381. "id": {
  25382. "type": "string",
  25383. "pattern": "^evt_"
  25384. },
  25385. "seq": {
  25386. "type": "number"
  25387. },
  25388. "aggregateID": {
  25389. "type": "string"
  25390. },
  25391. "data": {
  25392. "type": "object",
  25393. "properties": {
  25394. "timestamp": {
  25395. "type": "number"
  25396. },
  25397. "sessionID": {
  25398. "type": "string",
  25399. "pattern": "^ses"
  25400. },
  25401. "assistantMessageID": {
  25402. "type": "string",
  25403. "pattern": "^msg_"
  25404. },
  25405. "callID": {
  25406. "type": "string"
  25407. },
  25408. "structured": {
  25409. "type": "object"
  25410. },
  25411. "content": {
  25412. "type": "array",
  25413. "items": {
  25414. "anyOf": [
  25415. {
  25416. "$ref": "#/components/schemas/ToolTextContent"
  25417. },
  25418. {
  25419. "$ref": "#/components/schemas/ToolFileContent"
  25420. }
  25421. ]
  25422. }
  25423. }
  25424. },
  25425. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  25426. "additionalProperties": false
  25427. }
  25428. },
  25429. "required": ["type", "id", "seq", "aggregateID", "data"],
  25430. "additionalProperties": false
  25431. }
  25432. },
  25433. "required": ["type", "id", "syncEvent"],
  25434. "additionalProperties": false
  25435. },
  25436. "SyncEventSessionNextToolSuccess": {
  25437. "type": "object",
  25438. "properties": {
  25439. "type": {
  25440. "type": "string",
  25441. "enum": ["sync"]
  25442. },
  25443. "id": {
  25444. "type": "string",
  25445. "pattern": "^evt_"
  25446. },
  25447. "syncEvent": {
  25448. "type": "object",
  25449. "properties": {
  25450. "type": {
  25451. "type": "string",
  25452. "enum": ["session.next.tool.success.1"]
  25453. },
  25454. "id": {
  25455. "type": "string",
  25456. "pattern": "^evt_"
  25457. },
  25458. "seq": {
  25459. "type": "number"
  25460. },
  25461. "aggregateID": {
  25462. "type": "string"
  25463. },
  25464. "data": {
  25465. "type": "object",
  25466. "properties": {
  25467. "timestamp": {
  25468. "type": "number"
  25469. },
  25470. "sessionID": {
  25471. "type": "string",
  25472. "pattern": "^ses"
  25473. },
  25474. "assistantMessageID": {
  25475. "type": "string",
  25476. "pattern": "^msg_"
  25477. },
  25478. "callID": {
  25479. "type": "string"
  25480. },
  25481. "structured": {
  25482. "type": "object"
  25483. },
  25484. "content": {
  25485. "type": "array",
  25486. "items": {
  25487. "anyOf": [
  25488. {
  25489. "$ref": "#/components/schemas/ToolTextContent"
  25490. },
  25491. {
  25492. "$ref": "#/components/schemas/ToolFileContent"
  25493. }
  25494. ]
  25495. }
  25496. },
  25497. "outputPaths": {
  25498. "type": "array",
  25499. "items": {
  25500. "type": "string"
  25501. }
  25502. },
  25503. "result": {},
  25504. "provider": {
  25505. "type": "object",
  25506. "properties": {
  25507. "executed": {
  25508. "type": "boolean"
  25509. },
  25510. "metadata": {
  25511. "type": "object",
  25512. "additionalProperties": {
  25513. "type": "object"
  25514. }
  25515. }
  25516. },
  25517. "required": ["executed"],
  25518. "additionalProperties": false
  25519. }
  25520. },
  25521. "required": [
  25522. "timestamp",
  25523. "sessionID",
  25524. "assistantMessageID",
  25525. "callID",
  25526. "structured",
  25527. "content",
  25528. "provider"
  25529. ],
  25530. "additionalProperties": false
  25531. }
  25532. },
  25533. "required": ["type", "id", "seq", "aggregateID", "data"],
  25534. "additionalProperties": false
  25535. }
  25536. },
  25537. "required": ["type", "id", "syncEvent"],
  25538. "additionalProperties": false
  25539. },
  25540. "SyncEventSessionNextToolFailed": {
  25541. "type": "object",
  25542. "properties": {
  25543. "type": {
  25544. "type": "string",
  25545. "enum": ["sync"]
  25546. },
  25547. "id": {
  25548. "type": "string",
  25549. "pattern": "^evt_"
  25550. },
  25551. "syncEvent": {
  25552. "type": "object",
  25553. "properties": {
  25554. "type": {
  25555. "type": "string",
  25556. "enum": ["session.next.tool.failed.1"]
  25557. },
  25558. "id": {
  25559. "type": "string",
  25560. "pattern": "^evt_"
  25561. },
  25562. "seq": {
  25563. "type": "number"
  25564. },
  25565. "aggregateID": {
  25566. "type": "string"
  25567. },
  25568. "data": {
  25569. "type": "object",
  25570. "properties": {
  25571. "timestamp": {
  25572. "type": "number"
  25573. },
  25574. "sessionID": {
  25575. "type": "string",
  25576. "pattern": "^ses"
  25577. },
  25578. "assistantMessageID": {
  25579. "type": "string",
  25580. "pattern": "^msg_"
  25581. },
  25582. "callID": {
  25583. "type": "string"
  25584. },
  25585. "error": {
  25586. "$ref": "#/components/schemas/SessionErrorUnknown"
  25587. },
  25588. "result": {},
  25589. "provider": {
  25590. "type": "object",
  25591. "properties": {
  25592. "executed": {
  25593. "type": "boolean"
  25594. },
  25595. "metadata": {
  25596. "type": "object",
  25597. "additionalProperties": {
  25598. "type": "object"
  25599. }
  25600. }
  25601. },
  25602. "required": ["executed"],
  25603. "additionalProperties": false
  25604. }
  25605. },
  25606. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  25607. "additionalProperties": false
  25608. }
  25609. },
  25610. "required": ["type", "id", "seq", "aggregateID", "data"],
  25611. "additionalProperties": false
  25612. }
  25613. },
  25614. "required": ["type", "id", "syncEvent"],
  25615. "additionalProperties": false
  25616. },
  25617. "SyncEventSessionNextRetried": {
  25618. "type": "object",
  25619. "properties": {
  25620. "type": {
  25621. "type": "string",
  25622. "enum": ["sync"]
  25623. },
  25624. "id": {
  25625. "type": "string",
  25626. "pattern": "^evt_"
  25627. },
  25628. "syncEvent": {
  25629. "type": "object",
  25630. "properties": {
  25631. "type": {
  25632. "type": "string",
  25633. "enum": ["session.next.retried.1"]
  25634. },
  25635. "id": {
  25636. "type": "string",
  25637. "pattern": "^evt_"
  25638. },
  25639. "seq": {
  25640. "type": "number"
  25641. },
  25642. "aggregateID": {
  25643. "type": "string"
  25644. },
  25645. "data": {
  25646. "type": "object",
  25647. "properties": {
  25648. "timestamp": {
  25649. "type": "number"
  25650. },
  25651. "sessionID": {
  25652. "type": "string",
  25653. "pattern": "^ses"
  25654. },
  25655. "attempt": {
  25656. "type": "number"
  25657. },
  25658. "error": {
  25659. "$ref": "#/components/schemas/SessionNextRetry_error"
  25660. }
  25661. },
  25662. "required": ["timestamp", "sessionID", "attempt", "error"],
  25663. "additionalProperties": false
  25664. }
  25665. },
  25666. "required": ["type", "id", "seq", "aggregateID", "data"],
  25667. "additionalProperties": false
  25668. }
  25669. },
  25670. "required": ["type", "id", "syncEvent"],
  25671. "additionalProperties": false
  25672. },
  25673. "SyncEventSessionNextCompactionStarted": {
  25674. "type": "object",
  25675. "properties": {
  25676. "type": {
  25677. "type": "string",
  25678. "enum": ["sync"]
  25679. },
  25680. "id": {
  25681. "type": "string",
  25682. "pattern": "^evt_"
  25683. },
  25684. "syncEvent": {
  25685. "type": "object",
  25686. "properties": {
  25687. "type": {
  25688. "type": "string",
  25689. "enum": ["session.next.compaction.started.1"]
  25690. },
  25691. "id": {
  25692. "type": "string",
  25693. "pattern": "^evt_"
  25694. },
  25695. "seq": {
  25696. "type": "number"
  25697. },
  25698. "aggregateID": {
  25699. "type": "string"
  25700. },
  25701. "data": {
  25702. "type": "object",
  25703. "properties": {
  25704. "timestamp": {
  25705. "type": "number"
  25706. },
  25707. "sessionID": {
  25708. "type": "string",
  25709. "pattern": "^ses"
  25710. },
  25711. "messageID": {
  25712. "type": "string",
  25713. "pattern": "^msg_"
  25714. },
  25715. "reason": {
  25716. "type": "string",
  25717. "enum": ["auto", "manual"]
  25718. }
  25719. },
  25720. "required": ["timestamp", "sessionID", "messageID", "reason"],
  25721. "additionalProperties": false
  25722. }
  25723. },
  25724. "required": ["type", "id", "seq", "aggregateID", "data"],
  25725. "additionalProperties": false
  25726. }
  25727. },
  25728. "required": ["type", "id", "syncEvent"],
  25729. "additionalProperties": false
  25730. },
  25731. "SyncEventSessionNextCompactionEnded": {
  25732. "type": "object",
  25733. "properties": {
  25734. "type": {
  25735. "type": "string",
  25736. "enum": ["sync"]
  25737. },
  25738. "id": {
  25739. "type": "string",
  25740. "pattern": "^evt_"
  25741. },
  25742. "syncEvent": {
  25743. "type": "object",
  25744. "properties": {
  25745. "type": {
  25746. "type": "string",
  25747. "enum": ["session.next.compaction.ended.1"]
  25748. },
  25749. "id": {
  25750. "type": "string",
  25751. "pattern": "^evt_"
  25752. },
  25753. "seq": {
  25754. "type": "number"
  25755. },
  25756. "aggregateID": {
  25757. "type": "string"
  25758. },
  25759. "data": {
  25760. "type": "object",
  25761. "properties": {
  25762. "timestamp": {
  25763. "type": "number"
  25764. },
  25765. "sessionID": {
  25766. "type": "string",
  25767. "pattern": "^ses"
  25768. },
  25769. "messageID": {
  25770. "type": "string",
  25771. "pattern": "^msg_"
  25772. },
  25773. "reason": {
  25774. "type": "string",
  25775. "enum": ["auto", "manual"]
  25776. },
  25777. "text": {
  25778. "type": "string"
  25779. },
  25780. "recent": {
  25781. "type": "string"
  25782. }
  25783. },
  25784. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  25785. "additionalProperties": false
  25786. }
  25787. },
  25788. "required": ["type", "id", "seq", "aggregateID", "data"],
  25789. "additionalProperties": false
  25790. }
  25791. },
  25792. "required": ["type", "id", "syncEvent"],
  25793. "additionalProperties": false
  25794. },
  25795. "ConfigV2ReferenceGit": {
  25796. "type": "object",
  25797. "properties": {
  25798. "repository": {
  25799. "type": "string"
  25800. },
  25801. "branch": {
  25802. "type": "string"
  25803. },
  25804. "description": {
  25805. "type": "string"
  25806. },
  25807. "hidden": {
  25808. "type": "boolean"
  25809. }
  25810. },
  25811. "required": ["repository"],
  25812. "additionalProperties": false
  25813. },
  25814. "ConfigV2ReferenceLocal": {
  25815. "type": "object",
  25816. "properties": {
  25817. "path": {
  25818. "type": "string"
  25819. },
  25820. "description": {
  25821. "type": "string"
  25822. },
  25823. "hidden": {
  25824. "type": "boolean"
  25825. }
  25826. },
  25827. "required": ["path"],
  25828. "additionalProperties": false
  25829. },
  25830. "PolicyEffect": {
  25831. "type": "string",
  25832. "enum": ["allow", "deny"]
  25833. },
  25834. "ConfigV2ExperimentalPolicy": {
  25835. "type": "object",
  25836. "properties": {
  25837. "action": {
  25838. "type": "string",
  25839. "enum": ["provider.use"]
  25840. },
  25841. "effect": {
  25842. "$ref": "#/components/schemas/PolicyEffect"
  25843. },
  25844. "resource": {
  25845. "type": "string"
  25846. }
  25847. },
  25848. "required": ["action", "effect", "resource"],
  25849. "additionalProperties": false
  25850. },
  25851. "ProjectDirectories": {
  25852. "type": "array",
  25853. "items": {
  25854. "type": "object",
  25855. "properties": {
  25856. "directory": {
  25857. "type": "string"
  25858. },
  25859. "strategy": {
  25860. "type": "string"
  25861. }
  25862. },
  25863. "required": ["directory"],
  25864. "additionalProperties": false
  25865. }
  25866. },
  25867. "LocationInfo": {
  25868. "type": "object",
  25869. "properties": {
  25870. "directory": {
  25871. "type": "string"
  25872. },
  25873. "workspaceID": {
  25874. "type": "string",
  25875. "pattern": "^wrk"
  25876. },
  25877. "project": {
  25878. "type": "object",
  25879. "properties": {
  25880. "id": {
  25881. "type": "string"
  25882. },
  25883. "directory": {
  25884. "type": "string"
  25885. }
  25886. },
  25887. "required": ["id", "directory"],
  25888. "additionalProperties": false
  25889. }
  25890. },
  25891. "required": ["directory", "project"],
  25892. "additionalProperties": false
  25893. },
  25894. "PermissionV2Effect": {
  25895. "type": "string",
  25896. "enum": ["allow", "deny", "ask"]
  25897. },
  25898. "PermissionV2Rule": {
  25899. "type": "object",
  25900. "properties": {
  25901. "action": {
  25902. "type": "string"
  25903. },
  25904. "resource": {
  25905. "type": "string"
  25906. },
  25907. "effect": {
  25908. "$ref": "#/components/schemas/PermissionV2Effect"
  25909. }
  25910. },
  25911. "required": ["action", "resource", "effect"],
  25912. "additionalProperties": false
  25913. },
  25914. "PermissionV2Ruleset": {
  25915. "type": "array",
  25916. "items": {
  25917. "$ref": "#/components/schemas/PermissionV2Rule"
  25918. }
  25919. },
  25920. "AgentV2Info": {
  25921. "type": "object",
  25922. "properties": {
  25923. "id": {
  25924. "type": "string"
  25925. },
  25926. "model": {
  25927. "type": "object",
  25928. "properties": {
  25929. "id": {
  25930. "type": "string"
  25931. },
  25932. "providerID": {
  25933. "type": "string"
  25934. },
  25935. "variant": {
  25936. "type": "string"
  25937. }
  25938. },
  25939. "required": ["id", "providerID"],
  25940. "additionalProperties": false
  25941. },
  25942. "request": {
  25943. "type": "object",
  25944. "properties": {
  25945. "headers": {
  25946. "type": "object",
  25947. "additionalProperties": {
  25948. "type": "string"
  25949. }
  25950. },
  25951. "body": {
  25952. "type": "object"
  25953. }
  25954. },
  25955. "required": ["headers", "body"],
  25956. "additionalProperties": false
  25957. },
  25958. "system": {
  25959. "type": "string"
  25960. },
  25961. "description": {
  25962. "type": "string"
  25963. },
  25964. "mode": {
  25965. "type": "string",
  25966. "enum": ["subagent", "primary", "all"]
  25967. },
  25968. "hidden": {
  25969. "type": "boolean"
  25970. },
  25971. "color": {
  25972. "anyOf": [
  25973. {
  25974. "type": "string",
  25975. "pattern": "^#[0-9a-fA-F]{6}$"
  25976. },
  25977. {
  25978. "type": "string",
  25979. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  25980. }
  25981. ]
  25982. },
  25983. "steps": {
  25984. "type": "integer",
  25985. "exclusiveMinimum": 0
  25986. },
  25987. "permissions": {
  25988. "$ref": "#/components/schemas/PermissionV2Ruleset"
  25989. }
  25990. },
  25991. "required": ["id", "request", "mode", "hidden", "permissions"],
  25992. "additionalProperties": false
  25993. },
  25994. "SessionV2Info": {
  25995. "type": "object",
  25996. "properties": {
  25997. "id": {
  25998. "type": "string",
  25999. "pattern": "^ses"
  26000. },
  26001. "parentID": {
  26002. "type": "string",
  26003. "pattern": "^ses"
  26004. },
  26005. "projectID": {
  26006. "type": "string"
  26007. },
  26008. "agent": {
  26009. "type": "string"
  26010. },
  26011. "model": {
  26012. "type": "object",
  26013. "properties": {
  26014. "id": {
  26015. "type": "string"
  26016. },
  26017. "providerID": {
  26018. "type": "string"
  26019. },
  26020. "variant": {
  26021. "type": "string"
  26022. }
  26023. },
  26024. "required": ["id", "providerID"],
  26025. "additionalProperties": false
  26026. },
  26027. "cost": {
  26028. "type": "number"
  26029. },
  26030. "tokens": {
  26031. "type": "object",
  26032. "properties": {
  26033. "input": {
  26034. "type": "number"
  26035. },
  26036. "output": {
  26037. "type": "number"
  26038. },
  26039. "reasoning": {
  26040. "type": "number"
  26041. },
  26042. "cache": {
  26043. "type": "object",
  26044. "properties": {
  26045. "read": {
  26046. "type": "number"
  26047. },
  26048. "write": {
  26049. "type": "number"
  26050. }
  26051. },
  26052. "required": ["read", "write"],
  26053. "additionalProperties": false
  26054. }
  26055. },
  26056. "required": ["input", "output", "reasoning", "cache"],
  26057. "additionalProperties": false
  26058. },
  26059. "time": {
  26060. "type": "object",
  26061. "properties": {
  26062. "created": {
  26063. "type": "number"
  26064. },
  26065. "updated": {
  26066. "type": "number"
  26067. },
  26068. "archived": {
  26069. "type": "number"
  26070. }
  26071. },
  26072. "required": ["created", "updated"],
  26073. "additionalProperties": false
  26074. },
  26075. "title": {
  26076. "type": "string"
  26077. },
  26078. "location": {
  26079. "$ref": "#/components/schemas/LocationRef"
  26080. },
  26081. "subpath": {
  26082. "type": "string"
  26083. }
  26084. },
  26085. "required": ["id", "projectID", "cost", "tokens", "time", "title", "location"],
  26086. "additionalProperties": false
  26087. },
  26088. "SessionInputAdmitted": {
  26089. "type": "object",
  26090. "properties": {
  26091. "admittedSeq": {
  26092. "type": "integer",
  26093. "minimum": 0
  26094. },
  26095. "id": {
  26096. "type": "string",
  26097. "pattern": "^msg_"
  26098. },
  26099. "sessionID": {
  26100. "type": "string",
  26101. "pattern": "^ses"
  26102. },
  26103. "prompt": {
  26104. "$ref": "#/components/schemas/Prompt"
  26105. },
  26106. "delivery": {
  26107. "type": "string",
  26108. "enum": ["steer", "queue"]
  26109. },
  26110. "timeCreated": {
  26111. "type": "number"
  26112. },
  26113. "promotedSeq": {
  26114. "type": "integer",
  26115. "minimum": 0
  26116. }
  26117. },
  26118. "required": ["admittedSeq", "id", "sessionID", "prompt", "delivery", "timeCreated"],
  26119. "additionalProperties": false
  26120. },
  26121. "SessionMessageAgentSwitched": {
  26122. "type": "object",
  26123. "properties": {
  26124. "id": {
  26125. "type": "string",
  26126. "pattern": "^msg_"
  26127. },
  26128. "metadata": {
  26129. "type": "object"
  26130. },
  26131. "time": {
  26132. "type": "object",
  26133. "properties": {
  26134. "created": {
  26135. "type": "number"
  26136. }
  26137. },
  26138. "required": ["created"],
  26139. "additionalProperties": false
  26140. },
  26141. "type": {
  26142. "type": "string",
  26143. "enum": ["agent-switched"]
  26144. },
  26145. "agent": {
  26146. "type": "string"
  26147. }
  26148. },
  26149. "required": ["id", "time", "type", "agent"],
  26150. "additionalProperties": false
  26151. },
  26152. "SessionMessageModelSwitched": {
  26153. "type": "object",
  26154. "properties": {
  26155. "id": {
  26156. "type": "string",
  26157. "pattern": "^msg_"
  26158. },
  26159. "metadata": {
  26160. "type": "object"
  26161. },
  26162. "time": {
  26163. "type": "object",
  26164. "properties": {
  26165. "created": {
  26166. "type": "number"
  26167. }
  26168. },
  26169. "required": ["created"],
  26170. "additionalProperties": false
  26171. },
  26172. "type": {
  26173. "type": "string",
  26174. "enum": ["model-switched"]
  26175. },
  26176. "model": {
  26177. "type": "object",
  26178. "properties": {
  26179. "id": {
  26180. "type": "string"
  26181. },
  26182. "providerID": {
  26183. "type": "string"
  26184. },
  26185. "variant": {
  26186. "type": "string"
  26187. }
  26188. },
  26189. "required": ["id", "providerID"],
  26190. "additionalProperties": false
  26191. }
  26192. },
  26193. "required": ["id", "time", "type", "model"],
  26194. "additionalProperties": false
  26195. },
  26196. "SessionMessageUser": {
  26197. "type": "object",
  26198. "properties": {
  26199. "id": {
  26200. "type": "string",
  26201. "pattern": "^msg_"
  26202. },
  26203. "metadata": {
  26204. "type": "object"
  26205. },
  26206. "time": {
  26207. "type": "object",
  26208. "properties": {
  26209. "created": {
  26210. "type": "number"
  26211. }
  26212. },
  26213. "required": ["created"],
  26214. "additionalProperties": false
  26215. },
  26216. "text": {
  26217. "type": "string"
  26218. },
  26219. "files": {
  26220. "type": "array",
  26221. "items": {
  26222. "$ref": "#/components/schemas/PromptFileAttachment"
  26223. }
  26224. },
  26225. "agents": {
  26226. "type": "array",
  26227. "items": {
  26228. "$ref": "#/components/schemas/PromptAgentAttachment"
  26229. }
  26230. },
  26231. "type": {
  26232. "type": "string",
  26233. "enum": ["user"]
  26234. }
  26235. },
  26236. "required": ["id", "time", "text", "type"],
  26237. "additionalProperties": false
  26238. },
  26239. "SessionMessageSynthetic": {
  26240. "type": "object",
  26241. "properties": {
  26242. "id": {
  26243. "type": "string",
  26244. "pattern": "^msg_"
  26245. },
  26246. "metadata": {
  26247. "type": "object"
  26248. },
  26249. "time": {
  26250. "type": "object",
  26251. "properties": {
  26252. "created": {
  26253. "type": "number"
  26254. }
  26255. },
  26256. "required": ["created"],
  26257. "additionalProperties": false
  26258. },
  26259. "sessionID": {
  26260. "type": "string",
  26261. "pattern": "^ses"
  26262. },
  26263. "text": {
  26264. "type": "string"
  26265. },
  26266. "type": {
  26267. "type": "string",
  26268. "enum": ["synthetic"]
  26269. }
  26270. },
  26271. "required": ["id", "time", "sessionID", "text", "type"],
  26272. "additionalProperties": false
  26273. },
  26274. "SessionMessageSystem": {
  26275. "type": "object",
  26276. "properties": {
  26277. "id": {
  26278. "type": "string",
  26279. "pattern": "^msg_"
  26280. },
  26281. "metadata": {
  26282. "type": "object"
  26283. },
  26284. "time": {
  26285. "type": "object",
  26286. "properties": {
  26287. "created": {
  26288. "type": "number"
  26289. }
  26290. },
  26291. "required": ["created"],
  26292. "additionalProperties": false
  26293. },
  26294. "type": {
  26295. "type": "string",
  26296. "enum": ["system"]
  26297. },
  26298. "text": {
  26299. "type": "string"
  26300. }
  26301. },
  26302. "required": ["id", "time", "type", "text"],
  26303. "additionalProperties": false
  26304. },
  26305. "SessionMessageShell": {
  26306. "type": "object",
  26307. "properties": {
  26308. "id": {
  26309. "type": "string",
  26310. "pattern": "^msg_"
  26311. },
  26312. "metadata": {
  26313. "type": "object"
  26314. },
  26315. "time": {
  26316. "type": "object",
  26317. "properties": {
  26318. "created": {
  26319. "type": "number"
  26320. },
  26321. "completed": {
  26322. "type": "number"
  26323. }
  26324. },
  26325. "required": ["created"],
  26326. "additionalProperties": false
  26327. },
  26328. "type": {
  26329. "type": "string",
  26330. "enum": ["shell"]
  26331. },
  26332. "callID": {
  26333. "type": "string"
  26334. },
  26335. "command": {
  26336. "type": "string"
  26337. },
  26338. "output": {
  26339. "type": "string"
  26340. }
  26341. },
  26342. "required": ["id", "time", "type", "callID", "command", "output"],
  26343. "additionalProperties": false
  26344. },
  26345. "SessionMessageAssistantText": {
  26346. "type": "object",
  26347. "properties": {
  26348. "type": {
  26349. "type": "string",
  26350. "enum": ["text"]
  26351. },
  26352. "id": {
  26353. "type": "string"
  26354. },
  26355. "text": {
  26356. "type": "string"
  26357. }
  26358. },
  26359. "required": ["type", "id", "text"],
  26360. "additionalProperties": false
  26361. },
  26362. "SessionMessageAssistantReasoning": {
  26363. "type": "object",
  26364. "properties": {
  26365. "type": {
  26366. "type": "string",
  26367. "enum": ["reasoning"]
  26368. },
  26369. "id": {
  26370. "type": "string"
  26371. },
  26372. "text": {
  26373. "type": "string"
  26374. },
  26375. "providerMetadata": {
  26376. "type": "object",
  26377. "additionalProperties": {
  26378. "type": "object"
  26379. }
  26380. }
  26381. },
  26382. "required": ["type", "id", "text"],
  26383. "additionalProperties": false
  26384. },
  26385. "SessionMessageToolStatePending": {
  26386. "type": "object",
  26387. "properties": {
  26388. "status": {
  26389. "type": "string",
  26390. "enum": ["pending"]
  26391. },
  26392. "input": {
  26393. "type": "string"
  26394. }
  26395. },
  26396. "required": ["status", "input"],
  26397. "additionalProperties": false
  26398. },
  26399. "SessionMessageToolStateRunning": {
  26400. "type": "object",
  26401. "properties": {
  26402. "status": {
  26403. "type": "string",
  26404. "enum": ["running"]
  26405. },
  26406. "input": {
  26407. "type": "object"
  26408. },
  26409. "structured": {
  26410. "type": "object"
  26411. },
  26412. "content": {
  26413. "type": "array",
  26414. "items": {
  26415. "anyOf": [
  26416. {
  26417. "$ref": "#/components/schemas/ToolTextContent"
  26418. },
  26419. {
  26420. "$ref": "#/components/schemas/ToolFileContent"
  26421. }
  26422. ]
  26423. }
  26424. }
  26425. },
  26426. "required": ["status", "input", "structured", "content"],
  26427. "additionalProperties": false
  26428. },
  26429. "SessionMessageToolStateCompleted": {
  26430. "type": "object",
  26431. "properties": {
  26432. "status": {
  26433. "type": "string",
  26434. "enum": ["completed"]
  26435. },
  26436. "input": {
  26437. "type": "object"
  26438. },
  26439. "attachments": {
  26440. "type": "array",
  26441. "items": {
  26442. "$ref": "#/components/schemas/PromptFileAttachment"
  26443. }
  26444. },
  26445. "content": {
  26446. "type": "array",
  26447. "items": {
  26448. "anyOf": [
  26449. {
  26450. "$ref": "#/components/schemas/ToolTextContent"
  26451. },
  26452. {
  26453. "$ref": "#/components/schemas/ToolFileContent"
  26454. }
  26455. ]
  26456. }
  26457. },
  26458. "outputPaths": {
  26459. "type": "array",
  26460. "items": {
  26461. "type": "string"
  26462. }
  26463. },
  26464. "structured": {
  26465. "type": "object"
  26466. },
  26467. "result": {}
  26468. },
  26469. "required": ["status", "input", "content", "structured"],
  26470. "additionalProperties": false
  26471. },
  26472. "SessionMessageToolStateError": {
  26473. "type": "object",
  26474. "properties": {
  26475. "status": {
  26476. "type": "string",
  26477. "enum": ["error"]
  26478. },
  26479. "input": {
  26480. "type": "object"
  26481. },
  26482. "content": {
  26483. "type": "array",
  26484. "items": {
  26485. "anyOf": [
  26486. {
  26487. "$ref": "#/components/schemas/ToolTextContent"
  26488. },
  26489. {
  26490. "$ref": "#/components/schemas/ToolFileContent"
  26491. }
  26492. ]
  26493. }
  26494. },
  26495. "structured": {
  26496. "type": "object"
  26497. },
  26498. "error": {
  26499. "$ref": "#/components/schemas/SessionErrorUnknown"
  26500. },
  26501. "result": {}
  26502. },
  26503. "required": ["status", "input", "content", "structured", "error"],
  26504. "additionalProperties": false
  26505. },
  26506. "SessionMessageAssistantTool": {
  26507. "type": "object",
  26508. "properties": {
  26509. "type": {
  26510. "type": "string",
  26511. "enum": ["tool"]
  26512. },
  26513. "id": {
  26514. "type": "string"
  26515. },
  26516. "name": {
  26517. "type": "string"
  26518. },
  26519. "provider": {
  26520. "type": "object",
  26521. "properties": {
  26522. "executed": {
  26523. "type": "boolean"
  26524. },
  26525. "metadata": {
  26526. "type": "object",
  26527. "additionalProperties": {
  26528. "type": "object"
  26529. }
  26530. },
  26531. "resultMetadata": {
  26532. "type": "object",
  26533. "additionalProperties": {
  26534. "type": "object"
  26535. }
  26536. }
  26537. },
  26538. "required": ["executed"],
  26539. "additionalProperties": false
  26540. },
  26541. "state": {
  26542. "anyOf": [
  26543. {
  26544. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  26545. },
  26546. {
  26547. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  26548. },
  26549. {
  26550. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  26551. },
  26552. {
  26553. "$ref": "#/components/schemas/SessionMessageToolStateError"
  26554. }
  26555. ]
  26556. },
  26557. "time": {
  26558. "type": "object",
  26559. "properties": {
  26560. "created": {
  26561. "type": "number"
  26562. },
  26563. "ran": {
  26564. "type": "number"
  26565. },
  26566. "completed": {
  26567. "type": "number"
  26568. },
  26569. "pruned": {
  26570. "type": "number"
  26571. }
  26572. },
  26573. "required": ["created"],
  26574. "additionalProperties": false
  26575. }
  26576. },
  26577. "required": ["type", "id", "name", "state", "time"],
  26578. "additionalProperties": false
  26579. },
  26580. "SessionMessageAssistant": {
  26581. "type": "object",
  26582. "properties": {
  26583. "id": {
  26584. "type": "string",
  26585. "pattern": "^msg_"
  26586. },
  26587. "metadata": {
  26588. "type": "object"
  26589. },
  26590. "time": {
  26591. "type": "object",
  26592. "properties": {
  26593. "created": {
  26594. "type": "number"
  26595. },
  26596. "completed": {
  26597. "type": "number"
  26598. }
  26599. },
  26600. "required": ["created"],
  26601. "additionalProperties": false
  26602. },
  26603. "type": {
  26604. "type": "string",
  26605. "enum": ["assistant"]
  26606. },
  26607. "agent": {
  26608. "type": "string"
  26609. },
  26610. "model": {
  26611. "type": "object",
  26612. "properties": {
  26613. "id": {
  26614. "type": "string"
  26615. },
  26616. "providerID": {
  26617. "type": "string"
  26618. },
  26619. "variant": {
  26620. "type": "string"
  26621. }
  26622. },
  26623. "required": ["id", "providerID"],
  26624. "additionalProperties": false
  26625. },
  26626. "content": {
  26627. "type": "array",
  26628. "items": {
  26629. "anyOf": [
  26630. {
  26631. "$ref": "#/components/schemas/SessionMessageAssistantText"
  26632. },
  26633. {
  26634. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  26635. },
  26636. {
  26637. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  26638. }
  26639. ]
  26640. }
  26641. },
  26642. "snapshot": {
  26643. "type": "object",
  26644. "properties": {
  26645. "start": {
  26646. "type": "string"
  26647. },
  26648. "end": {
  26649. "type": "string"
  26650. }
  26651. },
  26652. "additionalProperties": false
  26653. },
  26654. "finish": {
  26655. "type": "string"
  26656. },
  26657. "cost": {
  26658. "type": "number"
  26659. },
  26660. "tokens": {
  26661. "type": "object",
  26662. "properties": {
  26663. "input": {
  26664. "type": "number"
  26665. },
  26666. "output": {
  26667. "type": "number"
  26668. },
  26669. "reasoning": {
  26670. "type": "number"
  26671. },
  26672. "cache": {
  26673. "type": "object",
  26674. "properties": {
  26675. "read": {
  26676. "type": "number"
  26677. },
  26678. "write": {
  26679. "type": "number"
  26680. }
  26681. },
  26682. "required": ["read", "write"],
  26683. "additionalProperties": false
  26684. }
  26685. },
  26686. "required": ["input", "output", "reasoning", "cache"],
  26687. "additionalProperties": false
  26688. },
  26689. "error": {
  26690. "$ref": "#/components/schemas/SessionErrorUnknown"
  26691. }
  26692. },
  26693. "required": ["id", "time", "type", "agent", "model", "content"],
  26694. "additionalProperties": false
  26695. },
  26696. "SessionMessageCompaction": {
  26697. "type": "object",
  26698. "properties": {
  26699. "type": {
  26700. "type": "string",
  26701. "enum": ["compaction"]
  26702. },
  26703. "reason": {
  26704. "type": "string",
  26705. "enum": ["auto", "manual"]
  26706. },
  26707. "summary": {
  26708. "type": "string"
  26709. },
  26710. "recent": {
  26711. "type": "string"
  26712. },
  26713. "id": {
  26714. "type": "string",
  26715. "pattern": "^msg_"
  26716. },
  26717. "metadata": {
  26718. "type": "object"
  26719. },
  26720. "time": {
  26721. "type": "object",
  26722. "properties": {
  26723. "created": {
  26724. "type": "number"
  26725. }
  26726. },
  26727. "required": ["created"],
  26728. "additionalProperties": false
  26729. }
  26730. },
  26731. "required": ["type", "reason", "summary", "recent", "id", "time"],
  26732. "additionalProperties": false
  26733. },
  26734. "SessionMessage": {
  26735. "anyOf": [
  26736. {
  26737. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  26738. },
  26739. {
  26740. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  26741. },
  26742. {
  26743. "$ref": "#/components/schemas/SessionMessageUser"
  26744. },
  26745. {
  26746. "$ref": "#/components/schemas/SessionMessageSynthetic"
  26747. },
  26748. {
  26749. "$ref": "#/components/schemas/SessionMessageSystem"
  26750. },
  26751. {
  26752. "$ref": "#/components/schemas/SessionMessageShell"
  26753. },
  26754. {
  26755. "$ref": "#/components/schemas/SessionMessageAssistant"
  26756. },
  26757. {
  26758. "$ref": "#/components/schemas/SessionMessageCompaction"
  26759. }
  26760. ]
  26761. },
  26762. "ModelV2Info": {
  26763. "type": "object",
  26764. "properties": {
  26765. "id": {
  26766. "type": "string"
  26767. },
  26768. "providerID": {
  26769. "type": "string"
  26770. },
  26771. "family": {
  26772. "type": "string"
  26773. },
  26774. "name": {
  26775. "type": "string"
  26776. },
  26777. "api": {
  26778. "anyOf": [
  26779. {
  26780. "type": "object",
  26781. "properties": {
  26782. "id": {
  26783. "type": "string"
  26784. },
  26785. "type": {
  26786. "type": "string",
  26787. "enum": ["aisdk"]
  26788. },
  26789. "package": {
  26790. "type": "string"
  26791. },
  26792. "url": {
  26793. "type": "string"
  26794. },
  26795. "settings": {
  26796. "type": "object"
  26797. }
  26798. },
  26799. "required": ["id", "type", "package"],
  26800. "additionalProperties": false
  26801. },
  26802. {
  26803. "type": "object",
  26804. "properties": {
  26805. "id": {
  26806. "type": "string"
  26807. },
  26808. "type": {
  26809. "type": "string",
  26810. "enum": ["native"]
  26811. },
  26812. "url": {
  26813. "type": "string"
  26814. },
  26815. "settings": {
  26816. "type": "object"
  26817. }
  26818. },
  26819. "required": ["id", "type", "settings"],
  26820. "additionalProperties": false
  26821. }
  26822. ]
  26823. },
  26824. "capabilities": {
  26825. "type": "object",
  26826. "properties": {
  26827. "tools": {
  26828. "type": "boolean"
  26829. },
  26830. "input": {
  26831. "type": "array",
  26832. "items": {
  26833. "type": "string"
  26834. }
  26835. },
  26836. "output": {
  26837. "type": "array",
  26838. "items": {
  26839. "type": "string"
  26840. }
  26841. }
  26842. },
  26843. "required": ["tools", "input", "output"],
  26844. "additionalProperties": false
  26845. },
  26846. "request": {
  26847. "type": "object",
  26848. "properties": {
  26849. "headers": {
  26850. "type": "object",
  26851. "additionalProperties": {
  26852. "type": "string"
  26853. }
  26854. },
  26855. "body": {
  26856. "type": "object"
  26857. },
  26858. "generation": {
  26859. "type": "object",
  26860. "properties": {
  26861. "maxTokens": {
  26862. "anyOf": [
  26863. {
  26864. "type": "number"
  26865. },
  26866. {
  26867. "type": "string",
  26868. "enum": ["NaN"]
  26869. },
  26870. {
  26871. "type": "string",
  26872. "enum": ["Infinity"]
  26873. },
  26874. {
  26875. "type": "string",
  26876. "enum": ["-Infinity"]
  26877. },
  26878. {
  26879. "type": "string",
  26880. "enum": ["Infinity", "-Infinity", "NaN"]
  26881. }
  26882. ]
  26883. },
  26884. "temperature": {
  26885. "anyOf": [
  26886. {
  26887. "type": "number"
  26888. },
  26889. {
  26890. "type": "string",
  26891. "enum": ["NaN"]
  26892. },
  26893. {
  26894. "type": "string",
  26895. "enum": ["Infinity"]
  26896. },
  26897. {
  26898. "type": "string",
  26899. "enum": ["-Infinity"]
  26900. },
  26901. {
  26902. "type": "string",
  26903. "enum": ["Infinity", "-Infinity", "NaN"]
  26904. }
  26905. ]
  26906. },
  26907. "topP": {
  26908. "anyOf": [
  26909. {
  26910. "type": "number"
  26911. },
  26912. {
  26913. "type": "string",
  26914. "enum": ["NaN"]
  26915. },
  26916. {
  26917. "type": "string",
  26918. "enum": ["Infinity"]
  26919. },
  26920. {
  26921. "type": "string",
  26922. "enum": ["-Infinity"]
  26923. },
  26924. {
  26925. "type": "string",
  26926. "enum": ["Infinity", "-Infinity", "NaN"]
  26927. }
  26928. ]
  26929. },
  26930. "topK": {
  26931. "anyOf": [
  26932. {
  26933. "type": "number"
  26934. },
  26935. {
  26936. "type": "string",
  26937. "enum": ["NaN"]
  26938. },
  26939. {
  26940. "type": "string",
  26941. "enum": ["Infinity"]
  26942. },
  26943. {
  26944. "type": "string",
  26945. "enum": ["-Infinity"]
  26946. },
  26947. {
  26948. "type": "string",
  26949. "enum": ["Infinity", "-Infinity", "NaN"]
  26950. }
  26951. ]
  26952. },
  26953. "frequencyPenalty": {
  26954. "anyOf": [
  26955. {
  26956. "type": "number"
  26957. },
  26958. {
  26959. "type": "string",
  26960. "enum": ["NaN"]
  26961. },
  26962. {
  26963. "type": "string",
  26964. "enum": ["Infinity"]
  26965. },
  26966. {
  26967. "type": "string",
  26968. "enum": ["-Infinity"]
  26969. },
  26970. {
  26971. "type": "string",
  26972. "enum": ["Infinity", "-Infinity", "NaN"]
  26973. }
  26974. ]
  26975. },
  26976. "presencePenalty": {
  26977. "anyOf": [
  26978. {
  26979. "type": "number"
  26980. },
  26981. {
  26982. "type": "string",
  26983. "enum": ["NaN"]
  26984. },
  26985. {
  26986. "type": "string",
  26987. "enum": ["Infinity"]
  26988. },
  26989. {
  26990. "type": "string",
  26991. "enum": ["-Infinity"]
  26992. },
  26993. {
  26994. "type": "string",
  26995. "enum": ["Infinity", "-Infinity", "NaN"]
  26996. }
  26997. ]
  26998. },
  26999. "seed": {
  27000. "anyOf": [
  27001. {
  27002. "type": "number"
  27003. },
  27004. {
  27005. "type": "string",
  27006. "enum": ["NaN"]
  27007. },
  27008. {
  27009. "type": "string",
  27010. "enum": ["Infinity"]
  27011. },
  27012. {
  27013. "type": "string",
  27014. "enum": ["-Infinity"]
  27015. },
  27016. {
  27017. "type": "string",
  27018. "enum": ["Infinity", "-Infinity", "NaN"]
  27019. }
  27020. ]
  27021. },
  27022. "stop": {
  27023. "type": "array",
  27024. "items": {
  27025. "type": "string"
  27026. }
  27027. }
  27028. },
  27029. "additionalProperties": false
  27030. },
  27031. "options": {
  27032. "type": "object"
  27033. },
  27034. "variant": {
  27035. "type": "string"
  27036. }
  27037. },
  27038. "required": ["headers", "body"],
  27039. "additionalProperties": false
  27040. },
  27041. "variants": {
  27042. "type": "array",
  27043. "items": {
  27044. "type": "object",
  27045. "properties": {
  27046. "id": {
  27047. "type": "string"
  27048. },
  27049. "headers": {
  27050. "type": "object",
  27051. "additionalProperties": {
  27052. "type": "string"
  27053. }
  27054. },
  27055. "body": {
  27056. "type": "object"
  27057. },
  27058. "generation": {
  27059. "type": "object",
  27060. "properties": {
  27061. "maxTokens": {
  27062. "anyOf": [
  27063. {
  27064. "type": "number"
  27065. },
  27066. {
  27067. "type": "string",
  27068. "enum": ["NaN"]
  27069. },
  27070. {
  27071. "type": "string",
  27072. "enum": ["Infinity"]
  27073. },
  27074. {
  27075. "type": "string",
  27076. "enum": ["-Infinity"]
  27077. },
  27078. {
  27079. "type": "string",
  27080. "enum": ["Infinity", "-Infinity", "NaN"]
  27081. }
  27082. ]
  27083. },
  27084. "temperature": {
  27085. "anyOf": [
  27086. {
  27087. "type": "number"
  27088. },
  27089. {
  27090. "type": "string",
  27091. "enum": ["NaN"]
  27092. },
  27093. {
  27094. "type": "string",
  27095. "enum": ["Infinity"]
  27096. },
  27097. {
  27098. "type": "string",
  27099. "enum": ["-Infinity"]
  27100. },
  27101. {
  27102. "type": "string",
  27103. "enum": ["Infinity", "-Infinity", "NaN"]
  27104. }
  27105. ]
  27106. },
  27107. "topP": {
  27108. "anyOf": [
  27109. {
  27110. "type": "number"
  27111. },
  27112. {
  27113. "type": "string",
  27114. "enum": ["NaN"]
  27115. },
  27116. {
  27117. "type": "string",
  27118. "enum": ["Infinity"]
  27119. },
  27120. {
  27121. "type": "string",
  27122. "enum": ["-Infinity"]
  27123. },
  27124. {
  27125. "type": "string",
  27126. "enum": ["Infinity", "-Infinity", "NaN"]
  27127. }
  27128. ]
  27129. },
  27130. "topK": {
  27131. "anyOf": [
  27132. {
  27133. "type": "number"
  27134. },
  27135. {
  27136. "type": "string",
  27137. "enum": ["NaN"]
  27138. },
  27139. {
  27140. "type": "string",
  27141. "enum": ["Infinity"]
  27142. },
  27143. {
  27144. "type": "string",
  27145. "enum": ["-Infinity"]
  27146. },
  27147. {
  27148. "type": "string",
  27149. "enum": ["Infinity", "-Infinity", "NaN"]
  27150. }
  27151. ]
  27152. },
  27153. "frequencyPenalty": {
  27154. "anyOf": [
  27155. {
  27156. "type": "number"
  27157. },
  27158. {
  27159. "type": "string",
  27160. "enum": ["NaN"]
  27161. },
  27162. {
  27163. "type": "string",
  27164. "enum": ["Infinity"]
  27165. },
  27166. {
  27167. "type": "string",
  27168. "enum": ["-Infinity"]
  27169. },
  27170. {
  27171. "type": "string",
  27172. "enum": ["Infinity", "-Infinity", "NaN"]
  27173. }
  27174. ]
  27175. },
  27176. "presencePenalty": {
  27177. "anyOf": [
  27178. {
  27179. "type": "number"
  27180. },
  27181. {
  27182. "type": "string",
  27183. "enum": ["NaN"]
  27184. },
  27185. {
  27186. "type": "string",
  27187. "enum": ["Infinity"]
  27188. },
  27189. {
  27190. "type": "string",
  27191. "enum": ["-Infinity"]
  27192. },
  27193. {
  27194. "type": "string",
  27195. "enum": ["Infinity", "-Infinity", "NaN"]
  27196. }
  27197. ]
  27198. },
  27199. "seed": {
  27200. "anyOf": [
  27201. {
  27202. "type": "number"
  27203. },
  27204. {
  27205. "type": "string",
  27206. "enum": ["NaN"]
  27207. },
  27208. {
  27209. "type": "string",
  27210. "enum": ["Infinity"]
  27211. },
  27212. {
  27213. "type": "string",
  27214. "enum": ["-Infinity"]
  27215. },
  27216. {
  27217. "type": "string",
  27218. "enum": ["Infinity", "-Infinity", "NaN"]
  27219. }
  27220. ]
  27221. },
  27222. "stop": {
  27223. "type": "array",
  27224. "items": {
  27225. "type": "string"
  27226. }
  27227. }
  27228. },
  27229. "additionalProperties": false
  27230. },
  27231. "options": {
  27232. "type": "object"
  27233. }
  27234. },
  27235. "required": ["id", "headers", "body"],
  27236. "additionalProperties": false
  27237. }
  27238. },
  27239. "time": {
  27240. "type": "object",
  27241. "properties": {
  27242. "released": {
  27243. "type": "number"
  27244. }
  27245. },
  27246. "required": ["released"],
  27247. "additionalProperties": false
  27248. },
  27249. "cost": {
  27250. "type": "array",
  27251. "items": {
  27252. "type": "object",
  27253. "properties": {
  27254. "tier": {
  27255. "type": "object",
  27256. "properties": {
  27257. "type": {
  27258. "type": "string",
  27259. "enum": ["context"]
  27260. },
  27261. "size": {
  27262. "type": "integer"
  27263. }
  27264. },
  27265. "required": ["type", "size"],
  27266. "additionalProperties": false
  27267. },
  27268. "input": {
  27269. "type": "number"
  27270. },
  27271. "output": {
  27272. "type": "number"
  27273. },
  27274. "cache": {
  27275. "type": "object",
  27276. "properties": {
  27277. "read": {
  27278. "type": "number"
  27279. },
  27280. "write": {
  27281. "type": "number"
  27282. }
  27283. },
  27284. "required": ["read", "write"],
  27285. "additionalProperties": false
  27286. }
  27287. },
  27288. "required": ["input", "output", "cache"],
  27289. "additionalProperties": false
  27290. }
  27291. },
  27292. "status": {
  27293. "type": "string",
  27294. "enum": ["alpha", "beta", "deprecated", "active"]
  27295. },
  27296. "enabled": {
  27297. "type": "boolean"
  27298. },
  27299. "limit": {
  27300. "type": "object",
  27301. "properties": {
  27302. "context": {
  27303. "type": "integer"
  27304. },
  27305. "input": {
  27306. "type": "integer"
  27307. },
  27308. "output": {
  27309. "type": "integer"
  27310. }
  27311. },
  27312. "required": ["context", "output"],
  27313. "additionalProperties": false
  27314. }
  27315. },
  27316. "required": [
  27317. "id",
  27318. "providerID",
  27319. "name",
  27320. "api",
  27321. "capabilities",
  27322. "request",
  27323. "variants",
  27324. "time",
  27325. "cost",
  27326. "status",
  27327. "enabled",
  27328. "limit"
  27329. ],
  27330. "additionalProperties": false
  27331. },
  27332. "ProviderV2Info": {
  27333. "type": "object",
  27334. "properties": {
  27335. "id": {
  27336. "type": "string"
  27337. },
  27338. "name": {
  27339. "type": "string"
  27340. },
  27341. "disabled": {
  27342. "type": "boolean"
  27343. },
  27344. "api": {
  27345. "anyOf": [
  27346. {
  27347. "type": "object",
  27348. "properties": {
  27349. "type": {
  27350. "type": "string",
  27351. "enum": ["aisdk"]
  27352. },
  27353. "package": {
  27354. "type": "string"
  27355. },
  27356. "url": {
  27357. "type": "string"
  27358. },
  27359. "settings": {
  27360. "type": "object"
  27361. }
  27362. },
  27363. "required": ["type", "package"],
  27364. "additionalProperties": false
  27365. },
  27366. {
  27367. "type": "object",
  27368. "properties": {
  27369. "type": {
  27370. "type": "string",
  27371. "enum": ["native"]
  27372. },
  27373. "url": {
  27374. "type": "string"
  27375. },
  27376. "settings": {
  27377. "type": "object"
  27378. }
  27379. },
  27380. "required": ["type", "settings"],
  27381. "additionalProperties": false
  27382. }
  27383. ]
  27384. },
  27385. "request": {
  27386. "type": "object",
  27387. "properties": {
  27388. "headers": {
  27389. "type": "object",
  27390. "additionalProperties": {
  27391. "type": "string"
  27392. }
  27393. },
  27394. "body": {
  27395. "type": "object"
  27396. }
  27397. },
  27398. "required": ["headers", "body"],
  27399. "additionalProperties": false
  27400. }
  27401. },
  27402. "required": ["id", "name", "api", "request"],
  27403. "additionalProperties": false
  27404. },
  27405. "IntegrationWhen": {
  27406. "type": "object",
  27407. "properties": {
  27408. "key": {
  27409. "type": "string"
  27410. },
  27411. "op": {
  27412. "type": "string",
  27413. "enum": ["eq", "neq"]
  27414. },
  27415. "value": {
  27416. "type": "string"
  27417. }
  27418. },
  27419. "required": ["key", "op", "value"],
  27420. "additionalProperties": false
  27421. },
  27422. "IntegrationTextPrompt": {
  27423. "type": "object",
  27424. "properties": {
  27425. "type": {
  27426. "type": "string",
  27427. "enum": ["text"]
  27428. },
  27429. "key": {
  27430. "type": "string"
  27431. },
  27432. "message": {
  27433. "type": "string"
  27434. },
  27435. "placeholder": {
  27436. "type": "string"
  27437. },
  27438. "when": {
  27439. "$ref": "#/components/schemas/IntegrationWhen"
  27440. }
  27441. },
  27442. "required": ["type", "key", "message"],
  27443. "additionalProperties": false
  27444. },
  27445. "IntegrationSelectPrompt": {
  27446. "type": "object",
  27447. "properties": {
  27448. "type": {
  27449. "type": "string",
  27450. "enum": ["select"]
  27451. },
  27452. "key": {
  27453. "type": "string"
  27454. },
  27455. "message": {
  27456. "type": "string"
  27457. },
  27458. "options": {
  27459. "type": "array",
  27460. "items": {
  27461. "type": "object",
  27462. "properties": {
  27463. "label": {
  27464. "type": "string"
  27465. },
  27466. "value": {
  27467. "type": "string"
  27468. },
  27469. "hint": {
  27470. "type": "string"
  27471. }
  27472. },
  27473. "required": ["label", "value"],
  27474. "additionalProperties": false
  27475. }
  27476. },
  27477. "when": {
  27478. "$ref": "#/components/schemas/IntegrationWhen"
  27479. }
  27480. },
  27481. "required": ["type", "key", "message", "options"],
  27482. "additionalProperties": false
  27483. },
  27484. "IntegrationOAuthMethod": {
  27485. "type": "object",
  27486. "properties": {
  27487. "id": {
  27488. "type": "string"
  27489. },
  27490. "type": {
  27491. "type": "string",
  27492. "enum": ["oauth"]
  27493. },
  27494. "label": {
  27495. "type": "string"
  27496. },
  27497. "prompts": {
  27498. "type": "array",
  27499. "items": {
  27500. "anyOf": [
  27501. {
  27502. "$ref": "#/components/schemas/IntegrationTextPrompt"
  27503. },
  27504. {
  27505. "$ref": "#/components/schemas/IntegrationSelectPrompt"
  27506. }
  27507. ]
  27508. }
  27509. }
  27510. },
  27511. "required": ["id", "type", "label"],
  27512. "additionalProperties": false
  27513. },
  27514. "IntegrationKeyMethod": {
  27515. "type": "object",
  27516. "properties": {
  27517. "type": {
  27518. "type": "string",
  27519. "enum": ["key"]
  27520. },
  27521. "label": {
  27522. "type": "string"
  27523. }
  27524. },
  27525. "required": ["type"],
  27526. "additionalProperties": false
  27527. },
  27528. "IntegrationEnvMethod": {
  27529. "type": "object",
  27530. "properties": {
  27531. "type": {
  27532. "type": "string",
  27533. "enum": ["env"]
  27534. },
  27535. "names": {
  27536. "type": "array",
  27537. "items": {
  27538. "type": "string"
  27539. }
  27540. }
  27541. },
  27542. "required": ["type", "names"],
  27543. "additionalProperties": false
  27544. },
  27545. "ConnectionCredentialInfo": {
  27546. "type": "object",
  27547. "properties": {
  27548. "type": {
  27549. "type": "string",
  27550. "enum": ["credential"]
  27551. },
  27552. "id": {
  27553. "type": "string"
  27554. },
  27555. "label": {
  27556. "type": "string"
  27557. }
  27558. },
  27559. "required": ["type", "id", "label"],
  27560. "additionalProperties": false
  27561. },
  27562. "ConnectionEnvInfo": {
  27563. "type": "object",
  27564. "properties": {
  27565. "type": {
  27566. "type": "string",
  27567. "enum": ["env"]
  27568. },
  27569. "name": {
  27570. "type": "string"
  27571. }
  27572. },
  27573. "required": ["type", "name"],
  27574. "additionalProperties": false
  27575. },
  27576. "ConnectionInfo": {
  27577. "anyOf": [
  27578. {
  27579. "$ref": "#/components/schemas/ConnectionCredentialInfo"
  27580. },
  27581. {
  27582. "$ref": "#/components/schemas/ConnectionEnvInfo"
  27583. }
  27584. ]
  27585. },
  27586. "IntegrationInfo": {
  27587. "type": "object",
  27588. "properties": {
  27589. "id": {
  27590. "type": "string"
  27591. },
  27592. "name": {
  27593. "type": "string"
  27594. },
  27595. "methods": {
  27596. "type": "array",
  27597. "items": {
  27598. "anyOf": [
  27599. {
  27600. "$ref": "#/components/schemas/IntegrationOAuthMethod"
  27601. },
  27602. {
  27603. "$ref": "#/components/schemas/IntegrationKeyMethod"
  27604. },
  27605. {
  27606. "$ref": "#/components/schemas/IntegrationEnvMethod"
  27607. }
  27608. ]
  27609. }
  27610. },
  27611. "connections": {
  27612. "type": "array",
  27613. "items": {
  27614. "$ref": "#/components/schemas/ConnectionInfo"
  27615. }
  27616. }
  27617. },
  27618. "required": ["id", "name", "methods", "connections"],
  27619. "additionalProperties": false
  27620. },
  27621. "IntegrationAttempt": {
  27622. "type": "object",
  27623. "properties": {
  27624. "attemptID": {
  27625. "type": "string"
  27626. },
  27627. "url": {
  27628. "type": "string"
  27629. },
  27630. "instructions": {
  27631. "type": "string"
  27632. },
  27633. "mode": {
  27634. "type": "string",
  27635. "enum": ["auto", "code"]
  27636. },
  27637. "time": {
  27638. "type": "object",
  27639. "properties": {
  27640. "created": {
  27641. "anyOf": [
  27642. {
  27643. "type": "number"
  27644. },
  27645. {
  27646. "type": "string",
  27647. "enum": ["NaN"]
  27648. },
  27649. {
  27650. "type": "string",
  27651. "enum": ["Infinity"]
  27652. },
  27653. {
  27654. "type": "string",
  27655. "enum": ["-Infinity"]
  27656. },
  27657. {
  27658. "type": "string",
  27659. "enum": ["Infinity", "-Infinity", "NaN"]
  27660. }
  27661. ]
  27662. },
  27663. "expires": {
  27664. "anyOf": [
  27665. {
  27666. "type": "number"
  27667. },
  27668. {
  27669. "type": "string",
  27670. "enum": ["NaN"]
  27671. },
  27672. {
  27673. "type": "string",
  27674. "enum": ["Infinity"]
  27675. },
  27676. {
  27677. "type": "string",
  27678. "enum": ["-Infinity"]
  27679. },
  27680. {
  27681. "type": "string",
  27682. "enum": ["Infinity", "-Infinity", "NaN"]
  27683. }
  27684. ]
  27685. }
  27686. },
  27687. "required": ["created", "expires"],
  27688. "additionalProperties": false
  27689. }
  27690. },
  27691. "required": ["attemptID", "url", "instructions", "mode", "time"],
  27692. "additionalProperties": false
  27693. },
  27694. "PermissionV2Request": {
  27695. "type": "object",
  27696. "properties": {
  27697. "id": {
  27698. "type": "string",
  27699. "pattern": "^per"
  27700. },
  27701. "sessionID": {
  27702. "type": "string",
  27703. "pattern": "^ses"
  27704. },
  27705. "action": {
  27706. "type": "string"
  27707. },
  27708. "resources": {
  27709. "type": "array",
  27710. "items": {
  27711. "type": "string"
  27712. }
  27713. },
  27714. "save": {
  27715. "type": "array",
  27716. "items": {
  27717. "type": "string"
  27718. }
  27719. },
  27720. "metadata": {
  27721. "type": "object"
  27722. },
  27723. "source": {
  27724. "$ref": "#/components/schemas/PermissionV2Source"
  27725. }
  27726. },
  27727. "required": ["id", "sessionID", "action", "resources"],
  27728. "additionalProperties": false
  27729. },
  27730. "PermissionSavedInfo": {
  27731. "type": "object",
  27732. "properties": {
  27733. "id": {
  27734. "type": "string"
  27735. },
  27736. "projectID": {
  27737. "type": "string"
  27738. },
  27739. "action": {
  27740. "type": "string"
  27741. },
  27742. "resource": {
  27743. "type": "string"
  27744. }
  27745. },
  27746. "required": ["id", "projectID", "action", "resource"],
  27747. "additionalProperties": false
  27748. },
  27749. "FileSystemEntry": {
  27750. "type": "object",
  27751. "properties": {
  27752. "path": {
  27753. "type": "string"
  27754. },
  27755. "type": {
  27756. "type": "string",
  27757. "enum": ["file", "directory"]
  27758. },
  27759. "mime": {
  27760. "type": "string"
  27761. }
  27762. },
  27763. "required": ["path", "type", "mime"],
  27764. "additionalProperties": false
  27765. },
  27766. "CommandV2Info": {
  27767. "type": "object",
  27768. "properties": {
  27769. "name": {
  27770. "type": "string"
  27771. },
  27772. "template": {
  27773. "type": "string"
  27774. },
  27775. "description": {
  27776. "type": "string"
  27777. },
  27778. "agent": {
  27779. "type": "string"
  27780. },
  27781. "model": {
  27782. "type": "object",
  27783. "properties": {
  27784. "id": {
  27785. "type": "string"
  27786. },
  27787. "providerID": {
  27788. "type": "string"
  27789. },
  27790. "variant": {
  27791. "type": "string"
  27792. }
  27793. },
  27794. "required": ["id", "providerID"],
  27795. "additionalProperties": false
  27796. },
  27797. "subtask": {
  27798. "type": "boolean"
  27799. }
  27800. },
  27801. "required": ["name", "template"],
  27802. "additionalProperties": false
  27803. },
  27804. "SkillV2Info": {
  27805. "type": "object",
  27806. "properties": {
  27807. "name": {
  27808. "type": "string"
  27809. },
  27810. "description": {
  27811. "type": "string"
  27812. },
  27813. "slash": {
  27814. "type": "boolean"
  27815. },
  27816. "location": {
  27817. "type": "string"
  27818. },
  27819. "content": {
  27820. "type": "string"
  27821. }
  27822. },
  27823. "required": ["name", "location", "content"],
  27824. "additionalProperties": false
  27825. },
  27826. "V2EventModels-devRefreshed": {
  27827. "type": "object",
  27828. "properties": {
  27829. "id": {
  27830. "type": "string",
  27831. "pattern": "^evt_"
  27832. },
  27833. "metadata": {
  27834. "type": "object"
  27835. },
  27836. "durable": {
  27837. "type": "object",
  27838. "properties": {
  27839. "aggregateID": {
  27840. "type": "string"
  27841. },
  27842. "seq": {
  27843. "type": "integer"
  27844. },
  27845. "version": {
  27846. "type": "integer"
  27847. }
  27848. },
  27849. "required": ["aggregateID", "seq", "version"],
  27850. "additionalProperties": false
  27851. },
  27852. "location": {
  27853. "$ref": "#/components/schemas/LocationRef"
  27854. },
  27855. "type": {
  27856. "type": "string",
  27857. "enum": ["models-dev.refreshed"]
  27858. },
  27859. "data": {
  27860. "type": "object",
  27861. "properties": {}
  27862. }
  27863. },
  27864. "required": ["id", "type", "data"],
  27865. "additionalProperties": false
  27866. },
  27867. "V2EventIntegrationUpdated": {
  27868. "type": "object",
  27869. "properties": {
  27870. "id": {
  27871. "type": "string",
  27872. "pattern": "^evt_"
  27873. },
  27874. "metadata": {
  27875. "type": "object"
  27876. },
  27877. "durable": {
  27878. "type": "object",
  27879. "properties": {
  27880. "aggregateID": {
  27881. "type": "string"
  27882. },
  27883. "seq": {
  27884. "type": "integer"
  27885. },
  27886. "version": {
  27887. "type": "integer"
  27888. }
  27889. },
  27890. "required": ["aggregateID", "seq", "version"],
  27891. "additionalProperties": false
  27892. },
  27893. "location": {
  27894. "$ref": "#/components/schemas/LocationRef"
  27895. },
  27896. "type": {
  27897. "type": "string",
  27898. "enum": ["integration.updated"]
  27899. },
  27900. "data": {
  27901. "type": "object",
  27902. "properties": {}
  27903. }
  27904. },
  27905. "required": ["id", "type", "data"],
  27906. "additionalProperties": false
  27907. },
  27908. "V2EventCatalogUpdated": {
  27909. "type": "object",
  27910. "properties": {
  27911. "id": {
  27912. "type": "string",
  27913. "pattern": "^evt_"
  27914. },
  27915. "metadata": {
  27916. "type": "object"
  27917. },
  27918. "durable": {
  27919. "type": "object",
  27920. "properties": {
  27921. "aggregateID": {
  27922. "type": "string"
  27923. },
  27924. "seq": {
  27925. "type": "integer"
  27926. },
  27927. "version": {
  27928. "type": "integer"
  27929. }
  27930. },
  27931. "required": ["aggregateID", "seq", "version"],
  27932. "additionalProperties": false
  27933. },
  27934. "location": {
  27935. "$ref": "#/components/schemas/LocationRef"
  27936. },
  27937. "type": {
  27938. "type": "string",
  27939. "enum": ["catalog.updated"]
  27940. },
  27941. "data": {
  27942. "type": "object",
  27943. "properties": {}
  27944. }
  27945. },
  27946. "required": ["id", "type", "data"],
  27947. "additionalProperties": false
  27948. },
  27949. "V2EventSessionCreated": {
  27950. "type": "object",
  27951. "properties": {
  27952. "id": {
  27953. "type": "string",
  27954. "pattern": "^evt_"
  27955. },
  27956. "metadata": {
  27957. "type": "object"
  27958. },
  27959. "durable": {
  27960. "type": "object",
  27961. "properties": {
  27962. "aggregateID": {
  27963. "type": "string"
  27964. },
  27965. "seq": {
  27966. "type": "integer"
  27967. },
  27968. "version": {
  27969. "type": "integer"
  27970. }
  27971. },
  27972. "required": ["aggregateID", "seq", "version"],
  27973. "additionalProperties": false
  27974. },
  27975. "location": {
  27976. "$ref": "#/components/schemas/LocationRef"
  27977. },
  27978. "type": {
  27979. "type": "string",
  27980. "enum": ["session.created"]
  27981. },
  27982. "data": {
  27983. "type": "object",
  27984. "properties": {
  27985. "sessionID": {
  27986. "type": "string",
  27987. "pattern": "^ses"
  27988. },
  27989. "info": {
  27990. "$ref": "#/components/schemas/Session"
  27991. }
  27992. },
  27993. "required": ["sessionID", "info"],
  27994. "additionalProperties": false
  27995. }
  27996. },
  27997. "required": ["id", "type", "data"],
  27998. "additionalProperties": false
  27999. },
  28000. "V2EventSessionUpdated": {
  28001. "type": "object",
  28002. "properties": {
  28003. "id": {
  28004. "type": "string",
  28005. "pattern": "^evt_"
  28006. },
  28007. "metadata": {
  28008. "type": "object"
  28009. },
  28010. "durable": {
  28011. "type": "object",
  28012. "properties": {
  28013. "aggregateID": {
  28014. "type": "string"
  28015. },
  28016. "seq": {
  28017. "type": "integer"
  28018. },
  28019. "version": {
  28020. "type": "integer"
  28021. }
  28022. },
  28023. "required": ["aggregateID", "seq", "version"],
  28024. "additionalProperties": false
  28025. },
  28026. "location": {
  28027. "$ref": "#/components/schemas/LocationRef"
  28028. },
  28029. "type": {
  28030. "type": "string",
  28031. "enum": ["session.updated"]
  28032. },
  28033. "data": {
  28034. "type": "object",
  28035. "properties": {
  28036. "sessionID": {
  28037. "type": "string",
  28038. "pattern": "^ses"
  28039. },
  28040. "info": {
  28041. "$ref": "#/components/schemas/Session"
  28042. }
  28043. },
  28044. "required": ["sessionID", "info"],
  28045. "additionalProperties": false
  28046. }
  28047. },
  28048. "required": ["id", "type", "data"],
  28049. "additionalProperties": false
  28050. },
  28051. "V2EventSessionDeleted": {
  28052. "type": "object",
  28053. "properties": {
  28054. "id": {
  28055. "type": "string",
  28056. "pattern": "^evt_"
  28057. },
  28058. "metadata": {
  28059. "type": "object"
  28060. },
  28061. "durable": {
  28062. "type": "object",
  28063. "properties": {
  28064. "aggregateID": {
  28065. "type": "string"
  28066. },
  28067. "seq": {
  28068. "type": "integer"
  28069. },
  28070. "version": {
  28071. "type": "integer"
  28072. }
  28073. },
  28074. "required": ["aggregateID", "seq", "version"],
  28075. "additionalProperties": false
  28076. },
  28077. "location": {
  28078. "$ref": "#/components/schemas/LocationRef"
  28079. },
  28080. "type": {
  28081. "type": "string",
  28082. "enum": ["session.deleted"]
  28083. },
  28084. "data": {
  28085. "type": "object",
  28086. "properties": {
  28087. "sessionID": {
  28088. "type": "string",
  28089. "pattern": "^ses"
  28090. },
  28091. "info": {
  28092. "$ref": "#/components/schemas/Session"
  28093. }
  28094. },
  28095. "required": ["sessionID", "info"],
  28096. "additionalProperties": false
  28097. }
  28098. },
  28099. "required": ["id", "type", "data"],
  28100. "additionalProperties": false
  28101. },
  28102. "V2EventMessageUpdated": {
  28103. "type": "object",
  28104. "properties": {
  28105. "id": {
  28106. "type": "string",
  28107. "pattern": "^evt_"
  28108. },
  28109. "metadata": {
  28110. "type": "object"
  28111. },
  28112. "durable": {
  28113. "type": "object",
  28114. "properties": {
  28115. "aggregateID": {
  28116. "type": "string"
  28117. },
  28118. "seq": {
  28119. "type": "integer"
  28120. },
  28121. "version": {
  28122. "type": "integer"
  28123. }
  28124. },
  28125. "required": ["aggregateID", "seq", "version"],
  28126. "additionalProperties": false
  28127. },
  28128. "location": {
  28129. "$ref": "#/components/schemas/LocationRef"
  28130. },
  28131. "type": {
  28132. "type": "string",
  28133. "enum": ["message.updated"]
  28134. },
  28135. "data": {
  28136. "type": "object",
  28137. "properties": {
  28138. "sessionID": {
  28139. "type": "string",
  28140. "pattern": "^ses"
  28141. },
  28142. "info": {
  28143. "$ref": "#/components/schemas/Message"
  28144. }
  28145. },
  28146. "required": ["sessionID", "info"],
  28147. "additionalProperties": false
  28148. }
  28149. },
  28150. "required": ["id", "type", "data"],
  28151. "additionalProperties": false
  28152. },
  28153. "V2EventMessageRemoved": {
  28154. "type": "object",
  28155. "properties": {
  28156. "id": {
  28157. "type": "string",
  28158. "pattern": "^evt_"
  28159. },
  28160. "metadata": {
  28161. "type": "object"
  28162. },
  28163. "durable": {
  28164. "type": "object",
  28165. "properties": {
  28166. "aggregateID": {
  28167. "type": "string"
  28168. },
  28169. "seq": {
  28170. "type": "integer"
  28171. },
  28172. "version": {
  28173. "type": "integer"
  28174. }
  28175. },
  28176. "required": ["aggregateID", "seq", "version"],
  28177. "additionalProperties": false
  28178. },
  28179. "location": {
  28180. "$ref": "#/components/schemas/LocationRef"
  28181. },
  28182. "type": {
  28183. "type": "string",
  28184. "enum": ["message.removed"]
  28185. },
  28186. "data": {
  28187. "type": "object",
  28188. "properties": {
  28189. "sessionID": {
  28190. "type": "string",
  28191. "pattern": "^ses"
  28192. },
  28193. "messageID": {
  28194. "type": "string",
  28195. "pattern": "^msg"
  28196. }
  28197. },
  28198. "required": ["sessionID", "messageID"],
  28199. "additionalProperties": false
  28200. }
  28201. },
  28202. "required": ["id", "type", "data"],
  28203. "additionalProperties": false
  28204. },
  28205. "V2EventMessagePartUpdated": {
  28206. "type": "object",
  28207. "properties": {
  28208. "id": {
  28209. "type": "string",
  28210. "pattern": "^evt_"
  28211. },
  28212. "metadata": {
  28213. "type": "object"
  28214. },
  28215. "durable": {
  28216. "type": "object",
  28217. "properties": {
  28218. "aggregateID": {
  28219. "type": "string"
  28220. },
  28221. "seq": {
  28222. "type": "integer"
  28223. },
  28224. "version": {
  28225. "type": "integer"
  28226. }
  28227. },
  28228. "required": ["aggregateID", "seq", "version"],
  28229. "additionalProperties": false
  28230. },
  28231. "location": {
  28232. "$ref": "#/components/schemas/LocationRef"
  28233. },
  28234. "type": {
  28235. "type": "string",
  28236. "enum": ["message.part.updated"]
  28237. },
  28238. "data": {
  28239. "type": "object",
  28240. "properties": {
  28241. "sessionID": {
  28242. "type": "string",
  28243. "pattern": "^ses"
  28244. },
  28245. "part": {
  28246. "$ref": "#/components/schemas/Part"
  28247. },
  28248. "time": {
  28249. "type": "number"
  28250. }
  28251. },
  28252. "required": ["sessionID", "part", "time"],
  28253. "additionalProperties": false
  28254. }
  28255. },
  28256. "required": ["id", "type", "data"],
  28257. "additionalProperties": false
  28258. },
  28259. "V2EventMessagePartRemoved": {
  28260. "type": "object",
  28261. "properties": {
  28262. "id": {
  28263. "type": "string",
  28264. "pattern": "^evt_"
  28265. },
  28266. "metadata": {
  28267. "type": "object"
  28268. },
  28269. "durable": {
  28270. "type": "object",
  28271. "properties": {
  28272. "aggregateID": {
  28273. "type": "string"
  28274. },
  28275. "seq": {
  28276. "type": "integer"
  28277. },
  28278. "version": {
  28279. "type": "integer"
  28280. }
  28281. },
  28282. "required": ["aggregateID", "seq", "version"],
  28283. "additionalProperties": false
  28284. },
  28285. "location": {
  28286. "$ref": "#/components/schemas/LocationRef"
  28287. },
  28288. "type": {
  28289. "type": "string",
  28290. "enum": ["message.part.removed"]
  28291. },
  28292. "data": {
  28293. "type": "object",
  28294. "properties": {
  28295. "sessionID": {
  28296. "type": "string",
  28297. "pattern": "^ses"
  28298. },
  28299. "messageID": {
  28300. "type": "string",
  28301. "pattern": "^msg"
  28302. },
  28303. "partID": {
  28304. "type": "string",
  28305. "pattern": "^prt"
  28306. }
  28307. },
  28308. "required": ["sessionID", "messageID", "partID"],
  28309. "additionalProperties": false
  28310. }
  28311. },
  28312. "required": ["id", "type", "data"],
  28313. "additionalProperties": false
  28314. },
  28315. "V2EventSessionNextAgentSwitched": {
  28316. "type": "object",
  28317. "properties": {
  28318. "id": {
  28319. "type": "string",
  28320. "pattern": "^evt_"
  28321. },
  28322. "metadata": {
  28323. "type": "object"
  28324. },
  28325. "durable": {
  28326. "type": "object",
  28327. "properties": {
  28328. "aggregateID": {
  28329. "type": "string"
  28330. },
  28331. "seq": {
  28332. "type": "integer"
  28333. },
  28334. "version": {
  28335. "type": "integer"
  28336. }
  28337. },
  28338. "required": ["aggregateID", "seq", "version"],
  28339. "additionalProperties": false
  28340. },
  28341. "location": {
  28342. "$ref": "#/components/schemas/LocationRef"
  28343. },
  28344. "type": {
  28345. "type": "string",
  28346. "enum": ["session.next.agent.switched"]
  28347. },
  28348. "data": {
  28349. "type": "object",
  28350. "properties": {
  28351. "timestamp": {
  28352. "type": "number"
  28353. },
  28354. "sessionID": {
  28355. "type": "string",
  28356. "pattern": "^ses"
  28357. },
  28358. "messageID": {
  28359. "type": "string",
  28360. "pattern": "^msg_"
  28361. },
  28362. "agent": {
  28363. "type": "string"
  28364. }
  28365. },
  28366. "required": ["timestamp", "sessionID", "messageID", "agent"],
  28367. "additionalProperties": false
  28368. }
  28369. },
  28370. "required": ["id", "type", "data"],
  28371. "additionalProperties": false
  28372. },
  28373. "V2EventSessionNextModelSwitched": {
  28374. "type": "object",
  28375. "properties": {
  28376. "id": {
  28377. "type": "string",
  28378. "pattern": "^evt_"
  28379. },
  28380. "metadata": {
  28381. "type": "object"
  28382. },
  28383. "durable": {
  28384. "type": "object",
  28385. "properties": {
  28386. "aggregateID": {
  28387. "type": "string"
  28388. },
  28389. "seq": {
  28390. "type": "integer"
  28391. },
  28392. "version": {
  28393. "type": "integer"
  28394. }
  28395. },
  28396. "required": ["aggregateID", "seq", "version"],
  28397. "additionalProperties": false
  28398. },
  28399. "location": {
  28400. "$ref": "#/components/schemas/LocationRef"
  28401. },
  28402. "type": {
  28403. "type": "string",
  28404. "enum": ["session.next.model.switched"]
  28405. },
  28406. "data": {
  28407. "type": "object",
  28408. "properties": {
  28409. "timestamp": {
  28410. "type": "number"
  28411. },
  28412. "sessionID": {
  28413. "type": "string",
  28414. "pattern": "^ses"
  28415. },
  28416. "messageID": {
  28417. "type": "string",
  28418. "pattern": "^msg_"
  28419. },
  28420. "model": {
  28421. "type": "object",
  28422. "properties": {
  28423. "id": {
  28424. "type": "string"
  28425. },
  28426. "providerID": {
  28427. "type": "string"
  28428. },
  28429. "variant": {
  28430. "type": "string"
  28431. }
  28432. },
  28433. "required": ["id", "providerID"],
  28434. "additionalProperties": false
  28435. }
  28436. },
  28437. "required": ["timestamp", "sessionID", "messageID", "model"],
  28438. "additionalProperties": false
  28439. }
  28440. },
  28441. "required": ["id", "type", "data"],
  28442. "additionalProperties": false
  28443. },
  28444. "V2EventSessionNextMoved": {
  28445. "type": "object",
  28446. "properties": {
  28447. "id": {
  28448. "type": "string",
  28449. "pattern": "^evt_"
  28450. },
  28451. "metadata": {
  28452. "type": "object"
  28453. },
  28454. "durable": {
  28455. "type": "object",
  28456. "properties": {
  28457. "aggregateID": {
  28458. "type": "string"
  28459. },
  28460. "seq": {
  28461. "type": "integer"
  28462. },
  28463. "version": {
  28464. "type": "integer"
  28465. }
  28466. },
  28467. "required": ["aggregateID", "seq", "version"],
  28468. "additionalProperties": false
  28469. },
  28470. "location": {
  28471. "$ref": "#/components/schemas/LocationRef"
  28472. },
  28473. "type": {
  28474. "type": "string",
  28475. "enum": ["session.next.moved"]
  28476. },
  28477. "data": {
  28478. "type": "object",
  28479. "properties": {
  28480. "timestamp": {
  28481. "type": "number"
  28482. },
  28483. "sessionID": {
  28484. "type": "string",
  28485. "pattern": "^ses"
  28486. },
  28487. "location": {
  28488. "$ref": "#/components/schemas/LocationRef"
  28489. },
  28490. "subdirectory": {
  28491. "type": "string"
  28492. }
  28493. },
  28494. "required": ["timestamp", "sessionID", "location"],
  28495. "additionalProperties": false
  28496. }
  28497. },
  28498. "required": ["id", "type", "data"],
  28499. "additionalProperties": false
  28500. },
  28501. "V2EventSessionNextPrompted": {
  28502. "type": "object",
  28503. "properties": {
  28504. "id": {
  28505. "type": "string",
  28506. "pattern": "^evt_"
  28507. },
  28508. "metadata": {
  28509. "type": "object"
  28510. },
  28511. "durable": {
  28512. "type": "object",
  28513. "properties": {
  28514. "aggregateID": {
  28515. "type": "string"
  28516. },
  28517. "seq": {
  28518. "type": "integer"
  28519. },
  28520. "version": {
  28521. "type": "integer"
  28522. }
  28523. },
  28524. "required": ["aggregateID", "seq", "version"],
  28525. "additionalProperties": false
  28526. },
  28527. "location": {
  28528. "$ref": "#/components/schemas/LocationRef"
  28529. },
  28530. "type": {
  28531. "type": "string",
  28532. "enum": ["session.next.prompted"]
  28533. },
  28534. "data": {
  28535. "type": "object",
  28536. "properties": {
  28537. "timestamp": {
  28538. "type": "number"
  28539. },
  28540. "sessionID": {
  28541. "type": "string",
  28542. "pattern": "^ses"
  28543. },
  28544. "messageID": {
  28545. "type": "string",
  28546. "pattern": "^msg_"
  28547. },
  28548. "prompt": {
  28549. "$ref": "#/components/schemas/Prompt"
  28550. },
  28551. "delivery": {
  28552. "type": "string",
  28553. "enum": ["steer", "queue"]
  28554. }
  28555. },
  28556. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  28557. "additionalProperties": false
  28558. }
  28559. },
  28560. "required": ["id", "type", "data"],
  28561. "additionalProperties": false
  28562. },
  28563. "V2EventSessionNextPromptAdmitted": {
  28564. "type": "object",
  28565. "properties": {
  28566. "id": {
  28567. "type": "string",
  28568. "pattern": "^evt_"
  28569. },
  28570. "metadata": {
  28571. "type": "object"
  28572. },
  28573. "durable": {
  28574. "type": "object",
  28575. "properties": {
  28576. "aggregateID": {
  28577. "type": "string"
  28578. },
  28579. "seq": {
  28580. "type": "integer"
  28581. },
  28582. "version": {
  28583. "type": "integer"
  28584. }
  28585. },
  28586. "required": ["aggregateID", "seq", "version"],
  28587. "additionalProperties": false
  28588. },
  28589. "location": {
  28590. "$ref": "#/components/schemas/LocationRef"
  28591. },
  28592. "type": {
  28593. "type": "string",
  28594. "enum": ["session.next.prompt.admitted"]
  28595. },
  28596. "data": {
  28597. "type": "object",
  28598. "properties": {
  28599. "timestamp": {
  28600. "type": "number"
  28601. },
  28602. "sessionID": {
  28603. "type": "string",
  28604. "pattern": "^ses"
  28605. },
  28606. "messageID": {
  28607. "type": "string",
  28608. "pattern": "^msg_"
  28609. },
  28610. "prompt": {
  28611. "$ref": "#/components/schemas/Prompt"
  28612. },
  28613. "delivery": {
  28614. "type": "string",
  28615. "enum": ["steer", "queue"]
  28616. }
  28617. },
  28618. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  28619. "additionalProperties": false
  28620. }
  28621. },
  28622. "required": ["id", "type", "data"],
  28623. "additionalProperties": false
  28624. },
  28625. "V2EventSessionNextPromptPromoted": {
  28626. "type": "object",
  28627. "properties": {
  28628. "id": {
  28629. "type": "string",
  28630. "pattern": "^evt_"
  28631. },
  28632. "metadata": {
  28633. "type": "object"
  28634. },
  28635. "durable": {
  28636. "type": "object",
  28637. "properties": {
  28638. "aggregateID": {
  28639. "type": "string"
  28640. },
  28641. "seq": {
  28642. "type": "integer"
  28643. },
  28644. "version": {
  28645. "type": "integer"
  28646. }
  28647. },
  28648. "required": ["aggregateID", "seq", "version"],
  28649. "additionalProperties": false
  28650. },
  28651. "location": {
  28652. "$ref": "#/components/schemas/LocationRef"
  28653. },
  28654. "type": {
  28655. "type": "string",
  28656. "enum": ["session.next.prompt.promoted"]
  28657. },
  28658. "data": {
  28659. "type": "object",
  28660. "properties": {
  28661. "timestamp": {
  28662. "type": "number"
  28663. },
  28664. "sessionID": {
  28665. "type": "string",
  28666. "pattern": "^ses"
  28667. },
  28668. "messageID": {
  28669. "type": "string",
  28670. "pattern": "^msg_"
  28671. },
  28672. "prompt": {
  28673. "$ref": "#/components/schemas/Prompt"
  28674. },
  28675. "timeCreated": {
  28676. "type": "number"
  28677. }
  28678. },
  28679. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  28680. "additionalProperties": false
  28681. }
  28682. },
  28683. "required": ["id", "type", "data"],
  28684. "additionalProperties": false
  28685. },
  28686. "V2EventSessionNextContextUpdated": {
  28687. "type": "object",
  28688. "properties": {
  28689. "id": {
  28690. "type": "string",
  28691. "pattern": "^evt_"
  28692. },
  28693. "metadata": {
  28694. "type": "object"
  28695. },
  28696. "durable": {
  28697. "type": "object",
  28698. "properties": {
  28699. "aggregateID": {
  28700. "type": "string"
  28701. },
  28702. "seq": {
  28703. "type": "integer"
  28704. },
  28705. "version": {
  28706. "type": "integer"
  28707. }
  28708. },
  28709. "required": ["aggregateID", "seq", "version"],
  28710. "additionalProperties": false
  28711. },
  28712. "location": {
  28713. "$ref": "#/components/schemas/LocationRef"
  28714. },
  28715. "type": {
  28716. "type": "string",
  28717. "enum": ["session.next.context.updated"]
  28718. },
  28719. "data": {
  28720. "type": "object",
  28721. "properties": {
  28722. "timestamp": {
  28723. "type": "number"
  28724. },
  28725. "sessionID": {
  28726. "type": "string",
  28727. "pattern": "^ses"
  28728. },
  28729. "messageID": {
  28730. "type": "string",
  28731. "pattern": "^msg_"
  28732. },
  28733. "text": {
  28734. "type": "string"
  28735. }
  28736. },
  28737. "required": ["timestamp", "sessionID", "messageID", "text"],
  28738. "additionalProperties": false
  28739. }
  28740. },
  28741. "required": ["id", "type", "data"],
  28742. "additionalProperties": false
  28743. },
  28744. "V2EventSessionNextSynthetic": {
  28745. "type": "object",
  28746. "properties": {
  28747. "id": {
  28748. "type": "string",
  28749. "pattern": "^evt_"
  28750. },
  28751. "metadata": {
  28752. "type": "object"
  28753. },
  28754. "durable": {
  28755. "type": "object",
  28756. "properties": {
  28757. "aggregateID": {
  28758. "type": "string"
  28759. },
  28760. "seq": {
  28761. "type": "integer"
  28762. },
  28763. "version": {
  28764. "type": "integer"
  28765. }
  28766. },
  28767. "required": ["aggregateID", "seq", "version"],
  28768. "additionalProperties": false
  28769. },
  28770. "location": {
  28771. "$ref": "#/components/schemas/LocationRef"
  28772. },
  28773. "type": {
  28774. "type": "string",
  28775. "enum": ["session.next.synthetic"]
  28776. },
  28777. "data": {
  28778. "type": "object",
  28779. "properties": {
  28780. "timestamp": {
  28781. "type": "number"
  28782. },
  28783. "sessionID": {
  28784. "type": "string",
  28785. "pattern": "^ses"
  28786. },
  28787. "messageID": {
  28788. "type": "string",
  28789. "pattern": "^msg_"
  28790. },
  28791. "text": {
  28792. "type": "string"
  28793. }
  28794. },
  28795. "required": ["timestamp", "sessionID", "messageID", "text"],
  28796. "additionalProperties": false
  28797. }
  28798. },
  28799. "required": ["id", "type", "data"],
  28800. "additionalProperties": false
  28801. },
  28802. "V2EventSessionNextShellStarted": {
  28803. "type": "object",
  28804. "properties": {
  28805. "id": {
  28806. "type": "string",
  28807. "pattern": "^evt_"
  28808. },
  28809. "metadata": {
  28810. "type": "object"
  28811. },
  28812. "durable": {
  28813. "type": "object",
  28814. "properties": {
  28815. "aggregateID": {
  28816. "type": "string"
  28817. },
  28818. "seq": {
  28819. "type": "integer"
  28820. },
  28821. "version": {
  28822. "type": "integer"
  28823. }
  28824. },
  28825. "required": ["aggregateID", "seq", "version"],
  28826. "additionalProperties": false
  28827. },
  28828. "location": {
  28829. "$ref": "#/components/schemas/LocationRef"
  28830. },
  28831. "type": {
  28832. "type": "string",
  28833. "enum": ["session.next.shell.started"]
  28834. },
  28835. "data": {
  28836. "type": "object",
  28837. "properties": {
  28838. "timestamp": {
  28839. "type": "number"
  28840. },
  28841. "sessionID": {
  28842. "type": "string",
  28843. "pattern": "^ses"
  28844. },
  28845. "messageID": {
  28846. "type": "string",
  28847. "pattern": "^msg_"
  28848. },
  28849. "callID": {
  28850. "type": "string"
  28851. },
  28852. "command": {
  28853. "type": "string"
  28854. }
  28855. },
  28856. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  28857. "additionalProperties": false
  28858. }
  28859. },
  28860. "required": ["id", "type", "data"],
  28861. "additionalProperties": false
  28862. },
  28863. "V2EventSessionNextShellEnded": {
  28864. "type": "object",
  28865. "properties": {
  28866. "id": {
  28867. "type": "string",
  28868. "pattern": "^evt_"
  28869. },
  28870. "metadata": {
  28871. "type": "object"
  28872. },
  28873. "durable": {
  28874. "type": "object",
  28875. "properties": {
  28876. "aggregateID": {
  28877. "type": "string"
  28878. },
  28879. "seq": {
  28880. "type": "integer"
  28881. },
  28882. "version": {
  28883. "type": "integer"
  28884. }
  28885. },
  28886. "required": ["aggregateID", "seq", "version"],
  28887. "additionalProperties": false
  28888. },
  28889. "location": {
  28890. "$ref": "#/components/schemas/LocationRef"
  28891. },
  28892. "type": {
  28893. "type": "string",
  28894. "enum": ["session.next.shell.ended"]
  28895. },
  28896. "data": {
  28897. "type": "object",
  28898. "properties": {
  28899. "timestamp": {
  28900. "type": "number"
  28901. },
  28902. "sessionID": {
  28903. "type": "string",
  28904. "pattern": "^ses"
  28905. },
  28906. "callID": {
  28907. "type": "string"
  28908. },
  28909. "output": {
  28910. "type": "string"
  28911. }
  28912. },
  28913. "required": ["timestamp", "sessionID", "callID", "output"],
  28914. "additionalProperties": false
  28915. }
  28916. },
  28917. "required": ["id", "type", "data"],
  28918. "additionalProperties": false
  28919. },
  28920. "V2EventSessionNextStepStarted": {
  28921. "type": "object",
  28922. "properties": {
  28923. "id": {
  28924. "type": "string",
  28925. "pattern": "^evt_"
  28926. },
  28927. "metadata": {
  28928. "type": "object"
  28929. },
  28930. "durable": {
  28931. "type": "object",
  28932. "properties": {
  28933. "aggregateID": {
  28934. "type": "string"
  28935. },
  28936. "seq": {
  28937. "type": "integer"
  28938. },
  28939. "version": {
  28940. "type": "integer"
  28941. }
  28942. },
  28943. "required": ["aggregateID", "seq", "version"],
  28944. "additionalProperties": false
  28945. },
  28946. "location": {
  28947. "$ref": "#/components/schemas/LocationRef"
  28948. },
  28949. "type": {
  28950. "type": "string",
  28951. "enum": ["session.next.step.started"]
  28952. },
  28953. "data": {
  28954. "type": "object",
  28955. "properties": {
  28956. "timestamp": {
  28957. "type": "number"
  28958. },
  28959. "sessionID": {
  28960. "type": "string",
  28961. "pattern": "^ses"
  28962. },
  28963. "assistantMessageID": {
  28964. "type": "string",
  28965. "pattern": "^msg_"
  28966. },
  28967. "agent": {
  28968. "type": "string"
  28969. },
  28970. "model": {
  28971. "type": "object",
  28972. "properties": {
  28973. "id": {
  28974. "type": "string"
  28975. },
  28976. "providerID": {
  28977. "type": "string"
  28978. },
  28979. "variant": {
  28980. "type": "string"
  28981. }
  28982. },
  28983. "required": ["id", "providerID"],
  28984. "additionalProperties": false
  28985. },
  28986. "snapshot": {
  28987. "type": "string"
  28988. }
  28989. },
  28990. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  28991. "additionalProperties": false
  28992. }
  28993. },
  28994. "required": ["id", "type", "data"],
  28995. "additionalProperties": false
  28996. },
  28997. "V2EventSessionNextStepEnded": {
  28998. "type": "object",
  28999. "properties": {
  29000. "id": {
  29001. "type": "string",
  29002. "pattern": "^evt_"
  29003. },
  29004. "metadata": {
  29005. "type": "object"
  29006. },
  29007. "durable": {
  29008. "type": "object",
  29009. "properties": {
  29010. "aggregateID": {
  29011. "type": "string"
  29012. },
  29013. "seq": {
  29014. "type": "integer"
  29015. },
  29016. "version": {
  29017. "type": "integer"
  29018. }
  29019. },
  29020. "required": ["aggregateID", "seq", "version"],
  29021. "additionalProperties": false
  29022. },
  29023. "location": {
  29024. "$ref": "#/components/schemas/LocationRef"
  29025. },
  29026. "type": {
  29027. "type": "string",
  29028. "enum": ["session.next.step.ended"]
  29029. },
  29030. "data": {
  29031. "type": "object",
  29032. "properties": {
  29033. "timestamp": {
  29034. "type": "number"
  29035. },
  29036. "sessionID": {
  29037. "type": "string",
  29038. "pattern": "^ses"
  29039. },
  29040. "assistantMessageID": {
  29041. "type": "string",
  29042. "pattern": "^msg_"
  29043. },
  29044. "finish": {
  29045. "type": "string"
  29046. },
  29047. "cost": {
  29048. "type": "number"
  29049. },
  29050. "tokens": {
  29051. "type": "object",
  29052. "properties": {
  29053. "input": {
  29054. "type": "number"
  29055. },
  29056. "output": {
  29057. "type": "number"
  29058. },
  29059. "reasoning": {
  29060. "type": "number"
  29061. },
  29062. "cache": {
  29063. "type": "object",
  29064. "properties": {
  29065. "read": {
  29066. "type": "number"
  29067. },
  29068. "write": {
  29069. "type": "number"
  29070. }
  29071. },
  29072. "required": ["read", "write"],
  29073. "additionalProperties": false
  29074. }
  29075. },
  29076. "required": ["input", "output", "reasoning", "cache"],
  29077. "additionalProperties": false
  29078. },
  29079. "snapshot": {
  29080. "type": "string"
  29081. }
  29082. },
  29083. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  29084. "additionalProperties": false
  29085. }
  29086. },
  29087. "required": ["id", "type", "data"],
  29088. "additionalProperties": false
  29089. },
  29090. "V2EventSessionNextStepFailed": {
  29091. "type": "object",
  29092. "properties": {
  29093. "id": {
  29094. "type": "string",
  29095. "pattern": "^evt_"
  29096. },
  29097. "metadata": {
  29098. "type": "object"
  29099. },
  29100. "durable": {
  29101. "type": "object",
  29102. "properties": {
  29103. "aggregateID": {
  29104. "type": "string"
  29105. },
  29106. "seq": {
  29107. "type": "integer"
  29108. },
  29109. "version": {
  29110. "type": "integer"
  29111. }
  29112. },
  29113. "required": ["aggregateID", "seq", "version"],
  29114. "additionalProperties": false
  29115. },
  29116. "location": {
  29117. "$ref": "#/components/schemas/LocationRef"
  29118. },
  29119. "type": {
  29120. "type": "string",
  29121. "enum": ["session.next.step.failed"]
  29122. },
  29123. "data": {
  29124. "type": "object",
  29125. "properties": {
  29126. "timestamp": {
  29127. "type": "number"
  29128. },
  29129. "sessionID": {
  29130. "type": "string",
  29131. "pattern": "^ses"
  29132. },
  29133. "assistantMessageID": {
  29134. "type": "string",
  29135. "pattern": "^msg_"
  29136. },
  29137. "error": {
  29138. "$ref": "#/components/schemas/SessionErrorUnknown"
  29139. }
  29140. },
  29141. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  29142. "additionalProperties": false
  29143. }
  29144. },
  29145. "required": ["id", "type", "data"],
  29146. "additionalProperties": false
  29147. },
  29148. "V2EventSessionNextTextStarted": {
  29149. "type": "object",
  29150. "properties": {
  29151. "id": {
  29152. "type": "string",
  29153. "pattern": "^evt_"
  29154. },
  29155. "metadata": {
  29156. "type": "object"
  29157. },
  29158. "durable": {
  29159. "type": "object",
  29160. "properties": {
  29161. "aggregateID": {
  29162. "type": "string"
  29163. },
  29164. "seq": {
  29165. "type": "integer"
  29166. },
  29167. "version": {
  29168. "type": "integer"
  29169. }
  29170. },
  29171. "required": ["aggregateID", "seq", "version"],
  29172. "additionalProperties": false
  29173. },
  29174. "location": {
  29175. "$ref": "#/components/schemas/LocationRef"
  29176. },
  29177. "type": {
  29178. "type": "string",
  29179. "enum": ["session.next.text.started"]
  29180. },
  29181. "data": {
  29182. "type": "object",
  29183. "properties": {
  29184. "timestamp": {
  29185. "type": "number"
  29186. },
  29187. "sessionID": {
  29188. "type": "string",
  29189. "pattern": "^ses"
  29190. },
  29191. "assistantMessageID": {
  29192. "type": "string",
  29193. "pattern": "^msg_"
  29194. },
  29195. "textID": {
  29196. "type": "string"
  29197. }
  29198. },
  29199. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  29200. "additionalProperties": false
  29201. }
  29202. },
  29203. "required": ["id", "type", "data"],
  29204. "additionalProperties": false
  29205. },
  29206. "V2EventSessionNextTextDelta": {
  29207. "type": "object",
  29208. "properties": {
  29209. "id": {
  29210. "type": "string",
  29211. "pattern": "^evt_"
  29212. },
  29213. "metadata": {
  29214. "type": "object"
  29215. },
  29216. "durable": {
  29217. "type": "object",
  29218. "properties": {
  29219. "aggregateID": {
  29220. "type": "string"
  29221. },
  29222. "seq": {
  29223. "type": "integer"
  29224. },
  29225. "version": {
  29226. "type": "integer"
  29227. }
  29228. },
  29229. "required": ["aggregateID", "seq", "version"],
  29230. "additionalProperties": false
  29231. },
  29232. "location": {
  29233. "$ref": "#/components/schemas/LocationRef"
  29234. },
  29235. "type": {
  29236. "type": "string",
  29237. "enum": ["session.next.text.delta"]
  29238. },
  29239. "data": {
  29240. "type": "object",
  29241. "properties": {
  29242. "timestamp": {
  29243. "type": "number"
  29244. },
  29245. "sessionID": {
  29246. "type": "string",
  29247. "pattern": "^ses"
  29248. },
  29249. "assistantMessageID": {
  29250. "type": "string",
  29251. "pattern": "^msg_"
  29252. },
  29253. "textID": {
  29254. "type": "string"
  29255. },
  29256. "delta": {
  29257. "type": "string"
  29258. }
  29259. },
  29260. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  29261. "additionalProperties": false
  29262. }
  29263. },
  29264. "required": ["id", "type", "data"],
  29265. "additionalProperties": false
  29266. },
  29267. "V2EventSessionNextTextEnded": {
  29268. "type": "object",
  29269. "properties": {
  29270. "id": {
  29271. "type": "string",
  29272. "pattern": "^evt_"
  29273. },
  29274. "metadata": {
  29275. "type": "object"
  29276. },
  29277. "durable": {
  29278. "type": "object",
  29279. "properties": {
  29280. "aggregateID": {
  29281. "type": "string"
  29282. },
  29283. "seq": {
  29284. "type": "integer"
  29285. },
  29286. "version": {
  29287. "type": "integer"
  29288. }
  29289. },
  29290. "required": ["aggregateID", "seq", "version"],
  29291. "additionalProperties": false
  29292. },
  29293. "location": {
  29294. "$ref": "#/components/schemas/LocationRef"
  29295. },
  29296. "type": {
  29297. "type": "string",
  29298. "enum": ["session.next.text.ended"]
  29299. },
  29300. "data": {
  29301. "type": "object",
  29302. "properties": {
  29303. "timestamp": {
  29304. "type": "number"
  29305. },
  29306. "sessionID": {
  29307. "type": "string",
  29308. "pattern": "^ses"
  29309. },
  29310. "assistantMessageID": {
  29311. "type": "string",
  29312. "pattern": "^msg_"
  29313. },
  29314. "textID": {
  29315. "type": "string"
  29316. },
  29317. "text": {
  29318. "type": "string"
  29319. }
  29320. },
  29321. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  29322. "additionalProperties": false
  29323. }
  29324. },
  29325. "required": ["id", "type", "data"],
  29326. "additionalProperties": false
  29327. },
  29328. "V2EventSessionNextReasoningStarted": {
  29329. "type": "object",
  29330. "properties": {
  29331. "id": {
  29332. "type": "string",
  29333. "pattern": "^evt_"
  29334. },
  29335. "metadata": {
  29336. "type": "object"
  29337. },
  29338. "durable": {
  29339. "type": "object",
  29340. "properties": {
  29341. "aggregateID": {
  29342. "type": "string"
  29343. },
  29344. "seq": {
  29345. "type": "integer"
  29346. },
  29347. "version": {
  29348. "type": "integer"
  29349. }
  29350. },
  29351. "required": ["aggregateID", "seq", "version"],
  29352. "additionalProperties": false
  29353. },
  29354. "location": {
  29355. "$ref": "#/components/schemas/LocationRef"
  29356. },
  29357. "type": {
  29358. "type": "string",
  29359. "enum": ["session.next.reasoning.started"]
  29360. },
  29361. "data": {
  29362. "type": "object",
  29363. "properties": {
  29364. "timestamp": {
  29365. "type": "number"
  29366. },
  29367. "sessionID": {
  29368. "type": "string",
  29369. "pattern": "^ses"
  29370. },
  29371. "assistantMessageID": {
  29372. "type": "string",
  29373. "pattern": "^msg_"
  29374. },
  29375. "reasoningID": {
  29376. "type": "string"
  29377. },
  29378. "providerMetadata": {
  29379. "type": "object",
  29380. "additionalProperties": {
  29381. "type": "object"
  29382. }
  29383. }
  29384. },
  29385. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  29386. "additionalProperties": false
  29387. }
  29388. },
  29389. "required": ["id", "type", "data"],
  29390. "additionalProperties": false
  29391. },
  29392. "V2EventSessionNextReasoningDelta": {
  29393. "type": "object",
  29394. "properties": {
  29395. "id": {
  29396. "type": "string",
  29397. "pattern": "^evt_"
  29398. },
  29399. "metadata": {
  29400. "type": "object"
  29401. },
  29402. "durable": {
  29403. "type": "object",
  29404. "properties": {
  29405. "aggregateID": {
  29406. "type": "string"
  29407. },
  29408. "seq": {
  29409. "type": "integer"
  29410. },
  29411. "version": {
  29412. "type": "integer"
  29413. }
  29414. },
  29415. "required": ["aggregateID", "seq", "version"],
  29416. "additionalProperties": false
  29417. },
  29418. "location": {
  29419. "$ref": "#/components/schemas/LocationRef"
  29420. },
  29421. "type": {
  29422. "type": "string",
  29423. "enum": ["session.next.reasoning.delta"]
  29424. },
  29425. "data": {
  29426. "type": "object",
  29427. "properties": {
  29428. "timestamp": {
  29429. "type": "number"
  29430. },
  29431. "sessionID": {
  29432. "type": "string",
  29433. "pattern": "^ses"
  29434. },
  29435. "assistantMessageID": {
  29436. "type": "string",
  29437. "pattern": "^msg_"
  29438. },
  29439. "reasoningID": {
  29440. "type": "string"
  29441. },
  29442. "delta": {
  29443. "type": "string"
  29444. }
  29445. },
  29446. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  29447. "additionalProperties": false
  29448. }
  29449. },
  29450. "required": ["id", "type", "data"],
  29451. "additionalProperties": false
  29452. },
  29453. "V2EventSessionNextReasoningEnded": {
  29454. "type": "object",
  29455. "properties": {
  29456. "id": {
  29457. "type": "string",
  29458. "pattern": "^evt_"
  29459. },
  29460. "metadata": {
  29461. "type": "object"
  29462. },
  29463. "durable": {
  29464. "type": "object",
  29465. "properties": {
  29466. "aggregateID": {
  29467. "type": "string"
  29468. },
  29469. "seq": {
  29470. "type": "integer"
  29471. },
  29472. "version": {
  29473. "type": "integer"
  29474. }
  29475. },
  29476. "required": ["aggregateID", "seq", "version"],
  29477. "additionalProperties": false
  29478. },
  29479. "location": {
  29480. "$ref": "#/components/schemas/LocationRef"
  29481. },
  29482. "type": {
  29483. "type": "string",
  29484. "enum": ["session.next.reasoning.ended"]
  29485. },
  29486. "data": {
  29487. "type": "object",
  29488. "properties": {
  29489. "timestamp": {
  29490. "type": "number"
  29491. },
  29492. "sessionID": {
  29493. "type": "string",
  29494. "pattern": "^ses"
  29495. },
  29496. "assistantMessageID": {
  29497. "type": "string",
  29498. "pattern": "^msg_"
  29499. },
  29500. "reasoningID": {
  29501. "type": "string"
  29502. },
  29503. "text": {
  29504. "type": "string"
  29505. },
  29506. "providerMetadata": {
  29507. "type": "object",
  29508. "additionalProperties": {
  29509. "type": "object"
  29510. }
  29511. }
  29512. },
  29513. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  29514. "additionalProperties": false
  29515. }
  29516. },
  29517. "required": ["id", "type", "data"],
  29518. "additionalProperties": false
  29519. },
  29520. "V2EventSessionNextToolInputStarted": {
  29521. "type": "object",
  29522. "properties": {
  29523. "id": {
  29524. "type": "string",
  29525. "pattern": "^evt_"
  29526. },
  29527. "metadata": {
  29528. "type": "object"
  29529. },
  29530. "durable": {
  29531. "type": "object",
  29532. "properties": {
  29533. "aggregateID": {
  29534. "type": "string"
  29535. },
  29536. "seq": {
  29537. "type": "integer"
  29538. },
  29539. "version": {
  29540. "type": "integer"
  29541. }
  29542. },
  29543. "required": ["aggregateID", "seq", "version"],
  29544. "additionalProperties": false
  29545. },
  29546. "location": {
  29547. "$ref": "#/components/schemas/LocationRef"
  29548. },
  29549. "type": {
  29550. "type": "string",
  29551. "enum": ["session.next.tool.input.started"]
  29552. },
  29553. "data": {
  29554. "type": "object",
  29555. "properties": {
  29556. "timestamp": {
  29557. "type": "number"
  29558. },
  29559. "sessionID": {
  29560. "type": "string",
  29561. "pattern": "^ses"
  29562. },
  29563. "assistantMessageID": {
  29564. "type": "string",
  29565. "pattern": "^msg_"
  29566. },
  29567. "callID": {
  29568. "type": "string"
  29569. },
  29570. "name": {
  29571. "type": "string"
  29572. }
  29573. },
  29574. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  29575. "additionalProperties": false
  29576. }
  29577. },
  29578. "required": ["id", "type", "data"],
  29579. "additionalProperties": false
  29580. },
  29581. "V2EventSessionNextToolInputDelta": {
  29582. "type": "object",
  29583. "properties": {
  29584. "id": {
  29585. "type": "string",
  29586. "pattern": "^evt_"
  29587. },
  29588. "metadata": {
  29589. "type": "object"
  29590. },
  29591. "durable": {
  29592. "type": "object",
  29593. "properties": {
  29594. "aggregateID": {
  29595. "type": "string"
  29596. },
  29597. "seq": {
  29598. "type": "integer"
  29599. },
  29600. "version": {
  29601. "type": "integer"
  29602. }
  29603. },
  29604. "required": ["aggregateID", "seq", "version"],
  29605. "additionalProperties": false
  29606. },
  29607. "location": {
  29608. "$ref": "#/components/schemas/LocationRef"
  29609. },
  29610. "type": {
  29611. "type": "string",
  29612. "enum": ["session.next.tool.input.delta"]
  29613. },
  29614. "data": {
  29615. "type": "object",
  29616. "properties": {
  29617. "timestamp": {
  29618. "type": "number"
  29619. },
  29620. "sessionID": {
  29621. "type": "string",
  29622. "pattern": "^ses"
  29623. },
  29624. "assistantMessageID": {
  29625. "type": "string",
  29626. "pattern": "^msg_"
  29627. },
  29628. "callID": {
  29629. "type": "string"
  29630. },
  29631. "delta": {
  29632. "type": "string"
  29633. }
  29634. },
  29635. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  29636. "additionalProperties": false
  29637. }
  29638. },
  29639. "required": ["id", "type", "data"],
  29640. "additionalProperties": false
  29641. },
  29642. "V2EventSessionNextToolInputEnded": {
  29643. "type": "object",
  29644. "properties": {
  29645. "id": {
  29646. "type": "string",
  29647. "pattern": "^evt_"
  29648. },
  29649. "metadata": {
  29650. "type": "object"
  29651. },
  29652. "durable": {
  29653. "type": "object",
  29654. "properties": {
  29655. "aggregateID": {
  29656. "type": "string"
  29657. },
  29658. "seq": {
  29659. "type": "integer"
  29660. },
  29661. "version": {
  29662. "type": "integer"
  29663. }
  29664. },
  29665. "required": ["aggregateID", "seq", "version"],
  29666. "additionalProperties": false
  29667. },
  29668. "location": {
  29669. "$ref": "#/components/schemas/LocationRef"
  29670. },
  29671. "type": {
  29672. "type": "string",
  29673. "enum": ["session.next.tool.input.ended"]
  29674. },
  29675. "data": {
  29676. "type": "object",
  29677. "properties": {
  29678. "timestamp": {
  29679. "type": "number"
  29680. },
  29681. "sessionID": {
  29682. "type": "string",
  29683. "pattern": "^ses"
  29684. },
  29685. "assistantMessageID": {
  29686. "type": "string",
  29687. "pattern": "^msg_"
  29688. },
  29689. "callID": {
  29690. "type": "string"
  29691. },
  29692. "text": {
  29693. "type": "string"
  29694. }
  29695. },
  29696. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  29697. "additionalProperties": false
  29698. }
  29699. },
  29700. "required": ["id", "type", "data"],
  29701. "additionalProperties": false
  29702. },
  29703. "V2EventSessionNextToolCalled": {
  29704. "type": "object",
  29705. "properties": {
  29706. "id": {
  29707. "type": "string",
  29708. "pattern": "^evt_"
  29709. },
  29710. "metadata": {
  29711. "type": "object"
  29712. },
  29713. "durable": {
  29714. "type": "object",
  29715. "properties": {
  29716. "aggregateID": {
  29717. "type": "string"
  29718. },
  29719. "seq": {
  29720. "type": "integer"
  29721. },
  29722. "version": {
  29723. "type": "integer"
  29724. }
  29725. },
  29726. "required": ["aggregateID", "seq", "version"],
  29727. "additionalProperties": false
  29728. },
  29729. "location": {
  29730. "$ref": "#/components/schemas/LocationRef"
  29731. },
  29732. "type": {
  29733. "type": "string",
  29734. "enum": ["session.next.tool.called"]
  29735. },
  29736. "data": {
  29737. "type": "object",
  29738. "properties": {
  29739. "timestamp": {
  29740. "type": "number"
  29741. },
  29742. "sessionID": {
  29743. "type": "string",
  29744. "pattern": "^ses"
  29745. },
  29746. "assistantMessageID": {
  29747. "type": "string",
  29748. "pattern": "^msg_"
  29749. },
  29750. "callID": {
  29751. "type": "string"
  29752. },
  29753. "tool": {
  29754. "type": "string"
  29755. },
  29756. "input": {
  29757. "type": "object"
  29758. },
  29759. "provider": {
  29760. "type": "object",
  29761. "properties": {
  29762. "executed": {
  29763. "type": "boolean"
  29764. },
  29765. "metadata": {
  29766. "type": "object",
  29767. "additionalProperties": {
  29768. "type": "object"
  29769. }
  29770. }
  29771. },
  29772. "required": ["executed"],
  29773. "additionalProperties": false
  29774. }
  29775. },
  29776. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  29777. "additionalProperties": false
  29778. }
  29779. },
  29780. "required": ["id", "type", "data"],
  29781. "additionalProperties": false
  29782. },
  29783. "V2EventSessionNextToolProgress": {
  29784. "type": "object",
  29785. "properties": {
  29786. "id": {
  29787. "type": "string",
  29788. "pattern": "^evt_"
  29789. },
  29790. "metadata": {
  29791. "type": "object"
  29792. },
  29793. "durable": {
  29794. "type": "object",
  29795. "properties": {
  29796. "aggregateID": {
  29797. "type": "string"
  29798. },
  29799. "seq": {
  29800. "type": "integer"
  29801. },
  29802. "version": {
  29803. "type": "integer"
  29804. }
  29805. },
  29806. "required": ["aggregateID", "seq", "version"],
  29807. "additionalProperties": false
  29808. },
  29809. "location": {
  29810. "$ref": "#/components/schemas/LocationRef"
  29811. },
  29812. "type": {
  29813. "type": "string",
  29814. "enum": ["session.next.tool.progress"]
  29815. },
  29816. "data": {
  29817. "type": "object",
  29818. "properties": {
  29819. "timestamp": {
  29820. "type": "number"
  29821. },
  29822. "sessionID": {
  29823. "type": "string",
  29824. "pattern": "^ses"
  29825. },
  29826. "assistantMessageID": {
  29827. "type": "string",
  29828. "pattern": "^msg_"
  29829. },
  29830. "callID": {
  29831. "type": "string"
  29832. },
  29833. "structured": {
  29834. "type": "object"
  29835. },
  29836. "content": {
  29837. "type": "array",
  29838. "items": {
  29839. "anyOf": [
  29840. {
  29841. "$ref": "#/components/schemas/ToolTextContent"
  29842. },
  29843. {
  29844. "$ref": "#/components/schemas/ToolFileContent"
  29845. }
  29846. ]
  29847. }
  29848. }
  29849. },
  29850. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  29851. "additionalProperties": false
  29852. }
  29853. },
  29854. "required": ["id", "type", "data"],
  29855. "additionalProperties": false
  29856. },
  29857. "V2EventSessionNextToolSuccess": {
  29858. "type": "object",
  29859. "properties": {
  29860. "id": {
  29861. "type": "string",
  29862. "pattern": "^evt_"
  29863. },
  29864. "metadata": {
  29865. "type": "object"
  29866. },
  29867. "durable": {
  29868. "type": "object",
  29869. "properties": {
  29870. "aggregateID": {
  29871. "type": "string"
  29872. },
  29873. "seq": {
  29874. "type": "integer"
  29875. },
  29876. "version": {
  29877. "type": "integer"
  29878. }
  29879. },
  29880. "required": ["aggregateID", "seq", "version"],
  29881. "additionalProperties": false
  29882. },
  29883. "location": {
  29884. "$ref": "#/components/schemas/LocationRef"
  29885. },
  29886. "type": {
  29887. "type": "string",
  29888. "enum": ["session.next.tool.success"]
  29889. },
  29890. "data": {
  29891. "type": "object",
  29892. "properties": {
  29893. "timestamp": {
  29894. "type": "number"
  29895. },
  29896. "sessionID": {
  29897. "type": "string",
  29898. "pattern": "^ses"
  29899. },
  29900. "assistantMessageID": {
  29901. "type": "string",
  29902. "pattern": "^msg_"
  29903. },
  29904. "callID": {
  29905. "type": "string"
  29906. },
  29907. "structured": {
  29908. "type": "object"
  29909. },
  29910. "content": {
  29911. "type": "array",
  29912. "items": {
  29913. "anyOf": [
  29914. {
  29915. "$ref": "#/components/schemas/ToolTextContent"
  29916. },
  29917. {
  29918. "$ref": "#/components/schemas/ToolFileContent"
  29919. }
  29920. ]
  29921. }
  29922. },
  29923. "outputPaths": {
  29924. "type": "array",
  29925. "items": {
  29926. "type": "string"
  29927. }
  29928. },
  29929. "result": {},
  29930. "provider": {
  29931. "type": "object",
  29932. "properties": {
  29933. "executed": {
  29934. "type": "boolean"
  29935. },
  29936. "metadata": {
  29937. "type": "object",
  29938. "additionalProperties": {
  29939. "type": "object"
  29940. }
  29941. }
  29942. },
  29943. "required": ["executed"],
  29944. "additionalProperties": false
  29945. }
  29946. },
  29947. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  29948. "additionalProperties": false
  29949. }
  29950. },
  29951. "required": ["id", "type", "data"],
  29952. "additionalProperties": false
  29953. },
  29954. "V2EventSessionNextToolFailed": {
  29955. "type": "object",
  29956. "properties": {
  29957. "id": {
  29958. "type": "string",
  29959. "pattern": "^evt_"
  29960. },
  29961. "metadata": {
  29962. "type": "object"
  29963. },
  29964. "durable": {
  29965. "type": "object",
  29966. "properties": {
  29967. "aggregateID": {
  29968. "type": "string"
  29969. },
  29970. "seq": {
  29971. "type": "integer"
  29972. },
  29973. "version": {
  29974. "type": "integer"
  29975. }
  29976. },
  29977. "required": ["aggregateID", "seq", "version"],
  29978. "additionalProperties": false
  29979. },
  29980. "location": {
  29981. "$ref": "#/components/schemas/LocationRef"
  29982. },
  29983. "type": {
  29984. "type": "string",
  29985. "enum": ["session.next.tool.failed"]
  29986. },
  29987. "data": {
  29988. "type": "object",
  29989. "properties": {
  29990. "timestamp": {
  29991. "type": "number"
  29992. },
  29993. "sessionID": {
  29994. "type": "string",
  29995. "pattern": "^ses"
  29996. },
  29997. "assistantMessageID": {
  29998. "type": "string",
  29999. "pattern": "^msg_"
  30000. },
  30001. "callID": {
  30002. "type": "string"
  30003. },
  30004. "error": {
  30005. "$ref": "#/components/schemas/SessionErrorUnknown"
  30006. },
  30007. "result": {},
  30008. "provider": {
  30009. "type": "object",
  30010. "properties": {
  30011. "executed": {
  30012. "type": "boolean"
  30013. },
  30014. "metadata": {
  30015. "type": "object",
  30016. "additionalProperties": {
  30017. "type": "object"
  30018. }
  30019. }
  30020. },
  30021. "required": ["executed"],
  30022. "additionalProperties": false
  30023. }
  30024. },
  30025. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  30026. "additionalProperties": false
  30027. }
  30028. },
  30029. "required": ["id", "type", "data"],
  30030. "additionalProperties": false
  30031. },
  30032. "V2EventSessionNextRetried": {
  30033. "type": "object",
  30034. "properties": {
  30035. "id": {
  30036. "type": "string",
  30037. "pattern": "^evt_"
  30038. },
  30039. "metadata": {
  30040. "type": "object"
  30041. },
  30042. "durable": {
  30043. "type": "object",
  30044. "properties": {
  30045. "aggregateID": {
  30046. "type": "string"
  30047. },
  30048. "seq": {
  30049. "type": "integer"
  30050. },
  30051. "version": {
  30052. "type": "integer"
  30053. }
  30054. },
  30055. "required": ["aggregateID", "seq", "version"],
  30056. "additionalProperties": false
  30057. },
  30058. "location": {
  30059. "$ref": "#/components/schemas/LocationRef"
  30060. },
  30061. "type": {
  30062. "type": "string",
  30063. "enum": ["session.next.retried"]
  30064. },
  30065. "data": {
  30066. "type": "object",
  30067. "properties": {
  30068. "timestamp": {
  30069. "type": "number"
  30070. },
  30071. "sessionID": {
  30072. "type": "string",
  30073. "pattern": "^ses"
  30074. },
  30075. "attempt": {
  30076. "type": "number"
  30077. },
  30078. "error": {
  30079. "$ref": "#/components/schemas/SessionNextRetry_error"
  30080. }
  30081. },
  30082. "required": ["timestamp", "sessionID", "attempt", "error"],
  30083. "additionalProperties": false
  30084. }
  30085. },
  30086. "required": ["id", "type", "data"],
  30087. "additionalProperties": false
  30088. },
  30089. "V2EventSessionNextCompactionStarted": {
  30090. "type": "object",
  30091. "properties": {
  30092. "id": {
  30093. "type": "string",
  30094. "pattern": "^evt_"
  30095. },
  30096. "metadata": {
  30097. "type": "object"
  30098. },
  30099. "durable": {
  30100. "type": "object",
  30101. "properties": {
  30102. "aggregateID": {
  30103. "type": "string"
  30104. },
  30105. "seq": {
  30106. "type": "integer"
  30107. },
  30108. "version": {
  30109. "type": "integer"
  30110. }
  30111. },
  30112. "required": ["aggregateID", "seq", "version"],
  30113. "additionalProperties": false
  30114. },
  30115. "location": {
  30116. "$ref": "#/components/schemas/LocationRef"
  30117. },
  30118. "type": {
  30119. "type": "string",
  30120. "enum": ["session.next.compaction.started"]
  30121. },
  30122. "data": {
  30123. "type": "object",
  30124. "properties": {
  30125. "timestamp": {
  30126. "type": "number"
  30127. },
  30128. "sessionID": {
  30129. "type": "string",
  30130. "pattern": "^ses"
  30131. },
  30132. "messageID": {
  30133. "type": "string",
  30134. "pattern": "^msg_"
  30135. },
  30136. "reason": {
  30137. "type": "string",
  30138. "enum": ["auto", "manual"]
  30139. }
  30140. },
  30141. "required": ["timestamp", "sessionID", "messageID", "reason"],
  30142. "additionalProperties": false
  30143. }
  30144. },
  30145. "required": ["id", "type", "data"],
  30146. "additionalProperties": false
  30147. },
  30148. "V2EventSessionNextCompactionDelta": {
  30149. "type": "object",
  30150. "properties": {
  30151. "id": {
  30152. "type": "string",
  30153. "pattern": "^evt_"
  30154. },
  30155. "metadata": {
  30156. "type": "object"
  30157. },
  30158. "durable": {
  30159. "type": "object",
  30160. "properties": {
  30161. "aggregateID": {
  30162. "type": "string"
  30163. },
  30164. "seq": {
  30165. "type": "integer"
  30166. },
  30167. "version": {
  30168. "type": "integer"
  30169. }
  30170. },
  30171. "required": ["aggregateID", "seq", "version"],
  30172. "additionalProperties": false
  30173. },
  30174. "location": {
  30175. "$ref": "#/components/schemas/LocationRef"
  30176. },
  30177. "type": {
  30178. "type": "string",
  30179. "enum": ["session.next.compaction.delta"]
  30180. },
  30181. "data": {
  30182. "type": "object",
  30183. "properties": {
  30184. "timestamp": {
  30185. "type": "number"
  30186. },
  30187. "sessionID": {
  30188. "type": "string",
  30189. "pattern": "^ses"
  30190. },
  30191. "messageID": {
  30192. "type": "string",
  30193. "pattern": "^msg_"
  30194. },
  30195. "text": {
  30196. "type": "string"
  30197. }
  30198. },
  30199. "required": ["timestamp", "sessionID", "messageID", "text"],
  30200. "additionalProperties": false
  30201. }
  30202. },
  30203. "required": ["id", "type", "data"],
  30204. "additionalProperties": false
  30205. },
  30206. "V2EventSessionNextCompactionEnded": {
  30207. "type": "object",
  30208. "properties": {
  30209. "id": {
  30210. "type": "string",
  30211. "pattern": "^evt_"
  30212. },
  30213. "metadata": {
  30214. "type": "object"
  30215. },
  30216. "durable": {
  30217. "type": "object",
  30218. "properties": {
  30219. "aggregateID": {
  30220. "type": "string"
  30221. },
  30222. "seq": {
  30223. "type": "integer"
  30224. },
  30225. "version": {
  30226. "type": "integer"
  30227. }
  30228. },
  30229. "required": ["aggregateID", "seq", "version"],
  30230. "additionalProperties": false
  30231. },
  30232. "location": {
  30233. "$ref": "#/components/schemas/LocationRef"
  30234. },
  30235. "type": {
  30236. "type": "string",
  30237. "enum": ["session.next.compaction.ended"]
  30238. },
  30239. "data": {
  30240. "type": "object",
  30241. "properties": {
  30242. "timestamp": {
  30243. "type": "number"
  30244. },
  30245. "sessionID": {
  30246. "type": "string",
  30247. "pattern": "^ses"
  30248. },
  30249. "messageID": {
  30250. "type": "string",
  30251. "pattern": "^msg_"
  30252. },
  30253. "reason": {
  30254. "type": "string",
  30255. "enum": ["auto", "manual"]
  30256. },
  30257. "text": {
  30258. "type": "string"
  30259. },
  30260. "recent": {
  30261. "type": "string"
  30262. }
  30263. },
  30264. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  30265. "additionalProperties": false
  30266. }
  30267. },
  30268. "required": ["id", "type", "data"],
  30269. "additionalProperties": false
  30270. },
  30271. "V2EventMessagePartDelta": {
  30272. "type": "object",
  30273. "properties": {
  30274. "id": {
  30275. "type": "string",
  30276. "pattern": "^evt_"
  30277. },
  30278. "metadata": {
  30279. "type": "object"
  30280. },
  30281. "durable": {
  30282. "type": "object",
  30283. "properties": {
  30284. "aggregateID": {
  30285. "type": "string"
  30286. },
  30287. "seq": {
  30288. "type": "integer"
  30289. },
  30290. "version": {
  30291. "type": "integer"
  30292. }
  30293. },
  30294. "required": ["aggregateID", "seq", "version"],
  30295. "additionalProperties": false
  30296. },
  30297. "location": {
  30298. "$ref": "#/components/schemas/LocationRef"
  30299. },
  30300. "type": {
  30301. "type": "string",
  30302. "enum": ["message.part.delta"]
  30303. },
  30304. "data": {
  30305. "type": "object",
  30306. "properties": {
  30307. "sessionID": {
  30308. "type": "string",
  30309. "pattern": "^ses"
  30310. },
  30311. "messageID": {
  30312. "type": "string",
  30313. "pattern": "^msg"
  30314. },
  30315. "partID": {
  30316. "type": "string",
  30317. "pattern": "^prt"
  30318. },
  30319. "field": {
  30320. "type": "string"
  30321. },
  30322. "delta": {
  30323. "type": "string"
  30324. }
  30325. },
  30326. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  30327. "additionalProperties": false
  30328. }
  30329. },
  30330. "required": ["id", "type", "data"],
  30331. "additionalProperties": false
  30332. },
  30333. "V2EventSessionDiff": {
  30334. "type": "object",
  30335. "properties": {
  30336. "id": {
  30337. "type": "string",
  30338. "pattern": "^evt_"
  30339. },
  30340. "metadata": {
  30341. "type": "object"
  30342. },
  30343. "durable": {
  30344. "type": "object",
  30345. "properties": {
  30346. "aggregateID": {
  30347. "type": "string"
  30348. },
  30349. "seq": {
  30350. "type": "integer"
  30351. },
  30352. "version": {
  30353. "type": "integer"
  30354. }
  30355. },
  30356. "required": ["aggregateID", "seq", "version"],
  30357. "additionalProperties": false
  30358. },
  30359. "location": {
  30360. "$ref": "#/components/schemas/LocationRef"
  30361. },
  30362. "type": {
  30363. "type": "string",
  30364. "enum": ["session.diff"]
  30365. },
  30366. "data": {
  30367. "type": "object",
  30368. "properties": {
  30369. "sessionID": {
  30370. "type": "string",
  30371. "pattern": "^ses"
  30372. },
  30373. "diff": {
  30374. "type": "array",
  30375. "items": {
  30376. "$ref": "#/components/schemas/SnapshotFileDiff"
  30377. }
  30378. }
  30379. },
  30380. "required": ["sessionID", "diff"],
  30381. "additionalProperties": false
  30382. }
  30383. },
  30384. "required": ["id", "type", "data"],
  30385. "additionalProperties": false
  30386. },
  30387. "V2EventSessionError": {
  30388. "type": "object",
  30389. "properties": {
  30390. "id": {
  30391. "type": "string",
  30392. "pattern": "^evt_"
  30393. },
  30394. "metadata": {
  30395. "type": "object"
  30396. },
  30397. "durable": {
  30398. "type": "object",
  30399. "properties": {
  30400. "aggregateID": {
  30401. "type": "string"
  30402. },
  30403. "seq": {
  30404. "type": "integer"
  30405. },
  30406. "version": {
  30407. "type": "integer"
  30408. }
  30409. },
  30410. "required": ["aggregateID", "seq", "version"],
  30411. "additionalProperties": false
  30412. },
  30413. "location": {
  30414. "$ref": "#/components/schemas/LocationRef"
  30415. },
  30416. "type": {
  30417. "type": "string",
  30418. "enum": ["session.error"]
  30419. },
  30420. "data": {
  30421. "type": "object",
  30422. "properties": {
  30423. "sessionID": {
  30424. "type": "string",
  30425. "pattern": "^ses"
  30426. },
  30427. "error": {
  30428. "anyOf": [
  30429. {
  30430. "$ref": "#/components/schemas/ProviderAuthError"
  30431. },
  30432. {
  30433. "$ref": "#/components/schemas/UnknownError"
  30434. },
  30435. {
  30436. "$ref": "#/components/schemas/MessageOutputLengthError"
  30437. },
  30438. {
  30439. "$ref": "#/components/schemas/MessageAbortedError"
  30440. },
  30441. {
  30442. "$ref": "#/components/schemas/StructuredOutputError"
  30443. },
  30444. {
  30445. "$ref": "#/components/schemas/ContextOverflowError"
  30446. },
  30447. {
  30448. "$ref": "#/components/schemas/ContentFilterError"
  30449. },
  30450. {
  30451. "$ref": "#/components/schemas/APIError"
  30452. }
  30453. ]
  30454. }
  30455. },
  30456. "additionalProperties": false
  30457. }
  30458. },
  30459. "required": ["id", "type", "data"],
  30460. "additionalProperties": false
  30461. },
  30462. "V2EventInstallationUpdated": {
  30463. "type": "object",
  30464. "properties": {
  30465. "id": {
  30466. "type": "string",
  30467. "pattern": "^evt_"
  30468. },
  30469. "metadata": {
  30470. "type": "object"
  30471. },
  30472. "durable": {
  30473. "type": "object",
  30474. "properties": {
  30475. "aggregateID": {
  30476. "type": "string"
  30477. },
  30478. "seq": {
  30479. "type": "integer"
  30480. },
  30481. "version": {
  30482. "type": "integer"
  30483. }
  30484. },
  30485. "required": ["aggregateID", "seq", "version"],
  30486. "additionalProperties": false
  30487. },
  30488. "location": {
  30489. "$ref": "#/components/schemas/LocationRef"
  30490. },
  30491. "type": {
  30492. "type": "string",
  30493. "enum": ["installation.updated"]
  30494. },
  30495. "data": {
  30496. "type": "object",
  30497. "properties": {
  30498. "version": {
  30499. "type": "string"
  30500. }
  30501. },
  30502. "required": ["version"],
  30503. "additionalProperties": false
  30504. }
  30505. },
  30506. "required": ["id", "type", "data"],
  30507. "additionalProperties": false
  30508. },
  30509. "V2EventInstallationUpdate-available": {
  30510. "type": "object",
  30511. "properties": {
  30512. "id": {
  30513. "type": "string",
  30514. "pattern": "^evt_"
  30515. },
  30516. "metadata": {
  30517. "type": "object"
  30518. },
  30519. "durable": {
  30520. "type": "object",
  30521. "properties": {
  30522. "aggregateID": {
  30523. "type": "string"
  30524. },
  30525. "seq": {
  30526. "type": "integer"
  30527. },
  30528. "version": {
  30529. "type": "integer"
  30530. }
  30531. },
  30532. "required": ["aggregateID", "seq", "version"],
  30533. "additionalProperties": false
  30534. },
  30535. "location": {
  30536. "$ref": "#/components/schemas/LocationRef"
  30537. },
  30538. "type": {
  30539. "type": "string",
  30540. "enum": ["installation.update-available"]
  30541. },
  30542. "data": {
  30543. "type": "object",
  30544. "properties": {
  30545. "version": {
  30546. "type": "string"
  30547. }
  30548. },
  30549. "required": ["version"],
  30550. "additionalProperties": false
  30551. }
  30552. },
  30553. "required": ["id", "type", "data"],
  30554. "additionalProperties": false
  30555. },
  30556. "V2EventFileEdited": {
  30557. "type": "object",
  30558. "properties": {
  30559. "id": {
  30560. "type": "string",
  30561. "pattern": "^evt_"
  30562. },
  30563. "metadata": {
  30564. "type": "object"
  30565. },
  30566. "durable": {
  30567. "type": "object",
  30568. "properties": {
  30569. "aggregateID": {
  30570. "type": "string"
  30571. },
  30572. "seq": {
  30573. "type": "integer"
  30574. },
  30575. "version": {
  30576. "type": "integer"
  30577. }
  30578. },
  30579. "required": ["aggregateID", "seq", "version"],
  30580. "additionalProperties": false
  30581. },
  30582. "location": {
  30583. "$ref": "#/components/schemas/LocationRef"
  30584. },
  30585. "type": {
  30586. "type": "string",
  30587. "enum": ["file.edited"]
  30588. },
  30589. "data": {
  30590. "type": "object",
  30591. "properties": {
  30592. "file": {
  30593. "type": "string"
  30594. }
  30595. },
  30596. "required": ["file"],
  30597. "additionalProperties": false
  30598. }
  30599. },
  30600. "required": ["id", "type", "data"],
  30601. "additionalProperties": false
  30602. },
  30603. "V2EventPluginAdded": {
  30604. "type": "object",
  30605. "properties": {
  30606. "id": {
  30607. "type": "string",
  30608. "pattern": "^evt_"
  30609. },
  30610. "metadata": {
  30611. "type": "object"
  30612. },
  30613. "durable": {
  30614. "type": "object",
  30615. "properties": {
  30616. "aggregateID": {
  30617. "type": "string"
  30618. },
  30619. "seq": {
  30620. "type": "integer"
  30621. },
  30622. "version": {
  30623. "type": "integer"
  30624. }
  30625. },
  30626. "required": ["aggregateID", "seq", "version"],
  30627. "additionalProperties": false
  30628. },
  30629. "location": {
  30630. "$ref": "#/components/schemas/LocationRef"
  30631. },
  30632. "type": {
  30633. "type": "string",
  30634. "enum": ["plugin.added"]
  30635. },
  30636. "data": {
  30637. "type": "object",
  30638. "properties": {
  30639. "id": {
  30640. "type": "string"
  30641. }
  30642. },
  30643. "required": ["id"],
  30644. "additionalProperties": false
  30645. }
  30646. },
  30647. "required": ["id", "type", "data"],
  30648. "additionalProperties": false
  30649. },
  30650. "V2EventPermissionV2Asked": {
  30651. "type": "object",
  30652. "properties": {
  30653. "id": {
  30654. "type": "string",
  30655. "pattern": "^evt_"
  30656. },
  30657. "metadata": {
  30658. "type": "object"
  30659. },
  30660. "durable": {
  30661. "type": "object",
  30662. "properties": {
  30663. "aggregateID": {
  30664. "type": "string"
  30665. },
  30666. "seq": {
  30667. "type": "integer"
  30668. },
  30669. "version": {
  30670. "type": "integer"
  30671. }
  30672. },
  30673. "required": ["aggregateID", "seq", "version"],
  30674. "additionalProperties": false
  30675. },
  30676. "location": {
  30677. "$ref": "#/components/schemas/LocationRef"
  30678. },
  30679. "type": {
  30680. "type": "string",
  30681. "enum": ["permission.v2.asked"]
  30682. },
  30683. "data": {
  30684. "type": "object",
  30685. "properties": {
  30686. "id": {
  30687. "type": "string",
  30688. "pattern": "^per"
  30689. },
  30690. "sessionID": {
  30691. "type": "string",
  30692. "pattern": "^ses"
  30693. },
  30694. "action": {
  30695. "type": "string"
  30696. },
  30697. "resources": {
  30698. "type": "array",
  30699. "items": {
  30700. "type": "string"
  30701. }
  30702. },
  30703. "save": {
  30704. "type": "array",
  30705. "items": {
  30706. "type": "string"
  30707. }
  30708. },
  30709. "metadata": {
  30710. "type": "object"
  30711. },
  30712. "source": {
  30713. "$ref": "#/components/schemas/PermissionV2Source"
  30714. }
  30715. },
  30716. "required": ["id", "sessionID", "action", "resources"],
  30717. "additionalProperties": false
  30718. }
  30719. },
  30720. "required": ["id", "type", "data"],
  30721. "additionalProperties": false
  30722. },
  30723. "V2EventPermissionV2Replied": {
  30724. "type": "object",
  30725. "properties": {
  30726. "id": {
  30727. "type": "string",
  30728. "pattern": "^evt_"
  30729. },
  30730. "metadata": {
  30731. "type": "object"
  30732. },
  30733. "durable": {
  30734. "type": "object",
  30735. "properties": {
  30736. "aggregateID": {
  30737. "type": "string"
  30738. },
  30739. "seq": {
  30740. "type": "integer"
  30741. },
  30742. "version": {
  30743. "type": "integer"
  30744. }
  30745. },
  30746. "required": ["aggregateID", "seq", "version"],
  30747. "additionalProperties": false
  30748. },
  30749. "location": {
  30750. "$ref": "#/components/schemas/LocationRef"
  30751. },
  30752. "type": {
  30753. "type": "string",
  30754. "enum": ["permission.v2.replied"]
  30755. },
  30756. "data": {
  30757. "type": "object",
  30758. "properties": {
  30759. "sessionID": {
  30760. "type": "string",
  30761. "pattern": "^ses"
  30762. },
  30763. "requestID": {
  30764. "type": "string",
  30765. "pattern": "^per"
  30766. },
  30767. "reply": {
  30768. "$ref": "#/components/schemas/PermissionV2Reply"
  30769. }
  30770. },
  30771. "required": ["sessionID", "requestID", "reply"],
  30772. "additionalProperties": false
  30773. }
  30774. },
  30775. "required": ["id", "type", "data"],
  30776. "additionalProperties": false
  30777. },
  30778. "V2EventReferenceUpdated": {
  30779. "type": "object",
  30780. "properties": {
  30781. "id": {
  30782. "type": "string",
  30783. "pattern": "^evt_"
  30784. },
  30785. "metadata": {
  30786. "type": "object"
  30787. },
  30788. "durable": {
  30789. "type": "object",
  30790. "properties": {
  30791. "aggregateID": {
  30792. "type": "string"
  30793. },
  30794. "seq": {
  30795. "type": "integer"
  30796. },
  30797. "version": {
  30798. "type": "integer"
  30799. }
  30800. },
  30801. "required": ["aggregateID", "seq", "version"],
  30802. "additionalProperties": false
  30803. },
  30804. "location": {
  30805. "$ref": "#/components/schemas/LocationRef"
  30806. },
  30807. "type": {
  30808. "type": "string",
  30809. "enum": ["reference.updated"]
  30810. },
  30811. "data": {
  30812. "type": "object",
  30813. "properties": {}
  30814. }
  30815. },
  30816. "required": ["id", "type", "data"],
  30817. "additionalProperties": false
  30818. },
  30819. "V2EventProjectDirectoriesUpdated": {
  30820. "type": "object",
  30821. "properties": {
  30822. "id": {
  30823. "type": "string",
  30824. "pattern": "^evt_"
  30825. },
  30826. "metadata": {
  30827. "type": "object"
  30828. },
  30829. "durable": {
  30830. "type": "object",
  30831. "properties": {
  30832. "aggregateID": {
  30833. "type": "string"
  30834. },
  30835. "seq": {
  30836. "type": "integer"
  30837. },
  30838. "version": {
  30839. "type": "integer"
  30840. }
  30841. },
  30842. "required": ["aggregateID", "seq", "version"],
  30843. "additionalProperties": false
  30844. },
  30845. "location": {
  30846. "$ref": "#/components/schemas/LocationRef"
  30847. },
  30848. "type": {
  30849. "type": "string",
  30850. "enum": ["project.directories.updated"]
  30851. },
  30852. "data": {
  30853. "type": "object",
  30854. "properties": {
  30855. "projectID": {
  30856. "type": "string"
  30857. }
  30858. },
  30859. "required": ["projectID"],
  30860. "additionalProperties": false
  30861. }
  30862. },
  30863. "required": ["id", "type", "data"],
  30864. "additionalProperties": false
  30865. },
  30866. "V2EventFileWatcherUpdated": {
  30867. "type": "object",
  30868. "properties": {
  30869. "id": {
  30870. "type": "string",
  30871. "pattern": "^evt_"
  30872. },
  30873. "metadata": {
  30874. "type": "object"
  30875. },
  30876. "durable": {
  30877. "type": "object",
  30878. "properties": {
  30879. "aggregateID": {
  30880. "type": "string"
  30881. },
  30882. "seq": {
  30883. "type": "integer"
  30884. },
  30885. "version": {
  30886. "type": "integer"
  30887. }
  30888. },
  30889. "required": ["aggregateID", "seq", "version"],
  30890. "additionalProperties": false
  30891. },
  30892. "location": {
  30893. "$ref": "#/components/schemas/LocationRef"
  30894. },
  30895. "type": {
  30896. "type": "string",
  30897. "enum": ["file.watcher.updated"]
  30898. },
  30899. "data": {
  30900. "type": "object",
  30901. "properties": {
  30902. "file": {
  30903. "type": "string"
  30904. },
  30905. "event": {
  30906. "type": "string",
  30907. "enum": ["add", "change", "unlink"]
  30908. }
  30909. },
  30910. "required": ["file", "event"],
  30911. "additionalProperties": false
  30912. }
  30913. },
  30914. "required": ["id", "type", "data"],
  30915. "additionalProperties": false
  30916. },
  30917. "V2EventPtyCreated": {
  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": ["pty.created"]
  30949. },
  30950. "data": {
  30951. "type": "object",
  30952. "properties": {
  30953. "info": {
  30954. "$ref": "#/components/schemas/Pty"
  30955. }
  30956. },
  30957. "required": ["info"],
  30958. "additionalProperties": false
  30959. }
  30960. },
  30961. "required": ["id", "type", "data"],
  30962. "additionalProperties": false
  30963. },
  30964. "V2EventPtyUpdated": {
  30965. "type": "object",
  30966. "properties": {
  30967. "id": {
  30968. "type": "string",
  30969. "pattern": "^evt_"
  30970. },
  30971. "metadata": {
  30972. "type": "object"
  30973. },
  30974. "durable": {
  30975. "type": "object",
  30976. "properties": {
  30977. "aggregateID": {
  30978. "type": "string"
  30979. },
  30980. "seq": {
  30981. "type": "integer"
  30982. },
  30983. "version": {
  30984. "type": "integer"
  30985. }
  30986. },
  30987. "required": ["aggregateID", "seq", "version"],
  30988. "additionalProperties": false
  30989. },
  30990. "location": {
  30991. "$ref": "#/components/schemas/LocationRef"
  30992. },
  30993. "type": {
  30994. "type": "string",
  30995. "enum": ["pty.updated"]
  30996. },
  30997. "data": {
  30998. "type": "object",
  30999. "properties": {
  31000. "info": {
  31001. "$ref": "#/components/schemas/Pty"
  31002. }
  31003. },
  31004. "required": ["info"],
  31005. "additionalProperties": false
  31006. }
  31007. },
  31008. "required": ["id", "type", "data"],
  31009. "additionalProperties": false
  31010. },
  31011. "V2EventPtyExited": {
  31012. "type": "object",
  31013. "properties": {
  31014. "id": {
  31015. "type": "string",
  31016. "pattern": "^evt_"
  31017. },
  31018. "metadata": {
  31019. "type": "object"
  31020. },
  31021. "durable": {
  31022. "type": "object",
  31023. "properties": {
  31024. "aggregateID": {
  31025. "type": "string"
  31026. },
  31027. "seq": {
  31028. "type": "integer"
  31029. },
  31030. "version": {
  31031. "type": "integer"
  31032. }
  31033. },
  31034. "required": ["aggregateID", "seq", "version"],
  31035. "additionalProperties": false
  31036. },
  31037. "location": {
  31038. "$ref": "#/components/schemas/LocationRef"
  31039. },
  31040. "type": {
  31041. "type": "string",
  31042. "enum": ["pty.exited"]
  31043. },
  31044. "data": {
  31045. "type": "object",
  31046. "properties": {
  31047. "id": {
  31048. "type": "string",
  31049. "pattern": "^pty"
  31050. },
  31051. "exitCode": {
  31052. "type": "integer",
  31053. "minimum": 0
  31054. }
  31055. },
  31056. "required": ["id", "exitCode"],
  31057. "additionalProperties": false
  31058. }
  31059. },
  31060. "required": ["id", "type", "data"],
  31061. "additionalProperties": false
  31062. },
  31063. "V2EventPtyDeleted": {
  31064. "type": "object",
  31065. "properties": {
  31066. "id": {
  31067. "type": "string",
  31068. "pattern": "^evt_"
  31069. },
  31070. "metadata": {
  31071. "type": "object"
  31072. },
  31073. "durable": {
  31074. "type": "object",
  31075. "properties": {
  31076. "aggregateID": {
  31077. "type": "string"
  31078. },
  31079. "seq": {
  31080. "type": "integer"
  31081. },
  31082. "version": {
  31083. "type": "integer"
  31084. }
  31085. },
  31086. "required": ["aggregateID", "seq", "version"],
  31087. "additionalProperties": false
  31088. },
  31089. "location": {
  31090. "$ref": "#/components/schemas/LocationRef"
  31091. },
  31092. "type": {
  31093. "type": "string",
  31094. "enum": ["pty.deleted"]
  31095. },
  31096. "data": {
  31097. "type": "object",
  31098. "properties": {
  31099. "id": {
  31100. "type": "string",
  31101. "pattern": "^pty"
  31102. }
  31103. },
  31104. "required": ["id"],
  31105. "additionalProperties": false
  31106. }
  31107. },
  31108. "required": ["id", "type", "data"],
  31109. "additionalProperties": false
  31110. },
  31111. "V2EventQuestionV2Asked": {
  31112. "type": "object",
  31113. "properties": {
  31114. "id": {
  31115. "type": "string",
  31116. "pattern": "^evt_"
  31117. },
  31118. "metadata": {
  31119. "type": "object"
  31120. },
  31121. "durable": {
  31122. "type": "object",
  31123. "properties": {
  31124. "aggregateID": {
  31125. "type": "string"
  31126. },
  31127. "seq": {
  31128. "type": "integer"
  31129. },
  31130. "version": {
  31131. "type": "integer"
  31132. }
  31133. },
  31134. "required": ["aggregateID", "seq", "version"],
  31135. "additionalProperties": false
  31136. },
  31137. "location": {
  31138. "$ref": "#/components/schemas/LocationRef"
  31139. },
  31140. "type": {
  31141. "type": "string",
  31142. "enum": ["question.v2.asked"]
  31143. },
  31144. "data": {
  31145. "type": "object",
  31146. "properties": {
  31147. "id": {
  31148. "type": "string",
  31149. "pattern": "^que"
  31150. },
  31151. "sessionID": {
  31152. "type": "string",
  31153. "pattern": "^ses"
  31154. },
  31155. "questions": {
  31156. "type": "array",
  31157. "items": {
  31158. "$ref": "#/components/schemas/QuestionV2Info"
  31159. },
  31160. "description": "Questions to ask"
  31161. },
  31162. "tool": {
  31163. "$ref": "#/components/schemas/QuestionV2Tool"
  31164. }
  31165. },
  31166. "required": ["id", "sessionID", "questions"],
  31167. "additionalProperties": false
  31168. }
  31169. },
  31170. "required": ["id", "type", "data"],
  31171. "additionalProperties": false
  31172. },
  31173. "V2EventQuestionV2Replied": {
  31174. "type": "object",
  31175. "properties": {
  31176. "id": {
  31177. "type": "string",
  31178. "pattern": "^evt_"
  31179. },
  31180. "metadata": {
  31181. "type": "object"
  31182. },
  31183. "durable": {
  31184. "type": "object",
  31185. "properties": {
  31186. "aggregateID": {
  31187. "type": "string"
  31188. },
  31189. "seq": {
  31190. "type": "integer"
  31191. },
  31192. "version": {
  31193. "type": "integer"
  31194. }
  31195. },
  31196. "required": ["aggregateID", "seq", "version"],
  31197. "additionalProperties": false
  31198. },
  31199. "location": {
  31200. "$ref": "#/components/schemas/LocationRef"
  31201. },
  31202. "type": {
  31203. "type": "string",
  31204. "enum": ["question.v2.replied"]
  31205. },
  31206. "data": {
  31207. "type": "object",
  31208. "properties": {
  31209. "sessionID": {
  31210. "type": "string",
  31211. "pattern": "^ses"
  31212. },
  31213. "requestID": {
  31214. "type": "string",
  31215. "pattern": "^que"
  31216. },
  31217. "answers": {
  31218. "type": "array",
  31219. "items": {
  31220. "$ref": "#/components/schemas/QuestionV2Answer"
  31221. }
  31222. }
  31223. },
  31224. "required": ["sessionID", "requestID", "answers"],
  31225. "additionalProperties": false
  31226. }
  31227. },
  31228. "required": ["id", "type", "data"],
  31229. "additionalProperties": false
  31230. },
  31231. "V2EventQuestionV2Rejected": {
  31232. "type": "object",
  31233. "properties": {
  31234. "id": {
  31235. "type": "string",
  31236. "pattern": "^evt_"
  31237. },
  31238. "metadata": {
  31239. "type": "object"
  31240. },
  31241. "durable": {
  31242. "type": "object",
  31243. "properties": {
  31244. "aggregateID": {
  31245. "type": "string"
  31246. },
  31247. "seq": {
  31248. "type": "integer"
  31249. },
  31250. "version": {
  31251. "type": "integer"
  31252. }
  31253. },
  31254. "required": ["aggregateID", "seq", "version"],
  31255. "additionalProperties": false
  31256. },
  31257. "location": {
  31258. "$ref": "#/components/schemas/LocationRef"
  31259. },
  31260. "type": {
  31261. "type": "string",
  31262. "enum": ["question.v2.rejected"]
  31263. },
  31264. "data": {
  31265. "type": "object",
  31266. "properties": {
  31267. "sessionID": {
  31268. "type": "string",
  31269. "pattern": "^ses"
  31270. },
  31271. "requestID": {
  31272. "type": "string",
  31273. "pattern": "^que"
  31274. }
  31275. },
  31276. "required": ["sessionID", "requestID"],
  31277. "additionalProperties": false
  31278. }
  31279. },
  31280. "required": ["id", "type", "data"],
  31281. "additionalProperties": false
  31282. },
  31283. "V2EventTodoUpdated": {
  31284. "type": "object",
  31285. "properties": {
  31286. "id": {
  31287. "type": "string",
  31288. "pattern": "^evt_"
  31289. },
  31290. "metadata": {
  31291. "type": "object"
  31292. },
  31293. "durable": {
  31294. "type": "object",
  31295. "properties": {
  31296. "aggregateID": {
  31297. "type": "string"
  31298. },
  31299. "seq": {
  31300. "type": "integer"
  31301. },
  31302. "version": {
  31303. "type": "integer"
  31304. }
  31305. },
  31306. "required": ["aggregateID", "seq", "version"],
  31307. "additionalProperties": false
  31308. },
  31309. "location": {
  31310. "$ref": "#/components/schemas/LocationRef"
  31311. },
  31312. "type": {
  31313. "type": "string",
  31314. "enum": ["todo.updated"]
  31315. },
  31316. "data": {
  31317. "type": "object",
  31318. "properties": {
  31319. "sessionID": {
  31320. "type": "string",
  31321. "pattern": "^ses"
  31322. },
  31323. "todos": {
  31324. "type": "array",
  31325. "items": {
  31326. "$ref": "#/components/schemas/Todo"
  31327. }
  31328. }
  31329. },
  31330. "required": ["sessionID", "todos"],
  31331. "additionalProperties": false
  31332. }
  31333. },
  31334. "required": ["id", "type", "data"],
  31335. "additionalProperties": false
  31336. },
  31337. "V2EventLspUpdated": {
  31338. "type": "object",
  31339. "properties": {
  31340. "id": {
  31341. "type": "string",
  31342. "pattern": "^evt_"
  31343. },
  31344. "metadata": {
  31345. "type": "object"
  31346. },
  31347. "durable": {
  31348. "type": "object",
  31349. "properties": {
  31350. "aggregateID": {
  31351. "type": "string"
  31352. },
  31353. "seq": {
  31354. "type": "integer"
  31355. },
  31356. "version": {
  31357. "type": "integer"
  31358. }
  31359. },
  31360. "required": ["aggregateID", "seq", "version"],
  31361. "additionalProperties": false
  31362. },
  31363. "location": {
  31364. "$ref": "#/components/schemas/LocationRef"
  31365. },
  31366. "type": {
  31367. "type": "string",
  31368. "enum": ["lsp.updated"]
  31369. },
  31370. "data": {
  31371. "type": "object",
  31372. "properties": {}
  31373. }
  31374. },
  31375. "required": ["id", "type", "data"],
  31376. "additionalProperties": false
  31377. },
  31378. "V2EventPermissionAsked": {
  31379. "type": "object",
  31380. "properties": {
  31381. "id": {
  31382. "type": "string",
  31383. "pattern": "^evt_"
  31384. },
  31385. "metadata": {
  31386. "type": "object"
  31387. },
  31388. "durable": {
  31389. "type": "object",
  31390. "properties": {
  31391. "aggregateID": {
  31392. "type": "string"
  31393. },
  31394. "seq": {
  31395. "type": "integer"
  31396. },
  31397. "version": {
  31398. "type": "integer"
  31399. }
  31400. },
  31401. "required": ["aggregateID", "seq", "version"],
  31402. "additionalProperties": false
  31403. },
  31404. "location": {
  31405. "$ref": "#/components/schemas/LocationRef"
  31406. },
  31407. "type": {
  31408. "type": "string",
  31409. "enum": ["permission.asked"]
  31410. },
  31411. "data": {
  31412. "type": "object",
  31413. "properties": {
  31414. "id": {
  31415. "type": "string",
  31416. "pattern": "^per"
  31417. },
  31418. "sessionID": {
  31419. "type": "string",
  31420. "pattern": "^ses"
  31421. },
  31422. "permission": {
  31423. "type": "string"
  31424. },
  31425. "patterns": {
  31426. "type": "array",
  31427. "items": {
  31428. "type": "string"
  31429. }
  31430. },
  31431. "metadata": {
  31432. "type": "object"
  31433. },
  31434. "always": {
  31435. "type": "array",
  31436. "items": {
  31437. "type": "string"
  31438. }
  31439. },
  31440. "tool": {
  31441. "type": "object",
  31442. "properties": {
  31443. "messageID": {
  31444. "type": "string"
  31445. },
  31446. "callID": {
  31447. "type": "string"
  31448. }
  31449. },
  31450. "required": ["messageID", "callID"],
  31451. "additionalProperties": false
  31452. }
  31453. },
  31454. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  31455. "additionalProperties": false
  31456. }
  31457. },
  31458. "required": ["id", "type", "data"],
  31459. "additionalProperties": false
  31460. },
  31461. "V2EventPermissionReplied": {
  31462. "type": "object",
  31463. "properties": {
  31464. "id": {
  31465. "type": "string",
  31466. "pattern": "^evt_"
  31467. },
  31468. "metadata": {
  31469. "type": "object"
  31470. },
  31471. "durable": {
  31472. "type": "object",
  31473. "properties": {
  31474. "aggregateID": {
  31475. "type": "string"
  31476. },
  31477. "seq": {
  31478. "type": "integer"
  31479. },
  31480. "version": {
  31481. "type": "integer"
  31482. }
  31483. },
  31484. "required": ["aggregateID", "seq", "version"],
  31485. "additionalProperties": false
  31486. },
  31487. "location": {
  31488. "$ref": "#/components/schemas/LocationRef"
  31489. },
  31490. "type": {
  31491. "type": "string",
  31492. "enum": ["permission.replied"]
  31493. },
  31494. "data": {
  31495. "type": "object",
  31496. "properties": {
  31497. "sessionID": {
  31498. "type": "string",
  31499. "pattern": "^ses"
  31500. },
  31501. "requestID": {
  31502. "type": "string",
  31503. "pattern": "^per"
  31504. },
  31505. "reply": {
  31506. "type": "string",
  31507. "enum": ["once", "always", "reject"]
  31508. }
  31509. },
  31510. "required": ["sessionID", "requestID", "reply"],
  31511. "additionalProperties": false
  31512. }
  31513. },
  31514. "required": ["id", "type", "data"],
  31515. "additionalProperties": false
  31516. },
  31517. "V2EventTuiPromptAppend": {
  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": ["tui.prompt.append"]
  31549. },
  31550. "data": {
  31551. "type": "object",
  31552. "properties": {
  31553. "text": {
  31554. "type": "string"
  31555. }
  31556. },
  31557. "required": ["text"],
  31558. "additionalProperties": false
  31559. }
  31560. },
  31561. "required": ["id", "type", "data"],
  31562. "additionalProperties": false
  31563. },
  31564. "V2EventTuiCommandExecute": {
  31565. "type": "object",
  31566. "properties": {
  31567. "id": {
  31568. "type": "string",
  31569. "pattern": "^evt_"
  31570. },
  31571. "metadata": {
  31572. "type": "object"
  31573. },
  31574. "durable": {
  31575. "type": "object",
  31576. "properties": {
  31577. "aggregateID": {
  31578. "type": "string"
  31579. },
  31580. "seq": {
  31581. "type": "integer"
  31582. },
  31583. "version": {
  31584. "type": "integer"
  31585. }
  31586. },
  31587. "required": ["aggregateID", "seq", "version"],
  31588. "additionalProperties": false
  31589. },
  31590. "location": {
  31591. "$ref": "#/components/schemas/LocationRef"
  31592. },
  31593. "type": {
  31594. "type": "string",
  31595. "enum": ["tui.command.execute"]
  31596. },
  31597. "data": {
  31598. "type": "object",
  31599. "properties": {
  31600. "command": {
  31601. "anyOf": [
  31602. {
  31603. "type": "string",
  31604. "enum": [
  31605. "session.list",
  31606. "session.new",
  31607. "session.share",
  31608. "session.interrupt",
  31609. "session.compact",
  31610. "session.page.up",
  31611. "session.page.down",
  31612. "session.line.up",
  31613. "session.line.down",
  31614. "session.half.page.up",
  31615. "session.half.page.down",
  31616. "session.first",
  31617. "session.last",
  31618. "prompt.clear",
  31619. "prompt.submit",
  31620. "agent.cycle"
  31621. ]
  31622. },
  31623. {
  31624. "type": "string"
  31625. }
  31626. ]
  31627. }
  31628. },
  31629. "required": ["command"],
  31630. "additionalProperties": false
  31631. }
  31632. },
  31633. "required": ["id", "type", "data"],
  31634. "additionalProperties": false
  31635. },
  31636. "V2EventTuiToastShow": {
  31637. "type": "object",
  31638. "properties": {
  31639. "id": {
  31640. "type": "string",
  31641. "pattern": "^evt_"
  31642. },
  31643. "metadata": {
  31644. "type": "object"
  31645. },
  31646. "durable": {
  31647. "type": "object",
  31648. "properties": {
  31649. "aggregateID": {
  31650. "type": "string"
  31651. },
  31652. "seq": {
  31653. "type": "integer"
  31654. },
  31655. "version": {
  31656. "type": "integer"
  31657. }
  31658. },
  31659. "required": ["aggregateID", "seq", "version"],
  31660. "additionalProperties": false
  31661. },
  31662. "location": {
  31663. "$ref": "#/components/schemas/LocationRef"
  31664. },
  31665. "type": {
  31666. "type": "string",
  31667. "enum": ["tui.toast.show"]
  31668. },
  31669. "data": {
  31670. "type": "object",
  31671. "properties": {
  31672. "title": {
  31673. "type": "string"
  31674. },
  31675. "message": {
  31676. "type": "string"
  31677. },
  31678. "variant": {
  31679. "type": "string",
  31680. "enum": ["info", "success", "warning", "error"]
  31681. },
  31682. "duration": {
  31683. "type": "integer",
  31684. "exclusiveMinimum": 0
  31685. }
  31686. },
  31687. "required": ["message", "variant"],
  31688. "additionalProperties": false
  31689. }
  31690. },
  31691. "required": ["id", "type", "data"],
  31692. "additionalProperties": false
  31693. },
  31694. "V2EventTuiSessionSelect": {
  31695. "type": "object",
  31696. "properties": {
  31697. "id": {
  31698. "type": "string",
  31699. "pattern": "^evt_"
  31700. },
  31701. "metadata": {
  31702. "type": "object"
  31703. },
  31704. "durable": {
  31705. "type": "object",
  31706. "properties": {
  31707. "aggregateID": {
  31708. "type": "string"
  31709. },
  31710. "seq": {
  31711. "type": "integer"
  31712. },
  31713. "version": {
  31714. "type": "integer"
  31715. }
  31716. },
  31717. "required": ["aggregateID", "seq", "version"],
  31718. "additionalProperties": false
  31719. },
  31720. "location": {
  31721. "$ref": "#/components/schemas/LocationRef"
  31722. },
  31723. "type": {
  31724. "type": "string",
  31725. "enum": ["tui.session.select"]
  31726. },
  31727. "data": {
  31728. "type": "object",
  31729. "properties": {
  31730. "sessionID": {
  31731. "type": "string",
  31732. "pattern": "^ses",
  31733. "description": "Session ID to navigate to"
  31734. }
  31735. },
  31736. "required": ["sessionID"],
  31737. "additionalProperties": false
  31738. }
  31739. },
  31740. "required": ["id", "type", "data"],
  31741. "additionalProperties": false
  31742. },
  31743. "V2EventMcpToolsChanged": {
  31744. "type": "object",
  31745. "properties": {
  31746. "id": {
  31747. "type": "string",
  31748. "pattern": "^evt_"
  31749. },
  31750. "metadata": {
  31751. "type": "object"
  31752. },
  31753. "durable": {
  31754. "type": "object",
  31755. "properties": {
  31756. "aggregateID": {
  31757. "type": "string"
  31758. },
  31759. "seq": {
  31760. "type": "integer"
  31761. },
  31762. "version": {
  31763. "type": "integer"
  31764. }
  31765. },
  31766. "required": ["aggregateID", "seq", "version"],
  31767. "additionalProperties": false
  31768. },
  31769. "location": {
  31770. "$ref": "#/components/schemas/LocationRef"
  31771. },
  31772. "type": {
  31773. "type": "string",
  31774. "enum": ["mcp.tools.changed"]
  31775. },
  31776. "data": {
  31777. "type": "object",
  31778. "properties": {
  31779. "server": {
  31780. "type": "string"
  31781. }
  31782. },
  31783. "required": ["server"],
  31784. "additionalProperties": false
  31785. }
  31786. },
  31787. "required": ["id", "type", "data"],
  31788. "additionalProperties": false
  31789. },
  31790. "V2EventMcpBrowserOpenFailed": {
  31791. "type": "object",
  31792. "properties": {
  31793. "id": {
  31794. "type": "string",
  31795. "pattern": "^evt_"
  31796. },
  31797. "metadata": {
  31798. "type": "object"
  31799. },
  31800. "durable": {
  31801. "type": "object",
  31802. "properties": {
  31803. "aggregateID": {
  31804. "type": "string"
  31805. },
  31806. "seq": {
  31807. "type": "integer"
  31808. },
  31809. "version": {
  31810. "type": "integer"
  31811. }
  31812. },
  31813. "required": ["aggregateID", "seq", "version"],
  31814. "additionalProperties": false
  31815. },
  31816. "location": {
  31817. "$ref": "#/components/schemas/LocationRef"
  31818. },
  31819. "type": {
  31820. "type": "string",
  31821. "enum": ["mcp.browser.open.failed"]
  31822. },
  31823. "data": {
  31824. "type": "object",
  31825. "properties": {
  31826. "mcpName": {
  31827. "type": "string"
  31828. },
  31829. "url": {
  31830. "type": "string"
  31831. }
  31832. },
  31833. "required": ["mcpName", "url"],
  31834. "additionalProperties": false
  31835. }
  31836. },
  31837. "required": ["id", "type", "data"],
  31838. "additionalProperties": false
  31839. },
  31840. "V2EventCommandExecuted": {
  31841. "type": "object",
  31842. "properties": {
  31843. "id": {
  31844. "type": "string",
  31845. "pattern": "^evt_"
  31846. },
  31847. "metadata": {
  31848. "type": "object"
  31849. },
  31850. "durable": {
  31851. "type": "object",
  31852. "properties": {
  31853. "aggregateID": {
  31854. "type": "string"
  31855. },
  31856. "seq": {
  31857. "type": "integer"
  31858. },
  31859. "version": {
  31860. "type": "integer"
  31861. }
  31862. },
  31863. "required": ["aggregateID", "seq", "version"],
  31864. "additionalProperties": false
  31865. },
  31866. "location": {
  31867. "$ref": "#/components/schemas/LocationRef"
  31868. },
  31869. "type": {
  31870. "type": "string",
  31871. "enum": ["command.executed"]
  31872. },
  31873. "data": {
  31874. "type": "object",
  31875. "properties": {
  31876. "name": {
  31877. "type": "string"
  31878. },
  31879. "sessionID": {
  31880. "type": "string",
  31881. "pattern": "^ses"
  31882. },
  31883. "arguments": {
  31884. "type": "string"
  31885. },
  31886. "messageID": {
  31887. "type": "string",
  31888. "pattern": "^msg"
  31889. }
  31890. },
  31891. "required": ["name", "sessionID", "arguments", "messageID"],
  31892. "additionalProperties": false
  31893. }
  31894. },
  31895. "required": ["id", "type", "data"],
  31896. "additionalProperties": false
  31897. },
  31898. "V2EventProjectUpdated": {
  31899. "type": "object",
  31900. "properties": {
  31901. "id": {
  31902. "type": "string",
  31903. "pattern": "^evt_"
  31904. },
  31905. "metadata": {
  31906. "type": "object"
  31907. },
  31908. "durable": {
  31909. "type": "object",
  31910. "properties": {
  31911. "aggregateID": {
  31912. "type": "string"
  31913. },
  31914. "seq": {
  31915. "type": "integer"
  31916. },
  31917. "version": {
  31918. "type": "integer"
  31919. }
  31920. },
  31921. "required": ["aggregateID", "seq", "version"],
  31922. "additionalProperties": false
  31923. },
  31924. "location": {
  31925. "$ref": "#/components/schemas/LocationRef"
  31926. },
  31927. "type": {
  31928. "type": "string",
  31929. "enum": ["project.updated"]
  31930. },
  31931. "data": {
  31932. "type": "object",
  31933. "properties": {
  31934. "id": {
  31935. "type": "string"
  31936. },
  31937. "worktree": {
  31938. "type": "string"
  31939. },
  31940. "vcs": {
  31941. "type": "string",
  31942. "enum": ["git"]
  31943. },
  31944. "name": {
  31945. "type": "string"
  31946. },
  31947. "icon": {
  31948. "type": "object",
  31949. "properties": {
  31950. "url": {
  31951. "type": "string"
  31952. },
  31953. "override": {
  31954. "type": "string"
  31955. },
  31956. "color": {
  31957. "type": "string"
  31958. }
  31959. },
  31960. "additionalProperties": false
  31961. },
  31962. "commands": {
  31963. "type": "object",
  31964. "properties": {
  31965. "start": {
  31966. "type": "string",
  31967. "description": "Startup script to run when creating a new workspace (worktree)"
  31968. }
  31969. },
  31970. "additionalProperties": false
  31971. },
  31972. "time": {
  31973. "type": "object",
  31974. "properties": {
  31975. "created": {
  31976. "type": "integer",
  31977. "minimum": 0
  31978. },
  31979. "updated": {
  31980. "type": "integer",
  31981. "minimum": 0
  31982. },
  31983. "initialized": {
  31984. "type": "integer",
  31985. "minimum": 0
  31986. }
  31987. },
  31988. "required": ["created", "updated"],
  31989. "additionalProperties": false
  31990. },
  31991. "sandboxes": {
  31992. "type": "array",
  31993. "items": {
  31994. "type": "string"
  31995. }
  31996. }
  31997. },
  31998. "required": ["id", "worktree", "time", "sandboxes"],
  31999. "additionalProperties": false
  32000. }
  32001. },
  32002. "required": ["id", "type", "data"],
  32003. "additionalProperties": false
  32004. },
  32005. "V2EventSessionStatus": {
  32006. "type": "object",
  32007. "properties": {
  32008. "id": {
  32009. "type": "string",
  32010. "pattern": "^evt_"
  32011. },
  32012. "metadata": {
  32013. "type": "object"
  32014. },
  32015. "durable": {
  32016. "type": "object",
  32017. "properties": {
  32018. "aggregateID": {
  32019. "type": "string"
  32020. },
  32021. "seq": {
  32022. "type": "integer"
  32023. },
  32024. "version": {
  32025. "type": "integer"
  32026. }
  32027. },
  32028. "required": ["aggregateID", "seq", "version"],
  32029. "additionalProperties": false
  32030. },
  32031. "location": {
  32032. "$ref": "#/components/schemas/LocationRef"
  32033. },
  32034. "type": {
  32035. "type": "string",
  32036. "enum": ["session.status"]
  32037. },
  32038. "data": {
  32039. "type": "object",
  32040. "properties": {
  32041. "sessionID": {
  32042. "type": "string",
  32043. "pattern": "^ses"
  32044. },
  32045. "status": {
  32046. "$ref": "#/components/schemas/SessionStatus"
  32047. }
  32048. },
  32049. "required": ["sessionID", "status"],
  32050. "additionalProperties": false
  32051. }
  32052. },
  32053. "required": ["id", "type", "data"],
  32054. "additionalProperties": false
  32055. },
  32056. "V2EventSessionIdle": {
  32057. "type": "object",
  32058. "properties": {
  32059. "id": {
  32060. "type": "string",
  32061. "pattern": "^evt_"
  32062. },
  32063. "metadata": {
  32064. "type": "object"
  32065. },
  32066. "durable": {
  32067. "type": "object",
  32068. "properties": {
  32069. "aggregateID": {
  32070. "type": "string"
  32071. },
  32072. "seq": {
  32073. "type": "integer"
  32074. },
  32075. "version": {
  32076. "type": "integer"
  32077. }
  32078. },
  32079. "required": ["aggregateID", "seq", "version"],
  32080. "additionalProperties": false
  32081. },
  32082. "location": {
  32083. "$ref": "#/components/schemas/LocationRef"
  32084. },
  32085. "type": {
  32086. "type": "string",
  32087. "enum": ["session.idle"]
  32088. },
  32089. "data": {
  32090. "type": "object",
  32091. "properties": {
  32092. "sessionID": {
  32093. "type": "string",
  32094. "pattern": "^ses"
  32095. }
  32096. },
  32097. "required": ["sessionID"],
  32098. "additionalProperties": false
  32099. }
  32100. },
  32101. "required": ["id", "type", "data"],
  32102. "additionalProperties": false
  32103. },
  32104. "V2EventQuestionAsked": {
  32105. "type": "object",
  32106. "properties": {
  32107. "id": {
  32108. "type": "string",
  32109. "pattern": "^evt_"
  32110. },
  32111. "metadata": {
  32112. "type": "object"
  32113. },
  32114. "durable": {
  32115. "type": "object",
  32116. "properties": {
  32117. "aggregateID": {
  32118. "type": "string"
  32119. },
  32120. "seq": {
  32121. "type": "integer"
  32122. },
  32123. "version": {
  32124. "type": "integer"
  32125. }
  32126. },
  32127. "required": ["aggregateID", "seq", "version"],
  32128. "additionalProperties": false
  32129. },
  32130. "location": {
  32131. "$ref": "#/components/schemas/LocationRef"
  32132. },
  32133. "type": {
  32134. "type": "string",
  32135. "enum": ["question.asked"]
  32136. },
  32137. "data": {
  32138. "type": "object",
  32139. "properties": {
  32140. "id": {
  32141. "type": "string",
  32142. "pattern": "^que"
  32143. },
  32144. "sessionID": {
  32145. "type": "string",
  32146. "pattern": "^ses"
  32147. },
  32148. "questions": {
  32149. "type": "array",
  32150. "items": {
  32151. "$ref": "#/components/schemas/QuestionInfo"
  32152. },
  32153. "description": "Questions to ask"
  32154. },
  32155. "tool": {
  32156. "$ref": "#/components/schemas/QuestionTool"
  32157. }
  32158. },
  32159. "required": ["id", "sessionID", "questions"],
  32160. "additionalProperties": false
  32161. }
  32162. },
  32163. "required": ["id", "type", "data"],
  32164. "additionalProperties": false
  32165. },
  32166. "V2EventQuestionReplied": {
  32167. "type": "object",
  32168. "properties": {
  32169. "id": {
  32170. "type": "string",
  32171. "pattern": "^evt_"
  32172. },
  32173. "metadata": {
  32174. "type": "object"
  32175. },
  32176. "durable": {
  32177. "type": "object",
  32178. "properties": {
  32179. "aggregateID": {
  32180. "type": "string"
  32181. },
  32182. "seq": {
  32183. "type": "integer"
  32184. },
  32185. "version": {
  32186. "type": "integer"
  32187. }
  32188. },
  32189. "required": ["aggregateID", "seq", "version"],
  32190. "additionalProperties": false
  32191. },
  32192. "location": {
  32193. "$ref": "#/components/schemas/LocationRef"
  32194. },
  32195. "type": {
  32196. "type": "string",
  32197. "enum": ["question.replied"]
  32198. },
  32199. "data": {
  32200. "type": "object",
  32201. "properties": {
  32202. "sessionID": {
  32203. "type": "string",
  32204. "pattern": "^ses"
  32205. },
  32206. "requestID": {
  32207. "type": "string",
  32208. "pattern": "^que"
  32209. },
  32210. "answers": {
  32211. "type": "array",
  32212. "items": {
  32213. "$ref": "#/components/schemas/QuestionAnswer"
  32214. }
  32215. }
  32216. },
  32217. "required": ["sessionID", "requestID", "answers"],
  32218. "additionalProperties": false
  32219. }
  32220. },
  32221. "required": ["id", "type", "data"],
  32222. "additionalProperties": false
  32223. },
  32224. "V2EventQuestionRejected": {
  32225. "type": "object",
  32226. "properties": {
  32227. "id": {
  32228. "type": "string",
  32229. "pattern": "^evt_"
  32230. },
  32231. "metadata": {
  32232. "type": "object"
  32233. },
  32234. "durable": {
  32235. "type": "object",
  32236. "properties": {
  32237. "aggregateID": {
  32238. "type": "string"
  32239. },
  32240. "seq": {
  32241. "type": "integer"
  32242. },
  32243. "version": {
  32244. "type": "integer"
  32245. }
  32246. },
  32247. "required": ["aggregateID", "seq", "version"],
  32248. "additionalProperties": false
  32249. },
  32250. "location": {
  32251. "$ref": "#/components/schemas/LocationRef"
  32252. },
  32253. "type": {
  32254. "type": "string",
  32255. "enum": ["question.rejected"]
  32256. },
  32257. "data": {
  32258. "type": "object",
  32259. "properties": {
  32260. "sessionID": {
  32261. "type": "string",
  32262. "pattern": "^ses"
  32263. },
  32264. "requestID": {
  32265. "type": "string",
  32266. "pattern": "^que"
  32267. }
  32268. },
  32269. "required": ["sessionID", "requestID"],
  32270. "additionalProperties": false
  32271. }
  32272. },
  32273. "required": ["id", "type", "data"],
  32274. "additionalProperties": false
  32275. },
  32276. "V2EventSessionCompacted": {
  32277. "type": "object",
  32278. "properties": {
  32279. "id": {
  32280. "type": "string",
  32281. "pattern": "^evt_"
  32282. },
  32283. "metadata": {
  32284. "type": "object"
  32285. },
  32286. "durable": {
  32287. "type": "object",
  32288. "properties": {
  32289. "aggregateID": {
  32290. "type": "string"
  32291. },
  32292. "seq": {
  32293. "type": "integer"
  32294. },
  32295. "version": {
  32296. "type": "integer"
  32297. }
  32298. },
  32299. "required": ["aggregateID", "seq", "version"],
  32300. "additionalProperties": false
  32301. },
  32302. "location": {
  32303. "$ref": "#/components/schemas/LocationRef"
  32304. },
  32305. "type": {
  32306. "type": "string",
  32307. "enum": ["session.compacted"]
  32308. },
  32309. "data": {
  32310. "type": "object",
  32311. "properties": {
  32312. "sessionID": {
  32313. "type": "string",
  32314. "pattern": "^ses"
  32315. }
  32316. },
  32317. "required": ["sessionID"],
  32318. "additionalProperties": false
  32319. }
  32320. },
  32321. "required": ["id", "type", "data"],
  32322. "additionalProperties": false
  32323. },
  32324. "V2EventVcsBranchUpdated": {
  32325. "type": "object",
  32326. "properties": {
  32327. "id": {
  32328. "type": "string",
  32329. "pattern": "^evt_"
  32330. },
  32331. "metadata": {
  32332. "type": "object"
  32333. },
  32334. "durable": {
  32335. "type": "object",
  32336. "properties": {
  32337. "aggregateID": {
  32338. "type": "string"
  32339. },
  32340. "seq": {
  32341. "type": "integer"
  32342. },
  32343. "version": {
  32344. "type": "integer"
  32345. }
  32346. },
  32347. "required": ["aggregateID", "seq", "version"],
  32348. "additionalProperties": false
  32349. },
  32350. "location": {
  32351. "$ref": "#/components/schemas/LocationRef"
  32352. },
  32353. "type": {
  32354. "type": "string",
  32355. "enum": ["vcs.branch.updated"]
  32356. },
  32357. "data": {
  32358. "type": "object",
  32359. "properties": {
  32360. "branch": {
  32361. "type": "string"
  32362. }
  32363. },
  32364. "additionalProperties": false
  32365. }
  32366. },
  32367. "required": ["id", "type", "data"],
  32368. "additionalProperties": false
  32369. },
  32370. "V2EventWorkspaceReady": {
  32371. "type": "object",
  32372. "properties": {
  32373. "id": {
  32374. "type": "string",
  32375. "pattern": "^evt_"
  32376. },
  32377. "metadata": {
  32378. "type": "object"
  32379. },
  32380. "durable": {
  32381. "type": "object",
  32382. "properties": {
  32383. "aggregateID": {
  32384. "type": "string"
  32385. },
  32386. "seq": {
  32387. "type": "integer"
  32388. },
  32389. "version": {
  32390. "type": "integer"
  32391. }
  32392. },
  32393. "required": ["aggregateID", "seq", "version"],
  32394. "additionalProperties": false
  32395. },
  32396. "location": {
  32397. "$ref": "#/components/schemas/LocationRef"
  32398. },
  32399. "type": {
  32400. "type": "string",
  32401. "enum": ["workspace.ready"]
  32402. },
  32403. "data": {
  32404. "type": "object",
  32405. "properties": {
  32406. "name": {
  32407. "type": "string"
  32408. }
  32409. },
  32410. "required": ["name"],
  32411. "additionalProperties": false
  32412. }
  32413. },
  32414. "required": ["id", "type", "data"],
  32415. "additionalProperties": false
  32416. },
  32417. "V2EventWorkspaceFailed": {
  32418. "type": "object",
  32419. "properties": {
  32420. "id": {
  32421. "type": "string",
  32422. "pattern": "^evt_"
  32423. },
  32424. "metadata": {
  32425. "type": "object"
  32426. },
  32427. "durable": {
  32428. "type": "object",
  32429. "properties": {
  32430. "aggregateID": {
  32431. "type": "string"
  32432. },
  32433. "seq": {
  32434. "type": "integer"
  32435. },
  32436. "version": {
  32437. "type": "integer"
  32438. }
  32439. },
  32440. "required": ["aggregateID", "seq", "version"],
  32441. "additionalProperties": false
  32442. },
  32443. "location": {
  32444. "$ref": "#/components/schemas/LocationRef"
  32445. },
  32446. "type": {
  32447. "type": "string",
  32448. "enum": ["workspace.failed"]
  32449. },
  32450. "data": {
  32451. "type": "object",
  32452. "properties": {
  32453. "message": {
  32454. "type": "string"
  32455. }
  32456. },
  32457. "required": ["message"],
  32458. "additionalProperties": false
  32459. }
  32460. },
  32461. "required": ["id", "type", "data"],
  32462. "additionalProperties": false
  32463. },
  32464. "V2EventWorkspaceStatus": {
  32465. "type": "object",
  32466. "properties": {
  32467. "id": {
  32468. "type": "string",
  32469. "pattern": "^evt_"
  32470. },
  32471. "metadata": {
  32472. "type": "object"
  32473. },
  32474. "durable": {
  32475. "type": "object",
  32476. "properties": {
  32477. "aggregateID": {
  32478. "type": "string"
  32479. },
  32480. "seq": {
  32481. "type": "integer"
  32482. },
  32483. "version": {
  32484. "type": "integer"
  32485. }
  32486. },
  32487. "required": ["aggregateID", "seq", "version"],
  32488. "additionalProperties": false
  32489. },
  32490. "location": {
  32491. "$ref": "#/components/schemas/LocationRef"
  32492. },
  32493. "type": {
  32494. "type": "string",
  32495. "enum": ["workspace.status"]
  32496. },
  32497. "data": {
  32498. "type": "object",
  32499. "properties": {
  32500. "workspaceID": {
  32501. "type": "string",
  32502. "pattern": "^wrk"
  32503. },
  32504. "status": {
  32505. "type": "string",
  32506. "enum": ["connected", "connecting", "disconnected", "error"]
  32507. }
  32508. },
  32509. "required": ["workspaceID", "status"],
  32510. "additionalProperties": false
  32511. }
  32512. },
  32513. "required": ["id", "type", "data"],
  32514. "additionalProperties": false
  32515. },
  32516. "V2EventWorktreeReady": {
  32517. "type": "object",
  32518. "properties": {
  32519. "id": {
  32520. "type": "string",
  32521. "pattern": "^evt_"
  32522. },
  32523. "metadata": {
  32524. "type": "object"
  32525. },
  32526. "durable": {
  32527. "type": "object",
  32528. "properties": {
  32529. "aggregateID": {
  32530. "type": "string"
  32531. },
  32532. "seq": {
  32533. "type": "integer"
  32534. },
  32535. "version": {
  32536. "type": "integer"
  32537. }
  32538. },
  32539. "required": ["aggregateID", "seq", "version"],
  32540. "additionalProperties": false
  32541. },
  32542. "location": {
  32543. "$ref": "#/components/schemas/LocationRef"
  32544. },
  32545. "type": {
  32546. "type": "string",
  32547. "enum": ["worktree.ready"]
  32548. },
  32549. "data": {
  32550. "type": "object",
  32551. "properties": {
  32552. "name": {
  32553. "type": "string"
  32554. },
  32555. "branch": {
  32556. "type": "string"
  32557. }
  32558. },
  32559. "required": ["name"],
  32560. "additionalProperties": false
  32561. }
  32562. },
  32563. "required": ["id", "type", "data"],
  32564. "additionalProperties": false
  32565. },
  32566. "V2EventWorktreeFailed": {
  32567. "type": "object",
  32568. "properties": {
  32569. "id": {
  32570. "type": "string",
  32571. "pattern": "^evt_"
  32572. },
  32573. "metadata": {
  32574. "type": "object"
  32575. },
  32576. "durable": {
  32577. "type": "object",
  32578. "properties": {
  32579. "aggregateID": {
  32580. "type": "string"
  32581. },
  32582. "seq": {
  32583. "type": "integer"
  32584. },
  32585. "version": {
  32586. "type": "integer"
  32587. }
  32588. },
  32589. "required": ["aggregateID", "seq", "version"],
  32590. "additionalProperties": false
  32591. },
  32592. "location": {
  32593. "$ref": "#/components/schemas/LocationRef"
  32594. },
  32595. "type": {
  32596. "type": "string",
  32597. "enum": ["worktree.failed"]
  32598. },
  32599. "data": {
  32600. "type": "object",
  32601. "properties": {
  32602. "message": {
  32603. "type": "string"
  32604. }
  32605. },
  32606. "required": ["message"],
  32607. "additionalProperties": false
  32608. }
  32609. },
  32610. "required": ["id", "type", "data"],
  32611. "additionalProperties": false
  32612. },
  32613. "V2EventServerConnected": {
  32614. "type": "object",
  32615. "properties": {
  32616. "id": {
  32617. "type": "string",
  32618. "pattern": "^evt_"
  32619. },
  32620. "metadata": {
  32621. "type": "object"
  32622. },
  32623. "durable": {
  32624. "type": "object",
  32625. "properties": {
  32626. "aggregateID": {
  32627. "type": "string"
  32628. },
  32629. "seq": {
  32630. "type": "integer"
  32631. },
  32632. "version": {
  32633. "type": "integer"
  32634. }
  32635. },
  32636. "required": ["aggregateID", "seq", "version"],
  32637. "additionalProperties": false
  32638. },
  32639. "location": {
  32640. "$ref": "#/components/schemas/LocationRef"
  32641. },
  32642. "type": {
  32643. "type": "string",
  32644. "enum": ["server.connected"]
  32645. },
  32646. "data": {
  32647. "type": "object",
  32648. "properties": {}
  32649. }
  32650. },
  32651. "required": ["id", "type", "data"],
  32652. "additionalProperties": false
  32653. },
  32654. "V2EventGlobalDisposed": {
  32655. "type": "object",
  32656. "properties": {
  32657. "id": {
  32658. "type": "string",
  32659. "pattern": "^evt_"
  32660. },
  32661. "metadata": {
  32662. "type": "object"
  32663. },
  32664. "durable": {
  32665. "type": "object",
  32666. "properties": {
  32667. "aggregateID": {
  32668. "type": "string"
  32669. },
  32670. "seq": {
  32671. "type": "integer"
  32672. },
  32673. "version": {
  32674. "type": "integer"
  32675. }
  32676. },
  32677. "required": ["aggregateID", "seq", "version"],
  32678. "additionalProperties": false
  32679. },
  32680. "location": {
  32681. "$ref": "#/components/schemas/LocationRef"
  32682. },
  32683. "type": {
  32684. "type": "string",
  32685. "enum": ["global.disposed"]
  32686. },
  32687. "data": {
  32688. "type": "object",
  32689. "properties": {}
  32690. }
  32691. },
  32692. "required": ["id", "type", "data"],
  32693. "additionalProperties": false
  32694. },
  32695. "QuestionV2Request": {
  32696. "type": "object",
  32697. "properties": {
  32698. "id": {
  32699. "type": "string",
  32700. "pattern": "^que"
  32701. },
  32702. "sessionID": {
  32703. "type": "string",
  32704. "pattern": "^ses"
  32705. },
  32706. "questions": {
  32707. "type": "array",
  32708. "items": {
  32709. "$ref": "#/components/schemas/QuestionV2Info"
  32710. },
  32711. "description": "Questions to ask"
  32712. },
  32713. "tool": {
  32714. "$ref": "#/components/schemas/QuestionV2Tool"
  32715. }
  32716. },
  32717. "required": ["id", "sessionID", "questions"],
  32718. "additionalProperties": false
  32719. },
  32720. "QuestionV2Reply": {
  32721. "type": "object",
  32722. "properties": {
  32723. "answers": {
  32724. "type": "array",
  32725. "items": {
  32726. "$ref": "#/components/schemas/QuestionV2Answer"
  32727. },
  32728. "description": "User answers in order of questions (each answer is an array of selected labels)"
  32729. }
  32730. },
  32731. "required": ["answers"],
  32732. "additionalProperties": false
  32733. },
  32734. "ReferenceLocalSource": {
  32735. "type": "object",
  32736. "properties": {
  32737. "type": {
  32738. "type": "string",
  32739. "enum": ["local"]
  32740. },
  32741. "path": {
  32742. "type": "string"
  32743. },
  32744. "description": {
  32745. "type": "string"
  32746. },
  32747. "hidden": {
  32748. "type": "boolean"
  32749. }
  32750. },
  32751. "required": ["type", "path"],
  32752. "additionalProperties": false
  32753. },
  32754. "ReferenceGitSource": {
  32755. "type": "object",
  32756. "properties": {
  32757. "type": {
  32758. "type": "string",
  32759. "enum": ["git"]
  32760. },
  32761. "repository": {
  32762. "type": "string"
  32763. },
  32764. "branch": {
  32765. "type": "string"
  32766. },
  32767. "description": {
  32768. "type": "string"
  32769. },
  32770. "hidden": {
  32771. "type": "boolean"
  32772. }
  32773. },
  32774. "required": ["type", "repository"],
  32775. "additionalProperties": false
  32776. },
  32777. "ReferenceInfo": {
  32778. "type": "object",
  32779. "properties": {
  32780. "name": {
  32781. "type": "string"
  32782. },
  32783. "path": {
  32784. "type": "string"
  32785. },
  32786. "description": {
  32787. "type": "string"
  32788. },
  32789. "hidden": {
  32790. "type": "boolean"
  32791. },
  32792. "source": {
  32793. "anyOf": [
  32794. {
  32795. "$ref": "#/components/schemas/ReferenceLocalSource"
  32796. },
  32797. {
  32798. "$ref": "#/components/schemas/ReferenceGitSource"
  32799. }
  32800. ]
  32801. }
  32802. },
  32803. "required": ["name", "path", "source"],
  32804. "additionalProperties": false
  32805. },
  32806. "ProjectCopyCopy": {
  32807. "type": "object",
  32808. "properties": {
  32809. "directory": {
  32810. "type": "string"
  32811. }
  32812. },
  32813. "required": ["directory"],
  32814. "additionalProperties": false
  32815. },
  32816. "EventModels-devRefreshed": {
  32817. "type": "object",
  32818. "properties": {
  32819. "id": {
  32820. "type": "string",
  32821. "pattern": "^evt_"
  32822. },
  32823. "type": {
  32824. "type": "string",
  32825. "enum": ["models-dev.refreshed"]
  32826. },
  32827. "properties": {
  32828. "type": "object",
  32829. "properties": {}
  32830. }
  32831. },
  32832. "required": ["id", "type", "properties"],
  32833. "additionalProperties": false
  32834. },
  32835. "EventIntegrationUpdated": {
  32836. "type": "object",
  32837. "properties": {
  32838. "id": {
  32839. "type": "string",
  32840. "pattern": "^evt_"
  32841. },
  32842. "type": {
  32843. "type": "string",
  32844. "enum": ["integration.updated"]
  32845. },
  32846. "properties": {
  32847. "type": "object",
  32848. "properties": {}
  32849. }
  32850. },
  32851. "required": ["id", "type", "properties"],
  32852. "additionalProperties": false
  32853. },
  32854. "EventCatalogUpdated": {
  32855. "type": "object",
  32856. "properties": {
  32857. "id": {
  32858. "type": "string",
  32859. "pattern": "^evt_"
  32860. },
  32861. "type": {
  32862. "type": "string",
  32863. "enum": ["catalog.updated"]
  32864. },
  32865. "properties": {
  32866. "type": "object",
  32867. "properties": {}
  32868. }
  32869. },
  32870. "required": ["id", "type", "properties"],
  32871. "additionalProperties": false
  32872. },
  32873. "EventSessionCreated": {
  32874. "type": "object",
  32875. "properties": {
  32876. "id": {
  32877. "type": "string",
  32878. "pattern": "^evt_"
  32879. },
  32880. "type": {
  32881. "type": "string",
  32882. "enum": ["session.created"]
  32883. },
  32884. "properties": {
  32885. "type": "object",
  32886. "properties": {
  32887. "sessionID": {
  32888. "type": "string",
  32889. "pattern": "^ses"
  32890. },
  32891. "info": {
  32892. "$ref": "#/components/schemas/Session"
  32893. }
  32894. },
  32895. "required": ["sessionID", "info"],
  32896. "additionalProperties": false
  32897. }
  32898. },
  32899. "required": ["id", "type", "properties"],
  32900. "additionalProperties": false
  32901. },
  32902. "EventSessionUpdated": {
  32903. "type": "object",
  32904. "properties": {
  32905. "id": {
  32906. "type": "string",
  32907. "pattern": "^evt_"
  32908. },
  32909. "type": {
  32910. "type": "string",
  32911. "enum": ["session.updated"]
  32912. },
  32913. "properties": {
  32914. "type": "object",
  32915. "properties": {
  32916. "sessionID": {
  32917. "type": "string",
  32918. "pattern": "^ses"
  32919. },
  32920. "info": {
  32921. "$ref": "#/components/schemas/Session"
  32922. }
  32923. },
  32924. "required": ["sessionID", "info"],
  32925. "additionalProperties": false
  32926. }
  32927. },
  32928. "required": ["id", "type", "properties"],
  32929. "additionalProperties": false
  32930. },
  32931. "EventSessionDeleted": {
  32932. "type": "object",
  32933. "properties": {
  32934. "id": {
  32935. "type": "string",
  32936. "pattern": "^evt_"
  32937. },
  32938. "type": {
  32939. "type": "string",
  32940. "enum": ["session.deleted"]
  32941. },
  32942. "properties": {
  32943. "type": "object",
  32944. "properties": {
  32945. "sessionID": {
  32946. "type": "string",
  32947. "pattern": "^ses"
  32948. },
  32949. "info": {
  32950. "$ref": "#/components/schemas/Session"
  32951. }
  32952. },
  32953. "required": ["sessionID", "info"],
  32954. "additionalProperties": false
  32955. }
  32956. },
  32957. "required": ["id", "type", "properties"],
  32958. "additionalProperties": false
  32959. },
  32960. "EventMessageUpdated": {
  32961. "type": "object",
  32962. "properties": {
  32963. "id": {
  32964. "type": "string",
  32965. "pattern": "^evt_"
  32966. },
  32967. "type": {
  32968. "type": "string",
  32969. "enum": ["message.updated"]
  32970. },
  32971. "properties": {
  32972. "type": "object",
  32973. "properties": {
  32974. "sessionID": {
  32975. "type": "string",
  32976. "pattern": "^ses"
  32977. },
  32978. "info": {
  32979. "$ref": "#/components/schemas/Message"
  32980. }
  32981. },
  32982. "required": ["sessionID", "info"],
  32983. "additionalProperties": false
  32984. }
  32985. },
  32986. "required": ["id", "type", "properties"],
  32987. "additionalProperties": false
  32988. },
  32989. "EventMessageRemoved": {
  32990. "type": "object",
  32991. "properties": {
  32992. "id": {
  32993. "type": "string",
  32994. "pattern": "^evt_"
  32995. },
  32996. "type": {
  32997. "type": "string",
  32998. "enum": ["message.removed"]
  32999. },
  33000. "properties": {
  33001. "type": "object",
  33002. "properties": {
  33003. "sessionID": {
  33004. "type": "string",
  33005. "pattern": "^ses"
  33006. },
  33007. "messageID": {
  33008. "type": "string",
  33009. "pattern": "^msg"
  33010. }
  33011. },
  33012. "required": ["sessionID", "messageID"],
  33013. "additionalProperties": false
  33014. }
  33015. },
  33016. "required": ["id", "type", "properties"],
  33017. "additionalProperties": false
  33018. },
  33019. "EventMessagePartUpdated": {
  33020. "type": "object",
  33021. "properties": {
  33022. "id": {
  33023. "type": "string",
  33024. "pattern": "^evt_"
  33025. },
  33026. "type": {
  33027. "type": "string",
  33028. "enum": ["message.part.updated"]
  33029. },
  33030. "properties": {
  33031. "type": "object",
  33032. "properties": {
  33033. "sessionID": {
  33034. "type": "string",
  33035. "pattern": "^ses"
  33036. },
  33037. "part": {
  33038. "$ref": "#/components/schemas/Part"
  33039. },
  33040. "time": {
  33041. "type": "number"
  33042. }
  33043. },
  33044. "required": ["sessionID", "part", "time"],
  33045. "additionalProperties": false
  33046. }
  33047. },
  33048. "required": ["id", "type", "properties"],
  33049. "additionalProperties": false
  33050. },
  33051. "EventMessagePartRemoved": {
  33052. "type": "object",
  33053. "properties": {
  33054. "id": {
  33055. "type": "string",
  33056. "pattern": "^evt_"
  33057. },
  33058. "type": {
  33059. "type": "string",
  33060. "enum": ["message.part.removed"]
  33061. },
  33062. "properties": {
  33063. "type": "object",
  33064. "properties": {
  33065. "sessionID": {
  33066. "type": "string",
  33067. "pattern": "^ses"
  33068. },
  33069. "messageID": {
  33070. "type": "string",
  33071. "pattern": "^msg"
  33072. },
  33073. "partID": {
  33074. "type": "string",
  33075. "pattern": "^prt"
  33076. }
  33077. },
  33078. "required": ["sessionID", "messageID", "partID"],
  33079. "additionalProperties": false
  33080. }
  33081. },
  33082. "required": ["id", "type", "properties"],
  33083. "additionalProperties": false
  33084. },
  33085. "EventSessionNextAgentSwitched": {
  33086. "type": "object",
  33087. "properties": {
  33088. "id": {
  33089. "type": "string",
  33090. "pattern": "^evt_"
  33091. },
  33092. "type": {
  33093. "type": "string",
  33094. "enum": ["session.next.agent.switched"]
  33095. },
  33096. "properties": {
  33097. "type": "object",
  33098. "properties": {
  33099. "timestamp": {
  33100. "type": "number"
  33101. },
  33102. "sessionID": {
  33103. "type": "string",
  33104. "pattern": "^ses"
  33105. },
  33106. "messageID": {
  33107. "type": "string",
  33108. "pattern": "^msg_"
  33109. },
  33110. "agent": {
  33111. "type": "string"
  33112. }
  33113. },
  33114. "required": ["timestamp", "sessionID", "messageID", "agent"],
  33115. "additionalProperties": false
  33116. }
  33117. },
  33118. "required": ["id", "type", "properties"],
  33119. "additionalProperties": false
  33120. },
  33121. "EventSessionNextModelSwitched": {
  33122. "type": "object",
  33123. "properties": {
  33124. "id": {
  33125. "type": "string",
  33126. "pattern": "^evt_"
  33127. },
  33128. "type": {
  33129. "type": "string",
  33130. "enum": ["session.next.model.switched"]
  33131. },
  33132. "properties": {
  33133. "type": "object",
  33134. "properties": {
  33135. "timestamp": {
  33136. "type": "number"
  33137. },
  33138. "sessionID": {
  33139. "type": "string",
  33140. "pattern": "^ses"
  33141. },
  33142. "messageID": {
  33143. "type": "string",
  33144. "pattern": "^msg_"
  33145. },
  33146. "model": {
  33147. "type": "object",
  33148. "properties": {
  33149. "id": {
  33150. "type": "string"
  33151. },
  33152. "providerID": {
  33153. "type": "string"
  33154. },
  33155. "variant": {
  33156. "type": "string"
  33157. }
  33158. },
  33159. "required": ["id", "providerID"],
  33160. "additionalProperties": false
  33161. }
  33162. },
  33163. "required": ["timestamp", "sessionID", "messageID", "model"],
  33164. "additionalProperties": false
  33165. }
  33166. },
  33167. "required": ["id", "type", "properties"],
  33168. "additionalProperties": false
  33169. },
  33170. "EventSessionNextMoved": {
  33171. "type": "object",
  33172. "properties": {
  33173. "id": {
  33174. "type": "string",
  33175. "pattern": "^evt_"
  33176. },
  33177. "type": {
  33178. "type": "string",
  33179. "enum": ["session.next.moved"]
  33180. },
  33181. "properties": {
  33182. "type": "object",
  33183. "properties": {
  33184. "timestamp": {
  33185. "type": "number"
  33186. },
  33187. "sessionID": {
  33188. "type": "string",
  33189. "pattern": "^ses"
  33190. },
  33191. "location": {
  33192. "$ref": "#/components/schemas/LocationRef"
  33193. },
  33194. "subdirectory": {
  33195. "type": "string"
  33196. }
  33197. },
  33198. "required": ["timestamp", "sessionID", "location"],
  33199. "additionalProperties": false
  33200. }
  33201. },
  33202. "required": ["id", "type", "properties"],
  33203. "additionalProperties": false
  33204. },
  33205. "EventSessionNextPrompted": {
  33206. "type": "object",
  33207. "properties": {
  33208. "id": {
  33209. "type": "string",
  33210. "pattern": "^evt_"
  33211. },
  33212. "type": {
  33213. "type": "string",
  33214. "enum": ["session.next.prompted"]
  33215. },
  33216. "properties": {
  33217. "type": "object",
  33218. "properties": {
  33219. "timestamp": {
  33220. "type": "number"
  33221. },
  33222. "sessionID": {
  33223. "type": "string",
  33224. "pattern": "^ses"
  33225. },
  33226. "messageID": {
  33227. "type": "string",
  33228. "pattern": "^msg_"
  33229. },
  33230. "prompt": {
  33231. "$ref": "#/components/schemas/Prompt"
  33232. },
  33233. "delivery": {
  33234. "type": "string",
  33235. "enum": ["steer", "queue"]
  33236. }
  33237. },
  33238. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  33239. "additionalProperties": false
  33240. }
  33241. },
  33242. "required": ["id", "type", "properties"],
  33243. "additionalProperties": false
  33244. },
  33245. "EventSessionNextPromptAdmitted": {
  33246. "type": "object",
  33247. "properties": {
  33248. "id": {
  33249. "type": "string",
  33250. "pattern": "^evt_"
  33251. },
  33252. "type": {
  33253. "type": "string",
  33254. "enum": ["session.next.prompt.admitted"]
  33255. },
  33256. "properties": {
  33257. "type": "object",
  33258. "properties": {
  33259. "timestamp": {
  33260. "type": "number"
  33261. },
  33262. "sessionID": {
  33263. "type": "string",
  33264. "pattern": "^ses"
  33265. },
  33266. "messageID": {
  33267. "type": "string",
  33268. "pattern": "^msg_"
  33269. },
  33270. "prompt": {
  33271. "$ref": "#/components/schemas/Prompt"
  33272. },
  33273. "delivery": {
  33274. "type": "string",
  33275. "enum": ["steer", "queue"]
  33276. }
  33277. },
  33278. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  33279. "additionalProperties": false
  33280. }
  33281. },
  33282. "required": ["id", "type", "properties"],
  33283. "additionalProperties": false
  33284. },
  33285. "EventSessionNextPromptPromoted": {
  33286. "type": "object",
  33287. "properties": {
  33288. "id": {
  33289. "type": "string",
  33290. "pattern": "^evt_"
  33291. },
  33292. "type": {
  33293. "type": "string",
  33294. "enum": ["session.next.prompt.promoted"]
  33295. },
  33296. "properties": {
  33297. "type": "object",
  33298. "properties": {
  33299. "timestamp": {
  33300. "type": "number"
  33301. },
  33302. "sessionID": {
  33303. "type": "string",
  33304. "pattern": "^ses"
  33305. },
  33306. "messageID": {
  33307. "type": "string",
  33308. "pattern": "^msg_"
  33309. },
  33310. "prompt": {
  33311. "$ref": "#/components/schemas/Prompt"
  33312. },
  33313. "timeCreated": {
  33314. "type": "number"
  33315. }
  33316. },
  33317. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  33318. "additionalProperties": false
  33319. }
  33320. },
  33321. "required": ["id", "type", "properties"],
  33322. "additionalProperties": false
  33323. },
  33324. "EventSessionNextContextUpdated": {
  33325. "type": "object",
  33326. "properties": {
  33327. "id": {
  33328. "type": "string",
  33329. "pattern": "^evt_"
  33330. },
  33331. "type": {
  33332. "type": "string",
  33333. "enum": ["session.next.context.updated"]
  33334. },
  33335. "properties": {
  33336. "type": "object",
  33337. "properties": {
  33338. "timestamp": {
  33339. "type": "number"
  33340. },
  33341. "sessionID": {
  33342. "type": "string",
  33343. "pattern": "^ses"
  33344. },
  33345. "messageID": {
  33346. "type": "string",
  33347. "pattern": "^msg_"
  33348. },
  33349. "text": {
  33350. "type": "string"
  33351. }
  33352. },
  33353. "required": ["timestamp", "sessionID", "messageID", "text"],
  33354. "additionalProperties": false
  33355. }
  33356. },
  33357. "required": ["id", "type", "properties"],
  33358. "additionalProperties": false
  33359. },
  33360. "EventSessionNextSynthetic": {
  33361. "type": "object",
  33362. "properties": {
  33363. "id": {
  33364. "type": "string",
  33365. "pattern": "^evt_"
  33366. },
  33367. "type": {
  33368. "type": "string",
  33369. "enum": ["session.next.synthetic"]
  33370. },
  33371. "properties": {
  33372. "type": "object",
  33373. "properties": {
  33374. "timestamp": {
  33375. "type": "number"
  33376. },
  33377. "sessionID": {
  33378. "type": "string",
  33379. "pattern": "^ses"
  33380. },
  33381. "messageID": {
  33382. "type": "string",
  33383. "pattern": "^msg_"
  33384. },
  33385. "text": {
  33386. "type": "string"
  33387. }
  33388. },
  33389. "required": ["timestamp", "sessionID", "messageID", "text"],
  33390. "additionalProperties": false
  33391. }
  33392. },
  33393. "required": ["id", "type", "properties"],
  33394. "additionalProperties": false
  33395. },
  33396. "EventSessionNextShellStarted": {
  33397. "type": "object",
  33398. "properties": {
  33399. "id": {
  33400. "type": "string",
  33401. "pattern": "^evt_"
  33402. },
  33403. "type": {
  33404. "type": "string",
  33405. "enum": ["session.next.shell.started"]
  33406. },
  33407. "properties": {
  33408. "type": "object",
  33409. "properties": {
  33410. "timestamp": {
  33411. "type": "number"
  33412. },
  33413. "sessionID": {
  33414. "type": "string",
  33415. "pattern": "^ses"
  33416. },
  33417. "messageID": {
  33418. "type": "string",
  33419. "pattern": "^msg_"
  33420. },
  33421. "callID": {
  33422. "type": "string"
  33423. },
  33424. "command": {
  33425. "type": "string"
  33426. }
  33427. },
  33428. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  33429. "additionalProperties": false
  33430. }
  33431. },
  33432. "required": ["id", "type", "properties"],
  33433. "additionalProperties": false
  33434. },
  33435. "EventSessionNextShellEnded": {
  33436. "type": "object",
  33437. "properties": {
  33438. "id": {
  33439. "type": "string",
  33440. "pattern": "^evt_"
  33441. },
  33442. "type": {
  33443. "type": "string",
  33444. "enum": ["session.next.shell.ended"]
  33445. },
  33446. "properties": {
  33447. "type": "object",
  33448. "properties": {
  33449. "timestamp": {
  33450. "type": "number"
  33451. },
  33452. "sessionID": {
  33453. "type": "string",
  33454. "pattern": "^ses"
  33455. },
  33456. "callID": {
  33457. "type": "string"
  33458. },
  33459. "output": {
  33460. "type": "string"
  33461. }
  33462. },
  33463. "required": ["timestamp", "sessionID", "callID", "output"],
  33464. "additionalProperties": false
  33465. }
  33466. },
  33467. "required": ["id", "type", "properties"],
  33468. "additionalProperties": false
  33469. },
  33470. "EventSessionNextStepStarted": {
  33471. "type": "object",
  33472. "properties": {
  33473. "id": {
  33474. "type": "string",
  33475. "pattern": "^evt_"
  33476. },
  33477. "type": {
  33478. "type": "string",
  33479. "enum": ["session.next.step.started"]
  33480. },
  33481. "properties": {
  33482. "type": "object",
  33483. "properties": {
  33484. "timestamp": {
  33485. "type": "number"
  33486. },
  33487. "sessionID": {
  33488. "type": "string",
  33489. "pattern": "^ses"
  33490. },
  33491. "assistantMessageID": {
  33492. "type": "string",
  33493. "pattern": "^msg_"
  33494. },
  33495. "agent": {
  33496. "type": "string"
  33497. },
  33498. "model": {
  33499. "type": "object",
  33500. "properties": {
  33501. "id": {
  33502. "type": "string"
  33503. },
  33504. "providerID": {
  33505. "type": "string"
  33506. },
  33507. "variant": {
  33508. "type": "string"
  33509. }
  33510. },
  33511. "required": ["id", "providerID"],
  33512. "additionalProperties": false
  33513. },
  33514. "snapshot": {
  33515. "type": "string"
  33516. }
  33517. },
  33518. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  33519. "additionalProperties": false
  33520. }
  33521. },
  33522. "required": ["id", "type", "properties"],
  33523. "additionalProperties": false
  33524. },
  33525. "EventSessionNextStepEnded": {
  33526. "type": "object",
  33527. "properties": {
  33528. "id": {
  33529. "type": "string",
  33530. "pattern": "^evt_"
  33531. },
  33532. "type": {
  33533. "type": "string",
  33534. "enum": ["session.next.step.ended"]
  33535. },
  33536. "properties": {
  33537. "type": "object",
  33538. "properties": {
  33539. "timestamp": {
  33540. "type": "number"
  33541. },
  33542. "sessionID": {
  33543. "type": "string",
  33544. "pattern": "^ses"
  33545. },
  33546. "assistantMessageID": {
  33547. "type": "string",
  33548. "pattern": "^msg_"
  33549. },
  33550. "finish": {
  33551. "type": "string"
  33552. },
  33553. "cost": {
  33554. "type": "number"
  33555. },
  33556. "tokens": {
  33557. "type": "object",
  33558. "properties": {
  33559. "input": {
  33560. "type": "number"
  33561. },
  33562. "output": {
  33563. "type": "number"
  33564. },
  33565. "reasoning": {
  33566. "type": "number"
  33567. },
  33568. "cache": {
  33569. "type": "object",
  33570. "properties": {
  33571. "read": {
  33572. "type": "number"
  33573. },
  33574. "write": {
  33575. "type": "number"
  33576. }
  33577. },
  33578. "required": ["read", "write"],
  33579. "additionalProperties": false
  33580. }
  33581. },
  33582. "required": ["input", "output", "reasoning", "cache"],
  33583. "additionalProperties": false
  33584. },
  33585. "snapshot": {
  33586. "type": "string"
  33587. }
  33588. },
  33589. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  33590. "additionalProperties": false
  33591. }
  33592. },
  33593. "required": ["id", "type", "properties"],
  33594. "additionalProperties": false
  33595. },
  33596. "EventSessionNextStepFailed": {
  33597. "type": "object",
  33598. "properties": {
  33599. "id": {
  33600. "type": "string",
  33601. "pattern": "^evt_"
  33602. },
  33603. "type": {
  33604. "type": "string",
  33605. "enum": ["session.next.step.failed"]
  33606. },
  33607. "properties": {
  33608. "type": "object",
  33609. "properties": {
  33610. "timestamp": {
  33611. "type": "number"
  33612. },
  33613. "sessionID": {
  33614. "type": "string",
  33615. "pattern": "^ses"
  33616. },
  33617. "assistantMessageID": {
  33618. "type": "string",
  33619. "pattern": "^msg_"
  33620. },
  33621. "error": {
  33622. "$ref": "#/components/schemas/SessionErrorUnknown"
  33623. }
  33624. },
  33625. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  33626. "additionalProperties": false
  33627. }
  33628. },
  33629. "required": ["id", "type", "properties"],
  33630. "additionalProperties": false
  33631. },
  33632. "EventSessionNextTextStarted": {
  33633. "type": "object",
  33634. "properties": {
  33635. "id": {
  33636. "type": "string",
  33637. "pattern": "^evt_"
  33638. },
  33639. "type": {
  33640. "type": "string",
  33641. "enum": ["session.next.text.started"]
  33642. },
  33643. "properties": {
  33644. "type": "object",
  33645. "properties": {
  33646. "timestamp": {
  33647. "type": "number"
  33648. },
  33649. "sessionID": {
  33650. "type": "string",
  33651. "pattern": "^ses"
  33652. },
  33653. "assistantMessageID": {
  33654. "type": "string",
  33655. "pattern": "^msg_"
  33656. },
  33657. "textID": {
  33658. "type": "string"
  33659. }
  33660. },
  33661. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  33662. "additionalProperties": false
  33663. }
  33664. },
  33665. "required": ["id", "type", "properties"],
  33666. "additionalProperties": false
  33667. },
  33668. "EventSessionNextTextDelta": {
  33669. "type": "object",
  33670. "properties": {
  33671. "id": {
  33672. "type": "string",
  33673. "pattern": "^evt_"
  33674. },
  33675. "type": {
  33676. "type": "string",
  33677. "enum": ["session.next.text.delta"]
  33678. },
  33679. "properties": {
  33680. "type": "object",
  33681. "properties": {
  33682. "timestamp": {
  33683. "type": "number"
  33684. },
  33685. "sessionID": {
  33686. "type": "string",
  33687. "pattern": "^ses"
  33688. },
  33689. "assistantMessageID": {
  33690. "type": "string",
  33691. "pattern": "^msg_"
  33692. },
  33693. "textID": {
  33694. "type": "string"
  33695. },
  33696. "delta": {
  33697. "type": "string"
  33698. }
  33699. },
  33700. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  33701. "additionalProperties": false
  33702. }
  33703. },
  33704. "required": ["id", "type", "properties"],
  33705. "additionalProperties": false
  33706. },
  33707. "EventSessionNextTextEnded": {
  33708. "type": "object",
  33709. "properties": {
  33710. "id": {
  33711. "type": "string",
  33712. "pattern": "^evt_"
  33713. },
  33714. "type": {
  33715. "type": "string",
  33716. "enum": ["session.next.text.ended"]
  33717. },
  33718. "properties": {
  33719. "type": "object",
  33720. "properties": {
  33721. "timestamp": {
  33722. "type": "number"
  33723. },
  33724. "sessionID": {
  33725. "type": "string",
  33726. "pattern": "^ses"
  33727. },
  33728. "assistantMessageID": {
  33729. "type": "string",
  33730. "pattern": "^msg_"
  33731. },
  33732. "textID": {
  33733. "type": "string"
  33734. },
  33735. "text": {
  33736. "type": "string"
  33737. }
  33738. },
  33739. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  33740. "additionalProperties": false
  33741. }
  33742. },
  33743. "required": ["id", "type", "properties"],
  33744. "additionalProperties": false
  33745. },
  33746. "EventSessionNextReasoningStarted": {
  33747. "type": "object",
  33748. "properties": {
  33749. "id": {
  33750. "type": "string",
  33751. "pattern": "^evt_"
  33752. },
  33753. "type": {
  33754. "type": "string",
  33755. "enum": ["session.next.reasoning.started"]
  33756. },
  33757. "properties": {
  33758. "type": "object",
  33759. "properties": {
  33760. "timestamp": {
  33761. "type": "number"
  33762. },
  33763. "sessionID": {
  33764. "type": "string",
  33765. "pattern": "^ses"
  33766. },
  33767. "assistantMessageID": {
  33768. "type": "string",
  33769. "pattern": "^msg_"
  33770. },
  33771. "reasoningID": {
  33772. "type": "string"
  33773. },
  33774. "providerMetadata": {
  33775. "type": "object",
  33776. "additionalProperties": {
  33777. "type": "object"
  33778. }
  33779. }
  33780. },
  33781. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  33782. "additionalProperties": false
  33783. }
  33784. },
  33785. "required": ["id", "type", "properties"],
  33786. "additionalProperties": false
  33787. },
  33788. "EventSessionNextReasoningDelta": {
  33789. "type": "object",
  33790. "properties": {
  33791. "id": {
  33792. "type": "string",
  33793. "pattern": "^evt_"
  33794. },
  33795. "type": {
  33796. "type": "string",
  33797. "enum": ["session.next.reasoning.delta"]
  33798. },
  33799. "properties": {
  33800. "type": "object",
  33801. "properties": {
  33802. "timestamp": {
  33803. "type": "number"
  33804. },
  33805. "sessionID": {
  33806. "type": "string",
  33807. "pattern": "^ses"
  33808. },
  33809. "assistantMessageID": {
  33810. "type": "string",
  33811. "pattern": "^msg_"
  33812. },
  33813. "reasoningID": {
  33814. "type": "string"
  33815. },
  33816. "delta": {
  33817. "type": "string"
  33818. }
  33819. },
  33820. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  33821. "additionalProperties": false
  33822. }
  33823. },
  33824. "required": ["id", "type", "properties"],
  33825. "additionalProperties": false
  33826. },
  33827. "EventSessionNextReasoningEnded": {
  33828. "type": "object",
  33829. "properties": {
  33830. "id": {
  33831. "type": "string",
  33832. "pattern": "^evt_"
  33833. },
  33834. "type": {
  33835. "type": "string",
  33836. "enum": ["session.next.reasoning.ended"]
  33837. },
  33838. "properties": {
  33839. "type": "object",
  33840. "properties": {
  33841. "timestamp": {
  33842. "type": "number"
  33843. },
  33844. "sessionID": {
  33845. "type": "string",
  33846. "pattern": "^ses"
  33847. },
  33848. "assistantMessageID": {
  33849. "type": "string",
  33850. "pattern": "^msg_"
  33851. },
  33852. "reasoningID": {
  33853. "type": "string"
  33854. },
  33855. "text": {
  33856. "type": "string"
  33857. },
  33858. "providerMetadata": {
  33859. "type": "object",
  33860. "additionalProperties": {
  33861. "type": "object"
  33862. }
  33863. }
  33864. },
  33865. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  33866. "additionalProperties": false
  33867. }
  33868. },
  33869. "required": ["id", "type", "properties"],
  33870. "additionalProperties": false
  33871. },
  33872. "EventSessionNextToolInputStarted": {
  33873. "type": "object",
  33874. "properties": {
  33875. "id": {
  33876. "type": "string",
  33877. "pattern": "^evt_"
  33878. },
  33879. "type": {
  33880. "type": "string",
  33881. "enum": ["session.next.tool.input.started"]
  33882. },
  33883. "properties": {
  33884. "type": "object",
  33885. "properties": {
  33886. "timestamp": {
  33887. "type": "number"
  33888. },
  33889. "sessionID": {
  33890. "type": "string",
  33891. "pattern": "^ses"
  33892. },
  33893. "assistantMessageID": {
  33894. "type": "string",
  33895. "pattern": "^msg_"
  33896. },
  33897. "callID": {
  33898. "type": "string"
  33899. },
  33900. "name": {
  33901. "type": "string"
  33902. }
  33903. },
  33904. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  33905. "additionalProperties": false
  33906. }
  33907. },
  33908. "required": ["id", "type", "properties"],
  33909. "additionalProperties": false
  33910. },
  33911. "EventSessionNextToolInputDelta": {
  33912. "type": "object",
  33913. "properties": {
  33914. "id": {
  33915. "type": "string",
  33916. "pattern": "^evt_"
  33917. },
  33918. "type": {
  33919. "type": "string",
  33920. "enum": ["session.next.tool.input.delta"]
  33921. },
  33922. "properties": {
  33923. "type": "object",
  33924. "properties": {
  33925. "timestamp": {
  33926. "type": "number"
  33927. },
  33928. "sessionID": {
  33929. "type": "string",
  33930. "pattern": "^ses"
  33931. },
  33932. "assistantMessageID": {
  33933. "type": "string",
  33934. "pattern": "^msg_"
  33935. },
  33936. "callID": {
  33937. "type": "string"
  33938. },
  33939. "delta": {
  33940. "type": "string"
  33941. }
  33942. },
  33943. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  33944. "additionalProperties": false
  33945. }
  33946. },
  33947. "required": ["id", "type", "properties"],
  33948. "additionalProperties": false
  33949. },
  33950. "EventSessionNextToolInputEnded": {
  33951. "type": "object",
  33952. "properties": {
  33953. "id": {
  33954. "type": "string",
  33955. "pattern": "^evt_"
  33956. },
  33957. "type": {
  33958. "type": "string",
  33959. "enum": ["session.next.tool.input.ended"]
  33960. },
  33961. "properties": {
  33962. "type": "object",
  33963. "properties": {
  33964. "timestamp": {
  33965. "type": "number"
  33966. },
  33967. "sessionID": {
  33968. "type": "string",
  33969. "pattern": "^ses"
  33970. },
  33971. "assistantMessageID": {
  33972. "type": "string",
  33973. "pattern": "^msg_"
  33974. },
  33975. "callID": {
  33976. "type": "string"
  33977. },
  33978. "text": {
  33979. "type": "string"
  33980. }
  33981. },
  33982. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  33983. "additionalProperties": false
  33984. }
  33985. },
  33986. "required": ["id", "type", "properties"],
  33987. "additionalProperties": false
  33988. },
  33989. "EventSessionNextToolCalled": {
  33990. "type": "object",
  33991. "properties": {
  33992. "id": {
  33993. "type": "string",
  33994. "pattern": "^evt_"
  33995. },
  33996. "type": {
  33997. "type": "string",
  33998. "enum": ["session.next.tool.called"]
  33999. },
  34000. "properties": {
  34001. "type": "object",
  34002. "properties": {
  34003. "timestamp": {
  34004. "type": "number"
  34005. },
  34006. "sessionID": {
  34007. "type": "string",
  34008. "pattern": "^ses"
  34009. },
  34010. "assistantMessageID": {
  34011. "type": "string",
  34012. "pattern": "^msg_"
  34013. },
  34014. "callID": {
  34015. "type": "string"
  34016. },
  34017. "tool": {
  34018. "type": "string"
  34019. },
  34020. "input": {
  34021. "type": "object"
  34022. },
  34023. "provider": {
  34024. "type": "object",
  34025. "properties": {
  34026. "executed": {
  34027. "type": "boolean"
  34028. },
  34029. "metadata": {
  34030. "type": "object",
  34031. "additionalProperties": {
  34032. "type": "object"
  34033. }
  34034. }
  34035. },
  34036. "required": ["executed"],
  34037. "additionalProperties": false
  34038. }
  34039. },
  34040. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  34041. "additionalProperties": false
  34042. }
  34043. },
  34044. "required": ["id", "type", "properties"],
  34045. "additionalProperties": false
  34046. },
  34047. "EventSessionNextToolProgress": {
  34048. "type": "object",
  34049. "properties": {
  34050. "id": {
  34051. "type": "string",
  34052. "pattern": "^evt_"
  34053. },
  34054. "type": {
  34055. "type": "string",
  34056. "enum": ["session.next.tool.progress"]
  34057. },
  34058. "properties": {
  34059. "type": "object",
  34060. "properties": {
  34061. "timestamp": {
  34062. "type": "number"
  34063. },
  34064. "sessionID": {
  34065. "type": "string",
  34066. "pattern": "^ses"
  34067. },
  34068. "assistantMessageID": {
  34069. "type": "string",
  34070. "pattern": "^msg_"
  34071. },
  34072. "callID": {
  34073. "type": "string"
  34074. },
  34075. "structured": {
  34076. "type": "object"
  34077. },
  34078. "content": {
  34079. "type": "array",
  34080. "items": {
  34081. "anyOf": [
  34082. {
  34083. "$ref": "#/components/schemas/ToolTextContent"
  34084. },
  34085. {
  34086. "$ref": "#/components/schemas/ToolFileContent"
  34087. }
  34088. ]
  34089. }
  34090. }
  34091. },
  34092. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  34093. "additionalProperties": false
  34094. }
  34095. },
  34096. "required": ["id", "type", "properties"],
  34097. "additionalProperties": false
  34098. },
  34099. "EventSessionNextToolSuccess": {
  34100. "type": "object",
  34101. "properties": {
  34102. "id": {
  34103. "type": "string",
  34104. "pattern": "^evt_"
  34105. },
  34106. "type": {
  34107. "type": "string",
  34108. "enum": ["session.next.tool.success"]
  34109. },
  34110. "properties": {
  34111. "type": "object",
  34112. "properties": {
  34113. "timestamp": {
  34114. "type": "number"
  34115. },
  34116. "sessionID": {
  34117. "type": "string",
  34118. "pattern": "^ses"
  34119. },
  34120. "assistantMessageID": {
  34121. "type": "string",
  34122. "pattern": "^msg_"
  34123. },
  34124. "callID": {
  34125. "type": "string"
  34126. },
  34127. "structured": {
  34128. "type": "object"
  34129. },
  34130. "content": {
  34131. "type": "array",
  34132. "items": {
  34133. "anyOf": [
  34134. {
  34135. "$ref": "#/components/schemas/ToolTextContent"
  34136. },
  34137. {
  34138. "$ref": "#/components/schemas/ToolFileContent"
  34139. }
  34140. ]
  34141. }
  34142. },
  34143. "outputPaths": {
  34144. "type": "array",
  34145. "items": {
  34146. "type": "string"
  34147. }
  34148. },
  34149. "result": {},
  34150. "provider": {
  34151. "type": "object",
  34152. "properties": {
  34153. "executed": {
  34154. "type": "boolean"
  34155. },
  34156. "metadata": {
  34157. "type": "object",
  34158. "additionalProperties": {
  34159. "type": "object"
  34160. }
  34161. }
  34162. },
  34163. "required": ["executed"],
  34164. "additionalProperties": false
  34165. }
  34166. },
  34167. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  34168. "additionalProperties": false
  34169. }
  34170. },
  34171. "required": ["id", "type", "properties"],
  34172. "additionalProperties": false
  34173. },
  34174. "EventSessionNextToolFailed": {
  34175. "type": "object",
  34176. "properties": {
  34177. "id": {
  34178. "type": "string",
  34179. "pattern": "^evt_"
  34180. },
  34181. "type": {
  34182. "type": "string",
  34183. "enum": ["session.next.tool.failed"]
  34184. },
  34185. "properties": {
  34186. "type": "object",
  34187. "properties": {
  34188. "timestamp": {
  34189. "type": "number"
  34190. },
  34191. "sessionID": {
  34192. "type": "string",
  34193. "pattern": "^ses"
  34194. },
  34195. "assistantMessageID": {
  34196. "type": "string",
  34197. "pattern": "^msg_"
  34198. },
  34199. "callID": {
  34200. "type": "string"
  34201. },
  34202. "error": {
  34203. "$ref": "#/components/schemas/SessionErrorUnknown"
  34204. },
  34205. "result": {},
  34206. "provider": {
  34207. "type": "object",
  34208. "properties": {
  34209. "executed": {
  34210. "type": "boolean"
  34211. },
  34212. "metadata": {
  34213. "type": "object",
  34214. "additionalProperties": {
  34215. "type": "object"
  34216. }
  34217. }
  34218. },
  34219. "required": ["executed"],
  34220. "additionalProperties": false
  34221. }
  34222. },
  34223. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  34224. "additionalProperties": false
  34225. }
  34226. },
  34227. "required": ["id", "type", "properties"],
  34228. "additionalProperties": false
  34229. },
  34230. "EventSessionNextRetried": {
  34231. "type": "object",
  34232. "properties": {
  34233. "id": {
  34234. "type": "string",
  34235. "pattern": "^evt_"
  34236. },
  34237. "type": {
  34238. "type": "string",
  34239. "enum": ["session.next.retried"]
  34240. },
  34241. "properties": {
  34242. "type": "object",
  34243. "properties": {
  34244. "timestamp": {
  34245. "type": "number"
  34246. },
  34247. "sessionID": {
  34248. "type": "string",
  34249. "pattern": "^ses"
  34250. },
  34251. "attempt": {
  34252. "type": "number"
  34253. },
  34254. "error": {
  34255. "$ref": "#/components/schemas/SessionNextRetry_error"
  34256. }
  34257. },
  34258. "required": ["timestamp", "sessionID", "attempt", "error"],
  34259. "additionalProperties": false
  34260. }
  34261. },
  34262. "required": ["id", "type", "properties"],
  34263. "additionalProperties": false
  34264. },
  34265. "EventSessionNextCompactionStarted": {
  34266. "type": "object",
  34267. "properties": {
  34268. "id": {
  34269. "type": "string",
  34270. "pattern": "^evt_"
  34271. },
  34272. "type": {
  34273. "type": "string",
  34274. "enum": ["session.next.compaction.started"]
  34275. },
  34276. "properties": {
  34277. "type": "object",
  34278. "properties": {
  34279. "timestamp": {
  34280. "type": "number"
  34281. },
  34282. "sessionID": {
  34283. "type": "string",
  34284. "pattern": "^ses"
  34285. },
  34286. "messageID": {
  34287. "type": "string",
  34288. "pattern": "^msg_"
  34289. },
  34290. "reason": {
  34291. "type": "string",
  34292. "enum": ["auto", "manual"]
  34293. }
  34294. },
  34295. "required": ["timestamp", "sessionID", "messageID", "reason"],
  34296. "additionalProperties": false
  34297. }
  34298. },
  34299. "required": ["id", "type", "properties"],
  34300. "additionalProperties": false
  34301. },
  34302. "EventSessionNextCompactionDelta": {
  34303. "type": "object",
  34304. "properties": {
  34305. "id": {
  34306. "type": "string",
  34307. "pattern": "^evt_"
  34308. },
  34309. "type": {
  34310. "type": "string",
  34311. "enum": ["session.next.compaction.delta"]
  34312. },
  34313. "properties": {
  34314. "type": "object",
  34315. "properties": {
  34316. "timestamp": {
  34317. "type": "number"
  34318. },
  34319. "sessionID": {
  34320. "type": "string",
  34321. "pattern": "^ses"
  34322. },
  34323. "messageID": {
  34324. "type": "string",
  34325. "pattern": "^msg_"
  34326. },
  34327. "text": {
  34328. "type": "string"
  34329. }
  34330. },
  34331. "required": ["timestamp", "sessionID", "messageID", "text"],
  34332. "additionalProperties": false
  34333. }
  34334. },
  34335. "required": ["id", "type", "properties"],
  34336. "additionalProperties": false
  34337. },
  34338. "EventSessionNextCompactionEnded": {
  34339. "type": "object",
  34340. "properties": {
  34341. "id": {
  34342. "type": "string",
  34343. "pattern": "^evt_"
  34344. },
  34345. "type": {
  34346. "type": "string",
  34347. "enum": ["session.next.compaction.ended"]
  34348. },
  34349. "properties": {
  34350. "type": "object",
  34351. "properties": {
  34352. "timestamp": {
  34353. "type": "number"
  34354. },
  34355. "sessionID": {
  34356. "type": "string",
  34357. "pattern": "^ses"
  34358. },
  34359. "messageID": {
  34360. "type": "string",
  34361. "pattern": "^msg_"
  34362. },
  34363. "reason": {
  34364. "type": "string",
  34365. "enum": ["auto", "manual"]
  34366. },
  34367. "text": {
  34368. "type": "string"
  34369. },
  34370. "recent": {
  34371. "type": "string"
  34372. }
  34373. },
  34374. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  34375. "additionalProperties": false
  34376. }
  34377. },
  34378. "required": ["id", "type", "properties"],
  34379. "additionalProperties": false
  34380. },
  34381. "EventMessagePartDelta": {
  34382. "type": "object",
  34383. "properties": {
  34384. "id": {
  34385. "type": "string",
  34386. "pattern": "^evt_"
  34387. },
  34388. "type": {
  34389. "type": "string",
  34390. "enum": ["message.part.delta"]
  34391. },
  34392. "properties": {
  34393. "type": "object",
  34394. "properties": {
  34395. "sessionID": {
  34396. "type": "string",
  34397. "pattern": "^ses"
  34398. },
  34399. "messageID": {
  34400. "type": "string",
  34401. "pattern": "^msg"
  34402. },
  34403. "partID": {
  34404. "type": "string",
  34405. "pattern": "^prt"
  34406. },
  34407. "field": {
  34408. "type": "string"
  34409. },
  34410. "delta": {
  34411. "type": "string"
  34412. }
  34413. },
  34414. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  34415. "additionalProperties": false
  34416. }
  34417. },
  34418. "required": ["id", "type", "properties"],
  34419. "additionalProperties": false
  34420. },
  34421. "EventSessionDiff": {
  34422. "type": "object",
  34423. "properties": {
  34424. "id": {
  34425. "type": "string",
  34426. "pattern": "^evt_"
  34427. },
  34428. "type": {
  34429. "type": "string",
  34430. "enum": ["session.diff"]
  34431. },
  34432. "properties": {
  34433. "type": "object",
  34434. "properties": {
  34435. "sessionID": {
  34436. "type": "string",
  34437. "pattern": "^ses"
  34438. },
  34439. "diff": {
  34440. "type": "array",
  34441. "items": {
  34442. "$ref": "#/components/schemas/SnapshotFileDiff"
  34443. }
  34444. }
  34445. },
  34446. "required": ["sessionID", "diff"],
  34447. "additionalProperties": false
  34448. }
  34449. },
  34450. "required": ["id", "type", "properties"],
  34451. "additionalProperties": false
  34452. },
  34453. "EventSessionError": {
  34454. "type": "object",
  34455. "properties": {
  34456. "id": {
  34457. "type": "string",
  34458. "pattern": "^evt_"
  34459. },
  34460. "type": {
  34461. "type": "string",
  34462. "enum": ["session.error"]
  34463. },
  34464. "properties": {
  34465. "type": "object",
  34466. "properties": {
  34467. "sessionID": {
  34468. "type": "string",
  34469. "pattern": "^ses"
  34470. },
  34471. "error": {
  34472. "anyOf": [
  34473. {
  34474. "$ref": "#/components/schemas/ProviderAuthError"
  34475. },
  34476. {
  34477. "$ref": "#/components/schemas/UnknownError"
  34478. },
  34479. {
  34480. "$ref": "#/components/schemas/MessageOutputLengthError"
  34481. },
  34482. {
  34483. "$ref": "#/components/schemas/MessageAbortedError"
  34484. },
  34485. {
  34486. "$ref": "#/components/schemas/StructuredOutputError"
  34487. },
  34488. {
  34489. "$ref": "#/components/schemas/ContextOverflowError"
  34490. },
  34491. {
  34492. "$ref": "#/components/schemas/ContentFilterError"
  34493. },
  34494. {
  34495. "$ref": "#/components/schemas/APIError"
  34496. }
  34497. ]
  34498. }
  34499. },
  34500. "additionalProperties": false
  34501. }
  34502. },
  34503. "required": ["id", "type", "properties"],
  34504. "additionalProperties": false
  34505. },
  34506. "EventInstallationUpdated": {
  34507. "type": "object",
  34508. "properties": {
  34509. "id": {
  34510. "type": "string",
  34511. "pattern": "^evt_"
  34512. },
  34513. "type": {
  34514. "type": "string",
  34515. "enum": ["installation.updated"]
  34516. },
  34517. "properties": {
  34518. "type": "object",
  34519. "properties": {
  34520. "version": {
  34521. "type": "string"
  34522. }
  34523. },
  34524. "required": ["version"],
  34525. "additionalProperties": false
  34526. }
  34527. },
  34528. "required": ["id", "type", "properties"],
  34529. "additionalProperties": false
  34530. },
  34531. "EventInstallationUpdate-available": {
  34532. "type": "object",
  34533. "properties": {
  34534. "id": {
  34535. "type": "string",
  34536. "pattern": "^evt_"
  34537. },
  34538. "type": {
  34539. "type": "string",
  34540. "enum": ["installation.update-available"]
  34541. },
  34542. "properties": {
  34543. "type": "object",
  34544. "properties": {
  34545. "version": {
  34546. "type": "string"
  34547. }
  34548. },
  34549. "required": ["version"],
  34550. "additionalProperties": false
  34551. }
  34552. },
  34553. "required": ["id", "type", "properties"],
  34554. "additionalProperties": false
  34555. },
  34556. "EventFileEdited": {
  34557. "type": "object",
  34558. "properties": {
  34559. "id": {
  34560. "type": "string",
  34561. "pattern": "^evt_"
  34562. },
  34563. "type": {
  34564. "type": "string",
  34565. "enum": ["file.edited"]
  34566. },
  34567. "properties": {
  34568. "type": "object",
  34569. "properties": {
  34570. "file": {
  34571. "type": "string"
  34572. }
  34573. },
  34574. "required": ["file"],
  34575. "additionalProperties": false
  34576. }
  34577. },
  34578. "required": ["id", "type", "properties"],
  34579. "additionalProperties": false
  34580. },
  34581. "EventPluginAdded": {
  34582. "type": "object",
  34583. "properties": {
  34584. "id": {
  34585. "type": "string",
  34586. "pattern": "^evt_"
  34587. },
  34588. "type": {
  34589. "type": "string",
  34590. "enum": ["plugin.added"]
  34591. },
  34592. "properties": {
  34593. "type": "object",
  34594. "properties": {
  34595. "id": {
  34596. "type": "string"
  34597. }
  34598. },
  34599. "required": ["id"],
  34600. "additionalProperties": false
  34601. }
  34602. },
  34603. "required": ["id", "type", "properties"],
  34604. "additionalProperties": false
  34605. },
  34606. "EventPermissionV2Asked": {
  34607. "type": "object",
  34608. "properties": {
  34609. "id": {
  34610. "type": "string",
  34611. "pattern": "^evt_"
  34612. },
  34613. "type": {
  34614. "type": "string",
  34615. "enum": ["permission.v2.asked"]
  34616. },
  34617. "properties": {
  34618. "type": "object",
  34619. "properties": {
  34620. "id": {
  34621. "type": "string",
  34622. "pattern": "^per"
  34623. },
  34624. "sessionID": {
  34625. "type": "string",
  34626. "pattern": "^ses"
  34627. },
  34628. "action": {
  34629. "type": "string"
  34630. },
  34631. "resources": {
  34632. "type": "array",
  34633. "items": {
  34634. "type": "string"
  34635. }
  34636. },
  34637. "save": {
  34638. "type": "array",
  34639. "items": {
  34640. "type": "string"
  34641. }
  34642. },
  34643. "metadata": {
  34644. "type": "object"
  34645. },
  34646. "source": {
  34647. "$ref": "#/components/schemas/PermissionV2Source"
  34648. }
  34649. },
  34650. "required": ["id", "sessionID", "action", "resources"],
  34651. "additionalProperties": false
  34652. }
  34653. },
  34654. "required": ["id", "type", "properties"],
  34655. "additionalProperties": false
  34656. },
  34657. "EventPermissionV2Replied": {
  34658. "type": "object",
  34659. "properties": {
  34660. "id": {
  34661. "type": "string",
  34662. "pattern": "^evt_"
  34663. },
  34664. "type": {
  34665. "type": "string",
  34666. "enum": ["permission.v2.replied"]
  34667. },
  34668. "properties": {
  34669. "type": "object",
  34670. "properties": {
  34671. "sessionID": {
  34672. "type": "string",
  34673. "pattern": "^ses"
  34674. },
  34675. "requestID": {
  34676. "type": "string",
  34677. "pattern": "^per"
  34678. },
  34679. "reply": {
  34680. "$ref": "#/components/schemas/PermissionV2Reply"
  34681. }
  34682. },
  34683. "required": ["sessionID", "requestID", "reply"],
  34684. "additionalProperties": false
  34685. }
  34686. },
  34687. "required": ["id", "type", "properties"],
  34688. "additionalProperties": false
  34689. },
  34690. "EventReferenceUpdated": {
  34691. "type": "object",
  34692. "properties": {
  34693. "id": {
  34694. "type": "string",
  34695. "pattern": "^evt_"
  34696. },
  34697. "type": {
  34698. "type": "string",
  34699. "enum": ["reference.updated"]
  34700. },
  34701. "properties": {
  34702. "type": "object",
  34703. "properties": {}
  34704. }
  34705. },
  34706. "required": ["id", "type", "properties"],
  34707. "additionalProperties": false
  34708. },
  34709. "EventProjectDirectoriesUpdated": {
  34710. "type": "object",
  34711. "properties": {
  34712. "id": {
  34713. "type": "string",
  34714. "pattern": "^evt_"
  34715. },
  34716. "type": {
  34717. "type": "string",
  34718. "enum": ["project.directories.updated"]
  34719. },
  34720. "properties": {
  34721. "type": "object",
  34722. "properties": {
  34723. "projectID": {
  34724. "type": "string"
  34725. }
  34726. },
  34727. "required": ["projectID"],
  34728. "additionalProperties": false
  34729. }
  34730. },
  34731. "required": ["id", "type", "properties"],
  34732. "additionalProperties": false
  34733. },
  34734. "EventFileWatcherUpdated": {
  34735. "type": "object",
  34736. "properties": {
  34737. "id": {
  34738. "type": "string",
  34739. "pattern": "^evt_"
  34740. },
  34741. "type": {
  34742. "type": "string",
  34743. "enum": ["file.watcher.updated"]
  34744. },
  34745. "properties": {
  34746. "type": "object",
  34747. "properties": {
  34748. "file": {
  34749. "type": "string"
  34750. },
  34751. "event": {
  34752. "type": "string",
  34753. "enum": ["add", "change", "unlink"]
  34754. }
  34755. },
  34756. "required": ["file", "event"],
  34757. "additionalProperties": false
  34758. }
  34759. },
  34760. "required": ["id", "type", "properties"],
  34761. "additionalProperties": false
  34762. },
  34763. "EventPtyCreated": {
  34764. "type": "object",
  34765. "properties": {
  34766. "id": {
  34767. "type": "string",
  34768. "pattern": "^evt_"
  34769. },
  34770. "type": {
  34771. "type": "string",
  34772. "enum": ["pty.created"]
  34773. },
  34774. "properties": {
  34775. "type": "object",
  34776. "properties": {
  34777. "info": {
  34778. "$ref": "#/components/schemas/Pty"
  34779. }
  34780. },
  34781. "required": ["info"],
  34782. "additionalProperties": false
  34783. }
  34784. },
  34785. "required": ["id", "type", "properties"],
  34786. "additionalProperties": false
  34787. },
  34788. "EventPtyUpdated": {
  34789. "type": "object",
  34790. "properties": {
  34791. "id": {
  34792. "type": "string",
  34793. "pattern": "^evt_"
  34794. },
  34795. "type": {
  34796. "type": "string",
  34797. "enum": ["pty.updated"]
  34798. },
  34799. "properties": {
  34800. "type": "object",
  34801. "properties": {
  34802. "info": {
  34803. "$ref": "#/components/schemas/Pty"
  34804. }
  34805. },
  34806. "required": ["info"],
  34807. "additionalProperties": false
  34808. }
  34809. },
  34810. "required": ["id", "type", "properties"],
  34811. "additionalProperties": false
  34812. },
  34813. "EventPtyExited": {
  34814. "type": "object",
  34815. "properties": {
  34816. "id": {
  34817. "type": "string",
  34818. "pattern": "^evt_"
  34819. },
  34820. "type": {
  34821. "type": "string",
  34822. "enum": ["pty.exited"]
  34823. },
  34824. "properties": {
  34825. "type": "object",
  34826. "properties": {
  34827. "id": {
  34828. "type": "string",
  34829. "pattern": "^pty"
  34830. },
  34831. "exitCode": {
  34832. "type": "integer",
  34833. "minimum": 0
  34834. }
  34835. },
  34836. "required": ["id", "exitCode"],
  34837. "additionalProperties": false
  34838. }
  34839. },
  34840. "required": ["id", "type", "properties"],
  34841. "additionalProperties": false
  34842. },
  34843. "EventPtyDeleted": {
  34844. "type": "object",
  34845. "properties": {
  34846. "id": {
  34847. "type": "string",
  34848. "pattern": "^evt_"
  34849. },
  34850. "type": {
  34851. "type": "string",
  34852. "enum": ["pty.deleted"]
  34853. },
  34854. "properties": {
  34855. "type": "object",
  34856. "properties": {
  34857. "id": {
  34858. "type": "string",
  34859. "pattern": "^pty"
  34860. }
  34861. },
  34862. "required": ["id"],
  34863. "additionalProperties": false
  34864. }
  34865. },
  34866. "required": ["id", "type", "properties"],
  34867. "additionalProperties": false
  34868. },
  34869. "EventQuestionV2Asked": {
  34870. "type": "object",
  34871. "properties": {
  34872. "id": {
  34873. "type": "string",
  34874. "pattern": "^evt_"
  34875. },
  34876. "type": {
  34877. "type": "string",
  34878. "enum": ["question.v2.asked"]
  34879. },
  34880. "properties": {
  34881. "type": "object",
  34882. "properties": {
  34883. "id": {
  34884. "type": "string",
  34885. "pattern": "^que"
  34886. },
  34887. "sessionID": {
  34888. "type": "string",
  34889. "pattern": "^ses"
  34890. },
  34891. "questions": {
  34892. "type": "array",
  34893. "items": {
  34894. "$ref": "#/components/schemas/QuestionV2Info"
  34895. },
  34896. "description": "Questions to ask"
  34897. },
  34898. "tool": {
  34899. "$ref": "#/components/schemas/QuestionV2Tool"
  34900. }
  34901. },
  34902. "required": ["id", "sessionID", "questions"],
  34903. "additionalProperties": false
  34904. }
  34905. },
  34906. "required": ["id", "type", "properties"],
  34907. "additionalProperties": false
  34908. },
  34909. "EventQuestionV2Replied": {
  34910. "type": "object",
  34911. "properties": {
  34912. "id": {
  34913. "type": "string",
  34914. "pattern": "^evt_"
  34915. },
  34916. "type": {
  34917. "type": "string",
  34918. "enum": ["question.v2.replied"]
  34919. },
  34920. "properties": {
  34921. "type": "object",
  34922. "properties": {
  34923. "sessionID": {
  34924. "type": "string",
  34925. "pattern": "^ses"
  34926. },
  34927. "requestID": {
  34928. "type": "string",
  34929. "pattern": "^que"
  34930. },
  34931. "answers": {
  34932. "type": "array",
  34933. "items": {
  34934. "$ref": "#/components/schemas/QuestionV2Answer"
  34935. }
  34936. }
  34937. },
  34938. "required": ["sessionID", "requestID", "answers"],
  34939. "additionalProperties": false
  34940. }
  34941. },
  34942. "required": ["id", "type", "properties"],
  34943. "additionalProperties": false
  34944. },
  34945. "EventQuestionV2Rejected": {
  34946. "type": "object",
  34947. "properties": {
  34948. "id": {
  34949. "type": "string",
  34950. "pattern": "^evt_"
  34951. },
  34952. "type": {
  34953. "type": "string",
  34954. "enum": ["question.v2.rejected"]
  34955. },
  34956. "properties": {
  34957. "type": "object",
  34958. "properties": {
  34959. "sessionID": {
  34960. "type": "string",
  34961. "pattern": "^ses"
  34962. },
  34963. "requestID": {
  34964. "type": "string",
  34965. "pattern": "^que"
  34966. }
  34967. },
  34968. "required": ["sessionID", "requestID"],
  34969. "additionalProperties": false
  34970. }
  34971. },
  34972. "required": ["id", "type", "properties"],
  34973. "additionalProperties": false
  34974. },
  34975. "EventTodoUpdated": {
  34976. "type": "object",
  34977. "properties": {
  34978. "id": {
  34979. "type": "string",
  34980. "pattern": "^evt_"
  34981. },
  34982. "type": {
  34983. "type": "string",
  34984. "enum": ["todo.updated"]
  34985. },
  34986. "properties": {
  34987. "type": "object",
  34988. "properties": {
  34989. "sessionID": {
  34990. "type": "string",
  34991. "pattern": "^ses"
  34992. },
  34993. "todos": {
  34994. "type": "array",
  34995. "items": {
  34996. "$ref": "#/components/schemas/Todo"
  34997. }
  34998. }
  34999. },
  35000. "required": ["sessionID", "todos"],
  35001. "additionalProperties": false
  35002. }
  35003. },
  35004. "required": ["id", "type", "properties"],
  35005. "additionalProperties": false
  35006. },
  35007. "EventLspUpdated": {
  35008. "type": "object",
  35009. "properties": {
  35010. "id": {
  35011. "type": "string",
  35012. "pattern": "^evt_"
  35013. },
  35014. "type": {
  35015. "type": "string",
  35016. "enum": ["lsp.updated"]
  35017. },
  35018. "properties": {
  35019. "type": "object",
  35020. "properties": {}
  35021. }
  35022. },
  35023. "required": ["id", "type", "properties"],
  35024. "additionalProperties": false
  35025. },
  35026. "EventPermissionAsked": {
  35027. "type": "object",
  35028. "properties": {
  35029. "id": {
  35030. "type": "string",
  35031. "pattern": "^evt_"
  35032. },
  35033. "type": {
  35034. "type": "string",
  35035. "enum": ["permission.asked"]
  35036. },
  35037. "properties": {
  35038. "type": "object",
  35039. "properties": {
  35040. "id": {
  35041. "type": "string",
  35042. "pattern": "^per"
  35043. },
  35044. "sessionID": {
  35045. "type": "string",
  35046. "pattern": "^ses"
  35047. },
  35048. "permission": {
  35049. "type": "string"
  35050. },
  35051. "patterns": {
  35052. "type": "array",
  35053. "items": {
  35054. "type": "string"
  35055. }
  35056. },
  35057. "metadata": {
  35058. "type": "object"
  35059. },
  35060. "always": {
  35061. "type": "array",
  35062. "items": {
  35063. "type": "string"
  35064. }
  35065. },
  35066. "tool": {
  35067. "type": "object",
  35068. "properties": {
  35069. "messageID": {
  35070. "type": "string"
  35071. },
  35072. "callID": {
  35073. "type": "string"
  35074. }
  35075. },
  35076. "required": ["messageID", "callID"],
  35077. "additionalProperties": false
  35078. }
  35079. },
  35080. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  35081. "additionalProperties": false
  35082. }
  35083. },
  35084. "required": ["id", "type", "properties"],
  35085. "additionalProperties": false
  35086. },
  35087. "EventPermissionReplied": {
  35088. "type": "object",
  35089. "properties": {
  35090. "id": {
  35091. "type": "string",
  35092. "pattern": "^evt_"
  35093. },
  35094. "type": {
  35095. "type": "string",
  35096. "enum": ["permission.replied"]
  35097. },
  35098. "properties": {
  35099. "type": "object",
  35100. "properties": {
  35101. "sessionID": {
  35102. "type": "string",
  35103. "pattern": "^ses"
  35104. },
  35105. "requestID": {
  35106. "type": "string",
  35107. "pattern": "^per"
  35108. },
  35109. "reply": {
  35110. "type": "string",
  35111. "enum": ["once", "always", "reject"]
  35112. }
  35113. },
  35114. "required": ["sessionID", "requestID", "reply"],
  35115. "additionalProperties": false
  35116. }
  35117. },
  35118. "required": ["id", "type", "properties"],
  35119. "additionalProperties": false
  35120. },
  35121. "EventMcpToolsChanged": {
  35122. "type": "object",
  35123. "properties": {
  35124. "id": {
  35125. "type": "string",
  35126. "pattern": "^evt_"
  35127. },
  35128. "type": {
  35129. "type": "string",
  35130. "enum": ["mcp.tools.changed"]
  35131. },
  35132. "properties": {
  35133. "type": "object",
  35134. "properties": {
  35135. "server": {
  35136. "type": "string"
  35137. }
  35138. },
  35139. "required": ["server"],
  35140. "additionalProperties": false
  35141. }
  35142. },
  35143. "required": ["id", "type", "properties"],
  35144. "additionalProperties": false
  35145. },
  35146. "EventMcpBrowserOpenFailed": {
  35147. "type": "object",
  35148. "properties": {
  35149. "id": {
  35150. "type": "string",
  35151. "pattern": "^evt_"
  35152. },
  35153. "type": {
  35154. "type": "string",
  35155. "enum": ["mcp.browser.open.failed"]
  35156. },
  35157. "properties": {
  35158. "type": "object",
  35159. "properties": {
  35160. "mcpName": {
  35161. "type": "string"
  35162. },
  35163. "url": {
  35164. "type": "string"
  35165. }
  35166. },
  35167. "required": ["mcpName", "url"],
  35168. "additionalProperties": false
  35169. }
  35170. },
  35171. "required": ["id", "type", "properties"],
  35172. "additionalProperties": false
  35173. },
  35174. "EventCommandExecuted": {
  35175. "type": "object",
  35176. "properties": {
  35177. "id": {
  35178. "type": "string",
  35179. "pattern": "^evt_"
  35180. },
  35181. "type": {
  35182. "type": "string",
  35183. "enum": ["command.executed"]
  35184. },
  35185. "properties": {
  35186. "type": "object",
  35187. "properties": {
  35188. "name": {
  35189. "type": "string"
  35190. },
  35191. "sessionID": {
  35192. "type": "string",
  35193. "pattern": "^ses"
  35194. },
  35195. "arguments": {
  35196. "type": "string"
  35197. },
  35198. "messageID": {
  35199. "type": "string",
  35200. "pattern": "^msg"
  35201. }
  35202. },
  35203. "required": ["name", "sessionID", "arguments", "messageID"],
  35204. "additionalProperties": false
  35205. }
  35206. },
  35207. "required": ["id", "type", "properties"],
  35208. "additionalProperties": false
  35209. },
  35210. "EventProjectUpdated": {
  35211. "type": "object",
  35212. "properties": {
  35213. "id": {
  35214. "type": "string",
  35215. "pattern": "^evt_"
  35216. },
  35217. "type": {
  35218. "type": "string",
  35219. "enum": ["project.updated"]
  35220. },
  35221. "properties": {
  35222. "type": "object",
  35223. "properties": {
  35224. "id": {
  35225. "type": "string"
  35226. },
  35227. "worktree": {
  35228. "type": "string"
  35229. },
  35230. "vcs": {
  35231. "type": "string",
  35232. "enum": ["git"]
  35233. },
  35234. "name": {
  35235. "type": "string"
  35236. },
  35237. "icon": {
  35238. "type": "object",
  35239. "properties": {
  35240. "url": {
  35241. "type": "string"
  35242. },
  35243. "override": {
  35244. "type": "string"
  35245. },
  35246. "color": {
  35247. "type": "string"
  35248. }
  35249. },
  35250. "additionalProperties": false
  35251. },
  35252. "commands": {
  35253. "type": "object",
  35254. "properties": {
  35255. "start": {
  35256. "type": "string",
  35257. "description": "Startup script to run when creating a new workspace (worktree)"
  35258. }
  35259. },
  35260. "additionalProperties": false
  35261. },
  35262. "time": {
  35263. "type": "object",
  35264. "properties": {
  35265. "created": {
  35266. "type": "integer",
  35267. "minimum": 0
  35268. },
  35269. "updated": {
  35270. "type": "integer",
  35271. "minimum": 0
  35272. },
  35273. "initialized": {
  35274. "type": "integer",
  35275. "minimum": 0
  35276. }
  35277. },
  35278. "required": ["created", "updated"],
  35279. "additionalProperties": false
  35280. },
  35281. "sandboxes": {
  35282. "type": "array",
  35283. "items": {
  35284. "type": "string"
  35285. }
  35286. }
  35287. },
  35288. "required": ["id", "worktree", "time", "sandboxes"],
  35289. "additionalProperties": false
  35290. }
  35291. },
  35292. "required": ["id", "type", "properties"],
  35293. "additionalProperties": false
  35294. },
  35295. "EventSessionStatus": {
  35296. "type": "object",
  35297. "properties": {
  35298. "id": {
  35299. "type": "string",
  35300. "pattern": "^evt_"
  35301. },
  35302. "type": {
  35303. "type": "string",
  35304. "enum": ["session.status"]
  35305. },
  35306. "properties": {
  35307. "type": "object",
  35308. "properties": {
  35309. "sessionID": {
  35310. "type": "string",
  35311. "pattern": "^ses"
  35312. },
  35313. "status": {
  35314. "$ref": "#/components/schemas/SessionStatus"
  35315. }
  35316. },
  35317. "required": ["sessionID", "status"],
  35318. "additionalProperties": false
  35319. }
  35320. },
  35321. "required": ["id", "type", "properties"],
  35322. "additionalProperties": false
  35323. },
  35324. "EventSessionIdle": {
  35325. "type": "object",
  35326. "properties": {
  35327. "id": {
  35328. "type": "string",
  35329. "pattern": "^evt_"
  35330. },
  35331. "type": {
  35332. "type": "string",
  35333. "enum": ["session.idle"]
  35334. },
  35335. "properties": {
  35336. "type": "object",
  35337. "properties": {
  35338. "sessionID": {
  35339. "type": "string",
  35340. "pattern": "^ses"
  35341. }
  35342. },
  35343. "required": ["sessionID"],
  35344. "additionalProperties": false
  35345. }
  35346. },
  35347. "required": ["id", "type", "properties"],
  35348. "additionalProperties": false
  35349. },
  35350. "EventQuestionAsked": {
  35351. "type": "object",
  35352. "properties": {
  35353. "id": {
  35354. "type": "string",
  35355. "pattern": "^evt_"
  35356. },
  35357. "type": {
  35358. "type": "string",
  35359. "enum": ["question.asked"]
  35360. },
  35361. "properties": {
  35362. "type": "object",
  35363. "properties": {
  35364. "id": {
  35365. "type": "string",
  35366. "pattern": "^que"
  35367. },
  35368. "sessionID": {
  35369. "type": "string",
  35370. "pattern": "^ses"
  35371. },
  35372. "questions": {
  35373. "type": "array",
  35374. "items": {
  35375. "$ref": "#/components/schemas/QuestionInfo"
  35376. },
  35377. "description": "Questions to ask"
  35378. },
  35379. "tool": {
  35380. "$ref": "#/components/schemas/QuestionTool"
  35381. }
  35382. },
  35383. "required": ["id", "sessionID", "questions"],
  35384. "additionalProperties": false
  35385. }
  35386. },
  35387. "required": ["id", "type", "properties"],
  35388. "additionalProperties": false
  35389. },
  35390. "EventQuestionReplied": {
  35391. "type": "object",
  35392. "properties": {
  35393. "id": {
  35394. "type": "string",
  35395. "pattern": "^evt_"
  35396. },
  35397. "type": {
  35398. "type": "string",
  35399. "enum": ["question.replied"]
  35400. },
  35401. "properties": {
  35402. "type": "object",
  35403. "properties": {
  35404. "sessionID": {
  35405. "type": "string",
  35406. "pattern": "^ses"
  35407. },
  35408. "requestID": {
  35409. "type": "string",
  35410. "pattern": "^que"
  35411. },
  35412. "answers": {
  35413. "type": "array",
  35414. "items": {
  35415. "$ref": "#/components/schemas/QuestionAnswer"
  35416. }
  35417. }
  35418. },
  35419. "required": ["sessionID", "requestID", "answers"],
  35420. "additionalProperties": false
  35421. }
  35422. },
  35423. "required": ["id", "type", "properties"],
  35424. "additionalProperties": false
  35425. },
  35426. "EventQuestionRejected": {
  35427. "type": "object",
  35428. "properties": {
  35429. "id": {
  35430. "type": "string",
  35431. "pattern": "^evt_"
  35432. },
  35433. "type": {
  35434. "type": "string",
  35435. "enum": ["question.rejected"]
  35436. },
  35437. "properties": {
  35438. "type": "object",
  35439. "properties": {
  35440. "sessionID": {
  35441. "type": "string",
  35442. "pattern": "^ses"
  35443. },
  35444. "requestID": {
  35445. "type": "string",
  35446. "pattern": "^que"
  35447. }
  35448. },
  35449. "required": ["sessionID", "requestID"],
  35450. "additionalProperties": false
  35451. }
  35452. },
  35453. "required": ["id", "type", "properties"],
  35454. "additionalProperties": false
  35455. },
  35456. "EventSessionCompacted": {
  35457. "type": "object",
  35458. "properties": {
  35459. "id": {
  35460. "type": "string",
  35461. "pattern": "^evt_"
  35462. },
  35463. "type": {
  35464. "type": "string",
  35465. "enum": ["session.compacted"]
  35466. },
  35467. "properties": {
  35468. "type": "object",
  35469. "properties": {
  35470. "sessionID": {
  35471. "type": "string",
  35472. "pattern": "^ses"
  35473. }
  35474. },
  35475. "required": ["sessionID"],
  35476. "additionalProperties": false
  35477. }
  35478. },
  35479. "required": ["id", "type", "properties"],
  35480. "additionalProperties": false
  35481. },
  35482. "EventVcsBranchUpdated": {
  35483. "type": "object",
  35484. "properties": {
  35485. "id": {
  35486. "type": "string",
  35487. "pattern": "^evt_"
  35488. },
  35489. "type": {
  35490. "type": "string",
  35491. "enum": ["vcs.branch.updated"]
  35492. },
  35493. "properties": {
  35494. "type": "object",
  35495. "properties": {
  35496. "branch": {
  35497. "type": "string"
  35498. }
  35499. },
  35500. "additionalProperties": false
  35501. }
  35502. },
  35503. "required": ["id", "type", "properties"],
  35504. "additionalProperties": false
  35505. },
  35506. "EventWorkspaceReady": {
  35507. "type": "object",
  35508. "properties": {
  35509. "id": {
  35510. "type": "string",
  35511. "pattern": "^evt_"
  35512. },
  35513. "type": {
  35514. "type": "string",
  35515. "enum": ["workspace.ready"]
  35516. },
  35517. "properties": {
  35518. "type": "object",
  35519. "properties": {
  35520. "name": {
  35521. "type": "string"
  35522. }
  35523. },
  35524. "required": ["name"],
  35525. "additionalProperties": false
  35526. }
  35527. },
  35528. "required": ["id", "type", "properties"],
  35529. "additionalProperties": false
  35530. },
  35531. "EventWorkspaceFailed": {
  35532. "type": "object",
  35533. "properties": {
  35534. "id": {
  35535. "type": "string",
  35536. "pattern": "^evt_"
  35537. },
  35538. "type": {
  35539. "type": "string",
  35540. "enum": ["workspace.failed"]
  35541. },
  35542. "properties": {
  35543. "type": "object",
  35544. "properties": {
  35545. "message": {
  35546. "type": "string"
  35547. }
  35548. },
  35549. "required": ["message"],
  35550. "additionalProperties": false
  35551. }
  35552. },
  35553. "required": ["id", "type", "properties"],
  35554. "additionalProperties": false
  35555. },
  35556. "EventWorkspaceStatus": {
  35557. "type": "object",
  35558. "properties": {
  35559. "id": {
  35560. "type": "string",
  35561. "pattern": "^evt_"
  35562. },
  35563. "type": {
  35564. "type": "string",
  35565. "enum": ["workspace.status"]
  35566. },
  35567. "properties": {
  35568. "type": "object",
  35569. "properties": {
  35570. "workspaceID": {
  35571. "type": "string",
  35572. "pattern": "^wrk"
  35573. },
  35574. "status": {
  35575. "type": "string",
  35576. "enum": ["connected", "connecting", "disconnected", "error"]
  35577. }
  35578. },
  35579. "required": ["workspaceID", "status"],
  35580. "additionalProperties": false
  35581. }
  35582. },
  35583. "required": ["id", "type", "properties"],
  35584. "additionalProperties": false
  35585. },
  35586. "EventWorktreeReady": {
  35587. "type": "object",
  35588. "properties": {
  35589. "id": {
  35590. "type": "string",
  35591. "pattern": "^evt_"
  35592. },
  35593. "type": {
  35594. "type": "string",
  35595. "enum": ["worktree.ready"]
  35596. },
  35597. "properties": {
  35598. "type": "object",
  35599. "properties": {
  35600. "name": {
  35601. "type": "string"
  35602. },
  35603. "branch": {
  35604. "type": "string"
  35605. }
  35606. },
  35607. "required": ["name"],
  35608. "additionalProperties": false
  35609. }
  35610. },
  35611. "required": ["id", "type", "properties"],
  35612. "additionalProperties": false
  35613. },
  35614. "EventWorktreeFailed": {
  35615. "type": "object",
  35616. "properties": {
  35617. "id": {
  35618. "type": "string",
  35619. "pattern": "^evt_"
  35620. },
  35621. "type": {
  35622. "type": "string",
  35623. "enum": ["worktree.failed"]
  35624. },
  35625. "properties": {
  35626. "type": "object",
  35627. "properties": {
  35628. "message": {
  35629. "type": "string"
  35630. }
  35631. },
  35632. "required": ["message"],
  35633. "additionalProperties": false
  35634. }
  35635. },
  35636. "required": ["id", "type", "properties"],
  35637. "additionalProperties": false
  35638. },
  35639. "EventServerConnected": {
  35640. "type": "object",
  35641. "properties": {
  35642. "id": {
  35643. "type": "string",
  35644. "pattern": "^evt_"
  35645. },
  35646. "type": {
  35647. "type": "string",
  35648. "enum": ["server.connected"]
  35649. },
  35650. "properties": {
  35651. "type": "object",
  35652. "properties": {}
  35653. }
  35654. },
  35655. "required": ["id", "type", "properties"],
  35656. "additionalProperties": false
  35657. },
  35658. "EventGlobalDisposed": {
  35659. "type": "object",
  35660. "properties": {
  35661. "id": {
  35662. "type": "string",
  35663. "pattern": "^evt_"
  35664. },
  35665. "type": {
  35666. "type": "string",
  35667. "enum": ["global.disposed"]
  35668. },
  35669. "properties": {
  35670. "type": "object",
  35671. "properties": {}
  35672. }
  35673. },
  35674. "required": ["id", "type", "properties"],
  35675. "additionalProperties": false
  35676. },
  35677. "BadRequestError": {
  35678. "type": "object",
  35679. "required": ["name", "data"],
  35680. "properties": {
  35681. "name": {
  35682. "type": "string",
  35683. "enum": ["BadRequest"]
  35684. },
  35685. "data": {
  35686. "type": "object",
  35687. "required": ["message"],
  35688. "properties": {
  35689. "message": {
  35690. "type": "string"
  35691. },
  35692. "kind": {
  35693. "type": "string",
  35694. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  35695. }
  35696. }
  35697. }
  35698. }
  35699. }
  35700. }
  35701. },
  35702. "security": [],
  35703. "tags": [
  35704. {
  35705. "name": "control",
  35706. "description": "Control plane routes."
  35707. },
  35708. {
  35709. "name": "controlPlane",
  35710. "description": "Control-plane orchestration routes."
  35711. },
  35712. {
  35713. "name": "global",
  35714. "description": "Global server routes."
  35715. },
  35716. {
  35717. "name": "event",
  35718. "description": "Instance event stream route."
  35719. },
  35720. {
  35721. "name": "config",
  35722. "description": "Experimental HttpApi config routes."
  35723. },
  35724. {
  35725. "name": "experimental",
  35726. "description": "Experimental HttpApi read-only routes."
  35727. },
  35728. {
  35729. "name": "file",
  35730. "description": "Experimental HttpApi file routes."
  35731. },
  35732. {
  35733. "name": "instance",
  35734. "description": "Experimental HttpApi instance read routes."
  35735. },
  35736. {
  35737. "name": "mcp",
  35738. "description": "Experimental HttpApi MCP routes."
  35739. },
  35740. {
  35741. "name": "project",
  35742. "description": "Experimental HttpApi project routes."
  35743. },
  35744. {
  35745. "name": "projectCopy",
  35746. "description": "Project copy naming routes."
  35747. },
  35748. {
  35749. "name": "pty",
  35750. "description": "Experimental HttpApi PTY routes."
  35751. },
  35752. {
  35753. "name": "question",
  35754. "description": "Question routes."
  35755. },
  35756. {
  35757. "name": "permission",
  35758. "description": "Experimental HttpApi permission routes."
  35759. },
  35760. {
  35761. "name": "provider",
  35762. "description": "Experimental HttpApi provider routes."
  35763. },
  35764. {
  35765. "name": "session",
  35766. "description": "Experimental HttpApi session routes."
  35767. },
  35768. {
  35769. "name": "sync",
  35770. "description": "Experimental HttpApi sync routes."
  35771. },
  35772. {
  35773. "name": "tui",
  35774. "description": "Experimental HttpApi TUI routes."
  35775. },
  35776. {
  35777. "name": "workspace",
  35778. "description": "Experimental HttpApi workspace routes."
  35779. },
  35780. {
  35781. "name": "opencode HttpApi",
  35782. "description": "Experimental HttpApi surface for selected instance routes."
  35783. },
  35784. {
  35785. "name": "opencode HttpApi",
  35786. "description": "Experimental HttpApi surface for selected instance routes."
  35787. },
  35788. {
  35789. "name": "opencode HttpApi",
  35790. "description": "Experimental HttpApi surface for selected instance routes."
  35791. },
  35792. {
  35793. "name": "sessions",
  35794. "description": "Experimental session routes."
  35795. },
  35796. {
  35797. "name": "messages",
  35798. "description": "Experimental message routes."
  35799. },
  35800. {
  35801. "name": "models",
  35802. "description": "Experimental model routes."
  35803. },
  35804. {
  35805. "name": "providers",
  35806. "description": "Experimental provider routes."
  35807. },
  35808. {
  35809. "name": "integrations",
  35810. "description": "Integration discovery and authentication routes."
  35811. },
  35812. {
  35813. "name": "opencode HttpApi",
  35814. "description": "Experimental HttpApi surface for selected instance routes."
  35815. },
  35816. {
  35817. "name": "permissions",
  35818. "description": "Experimental permission routes."
  35819. },
  35820. {
  35821. "name": "filesystem",
  35822. "description": "Experimental location-scoped filesystem routes."
  35823. },
  35824. {
  35825. "name": "commands",
  35826. "description": "Experimental command routes."
  35827. },
  35828. {
  35829. "name": "skills",
  35830. "description": "Experimental skill routes."
  35831. },
  35832. {
  35833. "name": "events",
  35834. "description": "Experimental event stream route."
  35835. },
  35836. {
  35837. "name": "pty",
  35838. "description": "Experimental location-scoped PTY routes."
  35839. },
  35840. {
  35841. "name": "session questions",
  35842. "description": "Experimental session question routes."
  35843. },
  35844. {
  35845. "name": "reference",
  35846. "description": "Location-scoped project references."
  35847. },
  35848. {
  35849. "name": "projectCopy",
  35850. "description": "Project copy management routes."
  35851. },
  35852. {
  35853. "name": "pty",
  35854. "description": "PTY websocket route."
  35855. }
  35856. ]
  35857. }