openapi.json 1013 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077280782807928080280812808228083280842808528086280872808828089280902809128092280932809428095280962809728098280992810028101281022810328104281052810628107281082810928110281112811228113281142811528116281172811828119281202812128122281232812428125281262812728128281292813028131281322813328134281352813628137281382813928140281412814228143281442814528146281472814828149281502815128152281532815428155281562815728158281592816028161281622816328164281652816628167281682816928170281712817228173281742817528176281772817828179281802818128182281832818428185281862818728188281892819028191281922819328194281952819628197281982819928200282012820228203282042820528206282072820828209282102821128212282132821428215282162821728218282192822028221282222822328224282252822628227282282822928230282312823228233282342823528236282372823828239282402824128242282432824428245282462824728248282492825028251282522825328254282552825628257282582825928260282612826228263282642826528266282672826828269282702827128272282732827428275282762827728278282792828028281282822828328284282852828628287282882828928290282912829228293282942829528296282972829828299283002830128302283032830428305283062830728308283092831028311283122831328314283152831628317283182831928320283212832228323283242832528326283272832828329283302833128332283332833428335283362833728338283392834028341283422834328344283452834628347283482834928350283512835228353283542835528356283572835828359283602836128362283632836428365283662836728368283692837028371283722837328374283752837628377283782837928380283812838228383283842838528386283872838828389283902839128392283932839428395283962839728398283992840028401284022840328404284052840628407284082840928410284112841228413284142841528416284172841828419284202842128422284232842428425284262842728428284292843028431284322843328434284352843628437284382843928440284412844228443284442844528446284472844828449284502845128452284532845428455284562845728458284592846028461284622846328464284652846628467284682846928470284712847228473284742847528476284772847828479284802848128482284832848428485284862848728488284892849028491284922849328494284952849628497284982849928500285012850228503285042850528506285072850828509285102851128512285132851428515285162851728518285192852028521285222852328524285252852628527285282852928530285312853228533285342853528536285372853828539285402854128542285432854428545285462854728548285492855028551285522855328554285552855628557285582855928560285612856228563285642856528566285672856828569285702857128572285732857428575285762857728578285792858028581285822858328584285852858628587285882858928590285912859228593285942859528596285972859828599286002860128602286032860428605286062860728608286092861028611286122861328614286152861628617286182861928620286212862228623286242862528626286272862828629286302863128632286332863428635286362863728638286392864028641286422864328644286452864628647286482864928650286512865228653286542865528656286572865828659286602866128662286632866428665286662866728668286692867028671286722867328674286752867628677286782867928680286812868228683286842868528686286872868828689286902869128692286932869428695286962869728698286992870028701287022870328704287052870628707287082870928710287112871228713287142871528716287172871828719287202872128722287232872428725287262872728728287292873028731287322873328734287352873628737287382873928740287412874228743287442874528746287472874828749287502875128752287532875428755287562875728758287592876028761287622876328764287652876628767287682876928770287712877228773287742877528776287772877828779287802878128782287832878428785287862878728788287892879028791287922879328794287952879628797287982879928800288012880228803288042880528806288072880828809288102881128812288132881428815288162881728818288192882028821288222882328824288252882628827288282882928830288312883228833288342883528836288372883828839288402884128842288432884428845288462884728848288492885028851288522885328854288552885628857288582885928860288612886228863288642886528866288672886828869288702887128872288732887428875288762887728878288792888028881288822888328884288852888628887288882888928890288912889228893288942889528896288972889828899289002890128902289032890428905289062890728908289092891028911289122891328914289152891628917289182891928920289212892228923289242892528926289272892828929289302893128932289332893428935289362893728938289392894028941289422894328944289452894628947289482894928950289512895228953289542895528956289572895828959289602896128962289632896428965289662896728968289692897028971289722897328974289752897628977289782897928980289812898228983289842898528986289872898828989289902899128992289932899428995289962899728998289992900029001290022900329004290052900629007290082900929010290112901229013290142901529016290172901829019290202902129022290232902429025290262902729028290292903029031290322903329034290352903629037290382903929040290412904229043290442904529046290472904829049290502905129052290532905429055290562905729058290592906029061290622906329064290652906629067290682906929070290712907229073290742907529076290772907829079290802908129082290832908429085290862908729088290892909029091290922909329094290952909629097290982909929100291012910229103291042910529106291072910829109291102911129112291132911429115291162911729118291192912029121291222912329124291252912629127291282912929130291312913229133291342913529136291372913829139291402914129142291432914429145291462914729148291492915029151291522915329154291552915629157291582915929160291612916229163291642916529166291672916829169291702917129172291732917429175291762917729178291792918029181291822918329184291852918629187291882918929190291912919229193291942919529196291972919829199292002920129202292032920429205292062920729208292092921029211292122921329214292152921629217292182921929220292212922229223292242922529226292272922829229292302923129232292332923429235292362923729238292392924029241292422924329244292452924629247292482924929250292512925229253292542925529256292572925829259292602926129262292632926429265292662926729268292692927029271292722927329274292752927629277292782927929280292812928229283292842928529286292872928829289292902929129292292932929429295292962929729298292992930029301293022930329304293052930629307293082930929310293112931229313293142931529316293172931829319293202932129322293232932429325293262932729328293292933029331293322933329334293352933629337293382933929340293412934229343293442934529346293472934829349293502935129352293532935429355293562935729358293592936029361293622936329364293652936629367293682936929370293712937229373293742937529376293772937829379293802938129382293832938429385293862938729388293892939029391293922939329394293952939629397293982939929400294012940229403294042940529406294072940829409294102941129412294132941429415294162941729418294192942029421294222942329424294252942629427294282942929430294312943229433294342943529436294372943829439294402944129442294432944429445294462944729448294492945029451294522945329454294552945629457294582945929460294612946229463294642946529466294672946829469294702947129472294732947429475294762947729478294792948029481294822948329484294852948629487294882948929490294912949229493294942949529496294972949829499295002950129502295032950429505295062950729508295092951029511295122951329514295152951629517295182951929520295212952229523295242952529526295272952829529295302953129532295332953429535295362953729538295392954029541295422954329544295452954629547295482954929550295512955229553295542955529556295572955829559295602956129562295632956429565295662956729568295692957029571295722957329574295752957629577295782957929580295812958229583295842958529586295872958829589295902959129592295932959429595295962959729598295992960029601296022960329604296052960629607296082960929610296112961229613296142961529616296172961829619296202962129622296232962429625296262962729628296292963029631296322963329634296352963629637296382963929640296412964229643296442964529646296472964829649296502965129652296532965429655296562965729658296592966029661296622966329664296652966629667296682966929670296712967229673296742967529676296772967829679296802968129682296832968429685296862968729688296892969029691296922969329694296952969629697296982969929700297012970229703297042970529706297072970829709297102971129712297132971429715297162971729718297192972029721297222972329724297252972629727297282972929730297312973229733297342973529736297372973829739297402974129742297432974429745297462974729748297492975029751297522975329754297552975629757297582975929760297612976229763297642976529766297672976829769297702977129772297732977429775297762977729778297792978029781297822978329784297852978629787297882978929790297912979229793297942979529796297972979829799298002980129802298032980429805298062980729808298092981029811298122981329814298152981629817298182981929820298212982229823298242982529826298272982829829298302983129832298332983429835298362983729838298392984029841298422984329844298452984629847298482984929850298512985229853298542985529856298572985829859298602986129862298632986429865298662986729868298692987029871298722987329874298752987629877298782987929880298812988229883298842988529886298872988829889298902989129892298932989429895298962989729898298992990029901299022990329904299052990629907299082990929910299112991229913299142991529916299172991829919299202992129922299232992429925299262992729928299292993029931299322993329934299352993629937299382993929940299412994229943299442994529946299472994829949299502995129952299532995429955299562995729958299592996029961299622996329964299652996629967299682996929970299712997229973299742997529976299772997829979299802998129982299832998429985299862998729988299892999029991299922999329994299952999629997299982999930000300013000230003300043000530006300073000830009300103001130012300133001430015300163001730018300193002030021300223002330024300253002630027300283002930030300313003230033300343003530036300373003830039300403004130042300433004430045300463004730048300493005030051300523005330054300553005630057300583005930060300613006230063300643006530066300673006830069300703007130072300733007430075300763007730078300793008030081300823008330084300853008630087300883008930090300913009230093300943009530096300973009830099301003010130102301033010430105301063010730108301093011030111301123011330114301153011630117301183011930120301213012230123301243012530126301273012830129301303013130132301333013430135301363013730138301393014030141301423014330144301453014630147301483014930150301513015230153301543015530156301573015830159301603016130162301633016430165301663016730168301693017030171301723017330174301753017630177301783017930180301813018230183301843018530186301873018830189301903019130192301933019430195301963019730198301993020030201302023020330204302053020630207302083020930210302113021230213302143021530216302173021830219302203022130222302233022430225302263022730228302293023030231302323023330234302353023630237302383023930240302413024230243302443024530246302473024830249302503025130252302533025430255302563025730258302593026030261302623026330264302653026630267302683026930270302713027230273302743027530276302773027830279302803028130282302833028430285302863028730288302893029030291302923029330294302953029630297302983029930300303013030230303303043030530306303073030830309303103031130312303133031430315303163031730318303193032030321303223032330324303253032630327303283032930330303313033230333303343033530336303373033830339303403034130342303433034430345303463034730348303493035030351303523035330354303553035630357303583035930360303613036230363303643036530366303673036830369303703037130372303733037430375303763037730378303793038030381303823038330384303853038630387303883038930390303913039230393303943039530396303973039830399304003040130402304033040430405304063040730408304093041030411304123041330414304153041630417304183041930420304213042230423304243042530426304273042830429304303043130432304333043430435304363043730438304393044030441304423044330444304453044630447304483044930450304513045230453304543045530456304573045830459304603046130462304633046430465304663046730468304693047030471304723047330474304753047630477304783047930480304813048230483304843048530486304873048830489304903049130492304933049430495304963049730498304993050030501305023050330504305053050630507305083050930510305113051230513305143051530516305173051830519305203052130522305233052430525305263052730528305293053030531305323053330534305353053630537305383053930540305413054230543305443054530546305473054830549305503055130552305533055430555305563055730558305593056030561305623056330564305653056630567305683056930570305713057230573305743057530576305773057830579305803058130582305833058430585305863058730588305893059030591305923059330594305953059630597305983059930600306013060230603306043060530606306073060830609306103061130612306133061430615306163061730618306193062030621306223062330624306253062630627306283062930630306313063230633306343063530636306373063830639306403064130642306433064430645306463064730648306493065030651306523065330654306553065630657306583065930660306613066230663306643066530666306673066830669306703067130672306733067430675306763067730678306793068030681306823068330684306853068630687306883068930690306913069230693306943069530696306973069830699307003070130702307033070430705307063070730708307093071030711307123071330714307153071630717307183071930720307213072230723307243072530726307273072830729307303073130732307333073430735307363073730738307393074030741307423074330744307453074630747307483074930750307513075230753307543075530756307573075830759307603076130762307633076430765307663076730768307693077030771307723077330774307753077630777307783077930780307813078230783307843078530786307873078830789307903079130792307933079430795307963079730798307993080030801308023080330804308053080630807308083080930810308113081230813308143081530816308173081830819308203082130822308233082430825308263082730828308293083030831308323083330834308353083630837308383083930840308413084230843308443084530846308473084830849308503085130852308533085430855308563085730858308593086030861308623086330864308653086630867308683086930870308713087230873308743087530876308773087830879308803088130882308833088430885308863088730888308893089030891308923089330894308953089630897308983089930900309013090230903309043090530906309073090830909309103091130912309133091430915309163091730918309193092030921309223092330924309253092630927309283092930930309313093230933309343093530936309373093830939309403094130942309433094430945309463094730948309493095030951309523095330954309553095630957309583095930960309613096230963309643096530966309673096830969309703097130972309733097430975309763097730978309793098030981309823098330984309853098630987309883098930990309913099230993309943099530996309973099830999310003100131002310033100431005310063100731008310093101031011310123101331014310153101631017310183101931020310213102231023310243102531026310273102831029310303103131032310333103431035310363103731038310393104031041310423104331044310453104631047310483104931050310513105231053310543105531056310573105831059310603106131062310633106431065310663106731068310693107031071310723107331074310753107631077310783107931080310813108231083310843108531086310873108831089310903109131092310933109431095310963109731098310993110031101311023110331104311053110631107311083110931110311113111231113311143111531116311173111831119311203112131122311233112431125311263112731128311293113031131311323113331134311353113631137311383113931140311413114231143311443114531146311473114831149311503115131152311533115431155311563115731158311593116031161311623116331164311653116631167311683116931170311713117231173311743117531176311773117831179311803118131182311833118431185311863118731188311893119031191311923119331194311953119631197311983119931200312013120231203312043120531206312073120831209312103121131212312133121431215312163121731218312193122031221312223122331224312253122631227312283122931230312313123231233312343123531236312373123831239312403124131242312433124431245312463124731248312493125031251312523125331254312553125631257312583125931260312613126231263312643126531266312673126831269312703127131272312733127431275312763127731278312793128031281312823128331284312853128631287312883128931290312913129231293312943129531296312973129831299313003130131302313033130431305313063130731308313093131031311313123131331314313153131631317313183131931320313213132231323313243132531326313273132831329313303133131332313333133431335313363133731338313393134031341313423134331344313453134631347313483134931350313513135231353313543135531356313573135831359313603136131362313633136431365313663136731368313693137031371313723137331374313753137631377313783137931380313813138231383313843138531386313873138831389313903139131392313933139431395313963139731398313993140031401314023140331404314053140631407314083140931410314113141231413314143141531416314173141831419314203142131422314233142431425314263142731428314293143031431314323143331434314353143631437314383143931440314413144231443314443144531446314473144831449314503145131452314533145431455314563145731458314593146031461314623146331464314653146631467314683146931470314713147231473314743147531476314773147831479314803148131482314833148431485314863148731488314893149031491314923149331494314953149631497314983149931500315013150231503315043150531506315073150831509315103151131512315133151431515315163151731518315193152031521315223152331524315253152631527315283152931530315313153231533315343153531536315373153831539315403154131542315433154431545315463154731548315493155031551315523155331554315553155631557315583155931560315613156231563315643156531566315673156831569315703157131572315733157431575315763157731578315793158031581315823158331584315853158631587315883158931590315913159231593315943159531596315973159831599316003160131602316033160431605316063160731608316093161031611316123161331614316153161631617316183161931620316213162231623316243162531626316273162831629316303163131632316333163431635316363163731638316393164031641316423164331644316453164631647316483164931650316513165231653316543165531656316573165831659316603166131662316633166431665316663166731668316693167031671316723167331674316753167631677316783167931680316813168231683316843168531686316873168831689316903169131692316933169431695316963169731698316993170031701317023170331704317053170631707317083170931710317113171231713317143171531716317173171831719317203172131722317233172431725317263172731728317293173031731317323173331734317353173631737317383173931740317413174231743317443174531746317473174831749317503175131752317533175431755317563175731758317593176031761317623176331764317653176631767317683176931770317713177231773317743177531776317773177831779317803178131782317833178431785317863178731788317893179031791317923179331794317953179631797317983179931800318013180231803318043180531806318073180831809318103181131812318133181431815318163181731818318193182031821318223182331824318253182631827318283182931830318313183231833318343183531836318373183831839318403184131842318433184431845318463184731848318493185031851318523185331854318553185631857318583185931860318613186231863318643186531866318673186831869318703187131872318733187431875318763187731878318793188031881318823188331884318853188631887318883188931890318913189231893318943189531896318973189831899319003190131902319033190431905319063190731908319093191031911319123191331914319153191631917319183191931920319213192231923319243192531926319273192831929319303193131932319333193431935319363193731938319393194031941319423194331944319453194631947319483194931950319513195231953319543195531956319573195831959319603196131962319633196431965319663196731968319693197031971319723197331974319753197631977319783197931980319813198231983319843198531986319873198831989319903199131992319933199431995319963199731998319993200032001320023200332004320053200632007320083200932010320113201232013320143201532016320173201832019320203202132022320233202432025320263202732028320293203032031320323203332034320353203632037320383203932040320413204232043320443204532046320473204832049320503205132052320533205432055320563205732058320593206032061320623206332064320653206632067320683206932070320713207232073320743207532076320773207832079320803208132082320833208432085320863208732088320893209032091320923209332094320953209632097320983209932100321013210232103321043210532106321073210832109321103211132112321133211432115321163211732118321193212032121321223212332124321253212632127321283212932130321313213232133321343213532136321373213832139321403214132142321433214432145321463214732148321493215032151321523215332154321553215632157321583215932160321613216232163321643216532166321673216832169321703217132172321733217432175321763217732178321793218032181321823218332184321853218632187321883218932190321913219232193321943219532196321973219832199322003220132202322033220432205322063220732208322093221032211322123221332214322153221632217322183221932220322213222232223322243222532226322273222832229322303223132232322333223432235322363223732238322393224032241322423224332244322453224632247322483224932250322513225232253322543225532256322573225832259322603226132262322633226432265322663226732268322693227032271322723227332274322753227632277322783227932280322813228232283322843228532286322873228832289322903229132292322933229432295322963229732298322993230032301323023230332304323053230632307323083230932310323113231232313323143231532316323173231832319323203232132322323233232432325323263232732328323293233032331323323233332334323353233632337323383233932340323413234232343323443234532346323473234832349323503235132352323533235432355323563235732358323593236032361323623236332364323653236632367323683236932370323713237232373323743237532376323773237832379323803238132382323833238432385323863238732388323893239032391323923239332394323953239632397323983239932400324013240232403324043240532406324073240832409324103241132412324133241432415324163241732418324193242032421324223242332424324253242632427324283242932430324313243232433324343243532436324373243832439324403244132442324433244432445324463244732448324493245032451324523245332454324553245632457324583245932460324613246232463324643246532466324673246832469324703247132472324733247432475324763247732478324793248032481324823248332484324853248632487324883248932490324913249232493324943249532496324973249832499325003250132502325033250432505325063250732508325093251032511325123251332514325153251632517325183251932520325213252232523325243252532526325273252832529325303253132532325333253432535325363253732538325393254032541325423254332544325453254632547325483254932550325513255232553325543255532556325573255832559325603256132562325633256432565325663256732568325693257032571325723257332574325753257632577325783257932580325813258232583325843258532586325873258832589325903259132592325933259432595325963259732598325993260032601326023260332604326053260632607326083260932610326113261232613326143261532616326173261832619326203262132622326233262432625326263262732628326293263032631326323263332634326353263632637326383263932640326413264232643326443264532646326473264832649326503265132652326533265432655326563265732658326593266032661326623266332664326653266632667326683266932670326713267232673326743267532676326773267832679326803268132682326833268432685326863268732688326893269032691326923269332694326953269632697326983269932700327013270232703327043270532706327073270832709327103271132712327133271432715327163271732718327193272032721327223272332724327253272632727327283272932730327313273232733327343273532736327373273832739327403274132742327433274432745327463274732748327493275032751327523275332754327553275632757327583275932760327613276232763327643276532766327673276832769327703277132772327733277432775327763277732778327793278032781327823278332784327853278632787327883278932790327913279232793327943279532796327973279832799328003280132802328033280432805328063280732808328093281032811328123281332814328153281632817328183281932820328213282232823328243282532826328273282832829328303283132832328333283432835328363283732838328393284032841328423284332844328453284632847328483284932850328513285232853328543285532856328573285832859328603286132862328633286432865328663286732868328693287032871328723287332874328753287632877328783287932880328813288232883328843288532886328873288832889328903289132892328933289432895328963289732898328993290032901329023290332904329053290632907329083290932910329113291232913329143291532916329173291832919329203292132922329233292432925329263292732928329293293032931329323293332934329353293632937329383293932940329413294232943329443294532946329473294832949329503295132952329533295432955329563295732958329593296032961329623296332964329653296632967329683296932970329713297232973329743297532976329773297832979329803298132982329833298432985329863298732988329893299032991329923299332994329953299632997329983299933000330013300233003330043300533006330073300833009330103301133012330133301433015330163301733018330193302033021330223302333024330253302633027330283302933030330313303233033330343303533036330373303833039330403304133042330433304433045330463304733048330493305033051330523305333054330553305633057330583305933060330613306233063330643306533066330673306833069330703307133072330733307433075330763307733078330793308033081330823308333084330853308633087330883308933090330913309233093330943309533096330973309833099331003310133102331033310433105331063310733108331093311033111331123311333114331153311633117331183311933120331213312233123331243312533126331273312833129331303313133132331333313433135331363313733138331393314033141331423314333144331453314633147331483314933150331513315233153331543315533156331573315833159331603316133162331633316433165331663316733168331693317033171331723317333174331753317633177331783317933180331813318233183331843318533186331873318833189331903319133192331933319433195331963319733198331993320033201332023320333204332053320633207332083320933210332113321233213332143321533216332173321833219332203322133222332233322433225332263322733228332293323033231332323323333234332353323633237332383323933240332413324233243332443324533246332473324833249332503325133252332533325433255332563325733258332593326033261332623326333264332653326633267332683326933270332713327233273332743327533276332773327833279332803328133282332833328433285332863328733288332893329033291332923329333294332953329633297332983329933300333013330233303333043330533306333073330833309333103331133312333133331433315333163331733318333193332033321333223332333324333253332633327333283332933330333313333233333333343333533336333373333833339333403334133342333433334433345333463334733348333493335033351333523335333354333553335633357333583335933360333613336233363333643336533366333673336833369333703337133372333733337433375333763337733378333793338033381333823338333384333853338633387333883338933390333913339233393333943339533396333973339833399334003340133402334033340433405334063340733408334093341033411334123341333414334153341633417334183341933420334213342233423334243342533426334273342833429334303343133432334333343433435334363343733438334393344033441334423344333444334453344633447334483344933450334513345233453334543345533456334573345833459334603346133462334633346433465334663346733468334693347033471334723347333474334753347633477334783347933480334813348233483334843348533486334873348833489334903349133492334933349433495334963349733498334993350033501335023350333504335053350633507335083350933510335113351233513335143351533516335173351833519335203352133522335233352433525335263352733528335293353033531335323353333534335353353633537335383353933540335413354233543335443354533546335473354833549335503355133552335533355433555335563355733558335593356033561335623356333564335653356633567335683356933570335713357233573335743357533576335773357833579335803358133582335833358433585335863358733588335893359033591335923359333594335953359633597335983359933600336013360233603336043360533606336073360833609336103361133612336133361433615336163361733618336193362033621336223362333624336253362633627336283362933630336313363233633336343363533636336373363833639336403364133642336433364433645336463364733648336493365033651336523365333654336553365633657336583365933660336613366233663336643366533666336673366833669336703367133672336733367433675336763367733678336793368033681336823368333684336853368633687336883368933690336913369233693336943369533696336973369833699337003370133702337033370433705337063370733708337093371033711337123371333714337153371633717337183371933720337213372233723337243372533726337273372833729337303373133732337333373433735337363373733738337393374033741337423374333744337453374633747337483374933750337513375233753337543375533756337573375833759337603376133762337633376433765337663376733768337693377033771337723377333774337753377633777337783377933780337813378233783337843378533786337873378833789337903379133792337933379433795337963379733798337993380033801338023380333804338053380633807338083380933810338113381233813338143381533816338173381833819338203382133822338233382433825338263382733828338293383033831338323383333834338353383633837338383383933840338413384233843338443384533846338473384833849338503385133852338533385433855338563385733858338593386033861338623386333864338653386633867338683386933870338713387233873338743387533876338773387833879338803388133882338833388433885338863388733888338893389033891338923389333894338953389633897338983389933900339013390233903339043390533906339073390833909339103391133912339133391433915339163391733918339193392033921339223392333924339253392633927339283392933930339313393233933339343393533936339373393833939339403394133942339433394433945339463394733948339493395033951339523395333954339553395633957339583395933960339613396233963339643396533966339673396833969339703397133972339733397433975339763397733978339793398033981339823398333984339853398633987339883398933990339913399233993339943399533996339973399833999340003400134002340033400434005340063400734008340093401034011340123401334014340153401634017340183401934020340213402234023340243402534026340273402834029340303403134032340333403434035340363403734038340393404034041340423404334044340453404634047340483404934050340513405234053340543405534056340573405834059340603406134062340633406434065340663406734068340693407034071340723407334074340753407634077340783407934080340813408234083340843408534086340873408834089340903409134092340933409434095340963409734098340993410034101341023410334104341053410634107341083410934110341113411234113341143411534116341173411834119341203412134122341233412434125341263412734128341293413034131341323413334134341353413634137341383413934140341413414234143341443414534146341473414834149341503415134152341533415434155341563415734158341593416034161341623416334164341653416634167341683416934170341713417234173341743417534176341773417834179341803418134182341833418434185341863418734188341893419034191341923419334194341953419634197341983419934200342013420234203342043420534206342073420834209342103421134212342133421434215342163421734218342193422034221342223422334224342253422634227342283422934230342313423234233342343423534236342373423834239342403424134242342433424434245342463424734248342493425034251342523425334254342553425634257342583425934260342613426234263342643426534266342673426834269342703427134272342733427434275342763427734278342793428034281342823428334284342853428634287342883428934290342913429234293342943429534296342973429834299343003430134302343033430434305343063430734308343093431034311343123431334314343153431634317343183431934320343213432234323343243432534326343273432834329343303433134332343333433434335343363433734338343393434034341343423434334344343453434634347343483434934350343513435234353343543435534356343573435834359343603436134362343633436434365343663436734368343693437034371343723437334374343753437634377343783437934380343813438234383343843438534386343873438834389343903439134392343933439434395343963439734398343993440034401344023440334404344053440634407344083440934410344113441234413344143441534416344173441834419344203442134422344233442434425344263442734428344293443034431344323443334434344353443634437344383443934440344413444234443344443444534446344473444834449344503445134452344533445434455344563445734458344593446034461344623446334464344653446634467344683446934470344713447234473344743447534476344773447834479344803448134482344833448434485344863448734488344893449034491344923449334494344953449634497344983449934500345013450234503345043450534506345073450834509345103451134512345133451434515345163451734518345193452034521345223452334524345253452634527345283452934530345313453234533345343453534536345373453834539345403454134542345433454434545345463454734548345493455034551345523455334554345553455634557345583455934560345613456234563345643456534566345673456834569345703457134572345733457434575345763457734578345793458034581345823458334584345853458634587345883458934590345913459234593345943459534596345973459834599346003460134602346033460434605346063460734608346093461034611346123461334614346153461634617346183461934620346213462234623346243462534626346273462834629346303463134632346333463434635346363463734638346393464034641346423464334644346453464634647346483464934650346513465234653346543465534656346573465834659346603466134662346633466434665346663466734668346693467034671346723467334674346753467634677346783467934680346813468234683346843468534686346873468834689346903469134692346933469434695346963469734698346993470034701347023470334704347053470634707347083470934710347113471234713347143471534716347173471834719347203472134722347233472434725347263472734728347293473034731347323473334734347353473634737347383473934740347413474234743347443474534746347473474834749347503475134752347533475434755347563475734758347593476034761347623476334764347653476634767347683476934770347713477234773347743477534776347773477834779347803478134782347833478434785347863478734788347893479034791347923479334794347953479634797347983479934800348013480234803348043480534806348073480834809348103481134812348133481434815348163481734818348193482034821348223482334824348253482634827348283482934830348313483234833348343483534836348373483834839348403484134842348433484434845348463484734848348493485034851348523485334854348553485634857348583485934860348613486234863348643486534866348673486834869348703487134872348733487434875348763487734878348793488034881348823488334884348853488634887348883488934890348913489234893348943489534896348973489834899349003490134902349033490434905349063490734908349093491034911349123491334914349153491634917349183491934920349213492234923349243492534926349273492834929349303493134932349333493434935349363493734938349393494034941349423494334944349453494634947349483494934950349513495234953349543495534956349573495834959349603496134962349633496434965349663496734968349693497034971349723497334974349753497634977349783497934980349813498234983349843498534986349873498834989349903499134992349933499434995349963499734998349993500035001350023500335004350053500635007350083500935010350113501235013350143501535016350173501835019350203502135022350233502435025350263502735028350293503035031350323503335034350353503635037350383503935040350413504235043350443504535046350473504835049350503505135052350533505435055350563505735058350593506035061350623506335064350653506635067350683506935070350713507235073350743507535076350773507835079350803508135082350833508435085350863508735088350893509035091350923509335094350953509635097350983509935100351013510235103351043510535106351073510835109351103511135112351133511435115351163511735118351193512035121351223512335124351253512635127351283512935130351313513235133351343513535136351373513835139351403514135142351433514435145351463514735148351493515035151351523515335154351553515635157351583515935160351613516235163351643516535166351673516835169351703517135172351733517435175351763517735178351793518035181351823518335184351853518635187351883518935190351913519235193351943519535196351973519835199352003520135202352033520435205352063520735208352093521035211352123521335214352153521635217352183521935220352213522235223352243522535226352273522835229352303523135232352333523435235352363523735238352393524035241352423524335244352453524635247352483524935250352513525235253352543525535256352573525835259352603526135262352633526435265352663526735268352693527035271352723527335274352753527635277352783527935280352813528235283352843528535286352873528835289352903529135292352933529435295352963529735298352993530035301353023530335304353053530635307353083530935310353113531235313353143531535316353173531835319353203532135322353233532435325353263532735328353293533035331353323533335334353353533635337353383533935340353413534235343353443534535346353473534835349353503535135352353533535435355353563535735358353593536035361353623536335364353653536635367353683536935370353713537235373353743537535376353773537835379353803538135382353833538435385353863538735388353893539035391353923539335394353953539635397353983539935400354013540235403354043540535406354073540835409354103541135412354133541435415354163541735418354193542035421354223542335424354253542635427354283542935430354313543235433354343543535436354373543835439354403544135442354433544435445354463544735448354493545035451354523545335454354553545635457354583545935460354613546235463354643546535466354673546835469354703547135472354733547435475354763547735478354793548035481354823548335484354853548635487354883548935490354913549235493354943549535496354973549835499355003550135502355033550435505355063550735508355093551035511355123551335514355153551635517355183551935520355213552235523355243552535526355273552835529355303553135532355333553435535355363553735538355393554035541355423554335544355453554635547355483554935550355513555235553355543555535556355573555835559355603556135562355633556435565355663556735568355693557035571355723557335574355753557635577355783557935580355813558235583355843558535586355873558835589355903559135592355933559435595355963559735598355993560035601356023560335604356053560635607356083560935610356113561235613356143561535616356173561835619356203562135622356233562435625356263562735628356293563035631356323563335634356353563635637356383563935640356413564235643356443564535646356473564835649356503565135652356533565435655356563565735658356593566035661356623566335664356653566635667356683566935670356713567235673356743567535676356773567835679356803568135682356833568435685356863568735688356893569035691356923569335694356953569635697356983569935700357013570235703357043570535706357073570835709357103571135712357133571435715357163571735718357193572035721357223572335724357253572635727357283572935730357313573235733357343573535736357373573835739357403574135742357433574435745357463574735748357493575035751357523575335754357553575635757357583575935760357613576235763357643576535766357673576835769357703577135772357733577435775357763577735778357793578035781357823578335784357853578635787357883578935790357913579235793357943579535796357973579835799358003580135802358033580435805358063580735808358093581035811358123581335814358153581635817358183581935820358213582235823358243582535826358273582835829358303583135832358333583435835358363583735838358393584035841358423584335844358453584635847358483584935850358513585235853358543585535856358573585835859358603586135862358633586435865358663586735868358693587035871358723587335874358753587635877358783587935880358813588235883
  1. {
  2. "openapi": "3.1.0",
  3. "info": {
  4. "title": "opencode",
  5. "version": "1.0.0",
  6. "description": "opencode api"
  7. },
  8. "paths": {
  9. "/auth/{providerID}": {
  10. "put": {
  11. "tags": ["control"],
  12. "operationId": "auth.set",
  13. "parameters": [
  14. {
  15. "name": "providerID",
  16. "in": "path",
  17. "schema": {
  18. "type": "string"
  19. },
  20. "required": true
  21. }
  22. ],
  23. "responses": {
  24. "200": {
  25. "description": "Successfully set authentication credentials",
  26. "content": {
  27. "application/json": {
  28. "schema": {
  29. "type": "boolean",
  30. "description": "Successfully set authentication credentials"
  31. }
  32. }
  33. }
  34. },
  35. "400": {
  36. "description": "BadRequest | InvalidRequestError",
  37. "content": {
  38. "application/json": {
  39. "schema": {
  40. "anyOf": [
  41. {
  42. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  43. },
  44. {
  45. "$ref": "#/components/schemas/InvalidRequestError"
  46. }
  47. ]
  48. }
  49. }
  50. }
  51. }
  52. },
  53. "description": "Set authentication credentials",
  54. "summary": "Set auth credentials",
  55. "requestBody": {
  56. "content": {
  57. "application/json": {
  58. "schema": {
  59. "$ref": "#/components/schemas/Auth"
  60. }
  61. }
  62. }
  63. },
  64. "x-codeSamples": [
  65. {
  66. "lang": "js",
  67. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.set({\n ...\n})"
  68. }
  69. ]
  70. },
  71. "delete": {
  72. "tags": ["control"],
  73. "operationId": "auth.remove",
  74. "parameters": [
  75. {
  76. "name": "providerID",
  77. "in": "path",
  78. "schema": {
  79. "type": "string"
  80. },
  81. "required": true
  82. }
  83. ],
  84. "responses": {
  85. "200": {
  86. "description": "Successfully removed authentication credentials",
  87. "content": {
  88. "application/json": {
  89. "schema": {
  90. "type": "boolean",
  91. "description": "Successfully removed authentication credentials"
  92. }
  93. }
  94. }
  95. },
  96. "400": {
  97. "description": "BadRequest | InvalidRequestError",
  98. "content": {
  99. "application/json": {
  100. "schema": {
  101. "anyOf": [
  102. {
  103. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  104. },
  105. {
  106. "$ref": "#/components/schemas/InvalidRequestError"
  107. }
  108. ]
  109. }
  110. }
  111. }
  112. }
  113. },
  114. "description": "Remove authentication credentials",
  115. "summary": "Remove auth credentials",
  116. "x-codeSamples": [
  117. {
  118. "lang": "js",
  119. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.remove({\n ...\n})"
  120. }
  121. ]
  122. }
  123. },
  124. "/log": {
  125. "post": {
  126. "tags": ["control"],
  127. "operationId": "app.log",
  128. "parameters": [
  129. {
  130. "name": "directory",
  131. "in": "query",
  132. "schema": {
  133. "type": "string"
  134. },
  135. "required": false
  136. },
  137. {
  138. "name": "workspace",
  139. "in": "query",
  140. "schema": {
  141. "type": "string"
  142. },
  143. "required": false
  144. }
  145. ],
  146. "responses": {
  147. "200": {
  148. "description": "Log entry written successfully",
  149. "content": {
  150. "application/json": {
  151. "schema": {
  152. "type": "boolean",
  153. "description": "Log entry written successfully"
  154. }
  155. }
  156. }
  157. },
  158. "400": {
  159. "description": "BadRequest | InvalidRequestError",
  160. "content": {
  161. "application/json": {
  162. "schema": {
  163. "anyOf": [
  164. {
  165. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  166. },
  167. {
  168. "$ref": "#/components/schemas/InvalidRequestError"
  169. }
  170. ]
  171. }
  172. }
  173. }
  174. }
  175. },
  176. "description": "Write a log entry to the server logs with specified level and metadata.",
  177. "summary": "Write log",
  178. "requestBody": {
  179. "content": {
  180. "application/json": {
  181. "schema": {
  182. "type": "object",
  183. "properties": {
  184. "service": {
  185. "type": "string",
  186. "description": "Service name for the log entry"
  187. },
  188. "level": {
  189. "type": "string",
  190. "enum": ["debug", "info", "error", "warn"],
  191. "description": "Log level"
  192. },
  193. "message": {
  194. "type": "string",
  195. "description": "Log message"
  196. },
  197. "extra": {
  198. "type": "object"
  199. }
  200. },
  201. "required": ["service", "level", "message"],
  202. "additionalProperties": false
  203. }
  204. }
  205. }
  206. },
  207. "x-codeSamples": [
  208. {
  209. "lang": "js",
  210. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.log({\n ...\n})"
  211. }
  212. ]
  213. }
  214. },
  215. "/experimental/control-plane/move-session": {
  216. "post": {
  217. "tags": ["controlPlane"],
  218. "operationId": "experimental.controlPlane.moveSession",
  219. "parameters": [],
  220. "responses": {
  221. "204": {
  222. "description": "Session moved"
  223. },
  224. "400": {
  225. "description": "MoveSessionError | InvalidRequestError",
  226. "content": {
  227. "application/json": {
  228. "schema": {
  229. "anyOf": [
  230. {
  231. "$ref": "#/components/schemas/MoveSessionError"
  232. },
  233. {
  234. "$ref": "#/components/schemas/InvalidRequestError"
  235. }
  236. ]
  237. }
  238. }
  239. }
  240. }
  241. },
  242. "description": "Move a session to another project directory, optionally transferring local changes.",
  243. "summary": "Move session",
  244. "requestBody": {
  245. "content": {
  246. "application/json": {
  247. "schema": {
  248. "type": "object",
  249. "properties": {
  250. "sessionID": {
  251. "type": "string",
  252. "pattern": "^ses"
  253. },
  254. "destination": {
  255. "$ref": "#/components/schemas/MoveSessionDestination"
  256. },
  257. "moveChanges": {
  258. "type": "boolean"
  259. }
  260. },
  261. "required": ["sessionID", "destination"],
  262. "additionalProperties": false
  263. }
  264. }
  265. }
  266. },
  267. "x-codeSamples": [
  268. {
  269. "lang": "js",
  270. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.controlPlane.moveSession({\n ...\n})"
  271. }
  272. ]
  273. }
  274. },
  275. "/global/health": {
  276. "get": {
  277. "tags": ["global"],
  278. "operationId": "global.health",
  279. "parameters": [],
  280. "responses": {
  281. "200": {
  282. "description": "Health information",
  283. "content": {
  284. "application/json": {
  285. "schema": {
  286. "type": "object",
  287. "properties": {
  288. "healthy": {
  289. "type": "boolean",
  290. "enum": [true]
  291. },
  292. "version": {
  293. "type": "string"
  294. }
  295. },
  296. "required": ["healthy", "version"],
  297. "additionalProperties": false,
  298. "description": "Health information"
  299. }
  300. }
  301. }
  302. },
  303. "400": {
  304. "description": "Bad request",
  305. "content": {
  306. "application/json": {
  307. "schema": {
  308. "$ref": "#/components/schemas/BadRequestError"
  309. }
  310. }
  311. }
  312. }
  313. },
  314. "description": "Get health information about the OpenCode server.",
  315. "summary": "Get health",
  316. "x-codeSamples": [
  317. {
  318. "lang": "js",
  319. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.health({\n ...\n})"
  320. }
  321. ]
  322. }
  323. },
  324. "/global/event": {
  325. "get": {
  326. "tags": ["global"],
  327. "operationId": "global.event",
  328. "parameters": [],
  329. "responses": {
  330. "200": {
  331. "description": "Event stream",
  332. "content": {
  333. "text/event-stream": {
  334. "schema": {
  335. "$ref": "#/components/schemas/GlobalEvent"
  336. }
  337. }
  338. }
  339. },
  340. "400": {
  341. "description": "Bad request",
  342. "content": {
  343. "application/json": {
  344. "schema": {
  345. "$ref": "#/components/schemas/BadRequestError"
  346. }
  347. }
  348. }
  349. }
  350. },
  351. "description": "Subscribe to global events from the OpenCode system using server-sent events.",
  352. "summary": "Get global events",
  353. "x-codeSamples": [
  354. {
  355. "lang": "js",
  356. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.event({\n ...\n})"
  357. }
  358. ]
  359. }
  360. },
  361. "/global/config": {
  362. "get": {
  363. "tags": ["global"],
  364. "operationId": "global.config.get",
  365. "parameters": [],
  366. "responses": {
  367. "200": {
  368. "description": "Get global config info",
  369. "content": {
  370. "application/json": {
  371. "schema": {
  372. "$ref": "#/components/schemas/Config"
  373. }
  374. }
  375. }
  376. },
  377. "400": {
  378. "description": "Bad request",
  379. "content": {
  380. "application/json": {
  381. "schema": {
  382. "$ref": "#/components/schemas/BadRequestError"
  383. }
  384. }
  385. }
  386. }
  387. },
  388. "description": "Retrieve the current global OpenCode configuration settings and preferences.",
  389. "summary": "Get global configuration",
  390. "x-codeSamples": [
  391. {
  392. "lang": "js",
  393. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.get({\n ...\n})"
  394. }
  395. ]
  396. },
  397. "patch": {
  398. "tags": ["global"],
  399. "operationId": "global.config.update",
  400. "parameters": [],
  401. "responses": {
  402. "200": {
  403. "description": "Successfully updated global config",
  404. "content": {
  405. "application/json": {
  406. "schema": {
  407. "$ref": "#/components/schemas/Config"
  408. }
  409. }
  410. }
  411. },
  412. "400": {
  413. "description": "BadRequest | InvalidRequestError",
  414. "content": {
  415. "application/json": {
  416. "schema": {
  417. "anyOf": [
  418. {
  419. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  420. },
  421. {
  422. "$ref": "#/components/schemas/InvalidRequestError"
  423. }
  424. ]
  425. }
  426. }
  427. }
  428. }
  429. },
  430. "description": "Update global OpenCode configuration settings and preferences.",
  431. "summary": "Update global configuration",
  432. "requestBody": {
  433. "content": {
  434. "application/json": {
  435. "schema": {
  436. "$ref": "#/components/schemas/Config"
  437. }
  438. }
  439. }
  440. },
  441. "x-codeSamples": [
  442. {
  443. "lang": "js",
  444. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.update({\n ...\n})"
  445. }
  446. ]
  447. }
  448. },
  449. "/global/dispose": {
  450. "post": {
  451. "tags": ["global"],
  452. "operationId": "global.dispose",
  453. "parameters": [],
  454. "responses": {
  455. "200": {
  456. "description": "Global disposed",
  457. "content": {
  458. "application/json": {
  459. "schema": {
  460. "type": "boolean",
  461. "description": "Global disposed"
  462. }
  463. }
  464. }
  465. },
  466. "400": {
  467. "description": "Bad request",
  468. "content": {
  469. "application/json": {
  470. "schema": {
  471. "$ref": "#/components/schemas/BadRequestError"
  472. }
  473. }
  474. }
  475. }
  476. },
  477. "description": "Clean up and dispose all OpenCode instances, releasing all resources.",
  478. "summary": "Dispose instance",
  479. "x-codeSamples": [
  480. {
  481. "lang": "js",
  482. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.dispose({\n ...\n})"
  483. }
  484. ]
  485. }
  486. },
  487. "/global/upgrade": {
  488. "post": {
  489. "tags": ["global"],
  490. "operationId": "global.upgrade",
  491. "parameters": [],
  492. "responses": {
  493. "200": {
  494. "description": "Upgrade result",
  495. "content": {
  496. "application/json": {
  497. "schema": {
  498. "anyOf": [
  499. {
  500. "type": "object",
  501. "properties": {
  502. "success": {
  503. "type": "boolean",
  504. "enum": [true]
  505. },
  506. "version": {
  507. "type": "string"
  508. }
  509. },
  510. "required": ["success", "version"],
  511. "additionalProperties": false
  512. },
  513. {
  514. "type": "object",
  515. "properties": {
  516. "success": {
  517. "type": "boolean",
  518. "enum": [false]
  519. },
  520. "error": {
  521. "type": "string"
  522. }
  523. },
  524. "required": ["success", "error"],
  525. "additionalProperties": false
  526. }
  527. ],
  528. "description": "Upgrade result"
  529. }
  530. }
  531. }
  532. },
  533. "400": {
  534. "description": "BadRequest | InvalidRequestError",
  535. "content": {
  536. "application/json": {
  537. "schema": {
  538. "anyOf": [
  539. {
  540. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  541. },
  542. {
  543. "$ref": "#/components/schemas/InvalidRequestError"
  544. }
  545. ]
  546. }
  547. }
  548. }
  549. }
  550. },
  551. "description": "Upgrade opencode to the specified version or latest if not specified.",
  552. "summary": "Upgrade opencode",
  553. "requestBody": {
  554. "content": {
  555. "application/json": {
  556. "schema": {
  557. "type": "object",
  558. "properties": {
  559. "target": {
  560. "type": "string"
  561. }
  562. },
  563. "additionalProperties": false
  564. }
  565. }
  566. }
  567. },
  568. "x-codeSamples": [
  569. {
  570. "lang": "js",
  571. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.upgrade({\n ...\n})"
  572. }
  573. ]
  574. }
  575. },
  576. "/event": {
  577. "get": {
  578. "tags": ["event"],
  579. "operationId": "event.subscribe",
  580. "parameters": [
  581. {
  582. "name": "directory",
  583. "in": "query",
  584. "schema": {
  585. "type": "string"
  586. },
  587. "required": false
  588. },
  589. {
  590. "name": "workspace",
  591. "in": "query",
  592. "schema": {
  593. "type": "string"
  594. },
  595. "required": false
  596. }
  597. ],
  598. "responses": {
  599. "200": {
  600. "description": "Event stream",
  601. "content": {
  602. "text/event-stream": {
  603. "schema": {
  604. "$ref": "#/components/schemas/Event"
  605. }
  606. }
  607. }
  608. }
  609. },
  610. "description": "Get events",
  611. "summary": "Subscribe to events",
  612. "x-codeSamples": [
  613. {
  614. "lang": "js",
  615. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.event.subscribe({\n ...\n})"
  616. }
  617. ]
  618. }
  619. },
  620. "/config": {
  621. "get": {
  622. "tags": ["config"],
  623. "operationId": "config.get",
  624. "parameters": [
  625. {
  626. "name": "directory",
  627. "in": "query",
  628. "schema": {
  629. "type": "string"
  630. },
  631. "required": false
  632. },
  633. {
  634. "name": "workspace",
  635. "in": "query",
  636. "schema": {
  637. "type": "string"
  638. },
  639. "required": false
  640. }
  641. ],
  642. "responses": {
  643. "200": {
  644. "description": "Get config info",
  645. "content": {
  646. "application/json": {
  647. "schema": {
  648. "$ref": "#/components/schemas/Config"
  649. }
  650. }
  651. }
  652. },
  653. "400": {
  654. "description": "Bad request",
  655. "content": {
  656. "application/json": {
  657. "schema": {
  658. "$ref": "#/components/schemas/BadRequestError"
  659. }
  660. }
  661. }
  662. }
  663. },
  664. "description": "Retrieve the current OpenCode configuration settings and preferences.",
  665. "summary": "Get configuration",
  666. "x-codeSamples": [
  667. {
  668. "lang": "js",
  669. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.get({\n ...\n})"
  670. }
  671. ]
  672. },
  673. "patch": {
  674. "tags": ["config"],
  675. "operationId": "config.update",
  676. "parameters": [
  677. {
  678. "name": "directory",
  679. "in": "query",
  680. "schema": {
  681. "type": "string"
  682. },
  683. "required": false
  684. },
  685. {
  686. "name": "workspace",
  687. "in": "query",
  688. "schema": {
  689. "type": "string"
  690. },
  691. "required": false
  692. }
  693. ],
  694. "responses": {
  695. "200": {
  696. "description": "Successfully updated config",
  697. "content": {
  698. "application/json": {
  699. "schema": {
  700. "$ref": "#/components/schemas/Config"
  701. }
  702. }
  703. }
  704. },
  705. "400": {
  706. "description": "BadRequest | InvalidRequestError",
  707. "content": {
  708. "application/json": {
  709. "schema": {
  710. "anyOf": [
  711. {
  712. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  713. },
  714. {
  715. "$ref": "#/components/schemas/InvalidRequestError"
  716. }
  717. ]
  718. }
  719. }
  720. }
  721. }
  722. },
  723. "description": "Update OpenCode configuration settings and preferences.",
  724. "summary": "Update configuration",
  725. "requestBody": {
  726. "content": {
  727. "application/json": {
  728. "schema": {
  729. "$ref": "#/components/schemas/Config"
  730. }
  731. }
  732. }
  733. },
  734. "x-codeSamples": [
  735. {
  736. "lang": "js",
  737. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.update({\n ...\n})"
  738. }
  739. ]
  740. }
  741. },
  742. "/config/providers": {
  743. "get": {
  744. "tags": ["config"],
  745. "operationId": "config.providers",
  746. "parameters": [
  747. {
  748. "name": "directory",
  749. "in": "query",
  750. "schema": {
  751. "type": "string"
  752. },
  753. "required": false
  754. },
  755. {
  756. "name": "workspace",
  757. "in": "query",
  758. "schema": {
  759. "type": "string"
  760. },
  761. "required": false
  762. }
  763. ],
  764. "responses": {
  765. "200": {
  766. "description": "List of providers",
  767. "content": {
  768. "application/json": {
  769. "schema": {
  770. "type": "object",
  771. "properties": {
  772. "providers": {
  773. "type": "array",
  774. "items": {
  775. "$ref": "#/components/schemas/Provider"
  776. }
  777. },
  778. "default": {
  779. "type": "object",
  780. "additionalProperties": {
  781. "type": "string"
  782. }
  783. }
  784. },
  785. "required": ["providers", "default"],
  786. "additionalProperties": false,
  787. "description": "List of providers"
  788. }
  789. }
  790. }
  791. },
  792. "400": {
  793. "description": "Bad request",
  794. "content": {
  795. "application/json": {
  796. "schema": {
  797. "$ref": "#/components/schemas/BadRequestError"
  798. }
  799. }
  800. }
  801. }
  802. },
  803. "description": "Get a list of all configured AI providers and their default models.",
  804. "summary": "List config providers",
  805. "x-codeSamples": [
  806. {
  807. "lang": "js",
  808. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.providers({\n ...\n})"
  809. }
  810. ]
  811. }
  812. },
  813. "/experimental/capabilities": {
  814. "get": {
  815. "tags": ["experimental"],
  816. "operationId": "experimental.capabilities.get",
  817. "parameters": [
  818. {
  819. "name": "directory",
  820. "in": "query",
  821. "schema": {
  822. "type": "string"
  823. },
  824. "required": false
  825. },
  826. {
  827. "name": "workspace",
  828. "in": "query",
  829. "schema": {
  830. "type": "string"
  831. },
  832. "required": false
  833. }
  834. ],
  835. "responses": {
  836. "200": {
  837. "description": "Experimental capabilities",
  838. "content": {
  839. "application/json": {
  840. "schema": {
  841. "$ref": "#/components/schemas/ExperimentalCapabilities"
  842. }
  843. }
  844. }
  845. },
  846. "400": {
  847. "description": "Bad request",
  848. "content": {
  849. "application/json": {
  850. "schema": {
  851. "$ref": "#/components/schemas/BadRequestError"
  852. }
  853. }
  854. }
  855. }
  856. },
  857. "description": "Get experimental features enabled on the OpenCode server.",
  858. "summary": "Get experimental capabilities",
  859. "x-codeSamples": [
  860. {
  861. "lang": "js",
  862. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.capabilities.get({\n ...\n})"
  863. }
  864. ]
  865. }
  866. },
  867. "/experimental/console": {
  868. "get": {
  869. "tags": ["experimental"],
  870. "operationId": "experimental.console.get",
  871. "parameters": [
  872. {
  873. "name": "directory",
  874. "in": "query",
  875. "schema": {
  876. "type": "string"
  877. },
  878. "required": false
  879. },
  880. {
  881. "name": "workspace",
  882. "in": "query",
  883. "schema": {
  884. "type": "string"
  885. },
  886. "required": false
  887. }
  888. ],
  889. "responses": {
  890. "200": {
  891. "description": "Active Console provider metadata",
  892. "content": {
  893. "application/json": {
  894. "schema": {
  895. "$ref": "#/components/schemas/ConsoleState"
  896. }
  897. }
  898. }
  899. },
  900. "400": {
  901. "description": "Bad request",
  902. "content": {
  903. "application/json": {
  904. "schema": {
  905. "$ref": "#/components/schemas/BadRequestError"
  906. }
  907. }
  908. }
  909. },
  910. "500": {
  911. "description": "InternalServerError",
  912. "content": {
  913. "application/json": {
  914. "schema": {
  915. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  916. }
  917. }
  918. }
  919. }
  920. },
  921. "description": "Get the active Console org name and the set of provider IDs managed by that Console org.",
  922. "summary": "Get active Console provider metadata",
  923. "x-codeSamples": [
  924. {
  925. "lang": "js",
  926. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.get({\n ...\n})"
  927. }
  928. ]
  929. }
  930. },
  931. "/experimental/console/orgs": {
  932. "get": {
  933. "tags": ["experimental"],
  934. "operationId": "experimental.console.listOrgs",
  935. "parameters": [
  936. {
  937. "name": "directory",
  938. "in": "query",
  939. "schema": {
  940. "type": "string"
  941. },
  942. "required": false
  943. },
  944. {
  945. "name": "workspace",
  946. "in": "query",
  947. "schema": {
  948. "type": "string"
  949. },
  950. "required": false
  951. }
  952. ],
  953. "responses": {
  954. "200": {
  955. "description": "Switchable Console orgs",
  956. "content": {
  957. "application/json": {
  958. "schema": {
  959. "type": "object",
  960. "properties": {
  961. "orgs": {
  962. "type": "array",
  963. "items": {
  964. "type": "object",
  965. "properties": {
  966. "accountID": {
  967. "type": "string"
  968. },
  969. "accountEmail": {
  970. "type": "string"
  971. },
  972. "accountUrl": {
  973. "type": "string"
  974. },
  975. "orgID": {
  976. "type": "string"
  977. },
  978. "orgName": {
  979. "type": "string"
  980. },
  981. "active": {
  982. "type": "boolean"
  983. }
  984. },
  985. "required": ["accountID", "accountEmail", "accountUrl", "orgID", "orgName", "active"],
  986. "additionalProperties": false
  987. }
  988. }
  989. },
  990. "required": ["orgs"],
  991. "additionalProperties": false,
  992. "description": "Switchable Console orgs"
  993. }
  994. }
  995. }
  996. },
  997. "400": {
  998. "description": "Bad request",
  999. "content": {
  1000. "application/json": {
  1001. "schema": {
  1002. "$ref": "#/components/schemas/BadRequestError"
  1003. }
  1004. }
  1005. }
  1006. },
  1007. "500": {
  1008. "description": "InternalServerError",
  1009. "content": {
  1010. "application/json": {
  1011. "schema": {
  1012. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  1013. }
  1014. }
  1015. }
  1016. }
  1017. },
  1018. "description": "Get the available Console orgs across logged-in accounts, including the current active org.",
  1019. "summary": "List switchable Console orgs",
  1020. "x-codeSamples": [
  1021. {
  1022. "lang": "js",
  1023. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.listOrgs({\n ...\n})"
  1024. }
  1025. ]
  1026. }
  1027. },
  1028. "/experimental/console/switch": {
  1029. "post": {
  1030. "tags": ["experimental"],
  1031. "operationId": "experimental.console.switchOrg",
  1032. "parameters": [
  1033. {
  1034. "name": "directory",
  1035. "in": "query",
  1036. "schema": {
  1037. "type": "string"
  1038. },
  1039. "required": false
  1040. },
  1041. {
  1042. "name": "workspace",
  1043. "in": "query",
  1044. "schema": {
  1045. "type": "string"
  1046. },
  1047. "required": false
  1048. }
  1049. ],
  1050. "responses": {
  1051. "200": {
  1052. "description": "Switch success",
  1053. "content": {
  1054. "application/json": {
  1055. "schema": {
  1056. "type": "boolean",
  1057. "description": "Switch success"
  1058. }
  1059. }
  1060. }
  1061. }
  1062. },
  1063. "description": "Persist a new active Console account/org selection for the current local OpenCode state.",
  1064. "summary": "Switch active Console org",
  1065. "requestBody": {
  1066. "content": {
  1067. "application/json": {
  1068. "schema": {
  1069. "type": "object",
  1070. "properties": {
  1071. "accountID": {
  1072. "type": "string"
  1073. },
  1074. "orgID": {
  1075. "type": "string"
  1076. }
  1077. },
  1078. "required": ["accountID", "orgID"],
  1079. "additionalProperties": false
  1080. }
  1081. }
  1082. }
  1083. },
  1084. "x-codeSamples": [
  1085. {
  1086. "lang": "js",
  1087. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.switchOrg({\n ...\n})"
  1088. }
  1089. ]
  1090. }
  1091. },
  1092. "/experimental/tool": {
  1093. "get": {
  1094. "tags": ["experimental"],
  1095. "operationId": "tool.list",
  1096. "parameters": [
  1097. {
  1098. "name": "directory",
  1099. "in": "query",
  1100. "schema": {
  1101. "type": "string"
  1102. },
  1103. "required": false
  1104. },
  1105. {
  1106. "name": "workspace",
  1107. "in": "query",
  1108. "schema": {
  1109. "type": "string"
  1110. },
  1111. "required": false
  1112. },
  1113. {
  1114. "name": "provider",
  1115. "in": "query",
  1116. "schema": {
  1117. "type": "string"
  1118. },
  1119. "required": true
  1120. },
  1121. {
  1122. "name": "model",
  1123. "in": "query",
  1124. "schema": {
  1125. "type": "string"
  1126. },
  1127. "required": true
  1128. }
  1129. ],
  1130. "responses": {
  1131. "200": {
  1132. "description": "Tools",
  1133. "content": {
  1134. "application/json": {
  1135. "schema": {
  1136. "$ref": "#/components/schemas/ToolList"
  1137. }
  1138. }
  1139. }
  1140. },
  1141. "400": {
  1142. "description": "BadRequest | InvalidRequestError",
  1143. "content": {
  1144. "application/json": {
  1145. "schema": {
  1146. "anyOf": [
  1147. {
  1148. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1149. },
  1150. {
  1151. "$ref": "#/components/schemas/InvalidRequestError"
  1152. }
  1153. ]
  1154. }
  1155. }
  1156. }
  1157. }
  1158. },
  1159. "description": "Get a list of available tools with their JSON schema parameters for a specific provider and model combination.",
  1160. "summary": "List tools",
  1161. "x-codeSamples": [
  1162. {
  1163. "lang": "js",
  1164. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.list({\n ...\n})"
  1165. }
  1166. ]
  1167. }
  1168. },
  1169. "/experimental/tool/ids": {
  1170. "get": {
  1171. "tags": ["experimental"],
  1172. "operationId": "tool.ids",
  1173. "parameters": [
  1174. {
  1175. "name": "directory",
  1176. "in": "query",
  1177. "schema": {
  1178. "type": "string"
  1179. },
  1180. "required": false
  1181. },
  1182. {
  1183. "name": "workspace",
  1184. "in": "query",
  1185. "schema": {
  1186. "type": "string"
  1187. },
  1188. "required": false
  1189. }
  1190. ],
  1191. "responses": {
  1192. "200": {
  1193. "description": "Tool IDs",
  1194. "content": {
  1195. "application/json": {
  1196. "schema": {
  1197. "$ref": "#/components/schemas/ToolIDs"
  1198. }
  1199. }
  1200. }
  1201. },
  1202. "400": {
  1203. "description": "BadRequest | InvalidRequestError",
  1204. "content": {
  1205. "application/json": {
  1206. "schema": {
  1207. "anyOf": [
  1208. {
  1209. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1210. },
  1211. {
  1212. "$ref": "#/components/schemas/InvalidRequestError"
  1213. }
  1214. ]
  1215. }
  1216. }
  1217. }
  1218. }
  1219. },
  1220. "description": "Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.",
  1221. "summary": "List tool IDs",
  1222. "x-codeSamples": [
  1223. {
  1224. "lang": "js",
  1225. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.ids({\n ...\n})"
  1226. }
  1227. ]
  1228. }
  1229. },
  1230. "/experimental/worktree": {
  1231. "get": {
  1232. "tags": ["experimental"],
  1233. "operationId": "worktree.list",
  1234. "parameters": [
  1235. {
  1236. "name": "directory",
  1237. "in": "query",
  1238. "schema": {
  1239. "type": "string"
  1240. },
  1241. "required": false
  1242. },
  1243. {
  1244. "name": "workspace",
  1245. "in": "query",
  1246. "schema": {
  1247. "type": "string"
  1248. },
  1249. "required": false
  1250. }
  1251. ],
  1252. "responses": {
  1253. "200": {
  1254. "description": "List of worktree directories",
  1255. "content": {
  1256. "application/json": {
  1257. "schema": {
  1258. "type": "array",
  1259. "items": {
  1260. "type": "string"
  1261. },
  1262. "description": "List of worktree directories"
  1263. }
  1264. }
  1265. }
  1266. },
  1267. "400": {
  1268. "description": "WorktreeError | InvalidRequestError",
  1269. "content": {
  1270. "application/json": {
  1271. "schema": {
  1272. "anyOf": [
  1273. {
  1274. "$ref": "#/components/schemas/WorktreeError"
  1275. },
  1276. {
  1277. "$ref": "#/components/schemas/InvalidRequestError"
  1278. }
  1279. ]
  1280. }
  1281. }
  1282. }
  1283. }
  1284. },
  1285. "description": "List all sandbox worktrees for the current project.",
  1286. "summary": "List worktrees",
  1287. "x-codeSamples": [
  1288. {
  1289. "lang": "js",
  1290. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.list({\n ...\n})"
  1291. }
  1292. ]
  1293. },
  1294. "post": {
  1295. "tags": ["experimental"],
  1296. "operationId": "worktree.create",
  1297. "parameters": [
  1298. {
  1299. "name": "directory",
  1300. "in": "query",
  1301. "schema": {
  1302. "type": "string"
  1303. },
  1304. "required": false
  1305. },
  1306. {
  1307. "name": "workspace",
  1308. "in": "query",
  1309. "schema": {
  1310. "type": "string"
  1311. },
  1312. "required": false
  1313. }
  1314. ],
  1315. "responses": {
  1316. "200": {
  1317. "description": "Worktree created",
  1318. "content": {
  1319. "application/json": {
  1320. "schema": {
  1321. "$ref": "#/components/schemas/Worktree"
  1322. }
  1323. }
  1324. }
  1325. },
  1326. "400": {
  1327. "description": "WorktreeError | InvalidRequestError",
  1328. "content": {
  1329. "application/json": {
  1330. "schema": {
  1331. "anyOf": [
  1332. {
  1333. "$ref": "#/components/schemas/WorktreeError"
  1334. },
  1335. {
  1336. "$ref": "#/components/schemas/InvalidRequestError"
  1337. }
  1338. ]
  1339. }
  1340. }
  1341. }
  1342. }
  1343. },
  1344. "description": "Create a new git worktree for the current project and run any configured startup scripts.",
  1345. "summary": "Create worktree",
  1346. "requestBody": {
  1347. "content": {
  1348. "application/json": {
  1349. "schema": {
  1350. "$ref": "#/components/schemas/WorktreeCreateInput"
  1351. }
  1352. }
  1353. }
  1354. },
  1355. "x-codeSamples": [
  1356. {
  1357. "lang": "js",
  1358. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.create({\n ...\n})"
  1359. }
  1360. ]
  1361. },
  1362. "delete": {
  1363. "tags": ["experimental"],
  1364. "operationId": "worktree.remove",
  1365. "parameters": [
  1366. {
  1367. "name": "directory",
  1368. "in": "query",
  1369. "schema": {
  1370. "type": "string"
  1371. },
  1372. "required": false
  1373. },
  1374. {
  1375. "name": "workspace",
  1376. "in": "query",
  1377. "schema": {
  1378. "type": "string"
  1379. },
  1380. "required": false
  1381. }
  1382. ],
  1383. "responses": {
  1384. "200": {
  1385. "description": "Worktree removed",
  1386. "content": {
  1387. "application/json": {
  1388. "schema": {
  1389. "type": "boolean",
  1390. "description": "Worktree removed"
  1391. }
  1392. }
  1393. }
  1394. },
  1395. "400": {
  1396. "description": "WorktreeError | InvalidRequestError",
  1397. "content": {
  1398. "application/json": {
  1399. "schema": {
  1400. "anyOf": [
  1401. {
  1402. "$ref": "#/components/schemas/WorktreeError"
  1403. },
  1404. {
  1405. "$ref": "#/components/schemas/InvalidRequestError"
  1406. }
  1407. ]
  1408. }
  1409. }
  1410. }
  1411. }
  1412. },
  1413. "description": "Remove a git worktree and delete its branch.",
  1414. "summary": "Remove worktree",
  1415. "requestBody": {
  1416. "content": {
  1417. "application/json": {
  1418. "schema": {
  1419. "$ref": "#/components/schemas/WorktreeRemoveInput"
  1420. }
  1421. }
  1422. }
  1423. },
  1424. "x-codeSamples": [
  1425. {
  1426. "lang": "js",
  1427. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.remove({\n ...\n})"
  1428. }
  1429. ]
  1430. }
  1431. },
  1432. "/experimental/worktree/reset": {
  1433. "post": {
  1434. "tags": ["experimental"],
  1435. "operationId": "worktree.reset",
  1436. "parameters": [
  1437. {
  1438. "name": "directory",
  1439. "in": "query",
  1440. "schema": {
  1441. "type": "string"
  1442. },
  1443. "required": false
  1444. },
  1445. {
  1446. "name": "workspace",
  1447. "in": "query",
  1448. "schema": {
  1449. "type": "string"
  1450. },
  1451. "required": false
  1452. }
  1453. ],
  1454. "responses": {
  1455. "200": {
  1456. "description": "Worktree reset",
  1457. "content": {
  1458. "application/json": {
  1459. "schema": {
  1460. "type": "boolean",
  1461. "description": "Worktree reset"
  1462. }
  1463. }
  1464. }
  1465. },
  1466. "400": {
  1467. "description": "WorktreeError | InvalidRequestError",
  1468. "content": {
  1469. "application/json": {
  1470. "schema": {
  1471. "anyOf": [
  1472. {
  1473. "$ref": "#/components/schemas/WorktreeError"
  1474. },
  1475. {
  1476. "$ref": "#/components/schemas/InvalidRequestError"
  1477. }
  1478. ]
  1479. }
  1480. }
  1481. }
  1482. }
  1483. },
  1484. "description": "Reset a worktree branch to the primary default branch.",
  1485. "summary": "Reset worktree",
  1486. "requestBody": {
  1487. "content": {
  1488. "application/json": {
  1489. "schema": {
  1490. "$ref": "#/components/schemas/WorktreeResetInput"
  1491. }
  1492. }
  1493. }
  1494. },
  1495. "x-codeSamples": [
  1496. {
  1497. "lang": "js",
  1498. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.reset({\n ...\n})"
  1499. }
  1500. ]
  1501. }
  1502. },
  1503. "/experimental/session": {
  1504. "get": {
  1505. "tags": ["experimental"],
  1506. "operationId": "experimental.session.list",
  1507. "parameters": [
  1508. {
  1509. "name": "directory",
  1510. "in": "query",
  1511. "schema": {
  1512. "type": "string"
  1513. },
  1514. "required": false
  1515. },
  1516. {
  1517. "name": "workspace",
  1518. "in": "query",
  1519. "schema": {
  1520. "type": "string"
  1521. },
  1522. "required": false
  1523. },
  1524. {
  1525. "name": "roots",
  1526. "in": "query",
  1527. "schema": {
  1528. "anyOf": [
  1529. {
  1530. "type": "boolean"
  1531. },
  1532. {
  1533. "type": "string",
  1534. "enum": ["true", "false"]
  1535. }
  1536. ]
  1537. },
  1538. "required": false
  1539. },
  1540. {
  1541. "name": "start",
  1542. "in": "query",
  1543. "schema": {
  1544. "type": "number"
  1545. },
  1546. "required": false
  1547. },
  1548. {
  1549. "name": "cursor",
  1550. "in": "query",
  1551. "schema": {
  1552. "type": "number"
  1553. },
  1554. "required": false
  1555. },
  1556. {
  1557. "name": "search",
  1558. "in": "query",
  1559. "schema": {
  1560. "type": "string"
  1561. },
  1562. "required": false
  1563. },
  1564. {
  1565. "name": "limit",
  1566. "in": "query",
  1567. "schema": {
  1568. "type": "number"
  1569. },
  1570. "required": false
  1571. },
  1572. {
  1573. "name": "archived",
  1574. "in": "query",
  1575. "schema": {
  1576. "anyOf": [
  1577. {
  1578. "type": "boolean"
  1579. },
  1580. {
  1581. "type": "string",
  1582. "enum": ["true", "false"]
  1583. }
  1584. ]
  1585. },
  1586. "required": false
  1587. }
  1588. ],
  1589. "responses": {
  1590. "200": {
  1591. "description": "List of sessions",
  1592. "content": {
  1593. "application/json": {
  1594. "schema": {
  1595. "type": "array",
  1596. "items": {
  1597. "$ref": "#/components/schemas/GlobalSession"
  1598. },
  1599. "description": "List of sessions"
  1600. }
  1601. }
  1602. }
  1603. },
  1604. "400": {
  1605. "description": "Bad request",
  1606. "content": {
  1607. "application/json": {
  1608. "schema": {
  1609. "$ref": "#/components/schemas/BadRequestError"
  1610. }
  1611. }
  1612. }
  1613. }
  1614. },
  1615. "description": "Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.",
  1616. "summary": "List sessions",
  1617. "x-codeSamples": [
  1618. {
  1619. "lang": "js",
  1620. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.list({\n ...\n})"
  1621. }
  1622. ]
  1623. }
  1624. },
  1625. "/experimental/session/{sessionID}/background": {
  1626. "post": {
  1627. "tags": ["experimental"],
  1628. "operationId": "experimental.session.background",
  1629. "parameters": [
  1630. {
  1631. "name": "sessionID",
  1632. "in": "path",
  1633. "schema": {
  1634. "type": "string",
  1635. "pattern": "^ses"
  1636. },
  1637. "required": true
  1638. },
  1639. {
  1640. "name": "directory",
  1641. "in": "query",
  1642. "schema": {
  1643. "type": "string"
  1644. },
  1645. "required": false
  1646. },
  1647. {
  1648. "name": "workspace",
  1649. "in": "query",
  1650. "schema": {
  1651. "type": "string"
  1652. },
  1653. "required": false
  1654. }
  1655. ],
  1656. "responses": {
  1657. "200": {
  1658. "description": "Backgrounded subagents",
  1659. "content": {
  1660. "application/json": {
  1661. "schema": {
  1662. "type": "boolean",
  1663. "description": "Backgrounded subagents"
  1664. }
  1665. }
  1666. }
  1667. },
  1668. "400": {
  1669. "description": "BadRequest | InvalidRequestError",
  1670. "content": {
  1671. "application/json": {
  1672. "schema": {
  1673. "anyOf": [
  1674. {
  1675. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1676. },
  1677. {
  1678. "$ref": "#/components/schemas/InvalidRequestError"
  1679. }
  1680. ]
  1681. }
  1682. }
  1683. }
  1684. }
  1685. },
  1686. "description": "Detach any synchronous subagents currently blocking the session and continue them in the background.",
  1687. "summary": "Background subagents",
  1688. "x-codeSamples": [
  1689. {
  1690. "lang": "js",
  1691. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.background({\n ...\n})"
  1692. }
  1693. ]
  1694. }
  1695. },
  1696. "/experimental/resource": {
  1697. "get": {
  1698. "tags": ["experimental"],
  1699. "operationId": "experimental.resource.list",
  1700. "parameters": [
  1701. {
  1702. "name": "directory",
  1703. "in": "query",
  1704. "schema": {
  1705. "type": "string"
  1706. },
  1707. "required": false
  1708. },
  1709. {
  1710. "name": "workspace",
  1711. "in": "query",
  1712. "schema": {
  1713. "type": "string"
  1714. },
  1715. "required": false
  1716. }
  1717. ],
  1718. "responses": {
  1719. "200": {
  1720. "description": "MCP resources",
  1721. "content": {
  1722. "application/json": {
  1723. "schema": {
  1724. "type": "object",
  1725. "additionalProperties": {
  1726. "$ref": "#/components/schemas/McpResource"
  1727. },
  1728. "description": "MCP resources"
  1729. }
  1730. }
  1731. }
  1732. },
  1733. "400": {
  1734. "description": "Bad request",
  1735. "content": {
  1736. "application/json": {
  1737. "schema": {
  1738. "$ref": "#/components/schemas/BadRequestError"
  1739. }
  1740. }
  1741. }
  1742. }
  1743. },
  1744. "description": "Get all available MCP resources from connected servers. Optionally filter by name.",
  1745. "summary": "Get MCP resources",
  1746. "x-codeSamples": [
  1747. {
  1748. "lang": "js",
  1749. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.resource.list({\n ...\n})"
  1750. }
  1751. ]
  1752. }
  1753. },
  1754. "/find": {
  1755. "get": {
  1756. "tags": ["file"],
  1757. "operationId": "find.text",
  1758. "parameters": [
  1759. {
  1760. "name": "directory",
  1761. "in": "query",
  1762. "schema": {
  1763. "type": "string"
  1764. },
  1765. "required": false
  1766. },
  1767. {
  1768. "name": "workspace",
  1769. "in": "query",
  1770. "schema": {
  1771. "type": "string"
  1772. },
  1773. "required": false
  1774. },
  1775. {
  1776. "name": "pattern",
  1777. "in": "query",
  1778. "schema": {
  1779. "type": "string"
  1780. },
  1781. "required": true
  1782. }
  1783. ],
  1784. "responses": {
  1785. "200": {
  1786. "description": "Matches",
  1787. "content": {
  1788. "application/json": {
  1789. "schema": {
  1790. "type": "array",
  1791. "items": {
  1792. "type": "object",
  1793. "properties": {
  1794. "path": {
  1795. "type": "object",
  1796. "properties": {
  1797. "text": {
  1798. "type": "string"
  1799. }
  1800. },
  1801. "required": ["text"],
  1802. "additionalProperties": false
  1803. },
  1804. "lines": {
  1805. "type": "object",
  1806. "properties": {
  1807. "text": {
  1808. "type": "string"
  1809. }
  1810. },
  1811. "required": ["text"],
  1812. "additionalProperties": false
  1813. },
  1814. "line_number": {
  1815. "type": "integer",
  1816. "minimum": 0
  1817. },
  1818. "absolute_offset": {
  1819. "type": "integer",
  1820. "minimum": 0
  1821. },
  1822. "submatches": {
  1823. "type": "array",
  1824. "items": {
  1825. "type": "object",
  1826. "properties": {
  1827. "match": {
  1828. "type": "object",
  1829. "properties": {
  1830. "text": {
  1831. "type": "string"
  1832. }
  1833. },
  1834. "required": ["text"],
  1835. "additionalProperties": false
  1836. },
  1837. "start": {
  1838. "type": "integer",
  1839. "minimum": 0
  1840. },
  1841. "end": {
  1842. "type": "integer",
  1843. "minimum": 0
  1844. }
  1845. },
  1846. "required": ["match", "start", "end"],
  1847. "additionalProperties": false
  1848. }
  1849. }
  1850. },
  1851. "required": ["path", "lines", "line_number", "absolute_offset", "submatches"],
  1852. "additionalProperties": false
  1853. },
  1854. "description": "Matches"
  1855. }
  1856. }
  1857. }
  1858. },
  1859. "400": {
  1860. "description": "Bad request",
  1861. "content": {
  1862. "application/json": {
  1863. "schema": {
  1864. "$ref": "#/components/schemas/BadRequestError"
  1865. }
  1866. }
  1867. }
  1868. }
  1869. },
  1870. "description": "Search for text patterns across files in the project using ripgrep.",
  1871. "summary": "Find text",
  1872. "x-codeSamples": [
  1873. {
  1874. "lang": "js",
  1875. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
  1876. }
  1877. ]
  1878. }
  1879. },
  1880. "/find/file": {
  1881. "get": {
  1882. "tags": ["file"],
  1883. "operationId": "find.files",
  1884. "parameters": [
  1885. {
  1886. "name": "directory",
  1887. "in": "query",
  1888. "schema": {
  1889. "type": "string"
  1890. },
  1891. "required": false
  1892. },
  1893. {
  1894. "name": "workspace",
  1895. "in": "query",
  1896. "schema": {
  1897. "type": "string"
  1898. },
  1899. "required": false
  1900. },
  1901. {
  1902. "name": "query",
  1903. "in": "query",
  1904. "schema": {
  1905. "type": "string"
  1906. },
  1907. "required": true
  1908. },
  1909. {
  1910. "name": "dirs",
  1911. "in": "query",
  1912. "schema": {
  1913. "type": "string",
  1914. "enum": ["true", "false"]
  1915. },
  1916. "required": false
  1917. },
  1918. {
  1919. "name": "type",
  1920. "in": "query",
  1921. "schema": {
  1922. "type": "string",
  1923. "enum": ["file", "directory"]
  1924. },
  1925. "required": false
  1926. },
  1927. {
  1928. "name": "limit",
  1929. "in": "query",
  1930. "schema": {
  1931. "type": "integer",
  1932. "minimum": 1,
  1933. "maximum": 200
  1934. },
  1935. "required": false
  1936. }
  1937. ],
  1938. "responses": {
  1939. "200": {
  1940. "description": "File paths",
  1941. "content": {
  1942. "application/json": {
  1943. "schema": {
  1944. "type": "array",
  1945. "items": {
  1946. "type": "string"
  1947. },
  1948. "description": "File paths"
  1949. }
  1950. }
  1951. }
  1952. },
  1953. "400": {
  1954. "description": "Bad request",
  1955. "content": {
  1956. "application/json": {
  1957. "schema": {
  1958. "$ref": "#/components/schemas/BadRequestError"
  1959. }
  1960. }
  1961. }
  1962. }
  1963. },
  1964. "description": "Search for files or directories by name or pattern in the project directory.",
  1965. "summary": "Find files",
  1966. "x-codeSamples": [
  1967. {
  1968. "lang": "js",
  1969. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
  1970. }
  1971. ]
  1972. }
  1973. },
  1974. "/find/symbol": {
  1975. "get": {
  1976. "tags": ["file"],
  1977. "operationId": "find.symbols",
  1978. "parameters": [
  1979. {
  1980. "name": "directory",
  1981. "in": "query",
  1982. "schema": {
  1983. "type": "string"
  1984. },
  1985. "required": false
  1986. },
  1987. {
  1988. "name": "workspace",
  1989. "in": "query",
  1990. "schema": {
  1991. "type": "string"
  1992. },
  1993. "required": false
  1994. },
  1995. {
  1996. "name": "query",
  1997. "in": "query",
  1998. "schema": {
  1999. "type": "string"
  2000. },
  2001. "required": true
  2002. }
  2003. ],
  2004. "responses": {
  2005. "200": {
  2006. "description": "Symbols",
  2007. "content": {
  2008. "application/json": {
  2009. "schema": {
  2010. "type": "array",
  2011. "items": {
  2012. "$ref": "#/components/schemas/Symbol"
  2013. },
  2014. "description": "Symbols"
  2015. }
  2016. }
  2017. }
  2018. },
  2019. "400": {
  2020. "description": "Bad request",
  2021. "content": {
  2022. "application/json": {
  2023. "schema": {
  2024. "$ref": "#/components/schemas/BadRequestError"
  2025. }
  2026. }
  2027. }
  2028. }
  2029. },
  2030. "description": "Search for workspace symbols like functions, classes, and variables using LSP.",
  2031. "summary": "Find symbols",
  2032. "x-codeSamples": [
  2033. {
  2034. "lang": "js",
  2035. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
  2036. }
  2037. ]
  2038. }
  2039. },
  2040. "/file": {
  2041. "get": {
  2042. "tags": ["file"],
  2043. "operationId": "file.list",
  2044. "parameters": [
  2045. {
  2046. "name": "directory",
  2047. "in": "query",
  2048. "schema": {
  2049. "type": "string"
  2050. },
  2051. "required": false
  2052. },
  2053. {
  2054. "name": "workspace",
  2055. "in": "query",
  2056. "schema": {
  2057. "type": "string"
  2058. },
  2059. "required": false
  2060. },
  2061. {
  2062. "name": "path",
  2063. "in": "query",
  2064. "schema": {
  2065. "type": "string"
  2066. },
  2067. "required": true
  2068. }
  2069. ],
  2070. "responses": {
  2071. "200": {
  2072. "description": "Files and directories",
  2073. "content": {
  2074. "application/json": {
  2075. "schema": {
  2076. "type": "array",
  2077. "items": {
  2078. "$ref": "#/components/schemas/FileNode"
  2079. },
  2080. "description": "Files and directories"
  2081. }
  2082. }
  2083. }
  2084. },
  2085. "400": {
  2086. "description": "Bad request",
  2087. "content": {
  2088. "application/json": {
  2089. "schema": {
  2090. "$ref": "#/components/schemas/BadRequestError"
  2091. }
  2092. }
  2093. }
  2094. }
  2095. },
  2096. "description": "List files and directories in a specified path.",
  2097. "summary": "List files",
  2098. "x-codeSamples": [
  2099. {
  2100. "lang": "js",
  2101. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
  2102. }
  2103. ]
  2104. }
  2105. },
  2106. "/file/content": {
  2107. "get": {
  2108. "tags": ["file"],
  2109. "operationId": "file.read",
  2110. "parameters": [
  2111. {
  2112. "name": "directory",
  2113. "in": "query",
  2114. "schema": {
  2115. "type": "string"
  2116. },
  2117. "required": false
  2118. },
  2119. {
  2120. "name": "workspace",
  2121. "in": "query",
  2122. "schema": {
  2123. "type": "string"
  2124. },
  2125. "required": false
  2126. },
  2127. {
  2128. "name": "path",
  2129. "in": "query",
  2130. "schema": {
  2131. "type": "string"
  2132. },
  2133. "required": true
  2134. }
  2135. ],
  2136. "responses": {
  2137. "200": {
  2138. "description": "File content",
  2139. "content": {
  2140. "application/json": {
  2141. "schema": {
  2142. "$ref": "#/components/schemas/FileContent"
  2143. }
  2144. }
  2145. }
  2146. },
  2147. "400": {
  2148. "description": "Bad request",
  2149. "content": {
  2150. "application/json": {
  2151. "schema": {
  2152. "$ref": "#/components/schemas/BadRequestError"
  2153. }
  2154. }
  2155. }
  2156. }
  2157. },
  2158. "description": "Read the content of a specified file.",
  2159. "summary": "Read file",
  2160. "x-codeSamples": [
  2161. {
  2162. "lang": "js",
  2163. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
  2164. }
  2165. ]
  2166. }
  2167. },
  2168. "/file/status": {
  2169. "get": {
  2170. "tags": ["file"],
  2171. "operationId": "file.status",
  2172. "parameters": [
  2173. {
  2174. "name": "directory",
  2175. "in": "query",
  2176. "schema": {
  2177. "type": "string"
  2178. },
  2179. "required": false
  2180. },
  2181. {
  2182. "name": "workspace",
  2183. "in": "query",
  2184. "schema": {
  2185. "type": "string"
  2186. },
  2187. "required": false
  2188. }
  2189. ],
  2190. "responses": {
  2191. "200": {
  2192. "description": "File status",
  2193. "content": {
  2194. "application/json": {
  2195. "schema": {
  2196. "type": "array",
  2197. "items": {
  2198. "$ref": "#/components/schemas/File"
  2199. },
  2200. "description": "File status"
  2201. }
  2202. }
  2203. }
  2204. },
  2205. "400": {
  2206. "description": "Bad request",
  2207. "content": {
  2208. "application/json": {
  2209. "schema": {
  2210. "$ref": "#/components/schemas/BadRequestError"
  2211. }
  2212. }
  2213. }
  2214. }
  2215. },
  2216. "description": "Get the git status of all files in the project.",
  2217. "summary": "Get file status",
  2218. "x-codeSamples": [
  2219. {
  2220. "lang": "js",
  2221. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
  2222. }
  2223. ]
  2224. }
  2225. },
  2226. "/instance/dispose": {
  2227. "post": {
  2228. "tags": ["instance"],
  2229. "operationId": "instance.dispose",
  2230. "parameters": [
  2231. {
  2232. "name": "directory",
  2233. "in": "query",
  2234. "schema": {
  2235. "type": "string"
  2236. },
  2237. "required": false
  2238. },
  2239. {
  2240. "name": "workspace",
  2241. "in": "query",
  2242. "schema": {
  2243. "type": "string"
  2244. },
  2245. "required": false
  2246. }
  2247. ],
  2248. "responses": {
  2249. "200": {
  2250. "description": "Instance disposed",
  2251. "content": {
  2252. "application/json": {
  2253. "schema": {
  2254. "type": "boolean",
  2255. "description": "Instance disposed"
  2256. }
  2257. }
  2258. }
  2259. },
  2260. "400": {
  2261. "description": "Bad request",
  2262. "content": {
  2263. "application/json": {
  2264. "schema": {
  2265. "$ref": "#/components/schemas/BadRequestError"
  2266. }
  2267. }
  2268. }
  2269. }
  2270. },
  2271. "description": "Clean up and dispose the current OpenCode instance, releasing all resources.",
  2272. "summary": "Dispose instance",
  2273. "x-codeSamples": [
  2274. {
  2275. "lang": "js",
  2276. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.instance.dispose({\n ...\n})"
  2277. }
  2278. ]
  2279. }
  2280. },
  2281. "/path": {
  2282. "get": {
  2283. "tags": ["instance"],
  2284. "operationId": "path.get",
  2285. "parameters": [
  2286. {
  2287. "name": "directory",
  2288. "in": "query",
  2289. "schema": {
  2290. "type": "string"
  2291. },
  2292. "required": false
  2293. },
  2294. {
  2295. "name": "workspace",
  2296. "in": "query",
  2297. "schema": {
  2298. "type": "string"
  2299. },
  2300. "required": false
  2301. }
  2302. ],
  2303. "responses": {
  2304. "200": {
  2305. "description": "Path",
  2306. "content": {
  2307. "application/json": {
  2308. "schema": {
  2309. "$ref": "#/components/schemas/Path"
  2310. }
  2311. }
  2312. }
  2313. },
  2314. "400": {
  2315. "description": "Bad request",
  2316. "content": {
  2317. "application/json": {
  2318. "schema": {
  2319. "$ref": "#/components/schemas/BadRequestError"
  2320. }
  2321. }
  2322. }
  2323. }
  2324. },
  2325. "description": "Retrieve the current working directory and related path information for the OpenCode instance.",
  2326. "summary": "Get paths",
  2327. "x-codeSamples": [
  2328. {
  2329. "lang": "js",
  2330. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.path.get({\n ...\n})"
  2331. }
  2332. ]
  2333. }
  2334. },
  2335. "/vcs": {
  2336. "get": {
  2337. "tags": ["instance"],
  2338. "operationId": "vcs.get",
  2339. "parameters": [
  2340. {
  2341. "name": "directory",
  2342. "in": "query",
  2343. "schema": {
  2344. "type": "string"
  2345. },
  2346. "required": false
  2347. },
  2348. {
  2349. "name": "workspace",
  2350. "in": "query",
  2351. "schema": {
  2352. "type": "string"
  2353. },
  2354. "required": false
  2355. }
  2356. ],
  2357. "responses": {
  2358. "200": {
  2359. "description": "VCS info",
  2360. "content": {
  2361. "application/json": {
  2362. "schema": {
  2363. "$ref": "#/components/schemas/VcsInfo"
  2364. }
  2365. }
  2366. }
  2367. },
  2368. "400": {
  2369. "description": "Bad request",
  2370. "content": {
  2371. "application/json": {
  2372. "schema": {
  2373. "$ref": "#/components/schemas/BadRequestError"
  2374. }
  2375. }
  2376. }
  2377. }
  2378. },
  2379. "description": "Retrieve version control system (VCS) information for the current project, such as git branch.",
  2380. "summary": "Get VCS info",
  2381. "x-codeSamples": [
  2382. {
  2383. "lang": "js",
  2384. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.get({\n ...\n})"
  2385. }
  2386. ]
  2387. }
  2388. },
  2389. "/vcs/status": {
  2390. "get": {
  2391. "tags": ["instance"],
  2392. "operationId": "vcs.status",
  2393. "parameters": [
  2394. {
  2395. "name": "directory",
  2396. "in": "query",
  2397. "schema": {
  2398. "type": "string"
  2399. },
  2400. "required": false
  2401. },
  2402. {
  2403. "name": "workspace",
  2404. "in": "query",
  2405. "schema": {
  2406. "type": "string"
  2407. },
  2408. "required": false
  2409. }
  2410. ],
  2411. "responses": {
  2412. "200": {
  2413. "description": "VCS status",
  2414. "content": {
  2415. "application/json": {
  2416. "schema": {
  2417. "type": "array",
  2418. "items": {
  2419. "$ref": "#/components/schemas/VcsFileStatus"
  2420. },
  2421. "description": "VCS status"
  2422. }
  2423. }
  2424. }
  2425. },
  2426. "400": {
  2427. "description": "Bad request",
  2428. "content": {
  2429. "application/json": {
  2430. "schema": {
  2431. "$ref": "#/components/schemas/BadRequestError"
  2432. }
  2433. }
  2434. }
  2435. }
  2436. },
  2437. "description": "Retrieve changed files in the current working tree without patches.",
  2438. "summary": "Get VCS status",
  2439. "x-codeSamples": [
  2440. {
  2441. "lang": "js",
  2442. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.status({\n ...\n})"
  2443. }
  2444. ]
  2445. }
  2446. },
  2447. "/vcs/diff": {
  2448. "get": {
  2449. "tags": ["instance"],
  2450. "operationId": "vcs.diff",
  2451. "parameters": [
  2452. {
  2453. "name": "directory",
  2454. "in": "query",
  2455. "schema": {
  2456. "type": "string"
  2457. },
  2458. "required": false
  2459. },
  2460. {
  2461. "name": "workspace",
  2462. "in": "query",
  2463. "schema": {
  2464. "type": "string"
  2465. },
  2466. "required": false
  2467. },
  2468. {
  2469. "name": "mode",
  2470. "in": "query",
  2471. "schema": {
  2472. "type": "string",
  2473. "enum": ["git", "branch"]
  2474. },
  2475. "required": true
  2476. },
  2477. {
  2478. "name": "context",
  2479. "in": "query",
  2480. "schema": {
  2481. "type": "integer",
  2482. "minimum": 0
  2483. },
  2484. "required": false
  2485. }
  2486. ],
  2487. "responses": {
  2488. "200": {
  2489. "description": "VCS diff",
  2490. "content": {
  2491. "application/json": {
  2492. "schema": {
  2493. "type": "array",
  2494. "items": {
  2495. "$ref": "#/components/schemas/VcsFileDiff"
  2496. },
  2497. "description": "VCS diff"
  2498. }
  2499. }
  2500. }
  2501. },
  2502. "400": {
  2503. "description": "Bad request",
  2504. "content": {
  2505. "application/json": {
  2506. "schema": {
  2507. "$ref": "#/components/schemas/BadRequestError"
  2508. }
  2509. }
  2510. }
  2511. }
  2512. },
  2513. "description": "Retrieve the current git diff for the working tree or against the default branch.",
  2514. "summary": "Get VCS diff",
  2515. "x-codeSamples": [
  2516. {
  2517. "lang": "js",
  2518. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff({\n ...\n})"
  2519. }
  2520. ]
  2521. }
  2522. },
  2523. "/vcs/diff/raw": {
  2524. "get": {
  2525. "tags": ["instance"],
  2526. "operationId": "vcs.diff.raw",
  2527. "parameters": [
  2528. {
  2529. "name": "directory",
  2530. "in": "query",
  2531. "schema": {
  2532. "type": "string"
  2533. },
  2534. "required": false
  2535. },
  2536. {
  2537. "name": "workspace",
  2538. "in": "query",
  2539. "schema": {
  2540. "type": "string"
  2541. },
  2542. "required": false
  2543. }
  2544. ],
  2545. "responses": {
  2546. "200": {
  2547. "description": "Raw VCS diff",
  2548. "content": {
  2549. "text/x-diff; charset=utf-8": {
  2550. "schema": {
  2551. "type": "string"
  2552. }
  2553. }
  2554. }
  2555. },
  2556. "400": {
  2557. "description": "Bad request",
  2558. "content": {
  2559. "application/json": {
  2560. "schema": {
  2561. "$ref": "#/components/schemas/BadRequestError"
  2562. }
  2563. }
  2564. }
  2565. }
  2566. },
  2567. "description": "Retrieve a raw patch for current uncommitted changes.",
  2568. "summary": "Get raw VCS diff",
  2569. "x-codeSamples": [
  2570. {
  2571. "lang": "js",
  2572. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff.raw({\n ...\n})"
  2573. }
  2574. ]
  2575. }
  2576. },
  2577. "/vcs/apply": {
  2578. "post": {
  2579. "tags": ["instance"],
  2580. "operationId": "vcs.apply",
  2581. "parameters": [
  2582. {
  2583. "name": "directory",
  2584. "in": "query",
  2585. "schema": {
  2586. "type": "string"
  2587. },
  2588. "required": false
  2589. },
  2590. {
  2591. "name": "workspace",
  2592. "in": "query",
  2593. "schema": {
  2594. "type": "string"
  2595. },
  2596. "required": false
  2597. }
  2598. ],
  2599. "responses": {
  2600. "200": {
  2601. "description": "VCS patch applied",
  2602. "content": {
  2603. "application/json": {
  2604. "schema": {
  2605. "type": "object",
  2606. "properties": {
  2607. "applied": {
  2608. "type": "boolean"
  2609. }
  2610. },
  2611. "required": ["applied"],
  2612. "additionalProperties": false,
  2613. "description": "VCS patch applied"
  2614. }
  2615. }
  2616. }
  2617. },
  2618. "400": {
  2619. "description": "VcsApplyError | InvalidRequestError",
  2620. "content": {
  2621. "application/json": {
  2622. "schema": {
  2623. "anyOf": [
  2624. {
  2625. "$ref": "#/components/schemas/VcsApplyError"
  2626. },
  2627. {
  2628. "$ref": "#/components/schemas/InvalidRequestError"
  2629. }
  2630. ]
  2631. }
  2632. }
  2633. }
  2634. }
  2635. },
  2636. "description": "Apply a raw patch to the current working tree.",
  2637. "summary": "Apply VCS patch",
  2638. "requestBody": {
  2639. "content": {
  2640. "application/json": {
  2641. "schema": {
  2642. "type": "object",
  2643. "properties": {
  2644. "patch": {
  2645. "type": "string"
  2646. }
  2647. },
  2648. "required": ["patch"],
  2649. "additionalProperties": false
  2650. }
  2651. }
  2652. }
  2653. },
  2654. "x-codeSamples": [
  2655. {
  2656. "lang": "js",
  2657. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.apply({\n ...\n})"
  2658. }
  2659. ]
  2660. }
  2661. },
  2662. "/command": {
  2663. "get": {
  2664. "tags": ["instance"],
  2665. "operationId": "command.list",
  2666. "parameters": [
  2667. {
  2668. "name": "directory",
  2669. "in": "query",
  2670. "schema": {
  2671. "type": "string"
  2672. },
  2673. "required": false
  2674. },
  2675. {
  2676. "name": "workspace",
  2677. "in": "query",
  2678. "schema": {
  2679. "type": "string"
  2680. },
  2681. "required": false
  2682. }
  2683. ],
  2684. "responses": {
  2685. "200": {
  2686. "description": "List of commands",
  2687. "content": {
  2688. "application/json": {
  2689. "schema": {
  2690. "type": "array",
  2691. "items": {
  2692. "$ref": "#/components/schemas/Command"
  2693. },
  2694. "description": "List of commands"
  2695. }
  2696. }
  2697. }
  2698. },
  2699. "400": {
  2700. "description": "Bad request",
  2701. "content": {
  2702. "application/json": {
  2703. "schema": {
  2704. "$ref": "#/components/schemas/BadRequestError"
  2705. }
  2706. }
  2707. }
  2708. }
  2709. },
  2710. "description": "Get a list of all available commands in the OpenCode system.",
  2711. "summary": "List commands",
  2712. "x-codeSamples": [
  2713. {
  2714. "lang": "js",
  2715. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
  2716. }
  2717. ]
  2718. }
  2719. },
  2720. "/agent": {
  2721. "get": {
  2722. "tags": ["instance"],
  2723. "operationId": "app.agents",
  2724. "parameters": [
  2725. {
  2726. "name": "directory",
  2727. "in": "query",
  2728. "schema": {
  2729. "type": "string"
  2730. },
  2731. "required": false
  2732. },
  2733. {
  2734. "name": "workspace",
  2735. "in": "query",
  2736. "schema": {
  2737. "type": "string"
  2738. },
  2739. "required": false
  2740. }
  2741. ],
  2742. "responses": {
  2743. "200": {
  2744. "description": "List of agents",
  2745. "content": {
  2746. "application/json": {
  2747. "schema": {
  2748. "type": "array",
  2749. "items": {
  2750. "$ref": "#/components/schemas/Agent"
  2751. },
  2752. "description": "List of agents"
  2753. }
  2754. }
  2755. }
  2756. },
  2757. "400": {
  2758. "description": "Bad request",
  2759. "content": {
  2760. "application/json": {
  2761. "schema": {
  2762. "$ref": "#/components/schemas/BadRequestError"
  2763. }
  2764. }
  2765. }
  2766. }
  2767. },
  2768. "description": "Get a list of all available AI agents in the OpenCode system.",
  2769. "summary": "List agents",
  2770. "x-codeSamples": [
  2771. {
  2772. "lang": "js",
  2773. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
  2774. }
  2775. ]
  2776. }
  2777. },
  2778. "/skill": {
  2779. "get": {
  2780. "tags": ["instance"],
  2781. "operationId": "app.skills",
  2782. "parameters": [
  2783. {
  2784. "name": "directory",
  2785. "in": "query",
  2786. "schema": {
  2787. "type": "string"
  2788. },
  2789. "required": false
  2790. },
  2791. {
  2792. "name": "workspace",
  2793. "in": "query",
  2794. "schema": {
  2795. "type": "string"
  2796. },
  2797. "required": false
  2798. }
  2799. ],
  2800. "responses": {
  2801. "200": {
  2802. "description": "List of skills",
  2803. "content": {
  2804. "application/json": {
  2805. "schema": {
  2806. "type": "array",
  2807. "items": {
  2808. "type": "object",
  2809. "properties": {
  2810. "name": {
  2811. "type": "string"
  2812. },
  2813. "description": {
  2814. "type": "string"
  2815. },
  2816. "location": {
  2817. "type": "string"
  2818. },
  2819. "content": {
  2820. "type": "string"
  2821. }
  2822. },
  2823. "required": ["name", "location", "content"],
  2824. "additionalProperties": false
  2825. },
  2826. "description": "List of skills"
  2827. }
  2828. }
  2829. }
  2830. },
  2831. "400": {
  2832. "description": "Bad request",
  2833. "content": {
  2834. "application/json": {
  2835. "schema": {
  2836. "$ref": "#/components/schemas/BadRequestError"
  2837. }
  2838. }
  2839. }
  2840. }
  2841. },
  2842. "description": "Get a list of all available skills in the OpenCode system.",
  2843. "summary": "List skills",
  2844. "x-codeSamples": [
  2845. {
  2846. "lang": "js",
  2847. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.skills({\n ...\n})"
  2848. }
  2849. ]
  2850. }
  2851. },
  2852. "/lsp": {
  2853. "get": {
  2854. "tags": ["instance"],
  2855. "operationId": "lsp.status",
  2856. "parameters": [
  2857. {
  2858. "name": "directory",
  2859. "in": "query",
  2860. "schema": {
  2861. "type": "string"
  2862. },
  2863. "required": false
  2864. },
  2865. {
  2866. "name": "workspace",
  2867. "in": "query",
  2868. "schema": {
  2869. "type": "string"
  2870. },
  2871. "required": false
  2872. }
  2873. ],
  2874. "responses": {
  2875. "200": {
  2876. "description": "LSP server status",
  2877. "content": {
  2878. "application/json": {
  2879. "schema": {
  2880. "type": "array",
  2881. "items": {
  2882. "$ref": "#/components/schemas/LSPStatus"
  2883. },
  2884. "description": "LSP server status"
  2885. }
  2886. }
  2887. }
  2888. },
  2889. "400": {
  2890. "description": "Bad request",
  2891. "content": {
  2892. "application/json": {
  2893. "schema": {
  2894. "$ref": "#/components/schemas/BadRequestError"
  2895. }
  2896. }
  2897. }
  2898. }
  2899. },
  2900. "description": "Get LSP server status",
  2901. "summary": "Get LSP status",
  2902. "x-codeSamples": [
  2903. {
  2904. "lang": "js",
  2905. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
  2906. }
  2907. ]
  2908. }
  2909. },
  2910. "/formatter": {
  2911. "get": {
  2912. "tags": ["instance"],
  2913. "operationId": "formatter.status",
  2914. "parameters": [
  2915. {
  2916. "name": "directory",
  2917. "in": "query",
  2918. "schema": {
  2919. "type": "string"
  2920. },
  2921. "required": false
  2922. },
  2923. {
  2924. "name": "workspace",
  2925. "in": "query",
  2926. "schema": {
  2927. "type": "string"
  2928. },
  2929. "required": false
  2930. }
  2931. ],
  2932. "responses": {
  2933. "200": {
  2934. "description": "Formatter status",
  2935. "content": {
  2936. "application/json": {
  2937. "schema": {
  2938. "type": "array",
  2939. "items": {
  2940. "$ref": "#/components/schemas/FormatterStatus"
  2941. },
  2942. "description": "Formatter status"
  2943. }
  2944. }
  2945. }
  2946. },
  2947. "400": {
  2948. "description": "Bad request",
  2949. "content": {
  2950. "application/json": {
  2951. "schema": {
  2952. "$ref": "#/components/schemas/BadRequestError"
  2953. }
  2954. }
  2955. }
  2956. }
  2957. },
  2958. "description": "Get formatter status",
  2959. "summary": "Get formatter status",
  2960. "x-codeSamples": [
  2961. {
  2962. "lang": "js",
  2963. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
  2964. }
  2965. ]
  2966. }
  2967. },
  2968. "/mcp": {
  2969. "get": {
  2970. "tags": ["mcp"],
  2971. "operationId": "mcp.status",
  2972. "parameters": [
  2973. {
  2974. "name": "directory",
  2975. "in": "query",
  2976. "schema": {
  2977. "type": "string"
  2978. },
  2979. "required": false
  2980. },
  2981. {
  2982. "name": "workspace",
  2983. "in": "query",
  2984. "schema": {
  2985. "type": "string"
  2986. },
  2987. "required": false
  2988. }
  2989. ],
  2990. "responses": {
  2991. "200": {
  2992. "description": "MCP server status",
  2993. "content": {
  2994. "application/json": {
  2995. "schema": {
  2996. "type": "object",
  2997. "additionalProperties": {
  2998. "$ref": "#/components/schemas/MCPStatus"
  2999. },
  3000. "description": "MCP server status"
  3001. }
  3002. }
  3003. }
  3004. },
  3005. "400": {
  3006. "description": "Bad request",
  3007. "content": {
  3008. "application/json": {
  3009. "schema": {
  3010. "$ref": "#/components/schemas/BadRequestError"
  3011. }
  3012. }
  3013. }
  3014. }
  3015. },
  3016. "description": "Get the status of all Model Context Protocol (MCP) servers.",
  3017. "summary": "Get MCP status",
  3018. "x-codeSamples": [
  3019. {
  3020. "lang": "js",
  3021. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
  3022. }
  3023. ]
  3024. },
  3025. "post": {
  3026. "tags": ["mcp"],
  3027. "operationId": "mcp.add",
  3028. "parameters": [
  3029. {
  3030. "name": "directory",
  3031. "in": "query",
  3032. "schema": {
  3033. "type": "string"
  3034. },
  3035. "required": false
  3036. },
  3037. {
  3038. "name": "workspace",
  3039. "in": "query",
  3040. "schema": {
  3041. "type": "string"
  3042. },
  3043. "required": false
  3044. }
  3045. ],
  3046. "responses": {
  3047. "200": {
  3048. "description": "MCP server added successfully",
  3049. "content": {
  3050. "application/json": {
  3051. "schema": {
  3052. "type": "object",
  3053. "additionalProperties": {
  3054. "$ref": "#/components/schemas/MCPStatus"
  3055. },
  3056. "description": "MCP server added successfully"
  3057. }
  3058. }
  3059. }
  3060. },
  3061. "400": {
  3062. "description": "BadRequest | InvalidRequestError",
  3063. "content": {
  3064. "application/json": {
  3065. "schema": {
  3066. "anyOf": [
  3067. {
  3068. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3069. },
  3070. {
  3071. "$ref": "#/components/schemas/InvalidRequestError"
  3072. }
  3073. ]
  3074. }
  3075. }
  3076. }
  3077. }
  3078. },
  3079. "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
  3080. "summary": "Add MCP server",
  3081. "requestBody": {
  3082. "content": {
  3083. "application/json": {
  3084. "schema": {
  3085. "type": "object",
  3086. "properties": {
  3087. "name": {
  3088. "type": "string"
  3089. },
  3090. "config": {
  3091. "anyOf": [
  3092. {
  3093. "$ref": "#/components/schemas/McpLocalConfig"
  3094. },
  3095. {
  3096. "$ref": "#/components/schemas/McpRemoteConfig"
  3097. }
  3098. ]
  3099. }
  3100. },
  3101. "required": ["name", "config"],
  3102. "additionalProperties": false
  3103. }
  3104. }
  3105. }
  3106. },
  3107. "x-codeSamples": [
  3108. {
  3109. "lang": "js",
  3110. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
  3111. }
  3112. ]
  3113. }
  3114. },
  3115. "/mcp/{name}/auth": {
  3116. "post": {
  3117. "tags": ["mcp"],
  3118. "operationId": "mcp.auth.start",
  3119. "parameters": [
  3120. {
  3121. "name": "name",
  3122. "in": "path",
  3123. "schema": {
  3124. "type": "string"
  3125. },
  3126. "required": true
  3127. },
  3128. {
  3129. "name": "directory",
  3130. "in": "query",
  3131. "schema": {
  3132. "type": "string"
  3133. },
  3134. "required": false
  3135. },
  3136. {
  3137. "name": "workspace",
  3138. "in": "query",
  3139. "schema": {
  3140. "type": "string"
  3141. },
  3142. "required": false
  3143. }
  3144. ],
  3145. "responses": {
  3146. "200": {
  3147. "description": "OAuth flow started",
  3148. "content": {
  3149. "application/json": {
  3150. "schema": {
  3151. "type": "object",
  3152. "properties": {
  3153. "authorizationUrl": {
  3154. "type": "string"
  3155. },
  3156. "oauthState": {
  3157. "type": "string"
  3158. }
  3159. },
  3160. "required": ["authorizationUrl", "oauthState"],
  3161. "additionalProperties": false,
  3162. "description": "OAuth flow started"
  3163. }
  3164. }
  3165. }
  3166. },
  3167. "400": {
  3168. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3169. "content": {
  3170. "application/json": {
  3171. "schema": {
  3172. "anyOf": [
  3173. {
  3174. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3175. },
  3176. {
  3177. "$ref": "#/components/schemas/InvalidRequestError"
  3178. }
  3179. ]
  3180. }
  3181. }
  3182. }
  3183. },
  3184. "404": {
  3185. "description": "McpServerNotFoundError",
  3186. "content": {
  3187. "application/json": {
  3188. "schema": {
  3189. "$ref": "#/components/schemas/McpServerNotFoundError"
  3190. }
  3191. }
  3192. }
  3193. }
  3194. },
  3195. "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
  3196. "summary": "Start MCP OAuth",
  3197. "x-codeSamples": [
  3198. {
  3199. "lang": "js",
  3200. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
  3201. }
  3202. ]
  3203. },
  3204. "delete": {
  3205. "tags": ["mcp"],
  3206. "operationId": "mcp.auth.remove",
  3207. "parameters": [
  3208. {
  3209. "name": "name",
  3210. "in": "path",
  3211. "schema": {
  3212. "type": "string"
  3213. },
  3214. "required": true
  3215. },
  3216. {
  3217. "name": "directory",
  3218. "in": "query",
  3219. "schema": {
  3220. "type": "string"
  3221. },
  3222. "required": false
  3223. },
  3224. {
  3225. "name": "workspace",
  3226. "in": "query",
  3227. "schema": {
  3228. "type": "string"
  3229. },
  3230. "required": false
  3231. }
  3232. ],
  3233. "responses": {
  3234. "200": {
  3235. "description": "OAuth credentials removed",
  3236. "content": {
  3237. "application/json": {
  3238. "schema": {
  3239. "type": "object",
  3240. "properties": {
  3241. "success": {
  3242. "type": "boolean",
  3243. "enum": [true]
  3244. }
  3245. },
  3246. "required": ["success"],
  3247. "additionalProperties": false,
  3248. "description": "OAuth credentials removed"
  3249. }
  3250. }
  3251. }
  3252. },
  3253. "400": {
  3254. "description": "Bad request",
  3255. "content": {
  3256. "application/json": {
  3257. "schema": {
  3258. "$ref": "#/components/schemas/BadRequestError"
  3259. }
  3260. }
  3261. }
  3262. },
  3263. "404": {
  3264. "description": "McpServerNotFoundError",
  3265. "content": {
  3266. "application/json": {
  3267. "schema": {
  3268. "$ref": "#/components/schemas/McpServerNotFoundError"
  3269. }
  3270. }
  3271. }
  3272. }
  3273. },
  3274. "description": "Remove OAuth credentials for an MCP server.",
  3275. "summary": "Remove MCP OAuth",
  3276. "x-codeSamples": [
  3277. {
  3278. "lang": "js",
  3279. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
  3280. }
  3281. ]
  3282. }
  3283. },
  3284. "/mcp/{name}/auth/callback": {
  3285. "post": {
  3286. "tags": ["mcp"],
  3287. "operationId": "mcp.auth.callback",
  3288. "parameters": [
  3289. {
  3290. "name": "name",
  3291. "in": "path",
  3292. "schema": {
  3293. "type": "string"
  3294. },
  3295. "required": true
  3296. },
  3297. {
  3298. "name": "directory",
  3299. "in": "query",
  3300. "schema": {
  3301. "type": "string"
  3302. },
  3303. "required": false
  3304. },
  3305. {
  3306. "name": "workspace",
  3307. "in": "query",
  3308. "schema": {
  3309. "type": "string"
  3310. },
  3311. "required": false
  3312. }
  3313. ],
  3314. "responses": {
  3315. "200": {
  3316. "description": "OAuth authentication completed",
  3317. "content": {
  3318. "application/json": {
  3319. "schema": {
  3320. "$ref": "#/components/schemas/MCPStatus"
  3321. }
  3322. }
  3323. }
  3324. },
  3325. "400": {
  3326. "description": "BadRequest | InvalidRequestError",
  3327. "content": {
  3328. "application/json": {
  3329. "schema": {
  3330. "anyOf": [
  3331. {
  3332. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3333. },
  3334. {
  3335. "$ref": "#/components/schemas/InvalidRequestError"
  3336. }
  3337. ]
  3338. }
  3339. }
  3340. }
  3341. },
  3342. "404": {
  3343. "description": "McpServerNotFoundError",
  3344. "content": {
  3345. "application/json": {
  3346. "schema": {
  3347. "$ref": "#/components/schemas/McpServerNotFoundError"
  3348. }
  3349. }
  3350. }
  3351. }
  3352. },
  3353. "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
  3354. "summary": "Complete MCP OAuth",
  3355. "requestBody": {
  3356. "content": {
  3357. "application/json": {
  3358. "schema": {
  3359. "type": "object",
  3360. "properties": {
  3361. "code": {
  3362. "type": "string"
  3363. }
  3364. },
  3365. "required": ["code"],
  3366. "additionalProperties": false
  3367. }
  3368. }
  3369. }
  3370. },
  3371. "x-codeSamples": [
  3372. {
  3373. "lang": "js",
  3374. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
  3375. }
  3376. ]
  3377. }
  3378. },
  3379. "/mcp/{name}/auth/authenticate": {
  3380. "post": {
  3381. "tags": ["mcp"],
  3382. "operationId": "mcp.auth.authenticate",
  3383. "parameters": [
  3384. {
  3385. "name": "name",
  3386. "in": "path",
  3387. "schema": {
  3388. "type": "string"
  3389. },
  3390. "required": true
  3391. },
  3392. {
  3393. "name": "directory",
  3394. "in": "query",
  3395. "schema": {
  3396. "type": "string"
  3397. },
  3398. "required": false
  3399. },
  3400. {
  3401. "name": "workspace",
  3402. "in": "query",
  3403. "schema": {
  3404. "type": "string"
  3405. },
  3406. "required": false
  3407. }
  3408. ],
  3409. "responses": {
  3410. "200": {
  3411. "description": "OAuth authentication completed",
  3412. "content": {
  3413. "application/json": {
  3414. "schema": {
  3415. "$ref": "#/components/schemas/MCPStatus"
  3416. }
  3417. }
  3418. }
  3419. },
  3420. "400": {
  3421. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3422. "content": {
  3423. "application/json": {
  3424. "schema": {
  3425. "anyOf": [
  3426. {
  3427. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3428. },
  3429. {
  3430. "$ref": "#/components/schemas/InvalidRequestError"
  3431. }
  3432. ]
  3433. }
  3434. }
  3435. }
  3436. },
  3437. "404": {
  3438. "description": "McpServerNotFoundError",
  3439. "content": {
  3440. "application/json": {
  3441. "schema": {
  3442. "$ref": "#/components/schemas/McpServerNotFoundError"
  3443. }
  3444. }
  3445. }
  3446. }
  3447. },
  3448. "description": "Start OAuth flow and wait for callback (opens browser).",
  3449. "summary": "Authenticate MCP OAuth",
  3450. "x-codeSamples": [
  3451. {
  3452. "lang": "js",
  3453. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
  3454. }
  3455. ]
  3456. }
  3457. },
  3458. "/mcp/{name}/connect": {
  3459. "post": {
  3460. "tags": ["mcp"],
  3461. "operationId": "mcp.connect",
  3462. "parameters": [
  3463. {
  3464. "name": "name",
  3465. "in": "path",
  3466. "schema": {
  3467. "type": "string"
  3468. },
  3469. "required": true
  3470. },
  3471. {
  3472. "name": "directory",
  3473. "in": "query",
  3474. "schema": {
  3475. "type": "string"
  3476. },
  3477. "required": false
  3478. },
  3479. {
  3480. "name": "workspace",
  3481. "in": "query",
  3482. "schema": {
  3483. "type": "string"
  3484. },
  3485. "required": false
  3486. }
  3487. ],
  3488. "responses": {
  3489. "200": {
  3490. "description": "MCP server connected successfully",
  3491. "content": {
  3492. "application/json": {
  3493. "schema": {
  3494. "type": "boolean",
  3495. "description": "MCP server connected successfully"
  3496. }
  3497. }
  3498. }
  3499. },
  3500. "400": {
  3501. "description": "Bad request",
  3502. "content": {
  3503. "application/json": {
  3504. "schema": {
  3505. "$ref": "#/components/schemas/BadRequestError"
  3506. }
  3507. }
  3508. }
  3509. },
  3510. "404": {
  3511. "description": "McpServerNotFoundError",
  3512. "content": {
  3513. "application/json": {
  3514. "schema": {
  3515. "$ref": "#/components/schemas/McpServerNotFoundError"
  3516. }
  3517. }
  3518. }
  3519. }
  3520. },
  3521. "description": "Connect an MCP server.",
  3522. "x-codeSamples": [
  3523. {
  3524. "lang": "js",
  3525. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
  3526. }
  3527. ]
  3528. }
  3529. },
  3530. "/mcp/{name}/disconnect": {
  3531. "post": {
  3532. "tags": ["mcp"],
  3533. "operationId": "mcp.disconnect",
  3534. "parameters": [
  3535. {
  3536. "name": "name",
  3537. "in": "path",
  3538. "schema": {
  3539. "type": "string"
  3540. },
  3541. "required": true
  3542. },
  3543. {
  3544. "name": "directory",
  3545. "in": "query",
  3546. "schema": {
  3547. "type": "string"
  3548. },
  3549. "required": false
  3550. },
  3551. {
  3552. "name": "workspace",
  3553. "in": "query",
  3554. "schema": {
  3555. "type": "string"
  3556. },
  3557. "required": false
  3558. }
  3559. ],
  3560. "responses": {
  3561. "200": {
  3562. "description": "MCP server disconnected successfully",
  3563. "content": {
  3564. "application/json": {
  3565. "schema": {
  3566. "type": "boolean",
  3567. "description": "MCP server disconnected successfully"
  3568. }
  3569. }
  3570. }
  3571. },
  3572. "400": {
  3573. "description": "Bad request",
  3574. "content": {
  3575. "application/json": {
  3576. "schema": {
  3577. "$ref": "#/components/schemas/BadRequestError"
  3578. }
  3579. }
  3580. }
  3581. },
  3582. "404": {
  3583. "description": "McpServerNotFoundError",
  3584. "content": {
  3585. "application/json": {
  3586. "schema": {
  3587. "$ref": "#/components/schemas/McpServerNotFoundError"
  3588. }
  3589. }
  3590. }
  3591. }
  3592. },
  3593. "description": "Disconnect an MCP server.",
  3594. "x-codeSamples": [
  3595. {
  3596. "lang": "js",
  3597. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
  3598. }
  3599. ]
  3600. }
  3601. },
  3602. "/project": {
  3603. "get": {
  3604. "tags": ["project"],
  3605. "operationId": "project.list",
  3606. "parameters": [
  3607. {
  3608. "name": "directory",
  3609. "in": "query",
  3610. "schema": {
  3611. "type": "string"
  3612. },
  3613. "required": false
  3614. },
  3615. {
  3616. "name": "workspace",
  3617. "in": "query",
  3618. "schema": {
  3619. "type": "string"
  3620. },
  3621. "required": false
  3622. }
  3623. ],
  3624. "responses": {
  3625. "200": {
  3626. "description": "List of projects",
  3627. "content": {
  3628. "application/json": {
  3629. "schema": {
  3630. "type": "array",
  3631. "items": {
  3632. "$ref": "#/components/schemas/Project"
  3633. },
  3634. "description": "List of projects"
  3635. }
  3636. }
  3637. }
  3638. },
  3639. "400": {
  3640. "description": "Bad request",
  3641. "content": {
  3642. "application/json": {
  3643. "schema": {
  3644. "$ref": "#/components/schemas/BadRequestError"
  3645. }
  3646. }
  3647. }
  3648. }
  3649. },
  3650. "description": "Get a list of projects that have been opened with OpenCode.",
  3651. "summary": "List all projects",
  3652. "x-codeSamples": [
  3653. {
  3654. "lang": "js",
  3655. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.list({\n ...\n})"
  3656. }
  3657. ]
  3658. }
  3659. },
  3660. "/project/current": {
  3661. "get": {
  3662. "tags": ["project"],
  3663. "operationId": "project.current",
  3664. "parameters": [
  3665. {
  3666. "name": "directory",
  3667. "in": "query",
  3668. "schema": {
  3669. "type": "string"
  3670. },
  3671. "required": false
  3672. },
  3673. {
  3674. "name": "workspace",
  3675. "in": "query",
  3676. "schema": {
  3677. "type": "string"
  3678. },
  3679. "required": false
  3680. }
  3681. ],
  3682. "responses": {
  3683. "200": {
  3684. "description": "Current project information",
  3685. "content": {
  3686. "application/json": {
  3687. "schema": {
  3688. "$ref": "#/components/schemas/Project"
  3689. }
  3690. }
  3691. }
  3692. },
  3693. "400": {
  3694. "description": "Bad request",
  3695. "content": {
  3696. "application/json": {
  3697. "schema": {
  3698. "$ref": "#/components/schemas/BadRequestError"
  3699. }
  3700. }
  3701. }
  3702. }
  3703. },
  3704. "description": "Retrieve the currently active project that OpenCode is working with.",
  3705. "summary": "Get current project",
  3706. "x-codeSamples": [
  3707. {
  3708. "lang": "js",
  3709. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.current({\n ...\n})"
  3710. }
  3711. ]
  3712. }
  3713. },
  3714. "/project/git/init": {
  3715. "post": {
  3716. "tags": ["project"],
  3717. "operationId": "project.initGit",
  3718. "parameters": [
  3719. {
  3720. "name": "directory",
  3721. "in": "query",
  3722. "schema": {
  3723. "type": "string"
  3724. },
  3725. "required": false
  3726. },
  3727. {
  3728. "name": "workspace",
  3729. "in": "query",
  3730. "schema": {
  3731. "type": "string"
  3732. },
  3733. "required": false
  3734. }
  3735. ],
  3736. "responses": {
  3737. "200": {
  3738. "description": "Project information after git initialization",
  3739. "content": {
  3740. "application/json": {
  3741. "schema": {
  3742. "$ref": "#/components/schemas/Project"
  3743. }
  3744. }
  3745. }
  3746. },
  3747. "400": {
  3748. "description": "Bad request",
  3749. "content": {
  3750. "application/json": {
  3751. "schema": {
  3752. "$ref": "#/components/schemas/BadRequestError"
  3753. }
  3754. }
  3755. }
  3756. }
  3757. },
  3758. "description": "Create a git repository for the current project and return the refreshed project info.",
  3759. "summary": "Initialize git repository",
  3760. "x-codeSamples": [
  3761. {
  3762. "lang": "js",
  3763. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.initGit({\n ...\n})"
  3764. }
  3765. ]
  3766. }
  3767. },
  3768. "/project/{projectID}": {
  3769. "patch": {
  3770. "tags": ["project"],
  3771. "operationId": "project.update",
  3772. "parameters": [
  3773. {
  3774. "name": "projectID",
  3775. "in": "path",
  3776. "schema": {
  3777. "type": "string"
  3778. },
  3779. "required": true
  3780. },
  3781. {
  3782. "name": "directory",
  3783. "in": "query",
  3784. "schema": {
  3785. "type": "string"
  3786. },
  3787. "required": false
  3788. },
  3789. {
  3790. "name": "workspace",
  3791. "in": "query",
  3792. "schema": {
  3793. "type": "string"
  3794. },
  3795. "required": false
  3796. }
  3797. ],
  3798. "responses": {
  3799. "200": {
  3800. "description": "Updated project information",
  3801. "content": {
  3802. "application/json": {
  3803. "schema": {
  3804. "$ref": "#/components/schemas/Project"
  3805. }
  3806. }
  3807. }
  3808. },
  3809. "400": {
  3810. "description": "BadRequest | InvalidRequestError",
  3811. "content": {
  3812. "application/json": {
  3813. "schema": {
  3814. "anyOf": [
  3815. {
  3816. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3817. },
  3818. {
  3819. "$ref": "#/components/schemas/InvalidRequestError"
  3820. }
  3821. ]
  3822. }
  3823. }
  3824. }
  3825. },
  3826. "404": {
  3827. "description": "ProjectNotFoundError",
  3828. "content": {
  3829. "application/json": {
  3830. "schema": {
  3831. "$ref": "#/components/schemas/ProjectNotFoundError"
  3832. }
  3833. }
  3834. }
  3835. }
  3836. },
  3837. "description": "Update project properties such as name, icon, and commands.",
  3838. "summary": "Update project",
  3839. "requestBody": {
  3840. "content": {
  3841. "application/json": {
  3842. "schema": {
  3843. "type": "object",
  3844. "properties": {
  3845. "name": {
  3846. "type": "string"
  3847. },
  3848. "icon": {
  3849. "type": "object",
  3850. "properties": {
  3851. "url": {
  3852. "type": "string"
  3853. },
  3854. "override": {
  3855. "type": "string"
  3856. },
  3857. "color": {
  3858. "type": "string"
  3859. }
  3860. },
  3861. "additionalProperties": false
  3862. },
  3863. "commands": {
  3864. "type": "object",
  3865. "properties": {
  3866. "start": {
  3867. "type": "string",
  3868. "description": "Startup script to run when creating a new workspace (worktree)"
  3869. }
  3870. },
  3871. "additionalProperties": false
  3872. }
  3873. },
  3874. "additionalProperties": false
  3875. }
  3876. }
  3877. }
  3878. },
  3879. "x-codeSamples": [
  3880. {
  3881. "lang": "js",
  3882. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.update({\n ...\n})"
  3883. }
  3884. ]
  3885. }
  3886. },
  3887. "/project/{projectID}/directories": {
  3888. "get": {
  3889. "tags": ["project"],
  3890. "operationId": "project.directories",
  3891. "parameters": [
  3892. {
  3893. "name": "projectID",
  3894. "in": "path",
  3895. "schema": {
  3896. "type": "string"
  3897. },
  3898. "required": true
  3899. },
  3900. {
  3901. "name": "directory",
  3902. "in": "query",
  3903. "schema": {
  3904. "type": "string"
  3905. },
  3906. "required": false
  3907. },
  3908. {
  3909. "name": "workspace",
  3910. "in": "query",
  3911. "schema": {
  3912. "type": "string"
  3913. },
  3914. "required": false
  3915. }
  3916. ],
  3917. "responses": {
  3918. "200": {
  3919. "description": "Project directories",
  3920. "content": {
  3921. "application/json": {
  3922. "schema": {
  3923. "$ref": "#/components/schemas/ProjectDirectories"
  3924. }
  3925. }
  3926. }
  3927. },
  3928. "400": {
  3929. "description": "Bad request",
  3930. "content": {
  3931. "application/json": {
  3932. "schema": {
  3933. "$ref": "#/components/schemas/BadRequestError"
  3934. }
  3935. }
  3936. }
  3937. }
  3938. },
  3939. "description": "List known local absolute directories for a project.",
  3940. "summary": "List project directories",
  3941. "x-codeSamples": [
  3942. {
  3943. "lang": "js",
  3944. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.directories({\n ...\n})"
  3945. }
  3946. ]
  3947. }
  3948. },
  3949. "/experimental/project/{projectID}/copy/generate-name": {
  3950. "post": {
  3951. "tags": ["projectCopy"],
  3952. "operationId": "experimental.projectCopy.generateName",
  3953. "parameters": [
  3954. {
  3955. "name": "projectID",
  3956. "in": "path",
  3957. "schema": {
  3958. "type": "string"
  3959. },
  3960. "required": true
  3961. },
  3962. {
  3963. "name": "directory",
  3964. "in": "query",
  3965. "schema": {
  3966. "type": "string"
  3967. },
  3968. "required": false
  3969. },
  3970. {
  3971. "name": "workspace",
  3972. "in": "query",
  3973. "schema": {
  3974. "type": "string"
  3975. },
  3976. "required": false
  3977. }
  3978. ],
  3979. "responses": {
  3980. "200": {
  3981. "description": "Success",
  3982. "content": {
  3983. "application/json": {
  3984. "schema": {
  3985. "type": "object",
  3986. "properties": {
  3987. "name": {
  3988. "type": "string"
  3989. }
  3990. },
  3991. "required": ["name"],
  3992. "additionalProperties": false
  3993. }
  3994. }
  3995. }
  3996. },
  3997. "400": {
  3998. "description": "Bad request",
  3999. "content": {
  4000. "application/json": {
  4001. "schema": {
  4002. "$ref": "#/components/schemas/BadRequestError"
  4003. }
  4004. }
  4005. }
  4006. }
  4007. },
  4008. "description": "Generate a short name for a project copy from task context.",
  4009. "summary": "Generate project copy name",
  4010. "requestBody": {
  4011. "content": {
  4012. "application/json": {
  4013. "schema": {
  4014. "type": "object",
  4015. "properties": {
  4016. "context": {
  4017. "type": "string"
  4018. }
  4019. },
  4020. "additionalProperties": false
  4021. }
  4022. }
  4023. }
  4024. },
  4025. "x-codeSamples": [
  4026. {
  4027. "lang": "js",
  4028. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.projectCopy.generateName({\n ...\n})"
  4029. }
  4030. ]
  4031. }
  4032. },
  4033. "/pty/shells": {
  4034. "get": {
  4035. "tags": ["pty"],
  4036. "operationId": "pty.shells",
  4037. "parameters": [
  4038. {
  4039. "name": "directory",
  4040. "in": "query",
  4041. "schema": {
  4042. "type": "string"
  4043. },
  4044. "required": false
  4045. },
  4046. {
  4047. "name": "workspace",
  4048. "in": "query",
  4049. "schema": {
  4050. "type": "string"
  4051. },
  4052. "required": false
  4053. }
  4054. ],
  4055. "responses": {
  4056. "200": {
  4057. "description": "List of shells",
  4058. "content": {
  4059. "application/json": {
  4060. "schema": {
  4061. "type": "array",
  4062. "items": {
  4063. "type": "object",
  4064. "properties": {
  4065. "path": {
  4066. "type": "string"
  4067. },
  4068. "name": {
  4069. "type": "string"
  4070. },
  4071. "acceptable": {
  4072. "type": "boolean"
  4073. }
  4074. },
  4075. "required": ["path", "name", "acceptable"],
  4076. "additionalProperties": false
  4077. },
  4078. "description": "List of shells"
  4079. }
  4080. }
  4081. }
  4082. },
  4083. "400": {
  4084. "description": "Bad request",
  4085. "content": {
  4086. "application/json": {
  4087. "schema": {
  4088. "$ref": "#/components/schemas/BadRequestError"
  4089. }
  4090. }
  4091. }
  4092. }
  4093. },
  4094. "description": "Get a list of available shells on the system.",
  4095. "summary": "List available shells",
  4096. "x-codeSamples": [
  4097. {
  4098. "lang": "js",
  4099. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.shells({\n ...\n})"
  4100. }
  4101. ]
  4102. }
  4103. },
  4104. "/pty": {
  4105. "get": {
  4106. "tags": ["pty"],
  4107. "operationId": "pty.list",
  4108. "parameters": [
  4109. {
  4110. "name": "directory",
  4111. "in": "query",
  4112. "schema": {
  4113. "type": "string"
  4114. },
  4115. "required": false
  4116. },
  4117. {
  4118. "name": "workspace",
  4119. "in": "query",
  4120. "schema": {
  4121. "type": "string"
  4122. },
  4123. "required": false
  4124. }
  4125. ],
  4126. "responses": {
  4127. "200": {
  4128. "description": "List of sessions",
  4129. "content": {
  4130. "application/json": {
  4131. "schema": {
  4132. "type": "array",
  4133. "items": {
  4134. "$ref": "#/components/schemas/Pty"
  4135. },
  4136. "description": "List of sessions"
  4137. }
  4138. }
  4139. }
  4140. },
  4141. "400": {
  4142. "description": "Bad request",
  4143. "content": {
  4144. "application/json": {
  4145. "schema": {
  4146. "$ref": "#/components/schemas/BadRequestError"
  4147. }
  4148. }
  4149. }
  4150. }
  4151. },
  4152. "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
  4153. "summary": "List PTY sessions",
  4154. "x-codeSamples": [
  4155. {
  4156. "lang": "js",
  4157. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
  4158. }
  4159. ]
  4160. },
  4161. "post": {
  4162. "tags": ["pty"],
  4163. "operationId": "pty.create",
  4164. "parameters": [
  4165. {
  4166. "name": "directory",
  4167. "in": "query",
  4168. "schema": {
  4169. "type": "string"
  4170. },
  4171. "required": false
  4172. },
  4173. {
  4174. "name": "workspace",
  4175. "in": "query",
  4176. "schema": {
  4177. "type": "string"
  4178. },
  4179. "required": false
  4180. }
  4181. ],
  4182. "responses": {
  4183. "200": {
  4184. "description": "Created session",
  4185. "content": {
  4186. "application/json": {
  4187. "schema": {
  4188. "$ref": "#/components/schemas/Pty"
  4189. }
  4190. }
  4191. }
  4192. },
  4193. "400": {
  4194. "description": "BadRequest | InvalidRequestError",
  4195. "content": {
  4196. "application/json": {
  4197. "schema": {
  4198. "anyOf": [
  4199. {
  4200. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4201. },
  4202. {
  4203. "$ref": "#/components/schemas/InvalidRequestError"
  4204. }
  4205. ]
  4206. }
  4207. }
  4208. }
  4209. }
  4210. },
  4211. "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
  4212. "summary": "Create PTY session",
  4213. "requestBody": {
  4214. "content": {
  4215. "application/json": {
  4216. "schema": {
  4217. "type": "object",
  4218. "properties": {
  4219. "command": {
  4220. "type": "string"
  4221. },
  4222. "args": {
  4223. "type": "array",
  4224. "items": {
  4225. "type": "string"
  4226. }
  4227. },
  4228. "cwd": {
  4229. "type": "string"
  4230. },
  4231. "title": {
  4232. "type": "string"
  4233. },
  4234. "env": {
  4235. "type": "object",
  4236. "additionalProperties": {
  4237. "type": "string"
  4238. }
  4239. }
  4240. },
  4241. "additionalProperties": false
  4242. }
  4243. }
  4244. }
  4245. },
  4246. "x-codeSamples": [
  4247. {
  4248. "lang": "js",
  4249. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
  4250. }
  4251. ]
  4252. }
  4253. },
  4254. "/pty/{ptyID}": {
  4255. "get": {
  4256. "tags": ["pty"],
  4257. "operationId": "pty.get",
  4258. "parameters": [
  4259. {
  4260. "name": "ptyID",
  4261. "in": "path",
  4262. "schema": {
  4263. "type": "string",
  4264. "pattern": "^pty"
  4265. },
  4266. "required": true
  4267. },
  4268. {
  4269. "name": "directory",
  4270. "in": "query",
  4271. "schema": {
  4272. "type": "string"
  4273. },
  4274. "required": false
  4275. },
  4276. {
  4277. "name": "workspace",
  4278. "in": "query",
  4279. "schema": {
  4280. "type": "string"
  4281. },
  4282. "required": false
  4283. }
  4284. ],
  4285. "responses": {
  4286. "200": {
  4287. "description": "Session info",
  4288. "content": {
  4289. "application/json": {
  4290. "schema": {
  4291. "$ref": "#/components/schemas/Pty"
  4292. }
  4293. }
  4294. }
  4295. },
  4296. "400": {
  4297. "description": "Bad request",
  4298. "content": {
  4299. "application/json": {
  4300. "schema": {
  4301. "$ref": "#/components/schemas/BadRequestError"
  4302. }
  4303. }
  4304. }
  4305. },
  4306. "404": {
  4307. "description": "PtyNotFoundError",
  4308. "content": {
  4309. "application/json": {
  4310. "schema": {
  4311. "$ref": "#/components/schemas/PtyNotFoundError"
  4312. }
  4313. }
  4314. }
  4315. }
  4316. },
  4317. "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
  4318. "summary": "Get PTY session",
  4319. "x-codeSamples": [
  4320. {
  4321. "lang": "js",
  4322. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
  4323. }
  4324. ]
  4325. },
  4326. "put": {
  4327. "tags": ["pty"],
  4328. "operationId": "pty.update",
  4329. "parameters": [
  4330. {
  4331. "name": "ptyID",
  4332. "in": "path",
  4333. "schema": {
  4334. "type": "string",
  4335. "pattern": "^pty"
  4336. },
  4337. "required": true
  4338. },
  4339. {
  4340. "name": "directory",
  4341. "in": "query",
  4342. "schema": {
  4343. "type": "string"
  4344. },
  4345. "required": false
  4346. },
  4347. {
  4348. "name": "workspace",
  4349. "in": "query",
  4350. "schema": {
  4351. "type": "string"
  4352. },
  4353. "required": false
  4354. }
  4355. ],
  4356. "responses": {
  4357. "200": {
  4358. "description": "Updated session",
  4359. "content": {
  4360. "application/json": {
  4361. "schema": {
  4362. "$ref": "#/components/schemas/Pty"
  4363. }
  4364. }
  4365. }
  4366. },
  4367. "400": {
  4368. "description": "BadRequest | InvalidRequestError",
  4369. "content": {
  4370. "application/json": {
  4371. "schema": {
  4372. "anyOf": [
  4373. {
  4374. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4375. },
  4376. {
  4377. "$ref": "#/components/schemas/InvalidRequestError"
  4378. }
  4379. ]
  4380. }
  4381. }
  4382. }
  4383. },
  4384. "404": {
  4385. "description": "PtyNotFoundError",
  4386. "content": {
  4387. "application/json": {
  4388. "schema": {
  4389. "$ref": "#/components/schemas/PtyNotFoundError"
  4390. }
  4391. }
  4392. }
  4393. }
  4394. },
  4395. "description": "Update properties of an existing pseudo-terminal (PTY) session.",
  4396. "summary": "Update PTY session",
  4397. "requestBody": {
  4398. "content": {
  4399. "application/json": {
  4400. "schema": {
  4401. "type": "object",
  4402. "properties": {
  4403. "title": {
  4404. "type": "string"
  4405. },
  4406. "size": {
  4407. "type": "object",
  4408. "properties": {
  4409. "rows": {
  4410. "type": "integer",
  4411. "exclusiveMinimum": 0
  4412. },
  4413. "cols": {
  4414. "type": "integer",
  4415. "exclusiveMinimum": 0
  4416. }
  4417. },
  4418. "required": ["rows", "cols"],
  4419. "additionalProperties": false
  4420. }
  4421. },
  4422. "additionalProperties": false
  4423. }
  4424. }
  4425. }
  4426. },
  4427. "x-codeSamples": [
  4428. {
  4429. "lang": "js",
  4430. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
  4431. }
  4432. ]
  4433. },
  4434. "delete": {
  4435. "tags": ["pty"],
  4436. "operationId": "pty.remove",
  4437. "parameters": [
  4438. {
  4439. "name": "ptyID",
  4440. "in": "path",
  4441. "schema": {
  4442. "type": "string",
  4443. "pattern": "^pty"
  4444. },
  4445. "required": true
  4446. },
  4447. {
  4448. "name": "directory",
  4449. "in": "query",
  4450. "schema": {
  4451. "type": "string"
  4452. },
  4453. "required": false
  4454. },
  4455. {
  4456. "name": "workspace",
  4457. "in": "query",
  4458. "schema": {
  4459. "type": "string"
  4460. },
  4461. "required": false
  4462. }
  4463. ],
  4464. "responses": {
  4465. "200": {
  4466. "description": "Session removed",
  4467. "content": {
  4468. "application/json": {
  4469. "schema": {
  4470. "type": "boolean",
  4471. "description": "Session removed"
  4472. }
  4473. }
  4474. }
  4475. },
  4476. "400": {
  4477. "description": "Bad request",
  4478. "content": {
  4479. "application/json": {
  4480. "schema": {
  4481. "$ref": "#/components/schemas/BadRequestError"
  4482. }
  4483. }
  4484. }
  4485. },
  4486. "404": {
  4487. "description": "PtyNotFoundError",
  4488. "content": {
  4489. "application/json": {
  4490. "schema": {
  4491. "$ref": "#/components/schemas/PtyNotFoundError"
  4492. }
  4493. }
  4494. }
  4495. }
  4496. },
  4497. "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
  4498. "summary": "Remove PTY session",
  4499. "x-codeSamples": [
  4500. {
  4501. "lang": "js",
  4502. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
  4503. }
  4504. ]
  4505. }
  4506. },
  4507. "/pty/{ptyID}/connect-token": {
  4508. "post": {
  4509. "tags": ["pty"],
  4510. "operationId": "pty.connectToken",
  4511. "parameters": [
  4512. {
  4513. "name": "ptyID",
  4514. "in": "path",
  4515. "schema": {
  4516. "type": "string",
  4517. "pattern": "^pty"
  4518. },
  4519. "required": true
  4520. },
  4521. {
  4522. "name": "directory",
  4523. "in": "query",
  4524. "schema": {
  4525. "type": "string"
  4526. },
  4527. "required": false
  4528. },
  4529. {
  4530. "name": "workspace",
  4531. "in": "query",
  4532. "schema": {
  4533. "type": "string"
  4534. },
  4535. "required": false
  4536. }
  4537. ],
  4538. "responses": {
  4539. "200": {
  4540. "description": "WebSocket connect token",
  4541. "content": {
  4542. "application/json": {
  4543. "schema": {
  4544. "type": "object",
  4545. "properties": {
  4546. "ticket": {
  4547. "type": "string"
  4548. },
  4549. "expires_in": {
  4550. "type": "integer",
  4551. "exclusiveMinimum": 0
  4552. }
  4553. },
  4554. "required": ["ticket", "expires_in"],
  4555. "additionalProperties": false,
  4556. "description": "WebSocket connect token"
  4557. }
  4558. }
  4559. }
  4560. },
  4561. "400": {
  4562. "description": "Bad request",
  4563. "content": {
  4564. "application/json": {
  4565. "schema": {
  4566. "$ref": "#/components/schemas/BadRequestError"
  4567. }
  4568. }
  4569. }
  4570. },
  4571. "403": {
  4572. "description": "PtyForbiddenError",
  4573. "content": {
  4574. "application/json": {
  4575. "schema": {
  4576. "$ref": "#/components/schemas/PtyForbiddenError"
  4577. }
  4578. }
  4579. }
  4580. },
  4581. "404": {
  4582. "description": "PtyNotFoundError",
  4583. "content": {
  4584. "application/json": {
  4585. "schema": {
  4586. "$ref": "#/components/schemas/PtyNotFoundError"
  4587. }
  4588. }
  4589. }
  4590. }
  4591. },
  4592. "description": "Create a short-lived ticket for opening a PTY WebSocket connection.",
  4593. "summary": "Create PTY WebSocket token",
  4594. "x-codeSamples": [
  4595. {
  4596. "lang": "js",
  4597. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connectToken({\n ...\n})"
  4598. }
  4599. ]
  4600. }
  4601. },
  4602. "/question": {
  4603. "get": {
  4604. "tags": ["question"],
  4605. "operationId": "question.list",
  4606. "parameters": [
  4607. {
  4608. "name": "directory",
  4609. "in": "query",
  4610. "schema": {
  4611. "type": "string"
  4612. },
  4613. "required": false
  4614. },
  4615. {
  4616. "name": "workspace",
  4617. "in": "query",
  4618. "schema": {
  4619. "type": "string"
  4620. },
  4621. "required": false
  4622. }
  4623. ],
  4624. "responses": {
  4625. "200": {
  4626. "description": "List of pending questions",
  4627. "content": {
  4628. "application/json": {
  4629. "schema": {
  4630. "type": "array",
  4631. "items": {
  4632. "$ref": "#/components/schemas/QuestionRequest"
  4633. },
  4634. "description": "List of pending questions"
  4635. }
  4636. }
  4637. }
  4638. },
  4639. "400": {
  4640. "description": "Bad request",
  4641. "content": {
  4642. "application/json": {
  4643. "schema": {
  4644. "$ref": "#/components/schemas/BadRequestError"
  4645. }
  4646. }
  4647. }
  4648. }
  4649. },
  4650. "description": "Get all pending question requests across all sessions.",
  4651. "summary": "List pending questions",
  4652. "x-codeSamples": [
  4653. {
  4654. "lang": "js",
  4655. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
  4656. }
  4657. ]
  4658. }
  4659. },
  4660. "/question/{requestID}/reply": {
  4661. "post": {
  4662. "tags": ["question"],
  4663. "operationId": "question.reply",
  4664. "parameters": [
  4665. {
  4666. "name": "requestID",
  4667. "in": "path",
  4668. "schema": {
  4669. "type": "string",
  4670. "pattern": "^que"
  4671. },
  4672. "required": true
  4673. },
  4674. {
  4675. "name": "directory",
  4676. "in": "query",
  4677. "schema": {
  4678. "type": "string"
  4679. },
  4680. "required": false
  4681. },
  4682. {
  4683. "name": "workspace",
  4684. "in": "query",
  4685. "schema": {
  4686. "type": "string"
  4687. },
  4688. "required": false
  4689. }
  4690. ],
  4691. "responses": {
  4692. "200": {
  4693. "description": "Question answered successfully",
  4694. "content": {
  4695. "application/json": {
  4696. "schema": {
  4697. "type": "boolean",
  4698. "description": "Question answered successfully"
  4699. }
  4700. }
  4701. }
  4702. },
  4703. "400": {
  4704. "description": "BadRequest | InvalidRequestError",
  4705. "content": {
  4706. "application/json": {
  4707. "schema": {
  4708. "anyOf": [
  4709. {
  4710. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4711. },
  4712. {
  4713. "$ref": "#/components/schemas/InvalidRequestError"
  4714. }
  4715. ]
  4716. }
  4717. }
  4718. }
  4719. },
  4720. "404": {
  4721. "description": "QuestionNotFoundError",
  4722. "content": {
  4723. "application/json": {
  4724. "schema": {
  4725. "$ref": "#/components/schemas/QuestionNotFoundError"
  4726. }
  4727. }
  4728. }
  4729. }
  4730. },
  4731. "description": "Provide answers to a question request from the AI assistant.",
  4732. "summary": "Reply to question request",
  4733. "requestBody": {
  4734. "content": {
  4735. "application/json": {
  4736. "schema": {
  4737. "type": "object",
  4738. "properties": {
  4739. "answers": {
  4740. "type": "array",
  4741. "items": {
  4742. "$ref": "#/components/schemas/QuestionAnswer"
  4743. },
  4744. "description": "User answers in order of questions (each answer is an array of selected labels)"
  4745. }
  4746. },
  4747. "required": ["answers"],
  4748. "additionalProperties": false
  4749. }
  4750. }
  4751. }
  4752. },
  4753. "x-codeSamples": [
  4754. {
  4755. "lang": "js",
  4756. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
  4757. }
  4758. ]
  4759. }
  4760. },
  4761. "/question/{requestID}/reject": {
  4762. "post": {
  4763. "tags": ["question"],
  4764. "operationId": "question.reject",
  4765. "parameters": [
  4766. {
  4767. "name": "requestID",
  4768. "in": "path",
  4769. "schema": {
  4770. "type": "string",
  4771. "pattern": "^que"
  4772. },
  4773. "required": true
  4774. },
  4775. {
  4776. "name": "directory",
  4777. "in": "query",
  4778. "schema": {
  4779. "type": "string"
  4780. },
  4781. "required": false
  4782. },
  4783. {
  4784. "name": "workspace",
  4785. "in": "query",
  4786. "schema": {
  4787. "type": "string"
  4788. },
  4789. "required": false
  4790. }
  4791. ],
  4792. "responses": {
  4793. "200": {
  4794. "description": "Question rejected successfully",
  4795. "content": {
  4796. "application/json": {
  4797. "schema": {
  4798. "type": "boolean",
  4799. "description": "Question rejected successfully"
  4800. }
  4801. }
  4802. }
  4803. },
  4804. "400": {
  4805. "description": "BadRequest | InvalidRequestError",
  4806. "content": {
  4807. "application/json": {
  4808. "schema": {
  4809. "anyOf": [
  4810. {
  4811. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4812. },
  4813. {
  4814. "$ref": "#/components/schemas/InvalidRequestError"
  4815. }
  4816. ]
  4817. }
  4818. }
  4819. }
  4820. },
  4821. "404": {
  4822. "description": "QuestionNotFoundError",
  4823. "content": {
  4824. "application/json": {
  4825. "schema": {
  4826. "$ref": "#/components/schemas/QuestionNotFoundError"
  4827. }
  4828. }
  4829. }
  4830. }
  4831. },
  4832. "description": "Reject a question request from the AI assistant.",
  4833. "summary": "Reject question request",
  4834. "x-codeSamples": [
  4835. {
  4836. "lang": "js",
  4837. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
  4838. }
  4839. ]
  4840. }
  4841. },
  4842. "/permission": {
  4843. "get": {
  4844. "tags": ["permission"],
  4845. "operationId": "permission.list",
  4846. "parameters": [
  4847. {
  4848. "name": "directory",
  4849. "in": "query",
  4850. "schema": {
  4851. "type": "string"
  4852. },
  4853. "required": false
  4854. },
  4855. {
  4856. "name": "workspace",
  4857. "in": "query",
  4858. "schema": {
  4859. "type": "string"
  4860. },
  4861. "required": false
  4862. }
  4863. ],
  4864. "responses": {
  4865. "200": {
  4866. "description": "List of pending permissions",
  4867. "content": {
  4868. "application/json": {
  4869. "schema": {
  4870. "type": "array",
  4871. "items": {
  4872. "$ref": "#/components/schemas/PermissionRequest"
  4873. },
  4874. "description": "List of pending permissions"
  4875. }
  4876. }
  4877. }
  4878. },
  4879. "400": {
  4880. "description": "Bad request",
  4881. "content": {
  4882. "application/json": {
  4883. "schema": {
  4884. "$ref": "#/components/schemas/BadRequestError"
  4885. }
  4886. }
  4887. }
  4888. }
  4889. },
  4890. "description": "Get all pending permission requests across all sessions.",
  4891. "summary": "List pending permissions",
  4892. "x-codeSamples": [
  4893. {
  4894. "lang": "js",
  4895. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
  4896. }
  4897. ]
  4898. }
  4899. },
  4900. "/permission/{requestID}/reply": {
  4901. "post": {
  4902. "tags": ["permission"],
  4903. "operationId": "permission.reply",
  4904. "parameters": [
  4905. {
  4906. "name": "requestID",
  4907. "in": "path",
  4908. "schema": {
  4909. "type": "string",
  4910. "pattern": "^per"
  4911. },
  4912. "required": true
  4913. },
  4914. {
  4915. "name": "directory",
  4916. "in": "query",
  4917. "schema": {
  4918. "type": "string"
  4919. },
  4920. "required": false
  4921. },
  4922. {
  4923. "name": "workspace",
  4924. "in": "query",
  4925. "schema": {
  4926. "type": "string"
  4927. },
  4928. "required": false
  4929. }
  4930. ],
  4931. "responses": {
  4932. "200": {
  4933. "description": "Permission processed successfully",
  4934. "content": {
  4935. "application/json": {
  4936. "schema": {
  4937. "type": "boolean",
  4938. "description": "Permission processed successfully"
  4939. }
  4940. }
  4941. }
  4942. },
  4943. "400": {
  4944. "description": "BadRequest | InvalidRequestError",
  4945. "content": {
  4946. "application/json": {
  4947. "schema": {
  4948. "anyOf": [
  4949. {
  4950. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4951. },
  4952. {
  4953. "$ref": "#/components/schemas/InvalidRequestError"
  4954. }
  4955. ]
  4956. }
  4957. }
  4958. }
  4959. },
  4960. "404": {
  4961. "description": "PermissionNotFoundError",
  4962. "content": {
  4963. "application/json": {
  4964. "schema": {
  4965. "$ref": "#/components/schemas/PermissionNotFoundError"
  4966. }
  4967. }
  4968. }
  4969. }
  4970. },
  4971. "description": "Approve or deny a permission request from the AI assistant.",
  4972. "summary": "Respond to permission request",
  4973. "requestBody": {
  4974. "content": {
  4975. "application/json": {
  4976. "schema": {
  4977. "type": "object",
  4978. "properties": {
  4979. "reply": {
  4980. "type": "string",
  4981. "enum": ["once", "always", "reject"]
  4982. },
  4983. "message": {
  4984. "type": "string"
  4985. }
  4986. },
  4987. "required": ["reply"],
  4988. "additionalProperties": false
  4989. }
  4990. }
  4991. }
  4992. },
  4993. "x-codeSamples": [
  4994. {
  4995. "lang": "js",
  4996. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
  4997. }
  4998. ]
  4999. }
  5000. },
  5001. "/provider": {
  5002. "get": {
  5003. "tags": ["provider"],
  5004. "operationId": "provider.list",
  5005. "parameters": [
  5006. {
  5007. "name": "directory",
  5008. "in": "query",
  5009. "schema": {
  5010. "type": "string"
  5011. },
  5012. "required": false
  5013. },
  5014. {
  5015. "name": "workspace",
  5016. "in": "query",
  5017. "schema": {
  5018. "type": "string"
  5019. },
  5020. "required": false
  5021. }
  5022. ],
  5023. "responses": {
  5024. "200": {
  5025. "description": "List of providers",
  5026. "content": {
  5027. "application/json": {
  5028. "schema": {
  5029. "type": "object",
  5030. "properties": {
  5031. "all": {
  5032. "type": "array",
  5033. "items": {
  5034. "$ref": "#/components/schemas/Provider"
  5035. }
  5036. },
  5037. "default": {
  5038. "type": "object",
  5039. "additionalProperties": {
  5040. "type": "string"
  5041. }
  5042. },
  5043. "connected": {
  5044. "type": "array",
  5045. "items": {
  5046. "type": "string"
  5047. }
  5048. }
  5049. },
  5050. "required": ["all", "default", "connected"],
  5051. "additionalProperties": false,
  5052. "description": "List of providers"
  5053. }
  5054. }
  5055. }
  5056. },
  5057. "400": {
  5058. "description": "Bad request",
  5059. "content": {
  5060. "application/json": {
  5061. "schema": {
  5062. "$ref": "#/components/schemas/BadRequestError"
  5063. }
  5064. }
  5065. }
  5066. }
  5067. },
  5068. "description": "Get a list of all available AI providers, including both available and connected ones.",
  5069. "summary": "List providers",
  5070. "x-codeSamples": [
  5071. {
  5072. "lang": "js",
  5073. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  5074. }
  5075. ]
  5076. }
  5077. },
  5078. "/provider/auth": {
  5079. "get": {
  5080. "tags": ["provider"],
  5081. "operationId": "provider.auth",
  5082. "parameters": [
  5083. {
  5084. "name": "directory",
  5085. "in": "query",
  5086. "schema": {
  5087. "type": "string"
  5088. },
  5089. "required": false
  5090. },
  5091. {
  5092. "name": "workspace",
  5093. "in": "query",
  5094. "schema": {
  5095. "type": "string"
  5096. },
  5097. "required": false
  5098. }
  5099. ],
  5100. "responses": {
  5101. "200": {
  5102. "description": "Provider auth methods",
  5103. "content": {
  5104. "application/json": {
  5105. "schema": {
  5106. "type": "object",
  5107. "additionalProperties": {
  5108. "type": "array",
  5109. "items": {
  5110. "$ref": "#/components/schemas/ProviderAuthMethod"
  5111. }
  5112. },
  5113. "description": "Provider auth methods"
  5114. }
  5115. }
  5116. }
  5117. },
  5118. "400": {
  5119. "description": "Bad request",
  5120. "content": {
  5121. "application/json": {
  5122. "schema": {
  5123. "$ref": "#/components/schemas/BadRequestError"
  5124. }
  5125. }
  5126. }
  5127. }
  5128. },
  5129. "description": "Retrieve available authentication methods for all AI providers.",
  5130. "summary": "Get provider auth methods",
  5131. "x-codeSamples": [
  5132. {
  5133. "lang": "js",
  5134. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  5135. }
  5136. ]
  5137. }
  5138. },
  5139. "/provider/{providerID}/oauth/authorize": {
  5140. "post": {
  5141. "tags": ["provider"],
  5142. "operationId": "provider.oauth.authorize",
  5143. "parameters": [
  5144. {
  5145. "name": "providerID",
  5146. "in": "path",
  5147. "schema": {
  5148. "type": "string"
  5149. },
  5150. "required": true
  5151. },
  5152. {
  5153. "name": "directory",
  5154. "in": "query",
  5155. "schema": {
  5156. "type": "string"
  5157. },
  5158. "required": false
  5159. },
  5160. {
  5161. "name": "workspace",
  5162. "in": "query",
  5163. "schema": {
  5164. "type": "string"
  5165. },
  5166. "required": false
  5167. }
  5168. ],
  5169. "responses": {
  5170. "200": {
  5171. "description": "Authorization URL and method",
  5172. "content": {
  5173. "application/json": {
  5174. "schema": {
  5175. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  5176. }
  5177. }
  5178. }
  5179. },
  5180. "400": {
  5181. "description": "ProviderAuthError | InvalidRequestError",
  5182. "content": {
  5183. "application/json": {
  5184. "schema": {
  5185. "anyOf": [
  5186. {
  5187. "$ref": "#/components/schemas/ProviderAuthError1"
  5188. },
  5189. {
  5190. "$ref": "#/components/schemas/InvalidRequestError"
  5191. }
  5192. ]
  5193. }
  5194. }
  5195. }
  5196. }
  5197. },
  5198. "description": "Start the OAuth authorization flow for a provider.",
  5199. "summary": "Start OAuth authorization",
  5200. "requestBody": {
  5201. "content": {
  5202. "application/json": {
  5203. "schema": {
  5204. "type": "object",
  5205. "properties": {
  5206. "method": {
  5207. "type": "number",
  5208. "description": "Auth method index"
  5209. },
  5210. "inputs": {
  5211. "type": "object",
  5212. "additionalProperties": {
  5213. "type": "string"
  5214. }
  5215. }
  5216. },
  5217. "required": ["method"],
  5218. "additionalProperties": false
  5219. }
  5220. }
  5221. }
  5222. },
  5223. "x-codeSamples": [
  5224. {
  5225. "lang": "js",
  5226. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  5227. }
  5228. ]
  5229. }
  5230. },
  5231. "/provider/{providerID}/oauth/callback": {
  5232. "post": {
  5233. "tags": ["provider"],
  5234. "operationId": "provider.oauth.callback",
  5235. "parameters": [
  5236. {
  5237. "name": "providerID",
  5238. "in": "path",
  5239. "schema": {
  5240. "type": "string"
  5241. },
  5242. "required": true
  5243. },
  5244. {
  5245. "name": "directory",
  5246. "in": "query",
  5247. "schema": {
  5248. "type": "string"
  5249. },
  5250. "required": false
  5251. },
  5252. {
  5253. "name": "workspace",
  5254. "in": "query",
  5255. "schema": {
  5256. "type": "string"
  5257. },
  5258. "required": false
  5259. }
  5260. ],
  5261. "responses": {
  5262. "200": {
  5263. "description": "OAuth callback processed successfully",
  5264. "content": {
  5265. "application/json": {
  5266. "schema": {
  5267. "type": "boolean",
  5268. "description": "OAuth callback processed successfully"
  5269. }
  5270. }
  5271. }
  5272. },
  5273. "400": {
  5274. "description": "ProviderAuthError | InvalidRequestError",
  5275. "content": {
  5276. "application/json": {
  5277. "schema": {
  5278. "anyOf": [
  5279. {
  5280. "$ref": "#/components/schemas/ProviderAuthError1"
  5281. },
  5282. {
  5283. "$ref": "#/components/schemas/InvalidRequestError"
  5284. }
  5285. ]
  5286. }
  5287. }
  5288. }
  5289. }
  5290. },
  5291. "description": "Handle the OAuth callback from a provider after user authorization.",
  5292. "summary": "Handle OAuth callback",
  5293. "requestBody": {
  5294. "content": {
  5295. "application/json": {
  5296. "schema": {
  5297. "type": "object",
  5298. "properties": {
  5299. "method": {
  5300. "type": "number",
  5301. "description": "Auth method index"
  5302. },
  5303. "code": {
  5304. "type": "string"
  5305. }
  5306. },
  5307. "required": ["method"],
  5308. "additionalProperties": false
  5309. }
  5310. }
  5311. }
  5312. },
  5313. "x-codeSamples": [
  5314. {
  5315. "lang": "js",
  5316. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  5317. }
  5318. ]
  5319. }
  5320. },
  5321. "/session": {
  5322. "get": {
  5323. "tags": ["session"],
  5324. "operationId": "session.list",
  5325. "parameters": [
  5326. {
  5327. "name": "directory",
  5328. "in": "query",
  5329. "schema": {
  5330. "type": "string"
  5331. },
  5332. "required": false
  5333. },
  5334. {
  5335. "name": "workspace",
  5336. "in": "query",
  5337. "schema": {
  5338. "type": "string"
  5339. },
  5340. "required": false
  5341. },
  5342. {
  5343. "name": "scope",
  5344. "in": "query",
  5345. "schema": {
  5346. "type": "string",
  5347. "enum": ["project"]
  5348. },
  5349. "required": false
  5350. },
  5351. {
  5352. "name": "path",
  5353. "in": "query",
  5354. "schema": {
  5355. "type": "string"
  5356. },
  5357. "required": false
  5358. },
  5359. {
  5360. "name": "roots",
  5361. "in": "query",
  5362. "schema": {
  5363. "anyOf": [
  5364. {
  5365. "type": "boolean"
  5366. },
  5367. {
  5368. "type": "string",
  5369. "enum": ["true", "false"]
  5370. }
  5371. ]
  5372. },
  5373. "required": false
  5374. },
  5375. {
  5376. "name": "start",
  5377. "in": "query",
  5378. "schema": {
  5379. "type": "number"
  5380. },
  5381. "required": false
  5382. },
  5383. {
  5384. "name": "search",
  5385. "in": "query",
  5386. "schema": {
  5387. "type": "string"
  5388. },
  5389. "required": false
  5390. },
  5391. {
  5392. "name": "limit",
  5393. "in": "query",
  5394. "schema": {
  5395. "type": "number"
  5396. },
  5397. "required": false
  5398. }
  5399. ],
  5400. "responses": {
  5401. "200": {
  5402. "description": "List of sessions",
  5403. "content": {
  5404. "application/json": {
  5405. "schema": {
  5406. "type": "array",
  5407. "items": {
  5408. "$ref": "#/components/schemas/Session"
  5409. },
  5410. "description": "List of sessions"
  5411. }
  5412. }
  5413. }
  5414. },
  5415. "400": {
  5416. "description": "Bad request",
  5417. "content": {
  5418. "application/json": {
  5419. "schema": {
  5420. "$ref": "#/components/schemas/BadRequestError"
  5421. }
  5422. }
  5423. }
  5424. }
  5425. },
  5426. "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
  5427. "summary": "List sessions",
  5428. "x-codeSamples": [
  5429. {
  5430. "lang": "js",
  5431. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
  5432. }
  5433. ]
  5434. },
  5435. "post": {
  5436. "tags": ["session"],
  5437. "operationId": "session.create",
  5438. "parameters": [
  5439. {
  5440. "name": "directory",
  5441. "in": "query",
  5442. "schema": {
  5443. "type": "string"
  5444. },
  5445. "required": false
  5446. },
  5447. {
  5448. "name": "workspace",
  5449. "in": "query",
  5450. "schema": {
  5451. "type": "string"
  5452. },
  5453. "required": false
  5454. }
  5455. ],
  5456. "responses": {
  5457. "200": {
  5458. "description": "Successfully created session",
  5459. "content": {
  5460. "application/json": {
  5461. "schema": {
  5462. "$ref": "#/components/schemas/Session"
  5463. }
  5464. }
  5465. }
  5466. },
  5467. "400": {
  5468. "description": "BadRequest | InvalidRequestError",
  5469. "content": {
  5470. "application/json": {
  5471. "schema": {
  5472. "anyOf": [
  5473. {
  5474. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5475. },
  5476. {
  5477. "$ref": "#/components/schemas/InvalidRequestError"
  5478. }
  5479. ]
  5480. }
  5481. }
  5482. }
  5483. }
  5484. },
  5485. "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
  5486. "summary": "Create session",
  5487. "requestBody": {
  5488. "content": {
  5489. "application/json": {
  5490. "schema": {
  5491. "type": "object",
  5492. "properties": {
  5493. "parentID": {
  5494. "type": "string",
  5495. "pattern": "^ses"
  5496. },
  5497. "title": {
  5498. "type": "string"
  5499. },
  5500. "agent": {
  5501. "type": "string"
  5502. },
  5503. "model": {
  5504. "type": "object",
  5505. "properties": {
  5506. "id": {
  5507. "type": "string"
  5508. },
  5509. "providerID": {
  5510. "type": "string"
  5511. },
  5512. "variant": {
  5513. "type": "string"
  5514. }
  5515. },
  5516. "required": ["id", "providerID"],
  5517. "additionalProperties": false
  5518. },
  5519. "metadata": {
  5520. "type": "object"
  5521. },
  5522. "permission": {
  5523. "$ref": "#/components/schemas/PermissionRuleset"
  5524. },
  5525. "workspaceID": {
  5526. "type": "string",
  5527. "pattern": "^wrk"
  5528. }
  5529. },
  5530. "additionalProperties": false
  5531. }
  5532. }
  5533. }
  5534. },
  5535. "x-codeSamples": [
  5536. {
  5537. "lang": "js",
  5538. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
  5539. }
  5540. ]
  5541. }
  5542. },
  5543. "/session/status": {
  5544. "get": {
  5545. "tags": ["session"],
  5546. "operationId": "session.status",
  5547. "parameters": [
  5548. {
  5549. "name": "directory",
  5550. "in": "query",
  5551. "schema": {
  5552. "type": "string"
  5553. },
  5554. "required": false
  5555. },
  5556. {
  5557. "name": "workspace",
  5558. "in": "query",
  5559. "schema": {
  5560. "type": "string"
  5561. },
  5562. "required": false
  5563. }
  5564. ],
  5565. "responses": {
  5566. "200": {
  5567. "description": "Get session status",
  5568. "content": {
  5569. "application/json": {
  5570. "schema": {
  5571. "type": "object",
  5572. "additionalProperties": {
  5573. "$ref": "#/components/schemas/SessionStatus"
  5574. },
  5575. "description": "Get session status"
  5576. }
  5577. }
  5578. }
  5579. },
  5580. "400": {
  5581. "description": "BadRequest | InvalidRequestError",
  5582. "content": {
  5583. "application/json": {
  5584. "schema": {
  5585. "anyOf": [
  5586. {
  5587. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5588. },
  5589. {
  5590. "$ref": "#/components/schemas/InvalidRequestError"
  5591. }
  5592. ]
  5593. }
  5594. }
  5595. }
  5596. }
  5597. },
  5598. "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
  5599. "summary": "Get session status",
  5600. "x-codeSamples": [
  5601. {
  5602. "lang": "js",
  5603. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
  5604. }
  5605. ]
  5606. }
  5607. },
  5608. "/session/{sessionID}": {
  5609. "get": {
  5610. "tags": ["session"],
  5611. "operationId": "session.get",
  5612. "parameters": [
  5613. {
  5614. "name": "sessionID",
  5615. "in": "path",
  5616. "schema": {
  5617. "type": "string",
  5618. "pattern": "^ses"
  5619. },
  5620. "required": true
  5621. },
  5622. {
  5623. "name": "directory",
  5624. "in": "query",
  5625. "schema": {
  5626. "type": "string"
  5627. },
  5628. "required": false
  5629. },
  5630. {
  5631. "name": "workspace",
  5632. "in": "query",
  5633. "schema": {
  5634. "type": "string"
  5635. },
  5636. "required": false
  5637. }
  5638. ],
  5639. "responses": {
  5640. "200": {
  5641. "description": "Get session",
  5642. "content": {
  5643. "application/json": {
  5644. "schema": {
  5645. "$ref": "#/components/schemas/Session"
  5646. }
  5647. }
  5648. }
  5649. },
  5650. "400": {
  5651. "description": "BadRequest | InvalidRequestError",
  5652. "content": {
  5653. "application/json": {
  5654. "schema": {
  5655. "anyOf": [
  5656. {
  5657. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5658. },
  5659. {
  5660. "$ref": "#/components/schemas/InvalidRequestError"
  5661. }
  5662. ]
  5663. }
  5664. }
  5665. }
  5666. },
  5667. "404": {
  5668. "description": "NotFoundError",
  5669. "content": {
  5670. "application/json": {
  5671. "schema": {
  5672. "$ref": "#/components/schemas/NotFoundError"
  5673. }
  5674. }
  5675. }
  5676. }
  5677. },
  5678. "description": "Retrieve detailed information about a specific OpenCode session.",
  5679. "summary": "Get session",
  5680. "x-codeSamples": [
  5681. {
  5682. "lang": "js",
  5683. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
  5684. }
  5685. ]
  5686. },
  5687. "delete": {
  5688. "tags": ["session"],
  5689. "operationId": "session.delete",
  5690. "parameters": [
  5691. {
  5692. "name": "sessionID",
  5693. "in": "path",
  5694. "schema": {
  5695. "type": "string",
  5696. "pattern": "^ses"
  5697. },
  5698. "required": true
  5699. },
  5700. {
  5701. "name": "directory",
  5702. "in": "query",
  5703. "schema": {
  5704. "type": "string"
  5705. },
  5706. "required": false
  5707. },
  5708. {
  5709. "name": "workspace",
  5710. "in": "query",
  5711. "schema": {
  5712. "type": "string"
  5713. },
  5714. "required": false
  5715. }
  5716. ],
  5717. "responses": {
  5718. "200": {
  5719. "description": "Successfully deleted session",
  5720. "content": {
  5721. "application/json": {
  5722. "schema": {
  5723. "type": "boolean",
  5724. "description": "Successfully deleted session"
  5725. }
  5726. }
  5727. }
  5728. },
  5729. "400": {
  5730. "description": "BadRequest | InvalidRequestError",
  5731. "content": {
  5732. "application/json": {
  5733. "schema": {
  5734. "anyOf": [
  5735. {
  5736. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5737. },
  5738. {
  5739. "$ref": "#/components/schemas/InvalidRequestError"
  5740. }
  5741. ]
  5742. }
  5743. }
  5744. }
  5745. },
  5746. "404": {
  5747. "description": "NotFoundError",
  5748. "content": {
  5749. "application/json": {
  5750. "schema": {
  5751. "$ref": "#/components/schemas/NotFoundError"
  5752. }
  5753. }
  5754. }
  5755. }
  5756. },
  5757. "description": "Delete a session and permanently remove all associated data, including messages and history.",
  5758. "summary": "Delete session",
  5759. "x-codeSamples": [
  5760. {
  5761. "lang": "js",
  5762. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
  5763. }
  5764. ]
  5765. },
  5766. "patch": {
  5767. "tags": ["session"],
  5768. "operationId": "session.update",
  5769. "parameters": [
  5770. {
  5771. "name": "sessionID",
  5772. "in": "path",
  5773. "schema": {
  5774. "type": "string",
  5775. "pattern": "^ses"
  5776. },
  5777. "required": true
  5778. },
  5779. {
  5780. "name": "directory",
  5781. "in": "query",
  5782. "schema": {
  5783. "type": "string"
  5784. },
  5785. "required": false
  5786. },
  5787. {
  5788. "name": "workspace",
  5789. "in": "query",
  5790. "schema": {
  5791. "type": "string"
  5792. },
  5793. "required": false
  5794. }
  5795. ],
  5796. "responses": {
  5797. "200": {
  5798. "description": "Successfully updated session",
  5799. "content": {
  5800. "application/json": {
  5801. "schema": {
  5802. "$ref": "#/components/schemas/Session"
  5803. }
  5804. }
  5805. }
  5806. },
  5807. "400": {
  5808. "description": "BadRequest | InvalidRequestError",
  5809. "content": {
  5810. "application/json": {
  5811. "schema": {
  5812. "anyOf": [
  5813. {
  5814. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5815. },
  5816. {
  5817. "$ref": "#/components/schemas/InvalidRequestError"
  5818. }
  5819. ]
  5820. }
  5821. }
  5822. }
  5823. },
  5824. "404": {
  5825. "description": "NotFoundError",
  5826. "content": {
  5827. "application/json": {
  5828. "schema": {
  5829. "$ref": "#/components/schemas/NotFoundError"
  5830. }
  5831. }
  5832. }
  5833. }
  5834. },
  5835. "description": "Update properties of an existing session, such as title or other metadata.",
  5836. "summary": "Update session",
  5837. "requestBody": {
  5838. "content": {
  5839. "application/json": {
  5840. "schema": {
  5841. "type": "object",
  5842. "properties": {
  5843. "title": {
  5844. "type": "string"
  5845. },
  5846. "metadata": {
  5847. "type": "object"
  5848. },
  5849. "permission": {
  5850. "$ref": "#/components/schemas/PermissionRuleset"
  5851. },
  5852. "time": {
  5853. "type": "object",
  5854. "properties": {
  5855. "archived": {
  5856. "type": "number"
  5857. }
  5858. },
  5859. "additionalProperties": false
  5860. }
  5861. },
  5862. "additionalProperties": false
  5863. }
  5864. }
  5865. }
  5866. },
  5867. "x-codeSamples": [
  5868. {
  5869. "lang": "js",
  5870. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
  5871. }
  5872. ]
  5873. }
  5874. },
  5875. "/session/{sessionID}/children": {
  5876. "get": {
  5877. "tags": ["session"],
  5878. "operationId": "session.children",
  5879. "parameters": [
  5880. {
  5881. "name": "sessionID",
  5882. "in": "path",
  5883. "schema": {
  5884. "type": "string",
  5885. "pattern": "^ses"
  5886. },
  5887. "required": true
  5888. },
  5889. {
  5890. "name": "directory",
  5891. "in": "query",
  5892. "schema": {
  5893. "type": "string"
  5894. },
  5895. "required": false
  5896. },
  5897. {
  5898. "name": "workspace",
  5899. "in": "query",
  5900. "schema": {
  5901. "type": "string"
  5902. },
  5903. "required": false
  5904. }
  5905. ],
  5906. "responses": {
  5907. "200": {
  5908. "description": "List of children",
  5909. "content": {
  5910. "application/json": {
  5911. "schema": {
  5912. "type": "array",
  5913. "items": {
  5914. "$ref": "#/components/schemas/Session"
  5915. },
  5916. "description": "List of children"
  5917. }
  5918. }
  5919. }
  5920. },
  5921. "400": {
  5922. "description": "BadRequest | InvalidRequestError",
  5923. "content": {
  5924. "application/json": {
  5925. "schema": {
  5926. "anyOf": [
  5927. {
  5928. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5929. },
  5930. {
  5931. "$ref": "#/components/schemas/InvalidRequestError"
  5932. }
  5933. ]
  5934. }
  5935. }
  5936. }
  5937. },
  5938. "404": {
  5939. "description": "NotFoundError",
  5940. "content": {
  5941. "application/json": {
  5942. "schema": {
  5943. "$ref": "#/components/schemas/NotFoundError"
  5944. }
  5945. }
  5946. }
  5947. }
  5948. },
  5949. "description": "Retrieve all child sessions that were forked from the specified parent session.",
  5950. "summary": "Get session children",
  5951. "x-codeSamples": [
  5952. {
  5953. "lang": "js",
  5954. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
  5955. }
  5956. ]
  5957. }
  5958. },
  5959. "/session/{sessionID}/todo": {
  5960. "get": {
  5961. "tags": ["session"],
  5962. "operationId": "session.todo",
  5963. "parameters": [
  5964. {
  5965. "name": "sessionID",
  5966. "in": "path",
  5967. "schema": {
  5968. "type": "string",
  5969. "pattern": "^ses"
  5970. },
  5971. "required": true
  5972. },
  5973. {
  5974. "name": "directory",
  5975. "in": "query",
  5976. "schema": {
  5977. "type": "string"
  5978. },
  5979. "required": false
  5980. },
  5981. {
  5982. "name": "workspace",
  5983. "in": "query",
  5984. "schema": {
  5985. "type": "string"
  5986. },
  5987. "required": false
  5988. }
  5989. ],
  5990. "responses": {
  5991. "200": {
  5992. "description": "Todo list",
  5993. "content": {
  5994. "application/json": {
  5995. "schema": {
  5996. "type": "array",
  5997. "items": {
  5998. "$ref": "#/components/schemas/Todo"
  5999. },
  6000. "description": "Todo list"
  6001. }
  6002. }
  6003. }
  6004. },
  6005. "400": {
  6006. "description": "BadRequest | InvalidRequestError",
  6007. "content": {
  6008. "application/json": {
  6009. "schema": {
  6010. "anyOf": [
  6011. {
  6012. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6013. },
  6014. {
  6015. "$ref": "#/components/schemas/InvalidRequestError"
  6016. }
  6017. ]
  6018. }
  6019. }
  6020. }
  6021. },
  6022. "404": {
  6023. "description": "NotFoundError",
  6024. "content": {
  6025. "application/json": {
  6026. "schema": {
  6027. "$ref": "#/components/schemas/NotFoundError"
  6028. }
  6029. }
  6030. }
  6031. }
  6032. },
  6033. "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
  6034. "summary": "Get session todos",
  6035. "x-codeSamples": [
  6036. {
  6037. "lang": "js",
  6038. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
  6039. }
  6040. ]
  6041. }
  6042. },
  6043. "/session/{sessionID}/diff": {
  6044. "get": {
  6045. "tags": ["session"],
  6046. "operationId": "session.diff",
  6047. "parameters": [
  6048. {
  6049. "name": "sessionID",
  6050. "in": "path",
  6051. "schema": {
  6052. "type": "string",
  6053. "pattern": "^ses"
  6054. },
  6055. "required": true
  6056. },
  6057. {
  6058. "name": "directory",
  6059. "in": "query",
  6060. "schema": {
  6061. "type": "string"
  6062. },
  6063. "required": false
  6064. },
  6065. {
  6066. "name": "workspace",
  6067. "in": "query",
  6068. "schema": {
  6069. "type": "string"
  6070. },
  6071. "required": false
  6072. },
  6073. {
  6074. "name": "messageID",
  6075. "in": "query",
  6076. "schema": {
  6077. "type": "string",
  6078. "pattern": "^msg"
  6079. },
  6080. "required": false
  6081. }
  6082. ],
  6083. "responses": {
  6084. "200": {
  6085. "description": "Successfully retrieved diff",
  6086. "content": {
  6087. "application/json": {
  6088. "schema": {
  6089. "type": "array",
  6090. "items": {
  6091. "$ref": "#/components/schemas/SnapshotFileDiff"
  6092. },
  6093. "description": "Successfully retrieved diff"
  6094. }
  6095. }
  6096. }
  6097. },
  6098. "400": {
  6099. "description": "Bad request",
  6100. "content": {
  6101. "application/json": {
  6102. "schema": {
  6103. "$ref": "#/components/schemas/BadRequestError"
  6104. }
  6105. }
  6106. }
  6107. }
  6108. },
  6109. "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
  6110. "summary": "Get message diff",
  6111. "x-codeSamples": [
  6112. {
  6113. "lang": "js",
  6114. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
  6115. }
  6116. ]
  6117. }
  6118. },
  6119. "/session/{sessionID}/message": {
  6120. "get": {
  6121. "tags": ["session"],
  6122. "operationId": "session.messages",
  6123. "parameters": [
  6124. {
  6125. "name": "sessionID",
  6126. "in": "path",
  6127. "schema": {
  6128. "type": "string",
  6129. "pattern": "^ses"
  6130. },
  6131. "required": true
  6132. },
  6133. {
  6134. "name": "directory",
  6135. "in": "query",
  6136. "schema": {
  6137. "type": "string"
  6138. },
  6139. "required": false
  6140. },
  6141. {
  6142. "name": "workspace",
  6143. "in": "query",
  6144. "schema": {
  6145. "type": "string"
  6146. },
  6147. "required": false
  6148. },
  6149. {
  6150. "name": "limit",
  6151. "in": "query",
  6152. "schema": {
  6153. "type": "integer",
  6154. "minimum": 0,
  6155. "maximum": 9007199254740991
  6156. },
  6157. "required": false
  6158. },
  6159. {
  6160. "name": "before",
  6161. "in": "query",
  6162. "schema": {
  6163. "type": "string"
  6164. },
  6165. "required": false
  6166. }
  6167. ],
  6168. "responses": {
  6169. "200": {
  6170. "description": "List of messages",
  6171. "content": {
  6172. "application/json": {
  6173. "schema": {
  6174. "type": "array",
  6175. "items": {
  6176. "type": "object",
  6177. "properties": {
  6178. "info": {
  6179. "$ref": "#/components/schemas/Message"
  6180. },
  6181. "parts": {
  6182. "type": "array",
  6183. "items": {
  6184. "$ref": "#/components/schemas/Part"
  6185. }
  6186. }
  6187. },
  6188. "required": ["info", "parts"],
  6189. "additionalProperties": false
  6190. },
  6191. "description": "List of messages"
  6192. }
  6193. }
  6194. }
  6195. },
  6196. "400": {
  6197. "description": "BadRequest | InvalidRequestError",
  6198. "content": {
  6199. "application/json": {
  6200. "schema": {
  6201. "anyOf": [
  6202. {
  6203. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6204. },
  6205. {
  6206. "$ref": "#/components/schemas/InvalidRequestError"
  6207. }
  6208. ]
  6209. }
  6210. }
  6211. }
  6212. },
  6213. "404": {
  6214. "description": "NotFoundError",
  6215. "content": {
  6216. "application/json": {
  6217. "schema": {
  6218. "$ref": "#/components/schemas/NotFoundError"
  6219. }
  6220. }
  6221. }
  6222. }
  6223. },
  6224. "description": "Retrieve all messages in a session, including user prompts and AI responses.",
  6225. "summary": "Get session messages",
  6226. "x-codeSamples": [
  6227. {
  6228. "lang": "js",
  6229. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
  6230. }
  6231. ]
  6232. },
  6233. "post": {
  6234. "tags": ["session"],
  6235. "operationId": "session.prompt",
  6236. "parameters": [
  6237. {
  6238. "name": "sessionID",
  6239. "in": "path",
  6240. "schema": {
  6241. "type": "string",
  6242. "pattern": "^ses"
  6243. },
  6244. "required": true
  6245. },
  6246. {
  6247. "name": "directory",
  6248. "in": "query",
  6249. "schema": {
  6250. "type": "string"
  6251. },
  6252. "required": false
  6253. },
  6254. {
  6255. "name": "workspace",
  6256. "in": "query",
  6257. "schema": {
  6258. "type": "string"
  6259. },
  6260. "required": false
  6261. }
  6262. ],
  6263. "responses": {
  6264. "200": {
  6265. "description": "Created message",
  6266. "content": {
  6267. "application/json": {
  6268. "schema": {
  6269. "type": "object",
  6270. "required": ["info", "parts"],
  6271. "properties": {
  6272. "info": {
  6273. "$ref": "#/components/schemas/AssistantMessage"
  6274. },
  6275. "parts": {
  6276. "type": "array",
  6277. "items": {
  6278. "$ref": "#/components/schemas/Part"
  6279. }
  6280. }
  6281. }
  6282. }
  6283. }
  6284. }
  6285. },
  6286. "400": {
  6287. "description": "BadRequest | InvalidRequestError",
  6288. "content": {
  6289. "application/json": {
  6290. "schema": {
  6291. "anyOf": [
  6292. {
  6293. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6294. },
  6295. {
  6296. "$ref": "#/components/schemas/InvalidRequestError"
  6297. }
  6298. ]
  6299. }
  6300. }
  6301. }
  6302. },
  6303. "404": {
  6304. "description": "NotFoundError",
  6305. "content": {
  6306. "application/json": {
  6307. "schema": {
  6308. "$ref": "#/components/schemas/NotFoundError"
  6309. }
  6310. }
  6311. }
  6312. }
  6313. },
  6314. "description": "Create and send a new message to a session, streaming the AI response.",
  6315. "summary": "Send message",
  6316. "requestBody": {
  6317. "content": {
  6318. "application/json": {
  6319. "schema": {
  6320. "type": "object",
  6321. "properties": {
  6322. "messageID": {
  6323. "type": "string",
  6324. "pattern": "^msg"
  6325. },
  6326. "model": {
  6327. "type": "object",
  6328. "properties": {
  6329. "providerID": {
  6330. "type": "string"
  6331. },
  6332. "modelID": {
  6333. "type": "string"
  6334. }
  6335. },
  6336. "required": ["providerID", "modelID"],
  6337. "additionalProperties": false
  6338. },
  6339. "agent": {
  6340. "type": "string"
  6341. },
  6342. "noReply": {
  6343. "type": "boolean"
  6344. },
  6345. "tools": {
  6346. "type": "object",
  6347. "additionalProperties": {
  6348. "type": "boolean"
  6349. }
  6350. },
  6351. "format": {
  6352. "$ref": "#/components/schemas/OutputFormat"
  6353. },
  6354. "system": {
  6355. "type": "string"
  6356. },
  6357. "variant": {
  6358. "type": "string"
  6359. },
  6360. "parts": {
  6361. "type": "array",
  6362. "items": {
  6363. "anyOf": [
  6364. {
  6365. "$ref": "#/components/schemas/TextPartInput"
  6366. },
  6367. {
  6368. "$ref": "#/components/schemas/FilePartInput"
  6369. },
  6370. {
  6371. "$ref": "#/components/schemas/AgentPartInput"
  6372. },
  6373. {
  6374. "$ref": "#/components/schemas/SubtaskPartInput"
  6375. }
  6376. ]
  6377. }
  6378. }
  6379. },
  6380. "required": ["parts"],
  6381. "additionalProperties": false
  6382. }
  6383. }
  6384. }
  6385. },
  6386. "x-codeSamples": [
  6387. {
  6388. "lang": "js",
  6389. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  6390. }
  6391. ]
  6392. }
  6393. },
  6394. "/session/{sessionID}/message/{messageID}": {
  6395. "get": {
  6396. "tags": ["session"],
  6397. "operationId": "session.message",
  6398. "parameters": [
  6399. {
  6400. "name": "sessionID",
  6401. "in": "path",
  6402. "schema": {
  6403. "type": "string",
  6404. "pattern": "^ses"
  6405. },
  6406. "required": true
  6407. },
  6408. {
  6409. "name": "messageID",
  6410. "in": "path",
  6411. "schema": {
  6412. "type": "string",
  6413. "pattern": "^msg"
  6414. },
  6415. "required": true
  6416. },
  6417. {
  6418. "name": "directory",
  6419. "in": "query",
  6420. "schema": {
  6421. "type": "string"
  6422. },
  6423. "required": false
  6424. },
  6425. {
  6426. "name": "workspace",
  6427. "in": "query",
  6428. "schema": {
  6429. "type": "string"
  6430. },
  6431. "required": false
  6432. }
  6433. ],
  6434. "responses": {
  6435. "200": {
  6436. "description": "Message",
  6437. "content": {
  6438. "application/json": {
  6439. "schema": {
  6440. "type": "object",
  6441. "properties": {
  6442. "info": {
  6443. "$ref": "#/components/schemas/Message"
  6444. },
  6445. "parts": {
  6446. "type": "array",
  6447. "items": {
  6448. "$ref": "#/components/schemas/Part"
  6449. }
  6450. }
  6451. },
  6452. "required": ["info", "parts"],
  6453. "additionalProperties": false,
  6454. "description": "Message"
  6455. }
  6456. }
  6457. }
  6458. },
  6459. "400": {
  6460. "description": "BadRequest | InvalidRequestError",
  6461. "content": {
  6462. "application/json": {
  6463. "schema": {
  6464. "anyOf": [
  6465. {
  6466. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6467. },
  6468. {
  6469. "$ref": "#/components/schemas/InvalidRequestError"
  6470. }
  6471. ]
  6472. }
  6473. }
  6474. }
  6475. },
  6476. "404": {
  6477. "description": "NotFoundError",
  6478. "content": {
  6479. "application/json": {
  6480. "schema": {
  6481. "$ref": "#/components/schemas/NotFoundError"
  6482. }
  6483. }
  6484. }
  6485. }
  6486. },
  6487. "description": "Retrieve a specific message from a session by its message ID.",
  6488. "summary": "Get message",
  6489. "x-codeSamples": [
  6490. {
  6491. "lang": "js",
  6492. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  6493. }
  6494. ]
  6495. },
  6496. "delete": {
  6497. "tags": ["session"],
  6498. "operationId": "session.deleteMessage",
  6499. "parameters": [
  6500. {
  6501. "name": "sessionID",
  6502. "in": "path",
  6503. "schema": {
  6504. "type": "string",
  6505. "pattern": "^ses"
  6506. },
  6507. "required": true
  6508. },
  6509. {
  6510. "name": "messageID",
  6511. "in": "path",
  6512. "schema": {
  6513. "type": "string",
  6514. "pattern": "^msg"
  6515. },
  6516. "required": true
  6517. },
  6518. {
  6519. "name": "directory",
  6520. "in": "query",
  6521. "schema": {
  6522. "type": "string"
  6523. },
  6524. "required": false
  6525. },
  6526. {
  6527. "name": "workspace",
  6528. "in": "query",
  6529. "schema": {
  6530. "type": "string"
  6531. },
  6532. "required": false
  6533. }
  6534. ],
  6535. "responses": {
  6536. "200": {
  6537. "description": "Successfully deleted message",
  6538. "content": {
  6539. "application/json": {
  6540. "schema": {
  6541. "type": "boolean",
  6542. "description": "Successfully deleted message"
  6543. }
  6544. }
  6545. }
  6546. },
  6547. "400": {
  6548. "description": "BadRequest | InvalidRequestError",
  6549. "content": {
  6550. "application/json": {
  6551. "schema": {
  6552. "anyOf": [
  6553. {
  6554. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6555. },
  6556. {
  6557. "$ref": "#/components/schemas/InvalidRequestError"
  6558. }
  6559. ]
  6560. }
  6561. }
  6562. }
  6563. },
  6564. "404": {
  6565. "description": "NotFoundError",
  6566. "content": {
  6567. "application/json": {
  6568. "schema": {
  6569. "$ref": "#/components/schemas/NotFoundError"
  6570. }
  6571. }
  6572. }
  6573. },
  6574. "409": {
  6575. "description": "SessionBusyError",
  6576. "content": {
  6577. "application/json": {
  6578. "schema": {
  6579. "$ref": "#/components/schemas/SessionBusyError"
  6580. }
  6581. }
  6582. }
  6583. }
  6584. },
  6585. "description": "Permanently delete a specific message and all of its parts from a session without reverting file changes.",
  6586. "summary": "Delete message",
  6587. "x-codeSamples": [
  6588. {
  6589. "lang": "js",
  6590. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.deleteMessage({\n ...\n})"
  6591. }
  6592. ]
  6593. }
  6594. },
  6595. "/session/{sessionID}/fork": {
  6596. "post": {
  6597. "tags": ["session"],
  6598. "operationId": "session.fork",
  6599. "parameters": [
  6600. {
  6601. "name": "sessionID",
  6602. "in": "path",
  6603. "schema": {
  6604. "type": "string",
  6605. "pattern": "^ses"
  6606. },
  6607. "required": true
  6608. },
  6609. {
  6610. "name": "directory",
  6611. "in": "query",
  6612. "schema": {
  6613. "type": "string"
  6614. },
  6615. "required": false
  6616. },
  6617. {
  6618. "name": "workspace",
  6619. "in": "query",
  6620. "schema": {
  6621. "type": "string"
  6622. },
  6623. "required": false
  6624. }
  6625. ],
  6626. "responses": {
  6627. "200": {
  6628. "description": "200",
  6629. "content": {
  6630. "application/json": {
  6631. "schema": {
  6632. "$ref": "#/components/schemas/Session"
  6633. }
  6634. }
  6635. }
  6636. },
  6637. "400": {
  6638. "description": "BadRequest | InvalidRequestError",
  6639. "content": {
  6640. "application/json": {
  6641. "schema": {
  6642. "anyOf": [
  6643. {
  6644. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6645. },
  6646. {
  6647. "$ref": "#/components/schemas/InvalidRequestError"
  6648. }
  6649. ]
  6650. }
  6651. }
  6652. }
  6653. },
  6654. "404": {
  6655. "description": "NotFoundError",
  6656. "content": {
  6657. "application/json": {
  6658. "schema": {
  6659. "$ref": "#/components/schemas/NotFoundError"
  6660. }
  6661. }
  6662. }
  6663. }
  6664. },
  6665. "description": "Create a new session by forking an existing session at a specific message point.",
  6666. "summary": "Fork session",
  6667. "requestBody": {
  6668. "content": {
  6669. "application/json": {
  6670. "schema": {
  6671. "type": "object",
  6672. "properties": {
  6673. "messageID": {
  6674. "type": "string",
  6675. "pattern": "^msg"
  6676. }
  6677. },
  6678. "additionalProperties": false
  6679. }
  6680. }
  6681. }
  6682. },
  6683. "x-codeSamples": [
  6684. {
  6685. "lang": "js",
  6686. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  6687. }
  6688. ]
  6689. }
  6690. },
  6691. "/session/{sessionID}/abort": {
  6692. "post": {
  6693. "tags": ["session"],
  6694. "operationId": "session.abort",
  6695. "parameters": [
  6696. {
  6697. "name": "sessionID",
  6698. "in": "path",
  6699. "schema": {
  6700. "type": "string",
  6701. "pattern": "^ses"
  6702. },
  6703. "required": true
  6704. },
  6705. {
  6706. "name": "directory",
  6707. "in": "query",
  6708. "schema": {
  6709. "type": "string"
  6710. },
  6711. "required": false
  6712. },
  6713. {
  6714. "name": "workspace",
  6715. "in": "query",
  6716. "schema": {
  6717. "type": "string"
  6718. },
  6719. "required": false
  6720. }
  6721. ],
  6722. "responses": {
  6723. "200": {
  6724. "description": "Aborted session",
  6725. "content": {
  6726. "application/json": {
  6727. "schema": {
  6728. "type": "boolean",
  6729. "description": "Aborted session"
  6730. }
  6731. }
  6732. }
  6733. },
  6734. "400": {
  6735. "description": "BadRequest | InvalidRequestError",
  6736. "content": {
  6737. "application/json": {
  6738. "schema": {
  6739. "anyOf": [
  6740. {
  6741. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6742. },
  6743. {
  6744. "$ref": "#/components/schemas/InvalidRequestError"
  6745. }
  6746. ]
  6747. }
  6748. }
  6749. }
  6750. }
  6751. },
  6752. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  6753. "summary": "Abort session",
  6754. "x-codeSamples": [
  6755. {
  6756. "lang": "js",
  6757. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  6758. }
  6759. ]
  6760. }
  6761. },
  6762. "/session/{sessionID}/init": {
  6763. "post": {
  6764. "tags": ["session"],
  6765. "operationId": "session.init",
  6766. "parameters": [
  6767. {
  6768. "name": "sessionID",
  6769. "in": "path",
  6770. "schema": {
  6771. "type": "string",
  6772. "pattern": "^ses"
  6773. },
  6774. "required": true
  6775. },
  6776. {
  6777. "name": "directory",
  6778. "in": "query",
  6779. "schema": {
  6780. "type": "string"
  6781. },
  6782. "required": false
  6783. },
  6784. {
  6785. "name": "workspace",
  6786. "in": "query",
  6787. "schema": {
  6788. "type": "string"
  6789. },
  6790. "required": false
  6791. }
  6792. ],
  6793. "responses": {
  6794. "200": {
  6795. "description": "200",
  6796. "content": {
  6797. "application/json": {
  6798. "schema": {
  6799. "type": "boolean",
  6800. "description": "200"
  6801. }
  6802. }
  6803. }
  6804. },
  6805. "400": {
  6806. "description": "BadRequest | InvalidRequestError",
  6807. "content": {
  6808. "application/json": {
  6809. "schema": {
  6810. "anyOf": [
  6811. {
  6812. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6813. },
  6814. {
  6815. "$ref": "#/components/schemas/InvalidRequestError"
  6816. }
  6817. ]
  6818. }
  6819. }
  6820. }
  6821. },
  6822. "404": {
  6823. "description": "NotFoundError",
  6824. "content": {
  6825. "application/json": {
  6826. "schema": {
  6827. "$ref": "#/components/schemas/NotFoundError"
  6828. }
  6829. }
  6830. }
  6831. }
  6832. },
  6833. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  6834. "summary": "Initialize session",
  6835. "requestBody": {
  6836. "content": {
  6837. "application/json": {
  6838. "schema": {
  6839. "type": "object",
  6840. "properties": {
  6841. "modelID": {
  6842. "type": "string"
  6843. },
  6844. "providerID": {
  6845. "type": "string"
  6846. },
  6847. "messageID": {
  6848. "type": "string",
  6849. "pattern": "^msg"
  6850. }
  6851. },
  6852. "required": ["modelID", "providerID", "messageID"],
  6853. "additionalProperties": false
  6854. }
  6855. }
  6856. }
  6857. },
  6858. "x-codeSamples": [
  6859. {
  6860. "lang": "js",
  6861. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  6862. }
  6863. ]
  6864. }
  6865. },
  6866. "/session/{sessionID}/share": {
  6867. "post": {
  6868. "tags": ["session"],
  6869. "operationId": "session.share",
  6870. "parameters": [
  6871. {
  6872. "name": "sessionID",
  6873. "in": "path",
  6874. "schema": {
  6875. "type": "string",
  6876. "pattern": "^ses"
  6877. },
  6878. "required": true
  6879. },
  6880. {
  6881. "name": "directory",
  6882. "in": "query",
  6883. "schema": {
  6884. "type": "string"
  6885. },
  6886. "required": false
  6887. },
  6888. {
  6889. "name": "workspace",
  6890. "in": "query",
  6891. "schema": {
  6892. "type": "string"
  6893. },
  6894. "required": false
  6895. }
  6896. ],
  6897. "responses": {
  6898. "200": {
  6899. "description": "Successfully shared session",
  6900. "content": {
  6901. "application/json": {
  6902. "schema": {
  6903. "$ref": "#/components/schemas/Session"
  6904. }
  6905. }
  6906. }
  6907. },
  6908. "400": {
  6909. "description": "Bad request",
  6910. "content": {
  6911. "application/json": {
  6912. "schema": {
  6913. "$ref": "#/components/schemas/BadRequestError"
  6914. }
  6915. }
  6916. }
  6917. },
  6918. "404": {
  6919. "description": "NotFoundError",
  6920. "content": {
  6921. "application/json": {
  6922. "schema": {
  6923. "$ref": "#/components/schemas/NotFoundError"
  6924. }
  6925. }
  6926. }
  6927. },
  6928. "500": {
  6929. "description": "InternalServerError",
  6930. "content": {
  6931. "application/json": {
  6932. "schema": {
  6933. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6934. }
  6935. }
  6936. }
  6937. }
  6938. },
  6939. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  6940. "summary": "Share session",
  6941. "x-codeSamples": [
  6942. {
  6943. "lang": "js",
  6944. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  6945. }
  6946. ]
  6947. },
  6948. "delete": {
  6949. "tags": ["session"],
  6950. "operationId": "session.unshare",
  6951. "parameters": [
  6952. {
  6953. "name": "sessionID",
  6954. "in": "path",
  6955. "schema": {
  6956. "type": "string",
  6957. "pattern": "^ses"
  6958. },
  6959. "required": true
  6960. },
  6961. {
  6962. "name": "directory",
  6963. "in": "query",
  6964. "schema": {
  6965. "type": "string"
  6966. },
  6967. "required": false
  6968. },
  6969. {
  6970. "name": "workspace",
  6971. "in": "query",
  6972. "schema": {
  6973. "type": "string"
  6974. },
  6975. "required": false
  6976. }
  6977. ],
  6978. "responses": {
  6979. "200": {
  6980. "description": "Successfully unshared session",
  6981. "content": {
  6982. "application/json": {
  6983. "schema": {
  6984. "$ref": "#/components/schemas/Session"
  6985. }
  6986. }
  6987. }
  6988. },
  6989. "400": {
  6990. "description": "Bad request",
  6991. "content": {
  6992. "application/json": {
  6993. "schema": {
  6994. "$ref": "#/components/schemas/BadRequestError"
  6995. }
  6996. }
  6997. }
  6998. },
  6999. "404": {
  7000. "description": "NotFoundError",
  7001. "content": {
  7002. "application/json": {
  7003. "schema": {
  7004. "$ref": "#/components/schemas/NotFoundError"
  7005. }
  7006. }
  7007. }
  7008. },
  7009. "500": {
  7010. "description": "InternalServerError",
  7011. "content": {
  7012. "application/json": {
  7013. "schema": {
  7014. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  7015. }
  7016. }
  7017. }
  7018. }
  7019. },
  7020. "description": "Remove the shareable link for a session, making it private again.",
  7021. "summary": "Unshare session",
  7022. "x-codeSamples": [
  7023. {
  7024. "lang": "js",
  7025. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  7026. }
  7027. ]
  7028. }
  7029. },
  7030. "/session/{sessionID}/summarize": {
  7031. "post": {
  7032. "tags": ["session"],
  7033. "operationId": "session.summarize",
  7034. "parameters": [
  7035. {
  7036. "name": "sessionID",
  7037. "in": "path",
  7038. "schema": {
  7039. "type": "string",
  7040. "pattern": "^ses"
  7041. },
  7042. "required": true
  7043. },
  7044. {
  7045. "name": "directory",
  7046. "in": "query",
  7047. "schema": {
  7048. "type": "string"
  7049. },
  7050. "required": false
  7051. },
  7052. {
  7053. "name": "workspace",
  7054. "in": "query",
  7055. "schema": {
  7056. "type": "string"
  7057. },
  7058. "required": false
  7059. }
  7060. ],
  7061. "responses": {
  7062. "200": {
  7063. "description": "Summarized session",
  7064. "content": {
  7065. "application/json": {
  7066. "schema": {
  7067. "type": "boolean",
  7068. "description": "Summarized session"
  7069. }
  7070. }
  7071. }
  7072. },
  7073. "400": {
  7074. "description": "BadRequest | InvalidRequestError",
  7075. "content": {
  7076. "application/json": {
  7077. "schema": {
  7078. "anyOf": [
  7079. {
  7080. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7081. },
  7082. {
  7083. "$ref": "#/components/schemas/InvalidRequestError"
  7084. }
  7085. ]
  7086. }
  7087. }
  7088. }
  7089. },
  7090. "404": {
  7091. "description": "NotFoundError",
  7092. "content": {
  7093. "application/json": {
  7094. "schema": {
  7095. "$ref": "#/components/schemas/NotFoundError"
  7096. }
  7097. }
  7098. }
  7099. }
  7100. },
  7101. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  7102. "summary": "Summarize session",
  7103. "requestBody": {
  7104. "content": {
  7105. "application/json": {
  7106. "schema": {
  7107. "type": "object",
  7108. "properties": {
  7109. "providerID": {
  7110. "type": "string"
  7111. },
  7112. "modelID": {
  7113. "type": "string"
  7114. },
  7115. "auto": {
  7116. "type": "boolean"
  7117. }
  7118. },
  7119. "required": ["providerID", "modelID"],
  7120. "additionalProperties": false
  7121. }
  7122. }
  7123. }
  7124. },
  7125. "x-codeSamples": [
  7126. {
  7127. "lang": "js",
  7128. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  7129. }
  7130. ]
  7131. }
  7132. },
  7133. "/session/{sessionID}/prompt_async": {
  7134. "post": {
  7135. "tags": ["session"],
  7136. "operationId": "session.prompt_async",
  7137. "parameters": [
  7138. {
  7139. "name": "sessionID",
  7140. "in": "path",
  7141. "schema": {
  7142. "type": "string",
  7143. "pattern": "^ses"
  7144. },
  7145. "required": true
  7146. },
  7147. {
  7148. "name": "directory",
  7149. "in": "query",
  7150. "schema": {
  7151. "type": "string"
  7152. },
  7153. "required": false
  7154. },
  7155. {
  7156. "name": "workspace",
  7157. "in": "query",
  7158. "schema": {
  7159. "type": "string"
  7160. },
  7161. "required": false
  7162. }
  7163. ],
  7164. "responses": {
  7165. "204": {
  7166. "description": "Prompt accepted"
  7167. },
  7168. "400": {
  7169. "description": "BadRequest | InvalidRequestError",
  7170. "content": {
  7171. "application/json": {
  7172. "schema": {
  7173. "anyOf": [
  7174. {
  7175. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7176. },
  7177. {
  7178. "$ref": "#/components/schemas/InvalidRequestError"
  7179. }
  7180. ]
  7181. }
  7182. }
  7183. }
  7184. },
  7185. "404": {
  7186. "description": "NotFoundError",
  7187. "content": {
  7188. "application/json": {
  7189. "schema": {
  7190. "$ref": "#/components/schemas/NotFoundError"
  7191. }
  7192. }
  7193. }
  7194. }
  7195. },
  7196. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  7197. "summary": "Send async message",
  7198. "requestBody": {
  7199. "content": {
  7200. "application/json": {
  7201. "schema": {
  7202. "type": "object",
  7203. "properties": {
  7204. "messageID": {
  7205. "type": "string",
  7206. "pattern": "^msg"
  7207. },
  7208. "model": {
  7209. "type": "object",
  7210. "properties": {
  7211. "providerID": {
  7212. "type": "string"
  7213. },
  7214. "modelID": {
  7215. "type": "string"
  7216. }
  7217. },
  7218. "required": ["providerID", "modelID"],
  7219. "additionalProperties": false
  7220. },
  7221. "agent": {
  7222. "type": "string"
  7223. },
  7224. "noReply": {
  7225. "type": "boolean"
  7226. },
  7227. "tools": {
  7228. "type": "object",
  7229. "additionalProperties": {
  7230. "type": "boolean"
  7231. }
  7232. },
  7233. "format": {
  7234. "$ref": "#/components/schemas/OutputFormat"
  7235. },
  7236. "system": {
  7237. "type": "string"
  7238. },
  7239. "variant": {
  7240. "type": "string"
  7241. },
  7242. "parts": {
  7243. "type": "array",
  7244. "items": {
  7245. "anyOf": [
  7246. {
  7247. "$ref": "#/components/schemas/TextPartInput"
  7248. },
  7249. {
  7250. "$ref": "#/components/schemas/FilePartInput"
  7251. },
  7252. {
  7253. "$ref": "#/components/schemas/AgentPartInput"
  7254. },
  7255. {
  7256. "$ref": "#/components/schemas/SubtaskPartInput"
  7257. }
  7258. ]
  7259. }
  7260. }
  7261. },
  7262. "required": ["parts"],
  7263. "additionalProperties": false
  7264. }
  7265. }
  7266. }
  7267. },
  7268. "x-codeSamples": [
  7269. {
  7270. "lang": "js",
  7271. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  7272. }
  7273. ]
  7274. }
  7275. },
  7276. "/session/{sessionID}/command": {
  7277. "post": {
  7278. "tags": ["session"],
  7279. "operationId": "session.command",
  7280. "parameters": [
  7281. {
  7282. "name": "sessionID",
  7283. "in": "path",
  7284. "schema": {
  7285. "type": "string",
  7286. "pattern": "^ses"
  7287. },
  7288. "required": true
  7289. },
  7290. {
  7291. "name": "directory",
  7292. "in": "query",
  7293. "schema": {
  7294. "type": "string"
  7295. },
  7296. "required": false
  7297. },
  7298. {
  7299. "name": "workspace",
  7300. "in": "query",
  7301. "schema": {
  7302. "type": "string"
  7303. },
  7304. "required": false
  7305. }
  7306. ],
  7307. "responses": {
  7308. "200": {
  7309. "description": "Created message",
  7310. "content": {
  7311. "application/json": {
  7312. "schema": {
  7313. "type": "object",
  7314. "required": ["info", "parts"],
  7315. "properties": {
  7316. "info": {
  7317. "$ref": "#/components/schemas/AssistantMessage"
  7318. },
  7319. "parts": {
  7320. "type": "array",
  7321. "items": {
  7322. "$ref": "#/components/schemas/Part"
  7323. }
  7324. }
  7325. }
  7326. }
  7327. }
  7328. }
  7329. },
  7330. "400": {
  7331. "description": "BadRequest | InvalidRequestError",
  7332. "content": {
  7333. "application/json": {
  7334. "schema": {
  7335. "anyOf": [
  7336. {
  7337. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7338. },
  7339. {
  7340. "$ref": "#/components/schemas/InvalidRequestError"
  7341. }
  7342. ]
  7343. }
  7344. }
  7345. }
  7346. },
  7347. "404": {
  7348. "description": "NotFoundError",
  7349. "content": {
  7350. "application/json": {
  7351. "schema": {
  7352. "$ref": "#/components/schemas/NotFoundError"
  7353. }
  7354. }
  7355. }
  7356. }
  7357. },
  7358. "description": "Send a new command to a session for execution by the AI assistant.",
  7359. "summary": "Send command",
  7360. "requestBody": {
  7361. "content": {
  7362. "application/json": {
  7363. "schema": {
  7364. "type": "object",
  7365. "properties": {
  7366. "messageID": {
  7367. "type": "string",
  7368. "pattern": "^msg"
  7369. },
  7370. "agent": {
  7371. "type": "string"
  7372. },
  7373. "model": {
  7374. "type": "string"
  7375. },
  7376. "arguments": {
  7377. "type": "string"
  7378. },
  7379. "command": {
  7380. "type": "string"
  7381. },
  7382. "variant": {
  7383. "type": "string"
  7384. },
  7385. "parts": {
  7386. "type": "array",
  7387. "items": {
  7388. "type": "object",
  7389. "properties": {
  7390. "id": {
  7391. "type": "string",
  7392. "pattern": "^prt"
  7393. },
  7394. "type": {
  7395. "type": "string",
  7396. "enum": ["file"]
  7397. },
  7398. "mime": {
  7399. "type": "string"
  7400. },
  7401. "filename": {
  7402. "type": "string"
  7403. },
  7404. "url": {
  7405. "type": "string"
  7406. },
  7407. "source": {
  7408. "$ref": "#/components/schemas/FilePartSource"
  7409. }
  7410. },
  7411. "required": ["type", "mime", "url"],
  7412. "additionalProperties": false
  7413. }
  7414. }
  7415. },
  7416. "required": ["arguments", "command"],
  7417. "additionalProperties": false
  7418. }
  7419. }
  7420. }
  7421. },
  7422. "x-codeSamples": [
  7423. {
  7424. "lang": "js",
  7425. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  7426. }
  7427. ]
  7428. }
  7429. },
  7430. "/session/{sessionID}/shell": {
  7431. "post": {
  7432. "tags": ["session"],
  7433. "operationId": "session.shell",
  7434. "parameters": [
  7435. {
  7436. "name": "sessionID",
  7437. "in": "path",
  7438. "schema": {
  7439. "type": "string",
  7440. "pattern": "^ses"
  7441. },
  7442. "required": true
  7443. },
  7444. {
  7445. "name": "directory",
  7446. "in": "query",
  7447. "schema": {
  7448. "type": "string"
  7449. },
  7450. "required": false
  7451. },
  7452. {
  7453. "name": "workspace",
  7454. "in": "query",
  7455. "schema": {
  7456. "type": "string"
  7457. },
  7458. "required": false
  7459. }
  7460. ],
  7461. "responses": {
  7462. "200": {
  7463. "description": "Created message",
  7464. "content": {
  7465. "application/json": {
  7466. "schema": {
  7467. "type": "object",
  7468. "properties": {
  7469. "info": {
  7470. "$ref": "#/components/schemas/Message"
  7471. },
  7472. "parts": {
  7473. "type": "array",
  7474. "items": {
  7475. "$ref": "#/components/schemas/Part"
  7476. }
  7477. }
  7478. },
  7479. "required": ["info", "parts"],
  7480. "additionalProperties": false,
  7481. "description": "Created message"
  7482. }
  7483. }
  7484. }
  7485. },
  7486. "400": {
  7487. "description": "BadRequest | InvalidRequestError",
  7488. "content": {
  7489. "application/json": {
  7490. "schema": {
  7491. "anyOf": [
  7492. {
  7493. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7494. },
  7495. {
  7496. "$ref": "#/components/schemas/InvalidRequestError"
  7497. }
  7498. ]
  7499. }
  7500. }
  7501. }
  7502. },
  7503. "404": {
  7504. "description": "NotFoundError",
  7505. "content": {
  7506. "application/json": {
  7507. "schema": {
  7508. "$ref": "#/components/schemas/NotFoundError"
  7509. }
  7510. }
  7511. }
  7512. },
  7513. "409": {
  7514. "description": "SessionBusyError",
  7515. "content": {
  7516. "application/json": {
  7517. "schema": {
  7518. "$ref": "#/components/schemas/SessionBusyError"
  7519. }
  7520. }
  7521. }
  7522. }
  7523. },
  7524. "description": "Execute a shell command within the session context and return the AI's response.",
  7525. "summary": "Run shell command",
  7526. "requestBody": {
  7527. "content": {
  7528. "application/json": {
  7529. "schema": {
  7530. "type": "object",
  7531. "properties": {
  7532. "messageID": {
  7533. "type": "string",
  7534. "pattern": "^msg"
  7535. },
  7536. "agent": {
  7537. "type": "string"
  7538. },
  7539. "model": {
  7540. "type": "object",
  7541. "properties": {
  7542. "providerID": {
  7543. "type": "string"
  7544. },
  7545. "modelID": {
  7546. "type": "string"
  7547. }
  7548. },
  7549. "required": ["providerID", "modelID"],
  7550. "additionalProperties": false
  7551. },
  7552. "command": {
  7553. "type": "string"
  7554. }
  7555. },
  7556. "required": ["agent", "command"],
  7557. "additionalProperties": false
  7558. }
  7559. }
  7560. }
  7561. },
  7562. "x-codeSamples": [
  7563. {
  7564. "lang": "js",
  7565. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  7566. }
  7567. ]
  7568. }
  7569. },
  7570. "/session/{sessionID}/revert": {
  7571. "post": {
  7572. "tags": ["session"],
  7573. "operationId": "session.revert",
  7574. "parameters": [
  7575. {
  7576. "name": "sessionID",
  7577. "in": "path",
  7578. "schema": {
  7579. "type": "string",
  7580. "pattern": "^ses"
  7581. },
  7582. "required": true
  7583. },
  7584. {
  7585. "name": "directory",
  7586. "in": "query",
  7587. "schema": {
  7588. "type": "string"
  7589. },
  7590. "required": false
  7591. },
  7592. {
  7593. "name": "workspace",
  7594. "in": "query",
  7595. "schema": {
  7596. "type": "string"
  7597. },
  7598. "required": false
  7599. }
  7600. ],
  7601. "responses": {
  7602. "200": {
  7603. "description": "Updated session",
  7604. "content": {
  7605. "application/json": {
  7606. "schema": {
  7607. "$ref": "#/components/schemas/Session"
  7608. }
  7609. }
  7610. }
  7611. },
  7612. "400": {
  7613. "description": "BadRequest | InvalidRequestError",
  7614. "content": {
  7615. "application/json": {
  7616. "schema": {
  7617. "anyOf": [
  7618. {
  7619. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7620. },
  7621. {
  7622. "$ref": "#/components/schemas/InvalidRequestError"
  7623. }
  7624. ]
  7625. }
  7626. }
  7627. }
  7628. },
  7629. "404": {
  7630. "description": "NotFoundError",
  7631. "content": {
  7632. "application/json": {
  7633. "schema": {
  7634. "$ref": "#/components/schemas/NotFoundError"
  7635. }
  7636. }
  7637. }
  7638. },
  7639. "409": {
  7640. "description": "SessionBusyError",
  7641. "content": {
  7642. "application/json": {
  7643. "schema": {
  7644. "$ref": "#/components/schemas/SessionBusyError"
  7645. }
  7646. }
  7647. }
  7648. }
  7649. },
  7650. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  7651. "summary": "Revert message",
  7652. "requestBody": {
  7653. "content": {
  7654. "application/json": {
  7655. "schema": {
  7656. "type": "object",
  7657. "properties": {
  7658. "messageID": {
  7659. "type": "string",
  7660. "pattern": "^msg"
  7661. },
  7662. "partID": {
  7663. "type": "string",
  7664. "pattern": "^prt"
  7665. }
  7666. },
  7667. "required": ["messageID"],
  7668. "additionalProperties": false
  7669. }
  7670. }
  7671. }
  7672. },
  7673. "x-codeSamples": [
  7674. {
  7675. "lang": "js",
  7676. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  7677. }
  7678. ]
  7679. }
  7680. },
  7681. "/session/{sessionID}/unrevert": {
  7682. "post": {
  7683. "tags": ["session"],
  7684. "operationId": "session.unrevert",
  7685. "parameters": [
  7686. {
  7687. "name": "sessionID",
  7688. "in": "path",
  7689. "schema": {
  7690. "type": "string",
  7691. "pattern": "^ses"
  7692. },
  7693. "required": true
  7694. },
  7695. {
  7696. "name": "directory",
  7697. "in": "query",
  7698. "schema": {
  7699. "type": "string"
  7700. },
  7701. "required": false
  7702. },
  7703. {
  7704. "name": "workspace",
  7705. "in": "query",
  7706. "schema": {
  7707. "type": "string"
  7708. },
  7709. "required": false
  7710. }
  7711. ],
  7712. "responses": {
  7713. "200": {
  7714. "description": "Updated session",
  7715. "content": {
  7716. "application/json": {
  7717. "schema": {
  7718. "$ref": "#/components/schemas/Session"
  7719. }
  7720. }
  7721. }
  7722. },
  7723. "400": {
  7724. "description": "BadRequest | InvalidRequestError",
  7725. "content": {
  7726. "application/json": {
  7727. "schema": {
  7728. "anyOf": [
  7729. {
  7730. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7731. },
  7732. {
  7733. "$ref": "#/components/schemas/InvalidRequestError"
  7734. }
  7735. ]
  7736. }
  7737. }
  7738. }
  7739. },
  7740. "404": {
  7741. "description": "NotFoundError",
  7742. "content": {
  7743. "application/json": {
  7744. "schema": {
  7745. "$ref": "#/components/schemas/NotFoundError"
  7746. }
  7747. }
  7748. }
  7749. },
  7750. "409": {
  7751. "description": "SessionBusyError",
  7752. "content": {
  7753. "application/json": {
  7754. "schema": {
  7755. "$ref": "#/components/schemas/SessionBusyError"
  7756. }
  7757. }
  7758. }
  7759. }
  7760. },
  7761. "description": "Restore all previously reverted messages in a session.",
  7762. "summary": "Restore reverted messages",
  7763. "x-codeSamples": [
  7764. {
  7765. "lang": "js",
  7766. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  7767. }
  7768. ]
  7769. }
  7770. },
  7771. "/session/{sessionID}/permissions/{permissionID}": {
  7772. "post": {
  7773. "tags": ["session"],
  7774. "operationId": "permission.respond",
  7775. "parameters": [
  7776. {
  7777. "name": "sessionID",
  7778. "in": "path",
  7779. "schema": {
  7780. "type": "string",
  7781. "pattern": "^ses"
  7782. },
  7783. "required": true
  7784. },
  7785. {
  7786. "name": "permissionID",
  7787. "in": "path",
  7788. "schema": {
  7789. "type": "string",
  7790. "pattern": "^per"
  7791. },
  7792. "required": true
  7793. },
  7794. {
  7795. "name": "directory",
  7796. "in": "query",
  7797. "schema": {
  7798. "type": "string"
  7799. },
  7800. "required": false
  7801. },
  7802. {
  7803. "name": "workspace",
  7804. "in": "query",
  7805. "schema": {
  7806. "type": "string"
  7807. },
  7808. "required": false
  7809. }
  7810. ],
  7811. "responses": {
  7812. "200": {
  7813. "description": "Permission processed successfully",
  7814. "content": {
  7815. "application/json": {
  7816. "schema": {
  7817. "type": "boolean",
  7818. "description": "Permission processed successfully"
  7819. }
  7820. }
  7821. }
  7822. },
  7823. "400": {
  7824. "description": "BadRequest | InvalidRequestError",
  7825. "content": {
  7826. "application/json": {
  7827. "schema": {
  7828. "anyOf": [
  7829. {
  7830. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7831. },
  7832. {
  7833. "$ref": "#/components/schemas/InvalidRequestError"
  7834. }
  7835. ]
  7836. }
  7837. }
  7838. }
  7839. },
  7840. "404": {
  7841. "description": "NotFoundError | PermissionNotFoundError",
  7842. "content": {
  7843. "application/json": {
  7844. "schema": {
  7845. "anyOf": [
  7846. {
  7847. "$ref": "#/components/schemas/NotFoundError"
  7848. },
  7849. {
  7850. "$ref": "#/components/schemas/PermissionNotFoundError"
  7851. }
  7852. ]
  7853. }
  7854. }
  7855. }
  7856. }
  7857. },
  7858. "description": "Approve or deny a permission request from the AI assistant.",
  7859. "summary": "Respond to permission",
  7860. "deprecated": true,
  7861. "requestBody": {
  7862. "content": {
  7863. "application/json": {
  7864. "schema": {
  7865. "type": "object",
  7866. "properties": {
  7867. "response": {
  7868. "type": "string",
  7869. "enum": ["once", "always", "reject"]
  7870. }
  7871. },
  7872. "required": ["response"],
  7873. "additionalProperties": false
  7874. }
  7875. }
  7876. }
  7877. },
  7878. "x-codeSamples": [
  7879. {
  7880. "lang": "js",
  7881. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  7882. }
  7883. ]
  7884. }
  7885. },
  7886. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  7887. "delete": {
  7888. "tags": ["session"],
  7889. "operationId": "part.delete",
  7890. "parameters": [
  7891. {
  7892. "name": "sessionID",
  7893. "in": "path",
  7894. "schema": {
  7895. "type": "string",
  7896. "pattern": "^ses"
  7897. },
  7898. "required": true
  7899. },
  7900. {
  7901. "name": "messageID",
  7902. "in": "path",
  7903. "schema": {
  7904. "type": "string",
  7905. "pattern": "^msg"
  7906. },
  7907. "required": true
  7908. },
  7909. {
  7910. "name": "partID",
  7911. "in": "path",
  7912. "schema": {
  7913. "type": "string",
  7914. "pattern": "^prt"
  7915. },
  7916. "required": true
  7917. },
  7918. {
  7919. "name": "directory",
  7920. "in": "query",
  7921. "schema": {
  7922. "type": "string"
  7923. },
  7924. "required": false
  7925. },
  7926. {
  7927. "name": "workspace",
  7928. "in": "query",
  7929. "schema": {
  7930. "type": "string"
  7931. },
  7932. "required": false
  7933. }
  7934. ],
  7935. "responses": {
  7936. "200": {
  7937. "description": "Successfully deleted part",
  7938. "content": {
  7939. "application/json": {
  7940. "schema": {
  7941. "type": "boolean",
  7942. "description": "Successfully deleted part"
  7943. }
  7944. }
  7945. }
  7946. },
  7947. "400": {
  7948. "description": "BadRequest | InvalidRequestError",
  7949. "content": {
  7950. "application/json": {
  7951. "schema": {
  7952. "anyOf": [
  7953. {
  7954. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7955. },
  7956. {
  7957. "$ref": "#/components/schemas/InvalidRequestError"
  7958. }
  7959. ]
  7960. }
  7961. }
  7962. }
  7963. },
  7964. "404": {
  7965. "description": "NotFoundError",
  7966. "content": {
  7967. "application/json": {
  7968. "schema": {
  7969. "$ref": "#/components/schemas/NotFoundError"
  7970. }
  7971. }
  7972. }
  7973. }
  7974. },
  7975. "description": "Delete a part from a message.",
  7976. "x-codeSamples": [
  7977. {
  7978. "lang": "js",
  7979. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  7980. }
  7981. ]
  7982. },
  7983. "patch": {
  7984. "tags": ["session"],
  7985. "operationId": "part.update",
  7986. "parameters": [
  7987. {
  7988. "name": "sessionID",
  7989. "in": "path",
  7990. "schema": {
  7991. "type": "string",
  7992. "pattern": "^ses"
  7993. },
  7994. "required": true
  7995. },
  7996. {
  7997. "name": "messageID",
  7998. "in": "path",
  7999. "schema": {
  8000. "type": "string",
  8001. "pattern": "^msg"
  8002. },
  8003. "required": true
  8004. },
  8005. {
  8006. "name": "partID",
  8007. "in": "path",
  8008. "schema": {
  8009. "type": "string",
  8010. "pattern": "^prt"
  8011. },
  8012. "required": true
  8013. },
  8014. {
  8015. "name": "directory",
  8016. "in": "query",
  8017. "schema": {
  8018. "type": "string"
  8019. },
  8020. "required": false
  8021. },
  8022. {
  8023. "name": "workspace",
  8024. "in": "query",
  8025. "schema": {
  8026. "type": "string"
  8027. },
  8028. "required": false
  8029. }
  8030. ],
  8031. "responses": {
  8032. "200": {
  8033. "description": "Successfully updated part",
  8034. "content": {
  8035. "application/json": {
  8036. "schema": {
  8037. "$ref": "#/components/schemas/Part"
  8038. }
  8039. }
  8040. }
  8041. },
  8042. "400": {
  8043. "description": "BadRequest | InvalidRequestError",
  8044. "content": {
  8045. "application/json": {
  8046. "schema": {
  8047. "anyOf": [
  8048. {
  8049. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8050. },
  8051. {
  8052. "$ref": "#/components/schemas/InvalidRequestError"
  8053. }
  8054. ]
  8055. }
  8056. }
  8057. }
  8058. },
  8059. "404": {
  8060. "description": "NotFoundError",
  8061. "content": {
  8062. "application/json": {
  8063. "schema": {
  8064. "$ref": "#/components/schemas/NotFoundError"
  8065. }
  8066. }
  8067. }
  8068. }
  8069. },
  8070. "description": "Update a part in a message.",
  8071. "requestBody": {
  8072. "content": {
  8073. "application/json": {
  8074. "schema": {
  8075. "$ref": "#/components/schemas/Part"
  8076. }
  8077. }
  8078. }
  8079. },
  8080. "x-codeSamples": [
  8081. {
  8082. "lang": "js",
  8083. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  8084. }
  8085. ]
  8086. }
  8087. },
  8088. "/sync/start": {
  8089. "post": {
  8090. "tags": ["sync"],
  8091. "operationId": "sync.start",
  8092. "parameters": [
  8093. {
  8094. "name": "directory",
  8095. "in": "query",
  8096. "schema": {
  8097. "type": "string"
  8098. },
  8099. "required": false
  8100. },
  8101. {
  8102. "name": "workspace",
  8103. "in": "query",
  8104. "schema": {
  8105. "type": "string"
  8106. },
  8107. "required": false
  8108. }
  8109. ],
  8110. "responses": {
  8111. "200": {
  8112. "description": "Workspace sync started",
  8113. "content": {
  8114. "application/json": {
  8115. "schema": {
  8116. "type": "boolean",
  8117. "description": "Workspace sync started"
  8118. }
  8119. }
  8120. }
  8121. },
  8122. "400": {
  8123. "description": "Bad request",
  8124. "content": {
  8125. "application/json": {
  8126. "schema": {
  8127. "$ref": "#/components/schemas/BadRequestError"
  8128. }
  8129. }
  8130. }
  8131. }
  8132. },
  8133. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  8134. "summary": "Start workspace sync",
  8135. "x-codeSamples": [
  8136. {
  8137. "lang": "js",
  8138. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  8139. }
  8140. ]
  8141. }
  8142. },
  8143. "/sync/replay": {
  8144. "post": {
  8145. "tags": ["sync"],
  8146. "operationId": "sync.replay",
  8147. "parameters": [
  8148. {
  8149. "name": "directory",
  8150. "in": "query",
  8151. "schema": {
  8152. "type": "string"
  8153. },
  8154. "required": false
  8155. },
  8156. {
  8157. "name": "workspace",
  8158. "in": "query",
  8159. "schema": {
  8160. "type": "string"
  8161. },
  8162. "required": false
  8163. }
  8164. ],
  8165. "responses": {
  8166. "200": {
  8167. "description": "Replayed sync events",
  8168. "content": {
  8169. "application/json": {
  8170. "schema": {
  8171. "type": "object",
  8172. "properties": {
  8173. "sessionID": {
  8174. "type": "string"
  8175. }
  8176. },
  8177. "required": ["sessionID"],
  8178. "additionalProperties": false,
  8179. "description": "Replayed sync events"
  8180. }
  8181. }
  8182. }
  8183. },
  8184. "400": {
  8185. "description": "BadRequest | InvalidRequestError",
  8186. "content": {
  8187. "application/json": {
  8188. "schema": {
  8189. "anyOf": [
  8190. {
  8191. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8192. },
  8193. {
  8194. "$ref": "#/components/schemas/InvalidRequestError"
  8195. }
  8196. ]
  8197. }
  8198. }
  8199. }
  8200. }
  8201. },
  8202. "description": "Validate and replay a complete sync event history.",
  8203. "summary": "Replay sync events",
  8204. "requestBody": {
  8205. "content": {
  8206. "application/json": {
  8207. "schema": {
  8208. "type": "object",
  8209. "properties": {
  8210. "directory": {
  8211. "type": "string"
  8212. },
  8213. "events": {
  8214. "type": "array",
  8215. "minItems": 1,
  8216. "items": {
  8217. "type": "object",
  8218. "properties": {
  8219. "id": {
  8220. "type": "string",
  8221. "pattern": "^evt_"
  8222. },
  8223. "aggregateID": {
  8224. "type": "string"
  8225. },
  8226. "seq": {
  8227. "type": "integer",
  8228. "minimum": 0
  8229. },
  8230. "type": {
  8231. "type": "string"
  8232. },
  8233. "data": {
  8234. "type": "object"
  8235. }
  8236. },
  8237. "required": ["id", "aggregateID", "seq", "type", "data"],
  8238. "additionalProperties": false
  8239. }
  8240. }
  8241. },
  8242. "required": ["directory", "events"],
  8243. "additionalProperties": false
  8244. }
  8245. }
  8246. }
  8247. },
  8248. "x-codeSamples": [
  8249. {
  8250. "lang": "js",
  8251. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  8252. }
  8253. ]
  8254. }
  8255. },
  8256. "/sync/steal": {
  8257. "post": {
  8258. "tags": ["sync"],
  8259. "operationId": "sync.steal",
  8260. "parameters": [
  8261. {
  8262. "name": "directory",
  8263. "in": "query",
  8264. "schema": {
  8265. "type": "string"
  8266. },
  8267. "required": false
  8268. },
  8269. {
  8270. "name": "workspace",
  8271. "in": "query",
  8272. "schema": {
  8273. "type": "string"
  8274. },
  8275. "required": false
  8276. }
  8277. ],
  8278. "responses": {
  8279. "200": {
  8280. "description": "Session stolen into workspace",
  8281. "content": {
  8282. "application/json": {
  8283. "schema": {
  8284. "type": "object",
  8285. "properties": {
  8286. "sessionID": {
  8287. "type": "string",
  8288. "pattern": "^ses"
  8289. }
  8290. },
  8291. "required": ["sessionID"],
  8292. "additionalProperties": false,
  8293. "description": "Session stolen into workspace"
  8294. }
  8295. }
  8296. }
  8297. },
  8298. "400": {
  8299. "description": "BadRequest | InvalidRequestError",
  8300. "content": {
  8301. "application/json": {
  8302. "schema": {
  8303. "anyOf": [
  8304. {
  8305. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8306. },
  8307. {
  8308. "$ref": "#/components/schemas/InvalidRequestError"
  8309. }
  8310. ]
  8311. }
  8312. }
  8313. }
  8314. }
  8315. },
  8316. "description": "Update a session to belong to the current workspace through the sync event system.",
  8317. "summary": "Steal session into workspace",
  8318. "requestBody": {
  8319. "content": {
  8320. "application/json": {
  8321. "schema": {
  8322. "type": "object",
  8323. "properties": {
  8324. "sessionID": {
  8325. "type": "string",
  8326. "pattern": "^ses"
  8327. }
  8328. },
  8329. "required": ["sessionID"],
  8330. "additionalProperties": false
  8331. }
  8332. }
  8333. }
  8334. },
  8335. "x-codeSamples": [
  8336. {
  8337. "lang": "js",
  8338. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.steal({\n ...\n})"
  8339. }
  8340. ]
  8341. }
  8342. },
  8343. "/sync/history": {
  8344. "post": {
  8345. "tags": ["sync"],
  8346. "operationId": "sync.history.list",
  8347. "parameters": [
  8348. {
  8349. "name": "directory",
  8350. "in": "query",
  8351. "schema": {
  8352. "type": "string"
  8353. },
  8354. "required": false
  8355. },
  8356. {
  8357. "name": "workspace",
  8358. "in": "query",
  8359. "schema": {
  8360. "type": "string"
  8361. },
  8362. "required": false
  8363. }
  8364. ],
  8365. "responses": {
  8366. "200": {
  8367. "description": "Sync events",
  8368. "content": {
  8369. "application/json": {
  8370. "schema": {
  8371. "type": "array",
  8372. "items": {
  8373. "type": "object",
  8374. "properties": {
  8375. "id": {
  8376. "type": "string",
  8377. "pattern": "^evt_"
  8378. },
  8379. "aggregate_id": {
  8380. "type": "string"
  8381. },
  8382. "seq": {
  8383. "type": "integer",
  8384. "minimum": 0
  8385. },
  8386. "type": {
  8387. "type": "string"
  8388. },
  8389. "data": {
  8390. "type": "object"
  8391. }
  8392. },
  8393. "required": ["id", "aggregate_id", "seq", "type", "data"],
  8394. "additionalProperties": false
  8395. },
  8396. "description": "Sync events"
  8397. }
  8398. }
  8399. }
  8400. },
  8401. "400": {
  8402. "description": "BadRequest | InvalidRequestError",
  8403. "content": {
  8404. "application/json": {
  8405. "schema": {
  8406. "anyOf": [
  8407. {
  8408. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8409. },
  8410. {
  8411. "$ref": "#/components/schemas/InvalidRequestError"
  8412. }
  8413. ]
  8414. }
  8415. }
  8416. }
  8417. }
  8418. },
  8419. "description": "List sync events for all aggregates. Keys are aggregate IDs the client already knows about, values are the last known sequence ID. Events with seq > value are returned for those aggregates. Aggregates not listed in the input get their full history.",
  8420. "summary": "List sync events",
  8421. "requestBody": {
  8422. "content": {
  8423. "application/json": {
  8424. "schema": {
  8425. "type": "object",
  8426. "additionalProperties": {
  8427. "type": "integer",
  8428. "minimum": 0
  8429. }
  8430. }
  8431. }
  8432. }
  8433. },
  8434. "x-codeSamples": [
  8435. {
  8436. "lang": "js",
  8437. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  8438. }
  8439. ]
  8440. }
  8441. },
  8442. "/tui/append-prompt": {
  8443. "post": {
  8444. "tags": ["tui"],
  8445. "operationId": "tui.appendPrompt",
  8446. "parameters": [
  8447. {
  8448. "name": "directory",
  8449. "in": "query",
  8450. "schema": {
  8451. "type": "string"
  8452. },
  8453. "required": false
  8454. },
  8455. {
  8456. "name": "workspace",
  8457. "in": "query",
  8458. "schema": {
  8459. "type": "string"
  8460. },
  8461. "required": false
  8462. }
  8463. ],
  8464. "responses": {
  8465. "200": {
  8466. "description": "Prompt processed successfully",
  8467. "content": {
  8468. "application/json": {
  8469. "schema": {
  8470. "type": "boolean",
  8471. "description": "Prompt processed successfully"
  8472. }
  8473. }
  8474. }
  8475. },
  8476. "400": {
  8477. "description": "BadRequest | InvalidRequestError",
  8478. "content": {
  8479. "application/json": {
  8480. "schema": {
  8481. "anyOf": [
  8482. {
  8483. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8484. },
  8485. {
  8486. "$ref": "#/components/schemas/InvalidRequestError"
  8487. }
  8488. ]
  8489. }
  8490. }
  8491. }
  8492. }
  8493. },
  8494. "description": "Append prompt to the TUI.",
  8495. "summary": "Append TUI prompt",
  8496. "requestBody": {
  8497. "content": {
  8498. "application/json": {
  8499. "schema": {
  8500. "type": "object",
  8501. "properties": {
  8502. "text": {
  8503. "type": "string"
  8504. }
  8505. },
  8506. "required": ["text"],
  8507. "additionalProperties": false
  8508. }
  8509. }
  8510. }
  8511. },
  8512. "x-codeSamples": [
  8513. {
  8514. "lang": "js",
  8515. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  8516. }
  8517. ]
  8518. }
  8519. },
  8520. "/tui/open-help": {
  8521. "post": {
  8522. "tags": ["tui"],
  8523. "operationId": "tui.openHelp",
  8524. "parameters": [
  8525. {
  8526. "name": "directory",
  8527. "in": "query",
  8528. "schema": {
  8529. "type": "string"
  8530. },
  8531. "required": false
  8532. },
  8533. {
  8534. "name": "workspace",
  8535. "in": "query",
  8536. "schema": {
  8537. "type": "string"
  8538. },
  8539. "required": false
  8540. }
  8541. ],
  8542. "responses": {
  8543. "200": {
  8544. "description": "Help dialog opened successfully",
  8545. "content": {
  8546. "application/json": {
  8547. "schema": {
  8548. "type": "boolean",
  8549. "description": "Help dialog opened successfully"
  8550. }
  8551. }
  8552. }
  8553. },
  8554. "400": {
  8555. "description": "Bad request",
  8556. "content": {
  8557. "application/json": {
  8558. "schema": {
  8559. "$ref": "#/components/schemas/BadRequestError"
  8560. }
  8561. }
  8562. }
  8563. }
  8564. },
  8565. "description": "Open the help dialog in the TUI to display user assistance information.",
  8566. "summary": "Open help dialog",
  8567. "x-codeSamples": [
  8568. {
  8569. "lang": "js",
  8570. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  8571. }
  8572. ]
  8573. }
  8574. },
  8575. "/tui/open-sessions": {
  8576. "post": {
  8577. "tags": ["tui"],
  8578. "operationId": "tui.openSessions",
  8579. "parameters": [
  8580. {
  8581. "name": "directory",
  8582. "in": "query",
  8583. "schema": {
  8584. "type": "string"
  8585. },
  8586. "required": false
  8587. },
  8588. {
  8589. "name": "workspace",
  8590. "in": "query",
  8591. "schema": {
  8592. "type": "string"
  8593. },
  8594. "required": false
  8595. }
  8596. ],
  8597. "responses": {
  8598. "200": {
  8599. "description": "Session dialog opened successfully",
  8600. "content": {
  8601. "application/json": {
  8602. "schema": {
  8603. "type": "boolean",
  8604. "description": "Session dialog opened successfully"
  8605. }
  8606. }
  8607. }
  8608. },
  8609. "400": {
  8610. "description": "Bad request",
  8611. "content": {
  8612. "application/json": {
  8613. "schema": {
  8614. "$ref": "#/components/schemas/BadRequestError"
  8615. }
  8616. }
  8617. }
  8618. }
  8619. },
  8620. "description": "Open the session dialog.",
  8621. "summary": "Open sessions dialog",
  8622. "x-codeSamples": [
  8623. {
  8624. "lang": "js",
  8625. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  8626. }
  8627. ]
  8628. }
  8629. },
  8630. "/tui/open-themes": {
  8631. "post": {
  8632. "tags": ["tui"],
  8633. "operationId": "tui.openThemes",
  8634. "parameters": [
  8635. {
  8636. "name": "directory",
  8637. "in": "query",
  8638. "schema": {
  8639. "type": "string"
  8640. },
  8641. "required": false
  8642. },
  8643. {
  8644. "name": "workspace",
  8645. "in": "query",
  8646. "schema": {
  8647. "type": "string"
  8648. },
  8649. "required": false
  8650. }
  8651. ],
  8652. "responses": {
  8653. "200": {
  8654. "description": "Theme dialog opened successfully",
  8655. "content": {
  8656. "application/json": {
  8657. "schema": {
  8658. "type": "boolean",
  8659. "description": "Theme dialog opened successfully"
  8660. }
  8661. }
  8662. }
  8663. },
  8664. "400": {
  8665. "description": "Bad request",
  8666. "content": {
  8667. "application/json": {
  8668. "schema": {
  8669. "$ref": "#/components/schemas/BadRequestError"
  8670. }
  8671. }
  8672. }
  8673. }
  8674. },
  8675. "description": "Open the theme dialog.",
  8676. "summary": "Open themes dialog",
  8677. "x-codeSamples": [
  8678. {
  8679. "lang": "js",
  8680. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  8681. }
  8682. ]
  8683. }
  8684. },
  8685. "/tui/open-models": {
  8686. "post": {
  8687. "tags": ["tui"],
  8688. "operationId": "tui.openModels",
  8689. "parameters": [
  8690. {
  8691. "name": "directory",
  8692. "in": "query",
  8693. "schema": {
  8694. "type": "string"
  8695. },
  8696. "required": false
  8697. },
  8698. {
  8699. "name": "workspace",
  8700. "in": "query",
  8701. "schema": {
  8702. "type": "string"
  8703. },
  8704. "required": false
  8705. }
  8706. ],
  8707. "responses": {
  8708. "200": {
  8709. "description": "Model dialog opened successfully",
  8710. "content": {
  8711. "application/json": {
  8712. "schema": {
  8713. "type": "boolean",
  8714. "description": "Model dialog opened successfully"
  8715. }
  8716. }
  8717. }
  8718. },
  8719. "400": {
  8720. "description": "Bad request",
  8721. "content": {
  8722. "application/json": {
  8723. "schema": {
  8724. "$ref": "#/components/schemas/BadRequestError"
  8725. }
  8726. }
  8727. }
  8728. }
  8729. },
  8730. "description": "Open the model dialog.",
  8731. "summary": "Open models dialog",
  8732. "x-codeSamples": [
  8733. {
  8734. "lang": "js",
  8735. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  8736. }
  8737. ]
  8738. }
  8739. },
  8740. "/tui/submit-prompt": {
  8741. "post": {
  8742. "tags": ["tui"],
  8743. "operationId": "tui.submitPrompt",
  8744. "parameters": [
  8745. {
  8746. "name": "directory",
  8747. "in": "query",
  8748. "schema": {
  8749. "type": "string"
  8750. },
  8751. "required": false
  8752. },
  8753. {
  8754. "name": "workspace",
  8755. "in": "query",
  8756. "schema": {
  8757. "type": "string"
  8758. },
  8759. "required": false
  8760. }
  8761. ],
  8762. "responses": {
  8763. "200": {
  8764. "description": "Prompt submitted successfully",
  8765. "content": {
  8766. "application/json": {
  8767. "schema": {
  8768. "type": "boolean",
  8769. "description": "Prompt submitted successfully"
  8770. }
  8771. }
  8772. }
  8773. },
  8774. "400": {
  8775. "description": "Bad request",
  8776. "content": {
  8777. "application/json": {
  8778. "schema": {
  8779. "$ref": "#/components/schemas/BadRequestError"
  8780. }
  8781. }
  8782. }
  8783. }
  8784. },
  8785. "description": "Submit the prompt.",
  8786. "summary": "Submit TUI prompt",
  8787. "x-codeSamples": [
  8788. {
  8789. "lang": "js",
  8790. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  8791. }
  8792. ]
  8793. }
  8794. },
  8795. "/tui/clear-prompt": {
  8796. "post": {
  8797. "tags": ["tui"],
  8798. "operationId": "tui.clearPrompt",
  8799. "parameters": [
  8800. {
  8801. "name": "directory",
  8802. "in": "query",
  8803. "schema": {
  8804. "type": "string"
  8805. },
  8806. "required": false
  8807. },
  8808. {
  8809. "name": "workspace",
  8810. "in": "query",
  8811. "schema": {
  8812. "type": "string"
  8813. },
  8814. "required": false
  8815. }
  8816. ],
  8817. "responses": {
  8818. "200": {
  8819. "description": "Prompt cleared successfully",
  8820. "content": {
  8821. "application/json": {
  8822. "schema": {
  8823. "type": "boolean",
  8824. "description": "Prompt cleared successfully"
  8825. }
  8826. }
  8827. }
  8828. },
  8829. "400": {
  8830. "description": "Bad request",
  8831. "content": {
  8832. "application/json": {
  8833. "schema": {
  8834. "$ref": "#/components/schemas/BadRequestError"
  8835. }
  8836. }
  8837. }
  8838. }
  8839. },
  8840. "description": "Clear the prompt.",
  8841. "summary": "Clear TUI prompt",
  8842. "x-codeSamples": [
  8843. {
  8844. "lang": "js",
  8845. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  8846. }
  8847. ]
  8848. }
  8849. },
  8850. "/tui/execute-command": {
  8851. "post": {
  8852. "tags": ["tui"],
  8853. "operationId": "tui.executeCommand",
  8854. "parameters": [
  8855. {
  8856. "name": "directory",
  8857. "in": "query",
  8858. "schema": {
  8859. "type": "string"
  8860. },
  8861. "required": false
  8862. },
  8863. {
  8864. "name": "workspace",
  8865. "in": "query",
  8866. "schema": {
  8867. "type": "string"
  8868. },
  8869. "required": false
  8870. }
  8871. ],
  8872. "responses": {
  8873. "200": {
  8874. "description": "Command executed successfully",
  8875. "content": {
  8876. "application/json": {
  8877. "schema": {
  8878. "type": "boolean",
  8879. "description": "Command executed successfully"
  8880. }
  8881. }
  8882. }
  8883. },
  8884. "400": {
  8885. "description": "BadRequest | InvalidRequestError",
  8886. "content": {
  8887. "application/json": {
  8888. "schema": {
  8889. "anyOf": [
  8890. {
  8891. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8892. },
  8893. {
  8894. "$ref": "#/components/schemas/InvalidRequestError"
  8895. }
  8896. ]
  8897. }
  8898. }
  8899. }
  8900. }
  8901. },
  8902. "description": "Execute a TUI command.",
  8903. "summary": "Execute TUI command",
  8904. "requestBody": {
  8905. "content": {
  8906. "application/json": {
  8907. "schema": {
  8908. "type": "object",
  8909. "properties": {
  8910. "command": {
  8911. "type": "string"
  8912. }
  8913. },
  8914. "required": ["command"],
  8915. "additionalProperties": false
  8916. }
  8917. }
  8918. }
  8919. },
  8920. "x-codeSamples": [
  8921. {
  8922. "lang": "js",
  8923. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  8924. }
  8925. ]
  8926. }
  8927. },
  8928. "/tui/show-toast": {
  8929. "post": {
  8930. "tags": ["tui"],
  8931. "operationId": "tui.showToast",
  8932. "parameters": [
  8933. {
  8934. "name": "directory",
  8935. "in": "query",
  8936. "schema": {
  8937. "type": "string"
  8938. },
  8939. "required": false
  8940. },
  8941. {
  8942. "name": "workspace",
  8943. "in": "query",
  8944. "schema": {
  8945. "type": "string"
  8946. },
  8947. "required": false
  8948. }
  8949. ],
  8950. "responses": {
  8951. "200": {
  8952. "description": "Toast notification shown successfully",
  8953. "content": {
  8954. "application/json": {
  8955. "schema": {
  8956. "type": "boolean",
  8957. "description": "Toast notification shown successfully"
  8958. }
  8959. }
  8960. }
  8961. },
  8962. "400": {
  8963. "description": "Bad request",
  8964. "content": {
  8965. "application/json": {
  8966. "schema": {
  8967. "$ref": "#/components/schemas/BadRequestError"
  8968. }
  8969. }
  8970. }
  8971. }
  8972. },
  8973. "description": "Show a toast notification in the TUI.",
  8974. "summary": "Show TUI toast",
  8975. "requestBody": {
  8976. "content": {
  8977. "application/json": {
  8978. "schema": {
  8979. "type": "object",
  8980. "properties": {
  8981. "title": {
  8982. "type": "string"
  8983. },
  8984. "message": {
  8985. "type": "string"
  8986. },
  8987. "variant": {
  8988. "type": "string",
  8989. "enum": ["info", "success", "warning", "error"]
  8990. },
  8991. "duration": {
  8992. "type": "integer",
  8993. "exclusiveMinimum": 0
  8994. }
  8995. },
  8996. "required": ["message", "variant"],
  8997. "additionalProperties": false
  8998. }
  8999. }
  9000. }
  9001. },
  9002. "x-codeSamples": [
  9003. {
  9004. "lang": "js",
  9005. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  9006. }
  9007. ]
  9008. }
  9009. },
  9010. "/tui/publish": {
  9011. "post": {
  9012. "tags": ["tui"],
  9013. "operationId": "tui.publish",
  9014. "parameters": [
  9015. {
  9016. "name": "directory",
  9017. "in": "query",
  9018. "schema": {
  9019. "type": "string"
  9020. },
  9021. "required": false
  9022. },
  9023. {
  9024. "name": "workspace",
  9025. "in": "query",
  9026. "schema": {
  9027. "type": "string"
  9028. },
  9029. "required": false
  9030. }
  9031. ],
  9032. "responses": {
  9033. "200": {
  9034. "description": "Event published successfully",
  9035. "content": {
  9036. "application/json": {
  9037. "schema": {
  9038. "type": "boolean",
  9039. "description": "Event published successfully"
  9040. }
  9041. }
  9042. }
  9043. },
  9044. "400": {
  9045. "description": "BadRequest | InvalidRequestError",
  9046. "content": {
  9047. "application/json": {
  9048. "schema": {
  9049. "anyOf": [
  9050. {
  9051. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9052. },
  9053. {
  9054. "$ref": "#/components/schemas/InvalidRequestError"
  9055. }
  9056. ]
  9057. }
  9058. }
  9059. }
  9060. }
  9061. },
  9062. "description": "Publish a TUI event.",
  9063. "summary": "Publish TUI event",
  9064. "requestBody": {
  9065. "content": {
  9066. "application/json": {
  9067. "schema": {
  9068. "anyOf": [
  9069. {
  9070. "$ref": "#/components/schemas/EventTuiPromptAppend"
  9071. },
  9072. {
  9073. "$ref": "#/components/schemas/EventTuiCommandExecute"
  9074. },
  9075. {
  9076. "$ref": "#/components/schemas/EventTuiToastShow"
  9077. },
  9078. {
  9079. "$ref": "#/components/schemas/EventTuiSessionSelect"
  9080. }
  9081. ]
  9082. }
  9083. }
  9084. }
  9085. },
  9086. "x-codeSamples": [
  9087. {
  9088. "lang": "js",
  9089. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  9090. }
  9091. ]
  9092. }
  9093. },
  9094. "/tui/select-session": {
  9095. "post": {
  9096. "tags": ["tui"],
  9097. "operationId": "tui.selectSession",
  9098. "parameters": [
  9099. {
  9100. "name": "directory",
  9101. "in": "query",
  9102. "schema": {
  9103. "type": "string"
  9104. },
  9105. "required": false
  9106. },
  9107. {
  9108. "name": "workspace",
  9109. "in": "query",
  9110. "schema": {
  9111. "type": "string"
  9112. },
  9113. "required": false
  9114. }
  9115. ],
  9116. "responses": {
  9117. "200": {
  9118. "description": "Session selected successfully",
  9119. "content": {
  9120. "application/json": {
  9121. "schema": {
  9122. "type": "boolean",
  9123. "description": "Session selected successfully"
  9124. }
  9125. }
  9126. }
  9127. },
  9128. "400": {
  9129. "description": "BadRequest | InvalidRequestError",
  9130. "content": {
  9131. "application/json": {
  9132. "schema": {
  9133. "anyOf": [
  9134. {
  9135. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9136. },
  9137. {
  9138. "$ref": "#/components/schemas/InvalidRequestError"
  9139. }
  9140. ]
  9141. }
  9142. }
  9143. }
  9144. },
  9145. "404": {
  9146. "description": "NotFoundError",
  9147. "content": {
  9148. "application/json": {
  9149. "schema": {
  9150. "$ref": "#/components/schemas/NotFoundError"
  9151. }
  9152. }
  9153. }
  9154. }
  9155. },
  9156. "description": "Navigate the TUI to display the specified session.",
  9157. "summary": "Select session",
  9158. "requestBody": {
  9159. "content": {
  9160. "application/json": {
  9161. "schema": {
  9162. "type": "object",
  9163. "properties": {
  9164. "sessionID": {
  9165. "type": "string",
  9166. "pattern": "^ses",
  9167. "description": "Session ID to navigate to"
  9168. }
  9169. },
  9170. "required": ["sessionID"],
  9171. "additionalProperties": false
  9172. }
  9173. }
  9174. }
  9175. },
  9176. "x-codeSamples": [
  9177. {
  9178. "lang": "js",
  9179. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  9180. }
  9181. ]
  9182. }
  9183. },
  9184. "/tui/control/next": {
  9185. "get": {
  9186. "tags": ["tui"],
  9187. "operationId": "tui.control.next",
  9188. "parameters": [
  9189. {
  9190. "name": "directory",
  9191. "in": "query",
  9192. "schema": {
  9193. "type": "string"
  9194. },
  9195. "required": false
  9196. },
  9197. {
  9198. "name": "workspace",
  9199. "in": "query",
  9200. "schema": {
  9201. "type": "string"
  9202. },
  9203. "required": false
  9204. }
  9205. ],
  9206. "responses": {
  9207. "200": {
  9208. "description": "Next TUI request",
  9209. "content": {
  9210. "application/json": {
  9211. "schema": {
  9212. "type": "object",
  9213. "properties": {
  9214. "path": {
  9215. "type": "string"
  9216. },
  9217. "body": {}
  9218. },
  9219. "required": ["path", "body"],
  9220. "additionalProperties": false,
  9221. "description": "Next TUI request"
  9222. }
  9223. }
  9224. }
  9225. },
  9226. "400": {
  9227. "description": "Bad request",
  9228. "content": {
  9229. "application/json": {
  9230. "schema": {
  9231. "$ref": "#/components/schemas/BadRequestError"
  9232. }
  9233. }
  9234. }
  9235. }
  9236. },
  9237. "description": "Retrieve the next TUI request from the queue for processing.",
  9238. "summary": "Get next TUI request",
  9239. "x-codeSamples": [
  9240. {
  9241. "lang": "js",
  9242. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  9243. }
  9244. ]
  9245. }
  9246. },
  9247. "/tui/control/response": {
  9248. "post": {
  9249. "tags": ["tui"],
  9250. "operationId": "tui.control.response",
  9251. "parameters": [
  9252. {
  9253. "name": "directory",
  9254. "in": "query",
  9255. "schema": {
  9256. "type": "string"
  9257. },
  9258. "required": false
  9259. },
  9260. {
  9261. "name": "workspace",
  9262. "in": "query",
  9263. "schema": {
  9264. "type": "string"
  9265. },
  9266. "required": false
  9267. }
  9268. ],
  9269. "responses": {
  9270. "200": {
  9271. "description": "Response submitted successfully",
  9272. "content": {
  9273. "application/json": {
  9274. "schema": {
  9275. "type": "boolean",
  9276. "description": "Response submitted successfully"
  9277. }
  9278. }
  9279. }
  9280. },
  9281. "400": {
  9282. "description": "Bad request",
  9283. "content": {
  9284. "application/json": {
  9285. "schema": {
  9286. "$ref": "#/components/schemas/BadRequestError"
  9287. }
  9288. }
  9289. }
  9290. }
  9291. },
  9292. "description": "Submit a response to the TUI request queue to complete a pending request.",
  9293. "summary": "Submit TUI response",
  9294. "requestBody": {
  9295. "content": {
  9296. "application/json": {
  9297. "schema": {}
  9298. }
  9299. }
  9300. },
  9301. "x-codeSamples": [
  9302. {
  9303. "lang": "js",
  9304. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  9305. }
  9306. ]
  9307. }
  9308. },
  9309. "/experimental/workspace/adapter": {
  9310. "get": {
  9311. "tags": ["workspace"],
  9312. "operationId": "experimental.workspace.adapter.list",
  9313. "parameters": [
  9314. {
  9315. "name": "directory",
  9316. "in": "query",
  9317. "schema": {
  9318. "type": "string"
  9319. },
  9320. "required": false
  9321. },
  9322. {
  9323. "name": "workspace",
  9324. "in": "query",
  9325. "schema": {
  9326. "type": "string"
  9327. },
  9328. "required": false
  9329. }
  9330. ],
  9331. "responses": {
  9332. "200": {
  9333. "description": "Workspace adapters",
  9334. "content": {
  9335. "application/json": {
  9336. "schema": {
  9337. "type": "array",
  9338. "items": {
  9339. "type": "object",
  9340. "properties": {
  9341. "type": {
  9342. "type": "string"
  9343. },
  9344. "name": {
  9345. "type": "string"
  9346. },
  9347. "description": {
  9348. "type": "string"
  9349. }
  9350. },
  9351. "required": ["type", "name", "description"],
  9352. "additionalProperties": false
  9353. },
  9354. "description": "Workspace adapters"
  9355. }
  9356. }
  9357. }
  9358. },
  9359. "400": {
  9360. "description": "Bad request",
  9361. "content": {
  9362. "application/json": {
  9363. "schema": {
  9364. "$ref": "#/components/schemas/BadRequestError"
  9365. }
  9366. }
  9367. }
  9368. }
  9369. },
  9370. "description": "List all available workspace adapters for the current project.",
  9371. "summary": "List workspace adapters",
  9372. "x-codeSamples": [
  9373. {
  9374. "lang": "js",
  9375. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  9376. }
  9377. ]
  9378. }
  9379. },
  9380. "/experimental/workspace": {
  9381. "get": {
  9382. "tags": ["workspace"],
  9383. "operationId": "experimental.workspace.list",
  9384. "parameters": [
  9385. {
  9386. "name": "directory",
  9387. "in": "query",
  9388. "schema": {
  9389. "type": "string"
  9390. },
  9391. "required": false
  9392. },
  9393. {
  9394. "name": "workspace",
  9395. "in": "query",
  9396. "schema": {
  9397. "type": "string"
  9398. },
  9399. "required": false
  9400. }
  9401. ],
  9402. "responses": {
  9403. "200": {
  9404. "description": "Workspaces",
  9405. "content": {
  9406. "application/json": {
  9407. "schema": {
  9408. "type": "array",
  9409. "items": {
  9410. "$ref": "#/components/schemas/Workspace"
  9411. },
  9412. "description": "Workspaces"
  9413. }
  9414. }
  9415. }
  9416. },
  9417. "400": {
  9418. "description": "Bad request",
  9419. "content": {
  9420. "application/json": {
  9421. "schema": {
  9422. "$ref": "#/components/schemas/BadRequestError"
  9423. }
  9424. }
  9425. }
  9426. }
  9427. },
  9428. "description": "List all workspaces.",
  9429. "summary": "List workspaces",
  9430. "x-codeSamples": [
  9431. {
  9432. "lang": "js",
  9433. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  9434. }
  9435. ]
  9436. },
  9437. "post": {
  9438. "tags": ["workspace"],
  9439. "operationId": "experimental.workspace.create",
  9440. "parameters": [
  9441. {
  9442. "name": "directory",
  9443. "in": "query",
  9444. "schema": {
  9445. "type": "string"
  9446. },
  9447. "required": false
  9448. },
  9449. {
  9450. "name": "workspace",
  9451. "in": "query",
  9452. "schema": {
  9453. "type": "string"
  9454. },
  9455. "required": false
  9456. }
  9457. ],
  9458. "responses": {
  9459. "200": {
  9460. "description": "Workspace created",
  9461. "content": {
  9462. "application/json": {
  9463. "schema": {
  9464. "$ref": "#/components/schemas/Workspace"
  9465. }
  9466. }
  9467. }
  9468. },
  9469. "400": {
  9470. "description": "WorkspaceCreateError | BadRequest | InvalidRequestError",
  9471. "content": {
  9472. "application/json": {
  9473. "schema": {
  9474. "anyOf": [
  9475. {
  9476. "$ref": "#/components/schemas/WorkspaceCreateError"
  9477. },
  9478. {
  9479. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9480. },
  9481. {
  9482. "$ref": "#/components/schemas/InvalidRequestError"
  9483. }
  9484. ]
  9485. }
  9486. }
  9487. }
  9488. }
  9489. },
  9490. "description": "Create a workspace for the current project.",
  9491. "summary": "Create workspace",
  9492. "requestBody": {
  9493. "content": {
  9494. "application/json": {
  9495. "schema": {
  9496. "type": "object",
  9497. "properties": {
  9498. "id": {
  9499. "type": "string",
  9500. "pattern": "^wrk"
  9501. },
  9502. "type": {
  9503. "type": "string"
  9504. },
  9505. "branch": {
  9506. "anyOf": [
  9507. {
  9508. "type": "string"
  9509. },
  9510. {
  9511. "type": "null"
  9512. }
  9513. ]
  9514. },
  9515. "extra": {
  9516. "anyOf": [
  9517. {},
  9518. {
  9519. "type": "null"
  9520. }
  9521. ]
  9522. }
  9523. },
  9524. "required": ["type"],
  9525. "additionalProperties": false
  9526. }
  9527. }
  9528. }
  9529. },
  9530. "x-codeSamples": [
  9531. {
  9532. "lang": "js",
  9533. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  9534. }
  9535. ]
  9536. }
  9537. },
  9538. "/experimental/workspace/sync-list": {
  9539. "post": {
  9540. "tags": ["workspace"],
  9541. "operationId": "experimental.workspace.syncList",
  9542. "parameters": [
  9543. {
  9544. "name": "directory",
  9545. "in": "query",
  9546. "schema": {
  9547. "type": "string"
  9548. },
  9549. "required": false
  9550. },
  9551. {
  9552. "name": "workspace",
  9553. "in": "query",
  9554. "schema": {
  9555. "type": "string"
  9556. },
  9557. "required": false
  9558. }
  9559. ],
  9560. "responses": {
  9561. "204": {
  9562. "description": "Workspace list synced"
  9563. },
  9564. "400": {
  9565. "description": "Bad request",
  9566. "content": {
  9567. "application/json": {
  9568. "schema": {
  9569. "$ref": "#/components/schemas/BadRequestError"
  9570. }
  9571. }
  9572. }
  9573. }
  9574. },
  9575. "description": "Register missing workspaces returned by workspace adapters.",
  9576. "summary": "Sync workspace list",
  9577. "x-codeSamples": [
  9578. {
  9579. "lang": "js",
  9580. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.syncList({\n ...\n})"
  9581. }
  9582. ]
  9583. }
  9584. },
  9585. "/experimental/workspace/status": {
  9586. "get": {
  9587. "tags": ["workspace"],
  9588. "operationId": "experimental.workspace.status",
  9589. "parameters": [
  9590. {
  9591. "name": "directory",
  9592. "in": "query",
  9593. "schema": {
  9594. "type": "string"
  9595. },
  9596. "required": false
  9597. },
  9598. {
  9599. "name": "workspace",
  9600. "in": "query",
  9601. "schema": {
  9602. "type": "string"
  9603. },
  9604. "required": false
  9605. }
  9606. ],
  9607. "responses": {
  9608. "200": {
  9609. "description": "Workspace status",
  9610. "content": {
  9611. "application/json": {
  9612. "schema": {
  9613. "type": "array",
  9614. "items": {
  9615. "type": "object",
  9616. "properties": {
  9617. "workspaceID": {
  9618. "type": "string",
  9619. "pattern": "^wrk"
  9620. },
  9621. "status": {
  9622. "type": "string",
  9623. "enum": ["connected", "connecting", "disconnected", "error"]
  9624. }
  9625. },
  9626. "required": ["workspaceID", "status"],
  9627. "additionalProperties": false
  9628. },
  9629. "description": "Workspace status"
  9630. }
  9631. }
  9632. }
  9633. },
  9634. "400": {
  9635. "description": "Bad request",
  9636. "content": {
  9637. "application/json": {
  9638. "schema": {
  9639. "$ref": "#/components/schemas/BadRequestError"
  9640. }
  9641. }
  9642. }
  9643. }
  9644. },
  9645. "description": "Get connection status for workspaces in the current project.",
  9646. "summary": "Workspace status",
  9647. "x-codeSamples": [
  9648. {
  9649. "lang": "js",
  9650. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  9651. }
  9652. ]
  9653. }
  9654. },
  9655. "/experimental/workspace/{id}": {
  9656. "delete": {
  9657. "tags": ["workspace"],
  9658. "operationId": "experimental.workspace.remove",
  9659. "parameters": [
  9660. {
  9661. "name": "id",
  9662. "in": "path",
  9663. "schema": {
  9664. "type": "string",
  9665. "pattern": "^wrk"
  9666. },
  9667. "required": true
  9668. },
  9669. {
  9670. "name": "directory",
  9671. "in": "query",
  9672. "schema": {
  9673. "type": "string"
  9674. },
  9675. "required": false
  9676. },
  9677. {
  9678. "name": "workspace",
  9679. "in": "query",
  9680. "schema": {
  9681. "type": "string"
  9682. },
  9683. "required": false
  9684. }
  9685. ],
  9686. "responses": {
  9687. "200": {
  9688. "description": "Workspace removed",
  9689. "content": {
  9690. "application/json": {
  9691. "schema": {
  9692. "$ref": "#/components/schemas/Workspace"
  9693. }
  9694. }
  9695. }
  9696. },
  9697. "400": {
  9698. "description": "BadRequest | InvalidRequestError",
  9699. "content": {
  9700. "application/json": {
  9701. "schema": {
  9702. "anyOf": [
  9703. {
  9704. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9705. },
  9706. {
  9707. "$ref": "#/components/schemas/InvalidRequestError"
  9708. }
  9709. ]
  9710. }
  9711. }
  9712. }
  9713. }
  9714. },
  9715. "description": "Remove an existing workspace.",
  9716. "summary": "Remove workspace",
  9717. "x-codeSamples": [
  9718. {
  9719. "lang": "js",
  9720. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  9721. }
  9722. ]
  9723. }
  9724. },
  9725. "/experimental/workspace/warp": {
  9726. "post": {
  9727. "tags": ["workspace"],
  9728. "operationId": "experimental.workspace.warp",
  9729. "parameters": [
  9730. {
  9731. "name": "directory",
  9732. "in": "query",
  9733. "schema": {
  9734. "type": "string"
  9735. },
  9736. "required": false
  9737. },
  9738. {
  9739. "name": "workspace",
  9740. "in": "query",
  9741. "schema": {
  9742. "type": "string"
  9743. },
  9744. "required": false
  9745. }
  9746. ],
  9747. "responses": {
  9748. "204": {
  9749. "description": "Session warped"
  9750. },
  9751. "400": {
  9752. "description": "WorkspaceWarpError | VcsApplyError | InvalidRequestError",
  9753. "content": {
  9754. "application/json": {
  9755. "schema": {
  9756. "anyOf": [
  9757. {
  9758. "$ref": "#/components/schemas/WorkspaceWarpError"
  9759. },
  9760. {
  9761. "$ref": "#/components/schemas/VcsApplyError"
  9762. },
  9763. {
  9764. "$ref": "#/components/schemas/InvalidRequestError"
  9765. }
  9766. ]
  9767. }
  9768. }
  9769. }
  9770. },
  9771. "404": {
  9772. "description": "NotFoundError",
  9773. "content": {
  9774. "application/json": {
  9775. "schema": {
  9776. "$ref": "#/components/schemas/NotFoundError"
  9777. }
  9778. }
  9779. }
  9780. }
  9781. },
  9782. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  9783. "summary": "Warp session into workspace",
  9784. "requestBody": {
  9785. "content": {
  9786. "application/json": {
  9787. "schema": {
  9788. "type": "object",
  9789. "properties": {
  9790. "id": {
  9791. "anyOf": [
  9792. {
  9793. "type": "string",
  9794. "pattern": "^wrk"
  9795. },
  9796. {
  9797. "type": "null"
  9798. }
  9799. ]
  9800. },
  9801. "sessionID": {
  9802. "type": "string",
  9803. "pattern": "^ses"
  9804. },
  9805. "copyChanges": {
  9806. "type": "boolean"
  9807. }
  9808. },
  9809. "required": ["id", "sessionID"],
  9810. "additionalProperties": false
  9811. }
  9812. }
  9813. }
  9814. },
  9815. "x-codeSamples": [
  9816. {
  9817. "lang": "js",
  9818. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  9819. }
  9820. ]
  9821. }
  9822. },
  9823. "/api/health": {
  9824. "get": {
  9825. "tags": ["opencode HttpApi"],
  9826. "operationId": "v2.health.get",
  9827. "parameters": [],
  9828. "security": [],
  9829. "responses": {
  9830. "200": {
  9831. "description": "Success",
  9832. "content": {
  9833. "application/json": {
  9834. "schema": {
  9835. "type": "object",
  9836. "properties": {
  9837. "healthy": {
  9838. "type": "boolean",
  9839. "enum": [true]
  9840. }
  9841. },
  9842. "required": ["healthy"],
  9843. "additionalProperties": false
  9844. }
  9845. }
  9846. }
  9847. },
  9848. "400": {
  9849. "description": "InvalidRequestError",
  9850. "content": {
  9851. "application/json": {
  9852. "schema": {
  9853. "$ref": "#/components/schemas/InvalidRequestError"
  9854. }
  9855. }
  9856. }
  9857. },
  9858. "401": {
  9859. "description": "UnauthorizedError",
  9860. "content": {
  9861. "application/json": {
  9862. "schema": {
  9863. "$ref": "#/components/schemas/UnauthorizedError"
  9864. }
  9865. }
  9866. }
  9867. }
  9868. },
  9869. "description": "Check whether the API server is ready to accept requests.",
  9870. "summary": "Check server health",
  9871. "x-codeSamples": [
  9872. {
  9873. "lang": "js",
  9874. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.health.get({\n ...\n})"
  9875. }
  9876. ]
  9877. }
  9878. },
  9879. "/api/location": {
  9880. "get": {
  9881. "tags": ["opencode HttpApi"],
  9882. "operationId": "v2.location.get",
  9883. "parameters": [
  9884. {
  9885. "name": "location",
  9886. "in": "query",
  9887. "schema": {
  9888. "type": "object",
  9889. "properties": {
  9890. "directory": {
  9891. "type": "string"
  9892. },
  9893. "workspace": {
  9894. "type": "string"
  9895. }
  9896. },
  9897. "additionalProperties": false
  9898. },
  9899. "required": false,
  9900. "style": "deepObject",
  9901. "explode": true
  9902. }
  9903. ],
  9904. "security": [],
  9905. "responses": {
  9906. "200": {
  9907. "description": "Location.Info",
  9908. "content": {
  9909. "application/json": {
  9910. "schema": {
  9911. "$ref": "#/components/schemas/LocationInfo"
  9912. }
  9913. }
  9914. }
  9915. },
  9916. "400": {
  9917. "description": "InvalidRequestError",
  9918. "content": {
  9919. "application/json": {
  9920. "schema": {
  9921. "$ref": "#/components/schemas/InvalidRequestError"
  9922. }
  9923. }
  9924. }
  9925. },
  9926. "401": {
  9927. "description": "UnauthorizedError",
  9928. "content": {
  9929. "application/json": {
  9930. "schema": {
  9931. "$ref": "#/components/schemas/UnauthorizedError"
  9932. }
  9933. }
  9934. }
  9935. }
  9936. },
  9937. "description": "Resolve the requested location or the server default location.",
  9938. "summary": "Get location",
  9939. "x-codeSamples": [
  9940. {
  9941. "lang": "js",
  9942. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.location.get({\n ...\n})"
  9943. }
  9944. ]
  9945. }
  9946. },
  9947. "/api/agent": {
  9948. "get": {
  9949. "tags": ["opencode HttpApi"],
  9950. "operationId": "v2.agent.list",
  9951. "parameters": [
  9952. {
  9953. "name": "location",
  9954. "in": "query",
  9955. "schema": {
  9956. "type": "object",
  9957. "properties": {
  9958. "directory": {
  9959. "type": "string"
  9960. },
  9961. "workspace": {
  9962. "type": "string"
  9963. }
  9964. },
  9965. "additionalProperties": false
  9966. },
  9967. "required": false,
  9968. "style": "deepObject",
  9969. "explode": true
  9970. }
  9971. ],
  9972. "security": [],
  9973. "responses": {
  9974. "200": {
  9975. "description": "Success",
  9976. "content": {
  9977. "application/json": {
  9978. "schema": {
  9979. "type": "object",
  9980. "properties": {
  9981. "location": {
  9982. "$ref": "#/components/schemas/LocationInfo"
  9983. },
  9984. "data": {
  9985. "type": "array",
  9986. "items": {
  9987. "$ref": "#/components/schemas/AgentV2Info"
  9988. }
  9989. }
  9990. },
  9991. "required": ["location", "data"],
  9992. "additionalProperties": false
  9993. }
  9994. }
  9995. }
  9996. },
  9997. "400": {
  9998. "description": "InvalidRequestError",
  9999. "content": {
  10000. "application/json": {
  10001. "schema": {
  10002. "$ref": "#/components/schemas/InvalidRequestError"
  10003. }
  10004. }
  10005. }
  10006. },
  10007. "401": {
  10008. "description": "UnauthorizedError",
  10009. "content": {
  10010. "application/json": {
  10011. "schema": {
  10012. "$ref": "#/components/schemas/UnauthorizedError"
  10013. }
  10014. }
  10015. }
  10016. }
  10017. },
  10018. "description": "Retrieve currently registered agents.",
  10019. "summary": "List agents",
  10020. "x-codeSamples": [
  10021. {
  10022. "lang": "js",
  10023. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.agent.list({\n ...\n})"
  10024. }
  10025. ]
  10026. }
  10027. },
  10028. "/api/session": {
  10029. "get": {
  10030. "tags": ["sessions"],
  10031. "operationId": "v2.session.list",
  10032. "parameters": [
  10033. {
  10034. "name": "workspace",
  10035. "in": "query",
  10036. "schema": {
  10037. "type": "string",
  10038. "pattern": "^wrk"
  10039. },
  10040. "required": false
  10041. },
  10042. {
  10043. "name": "limit",
  10044. "in": "query",
  10045. "schema": {
  10046. "type": "number"
  10047. },
  10048. "required": false
  10049. },
  10050. {
  10051. "name": "order",
  10052. "in": "query",
  10053. "schema": {
  10054. "type": "string",
  10055. "enum": ["asc", "desc"]
  10056. },
  10057. "required": false
  10058. },
  10059. {
  10060. "name": "search",
  10061. "in": "query",
  10062. "schema": {
  10063. "type": "string"
  10064. },
  10065. "required": false
  10066. },
  10067. {
  10068. "name": "directory",
  10069. "in": "query",
  10070. "schema": {
  10071. "type": "string"
  10072. },
  10073. "required": false
  10074. },
  10075. {
  10076. "name": "project",
  10077. "in": "query",
  10078. "schema": {
  10079. "type": "string"
  10080. },
  10081. "required": false
  10082. },
  10083. {
  10084. "name": "subpath",
  10085. "in": "query",
  10086. "schema": {
  10087. "type": "string"
  10088. },
  10089. "required": false
  10090. },
  10091. {
  10092. "name": "cursor",
  10093. "in": "query",
  10094. "schema": {
  10095. "type": "string",
  10096. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response."
  10097. },
  10098. "required": false
  10099. }
  10100. ],
  10101. "security": [],
  10102. "responses": {
  10103. "200": {
  10104. "description": "SessionsResponse",
  10105. "content": {
  10106. "application/json": {
  10107. "schema": {
  10108. "$ref": "#/components/schemas/SessionsResponse"
  10109. }
  10110. }
  10111. }
  10112. },
  10113. "400": {
  10114. "description": "InvalidCursorError | InvalidRequestError",
  10115. "content": {
  10116. "application/json": {
  10117. "schema": {
  10118. "anyOf": [
  10119. {
  10120. "$ref": "#/components/schemas/InvalidCursorError"
  10121. },
  10122. {
  10123. "$ref": "#/components/schemas/InvalidRequestError"
  10124. },
  10125. {
  10126. "$ref": "#/components/schemas/InvalidRequestError"
  10127. }
  10128. ]
  10129. }
  10130. }
  10131. }
  10132. },
  10133. "401": {
  10134. "description": "UnauthorizedError",
  10135. "content": {
  10136. "application/json": {
  10137. "schema": {
  10138. "$ref": "#/components/schemas/UnauthorizedError"
  10139. }
  10140. }
  10141. }
  10142. }
  10143. },
  10144. "description": "Retrieve sessions in the requested order. Items keep that order across pages; use cursor.next or cursor.previous to move through the ordered list.",
  10145. "summary": "List sessions",
  10146. "x-codeSamples": [
  10147. {
  10148. "lang": "js",
  10149. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  10150. }
  10151. ]
  10152. },
  10153. "post": {
  10154. "tags": ["sessions"],
  10155. "operationId": "v2.session.create",
  10156. "parameters": [],
  10157. "security": [],
  10158. "responses": {
  10159. "200": {
  10160. "description": "Success",
  10161. "content": {
  10162. "application/json": {
  10163. "schema": {
  10164. "type": "object",
  10165. "properties": {
  10166. "data": {
  10167. "$ref": "#/components/schemas/SessionV2Info"
  10168. }
  10169. },
  10170. "required": ["data"],
  10171. "additionalProperties": false
  10172. }
  10173. }
  10174. }
  10175. },
  10176. "400": {
  10177. "description": "InvalidRequestError",
  10178. "content": {
  10179. "application/json": {
  10180. "schema": {
  10181. "$ref": "#/components/schemas/InvalidRequestError"
  10182. }
  10183. }
  10184. }
  10185. },
  10186. "401": {
  10187. "description": "UnauthorizedError",
  10188. "content": {
  10189. "application/json": {
  10190. "schema": {
  10191. "$ref": "#/components/schemas/UnauthorizedError"
  10192. }
  10193. }
  10194. }
  10195. }
  10196. },
  10197. "description": "Create a session at the requested location.",
  10198. "summary": "Create session",
  10199. "requestBody": {
  10200. "content": {
  10201. "application/json": {
  10202. "schema": {
  10203. "type": "object",
  10204. "properties": {
  10205. "id": {
  10206. "type": "string",
  10207. "pattern": "^ses"
  10208. },
  10209. "agent": {
  10210. "type": "string"
  10211. },
  10212. "model": {
  10213. "type": "object",
  10214. "properties": {
  10215. "id": {
  10216. "type": "string"
  10217. },
  10218. "providerID": {
  10219. "type": "string"
  10220. },
  10221. "variant": {
  10222. "type": "string"
  10223. }
  10224. },
  10225. "required": ["id", "providerID"],
  10226. "additionalProperties": false
  10227. },
  10228. "location": {
  10229. "$ref": "#/components/schemas/LocationRef"
  10230. }
  10231. },
  10232. "additionalProperties": false
  10233. }
  10234. }
  10235. },
  10236. "required": true
  10237. },
  10238. "x-codeSamples": [
  10239. {
  10240. "lang": "js",
  10241. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.create({\n ...\n})"
  10242. }
  10243. ]
  10244. }
  10245. },
  10246. "/api/session/{sessionID}": {
  10247. "get": {
  10248. "tags": ["sessions"],
  10249. "operationId": "v2.session.get",
  10250. "parameters": [
  10251. {
  10252. "name": "sessionID",
  10253. "in": "path",
  10254. "schema": {
  10255. "type": "string",
  10256. "pattern": "^ses"
  10257. },
  10258. "required": true
  10259. }
  10260. ],
  10261. "security": [],
  10262. "responses": {
  10263. "200": {
  10264. "description": "Success",
  10265. "content": {
  10266. "application/json": {
  10267. "schema": {
  10268. "type": "object",
  10269. "properties": {
  10270. "data": {
  10271. "$ref": "#/components/schemas/SessionV2Info"
  10272. }
  10273. },
  10274. "required": ["data"],
  10275. "additionalProperties": false
  10276. }
  10277. }
  10278. }
  10279. },
  10280. "400": {
  10281. "description": "InvalidRequestError",
  10282. "content": {
  10283. "application/json": {
  10284. "schema": {
  10285. "$ref": "#/components/schemas/InvalidRequestError"
  10286. }
  10287. }
  10288. }
  10289. },
  10290. "401": {
  10291. "description": "UnauthorizedError",
  10292. "content": {
  10293. "application/json": {
  10294. "schema": {
  10295. "$ref": "#/components/schemas/UnauthorizedError"
  10296. }
  10297. }
  10298. }
  10299. },
  10300. "404": {
  10301. "description": "SessionNotFoundError",
  10302. "content": {
  10303. "application/json": {
  10304. "schema": {
  10305. "anyOf": [
  10306. {
  10307. "$ref": "#/components/schemas/SessionNotFoundError"
  10308. },
  10309. {
  10310. "$ref": "#/components/schemas/SessionNotFoundError"
  10311. }
  10312. ]
  10313. }
  10314. }
  10315. }
  10316. }
  10317. },
  10318. "description": "Retrieve a session by ID.",
  10319. "summary": "Get session",
  10320. "x-codeSamples": [
  10321. {
  10322. "lang": "js",
  10323. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.get({\n ...\n})"
  10324. }
  10325. ]
  10326. }
  10327. },
  10328. "/api/session/{sessionID}/agent": {
  10329. "post": {
  10330. "tags": ["sessions"],
  10331. "operationId": "v2.session.switchAgent",
  10332. "parameters": [
  10333. {
  10334. "name": "sessionID",
  10335. "in": "path",
  10336. "schema": {
  10337. "type": "string",
  10338. "pattern": "^ses"
  10339. },
  10340. "required": true
  10341. }
  10342. ],
  10343. "security": [],
  10344. "responses": {
  10345. "204": {
  10346. "description": "<No Content>"
  10347. },
  10348. "400": {
  10349. "description": "InvalidRequestError",
  10350. "content": {
  10351. "application/json": {
  10352. "schema": {
  10353. "$ref": "#/components/schemas/InvalidRequestError"
  10354. }
  10355. }
  10356. }
  10357. },
  10358. "401": {
  10359. "description": "UnauthorizedError",
  10360. "content": {
  10361. "application/json": {
  10362. "schema": {
  10363. "$ref": "#/components/schemas/UnauthorizedError"
  10364. }
  10365. }
  10366. }
  10367. },
  10368. "404": {
  10369. "description": "SessionNotFoundError",
  10370. "content": {
  10371. "application/json": {
  10372. "schema": {
  10373. "anyOf": [
  10374. {
  10375. "$ref": "#/components/schemas/SessionNotFoundError"
  10376. },
  10377. {
  10378. "$ref": "#/components/schemas/SessionNotFoundError"
  10379. }
  10380. ]
  10381. }
  10382. }
  10383. }
  10384. }
  10385. },
  10386. "description": "Switch the agent used by subsequent provider turns.",
  10387. "summary": "Switch session agent",
  10388. "requestBody": {
  10389. "content": {
  10390. "application/json": {
  10391. "schema": {
  10392. "type": "object",
  10393. "properties": {
  10394. "agent": {
  10395. "type": "string"
  10396. }
  10397. },
  10398. "required": ["agent"],
  10399. "additionalProperties": false
  10400. }
  10401. }
  10402. },
  10403. "required": true
  10404. },
  10405. "x-codeSamples": [
  10406. {
  10407. "lang": "js",
  10408. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.switchAgent({\n ...\n})"
  10409. }
  10410. ]
  10411. }
  10412. },
  10413. "/api/session/{sessionID}/model": {
  10414. "post": {
  10415. "tags": ["sessions"],
  10416. "operationId": "v2.session.switchModel",
  10417. "parameters": [
  10418. {
  10419. "name": "sessionID",
  10420. "in": "path",
  10421. "schema": {
  10422. "type": "string",
  10423. "pattern": "^ses"
  10424. },
  10425. "required": true
  10426. }
  10427. ],
  10428. "security": [],
  10429. "responses": {
  10430. "204": {
  10431. "description": "<No Content>"
  10432. },
  10433. "400": {
  10434. "description": "InvalidRequestError",
  10435. "content": {
  10436. "application/json": {
  10437. "schema": {
  10438. "$ref": "#/components/schemas/InvalidRequestError"
  10439. }
  10440. }
  10441. }
  10442. },
  10443. "401": {
  10444. "description": "UnauthorizedError",
  10445. "content": {
  10446. "application/json": {
  10447. "schema": {
  10448. "$ref": "#/components/schemas/UnauthorizedError"
  10449. }
  10450. }
  10451. }
  10452. },
  10453. "404": {
  10454. "description": "SessionNotFoundError",
  10455. "content": {
  10456. "application/json": {
  10457. "schema": {
  10458. "anyOf": [
  10459. {
  10460. "$ref": "#/components/schemas/SessionNotFoundError"
  10461. },
  10462. {
  10463. "$ref": "#/components/schemas/SessionNotFoundError"
  10464. }
  10465. ]
  10466. }
  10467. }
  10468. }
  10469. }
  10470. },
  10471. "description": "Switch the model used by subsequent provider turns.",
  10472. "summary": "Switch session model",
  10473. "requestBody": {
  10474. "content": {
  10475. "application/json": {
  10476. "schema": {
  10477. "type": "object",
  10478. "properties": {
  10479. "model": {
  10480. "type": "object",
  10481. "properties": {
  10482. "id": {
  10483. "type": "string"
  10484. },
  10485. "providerID": {
  10486. "type": "string"
  10487. },
  10488. "variant": {
  10489. "type": "string"
  10490. }
  10491. },
  10492. "required": ["id", "providerID"],
  10493. "additionalProperties": false
  10494. }
  10495. },
  10496. "required": ["model"],
  10497. "additionalProperties": false
  10498. }
  10499. }
  10500. },
  10501. "required": true
  10502. },
  10503. "x-codeSamples": [
  10504. {
  10505. "lang": "js",
  10506. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.switchModel({\n ...\n})"
  10507. }
  10508. ]
  10509. }
  10510. },
  10511. "/api/session/{sessionID}/prompt": {
  10512. "post": {
  10513. "tags": ["sessions"],
  10514. "operationId": "v2.session.prompt",
  10515. "parameters": [
  10516. {
  10517. "name": "sessionID",
  10518. "in": "path",
  10519. "schema": {
  10520. "type": "string",
  10521. "pattern": "^ses"
  10522. },
  10523. "required": true
  10524. }
  10525. ],
  10526. "security": [],
  10527. "responses": {
  10528. "200": {
  10529. "description": "Success",
  10530. "content": {
  10531. "application/json": {
  10532. "schema": {
  10533. "type": "object",
  10534. "properties": {
  10535. "data": {
  10536. "$ref": "#/components/schemas/SessionInputAdmitted"
  10537. }
  10538. },
  10539. "required": ["data"],
  10540. "additionalProperties": false
  10541. }
  10542. }
  10543. }
  10544. },
  10545. "400": {
  10546. "description": "InvalidRequestError",
  10547. "content": {
  10548. "application/json": {
  10549. "schema": {
  10550. "$ref": "#/components/schemas/InvalidRequestError"
  10551. }
  10552. }
  10553. }
  10554. },
  10555. "401": {
  10556. "description": "UnauthorizedError",
  10557. "content": {
  10558. "application/json": {
  10559. "schema": {
  10560. "$ref": "#/components/schemas/UnauthorizedError"
  10561. }
  10562. }
  10563. }
  10564. },
  10565. "404": {
  10566. "description": "SessionNotFoundError",
  10567. "content": {
  10568. "application/json": {
  10569. "schema": {
  10570. "anyOf": [
  10571. {
  10572. "$ref": "#/components/schemas/SessionNotFoundError"
  10573. },
  10574. {
  10575. "$ref": "#/components/schemas/SessionNotFoundError"
  10576. }
  10577. ]
  10578. }
  10579. }
  10580. }
  10581. },
  10582. "409": {
  10583. "description": "ConflictError",
  10584. "content": {
  10585. "application/json": {
  10586. "schema": {
  10587. "$ref": "#/components/schemas/ConflictError"
  10588. }
  10589. }
  10590. }
  10591. }
  10592. },
  10593. "description": "Durably admit one session input and schedule agent-loop execution unless resume is false.",
  10594. "summary": "Send message",
  10595. "requestBody": {
  10596. "content": {
  10597. "application/json": {
  10598. "schema": {
  10599. "type": "object",
  10600. "properties": {
  10601. "id": {
  10602. "type": "string",
  10603. "pattern": "^msg_"
  10604. },
  10605. "prompt": {
  10606. "$ref": "#/components/schemas/Prompt"
  10607. },
  10608. "delivery": {
  10609. "type": "string",
  10610. "enum": ["steer", "queue"]
  10611. },
  10612. "resume": {
  10613. "type": "boolean"
  10614. }
  10615. },
  10616. "required": ["prompt"],
  10617. "additionalProperties": false
  10618. }
  10619. }
  10620. },
  10621. "required": true
  10622. },
  10623. "x-codeSamples": [
  10624. {
  10625. "lang": "js",
  10626. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  10627. }
  10628. ]
  10629. }
  10630. },
  10631. "/api/session/{sessionID}/compact": {
  10632. "post": {
  10633. "tags": ["sessions"],
  10634. "operationId": "v2.session.compact",
  10635. "parameters": [
  10636. {
  10637. "name": "sessionID",
  10638. "in": "path",
  10639. "schema": {
  10640. "type": "string",
  10641. "pattern": "^ses"
  10642. },
  10643. "required": true
  10644. }
  10645. ],
  10646. "security": [],
  10647. "responses": {
  10648. "204": {
  10649. "description": "<No Content>"
  10650. },
  10651. "400": {
  10652. "description": "InvalidRequestError",
  10653. "content": {
  10654. "application/json": {
  10655. "schema": {
  10656. "$ref": "#/components/schemas/InvalidRequestError"
  10657. }
  10658. }
  10659. }
  10660. },
  10661. "401": {
  10662. "description": "UnauthorizedError",
  10663. "content": {
  10664. "application/json": {
  10665. "schema": {
  10666. "$ref": "#/components/schemas/UnauthorizedError"
  10667. }
  10668. }
  10669. }
  10670. },
  10671. "404": {
  10672. "description": "SessionNotFoundError",
  10673. "content": {
  10674. "application/json": {
  10675. "schema": {
  10676. "anyOf": [
  10677. {
  10678. "$ref": "#/components/schemas/SessionNotFoundError"
  10679. },
  10680. {
  10681. "$ref": "#/components/schemas/SessionNotFoundError"
  10682. }
  10683. ]
  10684. }
  10685. }
  10686. }
  10687. },
  10688. "503": {
  10689. "description": "ServiceUnavailableError",
  10690. "content": {
  10691. "application/json": {
  10692. "schema": {
  10693. "$ref": "#/components/schemas/ServiceUnavailableError"
  10694. }
  10695. }
  10696. }
  10697. }
  10698. },
  10699. "description": "Compact a session conversation.",
  10700. "summary": "Compact session",
  10701. "x-codeSamples": [
  10702. {
  10703. "lang": "js",
  10704. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  10705. }
  10706. ]
  10707. }
  10708. },
  10709. "/api/session/{sessionID}/wait": {
  10710. "post": {
  10711. "tags": ["sessions"],
  10712. "operationId": "v2.session.wait",
  10713. "parameters": [
  10714. {
  10715. "name": "sessionID",
  10716. "in": "path",
  10717. "schema": {
  10718. "type": "string",
  10719. "pattern": "^ses"
  10720. },
  10721. "required": true
  10722. }
  10723. ],
  10724. "security": [],
  10725. "responses": {
  10726. "204": {
  10727. "description": "<No Content>"
  10728. },
  10729. "400": {
  10730. "description": "InvalidRequestError",
  10731. "content": {
  10732. "application/json": {
  10733. "schema": {
  10734. "$ref": "#/components/schemas/InvalidRequestError"
  10735. }
  10736. }
  10737. }
  10738. },
  10739. "401": {
  10740. "description": "UnauthorizedError",
  10741. "content": {
  10742. "application/json": {
  10743. "schema": {
  10744. "$ref": "#/components/schemas/UnauthorizedError"
  10745. }
  10746. }
  10747. }
  10748. },
  10749. "404": {
  10750. "description": "SessionNotFoundError",
  10751. "content": {
  10752. "application/json": {
  10753. "schema": {
  10754. "anyOf": [
  10755. {
  10756. "$ref": "#/components/schemas/SessionNotFoundError"
  10757. },
  10758. {
  10759. "$ref": "#/components/schemas/SessionNotFoundError"
  10760. }
  10761. ]
  10762. }
  10763. }
  10764. }
  10765. },
  10766. "503": {
  10767. "description": "ServiceUnavailableError",
  10768. "content": {
  10769. "application/json": {
  10770. "schema": {
  10771. "$ref": "#/components/schemas/ServiceUnavailableError"
  10772. }
  10773. }
  10774. }
  10775. }
  10776. },
  10777. "description": "Wait for a session agent loop to become idle.",
  10778. "summary": "Wait for session",
  10779. "x-codeSamples": [
  10780. {
  10781. "lang": "js",
  10782. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  10783. }
  10784. ]
  10785. }
  10786. },
  10787. "/api/session/{sessionID}/context": {
  10788. "get": {
  10789. "tags": ["sessions"],
  10790. "operationId": "v2.session.context",
  10791. "parameters": [
  10792. {
  10793. "name": "sessionID",
  10794. "in": "path",
  10795. "schema": {
  10796. "type": "string",
  10797. "pattern": "^ses"
  10798. },
  10799. "required": true
  10800. }
  10801. ],
  10802. "security": [],
  10803. "responses": {
  10804. "200": {
  10805. "description": "Success",
  10806. "content": {
  10807. "application/json": {
  10808. "schema": {
  10809. "type": "object",
  10810. "properties": {
  10811. "data": {
  10812. "type": "array",
  10813. "items": {
  10814. "$ref": "#/components/schemas/SessionMessage"
  10815. }
  10816. }
  10817. },
  10818. "required": ["data"],
  10819. "additionalProperties": false
  10820. }
  10821. }
  10822. }
  10823. },
  10824. "400": {
  10825. "description": "InvalidRequestError",
  10826. "content": {
  10827. "application/json": {
  10828. "schema": {
  10829. "$ref": "#/components/schemas/InvalidRequestError"
  10830. }
  10831. }
  10832. }
  10833. },
  10834. "401": {
  10835. "description": "UnauthorizedError",
  10836. "content": {
  10837. "application/json": {
  10838. "schema": {
  10839. "$ref": "#/components/schemas/UnauthorizedError"
  10840. }
  10841. }
  10842. }
  10843. },
  10844. "404": {
  10845. "description": "SessionNotFoundError",
  10846. "content": {
  10847. "application/json": {
  10848. "schema": {
  10849. "anyOf": [
  10850. {
  10851. "$ref": "#/components/schemas/SessionNotFoundError"
  10852. },
  10853. {
  10854. "$ref": "#/components/schemas/SessionNotFoundError"
  10855. }
  10856. ]
  10857. }
  10858. }
  10859. }
  10860. },
  10861. "500": {
  10862. "description": "UnknownError",
  10863. "content": {
  10864. "application/json": {
  10865. "schema": {
  10866. "$ref": "#/components/schemas/UnknownError1"
  10867. }
  10868. }
  10869. }
  10870. }
  10871. },
  10872. "description": "Retrieve the active context messages for a session (all messages after the last compaction).",
  10873. "summary": "Get session context",
  10874. "x-codeSamples": [
  10875. {
  10876. "lang": "js",
  10877. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  10878. }
  10879. ]
  10880. }
  10881. },
  10882. "/api/session/{sessionID}/message": {
  10883. "get": {
  10884. "tags": ["messages"],
  10885. "operationId": "v2.session.messages",
  10886. "parameters": [
  10887. {
  10888. "name": "sessionID",
  10889. "in": "path",
  10890. "schema": {
  10891. "type": "string",
  10892. "pattern": "^ses"
  10893. },
  10894. "required": true
  10895. },
  10896. {
  10897. "name": "limit",
  10898. "in": "query",
  10899. "schema": {
  10900. "type": "number"
  10901. },
  10902. "required": false
  10903. },
  10904. {
  10905. "name": "order",
  10906. "in": "query",
  10907. "schema": {
  10908. "type": "string",
  10909. "enum": ["asc", "desc"]
  10910. },
  10911. "required": false
  10912. },
  10913. {
  10914. "name": "cursor",
  10915. "in": "query",
  10916. "schema": {
  10917. "type": "string",
  10918. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."
  10919. },
  10920. "required": false
  10921. }
  10922. ],
  10923. "security": [],
  10924. "responses": {
  10925. "200": {
  10926. "description": "SessionMessagesResponse",
  10927. "content": {
  10928. "application/json": {
  10929. "schema": {
  10930. "$ref": "#/components/schemas/SessionMessagesResponse"
  10931. }
  10932. }
  10933. }
  10934. },
  10935. "400": {
  10936. "description": "InvalidCursorError | InvalidRequestError",
  10937. "content": {
  10938. "application/json": {
  10939. "schema": {
  10940. "anyOf": [
  10941. {
  10942. "$ref": "#/components/schemas/InvalidCursorError"
  10943. },
  10944. {
  10945. "$ref": "#/components/schemas/InvalidRequestError"
  10946. }
  10947. ]
  10948. }
  10949. }
  10950. }
  10951. },
  10952. "401": {
  10953. "description": "UnauthorizedError",
  10954. "content": {
  10955. "application/json": {
  10956. "schema": {
  10957. "$ref": "#/components/schemas/UnauthorizedError"
  10958. }
  10959. }
  10960. }
  10961. },
  10962. "404": {
  10963. "description": "SessionNotFoundError",
  10964. "content": {
  10965. "application/json": {
  10966. "schema": {
  10967. "anyOf": [
  10968. {
  10969. "$ref": "#/components/schemas/SessionNotFoundError"
  10970. },
  10971. {
  10972. "$ref": "#/components/schemas/SessionNotFoundError"
  10973. }
  10974. ]
  10975. }
  10976. }
  10977. }
  10978. },
  10979. "500": {
  10980. "description": "UnknownError",
  10981. "content": {
  10982. "application/json": {
  10983. "schema": {
  10984. "$ref": "#/components/schemas/UnknownError1"
  10985. }
  10986. }
  10987. }
  10988. }
  10989. },
  10990. "description": "Retrieve projected messages for a session. Items keep the requested order across pages; use cursor.next or cursor.previous to move through the ordered timeline.",
  10991. "summary": "Get session messages",
  10992. "x-codeSamples": [
  10993. {
  10994. "lang": "js",
  10995. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  10996. }
  10997. ]
  10998. }
  10999. },
  11000. "/api/model": {
  11001. "get": {
  11002. "tags": ["models"],
  11003. "operationId": "v2.model.list",
  11004. "parameters": [
  11005. {
  11006. "name": "location",
  11007. "in": "query",
  11008. "schema": {
  11009. "type": "object",
  11010. "properties": {
  11011. "directory": {
  11012. "type": "string"
  11013. },
  11014. "workspace": {
  11015. "type": "string"
  11016. }
  11017. },
  11018. "additionalProperties": false
  11019. },
  11020. "required": false,
  11021. "style": "deepObject",
  11022. "explode": true
  11023. }
  11024. ],
  11025. "security": [],
  11026. "responses": {
  11027. "200": {
  11028. "description": "Success",
  11029. "content": {
  11030. "application/json": {
  11031. "schema": {
  11032. "type": "object",
  11033. "properties": {
  11034. "location": {
  11035. "$ref": "#/components/schemas/LocationInfo"
  11036. },
  11037. "data": {
  11038. "type": "array",
  11039. "items": {
  11040. "$ref": "#/components/schemas/ModelV2Info"
  11041. }
  11042. }
  11043. },
  11044. "required": ["location", "data"],
  11045. "additionalProperties": false
  11046. }
  11047. }
  11048. }
  11049. },
  11050. "400": {
  11051. "description": "InvalidRequestError",
  11052. "content": {
  11053. "application/json": {
  11054. "schema": {
  11055. "$ref": "#/components/schemas/InvalidRequestError"
  11056. }
  11057. }
  11058. }
  11059. },
  11060. "401": {
  11061. "description": "UnauthorizedError",
  11062. "content": {
  11063. "application/json": {
  11064. "schema": {
  11065. "$ref": "#/components/schemas/UnauthorizedError"
  11066. }
  11067. }
  11068. }
  11069. },
  11070. "503": {
  11071. "description": "ServiceUnavailableError",
  11072. "content": {
  11073. "application/json": {
  11074. "schema": {
  11075. "$ref": "#/components/schemas/ServiceUnavailableError"
  11076. }
  11077. }
  11078. }
  11079. }
  11080. },
  11081. "description": "Retrieve available models ordered by release date.",
  11082. "summary": "List models",
  11083. "x-codeSamples": [
  11084. {
  11085. "lang": "js",
  11086. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.model.list({\n ...\n})"
  11087. }
  11088. ]
  11089. }
  11090. },
  11091. "/api/provider": {
  11092. "get": {
  11093. "tags": ["providers"],
  11094. "operationId": "v2.provider.list",
  11095. "parameters": [
  11096. {
  11097. "name": "location",
  11098. "in": "query",
  11099. "schema": {
  11100. "type": "object",
  11101. "properties": {
  11102. "directory": {
  11103. "type": "string"
  11104. },
  11105. "workspace": {
  11106. "type": "string"
  11107. }
  11108. },
  11109. "additionalProperties": false
  11110. },
  11111. "required": false,
  11112. "style": "deepObject",
  11113. "explode": true
  11114. }
  11115. ],
  11116. "security": [],
  11117. "responses": {
  11118. "200": {
  11119. "description": "Success",
  11120. "content": {
  11121. "application/json": {
  11122. "schema": {
  11123. "type": "object",
  11124. "properties": {
  11125. "location": {
  11126. "$ref": "#/components/schemas/LocationInfo"
  11127. },
  11128. "data": {
  11129. "type": "array",
  11130. "items": {
  11131. "$ref": "#/components/schemas/ProviderV2Info"
  11132. }
  11133. }
  11134. },
  11135. "required": ["location", "data"],
  11136. "additionalProperties": false
  11137. }
  11138. }
  11139. }
  11140. },
  11141. "400": {
  11142. "description": "InvalidRequestError",
  11143. "content": {
  11144. "application/json": {
  11145. "schema": {
  11146. "$ref": "#/components/schemas/InvalidRequestError"
  11147. }
  11148. }
  11149. }
  11150. },
  11151. "401": {
  11152. "description": "UnauthorizedError",
  11153. "content": {
  11154. "application/json": {
  11155. "schema": {
  11156. "$ref": "#/components/schemas/UnauthorizedError"
  11157. }
  11158. }
  11159. }
  11160. },
  11161. "503": {
  11162. "description": "ServiceUnavailableError",
  11163. "content": {
  11164. "application/json": {
  11165. "schema": {
  11166. "$ref": "#/components/schemas/ServiceUnavailableError"
  11167. }
  11168. }
  11169. }
  11170. }
  11171. },
  11172. "description": "Retrieve active AI providers so clients can show provider availability and configuration.",
  11173. "summary": "List providers",
  11174. "x-codeSamples": [
  11175. {
  11176. "lang": "js",
  11177. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.list({\n ...\n})"
  11178. }
  11179. ]
  11180. }
  11181. },
  11182. "/api/provider/{providerID}": {
  11183. "get": {
  11184. "tags": ["providers"],
  11185. "operationId": "v2.provider.get",
  11186. "parameters": [
  11187. {
  11188. "name": "providerID",
  11189. "in": "path",
  11190. "schema": {
  11191. "type": "string"
  11192. },
  11193. "required": true
  11194. },
  11195. {
  11196. "name": "location",
  11197. "in": "query",
  11198. "schema": {
  11199. "type": "object",
  11200. "properties": {
  11201. "directory": {
  11202. "type": "string"
  11203. },
  11204. "workspace": {
  11205. "type": "string"
  11206. }
  11207. },
  11208. "additionalProperties": false
  11209. },
  11210. "required": false,
  11211. "style": "deepObject",
  11212. "explode": true
  11213. }
  11214. ],
  11215. "security": [],
  11216. "responses": {
  11217. "200": {
  11218. "description": "Success",
  11219. "content": {
  11220. "application/json": {
  11221. "schema": {
  11222. "type": "object",
  11223. "properties": {
  11224. "location": {
  11225. "$ref": "#/components/schemas/LocationInfo"
  11226. },
  11227. "data": {
  11228. "$ref": "#/components/schemas/ProviderV2Info"
  11229. }
  11230. },
  11231. "required": ["location", "data"],
  11232. "additionalProperties": false
  11233. }
  11234. }
  11235. }
  11236. },
  11237. "400": {
  11238. "description": "InvalidRequestError",
  11239. "content": {
  11240. "application/json": {
  11241. "schema": {
  11242. "$ref": "#/components/schemas/InvalidRequestError"
  11243. }
  11244. }
  11245. }
  11246. },
  11247. "401": {
  11248. "description": "UnauthorizedError",
  11249. "content": {
  11250. "application/json": {
  11251. "schema": {
  11252. "$ref": "#/components/schemas/UnauthorizedError"
  11253. }
  11254. }
  11255. }
  11256. },
  11257. "404": {
  11258. "description": "ProviderNotFoundError",
  11259. "content": {
  11260. "application/json": {
  11261. "schema": {
  11262. "$ref": "#/components/schemas/ProviderNotFoundError"
  11263. }
  11264. }
  11265. }
  11266. },
  11267. "503": {
  11268. "description": "ServiceUnavailableError",
  11269. "content": {
  11270. "application/json": {
  11271. "schema": {
  11272. "$ref": "#/components/schemas/ServiceUnavailableError"
  11273. }
  11274. }
  11275. }
  11276. }
  11277. },
  11278. "description": "Retrieve a single AI provider so clients can inspect its availability and endpoint settings.",
  11279. "summary": "Get provider",
  11280. "x-codeSamples": [
  11281. {
  11282. "lang": "js",
  11283. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.get({\n ...\n})"
  11284. }
  11285. ]
  11286. }
  11287. },
  11288. "/api/integration": {
  11289. "get": {
  11290. "tags": ["integrations"],
  11291. "operationId": "v2.integration.list",
  11292. "parameters": [
  11293. {
  11294. "name": "location",
  11295. "in": "query",
  11296. "schema": {
  11297. "type": "object",
  11298. "properties": {
  11299. "directory": {
  11300. "type": "string"
  11301. },
  11302. "workspace": {
  11303. "type": "string"
  11304. }
  11305. },
  11306. "additionalProperties": false
  11307. },
  11308. "required": false,
  11309. "style": "deepObject",
  11310. "explode": true
  11311. }
  11312. ],
  11313. "security": [],
  11314. "responses": {
  11315. "200": {
  11316. "description": "Success",
  11317. "content": {
  11318. "application/json": {
  11319. "schema": {
  11320. "type": "object",
  11321. "properties": {
  11322. "location": {
  11323. "$ref": "#/components/schemas/LocationInfo"
  11324. },
  11325. "data": {
  11326. "type": "array",
  11327. "items": {
  11328. "$ref": "#/components/schemas/IntegrationInfo"
  11329. }
  11330. }
  11331. },
  11332. "required": ["location", "data"],
  11333. "additionalProperties": false
  11334. }
  11335. }
  11336. }
  11337. },
  11338. "400": {
  11339. "description": "InvalidRequestError",
  11340. "content": {
  11341. "application/json": {
  11342. "schema": {
  11343. "$ref": "#/components/schemas/InvalidRequestError"
  11344. }
  11345. }
  11346. }
  11347. },
  11348. "401": {
  11349. "description": "UnauthorizedError",
  11350. "content": {
  11351. "application/json": {
  11352. "schema": {
  11353. "$ref": "#/components/schemas/UnauthorizedError"
  11354. }
  11355. }
  11356. }
  11357. }
  11358. },
  11359. "description": "Retrieve available integrations and their authentication methods.",
  11360. "summary": "List integrations",
  11361. "x-codeSamples": [
  11362. {
  11363. "lang": "js",
  11364. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.list({\n ...\n})"
  11365. }
  11366. ]
  11367. }
  11368. },
  11369. "/api/integration/{integrationID}": {
  11370. "get": {
  11371. "tags": ["integrations"],
  11372. "operationId": "v2.integration.get",
  11373. "parameters": [
  11374. {
  11375. "name": "integrationID",
  11376. "in": "path",
  11377. "schema": {
  11378. "type": "string"
  11379. },
  11380. "required": true
  11381. },
  11382. {
  11383. "name": "location",
  11384. "in": "query",
  11385. "schema": {
  11386. "type": "object",
  11387. "properties": {
  11388. "directory": {
  11389. "type": "string"
  11390. },
  11391. "workspace": {
  11392. "type": "string"
  11393. }
  11394. },
  11395. "additionalProperties": false
  11396. },
  11397. "required": false,
  11398. "style": "deepObject",
  11399. "explode": true
  11400. }
  11401. ],
  11402. "security": [],
  11403. "responses": {
  11404. "200": {
  11405. "description": "Success",
  11406. "content": {
  11407. "application/json": {
  11408. "schema": {
  11409. "type": "object",
  11410. "properties": {
  11411. "location": {
  11412. "$ref": "#/components/schemas/LocationInfo"
  11413. },
  11414. "data": {
  11415. "$ref": "#/components/schemas/IntegrationInfo"
  11416. }
  11417. },
  11418. "required": ["location", "data"],
  11419. "additionalProperties": false
  11420. }
  11421. }
  11422. }
  11423. },
  11424. "400": {
  11425. "description": "InvalidRequestError",
  11426. "content": {
  11427. "application/json": {
  11428. "schema": {
  11429. "$ref": "#/components/schemas/InvalidRequestError"
  11430. }
  11431. }
  11432. }
  11433. },
  11434. "401": {
  11435. "description": "UnauthorizedError",
  11436. "content": {
  11437. "application/json": {
  11438. "schema": {
  11439. "$ref": "#/components/schemas/UnauthorizedError"
  11440. }
  11441. }
  11442. }
  11443. }
  11444. },
  11445. "description": "Retrieve one integration and its authentication methods.",
  11446. "summary": "Get integration",
  11447. "x-codeSamples": [
  11448. {
  11449. "lang": "js",
  11450. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.get({\n ...\n})"
  11451. }
  11452. ]
  11453. }
  11454. },
  11455. "/api/integration/{integrationID}/connect/key": {
  11456. "post": {
  11457. "tags": ["integrations"],
  11458. "operationId": "v2.integration.connect.key",
  11459. "parameters": [
  11460. {
  11461. "name": "integrationID",
  11462. "in": "path",
  11463. "schema": {
  11464. "type": "string"
  11465. },
  11466. "required": true
  11467. },
  11468. {
  11469. "name": "location",
  11470. "in": "query",
  11471. "schema": {
  11472. "type": "object",
  11473. "properties": {
  11474. "directory": {
  11475. "type": "string"
  11476. },
  11477. "workspace": {
  11478. "type": "string"
  11479. }
  11480. },
  11481. "additionalProperties": false
  11482. },
  11483. "required": false,
  11484. "style": "deepObject",
  11485. "explode": true
  11486. }
  11487. ],
  11488. "security": [],
  11489. "responses": {
  11490. "204": {
  11491. "description": "<No Content>"
  11492. },
  11493. "400": {
  11494. "description": "InvalidRequestError",
  11495. "content": {
  11496. "application/json": {
  11497. "schema": {
  11498. "anyOf": [
  11499. {
  11500. "$ref": "#/components/schemas/InvalidRequestError"
  11501. },
  11502. {
  11503. "$ref": "#/components/schemas/InvalidRequestError"
  11504. }
  11505. ]
  11506. }
  11507. }
  11508. }
  11509. },
  11510. "401": {
  11511. "description": "UnauthorizedError",
  11512. "content": {
  11513. "application/json": {
  11514. "schema": {
  11515. "$ref": "#/components/schemas/UnauthorizedError"
  11516. }
  11517. }
  11518. }
  11519. }
  11520. },
  11521. "description": "Run a key authentication method and store the resulting credential.",
  11522. "summary": "Connect with key",
  11523. "requestBody": {
  11524. "content": {
  11525. "application/json": {
  11526. "schema": {
  11527. "type": "object",
  11528. "properties": {
  11529. "key": {
  11530. "type": "string"
  11531. },
  11532. "label": {
  11533. "type": "string"
  11534. }
  11535. },
  11536. "required": ["key"],
  11537. "additionalProperties": false
  11538. }
  11539. }
  11540. },
  11541. "required": true
  11542. },
  11543. "x-codeSamples": [
  11544. {
  11545. "lang": "js",
  11546. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.connect.key({\n ...\n})"
  11547. }
  11548. ]
  11549. }
  11550. },
  11551. "/api/integration/{integrationID}/connect/oauth": {
  11552. "post": {
  11553. "tags": ["integrations"],
  11554. "operationId": "v2.integration.connect.oauth",
  11555. "parameters": [
  11556. {
  11557. "name": "integrationID",
  11558. "in": "path",
  11559. "schema": {
  11560. "type": "string"
  11561. },
  11562. "required": true
  11563. },
  11564. {
  11565. "name": "location",
  11566. "in": "query",
  11567. "schema": {
  11568. "type": "object",
  11569. "properties": {
  11570. "directory": {
  11571. "type": "string"
  11572. },
  11573. "workspace": {
  11574. "type": "string"
  11575. }
  11576. },
  11577. "additionalProperties": false
  11578. },
  11579. "required": false,
  11580. "style": "deepObject",
  11581. "explode": true
  11582. }
  11583. ],
  11584. "security": [],
  11585. "responses": {
  11586. "200": {
  11587. "description": "Success",
  11588. "content": {
  11589. "application/json": {
  11590. "schema": {
  11591. "type": "object",
  11592. "properties": {
  11593. "location": {
  11594. "$ref": "#/components/schemas/LocationInfo"
  11595. },
  11596. "data": {
  11597. "$ref": "#/components/schemas/IntegrationAttempt"
  11598. }
  11599. },
  11600. "required": ["location", "data"],
  11601. "additionalProperties": false
  11602. }
  11603. }
  11604. }
  11605. },
  11606. "400": {
  11607. "description": "InvalidRequestError",
  11608. "content": {
  11609. "application/json": {
  11610. "schema": {
  11611. "anyOf": [
  11612. {
  11613. "$ref": "#/components/schemas/InvalidRequestError"
  11614. },
  11615. {
  11616. "$ref": "#/components/schemas/InvalidRequestError"
  11617. }
  11618. ]
  11619. }
  11620. }
  11621. }
  11622. },
  11623. "401": {
  11624. "description": "UnauthorizedError",
  11625. "content": {
  11626. "application/json": {
  11627. "schema": {
  11628. "$ref": "#/components/schemas/UnauthorizedError"
  11629. }
  11630. }
  11631. }
  11632. }
  11633. },
  11634. "description": "Start an OAuth attempt and return the authorization details.",
  11635. "summary": "Begin OAuth connection",
  11636. "requestBody": {
  11637. "content": {
  11638. "application/json": {
  11639. "schema": {
  11640. "type": "object",
  11641. "properties": {
  11642. "methodID": {
  11643. "type": "string"
  11644. },
  11645. "inputs": {
  11646. "type": "object",
  11647. "additionalProperties": {
  11648. "type": "string"
  11649. }
  11650. },
  11651. "label": {
  11652. "type": "string"
  11653. }
  11654. },
  11655. "required": ["methodID", "inputs"],
  11656. "additionalProperties": false
  11657. }
  11658. }
  11659. },
  11660. "required": true
  11661. },
  11662. "x-codeSamples": [
  11663. {
  11664. "lang": "js",
  11665. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.connect.oauth({\n ...\n})"
  11666. }
  11667. ]
  11668. }
  11669. },
  11670. "/api/integration/attempt/{attemptID}": {
  11671. "get": {
  11672. "tags": ["integrations"],
  11673. "operationId": "v2.integration.attempt.status",
  11674. "parameters": [
  11675. {
  11676. "name": "attemptID",
  11677. "in": "path",
  11678. "schema": {
  11679. "type": "string"
  11680. },
  11681. "required": true
  11682. },
  11683. {
  11684. "name": "location",
  11685. "in": "query",
  11686. "schema": {
  11687. "type": "object",
  11688. "properties": {
  11689. "directory": {
  11690. "type": "string"
  11691. },
  11692. "workspace": {
  11693. "type": "string"
  11694. }
  11695. },
  11696. "additionalProperties": false
  11697. },
  11698. "required": false,
  11699. "style": "deepObject",
  11700. "explode": true
  11701. }
  11702. ],
  11703. "security": [],
  11704. "responses": {
  11705. "200": {
  11706. "description": "Success",
  11707. "content": {
  11708. "application/json": {
  11709. "schema": {
  11710. "type": "object",
  11711. "properties": {
  11712. "location": {
  11713. "$ref": "#/components/schemas/LocationInfo"
  11714. },
  11715. "data": {
  11716. "anyOf": [
  11717. {
  11718. "type": "object",
  11719. "properties": {
  11720. "status": {
  11721. "type": "string",
  11722. "enum": ["pending"]
  11723. },
  11724. "time": {
  11725. "type": "object",
  11726. "properties": {
  11727. "created": {
  11728. "anyOf": [
  11729. {
  11730. "type": "number"
  11731. },
  11732. {
  11733. "type": "string",
  11734. "enum": ["NaN"]
  11735. },
  11736. {
  11737. "type": "string",
  11738. "enum": ["Infinity"]
  11739. },
  11740. {
  11741. "type": "string",
  11742. "enum": ["-Infinity"]
  11743. },
  11744. {
  11745. "type": "string",
  11746. "enum": ["Infinity", "-Infinity", "NaN"]
  11747. }
  11748. ]
  11749. },
  11750. "expires": {
  11751. "anyOf": [
  11752. {
  11753. "type": "number"
  11754. },
  11755. {
  11756. "type": "string",
  11757. "enum": ["NaN"]
  11758. },
  11759. {
  11760. "type": "string",
  11761. "enum": ["Infinity"]
  11762. },
  11763. {
  11764. "type": "string",
  11765. "enum": ["-Infinity"]
  11766. },
  11767. {
  11768. "type": "string",
  11769. "enum": ["Infinity", "-Infinity", "NaN"]
  11770. }
  11771. ]
  11772. }
  11773. },
  11774. "required": ["created", "expires"],
  11775. "additionalProperties": false
  11776. }
  11777. },
  11778. "required": ["status", "time"],
  11779. "additionalProperties": false
  11780. },
  11781. {
  11782. "type": "object",
  11783. "properties": {
  11784. "status": {
  11785. "type": "string",
  11786. "enum": ["complete"]
  11787. },
  11788. "time": {
  11789. "type": "object",
  11790. "properties": {
  11791. "created": {
  11792. "anyOf": [
  11793. {
  11794. "type": "number"
  11795. },
  11796. {
  11797. "type": "string",
  11798. "enum": ["NaN"]
  11799. },
  11800. {
  11801. "type": "string",
  11802. "enum": ["Infinity"]
  11803. },
  11804. {
  11805. "type": "string",
  11806. "enum": ["-Infinity"]
  11807. },
  11808. {
  11809. "type": "string",
  11810. "enum": ["Infinity", "-Infinity", "NaN"]
  11811. }
  11812. ]
  11813. },
  11814. "expires": {
  11815. "anyOf": [
  11816. {
  11817. "type": "number"
  11818. },
  11819. {
  11820. "type": "string",
  11821. "enum": ["NaN"]
  11822. },
  11823. {
  11824. "type": "string",
  11825. "enum": ["Infinity"]
  11826. },
  11827. {
  11828. "type": "string",
  11829. "enum": ["-Infinity"]
  11830. },
  11831. {
  11832. "type": "string",
  11833. "enum": ["Infinity", "-Infinity", "NaN"]
  11834. }
  11835. ]
  11836. }
  11837. },
  11838. "required": ["created", "expires"],
  11839. "additionalProperties": false
  11840. }
  11841. },
  11842. "required": ["status", "time"],
  11843. "additionalProperties": false
  11844. },
  11845. {
  11846. "type": "object",
  11847. "properties": {
  11848. "status": {
  11849. "type": "string",
  11850. "enum": ["failed"]
  11851. },
  11852. "message": {
  11853. "type": "string"
  11854. },
  11855. "time": {
  11856. "type": "object",
  11857. "properties": {
  11858. "created": {
  11859. "anyOf": [
  11860. {
  11861. "type": "number"
  11862. },
  11863. {
  11864. "type": "string",
  11865. "enum": ["NaN"]
  11866. },
  11867. {
  11868. "type": "string",
  11869. "enum": ["Infinity"]
  11870. },
  11871. {
  11872. "type": "string",
  11873. "enum": ["-Infinity"]
  11874. },
  11875. {
  11876. "type": "string",
  11877. "enum": ["Infinity", "-Infinity", "NaN"]
  11878. }
  11879. ]
  11880. },
  11881. "expires": {
  11882. "anyOf": [
  11883. {
  11884. "type": "number"
  11885. },
  11886. {
  11887. "type": "string",
  11888. "enum": ["NaN"]
  11889. },
  11890. {
  11891. "type": "string",
  11892. "enum": ["Infinity"]
  11893. },
  11894. {
  11895. "type": "string",
  11896. "enum": ["-Infinity"]
  11897. },
  11898. {
  11899. "type": "string",
  11900. "enum": ["Infinity", "-Infinity", "NaN"]
  11901. }
  11902. ]
  11903. }
  11904. },
  11905. "required": ["created", "expires"],
  11906. "additionalProperties": false
  11907. }
  11908. },
  11909. "required": ["status", "message", "time"],
  11910. "additionalProperties": false
  11911. },
  11912. {
  11913. "type": "object",
  11914. "properties": {
  11915. "status": {
  11916. "type": "string",
  11917. "enum": ["expired"]
  11918. },
  11919. "time": {
  11920. "type": "object",
  11921. "properties": {
  11922. "created": {
  11923. "anyOf": [
  11924. {
  11925. "type": "number"
  11926. },
  11927. {
  11928. "type": "string",
  11929. "enum": ["NaN"]
  11930. },
  11931. {
  11932. "type": "string",
  11933. "enum": ["Infinity"]
  11934. },
  11935. {
  11936. "type": "string",
  11937. "enum": ["-Infinity"]
  11938. },
  11939. {
  11940. "type": "string",
  11941. "enum": ["Infinity", "-Infinity", "NaN"]
  11942. }
  11943. ]
  11944. },
  11945. "expires": {
  11946. "anyOf": [
  11947. {
  11948. "type": "number"
  11949. },
  11950. {
  11951. "type": "string",
  11952. "enum": ["NaN"]
  11953. },
  11954. {
  11955. "type": "string",
  11956. "enum": ["Infinity"]
  11957. },
  11958. {
  11959. "type": "string",
  11960. "enum": ["-Infinity"]
  11961. },
  11962. {
  11963. "type": "string",
  11964. "enum": ["Infinity", "-Infinity", "NaN"]
  11965. }
  11966. ]
  11967. }
  11968. },
  11969. "required": ["created", "expires"],
  11970. "additionalProperties": false
  11971. }
  11972. },
  11973. "required": ["status", "time"],
  11974. "additionalProperties": false
  11975. }
  11976. ]
  11977. }
  11978. },
  11979. "required": ["location", "data"],
  11980. "additionalProperties": false
  11981. }
  11982. }
  11983. }
  11984. },
  11985. "400": {
  11986. "description": "InvalidRequestError",
  11987. "content": {
  11988. "application/json": {
  11989. "schema": {
  11990. "$ref": "#/components/schemas/InvalidRequestError"
  11991. }
  11992. }
  11993. }
  11994. },
  11995. "401": {
  11996. "description": "UnauthorizedError",
  11997. "content": {
  11998. "application/json": {
  11999. "schema": {
  12000. "$ref": "#/components/schemas/UnauthorizedError"
  12001. }
  12002. }
  12003. }
  12004. }
  12005. },
  12006. "description": "Poll the current status of an OAuth attempt.",
  12007. "summary": "Get OAuth attempt status",
  12008. "x-codeSamples": [
  12009. {
  12010. "lang": "js",
  12011. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.attempt.status({\n ...\n})"
  12012. }
  12013. ]
  12014. },
  12015. "delete": {
  12016. "tags": ["integrations"],
  12017. "operationId": "v2.integration.attempt.cancel",
  12018. "parameters": [
  12019. {
  12020. "name": "attemptID",
  12021. "in": "path",
  12022. "schema": {
  12023. "type": "string"
  12024. },
  12025. "required": true
  12026. },
  12027. {
  12028. "name": "location",
  12029. "in": "query",
  12030. "schema": {
  12031. "type": "object",
  12032. "properties": {
  12033. "directory": {
  12034. "type": "string"
  12035. },
  12036. "workspace": {
  12037. "type": "string"
  12038. }
  12039. },
  12040. "additionalProperties": false
  12041. },
  12042. "required": false,
  12043. "style": "deepObject",
  12044. "explode": true
  12045. }
  12046. ],
  12047. "security": [],
  12048. "responses": {
  12049. "204": {
  12050. "description": "<No Content>"
  12051. },
  12052. "400": {
  12053. "description": "InvalidRequestError",
  12054. "content": {
  12055. "application/json": {
  12056. "schema": {
  12057. "$ref": "#/components/schemas/InvalidRequestError"
  12058. }
  12059. }
  12060. }
  12061. },
  12062. "401": {
  12063. "description": "UnauthorizedError",
  12064. "content": {
  12065. "application/json": {
  12066. "schema": {
  12067. "$ref": "#/components/schemas/UnauthorizedError"
  12068. }
  12069. }
  12070. }
  12071. }
  12072. },
  12073. "description": "Cancel an OAuth attempt and release its resources.",
  12074. "summary": "Cancel OAuth connection",
  12075. "x-codeSamples": [
  12076. {
  12077. "lang": "js",
  12078. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.attempt.cancel({\n ...\n})"
  12079. }
  12080. ]
  12081. }
  12082. },
  12083. "/api/integration/attempt/{attemptID}/complete": {
  12084. "post": {
  12085. "tags": ["integrations"],
  12086. "operationId": "v2.integration.attempt.complete",
  12087. "parameters": [
  12088. {
  12089. "name": "attemptID",
  12090. "in": "path",
  12091. "schema": {
  12092. "type": "string"
  12093. },
  12094. "required": true
  12095. },
  12096. {
  12097. "name": "location",
  12098. "in": "query",
  12099. "schema": {
  12100. "type": "object",
  12101. "properties": {
  12102. "directory": {
  12103. "type": "string"
  12104. },
  12105. "workspace": {
  12106. "type": "string"
  12107. }
  12108. },
  12109. "additionalProperties": false
  12110. },
  12111. "required": false,
  12112. "style": "deepObject",
  12113. "explode": true
  12114. }
  12115. ],
  12116. "security": [],
  12117. "responses": {
  12118. "204": {
  12119. "description": "<No Content>"
  12120. },
  12121. "400": {
  12122. "description": "InvalidRequestError",
  12123. "content": {
  12124. "application/json": {
  12125. "schema": {
  12126. "anyOf": [
  12127. {
  12128. "$ref": "#/components/schemas/InvalidRequestError"
  12129. },
  12130. {
  12131. "$ref": "#/components/schemas/InvalidRequestError"
  12132. }
  12133. ]
  12134. }
  12135. }
  12136. }
  12137. },
  12138. "401": {
  12139. "description": "UnauthorizedError",
  12140. "content": {
  12141. "application/json": {
  12142. "schema": {
  12143. "$ref": "#/components/schemas/UnauthorizedError"
  12144. }
  12145. }
  12146. }
  12147. }
  12148. },
  12149. "description": "Complete a code-based OAuth attempt and store the resulting credential.",
  12150. "summary": "Complete OAuth connection",
  12151. "requestBody": {
  12152. "content": {
  12153. "application/json": {
  12154. "schema": {
  12155. "type": "object",
  12156. "properties": {
  12157. "code": {
  12158. "type": "string"
  12159. }
  12160. },
  12161. "additionalProperties": false
  12162. }
  12163. }
  12164. },
  12165. "required": true
  12166. },
  12167. "x-codeSamples": [
  12168. {
  12169. "lang": "js",
  12170. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.attempt.complete({\n ...\n})"
  12171. }
  12172. ]
  12173. }
  12174. },
  12175. "/api/credential/{credentialID}": {
  12176. "patch": {
  12177. "tags": ["opencode HttpApi"],
  12178. "operationId": "v2.credential.update",
  12179. "parameters": [
  12180. {
  12181. "name": "credentialID",
  12182. "in": "path",
  12183. "schema": {
  12184. "type": "string"
  12185. },
  12186. "required": true
  12187. },
  12188. {
  12189. "name": "location",
  12190. "in": "query",
  12191. "schema": {
  12192. "type": "object",
  12193. "properties": {
  12194. "directory": {
  12195. "type": "string"
  12196. },
  12197. "workspace": {
  12198. "type": "string"
  12199. }
  12200. },
  12201. "additionalProperties": false
  12202. },
  12203. "required": false,
  12204. "style": "deepObject",
  12205. "explode": true
  12206. }
  12207. ],
  12208. "security": [],
  12209. "responses": {
  12210. "204": {
  12211. "description": "<No Content>"
  12212. },
  12213. "400": {
  12214. "description": "InvalidRequestError",
  12215. "content": {
  12216. "application/json": {
  12217. "schema": {
  12218. "$ref": "#/components/schemas/InvalidRequestError"
  12219. }
  12220. }
  12221. }
  12222. },
  12223. "401": {
  12224. "description": "UnauthorizedError",
  12225. "content": {
  12226. "application/json": {
  12227. "schema": {
  12228. "$ref": "#/components/schemas/UnauthorizedError"
  12229. }
  12230. }
  12231. }
  12232. }
  12233. },
  12234. "description": "Update a stored credential label.",
  12235. "summary": "Update credential",
  12236. "requestBody": {
  12237. "content": {
  12238. "application/json": {
  12239. "schema": {
  12240. "type": "object",
  12241. "properties": {
  12242. "label": {
  12243. "type": "string"
  12244. }
  12245. },
  12246. "required": ["label"],
  12247. "additionalProperties": false
  12248. }
  12249. }
  12250. },
  12251. "required": true
  12252. },
  12253. "x-codeSamples": [
  12254. {
  12255. "lang": "js",
  12256. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.credential.update({\n ...\n})"
  12257. }
  12258. ]
  12259. },
  12260. "delete": {
  12261. "tags": ["opencode HttpApi"],
  12262. "operationId": "v2.credential.remove",
  12263. "parameters": [
  12264. {
  12265. "name": "credentialID",
  12266. "in": "path",
  12267. "schema": {
  12268. "type": "string"
  12269. },
  12270. "required": true
  12271. },
  12272. {
  12273. "name": "location",
  12274. "in": "query",
  12275. "schema": {
  12276. "type": "object",
  12277. "properties": {
  12278. "directory": {
  12279. "type": "string"
  12280. },
  12281. "workspace": {
  12282. "type": "string"
  12283. }
  12284. },
  12285. "additionalProperties": false
  12286. },
  12287. "required": false,
  12288. "style": "deepObject",
  12289. "explode": true
  12290. }
  12291. ],
  12292. "security": [],
  12293. "responses": {
  12294. "204": {
  12295. "description": "<No Content>"
  12296. },
  12297. "400": {
  12298. "description": "InvalidRequestError",
  12299. "content": {
  12300. "application/json": {
  12301. "schema": {
  12302. "$ref": "#/components/schemas/InvalidRequestError"
  12303. }
  12304. }
  12305. }
  12306. },
  12307. "401": {
  12308. "description": "UnauthorizedError",
  12309. "content": {
  12310. "application/json": {
  12311. "schema": {
  12312. "$ref": "#/components/schemas/UnauthorizedError"
  12313. }
  12314. }
  12315. }
  12316. }
  12317. },
  12318. "description": "Remove a stored integration credential.",
  12319. "summary": "Remove credential",
  12320. "x-codeSamples": [
  12321. {
  12322. "lang": "js",
  12323. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.credential.remove({\n ...\n})"
  12324. }
  12325. ]
  12326. }
  12327. },
  12328. "/api/permission/request": {
  12329. "get": {
  12330. "tags": ["permissions"],
  12331. "operationId": "v2.permission.request.list",
  12332. "parameters": [
  12333. {
  12334. "name": "location",
  12335. "in": "query",
  12336. "schema": {
  12337. "type": "object",
  12338. "properties": {
  12339. "directory": {
  12340. "type": "string"
  12341. },
  12342. "workspace": {
  12343. "type": "string"
  12344. }
  12345. },
  12346. "additionalProperties": false
  12347. },
  12348. "required": false,
  12349. "style": "deepObject",
  12350. "explode": true
  12351. }
  12352. ],
  12353. "security": [],
  12354. "responses": {
  12355. "200": {
  12356. "description": "Success",
  12357. "content": {
  12358. "application/json": {
  12359. "schema": {
  12360. "type": "object",
  12361. "properties": {
  12362. "location": {
  12363. "$ref": "#/components/schemas/LocationInfo"
  12364. },
  12365. "data": {
  12366. "type": "array",
  12367. "items": {
  12368. "$ref": "#/components/schemas/PermissionV2Request"
  12369. }
  12370. }
  12371. },
  12372. "required": ["location", "data"],
  12373. "additionalProperties": false
  12374. }
  12375. }
  12376. }
  12377. },
  12378. "400": {
  12379. "description": "InvalidRequestError",
  12380. "content": {
  12381. "application/json": {
  12382. "schema": {
  12383. "$ref": "#/components/schemas/InvalidRequestError"
  12384. }
  12385. }
  12386. }
  12387. },
  12388. "401": {
  12389. "description": "UnauthorizedError",
  12390. "content": {
  12391. "application/json": {
  12392. "schema": {
  12393. "$ref": "#/components/schemas/UnauthorizedError"
  12394. }
  12395. }
  12396. }
  12397. }
  12398. },
  12399. "description": "Retrieve pending permission requests for a location.",
  12400. "summary": "List pending permission requests",
  12401. "x-codeSamples": [
  12402. {
  12403. "lang": "js",
  12404. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.request.list({\n ...\n})"
  12405. }
  12406. ]
  12407. }
  12408. },
  12409. "/api/permission/saved": {
  12410. "get": {
  12411. "tags": ["permissions"],
  12412. "operationId": "v2.permission.saved.list",
  12413. "parameters": [
  12414. {
  12415. "name": "projectID",
  12416. "in": "query",
  12417. "schema": {
  12418. "type": "string"
  12419. },
  12420. "required": false
  12421. }
  12422. ],
  12423. "security": [],
  12424. "responses": {
  12425. "200": {
  12426. "description": "Success",
  12427. "content": {
  12428. "application/json": {
  12429. "schema": {
  12430. "type": "object",
  12431. "properties": {
  12432. "data": {
  12433. "type": "array",
  12434. "items": {
  12435. "$ref": "#/components/schemas/PermissionSavedInfo"
  12436. }
  12437. }
  12438. },
  12439. "required": ["data"],
  12440. "additionalProperties": false
  12441. }
  12442. }
  12443. }
  12444. },
  12445. "400": {
  12446. "description": "InvalidRequestError",
  12447. "content": {
  12448. "application/json": {
  12449. "schema": {
  12450. "$ref": "#/components/schemas/InvalidRequestError"
  12451. }
  12452. }
  12453. }
  12454. },
  12455. "401": {
  12456. "description": "UnauthorizedError",
  12457. "content": {
  12458. "application/json": {
  12459. "schema": {
  12460. "$ref": "#/components/schemas/UnauthorizedError"
  12461. }
  12462. }
  12463. }
  12464. }
  12465. },
  12466. "description": "Retrieve saved permissions, optionally filtered by project.",
  12467. "summary": "List saved permissions",
  12468. "x-codeSamples": [
  12469. {
  12470. "lang": "js",
  12471. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.list({\n ...\n})"
  12472. }
  12473. ]
  12474. }
  12475. },
  12476. "/api/permission/saved/{id}": {
  12477. "delete": {
  12478. "tags": ["permissions"],
  12479. "operationId": "v2.permission.saved.remove",
  12480. "parameters": [
  12481. {
  12482. "name": "id",
  12483. "in": "path",
  12484. "schema": {
  12485. "type": "string"
  12486. },
  12487. "required": true
  12488. }
  12489. ],
  12490. "security": [],
  12491. "responses": {
  12492. "204": {
  12493. "description": "<No Content>"
  12494. },
  12495. "400": {
  12496. "description": "InvalidRequestError",
  12497. "content": {
  12498. "application/json": {
  12499. "schema": {
  12500. "$ref": "#/components/schemas/InvalidRequestError"
  12501. }
  12502. }
  12503. }
  12504. },
  12505. "401": {
  12506. "description": "UnauthorizedError",
  12507. "content": {
  12508. "application/json": {
  12509. "schema": {
  12510. "$ref": "#/components/schemas/UnauthorizedError"
  12511. }
  12512. }
  12513. }
  12514. }
  12515. },
  12516. "description": "Remove a saved permission by ID.",
  12517. "summary": "Remove saved permission",
  12518. "x-codeSamples": [
  12519. {
  12520. "lang": "js",
  12521. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.remove({\n ...\n})"
  12522. }
  12523. ]
  12524. }
  12525. },
  12526. "/api/session/{sessionID}/permission": {
  12527. "get": {
  12528. "tags": ["permissions"],
  12529. "operationId": "v2.session.permission.list",
  12530. "parameters": [
  12531. {
  12532. "name": "sessionID",
  12533. "in": "path",
  12534. "schema": {
  12535. "type": "string",
  12536. "pattern": "^ses"
  12537. },
  12538. "required": true
  12539. }
  12540. ],
  12541. "security": [],
  12542. "responses": {
  12543. "200": {
  12544. "description": "Success",
  12545. "content": {
  12546. "application/json": {
  12547. "schema": {
  12548. "type": "object",
  12549. "properties": {
  12550. "data": {
  12551. "type": "array",
  12552. "items": {
  12553. "$ref": "#/components/schemas/PermissionV2Request"
  12554. }
  12555. }
  12556. },
  12557. "required": ["data"],
  12558. "additionalProperties": false
  12559. }
  12560. }
  12561. }
  12562. },
  12563. "400": {
  12564. "description": "InvalidRequestError",
  12565. "content": {
  12566. "application/json": {
  12567. "schema": {
  12568. "$ref": "#/components/schemas/InvalidRequestError"
  12569. }
  12570. }
  12571. }
  12572. },
  12573. "401": {
  12574. "description": "UnauthorizedError",
  12575. "content": {
  12576. "application/json": {
  12577. "schema": {
  12578. "$ref": "#/components/schemas/UnauthorizedError"
  12579. }
  12580. }
  12581. }
  12582. },
  12583. "404": {
  12584. "description": "SessionNotFoundError",
  12585. "content": {
  12586. "application/json": {
  12587. "schema": {
  12588. "anyOf": [
  12589. {
  12590. "$ref": "#/components/schemas/SessionNotFoundError"
  12591. },
  12592. {
  12593. "$ref": "#/components/schemas/SessionNotFoundError"
  12594. }
  12595. ]
  12596. }
  12597. }
  12598. }
  12599. }
  12600. },
  12601. "description": "Retrieve pending permission requests owned by a session.",
  12602. "summary": "List session permission requests",
  12603. "x-codeSamples": [
  12604. {
  12605. "lang": "js",
  12606. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.list({\n ...\n})"
  12607. }
  12608. ]
  12609. }
  12610. },
  12611. "/api/session/{sessionID}/permission/{requestID}/reply": {
  12612. "post": {
  12613. "tags": ["permissions"],
  12614. "operationId": "v2.session.permission.reply",
  12615. "parameters": [
  12616. {
  12617. "name": "sessionID",
  12618. "in": "path",
  12619. "schema": {
  12620. "type": "string",
  12621. "pattern": "^ses"
  12622. },
  12623. "required": true
  12624. },
  12625. {
  12626. "name": "requestID",
  12627. "in": "path",
  12628. "schema": {
  12629. "type": "string",
  12630. "pattern": "^per"
  12631. },
  12632. "required": true
  12633. }
  12634. ],
  12635. "security": [],
  12636. "responses": {
  12637. "204": {
  12638. "description": "<No Content>"
  12639. },
  12640. "400": {
  12641. "description": "InvalidRequestError",
  12642. "content": {
  12643. "application/json": {
  12644. "schema": {
  12645. "$ref": "#/components/schemas/InvalidRequestError"
  12646. }
  12647. }
  12648. }
  12649. },
  12650. "401": {
  12651. "description": "UnauthorizedError",
  12652. "content": {
  12653. "application/json": {
  12654. "schema": {
  12655. "$ref": "#/components/schemas/UnauthorizedError"
  12656. }
  12657. }
  12658. }
  12659. },
  12660. "404": {
  12661. "description": "SessionNotFoundError | PermissionNotFoundError",
  12662. "content": {
  12663. "application/json": {
  12664. "schema": {
  12665. "anyOf": [
  12666. {
  12667. "$ref": "#/components/schemas/PermissionNotFoundError"
  12668. },
  12669. {
  12670. "$ref": "#/components/schemas/SessionNotFoundError"
  12671. },
  12672. {
  12673. "$ref": "#/components/schemas/SessionNotFoundError"
  12674. }
  12675. ]
  12676. }
  12677. }
  12678. }
  12679. }
  12680. },
  12681. "description": "Respond to a pending permission request owned by a session.",
  12682. "summary": "Reply to pending permission request",
  12683. "requestBody": {
  12684. "content": {
  12685. "application/json": {
  12686. "schema": {
  12687. "type": "object",
  12688. "properties": {
  12689. "reply": {
  12690. "$ref": "#/components/schemas/PermissionV2Reply"
  12691. },
  12692. "message": {
  12693. "type": "string"
  12694. }
  12695. },
  12696. "required": ["reply"],
  12697. "additionalProperties": false
  12698. }
  12699. }
  12700. },
  12701. "required": true
  12702. },
  12703. "x-codeSamples": [
  12704. {
  12705. "lang": "js",
  12706. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.reply({\n ...\n})"
  12707. }
  12708. ]
  12709. }
  12710. },
  12711. "/api/fs/read/*": {
  12712. "get": {
  12713. "tags": ["filesystem"],
  12714. "operationId": "v2.fs.read",
  12715. "parameters": [
  12716. {
  12717. "name": "location",
  12718. "in": "query",
  12719. "schema": {
  12720. "type": "object",
  12721. "properties": {
  12722. "directory": {
  12723. "type": "string"
  12724. },
  12725. "workspace": {
  12726. "type": "string"
  12727. }
  12728. },
  12729. "additionalProperties": false
  12730. },
  12731. "required": false,
  12732. "style": "deepObject",
  12733. "explode": true
  12734. }
  12735. ],
  12736. "security": [],
  12737. "responses": {
  12738. "200": {
  12739. "description": "Success",
  12740. "content": {
  12741. "application/octet-stream": {
  12742. "schema": {
  12743. "type": "string",
  12744. "format": "binary"
  12745. }
  12746. }
  12747. }
  12748. },
  12749. "400": {
  12750. "description": "InvalidRequestError",
  12751. "content": {
  12752. "application/json": {
  12753. "schema": {
  12754. "$ref": "#/components/schemas/InvalidRequestError"
  12755. }
  12756. }
  12757. }
  12758. },
  12759. "401": {
  12760. "description": "UnauthorizedError",
  12761. "content": {
  12762. "application/json": {
  12763. "schema": {
  12764. "$ref": "#/components/schemas/UnauthorizedError"
  12765. }
  12766. }
  12767. }
  12768. }
  12769. },
  12770. "description": "Serve one file relative to the requested location.",
  12771. "summary": "Read file",
  12772. "x-codeSamples": [
  12773. {
  12774. "lang": "js",
  12775. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.read({\n ...\n})"
  12776. }
  12777. ]
  12778. }
  12779. },
  12780. "/api/fs/list": {
  12781. "get": {
  12782. "tags": ["filesystem"],
  12783. "operationId": "v2.fs.list",
  12784. "parameters": [
  12785. {
  12786. "name": "location",
  12787. "in": "query",
  12788. "schema": {
  12789. "type": "object",
  12790. "properties": {
  12791. "directory": {
  12792. "type": "string"
  12793. },
  12794. "workspace": {
  12795. "type": "string"
  12796. }
  12797. },
  12798. "additionalProperties": false
  12799. },
  12800. "required": false,
  12801. "style": "deepObject",
  12802. "explode": true
  12803. },
  12804. {
  12805. "name": "path",
  12806. "in": "query",
  12807. "schema": {
  12808. "type": "string"
  12809. },
  12810. "required": false
  12811. }
  12812. ],
  12813. "security": [],
  12814. "responses": {
  12815. "200": {
  12816. "description": "Success",
  12817. "content": {
  12818. "application/json": {
  12819. "schema": {
  12820. "type": "object",
  12821. "properties": {
  12822. "location": {
  12823. "$ref": "#/components/schemas/LocationInfo"
  12824. },
  12825. "data": {
  12826. "type": "array",
  12827. "items": {
  12828. "$ref": "#/components/schemas/FileSystemEntry"
  12829. }
  12830. }
  12831. },
  12832. "required": ["location", "data"],
  12833. "additionalProperties": false
  12834. }
  12835. }
  12836. }
  12837. },
  12838. "400": {
  12839. "description": "InvalidRequestError",
  12840. "content": {
  12841. "application/json": {
  12842. "schema": {
  12843. "$ref": "#/components/schemas/InvalidRequestError"
  12844. }
  12845. }
  12846. }
  12847. },
  12848. "401": {
  12849. "description": "UnauthorizedError",
  12850. "content": {
  12851. "application/json": {
  12852. "schema": {
  12853. "$ref": "#/components/schemas/UnauthorizedError"
  12854. }
  12855. }
  12856. }
  12857. }
  12858. },
  12859. "description": "List direct children of one directory relative to the requested location.",
  12860. "summary": "List directory",
  12861. "x-codeSamples": [
  12862. {
  12863. "lang": "js",
  12864. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.list({\n ...\n})"
  12865. }
  12866. ]
  12867. }
  12868. },
  12869. "/api/fs/find": {
  12870. "get": {
  12871. "tags": ["filesystem"],
  12872. "operationId": "v2.fs.find",
  12873. "parameters": [
  12874. {
  12875. "name": "location",
  12876. "in": "query",
  12877. "schema": {
  12878. "type": "object",
  12879. "properties": {
  12880. "directory": {
  12881. "type": "string"
  12882. },
  12883. "workspace": {
  12884. "type": "string"
  12885. }
  12886. },
  12887. "additionalProperties": false
  12888. },
  12889. "required": false,
  12890. "style": "deepObject",
  12891. "explode": true
  12892. },
  12893. {
  12894. "name": "query",
  12895. "in": "query",
  12896. "schema": {
  12897. "type": "string"
  12898. },
  12899. "required": true
  12900. },
  12901. {
  12902. "name": "type",
  12903. "in": "query",
  12904. "schema": {
  12905. "type": "string",
  12906. "enum": ["file", "directory"]
  12907. },
  12908. "required": false
  12909. },
  12910. {
  12911. "name": "limit",
  12912. "in": "query",
  12913. "schema": {
  12914. "type": "string"
  12915. },
  12916. "required": false
  12917. }
  12918. ],
  12919. "security": [],
  12920. "responses": {
  12921. "200": {
  12922. "description": "Success",
  12923. "content": {
  12924. "application/json": {
  12925. "schema": {
  12926. "type": "object",
  12927. "properties": {
  12928. "location": {
  12929. "$ref": "#/components/schemas/LocationInfo"
  12930. },
  12931. "data": {
  12932. "type": "array",
  12933. "items": {
  12934. "$ref": "#/components/schemas/FileSystemEntry"
  12935. }
  12936. }
  12937. },
  12938. "required": ["location", "data"],
  12939. "additionalProperties": false
  12940. }
  12941. }
  12942. }
  12943. },
  12944. "400": {
  12945. "description": "InvalidRequestError",
  12946. "content": {
  12947. "application/json": {
  12948. "schema": {
  12949. "$ref": "#/components/schemas/InvalidRequestError"
  12950. }
  12951. }
  12952. }
  12953. },
  12954. "401": {
  12955. "description": "UnauthorizedError",
  12956. "content": {
  12957. "application/json": {
  12958. "schema": {
  12959. "$ref": "#/components/schemas/UnauthorizedError"
  12960. }
  12961. }
  12962. }
  12963. }
  12964. },
  12965. "description": "Find recursively ranked filesystem entries relative to the requested location.",
  12966. "summary": "Find files",
  12967. "x-codeSamples": [
  12968. {
  12969. "lang": "js",
  12970. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.find({\n ...\n})"
  12971. }
  12972. ]
  12973. }
  12974. },
  12975. "/api/command": {
  12976. "get": {
  12977. "tags": ["commands"],
  12978. "operationId": "v2.command.list",
  12979. "parameters": [
  12980. {
  12981. "name": "location",
  12982. "in": "query",
  12983. "schema": {
  12984. "type": "object",
  12985. "properties": {
  12986. "directory": {
  12987. "type": "string"
  12988. },
  12989. "workspace": {
  12990. "type": "string"
  12991. }
  12992. },
  12993. "additionalProperties": false
  12994. },
  12995. "required": false,
  12996. "style": "deepObject",
  12997. "explode": true
  12998. }
  12999. ],
  13000. "security": [],
  13001. "responses": {
  13002. "200": {
  13003. "description": "Success",
  13004. "content": {
  13005. "application/json": {
  13006. "schema": {
  13007. "type": "object",
  13008. "properties": {
  13009. "location": {
  13010. "$ref": "#/components/schemas/LocationInfo"
  13011. },
  13012. "data": {
  13013. "type": "array",
  13014. "items": {
  13015. "$ref": "#/components/schemas/CommandV2Info"
  13016. }
  13017. }
  13018. },
  13019. "required": ["location", "data"],
  13020. "additionalProperties": false
  13021. }
  13022. }
  13023. }
  13024. },
  13025. "400": {
  13026. "description": "InvalidRequestError",
  13027. "content": {
  13028. "application/json": {
  13029. "schema": {
  13030. "$ref": "#/components/schemas/InvalidRequestError"
  13031. }
  13032. }
  13033. }
  13034. },
  13035. "401": {
  13036. "description": "UnauthorizedError",
  13037. "content": {
  13038. "application/json": {
  13039. "schema": {
  13040. "$ref": "#/components/schemas/UnauthorizedError"
  13041. }
  13042. }
  13043. }
  13044. }
  13045. },
  13046. "description": "Retrieve currently registered commands.",
  13047. "summary": "List commands",
  13048. "x-codeSamples": [
  13049. {
  13050. "lang": "js",
  13051. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.command.list({\n ...\n})"
  13052. }
  13053. ]
  13054. }
  13055. },
  13056. "/api/skill": {
  13057. "get": {
  13058. "tags": ["skills"],
  13059. "operationId": "v2.skill.list",
  13060. "parameters": [
  13061. {
  13062. "name": "location",
  13063. "in": "query",
  13064. "schema": {
  13065. "type": "object",
  13066. "properties": {
  13067. "directory": {
  13068. "type": "string"
  13069. },
  13070. "workspace": {
  13071. "type": "string"
  13072. }
  13073. },
  13074. "additionalProperties": false
  13075. },
  13076. "required": false,
  13077. "style": "deepObject",
  13078. "explode": true
  13079. }
  13080. ],
  13081. "security": [],
  13082. "responses": {
  13083. "200": {
  13084. "description": "Success",
  13085. "content": {
  13086. "application/json": {
  13087. "schema": {
  13088. "type": "object",
  13089. "properties": {
  13090. "location": {
  13091. "$ref": "#/components/schemas/LocationInfo"
  13092. },
  13093. "data": {
  13094. "type": "array",
  13095. "items": {
  13096. "$ref": "#/components/schemas/SkillV2Info"
  13097. }
  13098. }
  13099. },
  13100. "required": ["location", "data"],
  13101. "additionalProperties": false
  13102. }
  13103. }
  13104. }
  13105. },
  13106. "400": {
  13107. "description": "InvalidRequestError",
  13108. "content": {
  13109. "application/json": {
  13110. "schema": {
  13111. "$ref": "#/components/schemas/InvalidRequestError"
  13112. }
  13113. }
  13114. }
  13115. },
  13116. "401": {
  13117. "description": "UnauthorizedError",
  13118. "content": {
  13119. "application/json": {
  13120. "schema": {
  13121. "$ref": "#/components/schemas/UnauthorizedError"
  13122. }
  13123. }
  13124. }
  13125. }
  13126. },
  13127. "description": "Retrieve currently registered skills.",
  13128. "summary": "List skills",
  13129. "x-codeSamples": [
  13130. {
  13131. "lang": "js",
  13132. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.skill.list({\n ...\n})"
  13133. }
  13134. ]
  13135. }
  13136. },
  13137. "/api/event": {
  13138. "get": {
  13139. "tags": ["events"],
  13140. "operationId": "v2.event.subscribe",
  13141. "parameters": [],
  13142. "security": [],
  13143. "responses": {
  13144. "200": {
  13145. "description": "Event stream",
  13146. "content": {
  13147. "text/event-stream": {
  13148. "schema": {
  13149. "$ref": "#/components/schemas/V2Event"
  13150. }
  13151. }
  13152. }
  13153. },
  13154. "400": {
  13155. "description": "InvalidRequestError",
  13156. "content": {
  13157. "application/json": {
  13158. "schema": {
  13159. "$ref": "#/components/schemas/InvalidRequestError"
  13160. }
  13161. }
  13162. }
  13163. },
  13164. "401": {
  13165. "description": "UnauthorizedError",
  13166. "content": {
  13167. "application/json": {
  13168. "schema": {
  13169. "$ref": "#/components/schemas/UnauthorizedError"
  13170. }
  13171. }
  13172. }
  13173. }
  13174. },
  13175. "description": "Subscribe to native event payloads for the server.",
  13176. "summary": "Subscribe to events",
  13177. "x-codeSamples": [
  13178. {
  13179. "lang": "js",
  13180. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.event.subscribe({\n ...\n})"
  13181. }
  13182. ]
  13183. }
  13184. },
  13185. "/api/pty": {
  13186. "get": {
  13187. "tags": ["pty"],
  13188. "operationId": "v2.pty.list",
  13189. "parameters": [
  13190. {
  13191. "name": "location",
  13192. "in": "query",
  13193. "schema": {
  13194. "type": "object",
  13195. "properties": {
  13196. "directory": {
  13197. "type": "string"
  13198. },
  13199. "workspace": {
  13200. "type": "string"
  13201. }
  13202. },
  13203. "additionalProperties": false
  13204. },
  13205. "required": false,
  13206. "style": "deepObject",
  13207. "explode": true
  13208. }
  13209. ],
  13210. "security": [],
  13211. "responses": {
  13212. "200": {
  13213. "description": "Success",
  13214. "content": {
  13215. "application/json": {
  13216. "schema": {
  13217. "type": "object",
  13218. "properties": {
  13219. "location": {
  13220. "$ref": "#/components/schemas/LocationInfo"
  13221. },
  13222. "data": {
  13223. "type": "array",
  13224. "items": {
  13225. "$ref": "#/components/schemas/Pty"
  13226. }
  13227. }
  13228. },
  13229. "required": ["location", "data"],
  13230. "additionalProperties": false
  13231. }
  13232. }
  13233. }
  13234. },
  13235. "400": {
  13236. "description": "InvalidRequestError",
  13237. "content": {
  13238. "application/json": {
  13239. "schema": {
  13240. "$ref": "#/components/schemas/InvalidRequestError"
  13241. }
  13242. }
  13243. }
  13244. },
  13245. "401": {
  13246. "description": "UnauthorizedError",
  13247. "content": {
  13248. "application/json": {
  13249. "schema": {
  13250. "$ref": "#/components/schemas/UnauthorizedError"
  13251. }
  13252. }
  13253. }
  13254. }
  13255. },
  13256. "description": "List PTY sessions for a location, including exited sessions retained until removal.",
  13257. "summary": "List PTY sessions",
  13258. "x-codeSamples": [
  13259. {
  13260. "lang": "js",
  13261. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.list({\n ...\n})"
  13262. }
  13263. ]
  13264. },
  13265. "post": {
  13266. "tags": ["pty"],
  13267. "operationId": "v2.pty.create",
  13268. "parameters": [
  13269. {
  13270. "name": "location",
  13271. "in": "query",
  13272. "schema": {
  13273. "type": "object",
  13274. "properties": {
  13275. "directory": {
  13276. "type": "string"
  13277. },
  13278. "workspace": {
  13279. "type": "string"
  13280. }
  13281. },
  13282. "additionalProperties": false
  13283. },
  13284. "required": false,
  13285. "style": "deepObject",
  13286. "explode": true
  13287. }
  13288. ],
  13289. "security": [],
  13290. "responses": {
  13291. "200": {
  13292. "description": "Success",
  13293. "content": {
  13294. "application/json": {
  13295. "schema": {
  13296. "type": "object",
  13297. "properties": {
  13298. "location": {
  13299. "$ref": "#/components/schemas/LocationInfo"
  13300. },
  13301. "data": {
  13302. "$ref": "#/components/schemas/Pty"
  13303. }
  13304. },
  13305. "required": ["location", "data"],
  13306. "additionalProperties": false
  13307. }
  13308. }
  13309. }
  13310. },
  13311. "400": {
  13312. "description": "InvalidRequestError",
  13313. "content": {
  13314. "application/json": {
  13315. "schema": {
  13316. "$ref": "#/components/schemas/InvalidRequestError"
  13317. }
  13318. }
  13319. }
  13320. },
  13321. "401": {
  13322. "description": "UnauthorizedError",
  13323. "content": {
  13324. "application/json": {
  13325. "schema": {
  13326. "$ref": "#/components/schemas/UnauthorizedError"
  13327. }
  13328. }
  13329. }
  13330. }
  13331. },
  13332. "description": "Create a pseudo-terminal session for a location.",
  13333. "summary": "Create PTY session",
  13334. "requestBody": {
  13335. "content": {
  13336. "application/json": {
  13337. "schema": {
  13338. "type": "object",
  13339. "properties": {
  13340. "command": {
  13341. "type": "string"
  13342. },
  13343. "args": {
  13344. "type": "array",
  13345. "items": {
  13346. "type": "string"
  13347. }
  13348. },
  13349. "cwd": {
  13350. "type": "string"
  13351. },
  13352. "title": {
  13353. "type": "string"
  13354. },
  13355. "env": {
  13356. "type": "object",
  13357. "additionalProperties": {
  13358. "type": "string"
  13359. }
  13360. }
  13361. },
  13362. "additionalProperties": false
  13363. }
  13364. }
  13365. },
  13366. "required": true
  13367. },
  13368. "x-codeSamples": [
  13369. {
  13370. "lang": "js",
  13371. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.create({\n ...\n})"
  13372. }
  13373. ]
  13374. }
  13375. },
  13376. "/api/pty/{ptyID}": {
  13377. "get": {
  13378. "tags": ["pty"],
  13379. "operationId": "v2.pty.get",
  13380. "parameters": [
  13381. {
  13382. "name": "ptyID",
  13383. "in": "path",
  13384. "schema": {
  13385. "type": "string",
  13386. "pattern": "^pty"
  13387. },
  13388. "required": true
  13389. },
  13390. {
  13391. "name": "location",
  13392. "in": "query",
  13393. "schema": {
  13394. "type": "object",
  13395. "properties": {
  13396. "directory": {
  13397. "type": "string"
  13398. },
  13399. "workspace": {
  13400. "type": "string"
  13401. }
  13402. },
  13403. "additionalProperties": false
  13404. },
  13405. "required": false,
  13406. "style": "deepObject",
  13407. "explode": true
  13408. }
  13409. ],
  13410. "security": [],
  13411. "responses": {
  13412. "200": {
  13413. "description": "Success",
  13414. "content": {
  13415. "application/json": {
  13416. "schema": {
  13417. "type": "object",
  13418. "properties": {
  13419. "location": {
  13420. "$ref": "#/components/schemas/LocationInfo"
  13421. },
  13422. "data": {
  13423. "$ref": "#/components/schemas/Pty"
  13424. }
  13425. },
  13426. "required": ["location", "data"],
  13427. "additionalProperties": false
  13428. }
  13429. }
  13430. }
  13431. },
  13432. "400": {
  13433. "description": "InvalidRequestError",
  13434. "content": {
  13435. "application/json": {
  13436. "schema": {
  13437. "$ref": "#/components/schemas/InvalidRequestError"
  13438. }
  13439. }
  13440. }
  13441. },
  13442. "401": {
  13443. "description": "UnauthorizedError",
  13444. "content": {
  13445. "application/json": {
  13446. "schema": {
  13447. "$ref": "#/components/schemas/UnauthorizedError"
  13448. }
  13449. }
  13450. }
  13451. },
  13452. "404": {
  13453. "description": "PtyNotFoundError",
  13454. "content": {
  13455. "application/json": {
  13456. "schema": {
  13457. "$ref": "#/components/schemas/PtyNotFoundError"
  13458. }
  13459. }
  13460. }
  13461. }
  13462. },
  13463. "description": "Get one PTY session, including its exit code once exited.",
  13464. "summary": "Get PTY session",
  13465. "x-codeSamples": [
  13466. {
  13467. "lang": "js",
  13468. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.get({\n ...\n})"
  13469. }
  13470. ]
  13471. },
  13472. "put": {
  13473. "tags": ["pty"],
  13474. "operationId": "v2.pty.update",
  13475. "parameters": [
  13476. {
  13477. "name": "ptyID",
  13478. "in": "path",
  13479. "schema": {
  13480. "type": "string",
  13481. "pattern": "^pty"
  13482. },
  13483. "required": true
  13484. },
  13485. {
  13486. "name": "location",
  13487. "in": "query",
  13488. "schema": {
  13489. "type": "object",
  13490. "properties": {
  13491. "directory": {
  13492. "type": "string"
  13493. },
  13494. "workspace": {
  13495. "type": "string"
  13496. }
  13497. },
  13498. "additionalProperties": false
  13499. },
  13500. "required": false,
  13501. "style": "deepObject",
  13502. "explode": true
  13503. }
  13504. ],
  13505. "security": [],
  13506. "responses": {
  13507. "200": {
  13508. "description": "Success",
  13509. "content": {
  13510. "application/json": {
  13511. "schema": {
  13512. "type": "object",
  13513. "properties": {
  13514. "location": {
  13515. "$ref": "#/components/schemas/LocationInfo"
  13516. },
  13517. "data": {
  13518. "$ref": "#/components/schemas/Pty"
  13519. }
  13520. },
  13521. "required": ["location", "data"],
  13522. "additionalProperties": false
  13523. }
  13524. }
  13525. }
  13526. },
  13527. "400": {
  13528. "description": "InvalidRequestError",
  13529. "content": {
  13530. "application/json": {
  13531. "schema": {
  13532. "$ref": "#/components/schemas/InvalidRequestError"
  13533. }
  13534. }
  13535. }
  13536. },
  13537. "401": {
  13538. "description": "UnauthorizedError",
  13539. "content": {
  13540. "application/json": {
  13541. "schema": {
  13542. "$ref": "#/components/schemas/UnauthorizedError"
  13543. }
  13544. }
  13545. }
  13546. },
  13547. "404": {
  13548. "description": "PtyNotFoundError",
  13549. "content": {
  13550. "application/json": {
  13551. "schema": {
  13552. "$ref": "#/components/schemas/PtyNotFoundError"
  13553. }
  13554. }
  13555. }
  13556. }
  13557. },
  13558. "description": "Update the title or viewport size of one PTY session.",
  13559. "summary": "Update PTY session",
  13560. "requestBody": {
  13561. "content": {
  13562. "application/json": {
  13563. "schema": {
  13564. "type": "object",
  13565. "properties": {
  13566. "title": {
  13567. "type": "string"
  13568. },
  13569. "size": {
  13570. "type": "object",
  13571. "properties": {
  13572. "rows": {
  13573. "type": "integer",
  13574. "exclusiveMinimum": 0
  13575. },
  13576. "cols": {
  13577. "type": "integer",
  13578. "exclusiveMinimum": 0
  13579. }
  13580. },
  13581. "required": ["rows", "cols"],
  13582. "additionalProperties": false
  13583. }
  13584. },
  13585. "additionalProperties": false
  13586. }
  13587. }
  13588. },
  13589. "required": true
  13590. },
  13591. "x-codeSamples": [
  13592. {
  13593. "lang": "js",
  13594. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.update({\n ...\n})"
  13595. }
  13596. ]
  13597. },
  13598. "delete": {
  13599. "tags": ["pty"],
  13600. "operationId": "v2.pty.remove",
  13601. "parameters": [
  13602. {
  13603. "name": "ptyID",
  13604. "in": "path",
  13605. "schema": {
  13606. "type": "string",
  13607. "pattern": "^pty"
  13608. },
  13609. "required": true
  13610. },
  13611. {
  13612. "name": "location",
  13613. "in": "query",
  13614. "schema": {
  13615. "type": "object",
  13616. "properties": {
  13617. "directory": {
  13618. "type": "string"
  13619. },
  13620. "workspace": {
  13621. "type": "string"
  13622. }
  13623. },
  13624. "additionalProperties": false
  13625. },
  13626. "required": false,
  13627. "style": "deepObject",
  13628. "explode": true
  13629. }
  13630. ],
  13631. "security": [],
  13632. "responses": {
  13633. "204": {
  13634. "description": "<No Content>"
  13635. },
  13636. "400": {
  13637. "description": "InvalidRequestError",
  13638. "content": {
  13639. "application/json": {
  13640. "schema": {
  13641. "$ref": "#/components/schemas/InvalidRequestError"
  13642. }
  13643. }
  13644. }
  13645. },
  13646. "401": {
  13647. "description": "UnauthorizedError",
  13648. "content": {
  13649. "application/json": {
  13650. "schema": {
  13651. "$ref": "#/components/schemas/UnauthorizedError"
  13652. }
  13653. }
  13654. }
  13655. },
  13656. "404": {
  13657. "description": "PtyNotFoundError",
  13658. "content": {
  13659. "application/json": {
  13660. "schema": {
  13661. "$ref": "#/components/schemas/PtyNotFoundError"
  13662. }
  13663. }
  13664. }
  13665. }
  13666. },
  13667. "description": "Terminate and remove one PTY session.",
  13668. "summary": "Remove PTY session",
  13669. "x-codeSamples": [
  13670. {
  13671. "lang": "js",
  13672. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.remove({\n ...\n})"
  13673. }
  13674. ]
  13675. }
  13676. },
  13677. "/api/pty/{ptyID}/connect-token": {
  13678. "post": {
  13679. "tags": ["pty"],
  13680. "operationId": "v2.pty.connectToken",
  13681. "parameters": [
  13682. {
  13683. "name": "ptyID",
  13684. "in": "path",
  13685. "schema": {
  13686. "type": "string",
  13687. "pattern": "^pty"
  13688. },
  13689. "required": true
  13690. },
  13691. {
  13692. "name": "location",
  13693. "in": "query",
  13694. "schema": {
  13695. "type": "object",
  13696. "properties": {
  13697. "directory": {
  13698. "type": "string"
  13699. },
  13700. "workspace": {
  13701. "type": "string"
  13702. }
  13703. },
  13704. "additionalProperties": false
  13705. },
  13706. "required": false,
  13707. "style": "deepObject",
  13708. "explode": true
  13709. }
  13710. ],
  13711. "security": [],
  13712. "responses": {
  13713. "200": {
  13714. "description": "Success",
  13715. "content": {
  13716. "application/json": {
  13717. "schema": {
  13718. "type": "object",
  13719. "properties": {
  13720. "location": {
  13721. "$ref": "#/components/schemas/LocationInfo"
  13722. },
  13723. "data": {
  13724. "type": "object",
  13725. "properties": {
  13726. "ticket": {
  13727. "type": "string"
  13728. },
  13729. "expires_in": {
  13730. "type": "integer",
  13731. "exclusiveMinimum": 0
  13732. }
  13733. },
  13734. "required": ["ticket", "expires_in"],
  13735. "additionalProperties": false
  13736. }
  13737. },
  13738. "required": ["location", "data"],
  13739. "additionalProperties": false
  13740. }
  13741. }
  13742. }
  13743. },
  13744. "400": {
  13745. "description": "InvalidRequestError",
  13746. "content": {
  13747. "application/json": {
  13748. "schema": {
  13749. "$ref": "#/components/schemas/InvalidRequestError"
  13750. }
  13751. }
  13752. }
  13753. },
  13754. "401": {
  13755. "description": "UnauthorizedError",
  13756. "content": {
  13757. "application/json": {
  13758. "schema": {
  13759. "$ref": "#/components/schemas/UnauthorizedError"
  13760. }
  13761. }
  13762. }
  13763. },
  13764. "403": {
  13765. "description": "ForbiddenError",
  13766. "content": {
  13767. "application/json": {
  13768. "schema": {
  13769. "$ref": "#/components/schemas/ForbiddenError"
  13770. }
  13771. }
  13772. }
  13773. },
  13774. "404": {
  13775. "description": "PtyNotFoundError",
  13776. "content": {
  13777. "application/json": {
  13778. "schema": {
  13779. "$ref": "#/components/schemas/PtyNotFoundError"
  13780. }
  13781. }
  13782. }
  13783. }
  13784. },
  13785. "description": "Create a short-lived single-use ticket for opening a PTY WebSocket connection.",
  13786. "summary": "Create PTY WebSocket token",
  13787. "x-codeSamples": [
  13788. {
  13789. "lang": "js",
  13790. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.connectToken({\n ...\n})"
  13791. }
  13792. ]
  13793. }
  13794. },
  13795. "/api/pty/{ptyID}/connect": {
  13796. "get": {
  13797. "tags": ["pty"],
  13798. "operationId": "v2.pty.connect",
  13799. "parameters": [
  13800. {
  13801. "name": "ptyID",
  13802. "in": "path",
  13803. "schema": {
  13804. "type": "string",
  13805. "pattern": "^pty"
  13806. },
  13807. "required": true
  13808. },
  13809. {
  13810. "in": "query",
  13811. "name": "location[directory]",
  13812. "schema": {
  13813. "type": "string"
  13814. }
  13815. },
  13816. {
  13817. "in": "query",
  13818. "name": "location[workspace]",
  13819. "schema": {
  13820. "type": "string"
  13821. }
  13822. },
  13823. {
  13824. "in": "query",
  13825. "name": "cursor",
  13826. "schema": {
  13827. "type": "string"
  13828. }
  13829. },
  13830. {
  13831. "in": "query",
  13832. "name": "ticket",
  13833. "schema": {
  13834. "type": "string"
  13835. }
  13836. }
  13837. ],
  13838. "security": [],
  13839. "responses": {
  13840. "200": {
  13841. "description": "Success",
  13842. "content": {
  13843. "application/json": {
  13844. "schema": {
  13845. "type": "boolean"
  13846. }
  13847. }
  13848. }
  13849. },
  13850. "400": {
  13851. "description": "InvalidRequestError",
  13852. "content": {
  13853. "application/json": {
  13854. "schema": {
  13855. "$ref": "#/components/schemas/InvalidRequestError"
  13856. }
  13857. }
  13858. }
  13859. },
  13860. "401": {
  13861. "description": "UnauthorizedError",
  13862. "content": {
  13863. "application/json": {
  13864. "schema": {
  13865. "$ref": "#/components/schemas/UnauthorizedError"
  13866. }
  13867. }
  13868. }
  13869. },
  13870. "403": {
  13871. "description": "ForbiddenError",
  13872. "content": {
  13873. "application/json": {
  13874. "schema": {
  13875. "$ref": "#/components/schemas/ForbiddenError"
  13876. }
  13877. }
  13878. }
  13879. },
  13880. "404": {
  13881. "description": "PtyNotFoundError",
  13882. "content": {
  13883. "application/json": {
  13884. "schema": {
  13885. "$ref": "#/components/schemas/PtyNotFoundError"
  13886. }
  13887. }
  13888. }
  13889. }
  13890. },
  13891. "description": "Establish a WebSocket connection streaming PTY output and accepting terminal input.",
  13892. "summary": "Connect to PTY session",
  13893. "x-codeSamples": [
  13894. {
  13895. "lang": "js",
  13896. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.connect({\n ...\n})"
  13897. }
  13898. ]
  13899. }
  13900. },
  13901. "/api/question/request": {
  13902. "get": {
  13903. "tags": ["session questions"],
  13904. "operationId": "v2.question.request.list",
  13905. "parameters": [
  13906. {
  13907. "name": "location",
  13908. "in": "query",
  13909. "schema": {
  13910. "type": "object",
  13911. "properties": {
  13912. "directory": {
  13913. "type": "string"
  13914. },
  13915. "workspace": {
  13916. "type": "string"
  13917. }
  13918. },
  13919. "additionalProperties": false
  13920. },
  13921. "required": false,
  13922. "style": "deepObject",
  13923. "explode": true
  13924. }
  13925. ],
  13926. "security": [],
  13927. "responses": {
  13928. "200": {
  13929. "description": "Success",
  13930. "content": {
  13931. "application/json": {
  13932. "schema": {
  13933. "type": "object",
  13934. "properties": {
  13935. "location": {
  13936. "$ref": "#/components/schemas/LocationInfo"
  13937. },
  13938. "data": {
  13939. "type": "array",
  13940. "items": {
  13941. "$ref": "#/components/schemas/QuestionV2Request"
  13942. }
  13943. }
  13944. },
  13945. "required": ["location", "data"],
  13946. "additionalProperties": false
  13947. }
  13948. }
  13949. }
  13950. },
  13951. "400": {
  13952. "description": "InvalidRequestError",
  13953. "content": {
  13954. "application/json": {
  13955. "schema": {
  13956. "$ref": "#/components/schemas/InvalidRequestError"
  13957. }
  13958. }
  13959. }
  13960. },
  13961. "401": {
  13962. "description": "UnauthorizedError",
  13963. "content": {
  13964. "application/json": {
  13965. "schema": {
  13966. "$ref": "#/components/schemas/UnauthorizedError"
  13967. }
  13968. }
  13969. }
  13970. }
  13971. },
  13972. "description": "Retrieve pending question requests for a location.",
  13973. "summary": "List pending question requests",
  13974. "x-codeSamples": [
  13975. {
  13976. "lang": "js",
  13977. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.question.request.list({\n ...\n})"
  13978. }
  13979. ]
  13980. }
  13981. },
  13982. "/api/session/{sessionID}/question": {
  13983. "get": {
  13984. "tags": ["session questions"],
  13985. "operationId": "v2.session.question.list",
  13986. "parameters": [
  13987. {
  13988. "name": "sessionID",
  13989. "in": "path",
  13990. "schema": {
  13991. "type": "string",
  13992. "pattern": "^ses"
  13993. },
  13994. "required": true
  13995. }
  13996. ],
  13997. "security": [],
  13998. "responses": {
  13999. "200": {
  14000. "description": "Success",
  14001. "content": {
  14002. "application/json": {
  14003. "schema": {
  14004. "type": "object",
  14005. "properties": {
  14006. "data": {
  14007. "type": "array",
  14008. "items": {
  14009. "$ref": "#/components/schemas/QuestionV2Request"
  14010. }
  14011. }
  14012. },
  14013. "required": ["data"],
  14014. "additionalProperties": false
  14015. }
  14016. }
  14017. }
  14018. },
  14019. "400": {
  14020. "description": "InvalidRequestError",
  14021. "content": {
  14022. "application/json": {
  14023. "schema": {
  14024. "$ref": "#/components/schemas/InvalidRequestError"
  14025. }
  14026. }
  14027. }
  14028. },
  14029. "401": {
  14030. "description": "UnauthorizedError",
  14031. "content": {
  14032. "application/json": {
  14033. "schema": {
  14034. "$ref": "#/components/schemas/UnauthorizedError"
  14035. }
  14036. }
  14037. }
  14038. },
  14039. "404": {
  14040. "description": "SessionNotFoundError",
  14041. "content": {
  14042. "application/json": {
  14043. "schema": {
  14044. "anyOf": [
  14045. {
  14046. "$ref": "#/components/schemas/SessionNotFoundError"
  14047. },
  14048. {
  14049. "$ref": "#/components/schemas/SessionNotFoundError"
  14050. }
  14051. ]
  14052. }
  14053. }
  14054. }
  14055. }
  14056. },
  14057. "description": "Retrieve pending question requests owned by a session.",
  14058. "summary": "List session question requests",
  14059. "x-codeSamples": [
  14060. {
  14061. "lang": "js",
  14062. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.list({\n ...\n})"
  14063. }
  14064. ]
  14065. }
  14066. },
  14067. "/api/session/{sessionID}/question/{requestID}/reply": {
  14068. "post": {
  14069. "tags": ["session questions"],
  14070. "operationId": "v2.session.question.reply",
  14071. "parameters": [
  14072. {
  14073. "name": "sessionID",
  14074. "in": "path",
  14075. "schema": {
  14076. "type": "string",
  14077. "pattern": "^ses"
  14078. },
  14079. "required": true
  14080. },
  14081. {
  14082. "name": "requestID",
  14083. "in": "path",
  14084. "schema": {
  14085. "type": "string",
  14086. "pattern": "^que"
  14087. },
  14088. "required": true
  14089. }
  14090. ],
  14091. "security": [],
  14092. "responses": {
  14093. "204": {
  14094. "description": "<No Content>"
  14095. },
  14096. "400": {
  14097. "description": "InvalidRequestError",
  14098. "content": {
  14099. "application/json": {
  14100. "schema": {
  14101. "$ref": "#/components/schemas/InvalidRequestError"
  14102. }
  14103. }
  14104. }
  14105. },
  14106. "401": {
  14107. "description": "UnauthorizedError",
  14108. "content": {
  14109. "application/json": {
  14110. "schema": {
  14111. "$ref": "#/components/schemas/UnauthorizedError"
  14112. }
  14113. }
  14114. }
  14115. },
  14116. "404": {
  14117. "description": "SessionNotFoundError | QuestionNotFoundError",
  14118. "content": {
  14119. "application/json": {
  14120. "schema": {
  14121. "anyOf": [
  14122. {
  14123. "$ref": "#/components/schemas/QuestionNotFoundError"
  14124. },
  14125. {
  14126. "$ref": "#/components/schemas/SessionNotFoundError"
  14127. },
  14128. {
  14129. "$ref": "#/components/schemas/SessionNotFoundError"
  14130. }
  14131. ]
  14132. }
  14133. }
  14134. }
  14135. }
  14136. },
  14137. "description": "Answer a pending question request owned by a session.",
  14138. "summary": "Reply to pending question request",
  14139. "requestBody": {
  14140. "content": {
  14141. "application/json": {
  14142. "schema": {
  14143. "$ref": "#/components/schemas/QuestionV2Reply"
  14144. }
  14145. }
  14146. },
  14147. "required": true
  14148. },
  14149. "x-codeSamples": [
  14150. {
  14151. "lang": "js",
  14152. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reply({\n ...\n})"
  14153. }
  14154. ]
  14155. }
  14156. },
  14157. "/api/session/{sessionID}/question/{requestID}/reject": {
  14158. "post": {
  14159. "tags": ["session questions"],
  14160. "operationId": "v2.session.question.reject",
  14161. "parameters": [
  14162. {
  14163. "name": "sessionID",
  14164. "in": "path",
  14165. "schema": {
  14166. "type": "string",
  14167. "pattern": "^ses"
  14168. },
  14169. "required": true
  14170. },
  14171. {
  14172. "name": "requestID",
  14173. "in": "path",
  14174. "schema": {
  14175. "type": "string",
  14176. "pattern": "^que"
  14177. },
  14178. "required": true
  14179. }
  14180. ],
  14181. "security": [],
  14182. "responses": {
  14183. "204": {
  14184. "description": "<No Content>"
  14185. },
  14186. "400": {
  14187. "description": "InvalidRequestError",
  14188. "content": {
  14189. "application/json": {
  14190. "schema": {
  14191. "$ref": "#/components/schemas/InvalidRequestError"
  14192. }
  14193. }
  14194. }
  14195. },
  14196. "401": {
  14197. "description": "UnauthorizedError",
  14198. "content": {
  14199. "application/json": {
  14200. "schema": {
  14201. "$ref": "#/components/schemas/UnauthorizedError"
  14202. }
  14203. }
  14204. }
  14205. },
  14206. "404": {
  14207. "description": "SessionNotFoundError | QuestionNotFoundError",
  14208. "content": {
  14209. "application/json": {
  14210. "schema": {
  14211. "anyOf": [
  14212. {
  14213. "$ref": "#/components/schemas/QuestionNotFoundError"
  14214. },
  14215. {
  14216. "$ref": "#/components/schemas/SessionNotFoundError"
  14217. },
  14218. {
  14219. "$ref": "#/components/schemas/SessionNotFoundError"
  14220. }
  14221. ]
  14222. }
  14223. }
  14224. }
  14225. }
  14226. },
  14227. "description": "Reject a pending question request owned by a session.",
  14228. "summary": "Reject pending question request",
  14229. "x-codeSamples": [
  14230. {
  14231. "lang": "js",
  14232. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reject({\n ...\n})"
  14233. }
  14234. ]
  14235. }
  14236. },
  14237. "/api/reference": {
  14238. "get": {
  14239. "tags": ["reference"],
  14240. "operationId": "v2.reference.list",
  14241. "parameters": [
  14242. {
  14243. "name": "location",
  14244. "in": "query",
  14245. "schema": {
  14246. "type": "object",
  14247. "properties": {
  14248. "directory": {
  14249. "type": "string"
  14250. },
  14251. "workspace": {
  14252. "type": "string"
  14253. }
  14254. },
  14255. "additionalProperties": false
  14256. },
  14257. "required": false,
  14258. "style": "deepObject",
  14259. "explode": true
  14260. }
  14261. ],
  14262. "security": [],
  14263. "responses": {
  14264. "200": {
  14265. "description": "Success",
  14266. "content": {
  14267. "application/json": {
  14268. "schema": {
  14269. "type": "object",
  14270. "properties": {
  14271. "location": {
  14272. "$ref": "#/components/schemas/LocationInfo"
  14273. },
  14274. "data": {
  14275. "type": "array",
  14276. "items": {
  14277. "$ref": "#/components/schemas/ReferenceInfo"
  14278. }
  14279. }
  14280. },
  14281. "required": ["location", "data"],
  14282. "additionalProperties": false
  14283. }
  14284. }
  14285. }
  14286. },
  14287. "400": {
  14288. "description": "InvalidRequestError",
  14289. "content": {
  14290. "application/json": {
  14291. "schema": {
  14292. "$ref": "#/components/schemas/InvalidRequestError"
  14293. }
  14294. }
  14295. }
  14296. },
  14297. "401": {
  14298. "description": "UnauthorizedError",
  14299. "content": {
  14300. "application/json": {
  14301. "schema": {
  14302. "$ref": "#/components/schemas/UnauthorizedError"
  14303. }
  14304. }
  14305. }
  14306. }
  14307. },
  14308. "description": "List references available in the requested location.",
  14309. "summary": "List references",
  14310. "x-codeSamples": [
  14311. {
  14312. "lang": "js",
  14313. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.reference.list({\n ...\n})"
  14314. }
  14315. ]
  14316. }
  14317. },
  14318. "/experimental/project/{projectID}/copy": {
  14319. "post": {
  14320. "tags": ["projectCopy"],
  14321. "operationId": "v2.projectCopy.create",
  14322. "parameters": [
  14323. {
  14324. "name": "projectID",
  14325. "in": "path",
  14326. "schema": {
  14327. "type": "string"
  14328. },
  14329. "required": true
  14330. },
  14331. {
  14332. "name": "location",
  14333. "in": "query",
  14334. "schema": {
  14335. "type": "object",
  14336. "properties": {
  14337. "directory": {
  14338. "type": "string"
  14339. },
  14340. "workspace": {
  14341. "type": "string"
  14342. }
  14343. },
  14344. "additionalProperties": false
  14345. },
  14346. "required": false,
  14347. "style": "deepObject",
  14348. "explode": true
  14349. }
  14350. ],
  14351. "responses": {
  14352. "200": {
  14353. "description": "ProjectCopy.Copy",
  14354. "content": {
  14355. "application/json": {
  14356. "schema": {
  14357. "$ref": "#/components/schemas/ProjectCopyCopy"
  14358. }
  14359. }
  14360. }
  14361. },
  14362. "400": {
  14363. "description": "ProjectCopyError | InvalidRequestError",
  14364. "content": {
  14365. "application/json": {
  14366. "schema": {
  14367. "anyOf": [
  14368. {
  14369. "$ref": "#/components/schemas/ProjectCopyError"
  14370. },
  14371. {
  14372. "$ref": "#/components/schemas/InvalidRequestError"
  14373. }
  14374. ]
  14375. }
  14376. }
  14377. }
  14378. }
  14379. },
  14380. "requestBody": {
  14381. "content": {
  14382. "application/json": {
  14383. "schema": {
  14384. "type": "object",
  14385. "properties": {
  14386. "strategy": {
  14387. "type": "string"
  14388. },
  14389. "directory": {
  14390. "type": "string"
  14391. },
  14392. "name": {
  14393. "type": "string"
  14394. }
  14395. },
  14396. "required": ["strategy", "directory"],
  14397. "additionalProperties": false
  14398. }
  14399. }
  14400. }
  14401. },
  14402. "x-codeSamples": [
  14403. {
  14404. "lang": "js",
  14405. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.create({\n ...\n})"
  14406. }
  14407. ]
  14408. },
  14409. "delete": {
  14410. "tags": ["projectCopy"],
  14411. "operationId": "v2.projectCopy.remove",
  14412. "parameters": [
  14413. {
  14414. "name": "projectID",
  14415. "in": "path",
  14416. "schema": {
  14417. "type": "string"
  14418. },
  14419. "required": true
  14420. },
  14421. {
  14422. "name": "location",
  14423. "in": "query",
  14424. "schema": {
  14425. "type": "object",
  14426. "properties": {
  14427. "directory": {
  14428. "type": "string"
  14429. },
  14430. "workspace": {
  14431. "type": "string"
  14432. }
  14433. },
  14434. "additionalProperties": false
  14435. },
  14436. "required": false,
  14437. "style": "deepObject",
  14438. "explode": true
  14439. }
  14440. ],
  14441. "responses": {
  14442. "204": {
  14443. "description": "<No Content>"
  14444. },
  14445. "400": {
  14446. "description": "ProjectCopyError | InvalidRequestError",
  14447. "content": {
  14448. "application/json": {
  14449. "schema": {
  14450. "anyOf": [
  14451. {
  14452. "$ref": "#/components/schemas/ProjectCopyError"
  14453. },
  14454. {
  14455. "$ref": "#/components/schemas/InvalidRequestError"
  14456. }
  14457. ]
  14458. }
  14459. }
  14460. }
  14461. }
  14462. },
  14463. "requestBody": {
  14464. "content": {
  14465. "application/json": {
  14466. "schema": {
  14467. "type": "object",
  14468. "properties": {
  14469. "directory": {
  14470. "type": "string"
  14471. },
  14472. "force": {
  14473. "type": "boolean"
  14474. }
  14475. },
  14476. "required": ["directory", "force"],
  14477. "additionalProperties": false
  14478. }
  14479. }
  14480. }
  14481. },
  14482. "x-codeSamples": [
  14483. {
  14484. "lang": "js",
  14485. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.remove({\n ...\n})"
  14486. }
  14487. ]
  14488. }
  14489. },
  14490. "/experimental/project/{projectID}/copy/refresh": {
  14491. "post": {
  14492. "tags": ["projectCopy"],
  14493. "operationId": "v2.projectCopy.refresh",
  14494. "parameters": [
  14495. {
  14496. "name": "projectID",
  14497. "in": "path",
  14498. "schema": {
  14499. "type": "string"
  14500. },
  14501. "required": true
  14502. },
  14503. {
  14504. "name": "location",
  14505. "in": "query",
  14506. "schema": {
  14507. "type": "object",
  14508. "properties": {
  14509. "directory": {
  14510. "type": "string"
  14511. },
  14512. "workspace": {
  14513. "type": "string"
  14514. }
  14515. },
  14516. "additionalProperties": false
  14517. },
  14518. "required": false,
  14519. "style": "deepObject",
  14520. "explode": true
  14521. }
  14522. ],
  14523. "responses": {
  14524. "204": {
  14525. "description": "<No Content>"
  14526. },
  14527. "400": {
  14528. "description": "ProjectCopyError | InvalidRequestError",
  14529. "content": {
  14530. "application/json": {
  14531. "schema": {
  14532. "anyOf": [
  14533. {
  14534. "$ref": "#/components/schemas/ProjectCopyError"
  14535. },
  14536. {
  14537. "$ref": "#/components/schemas/InvalidRequestError"
  14538. }
  14539. ]
  14540. }
  14541. }
  14542. }
  14543. }
  14544. },
  14545. "x-codeSamples": [
  14546. {
  14547. "lang": "js",
  14548. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.refresh({\n ...\n})"
  14549. }
  14550. ]
  14551. }
  14552. },
  14553. "/pty/{ptyID}/connect": {
  14554. "get": {
  14555. "tags": ["pty"],
  14556. "operationId": "pty.connect",
  14557. "parameters": [
  14558. {
  14559. "name": "ptyID",
  14560. "in": "path",
  14561. "schema": {
  14562. "type": "string",
  14563. "pattern": "^pty"
  14564. },
  14565. "required": true
  14566. },
  14567. {
  14568. "in": "query",
  14569. "name": "directory",
  14570. "schema": {
  14571. "type": "string"
  14572. }
  14573. },
  14574. {
  14575. "in": "query",
  14576. "name": "workspace",
  14577. "schema": {
  14578. "type": "string"
  14579. }
  14580. },
  14581. {
  14582. "in": "query",
  14583. "name": "cursor",
  14584. "schema": {
  14585. "type": "string"
  14586. }
  14587. },
  14588. {
  14589. "in": "query",
  14590. "name": "ticket",
  14591. "schema": {
  14592. "type": "string"
  14593. }
  14594. }
  14595. ],
  14596. "responses": {
  14597. "200": {
  14598. "description": "Connected session",
  14599. "content": {
  14600. "application/json": {
  14601. "schema": {
  14602. "type": "boolean",
  14603. "description": "Connected session"
  14604. }
  14605. }
  14606. }
  14607. },
  14608. "403": {
  14609. "description": "Forbidden",
  14610. "content": {
  14611. "application/json": {
  14612. "schema": {
  14613. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  14614. }
  14615. }
  14616. }
  14617. },
  14618. "404": {
  14619. "description": "Not found",
  14620. "content": {
  14621. "application/json": {
  14622. "schema": {
  14623. "$ref": "#/components/schemas/NotFoundError"
  14624. }
  14625. }
  14626. }
  14627. }
  14628. },
  14629. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  14630. "summary": "Connect to PTY session",
  14631. "x-codeSamples": [
  14632. {
  14633. "lang": "js",
  14634. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  14635. }
  14636. ]
  14637. }
  14638. }
  14639. },
  14640. "components": {
  14641. "schemas": {
  14642. "Event": {
  14643. "anyOf": [
  14644. {
  14645. "$ref": "#/components/schemas/EventModels-devRefreshed"
  14646. },
  14647. {
  14648. "$ref": "#/components/schemas/EventIntegrationUpdated"
  14649. },
  14650. {
  14651. "$ref": "#/components/schemas/EventIntegrationConnectionUpdated"
  14652. },
  14653. {
  14654. "$ref": "#/components/schemas/EventCatalogUpdated"
  14655. },
  14656. {
  14657. "$ref": "#/components/schemas/EventSessionCreated"
  14658. },
  14659. {
  14660. "$ref": "#/components/schemas/EventSessionUpdated"
  14661. },
  14662. {
  14663. "$ref": "#/components/schemas/EventSessionDeleted"
  14664. },
  14665. {
  14666. "$ref": "#/components/schemas/EventMessageUpdated"
  14667. },
  14668. {
  14669. "$ref": "#/components/schemas/EventMessageRemoved"
  14670. },
  14671. {
  14672. "$ref": "#/components/schemas/EventMessagePartUpdated"
  14673. },
  14674. {
  14675. "$ref": "#/components/schemas/EventMessagePartRemoved"
  14676. },
  14677. {
  14678. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  14679. },
  14680. {
  14681. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  14682. },
  14683. {
  14684. "$ref": "#/components/schemas/EventSessionNextMoved"
  14685. },
  14686. {
  14687. "$ref": "#/components/schemas/EventSessionNextPrompted"
  14688. },
  14689. {
  14690. "$ref": "#/components/schemas/EventSessionNextPromptAdmitted"
  14691. },
  14692. {
  14693. "$ref": "#/components/schemas/EventSessionNextContextUpdated"
  14694. },
  14695. {
  14696. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  14697. },
  14698. {
  14699. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  14700. },
  14701. {
  14702. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  14703. },
  14704. {
  14705. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  14706. },
  14707. {
  14708. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  14709. },
  14710. {
  14711. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  14712. },
  14713. {
  14714. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  14715. },
  14716. {
  14717. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  14718. },
  14719. {
  14720. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  14721. },
  14722. {
  14723. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  14724. },
  14725. {
  14726. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  14727. },
  14728. {
  14729. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  14730. },
  14731. {
  14732. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  14733. },
  14734. {
  14735. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  14736. },
  14737. {
  14738. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  14739. },
  14740. {
  14741. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  14742. },
  14743. {
  14744. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  14745. },
  14746. {
  14747. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  14748. },
  14749. {
  14750. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  14751. },
  14752. {
  14753. "$ref": "#/components/schemas/EventSessionNextRetried"
  14754. },
  14755. {
  14756. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  14757. },
  14758. {
  14759. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  14760. },
  14761. {
  14762. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  14763. },
  14764. {
  14765. "$ref": "#/components/schemas/EventMessagePartDelta"
  14766. },
  14767. {
  14768. "$ref": "#/components/schemas/EventSessionDiff"
  14769. },
  14770. {
  14771. "$ref": "#/components/schemas/EventSessionError"
  14772. },
  14773. {
  14774. "$ref": "#/components/schemas/EventInstallationUpdated"
  14775. },
  14776. {
  14777. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  14778. },
  14779. {
  14780. "$ref": "#/components/schemas/EventFileEdited"
  14781. },
  14782. {
  14783. "$ref": "#/components/schemas/EventReferenceUpdated"
  14784. },
  14785. {
  14786. "$ref": "#/components/schemas/EventPermissionV2Asked"
  14787. },
  14788. {
  14789. "$ref": "#/components/schemas/EventPermissionV2Replied"
  14790. },
  14791. {
  14792. "$ref": "#/components/schemas/EventPluginAdded"
  14793. },
  14794. {
  14795. "$ref": "#/components/schemas/EventProjectDirectoriesUpdated"
  14796. },
  14797. {
  14798. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  14799. },
  14800. {
  14801. "$ref": "#/components/schemas/EventPtyCreated"
  14802. },
  14803. {
  14804. "$ref": "#/components/schemas/EventPtyUpdated"
  14805. },
  14806. {
  14807. "$ref": "#/components/schemas/EventPtyExited"
  14808. },
  14809. {
  14810. "$ref": "#/components/schemas/EventPtyDeleted"
  14811. },
  14812. {
  14813. "$ref": "#/components/schemas/EventQuestionV2Asked"
  14814. },
  14815. {
  14816. "$ref": "#/components/schemas/EventQuestionV2Replied"
  14817. },
  14818. {
  14819. "$ref": "#/components/schemas/EventQuestionV2Rejected"
  14820. },
  14821. {
  14822. "$ref": "#/components/schemas/EventTodoUpdated"
  14823. },
  14824. {
  14825. "$ref": "#/components/schemas/EventLspUpdated"
  14826. },
  14827. {
  14828. "$ref": "#/components/schemas/EventPermissionAsked"
  14829. },
  14830. {
  14831. "$ref": "#/components/schemas/EventPermissionReplied"
  14832. },
  14833. {
  14834. "$ref": "#/components/schemas/Event.tui.prompt.append"
  14835. },
  14836. {
  14837. "$ref": "#/components/schemas/Event.tui.command.execute"
  14838. },
  14839. {
  14840. "$ref": "#/components/schemas/Event.tui.toast.show"
  14841. },
  14842. {
  14843. "$ref": "#/components/schemas/Event.tui.session.select"
  14844. },
  14845. {
  14846. "$ref": "#/components/schemas/EventMcpToolsChanged"
  14847. },
  14848. {
  14849. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  14850. },
  14851. {
  14852. "$ref": "#/components/schemas/EventCommandExecuted"
  14853. },
  14854. {
  14855. "$ref": "#/components/schemas/EventProjectUpdated"
  14856. },
  14857. {
  14858. "$ref": "#/components/schemas/EventSessionStatus"
  14859. },
  14860. {
  14861. "$ref": "#/components/schemas/EventSessionIdle"
  14862. },
  14863. {
  14864. "$ref": "#/components/schemas/EventQuestionAsked"
  14865. },
  14866. {
  14867. "$ref": "#/components/schemas/EventQuestionReplied"
  14868. },
  14869. {
  14870. "$ref": "#/components/schemas/EventQuestionRejected"
  14871. },
  14872. {
  14873. "$ref": "#/components/schemas/EventSessionCompacted"
  14874. },
  14875. {
  14876. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  14877. },
  14878. {
  14879. "$ref": "#/components/schemas/EventWorkspaceReady"
  14880. },
  14881. {
  14882. "$ref": "#/components/schemas/EventWorkspaceFailed"
  14883. },
  14884. {
  14885. "$ref": "#/components/schemas/EventWorkspaceStatus"
  14886. },
  14887. {
  14888. "$ref": "#/components/schemas/EventWorktreeReady"
  14889. },
  14890. {
  14891. "$ref": "#/components/schemas/EventWorktreeFailed"
  14892. },
  14893. {
  14894. "$ref": "#/components/schemas/EventServerConnected"
  14895. },
  14896. {
  14897. "$ref": "#/components/schemas/EventGlobalDisposed"
  14898. },
  14899. {
  14900. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  14901. }
  14902. ]
  14903. },
  14904. "QuestionReplied": {
  14905. "type": "object",
  14906. "properties": {
  14907. "sessionID": {
  14908. "type": "string",
  14909. "pattern": "^ses"
  14910. },
  14911. "requestID": {
  14912. "type": "string",
  14913. "pattern": "^que"
  14914. },
  14915. "answers": {
  14916. "type": "array",
  14917. "items": {
  14918. "$ref": "#/components/schemas/QuestionAnswer"
  14919. }
  14920. }
  14921. },
  14922. "required": ["sessionID", "requestID", "answers"],
  14923. "additionalProperties": false
  14924. },
  14925. "QuestionRejected": {
  14926. "type": "object",
  14927. "properties": {
  14928. "sessionID": {
  14929. "type": "string",
  14930. "pattern": "^ses"
  14931. },
  14932. "requestID": {
  14933. "type": "string",
  14934. "pattern": "^que"
  14935. }
  14936. },
  14937. "required": ["sessionID", "requestID"],
  14938. "additionalProperties": false
  14939. },
  14940. "OAuth": {
  14941. "type": "object",
  14942. "properties": {
  14943. "type": {
  14944. "type": "string",
  14945. "enum": ["oauth"]
  14946. },
  14947. "refresh": {
  14948. "type": "string"
  14949. },
  14950. "access": {
  14951. "type": "string"
  14952. },
  14953. "expires": {
  14954. "type": "integer",
  14955. "minimum": 0
  14956. },
  14957. "accountId": {
  14958. "type": "string"
  14959. },
  14960. "enterpriseUrl": {
  14961. "type": "string"
  14962. }
  14963. },
  14964. "required": ["type", "refresh", "access", "expires"],
  14965. "additionalProperties": false
  14966. },
  14967. "ApiAuth": {
  14968. "type": "object",
  14969. "properties": {
  14970. "type": {
  14971. "type": "string",
  14972. "enum": ["api"]
  14973. },
  14974. "key": {
  14975. "type": "string"
  14976. },
  14977. "metadata": {
  14978. "type": "object",
  14979. "additionalProperties": {
  14980. "type": "string"
  14981. }
  14982. }
  14983. },
  14984. "required": ["type", "key"],
  14985. "additionalProperties": false
  14986. },
  14987. "WellKnownAuth": {
  14988. "type": "object",
  14989. "properties": {
  14990. "type": {
  14991. "type": "string",
  14992. "enum": ["wellknown"]
  14993. },
  14994. "key": {
  14995. "type": "string"
  14996. },
  14997. "token": {
  14998. "type": "string"
  14999. }
  15000. },
  15001. "required": ["type", "key", "token"],
  15002. "additionalProperties": false
  15003. },
  15004. "Auth": {
  15005. "anyOf": [
  15006. {
  15007. "$ref": "#/components/schemas/OAuth"
  15008. },
  15009. {
  15010. "$ref": "#/components/schemas/ApiAuth"
  15011. },
  15012. {
  15013. "$ref": "#/components/schemas/WellKnownAuth"
  15014. }
  15015. ]
  15016. },
  15017. "effect_HttpApiError_BadRequest": {
  15018. "type": "object",
  15019. "properties": {
  15020. "_tag": {
  15021. "type": "string",
  15022. "enum": ["BadRequest"]
  15023. }
  15024. },
  15025. "required": ["_tag"],
  15026. "additionalProperties": false
  15027. },
  15028. "InvalidRequestError": {
  15029. "type": "object",
  15030. "properties": {
  15031. "_tag": {
  15032. "type": "string",
  15033. "enum": ["InvalidRequestError"]
  15034. },
  15035. "message": {
  15036. "type": "string"
  15037. },
  15038. "kind": {
  15039. "type": "string"
  15040. },
  15041. "field": {
  15042. "type": "string"
  15043. }
  15044. },
  15045. "required": ["_tag", "message"],
  15046. "additionalProperties": false
  15047. },
  15048. "MoveSessionError": {
  15049. "type": "object",
  15050. "properties": {
  15051. "name": {
  15052. "type": "string",
  15053. "enum": ["MoveSessionError"]
  15054. },
  15055. "data": {
  15056. "type": "object",
  15057. "properties": {
  15058. "message": {
  15059. "type": "string"
  15060. }
  15061. },
  15062. "required": ["message"],
  15063. "additionalProperties": false
  15064. }
  15065. },
  15066. "required": ["name", "data"],
  15067. "additionalProperties": false
  15068. },
  15069. "SnapshotFileDiff": {
  15070. "type": "object",
  15071. "properties": {
  15072. "file": {
  15073. "type": "string"
  15074. },
  15075. "patch": {
  15076. "type": "string"
  15077. },
  15078. "additions": {
  15079. "type": "number"
  15080. },
  15081. "deletions": {
  15082. "type": "number"
  15083. },
  15084. "status": {
  15085. "type": "string",
  15086. "enum": ["added", "deleted", "modified"]
  15087. }
  15088. },
  15089. "required": ["additions", "deletions"],
  15090. "additionalProperties": false
  15091. },
  15092. "PermissionAction": {
  15093. "type": "string",
  15094. "enum": ["allow", "deny", "ask"]
  15095. },
  15096. "PermissionRule": {
  15097. "type": "object",
  15098. "properties": {
  15099. "permission": {
  15100. "type": "string"
  15101. },
  15102. "pattern": {
  15103. "type": "string"
  15104. },
  15105. "action": {
  15106. "$ref": "#/components/schemas/PermissionAction"
  15107. }
  15108. },
  15109. "required": ["permission", "pattern", "action"],
  15110. "additionalProperties": false
  15111. },
  15112. "PermissionRuleset": {
  15113. "type": "array",
  15114. "items": {
  15115. "$ref": "#/components/schemas/PermissionRule"
  15116. }
  15117. },
  15118. "Session": {
  15119. "type": "object",
  15120. "properties": {
  15121. "id": {
  15122. "type": "string",
  15123. "pattern": "^ses"
  15124. },
  15125. "slug": {
  15126. "type": "string"
  15127. },
  15128. "projectID": {
  15129. "type": "string"
  15130. },
  15131. "workspaceID": {
  15132. "type": "string",
  15133. "pattern": "^wrk"
  15134. },
  15135. "directory": {
  15136. "type": "string"
  15137. },
  15138. "path": {
  15139. "type": "string"
  15140. },
  15141. "parentID": {
  15142. "type": "string",
  15143. "pattern": "^ses"
  15144. },
  15145. "summary": {
  15146. "type": "object",
  15147. "properties": {
  15148. "additions": {
  15149. "type": "number"
  15150. },
  15151. "deletions": {
  15152. "type": "number"
  15153. },
  15154. "files": {
  15155. "type": "number"
  15156. },
  15157. "diffs": {
  15158. "type": "array",
  15159. "items": {
  15160. "$ref": "#/components/schemas/SnapshotFileDiff"
  15161. }
  15162. }
  15163. },
  15164. "required": ["additions", "deletions", "files"],
  15165. "additionalProperties": false
  15166. },
  15167. "cost": {
  15168. "type": "number"
  15169. },
  15170. "tokens": {
  15171. "type": "object",
  15172. "properties": {
  15173. "input": {
  15174. "type": "number"
  15175. },
  15176. "output": {
  15177. "type": "number"
  15178. },
  15179. "reasoning": {
  15180. "type": "number"
  15181. },
  15182. "cache": {
  15183. "type": "object",
  15184. "properties": {
  15185. "read": {
  15186. "type": "number"
  15187. },
  15188. "write": {
  15189. "type": "number"
  15190. }
  15191. },
  15192. "required": ["read", "write"],
  15193. "additionalProperties": false
  15194. }
  15195. },
  15196. "required": ["input", "output", "reasoning", "cache"],
  15197. "additionalProperties": false
  15198. },
  15199. "share": {
  15200. "type": "object",
  15201. "properties": {
  15202. "url": {
  15203. "type": "string"
  15204. }
  15205. },
  15206. "required": ["url"],
  15207. "additionalProperties": false
  15208. },
  15209. "title": {
  15210. "type": "string"
  15211. },
  15212. "agent": {
  15213. "type": "string"
  15214. },
  15215. "model": {
  15216. "type": "object",
  15217. "properties": {
  15218. "id": {
  15219. "type": "string"
  15220. },
  15221. "providerID": {
  15222. "type": "string"
  15223. },
  15224. "variant": {
  15225. "type": "string"
  15226. }
  15227. },
  15228. "required": ["id", "providerID"],
  15229. "additionalProperties": false
  15230. },
  15231. "version": {
  15232. "type": "string"
  15233. },
  15234. "metadata": {
  15235. "type": "object"
  15236. },
  15237. "time": {
  15238. "type": "object",
  15239. "properties": {
  15240. "created": {
  15241. "type": "integer",
  15242. "minimum": 0
  15243. },
  15244. "updated": {
  15245. "type": "integer",
  15246. "minimum": 0
  15247. },
  15248. "compacting": {
  15249. "type": "integer",
  15250. "minimum": 0
  15251. },
  15252. "archived": {
  15253. "type": "number"
  15254. }
  15255. },
  15256. "required": ["created", "updated"],
  15257. "additionalProperties": false
  15258. },
  15259. "permission": {
  15260. "$ref": "#/components/schemas/PermissionRuleset"
  15261. },
  15262. "revert": {
  15263. "type": "object",
  15264. "properties": {
  15265. "messageID": {
  15266. "type": "string",
  15267. "pattern": "^msg"
  15268. },
  15269. "partID": {
  15270. "type": "string",
  15271. "pattern": "^prt"
  15272. },
  15273. "snapshot": {
  15274. "type": "string"
  15275. },
  15276. "diff": {
  15277. "type": "string"
  15278. }
  15279. },
  15280. "required": ["messageID"],
  15281. "additionalProperties": false
  15282. }
  15283. },
  15284. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  15285. "additionalProperties": false
  15286. },
  15287. "OutputFormatText": {
  15288. "type": "object",
  15289. "properties": {
  15290. "type": {
  15291. "type": "string",
  15292. "enum": ["text"]
  15293. }
  15294. },
  15295. "required": ["type"],
  15296. "additionalProperties": false
  15297. },
  15298. "JSONSchema": {
  15299. "type": "object"
  15300. },
  15301. "OutputFormatJsonSchema": {
  15302. "type": "object",
  15303. "properties": {
  15304. "type": {
  15305. "type": "string",
  15306. "enum": ["json_schema"]
  15307. },
  15308. "schema": {
  15309. "$ref": "#/components/schemas/JSONSchema"
  15310. },
  15311. "retryCount": {
  15312. "type": "integer",
  15313. "minimum": 0
  15314. }
  15315. },
  15316. "required": ["type", "schema"],
  15317. "additionalProperties": false
  15318. },
  15319. "OutputFormat": {
  15320. "anyOf": [
  15321. {
  15322. "$ref": "#/components/schemas/OutputFormatText"
  15323. },
  15324. {
  15325. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  15326. }
  15327. ]
  15328. },
  15329. "UserMessage": {
  15330. "type": "object",
  15331. "properties": {
  15332. "id": {
  15333. "type": "string",
  15334. "pattern": "^msg"
  15335. },
  15336. "sessionID": {
  15337. "type": "string",
  15338. "pattern": "^ses"
  15339. },
  15340. "role": {
  15341. "type": "string",
  15342. "enum": ["user"]
  15343. },
  15344. "time": {
  15345. "type": "object",
  15346. "properties": {
  15347. "created": {
  15348. "type": "number",
  15349. "minimum": 0
  15350. }
  15351. },
  15352. "required": ["created"],
  15353. "additionalProperties": false
  15354. },
  15355. "format": {
  15356. "$ref": "#/components/schemas/OutputFormat"
  15357. },
  15358. "summary": {
  15359. "type": "object",
  15360. "properties": {
  15361. "title": {
  15362. "type": "string"
  15363. },
  15364. "body": {
  15365. "type": "string"
  15366. },
  15367. "diffs": {
  15368. "type": "array",
  15369. "items": {
  15370. "$ref": "#/components/schemas/SnapshotFileDiff"
  15371. }
  15372. }
  15373. },
  15374. "required": ["diffs"],
  15375. "additionalProperties": false
  15376. },
  15377. "agent": {
  15378. "type": "string"
  15379. },
  15380. "model": {
  15381. "type": "object",
  15382. "properties": {
  15383. "providerID": {
  15384. "type": "string"
  15385. },
  15386. "modelID": {
  15387. "type": "string"
  15388. },
  15389. "variant": {
  15390. "type": "string"
  15391. }
  15392. },
  15393. "required": ["providerID", "modelID"],
  15394. "additionalProperties": false
  15395. },
  15396. "system": {
  15397. "type": "string"
  15398. },
  15399. "tools": {
  15400. "type": "object",
  15401. "additionalProperties": {
  15402. "type": "boolean"
  15403. }
  15404. }
  15405. },
  15406. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  15407. "additionalProperties": false
  15408. },
  15409. "ProviderAuthError": {
  15410. "type": "object",
  15411. "properties": {
  15412. "name": {
  15413. "type": "string",
  15414. "enum": ["ProviderAuthError"]
  15415. },
  15416. "data": {
  15417. "type": "object",
  15418. "properties": {
  15419. "providerID": {
  15420. "type": "string"
  15421. },
  15422. "message": {
  15423. "type": "string"
  15424. }
  15425. },
  15426. "required": ["providerID", "message"],
  15427. "additionalProperties": false
  15428. }
  15429. },
  15430. "required": ["name", "data"],
  15431. "additionalProperties": false
  15432. },
  15433. "UnknownError": {
  15434. "type": "object",
  15435. "properties": {
  15436. "name": {
  15437. "type": "string",
  15438. "enum": ["UnknownError"]
  15439. },
  15440. "data": {
  15441. "type": "object",
  15442. "properties": {
  15443. "message": {
  15444. "type": "string"
  15445. },
  15446. "ref": {
  15447. "type": "string"
  15448. }
  15449. },
  15450. "required": ["message"],
  15451. "additionalProperties": false
  15452. }
  15453. },
  15454. "required": ["name", "data"],
  15455. "additionalProperties": false
  15456. },
  15457. "MessageOutputLengthError": {
  15458. "type": "object",
  15459. "properties": {
  15460. "name": {
  15461. "type": "string",
  15462. "enum": ["MessageOutputLengthError"]
  15463. },
  15464. "data": {
  15465. "type": "object",
  15466. "properties": {}
  15467. }
  15468. },
  15469. "required": ["name", "data"],
  15470. "additionalProperties": false
  15471. },
  15472. "MessageAbortedError": {
  15473. "type": "object",
  15474. "properties": {
  15475. "name": {
  15476. "type": "string",
  15477. "enum": ["MessageAbortedError"]
  15478. },
  15479. "data": {
  15480. "type": "object",
  15481. "properties": {
  15482. "message": {
  15483. "type": "string"
  15484. }
  15485. },
  15486. "required": ["message"],
  15487. "additionalProperties": false
  15488. }
  15489. },
  15490. "required": ["name", "data"],
  15491. "additionalProperties": false
  15492. },
  15493. "StructuredOutputError": {
  15494. "type": "object",
  15495. "properties": {
  15496. "name": {
  15497. "type": "string",
  15498. "enum": ["StructuredOutputError"]
  15499. },
  15500. "data": {
  15501. "type": "object",
  15502. "properties": {
  15503. "message": {
  15504. "type": "string"
  15505. },
  15506. "retries": {
  15507. "type": "integer",
  15508. "minimum": 0
  15509. }
  15510. },
  15511. "required": ["message", "retries"],
  15512. "additionalProperties": false
  15513. }
  15514. },
  15515. "required": ["name", "data"],
  15516. "additionalProperties": false
  15517. },
  15518. "ContextOverflowError": {
  15519. "type": "object",
  15520. "properties": {
  15521. "name": {
  15522. "type": "string",
  15523. "enum": ["ContextOverflowError"]
  15524. },
  15525. "data": {
  15526. "type": "object",
  15527. "properties": {
  15528. "message": {
  15529. "type": "string"
  15530. },
  15531. "responseBody": {
  15532. "type": "string"
  15533. }
  15534. },
  15535. "required": ["message"],
  15536. "additionalProperties": false
  15537. }
  15538. },
  15539. "required": ["name", "data"],
  15540. "additionalProperties": false
  15541. },
  15542. "ContentFilterError": {
  15543. "type": "object",
  15544. "properties": {
  15545. "name": {
  15546. "type": "string",
  15547. "enum": ["ContentFilterError"]
  15548. },
  15549. "data": {
  15550. "type": "object",
  15551. "properties": {
  15552. "message": {
  15553. "type": "string"
  15554. }
  15555. },
  15556. "required": ["message"],
  15557. "additionalProperties": false
  15558. }
  15559. },
  15560. "required": ["name", "data"],
  15561. "additionalProperties": false
  15562. },
  15563. "APIError": {
  15564. "type": "object",
  15565. "properties": {
  15566. "name": {
  15567. "type": "string",
  15568. "enum": ["APIError"]
  15569. },
  15570. "data": {
  15571. "type": "object",
  15572. "properties": {
  15573. "message": {
  15574. "type": "string"
  15575. },
  15576. "statusCode": {
  15577. "type": "integer",
  15578. "minimum": 0
  15579. },
  15580. "isRetryable": {
  15581. "type": "boolean"
  15582. },
  15583. "responseHeaders": {
  15584. "type": "object",
  15585. "additionalProperties": {
  15586. "type": "string"
  15587. }
  15588. },
  15589. "responseBody": {
  15590. "type": "string"
  15591. },
  15592. "metadata": {
  15593. "type": "object",
  15594. "additionalProperties": {
  15595. "type": "string"
  15596. }
  15597. }
  15598. },
  15599. "required": ["message", "isRetryable"],
  15600. "additionalProperties": false
  15601. }
  15602. },
  15603. "required": ["name", "data"],
  15604. "additionalProperties": false
  15605. },
  15606. "AssistantMessage": {
  15607. "type": "object",
  15608. "properties": {
  15609. "id": {
  15610. "type": "string",
  15611. "pattern": "^msg"
  15612. },
  15613. "sessionID": {
  15614. "type": "string",
  15615. "pattern": "^ses"
  15616. },
  15617. "role": {
  15618. "type": "string",
  15619. "enum": ["assistant"]
  15620. },
  15621. "time": {
  15622. "type": "object",
  15623. "properties": {
  15624. "created": {
  15625. "type": "integer",
  15626. "minimum": 0
  15627. },
  15628. "completed": {
  15629. "type": "integer",
  15630. "minimum": 0
  15631. }
  15632. },
  15633. "required": ["created"],
  15634. "additionalProperties": false
  15635. },
  15636. "error": {
  15637. "anyOf": [
  15638. {
  15639. "$ref": "#/components/schemas/ProviderAuthError"
  15640. },
  15641. {
  15642. "$ref": "#/components/schemas/UnknownError"
  15643. },
  15644. {
  15645. "$ref": "#/components/schemas/MessageOutputLengthError"
  15646. },
  15647. {
  15648. "$ref": "#/components/schemas/MessageAbortedError"
  15649. },
  15650. {
  15651. "$ref": "#/components/schemas/StructuredOutputError"
  15652. },
  15653. {
  15654. "$ref": "#/components/schemas/ContextOverflowError"
  15655. },
  15656. {
  15657. "$ref": "#/components/schemas/ContentFilterError"
  15658. },
  15659. {
  15660. "$ref": "#/components/schemas/APIError"
  15661. }
  15662. ]
  15663. },
  15664. "parentID": {
  15665. "type": "string",
  15666. "pattern": "^msg"
  15667. },
  15668. "modelID": {
  15669. "type": "string"
  15670. },
  15671. "providerID": {
  15672. "type": "string"
  15673. },
  15674. "mode": {
  15675. "type": "string"
  15676. },
  15677. "agent": {
  15678. "type": "string"
  15679. },
  15680. "path": {
  15681. "type": "object",
  15682. "properties": {
  15683. "cwd": {
  15684. "type": "string"
  15685. },
  15686. "root": {
  15687. "type": "string"
  15688. }
  15689. },
  15690. "required": ["cwd", "root"],
  15691. "additionalProperties": false
  15692. },
  15693. "summary": {
  15694. "type": "boolean"
  15695. },
  15696. "cost": {
  15697. "type": "number"
  15698. },
  15699. "tokens": {
  15700. "type": "object",
  15701. "properties": {
  15702. "total": {
  15703. "type": "number"
  15704. },
  15705. "input": {
  15706. "type": "number"
  15707. },
  15708. "output": {
  15709. "type": "number"
  15710. },
  15711. "reasoning": {
  15712. "type": "number"
  15713. },
  15714. "cache": {
  15715. "type": "object",
  15716. "properties": {
  15717. "read": {
  15718. "type": "number"
  15719. },
  15720. "write": {
  15721. "type": "number"
  15722. }
  15723. },
  15724. "required": ["read", "write"],
  15725. "additionalProperties": false
  15726. }
  15727. },
  15728. "required": ["input", "output", "reasoning", "cache"],
  15729. "additionalProperties": false
  15730. },
  15731. "structured": {},
  15732. "variant": {
  15733. "type": "string"
  15734. },
  15735. "finish": {
  15736. "type": "string"
  15737. }
  15738. },
  15739. "required": [
  15740. "id",
  15741. "sessionID",
  15742. "role",
  15743. "time",
  15744. "parentID",
  15745. "modelID",
  15746. "providerID",
  15747. "mode",
  15748. "agent",
  15749. "path",
  15750. "cost",
  15751. "tokens"
  15752. ],
  15753. "additionalProperties": false
  15754. },
  15755. "Message": {
  15756. "anyOf": [
  15757. {
  15758. "$ref": "#/components/schemas/UserMessage"
  15759. },
  15760. {
  15761. "$ref": "#/components/schemas/AssistantMessage"
  15762. }
  15763. ]
  15764. },
  15765. "TextPart": {
  15766. "type": "object",
  15767. "properties": {
  15768. "id": {
  15769. "type": "string",
  15770. "pattern": "^prt"
  15771. },
  15772. "sessionID": {
  15773. "type": "string",
  15774. "pattern": "^ses"
  15775. },
  15776. "messageID": {
  15777. "type": "string",
  15778. "pattern": "^msg"
  15779. },
  15780. "type": {
  15781. "type": "string",
  15782. "enum": ["text"]
  15783. },
  15784. "text": {
  15785. "type": "string"
  15786. },
  15787. "synthetic": {
  15788. "type": "boolean"
  15789. },
  15790. "ignored": {
  15791. "type": "boolean"
  15792. },
  15793. "time": {
  15794. "type": "object",
  15795. "properties": {
  15796. "start": {
  15797. "type": "integer",
  15798. "minimum": 0
  15799. },
  15800. "end": {
  15801. "type": "integer",
  15802. "minimum": 0
  15803. }
  15804. },
  15805. "required": ["start"],
  15806. "additionalProperties": false
  15807. },
  15808. "metadata": {
  15809. "type": "object"
  15810. }
  15811. },
  15812. "required": ["id", "sessionID", "messageID", "type", "text"],
  15813. "additionalProperties": false
  15814. },
  15815. "SubtaskPart": {
  15816. "type": "object",
  15817. "properties": {
  15818. "id": {
  15819. "type": "string",
  15820. "pattern": "^prt"
  15821. },
  15822. "sessionID": {
  15823. "type": "string",
  15824. "pattern": "^ses"
  15825. },
  15826. "messageID": {
  15827. "type": "string",
  15828. "pattern": "^msg"
  15829. },
  15830. "type": {
  15831. "type": "string",
  15832. "enum": ["subtask"]
  15833. },
  15834. "prompt": {
  15835. "type": "string"
  15836. },
  15837. "description": {
  15838. "type": "string"
  15839. },
  15840. "agent": {
  15841. "type": "string"
  15842. },
  15843. "model": {
  15844. "type": "object",
  15845. "properties": {
  15846. "providerID": {
  15847. "type": "string"
  15848. },
  15849. "modelID": {
  15850. "type": "string"
  15851. }
  15852. },
  15853. "required": ["providerID", "modelID"],
  15854. "additionalProperties": false
  15855. },
  15856. "command": {
  15857. "type": "string"
  15858. }
  15859. },
  15860. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  15861. "additionalProperties": false
  15862. },
  15863. "ReasoningPart": {
  15864. "type": "object",
  15865. "properties": {
  15866. "id": {
  15867. "type": "string",
  15868. "pattern": "^prt"
  15869. },
  15870. "sessionID": {
  15871. "type": "string",
  15872. "pattern": "^ses"
  15873. },
  15874. "messageID": {
  15875. "type": "string",
  15876. "pattern": "^msg"
  15877. },
  15878. "type": {
  15879. "type": "string",
  15880. "enum": ["reasoning"]
  15881. },
  15882. "text": {
  15883. "type": "string"
  15884. },
  15885. "metadata": {
  15886. "type": "object"
  15887. },
  15888. "time": {
  15889. "type": "object",
  15890. "properties": {
  15891. "start": {
  15892. "type": "integer",
  15893. "minimum": 0
  15894. },
  15895. "end": {
  15896. "type": "integer",
  15897. "minimum": 0
  15898. }
  15899. },
  15900. "required": ["start"],
  15901. "additionalProperties": false
  15902. }
  15903. },
  15904. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  15905. "additionalProperties": false
  15906. },
  15907. "FilePartSourceText": {
  15908. "type": "object",
  15909. "properties": {
  15910. "value": {
  15911. "type": "string"
  15912. },
  15913. "start": {
  15914. "type": "number"
  15915. },
  15916. "end": {
  15917. "type": "number"
  15918. }
  15919. },
  15920. "required": ["value", "start", "end"],
  15921. "additionalProperties": false
  15922. },
  15923. "FileSource": {
  15924. "type": "object",
  15925. "properties": {
  15926. "text": {
  15927. "$ref": "#/components/schemas/FilePartSourceText"
  15928. },
  15929. "type": {
  15930. "type": "string",
  15931. "enum": ["file"]
  15932. },
  15933. "path": {
  15934. "type": "string"
  15935. }
  15936. },
  15937. "required": ["text", "type", "path"],
  15938. "additionalProperties": false
  15939. },
  15940. "Range": {
  15941. "type": "object",
  15942. "properties": {
  15943. "start": {
  15944. "type": "object",
  15945. "properties": {
  15946. "line": {
  15947. "type": "integer",
  15948. "minimum": 0
  15949. },
  15950. "character": {
  15951. "type": "integer",
  15952. "minimum": 0
  15953. }
  15954. },
  15955. "required": ["line", "character"],
  15956. "additionalProperties": false
  15957. },
  15958. "end": {
  15959. "type": "object",
  15960. "properties": {
  15961. "line": {
  15962. "type": "integer",
  15963. "minimum": 0
  15964. },
  15965. "character": {
  15966. "type": "integer",
  15967. "minimum": 0
  15968. }
  15969. },
  15970. "required": ["line", "character"],
  15971. "additionalProperties": false
  15972. }
  15973. },
  15974. "required": ["start", "end"],
  15975. "additionalProperties": false
  15976. },
  15977. "SymbolSource": {
  15978. "type": "object",
  15979. "properties": {
  15980. "text": {
  15981. "$ref": "#/components/schemas/FilePartSourceText"
  15982. },
  15983. "type": {
  15984. "type": "string",
  15985. "enum": ["symbol"]
  15986. },
  15987. "path": {
  15988. "type": "string"
  15989. },
  15990. "range": {
  15991. "$ref": "#/components/schemas/Range"
  15992. },
  15993. "name": {
  15994. "type": "string"
  15995. },
  15996. "kind": {
  15997. "type": "integer",
  15998. "minimum": 0
  15999. }
  16000. },
  16001. "required": ["text", "type", "path", "range", "name", "kind"],
  16002. "additionalProperties": false
  16003. },
  16004. "ResourceSource": {
  16005. "type": "object",
  16006. "properties": {
  16007. "text": {
  16008. "$ref": "#/components/schemas/FilePartSourceText"
  16009. },
  16010. "type": {
  16011. "type": "string",
  16012. "enum": ["resource"]
  16013. },
  16014. "clientName": {
  16015. "type": "string"
  16016. },
  16017. "uri": {
  16018. "type": "string"
  16019. }
  16020. },
  16021. "required": ["text", "type", "clientName", "uri"],
  16022. "additionalProperties": false
  16023. },
  16024. "FilePartSource": {
  16025. "anyOf": [
  16026. {
  16027. "$ref": "#/components/schemas/FileSource"
  16028. },
  16029. {
  16030. "$ref": "#/components/schemas/SymbolSource"
  16031. },
  16032. {
  16033. "$ref": "#/components/schemas/ResourceSource"
  16034. }
  16035. ]
  16036. },
  16037. "FilePart": {
  16038. "type": "object",
  16039. "properties": {
  16040. "id": {
  16041. "type": "string",
  16042. "pattern": "^prt"
  16043. },
  16044. "sessionID": {
  16045. "type": "string",
  16046. "pattern": "^ses"
  16047. },
  16048. "messageID": {
  16049. "type": "string",
  16050. "pattern": "^msg"
  16051. },
  16052. "type": {
  16053. "type": "string",
  16054. "enum": ["file"]
  16055. },
  16056. "mime": {
  16057. "type": "string"
  16058. },
  16059. "filename": {
  16060. "type": "string"
  16061. },
  16062. "url": {
  16063. "type": "string"
  16064. },
  16065. "source": {
  16066. "$ref": "#/components/schemas/FilePartSource"
  16067. }
  16068. },
  16069. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  16070. "additionalProperties": false
  16071. },
  16072. "ToolStatePending": {
  16073. "type": "object",
  16074. "properties": {
  16075. "status": {
  16076. "type": "string",
  16077. "enum": ["pending"]
  16078. },
  16079. "input": {
  16080. "type": "object"
  16081. },
  16082. "raw": {
  16083. "type": "string"
  16084. }
  16085. },
  16086. "required": ["status", "input", "raw"],
  16087. "additionalProperties": false
  16088. },
  16089. "ToolStateRunning": {
  16090. "type": "object",
  16091. "properties": {
  16092. "status": {
  16093. "type": "string",
  16094. "enum": ["running"]
  16095. },
  16096. "input": {
  16097. "type": "object"
  16098. },
  16099. "title": {
  16100. "type": "string"
  16101. },
  16102. "metadata": {
  16103. "type": "object"
  16104. },
  16105. "time": {
  16106. "type": "object",
  16107. "properties": {
  16108. "start": {
  16109. "type": "integer",
  16110. "minimum": 0
  16111. }
  16112. },
  16113. "required": ["start"],
  16114. "additionalProperties": false
  16115. }
  16116. },
  16117. "required": ["status", "input", "time"],
  16118. "additionalProperties": false
  16119. },
  16120. "ToolStateCompleted": {
  16121. "type": "object",
  16122. "properties": {
  16123. "status": {
  16124. "type": "string",
  16125. "enum": ["completed"]
  16126. },
  16127. "input": {
  16128. "type": "object"
  16129. },
  16130. "output": {
  16131. "type": "string"
  16132. },
  16133. "title": {
  16134. "type": "string"
  16135. },
  16136. "metadata": {
  16137. "type": "object"
  16138. },
  16139. "time": {
  16140. "type": "object",
  16141. "properties": {
  16142. "start": {
  16143. "type": "integer",
  16144. "minimum": 0
  16145. },
  16146. "end": {
  16147. "type": "integer",
  16148. "minimum": 0
  16149. },
  16150. "compacted": {
  16151. "type": "integer",
  16152. "minimum": 0
  16153. }
  16154. },
  16155. "required": ["start", "end"],
  16156. "additionalProperties": false
  16157. },
  16158. "attachments": {
  16159. "type": "array",
  16160. "items": {
  16161. "$ref": "#/components/schemas/FilePart"
  16162. }
  16163. }
  16164. },
  16165. "required": ["status", "input", "output", "title", "metadata", "time"],
  16166. "additionalProperties": false
  16167. },
  16168. "ToolStateError": {
  16169. "type": "object",
  16170. "properties": {
  16171. "status": {
  16172. "type": "string",
  16173. "enum": ["error"]
  16174. },
  16175. "input": {
  16176. "type": "object"
  16177. },
  16178. "error": {
  16179. "type": "string"
  16180. },
  16181. "metadata": {
  16182. "type": "object"
  16183. },
  16184. "time": {
  16185. "type": "object",
  16186. "properties": {
  16187. "start": {
  16188. "type": "integer",
  16189. "minimum": 0
  16190. },
  16191. "end": {
  16192. "type": "integer",
  16193. "minimum": 0
  16194. }
  16195. },
  16196. "required": ["start", "end"],
  16197. "additionalProperties": false
  16198. }
  16199. },
  16200. "required": ["status", "input", "error", "time"],
  16201. "additionalProperties": false
  16202. },
  16203. "ToolState": {
  16204. "anyOf": [
  16205. {
  16206. "$ref": "#/components/schemas/ToolStatePending"
  16207. },
  16208. {
  16209. "$ref": "#/components/schemas/ToolStateRunning"
  16210. },
  16211. {
  16212. "$ref": "#/components/schemas/ToolStateCompleted"
  16213. },
  16214. {
  16215. "$ref": "#/components/schemas/ToolStateError"
  16216. }
  16217. ]
  16218. },
  16219. "ToolPart": {
  16220. "type": "object",
  16221. "properties": {
  16222. "id": {
  16223. "type": "string",
  16224. "pattern": "^prt"
  16225. },
  16226. "sessionID": {
  16227. "type": "string",
  16228. "pattern": "^ses"
  16229. },
  16230. "messageID": {
  16231. "type": "string",
  16232. "pattern": "^msg"
  16233. },
  16234. "type": {
  16235. "type": "string",
  16236. "enum": ["tool"]
  16237. },
  16238. "callID": {
  16239. "type": "string"
  16240. },
  16241. "tool": {
  16242. "type": "string"
  16243. },
  16244. "state": {
  16245. "$ref": "#/components/schemas/ToolState"
  16246. },
  16247. "metadata": {
  16248. "type": "object"
  16249. }
  16250. },
  16251. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  16252. "additionalProperties": false
  16253. },
  16254. "StepStartPart": {
  16255. "type": "object",
  16256. "properties": {
  16257. "id": {
  16258. "type": "string",
  16259. "pattern": "^prt"
  16260. },
  16261. "sessionID": {
  16262. "type": "string",
  16263. "pattern": "^ses"
  16264. },
  16265. "messageID": {
  16266. "type": "string",
  16267. "pattern": "^msg"
  16268. },
  16269. "type": {
  16270. "type": "string",
  16271. "enum": ["step-start"]
  16272. },
  16273. "snapshot": {
  16274. "type": "string"
  16275. }
  16276. },
  16277. "required": ["id", "sessionID", "messageID", "type"],
  16278. "additionalProperties": false
  16279. },
  16280. "StepFinishPart": {
  16281. "type": "object",
  16282. "properties": {
  16283. "id": {
  16284. "type": "string",
  16285. "pattern": "^prt"
  16286. },
  16287. "sessionID": {
  16288. "type": "string",
  16289. "pattern": "^ses"
  16290. },
  16291. "messageID": {
  16292. "type": "string",
  16293. "pattern": "^msg"
  16294. },
  16295. "type": {
  16296. "type": "string",
  16297. "enum": ["step-finish"]
  16298. },
  16299. "reason": {
  16300. "type": "string"
  16301. },
  16302. "snapshot": {
  16303. "type": "string"
  16304. },
  16305. "cost": {
  16306. "type": "number"
  16307. },
  16308. "tokens": {
  16309. "type": "object",
  16310. "properties": {
  16311. "total": {
  16312. "type": "number"
  16313. },
  16314. "input": {
  16315. "type": "number"
  16316. },
  16317. "output": {
  16318. "type": "number"
  16319. },
  16320. "reasoning": {
  16321. "type": "number"
  16322. },
  16323. "cache": {
  16324. "type": "object",
  16325. "properties": {
  16326. "read": {
  16327. "type": "number"
  16328. },
  16329. "write": {
  16330. "type": "number"
  16331. }
  16332. },
  16333. "required": ["read", "write"],
  16334. "additionalProperties": false
  16335. }
  16336. },
  16337. "required": ["input", "output", "reasoning", "cache"],
  16338. "additionalProperties": false
  16339. }
  16340. },
  16341. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  16342. "additionalProperties": false
  16343. },
  16344. "SnapshotPart": {
  16345. "type": "object",
  16346. "properties": {
  16347. "id": {
  16348. "type": "string",
  16349. "pattern": "^prt"
  16350. },
  16351. "sessionID": {
  16352. "type": "string",
  16353. "pattern": "^ses"
  16354. },
  16355. "messageID": {
  16356. "type": "string",
  16357. "pattern": "^msg"
  16358. },
  16359. "type": {
  16360. "type": "string",
  16361. "enum": ["snapshot"]
  16362. },
  16363. "snapshot": {
  16364. "type": "string"
  16365. }
  16366. },
  16367. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  16368. "additionalProperties": false
  16369. },
  16370. "PatchPart": {
  16371. "type": "object",
  16372. "properties": {
  16373. "id": {
  16374. "type": "string",
  16375. "pattern": "^prt"
  16376. },
  16377. "sessionID": {
  16378. "type": "string",
  16379. "pattern": "^ses"
  16380. },
  16381. "messageID": {
  16382. "type": "string",
  16383. "pattern": "^msg"
  16384. },
  16385. "type": {
  16386. "type": "string",
  16387. "enum": ["patch"]
  16388. },
  16389. "hash": {
  16390. "type": "string"
  16391. },
  16392. "files": {
  16393. "type": "array",
  16394. "items": {
  16395. "type": "string"
  16396. }
  16397. }
  16398. },
  16399. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  16400. "additionalProperties": false
  16401. },
  16402. "AgentPart": {
  16403. "type": "object",
  16404. "properties": {
  16405. "id": {
  16406. "type": "string",
  16407. "pattern": "^prt"
  16408. },
  16409. "sessionID": {
  16410. "type": "string",
  16411. "pattern": "^ses"
  16412. },
  16413. "messageID": {
  16414. "type": "string",
  16415. "pattern": "^msg"
  16416. },
  16417. "type": {
  16418. "type": "string",
  16419. "enum": ["agent"]
  16420. },
  16421. "name": {
  16422. "type": "string"
  16423. },
  16424. "source": {
  16425. "type": "object",
  16426. "properties": {
  16427. "value": {
  16428. "type": "string"
  16429. },
  16430. "start": {
  16431. "type": "integer",
  16432. "minimum": 0
  16433. },
  16434. "end": {
  16435. "type": "integer",
  16436. "minimum": 0
  16437. }
  16438. },
  16439. "required": ["value", "start", "end"],
  16440. "additionalProperties": false
  16441. }
  16442. },
  16443. "required": ["id", "sessionID", "messageID", "type", "name"],
  16444. "additionalProperties": false
  16445. },
  16446. "RetryPart": {
  16447. "type": "object",
  16448. "properties": {
  16449. "id": {
  16450. "type": "string",
  16451. "pattern": "^prt"
  16452. },
  16453. "sessionID": {
  16454. "type": "string",
  16455. "pattern": "^ses"
  16456. },
  16457. "messageID": {
  16458. "type": "string",
  16459. "pattern": "^msg"
  16460. },
  16461. "type": {
  16462. "type": "string",
  16463. "enum": ["retry"]
  16464. },
  16465. "attempt": {
  16466. "type": "integer",
  16467. "minimum": 0
  16468. },
  16469. "error": {
  16470. "$ref": "#/components/schemas/APIError"
  16471. },
  16472. "time": {
  16473. "type": "object",
  16474. "properties": {
  16475. "created": {
  16476. "type": "integer",
  16477. "minimum": 0
  16478. }
  16479. },
  16480. "required": ["created"],
  16481. "additionalProperties": false
  16482. }
  16483. },
  16484. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  16485. "additionalProperties": false
  16486. },
  16487. "CompactionPart": {
  16488. "type": "object",
  16489. "properties": {
  16490. "id": {
  16491. "type": "string",
  16492. "pattern": "^prt"
  16493. },
  16494. "sessionID": {
  16495. "type": "string",
  16496. "pattern": "^ses"
  16497. },
  16498. "messageID": {
  16499. "type": "string",
  16500. "pattern": "^msg"
  16501. },
  16502. "type": {
  16503. "type": "string",
  16504. "enum": ["compaction"]
  16505. },
  16506. "auto": {
  16507. "type": "boolean"
  16508. },
  16509. "overflow": {
  16510. "type": "boolean"
  16511. },
  16512. "tail_start_id": {
  16513. "type": "string",
  16514. "pattern": "^msg"
  16515. }
  16516. },
  16517. "required": ["id", "sessionID", "messageID", "type", "auto"],
  16518. "additionalProperties": false
  16519. },
  16520. "Part": {
  16521. "anyOf": [
  16522. {
  16523. "$ref": "#/components/schemas/TextPart"
  16524. },
  16525. {
  16526. "$ref": "#/components/schemas/SubtaskPart"
  16527. },
  16528. {
  16529. "$ref": "#/components/schemas/ReasoningPart"
  16530. },
  16531. {
  16532. "$ref": "#/components/schemas/FilePart"
  16533. },
  16534. {
  16535. "$ref": "#/components/schemas/ToolPart"
  16536. },
  16537. {
  16538. "$ref": "#/components/schemas/StepStartPart"
  16539. },
  16540. {
  16541. "$ref": "#/components/schemas/StepFinishPart"
  16542. },
  16543. {
  16544. "$ref": "#/components/schemas/SnapshotPart"
  16545. },
  16546. {
  16547. "$ref": "#/components/schemas/PatchPart"
  16548. },
  16549. {
  16550. "$ref": "#/components/schemas/AgentPart"
  16551. },
  16552. {
  16553. "$ref": "#/components/schemas/RetryPart"
  16554. },
  16555. {
  16556. "$ref": "#/components/schemas/CompactionPart"
  16557. }
  16558. ]
  16559. },
  16560. "Prompt": {
  16561. "type": "object",
  16562. "properties": {
  16563. "text": {
  16564. "type": "string"
  16565. },
  16566. "files": {
  16567. "type": "array",
  16568. "items": {
  16569. "$ref": "#/components/schemas/PromptFileAttachment"
  16570. }
  16571. },
  16572. "agents": {
  16573. "type": "array",
  16574. "items": {
  16575. "$ref": "#/components/schemas/PromptAgentAttachment"
  16576. }
  16577. }
  16578. },
  16579. "required": ["text"],
  16580. "additionalProperties": false
  16581. },
  16582. "Pty": {
  16583. "type": "object",
  16584. "properties": {
  16585. "id": {
  16586. "type": "string",
  16587. "pattern": "^pty"
  16588. },
  16589. "title": {
  16590. "type": "string"
  16591. },
  16592. "command": {
  16593. "type": "string"
  16594. },
  16595. "args": {
  16596. "type": "array",
  16597. "items": {
  16598. "type": "string"
  16599. }
  16600. },
  16601. "cwd": {
  16602. "type": "string"
  16603. },
  16604. "status": {
  16605. "type": "string",
  16606. "enum": ["running", "exited"]
  16607. },
  16608. "pid": {
  16609. "type": "integer",
  16610. "minimum": 0
  16611. },
  16612. "exitCode": {
  16613. "type": "integer",
  16614. "minimum": 0
  16615. }
  16616. },
  16617. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  16618. "additionalProperties": false
  16619. },
  16620. "Todo": {
  16621. "type": "object",
  16622. "properties": {
  16623. "content": {
  16624. "type": "string",
  16625. "description": "Brief description of the task"
  16626. },
  16627. "status": {
  16628. "type": "string",
  16629. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  16630. },
  16631. "priority": {
  16632. "type": "string",
  16633. "description": "Priority level of the task: high, medium, low"
  16634. }
  16635. },
  16636. "required": ["content", "status", "priority"],
  16637. "additionalProperties": false
  16638. },
  16639. "SessionStatus": {
  16640. "anyOf": [
  16641. {
  16642. "type": "object",
  16643. "properties": {
  16644. "type": {
  16645. "type": "string",
  16646. "enum": ["idle"]
  16647. }
  16648. },
  16649. "required": ["type"],
  16650. "additionalProperties": false
  16651. },
  16652. {
  16653. "type": "object",
  16654. "properties": {
  16655. "type": {
  16656. "type": "string",
  16657. "enum": ["retry"]
  16658. },
  16659. "attempt": {
  16660. "type": "integer",
  16661. "minimum": 0
  16662. },
  16663. "message": {
  16664. "type": "string"
  16665. },
  16666. "action": {
  16667. "type": "object",
  16668. "properties": {
  16669. "reason": {
  16670. "type": "string"
  16671. },
  16672. "provider": {
  16673. "type": "string"
  16674. },
  16675. "title": {
  16676. "type": "string"
  16677. },
  16678. "message": {
  16679. "type": "string"
  16680. },
  16681. "label": {
  16682. "type": "string"
  16683. },
  16684. "link": {
  16685. "type": "string"
  16686. }
  16687. },
  16688. "required": ["reason", "provider", "title", "message", "label"],
  16689. "additionalProperties": false
  16690. },
  16691. "next": {
  16692. "type": "integer",
  16693. "minimum": 0
  16694. }
  16695. },
  16696. "required": ["type", "attempt", "message", "next"],
  16697. "additionalProperties": false
  16698. },
  16699. {
  16700. "type": "object",
  16701. "properties": {
  16702. "type": {
  16703. "type": "string",
  16704. "enum": ["busy"]
  16705. }
  16706. },
  16707. "required": ["type"],
  16708. "additionalProperties": false
  16709. }
  16710. ]
  16711. },
  16712. "QuestionOption": {
  16713. "type": "object",
  16714. "properties": {
  16715. "label": {
  16716. "type": "string",
  16717. "description": "Display text (1-5 words, concise)"
  16718. },
  16719. "description": {
  16720. "type": "string",
  16721. "description": "Explanation of choice"
  16722. }
  16723. },
  16724. "required": ["label", "description"],
  16725. "additionalProperties": false
  16726. },
  16727. "QuestionInfo": {
  16728. "type": "object",
  16729. "properties": {
  16730. "question": {
  16731. "type": "string",
  16732. "description": "Complete question"
  16733. },
  16734. "header": {
  16735. "type": "string",
  16736. "description": "Very short label (max 30 chars)"
  16737. },
  16738. "options": {
  16739. "type": "array",
  16740. "items": {
  16741. "$ref": "#/components/schemas/QuestionOption"
  16742. },
  16743. "description": "Available choices"
  16744. },
  16745. "multiple": {
  16746. "type": "boolean"
  16747. },
  16748. "custom": {
  16749. "type": "boolean"
  16750. }
  16751. },
  16752. "required": ["question", "header", "options"],
  16753. "additionalProperties": false
  16754. },
  16755. "QuestionTool": {
  16756. "type": "object",
  16757. "properties": {
  16758. "messageID": {
  16759. "type": "string",
  16760. "pattern": "^msg"
  16761. },
  16762. "callID": {
  16763. "type": "string"
  16764. }
  16765. },
  16766. "required": ["messageID", "callID"],
  16767. "additionalProperties": false
  16768. },
  16769. "QuestionAnswer": {
  16770. "type": "array",
  16771. "items": {
  16772. "type": "string"
  16773. }
  16774. },
  16775. "GlobalEvent": {
  16776. "type": "object",
  16777. "properties": {
  16778. "directory": {
  16779. "type": "string"
  16780. },
  16781. "project": {
  16782. "type": "string"
  16783. },
  16784. "workspace": {
  16785. "type": "string"
  16786. },
  16787. "payload": {
  16788. "anyOf": [
  16789. {
  16790. "type": "object",
  16791. "properties": {
  16792. "id": {
  16793. "type": "string",
  16794. "pattern": "^evt_"
  16795. },
  16796. "type": {
  16797. "type": "string",
  16798. "enum": ["models-dev.refreshed"]
  16799. },
  16800. "properties": {
  16801. "type": "object",
  16802. "properties": {}
  16803. }
  16804. },
  16805. "required": ["id", "type", "properties"],
  16806. "additionalProperties": false
  16807. },
  16808. {
  16809. "type": "object",
  16810. "properties": {
  16811. "id": {
  16812. "type": "string",
  16813. "pattern": "^evt_"
  16814. },
  16815. "type": {
  16816. "type": "string",
  16817. "enum": ["integration.updated"]
  16818. },
  16819. "properties": {
  16820. "type": "object",
  16821. "properties": {}
  16822. }
  16823. },
  16824. "required": ["id", "type", "properties"],
  16825. "additionalProperties": false
  16826. },
  16827. {
  16828. "type": "object",
  16829. "properties": {
  16830. "id": {
  16831. "type": "string",
  16832. "pattern": "^evt_"
  16833. },
  16834. "type": {
  16835. "type": "string",
  16836. "enum": ["integration.connection.updated"]
  16837. },
  16838. "properties": {
  16839. "type": "object",
  16840. "properties": {
  16841. "integrationID": {
  16842. "type": "string"
  16843. }
  16844. },
  16845. "required": ["integrationID"],
  16846. "additionalProperties": false
  16847. }
  16848. },
  16849. "required": ["id", "type", "properties"],
  16850. "additionalProperties": false
  16851. },
  16852. {
  16853. "type": "object",
  16854. "properties": {
  16855. "id": {
  16856. "type": "string",
  16857. "pattern": "^evt_"
  16858. },
  16859. "type": {
  16860. "type": "string",
  16861. "enum": ["catalog.updated"]
  16862. },
  16863. "properties": {
  16864. "type": "object",
  16865. "properties": {}
  16866. }
  16867. },
  16868. "required": ["id", "type", "properties"],
  16869. "additionalProperties": false
  16870. },
  16871. {
  16872. "type": "object",
  16873. "properties": {
  16874. "id": {
  16875. "type": "string",
  16876. "pattern": "^evt_"
  16877. },
  16878. "type": {
  16879. "type": "string",
  16880. "enum": ["session.created"]
  16881. },
  16882. "properties": {
  16883. "type": "object",
  16884. "properties": {
  16885. "sessionID": {
  16886. "type": "string",
  16887. "pattern": "^ses"
  16888. },
  16889. "info": {
  16890. "$ref": "#/components/schemas/Session"
  16891. }
  16892. },
  16893. "required": ["sessionID", "info"],
  16894. "additionalProperties": false
  16895. }
  16896. },
  16897. "required": ["id", "type", "properties"],
  16898. "additionalProperties": false
  16899. },
  16900. {
  16901. "type": "object",
  16902. "properties": {
  16903. "id": {
  16904. "type": "string",
  16905. "pattern": "^evt_"
  16906. },
  16907. "type": {
  16908. "type": "string",
  16909. "enum": ["session.updated"]
  16910. },
  16911. "properties": {
  16912. "type": "object",
  16913. "properties": {
  16914. "sessionID": {
  16915. "type": "string",
  16916. "pattern": "^ses"
  16917. },
  16918. "info": {
  16919. "$ref": "#/components/schemas/Session"
  16920. }
  16921. },
  16922. "required": ["sessionID", "info"],
  16923. "additionalProperties": false
  16924. }
  16925. },
  16926. "required": ["id", "type", "properties"],
  16927. "additionalProperties": false
  16928. },
  16929. {
  16930. "type": "object",
  16931. "properties": {
  16932. "id": {
  16933. "type": "string",
  16934. "pattern": "^evt_"
  16935. },
  16936. "type": {
  16937. "type": "string",
  16938. "enum": ["session.deleted"]
  16939. },
  16940. "properties": {
  16941. "type": "object",
  16942. "properties": {
  16943. "sessionID": {
  16944. "type": "string",
  16945. "pattern": "^ses"
  16946. },
  16947. "info": {
  16948. "$ref": "#/components/schemas/Session"
  16949. }
  16950. },
  16951. "required": ["sessionID", "info"],
  16952. "additionalProperties": false
  16953. }
  16954. },
  16955. "required": ["id", "type", "properties"],
  16956. "additionalProperties": false
  16957. },
  16958. {
  16959. "type": "object",
  16960. "properties": {
  16961. "id": {
  16962. "type": "string",
  16963. "pattern": "^evt_"
  16964. },
  16965. "type": {
  16966. "type": "string",
  16967. "enum": ["message.updated"]
  16968. },
  16969. "properties": {
  16970. "type": "object",
  16971. "properties": {
  16972. "sessionID": {
  16973. "type": "string",
  16974. "pattern": "^ses"
  16975. },
  16976. "info": {
  16977. "$ref": "#/components/schemas/Message"
  16978. }
  16979. },
  16980. "required": ["sessionID", "info"],
  16981. "additionalProperties": false
  16982. }
  16983. },
  16984. "required": ["id", "type", "properties"],
  16985. "additionalProperties": false
  16986. },
  16987. {
  16988. "type": "object",
  16989. "properties": {
  16990. "id": {
  16991. "type": "string",
  16992. "pattern": "^evt_"
  16993. },
  16994. "type": {
  16995. "type": "string",
  16996. "enum": ["message.removed"]
  16997. },
  16998. "properties": {
  16999. "type": "object",
  17000. "properties": {
  17001. "sessionID": {
  17002. "type": "string",
  17003. "pattern": "^ses"
  17004. },
  17005. "messageID": {
  17006. "type": "string",
  17007. "pattern": "^msg"
  17008. }
  17009. },
  17010. "required": ["sessionID", "messageID"],
  17011. "additionalProperties": false
  17012. }
  17013. },
  17014. "required": ["id", "type", "properties"],
  17015. "additionalProperties": false
  17016. },
  17017. {
  17018. "type": "object",
  17019. "properties": {
  17020. "id": {
  17021. "type": "string",
  17022. "pattern": "^evt_"
  17023. },
  17024. "type": {
  17025. "type": "string",
  17026. "enum": ["message.part.updated"]
  17027. },
  17028. "properties": {
  17029. "type": "object",
  17030. "properties": {
  17031. "sessionID": {
  17032. "type": "string",
  17033. "pattern": "^ses"
  17034. },
  17035. "part": {
  17036. "$ref": "#/components/schemas/Part"
  17037. },
  17038. "time": {
  17039. "type": "number"
  17040. }
  17041. },
  17042. "required": ["sessionID", "part", "time"],
  17043. "additionalProperties": false
  17044. }
  17045. },
  17046. "required": ["id", "type", "properties"],
  17047. "additionalProperties": false
  17048. },
  17049. {
  17050. "type": "object",
  17051. "properties": {
  17052. "id": {
  17053. "type": "string",
  17054. "pattern": "^evt_"
  17055. },
  17056. "type": {
  17057. "type": "string",
  17058. "enum": ["message.part.removed"]
  17059. },
  17060. "properties": {
  17061. "type": "object",
  17062. "properties": {
  17063. "sessionID": {
  17064. "type": "string",
  17065. "pattern": "^ses"
  17066. },
  17067. "messageID": {
  17068. "type": "string",
  17069. "pattern": "^msg"
  17070. },
  17071. "partID": {
  17072. "type": "string",
  17073. "pattern": "^prt"
  17074. }
  17075. },
  17076. "required": ["sessionID", "messageID", "partID"],
  17077. "additionalProperties": false
  17078. }
  17079. },
  17080. "required": ["id", "type", "properties"],
  17081. "additionalProperties": false
  17082. },
  17083. {
  17084. "type": "object",
  17085. "properties": {
  17086. "id": {
  17087. "type": "string",
  17088. "pattern": "^evt_"
  17089. },
  17090. "type": {
  17091. "type": "string",
  17092. "enum": ["session.next.agent.switched"]
  17093. },
  17094. "properties": {
  17095. "type": "object",
  17096. "properties": {
  17097. "timestamp": {
  17098. "type": "number"
  17099. },
  17100. "sessionID": {
  17101. "type": "string",
  17102. "pattern": "^ses"
  17103. },
  17104. "messageID": {
  17105. "type": "string",
  17106. "pattern": "^msg_"
  17107. },
  17108. "agent": {
  17109. "type": "string"
  17110. }
  17111. },
  17112. "required": ["timestamp", "sessionID", "messageID", "agent"],
  17113. "additionalProperties": false
  17114. }
  17115. },
  17116. "required": ["id", "type", "properties"],
  17117. "additionalProperties": false
  17118. },
  17119. {
  17120. "type": "object",
  17121. "properties": {
  17122. "id": {
  17123. "type": "string",
  17124. "pattern": "^evt_"
  17125. },
  17126. "type": {
  17127. "type": "string",
  17128. "enum": ["session.next.model.switched"]
  17129. },
  17130. "properties": {
  17131. "type": "object",
  17132. "properties": {
  17133. "timestamp": {
  17134. "type": "number"
  17135. },
  17136. "sessionID": {
  17137. "type": "string",
  17138. "pattern": "^ses"
  17139. },
  17140. "messageID": {
  17141. "type": "string",
  17142. "pattern": "^msg_"
  17143. },
  17144. "model": {
  17145. "type": "object",
  17146. "properties": {
  17147. "id": {
  17148. "type": "string"
  17149. },
  17150. "providerID": {
  17151. "type": "string"
  17152. },
  17153. "variant": {
  17154. "type": "string"
  17155. }
  17156. },
  17157. "required": ["id", "providerID"],
  17158. "additionalProperties": false
  17159. }
  17160. },
  17161. "required": ["timestamp", "sessionID", "messageID", "model"],
  17162. "additionalProperties": false
  17163. }
  17164. },
  17165. "required": ["id", "type", "properties"],
  17166. "additionalProperties": false
  17167. },
  17168. {
  17169. "type": "object",
  17170. "properties": {
  17171. "id": {
  17172. "type": "string",
  17173. "pattern": "^evt_"
  17174. },
  17175. "type": {
  17176. "type": "string",
  17177. "enum": ["session.next.moved"]
  17178. },
  17179. "properties": {
  17180. "type": "object",
  17181. "properties": {
  17182. "timestamp": {
  17183. "type": "number"
  17184. },
  17185. "sessionID": {
  17186. "type": "string",
  17187. "pattern": "^ses"
  17188. },
  17189. "location": {
  17190. "$ref": "#/components/schemas/LocationRef"
  17191. },
  17192. "subdirectory": {
  17193. "type": "string"
  17194. }
  17195. },
  17196. "required": ["timestamp", "sessionID", "location"],
  17197. "additionalProperties": false
  17198. }
  17199. },
  17200. "required": ["id", "type", "properties"],
  17201. "additionalProperties": false
  17202. },
  17203. {
  17204. "type": "object",
  17205. "properties": {
  17206. "id": {
  17207. "type": "string",
  17208. "pattern": "^evt_"
  17209. },
  17210. "type": {
  17211. "type": "string",
  17212. "enum": ["session.next.prompted"]
  17213. },
  17214. "properties": {
  17215. "type": "object",
  17216. "properties": {
  17217. "timestamp": {
  17218. "type": "number"
  17219. },
  17220. "sessionID": {
  17221. "type": "string",
  17222. "pattern": "^ses"
  17223. },
  17224. "messageID": {
  17225. "type": "string",
  17226. "pattern": "^msg_"
  17227. },
  17228. "prompt": {
  17229. "$ref": "#/components/schemas/Prompt"
  17230. },
  17231. "delivery": {
  17232. "type": "string",
  17233. "enum": ["steer", "queue"]
  17234. }
  17235. },
  17236. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  17237. "additionalProperties": false
  17238. }
  17239. },
  17240. "required": ["id", "type", "properties"],
  17241. "additionalProperties": false
  17242. },
  17243. {
  17244. "type": "object",
  17245. "properties": {
  17246. "id": {
  17247. "type": "string",
  17248. "pattern": "^evt_"
  17249. },
  17250. "type": {
  17251. "type": "string",
  17252. "enum": ["session.next.prompt.admitted"]
  17253. },
  17254. "properties": {
  17255. "type": "object",
  17256. "properties": {
  17257. "timestamp": {
  17258. "type": "number"
  17259. },
  17260. "sessionID": {
  17261. "type": "string",
  17262. "pattern": "^ses"
  17263. },
  17264. "messageID": {
  17265. "type": "string",
  17266. "pattern": "^msg_"
  17267. },
  17268. "prompt": {
  17269. "$ref": "#/components/schemas/Prompt"
  17270. },
  17271. "delivery": {
  17272. "type": "string",
  17273. "enum": ["steer", "queue"]
  17274. }
  17275. },
  17276. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  17277. "additionalProperties": false
  17278. }
  17279. },
  17280. "required": ["id", "type", "properties"],
  17281. "additionalProperties": false
  17282. },
  17283. {
  17284. "type": "object",
  17285. "properties": {
  17286. "id": {
  17287. "type": "string",
  17288. "pattern": "^evt_"
  17289. },
  17290. "type": {
  17291. "type": "string",
  17292. "enum": ["session.next.context.updated"]
  17293. },
  17294. "properties": {
  17295. "type": "object",
  17296. "properties": {
  17297. "timestamp": {
  17298. "type": "number"
  17299. },
  17300. "sessionID": {
  17301. "type": "string",
  17302. "pattern": "^ses"
  17303. },
  17304. "messageID": {
  17305. "type": "string",
  17306. "pattern": "^msg_"
  17307. },
  17308. "text": {
  17309. "type": "string"
  17310. }
  17311. },
  17312. "required": ["timestamp", "sessionID", "messageID", "text"],
  17313. "additionalProperties": false
  17314. }
  17315. },
  17316. "required": ["id", "type", "properties"],
  17317. "additionalProperties": false
  17318. },
  17319. {
  17320. "type": "object",
  17321. "properties": {
  17322. "id": {
  17323. "type": "string",
  17324. "pattern": "^evt_"
  17325. },
  17326. "type": {
  17327. "type": "string",
  17328. "enum": ["session.next.synthetic"]
  17329. },
  17330. "properties": {
  17331. "type": "object",
  17332. "properties": {
  17333. "timestamp": {
  17334. "type": "number"
  17335. },
  17336. "sessionID": {
  17337. "type": "string",
  17338. "pattern": "^ses"
  17339. },
  17340. "messageID": {
  17341. "type": "string",
  17342. "pattern": "^msg_"
  17343. },
  17344. "text": {
  17345. "type": "string"
  17346. }
  17347. },
  17348. "required": ["timestamp", "sessionID", "messageID", "text"],
  17349. "additionalProperties": false
  17350. }
  17351. },
  17352. "required": ["id", "type", "properties"],
  17353. "additionalProperties": false
  17354. },
  17355. {
  17356. "type": "object",
  17357. "properties": {
  17358. "id": {
  17359. "type": "string",
  17360. "pattern": "^evt_"
  17361. },
  17362. "type": {
  17363. "type": "string",
  17364. "enum": ["session.next.shell.started"]
  17365. },
  17366. "properties": {
  17367. "type": "object",
  17368. "properties": {
  17369. "timestamp": {
  17370. "type": "number"
  17371. },
  17372. "sessionID": {
  17373. "type": "string",
  17374. "pattern": "^ses"
  17375. },
  17376. "messageID": {
  17377. "type": "string",
  17378. "pattern": "^msg_"
  17379. },
  17380. "callID": {
  17381. "type": "string"
  17382. },
  17383. "command": {
  17384. "type": "string"
  17385. }
  17386. },
  17387. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  17388. "additionalProperties": false
  17389. }
  17390. },
  17391. "required": ["id", "type", "properties"],
  17392. "additionalProperties": false
  17393. },
  17394. {
  17395. "type": "object",
  17396. "properties": {
  17397. "id": {
  17398. "type": "string",
  17399. "pattern": "^evt_"
  17400. },
  17401. "type": {
  17402. "type": "string",
  17403. "enum": ["session.next.shell.ended"]
  17404. },
  17405. "properties": {
  17406. "type": "object",
  17407. "properties": {
  17408. "timestamp": {
  17409. "type": "number"
  17410. },
  17411. "sessionID": {
  17412. "type": "string",
  17413. "pattern": "^ses"
  17414. },
  17415. "callID": {
  17416. "type": "string"
  17417. },
  17418. "output": {
  17419. "type": "string"
  17420. }
  17421. },
  17422. "required": ["timestamp", "sessionID", "callID", "output"],
  17423. "additionalProperties": false
  17424. }
  17425. },
  17426. "required": ["id", "type", "properties"],
  17427. "additionalProperties": false
  17428. },
  17429. {
  17430. "type": "object",
  17431. "properties": {
  17432. "id": {
  17433. "type": "string",
  17434. "pattern": "^evt_"
  17435. },
  17436. "type": {
  17437. "type": "string",
  17438. "enum": ["session.next.step.started"]
  17439. },
  17440. "properties": {
  17441. "type": "object",
  17442. "properties": {
  17443. "timestamp": {
  17444. "type": "number"
  17445. },
  17446. "sessionID": {
  17447. "type": "string",
  17448. "pattern": "^ses"
  17449. },
  17450. "assistantMessageID": {
  17451. "type": "string",
  17452. "pattern": "^msg_"
  17453. },
  17454. "agent": {
  17455. "type": "string"
  17456. },
  17457. "model": {
  17458. "type": "object",
  17459. "properties": {
  17460. "id": {
  17461. "type": "string"
  17462. },
  17463. "providerID": {
  17464. "type": "string"
  17465. },
  17466. "variant": {
  17467. "type": "string"
  17468. }
  17469. },
  17470. "required": ["id", "providerID"],
  17471. "additionalProperties": false
  17472. },
  17473. "snapshot": {
  17474. "type": "string"
  17475. }
  17476. },
  17477. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  17478. "additionalProperties": false
  17479. }
  17480. },
  17481. "required": ["id", "type", "properties"],
  17482. "additionalProperties": false
  17483. },
  17484. {
  17485. "type": "object",
  17486. "properties": {
  17487. "id": {
  17488. "type": "string",
  17489. "pattern": "^evt_"
  17490. },
  17491. "type": {
  17492. "type": "string",
  17493. "enum": ["session.next.step.ended"]
  17494. },
  17495. "properties": {
  17496. "type": "object",
  17497. "properties": {
  17498. "timestamp": {
  17499. "type": "number"
  17500. },
  17501. "sessionID": {
  17502. "type": "string",
  17503. "pattern": "^ses"
  17504. },
  17505. "assistantMessageID": {
  17506. "type": "string",
  17507. "pattern": "^msg_"
  17508. },
  17509. "finish": {
  17510. "type": "string"
  17511. },
  17512. "cost": {
  17513. "type": "number"
  17514. },
  17515. "tokens": {
  17516. "type": "object",
  17517. "properties": {
  17518. "input": {
  17519. "type": "number"
  17520. },
  17521. "output": {
  17522. "type": "number"
  17523. },
  17524. "reasoning": {
  17525. "type": "number"
  17526. },
  17527. "cache": {
  17528. "type": "object",
  17529. "properties": {
  17530. "read": {
  17531. "type": "number"
  17532. },
  17533. "write": {
  17534. "type": "number"
  17535. }
  17536. },
  17537. "required": ["read", "write"],
  17538. "additionalProperties": false
  17539. }
  17540. },
  17541. "required": ["input", "output", "reasoning", "cache"],
  17542. "additionalProperties": false
  17543. },
  17544. "snapshot": {
  17545. "type": "string"
  17546. }
  17547. },
  17548. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  17549. "additionalProperties": false
  17550. }
  17551. },
  17552. "required": ["id", "type", "properties"],
  17553. "additionalProperties": false
  17554. },
  17555. {
  17556. "type": "object",
  17557. "properties": {
  17558. "id": {
  17559. "type": "string",
  17560. "pattern": "^evt_"
  17561. },
  17562. "type": {
  17563. "type": "string",
  17564. "enum": ["session.next.step.failed"]
  17565. },
  17566. "properties": {
  17567. "type": "object",
  17568. "properties": {
  17569. "timestamp": {
  17570. "type": "number"
  17571. },
  17572. "sessionID": {
  17573. "type": "string",
  17574. "pattern": "^ses"
  17575. },
  17576. "assistantMessageID": {
  17577. "type": "string",
  17578. "pattern": "^msg_"
  17579. },
  17580. "error": {
  17581. "$ref": "#/components/schemas/SessionErrorUnknown"
  17582. }
  17583. },
  17584. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  17585. "additionalProperties": false
  17586. }
  17587. },
  17588. "required": ["id", "type", "properties"],
  17589. "additionalProperties": false
  17590. },
  17591. {
  17592. "type": "object",
  17593. "properties": {
  17594. "id": {
  17595. "type": "string",
  17596. "pattern": "^evt_"
  17597. },
  17598. "type": {
  17599. "type": "string",
  17600. "enum": ["session.next.text.started"]
  17601. },
  17602. "properties": {
  17603. "type": "object",
  17604. "properties": {
  17605. "timestamp": {
  17606. "type": "number"
  17607. },
  17608. "sessionID": {
  17609. "type": "string",
  17610. "pattern": "^ses"
  17611. },
  17612. "assistantMessageID": {
  17613. "type": "string",
  17614. "pattern": "^msg_"
  17615. },
  17616. "textID": {
  17617. "type": "string"
  17618. }
  17619. },
  17620. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  17621. "additionalProperties": false
  17622. }
  17623. },
  17624. "required": ["id", "type", "properties"],
  17625. "additionalProperties": false
  17626. },
  17627. {
  17628. "type": "object",
  17629. "properties": {
  17630. "id": {
  17631. "type": "string",
  17632. "pattern": "^evt_"
  17633. },
  17634. "type": {
  17635. "type": "string",
  17636. "enum": ["session.next.text.delta"]
  17637. },
  17638. "properties": {
  17639. "type": "object",
  17640. "properties": {
  17641. "timestamp": {
  17642. "type": "number"
  17643. },
  17644. "sessionID": {
  17645. "type": "string",
  17646. "pattern": "^ses"
  17647. },
  17648. "assistantMessageID": {
  17649. "type": "string",
  17650. "pattern": "^msg_"
  17651. },
  17652. "textID": {
  17653. "type": "string"
  17654. },
  17655. "delta": {
  17656. "type": "string"
  17657. }
  17658. },
  17659. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  17660. "additionalProperties": false
  17661. }
  17662. },
  17663. "required": ["id", "type", "properties"],
  17664. "additionalProperties": false
  17665. },
  17666. {
  17667. "type": "object",
  17668. "properties": {
  17669. "id": {
  17670. "type": "string",
  17671. "pattern": "^evt_"
  17672. },
  17673. "type": {
  17674. "type": "string",
  17675. "enum": ["session.next.text.ended"]
  17676. },
  17677. "properties": {
  17678. "type": "object",
  17679. "properties": {
  17680. "timestamp": {
  17681. "type": "number"
  17682. },
  17683. "sessionID": {
  17684. "type": "string",
  17685. "pattern": "^ses"
  17686. },
  17687. "assistantMessageID": {
  17688. "type": "string",
  17689. "pattern": "^msg_"
  17690. },
  17691. "textID": {
  17692. "type": "string"
  17693. },
  17694. "text": {
  17695. "type": "string"
  17696. }
  17697. },
  17698. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  17699. "additionalProperties": false
  17700. }
  17701. },
  17702. "required": ["id", "type", "properties"],
  17703. "additionalProperties": false
  17704. },
  17705. {
  17706. "type": "object",
  17707. "properties": {
  17708. "id": {
  17709. "type": "string",
  17710. "pattern": "^evt_"
  17711. },
  17712. "type": {
  17713. "type": "string",
  17714. "enum": ["session.next.reasoning.started"]
  17715. },
  17716. "properties": {
  17717. "type": "object",
  17718. "properties": {
  17719. "timestamp": {
  17720. "type": "number"
  17721. },
  17722. "sessionID": {
  17723. "type": "string",
  17724. "pattern": "^ses"
  17725. },
  17726. "assistantMessageID": {
  17727. "type": "string",
  17728. "pattern": "^msg_"
  17729. },
  17730. "reasoningID": {
  17731. "type": "string"
  17732. },
  17733. "providerMetadata": {
  17734. "type": "object",
  17735. "additionalProperties": {
  17736. "type": "object"
  17737. }
  17738. }
  17739. },
  17740. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  17741. "additionalProperties": false
  17742. }
  17743. },
  17744. "required": ["id", "type", "properties"],
  17745. "additionalProperties": false
  17746. },
  17747. {
  17748. "type": "object",
  17749. "properties": {
  17750. "id": {
  17751. "type": "string",
  17752. "pattern": "^evt_"
  17753. },
  17754. "type": {
  17755. "type": "string",
  17756. "enum": ["session.next.reasoning.delta"]
  17757. },
  17758. "properties": {
  17759. "type": "object",
  17760. "properties": {
  17761. "timestamp": {
  17762. "type": "number"
  17763. },
  17764. "sessionID": {
  17765. "type": "string",
  17766. "pattern": "^ses"
  17767. },
  17768. "assistantMessageID": {
  17769. "type": "string",
  17770. "pattern": "^msg_"
  17771. },
  17772. "reasoningID": {
  17773. "type": "string"
  17774. },
  17775. "delta": {
  17776. "type": "string"
  17777. }
  17778. },
  17779. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  17780. "additionalProperties": false
  17781. }
  17782. },
  17783. "required": ["id", "type", "properties"],
  17784. "additionalProperties": false
  17785. },
  17786. {
  17787. "type": "object",
  17788. "properties": {
  17789. "id": {
  17790. "type": "string",
  17791. "pattern": "^evt_"
  17792. },
  17793. "type": {
  17794. "type": "string",
  17795. "enum": ["session.next.reasoning.ended"]
  17796. },
  17797. "properties": {
  17798. "type": "object",
  17799. "properties": {
  17800. "timestamp": {
  17801. "type": "number"
  17802. },
  17803. "sessionID": {
  17804. "type": "string",
  17805. "pattern": "^ses"
  17806. },
  17807. "assistantMessageID": {
  17808. "type": "string",
  17809. "pattern": "^msg_"
  17810. },
  17811. "reasoningID": {
  17812. "type": "string"
  17813. },
  17814. "text": {
  17815. "type": "string"
  17816. },
  17817. "providerMetadata": {
  17818. "type": "object",
  17819. "additionalProperties": {
  17820. "type": "object"
  17821. }
  17822. }
  17823. },
  17824. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  17825. "additionalProperties": false
  17826. }
  17827. },
  17828. "required": ["id", "type", "properties"],
  17829. "additionalProperties": false
  17830. },
  17831. {
  17832. "type": "object",
  17833. "properties": {
  17834. "id": {
  17835. "type": "string",
  17836. "pattern": "^evt_"
  17837. },
  17838. "type": {
  17839. "type": "string",
  17840. "enum": ["session.next.tool.input.started"]
  17841. },
  17842. "properties": {
  17843. "type": "object",
  17844. "properties": {
  17845. "timestamp": {
  17846. "type": "number"
  17847. },
  17848. "sessionID": {
  17849. "type": "string",
  17850. "pattern": "^ses"
  17851. },
  17852. "assistantMessageID": {
  17853. "type": "string",
  17854. "pattern": "^msg_"
  17855. },
  17856. "callID": {
  17857. "type": "string"
  17858. },
  17859. "name": {
  17860. "type": "string"
  17861. }
  17862. },
  17863. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  17864. "additionalProperties": false
  17865. }
  17866. },
  17867. "required": ["id", "type", "properties"],
  17868. "additionalProperties": false
  17869. },
  17870. {
  17871. "type": "object",
  17872. "properties": {
  17873. "id": {
  17874. "type": "string",
  17875. "pattern": "^evt_"
  17876. },
  17877. "type": {
  17878. "type": "string",
  17879. "enum": ["session.next.tool.input.delta"]
  17880. },
  17881. "properties": {
  17882. "type": "object",
  17883. "properties": {
  17884. "timestamp": {
  17885. "type": "number"
  17886. },
  17887. "sessionID": {
  17888. "type": "string",
  17889. "pattern": "^ses"
  17890. },
  17891. "assistantMessageID": {
  17892. "type": "string",
  17893. "pattern": "^msg_"
  17894. },
  17895. "callID": {
  17896. "type": "string"
  17897. },
  17898. "delta": {
  17899. "type": "string"
  17900. }
  17901. },
  17902. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  17903. "additionalProperties": false
  17904. }
  17905. },
  17906. "required": ["id", "type", "properties"],
  17907. "additionalProperties": false
  17908. },
  17909. {
  17910. "type": "object",
  17911. "properties": {
  17912. "id": {
  17913. "type": "string",
  17914. "pattern": "^evt_"
  17915. },
  17916. "type": {
  17917. "type": "string",
  17918. "enum": ["session.next.tool.input.ended"]
  17919. },
  17920. "properties": {
  17921. "type": "object",
  17922. "properties": {
  17923. "timestamp": {
  17924. "type": "number"
  17925. },
  17926. "sessionID": {
  17927. "type": "string",
  17928. "pattern": "^ses"
  17929. },
  17930. "assistantMessageID": {
  17931. "type": "string",
  17932. "pattern": "^msg_"
  17933. },
  17934. "callID": {
  17935. "type": "string"
  17936. },
  17937. "text": {
  17938. "type": "string"
  17939. }
  17940. },
  17941. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  17942. "additionalProperties": false
  17943. }
  17944. },
  17945. "required": ["id", "type", "properties"],
  17946. "additionalProperties": false
  17947. },
  17948. {
  17949. "type": "object",
  17950. "properties": {
  17951. "id": {
  17952. "type": "string",
  17953. "pattern": "^evt_"
  17954. },
  17955. "type": {
  17956. "type": "string",
  17957. "enum": ["session.next.tool.called"]
  17958. },
  17959. "properties": {
  17960. "type": "object",
  17961. "properties": {
  17962. "timestamp": {
  17963. "type": "number"
  17964. },
  17965. "sessionID": {
  17966. "type": "string",
  17967. "pattern": "^ses"
  17968. },
  17969. "assistantMessageID": {
  17970. "type": "string",
  17971. "pattern": "^msg_"
  17972. },
  17973. "callID": {
  17974. "type": "string"
  17975. },
  17976. "tool": {
  17977. "type": "string"
  17978. },
  17979. "input": {
  17980. "type": "object"
  17981. },
  17982. "provider": {
  17983. "type": "object",
  17984. "properties": {
  17985. "executed": {
  17986. "type": "boolean"
  17987. },
  17988. "metadata": {
  17989. "type": "object",
  17990. "additionalProperties": {
  17991. "type": "object"
  17992. }
  17993. }
  17994. },
  17995. "required": ["executed"],
  17996. "additionalProperties": false
  17997. }
  17998. },
  17999. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  18000. "additionalProperties": false
  18001. }
  18002. },
  18003. "required": ["id", "type", "properties"],
  18004. "additionalProperties": false
  18005. },
  18006. {
  18007. "type": "object",
  18008. "properties": {
  18009. "id": {
  18010. "type": "string",
  18011. "pattern": "^evt_"
  18012. },
  18013. "type": {
  18014. "type": "string",
  18015. "enum": ["session.next.tool.progress"]
  18016. },
  18017. "properties": {
  18018. "type": "object",
  18019. "properties": {
  18020. "timestamp": {
  18021. "type": "number"
  18022. },
  18023. "sessionID": {
  18024. "type": "string",
  18025. "pattern": "^ses"
  18026. },
  18027. "assistantMessageID": {
  18028. "type": "string",
  18029. "pattern": "^msg_"
  18030. },
  18031. "callID": {
  18032. "type": "string"
  18033. },
  18034. "structured": {
  18035. "type": "object"
  18036. },
  18037. "content": {
  18038. "type": "array",
  18039. "items": {
  18040. "anyOf": [
  18041. {
  18042. "$ref": "#/components/schemas/ToolTextContent"
  18043. },
  18044. {
  18045. "$ref": "#/components/schemas/ToolFileContent"
  18046. }
  18047. ]
  18048. }
  18049. }
  18050. },
  18051. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  18052. "additionalProperties": false
  18053. }
  18054. },
  18055. "required": ["id", "type", "properties"],
  18056. "additionalProperties": false
  18057. },
  18058. {
  18059. "type": "object",
  18060. "properties": {
  18061. "id": {
  18062. "type": "string",
  18063. "pattern": "^evt_"
  18064. },
  18065. "type": {
  18066. "type": "string",
  18067. "enum": ["session.next.tool.success"]
  18068. },
  18069. "properties": {
  18070. "type": "object",
  18071. "properties": {
  18072. "timestamp": {
  18073. "type": "number"
  18074. },
  18075. "sessionID": {
  18076. "type": "string",
  18077. "pattern": "^ses"
  18078. },
  18079. "assistantMessageID": {
  18080. "type": "string",
  18081. "pattern": "^msg_"
  18082. },
  18083. "callID": {
  18084. "type": "string"
  18085. },
  18086. "structured": {
  18087. "type": "object"
  18088. },
  18089. "content": {
  18090. "type": "array",
  18091. "items": {
  18092. "anyOf": [
  18093. {
  18094. "$ref": "#/components/schemas/ToolTextContent"
  18095. },
  18096. {
  18097. "$ref": "#/components/schemas/ToolFileContent"
  18098. }
  18099. ]
  18100. }
  18101. },
  18102. "outputPaths": {
  18103. "type": "array",
  18104. "items": {
  18105. "type": "string"
  18106. }
  18107. },
  18108. "result": {},
  18109. "provider": {
  18110. "type": "object",
  18111. "properties": {
  18112. "executed": {
  18113. "type": "boolean"
  18114. },
  18115. "metadata": {
  18116. "type": "object",
  18117. "additionalProperties": {
  18118. "type": "object"
  18119. }
  18120. }
  18121. },
  18122. "required": ["executed"],
  18123. "additionalProperties": false
  18124. }
  18125. },
  18126. "required": [
  18127. "timestamp",
  18128. "sessionID",
  18129. "assistantMessageID",
  18130. "callID",
  18131. "structured",
  18132. "content",
  18133. "provider"
  18134. ],
  18135. "additionalProperties": false
  18136. }
  18137. },
  18138. "required": ["id", "type", "properties"],
  18139. "additionalProperties": false
  18140. },
  18141. {
  18142. "type": "object",
  18143. "properties": {
  18144. "id": {
  18145. "type": "string",
  18146. "pattern": "^evt_"
  18147. },
  18148. "type": {
  18149. "type": "string",
  18150. "enum": ["session.next.tool.failed"]
  18151. },
  18152. "properties": {
  18153. "type": "object",
  18154. "properties": {
  18155. "timestamp": {
  18156. "type": "number"
  18157. },
  18158. "sessionID": {
  18159. "type": "string",
  18160. "pattern": "^ses"
  18161. },
  18162. "assistantMessageID": {
  18163. "type": "string",
  18164. "pattern": "^msg_"
  18165. },
  18166. "callID": {
  18167. "type": "string"
  18168. },
  18169. "error": {
  18170. "$ref": "#/components/schemas/SessionErrorUnknown"
  18171. },
  18172. "result": {},
  18173. "provider": {
  18174. "type": "object",
  18175. "properties": {
  18176. "executed": {
  18177. "type": "boolean"
  18178. },
  18179. "metadata": {
  18180. "type": "object",
  18181. "additionalProperties": {
  18182. "type": "object"
  18183. }
  18184. }
  18185. },
  18186. "required": ["executed"],
  18187. "additionalProperties": false
  18188. }
  18189. },
  18190. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  18191. "additionalProperties": false
  18192. }
  18193. },
  18194. "required": ["id", "type", "properties"],
  18195. "additionalProperties": false
  18196. },
  18197. {
  18198. "type": "object",
  18199. "properties": {
  18200. "id": {
  18201. "type": "string",
  18202. "pattern": "^evt_"
  18203. },
  18204. "type": {
  18205. "type": "string",
  18206. "enum": ["session.next.retried"]
  18207. },
  18208. "properties": {
  18209. "type": "object",
  18210. "properties": {
  18211. "timestamp": {
  18212. "type": "number"
  18213. },
  18214. "sessionID": {
  18215. "type": "string",
  18216. "pattern": "^ses"
  18217. },
  18218. "attempt": {
  18219. "type": "number"
  18220. },
  18221. "error": {
  18222. "$ref": "#/components/schemas/SessionNextRetry_error"
  18223. }
  18224. },
  18225. "required": ["timestamp", "sessionID", "attempt", "error"],
  18226. "additionalProperties": false
  18227. }
  18228. },
  18229. "required": ["id", "type", "properties"],
  18230. "additionalProperties": false
  18231. },
  18232. {
  18233. "type": "object",
  18234. "properties": {
  18235. "id": {
  18236. "type": "string",
  18237. "pattern": "^evt_"
  18238. },
  18239. "type": {
  18240. "type": "string",
  18241. "enum": ["session.next.compaction.started"]
  18242. },
  18243. "properties": {
  18244. "type": "object",
  18245. "properties": {
  18246. "timestamp": {
  18247. "type": "number"
  18248. },
  18249. "sessionID": {
  18250. "type": "string",
  18251. "pattern": "^ses"
  18252. },
  18253. "messageID": {
  18254. "type": "string",
  18255. "pattern": "^msg_"
  18256. },
  18257. "reason": {
  18258. "type": "string",
  18259. "enum": ["auto", "manual"]
  18260. }
  18261. },
  18262. "required": ["timestamp", "sessionID", "messageID", "reason"],
  18263. "additionalProperties": false
  18264. }
  18265. },
  18266. "required": ["id", "type", "properties"],
  18267. "additionalProperties": false
  18268. },
  18269. {
  18270. "type": "object",
  18271. "properties": {
  18272. "id": {
  18273. "type": "string",
  18274. "pattern": "^evt_"
  18275. },
  18276. "type": {
  18277. "type": "string",
  18278. "enum": ["session.next.compaction.delta"]
  18279. },
  18280. "properties": {
  18281. "type": "object",
  18282. "properties": {
  18283. "timestamp": {
  18284. "type": "number"
  18285. },
  18286. "sessionID": {
  18287. "type": "string",
  18288. "pattern": "^ses"
  18289. },
  18290. "messageID": {
  18291. "type": "string",
  18292. "pattern": "^msg_"
  18293. },
  18294. "text": {
  18295. "type": "string"
  18296. }
  18297. },
  18298. "required": ["timestamp", "sessionID", "messageID", "text"],
  18299. "additionalProperties": false
  18300. }
  18301. },
  18302. "required": ["id", "type", "properties"],
  18303. "additionalProperties": false
  18304. },
  18305. {
  18306. "type": "object",
  18307. "properties": {
  18308. "id": {
  18309. "type": "string",
  18310. "pattern": "^evt_"
  18311. },
  18312. "type": {
  18313. "type": "string",
  18314. "enum": ["session.next.compaction.ended"]
  18315. },
  18316. "properties": {
  18317. "type": "object",
  18318. "properties": {
  18319. "timestamp": {
  18320. "type": "number"
  18321. },
  18322. "sessionID": {
  18323. "type": "string",
  18324. "pattern": "^ses"
  18325. },
  18326. "messageID": {
  18327. "type": "string",
  18328. "pattern": "^msg_"
  18329. },
  18330. "reason": {
  18331. "type": "string",
  18332. "enum": ["auto", "manual"]
  18333. },
  18334. "text": {
  18335. "type": "string"
  18336. },
  18337. "recent": {
  18338. "type": "string"
  18339. }
  18340. },
  18341. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  18342. "additionalProperties": false
  18343. }
  18344. },
  18345. "required": ["id", "type", "properties"],
  18346. "additionalProperties": false
  18347. },
  18348. {
  18349. "type": "object",
  18350. "properties": {
  18351. "id": {
  18352. "type": "string",
  18353. "pattern": "^evt_"
  18354. },
  18355. "type": {
  18356. "type": "string",
  18357. "enum": ["message.part.delta"]
  18358. },
  18359. "properties": {
  18360. "type": "object",
  18361. "properties": {
  18362. "sessionID": {
  18363. "type": "string",
  18364. "pattern": "^ses"
  18365. },
  18366. "messageID": {
  18367. "type": "string",
  18368. "pattern": "^msg"
  18369. },
  18370. "partID": {
  18371. "type": "string",
  18372. "pattern": "^prt"
  18373. },
  18374. "field": {
  18375. "type": "string"
  18376. },
  18377. "delta": {
  18378. "type": "string"
  18379. }
  18380. },
  18381. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  18382. "additionalProperties": false
  18383. }
  18384. },
  18385. "required": ["id", "type", "properties"],
  18386. "additionalProperties": false
  18387. },
  18388. {
  18389. "type": "object",
  18390. "properties": {
  18391. "id": {
  18392. "type": "string",
  18393. "pattern": "^evt_"
  18394. },
  18395. "type": {
  18396. "type": "string",
  18397. "enum": ["session.diff"]
  18398. },
  18399. "properties": {
  18400. "type": "object",
  18401. "properties": {
  18402. "sessionID": {
  18403. "type": "string",
  18404. "pattern": "^ses"
  18405. },
  18406. "diff": {
  18407. "type": "array",
  18408. "items": {
  18409. "$ref": "#/components/schemas/SnapshotFileDiff"
  18410. }
  18411. }
  18412. },
  18413. "required": ["sessionID", "diff"],
  18414. "additionalProperties": false
  18415. }
  18416. },
  18417. "required": ["id", "type", "properties"],
  18418. "additionalProperties": false
  18419. },
  18420. {
  18421. "type": "object",
  18422. "properties": {
  18423. "id": {
  18424. "type": "string",
  18425. "pattern": "^evt_"
  18426. },
  18427. "type": {
  18428. "type": "string",
  18429. "enum": ["session.error"]
  18430. },
  18431. "properties": {
  18432. "type": "object",
  18433. "properties": {
  18434. "sessionID": {
  18435. "type": "string",
  18436. "pattern": "^ses"
  18437. },
  18438. "error": {
  18439. "anyOf": [
  18440. {
  18441. "$ref": "#/components/schemas/ProviderAuthError"
  18442. },
  18443. {
  18444. "$ref": "#/components/schemas/UnknownError"
  18445. },
  18446. {
  18447. "$ref": "#/components/schemas/MessageOutputLengthError"
  18448. },
  18449. {
  18450. "$ref": "#/components/schemas/MessageAbortedError"
  18451. },
  18452. {
  18453. "$ref": "#/components/schemas/StructuredOutputError"
  18454. },
  18455. {
  18456. "$ref": "#/components/schemas/ContextOverflowError"
  18457. },
  18458. {
  18459. "$ref": "#/components/schemas/ContentFilterError"
  18460. },
  18461. {
  18462. "$ref": "#/components/schemas/APIError"
  18463. }
  18464. ]
  18465. }
  18466. },
  18467. "additionalProperties": false
  18468. }
  18469. },
  18470. "required": ["id", "type", "properties"],
  18471. "additionalProperties": false
  18472. },
  18473. {
  18474. "type": "object",
  18475. "properties": {
  18476. "id": {
  18477. "type": "string",
  18478. "pattern": "^evt_"
  18479. },
  18480. "type": {
  18481. "type": "string",
  18482. "enum": ["installation.updated"]
  18483. },
  18484. "properties": {
  18485. "type": "object",
  18486. "properties": {
  18487. "version": {
  18488. "type": "string"
  18489. }
  18490. },
  18491. "required": ["version"],
  18492. "additionalProperties": false
  18493. }
  18494. },
  18495. "required": ["id", "type", "properties"],
  18496. "additionalProperties": false
  18497. },
  18498. {
  18499. "type": "object",
  18500. "properties": {
  18501. "id": {
  18502. "type": "string",
  18503. "pattern": "^evt_"
  18504. },
  18505. "type": {
  18506. "type": "string",
  18507. "enum": ["installation.update-available"]
  18508. },
  18509. "properties": {
  18510. "type": "object",
  18511. "properties": {
  18512. "version": {
  18513. "type": "string"
  18514. }
  18515. },
  18516. "required": ["version"],
  18517. "additionalProperties": false
  18518. }
  18519. },
  18520. "required": ["id", "type", "properties"],
  18521. "additionalProperties": false
  18522. },
  18523. {
  18524. "type": "object",
  18525. "properties": {
  18526. "id": {
  18527. "type": "string",
  18528. "pattern": "^evt_"
  18529. },
  18530. "type": {
  18531. "type": "string",
  18532. "enum": ["file.edited"]
  18533. },
  18534. "properties": {
  18535. "type": "object",
  18536. "properties": {
  18537. "file": {
  18538. "type": "string"
  18539. }
  18540. },
  18541. "required": ["file"],
  18542. "additionalProperties": false
  18543. }
  18544. },
  18545. "required": ["id", "type", "properties"],
  18546. "additionalProperties": false
  18547. },
  18548. {
  18549. "type": "object",
  18550. "properties": {
  18551. "id": {
  18552. "type": "string",
  18553. "pattern": "^evt_"
  18554. },
  18555. "type": {
  18556. "type": "string",
  18557. "enum": ["reference.updated"]
  18558. },
  18559. "properties": {
  18560. "type": "object",
  18561. "properties": {}
  18562. }
  18563. },
  18564. "required": ["id", "type", "properties"],
  18565. "additionalProperties": false
  18566. },
  18567. {
  18568. "type": "object",
  18569. "properties": {
  18570. "id": {
  18571. "type": "string",
  18572. "pattern": "^evt_"
  18573. },
  18574. "type": {
  18575. "type": "string",
  18576. "enum": ["permission.v2.asked"]
  18577. },
  18578. "properties": {
  18579. "type": "object",
  18580. "properties": {
  18581. "id": {
  18582. "type": "string",
  18583. "pattern": "^per"
  18584. },
  18585. "sessionID": {
  18586. "type": "string",
  18587. "pattern": "^ses"
  18588. },
  18589. "action": {
  18590. "type": "string"
  18591. },
  18592. "resources": {
  18593. "type": "array",
  18594. "items": {
  18595. "type": "string"
  18596. }
  18597. },
  18598. "save": {
  18599. "type": "array",
  18600. "items": {
  18601. "type": "string"
  18602. }
  18603. },
  18604. "metadata": {
  18605. "type": "object"
  18606. },
  18607. "source": {
  18608. "$ref": "#/components/schemas/PermissionV2Source"
  18609. }
  18610. },
  18611. "required": ["id", "sessionID", "action", "resources"],
  18612. "additionalProperties": false
  18613. }
  18614. },
  18615. "required": ["id", "type", "properties"],
  18616. "additionalProperties": false
  18617. },
  18618. {
  18619. "type": "object",
  18620. "properties": {
  18621. "id": {
  18622. "type": "string",
  18623. "pattern": "^evt_"
  18624. },
  18625. "type": {
  18626. "type": "string",
  18627. "enum": ["permission.v2.replied"]
  18628. },
  18629. "properties": {
  18630. "type": "object",
  18631. "properties": {
  18632. "sessionID": {
  18633. "type": "string",
  18634. "pattern": "^ses"
  18635. },
  18636. "requestID": {
  18637. "type": "string",
  18638. "pattern": "^per"
  18639. },
  18640. "reply": {
  18641. "$ref": "#/components/schemas/PermissionV2Reply"
  18642. }
  18643. },
  18644. "required": ["sessionID", "requestID", "reply"],
  18645. "additionalProperties": false
  18646. }
  18647. },
  18648. "required": ["id", "type", "properties"],
  18649. "additionalProperties": false
  18650. },
  18651. {
  18652. "type": "object",
  18653. "properties": {
  18654. "id": {
  18655. "type": "string",
  18656. "pattern": "^evt_"
  18657. },
  18658. "type": {
  18659. "type": "string",
  18660. "enum": ["plugin.added"]
  18661. },
  18662. "properties": {
  18663. "type": "object",
  18664. "properties": {
  18665. "id": {
  18666. "type": "string"
  18667. }
  18668. },
  18669. "required": ["id"],
  18670. "additionalProperties": false
  18671. }
  18672. },
  18673. "required": ["id", "type", "properties"],
  18674. "additionalProperties": false
  18675. },
  18676. {
  18677. "type": "object",
  18678. "properties": {
  18679. "id": {
  18680. "type": "string",
  18681. "pattern": "^evt_"
  18682. },
  18683. "type": {
  18684. "type": "string",
  18685. "enum": ["project.directories.updated"]
  18686. },
  18687. "properties": {
  18688. "type": "object",
  18689. "properties": {
  18690. "projectID": {
  18691. "type": "string"
  18692. }
  18693. },
  18694. "required": ["projectID"],
  18695. "additionalProperties": false
  18696. }
  18697. },
  18698. "required": ["id", "type", "properties"],
  18699. "additionalProperties": false
  18700. },
  18701. {
  18702. "type": "object",
  18703. "properties": {
  18704. "id": {
  18705. "type": "string",
  18706. "pattern": "^evt_"
  18707. },
  18708. "type": {
  18709. "type": "string",
  18710. "enum": ["file.watcher.updated"]
  18711. },
  18712. "properties": {
  18713. "type": "object",
  18714. "properties": {
  18715. "file": {
  18716. "type": "string"
  18717. },
  18718. "event": {
  18719. "type": "string",
  18720. "enum": ["add", "change", "unlink"]
  18721. }
  18722. },
  18723. "required": ["file", "event"],
  18724. "additionalProperties": false
  18725. }
  18726. },
  18727. "required": ["id", "type", "properties"],
  18728. "additionalProperties": false
  18729. },
  18730. {
  18731. "type": "object",
  18732. "properties": {
  18733. "id": {
  18734. "type": "string",
  18735. "pattern": "^evt_"
  18736. },
  18737. "type": {
  18738. "type": "string",
  18739. "enum": ["pty.created"]
  18740. },
  18741. "properties": {
  18742. "type": "object",
  18743. "properties": {
  18744. "info": {
  18745. "$ref": "#/components/schemas/Pty"
  18746. }
  18747. },
  18748. "required": ["info"],
  18749. "additionalProperties": false
  18750. }
  18751. },
  18752. "required": ["id", "type", "properties"],
  18753. "additionalProperties": false
  18754. },
  18755. {
  18756. "type": "object",
  18757. "properties": {
  18758. "id": {
  18759. "type": "string",
  18760. "pattern": "^evt_"
  18761. },
  18762. "type": {
  18763. "type": "string",
  18764. "enum": ["pty.updated"]
  18765. },
  18766. "properties": {
  18767. "type": "object",
  18768. "properties": {
  18769. "info": {
  18770. "$ref": "#/components/schemas/Pty"
  18771. }
  18772. },
  18773. "required": ["info"],
  18774. "additionalProperties": false
  18775. }
  18776. },
  18777. "required": ["id", "type", "properties"],
  18778. "additionalProperties": false
  18779. },
  18780. {
  18781. "type": "object",
  18782. "properties": {
  18783. "id": {
  18784. "type": "string",
  18785. "pattern": "^evt_"
  18786. },
  18787. "type": {
  18788. "type": "string",
  18789. "enum": ["pty.exited"]
  18790. },
  18791. "properties": {
  18792. "type": "object",
  18793. "properties": {
  18794. "id": {
  18795. "type": "string",
  18796. "pattern": "^pty"
  18797. },
  18798. "exitCode": {
  18799. "type": "integer",
  18800. "minimum": 0
  18801. }
  18802. },
  18803. "required": ["id", "exitCode"],
  18804. "additionalProperties": false
  18805. }
  18806. },
  18807. "required": ["id", "type", "properties"],
  18808. "additionalProperties": false
  18809. },
  18810. {
  18811. "type": "object",
  18812. "properties": {
  18813. "id": {
  18814. "type": "string",
  18815. "pattern": "^evt_"
  18816. },
  18817. "type": {
  18818. "type": "string",
  18819. "enum": ["pty.deleted"]
  18820. },
  18821. "properties": {
  18822. "type": "object",
  18823. "properties": {
  18824. "id": {
  18825. "type": "string",
  18826. "pattern": "^pty"
  18827. }
  18828. },
  18829. "required": ["id"],
  18830. "additionalProperties": false
  18831. }
  18832. },
  18833. "required": ["id", "type", "properties"],
  18834. "additionalProperties": false
  18835. },
  18836. {
  18837. "type": "object",
  18838. "properties": {
  18839. "id": {
  18840. "type": "string",
  18841. "pattern": "^evt_"
  18842. },
  18843. "type": {
  18844. "type": "string",
  18845. "enum": ["question.v2.asked"]
  18846. },
  18847. "properties": {
  18848. "type": "object",
  18849. "properties": {
  18850. "id": {
  18851. "type": "string",
  18852. "pattern": "^que"
  18853. },
  18854. "sessionID": {
  18855. "type": "string",
  18856. "pattern": "^ses"
  18857. },
  18858. "questions": {
  18859. "type": "array",
  18860. "items": {
  18861. "$ref": "#/components/schemas/QuestionV2Info"
  18862. },
  18863. "description": "Questions to ask"
  18864. },
  18865. "tool": {
  18866. "$ref": "#/components/schemas/QuestionV2Tool"
  18867. }
  18868. },
  18869. "required": ["id", "sessionID", "questions"],
  18870. "additionalProperties": false
  18871. }
  18872. },
  18873. "required": ["id", "type", "properties"],
  18874. "additionalProperties": false
  18875. },
  18876. {
  18877. "type": "object",
  18878. "properties": {
  18879. "id": {
  18880. "type": "string",
  18881. "pattern": "^evt_"
  18882. },
  18883. "type": {
  18884. "type": "string",
  18885. "enum": ["question.v2.replied"]
  18886. },
  18887. "properties": {
  18888. "type": "object",
  18889. "properties": {
  18890. "sessionID": {
  18891. "type": "string",
  18892. "pattern": "^ses"
  18893. },
  18894. "requestID": {
  18895. "type": "string",
  18896. "pattern": "^que"
  18897. },
  18898. "answers": {
  18899. "type": "array",
  18900. "items": {
  18901. "$ref": "#/components/schemas/QuestionV2Answer"
  18902. }
  18903. }
  18904. },
  18905. "required": ["sessionID", "requestID", "answers"],
  18906. "additionalProperties": false
  18907. }
  18908. },
  18909. "required": ["id", "type", "properties"],
  18910. "additionalProperties": false
  18911. },
  18912. {
  18913. "type": "object",
  18914. "properties": {
  18915. "id": {
  18916. "type": "string",
  18917. "pattern": "^evt_"
  18918. },
  18919. "type": {
  18920. "type": "string",
  18921. "enum": ["question.v2.rejected"]
  18922. },
  18923. "properties": {
  18924. "type": "object",
  18925. "properties": {
  18926. "sessionID": {
  18927. "type": "string",
  18928. "pattern": "^ses"
  18929. },
  18930. "requestID": {
  18931. "type": "string",
  18932. "pattern": "^que"
  18933. }
  18934. },
  18935. "required": ["sessionID", "requestID"],
  18936. "additionalProperties": false
  18937. }
  18938. },
  18939. "required": ["id", "type", "properties"],
  18940. "additionalProperties": false
  18941. },
  18942. {
  18943. "type": "object",
  18944. "properties": {
  18945. "id": {
  18946. "type": "string",
  18947. "pattern": "^evt_"
  18948. },
  18949. "type": {
  18950. "type": "string",
  18951. "enum": ["todo.updated"]
  18952. },
  18953. "properties": {
  18954. "type": "object",
  18955. "properties": {
  18956. "sessionID": {
  18957. "type": "string",
  18958. "pattern": "^ses"
  18959. },
  18960. "todos": {
  18961. "type": "array",
  18962. "items": {
  18963. "$ref": "#/components/schemas/Todo"
  18964. }
  18965. }
  18966. },
  18967. "required": ["sessionID", "todos"],
  18968. "additionalProperties": false
  18969. }
  18970. },
  18971. "required": ["id", "type", "properties"],
  18972. "additionalProperties": false
  18973. },
  18974. {
  18975. "type": "object",
  18976. "properties": {
  18977. "id": {
  18978. "type": "string",
  18979. "pattern": "^evt_"
  18980. },
  18981. "type": {
  18982. "type": "string",
  18983. "enum": ["lsp.updated"]
  18984. },
  18985. "properties": {
  18986. "type": "object",
  18987. "properties": {}
  18988. }
  18989. },
  18990. "required": ["id", "type", "properties"],
  18991. "additionalProperties": false
  18992. },
  18993. {
  18994. "type": "object",
  18995. "properties": {
  18996. "id": {
  18997. "type": "string",
  18998. "pattern": "^evt_"
  18999. },
  19000. "type": {
  19001. "type": "string",
  19002. "enum": ["permission.asked"]
  19003. },
  19004. "properties": {
  19005. "type": "object",
  19006. "properties": {
  19007. "id": {
  19008. "type": "string",
  19009. "pattern": "^per"
  19010. },
  19011. "sessionID": {
  19012. "type": "string",
  19013. "pattern": "^ses"
  19014. },
  19015. "permission": {
  19016. "type": "string"
  19017. },
  19018. "patterns": {
  19019. "type": "array",
  19020. "items": {
  19021. "type": "string"
  19022. }
  19023. },
  19024. "metadata": {
  19025. "type": "object"
  19026. },
  19027. "always": {
  19028. "type": "array",
  19029. "items": {
  19030. "type": "string"
  19031. }
  19032. },
  19033. "tool": {
  19034. "type": "object",
  19035. "properties": {
  19036. "messageID": {
  19037. "type": "string"
  19038. },
  19039. "callID": {
  19040. "type": "string"
  19041. }
  19042. },
  19043. "required": ["messageID", "callID"],
  19044. "additionalProperties": false
  19045. }
  19046. },
  19047. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  19048. "additionalProperties": false
  19049. }
  19050. },
  19051. "required": ["id", "type", "properties"],
  19052. "additionalProperties": false
  19053. },
  19054. {
  19055. "type": "object",
  19056. "properties": {
  19057. "id": {
  19058. "type": "string",
  19059. "pattern": "^evt_"
  19060. },
  19061. "type": {
  19062. "type": "string",
  19063. "enum": ["permission.replied"]
  19064. },
  19065. "properties": {
  19066. "type": "object",
  19067. "properties": {
  19068. "sessionID": {
  19069. "type": "string",
  19070. "pattern": "^ses"
  19071. },
  19072. "requestID": {
  19073. "type": "string",
  19074. "pattern": "^per"
  19075. },
  19076. "reply": {
  19077. "type": "string",
  19078. "enum": ["once", "always", "reject"]
  19079. }
  19080. },
  19081. "required": ["sessionID", "requestID", "reply"],
  19082. "additionalProperties": false
  19083. }
  19084. },
  19085. "required": ["id", "type", "properties"],
  19086. "additionalProperties": false
  19087. },
  19088. {
  19089. "type": "object",
  19090. "properties": {
  19091. "id": {
  19092. "type": "string",
  19093. "pattern": "^evt_"
  19094. },
  19095. "type": {
  19096. "type": "string",
  19097. "enum": ["tui.prompt.append"]
  19098. },
  19099. "properties": {
  19100. "type": "object",
  19101. "properties": {
  19102. "text": {
  19103. "type": "string"
  19104. }
  19105. },
  19106. "required": ["text"],
  19107. "additionalProperties": false
  19108. }
  19109. },
  19110. "required": ["id", "type", "properties"],
  19111. "additionalProperties": false
  19112. },
  19113. {
  19114. "type": "object",
  19115. "properties": {
  19116. "id": {
  19117. "type": "string",
  19118. "pattern": "^evt_"
  19119. },
  19120. "type": {
  19121. "type": "string",
  19122. "enum": ["tui.command.execute"]
  19123. },
  19124. "properties": {
  19125. "type": "object",
  19126. "properties": {
  19127. "command": {
  19128. "anyOf": [
  19129. {
  19130. "type": "string",
  19131. "enum": [
  19132. "session.list",
  19133. "session.new",
  19134. "session.share",
  19135. "session.interrupt",
  19136. "session.compact",
  19137. "session.page.up",
  19138. "session.page.down",
  19139. "session.line.up",
  19140. "session.line.down",
  19141. "session.half.page.up",
  19142. "session.half.page.down",
  19143. "session.first",
  19144. "session.last",
  19145. "prompt.clear",
  19146. "prompt.submit",
  19147. "agent.cycle"
  19148. ]
  19149. },
  19150. {
  19151. "type": "string"
  19152. }
  19153. ]
  19154. }
  19155. },
  19156. "required": ["command"],
  19157. "additionalProperties": false
  19158. }
  19159. },
  19160. "required": ["id", "type", "properties"],
  19161. "additionalProperties": false
  19162. },
  19163. {
  19164. "type": "object",
  19165. "properties": {
  19166. "id": {
  19167. "type": "string",
  19168. "pattern": "^evt_"
  19169. },
  19170. "type": {
  19171. "type": "string",
  19172. "enum": ["tui.toast.show"]
  19173. },
  19174. "properties": {
  19175. "type": "object",
  19176. "properties": {
  19177. "title": {
  19178. "type": "string"
  19179. },
  19180. "message": {
  19181. "type": "string"
  19182. },
  19183. "variant": {
  19184. "type": "string",
  19185. "enum": ["info", "success", "warning", "error"]
  19186. },
  19187. "duration": {
  19188. "type": "integer",
  19189. "exclusiveMinimum": 0
  19190. }
  19191. },
  19192. "required": ["message", "variant"],
  19193. "additionalProperties": false
  19194. }
  19195. },
  19196. "required": ["id", "type", "properties"],
  19197. "additionalProperties": false
  19198. },
  19199. {
  19200. "type": "object",
  19201. "properties": {
  19202. "id": {
  19203. "type": "string",
  19204. "pattern": "^evt_"
  19205. },
  19206. "type": {
  19207. "type": "string",
  19208. "enum": ["tui.session.select"]
  19209. },
  19210. "properties": {
  19211. "type": "object",
  19212. "properties": {
  19213. "sessionID": {
  19214. "type": "string",
  19215. "pattern": "^ses",
  19216. "description": "Session ID to navigate to"
  19217. }
  19218. },
  19219. "required": ["sessionID"],
  19220. "additionalProperties": false
  19221. }
  19222. },
  19223. "required": ["id", "type", "properties"],
  19224. "additionalProperties": false
  19225. },
  19226. {
  19227. "type": "object",
  19228. "properties": {
  19229. "id": {
  19230. "type": "string",
  19231. "pattern": "^evt_"
  19232. },
  19233. "type": {
  19234. "type": "string",
  19235. "enum": ["mcp.tools.changed"]
  19236. },
  19237. "properties": {
  19238. "type": "object",
  19239. "properties": {
  19240. "server": {
  19241. "type": "string"
  19242. }
  19243. },
  19244. "required": ["server"],
  19245. "additionalProperties": false
  19246. }
  19247. },
  19248. "required": ["id", "type", "properties"],
  19249. "additionalProperties": false
  19250. },
  19251. {
  19252. "type": "object",
  19253. "properties": {
  19254. "id": {
  19255. "type": "string",
  19256. "pattern": "^evt_"
  19257. },
  19258. "type": {
  19259. "type": "string",
  19260. "enum": ["mcp.browser.open.failed"]
  19261. },
  19262. "properties": {
  19263. "type": "object",
  19264. "properties": {
  19265. "mcpName": {
  19266. "type": "string"
  19267. },
  19268. "url": {
  19269. "type": "string"
  19270. }
  19271. },
  19272. "required": ["mcpName", "url"],
  19273. "additionalProperties": false
  19274. }
  19275. },
  19276. "required": ["id", "type", "properties"],
  19277. "additionalProperties": false
  19278. },
  19279. {
  19280. "type": "object",
  19281. "properties": {
  19282. "id": {
  19283. "type": "string",
  19284. "pattern": "^evt_"
  19285. },
  19286. "type": {
  19287. "type": "string",
  19288. "enum": ["command.executed"]
  19289. },
  19290. "properties": {
  19291. "type": "object",
  19292. "properties": {
  19293. "name": {
  19294. "type": "string"
  19295. },
  19296. "sessionID": {
  19297. "type": "string",
  19298. "pattern": "^ses"
  19299. },
  19300. "arguments": {
  19301. "type": "string"
  19302. },
  19303. "messageID": {
  19304. "type": "string",
  19305. "pattern": "^msg"
  19306. }
  19307. },
  19308. "required": ["name", "sessionID", "arguments", "messageID"],
  19309. "additionalProperties": false
  19310. }
  19311. },
  19312. "required": ["id", "type", "properties"],
  19313. "additionalProperties": false
  19314. },
  19315. {
  19316. "type": "object",
  19317. "properties": {
  19318. "id": {
  19319. "type": "string",
  19320. "pattern": "^evt_"
  19321. },
  19322. "type": {
  19323. "type": "string",
  19324. "enum": ["project.updated"]
  19325. },
  19326. "properties": {
  19327. "type": "object",
  19328. "properties": {
  19329. "id": {
  19330. "type": "string"
  19331. },
  19332. "worktree": {
  19333. "type": "string"
  19334. },
  19335. "vcs": {
  19336. "type": "string",
  19337. "enum": ["git"]
  19338. },
  19339. "name": {
  19340. "type": "string"
  19341. },
  19342. "icon": {
  19343. "type": "object",
  19344. "properties": {
  19345. "url": {
  19346. "type": "string"
  19347. },
  19348. "override": {
  19349. "type": "string"
  19350. },
  19351. "color": {
  19352. "type": "string"
  19353. }
  19354. },
  19355. "additionalProperties": false
  19356. },
  19357. "commands": {
  19358. "type": "object",
  19359. "properties": {
  19360. "start": {
  19361. "type": "string",
  19362. "description": "Startup script to run when creating a new workspace (worktree)"
  19363. }
  19364. },
  19365. "additionalProperties": false
  19366. },
  19367. "time": {
  19368. "type": "object",
  19369. "properties": {
  19370. "created": {
  19371. "type": "integer",
  19372. "minimum": 0
  19373. },
  19374. "updated": {
  19375. "type": "integer",
  19376. "minimum": 0
  19377. },
  19378. "initialized": {
  19379. "type": "integer",
  19380. "minimum": 0
  19381. }
  19382. },
  19383. "required": ["created", "updated"],
  19384. "additionalProperties": false
  19385. },
  19386. "sandboxes": {
  19387. "type": "array",
  19388. "items": {
  19389. "type": "string"
  19390. }
  19391. }
  19392. },
  19393. "required": ["id", "worktree", "time", "sandboxes"],
  19394. "additionalProperties": false
  19395. }
  19396. },
  19397. "required": ["id", "type", "properties"],
  19398. "additionalProperties": false
  19399. },
  19400. {
  19401. "type": "object",
  19402. "properties": {
  19403. "id": {
  19404. "type": "string",
  19405. "pattern": "^evt_"
  19406. },
  19407. "type": {
  19408. "type": "string",
  19409. "enum": ["session.status"]
  19410. },
  19411. "properties": {
  19412. "type": "object",
  19413. "properties": {
  19414. "sessionID": {
  19415. "type": "string",
  19416. "pattern": "^ses"
  19417. },
  19418. "status": {
  19419. "$ref": "#/components/schemas/SessionStatus"
  19420. }
  19421. },
  19422. "required": ["sessionID", "status"],
  19423. "additionalProperties": false
  19424. }
  19425. },
  19426. "required": ["id", "type", "properties"],
  19427. "additionalProperties": false
  19428. },
  19429. {
  19430. "type": "object",
  19431. "properties": {
  19432. "id": {
  19433. "type": "string",
  19434. "pattern": "^evt_"
  19435. },
  19436. "type": {
  19437. "type": "string",
  19438. "enum": ["session.idle"]
  19439. },
  19440. "properties": {
  19441. "type": "object",
  19442. "properties": {
  19443. "sessionID": {
  19444. "type": "string",
  19445. "pattern": "^ses"
  19446. }
  19447. },
  19448. "required": ["sessionID"],
  19449. "additionalProperties": false
  19450. }
  19451. },
  19452. "required": ["id", "type", "properties"],
  19453. "additionalProperties": false
  19454. },
  19455. {
  19456. "type": "object",
  19457. "properties": {
  19458. "id": {
  19459. "type": "string",
  19460. "pattern": "^evt_"
  19461. },
  19462. "type": {
  19463. "type": "string",
  19464. "enum": ["question.asked"]
  19465. },
  19466. "properties": {
  19467. "type": "object",
  19468. "properties": {
  19469. "id": {
  19470. "type": "string",
  19471. "pattern": "^que"
  19472. },
  19473. "sessionID": {
  19474. "type": "string",
  19475. "pattern": "^ses"
  19476. },
  19477. "questions": {
  19478. "type": "array",
  19479. "items": {
  19480. "$ref": "#/components/schemas/QuestionInfo"
  19481. },
  19482. "description": "Questions to ask"
  19483. },
  19484. "tool": {
  19485. "$ref": "#/components/schemas/QuestionTool"
  19486. }
  19487. },
  19488. "required": ["id", "sessionID", "questions"],
  19489. "additionalProperties": false
  19490. }
  19491. },
  19492. "required": ["id", "type", "properties"],
  19493. "additionalProperties": false
  19494. },
  19495. {
  19496. "type": "object",
  19497. "properties": {
  19498. "id": {
  19499. "type": "string",
  19500. "pattern": "^evt_"
  19501. },
  19502. "type": {
  19503. "type": "string",
  19504. "enum": ["question.replied"]
  19505. },
  19506. "properties": {
  19507. "type": "object",
  19508. "properties": {
  19509. "sessionID": {
  19510. "type": "string",
  19511. "pattern": "^ses"
  19512. },
  19513. "requestID": {
  19514. "type": "string",
  19515. "pattern": "^que"
  19516. },
  19517. "answers": {
  19518. "type": "array",
  19519. "items": {
  19520. "$ref": "#/components/schemas/QuestionAnswer"
  19521. }
  19522. }
  19523. },
  19524. "required": ["sessionID", "requestID", "answers"],
  19525. "additionalProperties": false
  19526. }
  19527. },
  19528. "required": ["id", "type", "properties"],
  19529. "additionalProperties": false
  19530. },
  19531. {
  19532. "type": "object",
  19533. "properties": {
  19534. "id": {
  19535. "type": "string",
  19536. "pattern": "^evt_"
  19537. },
  19538. "type": {
  19539. "type": "string",
  19540. "enum": ["question.rejected"]
  19541. },
  19542. "properties": {
  19543. "type": "object",
  19544. "properties": {
  19545. "sessionID": {
  19546. "type": "string",
  19547. "pattern": "^ses"
  19548. },
  19549. "requestID": {
  19550. "type": "string",
  19551. "pattern": "^que"
  19552. }
  19553. },
  19554. "required": ["sessionID", "requestID"],
  19555. "additionalProperties": false
  19556. }
  19557. },
  19558. "required": ["id", "type", "properties"],
  19559. "additionalProperties": false
  19560. },
  19561. {
  19562. "type": "object",
  19563. "properties": {
  19564. "id": {
  19565. "type": "string",
  19566. "pattern": "^evt_"
  19567. },
  19568. "type": {
  19569. "type": "string",
  19570. "enum": ["session.compacted"]
  19571. },
  19572. "properties": {
  19573. "type": "object",
  19574. "properties": {
  19575. "sessionID": {
  19576. "type": "string",
  19577. "pattern": "^ses"
  19578. }
  19579. },
  19580. "required": ["sessionID"],
  19581. "additionalProperties": false
  19582. }
  19583. },
  19584. "required": ["id", "type", "properties"],
  19585. "additionalProperties": false
  19586. },
  19587. {
  19588. "type": "object",
  19589. "properties": {
  19590. "id": {
  19591. "type": "string",
  19592. "pattern": "^evt_"
  19593. },
  19594. "type": {
  19595. "type": "string",
  19596. "enum": ["vcs.branch.updated"]
  19597. },
  19598. "properties": {
  19599. "type": "object",
  19600. "properties": {
  19601. "branch": {
  19602. "type": "string"
  19603. }
  19604. },
  19605. "additionalProperties": false
  19606. }
  19607. },
  19608. "required": ["id", "type", "properties"],
  19609. "additionalProperties": false
  19610. },
  19611. {
  19612. "type": "object",
  19613. "properties": {
  19614. "id": {
  19615. "type": "string",
  19616. "pattern": "^evt_"
  19617. },
  19618. "type": {
  19619. "type": "string",
  19620. "enum": ["workspace.ready"]
  19621. },
  19622. "properties": {
  19623. "type": "object",
  19624. "properties": {
  19625. "name": {
  19626. "type": "string"
  19627. }
  19628. },
  19629. "required": ["name"],
  19630. "additionalProperties": false
  19631. }
  19632. },
  19633. "required": ["id", "type", "properties"],
  19634. "additionalProperties": false
  19635. },
  19636. {
  19637. "type": "object",
  19638. "properties": {
  19639. "id": {
  19640. "type": "string",
  19641. "pattern": "^evt_"
  19642. },
  19643. "type": {
  19644. "type": "string",
  19645. "enum": ["workspace.failed"]
  19646. },
  19647. "properties": {
  19648. "type": "object",
  19649. "properties": {
  19650. "message": {
  19651. "type": "string"
  19652. }
  19653. },
  19654. "required": ["message"],
  19655. "additionalProperties": false
  19656. }
  19657. },
  19658. "required": ["id", "type", "properties"],
  19659. "additionalProperties": false
  19660. },
  19661. {
  19662. "type": "object",
  19663. "properties": {
  19664. "id": {
  19665. "type": "string",
  19666. "pattern": "^evt_"
  19667. },
  19668. "type": {
  19669. "type": "string",
  19670. "enum": ["workspace.status"]
  19671. },
  19672. "properties": {
  19673. "type": "object",
  19674. "properties": {
  19675. "workspaceID": {
  19676. "type": "string",
  19677. "pattern": "^wrk"
  19678. },
  19679. "status": {
  19680. "type": "string",
  19681. "enum": ["connected", "connecting", "disconnected", "error"]
  19682. }
  19683. },
  19684. "required": ["workspaceID", "status"],
  19685. "additionalProperties": false
  19686. }
  19687. },
  19688. "required": ["id", "type", "properties"],
  19689. "additionalProperties": false
  19690. },
  19691. {
  19692. "type": "object",
  19693. "properties": {
  19694. "id": {
  19695. "type": "string",
  19696. "pattern": "^evt_"
  19697. },
  19698. "type": {
  19699. "type": "string",
  19700. "enum": ["worktree.ready"]
  19701. },
  19702. "properties": {
  19703. "type": "object",
  19704. "properties": {
  19705. "name": {
  19706. "type": "string"
  19707. },
  19708. "branch": {
  19709. "type": "string"
  19710. }
  19711. },
  19712. "required": ["name"],
  19713. "additionalProperties": false
  19714. }
  19715. },
  19716. "required": ["id", "type", "properties"],
  19717. "additionalProperties": false
  19718. },
  19719. {
  19720. "type": "object",
  19721. "properties": {
  19722. "id": {
  19723. "type": "string",
  19724. "pattern": "^evt_"
  19725. },
  19726. "type": {
  19727. "type": "string",
  19728. "enum": ["worktree.failed"]
  19729. },
  19730. "properties": {
  19731. "type": "object",
  19732. "properties": {
  19733. "message": {
  19734. "type": "string"
  19735. }
  19736. },
  19737. "required": ["message"],
  19738. "additionalProperties": false
  19739. }
  19740. },
  19741. "required": ["id", "type", "properties"],
  19742. "additionalProperties": false
  19743. },
  19744. {
  19745. "type": "object",
  19746. "properties": {
  19747. "id": {
  19748. "type": "string",
  19749. "pattern": "^evt_"
  19750. },
  19751. "type": {
  19752. "type": "string",
  19753. "enum": ["server.connected"]
  19754. },
  19755. "properties": {
  19756. "type": "object",
  19757. "properties": {}
  19758. }
  19759. },
  19760. "required": ["id", "type", "properties"],
  19761. "additionalProperties": false
  19762. },
  19763. {
  19764. "type": "object",
  19765. "properties": {
  19766. "id": {
  19767. "type": "string",
  19768. "pattern": "^evt_"
  19769. },
  19770. "type": {
  19771. "type": "string",
  19772. "enum": ["global.disposed"]
  19773. },
  19774. "properties": {
  19775. "type": "object",
  19776. "properties": {}
  19777. }
  19778. },
  19779. "required": ["id", "type", "properties"],
  19780. "additionalProperties": false
  19781. },
  19782. {
  19783. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  19784. },
  19785. {
  19786. "$ref": "#/components/schemas/SyncEventSessionCreated"
  19787. },
  19788. {
  19789. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  19790. },
  19791. {
  19792. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  19793. },
  19794. {
  19795. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  19796. },
  19797. {
  19798. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  19799. },
  19800. {
  19801. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  19802. },
  19803. {
  19804. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  19805. },
  19806. {
  19807. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  19808. },
  19809. {
  19810. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  19811. },
  19812. {
  19813. "$ref": "#/components/schemas/SyncEventSessionNextMoved"
  19814. },
  19815. {
  19816. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  19817. },
  19818. {
  19819. "$ref": "#/components/schemas/SyncEventSessionNextPromptAdmitted"
  19820. },
  19821. {
  19822. "$ref": "#/components/schemas/SyncEventSessionNextContextUpdated"
  19823. },
  19824. {
  19825. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  19826. },
  19827. {
  19828. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  19829. },
  19830. {
  19831. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  19832. },
  19833. {
  19834. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  19835. },
  19836. {
  19837. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  19838. },
  19839. {
  19840. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  19841. },
  19842. {
  19843. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  19844. },
  19845. {
  19846. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  19847. },
  19848. {
  19849. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  19850. },
  19851. {
  19852. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  19853. },
  19854. {
  19855. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  19856. },
  19857. {
  19858. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  19859. },
  19860. {
  19861. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  19862. },
  19863. {
  19864. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  19865. },
  19866. {
  19867. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  19868. },
  19869. {
  19870. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  19871. },
  19872. {
  19873. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  19874. },
  19875. {
  19876. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  19877. },
  19878. {
  19879. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  19880. }
  19881. ]
  19882. }
  19883. },
  19884. "required": ["directory", "payload"],
  19885. "additionalProperties": false
  19886. },
  19887. "LogLevel": {
  19888. "type": "string",
  19889. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  19890. "description": "Log level"
  19891. },
  19892. "ServerConfig": {
  19893. "type": "object",
  19894. "properties": {
  19895. "port": {
  19896. "type": "integer",
  19897. "exclusiveMinimum": 0
  19898. },
  19899. "hostname": {
  19900. "type": "string"
  19901. },
  19902. "mdns": {
  19903. "type": "boolean"
  19904. },
  19905. "mdnsDomain": {
  19906. "type": "string"
  19907. },
  19908. "cors": {
  19909. "type": "array",
  19910. "items": {
  19911. "type": "string"
  19912. }
  19913. }
  19914. },
  19915. "additionalProperties": false,
  19916. "description": "Server configuration for opencode serve and web commands"
  19917. },
  19918. "PermissionActionConfig": {
  19919. "type": "string",
  19920. "enum": ["ask", "allow", "deny"]
  19921. },
  19922. "PermissionObjectConfig": {
  19923. "type": "object",
  19924. "additionalProperties": {
  19925. "$ref": "#/components/schemas/PermissionActionConfig"
  19926. }
  19927. },
  19928. "PermissionRuleConfig": {
  19929. "anyOf": [
  19930. {
  19931. "$ref": "#/components/schemas/PermissionActionConfig"
  19932. },
  19933. {
  19934. "$ref": "#/components/schemas/PermissionObjectConfig"
  19935. }
  19936. ]
  19937. },
  19938. "PermissionConfig": {
  19939. "anyOf": [
  19940. {
  19941. "$ref": "#/components/schemas/PermissionActionConfig"
  19942. },
  19943. {
  19944. "type": "object",
  19945. "properties": {
  19946. "read": {
  19947. "$ref": "#/components/schemas/PermissionRuleConfig"
  19948. },
  19949. "edit": {
  19950. "$ref": "#/components/schemas/PermissionRuleConfig"
  19951. },
  19952. "glob": {
  19953. "$ref": "#/components/schemas/PermissionRuleConfig"
  19954. },
  19955. "grep": {
  19956. "$ref": "#/components/schemas/PermissionRuleConfig"
  19957. },
  19958. "list": {
  19959. "$ref": "#/components/schemas/PermissionRuleConfig"
  19960. },
  19961. "bash": {
  19962. "$ref": "#/components/schemas/PermissionRuleConfig"
  19963. },
  19964. "task": {
  19965. "$ref": "#/components/schemas/PermissionRuleConfig"
  19966. },
  19967. "external_directory": {
  19968. "$ref": "#/components/schemas/PermissionRuleConfig"
  19969. },
  19970. "todowrite": {
  19971. "$ref": "#/components/schemas/PermissionActionConfig"
  19972. },
  19973. "question": {
  19974. "$ref": "#/components/schemas/PermissionActionConfig"
  19975. },
  19976. "webfetch": {
  19977. "$ref": "#/components/schemas/PermissionActionConfig"
  19978. },
  19979. "websearch": {
  19980. "$ref": "#/components/schemas/PermissionActionConfig"
  19981. },
  19982. "lsp": {
  19983. "$ref": "#/components/schemas/PermissionRuleConfig"
  19984. },
  19985. "doom_loop": {
  19986. "$ref": "#/components/schemas/PermissionActionConfig"
  19987. },
  19988. "skill": {
  19989. "$ref": "#/components/schemas/PermissionRuleConfig"
  19990. }
  19991. },
  19992. "additionalProperties": {
  19993. "$ref": "#/components/schemas/PermissionRuleConfig"
  19994. }
  19995. }
  19996. ]
  19997. },
  19998. "AgentConfig": {
  19999. "type": "object",
  20000. "properties": {
  20001. "model": {
  20002. "type": "string"
  20003. },
  20004. "variant": {
  20005. "type": "string"
  20006. },
  20007. "temperature": {
  20008. "type": "number"
  20009. },
  20010. "top_p": {
  20011. "type": "number"
  20012. },
  20013. "prompt": {
  20014. "type": "string"
  20015. },
  20016. "tools": {
  20017. "type": "object",
  20018. "additionalProperties": {
  20019. "type": "boolean"
  20020. }
  20021. },
  20022. "disable": {
  20023. "type": "boolean"
  20024. },
  20025. "description": {
  20026. "type": "string"
  20027. },
  20028. "mode": {
  20029. "type": "string",
  20030. "enum": ["subagent", "primary", "all"]
  20031. },
  20032. "hidden": {
  20033. "type": "boolean"
  20034. },
  20035. "options": {
  20036. "type": "object"
  20037. },
  20038. "color": {
  20039. "anyOf": [
  20040. {
  20041. "type": "string",
  20042. "pattern": "^#[0-9a-fA-F]{6}$"
  20043. },
  20044. {
  20045. "type": "string",
  20046. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  20047. }
  20048. ],
  20049. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  20050. },
  20051. "steps": {
  20052. "type": "integer",
  20053. "exclusiveMinimum": 0
  20054. },
  20055. "maxSteps": {
  20056. "type": "integer",
  20057. "exclusiveMinimum": 0
  20058. },
  20059. "permission": {
  20060. "$ref": "#/components/schemas/PermissionConfig"
  20061. }
  20062. },
  20063. "additionalProperties": {}
  20064. },
  20065. "ProviderConfig": {
  20066. "type": "object",
  20067. "properties": {
  20068. "api": {
  20069. "type": "string"
  20070. },
  20071. "name": {
  20072. "type": "string"
  20073. },
  20074. "env": {
  20075. "type": "array",
  20076. "items": {
  20077. "type": "string"
  20078. }
  20079. },
  20080. "id": {
  20081. "type": "string"
  20082. },
  20083. "npm": {
  20084. "type": "string"
  20085. },
  20086. "whitelist": {
  20087. "type": "array",
  20088. "items": {
  20089. "type": "string"
  20090. }
  20091. },
  20092. "blacklist": {
  20093. "type": "array",
  20094. "items": {
  20095. "type": "string"
  20096. }
  20097. },
  20098. "options": {
  20099. "type": "object",
  20100. "properties": {
  20101. "apiKey": {
  20102. "type": "string"
  20103. },
  20104. "baseURL": {
  20105. "type": "string"
  20106. },
  20107. "enterpriseUrl": {
  20108. "type": "string"
  20109. },
  20110. "setCacheKey": {
  20111. "type": "boolean"
  20112. },
  20113. "timeout": {
  20114. "anyOf": [
  20115. {
  20116. "type": "integer",
  20117. "exclusiveMinimum": 0
  20118. },
  20119. {
  20120. "type": "boolean",
  20121. "enum": [false]
  20122. }
  20123. ],
  20124. "description": "Timeout in milliseconds for full requests to this provider. Set to false to disable timeout."
  20125. },
  20126. "headerTimeout": {
  20127. "anyOf": [
  20128. {
  20129. "type": "integer",
  20130. "exclusiveMinimum": 0
  20131. },
  20132. {
  20133. "type": "boolean",
  20134. "enum": [false]
  20135. }
  20136. ],
  20137. "description": "Timeout in milliseconds to wait for response headers. Provider integrations may set defaults. Set to false to disable timeout."
  20138. },
  20139. "chunkTimeout": {
  20140. "type": "integer",
  20141. "exclusiveMinimum": 0
  20142. }
  20143. },
  20144. "additionalProperties": {}
  20145. },
  20146. "models": {
  20147. "type": "object",
  20148. "additionalProperties": {
  20149. "type": "object",
  20150. "properties": {
  20151. "id": {
  20152. "type": "string"
  20153. },
  20154. "name": {
  20155. "type": "string"
  20156. },
  20157. "family": {
  20158. "type": "string"
  20159. },
  20160. "release_date": {
  20161. "type": "string"
  20162. },
  20163. "attachment": {
  20164. "type": "boolean"
  20165. },
  20166. "reasoning": {
  20167. "type": "boolean"
  20168. },
  20169. "temperature": {
  20170. "type": "boolean"
  20171. },
  20172. "tool_call": {
  20173. "type": "boolean"
  20174. },
  20175. "interleaved": {
  20176. "anyOf": [
  20177. {
  20178. "type": "boolean",
  20179. "enum": [true]
  20180. },
  20181. {
  20182. "type": "object",
  20183. "properties": {
  20184. "field": {
  20185. "type": "string",
  20186. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  20187. }
  20188. },
  20189. "required": ["field"],
  20190. "additionalProperties": false
  20191. }
  20192. ]
  20193. },
  20194. "cost": {
  20195. "type": "object",
  20196. "properties": {
  20197. "input": {
  20198. "type": "number"
  20199. },
  20200. "output": {
  20201. "type": "number"
  20202. },
  20203. "cache_read": {
  20204. "type": "number"
  20205. },
  20206. "cache_write": {
  20207. "type": "number"
  20208. },
  20209. "context_over_200k": {
  20210. "type": "object",
  20211. "properties": {
  20212. "input": {
  20213. "type": "number"
  20214. },
  20215. "output": {
  20216. "type": "number"
  20217. },
  20218. "cache_read": {
  20219. "type": "number"
  20220. },
  20221. "cache_write": {
  20222. "type": "number"
  20223. }
  20224. },
  20225. "required": ["input", "output"],
  20226. "additionalProperties": false
  20227. }
  20228. },
  20229. "required": ["input", "output"],
  20230. "additionalProperties": false
  20231. },
  20232. "limit": {
  20233. "type": "object",
  20234. "properties": {
  20235. "context": {
  20236. "type": "number"
  20237. },
  20238. "input": {
  20239. "type": "number"
  20240. },
  20241. "output": {
  20242. "type": "number"
  20243. }
  20244. },
  20245. "required": ["context", "output"],
  20246. "additionalProperties": false
  20247. },
  20248. "modalities": {
  20249. "type": "object",
  20250. "properties": {
  20251. "input": {
  20252. "type": "array",
  20253. "items": {
  20254. "type": "string",
  20255. "enum": ["text", "audio", "image", "video", "pdf"]
  20256. }
  20257. },
  20258. "output": {
  20259. "type": "array",
  20260. "items": {
  20261. "type": "string",
  20262. "enum": ["text", "audio", "image", "video", "pdf"]
  20263. }
  20264. }
  20265. },
  20266. "additionalProperties": false
  20267. },
  20268. "experimental": {
  20269. "type": "boolean"
  20270. },
  20271. "status": {
  20272. "type": "string",
  20273. "enum": ["alpha", "beta", "deprecated", "active"]
  20274. },
  20275. "provider": {
  20276. "type": "object",
  20277. "properties": {
  20278. "npm": {
  20279. "type": "string"
  20280. },
  20281. "api": {
  20282. "type": "string"
  20283. }
  20284. },
  20285. "additionalProperties": false
  20286. },
  20287. "options": {
  20288. "type": "object"
  20289. },
  20290. "headers": {
  20291. "type": "object",
  20292. "additionalProperties": {
  20293. "type": "string"
  20294. }
  20295. },
  20296. "variants": {
  20297. "type": "object",
  20298. "additionalProperties": {
  20299. "type": "object",
  20300. "properties": {
  20301. "disabled": {
  20302. "type": "boolean"
  20303. }
  20304. },
  20305. "additionalProperties": {}
  20306. },
  20307. "description": "Variant-specific configuration"
  20308. }
  20309. },
  20310. "additionalProperties": false
  20311. }
  20312. }
  20313. },
  20314. "additionalProperties": false
  20315. },
  20316. "McpLocalConfig": {
  20317. "type": "object",
  20318. "properties": {
  20319. "type": {
  20320. "type": "string",
  20321. "enum": ["local"],
  20322. "description": "Type of MCP server connection"
  20323. },
  20324. "command": {
  20325. "type": "array",
  20326. "items": {
  20327. "type": "string"
  20328. },
  20329. "description": "Command and arguments to run the MCP server"
  20330. },
  20331. "cwd": {
  20332. "type": "string"
  20333. },
  20334. "environment": {
  20335. "type": "object",
  20336. "additionalProperties": {
  20337. "type": "string"
  20338. }
  20339. },
  20340. "enabled": {
  20341. "type": "boolean"
  20342. },
  20343. "timeout": {
  20344. "type": "integer",
  20345. "exclusiveMinimum": 0
  20346. }
  20347. },
  20348. "required": ["type", "command"],
  20349. "additionalProperties": false
  20350. },
  20351. "McpOAuthConfig": {
  20352. "type": "object",
  20353. "properties": {
  20354. "clientId": {
  20355. "type": "string"
  20356. },
  20357. "clientSecret": {
  20358. "type": "string"
  20359. },
  20360. "scope": {
  20361. "type": "string"
  20362. },
  20363. "callbackPort": {
  20364. "type": "integer",
  20365. "minimum": 1,
  20366. "maximum": 65535
  20367. },
  20368. "redirectUri": {
  20369. "type": "string"
  20370. }
  20371. },
  20372. "additionalProperties": false
  20373. },
  20374. "McpRemoteConfig": {
  20375. "type": "object",
  20376. "properties": {
  20377. "type": {
  20378. "type": "string",
  20379. "enum": ["remote"],
  20380. "description": "Type of MCP server connection"
  20381. },
  20382. "url": {
  20383. "type": "string",
  20384. "description": "URL of the remote MCP server"
  20385. },
  20386. "enabled": {
  20387. "type": "boolean"
  20388. },
  20389. "headers": {
  20390. "type": "object",
  20391. "additionalProperties": {
  20392. "type": "string"
  20393. }
  20394. },
  20395. "oauth": {
  20396. "anyOf": [
  20397. {
  20398. "$ref": "#/components/schemas/McpOAuthConfig"
  20399. },
  20400. {
  20401. "type": "boolean",
  20402. "enum": [false]
  20403. }
  20404. ],
  20405. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  20406. },
  20407. "timeout": {
  20408. "type": "integer",
  20409. "exclusiveMinimum": 0
  20410. }
  20411. },
  20412. "required": ["type", "url"],
  20413. "additionalProperties": false
  20414. },
  20415. "LayoutConfig": {
  20416. "type": "string",
  20417. "enum": ["auto", "stretch"],
  20418. "description": "@deprecated Always uses stretch layout."
  20419. },
  20420. "ImageAttachmentConfig": {
  20421. "type": "object",
  20422. "properties": {
  20423. "auto_resize": {
  20424. "type": "boolean"
  20425. },
  20426. "max_width": {
  20427. "type": "integer",
  20428. "exclusiveMinimum": 0
  20429. },
  20430. "max_height": {
  20431. "type": "integer",
  20432. "exclusiveMinimum": 0
  20433. },
  20434. "max_base64_bytes": {
  20435. "type": "integer",
  20436. "exclusiveMinimum": 0
  20437. }
  20438. },
  20439. "additionalProperties": false
  20440. },
  20441. "AttachmentConfig": {
  20442. "type": "object",
  20443. "properties": {
  20444. "image": {
  20445. "$ref": "#/components/schemas/ImageAttachmentConfig"
  20446. }
  20447. },
  20448. "additionalProperties": false
  20449. },
  20450. "Config": {
  20451. "type": "object",
  20452. "properties": {
  20453. "$schema": {
  20454. "type": "string"
  20455. },
  20456. "shell": {
  20457. "type": "string"
  20458. },
  20459. "logLevel": {
  20460. "$ref": "#/components/schemas/LogLevel"
  20461. },
  20462. "server": {
  20463. "$ref": "#/components/schemas/ServerConfig"
  20464. },
  20465. "command": {
  20466. "type": "object",
  20467. "additionalProperties": {
  20468. "type": "object",
  20469. "properties": {
  20470. "template": {
  20471. "type": "string"
  20472. },
  20473. "description": {
  20474. "type": "string"
  20475. },
  20476. "agent": {
  20477. "type": "string"
  20478. },
  20479. "model": {
  20480. "type": "string"
  20481. },
  20482. "variant": {
  20483. "type": "string"
  20484. },
  20485. "subtask": {
  20486. "type": "boolean"
  20487. }
  20488. },
  20489. "required": ["template"],
  20490. "additionalProperties": false
  20491. }
  20492. },
  20493. "skills": {
  20494. "type": "object",
  20495. "properties": {
  20496. "paths": {
  20497. "type": "array",
  20498. "items": {
  20499. "type": "string"
  20500. }
  20501. },
  20502. "urls": {
  20503. "type": "array",
  20504. "items": {
  20505. "type": "string"
  20506. }
  20507. }
  20508. },
  20509. "additionalProperties": false
  20510. },
  20511. "references": {
  20512. "type": "object",
  20513. "additionalProperties": {
  20514. "anyOf": [
  20515. {
  20516. "type": "string"
  20517. },
  20518. {
  20519. "$ref": "#/components/schemas/ConfigV2ReferenceGit"
  20520. },
  20521. {
  20522. "$ref": "#/components/schemas/ConfigV2ReferenceLocal"
  20523. }
  20524. ]
  20525. }
  20526. },
  20527. "reference": {
  20528. "type": "object",
  20529. "additionalProperties": {
  20530. "anyOf": [
  20531. {
  20532. "type": "string"
  20533. },
  20534. {
  20535. "$ref": "#/components/schemas/ConfigV2ReferenceGit"
  20536. },
  20537. {
  20538. "$ref": "#/components/schemas/ConfigV2ReferenceLocal"
  20539. }
  20540. ]
  20541. }
  20542. },
  20543. "watcher": {
  20544. "type": "object",
  20545. "properties": {
  20546. "ignore": {
  20547. "type": "array",
  20548. "items": {
  20549. "type": "string"
  20550. }
  20551. }
  20552. },
  20553. "additionalProperties": false
  20554. },
  20555. "snapshot": {
  20556. "type": "boolean"
  20557. },
  20558. "plugin": {
  20559. "type": "array",
  20560. "items": {
  20561. "anyOf": [
  20562. {
  20563. "type": "string"
  20564. },
  20565. {
  20566. "type": "array",
  20567. "prefixItems": [
  20568. {
  20569. "type": "string"
  20570. },
  20571. {
  20572. "type": "object"
  20573. }
  20574. ],
  20575. "maxItems": 2,
  20576. "minItems": 2
  20577. }
  20578. ]
  20579. }
  20580. },
  20581. "share": {
  20582. "type": "string",
  20583. "enum": ["manual", "auto", "disabled"]
  20584. },
  20585. "autoshare": {
  20586. "type": "boolean"
  20587. },
  20588. "autoupdate": {
  20589. "anyOf": [
  20590. {
  20591. "type": "boolean"
  20592. },
  20593. {
  20594. "type": "string",
  20595. "enum": ["notify"]
  20596. }
  20597. ],
  20598. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  20599. },
  20600. "disabled_providers": {
  20601. "type": "array",
  20602. "items": {
  20603. "type": "string"
  20604. }
  20605. },
  20606. "enabled_providers": {
  20607. "type": "array",
  20608. "items": {
  20609. "type": "string"
  20610. }
  20611. },
  20612. "model": {
  20613. "type": "string"
  20614. },
  20615. "small_model": {
  20616. "type": "string"
  20617. },
  20618. "default_agent": {
  20619. "type": "string"
  20620. },
  20621. "username": {
  20622. "type": "string"
  20623. },
  20624. "mode": {
  20625. "type": "object",
  20626. "properties": {
  20627. "build": {
  20628. "$ref": "#/components/schemas/AgentConfig"
  20629. },
  20630. "plan": {
  20631. "$ref": "#/components/schemas/AgentConfig"
  20632. }
  20633. },
  20634. "additionalProperties": {
  20635. "$ref": "#/components/schemas/AgentConfig"
  20636. }
  20637. },
  20638. "agent": {
  20639. "type": "object",
  20640. "properties": {
  20641. "plan": {
  20642. "$ref": "#/components/schemas/AgentConfig"
  20643. },
  20644. "build": {
  20645. "$ref": "#/components/schemas/AgentConfig"
  20646. },
  20647. "general": {
  20648. "$ref": "#/components/schemas/AgentConfig"
  20649. },
  20650. "explore": {
  20651. "$ref": "#/components/schemas/AgentConfig"
  20652. },
  20653. "title": {
  20654. "$ref": "#/components/schemas/AgentConfig"
  20655. },
  20656. "summary": {
  20657. "$ref": "#/components/schemas/AgentConfig"
  20658. },
  20659. "compaction": {
  20660. "$ref": "#/components/schemas/AgentConfig"
  20661. }
  20662. },
  20663. "additionalProperties": {
  20664. "$ref": "#/components/schemas/AgentConfig"
  20665. }
  20666. },
  20667. "provider": {
  20668. "type": "object",
  20669. "additionalProperties": {
  20670. "$ref": "#/components/schemas/ProviderConfig"
  20671. }
  20672. },
  20673. "mcp": {
  20674. "type": "object",
  20675. "additionalProperties": {
  20676. "anyOf": [
  20677. {
  20678. "$ref": "#/components/schemas/McpLocalConfig"
  20679. },
  20680. {
  20681. "$ref": "#/components/schemas/McpRemoteConfig"
  20682. },
  20683. {
  20684. "type": "object",
  20685. "properties": {
  20686. "enabled": {
  20687. "type": "boolean"
  20688. }
  20689. },
  20690. "required": ["enabled"],
  20691. "additionalProperties": false
  20692. }
  20693. ]
  20694. }
  20695. },
  20696. "formatter": {
  20697. "anyOf": [
  20698. {
  20699. "type": "boolean"
  20700. },
  20701. {
  20702. "type": "object",
  20703. "additionalProperties": {
  20704. "type": "object",
  20705. "properties": {
  20706. "disabled": {
  20707. "type": "boolean"
  20708. },
  20709. "command": {
  20710. "type": "array",
  20711. "items": {
  20712. "type": "string"
  20713. }
  20714. },
  20715. "environment": {
  20716. "type": "object",
  20717. "additionalProperties": {
  20718. "type": "string"
  20719. }
  20720. },
  20721. "extensions": {
  20722. "type": "array",
  20723. "items": {
  20724. "type": "string"
  20725. }
  20726. }
  20727. },
  20728. "additionalProperties": false
  20729. }
  20730. }
  20731. ],
  20732. "description": "Enable or configure formatters. Omit or set to false to disable, true to enable built-ins, or an object to enable built-ins with overrides."
  20733. },
  20734. "lsp": {
  20735. "anyOf": [
  20736. {
  20737. "type": "boolean"
  20738. },
  20739. {
  20740. "type": "object",
  20741. "additionalProperties": {
  20742. "anyOf": [
  20743. {
  20744. "type": "object",
  20745. "properties": {
  20746. "disabled": {
  20747. "type": "boolean",
  20748. "enum": [true]
  20749. }
  20750. },
  20751. "required": ["disabled"],
  20752. "additionalProperties": false
  20753. },
  20754. {
  20755. "type": "object",
  20756. "properties": {
  20757. "command": {
  20758. "type": "array",
  20759. "items": {
  20760. "type": "string"
  20761. }
  20762. },
  20763. "extensions": {
  20764. "type": "array",
  20765. "items": {
  20766. "type": "string"
  20767. }
  20768. },
  20769. "disabled": {
  20770. "type": "boolean"
  20771. },
  20772. "env": {
  20773. "type": "object",
  20774. "additionalProperties": {
  20775. "type": "string"
  20776. }
  20777. },
  20778. "initialization": {
  20779. "type": "object"
  20780. }
  20781. },
  20782. "required": ["command"],
  20783. "additionalProperties": false
  20784. }
  20785. ]
  20786. }
  20787. }
  20788. ],
  20789. "description": "Enable or configure LSP servers. Omit or set to false to disable, true to enable built-ins, or an object to enable built-ins with overrides."
  20790. },
  20791. "instructions": {
  20792. "type": "array",
  20793. "items": {
  20794. "type": "string"
  20795. }
  20796. },
  20797. "layout": {
  20798. "$ref": "#/components/schemas/LayoutConfig"
  20799. },
  20800. "permission": {
  20801. "$ref": "#/components/schemas/PermissionConfig"
  20802. },
  20803. "tools": {
  20804. "type": "object",
  20805. "additionalProperties": {
  20806. "type": "boolean"
  20807. }
  20808. },
  20809. "attachment": {
  20810. "$ref": "#/components/schemas/AttachmentConfig"
  20811. },
  20812. "enterprise": {
  20813. "type": "object",
  20814. "properties": {
  20815. "url": {
  20816. "type": "string"
  20817. }
  20818. },
  20819. "additionalProperties": false
  20820. },
  20821. "tool_output": {
  20822. "type": "object",
  20823. "properties": {
  20824. "max_lines": {
  20825. "type": "integer",
  20826. "exclusiveMinimum": 0
  20827. },
  20828. "max_bytes": {
  20829. "type": "integer",
  20830. "exclusiveMinimum": 0
  20831. }
  20832. },
  20833. "additionalProperties": false
  20834. },
  20835. "compaction": {
  20836. "type": "object",
  20837. "properties": {
  20838. "auto": {
  20839. "type": "boolean"
  20840. },
  20841. "prune": {
  20842. "type": "boolean"
  20843. },
  20844. "tail_turns": {
  20845. "type": "integer",
  20846. "minimum": 0
  20847. },
  20848. "preserve_recent_tokens": {
  20849. "type": "integer",
  20850. "minimum": 0
  20851. },
  20852. "reserved": {
  20853. "type": "integer",
  20854. "minimum": 0
  20855. }
  20856. },
  20857. "additionalProperties": false
  20858. },
  20859. "experimental": {
  20860. "type": "object",
  20861. "properties": {
  20862. "disable_paste_summary": {
  20863. "type": "boolean"
  20864. },
  20865. "batch_tool": {
  20866. "type": "boolean"
  20867. },
  20868. "openTelemetry": {
  20869. "type": "boolean"
  20870. },
  20871. "primary_tools": {
  20872. "type": "array",
  20873. "items": {
  20874. "type": "string"
  20875. }
  20876. },
  20877. "continue_loop_on_deny": {
  20878. "type": "boolean"
  20879. },
  20880. "mcp_timeout": {
  20881. "type": "integer",
  20882. "exclusiveMinimum": 0
  20883. },
  20884. "policies": {
  20885. "type": "array",
  20886. "items": {
  20887. "$ref": "#/components/schemas/ConfigV2ExperimentalPolicy"
  20888. }
  20889. }
  20890. },
  20891. "additionalProperties": false
  20892. }
  20893. },
  20894. "additionalProperties": false
  20895. },
  20896. "Model": {
  20897. "type": "object",
  20898. "properties": {
  20899. "id": {
  20900. "type": "string"
  20901. },
  20902. "providerID": {
  20903. "type": "string"
  20904. },
  20905. "api": {
  20906. "type": "object",
  20907. "properties": {
  20908. "id": {
  20909. "type": "string"
  20910. },
  20911. "url": {
  20912. "type": "string"
  20913. },
  20914. "npm": {
  20915. "type": "string"
  20916. }
  20917. },
  20918. "required": ["id", "url", "npm"],
  20919. "additionalProperties": false
  20920. },
  20921. "name": {
  20922. "type": "string"
  20923. },
  20924. "family": {
  20925. "type": "string"
  20926. },
  20927. "capabilities": {
  20928. "type": "object",
  20929. "properties": {
  20930. "temperature": {
  20931. "type": "boolean"
  20932. },
  20933. "reasoning": {
  20934. "type": "boolean"
  20935. },
  20936. "attachment": {
  20937. "type": "boolean"
  20938. },
  20939. "toolcall": {
  20940. "type": "boolean"
  20941. },
  20942. "input": {
  20943. "type": "object",
  20944. "properties": {
  20945. "text": {
  20946. "type": "boolean"
  20947. },
  20948. "audio": {
  20949. "type": "boolean"
  20950. },
  20951. "image": {
  20952. "type": "boolean"
  20953. },
  20954. "video": {
  20955. "type": "boolean"
  20956. },
  20957. "pdf": {
  20958. "type": "boolean"
  20959. }
  20960. },
  20961. "required": ["text", "audio", "image", "video", "pdf"],
  20962. "additionalProperties": false
  20963. },
  20964. "output": {
  20965. "type": "object",
  20966. "properties": {
  20967. "text": {
  20968. "type": "boolean"
  20969. },
  20970. "audio": {
  20971. "type": "boolean"
  20972. },
  20973. "image": {
  20974. "type": "boolean"
  20975. },
  20976. "video": {
  20977. "type": "boolean"
  20978. },
  20979. "pdf": {
  20980. "type": "boolean"
  20981. }
  20982. },
  20983. "required": ["text", "audio", "image", "video", "pdf"],
  20984. "additionalProperties": false
  20985. },
  20986. "interleaved": {
  20987. "anyOf": [
  20988. {
  20989. "type": "boolean"
  20990. },
  20991. {
  20992. "type": "object",
  20993. "properties": {
  20994. "field": {
  20995. "type": "string",
  20996. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  20997. }
  20998. },
  20999. "required": ["field"],
  21000. "additionalProperties": false
  21001. }
  21002. ]
  21003. }
  21004. },
  21005. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  21006. "additionalProperties": false
  21007. },
  21008. "cost": {
  21009. "type": "object",
  21010. "properties": {
  21011. "input": {
  21012. "type": "number"
  21013. },
  21014. "output": {
  21015. "type": "number"
  21016. },
  21017. "cache": {
  21018. "type": "object",
  21019. "properties": {
  21020. "read": {
  21021. "type": "number"
  21022. },
  21023. "write": {
  21024. "type": "number"
  21025. }
  21026. },
  21027. "required": ["read", "write"],
  21028. "additionalProperties": false
  21029. },
  21030. "tiers": {
  21031. "type": "array",
  21032. "items": {
  21033. "type": "object",
  21034. "properties": {
  21035. "input": {
  21036. "type": "number"
  21037. },
  21038. "output": {
  21039. "type": "number"
  21040. },
  21041. "cache": {
  21042. "type": "object",
  21043. "properties": {
  21044. "read": {
  21045. "type": "number"
  21046. },
  21047. "write": {
  21048. "type": "number"
  21049. }
  21050. },
  21051. "required": ["read", "write"],
  21052. "additionalProperties": false
  21053. },
  21054. "tier": {
  21055. "type": "object",
  21056. "properties": {
  21057. "type": {
  21058. "type": "string",
  21059. "enum": ["context"]
  21060. },
  21061. "size": {
  21062. "type": "number"
  21063. }
  21064. },
  21065. "required": ["type", "size"],
  21066. "additionalProperties": false
  21067. }
  21068. },
  21069. "required": ["input", "output", "cache", "tier"],
  21070. "additionalProperties": false
  21071. }
  21072. },
  21073. "experimentalOver200K": {
  21074. "type": "object",
  21075. "properties": {
  21076. "input": {
  21077. "type": "number"
  21078. },
  21079. "output": {
  21080. "type": "number"
  21081. },
  21082. "cache": {
  21083. "type": "object",
  21084. "properties": {
  21085. "read": {
  21086. "type": "number"
  21087. },
  21088. "write": {
  21089. "type": "number"
  21090. }
  21091. },
  21092. "required": ["read", "write"],
  21093. "additionalProperties": false
  21094. }
  21095. },
  21096. "required": ["input", "output", "cache"],
  21097. "additionalProperties": false
  21098. }
  21099. },
  21100. "required": ["input", "output", "cache"],
  21101. "additionalProperties": false
  21102. },
  21103. "limit": {
  21104. "type": "object",
  21105. "properties": {
  21106. "context": {
  21107. "type": "number"
  21108. },
  21109. "input": {
  21110. "type": "number"
  21111. },
  21112. "output": {
  21113. "type": "number"
  21114. }
  21115. },
  21116. "required": ["context", "output"],
  21117. "additionalProperties": false
  21118. },
  21119. "status": {
  21120. "type": "string",
  21121. "enum": ["alpha", "beta", "deprecated", "active"]
  21122. },
  21123. "options": {
  21124. "type": "object"
  21125. },
  21126. "headers": {
  21127. "type": "object",
  21128. "additionalProperties": {
  21129. "type": "string"
  21130. }
  21131. },
  21132. "release_date": {
  21133. "type": "string"
  21134. },
  21135. "variants": {
  21136. "type": "object",
  21137. "additionalProperties": {
  21138. "type": "object"
  21139. }
  21140. }
  21141. },
  21142. "required": [
  21143. "id",
  21144. "providerID",
  21145. "api",
  21146. "name",
  21147. "capabilities",
  21148. "cost",
  21149. "limit",
  21150. "status",
  21151. "options",
  21152. "headers",
  21153. "release_date"
  21154. ],
  21155. "additionalProperties": false
  21156. },
  21157. "Provider": {
  21158. "type": "object",
  21159. "properties": {
  21160. "id": {
  21161. "type": "string"
  21162. },
  21163. "name": {
  21164. "type": "string"
  21165. },
  21166. "source": {
  21167. "type": "string",
  21168. "enum": ["env", "config", "custom", "api"]
  21169. },
  21170. "env": {
  21171. "type": "array",
  21172. "items": {
  21173. "type": "string"
  21174. }
  21175. },
  21176. "key": {
  21177. "type": "string"
  21178. },
  21179. "options": {
  21180. "type": "object"
  21181. },
  21182. "models": {
  21183. "type": "object",
  21184. "additionalProperties": {
  21185. "$ref": "#/components/schemas/Model"
  21186. }
  21187. }
  21188. },
  21189. "required": ["id", "name", "source", "env", "options", "models"],
  21190. "additionalProperties": false
  21191. },
  21192. "ExperimentalCapabilities": {
  21193. "type": "object",
  21194. "properties": {
  21195. "backgroundSubagents": {
  21196. "type": "boolean"
  21197. }
  21198. },
  21199. "required": ["backgroundSubagents"],
  21200. "additionalProperties": false
  21201. },
  21202. "ConsoleState": {
  21203. "type": "object",
  21204. "properties": {
  21205. "consoleManagedProviders": {
  21206. "type": "array",
  21207. "items": {
  21208. "type": "string"
  21209. }
  21210. },
  21211. "activeOrgName": {
  21212. "type": "string"
  21213. },
  21214. "switchableOrgCount": {
  21215. "type": "integer",
  21216. "minimum": 0
  21217. }
  21218. },
  21219. "required": ["consoleManagedProviders", "switchableOrgCount"],
  21220. "additionalProperties": false
  21221. },
  21222. "effect_HttpApiError_InternalServerError": {
  21223. "type": "object",
  21224. "properties": {
  21225. "_tag": {
  21226. "type": "string",
  21227. "enum": ["InternalServerError"]
  21228. }
  21229. },
  21230. "required": ["_tag"],
  21231. "additionalProperties": false
  21232. },
  21233. "ToolListItem": {
  21234. "type": "object",
  21235. "properties": {
  21236. "id": {
  21237. "type": "string"
  21238. },
  21239. "description": {
  21240. "type": "string"
  21241. },
  21242. "parameters": {}
  21243. },
  21244. "required": ["id", "description", "parameters"],
  21245. "additionalProperties": false
  21246. },
  21247. "ToolList": {
  21248. "type": "array",
  21249. "items": {
  21250. "$ref": "#/components/schemas/ToolListItem"
  21251. }
  21252. },
  21253. "ToolIDs": {
  21254. "type": "array",
  21255. "items": {
  21256. "type": "string"
  21257. }
  21258. },
  21259. "WorktreeError": {
  21260. "type": "object",
  21261. "properties": {
  21262. "name": {
  21263. "type": "string",
  21264. "enum": [
  21265. "WorktreeNotGitError",
  21266. "WorktreeNameGenerationFailedError",
  21267. "WorktreeCreateFailedError",
  21268. "WorktreeStartCommandFailedError",
  21269. "WorktreeRemoveFailedError",
  21270. "WorktreeResetFailedError",
  21271. "WorktreeListFailedError"
  21272. ]
  21273. },
  21274. "data": {
  21275. "type": "object",
  21276. "properties": {
  21277. "message": {
  21278. "type": "string"
  21279. }
  21280. },
  21281. "required": ["message"],
  21282. "additionalProperties": false
  21283. }
  21284. },
  21285. "required": ["name", "data"],
  21286. "additionalProperties": false
  21287. },
  21288. "WorktreeCreateInput": {
  21289. "type": "object",
  21290. "properties": {
  21291. "name": {
  21292. "type": "string"
  21293. },
  21294. "startCommand": {
  21295. "type": "string",
  21296. "description": "Additional startup script to run after the project's start command"
  21297. }
  21298. },
  21299. "additionalProperties": false
  21300. },
  21301. "Worktree": {
  21302. "type": "object",
  21303. "properties": {
  21304. "name": {
  21305. "type": "string"
  21306. },
  21307. "branch": {
  21308. "type": "string"
  21309. },
  21310. "directory": {
  21311. "type": "string"
  21312. }
  21313. },
  21314. "required": ["name", "directory"],
  21315. "additionalProperties": false
  21316. },
  21317. "WorktreeRemoveInput": {
  21318. "type": "object",
  21319. "properties": {
  21320. "directory": {
  21321. "type": "string"
  21322. }
  21323. },
  21324. "required": ["directory"],
  21325. "additionalProperties": false
  21326. },
  21327. "WorktreeResetInput": {
  21328. "type": "object",
  21329. "properties": {
  21330. "directory": {
  21331. "type": "string"
  21332. }
  21333. },
  21334. "required": ["directory"],
  21335. "additionalProperties": false
  21336. },
  21337. "ProjectSummary": {
  21338. "type": "object",
  21339. "properties": {
  21340. "id": {
  21341. "type": "string"
  21342. },
  21343. "name": {
  21344. "type": "string"
  21345. },
  21346. "worktree": {
  21347. "type": "string"
  21348. }
  21349. },
  21350. "required": ["id", "worktree"],
  21351. "additionalProperties": false
  21352. },
  21353. "GlobalSession": {
  21354. "type": "object",
  21355. "properties": {
  21356. "id": {
  21357. "type": "string",
  21358. "pattern": "^ses"
  21359. },
  21360. "slug": {
  21361. "type": "string"
  21362. },
  21363. "projectID": {
  21364. "type": "string"
  21365. },
  21366. "workspaceID": {
  21367. "type": "string",
  21368. "pattern": "^wrk"
  21369. },
  21370. "directory": {
  21371. "type": "string"
  21372. },
  21373. "path": {
  21374. "type": "string"
  21375. },
  21376. "parentID": {
  21377. "type": "string",
  21378. "pattern": "^ses"
  21379. },
  21380. "summary": {
  21381. "type": "object",
  21382. "properties": {
  21383. "additions": {
  21384. "type": "number"
  21385. },
  21386. "deletions": {
  21387. "type": "number"
  21388. },
  21389. "files": {
  21390. "type": "number"
  21391. },
  21392. "diffs": {
  21393. "type": "array",
  21394. "items": {
  21395. "$ref": "#/components/schemas/SnapshotFileDiff"
  21396. }
  21397. }
  21398. },
  21399. "required": ["additions", "deletions", "files"],
  21400. "additionalProperties": false
  21401. },
  21402. "cost": {
  21403. "type": "number"
  21404. },
  21405. "tokens": {
  21406. "type": "object",
  21407. "properties": {
  21408. "input": {
  21409. "type": "number"
  21410. },
  21411. "output": {
  21412. "type": "number"
  21413. },
  21414. "reasoning": {
  21415. "type": "number"
  21416. },
  21417. "cache": {
  21418. "type": "object",
  21419. "properties": {
  21420. "read": {
  21421. "type": "number"
  21422. },
  21423. "write": {
  21424. "type": "number"
  21425. }
  21426. },
  21427. "required": ["read", "write"],
  21428. "additionalProperties": false
  21429. }
  21430. },
  21431. "required": ["input", "output", "reasoning", "cache"],
  21432. "additionalProperties": false
  21433. },
  21434. "share": {
  21435. "type": "object",
  21436. "properties": {
  21437. "url": {
  21438. "type": "string"
  21439. }
  21440. },
  21441. "required": ["url"],
  21442. "additionalProperties": false
  21443. },
  21444. "title": {
  21445. "type": "string"
  21446. },
  21447. "agent": {
  21448. "type": "string"
  21449. },
  21450. "model": {
  21451. "type": "object",
  21452. "properties": {
  21453. "id": {
  21454. "type": "string"
  21455. },
  21456. "providerID": {
  21457. "type": "string"
  21458. },
  21459. "variant": {
  21460. "type": "string"
  21461. }
  21462. },
  21463. "required": ["id", "providerID"],
  21464. "additionalProperties": false
  21465. },
  21466. "version": {
  21467. "type": "string"
  21468. },
  21469. "metadata": {
  21470. "type": "object"
  21471. },
  21472. "time": {
  21473. "type": "object",
  21474. "properties": {
  21475. "created": {
  21476. "type": "integer",
  21477. "minimum": 0
  21478. },
  21479. "updated": {
  21480. "type": "integer",
  21481. "minimum": 0
  21482. },
  21483. "compacting": {
  21484. "type": "integer",
  21485. "minimum": 0
  21486. },
  21487. "archived": {
  21488. "type": "number"
  21489. }
  21490. },
  21491. "required": ["created", "updated"],
  21492. "additionalProperties": false
  21493. },
  21494. "permission": {
  21495. "$ref": "#/components/schemas/PermissionRuleset"
  21496. },
  21497. "revert": {
  21498. "type": "object",
  21499. "properties": {
  21500. "messageID": {
  21501. "type": "string",
  21502. "pattern": "^msg"
  21503. },
  21504. "partID": {
  21505. "type": "string",
  21506. "pattern": "^prt"
  21507. },
  21508. "snapshot": {
  21509. "type": "string"
  21510. },
  21511. "diff": {
  21512. "type": "string"
  21513. }
  21514. },
  21515. "required": ["messageID"],
  21516. "additionalProperties": false
  21517. },
  21518. "project": {
  21519. "anyOf": [
  21520. {
  21521. "$ref": "#/components/schemas/ProjectSummary"
  21522. },
  21523. {
  21524. "type": "null"
  21525. }
  21526. ]
  21527. }
  21528. },
  21529. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  21530. "additionalProperties": false
  21531. },
  21532. "McpResource": {
  21533. "type": "object",
  21534. "properties": {
  21535. "name": {
  21536. "type": "string"
  21537. },
  21538. "uri": {
  21539. "type": "string"
  21540. },
  21541. "description": {
  21542. "type": "string"
  21543. },
  21544. "mimeType": {
  21545. "type": "string"
  21546. },
  21547. "client": {
  21548. "type": "string"
  21549. }
  21550. },
  21551. "required": ["name", "uri", "client"],
  21552. "additionalProperties": false
  21553. },
  21554. "Symbol": {
  21555. "type": "object",
  21556. "properties": {
  21557. "name": {
  21558. "type": "string"
  21559. },
  21560. "kind": {
  21561. "type": "integer",
  21562. "minimum": 0
  21563. },
  21564. "location": {
  21565. "type": "object",
  21566. "properties": {
  21567. "uri": {
  21568. "type": "string"
  21569. },
  21570. "range": {
  21571. "$ref": "#/components/schemas/Range"
  21572. }
  21573. },
  21574. "required": ["uri", "range"],
  21575. "additionalProperties": false
  21576. }
  21577. },
  21578. "required": ["name", "kind", "location"],
  21579. "additionalProperties": false
  21580. },
  21581. "FileNode": {
  21582. "type": "object",
  21583. "properties": {
  21584. "name": {
  21585. "type": "string"
  21586. },
  21587. "path": {
  21588. "type": "string"
  21589. },
  21590. "absolute": {
  21591. "type": "string"
  21592. },
  21593. "type": {
  21594. "type": "string",
  21595. "enum": ["file", "directory"]
  21596. },
  21597. "ignored": {
  21598. "type": "boolean"
  21599. }
  21600. },
  21601. "required": ["name", "path", "absolute", "type", "ignored"],
  21602. "additionalProperties": false
  21603. },
  21604. "FileContent": {
  21605. "type": "object",
  21606. "properties": {
  21607. "type": {
  21608. "type": "string",
  21609. "enum": ["text", "binary"]
  21610. },
  21611. "content": {
  21612. "type": "string"
  21613. },
  21614. "diff": {
  21615. "type": "string"
  21616. },
  21617. "patch": {
  21618. "type": "object",
  21619. "properties": {
  21620. "oldFileName": {
  21621. "type": "string"
  21622. },
  21623. "newFileName": {
  21624. "type": "string"
  21625. },
  21626. "oldHeader": {
  21627. "type": "string"
  21628. },
  21629. "newHeader": {
  21630. "type": "string"
  21631. },
  21632. "hunks": {
  21633. "type": "array",
  21634. "items": {
  21635. "type": "object",
  21636. "properties": {
  21637. "oldStart": {
  21638. "type": "integer",
  21639. "minimum": 0
  21640. },
  21641. "oldLines": {
  21642. "type": "integer",
  21643. "minimum": 0
  21644. },
  21645. "newStart": {
  21646. "type": "integer",
  21647. "minimum": 0
  21648. },
  21649. "newLines": {
  21650. "type": "integer",
  21651. "minimum": 0
  21652. },
  21653. "lines": {
  21654. "type": "array",
  21655. "items": {
  21656. "type": "string"
  21657. }
  21658. }
  21659. },
  21660. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  21661. "additionalProperties": false
  21662. }
  21663. },
  21664. "index": {
  21665. "type": "string"
  21666. }
  21667. },
  21668. "required": ["oldFileName", "newFileName", "hunks"],
  21669. "additionalProperties": false
  21670. },
  21671. "encoding": {
  21672. "type": "string",
  21673. "enum": ["base64"]
  21674. },
  21675. "mimeType": {
  21676. "type": "string"
  21677. }
  21678. },
  21679. "required": ["type", "content"],
  21680. "additionalProperties": false
  21681. },
  21682. "File": {
  21683. "type": "object",
  21684. "properties": {
  21685. "path": {
  21686. "type": "string"
  21687. },
  21688. "added": {
  21689. "type": "integer",
  21690. "minimum": 0
  21691. },
  21692. "removed": {
  21693. "type": "integer",
  21694. "minimum": 0
  21695. },
  21696. "status": {
  21697. "type": "string",
  21698. "enum": ["added", "deleted", "modified"]
  21699. }
  21700. },
  21701. "required": ["path", "added", "removed", "status"],
  21702. "additionalProperties": false
  21703. },
  21704. "Path": {
  21705. "type": "object",
  21706. "properties": {
  21707. "home": {
  21708. "type": "string"
  21709. },
  21710. "state": {
  21711. "type": "string"
  21712. },
  21713. "config": {
  21714. "type": "string"
  21715. },
  21716. "worktree": {
  21717. "type": "string"
  21718. },
  21719. "directory": {
  21720. "type": "string"
  21721. }
  21722. },
  21723. "required": ["home", "state", "config", "worktree", "directory"],
  21724. "additionalProperties": false
  21725. },
  21726. "VcsInfo": {
  21727. "type": "object",
  21728. "properties": {
  21729. "branch": {
  21730. "type": "string"
  21731. },
  21732. "default_branch": {
  21733. "type": "string"
  21734. }
  21735. },
  21736. "additionalProperties": false
  21737. },
  21738. "VcsFileStatus": {
  21739. "type": "object",
  21740. "properties": {
  21741. "file": {
  21742. "type": "string"
  21743. },
  21744. "additions": {
  21745. "type": "number"
  21746. },
  21747. "deletions": {
  21748. "type": "number"
  21749. },
  21750. "status": {
  21751. "type": "string",
  21752. "enum": ["added", "deleted", "modified"]
  21753. }
  21754. },
  21755. "required": ["file", "additions", "deletions", "status"],
  21756. "additionalProperties": false
  21757. },
  21758. "VcsFileDiff": {
  21759. "type": "object",
  21760. "properties": {
  21761. "file": {
  21762. "type": "string"
  21763. },
  21764. "patch": {
  21765. "type": "string"
  21766. },
  21767. "additions": {
  21768. "type": "number"
  21769. },
  21770. "deletions": {
  21771. "type": "number"
  21772. },
  21773. "status": {
  21774. "type": "string",
  21775. "enum": ["added", "deleted", "modified"]
  21776. }
  21777. },
  21778. "required": ["file", "additions", "deletions"],
  21779. "additionalProperties": false
  21780. },
  21781. "VcsApplyError": {
  21782. "type": "object",
  21783. "properties": {
  21784. "name": {
  21785. "type": "string",
  21786. "enum": ["VcsApplyError"]
  21787. },
  21788. "data": {
  21789. "type": "object",
  21790. "properties": {
  21791. "message": {
  21792. "type": "string"
  21793. },
  21794. "reason": {
  21795. "type": "string",
  21796. "enum": ["non-git", "not-clean"]
  21797. }
  21798. },
  21799. "required": ["message", "reason"],
  21800. "additionalProperties": false
  21801. }
  21802. },
  21803. "required": ["name", "data"],
  21804. "additionalProperties": false
  21805. },
  21806. "Command": {
  21807. "type": "object",
  21808. "properties": {
  21809. "name": {
  21810. "type": "string"
  21811. },
  21812. "description": {
  21813. "type": "string"
  21814. },
  21815. "agent": {
  21816. "type": "string"
  21817. },
  21818. "model": {
  21819. "type": "string"
  21820. },
  21821. "source": {
  21822. "type": "string",
  21823. "enum": ["command", "mcp", "skill"]
  21824. },
  21825. "template": {
  21826. "type": "string"
  21827. },
  21828. "subtask": {
  21829. "type": "boolean"
  21830. },
  21831. "hints": {
  21832. "type": "array",
  21833. "items": {
  21834. "type": "string"
  21835. }
  21836. }
  21837. },
  21838. "required": ["name", "template", "hints"],
  21839. "additionalProperties": false
  21840. },
  21841. "Agent": {
  21842. "type": "object",
  21843. "properties": {
  21844. "name": {
  21845. "type": "string"
  21846. },
  21847. "description": {
  21848. "type": "string"
  21849. },
  21850. "mode": {
  21851. "type": "string",
  21852. "enum": ["subagent", "primary", "all"]
  21853. },
  21854. "native": {
  21855. "type": "boolean"
  21856. },
  21857. "hidden": {
  21858. "type": "boolean"
  21859. },
  21860. "topP": {
  21861. "type": "number"
  21862. },
  21863. "temperature": {
  21864. "type": "number"
  21865. },
  21866. "color": {
  21867. "type": "string"
  21868. },
  21869. "permission": {
  21870. "$ref": "#/components/schemas/PermissionRuleset"
  21871. },
  21872. "model": {
  21873. "type": "object",
  21874. "properties": {
  21875. "modelID": {
  21876. "type": "string"
  21877. },
  21878. "providerID": {
  21879. "type": "string"
  21880. }
  21881. },
  21882. "required": ["modelID", "providerID"],
  21883. "additionalProperties": false
  21884. },
  21885. "variant": {
  21886. "type": "string"
  21887. },
  21888. "prompt": {
  21889. "type": "string"
  21890. },
  21891. "options": {
  21892. "type": "object"
  21893. },
  21894. "steps": {
  21895. "type": "number"
  21896. }
  21897. },
  21898. "required": ["name", "mode", "permission", "options"],
  21899. "additionalProperties": false
  21900. },
  21901. "LSPStatus": {
  21902. "type": "object",
  21903. "properties": {
  21904. "id": {
  21905. "type": "string"
  21906. },
  21907. "name": {
  21908. "type": "string"
  21909. },
  21910. "root": {
  21911. "type": "string"
  21912. },
  21913. "status": {
  21914. "type": "string",
  21915. "enum": ["connected", "error"]
  21916. }
  21917. },
  21918. "required": ["id", "name", "root", "status"],
  21919. "additionalProperties": false
  21920. },
  21921. "FormatterStatus": {
  21922. "type": "object",
  21923. "properties": {
  21924. "name": {
  21925. "type": "string"
  21926. },
  21927. "extensions": {
  21928. "type": "array",
  21929. "items": {
  21930. "type": "string"
  21931. }
  21932. },
  21933. "enabled": {
  21934. "type": "boolean"
  21935. }
  21936. },
  21937. "required": ["name", "extensions", "enabled"],
  21938. "additionalProperties": false
  21939. },
  21940. "MCPStatusConnected": {
  21941. "type": "object",
  21942. "properties": {
  21943. "status": {
  21944. "type": "string",
  21945. "enum": ["connected"]
  21946. }
  21947. },
  21948. "required": ["status"],
  21949. "additionalProperties": false
  21950. },
  21951. "MCPStatusDisabled": {
  21952. "type": "object",
  21953. "properties": {
  21954. "status": {
  21955. "type": "string",
  21956. "enum": ["disabled"]
  21957. }
  21958. },
  21959. "required": ["status"],
  21960. "additionalProperties": false
  21961. },
  21962. "MCPStatusFailed": {
  21963. "type": "object",
  21964. "properties": {
  21965. "status": {
  21966. "type": "string",
  21967. "enum": ["failed"]
  21968. },
  21969. "error": {
  21970. "type": "string"
  21971. }
  21972. },
  21973. "required": ["status", "error"],
  21974. "additionalProperties": false
  21975. },
  21976. "MCPStatusNeedsAuth": {
  21977. "type": "object",
  21978. "properties": {
  21979. "status": {
  21980. "type": "string",
  21981. "enum": ["needs_auth"]
  21982. }
  21983. },
  21984. "required": ["status"],
  21985. "additionalProperties": false
  21986. },
  21987. "MCPStatusNeedsClientRegistration": {
  21988. "type": "object",
  21989. "properties": {
  21990. "status": {
  21991. "type": "string",
  21992. "enum": ["needs_client_registration"]
  21993. },
  21994. "error": {
  21995. "type": "string"
  21996. }
  21997. },
  21998. "required": ["status", "error"],
  21999. "additionalProperties": false
  22000. },
  22001. "MCPStatus": {
  22002. "anyOf": [
  22003. {
  22004. "$ref": "#/components/schemas/MCPStatusConnected"
  22005. },
  22006. {
  22007. "$ref": "#/components/schemas/MCPStatusDisabled"
  22008. },
  22009. {
  22010. "$ref": "#/components/schemas/MCPStatusFailed"
  22011. },
  22012. {
  22013. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  22014. },
  22015. {
  22016. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  22017. }
  22018. ]
  22019. },
  22020. "McpUnsupportedOAuthError": {
  22021. "type": "object",
  22022. "properties": {
  22023. "error": {
  22024. "type": "string"
  22025. }
  22026. },
  22027. "required": ["error"],
  22028. "additionalProperties": false
  22029. },
  22030. "McpServerNotFoundError": {
  22031. "type": "object",
  22032. "properties": {
  22033. "_tag": {
  22034. "type": "string",
  22035. "enum": ["McpServerNotFoundError"]
  22036. },
  22037. "name": {
  22038. "type": "string"
  22039. },
  22040. "message": {
  22041. "type": "string"
  22042. }
  22043. },
  22044. "required": ["_tag", "name", "message"],
  22045. "additionalProperties": false
  22046. },
  22047. "Project": {
  22048. "type": "object",
  22049. "properties": {
  22050. "id": {
  22051. "type": "string"
  22052. },
  22053. "worktree": {
  22054. "type": "string"
  22055. },
  22056. "vcs": {
  22057. "type": "string",
  22058. "enum": ["git"]
  22059. },
  22060. "name": {
  22061. "type": "string"
  22062. },
  22063. "icon": {
  22064. "type": "object",
  22065. "properties": {
  22066. "url": {
  22067. "type": "string"
  22068. },
  22069. "override": {
  22070. "type": "string"
  22071. },
  22072. "color": {
  22073. "type": "string"
  22074. }
  22075. },
  22076. "additionalProperties": false
  22077. },
  22078. "commands": {
  22079. "type": "object",
  22080. "properties": {
  22081. "start": {
  22082. "type": "string",
  22083. "description": "Startup script to run when creating a new workspace (worktree)"
  22084. }
  22085. },
  22086. "additionalProperties": false
  22087. },
  22088. "time": {
  22089. "type": "object",
  22090. "properties": {
  22091. "created": {
  22092. "type": "integer",
  22093. "minimum": 0
  22094. },
  22095. "updated": {
  22096. "type": "integer",
  22097. "minimum": 0
  22098. },
  22099. "initialized": {
  22100. "type": "integer",
  22101. "minimum": 0
  22102. }
  22103. },
  22104. "required": ["created", "updated"],
  22105. "additionalProperties": false
  22106. },
  22107. "sandboxes": {
  22108. "type": "array",
  22109. "items": {
  22110. "type": "string"
  22111. }
  22112. }
  22113. },
  22114. "required": ["id", "worktree", "time", "sandboxes"],
  22115. "additionalProperties": false
  22116. },
  22117. "ProjectNotFoundError": {
  22118. "type": "object",
  22119. "properties": {
  22120. "_tag": {
  22121. "type": "string",
  22122. "enum": ["ProjectNotFoundError"]
  22123. },
  22124. "projectID": {
  22125. "type": "string"
  22126. },
  22127. "message": {
  22128. "type": "string"
  22129. }
  22130. },
  22131. "required": ["_tag", "projectID", "message"],
  22132. "additionalProperties": false
  22133. },
  22134. "PtyNotFoundError": {
  22135. "type": "object",
  22136. "properties": {
  22137. "_tag": {
  22138. "type": "string",
  22139. "enum": ["PtyNotFoundError"]
  22140. },
  22141. "ptyID": {
  22142. "type": "string"
  22143. },
  22144. "message": {
  22145. "type": "string"
  22146. }
  22147. },
  22148. "required": ["_tag", "ptyID", "message"],
  22149. "additionalProperties": false
  22150. },
  22151. "PtyForbiddenError": {
  22152. "type": "object",
  22153. "properties": {
  22154. "_tag": {
  22155. "type": "string",
  22156. "enum": ["PtyForbiddenError"]
  22157. },
  22158. "message": {
  22159. "type": "string"
  22160. }
  22161. },
  22162. "required": ["_tag", "message"],
  22163. "additionalProperties": false
  22164. },
  22165. "QuestionRequest": {
  22166. "type": "object",
  22167. "properties": {
  22168. "id": {
  22169. "type": "string",
  22170. "pattern": "^que"
  22171. },
  22172. "sessionID": {
  22173. "type": "string",
  22174. "pattern": "^ses"
  22175. },
  22176. "questions": {
  22177. "type": "array",
  22178. "items": {
  22179. "$ref": "#/components/schemas/QuestionInfo"
  22180. },
  22181. "description": "Questions to ask"
  22182. },
  22183. "tool": {
  22184. "$ref": "#/components/schemas/QuestionTool"
  22185. }
  22186. },
  22187. "required": ["id", "sessionID", "questions"],
  22188. "additionalProperties": false
  22189. },
  22190. "QuestionNotFoundError": {
  22191. "type": "object",
  22192. "properties": {
  22193. "_tag": {
  22194. "type": "string",
  22195. "enum": ["QuestionNotFoundError"]
  22196. },
  22197. "requestID": {
  22198. "type": "string"
  22199. },
  22200. "message": {
  22201. "type": "string"
  22202. }
  22203. },
  22204. "required": ["_tag", "requestID", "message"],
  22205. "additionalProperties": false
  22206. },
  22207. "PermissionRequest": {
  22208. "type": "object",
  22209. "properties": {
  22210. "id": {
  22211. "type": "string",
  22212. "pattern": "^per"
  22213. },
  22214. "sessionID": {
  22215. "type": "string",
  22216. "pattern": "^ses"
  22217. },
  22218. "permission": {
  22219. "type": "string"
  22220. },
  22221. "patterns": {
  22222. "type": "array",
  22223. "items": {
  22224. "type": "string"
  22225. }
  22226. },
  22227. "metadata": {
  22228. "type": "object"
  22229. },
  22230. "always": {
  22231. "type": "array",
  22232. "items": {
  22233. "type": "string"
  22234. }
  22235. },
  22236. "tool": {
  22237. "type": "object",
  22238. "properties": {
  22239. "messageID": {
  22240. "type": "string"
  22241. },
  22242. "callID": {
  22243. "type": "string"
  22244. }
  22245. },
  22246. "required": ["messageID", "callID"],
  22247. "additionalProperties": false
  22248. }
  22249. },
  22250. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  22251. "additionalProperties": false
  22252. },
  22253. "PermissionNotFoundError": {
  22254. "type": "object",
  22255. "properties": {
  22256. "_tag": {
  22257. "type": "string",
  22258. "enum": ["PermissionNotFoundError"]
  22259. },
  22260. "requestID": {
  22261. "type": "string"
  22262. },
  22263. "message": {
  22264. "type": "string"
  22265. }
  22266. },
  22267. "required": ["_tag", "requestID", "message"],
  22268. "additionalProperties": false
  22269. },
  22270. "ProviderAuthMethod": {
  22271. "type": "object",
  22272. "properties": {
  22273. "type": {
  22274. "type": "string",
  22275. "enum": ["oauth", "api"]
  22276. },
  22277. "label": {
  22278. "type": "string"
  22279. },
  22280. "prompts": {
  22281. "type": "array",
  22282. "items": {
  22283. "anyOf": [
  22284. {
  22285. "type": "object",
  22286. "properties": {
  22287. "type": {
  22288. "type": "string",
  22289. "enum": ["text"]
  22290. },
  22291. "key": {
  22292. "type": "string"
  22293. },
  22294. "message": {
  22295. "type": "string"
  22296. },
  22297. "placeholder": {
  22298. "type": "string"
  22299. },
  22300. "when": {
  22301. "type": "object",
  22302. "properties": {
  22303. "key": {
  22304. "type": "string"
  22305. },
  22306. "op": {
  22307. "type": "string",
  22308. "enum": ["eq", "neq"]
  22309. },
  22310. "value": {
  22311. "type": "string"
  22312. }
  22313. },
  22314. "required": ["key", "op", "value"],
  22315. "additionalProperties": false
  22316. }
  22317. },
  22318. "required": ["type", "key", "message"],
  22319. "additionalProperties": false
  22320. },
  22321. {
  22322. "type": "object",
  22323. "properties": {
  22324. "type": {
  22325. "type": "string",
  22326. "enum": ["select"]
  22327. },
  22328. "key": {
  22329. "type": "string"
  22330. },
  22331. "message": {
  22332. "type": "string"
  22333. },
  22334. "options": {
  22335. "type": "array",
  22336. "items": {
  22337. "type": "object",
  22338. "properties": {
  22339. "label": {
  22340. "type": "string"
  22341. },
  22342. "value": {
  22343. "type": "string"
  22344. },
  22345. "hint": {
  22346. "type": "string"
  22347. }
  22348. },
  22349. "required": ["label", "value"],
  22350. "additionalProperties": false
  22351. }
  22352. },
  22353. "when": {
  22354. "type": "object",
  22355. "properties": {
  22356. "key": {
  22357. "type": "string"
  22358. },
  22359. "op": {
  22360. "type": "string",
  22361. "enum": ["eq", "neq"]
  22362. },
  22363. "value": {
  22364. "type": "string"
  22365. }
  22366. },
  22367. "required": ["key", "op", "value"],
  22368. "additionalProperties": false
  22369. }
  22370. },
  22371. "required": ["type", "key", "message", "options"],
  22372. "additionalProperties": false
  22373. }
  22374. ]
  22375. }
  22376. }
  22377. },
  22378. "required": ["type", "label"],
  22379. "additionalProperties": false
  22380. },
  22381. "ProviderAuthAuthorization": {
  22382. "type": "object",
  22383. "properties": {
  22384. "url": {
  22385. "type": "string"
  22386. },
  22387. "method": {
  22388. "type": "string",
  22389. "enum": ["auto", "code"]
  22390. },
  22391. "instructions": {
  22392. "type": "string"
  22393. }
  22394. },
  22395. "required": ["url", "method", "instructions"],
  22396. "additionalProperties": false
  22397. },
  22398. "ProviderAuthError1": {
  22399. "type": "object",
  22400. "properties": {
  22401. "name": {
  22402. "type": "string",
  22403. "enum": [
  22404. "BadRequest",
  22405. "ProviderAuthOauthMissing",
  22406. "ProviderAuthOauthCodeMissing",
  22407. "ProviderAuthOauthCallbackFailed",
  22408. "ProviderAuthValidationFailed"
  22409. ]
  22410. },
  22411. "data": {
  22412. "type": "object",
  22413. "properties": {
  22414. "providerID": {
  22415. "type": "string"
  22416. },
  22417. "field": {
  22418. "type": "string"
  22419. },
  22420. "message": {
  22421. "type": "string"
  22422. },
  22423. "kind": {
  22424. "type": "string"
  22425. }
  22426. },
  22427. "additionalProperties": false
  22428. }
  22429. },
  22430. "required": ["name", "data"],
  22431. "additionalProperties": false
  22432. },
  22433. "NotFoundError": {
  22434. "type": "object",
  22435. "required": ["name", "data"],
  22436. "properties": {
  22437. "name": {
  22438. "type": "string",
  22439. "enum": ["NotFoundError"]
  22440. },
  22441. "data": {
  22442. "type": "object",
  22443. "required": ["message"],
  22444. "properties": {
  22445. "message": {
  22446. "type": "string"
  22447. }
  22448. }
  22449. }
  22450. }
  22451. },
  22452. "TextPartInput": {
  22453. "type": "object",
  22454. "properties": {
  22455. "id": {
  22456. "type": "string",
  22457. "pattern": "^prt"
  22458. },
  22459. "type": {
  22460. "type": "string",
  22461. "enum": ["text"]
  22462. },
  22463. "text": {
  22464. "type": "string"
  22465. },
  22466. "synthetic": {
  22467. "type": "boolean"
  22468. },
  22469. "ignored": {
  22470. "type": "boolean"
  22471. },
  22472. "time": {
  22473. "type": "object",
  22474. "properties": {
  22475. "start": {
  22476. "type": "integer",
  22477. "minimum": 0
  22478. },
  22479. "end": {
  22480. "type": "integer",
  22481. "minimum": 0
  22482. }
  22483. },
  22484. "required": ["start"],
  22485. "additionalProperties": false
  22486. },
  22487. "metadata": {
  22488. "type": "object"
  22489. }
  22490. },
  22491. "required": ["type", "text"],
  22492. "additionalProperties": false
  22493. },
  22494. "FilePartInput": {
  22495. "type": "object",
  22496. "properties": {
  22497. "id": {
  22498. "type": "string",
  22499. "pattern": "^prt"
  22500. },
  22501. "type": {
  22502. "type": "string",
  22503. "enum": ["file"]
  22504. },
  22505. "mime": {
  22506. "type": "string"
  22507. },
  22508. "filename": {
  22509. "type": "string"
  22510. },
  22511. "url": {
  22512. "type": "string"
  22513. },
  22514. "source": {
  22515. "$ref": "#/components/schemas/FilePartSource"
  22516. }
  22517. },
  22518. "required": ["type", "mime", "url"],
  22519. "additionalProperties": false
  22520. },
  22521. "AgentPartInput": {
  22522. "type": "object",
  22523. "properties": {
  22524. "id": {
  22525. "type": "string",
  22526. "pattern": "^prt"
  22527. },
  22528. "type": {
  22529. "type": "string",
  22530. "enum": ["agent"]
  22531. },
  22532. "name": {
  22533. "type": "string"
  22534. },
  22535. "source": {
  22536. "type": "object",
  22537. "properties": {
  22538. "value": {
  22539. "type": "string"
  22540. },
  22541. "start": {
  22542. "type": "integer",
  22543. "minimum": 0
  22544. },
  22545. "end": {
  22546. "type": "integer",
  22547. "minimum": 0
  22548. }
  22549. },
  22550. "required": ["value", "start", "end"],
  22551. "additionalProperties": false
  22552. }
  22553. },
  22554. "required": ["type", "name"],
  22555. "additionalProperties": false
  22556. },
  22557. "SubtaskPartInput": {
  22558. "type": "object",
  22559. "properties": {
  22560. "id": {
  22561. "type": "string",
  22562. "pattern": "^prt"
  22563. },
  22564. "type": {
  22565. "type": "string",
  22566. "enum": ["subtask"]
  22567. },
  22568. "prompt": {
  22569. "type": "string"
  22570. },
  22571. "description": {
  22572. "type": "string"
  22573. },
  22574. "agent": {
  22575. "type": "string"
  22576. },
  22577. "model": {
  22578. "type": "object",
  22579. "properties": {
  22580. "providerID": {
  22581. "type": "string"
  22582. },
  22583. "modelID": {
  22584. "type": "string"
  22585. }
  22586. },
  22587. "required": ["providerID", "modelID"],
  22588. "additionalProperties": false
  22589. },
  22590. "command": {
  22591. "type": "string"
  22592. }
  22593. },
  22594. "required": ["type", "prompt", "description", "agent"],
  22595. "additionalProperties": false
  22596. },
  22597. "SessionBusyError": {
  22598. "type": "object",
  22599. "properties": {
  22600. "_tag": {
  22601. "type": "string",
  22602. "enum": ["SessionBusyError"]
  22603. },
  22604. "sessionID": {
  22605. "type": "string"
  22606. },
  22607. "message": {
  22608. "type": "string"
  22609. }
  22610. },
  22611. "required": ["_tag", "sessionID", "message"],
  22612. "additionalProperties": false
  22613. },
  22614. "EventTuiPromptAppend": {
  22615. "type": "object",
  22616. "properties": {
  22617. "type": {
  22618. "type": "string",
  22619. "enum": ["tui.prompt.append"]
  22620. },
  22621. "properties": {
  22622. "type": "object",
  22623. "properties": {
  22624. "text": {
  22625. "type": "string"
  22626. }
  22627. },
  22628. "required": ["text"],
  22629. "additionalProperties": false
  22630. }
  22631. },
  22632. "required": ["type", "properties"],
  22633. "additionalProperties": false
  22634. },
  22635. "EventTuiCommandExecute": {
  22636. "type": "object",
  22637. "properties": {
  22638. "type": {
  22639. "type": "string",
  22640. "enum": ["tui.command.execute"]
  22641. },
  22642. "properties": {
  22643. "type": "object",
  22644. "properties": {
  22645. "command": {
  22646. "anyOf": [
  22647. {
  22648. "type": "string",
  22649. "enum": [
  22650. "session.list",
  22651. "session.new",
  22652. "session.share",
  22653. "session.interrupt",
  22654. "session.compact",
  22655. "session.page.up",
  22656. "session.page.down",
  22657. "session.line.up",
  22658. "session.line.down",
  22659. "session.half.page.up",
  22660. "session.half.page.down",
  22661. "session.first",
  22662. "session.last",
  22663. "prompt.clear",
  22664. "prompt.submit",
  22665. "agent.cycle"
  22666. ]
  22667. },
  22668. {
  22669. "type": "string"
  22670. }
  22671. ]
  22672. }
  22673. },
  22674. "required": ["command"],
  22675. "additionalProperties": false
  22676. }
  22677. },
  22678. "required": ["type", "properties"],
  22679. "additionalProperties": false
  22680. },
  22681. "EventTuiToastShow": {
  22682. "type": "object",
  22683. "properties": {
  22684. "type": {
  22685. "type": "string",
  22686. "enum": ["tui.toast.show"]
  22687. },
  22688. "properties": {
  22689. "type": "object",
  22690. "properties": {
  22691. "title": {
  22692. "type": "string"
  22693. },
  22694. "message": {
  22695. "type": "string"
  22696. },
  22697. "variant": {
  22698. "type": "string",
  22699. "enum": ["info", "success", "warning", "error"]
  22700. },
  22701. "duration": {
  22702. "type": "integer",
  22703. "exclusiveMinimum": 0
  22704. }
  22705. },
  22706. "required": ["message", "variant"],
  22707. "additionalProperties": false
  22708. }
  22709. },
  22710. "required": ["type", "properties"],
  22711. "additionalProperties": false
  22712. },
  22713. "EventTuiSessionSelect": {
  22714. "type": "object",
  22715. "properties": {
  22716. "type": {
  22717. "type": "string",
  22718. "enum": ["tui.session.select"]
  22719. },
  22720. "properties": {
  22721. "type": "object",
  22722. "properties": {
  22723. "sessionID": {
  22724. "type": "string",
  22725. "pattern": "^ses",
  22726. "description": "Session ID to navigate to"
  22727. }
  22728. },
  22729. "required": ["sessionID"],
  22730. "additionalProperties": false
  22731. }
  22732. },
  22733. "required": ["type", "properties"],
  22734. "additionalProperties": false
  22735. },
  22736. "Workspace": {
  22737. "type": "object",
  22738. "properties": {
  22739. "id": {
  22740. "type": "string",
  22741. "pattern": "^wrk"
  22742. },
  22743. "type": {
  22744. "type": "string"
  22745. },
  22746. "name": {
  22747. "type": "string"
  22748. },
  22749. "branch": {
  22750. "anyOf": [
  22751. {
  22752. "type": "string"
  22753. },
  22754. {
  22755. "type": "null"
  22756. }
  22757. ]
  22758. },
  22759. "directory": {
  22760. "anyOf": [
  22761. {
  22762. "type": "string"
  22763. },
  22764. {
  22765. "type": "null"
  22766. }
  22767. ]
  22768. },
  22769. "extra": {
  22770. "anyOf": [
  22771. {},
  22772. {
  22773. "type": "null"
  22774. }
  22775. ]
  22776. },
  22777. "projectID": {
  22778. "type": "string"
  22779. },
  22780. "timeUsed": {
  22781. "anyOf": [
  22782. {
  22783. "type": "number"
  22784. },
  22785. {
  22786. "type": "string",
  22787. "enum": ["NaN"]
  22788. },
  22789. {
  22790. "type": "string",
  22791. "enum": ["Infinity"]
  22792. },
  22793. {
  22794. "type": "string",
  22795. "enum": ["-Infinity"]
  22796. },
  22797. {
  22798. "type": "string",
  22799. "enum": ["Infinity", "-Infinity", "NaN"]
  22800. }
  22801. ]
  22802. }
  22803. },
  22804. "required": ["id", "type", "name", "projectID", "timeUsed"],
  22805. "additionalProperties": false
  22806. },
  22807. "WorkspaceCreateError": {
  22808. "type": "object",
  22809. "properties": {
  22810. "name": {
  22811. "type": "string",
  22812. "enum": ["WorkspaceCreateError"]
  22813. },
  22814. "data": {
  22815. "type": "object",
  22816. "properties": {
  22817. "message": {
  22818. "type": "string"
  22819. }
  22820. },
  22821. "required": ["message"],
  22822. "additionalProperties": false
  22823. }
  22824. },
  22825. "required": ["name", "data"],
  22826. "additionalProperties": false
  22827. },
  22828. "WorkspaceWarpError": {
  22829. "type": "object",
  22830. "properties": {
  22831. "name": {
  22832. "type": "string",
  22833. "enum": ["WorkspaceWarpError"]
  22834. },
  22835. "data": {
  22836. "type": "object",
  22837. "properties": {
  22838. "message": {
  22839. "type": "string"
  22840. }
  22841. },
  22842. "required": ["message"],
  22843. "additionalProperties": false
  22844. }
  22845. },
  22846. "required": ["name", "data"],
  22847. "additionalProperties": false
  22848. },
  22849. "UnauthorizedError": {
  22850. "type": "object",
  22851. "properties": {
  22852. "_tag": {
  22853. "type": "string",
  22854. "enum": ["UnauthorizedError"]
  22855. },
  22856. "message": {
  22857. "type": "string"
  22858. }
  22859. },
  22860. "required": ["_tag", "message"],
  22861. "additionalProperties": false
  22862. },
  22863. "SessionsResponse": {
  22864. "type": "object",
  22865. "properties": {
  22866. "data": {
  22867. "type": "array",
  22868. "items": {
  22869. "$ref": "#/components/schemas/SessionV2Info"
  22870. }
  22871. },
  22872. "cursor": {
  22873. "type": "object",
  22874. "properties": {
  22875. "previous": {
  22876. "type": "string"
  22877. },
  22878. "next": {
  22879. "type": "string"
  22880. }
  22881. },
  22882. "additionalProperties": false
  22883. }
  22884. },
  22885. "required": ["data", "cursor"],
  22886. "additionalProperties": false
  22887. },
  22888. "InvalidCursorError": {
  22889. "type": "object",
  22890. "properties": {
  22891. "_tag": {
  22892. "type": "string",
  22893. "enum": ["InvalidCursorError"]
  22894. },
  22895. "message": {
  22896. "type": "string"
  22897. }
  22898. },
  22899. "required": ["_tag", "message"],
  22900. "additionalProperties": false
  22901. },
  22902. "SessionNotFoundError": {
  22903. "type": "object",
  22904. "properties": {
  22905. "_tag": {
  22906. "type": "string",
  22907. "enum": ["SessionNotFoundError"]
  22908. },
  22909. "sessionID": {
  22910. "type": "string"
  22911. },
  22912. "message": {
  22913. "type": "string"
  22914. }
  22915. },
  22916. "required": ["_tag", "sessionID", "message"],
  22917. "additionalProperties": false
  22918. },
  22919. "ConflictError": {
  22920. "type": "object",
  22921. "properties": {
  22922. "_tag": {
  22923. "type": "string",
  22924. "enum": ["ConflictError"]
  22925. },
  22926. "message": {
  22927. "type": "string"
  22928. },
  22929. "resource": {
  22930. "type": "string"
  22931. }
  22932. },
  22933. "required": ["_tag", "message"],
  22934. "additionalProperties": false
  22935. },
  22936. "ServiceUnavailableError": {
  22937. "type": "object",
  22938. "properties": {
  22939. "_tag": {
  22940. "type": "string",
  22941. "enum": ["ServiceUnavailableError"]
  22942. },
  22943. "message": {
  22944. "type": "string"
  22945. },
  22946. "service": {
  22947. "type": "string"
  22948. }
  22949. },
  22950. "required": ["_tag", "message"],
  22951. "additionalProperties": false
  22952. },
  22953. "UnknownError1": {
  22954. "type": "object",
  22955. "properties": {
  22956. "_tag": {
  22957. "type": "string",
  22958. "enum": ["UnknownError"]
  22959. },
  22960. "message": {
  22961. "type": "string"
  22962. },
  22963. "ref": {
  22964. "type": "string"
  22965. }
  22966. },
  22967. "required": ["_tag", "message"],
  22968. "additionalProperties": false
  22969. },
  22970. "SessionMessagesResponse": {
  22971. "type": "object",
  22972. "properties": {
  22973. "data": {
  22974. "type": "array",
  22975. "items": {
  22976. "$ref": "#/components/schemas/SessionMessage"
  22977. }
  22978. },
  22979. "cursor": {
  22980. "type": "object",
  22981. "properties": {
  22982. "previous": {
  22983. "type": "string"
  22984. },
  22985. "next": {
  22986. "type": "string"
  22987. }
  22988. },
  22989. "additionalProperties": false
  22990. }
  22991. },
  22992. "required": ["data", "cursor"],
  22993. "additionalProperties": false
  22994. },
  22995. "ProviderNotFoundError": {
  22996. "type": "object",
  22997. "properties": {
  22998. "_tag": {
  22999. "type": "string",
  23000. "enum": ["ProviderNotFoundError"]
  23001. },
  23002. "providerID": {
  23003. "type": "string"
  23004. },
  23005. "message": {
  23006. "type": "string"
  23007. }
  23008. },
  23009. "required": ["_tag", "providerID", "message"],
  23010. "additionalProperties": false
  23011. },
  23012. "V2Event": {
  23013. "anyOf": [
  23014. {
  23015. "$ref": "#/components/schemas/V2EventModels-devRefreshed"
  23016. },
  23017. {
  23018. "$ref": "#/components/schemas/V2EventIntegrationUpdated"
  23019. },
  23020. {
  23021. "$ref": "#/components/schemas/V2EventIntegrationConnectionUpdated"
  23022. },
  23023. {
  23024. "$ref": "#/components/schemas/V2EventCatalogUpdated"
  23025. },
  23026. {
  23027. "$ref": "#/components/schemas/V2EventSessionCreated"
  23028. },
  23029. {
  23030. "$ref": "#/components/schemas/V2EventSessionUpdated"
  23031. },
  23032. {
  23033. "$ref": "#/components/schemas/V2EventSessionDeleted"
  23034. },
  23035. {
  23036. "$ref": "#/components/schemas/V2EventMessageUpdated"
  23037. },
  23038. {
  23039. "$ref": "#/components/schemas/V2EventMessageRemoved"
  23040. },
  23041. {
  23042. "$ref": "#/components/schemas/V2EventMessagePartUpdated"
  23043. },
  23044. {
  23045. "$ref": "#/components/schemas/V2EventMessagePartRemoved"
  23046. },
  23047. {
  23048. "$ref": "#/components/schemas/V2EventSessionNextAgentSwitched"
  23049. },
  23050. {
  23051. "$ref": "#/components/schemas/V2EventSessionNextModelSwitched"
  23052. },
  23053. {
  23054. "$ref": "#/components/schemas/V2EventSessionNextMoved"
  23055. },
  23056. {
  23057. "$ref": "#/components/schemas/V2EventSessionNextPrompted"
  23058. },
  23059. {
  23060. "$ref": "#/components/schemas/V2EventSessionNextPromptAdmitted"
  23061. },
  23062. {
  23063. "$ref": "#/components/schemas/V2EventSessionNextContextUpdated"
  23064. },
  23065. {
  23066. "$ref": "#/components/schemas/V2EventSessionNextSynthetic"
  23067. },
  23068. {
  23069. "$ref": "#/components/schemas/V2EventSessionNextShellStarted"
  23070. },
  23071. {
  23072. "$ref": "#/components/schemas/V2EventSessionNextShellEnded"
  23073. },
  23074. {
  23075. "$ref": "#/components/schemas/V2EventSessionNextStepStarted"
  23076. },
  23077. {
  23078. "$ref": "#/components/schemas/V2EventSessionNextStepEnded"
  23079. },
  23080. {
  23081. "$ref": "#/components/schemas/V2EventSessionNextStepFailed"
  23082. },
  23083. {
  23084. "$ref": "#/components/schemas/V2EventSessionNextTextStarted"
  23085. },
  23086. {
  23087. "$ref": "#/components/schemas/V2EventSessionNextTextDelta"
  23088. },
  23089. {
  23090. "$ref": "#/components/schemas/V2EventSessionNextTextEnded"
  23091. },
  23092. {
  23093. "$ref": "#/components/schemas/V2EventSessionNextReasoningStarted"
  23094. },
  23095. {
  23096. "$ref": "#/components/schemas/V2EventSessionNextReasoningDelta"
  23097. },
  23098. {
  23099. "$ref": "#/components/schemas/V2EventSessionNextReasoningEnded"
  23100. },
  23101. {
  23102. "$ref": "#/components/schemas/V2EventSessionNextToolInputStarted"
  23103. },
  23104. {
  23105. "$ref": "#/components/schemas/V2EventSessionNextToolInputDelta"
  23106. },
  23107. {
  23108. "$ref": "#/components/schemas/V2EventSessionNextToolInputEnded"
  23109. },
  23110. {
  23111. "$ref": "#/components/schemas/V2EventSessionNextToolCalled"
  23112. },
  23113. {
  23114. "$ref": "#/components/schemas/V2EventSessionNextToolProgress"
  23115. },
  23116. {
  23117. "$ref": "#/components/schemas/V2EventSessionNextToolSuccess"
  23118. },
  23119. {
  23120. "$ref": "#/components/schemas/V2EventSessionNextToolFailed"
  23121. },
  23122. {
  23123. "$ref": "#/components/schemas/V2EventSessionNextRetried"
  23124. },
  23125. {
  23126. "$ref": "#/components/schemas/V2EventSessionNextCompactionStarted"
  23127. },
  23128. {
  23129. "$ref": "#/components/schemas/V2EventSessionNextCompactionDelta"
  23130. },
  23131. {
  23132. "$ref": "#/components/schemas/V2EventSessionNextCompactionEnded"
  23133. },
  23134. {
  23135. "$ref": "#/components/schemas/V2EventMessagePartDelta"
  23136. },
  23137. {
  23138. "$ref": "#/components/schemas/V2EventSessionDiff"
  23139. },
  23140. {
  23141. "$ref": "#/components/schemas/V2EventSessionError"
  23142. },
  23143. {
  23144. "$ref": "#/components/schemas/V2EventInstallationUpdated"
  23145. },
  23146. {
  23147. "$ref": "#/components/schemas/V2EventInstallationUpdate-available"
  23148. },
  23149. {
  23150. "$ref": "#/components/schemas/V2EventFileEdited"
  23151. },
  23152. {
  23153. "$ref": "#/components/schemas/V2EventReferenceUpdated"
  23154. },
  23155. {
  23156. "$ref": "#/components/schemas/V2EventPermissionV2Asked"
  23157. },
  23158. {
  23159. "$ref": "#/components/schemas/V2EventPermissionV2Replied"
  23160. },
  23161. {
  23162. "$ref": "#/components/schemas/V2EventPluginAdded"
  23163. },
  23164. {
  23165. "$ref": "#/components/schemas/V2EventProjectDirectoriesUpdated"
  23166. },
  23167. {
  23168. "$ref": "#/components/schemas/V2EventFileWatcherUpdated"
  23169. },
  23170. {
  23171. "$ref": "#/components/schemas/V2EventPtyCreated"
  23172. },
  23173. {
  23174. "$ref": "#/components/schemas/V2EventPtyUpdated"
  23175. },
  23176. {
  23177. "$ref": "#/components/schemas/V2EventPtyExited"
  23178. },
  23179. {
  23180. "$ref": "#/components/schemas/V2EventPtyDeleted"
  23181. },
  23182. {
  23183. "$ref": "#/components/schemas/V2EventQuestionV2Asked"
  23184. },
  23185. {
  23186. "$ref": "#/components/schemas/V2EventQuestionV2Replied"
  23187. },
  23188. {
  23189. "$ref": "#/components/schemas/V2EventQuestionV2Rejected"
  23190. },
  23191. {
  23192. "$ref": "#/components/schemas/V2EventTodoUpdated"
  23193. },
  23194. {
  23195. "$ref": "#/components/schemas/V2EventLspUpdated"
  23196. },
  23197. {
  23198. "$ref": "#/components/schemas/V2EventPermissionAsked"
  23199. },
  23200. {
  23201. "$ref": "#/components/schemas/V2EventPermissionReplied"
  23202. },
  23203. {
  23204. "$ref": "#/components/schemas/V2EventTuiPromptAppend"
  23205. },
  23206. {
  23207. "$ref": "#/components/schemas/V2EventTuiCommandExecute"
  23208. },
  23209. {
  23210. "$ref": "#/components/schemas/V2EventTuiToastShow"
  23211. },
  23212. {
  23213. "$ref": "#/components/schemas/V2EventTuiSessionSelect"
  23214. },
  23215. {
  23216. "$ref": "#/components/schemas/V2EventMcpToolsChanged"
  23217. },
  23218. {
  23219. "$ref": "#/components/schemas/V2EventMcpBrowserOpenFailed"
  23220. },
  23221. {
  23222. "$ref": "#/components/schemas/V2EventCommandExecuted"
  23223. },
  23224. {
  23225. "$ref": "#/components/schemas/V2EventProjectUpdated"
  23226. },
  23227. {
  23228. "$ref": "#/components/schemas/V2EventSessionStatus"
  23229. },
  23230. {
  23231. "$ref": "#/components/schemas/V2EventSessionIdle"
  23232. },
  23233. {
  23234. "$ref": "#/components/schemas/V2EventQuestionAsked"
  23235. },
  23236. {
  23237. "$ref": "#/components/schemas/V2EventQuestionReplied"
  23238. },
  23239. {
  23240. "$ref": "#/components/schemas/V2EventQuestionRejected"
  23241. },
  23242. {
  23243. "$ref": "#/components/schemas/V2EventSessionCompacted"
  23244. },
  23245. {
  23246. "$ref": "#/components/schemas/V2EventVcsBranchUpdated"
  23247. },
  23248. {
  23249. "$ref": "#/components/schemas/V2EventWorkspaceReady"
  23250. },
  23251. {
  23252. "$ref": "#/components/schemas/V2EventWorkspaceFailed"
  23253. },
  23254. {
  23255. "$ref": "#/components/schemas/V2EventWorkspaceStatus"
  23256. },
  23257. {
  23258. "$ref": "#/components/schemas/V2EventWorktreeReady"
  23259. },
  23260. {
  23261. "$ref": "#/components/schemas/V2EventWorktreeFailed"
  23262. },
  23263. {
  23264. "$ref": "#/components/schemas/V2EventServerConnected"
  23265. },
  23266. {
  23267. "$ref": "#/components/schemas/V2EventGlobalDisposed"
  23268. },
  23269. {
  23270. "$ref": "#/components/schemas/V2EventServerConnected"
  23271. }
  23272. ]
  23273. },
  23274. "ForbiddenError": {
  23275. "type": "object",
  23276. "properties": {
  23277. "_tag": {
  23278. "type": "string",
  23279. "enum": ["ForbiddenError"]
  23280. },
  23281. "message": {
  23282. "type": "string"
  23283. }
  23284. },
  23285. "required": ["_tag", "message"],
  23286. "additionalProperties": false
  23287. },
  23288. "ProjectCopyError": {
  23289. "type": "object",
  23290. "properties": {
  23291. "name": {
  23292. "type": "string",
  23293. "enum": ["ProjectCopyError"]
  23294. },
  23295. "data": {
  23296. "type": "object",
  23297. "properties": {
  23298. "message": {
  23299. "type": "string"
  23300. },
  23301. "forceRequired": {
  23302. "type": "boolean"
  23303. }
  23304. },
  23305. "required": ["message"],
  23306. "additionalProperties": false
  23307. }
  23308. },
  23309. "required": ["name", "data"],
  23310. "additionalProperties": false
  23311. },
  23312. "effect_HttpApiError_Forbidden": {
  23313. "type": "object",
  23314. "properties": {
  23315. "_tag": {
  23316. "type": "string",
  23317. "enum": ["Forbidden"]
  23318. }
  23319. },
  23320. "required": ["_tag"],
  23321. "additionalProperties": false
  23322. },
  23323. "Event.tui.prompt.append": {
  23324. "type": "object",
  23325. "properties": {
  23326. "id": {
  23327. "type": "string",
  23328. "pattern": "^evt_"
  23329. },
  23330. "type": {
  23331. "type": "string",
  23332. "enum": ["tui.prompt.append"]
  23333. },
  23334. "properties": {
  23335. "type": "object",
  23336. "properties": {
  23337. "text": {
  23338. "type": "string"
  23339. }
  23340. },
  23341. "required": ["text"],
  23342. "additionalProperties": false
  23343. }
  23344. },
  23345. "required": ["id", "type", "properties"],
  23346. "additionalProperties": false
  23347. },
  23348. "Event.tui.command.execute": {
  23349. "type": "object",
  23350. "properties": {
  23351. "id": {
  23352. "type": "string",
  23353. "pattern": "^evt_"
  23354. },
  23355. "type": {
  23356. "type": "string",
  23357. "enum": ["tui.command.execute"]
  23358. },
  23359. "properties": {
  23360. "type": "object",
  23361. "properties": {
  23362. "command": {
  23363. "anyOf": [
  23364. {
  23365. "type": "string",
  23366. "enum": [
  23367. "session.list",
  23368. "session.new",
  23369. "session.share",
  23370. "session.interrupt",
  23371. "session.compact",
  23372. "session.page.up",
  23373. "session.page.down",
  23374. "session.line.up",
  23375. "session.line.down",
  23376. "session.half.page.up",
  23377. "session.half.page.down",
  23378. "session.first",
  23379. "session.last",
  23380. "prompt.clear",
  23381. "prompt.submit",
  23382. "agent.cycle"
  23383. ]
  23384. },
  23385. {
  23386. "type": "string"
  23387. }
  23388. ]
  23389. }
  23390. },
  23391. "required": ["command"],
  23392. "additionalProperties": false
  23393. }
  23394. },
  23395. "required": ["id", "type", "properties"],
  23396. "additionalProperties": false
  23397. },
  23398. "Event.tui.toast.show": {
  23399. "type": "object",
  23400. "properties": {
  23401. "id": {
  23402. "type": "string",
  23403. "pattern": "^evt_"
  23404. },
  23405. "type": {
  23406. "type": "string",
  23407. "enum": ["tui.toast.show"]
  23408. },
  23409. "properties": {
  23410. "type": "object",
  23411. "properties": {
  23412. "title": {
  23413. "type": "string"
  23414. },
  23415. "message": {
  23416. "type": "string"
  23417. },
  23418. "variant": {
  23419. "type": "string",
  23420. "enum": ["info", "success", "warning", "error"]
  23421. },
  23422. "duration": {
  23423. "type": "integer",
  23424. "exclusiveMinimum": 0
  23425. }
  23426. },
  23427. "required": ["message", "variant"],
  23428. "additionalProperties": false
  23429. }
  23430. },
  23431. "required": ["id", "type", "properties"],
  23432. "additionalProperties": false
  23433. },
  23434. "Event.tui.session.select": {
  23435. "type": "object",
  23436. "properties": {
  23437. "id": {
  23438. "type": "string",
  23439. "pattern": "^evt_"
  23440. },
  23441. "type": {
  23442. "type": "string",
  23443. "enum": ["tui.session.select"]
  23444. },
  23445. "properties": {
  23446. "type": "object",
  23447. "properties": {
  23448. "sessionID": {
  23449. "type": "string",
  23450. "pattern": "^ses",
  23451. "description": "Session ID to navigate to"
  23452. }
  23453. },
  23454. "required": ["sessionID"],
  23455. "additionalProperties": false
  23456. }
  23457. },
  23458. "required": ["id", "type", "properties"],
  23459. "additionalProperties": false
  23460. },
  23461. "CredentialValue": {
  23462. "anyOf": [
  23463. {
  23464. "$ref": "#/components/schemas/CredentialOAuth"
  23465. },
  23466. {
  23467. "$ref": "#/components/schemas/CredentialKey"
  23468. }
  23469. ]
  23470. },
  23471. "IntegrationInputs": {
  23472. "type": "object",
  23473. "additionalProperties": {
  23474. "type": "string"
  23475. }
  23476. },
  23477. "IntegrationMethod": {
  23478. "anyOf": [
  23479. {
  23480. "$ref": "#/components/schemas/IntegrationOAuthMethod"
  23481. },
  23482. {
  23483. "$ref": "#/components/schemas/IntegrationKeyMethod"
  23484. },
  23485. {
  23486. "$ref": "#/components/schemas/IntegrationEnvMethod"
  23487. }
  23488. ]
  23489. },
  23490. "IntegrationRef": {
  23491. "type": "object",
  23492. "properties": {
  23493. "id": {
  23494. "type": "string"
  23495. },
  23496. "name": {
  23497. "type": "string"
  23498. }
  23499. },
  23500. "required": ["id", "name"],
  23501. "additionalProperties": false
  23502. },
  23503. "SkillV2Source": {
  23504. "anyOf": [
  23505. {
  23506. "$ref": "#/components/schemas/SkillV2DirectorySource"
  23507. },
  23508. {
  23509. "$ref": "#/components/schemas/SkillV2UrlSource"
  23510. },
  23511. {
  23512. "$ref": "#/components/schemas/SkillV2EmbeddedSource"
  23513. }
  23514. ]
  23515. },
  23516. "MoveSessionDestination": {
  23517. "type": "object",
  23518. "properties": {
  23519. "directory": {
  23520. "type": "string"
  23521. }
  23522. },
  23523. "required": ["directory"],
  23524. "additionalProperties": false
  23525. },
  23526. "LocationRef": {
  23527. "type": "object",
  23528. "properties": {
  23529. "directory": {
  23530. "type": "string"
  23531. },
  23532. "workspaceID": {
  23533. "type": "string",
  23534. "pattern": "^wrk"
  23535. }
  23536. },
  23537. "required": ["directory"],
  23538. "additionalProperties": false
  23539. },
  23540. "PromptSource": {
  23541. "type": "object",
  23542. "properties": {
  23543. "start": {
  23544. "type": "number"
  23545. },
  23546. "end": {
  23547. "type": "number"
  23548. },
  23549. "text": {
  23550. "type": "string"
  23551. }
  23552. },
  23553. "required": ["start", "end", "text"],
  23554. "additionalProperties": false
  23555. },
  23556. "PromptFileAttachment": {
  23557. "type": "object",
  23558. "properties": {
  23559. "uri": {
  23560. "type": "string"
  23561. },
  23562. "mime": {
  23563. "type": "string"
  23564. },
  23565. "name": {
  23566. "type": "string"
  23567. },
  23568. "description": {
  23569. "type": "string"
  23570. },
  23571. "source": {
  23572. "$ref": "#/components/schemas/PromptSource"
  23573. }
  23574. },
  23575. "required": ["uri", "mime"],
  23576. "additionalProperties": false
  23577. },
  23578. "PromptAgentAttachment": {
  23579. "type": "object",
  23580. "properties": {
  23581. "name": {
  23582. "type": "string"
  23583. },
  23584. "source": {
  23585. "$ref": "#/components/schemas/PromptSource"
  23586. }
  23587. },
  23588. "required": ["name"],
  23589. "additionalProperties": false
  23590. },
  23591. "SessionErrorUnknown": {
  23592. "type": "object",
  23593. "properties": {
  23594. "type": {
  23595. "type": "string",
  23596. "enum": ["unknown"]
  23597. },
  23598. "message": {
  23599. "type": "string"
  23600. }
  23601. },
  23602. "required": ["type", "message"],
  23603. "additionalProperties": false
  23604. },
  23605. "ToolTextContent": {
  23606. "type": "object",
  23607. "properties": {
  23608. "type": {
  23609. "type": "string",
  23610. "enum": ["text"]
  23611. },
  23612. "text": {
  23613. "type": "string"
  23614. }
  23615. },
  23616. "required": ["type", "text"],
  23617. "additionalProperties": false
  23618. },
  23619. "ToolFileContent": {
  23620. "type": "object",
  23621. "properties": {
  23622. "type": {
  23623. "type": "string",
  23624. "enum": ["file"]
  23625. },
  23626. "uri": {
  23627. "type": "string"
  23628. },
  23629. "mime": {
  23630. "type": "string"
  23631. },
  23632. "name": {
  23633. "type": "string"
  23634. }
  23635. },
  23636. "required": ["type", "uri", "mime"],
  23637. "additionalProperties": false
  23638. },
  23639. "SessionNextRetry_error": {
  23640. "type": "object",
  23641. "properties": {
  23642. "message": {
  23643. "type": "string"
  23644. },
  23645. "statusCode": {
  23646. "type": "number"
  23647. },
  23648. "isRetryable": {
  23649. "type": "boolean"
  23650. },
  23651. "responseHeaders": {
  23652. "type": "object",
  23653. "additionalProperties": {
  23654. "type": "string"
  23655. }
  23656. },
  23657. "responseBody": {
  23658. "type": "string"
  23659. },
  23660. "metadata": {
  23661. "type": "object",
  23662. "additionalProperties": {
  23663. "type": "string"
  23664. }
  23665. }
  23666. },
  23667. "required": ["message", "isRetryable"],
  23668. "additionalProperties": false
  23669. },
  23670. "PermissionV2Source": {
  23671. "type": "object",
  23672. "properties": {
  23673. "type": {
  23674. "type": "string",
  23675. "enum": ["tool"]
  23676. },
  23677. "messageID": {
  23678. "type": "string"
  23679. },
  23680. "callID": {
  23681. "type": "string"
  23682. }
  23683. },
  23684. "required": ["type", "messageID", "callID"],
  23685. "additionalProperties": false
  23686. },
  23687. "PermissionV2Reply": {
  23688. "type": "string",
  23689. "enum": ["once", "always", "reject"]
  23690. },
  23691. "QuestionV2Option": {
  23692. "type": "object",
  23693. "properties": {
  23694. "label": {
  23695. "type": "string",
  23696. "description": "Display text (1-5 words, concise)"
  23697. },
  23698. "description": {
  23699. "type": "string",
  23700. "description": "Explanation of choice"
  23701. }
  23702. },
  23703. "required": ["label", "description"],
  23704. "additionalProperties": false
  23705. },
  23706. "QuestionV2Info": {
  23707. "type": "object",
  23708. "properties": {
  23709. "question": {
  23710. "type": "string",
  23711. "description": "Complete question"
  23712. },
  23713. "header": {
  23714. "type": "string",
  23715. "description": "Very short label (max 30 chars)"
  23716. },
  23717. "options": {
  23718. "type": "array",
  23719. "items": {
  23720. "$ref": "#/components/schemas/QuestionV2Option"
  23721. },
  23722. "description": "Available choices"
  23723. },
  23724. "multiple": {
  23725. "type": "boolean"
  23726. },
  23727. "custom": {
  23728. "type": "boolean"
  23729. }
  23730. },
  23731. "required": ["question", "header", "options"],
  23732. "additionalProperties": false
  23733. },
  23734. "QuestionV2Tool": {
  23735. "type": "object",
  23736. "properties": {
  23737. "messageID": {
  23738. "type": "string"
  23739. },
  23740. "callID": {
  23741. "type": "string"
  23742. }
  23743. },
  23744. "required": ["messageID", "callID"],
  23745. "additionalProperties": false
  23746. },
  23747. "QuestionV2Answer": {
  23748. "type": "array",
  23749. "items": {
  23750. "type": "string"
  23751. }
  23752. },
  23753. "EventServerInstanceDisposed": {
  23754. "type": "object",
  23755. "properties": {
  23756. "id": {
  23757. "type": "string"
  23758. },
  23759. "type": {
  23760. "type": "string",
  23761. "enum": ["server.instance.disposed"]
  23762. },
  23763. "properties": {
  23764. "type": "object",
  23765. "properties": {
  23766. "directory": {
  23767. "type": "string"
  23768. }
  23769. },
  23770. "required": ["directory"],
  23771. "additionalProperties": false
  23772. }
  23773. },
  23774. "required": ["id", "type", "properties"],
  23775. "additionalProperties": false
  23776. },
  23777. "SyncEventSessionCreated": {
  23778. "type": "object",
  23779. "properties": {
  23780. "type": {
  23781. "type": "string",
  23782. "enum": ["sync"]
  23783. },
  23784. "id": {
  23785. "type": "string",
  23786. "pattern": "^evt_"
  23787. },
  23788. "syncEvent": {
  23789. "type": "object",
  23790. "properties": {
  23791. "type": {
  23792. "type": "string",
  23793. "enum": ["session.created.1"]
  23794. },
  23795. "id": {
  23796. "type": "string",
  23797. "pattern": "^evt_"
  23798. },
  23799. "seq": {
  23800. "type": "number"
  23801. },
  23802. "aggregateID": {
  23803. "type": "string"
  23804. },
  23805. "data": {
  23806. "type": "object",
  23807. "properties": {
  23808. "sessionID": {
  23809. "type": "string",
  23810. "pattern": "^ses"
  23811. },
  23812. "info": {
  23813. "$ref": "#/components/schemas/Session"
  23814. }
  23815. },
  23816. "required": ["sessionID", "info"],
  23817. "additionalProperties": false
  23818. }
  23819. },
  23820. "required": ["type", "id", "seq", "aggregateID", "data"],
  23821. "additionalProperties": false
  23822. }
  23823. },
  23824. "required": ["type", "id", "syncEvent"],
  23825. "additionalProperties": false
  23826. },
  23827. "SyncEventSessionUpdated": {
  23828. "type": "object",
  23829. "properties": {
  23830. "type": {
  23831. "type": "string",
  23832. "enum": ["sync"]
  23833. },
  23834. "id": {
  23835. "type": "string",
  23836. "pattern": "^evt_"
  23837. },
  23838. "syncEvent": {
  23839. "type": "object",
  23840. "properties": {
  23841. "type": {
  23842. "type": "string",
  23843. "enum": ["session.updated.1"]
  23844. },
  23845. "id": {
  23846. "type": "string",
  23847. "pattern": "^evt_"
  23848. },
  23849. "seq": {
  23850. "type": "number"
  23851. },
  23852. "aggregateID": {
  23853. "type": "string"
  23854. },
  23855. "data": {
  23856. "type": "object",
  23857. "properties": {
  23858. "sessionID": {
  23859. "type": "string",
  23860. "pattern": "^ses"
  23861. },
  23862. "info": {
  23863. "$ref": "#/components/schemas/Session"
  23864. }
  23865. },
  23866. "required": ["sessionID", "info"],
  23867. "additionalProperties": false
  23868. }
  23869. },
  23870. "required": ["type", "id", "seq", "aggregateID", "data"],
  23871. "additionalProperties": false
  23872. }
  23873. },
  23874. "required": ["type", "id", "syncEvent"],
  23875. "additionalProperties": false
  23876. },
  23877. "SyncEventSessionDeleted": {
  23878. "type": "object",
  23879. "properties": {
  23880. "type": {
  23881. "type": "string",
  23882. "enum": ["sync"]
  23883. },
  23884. "id": {
  23885. "type": "string",
  23886. "pattern": "^evt_"
  23887. },
  23888. "syncEvent": {
  23889. "type": "object",
  23890. "properties": {
  23891. "type": {
  23892. "type": "string",
  23893. "enum": ["session.deleted.1"]
  23894. },
  23895. "id": {
  23896. "type": "string",
  23897. "pattern": "^evt_"
  23898. },
  23899. "seq": {
  23900. "type": "number"
  23901. },
  23902. "aggregateID": {
  23903. "type": "string"
  23904. },
  23905. "data": {
  23906. "type": "object",
  23907. "properties": {
  23908. "sessionID": {
  23909. "type": "string",
  23910. "pattern": "^ses"
  23911. },
  23912. "info": {
  23913. "$ref": "#/components/schemas/Session"
  23914. }
  23915. },
  23916. "required": ["sessionID", "info"],
  23917. "additionalProperties": false
  23918. }
  23919. },
  23920. "required": ["type", "id", "seq", "aggregateID", "data"],
  23921. "additionalProperties": false
  23922. }
  23923. },
  23924. "required": ["type", "id", "syncEvent"],
  23925. "additionalProperties": false
  23926. },
  23927. "SyncEventMessageUpdated": {
  23928. "type": "object",
  23929. "properties": {
  23930. "type": {
  23931. "type": "string",
  23932. "enum": ["sync"]
  23933. },
  23934. "id": {
  23935. "type": "string",
  23936. "pattern": "^evt_"
  23937. },
  23938. "syncEvent": {
  23939. "type": "object",
  23940. "properties": {
  23941. "type": {
  23942. "type": "string",
  23943. "enum": ["message.updated.1"]
  23944. },
  23945. "id": {
  23946. "type": "string",
  23947. "pattern": "^evt_"
  23948. },
  23949. "seq": {
  23950. "type": "number"
  23951. },
  23952. "aggregateID": {
  23953. "type": "string"
  23954. },
  23955. "data": {
  23956. "type": "object",
  23957. "properties": {
  23958. "sessionID": {
  23959. "type": "string",
  23960. "pattern": "^ses"
  23961. },
  23962. "info": {
  23963. "$ref": "#/components/schemas/Message"
  23964. }
  23965. },
  23966. "required": ["sessionID", "info"],
  23967. "additionalProperties": false
  23968. }
  23969. },
  23970. "required": ["type", "id", "seq", "aggregateID", "data"],
  23971. "additionalProperties": false
  23972. }
  23973. },
  23974. "required": ["type", "id", "syncEvent"],
  23975. "additionalProperties": false
  23976. },
  23977. "SyncEventMessageRemoved": {
  23978. "type": "object",
  23979. "properties": {
  23980. "type": {
  23981. "type": "string",
  23982. "enum": ["sync"]
  23983. },
  23984. "id": {
  23985. "type": "string",
  23986. "pattern": "^evt_"
  23987. },
  23988. "syncEvent": {
  23989. "type": "object",
  23990. "properties": {
  23991. "type": {
  23992. "type": "string",
  23993. "enum": ["message.removed.1"]
  23994. },
  23995. "id": {
  23996. "type": "string",
  23997. "pattern": "^evt_"
  23998. },
  23999. "seq": {
  24000. "type": "number"
  24001. },
  24002. "aggregateID": {
  24003. "type": "string"
  24004. },
  24005. "data": {
  24006. "type": "object",
  24007. "properties": {
  24008. "sessionID": {
  24009. "type": "string",
  24010. "pattern": "^ses"
  24011. },
  24012. "messageID": {
  24013. "type": "string",
  24014. "pattern": "^msg"
  24015. }
  24016. },
  24017. "required": ["sessionID", "messageID"],
  24018. "additionalProperties": false
  24019. }
  24020. },
  24021. "required": ["type", "id", "seq", "aggregateID", "data"],
  24022. "additionalProperties": false
  24023. }
  24024. },
  24025. "required": ["type", "id", "syncEvent"],
  24026. "additionalProperties": false
  24027. },
  24028. "SyncEventMessagePartUpdated": {
  24029. "type": "object",
  24030. "properties": {
  24031. "type": {
  24032. "type": "string",
  24033. "enum": ["sync"]
  24034. },
  24035. "id": {
  24036. "type": "string",
  24037. "pattern": "^evt_"
  24038. },
  24039. "syncEvent": {
  24040. "type": "object",
  24041. "properties": {
  24042. "type": {
  24043. "type": "string",
  24044. "enum": ["message.part.updated.1"]
  24045. },
  24046. "id": {
  24047. "type": "string",
  24048. "pattern": "^evt_"
  24049. },
  24050. "seq": {
  24051. "type": "number"
  24052. },
  24053. "aggregateID": {
  24054. "type": "string"
  24055. },
  24056. "data": {
  24057. "type": "object",
  24058. "properties": {
  24059. "sessionID": {
  24060. "type": "string",
  24061. "pattern": "^ses"
  24062. },
  24063. "part": {
  24064. "$ref": "#/components/schemas/Part"
  24065. },
  24066. "time": {
  24067. "type": "number"
  24068. }
  24069. },
  24070. "required": ["sessionID", "part", "time"],
  24071. "additionalProperties": false
  24072. }
  24073. },
  24074. "required": ["type", "id", "seq", "aggregateID", "data"],
  24075. "additionalProperties": false
  24076. }
  24077. },
  24078. "required": ["type", "id", "syncEvent"],
  24079. "additionalProperties": false
  24080. },
  24081. "SyncEventMessagePartRemoved": {
  24082. "type": "object",
  24083. "properties": {
  24084. "type": {
  24085. "type": "string",
  24086. "enum": ["sync"]
  24087. },
  24088. "id": {
  24089. "type": "string",
  24090. "pattern": "^evt_"
  24091. },
  24092. "syncEvent": {
  24093. "type": "object",
  24094. "properties": {
  24095. "type": {
  24096. "type": "string",
  24097. "enum": ["message.part.removed.1"]
  24098. },
  24099. "id": {
  24100. "type": "string",
  24101. "pattern": "^evt_"
  24102. },
  24103. "seq": {
  24104. "type": "number"
  24105. },
  24106. "aggregateID": {
  24107. "type": "string"
  24108. },
  24109. "data": {
  24110. "type": "object",
  24111. "properties": {
  24112. "sessionID": {
  24113. "type": "string",
  24114. "pattern": "^ses"
  24115. },
  24116. "messageID": {
  24117. "type": "string",
  24118. "pattern": "^msg"
  24119. },
  24120. "partID": {
  24121. "type": "string",
  24122. "pattern": "^prt"
  24123. }
  24124. },
  24125. "required": ["sessionID", "messageID", "partID"],
  24126. "additionalProperties": false
  24127. }
  24128. },
  24129. "required": ["type", "id", "seq", "aggregateID", "data"],
  24130. "additionalProperties": false
  24131. }
  24132. },
  24133. "required": ["type", "id", "syncEvent"],
  24134. "additionalProperties": false
  24135. },
  24136. "SyncEventSessionNextAgentSwitched": {
  24137. "type": "object",
  24138. "properties": {
  24139. "type": {
  24140. "type": "string",
  24141. "enum": ["sync"]
  24142. },
  24143. "id": {
  24144. "type": "string",
  24145. "pattern": "^evt_"
  24146. },
  24147. "syncEvent": {
  24148. "type": "object",
  24149. "properties": {
  24150. "type": {
  24151. "type": "string",
  24152. "enum": ["session.next.agent.switched.1"]
  24153. },
  24154. "id": {
  24155. "type": "string",
  24156. "pattern": "^evt_"
  24157. },
  24158. "seq": {
  24159. "type": "number"
  24160. },
  24161. "aggregateID": {
  24162. "type": "string"
  24163. },
  24164. "data": {
  24165. "type": "object",
  24166. "properties": {
  24167. "timestamp": {
  24168. "type": "number"
  24169. },
  24170. "sessionID": {
  24171. "type": "string",
  24172. "pattern": "^ses"
  24173. },
  24174. "messageID": {
  24175. "type": "string",
  24176. "pattern": "^msg_"
  24177. },
  24178. "agent": {
  24179. "type": "string"
  24180. }
  24181. },
  24182. "required": ["timestamp", "sessionID", "messageID", "agent"],
  24183. "additionalProperties": false
  24184. }
  24185. },
  24186. "required": ["type", "id", "seq", "aggregateID", "data"],
  24187. "additionalProperties": false
  24188. }
  24189. },
  24190. "required": ["type", "id", "syncEvent"],
  24191. "additionalProperties": false
  24192. },
  24193. "SyncEventSessionNextModelSwitched": {
  24194. "type": "object",
  24195. "properties": {
  24196. "type": {
  24197. "type": "string",
  24198. "enum": ["sync"]
  24199. },
  24200. "id": {
  24201. "type": "string",
  24202. "pattern": "^evt_"
  24203. },
  24204. "syncEvent": {
  24205. "type": "object",
  24206. "properties": {
  24207. "type": {
  24208. "type": "string",
  24209. "enum": ["session.next.model.switched.1"]
  24210. },
  24211. "id": {
  24212. "type": "string",
  24213. "pattern": "^evt_"
  24214. },
  24215. "seq": {
  24216. "type": "number"
  24217. },
  24218. "aggregateID": {
  24219. "type": "string"
  24220. },
  24221. "data": {
  24222. "type": "object",
  24223. "properties": {
  24224. "timestamp": {
  24225. "type": "number"
  24226. },
  24227. "sessionID": {
  24228. "type": "string",
  24229. "pattern": "^ses"
  24230. },
  24231. "messageID": {
  24232. "type": "string",
  24233. "pattern": "^msg_"
  24234. },
  24235. "model": {
  24236. "type": "object",
  24237. "properties": {
  24238. "id": {
  24239. "type": "string"
  24240. },
  24241. "providerID": {
  24242. "type": "string"
  24243. },
  24244. "variant": {
  24245. "type": "string"
  24246. }
  24247. },
  24248. "required": ["id", "providerID"],
  24249. "additionalProperties": false
  24250. }
  24251. },
  24252. "required": ["timestamp", "sessionID", "messageID", "model"],
  24253. "additionalProperties": false
  24254. }
  24255. },
  24256. "required": ["type", "id", "seq", "aggregateID", "data"],
  24257. "additionalProperties": false
  24258. }
  24259. },
  24260. "required": ["type", "id", "syncEvent"],
  24261. "additionalProperties": false
  24262. },
  24263. "SyncEventSessionNextMoved": {
  24264. "type": "object",
  24265. "properties": {
  24266. "type": {
  24267. "type": "string",
  24268. "enum": ["sync"]
  24269. },
  24270. "id": {
  24271. "type": "string",
  24272. "pattern": "^evt_"
  24273. },
  24274. "syncEvent": {
  24275. "type": "object",
  24276. "properties": {
  24277. "type": {
  24278. "type": "string",
  24279. "enum": ["session.next.moved.1"]
  24280. },
  24281. "id": {
  24282. "type": "string",
  24283. "pattern": "^evt_"
  24284. },
  24285. "seq": {
  24286. "type": "number"
  24287. },
  24288. "aggregateID": {
  24289. "type": "string"
  24290. },
  24291. "data": {
  24292. "type": "object",
  24293. "properties": {
  24294. "timestamp": {
  24295. "type": "number"
  24296. },
  24297. "sessionID": {
  24298. "type": "string",
  24299. "pattern": "^ses"
  24300. },
  24301. "location": {
  24302. "$ref": "#/components/schemas/LocationRef"
  24303. },
  24304. "subdirectory": {
  24305. "type": "string"
  24306. }
  24307. },
  24308. "required": ["timestamp", "sessionID", "location"],
  24309. "additionalProperties": false
  24310. }
  24311. },
  24312. "required": ["type", "id", "seq", "aggregateID", "data"],
  24313. "additionalProperties": false
  24314. }
  24315. },
  24316. "required": ["type", "id", "syncEvent"],
  24317. "additionalProperties": false
  24318. },
  24319. "SyncEventSessionNextPrompted": {
  24320. "type": "object",
  24321. "properties": {
  24322. "type": {
  24323. "type": "string",
  24324. "enum": ["sync"]
  24325. },
  24326. "id": {
  24327. "type": "string",
  24328. "pattern": "^evt_"
  24329. },
  24330. "syncEvent": {
  24331. "type": "object",
  24332. "properties": {
  24333. "type": {
  24334. "type": "string",
  24335. "enum": ["session.next.prompted.1"]
  24336. },
  24337. "id": {
  24338. "type": "string",
  24339. "pattern": "^evt_"
  24340. },
  24341. "seq": {
  24342. "type": "number"
  24343. },
  24344. "aggregateID": {
  24345. "type": "string"
  24346. },
  24347. "data": {
  24348. "type": "object",
  24349. "properties": {
  24350. "timestamp": {
  24351. "type": "number"
  24352. },
  24353. "sessionID": {
  24354. "type": "string",
  24355. "pattern": "^ses"
  24356. },
  24357. "messageID": {
  24358. "type": "string",
  24359. "pattern": "^msg_"
  24360. },
  24361. "prompt": {
  24362. "$ref": "#/components/schemas/Prompt"
  24363. },
  24364. "delivery": {
  24365. "type": "string",
  24366. "enum": ["steer", "queue"]
  24367. }
  24368. },
  24369. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  24370. "additionalProperties": false
  24371. }
  24372. },
  24373. "required": ["type", "id", "seq", "aggregateID", "data"],
  24374. "additionalProperties": false
  24375. }
  24376. },
  24377. "required": ["type", "id", "syncEvent"],
  24378. "additionalProperties": false
  24379. },
  24380. "SyncEventSessionNextPromptAdmitted": {
  24381. "type": "object",
  24382. "properties": {
  24383. "type": {
  24384. "type": "string",
  24385. "enum": ["sync"]
  24386. },
  24387. "id": {
  24388. "type": "string",
  24389. "pattern": "^evt_"
  24390. },
  24391. "syncEvent": {
  24392. "type": "object",
  24393. "properties": {
  24394. "type": {
  24395. "type": "string",
  24396. "enum": ["session.next.prompt.admitted.1"]
  24397. },
  24398. "id": {
  24399. "type": "string",
  24400. "pattern": "^evt_"
  24401. },
  24402. "seq": {
  24403. "type": "number"
  24404. },
  24405. "aggregateID": {
  24406. "type": "string"
  24407. },
  24408. "data": {
  24409. "type": "object",
  24410. "properties": {
  24411. "timestamp": {
  24412. "type": "number"
  24413. },
  24414. "sessionID": {
  24415. "type": "string",
  24416. "pattern": "^ses"
  24417. },
  24418. "messageID": {
  24419. "type": "string",
  24420. "pattern": "^msg_"
  24421. },
  24422. "prompt": {
  24423. "$ref": "#/components/schemas/Prompt"
  24424. },
  24425. "delivery": {
  24426. "type": "string",
  24427. "enum": ["steer", "queue"]
  24428. }
  24429. },
  24430. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  24431. "additionalProperties": false
  24432. }
  24433. },
  24434. "required": ["type", "id", "seq", "aggregateID", "data"],
  24435. "additionalProperties": false
  24436. }
  24437. },
  24438. "required": ["type", "id", "syncEvent"],
  24439. "additionalProperties": false
  24440. },
  24441. "SyncEventSessionNextContextUpdated": {
  24442. "type": "object",
  24443. "properties": {
  24444. "type": {
  24445. "type": "string",
  24446. "enum": ["sync"]
  24447. },
  24448. "id": {
  24449. "type": "string",
  24450. "pattern": "^evt_"
  24451. },
  24452. "syncEvent": {
  24453. "type": "object",
  24454. "properties": {
  24455. "type": {
  24456. "type": "string",
  24457. "enum": ["session.next.context.updated.1"]
  24458. },
  24459. "id": {
  24460. "type": "string",
  24461. "pattern": "^evt_"
  24462. },
  24463. "seq": {
  24464. "type": "number"
  24465. },
  24466. "aggregateID": {
  24467. "type": "string"
  24468. },
  24469. "data": {
  24470. "type": "object",
  24471. "properties": {
  24472. "timestamp": {
  24473. "type": "number"
  24474. },
  24475. "sessionID": {
  24476. "type": "string",
  24477. "pattern": "^ses"
  24478. },
  24479. "messageID": {
  24480. "type": "string",
  24481. "pattern": "^msg_"
  24482. },
  24483. "text": {
  24484. "type": "string"
  24485. }
  24486. },
  24487. "required": ["timestamp", "sessionID", "messageID", "text"],
  24488. "additionalProperties": false
  24489. }
  24490. },
  24491. "required": ["type", "id", "seq", "aggregateID", "data"],
  24492. "additionalProperties": false
  24493. }
  24494. },
  24495. "required": ["type", "id", "syncEvent"],
  24496. "additionalProperties": false
  24497. },
  24498. "SyncEventSessionNextSynthetic": {
  24499. "type": "object",
  24500. "properties": {
  24501. "type": {
  24502. "type": "string",
  24503. "enum": ["sync"]
  24504. },
  24505. "id": {
  24506. "type": "string",
  24507. "pattern": "^evt_"
  24508. },
  24509. "syncEvent": {
  24510. "type": "object",
  24511. "properties": {
  24512. "type": {
  24513. "type": "string",
  24514. "enum": ["session.next.synthetic.1"]
  24515. },
  24516. "id": {
  24517. "type": "string",
  24518. "pattern": "^evt_"
  24519. },
  24520. "seq": {
  24521. "type": "number"
  24522. },
  24523. "aggregateID": {
  24524. "type": "string"
  24525. },
  24526. "data": {
  24527. "type": "object",
  24528. "properties": {
  24529. "timestamp": {
  24530. "type": "number"
  24531. },
  24532. "sessionID": {
  24533. "type": "string",
  24534. "pattern": "^ses"
  24535. },
  24536. "messageID": {
  24537. "type": "string",
  24538. "pattern": "^msg_"
  24539. },
  24540. "text": {
  24541. "type": "string"
  24542. }
  24543. },
  24544. "required": ["timestamp", "sessionID", "messageID", "text"],
  24545. "additionalProperties": false
  24546. }
  24547. },
  24548. "required": ["type", "id", "seq", "aggregateID", "data"],
  24549. "additionalProperties": false
  24550. }
  24551. },
  24552. "required": ["type", "id", "syncEvent"],
  24553. "additionalProperties": false
  24554. },
  24555. "SyncEventSessionNextShellStarted": {
  24556. "type": "object",
  24557. "properties": {
  24558. "type": {
  24559. "type": "string",
  24560. "enum": ["sync"]
  24561. },
  24562. "id": {
  24563. "type": "string",
  24564. "pattern": "^evt_"
  24565. },
  24566. "syncEvent": {
  24567. "type": "object",
  24568. "properties": {
  24569. "type": {
  24570. "type": "string",
  24571. "enum": ["session.next.shell.started.1"]
  24572. },
  24573. "id": {
  24574. "type": "string",
  24575. "pattern": "^evt_"
  24576. },
  24577. "seq": {
  24578. "type": "number"
  24579. },
  24580. "aggregateID": {
  24581. "type": "string"
  24582. },
  24583. "data": {
  24584. "type": "object",
  24585. "properties": {
  24586. "timestamp": {
  24587. "type": "number"
  24588. },
  24589. "sessionID": {
  24590. "type": "string",
  24591. "pattern": "^ses"
  24592. },
  24593. "messageID": {
  24594. "type": "string",
  24595. "pattern": "^msg_"
  24596. },
  24597. "callID": {
  24598. "type": "string"
  24599. },
  24600. "command": {
  24601. "type": "string"
  24602. }
  24603. },
  24604. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  24605. "additionalProperties": false
  24606. }
  24607. },
  24608. "required": ["type", "id", "seq", "aggregateID", "data"],
  24609. "additionalProperties": false
  24610. }
  24611. },
  24612. "required": ["type", "id", "syncEvent"],
  24613. "additionalProperties": false
  24614. },
  24615. "SyncEventSessionNextShellEnded": {
  24616. "type": "object",
  24617. "properties": {
  24618. "type": {
  24619. "type": "string",
  24620. "enum": ["sync"]
  24621. },
  24622. "id": {
  24623. "type": "string",
  24624. "pattern": "^evt_"
  24625. },
  24626. "syncEvent": {
  24627. "type": "object",
  24628. "properties": {
  24629. "type": {
  24630. "type": "string",
  24631. "enum": ["session.next.shell.ended.1"]
  24632. },
  24633. "id": {
  24634. "type": "string",
  24635. "pattern": "^evt_"
  24636. },
  24637. "seq": {
  24638. "type": "number"
  24639. },
  24640. "aggregateID": {
  24641. "type": "string"
  24642. },
  24643. "data": {
  24644. "type": "object",
  24645. "properties": {
  24646. "timestamp": {
  24647. "type": "number"
  24648. },
  24649. "sessionID": {
  24650. "type": "string",
  24651. "pattern": "^ses"
  24652. },
  24653. "callID": {
  24654. "type": "string"
  24655. },
  24656. "output": {
  24657. "type": "string"
  24658. }
  24659. },
  24660. "required": ["timestamp", "sessionID", "callID", "output"],
  24661. "additionalProperties": false
  24662. }
  24663. },
  24664. "required": ["type", "id", "seq", "aggregateID", "data"],
  24665. "additionalProperties": false
  24666. }
  24667. },
  24668. "required": ["type", "id", "syncEvent"],
  24669. "additionalProperties": false
  24670. },
  24671. "SyncEventSessionNextStepStarted": {
  24672. "type": "object",
  24673. "properties": {
  24674. "type": {
  24675. "type": "string",
  24676. "enum": ["sync"]
  24677. },
  24678. "id": {
  24679. "type": "string",
  24680. "pattern": "^evt_"
  24681. },
  24682. "syncEvent": {
  24683. "type": "object",
  24684. "properties": {
  24685. "type": {
  24686. "type": "string",
  24687. "enum": ["session.next.step.started.1"]
  24688. },
  24689. "id": {
  24690. "type": "string",
  24691. "pattern": "^evt_"
  24692. },
  24693. "seq": {
  24694. "type": "number"
  24695. },
  24696. "aggregateID": {
  24697. "type": "string"
  24698. },
  24699. "data": {
  24700. "type": "object",
  24701. "properties": {
  24702. "timestamp": {
  24703. "type": "number"
  24704. },
  24705. "sessionID": {
  24706. "type": "string",
  24707. "pattern": "^ses"
  24708. },
  24709. "assistantMessageID": {
  24710. "type": "string",
  24711. "pattern": "^msg_"
  24712. },
  24713. "agent": {
  24714. "type": "string"
  24715. },
  24716. "model": {
  24717. "type": "object",
  24718. "properties": {
  24719. "id": {
  24720. "type": "string"
  24721. },
  24722. "providerID": {
  24723. "type": "string"
  24724. },
  24725. "variant": {
  24726. "type": "string"
  24727. }
  24728. },
  24729. "required": ["id", "providerID"],
  24730. "additionalProperties": false
  24731. },
  24732. "snapshot": {
  24733. "type": "string"
  24734. }
  24735. },
  24736. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  24737. "additionalProperties": false
  24738. }
  24739. },
  24740. "required": ["type", "id", "seq", "aggregateID", "data"],
  24741. "additionalProperties": false
  24742. }
  24743. },
  24744. "required": ["type", "id", "syncEvent"],
  24745. "additionalProperties": false
  24746. },
  24747. "SyncEventSessionNextStepEnded": {
  24748. "type": "object",
  24749. "properties": {
  24750. "type": {
  24751. "type": "string",
  24752. "enum": ["sync"]
  24753. },
  24754. "id": {
  24755. "type": "string",
  24756. "pattern": "^evt_"
  24757. },
  24758. "syncEvent": {
  24759. "type": "object",
  24760. "properties": {
  24761. "type": {
  24762. "type": "string",
  24763. "enum": ["session.next.step.ended.2"]
  24764. },
  24765. "id": {
  24766. "type": "string",
  24767. "pattern": "^evt_"
  24768. },
  24769. "seq": {
  24770. "type": "number"
  24771. },
  24772. "aggregateID": {
  24773. "type": "string"
  24774. },
  24775. "data": {
  24776. "type": "object",
  24777. "properties": {
  24778. "timestamp": {
  24779. "type": "number"
  24780. },
  24781. "sessionID": {
  24782. "type": "string",
  24783. "pattern": "^ses"
  24784. },
  24785. "assistantMessageID": {
  24786. "type": "string",
  24787. "pattern": "^msg_"
  24788. },
  24789. "finish": {
  24790. "type": "string"
  24791. },
  24792. "cost": {
  24793. "type": "number"
  24794. },
  24795. "tokens": {
  24796. "type": "object",
  24797. "properties": {
  24798. "input": {
  24799. "type": "number"
  24800. },
  24801. "output": {
  24802. "type": "number"
  24803. },
  24804. "reasoning": {
  24805. "type": "number"
  24806. },
  24807. "cache": {
  24808. "type": "object",
  24809. "properties": {
  24810. "read": {
  24811. "type": "number"
  24812. },
  24813. "write": {
  24814. "type": "number"
  24815. }
  24816. },
  24817. "required": ["read", "write"],
  24818. "additionalProperties": false
  24819. }
  24820. },
  24821. "required": ["input", "output", "reasoning", "cache"],
  24822. "additionalProperties": false
  24823. },
  24824. "snapshot": {
  24825. "type": "string"
  24826. }
  24827. },
  24828. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  24829. "additionalProperties": false
  24830. }
  24831. },
  24832. "required": ["type", "id", "seq", "aggregateID", "data"],
  24833. "additionalProperties": false
  24834. }
  24835. },
  24836. "required": ["type", "id", "syncEvent"],
  24837. "additionalProperties": false
  24838. },
  24839. "SyncEventSessionNextStepFailed": {
  24840. "type": "object",
  24841. "properties": {
  24842. "type": {
  24843. "type": "string",
  24844. "enum": ["sync"]
  24845. },
  24846. "id": {
  24847. "type": "string",
  24848. "pattern": "^evt_"
  24849. },
  24850. "syncEvent": {
  24851. "type": "object",
  24852. "properties": {
  24853. "type": {
  24854. "type": "string",
  24855. "enum": ["session.next.step.failed.2"]
  24856. },
  24857. "id": {
  24858. "type": "string",
  24859. "pattern": "^evt_"
  24860. },
  24861. "seq": {
  24862. "type": "number"
  24863. },
  24864. "aggregateID": {
  24865. "type": "string"
  24866. },
  24867. "data": {
  24868. "type": "object",
  24869. "properties": {
  24870. "timestamp": {
  24871. "type": "number"
  24872. },
  24873. "sessionID": {
  24874. "type": "string",
  24875. "pattern": "^ses"
  24876. },
  24877. "assistantMessageID": {
  24878. "type": "string",
  24879. "pattern": "^msg_"
  24880. },
  24881. "error": {
  24882. "$ref": "#/components/schemas/SessionErrorUnknown"
  24883. }
  24884. },
  24885. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  24886. "additionalProperties": false
  24887. }
  24888. },
  24889. "required": ["type", "id", "seq", "aggregateID", "data"],
  24890. "additionalProperties": false
  24891. }
  24892. },
  24893. "required": ["type", "id", "syncEvent"],
  24894. "additionalProperties": false
  24895. },
  24896. "SyncEventSessionNextTextStarted": {
  24897. "type": "object",
  24898. "properties": {
  24899. "type": {
  24900. "type": "string",
  24901. "enum": ["sync"]
  24902. },
  24903. "id": {
  24904. "type": "string",
  24905. "pattern": "^evt_"
  24906. },
  24907. "syncEvent": {
  24908. "type": "object",
  24909. "properties": {
  24910. "type": {
  24911. "type": "string",
  24912. "enum": ["session.next.text.started.1"]
  24913. },
  24914. "id": {
  24915. "type": "string",
  24916. "pattern": "^evt_"
  24917. },
  24918. "seq": {
  24919. "type": "number"
  24920. },
  24921. "aggregateID": {
  24922. "type": "string"
  24923. },
  24924. "data": {
  24925. "type": "object",
  24926. "properties": {
  24927. "timestamp": {
  24928. "type": "number"
  24929. },
  24930. "sessionID": {
  24931. "type": "string",
  24932. "pattern": "^ses"
  24933. },
  24934. "assistantMessageID": {
  24935. "type": "string",
  24936. "pattern": "^msg_"
  24937. },
  24938. "textID": {
  24939. "type": "string"
  24940. }
  24941. },
  24942. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  24943. "additionalProperties": false
  24944. }
  24945. },
  24946. "required": ["type", "id", "seq", "aggregateID", "data"],
  24947. "additionalProperties": false
  24948. }
  24949. },
  24950. "required": ["type", "id", "syncEvent"],
  24951. "additionalProperties": false
  24952. },
  24953. "SyncEventSessionNextTextEnded": {
  24954. "type": "object",
  24955. "properties": {
  24956. "type": {
  24957. "type": "string",
  24958. "enum": ["sync"]
  24959. },
  24960. "id": {
  24961. "type": "string",
  24962. "pattern": "^evt_"
  24963. },
  24964. "syncEvent": {
  24965. "type": "object",
  24966. "properties": {
  24967. "type": {
  24968. "type": "string",
  24969. "enum": ["session.next.text.ended.1"]
  24970. },
  24971. "id": {
  24972. "type": "string",
  24973. "pattern": "^evt_"
  24974. },
  24975. "seq": {
  24976. "type": "number"
  24977. },
  24978. "aggregateID": {
  24979. "type": "string"
  24980. },
  24981. "data": {
  24982. "type": "object",
  24983. "properties": {
  24984. "timestamp": {
  24985. "type": "number"
  24986. },
  24987. "sessionID": {
  24988. "type": "string",
  24989. "pattern": "^ses"
  24990. },
  24991. "assistantMessageID": {
  24992. "type": "string",
  24993. "pattern": "^msg_"
  24994. },
  24995. "textID": {
  24996. "type": "string"
  24997. },
  24998. "text": {
  24999. "type": "string"
  25000. }
  25001. },
  25002. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  25003. "additionalProperties": false
  25004. }
  25005. },
  25006. "required": ["type", "id", "seq", "aggregateID", "data"],
  25007. "additionalProperties": false
  25008. }
  25009. },
  25010. "required": ["type", "id", "syncEvent"],
  25011. "additionalProperties": false
  25012. },
  25013. "SyncEventSessionNextReasoningStarted": {
  25014. "type": "object",
  25015. "properties": {
  25016. "type": {
  25017. "type": "string",
  25018. "enum": ["sync"]
  25019. },
  25020. "id": {
  25021. "type": "string",
  25022. "pattern": "^evt_"
  25023. },
  25024. "syncEvent": {
  25025. "type": "object",
  25026. "properties": {
  25027. "type": {
  25028. "type": "string",
  25029. "enum": ["session.next.reasoning.started.1"]
  25030. },
  25031. "id": {
  25032. "type": "string",
  25033. "pattern": "^evt_"
  25034. },
  25035. "seq": {
  25036. "type": "number"
  25037. },
  25038. "aggregateID": {
  25039. "type": "string"
  25040. },
  25041. "data": {
  25042. "type": "object",
  25043. "properties": {
  25044. "timestamp": {
  25045. "type": "number"
  25046. },
  25047. "sessionID": {
  25048. "type": "string",
  25049. "pattern": "^ses"
  25050. },
  25051. "assistantMessageID": {
  25052. "type": "string",
  25053. "pattern": "^msg_"
  25054. },
  25055. "reasoningID": {
  25056. "type": "string"
  25057. },
  25058. "providerMetadata": {
  25059. "type": "object",
  25060. "additionalProperties": {
  25061. "type": "object"
  25062. }
  25063. }
  25064. },
  25065. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  25066. "additionalProperties": false
  25067. }
  25068. },
  25069. "required": ["type", "id", "seq", "aggregateID", "data"],
  25070. "additionalProperties": false
  25071. }
  25072. },
  25073. "required": ["type", "id", "syncEvent"],
  25074. "additionalProperties": false
  25075. },
  25076. "SyncEventSessionNextReasoningEnded": {
  25077. "type": "object",
  25078. "properties": {
  25079. "type": {
  25080. "type": "string",
  25081. "enum": ["sync"]
  25082. },
  25083. "id": {
  25084. "type": "string",
  25085. "pattern": "^evt_"
  25086. },
  25087. "syncEvent": {
  25088. "type": "object",
  25089. "properties": {
  25090. "type": {
  25091. "type": "string",
  25092. "enum": ["session.next.reasoning.ended.1"]
  25093. },
  25094. "id": {
  25095. "type": "string",
  25096. "pattern": "^evt_"
  25097. },
  25098. "seq": {
  25099. "type": "number"
  25100. },
  25101. "aggregateID": {
  25102. "type": "string"
  25103. },
  25104. "data": {
  25105. "type": "object",
  25106. "properties": {
  25107. "timestamp": {
  25108. "type": "number"
  25109. },
  25110. "sessionID": {
  25111. "type": "string",
  25112. "pattern": "^ses"
  25113. },
  25114. "assistantMessageID": {
  25115. "type": "string",
  25116. "pattern": "^msg_"
  25117. },
  25118. "reasoningID": {
  25119. "type": "string"
  25120. },
  25121. "text": {
  25122. "type": "string"
  25123. },
  25124. "providerMetadata": {
  25125. "type": "object",
  25126. "additionalProperties": {
  25127. "type": "object"
  25128. }
  25129. }
  25130. },
  25131. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  25132. "additionalProperties": false
  25133. }
  25134. },
  25135. "required": ["type", "id", "seq", "aggregateID", "data"],
  25136. "additionalProperties": false
  25137. }
  25138. },
  25139. "required": ["type", "id", "syncEvent"],
  25140. "additionalProperties": false
  25141. },
  25142. "SyncEventSessionNextToolInputStarted": {
  25143. "type": "object",
  25144. "properties": {
  25145. "type": {
  25146. "type": "string",
  25147. "enum": ["sync"]
  25148. },
  25149. "id": {
  25150. "type": "string",
  25151. "pattern": "^evt_"
  25152. },
  25153. "syncEvent": {
  25154. "type": "object",
  25155. "properties": {
  25156. "type": {
  25157. "type": "string",
  25158. "enum": ["session.next.tool.input.started.1"]
  25159. },
  25160. "id": {
  25161. "type": "string",
  25162. "pattern": "^evt_"
  25163. },
  25164. "seq": {
  25165. "type": "number"
  25166. },
  25167. "aggregateID": {
  25168. "type": "string"
  25169. },
  25170. "data": {
  25171. "type": "object",
  25172. "properties": {
  25173. "timestamp": {
  25174. "type": "number"
  25175. },
  25176. "sessionID": {
  25177. "type": "string",
  25178. "pattern": "^ses"
  25179. },
  25180. "assistantMessageID": {
  25181. "type": "string",
  25182. "pattern": "^msg_"
  25183. },
  25184. "callID": {
  25185. "type": "string"
  25186. },
  25187. "name": {
  25188. "type": "string"
  25189. }
  25190. },
  25191. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  25192. "additionalProperties": false
  25193. }
  25194. },
  25195. "required": ["type", "id", "seq", "aggregateID", "data"],
  25196. "additionalProperties": false
  25197. }
  25198. },
  25199. "required": ["type", "id", "syncEvent"],
  25200. "additionalProperties": false
  25201. },
  25202. "SyncEventSessionNextToolInputEnded": {
  25203. "type": "object",
  25204. "properties": {
  25205. "type": {
  25206. "type": "string",
  25207. "enum": ["sync"]
  25208. },
  25209. "id": {
  25210. "type": "string",
  25211. "pattern": "^evt_"
  25212. },
  25213. "syncEvent": {
  25214. "type": "object",
  25215. "properties": {
  25216. "type": {
  25217. "type": "string",
  25218. "enum": ["session.next.tool.input.ended.1"]
  25219. },
  25220. "id": {
  25221. "type": "string",
  25222. "pattern": "^evt_"
  25223. },
  25224. "seq": {
  25225. "type": "number"
  25226. },
  25227. "aggregateID": {
  25228. "type": "string"
  25229. },
  25230. "data": {
  25231. "type": "object",
  25232. "properties": {
  25233. "timestamp": {
  25234. "type": "number"
  25235. },
  25236. "sessionID": {
  25237. "type": "string",
  25238. "pattern": "^ses"
  25239. },
  25240. "assistantMessageID": {
  25241. "type": "string",
  25242. "pattern": "^msg_"
  25243. },
  25244. "callID": {
  25245. "type": "string"
  25246. },
  25247. "text": {
  25248. "type": "string"
  25249. }
  25250. },
  25251. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  25252. "additionalProperties": false
  25253. }
  25254. },
  25255. "required": ["type", "id", "seq", "aggregateID", "data"],
  25256. "additionalProperties": false
  25257. }
  25258. },
  25259. "required": ["type", "id", "syncEvent"],
  25260. "additionalProperties": false
  25261. },
  25262. "SyncEventSessionNextToolCalled": {
  25263. "type": "object",
  25264. "properties": {
  25265. "type": {
  25266. "type": "string",
  25267. "enum": ["sync"]
  25268. },
  25269. "id": {
  25270. "type": "string",
  25271. "pattern": "^evt_"
  25272. },
  25273. "syncEvent": {
  25274. "type": "object",
  25275. "properties": {
  25276. "type": {
  25277. "type": "string",
  25278. "enum": ["session.next.tool.called.1"]
  25279. },
  25280. "id": {
  25281. "type": "string",
  25282. "pattern": "^evt_"
  25283. },
  25284. "seq": {
  25285. "type": "number"
  25286. },
  25287. "aggregateID": {
  25288. "type": "string"
  25289. },
  25290. "data": {
  25291. "type": "object",
  25292. "properties": {
  25293. "timestamp": {
  25294. "type": "number"
  25295. },
  25296. "sessionID": {
  25297. "type": "string",
  25298. "pattern": "^ses"
  25299. },
  25300. "assistantMessageID": {
  25301. "type": "string",
  25302. "pattern": "^msg_"
  25303. },
  25304. "callID": {
  25305. "type": "string"
  25306. },
  25307. "tool": {
  25308. "type": "string"
  25309. },
  25310. "input": {
  25311. "type": "object"
  25312. },
  25313. "provider": {
  25314. "type": "object",
  25315. "properties": {
  25316. "executed": {
  25317. "type": "boolean"
  25318. },
  25319. "metadata": {
  25320. "type": "object",
  25321. "additionalProperties": {
  25322. "type": "object"
  25323. }
  25324. }
  25325. },
  25326. "required": ["executed"],
  25327. "additionalProperties": false
  25328. }
  25329. },
  25330. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  25331. "additionalProperties": false
  25332. }
  25333. },
  25334. "required": ["type", "id", "seq", "aggregateID", "data"],
  25335. "additionalProperties": false
  25336. }
  25337. },
  25338. "required": ["type", "id", "syncEvent"],
  25339. "additionalProperties": false
  25340. },
  25341. "SyncEventSessionNextToolProgress": {
  25342. "type": "object",
  25343. "properties": {
  25344. "type": {
  25345. "type": "string",
  25346. "enum": ["sync"]
  25347. },
  25348. "id": {
  25349. "type": "string",
  25350. "pattern": "^evt_"
  25351. },
  25352. "syncEvent": {
  25353. "type": "object",
  25354. "properties": {
  25355. "type": {
  25356. "type": "string",
  25357. "enum": ["session.next.tool.progress.1"]
  25358. },
  25359. "id": {
  25360. "type": "string",
  25361. "pattern": "^evt_"
  25362. },
  25363. "seq": {
  25364. "type": "number"
  25365. },
  25366. "aggregateID": {
  25367. "type": "string"
  25368. },
  25369. "data": {
  25370. "type": "object",
  25371. "properties": {
  25372. "timestamp": {
  25373. "type": "number"
  25374. },
  25375. "sessionID": {
  25376. "type": "string",
  25377. "pattern": "^ses"
  25378. },
  25379. "assistantMessageID": {
  25380. "type": "string",
  25381. "pattern": "^msg_"
  25382. },
  25383. "callID": {
  25384. "type": "string"
  25385. },
  25386. "structured": {
  25387. "type": "object"
  25388. },
  25389. "content": {
  25390. "type": "array",
  25391. "items": {
  25392. "anyOf": [
  25393. {
  25394. "$ref": "#/components/schemas/ToolTextContent"
  25395. },
  25396. {
  25397. "$ref": "#/components/schemas/ToolFileContent"
  25398. }
  25399. ]
  25400. }
  25401. }
  25402. },
  25403. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  25404. "additionalProperties": false
  25405. }
  25406. },
  25407. "required": ["type", "id", "seq", "aggregateID", "data"],
  25408. "additionalProperties": false
  25409. }
  25410. },
  25411. "required": ["type", "id", "syncEvent"],
  25412. "additionalProperties": false
  25413. },
  25414. "SyncEventSessionNextToolSuccess": {
  25415. "type": "object",
  25416. "properties": {
  25417. "type": {
  25418. "type": "string",
  25419. "enum": ["sync"]
  25420. },
  25421. "id": {
  25422. "type": "string",
  25423. "pattern": "^evt_"
  25424. },
  25425. "syncEvent": {
  25426. "type": "object",
  25427. "properties": {
  25428. "type": {
  25429. "type": "string",
  25430. "enum": ["session.next.tool.success.1"]
  25431. },
  25432. "id": {
  25433. "type": "string",
  25434. "pattern": "^evt_"
  25435. },
  25436. "seq": {
  25437. "type": "number"
  25438. },
  25439. "aggregateID": {
  25440. "type": "string"
  25441. },
  25442. "data": {
  25443. "type": "object",
  25444. "properties": {
  25445. "timestamp": {
  25446. "type": "number"
  25447. },
  25448. "sessionID": {
  25449. "type": "string",
  25450. "pattern": "^ses"
  25451. },
  25452. "assistantMessageID": {
  25453. "type": "string",
  25454. "pattern": "^msg_"
  25455. },
  25456. "callID": {
  25457. "type": "string"
  25458. },
  25459. "structured": {
  25460. "type": "object"
  25461. },
  25462. "content": {
  25463. "type": "array",
  25464. "items": {
  25465. "anyOf": [
  25466. {
  25467. "$ref": "#/components/schemas/ToolTextContent"
  25468. },
  25469. {
  25470. "$ref": "#/components/schemas/ToolFileContent"
  25471. }
  25472. ]
  25473. }
  25474. },
  25475. "outputPaths": {
  25476. "type": "array",
  25477. "items": {
  25478. "type": "string"
  25479. }
  25480. },
  25481. "result": {},
  25482. "provider": {
  25483. "type": "object",
  25484. "properties": {
  25485. "executed": {
  25486. "type": "boolean"
  25487. },
  25488. "metadata": {
  25489. "type": "object",
  25490. "additionalProperties": {
  25491. "type": "object"
  25492. }
  25493. }
  25494. },
  25495. "required": ["executed"],
  25496. "additionalProperties": false
  25497. }
  25498. },
  25499. "required": [
  25500. "timestamp",
  25501. "sessionID",
  25502. "assistantMessageID",
  25503. "callID",
  25504. "structured",
  25505. "content",
  25506. "provider"
  25507. ],
  25508. "additionalProperties": false
  25509. }
  25510. },
  25511. "required": ["type", "id", "seq", "aggregateID", "data"],
  25512. "additionalProperties": false
  25513. }
  25514. },
  25515. "required": ["type", "id", "syncEvent"],
  25516. "additionalProperties": false
  25517. },
  25518. "SyncEventSessionNextToolFailed": {
  25519. "type": "object",
  25520. "properties": {
  25521. "type": {
  25522. "type": "string",
  25523. "enum": ["sync"]
  25524. },
  25525. "id": {
  25526. "type": "string",
  25527. "pattern": "^evt_"
  25528. },
  25529. "syncEvent": {
  25530. "type": "object",
  25531. "properties": {
  25532. "type": {
  25533. "type": "string",
  25534. "enum": ["session.next.tool.failed.1"]
  25535. },
  25536. "id": {
  25537. "type": "string",
  25538. "pattern": "^evt_"
  25539. },
  25540. "seq": {
  25541. "type": "number"
  25542. },
  25543. "aggregateID": {
  25544. "type": "string"
  25545. },
  25546. "data": {
  25547. "type": "object",
  25548. "properties": {
  25549. "timestamp": {
  25550. "type": "number"
  25551. },
  25552. "sessionID": {
  25553. "type": "string",
  25554. "pattern": "^ses"
  25555. },
  25556. "assistantMessageID": {
  25557. "type": "string",
  25558. "pattern": "^msg_"
  25559. },
  25560. "callID": {
  25561. "type": "string"
  25562. },
  25563. "error": {
  25564. "$ref": "#/components/schemas/SessionErrorUnknown"
  25565. },
  25566. "result": {},
  25567. "provider": {
  25568. "type": "object",
  25569. "properties": {
  25570. "executed": {
  25571. "type": "boolean"
  25572. },
  25573. "metadata": {
  25574. "type": "object",
  25575. "additionalProperties": {
  25576. "type": "object"
  25577. }
  25578. }
  25579. },
  25580. "required": ["executed"],
  25581. "additionalProperties": false
  25582. }
  25583. },
  25584. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  25585. "additionalProperties": false
  25586. }
  25587. },
  25588. "required": ["type", "id", "seq", "aggregateID", "data"],
  25589. "additionalProperties": false
  25590. }
  25591. },
  25592. "required": ["type", "id", "syncEvent"],
  25593. "additionalProperties": false
  25594. },
  25595. "SyncEventSessionNextRetried": {
  25596. "type": "object",
  25597. "properties": {
  25598. "type": {
  25599. "type": "string",
  25600. "enum": ["sync"]
  25601. },
  25602. "id": {
  25603. "type": "string",
  25604. "pattern": "^evt_"
  25605. },
  25606. "syncEvent": {
  25607. "type": "object",
  25608. "properties": {
  25609. "type": {
  25610. "type": "string",
  25611. "enum": ["session.next.retried.1"]
  25612. },
  25613. "id": {
  25614. "type": "string",
  25615. "pattern": "^evt_"
  25616. },
  25617. "seq": {
  25618. "type": "number"
  25619. },
  25620. "aggregateID": {
  25621. "type": "string"
  25622. },
  25623. "data": {
  25624. "type": "object",
  25625. "properties": {
  25626. "timestamp": {
  25627. "type": "number"
  25628. },
  25629. "sessionID": {
  25630. "type": "string",
  25631. "pattern": "^ses"
  25632. },
  25633. "attempt": {
  25634. "type": "number"
  25635. },
  25636. "error": {
  25637. "$ref": "#/components/schemas/SessionNextRetry_error"
  25638. }
  25639. },
  25640. "required": ["timestamp", "sessionID", "attempt", "error"],
  25641. "additionalProperties": false
  25642. }
  25643. },
  25644. "required": ["type", "id", "seq", "aggregateID", "data"],
  25645. "additionalProperties": false
  25646. }
  25647. },
  25648. "required": ["type", "id", "syncEvent"],
  25649. "additionalProperties": false
  25650. },
  25651. "SyncEventSessionNextCompactionStarted": {
  25652. "type": "object",
  25653. "properties": {
  25654. "type": {
  25655. "type": "string",
  25656. "enum": ["sync"]
  25657. },
  25658. "id": {
  25659. "type": "string",
  25660. "pattern": "^evt_"
  25661. },
  25662. "syncEvent": {
  25663. "type": "object",
  25664. "properties": {
  25665. "type": {
  25666. "type": "string",
  25667. "enum": ["session.next.compaction.started.1"]
  25668. },
  25669. "id": {
  25670. "type": "string",
  25671. "pattern": "^evt_"
  25672. },
  25673. "seq": {
  25674. "type": "number"
  25675. },
  25676. "aggregateID": {
  25677. "type": "string"
  25678. },
  25679. "data": {
  25680. "type": "object",
  25681. "properties": {
  25682. "timestamp": {
  25683. "type": "number"
  25684. },
  25685. "sessionID": {
  25686. "type": "string",
  25687. "pattern": "^ses"
  25688. },
  25689. "messageID": {
  25690. "type": "string",
  25691. "pattern": "^msg_"
  25692. },
  25693. "reason": {
  25694. "type": "string",
  25695. "enum": ["auto", "manual"]
  25696. }
  25697. },
  25698. "required": ["timestamp", "sessionID", "messageID", "reason"],
  25699. "additionalProperties": false
  25700. }
  25701. },
  25702. "required": ["type", "id", "seq", "aggregateID", "data"],
  25703. "additionalProperties": false
  25704. }
  25705. },
  25706. "required": ["type", "id", "syncEvent"],
  25707. "additionalProperties": false
  25708. },
  25709. "SyncEventSessionNextCompactionEnded": {
  25710. "type": "object",
  25711. "properties": {
  25712. "type": {
  25713. "type": "string",
  25714. "enum": ["sync"]
  25715. },
  25716. "id": {
  25717. "type": "string",
  25718. "pattern": "^evt_"
  25719. },
  25720. "syncEvent": {
  25721. "type": "object",
  25722. "properties": {
  25723. "type": {
  25724. "type": "string",
  25725. "enum": ["session.next.compaction.ended.1"]
  25726. },
  25727. "id": {
  25728. "type": "string",
  25729. "pattern": "^evt_"
  25730. },
  25731. "seq": {
  25732. "type": "number"
  25733. },
  25734. "aggregateID": {
  25735. "type": "string"
  25736. },
  25737. "data": {
  25738. "type": "object",
  25739. "properties": {
  25740. "timestamp": {
  25741. "type": "number"
  25742. },
  25743. "sessionID": {
  25744. "type": "string",
  25745. "pattern": "^ses"
  25746. },
  25747. "messageID": {
  25748. "type": "string",
  25749. "pattern": "^msg_"
  25750. },
  25751. "reason": {
  25752. "type": "string",
  25753. "enum": ["auto", "manual"]
  25754. },
  25755. "text": {
  25756. "type": "string"
  25757. },
  25758. "recent": {
  25759. "type": "string"
  25760. }
  25761. },
  25762. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  25763. "additionalProperties": false
  25764. }
  25765. },
  25766. "required": ["type", "id", "seq", "aggregateID", "data"],
  25767. "additionalProperties": false
  25768. }
  25769. },
  25770. "required": ["type", "id", "syncEvent"],
  25771. "additionalProperties": false
  25772. },
  25773. "ConfigV2ReferenceGit": {
  25774. "type": "object",
  25775. "properties": {
  25776. "repository": {
  25777. "type": "string"
  25778. },
  25779. "branch": {
  25780. "type": "string"
  25781. },
  25782. "description": {
  25783. "type": "string"
  25784. },
  25785. "hidden": {
  25786. "type": "boolean"
  25787. }
  25788. },
  25789. "required": ["repository"],
  25790. "additionalProperties": false
  25791. },
  25792. "ConfigV2ReferenceLocal": {
  25793. "type": "object",
  25794. "properties": {
  25795. "path": {
  25796. "type": "string"
  25797. },
  25798. "description": {
  25799. "type": "string"
  25800. },
  25801. "hidden": {
  25802. "type": "boolean"
  25803. }
  25804. },
  25805. "required": ["path"],
  25806. "additionalProperties": false
  25807. },
  25808. "PolicyEffect": {
  25809. "type": "string",
  25810. "enum": ["allow", "deny"]
  25811. },
  25812. "ConfigV2ExperimentalPolicy": {
  25813. "type": "object",
  25814. "properties": {
  25815. "action": {
  25816. "type": "string",
  25817. "enum": ["provider.use"]
  25818. },
  25819. "effect": {
  25820. "$ref": "#/components/schemas/PolicyEffect"
  25821. },
  25822. "resource": {
  25823. "type": "string"
  25824. }
  25825. },
  25826. "required": ["action", "effect", "resource"],
  25827. "additionalProperties": false
  25828. },
  25829. "ProjectDirectories": {
  25830. "type": "array",
  25831. "items": {
  25832. "type": "object",
  25833. "properties": {
  25834. "directory": {
  25835. "type": "string"
  25836. },
  25837. "strategy": {
  25838. "type": "string"
  25839. }
  25840. },
  25841. "required": ["directory"],
  25842. "additionalProperties": false
  25843. }
  25844. },
  25845. "LocationInfo": {
  25846. "type": "object",
  25847. "properties": {
  25848. "directory": {
  25849. "type": "string"
  25850. },
  25851. "workspaceID": {
  25852. "type": "string",
  25853. "pattern": "^wrk"
  25854. },
  25855. "project": {
  25856. "type": "object",
  25857. "properties": {
  25858. "id": {
  25859. "type": "string"
  25860. },
  25861. "directory": {
  25862. "type": "string"
  25863. }
  25864. },
  25865. "required": ["id", "directory"],
  25866. "additionalProperties": false
  25867. }
  25868. },
  25869. "required": ["directory", "project"],
  25870. "additionalProperties": false
  25871. },
  25872. "PermissionV2Effect": {
  25873. "type": "string",
  25874. "enum": ["allow", "deny", "ask"]
  25875. },
  25876. "PermissionV2Rule": {
  25877. "type": "object",
  25878. "properties": {
  25879. "action": {
  25880. "type": "string"
  25881. },
  25882. "resource": {
  25883. "type": "string"
  25884. },
  25885. "effect": {
  25886. "$ref": "#/components/schemas/PermissionV2Effect"
  25887. }
  25888. },
  25889. "required": ["action", "resource", "effect"],
  25890. "additionalProperties": false
  25891. },
  25892. "PermissionV2Ruleset": {
  25893. "type": "array",
  25894. "items": {
  25895. "$ref": "#/components/schemas/PermissionV2Rule"
  25896. }
  25897. },
  25898. "AgentV2Info": {
  25899. "type": "object",
  25900. "properties": {
  25901. "id": {
  25902. "type": "string"
  25903. },
  25904. "model": {
  25905. "type": "object",
  25906. "properties": {
  25907. "id": {
  25908. "type": "string"
  25909. },
  25910. "providerID": {
  25911. "type": "string"
  25912. },
  25913. "variant": {
  25914. "type": "string"
  25915. }
  25916. },
  25917. "required": ["id", "providerID"],
  25918. "additionalProperties": false
  25919. },
  25920. "request": {
  25921. "type": "object",
  25922. "properties": {
  25923. "headers": {
  25924. "type": "object",
  25925. "additionalProperties": {
  25926. "type": "string"
  25927. }
  25928. },
  25929. "body": {
  25930. "type": "object"
  25931. }
  25932. },
  25933. "required": ["headers", "body"],
  25934. "additionalProperties": false
  25935. },
  25936. "system": {
  25937. "type": "string"
  25938. },
  25939. "description": {
  25940. "type": "string"
  25941. },
  25942. "mode": {
  25943. "type": "string",
  25944. "enum": ["subagent", "primary", "all"]
  25945. },
  25946. "hidden": {
  25947. "type": "boolean"
  25948. },
  25949. "color": {
  25950. "anyOf": [
  25951. {
  25952. "type": "string",
  25953. "pattern": "^#[0-9a-fA-F]{6}$"
  25954. },
  25955. {
  25956. "type": "string",
  25957. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  25958. }
  25959. ]
  25960. },
  25961. "steps": {
  25962. "type": "integer",
  25963. "exclusiveMinimum": 0
  25964. },
  25965. "permissions": {
  25966. "$ref": "#/components/schemas/PermissionV2Ruleset"
  25967. }
  25968. },
  25969. "required": ["id", "request", "mode", "hidden", "permissions"],
  25970. "additionalProperties": false
  25971. },
  25972. "SessionV2Info": {
  25973. "type": "object",
  25974. "properties": {
  25975. "id": {
  25976. "type": "string",
  25977. "pattern": "^ses"
  25978. },
  25979. "parentID": {
  25980. "type": "string",
  25981. "pattern": "^ses"
  25982. },
  25983. "projectID": {
  25984. "type": "string"
  25985. },
  25986. "agent": {
  25987. "type": "string"
  25988. },
  25989. "model": {
  25990. "type": "object",
  25991. "properties": {
  25992. "id": {
  25993. "type": "string"
  25994. },
  25995. "providerID": {
  25996. "type": "string"
  25997. },
  25998. "variant": {
  25999. "type": "string"
  26000. }
  26001. },
  26002. "required": ["id", "providerID"],
  26003. "additionalProperties": false
  26004. },
  26005. "cost": {
  26006. "type": "number"
  26007. },
  26008. "tokens": {
  26009. "type": "object",
  26010. "properties": {
  26011. "input": {
  26012. "type": "number"
  26013. },
  26014. "output": {
  26015. "type": "number"
  26016. },
  26017. "reasoning": {
  26018. "type": "number"
  26019. },
  26020. "cache": {
  26021. "type": "object",
  26022. "properties": {
  26023. "read": {
  26024. "type": "number"
  26025. },
  26026. "write": {
  26027. "type": "number"
  26028. }
  26029. },
  26030. "required": ["read", "write"],
  26031. "additionalProperties": false
  26032. }
  26033. },
  26034. "required": ["input", "output", "reasoning", "cache"],
  26035. "additionalProperties": false
  26036. },
  26037. "time": {
  26038. "type": "object",
  26039. "properties": {
  26040. "created": {
  26041. "type": "number"
  26042. },
  26043. "updated": {
  26044. "type": "number"
  26045. },
  26046. "archived": {
  26047. "type": "number"
  26048. }
  26049. },
  26050. "required": ["created", "updated"],
  26051. "additionalProperties": false
  26052. },
  26053. "title": {
  26054. "type": "string"
  26055. },
  26056. "location": {
  26057. "$ref": "#/components/schemas/LocationRef"
  26058. },
  26059. "subpath": {
  26060. "type": "string"
  26061. }
  26062. },
  26063. "required": ["id", "projectID", "cost", "tokens", "time", "title", "location"],
  26064. "additionalProperties": false
  26065. },
  26066. "SessionInputAdmitted": {
  26067. "type": "object",
  26068. "properties": {
  26069. "admittedSeq": {
  26070. "type": "integer",
  26071. "minimum": 0
  26072. },
  26073. "id": {
  26074. "type": "string",
  26075. "pattern": "^msg_"
  26076. },
  26077. "sessionID": {
  26078. "type": "string",
  26079. "pattern": "^ses"
  26080. },
  26081. "prompt": {
  26082. "$ref": "#/components/schemas/Prompt"
  26083. },
  26084. "delivery": {
  26085. "type": "string",
  26086. "enum": ["steer", "queue"]
  26087. },
  26088. "timeCreated": {
  26089. "type": "number"
  26090. },
  26091. "promotedSeq": {
  26092. "type": "integer",
  26093. "minimum": 0
  26094. }
  26095. },
  26096. "required": ["admittedSeq", "id", "sessionID", "prompt", "delivery", "timeCreated"],
  26097. "additionalProperties": false
  26098. },
  26099. "SessionMessageAgentSwitched": {
  26100. "type": "object",
  26101. "properties": {
  26102. "id": {
  26103. "type": "string",
  26104. "pattern": "^msg_"
  26105. },
  26106. "metadata": {
  26107. "type": "object"
  26108. },
  26109. "time": {
  26110. "type": "object",
  26111. "properties": {
  26112. "created": {
  26113. "type": "number"
  26114. }
  26115. },
  26116. "required": ["created"],
  26117. "additionalProperties": false
  26118. },
  26119. "type": {
  26120. "type": "string",
  26121. "enum": ["agent-switched"]
  26122. },
  26123. "agent": {
  26124. "type": "string"
  26125. }
  26126. },
  26127. "required": ["id", "time", "type", "agent"],
  26128. "additionalProperties": false
  26129. },
  26130. "SessionMessageModelSwitched": {
  26131. "type": "object",
  26132. "properties": {
  26133. "id": {
  26134. "type": "string",
  26135. "pattern": "^msg_"
  26136. },
  26137. "metadata": {
  26138. "type": "object"
  26139. },
  26140. "time": {
  26141. "type": "object",
  26142. "properties": {
  26143. "created": {
  26144. "type": "number"
  26145. }
  26146. },
  26147. "required": ["created"],
  26148. "additionalProperties": false
  26149. },
  26150. "type": {
  26151. "type": "string",
  26152. "enum": ["model-switched"]
  26153. },
  26154. "model": {
  26155. "type": "object",
  26156. "properties": {
  26157. "id": {
  26158. "type": "string"
  26159. },
  26160. "providerID": {
  26161. "type": "string"
  26162. },
  26163. "variant": {
  26164. "type": "string"
  26165. }
  26166. },
  26167. "required": ["id", "providerID"],
  26168. "additionalProperties": false
  26169. }
  26170. },
  26171. "required": ["id", "time", "type", "model"],
  26172. "additionalProperties": false
  26173. },
  26174. "SessionMessageUser": {
  26175. "type": "object",
  26176. "properties": {
  26177. "id": {
  26178. "type": "string",
  26179. "pattern": "^msg_"
  26180. },
  26181. "metadata": {
  26182. "type": "object"
  26183. },
  26184. "time": {
  26185. "type": "object",
  26186. "properties": {
  26187. "created": {
  26188. "type": "number"
  26189. }
  26190. },
  26191. "required": ["created"],
  26192. "additionalProperties": false
  26193. },
  26194. "text": {
  26195. "type": "string"
  26196. },
  26197. "files": {
  26198. "type": "array",
  26199. "items": {
  26200. "$ref": "#/components/schemas/PromptFileAttachment"
  26201. }
  26202. },
  26203. "agents": {
  26204. "type": "array",
  26205. "items": {
  26206. "$ref": "#/components/schemas/PromptAgentAttachment"
  26207. }
  26208. },
  26209. "type": {
  26210. "type": "string",
  26211. "enum": ["user"]
  26212. }
  26213. },
  26214. "required": ["id", "time", "text", "type"],
  26215. "additionalProperties": false
  26216. },
  26217. "SessionMessageSynthetic": {
  26218. "type": "object",
  26219. "properties": {
  26220. "id": {
  26221. "type": "string",
  26222. "pattern": "^msg_"
  26223. },
  26224. "metadata": {
  26225. "type": "object"
  26226. },
  26227. "time": {
  26228. "type": "object",
  26229. "properties": {
  26230. "created": {
  26231. "type": "number"
  26232. }
  26233. },
  26234. "required": ["created"],
  26235. "additionalProperties": false
  26236. },
  26237. "sessionID": {
  26238. "type": "string",
  26239. "pattern": "^ses"
  26240. },
  26241. "text": {
  26242. "type": "string"
  26243. },
  26244. "type": {
  26245. "type": "string",
  26246. "enum": ["synthetic"]
  26247. }
  26248. },
  26249. "required": ["id", "time", "sessionID", "text", "type"],
  26250. "additionalProperties": false
  26251. },
  26252. "SessionMessageSystem": {
  26253. "type": "object",
  26254. "properties": {
  26255. "id": {
  26256. "type": "string",
  26257. "pattern": "^msg_"
  26258. },
  26259. "metadata": {
  26260. "type": "object"
  26261. },
  26262. "time": {
  26263. "type": "object",
  26264. "properties": {
  26265. "created": {
  26266. "type": "number"
  26267. }
  26268. },
  26269. "required": ["created"],
  26270. "additionalProperties": false
  26271. },
  26272. "type": {
  26273. "type": "string",
  26274. "enum": ["system"]
  26275. },
  26276. "text": {
  26277. "type": "string"
  26278. }
  26279. },
  26280. "required": ["id", "time", "type", "text"],
  26281. "additionalProperties": false
  26282. },
  26283. "SessionMessageShell": {
  26284. "type": "object",
  26285. "properties": {
  26286. "id": {
  26287. "type": "string",
  26288. "pattern": "^msg_"
  26289. },
  26290. "metadata": {
  26291. "type": "object"
  26292. },
  26293. "time": {
  26294. "type": "object",
  26295. "properties": {
  26296. "created": {
  26297. "type": "number"
  26298. },
  26299. "completed": {
  26300. "type": "number"
  26301. }
  26302. },
  26303. "required": ["created"],
  26304. "additionalProperties": false
  26305. },
  26306. "type": {
  26307. "type": "string",
  26308. "enum": ["shell"]
  26309. },
  26310. "callID": {
  26311. "type": "string"
  26312. },
  26313. "command": {
  26314. "type": "string"
  26315. },
  26316. "output": {
  26317. "type": "string"
  26318. }
  26319. },
  26320. "required": ["id", "time", "type", "callID", "command", "output"],
  26321. "additionalProperties": false
  26322. },
  26323. "SessionMessageAssistantText": {
  26324. "type": "object",
  26325. "properties": {
  26326. "type": {
  26327. "type": "string",
  26328. "enum": ["text"]
  26329. },
  26330. "id": {
  26331. "type": "string"
  26332. },
  26333. "text": {
  26334. "type": "string"
  26335. }
  26336. },
  26337. "required": ["type", "id", "text"],
  26338. "additionalProperties": false
  26339. },
  26340. "SessionMessageAssistantReasoning": {
  26341. "type": "object",
  26342. "properties": {
  26343. "type": {
  26344. "type": "string",
  26345. "enum": ["reasoning"]
  26346. },
  26347. "id": {
  26348. "type": "string"
  26349. },
  26350. "text": {
  26351. "type": "string"
  26352. },
  26353. "providerMetadata": {
  26354. "type": "object",
  26355. "additionalProperties": {
  26356. "type": "object"
  26357. }
  26358. }
  26359. },
  26360. "required": ["type", "id", "text"],
  26361. "additionalProperties": false
  26362. },
  26363. "SessionMessageToolStatePending": {
  26364. "type": "object",
  26365. "properties": {
  26366. "status": {
  26367. "type": "string",
  26368. "enum": ["pending"]
  26369. },
  26370. "input": {
  26371. "type": "string"
  26372. }
  26373. },
  26374. "required": ["status", "input"],
  26375. "additionalProperties": false
  26376. },
  26377. "SessionMessageToolStateRunning": {
  26378. "type": "object",
  26379. "properties": {
  26380. "status": {
  26381. "type": "string",
  26382. "enum": ["running"]
  26383. },
  26384. "input": {
  26385. "type": "object"
  26386. },
  26387. "structured": {
  26388. "type": "object"
  26389. },
  26390. "content": {
  26391. "type": "array",
  26392. "items": {
  26393. "anyOf": [
  26394. {
  26395. "$ref": "#/components/schemas/ToolTextContent"
  26396. },
  26397. {
  26398. "$ref": "#/components/schemas/ToolFileContent"
  26399. }
  26400. ]
  26401. }
  26402. }
  26403. },
  26404. "required": ["status", "input", "structured", "content"],
  26405. "additionalProperties": false
  26406. },
  26407. "SessionMessageToolStateCompleted": {
  26408. "type": "object",
  26409. "properties": {
  26410. "status": {
  26411. "type": "string",
  26412. "enum": ["completed"]
  26413. },
  26414. "input": {
  26415. "type": "object"
  26416. },
  26417. "attachments": {
  26418. "type": "array",
  26419. "items": {
  26420. "$ref": "#/components/schemas/PromptFileAttachment"
  26421. }
  26422. },
  26423. "content": {
  26424. "type": "array",
  26425. "items": {
  26426. "anyOf": [
  26427. {
  26428. "$ref": "#/components/schemas/ToolTextContent"
  26429. },
  26430. {
  26431. "$ref": "#/components/schemas/ToolFileContent"
  26432. }
  26433. ]
  26434. }
  26435. },
  26436. "outputPaths": {
  26437. "type": "array",
  26438. "items": {
  26439. "type": "string"
  26440. }
  26441. },
  26442. "structured": {
  26443. "type": "object"
  26444. },
  26445. "result": {}
  26446. },
  26447. "required": ["status", "input", "content", "structured"],
  26448. "additionalProperties": false
  26449. },
  26450. "SessionMessageToolStateError": {
  26451. "type": "object",
  26452. "properties": {
  26453. "status": {
  26454. "type": "string",
  26455. "enum": ["error"]
  26456. },
  26457. "input": {
  26458. "type": "object"
  26459. },
  26460. "content": {
  26461. "type": "array",
  26462. "items": {
  26463. "anyOf": [
  26464. {
  26465. "$ref": "#/components/schemas/ToolTextContent"
  26466. },
  26467. {
  26468. "$ref": "#/components/schemas/ToolFileContent"
  26469. }
  26470. ]
  26471. }
  26472. },
  26473. "structured": {
  26474. "type": "object"
  26475. },
  26476. "error": {
  26477. "$ref": "#/components/schemas/SessionErrorUnknown"
  26478. },
  26479. "result": {}
  26480. },
  26481. "required": ["status", "input", "content", "structured", "error"],
  26482. "additionalProperties": false
  26483. },
  26484. "SessionMessageAssistantTool": {
  26485. "type": "object",
  26486. "properties": {
  26487. "type": {
  26488. "type": "string",
  26489. "enum": ["tool"]
  26490. },
  26491. "id": {
  26492. "type": "string"
  26493. },
  26494. "name": {
  26495. "type": "string"
  26496. },
  26497. "provider": {
  26498. "type": "object",
  26499. "properties": {
  26500. "executed": {
  26501. "type": "boolean"
  26502. },
  26503. "metadata": {
  26504. "type": "object",
  26505. "additionalProperties": {
  26506. "type": "object"
  26507. }
  26508. },
  26509. "resultMetadata": {
  26510. "type": "object",
  26511. "additionalProperties": {
  26512. "type": "object"
  26513. }
  26514. }
  26515. },
  26516. "required": ["executed"],
  26517. "additionalProperties": false
  26518. },
  26519. "state": {
  26520. "anyOf": [
  26521. {
  26522. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  26523. },
  26524. {
  26525. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  26526. },
  26527. {
  26528. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  26529. },
  26530. {
  26531. "$ref": "#/components/schemas/SessionMessageToolStateError"
  26532. }
  26533. ]
  26534. },
  26535. "time": {
  26536. "type": "object",
  26537. "properties": {
  26538. "created": {
  26539. "type": "number"
  26540. },
  26541. "ran": {
  26542. "type": "number"
  26543. },
  26544. "completed": {
  26545. "type": "number"
  26546. },
  26547. "pruned": {
  26548. "type": "number"
  26549. }
  26550. },
  26551. "required": ["created"],
  26552. "additionalProperties": false
  26553. }
  26554. },
  26555. "required": ["type", "id", "name", "state", "time"],
  26556. "additionalProperties": false
  26557. },
  26558. "SessionMessageAssistant": {
  26559. "type": "object",
  26560. "properties": {
  26561. "id": {
  26562. "type": "string",
  26563. "pattern": "^msg_"
  26564. },
  26565. "metadata": {
  26566. "type": "object"
  26567. },
  26568. "time": {
  26569. "type": "object",
  26570. "properties": {
  26571. "created": {
  26572. "type": "number"
  26573. },
  26574. "completed": {
  26575. "type": "number"
  26576. }
  26577. },
  26578. "required": ["created"],
  26579. "additionalProperties": false
  26580. },
  26581. "type": {
  26582. "type": "string",
  26583. "enum": ["assistant"]
  26584. },
  26585. "agent": {
  26586. "type": "string"
  26587. },
  26588. "model": {
  26589. "type": "object",
  26590. "properties": {
  26591. "id": {
  26592. "type": "string"
  26593. },
  26594. "providerID": {
  26595. "type": "string"
  26596. },
  26597. "variant": {
  26598. "type": "string"
  26599. }
  26600. },
  26601. "required": ["id", "providerID"],
  26602. "additionalProperties": false
  26603. },
  26604. "content": {
  26605. "type": "array",
  26606. "items": {
  26607. "anyOf": [
  26608. {
  26609. "$ref": "#/components/schemas/SessionMessageAssistantText"
  26610. },
  26611. {
  26612. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  26613. },
  26614. {
  26615. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  26616. }
  26617. ]
  26618. }
  26619. },
  26620. "snapshot": {
  26621. "type": "object",
  26622. "properties": {
  26623. "start": {
  26624. "type": "string"
  26625. },
  26626. "end": {
  26627. "type": "string"
  26628. }
  26629. },
  26630. "additionalProperties": false
  26631. },
  26632. "finish": {
  26633. "type": "string"
  26634. },
  26635. "cost": {
  26636. "type": "number"
  26637. },
  26638. "tokens": {
  26639. "type": "object",
  26640. "properties": {
  26641. "input": {
  26642. "type": "number"
  26643. },
  26644. "output": {
  26645. "type": "number"
  26646. },
  26647. "reasoning": {
  26648. "type": "number"
  26649. },
  26650. "cache": {
  26651. "type": "object",
  26652. "properties": {
  26653. "read": {
  26654. "type": "number"
  26655. },
  26656. "write": {
  26657. "type": "number"
  26658. }
  26659. },
  26660. "required": ["read", "write"],
  26661. "additionalProperties": false
  26662. }
  26663. },
  26664. "required": ["input", "output", "reasoning", "cache"],
  26665. "additionalProperties": false
  26666. },
  26667. "error": {
  26668. "$ref": "#/components/schemas/SessionErrorUnknown"
  26669. }
  26670. },
  26671. "required": ["id", "time", "type", "agent", "model", "content"],
  26672. "additionalProperties": false
  26673. },
  26674. "SessionMessageCompaction": {
  26675. "type": "object",
  26676. "properties": {
  26677. "type": {
  26678. "type": "string",
  26679. "enum": ["compaction"]
  26680. },
  26681. "reason": {
  26682. "type": "string",
  26683. "enum": ["auto", "manual"]
  26684. },
  26685. "summary": {
  26686. "type": "string"
  26687. },
  26688. "recent": {
  26689. "type": "string"
  26690. },
  26691. "id": {
  26692. "type": "string",
  26693. "pattern": "^msg_"
  26694. },
  26695. "metadata": {
  26696. "type": "object"
  26697. },
  26698. "time": {
  26699. "type": "object",
  26700. "properties": {
  26701. "created": {
  26702. "type": "number"
  26703. }
  26704. },
  26705. "required": ["created"],
  26706. "additionalProperties": false
  26707. }
  26708. },
  26709. "required": ["type", "reason", "summary", "recent", "id", "time"],
  26710. "additionalProperties": false
  26711. },
  26712. "SessionMessage": {
  26713. "anyOf": [
  26714. {
  26715. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  26716. },
  26717. {
  26718. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  26719. },
  26720. {
  26721. "$ref": "#/components/schemas/SessionMessageUser"
  26722. },
  26723. {
  26724. "$ref": "#/components/schemas/SessionMessageSynthetic"
  26725. },
  26726. {
  26727. "$ref": "#/components/schemas/SessionMessageSystem"
  26728. },
  26729. {
  26730. "$ref": "#/components/schemas/SessionMessageShell"
  26731. },
  26732. {
  26733. "$ref": "#/components/schemas/SessionMessageAssistant"
  26734. },
  26735. {
  26736. "$ref": "#/components/schemas/SessionMessageCompaction"
  26737. }
  26738. ]
  26739. },
  26740. "ModelV2Info": {
  26741. "type": "object",
  26742. "properties": {
  26743. "id": {
  26744. "type": "string"
  26745. },
  26746. "providerID": {
  26747. "type": "string"
  26748. },
  26749. "family": {
  26750. "type": "string"
  26751. },
  26752. "name": {
  26753. "type": "string"
  26754. },
  26755. "api": {
  26756. "anyOf": [
  26757. {
  26758. "type": "object",
  26759. "properties": {
  26760. "id": {
  26761. "type": "string"
  26762. },
  26763. "type": {
  26764. "type": "string",
  26765. "enum": ["aisdk"]
  26766. },
  26767. "package": {
  26768. "type": "string"
  26769. },
  26770. "url": {
  26771. "type": "string"
  26772. },
  26773. "settings": {
  26774. "type": "object"
  26775. }
  26776. },
  26777. "required": ["id", "type", "package"],
  26778. "additionalProperties": false
  26779. },
  26780. {
  26781. "type": "object",
  26782. "properties": {
  26783. "id": {
  26784. "type": "string"
  26785. },
  26786. "type": {
  26787. "type": "string",
  26788. "enum": ["native"]
  26789. },
  26790. "url": {
  26791. "type": "string"
  26792. },
  26793. "settings": {
  26794. "type": "object"
  26795. }
  26796. },
  26797. "required": ["id", "type", "settings"],
  26798. "additionalProperties": false
  26799. }
  26800. ]
  26801. },
  26802. "capabilities": {
  26803. "type": "object",
  26804. "properties": {
  26805. "tools": {
  26806. "type": "boolean"
  26807. },
  26808. "input": {
  26809. "type": "array",
  26810. "items": {
  26811. "type": "string"
  26812. }
  26813. },
  26814. "output": {
  26815. "type": "array",
  26816. "items": {
  26817. "type": "string"
  26818. }
  26819. }
  26820. },
  26821. "required": ["tools", "input", "output"],
  26822. "additionalProperties": false
  26823. },
  26824. "request": {
  26825. "type": "object",
  26826. "properties": {
  26827. "headers": {
  26828. "type": "object",
  26829. "additionalProperties": {
  26830. "type": "string"
  26831. }
  26832. },
  26833. "body": {
  26834. "type": "object"
  26835. },
  26836. "generation": {
  26837. "type": "object",
  26838. "properties": {
  26839. "maxTokens": {
  26840. "anyOf": [
  26841. {
  26842. "type": "number"
  26843. },
  26844. {
  26845. "type": "string",
  26846. "enum": ["NaN"]
  26847. },
  26848. {
  26849. "type": "string",
  26850. "enum": ["Infinity"]
  26851. },
  26852. {
  26853. "type": "string",
  26854. "enum": ["-Infinity"]
  26855. },
  26856. {
  26857. "type": "string",
  26858. "enum": ["Infinity", "-Infinity", "NaN"]
  26859. }
  26860. ]
  26861. },
  26862. "temperature": {
  26863. "anyOf": [
  26864. {
  26865. "type": "number"
  26866. },
  26867. {
  26868. "type": "string",
  26869. "enum": ["NaN"]
  26870. },
  26871. {
  26872. "type": "string",
  26873. "enum": ["Infinity"]
  26874. },
  26875. {
  26876. "type": "string",
  26877. "enum": ["-Infinity"]
  26878. },
  26879. {
  26880. "type": "string",
  26881. "enum": ["Infinity", "-Infinity", "NaN"]
  26882. }
  26883. ]
  26884. },
  26885. "topP": {
  26886. "anyOf": [
  26887. {
  26888. "type": "number"
  26889. },
  26890. {
  26891. "type": "string",
  26892. "enum": ["NaN"]
  26893. },
  26894. {
  26895. "type": "string",
  26896. "enum": ["Infinity"]
  26897. },
  26898. {
  26899. "type": "string",
  26900. "enum": ["-Infinity"]
  26901. },
  26902. {
  26903. "type": "string",
  26904. "enum": ["Infinity", "-Infinity", "NaN"]
  26905. }
  26906. ]
  26907. },
  26908. "topK": {
  26909. "anyOf": [
  26910. {
  26911. "type": "number"
  26912. },
  26913. {
  26914. "type": "string",
  26915. "enum": ["NaN"]
  26916. },
  26917. {
  26918. "type": "string",
  26919. "enum": ["Infinity"]
  26920. },
  26921. {
  26922. "type": "string",
  26923. "enum": ["-Infinity"]
  26924. },
  26925. {
  26926. "type": "string",
  26927. "enum": ["Infinity", "-Infinity", "NaN"]
  26928. }
  26929. ]
  26930. },
  26931. "frequencyPenalty": {
  26932. "anyOf": [
  26933. {
  26934. "type": "number"
  26935. },
  26936. {
  26937. "type": "string",
  26938. "enum": ["NaN"]
  26939. },
  26940. {
  26941. "type": "string",
  26942. "enum": ["Infinity"]
  26943. },
  26944. {
  26945. "type": "string",
  26946. "enum": ["-Infinity"]
  26947. },
  26948. {
  26949. "type": "string",
  26950. "enum": ["Infinity", "-Infinity", "NaN"]
  26951. }
  26952. ]
  26953. },
  26954. "presencePenalty": {
  26955. "anyOf": [
  26956. {
  26957. "type": "number"
  26958. },
  26959. {
  26960. "type": "string",
  26961. "enum": ["NaN"]
  26962. },
  26963. {
  26964. "type": "string",
  26965. "enum": ["Infinity"]
  26966. },
  26967. {
  26968. "type": "string",
  26969. "enum": ["-Infinity"]
  26970. },
  26971. {
  26972. "type": "string",
  26973. "enum": ["Infinity", "-Infinity", "NaN"]
  26974. }
  26975. ]
  26976. },
  26977. "seed": {
  26978. "anyOf": [
  26979. {
  26980. "type": "number"
  26981. },
  26982. {
  26983. "type": "string",
  26984. "enum": ["NaN"]
  26985. },
  26986. {
  26987. "type": "string",
  26988. "enum": ["Infinity"]
  26989. },
  26990. {
  26991. "type": "string",
  26992. "enum": ["-Infinity"]
  26993. },
  26994. {
  26995. "type": "string",
  26996. "enum": ["Infinity", "-Infinity", "NaN"]
  26997. }
  26998. ]
  26999. },
  27000. "stop": {
  27001. "type": "array",
  27002. "items": {
  27003. "type": "string"
  27004. }
  27005. }
  27006. },
  27007. "additionalProperties": false
  27008. },
  27009. "options": {
  27010. "type": "object"
  27011. },
  27012. "variant": {
  27013. "type": "string"
  27014. }
  27015. },
  27016. "required": ["headers", "body"],
  27017. "additionalProperties": false
  27018. },
  27019. "variants": {
  27020. "type": "array",
  27021. "items": {
  27022. "type": "object",
  27023. "properties": {
  27024. "id": {
  27025. "type": "string"
  27026. },
  27027. "headers": {
  27028. "type": "object",
  27029. "additionalProperties": {
  27030. "type": "string"
  27031. }
  27032. },
  27033. "body": {
  27034. "type": "object"
  27035. },
  27036. "generation": {
  27037. "type": "object",
  27038. "properties": {
  27039. "maxTokens": {
  27040. "anyOf": [
  27041. {
  27042. "type": "number"
  27043. },
  27044. {
  27045. "type": "string",
  27046. "enum": ["NaN"]
  27047. },
  27048. {
  27049. "type": "string",
  27050. "enum": ["Infinity"]
  27051. },
  27052. {
  27053. "type": "string",
  27054. "enum": ["-Infinity"]
  27055. },
  27056. {
  27057. "type": "string",
  27058. "enum": ["Infinity", "-Infinity", "NaN"]
  27059. }
  27060. ]
  27061. },
  27062. "temperature": {
  27063. "anyOf": [
  27064. {
  27065. "type": "number"
  27066. },
  27067. {
  27068. "type": "string",
  27069. "enum": ["NaN"]
  27070. },
  27071. {
  27072. "type": "string",
  27073. "enum": ["Infinity"]
  27074. },
  27075. {
  27076. "type": "string",
  27077. "enum": ["-Infinity"]
  27078. },
  27079. {
  27080. "type": "string",
  27081. "enum": ["Infinity", "-Infinity", "NaN"]
  27082. }
  27083. ]
  27084. },
  27085. "topP": {
  27086. "anyOf": [
  27087. {
  27088. "type": "number"
  27089. },
  27090. {
  27091. "type": "string",
  27092. "enum": ["NaN"]
  27093. },
  27094. {
  27095. "type": "string",
  27096. "enum": ["Infinity"]
  27097. },
  27098. {
  27099. "type": "string",
  27100. "enum": ["-Infinity"]
  27101. },
  27102. {
  27103. "type": "string",
  27104. "enum": ["Infinity", "-Infinity", "NaN"]
  27105. }
  27106. ]
  27107. },
  27108. "topK": {
  27109. "anyOf": [
  27110. {
  27111. "type": "number"
  27112. },
  27113. {
  27114. "type": "string",
  27115. "enum": ["NaN"]
  27116. },
  27117. {
  27118. "type": "string",
  27119. "enum": ["Infinity"]
  27120. },
  27121. {
  27122. "type": "string",
  27123. "enum": ["-Infinity"]
  27124. },
  27125. {
  27126. "type": "string",
  27127. "enum": ["Infinity", "-Infinity", "NaN"]
  27128. }
  27129. ]
  27130. },
  27131. "frequencyPenalty": {
  27132. "anyOf": [
  27133. {
  27134. "type": "number"
  27135. },
  27136. {
  27137. "type": "string",
  27138. "enum": ["NaN"]
  27139. },
  27140. {
  27141. "type": "string",
  27142. "enum": ["Infinity"]
  27143. },
  27144. {
  27145. "type": "string",
  27146. "enum": ["-Infinity"]
  27147. },
  27148. {
  27149. "type": "string",
  27150. "enum": ["Infinity", "-Infinity", "NaN"]
  27151. }
  27152. ]
  27153. },
  27154. "presencePenalty": {
  27155. "anyOf": [
  27156. {
  27157. "type": "number"
  27158. },
  27159. {
  27160. "type": "string",
  27161. "enum": ["NaN"]
  27162. },
  27163. {
  27164. "type": "string",
  27165. "enum": ["Infinity"]
  27166. },
  27167. {
  27168. "type": "string",
  27169. "enum": ["-Infinity"]
  27170. },
  27171. {
  27172. "type": "string",
  27173. "enum": ["Infinity", "-Infinity", "NaN"]
  27174. }
  27175. ]
  27176. },
  27177. "seed": {
  27178. "anyOf": [
  27179. {
  27180. "type": "number"
  27181. },
  27182. {
  27183. "type": "string",
  27184. "enum": ["NaN"]
  27185. },
  27186. {
  27187. "type": "string",
  27188. "enum": ["Infinity"]
  27189. },
  27190. {
  27191. "type": "string",
  27192. "enum": ["-Infinity"]
  27193. },
  27194. {
  27195. "type": "string",
  27196. "enum": ["Infinity", "-Infinity", "NaN"]
  27197. }
  27198. ]
  27199. },
  27200. "stop": {
  27201. "type": "array",
  27202. "items": {
  27203. "type": "string"
  27204. }
  27205. }
  27206. },
  27207. "additionalProperties": false
  27208. },
  27209. "options": {
  27210. "type": "object"
  27211. }
  27212. },
  27213. "required": ["id", "headers", "body"],
  27214. "additionalProperties": false
  27215. }
  27216. },
  27217. "time": {
  27218. "type": "object",
  27219. "properties": {
  27220. "released": {
  27221. "type": "number"
  27222. }
  27223. },
  27224. "required": ["released"],
  27225. "additionalProperties": false
  27226. },
  27227. "cost": {
  27228. "type": "array",
  27229. "items": {
  27230. "type": "object",
  27231. "properties": {
  27232. "tier": {
  27233. "type": "object",
  27234. "properties": {
  27235. "type": {
  27236. "type": "string",
  27237. "enum": ["context"]
  27238. },
  27239. "size": {
  27240. "type": "integer"
  27241. }
  27242. },
  27243. "required": ["type", "size"],
  27244. "additionalProperties": false
  27245. },
  27246. "input": {
  27247. "type": "number"
  27248. },
  27249. "output": {
  27250. "type": "number"
  27251. },
  27252. "cache": {
  27253. "type": "object",
  27254. "properties": {
  27255. "read": {
  27256. "type": "number"
  27257. },
  27258. "write": {
  27259. "type": "number"
  27260. }
  27261. },
  27262. "required": ["read", "write"],
  27263. "additionalProperties": false
  27264. }
  27265. },
  27266. "required": ["input", "output", "cache"],
  27267. "additionalProperties": false
  27268. }
  27269. },
  27270. "status": {
  27271. "type": "string",
  27272. "enum": ["alpha", "beta", "deprecated", "active"]
  27273. },
  27274. "enabled": {
  27275. "type": "boolean"
  27276. },
  27277. "limit": {
  27278. "type": "object",
  27279. "properties": {
  27280. "context": {
  27281. "type": "integer"
  27282. },
  27283. "input": {
  27284. "type": "integer"
  27285. },
  27286. "output": {
  27287. "type": "integer"
  27288. }
  27289. },
  27290. "required": ["context", "output"],
  27291. "additionalProperties": false
  27292. }
  27293. },
  27294. "required": [
  27295. "id",
  27296. "providerID",
  27297. "name",
  27298. "api",
  27299. "capabilities",
  27300. "request",
  27301. "variants",
  27302. "time",
  27303. "cost",
  27304. "status",
  27305. "enabled",
  27306. "limit"
  27307. ],
  27308. "additionalProperties": false
  27309. },
  27310. "ProviderV2Info": {
  27311. "type": "object",
  27312. "properties": {
  27313. "id": {
  27314. "type": "string"
  27315. },
  27316. "integrationID": {
  27317. "type": "string"
  27318. },
  27319. "name": {
  27320. "type": "string"
  27321. },
  27322. "disabled": {
  27323. "type": "boolean"
  27324. },
  27325. "api": {
  27326. "anyOf": [
  27327. {
  27328. "type": "object",
  27329. "properties": {
  27330. "type": {
  27331. "type": "string",
  27332. "enum": ["aisdk"]
  27333. },
  27334. "package": {
  27335. "type": "string"
  27336. },
  27337. "url": {
  27338. "type": "string"
  27339. },
  27340. "settings": {
  27341. "type": "object"
  27342. }
  27343. },
  27344. "required": ["type", "package"],
  27345. "additionalProperties": false
  27346. },
  27347. {
  27348. "type": "object",
  27349. "properties": {
  27350. "type": {
  27351. "type": "string",
  27352. "enum": ["native"]
  27353. },
  27354. "url": {
  27355. "type": "string"
  27356. },
  27357. "settings": {
  27358. "type": "object"
  27359. }
  27360. },
  27361. "required": ["type", "settings"],
  27362. "additionalProperties": false
  27363. }
  27364. ]
  27365. },
  27366. "request": {
  27367. "type": "object",
  27368. "properties": {
  27369. "headers": {
  27370. "type": "object",
  27371. "additionalProperties": {
  27372. "type": "string"
  27373. }
  27374. },
  27375. "body": {
  27376. "type": "object"
  27377. }
  27378. },
  27379. "required": ["headers", "body"],
  27380. "additionalProperties": false
  27381. }
  27382. },
  27383. "required": ["id", "name", "api", "request"],
  27384. "additionalProperties": false
  27385. },
  27386. "IntegrationWhen": {
  27387. "type": "object",
  27388. "properties": {
  27389. "key": {
  27390. "type": "string"
  27391. },
  27392. "op": {
  27393. "type": "string",
  27394. "enum": ["eq", "neq"]
  27395. },
  27396. "value": {
  27397. "type": "string"
  27398. }
  27399. },
  27400. "required": ["key", "op", "value"],
  27401. "additionalProperties": false
  27402. },
  27403. "IntegrationTextPrompt": {
  27404. "type": "object",
  27405. "properties": {
  27406. "type": {
  27407. "type": "string",
  27408. "enum": ["text"]
  27409. },
  27410. "key": {
  27411. "type": "string"
  27412. },
  27413. "message": {
  27414. "type": "string"
  27415. },
  27416. "placeholder": {
  27417. "type": "string"
  27418. },
  27419. "when": {
  27420. "$ref": "#/components/schemas/IntegrationWhen"
  27421. }
  27422. },
  27423. "required": ["type", "key", "message"],
  27424. "additionalProperties": false
  27425. },
  27426. "IntegrationSelectPrompt": {
  27427. "type": "object",
  27428. "properties": {
  27429. "type": {
  27430. "type": "string",
  27431. "enum": ["select"]
  27432. },
  27433. "key": {
  27434. "type": "string"
  27435. },
  27436. "message": {
  27437. "type": "string"
  27438. },
  27439. "options": {
  27440. "type": "array",
  27441. "items": {
  27442. "type": "object",
  27443. "properties": {
  27444. "label": {
  27445. "type": "string"
  27446. },
  27447. "value": {
  27448. "type": "string"
  27449. },
  27450. "hint": {
  27451. "type": "string"
  27452. }
  27453. },
  27454. "required": ["label", "value"],
  27455. "additionalProperties": false
  27456. }
  27457. },
  27458. "when": {
  27459. "$ref": "#/components/schemas/IntegrationWhen"
  27460. }
  27461. },
  27462. "required": ["type", "key", "message", "options"],
  27463. "additionalProperties": false
  27464. },
  27465. "IntegrationOAuthMethod": {
  27466. "type": "object",
  27467. "properties": {
  27468. "id": {
  27469. "type": "string"
  27470. },
  27471. "type": {
  27472. "type": "string",
  27473. "enum": ["oauth"]
  27474. },
  27475. "label": {
  27476. "type": "string"
  27477. },
  27478. "prompts": {
  27479. "type": "array",
  27480. "items": {
  27481. "anyOf": [
  27482. {
  27483. "$ref": "#/components/schemas/IntegrationTextPrompt"
  27484. },
  27485. {
  27486. "$ref": "#/components/schemas/IntegrationSelectPrompt"
  27487. }
  27488. ]
  27489. }
  27490. }
  27491. },
  27492. "required": ["id", "type", "label"],
  27493. "additionalProperties": false
  27494. },
  27495. "IntegrationKeyMethod": {
  27496. "type": "object",
  27497. "properties": {
  27498. "type": {
  27499. "type": "string",
  27500. "enum": ["key"]
  27501. },
  27502. "label": {
  27503. "type": "string"
  27504. }
  27505. },
  27506. "required": ["type"],
  27507. "additionalProperties": false
  27508. },
  27509. "IntegrationEnvMethod": {
  27510. "type": "object",
  27511. "properties": {
  27512. "type": {
  27513. "type": "string",
  27514. "enum": ["env"]
  27515. },
  27516. "names": {
  27517. "type": "array",
  27518. "items": {
  27519. "type": "string"
  27520. }
  27521. }
  27522. },
  27523. "required": ["type", "names"],
  27524. "additionalProperties": false
  27525. },
  27526. "ConnectionCredentialInfo": {
  27527. "type": "object",
  27528. "properties": {
  27529. "type": {
  27530. "type": "string",
  27531. "enum": ["credential"]
  27532. },
  27533. "id": {
  27534. "type": "string"
  27535. },
  27536. "label": {
  27537. "type": "string"
  27538. }
  27539. },
  27540. "required": ["type", "id", "label"],
  27541. "additionalProperties": false
  27542. },
  27543. "ConnectionEnvInfo": {
  27544. "type": "object",
  27545. "properties": {
  27546. "type": {
  27547. "type": "string",
  27548. "enum": ["env"]
  27549. },
  27550. "name": {
  27551. "type": "string"
  27552. }
  27553. },
  27554. "required": ["type", "name"],
  27555. "additionalProperties": false
  27556. },
  27557. "ConnectionInfo": {
  27558. "anyOf": [
  27559. {
  27560. "$ref": "#/components/schemas/ConnectionCredentialInfo"
  27561. },
  27562. {
  27563. "$ref": "#/components/schemas/ConnectionEnvInfo"
  27564. }
  27565. ]
  27566. },
  27567. "IntegrationInfo": {
  27568. "type": "object",
  27569. "properties": {
  27570. "id": {
  27571. "type": "string"
  27572. },
  27573. "name": {
  27574. "type": "string"
  27575. },
  27576. "methods": {
  27577. "type": "array",
  27578. "items": {
  27579. "$ref": "#/components/schemas/IntegrationMethod"
  27580. }
  27581. },
  27582. "connections": {
  27583. "type": "array",
  27584. "items": {
  27585. "$ref": "#/components/schemas/ConnectionInfo"
  27586. }
  27587. }
  27588. },
  27589. "required": ["id", "name", "methods", "connections"],
  27590. "additionalProperties": false
  27591. },
  27592. "IntegrationAttempt": {
  27593. "type": "object",
  27594. "properties": {
  27595. "attemptID": {
  27596. "type": "string"
  27597. },
  27598. "url": {
  27599. "type": "string"
  27600. },
  27601. "instructions": {
  27602. "type": "string"
  27603. },
  27604. "mode": {
  27605. "type": "string",
  27606. "enum": ["auto", "code"]
  27607. },
  27608. "time": {
  27609. "type": "object",
  27610. "properties": {
  27611. "created": {
  27612. "anyOf": [
  27613. {
  27614. "type": "number"
  27615. },
  27616. {
  27617. "type": "string",
  27618. "enum": ["NaN"]
  27619. },
  27620. {
  27621. "type": "string",
  27622. "enum": ["Infinity"]
  27623. },
  27624. {
  27625. "type": "string",
  27626. "enum": ["-Infinity"]
  27627. },
  27628. {
  27629. "type": "string",
  27630. "enum": ["Infinity", "-Infinity", "NaN"]
  27631. }
  27632. ]
  27633. },
  27634. "expires": {
  27635. "anyOf": [
  27636. {
  27637. "type": "number"
  27638. },
  27639. {
  27640. "type": "string",
  27641. "enum": ["NaN"]
  27642. },
  27643. {
  27644. "type": "string",
  27645. "enum": ["Infinity"]
  27646. },
  27647. {
  27648. "type": "string",
  27649. "enum": ["-Infinity"]
  27650. },
  27651. {
  27652. "type": "string",
  27653. "enum": ["Infinity", "-Infinity", "NaN"]
  27654. }
  27655. ]
  27656. }
  27657. },
  27658. "required": ["created", "expires"],
  27659. "additionalProperties": false
  27660. }
  27661. },
  27662. "required": ["attemptID", "url", "instructions", "mode", "time"],
  27663. "additionalProperties": false
  27664. },
  27665. "PermissionV2Request": {
  27666. "type": "object",
  27667. "properties": {
  27668. "id": {
  27669. "type": "string",
  27670. "pattern": "^per"
  27671. },
  27672. "sessionID": {
  27673. "type": "string",
  27674. "pattern": "^ses"
  27675. },
  27676. "action": {
  27677. "type": "string"
  27678. },
  27679. "resources": {
  27680. "type": "array",
  27681. "items": {
  27682. "type": "string"
  27683. }
  27684. },
  27685. "save": {
  27686. "type": "array",
  27687. "items": {
  27688. "type": "string"
  27689. }
  27690. },
  27691. "metadata": {
  27692. "type": "object"
  27693. },
  27694. "source": {
  27695. "$ref": "#/components/schemas/PermissionV2Source"
  27696. }
  27697. },
  27698. "required": ["id", "sessionID", "action", "resources"],
  27699. "additionalProperties": false
  27700. },
  27701. "PermissionSavedInfo": {
  27702. "type": "object",
  27703. "properties": {
  27704. "id": {
  27705. "type": "string"
  27706. },
  27707. "projectID": {
  27708. "type": "string"
  27709. },
  27710. "action": {
  27711. "type": "string"
  27712. },
  27713. "resource": {
  27714. "type": "string"
  27715. }
  27716. },
  27717. "required": ["id", "projectID", "action", "resource"],
  27718. "additionalProperties": false
  27719. },
  27720. "FileSystemEntry": {
  27721. "type": "object",
  27722. "properties": {
  27723. "path": {
  27724. "type": "string"
  27725. },
  27726. "type": {
  27727. "type": "string",
  27728. "enum": ["file", "directory"]
  27729. }
  27730. },
  27731. "required": ["path", "type"],
  27732. "additionalProperties": false
  27733. },
  27734. "CommandV2Info": {
  27735. "type": "object",
  27736. "properties": {
  27737. "name": {
  27738. "type": "string"
  27739. },
  27740. "template": {
  27741. "type": "string"
  27742. },
  27743. "description": {
  27744. "type": "string"
  27745. },
  27746. "agent": {
  27747. "type": "string"
  27748. },
  27749. "model": {
  27750. "type": "object",
  27751. "properties": {
  27752. "id": {
  27753. "type": "string"
  27754. },
  27755. "providerID": {
  27756. "type": "string"
  27757. },
  27758. "variant": {
  27759. "type": "string"
  27760. }
  27761. },
  27762. "required": ["id", "providerID"],
  27763. "additionalProperties": false
  27764. },
  27765. "subtask": {
  27766. "type": "boolean"
  27767. }
  27768. },
  27769. "required": ["name", "template"],
  27770. "additionalProperties": false
  27771. },
  27772. "SkillV2Info": {
  27773. "type": "object",
  27774. "properties": {
  27775. "name": {
  27776. "type": "string"
  27777. },
  27778. "description": {
  27779. "type": "string"
  27780. },
  27781. "slash": {
  27782. "type": "boolean"
  27783. },
  27784. "location": {
  27785. "type": "string"
  27786. },
  27787. "content": {
  27788. "type": "string"
  27789. }
  27790. },
  27791. "required": ["name", "location", "content"],
  27792. "additionalProperties": false
  27793. },
  27794. "V2EventModels-devRefreshed": {
  27795. "type": "object",
  27796. "properties": {
  27797. "id": {
  27798. "type": "string",
  27799. "pattern": "^evt_"
  27800. },
  27801. "metadata": {
  27802. "type": "object"
  27803. },
  27804. "durable": {
  27805. "type": "object",
  27806. "properties": {
  27807. "aggregateID": {
  27808. "type": "string"
  27809. },
  27810. "seq": {
  27811. "type": "integer"
  27812. },
  27813. "version": {
  27814. "type": "integer"
  27815. }
  27816. },
  27817. "required": ["aggregateID", "seq", "version"],
  27818. "additionalProperties": false
  27819. },
  27820. "location": {
  27821. "$ref": "#/components/schemas/LocationRef"
  27822. },
  27823. "type": {
  27824. "type": "string",
  27825. "enum": ["models-dev.refreshed"]
  27826. },
  27827. "data": {
  27828. "type": "object",
  27829. "properties": {}
  27830. }
  27831. },
  27832. "required": ["id", "type", "data"],
  27833. "additionalProperties": false
  27834. },
  27835. "V2EventIntegrationUpdated": {
  27836. "type": "object",
  27837. "properties": {
  27838. "id": {
  27839. "type": "string",
  27840. "pattern": "^evt_"
  27841. },
  27842. "metadata": {
  27843. "type": "object"
  27844. },
  27845. "durable": {
  27846. "type": "object",
  27847. "properties": {
  27848. "aggregateID": {
  27849. "type": "string"
  27850. },
  27851. "seq": {
  27852. "type": "integer"
  27853. },
  27854. "version": {
  27855. "type": "integer"
  27856. }
  27857. },
  27858. "required": ["aggregateID", "seq", "version"],
  27859. "additionalProperties": false
  27860. },
  27861. "location": {
  27862. "$ref": "#/components/schemas/LocationRef"
  27863. },
  27864. "type": {
  27865. "type": "string",
  27866. "enum": ["integration.updated"]
  27867. },
  27868. "data": {
  27869. "type": "object",
  27870. "properties": {}
  27871. }
  27872. },
  27873. "required": ["id", "type", "data"],
  27874. "additionalProperties": false
  27875. },
  27876. "V2EventIntegrationConnectionUpdated": {
  27877. "type": "object",
  27878. "properties": {
  27879. "id": {
  27880. "type": "string",
  27881. "pattern": "^evt_"
  27882. },
  27883. "metadata": {
  27884. "type": "object"
  27885. },
  27886. "durable": {
  27887. "type": "object",
  27888. "properties": {
  27889. "aggregateID": {
  27890. "type": "string"
  27891. },
  27892. "seq": {
  27893. "type": "integer"
  27894. },
  27895. "version": {
  27896. "type": "integer"
  27897. }
  27898. },
  27899. "required": ["aggregateID", "seq", "version"],
  27900. "additionalProperties": false
  27901. },
  27902. "location": {
  27903. "$ref": "#/components/schemas/LocationRef"
  27904. },
  27905. "type": {
  27906. "type": "string",
  27907. "enum": ["integration.connection.updated"]
  27908. },
  27909. "data": {
  27910. "type": "object",
  27911. "properties": {
  27912. "integrationID": {
  27913. "type": "string"
  27914. }
  27915. },
  27916. "required": ["integrationID"],
  27917. "additionalProperties": false
  27918. }
  27919. },
  27920. "required": ["id", "type", "data"],
  27921. "additionalProperties": false
  27922. },
  27923. "V2EventCatalogUpdated": {
  27924. "type": "object",
  27925. "properties": {
  27926. "id": {
  27927. "type": "string",
  27928. "pattern": "^evt_"
  27929. },
  27930. "metadata": {
  27931. "type": "object"
  27932. },
  27933. "durable": {
  27934. "type": "object",
  27935. "properties": {
  27936. "aggregateID": {
  27937. "type": "string"
  27938. },
  27939. "seq": {
  27940. "type": "integer"
  27941. },
  27942. "version": {
  27943. "type": "integer"
  27944. }
  27945. },
  27946. "required": ["aggregateID", "seq", "version"],
  27947. "additionalProperties": false
  27948. },
  27949. "location": {
  27950. "$ref": "#/components/schemas/LocationRef"
  27951. },
  27952. "type": {
  27953. "type": "string",
  27954. "enum": ["catalog.updated"]
  27955. },
  27956. "data": {
  27957. "type": "object",
  27958. "properties": {}
  27959. }
  27960. },
  27961. "required": ["id", "type", "data"],
  27962. "additionalProperties": false
  27963. },
  27964. "V2EventSessionCreated": {
  27965. "type": "object",
  27966. "properties": {
  27967. "id": {
  27968. "type": "string",
  27969. "pattern": "^evt_"
  27970. },
  27971. "metadata": {
  27972. "type": "object"
  27973. },
  27974. "durable": {
  27975. "type": "object",
  27976. "properties": {
  27977. "aggregateID": {
  27978. "type": "string"
  27979. },
  27980. "seq": {
  27981. "type": "integer"
  27982. },
  27983. "version": {
  27984. "type": "integer"
  27985. }
  27986. },
  27987. "required": ["aggregateID", "seq", "version"],
  27988. "additionalProperties": false
  27989. },
  27990. "location": {
  27991. "$ref": "#/components/schemas/LocationRef"
  27992. },
  27993. "type": {
  27994. "type": "string",
  27995. "enum": ["session.created"]
  27996. },
  27997. "data": {
  27998. "type": "object",
  27999. "properties": {
  28000. "sessionID": {
  28001. "type": "string",
  28002. "pattern": "^ses"
  28003. },
  28004. "info": {
  28005. "$ref": "#/components/schemas/Session"
  28006. }
  28007. },
  28008. "required": ["sessionID", "info"],
  28009. "additionalProperties": false
  28010. }
  28011. },
  28012. "required": ["id", "type", "data"],
  28013. "additionalProperties": false
  28014. },
  28015. "V2EventSessionUpdated": {
  28016. "type": "object",
  28017. "properties": {
  28018. "id": {
  28019. "type": "string",
  28020. "pattern": "^evt_"
  28021. },
  28022. "metadata": {
  28023. "type": "object"
  28024. },
  28025. "durable": {
  28026. "type": "object",
  28027. "properties": {
  28028. "aggregateID": {
  28029. "type": "string"
  28030. },
  28031. "seq": {
  28032. "type": "integer"
  28033. },
  28034. "version": {
  28035. "type": "integer"
  28036. }
  28037. },
  28038. "required": ["aggregateID", "seq", "version"],
  28039. "additionalProperties": false
  28040. },
  28041. "location": {
  28042. "$ref": "#/components/schemas/LocationRef"
  28043. },
  28044. "type": {
  28045. "type": "string",
  28046. "enum": ["session.updated"]
  28047. },
  28048. "data": {
  28049. "type": "object",
  28050. "properties": {
  28051. "sessionID": {
  28052. "type": "string",
  28053. "pattern": "^ses"
  28054. },
  28055. "info": {
  28056. "$ref": "#/components/schemas/Session"
  28057. }
  28058. },
  28059. "required": ["sessionID", "info"],
  28060. "additionalProperties": false
  28061. }
  28062. },
  28063. "required": ["id", "type", "data"],
  28064. "additionalProperties": false
  28065. },
  28066. "V2EventSessionDeleted": {
  28067. "type": "object",
  28068. "properties": {
  28069. "id": {
  28070. "type": "string",
  28071. "pattern": "^evt_"
  28072. },
  28073. "metadata": {
  28074. "type": "object"
  28075. },
  28076. "durable": {
  28077. "type": "object",
  28078. "properties": {
  28079. "aggregateID": {
  28080. "type": "string"
  28081. },
  28082. "seq": {
  28083. "type": "integer"
  28084. },
  28085. "version": {
  28086. "type": "integer"
  28087. }
  28088. },
  28089. "required": ["aggregateID", "seq", "version"],
  28090. "additionalProperties": false
  28091. },
  28092. "location": {
  28093. "$ref": "#/components/schemas/LocationRef"
  28094. },
  28095. "type": {
  28096. "type": "string",
  28097. "enum": ["session.deleted"]
  28098. },
  28099. "data": {
  28100. "type": "object",
  28101. "properties": {
  28102. "sessionID": {
  28103. "type": "string",
  28104. "pattern": "^ses"
  28105. },
  28106. "info": {
  28107. "$ref": "#/components/schemas/Session"
  28108. }
  28109. },
  28110. "required": ["sessionID", "info"],
  28111. "additionalProperties": false
  28112. }
  28113. },
  28114. "required": ["id", "type", "data"],
  28115. "additionalProperties": false
  28116. },
  28117. "V2EventMessageUpdated": {
  28118. "type": "object",
  28119. "properties": {
  28120. "id": {
  28121. "type": "string",
  28122. "pattern": "^evt_"
  28123. },
  28124. "metadata": {
  28125. "type": "object"
  28126. },
  28127. "durable": {
  28128. "type": "object",
  28129. "properties": {
  28130. "aggregateID": {
  28131. "type": "string"
  28132. },
  28133. "seq": {
  28134. "type": "integer"
  28135. },
  28136. "version": {
  28137. "type": "integer"
  28138. }
  28139. },
  28140. "required": ["aggregateID", "seq", "version"],
  28141. "additionalProperties": false
  28142. },
  28143. "location": {
  28144. "$ref": "#/components/schemas/LocationRef"
  28145. },
  28146. "type": {
  28147. "type": "string",
  28148. "enum": ["message.updated"]
  28149. },
  28150. "data": {
  28151. "type": "object",
  28152. "properties": {
  28153. "sessionID": {
  28154. "type": "string",
  28155. "pattern": "^ses"
  28156. },
  28157. "info": {
  28158. "$ref": "#/components/schemas/Message"
  28159. }
  28160. },
  28161. "required": ["sessionID", "info"],
  28162. "additionalProperties": false
  28163. }
  28164. },
  28165. "required": ["id", "type", "data"],
  28166. "additionalProperties": false
  28167. },
  28168. "V2EventMessageRemoved": {
  28169. "type": "object",
  28170. "properties": {
  28171. "id": {
  28172. "type": "string",
  28173. "pattern": "^evt_"
  28174. },
  28175. "metadata": {
  28176. "type": "object"
  28177. },
  28178. "durable": {
  28179. "type": "object",
  28180. "properties": {
  28181. "aggregateID": {
  28182. "type": "string"
  28183. },
  28184. "seq": {
  28185. "type": "integer"
  28186. },
  28187. "version": {
  28188. "type": "integer"
  28189. }
  28190. },
  28191. "required": ["aggregateID", "seq", "version"],
  28192. "additionalProperties": false
  28193. },
  28194. "location": {
  28195. "$ref": "#/components/schemas/LocationRef"
  28196. },
  28197. "type": {
  28198. "type": "string",
  28199. "enum": ["message.removed"]
  28200. },
  28201. "data": {
  28202. "type": "object",
  28203. "properties": {
  28204. "sessionID": {
  28205. "type": "string",
  28206. "pattern": "^ses"
  28207. },
  28208. "messageID": {
  28209. "type": "string",
  28210. "pattern": "^msg"
  28211. }
  28212. },
  28213. "required": ["sessionID", "messageID"],
  28214. "additionalProperties": false
  28215. }
  28216. },
  28217. "required": ["id", "type", "data"],
  28218. "additionalProperties": false
  28219. },
  28220. "V2EventMessagePartUpdated": {
  28221. "type": "object",
  28222. "properties": {
  28223. "id": {
  28224. "type": "string",
  28225. "pattern": "^evt_"
  28226. },
  28227. "metadata": {
  28228. "type": "object"
  28229. },
  28230. "durable": {
  28231. "type": "object",
  28232. "properties": {
  28233. "aggregateID": {
  28234. "type": "string"
  28235. },
  28236. "seq": {
  28237. "type": "integer"
  28238. },
  28239. "version": {
  28240. "type": "integer"
  28241. }
  28242. },
  28243. "required": ["aggregateID", "seq", "version"],
  28244. "additionalProperties": false
  28245. },
  28246. "location": {
  28247. "$ref": "#/components/schemas/LocationRef"
  28248. },
  28249. "type": {
  28250. "type": "string",
  28251. "enum": ["message.part.updated"]
  28252. },
  28253. "data": {
  28254. "type": "object",
  28255. "properties": {
  28256. "sessionID": {
  28257. "type": "string",
  28258. "pattern": "^ses"
  28259. },
  28260. "part": {
  28261. "$ref": "#/components/schemas/Part"
  28262. },
  28263. "time": {
  28264. "type": "number"
  28265. }
  28266. },
  28267. "required": ["sessionID", "part", "time"],
  28268. "additionalProperties": false
  28269. }
  28270. },
  28271. "required": ["id", "type", "data"],
  28272. "additionalProperties": false
  28273. },
  28274. "V2EventMessagePartRemoved": {
  28275. "type": "object",
  28276. "properties": {
  28277. "id": {
  28278. "type": "string",
  28279. "pattern": "^evt_"
  28280. },
  28281. "metadata": {
  28282. "type": "object"
  28283. },
  28284. "durable": {
  28285. "type": "object",
  28286. "properties": {
  28287. "aggregateID": {
  28288. "type": "string"
  28289. },
  28290. "seq": {
  28291. "type": "integer"
  28292. },
  28293. "version": {
  28294. "type": "integer"
  28295. }
  28296. },
  28297. "required": ["aggregateID", "seq", "version"],
  28298. "additionalProperties": false
  28299. },
  28300. "location": {
  28301. "$ref": "#/components/schemas/LocationRef"
  28302. },
  28303. "type": {
  28304. "type": "string",
  28305. "enum": ["message.part.removed"]
  28306. },
  28307. "data": {
  28308. "type": "object",
  28309. "properties": {
  28310. "sessionID": {
  28311. "type": "string",
  28312. "pattern": "^ses"
  28313. },
  28314. "messageID": {
  28315. "type": "string",
  28316. "pattern": "^msg"
  28317. },
  28318. "partID": {
  28319. "type": "string",
  28320. "pattern": "^prt"
  28321. }
  28322. },
  28323. "required": ["sessionID", "messageID", "partID"],
  28324. "additionalProperties": false
  28325. }
  28326. },
  28327. "required": ["id", "type", "data"],
  28328. "additionalProperties": false
  28329. },
  28330. "V2EventSessionNextAgentSwitched": {
  28331. "type": "object",
  28332. "properties": {
  28333. "id": {
  28334. "type": "string",
  28335. "pattern": "^evt_"
  28336. },
  28337. "metadata": {
  28338. "type": "object"
  28339. },
  28340. "durable": {
  28341. "type": "object",
  28342. "properties": {
  28343. "aggregateID": {
  28344. "type": "string"
  28345. },
  28346. "seq": {
  28347. "type": "integer"
  28348. },
  28349. "version": {
  28350. "type": "integer"
  28351. }
  28352. },
  28353. "required": ["aggregateID", "seq", "version"],
  28354. "additionalProperties": false
  28355. },
  28356. "location": {
  28357. "$ref": "#/components/schemas/LocationRef"
  28358. },
  28359. "type": {
  28360. "type": "string",
  28361. "enum": ["session.next.agent.switched"]
  28362. },
  28363. "data": {
  28364. "type": "object",
  28365. "properties": {
  28366. "timestamp": {
  28367. "type": "number"
  28368. },
  28369. "sessionID": {
  28370. "type": "string",
  28371. "pattern": "^ses"
  28372. },
  28373. "messageID": {
  28374. "type": "string",
  28375. "pattern": "^msg_"
  28376. },
  28377. "agent": {
  28378. "type": "string"
  28379. }
  28380. },
  28381. "required": ["timestamp", "sessionID", "messageID", "agent"],
  28382. "additionalProperties": false
  28383. }
  28384. },
  28385. "required": ["id", "type", "data"],
  28386. "additionalProperties": false
  28387. },
  28388. "V2EventSessionNextModelSwitched": {
  28389. "type": "object",
  28390. "properties": {
  28391. "id": {
  28392. "type": "string",
  28393. "pattern": "^evt_"
  28394. },
  28395. "metadata": {
  28396. "type": "object"
  28397. },
  28398. "durable": {
  28399. "type": "object",
  28400. "properties": {
  28401. "aggregateID": {
  28402. "type": "string"
  28403. },
  28404. "seq": {
  28405. "type": "integer"
  28406. },
  28407. "version": {
  28408. "type": "integer"
  28409. }
  28410. },
  28411. "required": ["aggregateID", "seq", "version"],
  28412. "additionalProperties": false
  28413. },
  28414. "location": {
  28415. "$ref": "#/components/schemas/LocationRef"
  28416. },
  28417. "type": {
  28418. "type": "string",
  28419. "enum": ["session.next.model.switched"]
  28420. },
  28421. "data": {
  28422. "type": "object",
  28423. "properties": {
  28424. "timestamp": {
  28425. "type": "number"
  28426. },
  28427. "sessionID": {
  28428. "type": "string",
  28429. "pattern": "^ses"
  28430. },
  28431. "messageID": {
  28432. "type": "string",
  28433. "pattern": "^msg_"
  28434. },
  28435. "model": {
  28436. "type": "object",
  28437. "properties": {
  28438. "id": {
  28439. "type": "string"
  28440. },
  28441. "providerID": {
  28442. "type": "string"
  28443. },
  28444. "variant": {
  28445. "type": "string"
  28446. }
  28447. },
  28448. "required": ["id", "providerID"],
  28449. "additionalProperties": false
  28450. }
  28451. },
  28452. "required": ["timestamp", "sessionID", "messageID", "model"],
  28453. "additionalProperties": false
  28454. }
  28455. },
  28456. "required": ["id", "type", "data"],
  28457. "additionalProperties": false
  28458. },
  28459. "V2EventSessionNextMoved": {
  28460. "type": "object",
  28461. "properties": {
  28462. "id": {
  28463. "type": "string",
  28464. "pattern": "^evt_"
  28465. },
  28466. "metadata": {
  28467. "type": "object"
  28468. },
  28469. "durable": {
  28470. "type": "object",
  28471. "properties": {
  28472. "aggregateID": {
  28473. "type": "string"
  28474. },
  28475. "seq": {
  28476. "type": "integer"
  28477. },
  28478. "version": {
  28479. "type": "integer"
  28480. }
  28481. },
  28482. "required": ["aggregateID", "seq", "version"],
  28483. "additionalProperties": false
  28484. },
  28485. "location": {
  28486. "$ref": "#/components/schemas/LocationRef"
  28487. },
  28488. "type": {
  28489. "type": "string",
  28490. "enum": ["session.next.moved"]
  28491. },
  28492. "data": {
  28493. "type": "object",
  28494. "properties": {
  28495. "timestamp": {
  28496. "type": "number"
  28497. },
  28498. "sessionID": {
  28499. "type": "string",
  28500. "pattern": "^ses"
  28501. },
  28502. "location": {
  28503. "$ref": "#/components/schemas/LocationRef"
  28504. },
  28505. "subdirectory": {
  28506. "type": "string"
  28507. }
  28508. },
  28509. "required": ["timestamp", "sessionID", "location"],
  28510. "additionalProperties": false
  28511. }
  28512. },
  28513. "required": ["id", "type", "data"],
  28514. "additionalProperties": false
  28515. },
  28516. "V2EventSessionNextPrompted": {
  28517. "type": "object",
  28518. "properties": {
  28519. "id": {
  28520. "type": "string",
  28521. "pattern": "^evt_"
  28522. },
  28523. "metadata": {
  28524. "type": "object"
  28525. },
  28526. "durable": {
  28527. "type": "object",
  28528. "properties": {
  28529. "aggregateID": {
  28530. "type": "string"
  28531. },
  28532. "seq": {
  28533. "type": "integer"
  28534. },
  28535. "version": {
  28536. "type": "integer"
  28537. }
  28538. },
  28539. "required": ["aggregateID", "seq", "version"],
  28540. "additionalProperties": false
  28541. },
  28542. "location": {
  28543. "$ref": "#/components/schemas/LocationRef"
  28544. },
  28545. "type": {
  28546. "type": "string",
  28547. "enum": ["session.next.prompted"]
  28548. },
  28549. "data": {
  28550. "type": "object",
  28551. "properties": {
  28552. "timestamp": {
  28553. "type": "number"
  28554. },
  28555. "sessionID": {
  28556. "type": "string",
  28557. "pattern": "^ses"
  28558. },
  28559. "messageID": {
  28560. "type": "string",
  28561. "pattern": "^msg_"
  28562. },
  28563. "prompt": {
  28564. "$ref": "#/components/schemas/Prompt"
  28565. },
  28566. "delivery": {
  28567. "type": "string",
  28568. "enum": ["steer", "queue"]
  28569. }
  28570. },
  28571. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  28572. "additionalProperties": false
  28573. }
  28574. },
  28575. "required": ["id", "type", "data"],
  28576. "additionalProperties": false
  28577. },
  28578. "V2EventSessionNextPromptAdmitted": {
  28579. "type": "object",
  28580. "properties": {
  28581. "id": {
  28582. "type": "string",
  28583. "pattern": "^evt_"
  28584. },
  28585. "metadata": {
  28586. "type": "object"
  28587. },
  28588. "durable": {
  28589. "type": "object",
  28590. "properties": {
  28591. "aggregateID": {
  28592. "type": "string"
  28593. },
  28594. "seq": {
  28595. "type": "integer"
  28596. },
  28597. "version": {
  28598. "type": "integer"
  28599. }
  28600. },
  28601. "required": ["aggregateID", "seq", "version"],
  28602. "additionalProperties": false
  28603. },
  28604. "location": {
  28605. "$ref": "#/components/schemas/LocationRef"
  28606. },
  28607. "type": {
  28608. "type": "string",
  28609. "enum": ["session.next.prompt.admitted"]
  28610. },
  28611. "data": {
  28612. "type": "object",
  28613. "properties": {
  28614. "timestamp": {
  28615. "type": "number"
  28616. },
  28617. "sessionID": {
  28618. "type": "string",
  28619. "pattern": "^ses"
  28620. },
  28621. "messageID": {
  28622. "type": "string",
  28623. "pattern": "^msg_"
  28624. },
  28625. "prompt": {
  28626. "$ref": "#/components/schemas/Prompt"
  28627. },
  28628. "delivery": {
  28629. "type": "string",
  28630. "enum": ["steer", "queue"]
  28631. }
  28632. },
  28633. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  28634. "additionalProperties": false
  28635. }
  28636. },
  28637. "required": ["id", "type", "data"],
  28638. "additionalProperties": false
  28639. },
  28640. "V2EventSessionNextContextUpdated": {
  28641. "type": "object",
  28642. "properties": {
  28643. "id": {
  28644. "type": "string",
  28645. "pattern": "^evt_"
  28646. },
  28647. "metadata": {
  28648. "type": "object"
  28649. },
  28650. "durable": {
  28651. "type": "object",
  28652. "properties": {
  28653. "aggregateID": {
  28654. "type": "string"
  28655. },
  28656. "seq": {
  28657. "type": "integer"
  28658. },
  28659. "version": {
  28660. "type": "integer"
  28661. }
  28662. },
  28663. "required": ["aggregateID", "seq", "version"],
  28664. "additionalProperties": false
  28665. },
  28666. "location": {
  28667. "$ref": "#/components/schemas/LocationRef"
  28668. },
  28669. "type": {
  28670. "type": "string",
  28671. "enum": ["session.next.context.updated"]
  28672. },
  28673. "data": {
  28674. "type": "object",
  28675. "properties": {
  28676. "timestamp": {
  28677. "type": "number"
  28678. },
  28679. "sessionID": {
  28680. "type": "string",
  28681. "pattern": "^ses"
  28682. },
  28683. "messageID": {
  28684. "type": "string",
  28685. "pattern": "^msg_"
  28686. },
  28687. "text": {
  28688. "type": "string"
  28689. }
  28690. },
  28691. "required": ["timestamp", "sessionID", "messageID", "text"],
  28692. "additionalProperties": false
  28693. }
  28694. },
  28695. "required": ["id", "type", "data"],
  28696. "additionalProperties": false
  28697. },
  28698. "V2EventSessionNextSynthetic": {
  28699. "type": "object",
  28700. "properties": {
  28701. "id": {
  28702. "type": "string",
  28703. "pattern": "^evt_"
  28704. },
  28705. "metadata": {
  28706. "type": "object"
  28707. },
  28708. "durable": {
  28709. "type": "object",
  28710. "properties": {
  28711. "aggregateID": {
  28712. "type": "string"
  28713. },
  28714. "seq": {
  28715. "type": "integer"
  28716. },
  28717. "version": {
  28718. "type": "integer"
  28719. }
  28720. },
  28721. "required": ["aggregateID", "seq", "version"],
  28722. "additionalProperties": false
  28723. },
  28724. "location": {
  28725. "$ref": "#/components/schemas/LocationRef"
  28726. },
  28727. "type": {
  28728. "type": "string",
  28729. "enum": ["session.next.synthetic"]
  28730. },
  28731. "data": {
  28732. "type": "object",
  28733. "properties": {
  28734. "timestamp": {
  28735. "type": "number"
  28736. },
  28737. "sessionID": {
  28738. "type": "string",
  28739. "pattern": "^ses"
  28740. },
  28741. "messageID": {
  28742. "type": "string",
  28743. "pattern": "^msg_"
  28744. },
  28745. "text": {
  28746. "type": "string"
  28747. }
  28748. },
  28749. "required": ["timestamp", "sessionID", "messageID", "text"],
  28750. "additionalProperties": false
  28751. }
  28752. },
  28753. "required": ["id", "type", "data"],
  28754. "additionalProperties": false
  28755. },
  28756. "V2EventSessionNextShellStarted": {
  28757. "type": "object",
  28758. "properties": {
  28759. "id": {
  28760. "type": "string",
  28761. "pattern": "^evt_"
  28762. },
  28763. "metadata": {
  28764. "type": "object"
  28765. },
  28766. "durable": {
  28767. "type": "object",
  28768. "properties": {
  28769. "aggregateID": {
  28770. "type": "string"
  28771. },
  28772. "seq": {
  28773. "type": "integer"
  28774. },
  28775. "version": {
  28776. "type": "integer"
  28777. }
  28778. },
  28779. "required": ["aggregateID", "seq", "version"],
  28780. "additionalProperties": false
  28781. },
  28782. "location": {
  28783. "$ref": "#/components/schemas/LocationRef"
  28784. },
  28785. "type": {
  28786. "type": "string",
  28787. "enum": ["session.next.shell.started"]
  28788. },
  28789. "data": {
  28790. "type": "object",
  28791. "properties": {
  28792. "timestamp": {
  28793. "type": "number"
  28794. },
  28795. "sessionID": {
  28796. "type": "string",
  28797. "pattern": "^ses"
  28798. },
  28799. "messageID": {
  28800. "type": "string",
  28801. "pattern": "^msg_"
  28802. },
  28803. "callID": {
  28804. "type": "string"
  28805. },
  28806. "command": {
  28807. "type": "string"
  28808. }
  28809. },
  28810. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  28811. "additionalProperties": false
  28812. }
  28813. },
  28814. "required": ["id", "type", "data"],
  28815. "additionalProperties": false
  28816. },
  28817. "V2EventSessionNextShellEnded": {
  28818. "type": "object",
  28819. "properties": {
  28820. "id": {
  28821. "type": "string",
  28822. "pattern": "^evt_"
  28823. },
  28824. "metadata": {
  28825. "type": "object"
  28826. },
  28827. "durable": {
  28828. "type": "object",
  28829. "properties": {
  28830. "aggregateID": {
  28831. "type": "string"
  28832. },
  28833. "seq": {
  28834. "type": "integer"
  28835. },
  28836. "version": {
  28837. "type": "integer"
  28838. }
  28839. },
  28840. "required": ["aggregateID", "seq", "version"],
  28841. "additionalProperties": false
  28842. },
  28843. "location": {
  28844. "$ref": "#/components/schemas/LocationRef"
  28845. },
  28846. "type": {
  28847. "type": "string",
  28848. "enum": ["session.next.shell.ended"]
  28849. },
  28850. "data": {
  28851. "type": "object",
  28852. "properties": {
  28853. "timestamp": {
  28854. "type": "number"
  28855. },
  28856. "sessionID": {
  28857. "type": "string",
  28858. "pattern": "^ses"
  28859. },
  28860. "callID": {
  28861. "type": "string"
  28862. },
  28863. "output": {
  28864. "type": "string"
  28865. }
  28866. },
  28867. "required": ["timestamp", "sessionID", "callID", "output"],
  28868. "additionalProperties": false
  28869. }
  28870. },
  28871. "required": ["id", "type", "data"],
  28872. "additionalProperties": false
  28873. },
  28874. "V2EventSessionNextStepStarted": {
  28875. "type": "object",
  28876. "properties": {
  28877. "id": {
  28878. "type": "string",
  28879. "pattern": "^evt_"
  28880. },
  28881. "metadata": {
  28882. "type": "object"
  28883. },
  28884. "durable": {
  28885. "type": "object",
  28886. "properties": {
  28887. "aggregateID": {
  28888. "type": "string"
  28889. },
  28890. "seq": {
  28891. "type": "integer"
  28892. },
  28893. "version": {
  28894. "type": "integer"
  28895. }
  28896. },
  28897. "required": ["aggregateID", "seq", "version"],
  28898. "additionalProperties": false
  28899. },
  28900. "location": {
  28901. "$ref": "#/components/schemas/LocationRef"
  28902. },
  28903. "type": {
  28904. "type": "string",
  28905. "enum": ["session.next.step.started"]
  28906. },
  28907. "data": {
  28908. "type": "object",
  28909. "properties": {
  28910. "timestamp": {
  28911. "type": "number"
  28912. },
  28913. "sessionID": {
  28914. "type": "string",
  28915. "pattern": "^ses"
  28916. },
  28917. "assistantMessageID": {
  28918. "type": "string",
  28919. "pattern": "^msg_"
  28920. },
  28921. "agent": {
  28922. "type": "string"
  28923. },
  28924. "model": {
  28925. "type": "object",
  28926. "properties": {
  28927. "id": {
  28928. "type": "string"
  28929. },
  28930. "providerID": {
  28931. "type": "string"
  28932. },
  28933. "variant": {
  28934. "type": "string"
  28935. }
  28936. },
  28937. "required": ["id", "providerID"],
  28938. "additionalProperties": false
  28939. },
  28940. "snapshot": {
  28941. "type": "string"
  28942. }
  28943. },
  28944. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  28945. "additionalProperties": false
  28946. }
  28947. },
  28948. "required": ["id", "type", "data"],
  28949. "additionalProperties": false
  28950. },
  28951. "V2EventSessionNextStepEnded": {
  28952. "type": "object",
  28953. "properties": {
  28954. "id": {
  28955. "type": "string",
  28956. "pattern": "^evt_"
  28957. },
  28958. "metadata": {
  28959. "type": "object"
  28960. },
  28961. "durable": {
  28962. "type": "object",
  28963. "properties": {
  28964. "aggregateID": {
  28965. "type": "string"
  28966. },
  28967. "seq": {
  28968. "type": "integer"
  28969. },
  28970. "version": {
  28971. "type": "integer"
  28972. }
  28973. },
  28974. "required": ["aggregateID", "seq", "version"],
  28975. "additionalProperties": false
  28976. },
  28977. "location": {
  28978. "$ref": "#/components/schemas/LocationRef"
  28979. },
  28980. "type": {
  28981. "type": "string",
  28982. "enum": ["session.next.step.ended"]
  28983. },
  28984. "data": {
  28985. "type": "object",
  28986. "properties": {
  28987. "timestamp": {
  28988. "type": "number"
  28989. },
  28990. "sessionID": {
  28991. "type": "string",
  28992. "pattern": "^ses"
  28993. },
  28994. "assistantMessageID": {
  28995. "type": "string",
  28996. "pattern": "^msg_"
  28997. },
  28998. "finish": {
  28999. "type": "string"
  29000. },
  29001. "cost": {
  29002. "type": "number"
  29003. },
  29004. "tokens": {
  29005. "type": "object",
  29006. "properties": {
  29007. "input": {
  29008. "type": "number"
  29009. },
  29010. "output": {
  29011. "type": "number"
  29012. },
  29013. "reasoning": {
  29014. "type": "number"
  29015. },
  29016. "cache": {
  29017. "type": "object",
  29018. "properties": {
  29019. "read": {
  29020. "type": "number"
  29021. },
  29022. "write": {
  29023. "type": "number"
  29024. }
  29025. },
  29026. "required": ["read", "write"],
  29027. "additionalProperties": false
  29028. }
  29029. },
  29030. "required": ["input", "output", "reasoning", "cache"],
  29031. "additionalProperties": false
  29032. },
  29033. "snapshot": {
  29034. "type": "string"
  29035. }
  29036. },
  29037. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  29038. "additionalProperties": false
  29039. }
  29040. },
  29041. "required": ["id", "type", "data"],
  29042. "additionalProperties": false
  29043. },
  29044. "V2EventSessionNextStepFailed": {
  29045. "type": "object",
  29046. "properties": {
  29047. "id": {
  29048. "type": "string",
  29049. "pattern": "^evt_"
  29050. },
  29051. "metadata": {
  29052. "type": "object"
  29053. },
  29054. "durable": {
  29055. "type": "object",
  29056. "properties": {
  29057. "aggregateID": {
  29058. "type": "string"
  29059. },
  29060. "seq": {
  29061. "type": "integer"
  29062. },
  29063. "version": {
  29064. "type": "integer"
  29065. }
  29066. },
  29067. "required": ["aggregateID", "seq", "version"],
  29068. "additionalProperties": false
  29069. },
  29070. "location": {
  29071. "$ref": "#/components/schemas/LocationRef"
  29072. },
  29073. "type": {
  29074. "type": "string",
  29075. "enum": ["session.next.step.failed"]
  29076. },
  29077. "data": {
  29078. "type": "object",
  29079. "properties": {
  29080. "timestamp": {
  29081. "type": "number"
  29082. },
  29083. "sessionID": {
  29084. "type": "string",
  29085. "pattern": "^ses"
  29086. },
  29087. "assistantMessageID": {
  29088. "type": "string",
  29089. "pattern": "^msg_"
  29090. },
  29091. "error": {
  29092. "$ref": "#/components/schemas/SessionErrorUnknown"
  29093. }
  29094. },
  29095. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  29096. "additionalProperties": false
  29097. }
  29098. },
  29099. "required": ["id", "type", "data"],
  29100. "additionalProperties": false
  29101. },
  29102. "V2EventSessionNextTextStarted": {
  29103. "type": "object",
  29104. "properties": {
  29105. "id": {
  29106. "type": "string",
  29107. "pattern": "^evt_"
  29108. },
  29109. "metadata": {
  29110. "type": "object"
  29111. },
  29112. "durable": {
  29113. "type": "object",
  29114. "properties": {
  29115. "aggregateID": {
  29116. "type": "string"
  29117. },
  29118. "seq": {
  29119. "type": "integer"
  29120. },
  29121. "version": {
  29122. "type": "integer"
  29123. }
  29124. },
  29125. "required": ["aggregateID", "seq", "version"],
  29126. "additionalProperties": false
  29127. },
  29128. "location": {
  29129. "$ref": "#/components/schemas/LocationRef"
  29130. },
  29131. "type": {
  29132. "type": "string",
  29133. "enum": ["session.next.text.started"]
  29134. },
  29135. "data": {
  29136. "type": "object",
  29137. "properties": {
  29138. "timestamp": {
  29139. "type": "number"
  29140. },
  29141. "sessionID": {
  29142. "type": "string",
  29143. "pattern": "^ses"
  29144. },
  29145. "assistantMessageID": {
  29146. "type": "string",
  29147. "pattern": "^msg_"
  29148. },
  29149. "textID": {
  29150. "type": "string"
  29151. }
  29152. },
  29153. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  29154. "additionalProperties": false
  29155. }
  29156. },
  29157. "required": ["id", "type", "data"],
  29158. "additionalProperties": false
  29159. },
  29160. "V2EventSessionNextTextDelta": {
  29161. "type": "object",
  29162. "properties": {
  29163. "id": {
  29164. "type": "string",
  29165. "pattern": "^evt_"
  29166. },
  29167. "metadata": {
  29168. "type": "object"
  29169. },
  29170. "durable": {
  29171. "type": "object",
  29172. "properties": {
  29173. "aggregateID": {
  29174. "type": "string"
  29175. },
  29176. "seq": {
  29177. "type": "integer"
  29178. },
  29179. "version": {
  29180. "type": "integer"
  29181. }
  29182. },
  29183. "required": ["aggregateID", "seq", "version"],
  29184. "additionalProperties": false
  29185. },
  29186. "location": {
  29187. "$ref": "#/components/schemas/LocationRef"
  29188. },
  29189. "type": {
  29190. "type": "string",
  29191. "enum": ["session.next.text.delta"]
  29192. },
  29193. "data": {
  29194. "type": "object",
  29195. "properties": {
  29196. "timestamp": {
  29197. "type": "number"
  29198. },
  29199. "sessionID": {
  29200. "type": "string",
  29201. "pattern": "^ses"
  29202. },
  29203. "assistantMessageID": {
  29204. "type": "string",
  29205. "pattern": "^msg_"
  29206. },
  29207. "textID": {
  29208. "type": "string"
  29209. },
  29210. "delta": {
  29211. "type": "string"
  29212. }
  29213. },
  29214. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  29215. "additionalProperties": false
  29216. }
  29217. },
  29218. "required": ["id", "type", "data"],
  29219. "additionalProperties": false
  29220. },
  29221. "V2EventSessionNextTextEnded": {
  29222. "type": "object",
  29223. "properties": {
  29224. "id": {
  29225. "type": "string",
  29226. "pattern": "^evt_"
  29227. },
  29228. "metadata": {
  29229. "type": "object"
  29230. },
  29231. "durable": {
  29232. "type": "object",
  29233. "properties": {
  29234. "aggregateID": {
  29235. "type": "string"
  29236. },
  29237. "seq": {
  29238. "type": "integer"
  29239. },
  29240. "version": {
  29241. "type": "integer"
  29242. }
  29243. },
  29244. "required": ["aggregateID", "seq", "version"],
  29245. "additionalProperties": false
  29246. },
  29247. "location": {
  29248. "$ref": "#/components/schemas/LocationRef"
  29249. },
  29250. "type": {
  29251. "type": "string",
  29252. "enum": ["session.next.text.ended"]
  29253. },
  29254. "data": {
  29255. "type": "object",
  29256. "properties": {
  29257. "timestamp": {
  29258. "type": "number"
  29259. },
  29260. "sessionID": {
  29261. "type": "string",
  29262. "pattern": "^ses"
  29263. },
  29264. "assistantMessageID": {
  29265. "type": "string",
  29266. "pattern": "^msg_"
  29267. },
  29268. "textID": {
  29269. "type": "string"
  29270. },
  29271. "text": {
  29272. "type": "string"
  29273. }
  29274. },
  29275. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  29276. "additionalProperties": false
  29277. }
  29278. },
  29279. "required": ["id", "type", "data"],
  29280. "additionalProperties": false
  29281. },
  29282. "V2EventSessionNextReasoningStarted": {
  29283. "type": "object",
  29284. "properties": {
  29285. "id": {
  29286. "type": "string",
  29287. "pattern": "^evt_"
  29288. },
  29289. "metadata": {
  29290. "type": "object"
  29291. },
  29292. "durable": {
  29293. "type": "object",
  29294. "properties": {
  29295. "aggregateID": {
  29296. "type": "string"
  29297. },
  29298. "seq": {
  29299. "type": "integer"
  29300. },
  29301. "version": {
  29302. "type": "integer"
  29303. }
  29304. },
  29305. "required": ["aggregateID", "seq", "version"],
  29306. "additionalProperties": false
  29307. },
  29308. "location": {
  29309. "$ref": "#/components/schemas/LocationRef"
  29310. },
  29311. "type": {
  29312. "type": "string",
  29313. "enum": ["session.next.reasoning.started"]
  29314. },
  29315. "data": {
  29316. "type": "object",
  29317. "properties": {
  29318. "timestamp": {
  29319. "type": "number"
  29320. },
  29321. "sessionID": {
  29322. "type": "string",
  29323. "pattern": "^ses"
  29324. },
  29325. "assistantMessageID": {
  29326. "type": "string",
  29327. "pattern": "^msg_"
  29328. },
  29329. "reasoningID": {
  29330. "type": "string"
  29331. },
  29332. "providerMetadata": {
  29333. "type": "object",
  29334. "additionalProperties": {
  29335. "type": "object"
  29336. }
  29337. }
  29338. },
  29339. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  29340. "additionalProperties": false
  29341. }
  29342. },
  29343. "required": ["id", "type", "data"],
  29344. "additionalProperties": false
  29345. },
  29346. "V2EventSessionNextReasoningDelta": {
  29347. "type": "object",
  29348. "properties": {
  29349. "id": {
  29350. "type": "string",
  29351. "pattern": "^evt_"
  29352. },
  29353. "metadata": {
  29354. "type": "object"
  29355. },
  29356. "durable": {
  29357. "type": "object",
  29358. "properties": {
  29359. "aggregateID": {
  29360. "type": "string"
  29361. },
  29362. "seq": {
  29363. "type": "integer"
  29364. },
  29365. "version": {
  29366. "type": "integer"
  29367. }
  29368. },
  29369. "required": ["aggregateID", "seq", "version"],
  29370. "additionalProperties": false
  29371. },
  29372. "location": {
  29373. "$ref": "#/components/schemas/LocationRef"
  29374. },
  29375. "type": {
  29376. "type": "string",
  29377. "enum": ["session.next.reasoning.delta"]
  29378. },
  29379. "data": {
  29380. "type": "object",
  29381. "properties": {
  29382. "timestamp": {
  29383. "type": "number"
  29384. },
  29385. "sessionID": {
  29386. "type": "string",
  29387. "pattern": "^ses"
  29388. },
  29389. "assistantMessageID": {
  29390. "type": "string",
  29391. "pattern": "^msg_"
  29392. },
  29393. "reasoningID": {
  29394. "type": "string"
  29395. },
  29396. "delta": {
  29397. "type": "string"
  29398. }
  29399. },
  29400. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  29401. "additionalProperties": false
  29402. }
  29403. },
  29404. "required": ["id", "type", "data"],
  29405. "additionalProperties": false
  29406. },
  29407. "V2EventSessionNextReasoningEnded": {
  29408. "type": "object",
  29409. "properties": {
  29410. "id": {
  29411. "type": "string",
  29412. "pattern": "^evt_"
  29413. },
  29414. "metadata": {
  29415. "type": "object"
  29416. },
  29417. "durable": {
  29418. "type": "object",
  29419. "properties": {
  29420. "aggregateID": {
  29421. "type": "string"
  29422. },
  29423. "seq": {
  29424. "type": "integer"
  29425. },
  29426. "version": {
  29427. "type": "integer"
  29428. }
  29429. },
  29430. "required": ["aggregateID", "seq", "version"],
  29431. "additionalProperties": false
  29432. },
  29433. "location": {
  29434. "$ref": "#/components/schemas/LocationRef"
  29435. },
  29436. "type": {
  29437. "type": "string",
  29438. "enum": ["session.next.reasoning.ended"]
  29439. },
  29440. "data": {
  29441. "type": "object",
  29442. "properties": {
  29443. "timestamp": {
  29444. "type": "number"
  29445. },
  29446. "sessionID": {
  29447. "type": "string",
  29448. "pattern": "^ses"
  29449. },
  29450. "assistantMessageID": {
  29451. "type": "string",
  29452. "pattern": "^msg_"
  29453. },
  29454. "reasoningID": {
  29455. "type": "string"
  29456. },
  29457. "text": {
  29458. "type": "string"
  29459. },
  29460. "providerMetadata": {
  29461. "type": "object",
  29462. "additionalProperties": {
  29463. "type": "object"
  29464. }
  29465. }
  29466. },
  29467. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  29468. "additionalProperties": false
  29469. }
  29470. },
  29471. "required": ["id", "type", "data"],
  29472. "additionalProperties": false
  29473. },
  29474. "V2EventSessionNextToolInputStarted": {
  29475. "type": "object",
  29476. "properties": {
  29477. "id": {
  29478. "type": "string",
  29479. "pattern": "^evt_"
  29480. },
  29481. "metadata": {
  29482. "type": "object"
  29483. },
  29484. "durable": {
  29485. "type": "object",
  29486. "properties": {
  29487. "aggregateID": {
  29488. "type": "string"
  29489. },
  29490. "seq": {
  29491. "type": "integer"
  29492. },
  29493. "version": {
  29494. "type": "integer"
  29495. }
  29496. },
  29497. "required": ["aggregateID", "seq", "version"],
  29498. "additionalProperties": false
  29499. },
  29500. "location": {
  29501. "$ref": "#/components/schemas/LocationRef"
  29502. },
  29503. "type": {
  29504. "type": "string",
  29505. "enum": ["session.next.tool.input.started"]
  29506. },
  29507. "data": {
  29508. "type": "object",
  29509. "properties": {
  29510. "timestamp": {
  29511. "type": "number"
  29512. },
  29513. "sessionID": {
  29514. "type": "string",
  29515. "pattern": "^ses"
  29516. },
  29517. "assistantMessageID": {
  29518. "type": "string",
  29519. "pattern": "^msg_"
  29520. },
  29521. "callID": {
  29522. "type": "string"
  29523. },
  29524. "name": {
  29525. "type": "string"
  29526. }
  29527. },
  29528. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  29529. "additionalProperties": false
  29530. }
  29531. },
  29532. "required": ["id", "type", "data"],
  29533. "additionalProperties": false
  29534. },
  29535. "V2EventSessionNextToolInputDelta": {
  29536. "type": "object",
  29537. "properties": {
  29538. "id": {
  29539. "type": "string",
  29540. "pattern": "^evt_"
  29541. },
  29542. "metadata": {
  29543. "type": "object"
  29544. },
  29545. "durable": {
  29546. "type": "object",
  29547. "properties": {
  29548. "aggregateID": {
  29549. "type": "string"
  29550. },
  29551. "seq": {
  29552. "type": "integer"
  29553. },
  29554. "version": {
  29555. "type": "integer"
  29556. }
  29557. },
  29558. "required": ["aggregateID", "seq", "version"],
  29559. "additionalProperties": false
  29560. },
  29561. "location": {
  29562. "$ref": "#/components/schemas/LocationRef"
  29563. },
  29564. "type": {
  29565. "type": "string",
  29566. "enum": ["session.next.tool.input.delta"]
  29567. },
  29568. "data": {
  29569. "type": "object",
  29570. "properties": {
  29571. "timestamp": {
  29572. "type": "number"
  29573. },
  29574. "sessionID": {
  29575. "type": "string",
  29576. "pattern": "^ses"
  29577. },
  29578. "assistantMessageID": {
  29579. "type": "string",
  29580. "pattern": "^msg_"
  29581. },
  29582. "callID": {
  29583. "type": "string"
  29584. },
  29585. "delta": {
  29586. "type": "string"
  29587. }
  29588. },
  29589. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  29590. "additionalProperties": false
  29591. }
  29592. },
  29593. "required": ["id", "type", "data"],
  29594. "additionalProperties": false
  29595. },
  29596. "V2EventSessionNextToolInputEnded": {
  29597. "type": "object",
  29598. "properties": {
  29599. "id": {
  29600. "type": "string",
  29601. "pattern": "^evt_"
  29602. },
  29603. "metadata": {
  29604. "type": "object"
  29605. },
  29606. "durable": {
  29607. "type": "object",
  29608. "properties": {
  29609. "aggregateID": {
  29610. "type": "string"
  29611. },
  29612. "seq": {
  29613. "type": "integer"
  29614. },
  29615. "version": {
  29616. "type": "integer"
  29617. }
  29618. },
  29619. "required": ["aggregateID", "seq", "version"],
  29620. "additionalProperties": false
  29621. },
  29622. "location": {
  29623. "$ref": "#/components/schemas/LocationRef"
  29624. },
  29625. "type": {
  29626. "type": "string",
  29627. "enum": ["session.next.tool.input.ended"]
  29628. },
  29629. "data": {
  29630. "type": "object",
  29631. "properties": {
  29632. "timestamp": {
  29633. "type": "number"
  29634. },
  29635. "sessionID": {
  29636. "type": "string",
  29637. "pattern": "^ses"
  29638. },
  29639. "assistantMessageID": {
  29640. "type": "string",
  29641. "pattern": "^msg_"
  29642. },
  29643. "callID": {
  29644. "type": "string"
  29645. },
  29646. "text": {
  29647. "type": "string"
  29648. }
  29649. },
  29650. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  29651. "additionalProperties": false
  29652. }
  29653. },
  29654. "required": ["id", "type", "data"],
  29655. "additionalProperties": false
  29656. },
  29657. "V2EventSessionNextToolCalled": {
  29658. "type": "object",
  29659. "properties": {
  29660. "id": {
  29661. "type": "string",
  29662. "pattern": "^evt_"
  29663. },
  29664. "metadata": {
  29665. "type": "object"
  29666. },
  29667. "durable": {
  29668. "type": "object",
  29669. "properties": {
  29670. "aggregateID": {
  29671. "type": "string"
  29672. },
  29673. "seq": {
  29674. "type": "integer"
  29675. },
  29676. "version": {
  29677. "type": "integer"
  29678. }
  29679. },
  29680. "required": ["aggregateID", "seq", "version"],
  29681. "additionalProperties": false
  29682. },
  29683. "location": {
  29684. "$ref": "#/components/schemas/LocationRef"
  29685. },
  29686. "type": {
  29687. "type": "string",
  29688. "enum": ["session.next.tool.called"]
  29689. },
  29690. "data": {
  29691. "type": "object",
  29692. "properties": {
  29693. "timestamp": {
  29694. "type": "number"
  29695. },
  29696. "sessionID": {
  29697. "type": "string",
  29698. "pattern": "^ses"
  29699. },
  29700. "assistantMessageID": {
  29701. "type": "string",
  29702. "pattern": "^msg_"
  29703. },
  29704. "callID": {
  29705. "type": "string"
  29706. },
  29707. "tool": {
  29708. "type": "string"
  29709. },
  29710. "input": {
  29711. "type": "object"
  29712. },
  29713. "provider": {
  29714. "type": "object",
  29715. "properties": {
  29716. "executed": {
  29717. "type": "boolean"
  29718. },
  29719. "metadata": {
  29720. "type": "object",
  29721. "additionalProperties": {
  29722. "type": "object"
  29723. }
  29724. }
  29725. },
  29726. "required": ["executed"],
  29727. "additionalProperties": false
  29728. }
  29729. },
  29730. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  29731. "additionalProperties": false
  29732. }
  29733. },
  29734. "required": ["id", "type", "data"],
  29735. "additionalProperties": false
  29736. },
  29737. "V2EventSessionNextToolProgress": {
  29738. "type": "object",
  29739. "properties": {
  29740. "id": {
  29741. "type": "string",
  29742. "pattern": "^evt_"
  29743. },
  29744. "metadata": {
  29745. "type": "object"
  29746. },
  29747. "durable": {
  29748. "type": "object",
  29749. "properties": {
  29750. "aggregateID": {
  29751. "type": "string"
  29752. },
  29753. "seq": {
  29754. "type": "integer"
  29755. },
  29756. "version": {
  29757. "type": "integer"
  29758. }
  29759. },
  29760. "required": ["aggregateID", "seq", "version"],
  29761. "additionalProperties": false
  29762. },
  29763. "location": {
  29764. "$ref": "#/components/schemas/LocationRef"
  29765. },
  29766. "type": {
  29767. "type": "string",
  29768. "enum": ["session.next.tool.progress"]
  29769. },
  29770. "data": {
  29771. "type": "object",
  29772. "properties": {
  29773. "timestamp": {
  29774. "type": "number"
  29775. },
  29776. "sessionID": {
  29777. "type": "string",
  29778. "pattern": "^ses"
  29779. },
  29780. "assistantMessageID": {
  29781. "type": "string",
  29782. "pattern": "^msg_"
  29783. },
  29784. "callID": {
  29785. "type": "string"
  29786. },
  29787. "structured": {
  29788. "type": "object"
  29789. },
  29790. "content": {
  29791. "type": "array",
  29792. "items": {
  29793. "anyOf": [
  29794. {
  29795. "$ref": "#/components/schemas/ToolTextContent"
  29796. },
  29797. {
  29798. "$ref": "#/components/schemas/ToolFileContent"
  29799. }
  29800. ]
  29801. }
  29802. }
  29803. },
  29804. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  29805. "additionalProperties": false
  29806. }
  29807. },
  29808. "required": ["id", "type", "data"],
  29809. "additionalProperties": false
  29810. },
  29811. "V2EventSessionNextToolSuccess": {
  29812. "type": "object",
  29813. "properties": {
  29814. "id": {
  29815. "type": "string",
  29816. "pattern": "^evt_"
  29817. },
  29818. "metadata": {
  29819. "type": "object"
  29820. },
  29821. "durable": {
  29822. "type": "object",
  29823. "properties": {
  29824. "aggregateID": {
  29825. "type": "string"
  29826. },
  29827. "seq": {
  29828. "type": "integer"
  29829. },
  29830. "version": {
  29831. "type": "integer"
  29832. }
  29833. },
  29834. "required": ["aggregateID", "seq", "version"],
  29835. "additionalProperties": false
  29836. },
  29837. "location": {
  29838. "$ref": "#/components/schemas/LocationRef"
  29839. },
  29840. "type": {
  29841. "type": "string",
  29842. "enum": ["session.next.tool.success"]
  29843. },
  29844. "data": {
  29845. "type": "object",
  29846. "properties": {
  29847. "timestamp": {
  29848. "type": "number"
  29849. },
  29850. "sessionID": {
  29851. "type": "string",
  29852. "pattern": "^ses"
  29853. },
  29854. "assistantMessageID": {
  29855. "type": "string",
  29856. "pattern": "^msg_"
  29857. },
  29858. "callID": {
  29859. "type": "string"
  29860. },
  29861. "structured": {
  29862. "type": "object"
  29863. },
  29864. "content": {
  29865. "type": "array",
  29866. "items": {
  29867. "anyOf": [
  29868. {
  29869. "$ref": "#/components/schemas/ToolTextContent"
  29870. },
  29871. {
  29872. "$ref": "#/components/schemas/ToolFileContent"
  29873. }
  29874. ]
  29875. }
  29876. },
  29877. "outputPaths": {
  29878. "type": "array",
  29879. "items": {
  29880. "type": "string"
  29881. }
  29882. },
  29883. "result": {},
  29884. "provider": {
  29885. "type": "object",
  29886. "properties": {
  29887. "executed": {
  29888. "type": "boolean"
  29889. },
  29890. "metadata": {
  29891. "type": "object",
  29892. "additionalProperties": {
  29893. "type": "object"
  29894. }
  29895. }
  29896. },
  29897. "required": ["executed"],
  29898. "additionalProperties": false
  29899. }
  29900. },
  29901. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  29902. "additionalProperties": false
  29903. }
  29904. },
  29905. "required": ["id", "type", "data"],
  29906. "additionalProperties": false
  29907. },
  29908. "V2EventSessionNextToolFailed": {
  29909. "type": "object",
  29910. "properties": {
  29911. "id": {
  29912. "type": "string",
  29913. "pattern": "^evt_"
  29914. },
  29915. "metadata": {
  29916. "type": "object"
  29917. },
  29918. "durable": {
  29919. "type": "object",
  29920. "properties": {
  29921. "aggregateID": {
  29922. "type": "string"
  29923. },
  29924. "seq": {
  29925. "type": "integer"
  29926. },
  29927. "version": {
  29928. "type": "integer"
  29929. }
  29930. },
  29931. "required": ["aggregateID", "seq", "version"],
  29932. "additionalProperties": false
  29933. },
  29934. "location": {
  29935. "$ref": "#/components/schemas/LocationRef"
  29936. },
  29937. "type": {
  29938. "type": "string",
  29939. "enum": ["session.next.tool.failed"]
  29940. },
  29941. "data": {
  29942. "type": "object",
  29943. "properties": {
  29944. "timestamp": {
  29945. "type": "number"
  29946. },
  29947. "sessionID": {
  29948. "type": "string",
  29949. "pattern": "^ses"
  29950. },
  29951. "assistantMessageID": {
  29952. "type": "string",
  29953. "pattern": "^msg_"
  29954. },
  29955. "callID": {
  29956. "type": "string"
  29957. },
  29958. "error": {
  29959. "$ref": "#/components/schemas/SessionErrorUnknown"
  29960. },
  29961. "result": {},
  29962. "provider": {
  29963. "type": "object",
  29964. "properties": {
  29965. "executed": {
  29966. "type": "boolean"
  29967. },
  29968. "metadata": {
  29969. "type": "object",
  29970. "additionalProperties": {
  29971. "type": "object"
  29972. }
  29973. }
  29974. },
  29975. "required": ["executed"],
  29976. "additionalProperties": false
  29977. }
  29978. },
  29979. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  29980. "additionalProperties": false
  29981. }
  29982. },
  29983. "required": ["id", "type", "data"],
  29984. "additionalProperties": false
  29985. },
  29986. "V2EventSessionNextRetried": {
  29987. "type": "object",
  29988. "properties": {
  29989. "id": {
  29990. "type": "string",
  29991. "pattern": "^evt_"
  29992. },
  29993. "metadata": {
  29994. "type": "object"
  29995. },
  29996. "durable": {
  29997. "type": "object",
  29998. "properties": {
  29999. "aggregateID": {
  30000. "type": "string"
  30001. },
  30002. "seq": {
  30003. "type": "integer"
  30004. },
  30005. "version": {
  30006. "type": "integer"
  30007. }
  30008. },
  30009. "required": ["aggregateID", "seq", "version"],
  30010. "additionalProperties": false
  30011. },
  30012. "location": {
  30013. "$ref": "#/components/schemas/LocationRef"
  30014. },
  30015. "type": {
  30016. "type": "string",
  30017. "enum": ["session.next.retried"]
  30018. },
  30019. "data": {
  30020. "type": "object",
  30021. "properties": {
  30022. "timestamp": {
  30023. "type": "number"
  30024. },
  30025. "sessionID": {
  30026. "type": "string",
  30027. "pattern": "^ses"
  30028. },
  30029. "attempt": {
  30030. "type": "number"
  30031. },
  30032. "error": {
  30033. "$ref": "#/components/schemas/SessionNextRetry_error"
  30034. }
  30035. },
  30036. "required": ["timestamp", "sessionID", "attempt", "error"],
  30037. "additionalProperties": false
  30038. }
  30039. },
  30040. "required": ["id", "type", "data"],
  30041. "additionalProperties": false
  30042. },
  30043. "V2EventSessionNextCompactionStarted": {
  30044. "type": "object",
  30045. "properties": {
  30046. "id": {
  30047. "type": "string",
  30048. "pattern": "^evt_"
  30049. },
  30050. "metadata": {
  30051. "type": "object"
  30052. },
  30053. "durable": {
  30054. "type": "object",
  30055. "properties": {
  30056. "aggregateID": {
  30057. "type": "string"
  30058. },
  30059. "seq": {
  30060. "type": "integer"
  30061. },
  30062. "version": {
  30063. "type": "integer"
  30064. }
  30065. },
  30066. "required": ["aggregateID", "seq", "version"],
  30067. "additionalProperties": false
  30068. },
  30069. "location": {
  30070. "$ref": "#/components/schemas/LocationRef"
  30071. },
  30072. "type": {
  30073. "type": "string",
  30074. "enum": ["session.next.compaction.started"]
  30075. },
  30076. "data": {
  30077. "type": "object",
  30078. "properties": {
  30079. "timestamp": {
  30080. "type": "number"
  30081. },
  30082. "sessionID": {
  30083. "type": "string",
  30084. "pattern": "^ses"
  30085. },
  30086. "messageID": {
  30087. "type": "string",
  30088. "pattern": "^msg_"
  30089. },
  30090. "reason": {
  30091. "type": "string",
  30092. "enum": ["auto", "manual"]
  30093. }
  30094. },
  30095. "required": ["timestamp", "sessionID", "messageID", "reason"],
  30096. "additionalProperties": false
  30097. }
  30098. },
  30099. "required": ["id", "type", "data"],
  30100. "additionalProperties": false
  30101. },
  30102. "V2EventSessionNextCompactionDelta": {
  30103. "type": "object",
  30104. "properties": {
  30105. "id": {
  30106. "type": "string",
  30107. "pattern": "^evt_"
  30108. },
  30109. "metadata": {
  30110. "type": "object"
  30111. },
  30112. "durable": {
  30113. "type": "object",
  30114. "properties": {
  30115. "aggregateID": {
  30116. "type": "string"
  30117. },
  30118. "seq": {
  30119. "type": "integer"
  30120. },
  30121. "version": {
  30122. "type": "integer"
  30123. }
  30124. },
  30125. "required": ["aggregateID", "seq", "version"],
  30126. "additionalProperties": false
  30127. },
  30128. "location": {
  30129. "$ref": "#/components/schemas/LocationRef"
  30130. },
  30131. "type": {
  30132. "type": "string",
  30133. "enum": ["session.next.compaction.delta"]
  30134. },
  30135. "data": {
  30136. "type": "object",
  30137. "properties": {
  30138. "timestamp": {
  30139. "type": "number"
  30140. },
  30141. "sessionID": {
  30142. "type": "string",
  30143. "pattern": "^ses"
  30144. },
  30145. "messageID": {
  30146. "type": "string",
  30147. "pattern": "^msg_"
  30148. },
  30149. "text": {
  30150. "type": "string"
  30151. }
  30152. },
  30153. "required": ["timestamp", "sessionID", "messageID", "text"],
  30154. "additionalProperties": false
  30155. }
  30156. },
  30157. "required": ["id", "type", "data"],
  30158. "additionalProperties": false
  30159. },
  30160. "V2EventSessionNextCompactionEnded": {
  30161. "type": "object",
  30162. "properties": {
  30163. "id": {
  30164. "type": "string",
  30165. "pattern": "^evt_"
  30166. },
  30167. "metadata": {
  30168. "type": "object"
  30169. },
  30170. "durable": {
  30171. "type": "object",
  30172. "properties": {
  30173. "aggregateID": {
  30174. "type": "string"
  30175. },
  30176. "seq": {
  30177. "type": "integer"
  30178. },
  30179. "version": {
  30180. "type": "integer"
  30181. }
  30182. },
  30183. "required": ["aggregateID", "seq", "version"],
  30184. "additionalProperties": false
  30185. },
  30186. "location": {
  30187. "$ref": "#/components/schemas/LocationRef"
  30188. },
  30189. "type": {
  30190. "type": "string",
  30191. "enum": ["session.next.compaction.ended"]
  30192. },
  30193. "data": {
  30194. "type": "object",
  30195. "properties": {
  30196. "timestamp": {
  30197. "type": "number"
  30198. },
  30199. "sessionID": {
  30200. "type": "string",
  30201. "pattern": "^ses"
  30202. },
  30203. "messageID": {
  30204. "type": "string",
  30205. "pattern": "^msg_"
  30206. },
  30207. "reason": {
  30208. "type": "string",
  30209. "enum": ["auto", "manual"]
  30210. },
  30211. "text": {
  30212. "type": "string"
  30213. },
  30214. "recent": {
  30215. "type": "string"
  30216. }
  30217. },
  30218. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  30219. "additionalProperties": false
  30220. }
  30221. },
  30222. "required": ["id", "type", "data"],
  30223. "additionalProperties": false
  30224. },
  30225. "V2EventMessagePartDelta": {
  30226. "type": "object",
  30227. "properties": {
  30228. "id": {
  30229. "type": "string",
  30230. "pattern": "^evt_"
  30231. },
  30232. "metadata": {
  30233. "type": "object"
  30234. },
  30235. "durable": {
  30236. "type": "object",
  30237. "properties": {
  30238. "aggregateID": {
  30239. "type": "string"
  30240. },
  30241. "seq": {
  30242. "type": "integer"
  30243. },
  30244. "version": {
  30245. "type": "integer"
  30246. }
  30247. },
  30248. "required": ["aggregateID", "seq", "version"],
  30249. "additionalProperties": false
  30250. },
  30251. "location": {
  30252. "$ref": "#/components/schemas/LocationRef"
  30253. },
  30254. "type": {
  30255. "type": "string",
  30256. "enum": ["message.part.delta"]
  30257. },
  30258. "data": {
  30259. "type": "object",
  30260. "properties": {
  30261. "sessionID": {
  30262. "type": "string",
  30263. "pattern": "^ses"
  30264. },
  30265. "messageID": {
  30266. "type": "string",
  30267. "pattern": "^msg"
  30268. },
  30269. "partID": {
  30270. "type": "string",
  30271. "pattern": "^prt"
  30272. },
  30273. "field": {
  30274. "type": "string"
  30275. },
  30276. "delta": {
  30277. "type": "string"
  30278. }
  30279. },
  30280. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  30281. "additionalProperties": false
  30282. }
  30283. },
  30284. "required": ["id", "type", "data"],
  30285. "additionalProperties": false
  30286. },
  30287. "V2EventSessionDiff": {
  30288. "type": "object",
  30289. "properties": {
  30290. "id": {
  30291. "type": "string",
  30292. "pattern": "^evt_"
  30293. },
  30294. "metadata": {
  30295. "type": "object"
  30296. },
  30297. "durable": {
  30298. "type": "object",
  30299. "properties": {
  30300. "aggregateID": {
  30301. "type": "string"
  30302. },
  30303. "seq": {
  30304. "type": "integer"
  30305. },
  30306. "version": {
  30307. "type": "integer"
  30308. }
  30309. },
  30310. "required": ["aggregateID", "seq", "version"],
  30311. "additionalProperties": false
  30312. },
  30313. "location": {
  30314. "$ref": "#/components/schemas/LocationRef"
  30315. },
  30316. "type": {
  30317. "type": "string",
  30318. "enum": ["session.diff"]
  30319. },
  30320. "data": {
  30321. "type": "object",
  30322. "properties": {
  30323. "sessionID": {
  30324. "type": "string",
  30325. "pattern": "^ses"
  30326. },
  30327. "diff": {
  30328. "type": "array",
  30329. "items": {
  30330. "$ref": "#/components/schemas/SnapshotFileDiff"
  30331. }
  30332. }
  30333. },
  30334. "required": ["sessionID", "diff"],
  30335. "additionalProperties": false
  30336. }
  30337. },
  30338. "required": ["id", "type", "data"],
  30339. "additionalProperties": false
  30340. },
  30341. "V2EventSessionError": {
  30342. "type": "object",
  30343. "properties": {
  30344. "id": {
  30345. "type": "string",
  30346. "pattern": "^evt_"
  30347. },
  30348. "metadata": {
  30349. "type": "object"
  30350. },
  30351. "durable": {
  30352. "type": "object",
  30353. "properties": {
  30354. "aggregateID": {
  30355. "type": "string"
  30356. },
  30357. "seq": {
  30358. "type": "integer"
  30359. },
  30360. "version": {
  30361. "type": "integer"
  30362. }
  30363. },
  30364. "required": ["aggregateID", "seq", "version"],
  30365. "additionalProperties": false
  30366. },
  30367. "location": {
  30368. "$ref": "#/components/schemas/LocationRef"
  30369. },
  30370. "type": {
  30371. "type": "string",
  30372. "enum": ["session.error"]
  30373. },
  30374. "data": {
  30375. "type": "object",
  30376. "properties": {
  30377. "sessionID": {
  30378. "type": "string",
  30379. "pattern": "^ses"
  30380. },
  30381. "error": {
  30382. "anyOf": [
  30383. {
  30384. "$ref": "#/components/schemas/ProviderAuthError"
  30385. },
  30386. {
  30387. "$ref": "#/components/schemas/UnknownError"
  30388. },
  30389. {
  30390. "$ref": "#/components/schemas/MessageOutputLengthError"
  30391. },
  30392. {
  30393. "$ref": "#/components/schemas/MessageAbortedError"
  30394. },
  30395. {
  30396. "$ref": "#/components/schemas/StructuredOutputError"
  30397. },
  30398. {
  30399. "$ref": "#/components/schemas/ContextOverflowError"
  30400. },
  30401. {
  30402. "$ref": "#/components/schemas/ContentFilterError"
  30403. },
  30404. {
  30405. "$ref": "#/components/schemas/APIError"
  30406. }
  30407. ]
  30408. }
  30409. },
  30410. "additionalProperties": false
  30411. }
  30412. },
  30413. "required": ["id", "type", "data"],
  30414. "additionalProperties": false
  30415. },
  30416. "V2EventInstallationUpdated": {
  30417. "type": "object",
  30418. "properties": {
  30419. "id": {
  30420. "type": "string",
  30421. "pattern": "^evt_"
  30422. },
  30423. "metadata": {
  30424. "type": "object"
  30425. },
  30426. "durable": {
  30427. "type": "object",
  30428. "properties": {
  30429. "aggregateID": {
  30430. "type": "string"
  30431. },
  30432. "seq": {
  30433. "type": "integer"
  30434. },
  30435. "version": {
  30436. "type": "integer"
  30437. }
  30438. },
  30439. "required": ["aggregateID", "seq", "version"],
  30440. "additionalProperties": false
  30441. },
  30442. "location": {
  30443. "$ref": "#/components/schemas/LocationRef"
  30444. },
  30445. "type": {
  30446. "type": "string",
  30447. "enum": ["installation.updated"]
  30448. },
  30449. "data": {
  30450. "type": "object",
  30451. "properties": {
  30452. "version": {
  30453. "type": "string"
  30454. }
  30455. },
  30456. "required": ["version"],
  30457. "additionalProperties": false
  30458. }
  30459. },
  30460. "required": ["id", "type", "data"],
  30461. "additionalProperties": false
  30462. },
  30463. "V2EventInstallationUpdate-available": {
  30464. "type": "object",
  30465. "properties": {
  30466. "id": {
  30467. "type": "string",
  30468. "pattern": "^evt_"
  30469. },
  30470. "metadata": {
  30471. "type": "object"
  30472. },
  30473. "durable": {
  30474. "type": "object",
  30475. "properties": {
  30476. "aggregateID": {
  30477. "type": "string"
  30478. },
  30479. "seq": {
  30480. "type": "integer"
  30481. },
  30482. "version": {
  30483. "type": "integer"
  30484. }
  30485. },
  30486. "required": ["aggregateID", "seq", "version"],
  30487. "additionalProperties": false
  30488. },
  30489. "location": {
  30490. "$ref": "#/components/schemas/LocationRef"
  30491. },
  30492. "type": {
  30493. "type": "string",
  30494. "enum": ["installation.update-available"]
  30495. },
  30496. "data": {
  30497. "type": "object",
  30498. "properties": {
  30499. "version": {
  30500. "type": "string"
  30501. }
  30502. },
  30503. "required": ["version"],
  30504. "additionalProperties": false
  30505. }
  30506. },
  30507. "required": ["id", "type", "data"],
  30508. "additionalProperties": false
  30509. },
  30510. "V2EventFileEdited": {
  30511. "type": "object",
  30512. "properties": {
  30513. "id": {
  30514. "type": "string",
  30515. "pattern": "^evt_"
  30516. },
  30517. "metadata": {
  30518. "type": "object"
  30519. },
  30520. "durable": {
  30521. "type": "object",
  30522. "properties": {
  30523. "aggregateID": {
  30524. "type": "string"
  30525. },
  30526. "seq": {
  30527. "type": "integer"
  30528. },
  30529. "version": {
  30530. "type": "integer"
  30531. }
  30532. },
  30533. "required": ["aggregateID", "seq", "version"],
  30534. "additionalProperties": false
  30535. },
  30536. "location": {
  30537. "$ref": "#/components/schemas/LocationRef"
  30538. },
  30539. "type": {
  30540. "type": "string",
  30541. "enum": ["file.edited"]
  30542. },
  30543. "data": {
  30544. "type": "object",
  30545. "properties": {
  30546. "file": {
  30547. "type": "string"
  30548. }
  30549. },
  30550. "required": ["file"],
  30551. "additionalProperties": false
  30552. }
  30553. },
  30554. "required": ["id", "type", "data"],
  30555. "additionalProperties": false
  30556. },
  30557. "V2EventReferenceUpdated": {
  30558. "type": "object",
  30559. "properties": {
  30560. "id": {
  30561. "type": "string",
  30562. "pattern": "^evt_"
  30563. },
  30564. "metadata": {
  30565. "type": "object"
  30566. },
  30567. "durable": {
  30568. "type": "object",
  30569. "properties": {
  30570. "aggregateID": {
  30571. "type": "string"
  30572. },
  30573. "seq": {
  30574. "type": "integer"
  30575. },
  30576. "version": {
  30577. "type": "integer"
  30578. }
  30579. },
  30580. "required": ["aggregateID", "seq", "version"],
  30581. "additionalProperties": false
  30582. },
  30583. "location": {
  30584. "$ref": "#/components/schemas/LocationRef"
  30585. },
  30586. "type": {
  30587. "type": "string",
  30588. "enum": ["reference.updated"]
  30589. },
  30590. "data": {
  30591. "type": "object",
  30592. "properties": {}
  30593. }
  30594. },
  30595. "required": ["id", "type", "data"],
  30596. "additionalProperties": false
  30597. },
  30598. "V2EventPermissionV2Asked": {
  30599. "type": "object",
  30600. "properties": {
  30601. "id": {
  30602. "type": "string",
  30603. "pattern": "^evt_"
  30604. },
  30605. "metadata": {
  30606. "type": "object"
  30607. },
  30608. "durable": {
  30609. "type": "object",
  30610. "properties": {
  30611. "aggregateID": {
  30612. "type": "string"
  30613. },
  30614. "seq": {
  30615. "type": "integer"
  30616. },
  30617. "version": {
  30618. "type": "integer"
  30619. }
  30620. },
  30621. "required": ["aggregateID", "seq", "version"],
  30622. "additionalProperties": false
  30623. },
  30624. "location": {
  30625. "$ref": "#/components/schemas/LocationRef"
  30626. },
  30627. "type": {
  30628. "type": "string",
  30629. "enum": ["permission.v2.asked"]
  30630. },
  30631. "data": {
  30632. "type": "object",
  30633. "properties": {
  30634. "id": {
  30635. "type": "string",
  30636. "pattern": "^per"
  30637. },
  30638. "sessionID": {
  30639. "type": "string",
  30640. "pattern": "^ses"
  30641. },
  30642. "action": {
  30643. "type": "string"
  30644. },
  30645. "resources": {
  30646. "type": "array",
  30647. "items": {
  30648. "type": "string"
  30649. }
  30650. },
  30651. "save": {
  30652. "type": "array",
  30653. "items": {
  30654. "type": "string"
  30655. }
  30656. },
  30657. "metadata": {
  30658. "type": "object"
  30659. },
  30660. "source": {
  30661. "$ref": "#/components/schemas/PermissionV2Source"
  30662. }
  30663. },
  30664. "required": ["id", "sessionID", "action", "resources"],
  30665. "additionalProperties": false
  30666. }
  30667. },
  30668. "required": ["id", "type", "data"],
  30669. "additionalProperties": false
  30670. },
  30671. "V2EventPermissionV2Replied": {
  30672. "type": "object",
  30673. "properties": {
  30674. "id": {
  30675. "type": "string",
  30676. "pattern": "^evt_"
  30677. },
  30678. "metadata": {
  30679. "type": "object"
  30680. },
  30681. "durable": {
  30682. "type": "object",
  30683. "properties": {
  30684. "aggregateID": {
  30685. "type": "string"
  30686. },
  30687. "seq": {
  30688. "type": "integer"
  30689. },
  30690. "version": {
  30691. "type": "integer"
  30692. }
  30693. },
  30694. "required": ["aggregateID", "seq", "version"],
  30695. "additionalProperties": false
  30696. },
  30697. "location": {
  30698. "$ref": "#/components/schemas/LocationRef"
  30699. },
  30700. "type": {
  30701. "type": "string",
  30702. "enum": ["permission.v2.replied"]
  30703. },
  30704. "data": {
  30705. "type": "object",
  30706. "properties": {
  30707. "sessionID": {
  30708. "type": "string",
  30709. "pattern": "^ses"
  30710. },
  30711. "requestID": {
  30712. "type": "string",
  30713. "pattern": "^per"
  30714. },
  30715. "reply": {
  30716. "$ref": "#/components/schemas/PermissionV2Reply"
  30717. }
  30718. },
  30719. "required": ["sessionID", "requestID", "reply"],
  30720. "additionalProperties": false
  30721. }
  30722. },
  30723. "required": ["id", "type", "data"],
  30724. "additionalProperties": false
  30725. },
  30726. "V2EventPluginAdded": {
  30727. "type": "object",
  30728. "properties": {
  30729. "id": {
  30730. "type": "string",
  30731. "pattern": "^evt_"
  30732. },
  30733. "metadata": {
  30734. "type": "object"
  30735. },
  30736. "durable": {
  30737. "type": "object",
  30738. "properties": {
  30739. "aggregateID": {
  30740. "type": "string"
  30741. },
  30742. "seq": {
  30743. "type": "integer"
  30744. },
  30745. "version": {
  30746. "type": "integer"
  30747. }
  30748. },
  30749. "required": ["aggregateID", "seq", "version"],
  30750. "additionalProperties": false
  30751. },
  30752. "location": {
  30753. "$ref": "#/components/schemas/LocationRef"
  30754. },
  30755. "type": {
  30756. "type": "string",
  30757. "enum": ["plugin.added"]
  30758. },
  30759. "data": {
  30760. "type": "object",
  30761. "properties": {
  30762. "id": {
  30763. "type": "string"
  30764. }
  30765. },
  30766. "required": ["id"],
  30767. "additionalProperties": false
  30768. }
  30769. },
  30770. "required": ["id", "type", "data"],
  30771. "additionalProperties": false
  30772. },
  30773. "V2EventProjectDirectoriesUpdated": {
  30774. "type": "object",
  30775. "properties": {
  30776. "id": {
  30777. "type": "string",
  30778. "pattern": "^evt_"
  30779. },
  30780. "metadata": {
  30781. "type": "object"
  30782. },
  30783. "durable": {
  30784. "type": "object",
  30785. "properties": {
  30786. "aggregateID": {
  30787. "type": "string"
  30788. },
  30789. "seq": {
  30790. "type": "integer"
  30791. },
  30792. "version": {
  30793. "type": "integer"
  30794. }
  30795. },
  30796. "required": ["aggregateID", "seq", "version"],
  30797. "additionalProperties": false
  30798. },
  30799. "location": {
  30800. "$ref": "#/components/schemas/LocationRef"
  30801. },
  30802. "type": {
  30803. "type": "string",
  30804. "enum": ["project.directories.updated"]
  30805. },
  30806. "data": {
  30807. "type": "object",
  30808. "properties": {
  30809. "projectID": {
  30810. "type": "string"
  30811. }
  30812. },
  30813. "required": ["projectID"],
  30814. "additionalProperties": false
  30815. }
  30816. },
  30817. "required": ["id", "type", "data"],
  30818. "additionalProperties": false
  30819. },
  30820. "V2EventFileWatcherUpdated": {
  30821. "type": "object",
  30822. "properties": {
  30823. "id": {
  30824. "type": "string",
  30825. "pattern": "^evt_"
  30826. },
  30827. "metadata": {
  30828. "type": "object"
  30829. },
  30830. "durable": {
  30831. "type": "object",
  30832. "properties": {
  30833. "aggregateID": {
  30834. "type": "string"
  30835. },
  30836. "seq": {
  30837. "type": "integer"
  30838. },
  30839. "version": {
  30840. "type": "integer"
  30841. }
  30842. },
  30843. "required": ["aggregateID", "seq", "version"],
  30844. "additionalProperties": false
  30845. },
  30846. "location": {
  30847. "$ref": "#/components/schemas/LocationRef"
  30848. },
  30849. "type": {
  30850. "type": "string",
  30851. "enum": ["file.watcher.updated"]
  30852. },
  30853. "data": {
  30854. "type": "object",
  30855. "properties": {
  30856. "file": {
  30857. "type": "string"
  30858. },
  30859. "event": {
  30860. "type": "string",
  30861. "enum": ["add", "change", "unlink"]
  30862. }
  30863. },
  30864. "required": ["file", "event"],
  30865. "additionalProperties": false
  30866. }
  30867. },
  30868. "required": ["id", "type", "data"],
  30869. "additionalProperties": false
  30870. },
  30871. "V2EventPtyCreated": {
  30872. "type": "object",
  30873. "properties": {
  30874. "id": {
  30875. "type": "string",
  30876. "pattern": "^evt_"
  30877. },
  30878. "metadata": {
  30879. "type": "object"
  30880. },
  30881. "durable": {
  30882. "type": "object",
  30883. "properties": {
  30884. "aggregateID": {
  30885. "type": "string"
  30886. },
  30887. "seq": {
  30888. "type": "integer"
  30889. },
  30890. "version": {
  30891. "type": "integer"
  30892. }
  30893. },
  30894. "required": ["aggregateID", "seq", "version"],
  30895. "additionalProperties": false
  30896. },
  30897. "location": {
  30898. "$ref": "#/components/schemas/LocationRef"
  30899. },
  30900. "type": {
  30901. "type": "string",
  30902. "enum": ["pty.created"]
  30903. },
  30904. "data": {
  30905. "type": "object",
  30906. "properties": {
  30907. "info": {
  30908. "$ref": "#/components/schemas/Pty"
  30909. }
  30910. },
  30911. "required": ["info"],
  30912. "additionalProperties": false
  30913. }
  30914. },
  30915. "required": ["id", "type", "data"],
  30916. "additionalProperties": false
  30917. },
  30918. "V2EventPtyUpdated": {
  30919. "type": "object",
  30920. "properties": {
  30921. "id": {
  30922. "type": "string",
  30923. "pattern": "^evt_"
  30924. },
  30925. "metadata": {
  30926. "type": "object"
  30927. },
  30928. "durable": {
  30929. "type": "object",
  30930. "properties": {
  30931. "aggregateID": {
  30932. "type": "string"
  30933. },
  30934. "seq": {
  30935. "type": "integer"
  30936. },
  30937. "version": {
  30938. "type": "integer"
  30939. }
  30940. },
  30941. "required": ["aggregateID", "seq", "version"],
  30942. "additionalProperties": false
  30943. },
  30944. "location": {
  30945. "$ref": "#/components/schemas/LocationRef"
  30946. },
  30947. "type": {
  30948. "type": "string",
  30949. "enum": ["pty.updated"]
  30950. },
  30951. "data": {
  30952. "type": "object",
  30953. "properties": {
  30954. "info": {
  30955. "$ref": "#/components/schemas/Pty"
  30956. }
  30957. },
  30958. "required": ["info"],
  30959. "additionalProperties": false
  30960. }
  30961. },
  30962. "required": ["id", "type", "data"],
  30963. "additionalProperties": false
  30964. },
  30965. "V2EventPtyExited": {
  30966. "type": "object",
  30967. "properties": {
  30968. "id": {
  30969. "type": "string",
  30970. "pattern": "^evt_"
  30971. },
  30972. "metadata": {
  30973. "type": "object"
  30974. },
  30975. "durable": {
  30976. "type": "object",
  30977. "properties": {
  30978. "aggregateID": {
  30979. "type": "string"
  30980. },
  30981. "seq": {
  30982. "type": "integer"
  30983. },
  30984. "version": {
  30985. "type": "integer"
  30986. }
  30987. },
  30988. "required": ["aggregateID", "seq", "version"],
  30989. "additionalProperties": false
  30990. },
  30991. "location": {
  30992. "$ref": "#/components/schemas/LocationRef"
  30993. },
  30994. "type": {
  30995. "type": "string",
  30996. "enum": ["pty.exited"]
  30997. },
  30998. "data": {
  30999. "type": "object",
  31000. "properties": {
  31001. "id": {
  31002. "type": "string",
  31003. "pattern": "^pty"
  31004. },
  31005. "exitCode": {
  31006. "type": "integer",
  31007. "minimum": 0
  31008. }
  31009. },
  31010. "required": ["id", "exitCode"],
  31011. "additionalProperties": false
  31012. }
  31013. },
  31014. "required": ["id", "type", "data"],
  31015. "additionalProperties": false
  31016. },
  31017. "V2EventPtyDeleted": {
  31018. "type": "object",
  31019. "properties": {
  31020. "id": {
  31021. "type": "string",
  31022. "pattern": "^evt_"
  31023. },
  31024. "metadata": {
  31025. "type": "object"
  31026. },
  31027. "durable": {
  31028. "type": "object",
  31029. "properties": {
  31030. "aggregateID": {
  31031. "type": "string"
  31032. },
  31033. "seq": {
  31034. "type": "integer"
  31035. },
  31036. "version": {
  31037. "type": "integer"
  31038. }
  31039. },
  31040. "required": ["aggregateID", "seq", "version"],
  31041. "additionalProperties": false
  31042. },
  31043. "location": {
  31044. "$ref": "#/components/schemas/LocationRef"
  31045. },
  31046. "type": {
  31047. "type": "string",
  31048. "enum": ["pty.deleted"]
  31049. },
  31050. "data": {
  31051. "type": "object",
  31052. "properties": {
  31053. "id": {
  31054. "type": "string",
  31055. "pattern": "^pty"
  31056. }
  31057. },
  31058. "required": ["id"],
  31059. "additionalProperties": false
  31060. }
  31061. },
  31062. "required": ["id", "type", "data"],
  31063. "additionalProperties": false
  31064. },
  31065. "V2EventQuestionV2Asked": {
  31066. "type": "object",
  31067. "properties": {
  31068. "id": {
  31069. "type": "string",
  31070. "pattern": "^evt_"
  31071. },
  31072. "metadata": {
  31073. "type": "object"
  31074. },
  31075. "durable": {
  31076. "type": "object",
  31077. "properties": {
  31078. "aggregateID": {
  31079. "type": "string"
  31080. },
  31081. "seq": {
  31082. "type": "integer"
  31083. },
  31084. "version": {
  31085. "type": "integer"
  31086. }
  31087. },
  31088. "required": ["aggregateID", "seq", "version"],
  31089. "additionalProperties": false
  31090. },
  31091. "location": {
  31092. "$ref": "#/components/schemas/LocationRef"
  31093. },
  31094. "type": {
  31095. "type": "string",
  31096. "enum": ["question.v2.asked"]
  31097. },
  31098. "data": {
  31099. "type": "object",
  31100. "properties": {
  31101. "id": {
  31102. "type": "string",
  31103. "pattern": "^que"
  31104. },
  31105. "sessionID": {
  31106. "type": "string",
  31107. "pattern": "^ses"
  31108. },
  31109. "questions": {
  31110. "type": "array",
  31111. "items": {
  31112. "$ref": "#/components/schemas/QuestionV2Info"
  31113. },
  31114. "description": "Questions to ask"
  31115. },
  31116. "tool": {
  31117. "$ref": "#/components/schemas/QuestionV2Tool"
  31118. }
  31119. },
  31120. "required": ["id", "sessionID", "questions"],
  31121. "additionalProperties": false
  31122. }
  31123. },
  31124. "required": ["id", "type", "data"],
  31125. "additionalProperties": false
  31126. },
  31127. "V2EventQuestionV2Replied": {
  31128. "type": "object",
  31129. "properties": {
  31130. "id": {
  31131. "type": "string",
  31132. "pattern": "^evt_"
  31133. },
  31134. "metadata": {
  31135. "type": "object"
  31136. },
  31137. "durable": {
  31138. "type": "object",
  31139. "properties": {
  31140. "aggregateID": {
  31141. "type": "string"
  31142. },
  31143. "seq": {
  31144. "type": "integer"
  31145. },
  31146. "version": {
  31147. "type": "integer"
  31148. }
  31149. },
  31150. "required": ["aggregateID", "seq", "version"],
  31151. "additionalProperties": false
  31152. },
  31153. "location": {
  31154. "$ref": "#/components/schemas/LocationRef"
  31155. },
  31156. "type": {
  31157. "type": "string",
  31158. "enum": ["question.v2.replied"]
  31159. },
  31160. "data": {
  31161. "type": "object",
  31162. "properties": {
  31163. "sessionID": {
  31164. "type": "string",
  31165. "pattern": "^ses"
  31166. },
  31167. "requestID": {
  31168. "type": "string",
  31169. "pattern": "^que"
  31170. },
  31171. "answers": {
  31172. "type": "array",
  31173. "items": {
  31174. "$ref": "#/components/schemas/QuestionV2Answer"
  31175. }
  31176. }
  31177. },
  31178. "required": ["sessionID", "requestID", "answers"],
  31179. "additionalProperties": false
  31180. }
  31181. },
  31182. "required": ["id", "type", "data"],
  31183. "additionalProperties": false
  31184. },
  31185. "V2EventQuestionV2Rejected": {
  31186. "type": "object",
  31187. "properties": {
  31188. "id": {
  31189. "type": "string",
  31190. "pattern": "^evt_"
  31191. },
  31192. "metadata": {
  31193. "type": "object"
  31194. },
  31195. "durable": {
  31196. "type": "object",
  31197. "properties": {
  31198. "aggregateID": {
  31199. "type": "string"
  31200. },
  31201. "seq": {
  31202. "type": "integer"
  31203. },
  31204. "version": {
  31205. "type": "integer"
  31206. }
  31207. },
  31208. "required": ["aggregateID", "seq", "version"],
  31209. "additionalProperties": false
  31210. },
  31211. "location": {
  31212. "$ref": "#/components/schemas/LocationRef"
  31213. },
  31214. "type": {
  31215. "type": "string",
  31216. "enum": ["question.v2.rejected"]
  31217. },
  31218. "data": {
  31219. "type": "object",
  31220. "properties": {
  31221. "sessionID": {
  31222. "type": "string",
  31223. "pattern": "^ses"
  31224. },
  31225. "requestID": {
  31226. "type": "string",
  31227. "pattern": "^que"
  31228. }
  31229. },
  31230. "required": ["sessionID", "requestID"],
  31231. "additionalProperties": false
  31232. }
  31233. },
  31234. "required": ["id", "type", "data"],
  31235. "additionalProperties": false
  31236. },
  31237. "V2EventTodoUpdated": {
  31238. "type": "object",
  31239. "properties": {
  31240. "id": {
  31241. "type": "string",
  31242. "pattern": "^evt_"
  31243. },
  31244. "metadata": {
  31245. "type": "object"
  31246. },
  31247. "durable": {
  31248. "type": "object",
  31249. "properties": {
  31250. "aggregateID": {
  31251. "type": "string"
  31252. },
  31253. "seq": {
  31254. "type": "integer"
  31255. },
  31256. "version": {
  31257. "type": "integer"
  31258. }
  31259. },
  31260. "required": ["aggregateID", "seq", "version"],
  31261. "additionalProperties": false
  31262. },
  31263. "location": {
  31264. "$ref": "#/components/schemas/LocationRef"
  31265. },
  31266. "type": {
  31267. "type": "string",
  31268. "enum": ["todo.updated"]
  31269. },
  31270. "data": {
  31271. "type": "object",
  31272. "properties": {
  31273. "sessionID": {
  31274. "type": "string",
  31275. "pattern": "^ses"
  31276. },
  31277. "todos": {
  31278. "type": "array",
  31279. "items": {
  31280. "$ref": "#/components/schemas/Todo"
  31281. }
  31282. }
  31283. },
  31284. "required": ["sessionID", "todos"],
  31285. "additionalProperties": false
  31286. }
  31287. },
  31288. "required": ["id", "type", "data"],
  31289. "additionalProperties": false
  31290. },
  31291. "V2EventLspUpdated": {
  31292. "type": "object",
  31293. "properties": {
  31294. "id": {
  31295. "type": "string",
  31296. "pattern": "^evt_"
  31297. },
  31298. "metadata": {
  31299. "type": "object"
  31300. },
  31301. "durable": {
  31302. "type": "object",
  31303. "properties": {
  31304. "aggregateID": {
  31305. "type": "string"
  31306. },
  31307. "seq": {
  31308. "type": "integer"
  31309. },
  31310. "version": {
  31311. "type": "integer"
  31312. }
  31313. },
  31314. "required": ["aggregateID", "seq", "version"],
  31315. "additionalProperties": false
  31316. },
  31317. "location": {
  31318. "$ref": "#/components/schemas/LocationRef"
  31319. },
  31320. "type": {
  31321. "type": "string",
  31322. "enum": ["lsp.updated"]
  31323. },
  31324. "data": {
  31325. "type": "object",
  31326. "properties": {}
  31327. }
  31328. },
  31329. "required": ["id", "type", "data"],
  31330. "additionalProperties": false
  31331. },
  31332. "V2EventPermissionAsked": {
  31333. "type": "object",
  31334. "properties": {
  31335. "id": {
  31336. "type": "string",
  31337. "pattern": "^evt_"
  31338. },
  31339. "metadata": {
  31340. "type": "object"
  31341. },
  31342. "durable": {
  31343. "type": "object",
  31344. "properties": {
  31345. "aggregateID": {
  31346. "type": "string"
  31347. },
  31348. "seq": {
  31349. "type": "integer"
  31350. },
  31351. "version": {
  31352. "type": "integer"
  31353. }
  31354. },
  31355. "required": ["aggregateID", "seq", "version"],
  31356. "additionalProperties": false
  31357. },
  31358. "location": {
  31359. "$ref": "#/components/schemas/LocationRef"
  31360. },
  31361. "type": {
  31362. "type": "string",
  31363. "enum": ["permission.asked"]
  31364. },
  31365. "data": {
  31366. "type": "object",
  31367. "properties": {
  31368. "id": {
  31369. "type": "string",
  31370. "pattern": "^per"
  31371. },
  31372. "sessionID": {
  31373. "type": "string",
  31374. "pattern": "^ses"
  31375. },
  31376. "permission": {
  31377. "type": "string"
  31378. },
  31379. "patterns": {
  31380. "type": "array",
  31381. "items": {
  31382. "type": "string"
  31383. }
  31384. },
  31385. "metadata": {
  31386. "type": "object"
  31387. },
  31388. "always": {
  31389. "type": "array",
  31390. "items": {
  31391. "type": "string"
  31392. }
  31393. },
  31394. "tool": {
  31395. "type": "object",
  31396. "properties": {
  31397. "messageID": {
  31398. "type": "string"
  31399. },
  31400. "callID": {
  31401. "type": "string"
  31402. }
  31403. },
  31404. "required": ["messageID", "callID"],
  31405. "additionalProperties": false
  31406. }
  31407. },
  31408. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  31409. "additionalProperties": false
  31410. }
  31411. },
  31412. "required": ["id", "type", "data"],
  31413. "additionalProperties": false
  31414. },
  31415. "V2EventPermissionReplied": {
  31416. "type": "object",
  31417. "properties": {
  31418. "id": {
  31419. "type": "string",
  31420. "pattern": "^evt_"
  31421. },
  31422. "metadata": {
  31423. "type": "object"
  31424. },
  31425. "durable": {
  31426. "type": "object",
  31427. "properties": {
  31428. "aggregateID": {
  31429. "type": "string"
  31430. },
  31431. "seq": {
  31432. "type": "integer"
  31433. },
  31434. "version": {
  31435. "type": "integer"
  31436. }
  31437. },
  31438. "required": ["aggregateID", "seq", "version"],
  31439. "additionalProperties": false
  31440. },
  31441. "location": {
  31442. "$ref": "#/components/schemas/LocationRef"
  31443. },
  31444. "type": {
  31445. "type": "string",
  31446. "enum": ["permission.replied"]
  31447. },
  31448. "data": {
  31449. "type": "object",
  31450. "properties": {
  31451. "sessionID": {
  31452. "type": "string",
  31453. "pattern": "^ses"
  31454. },
  31455. "requestID": {
  31456. "type": "string",
  31457. "pattern": "^per"
  31458. },
  31459. "reply": {
  31460. "type": "string",
  31461. "enum": ["once", "always", "reject"]
  31462. }
  31463. },
  31464. "required": ["sessionID", "requestID", "reply"],
  31465. "additionalProperties": false
  31466. }
  31467. },
  31468. "required": ["id", "type", "data"],
  31469. "additionalProperties": false
  31470. },
  31471. "V2EventTuiPromptAppend": {
  31472. "type": "object",
  31473. "properties": {
  31474. "id": {
  31475. "type": "string",
  31476. "pattern": "^evt_"
  31477. },
  31478. "metadata": {
  31479. "type": "object"
  31480. },
  31481. "durable": {
  31482. "type": "object",
  31483. "properties": {
  31484. "aggregateID": {
  31485. "type": "string"
  31486. },
  31487. "seq": {
  31488. "type": "integer"
  31489. },
  31490. "version": {
  31491. "type": "integer"
  31492. }
  31493. },
  31494. "required": ["aggregateID", "seq", "version"],
  31495. "additionalProperties": false
  31496. },
  31497. "location": {
  31498. "$ref": "#/components/schemas/LocationRef"
  31499. },
  31500. "type": {
  31501. "type": "string",
  31502. "enum": ["tui.prompt.append"]
  31503. },
  31504. "data": {
  31505. "type": "object",
  31506. "properties": {
  31507. "text": {
  31508. "type": "string"
  31509. }
  31510. },
  31511. "required": ["text"],
  31512. "additionalProperties": false
  31513. }
  31514. },
  31515. "required": ["id", "type", "data"],
  31516. "additionalProperties": false
  31517. },
  31518. "V2EventTuiCommandExecute": {
  31519. "type": "object",
  31520. "properties": {
  31521. "id": {
  31522. "type": "string",
  31523. "pattern": "^evt_"
  31524. },
  31525. "metadata": {
  31526. "type": "object"
  31527. },
  31528. "durable": {
  31529. "type": "object",
  31530. "properties": {
  31531. "aggregateID": {
  31532. "type": "string"
  31533. },
  31534. "seq": {
  31535. "type": "integer"
  31536. },
  31537. "version": {
  31538. "type": "integer"
  31539. }
  31540. },
  31541. "required": ["aggregateID", "seq", "version"],
  31542. "additionalProperties": false
  31543. },
  31544. "location": {
  31545. "$ref": "#/components/schemas/LocationRef"
  31546. },
  31547. "type": {
  31548. "type": "string",
  31549. "enum": ["tui.command.execute"]
  31550. },
  31551. "data": {
  31552. "type": "object",
  31553. "properties": {
  31554. "command": {
  31555. "anyOf": [
  31556. {
  31557. "type": "string",
  31558. "enum": [
  31559. "session.list",
  31560. "session.new",
  31561. "session.share",
  31562. "session.interrupt",
  31563. "session.compact",
  31564. "session.page.up",
  31565. "session.page.down",
  31566. "session.line.up",
  31567. "session.line.down",
  31568. "session.half.page.up",
  31569. "session.half.page.down",
  31570. "session.first",
  31571. "session.last",
  31572. "prompt.clear",
  31573. "prompt.submit",
  31574. "agent.cycle"
  31575. ]
  31576. },
  31577. {
  31578. "type": "string"
  31579. }
  31580. ]
  31581. }
  31582. },
  31583. "required": ["command"],
  31584. "additionalProperties": false
  31585. }
  31586. },
  31587. "required": ["id", "type", "data"],
  31588. "additionalProperties": false
  31589. },
  31590. "V2EventTuiToastShow": {
  31591. "type": "object",
  31592. "properties": {
  31593. "id": {
  31594. "type": "string",
  31595. "pattern": "^evt_"
  31596. },
  31597. "metadata": {
  31598. "type": "object"
  31599. },
  31600. "durable": {
  31601. "type": "object",
  31602. "properties": {
  31603. "aggregateID": {
  31604. "type": "string"
  31605. },
  31606. "seq": {
  31607. "type": "integer"
  31608. },
  31609. "version": {
  31610. "type": "integer"
  31611. }
  31612. },
  31613. "required": ["aggregateID", "seq", "version"],
  31614. "additionalProperties": false
  31615. },
  31616. "location": {
  31617. "$ref": "#/components/schemas/LocationRef"
  31618. },
  31619. "type": {
  31620. "type": "string",
  31621. "enum": ["tui.toast.show"]
  31622. },
  31623. "data": {
  31624. "type": "object",
  31625. "properties": {
  31626. "title": {
  31627. "type": "string"
  31628. },
  31629. "message": {
  31630. "type": "string"
  31631. },
  31632. "variant": {
  31633. "type": "string",
  31634. "enum": ["info", "success", "warning", "error"]
  31635. },
  31636. "duration": {
  31637. "type": "integer",
  31638. "exclusiveMinimum": 0
  31639. }
  31640. },
  31641. "required": ["message", "variant"],
  31642. "additionalProperties": false
  31643. }
  31644. },
  31645. "required": ["id", "type", "data"],
  31646. "additionalProperties": false
  31647. },
  31648. "V2EventTuiSessionSelect": {
  31649. "type": "object",
  31650. "properties": {
  31651. "id": {
  31652. "type": "string",
  31653. "pattern": "^evt_"
  31654. },
  31655. "metadata": {
  31656. "type": "object"
  31657. },
  31658. "durable": {
  31659. "type": "object",
  31660. "properties": {
  31661. "aggregateID": {
  31662. "type": "string"
  31663. },
  31664. "seq": {
  31665. "type": "integer"
  31666. },
  31667. "version": {
  31668. "type": "integer"
  31669. }
  31670. },
  31671. "required": ["aggregateID", "seq", "version"],
  31672. "additionalProperties": false
  31673. },
  31674. "location": {
  31675. "$ref": "#/components/schemas/LocationRef"
  31676. },
  31677. "type": {
  31678. "type": "string",
  31679. "enum": ["tui.session.select"]
  31680. },
  31681. "data": {
  31682. "type": "object",
  31683. "properties": {
  31684. "sessionID": {
  31685. "type": "string",
  31686. "pattern": "^ses",
  31687. "description": "Session ID to navigate to"
  31688. }
  31689. },
  31690. "required": ["sessionID"],
  31691. "additionalProperties": false
  31692. }
  31693. },
  31694. "required": ["id", "type", "data"],
  31695. "additionalProperties": false
  31696. },
  31697. "V2EventMcpToolsChanged": {
  31698. "type": "object",
  31699. "properties": {
  31700. "id": {
  31701. "type": "string",
  31702. "pattern": "^evt_"
  31703. },
  31704. "metadata": {
  31705. "type": "object"
  31706. },
  31707. "durable": {
  31708. "type": "object",
  31709. "properties": {
  31710. "aggregateID": {
  31711. "type": "string"
  31712. },
  31713. "seq": {
  31714. "type": "integer"
  31715. },
  31716. "version": {
  31717. "type": "integer"
  31718. }
  31719. },
  31720. "required": ["aggregateID", "seq", "version"],
  31721. "additionalProperties": false
  31722. },
  31723. "location": {
  31724. "$ref": "#/components/schemas/LocationRef"
  31725. },
  31726. "type": {
  31727. "type": "string",
  31728. "enum": ["mcp.tools.changed"]
  31729. },
  31730. "data": {
  31731. "type": "object",
  31732. "properties": {
  31733. "server": {
  31734. "type": "string"
  31735. }
  31736. },
  31737. "required": ["server"],
  31738. "additionalProperties": false
  31739. }
  31740. },
  31741. "required": ["id", "type", "data"],
  31742. "additionalProperties": false
  31743. },
  31744. "V2EventMcpBrowserOpenFailed": {
  31745. "type": "object",
  31746. "properties": {
  31747. "id": {
  31748. "type": "string",
  31749. "pattern": "^evt_"
  31750. },
  31751. "metadata": {
  31752. "type": "object"
  31753. },
  31754. "durable": {
  31755. "type": "object",
  31756. "properties": {
  31757. "aggregateID": {
  31758. "type": "string"
  31759. },
  31760. "seq": {
  31761. "type": "integer"
  31762. },
  31763. "version": {
  31764. "type": "integer"
  31765. }
  31766. },
  31767. "required": ["aggregateID", "seq", "version"],
  31768. "additionalProperties": false
  31769. },
  31770. "location": {
  31771. "$ref": "#/components/schemas/LocationRef"
  31772. },
  31773. "type": {
  31774. "type": "string",
  31775. "enum": ["mcp.browser.open.failed"]
  31776. },
  31777. "data": {
  31778. "type": "object",
  31779. "properties": {
  31780. "mcpName": {
  31781. "type": "string"
  31782. },
  31783. "url": {
  31784. "type": "string"
  31785. }
  31786. },
  31787. "required": ["mcpName", "url"],
  31788. "additionalProperties": false
  31789. }
  31790. },
  31791. "required": ["id", "type", "data"],
  31792. "additionalProperties": false
  31793. },
  31794. "V2EventCommandExecuted": {
  31795. "type": "object",
  31796. "properties": {
  31797. "id": {
  31798. "type": "string",
  31799. "pattern": "^evt_"
  31800. },
  31801. "metadata": {
  31802. "type": "object"
  31803. },
  31804. "durable": {
  31805. "type": "object",
  31806. "properties": {
  31807. "aggregateID": {
  31808. "type": "string"
  31809. },
  31810. "seq": {
  31811. "type": "integer"
  31812. },
  31813. "version": {
  31814. "type": "integer"
  31815. }
  31816. },
  31817. "required": ["aggregateID", "seq", "version"],
  31818. "additionalProperties": false
  31819. },
  31820. "location": {
  31821. "$ref": "#/components/schemas/LocationRef"
  31822. },
  31823. "type": {
  31824. "type": "string",
  31825. "enum": ["command.executed"]
  31826. },
  31827. "data": {
  31828. "type": "object",
  31829. "properties": {
  31830. "name": {
  31831. "type": "string"
  31832. },
  31833. "sessionID": {
  31834. "type": "string",
  31835. "pattern": "^ses"
  31836. },
  31837. "arguments": {
  31838. "type": "string"
  31839. },
  31840. "messageID": {
  31841. "type": "string",
  31842. "pattern": "^msg"
  31843. }
  31844. },
  31845. "required": ["name", "sessionID", "arguments", "messageID"],
  31846. "additionalProperties": false
  31847. }
  31848. },
  31849. "required": ["id", "type", "data"],
  31850. "additionalProperties": false
  31851. },
  31852. "V2EventProjectUpdated": {
  31853. "type": "object",
  31854. "properties": {
  31855. "id": {
  31856. "type": "string",
  31857. "pattern": "^evt_"
  31858. },
  31859. "metadata": {
  31860. "type": "object"
  31861. },
  31862. "durable": {
  31863. "type": "object",
  31864. "properties": {
  31865. "aggregateID": {
  31866. "type": "string"
  31867. },
  31868. "seq": {
  31869. "type": "integer"
  31870. },
  31871. "version": {
  31872. "type": "integer"
  31873. }
  31874. },
  31875. "required": ["aggregateID", "seq", "version"],
  31876. "additionalProperties": false
  31877. },
  31878. "location": {
  31879. "$ref": "#/components/schemas/LocationRef"
  31880. },
  31881. "type": {
  31882. "type": "string",
  31883. "enum": ["project.updated"]
  31884. },
  31885. "data": {
  31886. "type": "object",
  31887. "properties": {
  31888. "id": {
  31889. "type": "string"
  31890. },
  31891. "worktree": {
  31892. "type": "string"
  31893. },
  31894. "vcs": {
  31895. "type": "string",
  31896. "enum": ["git"]
  31897. },
  31898. "name": {
  31899. "type": "string"
  31900. },
  31901. "icon": {
  31902. "type": "object",
  31903. "properties": {
  31904. "url": {
  31905. "type": "string"
  31906. },
  31907. "override": {
  31908. "type": "string"
  31909. },
  31910. "color": {
  31911. "type": "string"
  31912. }
  31913. },
  31914. "additionalProperties": false
  31915. },
  31916. "commands": {
  31917. "type": "object",
  31918. "properties": {
  31919. "start": {
  31920. "type": "string",
  31921. "description": "Startup script to run when creating a new workspace (worktree)"
  31922. }
  31923. },
  31924. "additionalProperties": false
  31925. },
  31926. "time": {
  31927. "type": "object",
  31928. "properties": {
  31929. "created": {
  31930. "type": "integer",
  31931. "minimum": 0
  31932. },
  31933. "updated": {
  31934. "type": "integer",
  31935. "minimum": 0
  31936. },
  31937. "initialized": {
  31938. "type": "integer",
  31939. "minimum": 0
  31940. }
  31941. },
  31942. "required": ["created", "updated"],
  31943. "additionalProperties": false
  31944. },
  31945. "sandboxes": {
  31946. "type": "array",
  31947. "items": {
  31948. "type": "string"
  31949. }
  31950. }
  31951. },
  31952. "required": ["id", "worktree", "time", "sandboxes"],
  31953. "additionalProperties": false
  31954. }
  31955. },
  31956. "required": ["id", "type", "data"],
  31957. "additionalProperties": false
  31958. },
  31959. "V2EventSessionStatus": {
  31960. "type": "object",
  31961. "properties": {
  31962. "id": {
  31963. "type": "string",
  31964. "pattern": "^evt_"
  31965. },
  31966. "metadata": {
  31967. "type": "object"
  31968. },
  31969. "durable": {
  31970. "type": "object",
  31971. "properties": {
  31972. "aggregateID": {
  31973. "type": "string"
  31974. },
  31975. "seq": {
  31976. "type": "integer"
  31977. },
  31978. "version": {
  31979. "type": "integer"
  31980. }
  31981. },
  31982. "required": ["aggregateID", "seq", "version"],
  31983. "additionalProperties": false
  31984. },
  31985. "location": {
  31986. "$ref": "#/components/schemas/LocationRef"
  31987. },
  31988. "type": {
  31989. "type": "string",
  31990. "enum": ["session.status"]
  31991. },
  31992. "data": {
  31993. "type": "object",
  31994. "properties": {
  31995. "sessionID": {
  31996. "type": "string",
  31997. "pattern": "^ses"
  31998. },
  31999. "status": {
  32000. "$ref": "#/components/schemas/SessionStatus"
  32001. }
  32002. },
  32003. "required": ["sessionID", "status"],
  32004. "additionalProperties": false
  32005. }
  32006. },
  32007. "required": ["id", "type", "data"],
  32008. "additionalProperties": false
  32009. },
  32010. "V2EventSessionIdle": {
  32011. "type": "object",
  32012. "properties": {
  32013. "id": {
  32014. "type": "string",
  32015. "pattern": "^evt_"
  32016. },
  32017. "metadata": {
  32018. "type": "object"
  32019. },
  32020. "durable": {
  32021. "type": "object",
  32022. "properties": {
  32023. "aggregateID": {
  32024. "type": "string"
  32025. },
  32026. "seq": {
  32027. "type": "integer"
  32028. },
  32029. "version": {
  32030. "type": "integer"
  32031. }
  32032. },
  32033. "required": ["aggregateID", "seq", "version"],
  32034. "additionalProperties": false
  32035. },
  32036. "location": {
  32037. "$ref": "#/components/schemas/LocationRef"
  32038. },
  32039. "type": {
  32040. "type": "string",
  32041. "enum": ["session.idle"]
  32042. },
  32043. "data": {
  32044. "type": "object",
  32045. "properties": {
  32046. "sessionID": {
  32047. "type": "string",
  32048. "pattern": "^ses"
  32049. }
  32050. },
  32051. "required": ["sessionID"],
  32052. "additionalProperties": false
  32053. }
  32054. },
  32055. "required": ["id", "type", "data"],
  32056. "additionalProperties": false
  32057. },
  32058. "V2EventQuestionAsked": {
  32059. "type": "object",
  32060. "properties": {
  32061. "id": {
  32062. "type": "string",
  32063. "pattern": "^evt_"
  32064. },
  32065. "metadata": {
  32066. "type": "object"
  32067. },
  32068. "durable": {
  32069. "type": "object",
  32070. "properties": {
  32071. "aggregateID": {
  32072. "type": "string"
  32073. },
  32074. "seq": {
  32075. "type": "integer"
  32076. },
  32077. "version": {
  32078. "type": "integer"
  32079. }
  32080. },
  32081. "required": ["aggregateID", "seq", "version"],
  32082. "additionalProperties": false
  32083. },
  32084. "location": {
  32085. "$ref": "#/components/schemas/LocationRef"
  32086. },
  32087. "type": {
  32088. "type": "string",
  32089. "enum": ["question.asked"]
  32090. },
  32091. "data": {
  32092. "type": "object",
  32093. "properties": {
  32094. "id": {
  32095. "type": "string",
  32096. "pattern": "^que"
  32097. },
  32098. "sessionID": {
  32099. "type": "string",
  32100. "pattern": "^ses"
  32101. },
  32102. "questions": {
  32103. "type": "array",
  32104. "items": {
  32105. "$ref": "#/components/schemas/QuestionInfo"
  32106. },
  32107. "description": "Questions to ask"
  32108. },
  32109. "tool": {
  32110. "$ref": "#/components/schemas/QuestionTool"
  32111. }
  32112. },
  32113. "required": ["id", "sessionID", "questions"],
  32114. "additionalProperties": false
  32115. }
  32116. },
  32117. "required": ["id", "type", "data"],
  32118. "additionalProperties": false
  32119. },
  32120. "V2EventQuestionReplied": {
  32121. "type": "object",
  32122. "properties": {
  32123. "id": {
  32124. "type": "string",
  32125. "pattern": "^evt_"
  32126. },
  32127. "metadata": {
  32128. "type": "object"
  32129. },
  32130. "durable": {
  32131. "type": "object",
  32132. "properties": {
  32133. "aggregateID": {
  32134. "type": "string"
  32135. },
  32136. "seq": {
  32137. "type": "integer"
  32138. },
  32139. "version": {
  32140. "type": "integer"
  32141. }
  32142. },
  32143. "required": ["aggregateID", "seq", "version"],
  32144. "additionalProperties": false
  32145. },
  32146. "location": {
  32147. "$ref": "#/components/schemas/LocationRef"
  32148. },
  32149. "type": {
  32150. "type": "string",
  32151. "enum": ["question.replied"]
  32152. },
  32153. "data": {
  32154. "type": "object",
  32155. "properties": {
  32156. "sessionID": {
  32157. "type": "string",
  32158. "pattern": "^ses"
  32159. },
  32160. "requestID": {
  32161. "type": "string",
  32162. "pattern": "^que"
  32163. },
  32164. "answers": {
  32165. "type": "array",
  32166. "items": {
  32167. "$ref": "#/components/schemas/QuestionAnswer"
  32168. }
  32169. }
  32170. },
  32171. "required": ["sessionID", "requestID", "answers"],
  32172. "additionalProperties": false
  32173. }
  32174. },
  32175. "required": ["id", "type", "data"],
  32176. "additionalProperties": false
  32177. },
  32178. "V2EventQuestionRejected": {
  32179. "type": "object",
  32180. "properties": {
  32181. "id": {
  32182. "type": "string",
  32183. "pattern": "^evt_"
  32184. },
  32185. "metadata": {
  32186. "type": "object"
  32187. },
  32188. "durable": {
  32189. "type": "object",
  32190. "properties": {
  32191. "aggregateID": {
  32192. "type": "string"
  32193. },
  32194. "seq": {
  32195. "type": "integer"
  32196. },
  32197. "version": {
  32198. "type": "integer"
  32199. }
  32200. },
  32201. "required": ["aggregateID", "seq", "version"],
  32202. "additionalProperties": false
  32203. },
  32204. "location": {
  32205. "$ref": "#/components/schemas/LocationRef"
  32206. },
  32207. "type": {
  32208. "type": "string",
  32209. "enum": ["question.rejected"]
  32210. },
  32211. "data": {
  32212. "type": "object",
  32213. "properties": {
  32214. "sessionID": {
  32215. "type": "string",
  32216. "pattern": "^ses"
  32217. },
  32218. "requestID": {
  32219. "type": "string",
  32220. "pattern": "^que"
  32221. }
  32222. },
  32223. "required": ["sessionID", "requestID"],
  32224. "additionalProperties": false
  32225. }
  32226. },
  32227. "required": ["id", "type", "data"],
  32228. "additionalProperties": false
  32229. },
  32230. "V2EventSessionCompacted": {
  32231. "type": "object",
  32232. "properties": {
  32233. "id": {
  32234. "type": "string",
  32235. "pattern": "^evt_"
  32236. },
  32237. "metadata": {
  32238. "type": "object"
  32239. },
  32240. "durable": {
  32241. "type": "object",
  32242. "properties": {
  32243. "aggregateID": {
  32244. "type": "string"
  32245. },
  32246. "seq": {
  32247. "type": "integer"
  32248. },
  32249. "version": {
  32250. "type": "integer"
  32251. }
  32252. },
  32253. "required": ["aggregateID", "seq", "version"],
  32254. "additionalProperties": false
  32255. },
  32256. "location": {
  32257. "$ref": "#/components/schemas/LocationRef"
  32258. },
  32259. "type": {
  32260. "type": "string",
  32261. "enum": ["session.compacted"]
  32262. },
  32263. "data": {
  32264. "type": "object",
  32265. "properties": {
  32266. "sessionID": {
  32267. "type": "string",
  32268. "pattern": "^ses"
  32269. }
  32270. },
  32271. "required": ["sessionID"],
  32272. "additionalProperties": false
  32273. }
  32274. },
  32275. "required": ["id", "type", "data"],
  32276. "additionalProperties": false
  32277. },
  32278. "V2EventVcsBranchUpdated": {
  32279. "type": "object",
  32280. "properties": {
  32281. "id": {
  32282. "type": "string",
  32283. "pattern": "^evt_"
  32284. },
  32285. "metadata": {
  32286. "type": "object"
  32287. },
  32288. "durable": {
  32289. "type": "object",
  32290. "properties": {
  32291. "aggregateID": {
  32292. "type": "string"
  32293. },
  32294. "seq": {
  32295. "type": "integer"
  32296. },
  32297. "version": {
  32298. "type": "integer"
  32299. }
  32300. },
  32301. "required": ["aggregateID", "seq", "version"],
  32302. "additionalProperties": false
  32303. },
  32304. "location": {
  32305. "$ref": "#/components/schemas/LocationRef"
  32306. },
  32307. "type": {
  32308. "type": "string",
  32309. "enum": ["vcs.branch.updated"]
  32310. },
  32311. "data": {
  32312. "type": "object",
  32313. "properties": {
  32314. "branch": {
  32315. "type": "string"
  32316. }
  32317. },
  32318. "additionalProperties": false
  32319. }
  32320. },
  32321. "required": ["id", "type", "data"],
  32322. "additionalProperties": false
  32323. },
  32324. "V2EventWorkspaceReady": {
  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": ["workspace.ready"]
  32356. },
  32357. "data": {
  32358. "type": "object",
  32359. "properties": {
  32360. "name": {
  32361. "type": "string"
  32362. }
  32363. },
  32364. "required": ["name"],
  32365. "additionalProperties": false
  32366. }
  32367. },
  32368. "required": ["id", "type", "data"],
  32369. "additionalProperties": false
  32370. },
  32371. "V2EventWorkspaceFailed": {
  32372. "type": "object",
  32373. "properties": {
  32374. "id": {
  32375. "type": "string",
  32376. "pattern": "^evt_"
  32377. },
  32378. "metadata": {
  32379. "type": "object"
  32380. },
  32381. "durable": {
  32382. "type": "object",
  32383. "properties": {
  32384. "aggregateID": {
  32385. "type": "string"
  32386. },
  32387. "seq": {
  32388. "type": "integer"
  32389. },
  32390. "version": {
  32391. "type": "integer"
  32392. }
  32393. },
  32394. "required": ["aggregateID", "seq", "version"],
  32395. "additionalProperties": false
  32396. },
  32397. "location": {
  32398. "$ref": "#/components/schemas/LocationRef"
  32399. },
  32400. "type": {
  32401. "type": "string",
  32402. "enum": ["workspace.failed"]
  32403. },
  32404. "data": {
  32405. "type": "object",
  32406. "properties": {
  32407. "message": {
  32408. "type": "string"
  32409. }
  32410. },
  32411. "required": ["message"],
  32412. "additionalProperties": false
  32413. }
  32414. },
  32415. "required": ["id", "type", "data"],
  32416. "additionalProperties": false
  32417. },
  32418. "V2EventWorkspaceStatus": {
  32419. "type": "object",
  32420. "properties": {
  32421. "id": {
  32422. "type": "string",
  32423. "pattern": "^evt_"
  32424. },
  32425. "metadata": {
  32426. "type": "object"
  32427. },
  32428. "durable": {
  32429. "type": "object",
  32430. "properties": {
  32431. "aggregateID": {
  32432. "type": "string"
  32433. },
  32434. "seq": {
  32435. "type": "integer"
  32436. },
  32437. "version": {
  32438. "type": "integer"
  32439. }
  32440. },
  32441. "required": ["aggregateID", "seq", "version"],
  32442. "additionalProperties": false
  32443. },
  32444. "location": {
  32445. "$ref": "#/components/schemas/LocationRef"
  32446. },
  32447. "type": {
  32448. "type": "string",
  32449. "enum": ["workspace.status"]
  32450. },
  32451. "data": {
  32452. "type": "object",
  32453. "properties": {
  32454. "workspaceID": {
  32455. "type": "string",
  32456. "pattern": "^wrk"
  32457. },
  32458. "status": {
  32459. "type": "string",
  32460. "enum": ["connected", "connecting", "disconnected", "error"]
  32461. }
  32462. },
  32463. "required": ["workspaceID", "status"],
  32464. "additionalProperties": false
  32465. }
  32466. },
  32467. "required": ["id", "type", "data"],
  32468. "additionalProperties": false
  32469. },
  32470. "V2EventWorktreeReady": {
  32471. "type": "object",
  32472. "properties": {
  32473. "id": {
  32474. "type": "string",
  32475. "pattern": "^evt_"
  32476. },
  32477. "metadata": {
  32478. "type": "object"
  32479. },
  32480. "durable": {
  32481. "type": "object",
  32482. "properties": {
  32483. "aggregateID": {
  32484. "type": "string"
  32485. },
  32486. "seq": {
  32487. "type": "integer"
  32488. },
  32489. "version": {
  32490. "type": "integer"
  32491. }
  32492. },
  32493. "required": ["aggregateID", "seq", "version"],
  32494. "additionalProperties": false
  32495. },
  32496. "location": {
  32497. "$ref": "#/components/schemas/LocationRef"
  32498. },
  32499. "type": {
  32500. "type": "string",
  32501. "enum": ["worktree.ready"]
  32502. },
  32503. "data": {
  32504. "type": "object",
  32505. "properties": {
  32506. "name": {
  32507. "type": "string"
  32508. },
  32509. "branch": {
  32510. "type": "string"
  32511. }
  32512. },
  32513. "required": ["name"],
  32514. "additionalProperties": false
  32515. }
  32516. },
  32517. "required": ["id", "type", "data"],
  32518. "additionalProperties": false
  32519. },
  32520. "V2EventWorktreeFailed": {
  32521. "type": "object",
  32522. "properties": {
  32523. "id": {
  32524. "type": "string",
  32525. "pattern": "^evt_"
  32526. },
  32527. "metadata": {
  32528. "type": "object"
  32529. },
  32530. "durable": {
  32531. "type": "object",
  32532. "properties": {
  32533. "aggregateID": {
  32534. "type": "string"
  32535. },
  32536. "seq": {
  32537. "type": "integer"
  32538. },
  32539. "version": {
  32540. "type": "integer"
  32541. }
  32542. },
  32543. "required": ["aggregateID", "seq", "version"],
  32544. "additionalProperties": false
  32545. },
  32546. "location": {
  32547. "$ref": "#/components/schemas/LocationRef"
  32548. },
  32549. "type": {
  32550. "type": "string",
  32551. "enum": ["worktree.failed"]
  32552. },
  32553. "data": {
  32554. "type": "object",
  32555. "properties": {
  32556. "message": {
  32557. "type": "string"
  32558. }
  32559. },
  32560. "required": ["message"],
  32561. "additionalProperties": false
  32562. }
  32563. },
  32564. "required": ["id", "type", "data"],
  32565. "additionalProperties": false
  32566. },
  32567. "V2EventServerConnected": {
  32568. "type": "object",
  32569. "properties": {
  32570. "id": {
  32571. "type": "string",
  32572. "pattern": "^evt_"
  32573. },
  32574. "metadata": {
  32575. "type": "object"
  32576. },
  32577. "durable": {
  32578. "type": "object",
  32579. "properties": {
  32580. "aggregateID": {
  32581. "type": "string"
  32582. },
  32583. "seq": {
  32584. "type": "integer"
  32585. },
  32586. "version": {
  32587. "type": "integer"
  32588. }
  32589. },
  32590. "required": ["aggregateID", "seq", "version"],
  32591. "additionalProperties": false
  32592. },
  32593. "location": {
  32594. "$ref": "#/components/schemas/LocationRef"
  32595. },
  32596. "type": {
  32597. "type": "string",
  32598. "enum": ["server.connected"]
  32599. },
  32600. "data": {
  32601. "type": "object",
  32602. "properties": {}
  32603. }
  32604. },
  32605. "required": ["id", "type", "data"],
  32606. "additionalProperties": false
  32607. },
  32608. "V2EventGlobalDisposed": {
  32609. "type": "object",
  32610. "properties": {
  32611. "id": {
  32612. "type": "string",
  32613. "pattern": "^evt_"
  32614. },
  32615. "metadata": {
  32616. "type": "object"
  32617. },
  32618. "durable": {
  32619. "type": "object",
  32620. "properties": {
  32621. "aggregateID": {
  32622. "type": "string"
  32623. },
  32624. "seq": {
  32625. "type": "integer"
  32626. },
  32627. "version": {
  32628. "type": "integer"
  32629. }
  32630. },
  32631. "required": ["aggregateID", "seq", "version"],
  32632. "additionalProperties": false
  32633. },
  32634. "location": {
  32635. "$ref": "#/components/schemas/LocationRef"
  32636. },
  32637. "type": {
  32638. "type": "string",
  32639. "enum": ["global.disposed"]
  32640. },
  32641. "data": {
  32642. "type": "object",
  32643. "properties": {}
  32644. }
  32645. },
  32646. "required": ["id", "type", "data"],
  32647. "additionalProperties": false
  32648. },
  32649. "QuestionV2Request": {
  32650. "type": "object",
  32651. "properties": {
  32652. "id": {
  32653. "type": "string",
  32654. "pattern": "^que"
  32655. },
  32656. "sessionID": {
  32657. "type": "string",
  32658. "pattern": "^ses"
  32659. },
  32660. "questions": {
  32661. "type": "array",
  32662. "items": {
  32663. "$ref": "#/components/schemas/QuestionV2Info"
  32664. },
  32665. "description": "Questions to ask"
  32666. },
  32667. "tool": {
  32668. "$ref": "#/components/schemas/QuestionV2Tool"
  32669. }
  32670. },
  32671. "required": ["id", "sessionID", "questions"],
  32672. "additionalProperties": false
  32673. },
  32674. "QuestionV2Reply": {
  32675. "type": "object",
  32676. "properties": {
  32677. "answers": {
  32678. "type": "array",
  32679. "items": {
  32680. "$ref": "#/components/schemas/QuestionV2Answer"
  32681. },
  32682. "description": "User answers in order of questions (each answer is an array of selected labels)"
  32683. }
  32684. },
  32685. "required": ["answers"],
  32686. "additionalProperties": false
  32687. },
  32688. "ReferenceLocalSource": {
  32689. "type": "object",
  32690. "properties": {
  32691. "type": {
  32692. "type": "string",
  32693. "enum": ["local"]
  32694. },
  32695. "path": {
  32696. "type": "string"
  32697. },
  32698. "description": {
  32699. "type": "string"
  32700. },
  32701. "hidden": {
  32702. "type": "boolean"
  32703. }
  32704. },
  32705. "required": ["type", "path"],
  32706. "additionalProperties": false
  32707. },
  32708. "ReferenceGitSource": {
  32709. "type": "object",
  32710. "properties": {
  32711. "type": {
  32712. "type": "string",
  32713. "enum": ["git"]
  32714. },
  32715. "repository": {
  32716. "type": "string"
  32717. },
  32718. "branch": {
  32719. "type": "string"
  32720. },
  32721. "description": {
  32722. "type": "string"
  32723. },
  32724. "hidden": {
  32725. "type": "boolean"
  32726. }
  32727. },
  32728. "required": ["type", "repository"],
  32729. "additionalProperties": false
  32730. },
  32731. "ReferenceInfo": {
  32732. "type": "object",
  32733. "properties": {
  32734. "name": {
  32735. "type": "string"
  32736. },
  32737. "path": {
  32738. "type": "string"
  32739. },
  32740. "description": {
  32741. "type": "string"
  32742. },
  32743. "hidden": {
  32744. "type": "boolean"
  32745. },
  32746. "source": {
  32747. "anyOf": [
  32748. {
  32749. "$ref": "#/components/schemas/ReferenceLocalSource"
  32750. },
  32751. {
  32752. "$ref": "#/components/schemas/ReferenceGitSource"
  32753. }
  32754. ]
  32755. }
  32756. },
  32757. "required": ["name", "path", "source"],
  32758. "additionalProperties": false
  32759. },
  32760. "ProjectCopyCopy": {
  32761. "type": "object",
  32762. "properties": {
  32763. "directory": {
  32764. "type": "string"
  32765. }
  32766. },
  32767. "required": ["directory"],
  32768. "additionalProperties": false
  32769. },
  32770. "EventModels-devRefreshed": {
  32771. "type": "object",
  32772. "properties": {
  32773. "id": {
  32774. "type": "string",
  32775. "pattern": "^evt_"
  32776. },
  32777. "type": {
  32778. "type": "string",
  32779. "enum": ["models-dev.refreshed"]
  32780. },
  32781. "properties": {
  32782. "type": "object",
  32783. "properties": {}
  32784. }
  32785. },
  32786. "required": ["id", "type", "properties"],
  32787. "additionalProperties": false
  32788. },
  32789. "EventIntegrationUpdated": {
  32790. "type": "object",
  32791. "properties": {
  32792. "id": {
  32793. "type": "string",
  32794. "pattern": "^evt_"
  32795. },
  32796. "type": {
  32797. "type": "string",
  32798. "enum": ["integration.updated"]
  32799. },
  32800. "properties": {
  32801. "type": "object",
  32802. "properties": {}
  32803. }
  32804. },
  32805. "required": ["id", "type", "properties"],
  32806. "additionalProperties": false
  32807. },
  32808. "EventIntegrationConnectionUpdated": {
  32809. "type": "object",
  32810. "properties": {
  32811. "id": {
  32812. "type": "string",
  32813. "pattern": "^evt_"
  32814. },
  32815. "type": {
  32816. "type": "string",
  32817. "enum": ["integration.connection.updated"]
  32818. },
  32819. "properties": {
  32820. "type": "object",
  32821. "properties": {
  32822. "integrationID": {
  32823. "type": "string"
  32824. }
  32825. },
  32826. "required": ["integrationID"],
  32827. "additionalProperties": false
  32828. }
  32829. },
  32830. "required": ["id", "type", "properties"],
  32831. "additionalProperties": false
  32832. },
  32833. "EventCatalogUpdated": {
  32834. "type": "object",
  32835. "properties": {
  32836. "id": {
  32837. "type": "string",
  32838. "pattern": "^evt_"
  32839. },
  32840. "type": {
  32841. "type": "string",
  32842. "enum": ["catalog.updated"]
  32843. },
  32844. "properties": {
  32845. "type": "object",
  32846. "properties": {}
  32847. }
  32848. },
  32849. "required": ["id", "type", "properties"],
  32850. "additionalProperties": false
  32851. },
  32852. "EventSessionCreated": {
  32853. "type": "object",
  32854. "properties": {
  32855. "id": {
  32856. "type": "string",
  32857. "pattern": "^evt_"
  32858. },
  32859. "type": {
  32860. "type": "string",
  32861. "enum": ["session.created"]
  32862. },
  32863. "properties": {
  32864. "type": "object",
  32865. "properties": {
  32866. "sessionID": {
  32867. "type": "string",
  32868. "pattern": "^ses"
  32869. },
  32870. "info": {
  32871. "$ref": "#/components/schemas/Session"
  32872. }
  32873. },
  32874. "required": ["sessionID", "info"],
  32875. "additionalProperties": false
  32876. }
  32877. },
  32878. "required": ["id", "type", "properties"],
  32879. "additionalProperties": false
  32880. },
  32881. "EventSessionUpdated": {
  32882. "type": "object",
  32883. "properties": {
  32884. "id": {
  32885. "type": "string",
  32886. "pattern": "^evt_"
  32887. },
  32888. "type": {
  32889. "type": "string",
  32890. "enum": ["session.updated"]
  32891. },
  32892. "properties": {
  32893. "type": "object",
  32894. "properties": {
  32895. "sessionID": {
  32896. "type": "string",
  32897. "pattern": "^ses"
  32898. },
  32899. "info": {
  32900. "$ref": "#/components/schemas/Session"
  32901. }
  32902. },
  32903. "required": ["sessionID", "info"],
  32904. "additionalProperties": false
  32905. }
  32906. },
  32907. "required": ["id", "type", "properties"],
  32908. "additionalProperties": false
  32909. },
  32910. "EventSessionDeleted": {
  32911. "type": "object",
  32912. "properties": {
  32913. "id": {
  32914. "type": "string",
  32915. "pattern": "^evt_"
  32916. },
  32917. "type": {
  32918. "type": "string",
  32919. "enum": ["session.deleted"]
  32920. },
  32921. "properties": {
  32922. "type": "object",
  32923. "properties": {
  32924. "sessionID": {
  32925. "type": "string",
  32926. "pattern": "^ses"
  32927. },
  32928. "info": {
  32929. "$ref": "#/components/schemas/Session"
  32930. }
  32931. },
  32932. "required": ["sessionID", "info"],
  32933. "additionalProperties": false
  32934. }
  32935. },
  32936. "required": ["id", "type", "properties"],
  32937. "additionalProperties": false
  32938. },
  32939. "EventMessageUpdated": {
  32940. "type": "object",
  32941. "properties": {
  32942. "id": {
  32943. "type": "string",
  32944. "pattern": "^evt_"
  32945. },
  32946. "type": {
  32947. "type": "string",
  32948. "enum": ["message.updated"]
  32949. },
  32950. "properties": {
  32951. "type": "object",
  32952. "properties": {
  32953. "sessionID": {
  32954. "type": "string",
  32955. "pattern": "^ses"
  32956. },
  32957. "info": {
  32958. "$ref": "#/components/schemas/Message"
  32959. }
  32960. },
  32961. "required": ["sessionID", "info"],
  32962. "additionalProperties": false
  32963. }
  32964. },
  32965. "required": ["id", "type", "properties"],
  32966. "additionalProperties": false
  32967. },
  32968. "EventMessageRemoved": {
  32969. "type": "object",
  32970. "properties": {
  32971. "id": {
  32972. "type": "string",
  32973. "pattern": "^evt_"
  32974. },
  32975. "type": {
  32976. "type": "string",
  32977. "enum": ["message.removed"]
  32978. },
  32979. "properties": {
  32980. "type": "object",
  32981. "properties": {
  32982. "sessionID": {
  32983. "type": "string",
  32984. "pattern": "^ses"
  32985. },
  32986. "messageID": {
  32987. "type": "string",
  32988. "pattern": "^msg"
  32989. }
  32990. },
  32991. "required": ["sessionID", "messageID"],
  32992. "additionalProperties": false
  32993. }
  32994. },
  32995. "required": ["id", "type", "properties"],
  32996. "additionalProperties": false
  32997. },
  32998. "EventMessagePartUpdated": {
  32999. "type": "object",
  33000. "properties": {
  33001. "id": {
  33002. "type": "string",
  33003. "pattern": "^evt_"
  33004. },
  33005. "type": {
  33006. "type": "string",
  33007. "enum": ["message.part.updated"]
  33008. },
  33009. "properties": {
  33010. "type": "object",
  33011. "properties": {
  33012. "sessionID": {
  33013. "type": "string",
  33014. "pattern": "^ses"
  33015. },
  33016. "part": {
  33017. "$ref": "#/components/schemas/Part"
  33018. },
  33019. "time": {
  33020. "type": "number"
  33021. }
  33022. },
  33023. "required": ["sessionID", "part", "time"],
  33024. "additionalProperties": false
  33025. }
  33026. },
  33027. "required": ["id", "type", "properties"],
  33028. "additionalProperties": false
  33029. },
  33030. "EventMessagePartRemoved": {
  33031. "type": "object",
  33032. "properties": {
  33033. "id": {
  33034. "type": "string",
  33035. "pattern": "^evt_"
  33036. },
  33037. "type": {
  33038. "type": "string",
  33039. "enum": ["message.part.removed"]
  33040. },
  33041. "properties": {
  33042. "type": "object",
  33043. "properties": {
  33044. "sessionID": {
  33045. "type": "string",
  33046. "pattern": "^ses"
  33047. },
  33048. "messageID": {
  33049. "type": "string",
  33050. "pattern": "^msg"
  33051. },
  33052. "partID": {
  33053. "type": "string",
  33054. "pattern": "^prt"
  33055. }
  33056. },
  33057. "required": ["sessionID", "messageID", "partID"],
  33058. "additionalProperties": false
  33059. }
  33060. },
  33061. "required": ["id", "type", "properties"],
  33062. "additionalProperties": false
  33063. },
  33064. "EventSessionNextAgentSwitched": {
  33065. "type": "object",
  33066. "properties": {
  33067. "id": {
  33068. "type": "string",
  33069. "pattern": "^evt_"
  33070. },
  33071. "type": {
  33072. "type": "string",
  33073. "enum": ["session.next.agent.switched"]
  33074. },
  33075. "properties": {
  33076. "type": "object",
  33077. "properties": {
  33078. "timestamp": {
  33079. "type": "number"
  33080. },
  33081. "sessionID": {
  33082. "type": "string",
  33083. "pattern": "^ses"
  33084. },
  33085. "messageID": {
  33086. "type": "string",
  33087. "pattern": "^msg_"
  33088. },
  33089. "agent": {
  33090. "type": "string"
  33091. }
  33092. },
  33093. "required": ["timestamp", "sessionID", "messageID", "agent"],
  33094. "additionalProperties": false
  33095. }
  33096. },
  33097. "required": ["id", "type", "properties"],
  33098. "additionalProperties": false
  33099. },
  33100. "EventSessionNextModelSwitched": {
  33101. "type": "object",
  33102. "properties": {
  33103. "id": {
  33104. "type": "string",
  33105. "pattern": "^evt_"
  33106. },
  33107. "type": {
  33108. "type": "string",
  33109. "enum": ["session.next.model.switched"]
  33110. },
  33111. "properties": {
  33112. "type": "object",
  33113. "properties": {
  33114. "timestamp": {
  33115. "type": "number"
  33116. },
  33117. "sessionID": {
  33118. "type": "string",
  33119. "pattern": "^ses"
  33120. },
  33121. "messageID": {
  33122. "type": "string",
  33123. "pattern": "^msg_"
  33124. },
  33125. "model": {
  33126. "type": "object",
  33127. "properties": {
  33128. "id": {
  33129. "type": "string"
  33130. },
  33131. "providerID": {
  33132. "type": "string"
  33133. },
  33134. "variant": {
  33135. "type": "string"
  33136. }
  33137. },
  33138. "required": ["id", "providerID"],
  33139. "additionalProperties": false
  33140. }
  33141. },
  33142. "required": ["timestamp", "sessionID", "messageID", "model"],
  33143. "additionalProperties": false
  33144. }
  33145. },
  33146. "required": ["id", "type", "properties"],
  33147. "additionalProperties": false
  33148. },
  33149. "EventSessionNextMoved": {
  33150. "type": "object",
  33151. "properties": {
  33152. "id": {
  33153. "type": "string",
  33154. "pattern": "^evt_"
  33155. },
  33156. "type": {
  33157. "type": "string",
  33158. "enum": ["session.next.moved"]
  33159. },
  33160. "properties": {
  33161. "type": "object",
  33162. "properties": {
  33163. "timestamp": {
  33164. "type": "number"
  33165. },
  33166. "sessionID": {
  33167. "type": "string",
  33168. "pattern": "^ses"
  33169. },
  33170. "location": {
  33171. "$ref": "#/components/schemas/LocationRef"
  33172. },
  33173. "subdirectory": {
  33174. "type": "string"
  33175. }
  33176. },
  33177. "required": ["timestamp", "sessionID", "location"],
  33178. "additionalProperties": false
  33179. }
  33180. },
  33181. "required": ["id", "type", "properties"],
  33182. "additionalProperties": false
  33183. },
  33184. "EventSessionNextPrompted": {
  33185. "type": "object",
  33186. "properties": {
  33187. "id": {
  33188. "type": "string",
  33189. "pattern": "^evt_"
  33190. },
  33191. "type": {
  33192. "type": "string",
  33193. "enum": ["session.next.prompted"]
  33194. },
  33195. "properties": {
  33196. "type": "object",
  33197. "properties": {
  33198. "timestamp": {
  33199. "type": "number"
  33200. },
  33201. "sessionID": {
  33202. "type": "string",
  33203. "pattern": "^ses"
  33204. },
  33205. "messageID": {
  33206. "type": "string",
  33207. "pattern": "^msg_"
  33208. },
  33209. "prompt": {
  33210. "$ref": "#/components/schemas/Prompt"
  33211. },
  33212. "delivery": {
  33213. "type": "string",
  33214. "enum": ["steer", "queue"]
  33215. }
  33216. },
  33217. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  33218. "additionalProperties": false
  33219. }
  33220. },
  33221. "required": ["id", "type", "properties"],
  33222. "additionalProperties": false
  33223. },
  33224. "EventSessionNextPromptAdmitted": {
  33225. "type": "object",
  33226. "properties": {
  33227. "id": {
  33228. "type": "string",
  33229. "pattern": "^evt_"
  33230. },
  33231. "type": {
  33232. "type": "string",
  33233. "enum": ["session.next.prompt.admitted"]
  33234. },
  33235. "properties": {
  33236. "type": "object",
  33237. "properties": {
  33238. "timestamp": {
  33239. "type": "number"
  33240. },
  33241. "sessionID": {
  33242. "type": "string",
  33243. "pattern": "^ses"
  33244. },
  33245. "messageID": {
  33246. "type": "string",
  33247. "pattern": "^msg_"
  33248. },
  33249. "prompt": {
  33250. "$ref": "#/components/schemas/Prompt"
  33251. },
  33252. "delivery": {
  33253. "type": "string",
  33254. "enum": ["steer", "queue"]
  33255. }
  33256. },
  33257. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  33258. "additionalProperties": false
  33259. }
  33260. },
  33261. "required": ["id", "type", "properties"],
  33262. "additionalProperties": false
  33263. },
  33264. "EventSessionNextContextUpdated": {
  33265. "type": "object",
  33266. "properties": {
  33267. "id": {
  33268. "type": "string",
  33269. "pattern": "^evt_"
  33270. },
  33271. "type": {
  33272. "type": "string",
  33273. "enum": ["session.next.context.updated"]
  33274. },
  33275. "properties": {
  33276. "type": "object",
  33277. "properties": {
  33278. "timestamp": {
  33279. "type": "number"
  33280. },
  33281. "sessionID": {
  33282. "type": "string",
  33283. "pattern": "^ses"
  33284. },
  33285. "messageID": {
  33286. "type": "string",
  33287. "pattern": "^msg_"
  33288. },
  33289. "text": {
  33290. "type": "string"
  33291. }
  33292. },
  33293. "required": ["timestamp", "sessionID", "messageID", "text"],
  33294. "additionalProperties": false
  33295. }
  33296. },
  33297. "required": ["id", "type", "properties"],
  33298. "additionalProperties": false
  33299. },
  33300. "EventSessionNextSynthetic": {
  33301. "type": "object",
  33302. "properties": {
  33303. "id": {
  33304. "type": "string",
  33305. "pattern": "^evt_"
  33306. },
  33307. "type": {
  33308. "type": "string",
  33309. "enum": ["session.next.synthetic"]
  33310. },
  33311. "properties": {
  33312. "type": "object",
  33313. "properties": {
  33314. "timestamp": {
  33315. "type": "number"
  33316. },
  33317. "sessionID": {
  33318. "type": "string",
  33319. "pattern": "^ses"
  33320. },
  33321. "messageID": {
  33322. "type": "string",
  33323. "pattern": "^msg_"
  33324. },
  33325. "text": {
  33326. "type": "string"
  33327. }
  33328. },
  33329. "required": ["timestamp", "sessionID", "messageID", "text"],
  33330. "additionalProperties": false
  33331. }
  33332. },
  33333. "required": ["id", "type", "properties"],
  33334. "additionalProperties": false
  33335. },
  33336. "EventSessionNextShellStarted": {
  33337. "type": "object",
  33338. "properties": {
  33339. "id": {
  33340. "type": "string",
  33341. "pattern": "^evt_"
  33342. },
  33343. "type": {
  33344. "type": "string",
  33345. "enum": ["session.next.shell.started"]
  33346. },
  33347. "properties": {
  33348. "type": "object",
  33349. "properties": {
  33350. "timestamp": {
  33351. "type": "number"
  33352. },
  33353. "sessionID": {
  33354. "type": "string",
  33355. "pattern": "^ses"
  33356. },
  33357. "messageID": {
  33358. "type": "string",
  33359. "pattern": "^msg_"
  33360. },
  33361. "callID": {
  33362. "type": "string"
  33363. },
  33364. "command": {
  33365. "type": "string"
  33366. }
  33367. },
  33368. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  33369. "additionalProperties": false
  33370. }
  33371. },
  33372. "required": ["id", "type", "properties"],
  33373. "additionalProperties": false
  33374. },
  33375. "EventSessionNextShellEnded": {
  33376. "type": "object",
  33377. "properties": {
  33378. "id": {
  33379. "type": "string",
  33380. "pattern": "^evt_"
  33381. },
  33382. "type": {
  33383. "type": "string",
  33384. "enum": ["session.next.shell.ended"]
  33385. },
  33386. "properties": {
  33387. "type": "object",
  33388. "properties": {
  33389. "timestamp": {
  33390. "type": "number"
  33391. },
  33392. "sessionID": {
  33393. "type": "string",
  33394. "pattern": "^ses"
  33395. },
  33396. "callID": {
  33397. "type": "string"
  33398. },
  33399. "output": {
  33400. "type": "string"
  33401. }
  33402. },
  33403. "required": ["timestamp", "sessionID", "callID", "output"],
  33404. "additionalProperties": false
  33405. }
  33406. },
  33407. "required": ["id", "type", "properties"],
  33408. "additionalProperties": false
  33409. },
  33410. "EventSessionNextStepStarted": {
  33411. "type": "object",
  33412. "properties": {
  33413. "id": {
  33414. "type": "string",
  33415. "pattern": "^evt_"
  33416. },
  33417. "type": {
  33418. "type": "string",
  33419. "enum": ["session.next.step.started"]
  33420. },
  33421. "properties": {
  33422. "type": "object",
  33423. "properties": {
  33424. "timestamp": {
  33425. "type": "number"
  33426. },
  33427. "sessionID": {
  33428. "type": "string",
  33429. "pattern": "^ses"
  33430. },
  33431. "assistantMessageID": {
  33432. "type": "string",
  33433. "pattern": "^msg_"
  33434. },
  33435. "agent": {
  33436. "type": "string"
  33437. },
  33438. "model": {
  33439. "type": "object",
  33440. "properties": {
  33441. "id": {
  33442. "type": "string"
  33443. },
  33444. "providerID": {
  33445. "type": "string"
  33446. },
  33447. "variant": {
  33448. "type": "string"
  33449. }
  33450. },
  33451. "required": ["id", "providerID"],
  33452. "additionalProperties": false
  33453. },
  33454. "snapshot": {
  33455. "type": "string"
  33456. }
  33457. },
  33458. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  33459. "additionalProperties": false
  33460. }
  33461. },
  33462. "required": ["id", "type", "properties"],
  33463. "additionalProperties": false
  33464. },
  33465. "EventSessionNextStepEnded": {
  33466. "type": "object",
  33467. "properties": {
  33468. "id": {
  33469. "type": "string",
  33470. "pattern": "^evt_"
  33471. },
  33472. "type": {
  33473. "type": "string",
  33474. "enum": ["session.next.step.ended"]
  33475. },
  33476. "properties": {
  33477. "type": "object",
  33478. "properties": {
  33479. "timestamp": {
  33480. "type": "number"
  33481. },
  33482. "sessionID": {
  33483. "type": "string",
  33484. "pattern": "^ses"
  33485. },
  33486. "assistantMessageID": {
  33487. "type": "string",
  33488. "pattern": "^msg_"
  33489. },
  33490. "finish": {
  33491. "type": "string"
  33492. },
  33493. "cost": {
  33494. "type": "number"
  33495. },
  33496. "tokens": {
  33497. "type": "object",
  33498. "properties": {
  33499. "input": {
  33500. "type": "number"
  33501. },
  33502. "output": {
  33503. "type": "number"
  33504. },
  33505. "reasoning": {
  33506. "type": "number"
  33507. },
  33508. "cache": {
  33509. "type": "object",
  33510. "properties": {
  33511. "read": {
  33512. "type": "number"
  33513. },
  33514. "write": {
  33515. "type": "number"
  33516. }
  33517. },
  33518. "required": ["read", "write"],
  33519. "additionalProperties": false
  33520. }
  33521. },
  33522. "required": ["input", "output", "reasoning", "cache"],
  33523. "additionalProperties": false
  33524. },
  33525. "snapshot": {
  33526. "type": "string"
  33527. }
  33528. },
  33529. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  33530. "additionalProperties": false
  33531. }
  33532. },
  33533. "required": ["id", "type", "properties"],
  33534. "additionalProperties": false
  33535. },
  33536. "EventSessionNextStepFailed": {
  33537. "type": "object",
  33538. "properties": {
  33539. "id": {
  33540. "type": "string",
  33541. "pattern": "^evt_"
  33542. },
  33543. "type": {
  33544. "type": "string",
  33545. "enum": ["session.next.step.failed"]
  33546. },
  33547. "properties": {
  33548. "type": "object",
  33549. "properties": {
  33550. "timestamp": {
  33551. "type": "number"
  33552. },
  33553. "sessionID": {
  33554. "type": "string",
  33555. "pattern": "^ses"
  33556. },
  33557. "assistantMessageID": {
  33558. "type": "string",
  33559. "pattern": "^msg_"
  33560. },
  33561. "error": {
  33562. "$ref": "#/components/schemas/SessionErrorUnknown"
  33563. }
  33564. },
  33565. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  33566. "additionalProperties": false
  33567. }
  33568. },
  33569. "required": ["id", "type", "properties"],
  33570. "additionalProperties": false
  33571. },
  33572. "EventSessionNextTextStarted": {
  33573. "type": "object",
  33574. "properties": {
  33575. "id": {
  33576. "type": "string",
  33577. "pattern": "^evt_"
  33578. },
  33579. "type": {
  33580. "type": "string",
  33581. "enum": ["session.next.text.started"]
  33582. },
  33583. "properties": {
  33584. "type": "object",
  33585. "properties": {
  33586. "timestamp": {
  33587. "type": "number"
  33588. },
  33589. "sessionID": {
  33590. "type": "string",
  33591. "pattern": "^ses"
  33592. },
  33593. "assistantMessageID": {
  33594. "type": "string",
  33595. "pattern": "^msg_"
  33596. },
  33597. "textID": {
  33598. "type": "string"
  33599. }
  33600. },
  33601. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  33602. "additionalProperties": false
  33603. }
  33604. },
  33605. "required": ["id", "type", "properties"],
  33606. "additionalProperties": false
  33607. },
  33608. "EventSessionNextTextDelta": {
  33609. "type": "object",
  33610. "properties": {
  33611. "id": {
  33612. "type": "string",
  33613. "pattern": "^evt_"
  33614. },
  33615. "type": {
  33616. "type": "string",
  33617. "enum": ["session.next.text.delta"]
  33618. },
  33619. "properties": {
  33620. "type": "object",
  33621. "properties": {
  33622. "timestamp": {
  33623. "type": "number"
  33624. },
  33625. "sessionID": {
  33626. "type": "string",
  33627. "pattern": "^ses"
  33628. },
  33629. "assistantMessageID": {
  33630. "type": "string",
  33631. "pattern": "^msg_"
  33632. },
  33633. "textID": {
  33634. "type": "string"
  33635. },
  33636. "delta": {
  33637. "type": "string"
  33638. }
  33639. },
  33640. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  33641. "additionalProperties": false
  33642. }
  33643. },
  33644. "required": ["id", "type", "properties"],
  33645. "additionalProperties": false
  33646. },
  33647. "EventSessionNextTextEnded": {
  33648. "type": "object",
  33649. "properties": {
  33650. "id": {
  33651. "type": "string",
  33652. "pattern": "^evt_"
  33653. },
  33654. "type": {
  33655. "type": "string",
  33656. "enum": ["session.next.text.ended"]
  33657. },
  33658. "properties": {
  33659. "type": "object",
  33660. "properties": {
  33661. "timestamp": {
  33662. "type": "number"
  33663. },
  33664. "sessionID": {
  33665. "type": "string",
  33666. "pattern": "^ses"
  33667. },
  33668. "assistantMessageID": {
  33669. "type": "string",
  33670. "pattern": "^msg_"
  33671. },
  33672. "textID": {
  33673. "type": "string"
  33674. },
  33675. "text": {
  33676. "type": "string"
  33677. }
  33678. },
  33679. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  33680. "additionalProperties": false
  33681. }
  33682. },
  33683. "required": ["id", "type", "properties"],
  33684. "additionalProperties": false
  33685. },
  33686. "EventSessionNextReasoningStarted": {
  33687. "type": "object",
  33688. "properties": {
  33689. "id": {
  33690. "type": "string",
  33691. "pattern": "^evt_"
  33692. },
  33693. "type": {
  33694. "type": "string",
  33695. "enum": ["session.next.reasoning.started"]
  33696. },
  33697. "properties": {
  33698. "type": "object",
  33699. "properties": {
  33700. "timestamp": {
  33701. "type": "number"
  33702. },
  33703. "sessionID": {
  33704. "type": "string",
  33705. "pattern": "^ses"
  33706. },
  33707. "assistantMessageID": {
  33708. "type": "string",
  33709. "pattern": "^msg_"
  33710. },
  33711. "reasoningID": {
  33712. "type": "string"
  33713. },
  33714. "providerMetadata": {
  33715. "type": "object",
  33716. "additionalProperties": {
  33717. "type": "object"
  33718. }
  33719. }
  33720. },
  33721. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  33722. "additionalProperties": false
  33723. }
  33724. },
  33725. "required": ["id", "type", "properties"],
  33726. "additionalProperties": false
  33727. },
  33728. "EventSessionNextReasoningDelta": {
  33729. "type": "object",
  33730. "properties": {
  33731. "id": {
  33732. "type": "string",
  33733. "pattern": "^evt_"
  33734. },
  33735. "type": {
  33736. "type": "string",
  33737. "enum": ["session.next.reasoning.delta"]
  33738. },
  33739. "properties": {
  33740. "type": "object",
  33741. "properties": {
  33742. "timestamp": {
  33743. "type": "number"
  33744. },
  33745. "sessionID": {
  33746. "type": "string",
  33747. "pattern": "^ses"
  33748. },
  33749. "assistantMessageID": {
  33750. "type": "string",
  33751. "pattern": "^msg_"
  33752. },
  33753. "reasoningID": {
  33754. "type": "string"
  33755. },
  33756. "delta": {
  33757. "type": "string"
  33758. }
  33759. },
  33760. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  33761. "additionalProperties": false
  33762. }
  33763. },
  33764. "required": ["id", "type", "properties"],
  33765. "additionalProperties": false
  33766. },
  33767. "EventSessionNextReasoningEnded": {
  33768. "type": "object",
  33769. "properties": {
  33770. "id": {
  33771. "type": "string",
  33772. "pattern": "^evt_"
  33773. },
  33774. "type": {
  33775. "type": "string",
  33776. "enum": ["session.next.reasoning.ended"]
  33777. },
  33778. "properties": {
  33779. "type": "object",
  33780. "properties": {
  33781. "timestamp": {
  33782. "type": "number"
  33783. },
  33784. "sessionID": {
  33785. "type": "string",
  33786. "pattern": "^ses"
  33787. },
  33788. "assistantMessageID": {
  33789. "type": "string",
  33790. "pattern": "^msg_"
  33791. },
  33792. "reasoningID": {
  33793. "type": "string"
  33794. },
  33795. "text": {
  33796. "type": "string"
  33797. },
  33798. "providerMetadata": {
  33799. "type": "object",
  33800. "additionalProperties": {
  33801. "type": "object"
  33802. }
  33803. }
  33804. },
  33805. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  33806. "additionalProperties": false
  33807. }
  33808. },
  33809. "required": ["id", "type", "properties"],
  33810. "additionalProperties": false
  33811. },
  33812. "EventSessionNextToolInputStarted": {
  33813. "type": "object",
  33814. "properties": {
  33815. "id": {
  33816. "type": "string",
  33817. "pattern": "^evt_"
  33818. },
  33819. "type": {
  33820. "type": "string",
  33821. "enum": ["session.next.tool.input.started"]
  33822. },
  33823. "properties": {
  33824. "type": "object",
  33825. "properties": {
  33826. "timestamp": {
  33827. "type": "number"
  33828. },
  33829. "sessionID": {
  33830. "type": "string",
  33831. "pattern": "^ses"
  33832. },
  33833. "assistantMessageID": {
  33834. "type": "string",
  33835. "pattern": "^msg_"
  33836. },
  33837. "callID": {
  33838. "type": "string"
  33839. },
  33840. "name": {
  33841. "type": "string"
  33842. }
  33843. },
  33844. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  33845. "additionalProperties": false
  33846. }
  33847. },
  33848. "required": ["id", "type", "properties"],
  33849. "additionalProperties": false
  33850. },
  33851. "EventSessionNextToolInputDelta": {
  33852. "type": "object",
  33853. "properties": {
  33854. "id": {
  33855. "type": "string",
  33856. "pattern": "^evt_"
  33857. },
  33858. "type": {
  33859. "type": "string",
  33860. "enum": ["session.next.tool.input.delta"]
  33861. },
  33862. "properties": {
  33863. "type": "object",
  33864. "properties": {
  33865. "timestamp": {
  33866. "type": "number"
  33867. },
  33868. "sessionID": {
  33869. "type": "string",
  33870. "pattern": "^ses"
  33871. },
  33872. "assistantMessageID": {
  33873. "type": "string",
  33874. "pattern": "^msg_"
  33875. },
  33876. "callID": {
  33877. "type": "string"
  33878. },
  33879. "delta": {
  33880. "type": "string"
  33881. }
  33882. },
  33883. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  33884. "additionalProperties": false
  33885. }
  33886. },
  33887. "required": ["id", "type", "properties"],
  33888. "additionalProperties": false
  33889. },
  33890. "EventSessionNextToolInputEnded": {
  33891. "type": "object",
  33892. "properties": {
  33893. "id": {
  33894. "type": "string",
  33895. "pattern": "^evt_"
  33896. },
  33897. "type": {
  33898. "type": "string",
  33899. "enum": ["session.next.tool.input.ended"]
  33900. },
  33901. "properties": {
  33902. "type": "object",
  33903. "properties": {
  33904. "timestamp": {
  33905. "type": "number"
  33906. },
  33907. "sessionID": {
  33908. "type": "string",
  33909. "pattern": "^ses"
  33910. },
  33911. "assistantMessageID": {
  33912. "type": "string",
  33913. "pattern": "^msg_"
  33914. },
  33915. "callID": {
  33916. "type": "string"
  33917. },
  33918. "text": {
  33919. "type": "string"
  33920. }
  33921. },
  33922. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  33923. "additionalProperties": false
  33924. }
  33925. },
  33926. "required": ["id", "type", "properties"],
  33927. "additionalProperties": false
  33928. },
  33929. "EventSessionNextToolCalled": {
  33930. "type": "object",
  33931. "properties": {
  33932. "id": {
  33933. "type": "string",
  33934. "pattern": "^evt_"
  33935. },
  33936. "type": {
  33937. "type": "string",
  33938. "enum": ["session.next.tool.called"]
  33939. },
  33940. "properties": {
  33941. "type": "object",
  33942. "properties": {
  33943. "timestamp": {
  33944. "type": "number"
  33945. },
  33946. "sessionID": {
  33947. "type": "string",
  33948. "pattern": "^ses"
  33949. },
  33950. "assistantMessageID": {
  33951. "type": "string",
  33952. "pattern": "^msg_"
  33953. },
  33954. "callID": {
  33955. "type": "string"
  33956. },
  33957. "tool": {
  33958. "type": "string"
  33959. },
  33960. "input": {
  33961. "type": "object"
  33962. },
  33963. "provider": {
  33964. "type": "object",
  33965. "properties": {
  33966. "executed": {
  33967. "type": "boolean"
  33968. },
  33969. "metadata": {
  33970. "type": "object",
  33971. "additionalProperties": {
  33972. "type": "object"
  33973. }
  33974. }
  33975. },
  33976. "required": ["executed"],
  33977. "additionalProperties": false
  33978. }
  33979. },
  33980. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  33981. "additionalProperties": false
  33982. }
  33983. },
  33984. "required": ["id", "type", "properties"],
  33985. "additionalProperties": false
  33986. },
  33987. "EventSessionNextToolProgress": {
  33988. "type": "object",
  33989. "properties": {
  33990. "id": {
  33991. "type": "string",
  33992. "pattern": "^evt_"
  33993. },
  33994. "type": {
  33995. "type": "string",
  33996. "enum": ["session.next.tool.progress"]
  33997. },
  33998. "properties": {
  33999. "type": "object",
  34000. "properties": {
  34001. "timestamp": {
  34002. "type": "number"
  34003. },
  34004. "sessionID": {
  34005. "type": "string",
  34006. "pattern": "^ses"
  34007. },
  34008. "assistantMessageID": {
  34009. "type": "string",
  34010. "pattern": "^msg_"
  34011. },
  34012. "callID": {
  34013. "type": "string"
  34014. },
  34015. "structured": {
  34016. "type": "object"
  34017. },
  34018. "content": {
  34019. "type": "array",
  34020. "items": {
  34021. "anyOf": [
  34022. {
  34023. "$ref": "#/components/schemas/ToolTextContent"
  34024. },
  34025. {
  34026. "$ref": "#/components/schemas/ToolFileContent"
  34027. }
  34028. ]
  34029. }
  34030. }
  34031. },
  34032. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  34033. "additionalProperties": false
  34034. }
  34035. },
  34036. "required": ["id", "type", "properties"],
  34037. "additionalProperties": false
  34038. },
  34039. "EventSessionNextToolSuccess": {
  34040. "type": "object",
  34041. "properties": {
  34042. "id": {
  34043. "type": "string",
  34044. "pattern": "^evt_"
  34045. },
  34046. "type": {
  34047. "type": "string",
  34048. "enum": ["session.next.tool.success"]
  34049. },
  34050. "properties": {
  34051. "type": "object",
  34052. "properties": {
  34053. "timestamp": {
  34054. "type": "number"
  34055. },
  34056. "sessionID": {
  34057. "type": "string",
  34058. "pattern": "^ses"
  34059. },
  34060. "assistantMessageID": {
  34061. "type": "string",
  34062. "pattern": "^msg_"
  34063. },
  34064. "callID": {
  34065. "type": "string"
  34066. },
  34067. "structured": {
  34068. "type": "object"
  34069. },
  34070. "content": {
  34071. "type": "array",
  34072. "items": {
  34073. "anyOf": [
  34074. {
  34075. "$ref": "#/components/schemas/ToolTextContent"
  34076. },
  34077. {
  34078. "$ref": "#/components/schemas/ToolFileContent"
  34079. }
  34080. ]
  34081. }
  34082. },
  34083. "outputPaths": {
  34084. "type": "array",
  34085. "items": {
  34086. "type": "string"
  34087. }
  34088. },
  34089. "result": {},
  34090. "provider": {
  34091. "type": "object",
  34092. "properties": {
  34093. "executed": {
  34094. "type": "boolean"
  34095. },
  34096. "metadata": {
  34097. "type": "object",
  34098. "additionalProperties": {
  34099. "type": "object"
  34100. }
  34101. }
  34102. },
  34103. "required": ["executed"],
  34104. "additionalProperties": false
  34105. }
  34106. },
  34107. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  34108. "additionalProperties": false
  34109. }
  34110. },
  34111. "required": ["id", "type", "properties"],
  34112. "additionalProperties": false
  34113. },
  34114. "EventSessionNextToolFailed": {
  34115. "type": "object",
  34116. "properties": {
  34117. "id": {
  34118. "type": "string",
  34119. "pattern": "^evt_"
  34120. },
  34121. "type": {
  34122. "type": "string",
  34123. "enum": ["session.next.tool.failed"]
  34124. },
  34125. "properties": {
  34126. "type": "object",
  34127. "properties": {
  34128. "timestamp": {
  34129. "type": "number"
  34130. },
  34131. "sessionID": {
  34132. "type": "string",
  34133. "pattern": "^ses"
  34134. },
  34135. "assistantMessageID": {
  34136. "type": "string",
  34137. "pattern": "^msg_"
  34138. },
  34139. "callID": {
  34140. "type": "string"
  34141. },
  34142. "error": {
  34143. "$ref": "#/components/schemas/SessionErrorUnknown"
  34144. },
  34145. "result": {},
  34146. "provider": {
  34147. "type": "object",
  34148. "properties": {
  34149. "executed": {
  34150. "type": "boolean"
  34151. },
  34152. "metadata": {
  34153. "type": "object",
  34154. "additionalProperties": {
  34155. "type": "object"
  34156. }
  34157. }
  34158. },
  34159. "required": ["executed"],
  34160. "additionalProperties": false
  34161. }
  34162. },
  34163. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  34164. "additionalProperties": false
  34165. }
  34166. },
  34167. "required": ["id", "type", "properties"],
  34168. "additionalProperties": false
  34169. },
  34170. "EventSessionNextRetried": {
  34171. "type": "object",
  34172. "properties": {
  34173. "id": {
  34174. "type": "string",
  34175. "pattern": "^evt_"
  34176. },
  34177. "type": {
  34178. "type": "string",
  34179. "enum": ["session.next.retried"]
  34180. },
  34181. "properties": {
  34182. "type": "object",
  34183. "properties": {
  34184. "timestamp": {
  34185. "type": "number"
  34186. },
  34187. "sessionID": {
  34188. "type": "string",
  34189. "pattern": "^ses"
  34190. },
  34191. "attempt": {
  34192. "type": "number"
  34193. },
  34194. "error": {
  34195. "$ref": "#/components/schemas/SessionNextRetry_error"
  34196. }
  34197. },
  34198. "required": ["timestamp", "sessionID", "attempt", "error"],
  34199. "additionalProperties": false
  34200. }
  34201. },
  34202. "required": ["id", "type", "properties"],
  34203. "additionalProperties": false
  34204. },
  34205. "EventSessionNextCompactionStarted": {
  34206. "type": "object",
  34207. "properties": {
  34208. "id": {
  34209. "type": "string",
  34210. "pattern": "^evt_"
  34211. },
  34212. "type": {
  34213. "type": "string",
  34214. "enum": ["session.next.compaction.started"]
  34215. },
  34216. "properties": {
  34217. "type": "object",
  34218. "properties": {
  34219. "timestamp": {
  34220. "type": "number"
  34221. },
  34222. "sessionID": {
  34223. "type": "string",
  34224. "pattern": "^ses"
  34225. },
  34226. "messageID": {
  34227. "type": "string",
  34228. "pattern": "^msg_"
  34229. },
  34230. "reason": {
  34231. "type": "string",
  34232. "enum": ["auto", "manual"]
  34233. }
  34234. },
  34235. "required": ["timestamp", "sessionID", "messageID", "reason"],
  34236. "additionalProperties": false
  34237. }
  34238. },
  34239. "required": ["id", "type", "properties"],
  34240. "additionalProperties": false
  34241. },
  34242. "EventSessionNextCompactionDelta": {
  34243. "type": "object",
  34244. "properties": {
  34245. "id": {
  34246. "type": "string",
  34247. "pattern": "^evt_"
  34248. },
  34249. "type": {
  34250. "type": "string",
  34251. "enum": ["session.next.compaction.delta"]
  34252. },
  34253. "properties": {
  34254. "type": "object",
  34255. "properties": {
  34256. "timestamp": {
  34257. "type": "number"
  34258. },
  34259. "sessionID": {
  34260. "type": "string",
  34261. "pattern": "^ses"
  34262. },
  34263. "messageID": {
  34264. "type": "string",
  34265. "pattern": "^msg_"
  34266. },
  34267. "text": {
  34268. "type": "string"
  34269. }
  34270. },
  34271. "required": ["timestamp", "sessionID", "messageID", "text"],
  34272. "additionalProperties": false
  34273. }
  34274. },
  34275. "required": ["id", "type", "properties"],
  34276. "additionalProperties": false
  34277. },
  34278. "EventSessionNextCompactionEnded": {
  34279. "type": "object",
  34280. "properties": {
  34281. "id": {
  34282. "type": "string",
  34283. "pattern": "^evt_"
  34284. },
  34285. "type": {
  34286. "type": "string",
  34287. "enum": ["session.next.compaction.ended"]
  34288. },
  34289. "properties": {
  34290. "type": "object",
  34291. "properties": {
  34292. "timestamp": {
  34293. "type": "number"
  34294. },
  34295. "sessionID": {
  34296. "type": "string",
  34297. "pattern": "^ses"
  34298. },
  34299. "messageID": {
  34300. "type": "string",
  34301. "pattern": "^msg_"
  34302. },
  34303. "reason": {
  34304. "type": "string",
  34305. "enum": ["auto", "manual"]
  34306. },
  34307. "text": {
  34308. "type": "string"
  34309. },
  34310. "recent": {
  34311. "type": "string"
  34312. }
  34313. },
  34314. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  34315. "additionalProperties": false
  34316. }
  34317. },
  34318. "required": ["id", "type", "properties"],
  34319. "additionalProperties": false
  34320. },
  34321. "EventMessagePartDelta": {
  34322. "type": "object",
  34323. "properties": {
  34324. "id": {
  34325. "type": "string",
  34326. "pattern": "^evt_"
  34327. },
  34328. "type": {
  34329. "type": "string",
  34330. "enum": ["message.part.delta"]
  34331. },
  34332. "properties": {
  34333. "type": "object",
  34334. "properties": {
  34335. "sessionID": {
  34336. "type": "string",
  34337. "pattern": "^ses"
  34338. },
  34339. "messageID": {
  34340. "type": "string",
  34341. "pattern": "^msg"
  34342. },
  34343. "partID": {
  34344. "type": "string",
  34345. "pattern": "^prt"
  34346. },
  34347. "field": {
  34348. "type": "string"
  34349. },
  34350. "delta": {
  34351. "type": "string"
  34352. }
  34353. },
  34354. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  34355. "additionalProperties": false
  34356. }
  34357. },
  34358. "required": ["id", "type", "properties"],
  34359. "additionalProperties": false
  34360. },
  34361. "EventSessionDiff": {
  34362. "type": "object",
  34363. "properties": {
  34364. "id": {
  34365. "type": "string",
  34366. "pattern": "^evt_"
  34367. },
  34368. "type": {
  34369. "type": "string",
  34370. "enum": ["session.diff"]
  34371. },
  34372. "properties": {
  34373. "type": "object",
  34374. "properties": {
  34375. "sessionID": {
  34376. "type": "string",
  34377. "pattern": "^ses"
  34378. },
  34379. "diff": {
  34380. "type": "array",
  34381. "items": {
  34382. "$ref": "#/components/schemas/SnapshotFileDiff"
  34383. }
  34384. }
  34385. },
  34386. "required": ["sessionID", "diff"],
  34387. "additionalProperties": false
  34388. }
  34389. },
  34390. "required": ["id", "type", "properties"],
  34391. "additionalProperties": false
  34392. },
  34393. "EventSessionError": {
  34394. "type": "object",
  34395. "properties": {
  34396. "id": {
  34397. "type": "string",
  34398. "pattern": "^evt_"
  34399. },
  34400. "type": {
  34401. "type": "string",
  34402. "enum": ["session.error"]
  34403. },
  34404. "properties": {
  34405. "type": "object",
  34406. "properties": {
  34407. "sessionID": {
  34408. "type": "string",
  34409. "pattern": "^ses"
  34410. },
  34411. "error": {
  34412. "anyOf": [
  34413. {
  34414. "$ref": "#/components/schemas/ProviderAuthError"
  34415. },
  34416. {
  34417. "$ref": "#/components/schemas/UnknownError"
  34418. },
  34419. {
  34420. "$ref": "#/components/schemas/MessageOutputLengthError"
  34421. },
  34422. {
  34423. "$ref": "#/components/schemas/MessageAbortedError"
  34424. },
  34425. {
  34426. "$ref": "#/components/schemas/StructuredOutputError"
  34427. },
  34428. {
  34429. "$ref": "#/components/schemas/ContextOverflowError"
  34430. },
  34431. {
  34432. "$ref": "#/components/schemas/ContentFilterError"
  34433. },
  34434. {
  34435. "$ref": "#/components/schemas/APIError"
  34436. }
  34437. ]
  34438. }
  34439. },
  34440. "additionalProperties": false
  34441. }
  34442. },
  34443. "required": ["id", "type", "properties"],
  34444. "additionalProperties": false
  34445. },
  34446. "EventInstallationUpdated": {
  34447. "type": "object",
  34448. "properties": {
  34449. "id": {
  34450. "type": "string",
  34451. "pattern": "^evt_"
  34452. },
  34453. "type": {
  34454. "type": "string",
  34455. "enum": ["installation.updated"]
  34456. },
  34457. "properties": {
  34458. "type": "object",
  34459. "properties": {
  34460. "version": {
  34461. "type": "string"
  34462. }
  34463. },
  34464. "required": ["version"],
  34465. "additionalProperties": false
  34466. }
  34467. },
  34468. "required": ["id", "type", "properties"],
  34469. "additionalProperties": false
  34470. },
  34471. "EventInstallationUpdate-available": {
  34472. "type": "object",
  34473. "properties": {
  34474. "id": {
  34475. "type": "string",
  34476. "pattern": "^evt_"
  34477. },
  34478. "type": {
  34479. "type": "string",
  34480. "enum": ["installation.update-available"]
  34481. },
  34482. "properties": {
  34483. "type": "object",
  34484. "properties": {
  34485. "version": {
  34486. "type": "string"
  34487. }
  34488. },
  34489. "required": ["version"],
  34490. "additionalProperties": false
  34491. }
  34492. },
  34493. "required": ["id", "type", "properties"],
  34494. "additionalProperties": false
  34495. },
  34496. "EventFileEdited": {
  34497. "type": "object",
  34498. "properties": {
  34499. "id": {
  34500. "type": "string",
  34501. "pattern": "^evt_"
  34502. },
  34503. "type": {
  34504. "type": "string",
  34505. "enum": ["file.edited"]
  34506. },
  34507. "properties": {
  34508. "type": "object",
  34509. "properties": {
  34510. "file": {
  34511. "type": "string"
  34512. }
  34513. },
  34514. "required": ["file"],
  34515. "additionalProperties": false
  34516. }
  34517. },
  34518. "required": ["id", "type", "properties"],
  34519. "additionalProperties": false
  34520. },
  34521. "EventReferenceUpdated": {
  34522. "type": "object",
  34523. "properties": {
  34524. "id": {
  34525. "type": "string",
  34526. "pattern": "^evt_"
  34527. },
  34528. "type": {
  34529. "type": "string",
  34530. "enum": ["reference.updated"]
  34531. },
  34532. "properties": {
  34533. "type": "object",
  34534. "properties": {}
  34535. }
  34536. },
  34537. "required": ["id", "type", "properties"],
  34538. "additionalProperties": false
  34539. },
  34540. "EventPermissionV2Asked": {
  34541. "type": "object",
  34542. "properties": {
  34543. "id": {
  34544. "type": "string",
  34545. "pattern": "^evt_"
  34546. },
  34547. "type": {
  34548. "type": "string",
  34549. "enum": ["permission.v2.asked"]
  34550. },
  34551. "properties": {
  34552. "type": "object",
  34553. "properties": {
  34554. "id": {
  34555. "type": "string",
  34556. "pattern": "^per"
  34557. },
  34558. "sessionID": {
  34559. "type": "string",
  34560. "pattern": "^ses"
  34561. },
  34562. "action": {
  34563. "type": "string"
  34564. },
  34565. "resources": {
  34566. "type": "array",
  34567. "items": {
  34568. "type": "string"
  34569. }
  34570. },
  34571. "save": {
  34572. "type": "array",
  34573. "items": {
  34574. "type": "string"
  34575. }
  34576. },
  34577. "metadata": {
  34578. "type": "object"
  34579. },
  34580. "source": {
  34581. "$ref": "#/components/schemas/PermissionV2Source"
  34582. }
  34583. },
  34584. "required": ["id", "sessionID", "action", "resources"],
  34585. "additionalProperties": false
  34586. }
  34587. },
  34588. "required": ["id", "type", "properties"],
  34589. "additionalProperties": false
  34590. },
  34591. "EventPermissionV2Replied": {
  34592. "type": "object",
  34593. "properties": {
  34594. "id": {
  34595. "type": "string",
  34596. "pattern": "^evt_"
  34597. },
  34598. "type": {
  34599. "type": "string",
  34600. "enum": ["permission.v2.replied"]
  34601. },
  34602. "properties": {
  34603. "type": "object",
  34604. "properties": {
  34605. "sessionID": {
  34606. "type": "string",
  34607. "pattern": "^ses"
  34608. },
  34609. "requestID": {
  34610. "type": "string",
  34611. "pattern": "^per"
  34612. },
  34613. "reply": {
  34614. "$ref": "#/components/schemas/PermissionV2Reply"
  34615. }
  34616. },
  34617. "required": ["sessionID", "requestID", "reply"],
  34618. "additionalProperties": false
  34619. }
  34620. },
  34621. "required": ["id", "type", "properties"],
  34622. "additionalProperties": false
  34623. },
  34624. "EventPluginAdded": {
  34625. "type": "object",
  34626. "properties": {
  34627. "id": {
  34628. "type": "string",
  34629. "pattern": "^evt_"
  34630. },
  34631. "type": {
  34632. "type": "string",
  34633. "enum": ["plugin.added"]
  34634. },
  34635. "properties": {
  34636. "type": "object",
  34637. "properties": {
  34638. "id": {
  34639. "type": "string"
  34640. }
  34641. },
  34642. "required": ["id"],
  34643. "additionalProperties": false
  34644. }
  34645. },
  34646. "required": ["id", "type", "properties"],
  34647. "additionalProperties": false
  34648. },
  34649. "EventProjectDirectoriesUpdated": {
  34650. "type": "object",
  34651. "properties": {
  34652. "id": {
  34653. "type": "string",
  34654. "pattern": "^evt_"
  34655. },
  34656. "type": {
  34657. "type": "string",
  34658. "enum": ["project.directories.updated"]
  34659. },
  34660. "properties": {
  34661. "type": "object",
  34662. "properties": {
  34663. "projectID": {
  34664. "type": "string"
  34665. }
  34666. },
  34667. "required": ["projectID"],
  34668. "additionalProperties": false
  34669. }
  34670. },
  34671. "required": ["id", "type", "properties"],
  34672. "additionalProperties": false
  34673. },
  34674. "EventFileWatcherUpdated": {
  34675. "type": "object",
  34676. "properties": {
  34677. "id": {
  34678. "type": "string",
  34679. "pattern": "^evt_"
  34680. },
  34681. "type": {
  34682. "type": "string",
  34683. "enum": ["file.watcher.updated"]
  34684. },
  34685. "properties": {
  34686. "type": "object",
  34687. "properties": {
  34688. "file": {
  34689. "type": "string"
  34690. },
  34691. "event": {
  34692. "type": "string",
  34693. "enum": ["add", "change", "unlink"]
  34694. }
  34695. },
  34696. "required": ["file", "event"],
  34697. "additionalProperties": false
  34698. }
  34699. },
  34700. "required": ["id", "type", "properties"],
  34701. "additionalProperties": false
  34702. },
  34703. "EventPtyCreated": {
  34704. "type": "object",
  34705. "properties": {
  34706. "id": {
  34707. "type": "string",
  34708. "pattern": "^evt_"
  34709. },
  34710. "type": {
  34711. "type": "string",
  34712. "enum": ["pty.created"]
  34713. },
  34714. "properties": {
  34715. "type": "object",
  34716. "properties": {
  34717. "info": {
  34718. "$ref": "#/components/schemas/Pty"
  34719. }
  34720. },
  34721. "required": ["info"],
  34722. "additionalProperties": false
  34723. }
  34724. },
  34725. "required": ["id", "type", "properties"],
  34726. "additionalProperties": false
  34727. },
  34728. "EventPtyUpdated": {
  34729. "type": "object",
  34730. "properties": {
  34731. "id": {
  34732. "type": "string",
  34733. "pattern": "^evt_"
  34734. },
  34735. "type": {
  34736. "type": "string",
  34737. "enum": ["pty.updated"]
  34738. },
  34739. "properties": {
  34740. "type": "object",
  34741. "properties": {
  34742. "info": {
  34743. "$ref": "#/components/schemas/Pty"
  34744. }
  34745. },
  34746. "required": ["info"],
  34747. "additionalProperties": false
  34748. }
  34749. },
  34750. "required": ["id", "type", "properties"],
  34751. "additionalProperties": false
  34752. },
  34753. "EventPtyExited": {
  34754. "type": "object",
  34755. "properties": {
  34756. "id": {
  34757. "type": "string",
  34758. "pattern": "^evt_"
  34759. },
  34760. "type": {
  34761. "type": "string",
  34762. "enum": ["pty.exited"]
  34763. },
  34764. "properties": {
  34765. "type": "object",
  34766. "properties": {
  34767. "id": {
  34768. "type": "string",
  34769. "pattern": "^pty"
  34770. },
  34771. "exitCode": {
  34772. "type": "integer",
  34773. "minimum": 0
  34774. }
  34775. },
  34776. "required": ["id", "exitCode"],
  34777. "additionalProperties": false
  34778. }
  34779. },
  34780. "required": ["id", "type", "properties"],
  34781. "additionalProperties": false
  34782. },
  34783. "EventPtyDeleted": {
  34784. "type": "object",
  34785. "properties": {
  34786. "id": {
  34787. "type": "string",
  34788. "pattern": "^evt_"
  34789. },
  34790. "type": {
  34791. "type": "string",
  34792. "enum": ["pty.deleted"]
  34793. },
  34794. "properties": {
  34795. "type": "object",
  34796. "properties": {
  34797. "id": {
  34798. "type": "string",
  34799. "pattern": "^pty"
  34800. }
  34801. },
  34802. "required": ["id"],
  34803. "additionalProperties": false
  34804. }
  34805. },
  34806. "required": ["id", "type", "properties"],
  34807. "additionalProperties": false
  34808. },
  34809. "EventQuestionV2Asked": {
  34810. "type": "object",
  34811. "properties": {
  34812. "id": {
  34813. "type": "string",
  34814. "pattern": "^evt_"
  34815. },
  34816. "type": {
  34817. "type": "string",
  34818. "enum": ["question.v2.asked"]
  34819. },
  34820. "properties": {
  34821. "type": "object",
  34822. "properties": {
  34823. "id": {
  34824. "type": "string",
  34825. "pattern": "^que"
  34826. },
  34827. "sessionID": {
  34828. "type": "string",
  34829. "pattern": "^ses"
  34830. },
  34831. "questions": {
  34832. "type": "array",
  34833. "items": {
  34834. "$ref": "#/components/schemas/QuestionV2Info"
  34835. },
  34836. "description": "Questions to ask"
  34837. },
  34838. "tool": {
  34839. "$ref": "#/components/schemas/QuestionV2Tool"
  34840. }
  34841. },
  34842. "required": ["id", "sessionID", "questions"],
  34843. "additionalProperties": false
  34844. }
  34845. },
  34846. "required": ["id", "type", "properties"],
  34847. "additionalProperties": false
  34848. },
  34849. "EventQuestionV2Replied": {
  34850. "type": "object",
  34851. "properties": {
  34852. "id": {
  34853. "type": "string",
  34854. "pattern": "^evt_"
  34855. },
  34856. "type": {
  34857. "type": "string",
  34858. "enum": ["question.v2.replied"]
  34859. },
  34860. "properties": {
  34861. "type": "object",
  34862. "properties": {
  34863. "sessionID": {
  34864. "type": "string",
  34865. "pattern": "^ses"
  34866. },
  34867. "requestID": {
  34868. "type": "string",
  34869. "pattern": "^que"
  34870. },
  34871. "answers": {
  34872. "type": "array",
  34873. "items": {
  34874. "$ref": "#/components/schemas/QuestionV2Answer"
  34875. }
  34876. }
  34877. },
  34878. "required": ["sessionID", "requestID", "answers"],
  34879. "additionalProperties": false
  34880. }
  34881. },
  34882. "required": ["id", "type", "properties"],
  34883. "additionalProperties": false
  34884. },
  34885. "EventQuestionV2Rejected": {
  34886. "type": "object",
  34887. "properties": {
  34888. "id": {
  34889. "type": "string",
  34890. "pattern": "^evt_"
  34891. },
  34892. "type": {
  34893. "type": "string",
  34894. "enum": ["question.v2.rejected"]
  34895. },
  34896. "properties": {
  34897. "type": "object",
  34898. "properties": {
  34899. "sessionID": {
  34900. "type": "string",
  34901. "pattern": "^ses"
  34902. },
  34903. "requestID": {
  34904. "type": "string",
  34905. "pattern": "^que"
  34906. }
  34907. },
  34908. "required": ["sessionID", "requestID"],
  34909. "additionalProperties": false
  34910. }
  34911. },
  34912. "required": ["id", "type", "properties"],
  34913. "additionalProperties": false
  34914. },
  34915. "EventTodoUpdated": {
  34916. "type": "object",
  34917. "properties": {
  34918. "id": {
  34919. "type": "string",
  34920. "pattern": "^evt_"
  34921. },
  34922. "type": {
  34923. "type": "string",
  34924. "enum": ["todo.updated"]
  34925. },
  34926. "properties": {
  34927. "type": "object",
  34928. "properties": {
  34929. "sessionID": {
  34930. "type": "string",
  34931. "pattern": "^ses"
  34932. },
  34933. "todos": {
  34934. "type": "array",
  34935. "items": {
  34936. "$ref": "#/components/schemas/Todo"
  34937. }
  34938. }
  34939. },
  34940. "required": ["sessionID", "todos"],
  34941. "additionalProperties": false
  34942. }
  34943. },
  34944. "required": ["id", "type", "properties"],
  34945. "additionalProperties": false
  34946. },
  34947. "EventLspUpdated": {
  34948. "type": "object",
  34949. "properties": {
  34950. "id": {
  34951. "type": "string",
  34952. "pattern": "^evt_"
  34953. },
  34954. "type": {
  34955. "type": "string",
  34956. "enum": ["lsp.updated"]
  34957. },
  34958. "properties": {
  34959. "type": "object",
  34960. "properties": {}
  34961. }
  34962. },
  34963. "required": ["id", "type", "properties"],
  34964. "additionalProperties": false
  34965. },
  34966. "EventPermissionAsked": {
  34967. "type": "object",
  34968. "properties": {
  34969. "id": {
  34970. "type": "string",
  34971. "pattern": "^evt_"
  34972. },
  34973. "type": {
  34974. "type": "string",
  34975. "enum": ["permission.asked"]
  34976. },
  34977. "properties": {
  34978. "type": "object",
  34979. "properties": {
  34980. "id": {
  34981. "type": "string",
  34982. "pattern": "^per"
  34983. },
  34984. "sessionID": {
  34985. "type": "string",
  34986. "pattern": "^ses"
  34987. },
  34988. "permission": {
  34989. "type": "string"
  34990. },
  34991. "patterns": {
  34992. "type": "array",
  34993. "items": {
  34994. "type": "string"
  34995. }
  34996. },
  34997. "metadata": {
  34998. "type": "object"
  34999. },
  35000. "always": {
  35001. "type": "array",
  35002. "items": {
  35003. "type": "string"
  35004. }
  35005. },
  35006. "tool": {
  35007. "type": "object",
  35008. "properties": {
  35009. "messageID": {
  35010. "type": "string"
  35011. },
  35012. "callID": {
  35013. "type": "string"
  35014. }
  35015. },
  35016. "required": ["messageID", "callID"],
  35017. "additionalProperties": false
  35018. }
  35019. },
  35020. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  35021. "additionalProperties": false
  35022. }
  35023. },
  35024. "required": ["id", "type", "properties"],
  35025. "additionalProperties": false
  35026. },
  35027. "EventPermissionReplied": {
  35028. "type": "object",
  35029. "properties": {
  35030. "id": {
  35031. "type": "string",
  35032. "pattern": "^evt_"
  35033. },
  35034. "type": {
  35035. "type": "string",
  35036. "enum": ["permission.replied"]
  35037. },
  35038. "properties": {
  35039. "type": "object",
  35040. "properties": {
  35041. "sessionID": {
  35042. "type": "string",
  35043. "pattern": "^ses"
  35044. },
  35045. "requestID": {
  35046. "type": "string",
  35047. "pattern": "^per"
  35048. },
  35049. "reply": {
  35050. "type": "string",
  35051. "enum": ["once", "always", "reject"]
  35052. }
  35053. },
  35054. "required": ["sessionID", "requestID", "reply"],
  35055. "additionalProperties": false
  35056. }
  35057. },
  35058. "required": ["id", "type", "properties"],
  35059. "additionalProperties": false
  35060. },
  35061. "EventMcpToolsChanged": {
  35062. "type": "object",
  35063. "properties": {
  35064. "id": {
  35065. "type": "string",
  35066. "pattern": "^evt_"
  35067. },
  35068. "type": {
  35069. "type": "string",
  35070. "enum": ["mcp.tools.changed"]
  35071. },
  35072. "properties": {
  35073. "type": "object",
  35074. "properties": {
  35075. "server": {
  35076. "type": "string"
  35077. }
  35078. },
  35079. "required": ["server"],
  35080. "additionalProperties": false
  35081. }
  35082. },
  35083. "required": ["id", "type", "properties"],
  35084. "additionalProperties": false
  35085. },
  35086. "EventMcpBrowserOpenFailed": {
  35087. "type": "object",
  35088. "properties": {
  35089. "id": {
  35090. "type": "string",
  35091. "pattern": "^evt_"
  35092. },
  35093. "type": {
  35094. "type": "string",
  35095. "enum": ["mcp.browser.open.failed"]
  35096. },
  35097. "properties": {
  35098. "type": "object",
  35099. "properties": {
  35100. "mcpName": {
  35101. "type": "string"
  35102. },
  35103. "url": {
  35104. "type": "string"
  35105. }
  35106. },
  35107. "required": ["mcpName", "url"],
  35108. "additionalProperties": false
  35109. }
  35110. },
  35111. "required": ["id", "type", "properties"],
  35112. "additionalProperties": false
  35113. },
  35114. "EventCommandExecuted": {
  35115. "type": "object",
  35116. "properties": {
  35117. "id": {
  35118. "type": "string",
  35119. "pattern": "^evt_"
  35120. },
  35121. "type": {
  35122. "type": "string",
  35123. "enum": ["command.executed"]
  35124. },
  35125. "properties": {
  35126. "type": "object",
  35127. "properties": {
  35128. "name": {
  35129. "type": "string"
  35130. },
  35131. "sessionID": {
  35132. "type": "string",
  35133. "pattern": "^ses"
  35134. },
  35135. "arguments": {
  35136. "type": "string"
  35137. },
  35138. "messageID": {
  35139. "type": "string",
  35140. "pattern": "^msg"
  35141. }
  35142. },
  35143. "required": ["name", "sessionID", "arguments", "messageID"],
  35144. "additionalProperties": false
  35145. }
  35146. },
  35147. "required": ["id", "type", "properties"],
  35148. "additionalProperties": false
  35149. },
  35150. "EventProjectUpdated": {
  35151. "type": "object",
  35152. "properties": {
  35153. "id": {
  35154. "type": "string",
  35155. "pattern": "^evt_"
  35156. },
  35157. "type": {
  35158. "type": "string",
  35159. "enum": ["project.updated"]
  35160. },
  35161. "properties": {
  35162. "type": "object",
  35163. "properties": {
  35164. "id": {
  35165. "type": "string"
  35166. },
  35167. "worktree": {
  35168. "type": "string"
  35169. },
  35170. "vcs": {
  35171. "type": "string",
  35172. "enum": ["git"]
  35173. },
  35174. "name": {
  35175. "type": "string"
  35176. },
  35177. "icon": {
  35178. "type": "object",
  35179. "properties": {
  35180. "url": {
  35181. "type": "string"
  35182. },
  35183. "override": {
  35184. "type": "string"
  35185. },
  35186. "color": {
  35187. "type": "string"
  35188. }
  35189. },
  35190. "additionalProperties": false
  35191. },
  35192. "commands": {
  35193. "type": "object",
  35194. "properties": {
  35195. "start": {
  35196. "type": "string",
  35197. "description": "Startup script to run when creating a new workspace (worktree)"
  35198. }
  35199. },
  35200. "additionalProperties": false
  35201. },
  35202. "time": {
  35203. "type": "object",
  35204. "properties": {
  35205. "created": {
  35206. "type": "integer",
  35207. "minimum": 0
  35208. },
  35209. "updated": {
  35210. "type": "integer",
  35211. "minimum": 0
  35212. },
  35213. "initialized": {
  35214. "type": "integer",
  35215. "minimum": 0
  35216. }
  35217. },
  35218. "required": ["created", "updated"],
  35219. "additionalProperties": false
  35220. },
  35221. "sandboxes": {
  35222. "type": "array",
  35223. "items": {
  35224. "type": "string"
  35225. }
  35226. }
  35227. },
  35228. "required": ["id", "worktree", "time", "sandboxes"],
  35229. "additionalProperties": false
  35230. }
  35231. },
  35232. "required": ["id", "type", "properties"],
  35233. "additionalProperties": false
  35234. },
  35235. "EventSessionStatus": {
  35236. "type": "object",
  35237. "properties": {
  35238. "id": {
  35239. "type": "string",
  35240. "pattern": "^evt_"
  35241. },
  35242. "type": {
  35243. "type": "string",
  35244. "enum": ["session.status"]
  35245. },
  35246. "properties": {
  35247. "type": "object",
  35248. "properties": {
  35249. "sessionID": {
  35250. "type": "string",
  35251. "pattern": "^ses"
  35252. },
  35253. "status": {
  35254. "$ref": "#/components/schemas/SessionStatus"
  35255. }
  35256. },
  35257. "required": ["sessionID", "status"],
  35258. "additionalProperties": false
  35259. }
  35260. },
  35261. "required": ["id", "type", "properties"],
  35262. "additionalProperties": false
  35263. },
  35264. "EventSessionIdle": {
  35265. "type": "object",
  35266. "properties": {
  35267. "id": {
  35268. "type": "string",
  35269. "pattern": "^evt_"
  35270. },
  35271. "type": {
  35272. "type": "string",
  35273. "enum": ["session.idle"]
  35274. },
  35275. "properties": {
  35276. "type": "object",
  35277. "properties": {
  35278. "sessionID": {
  35279. "type": "string",
  35280. "pattern": "^ses"
  35281. }
  35282. },
  35283. "required": ["sessionID"],
  35284. "additionalProperties": false
  35285. }
  35286. },
  35287. "required": ["id", "type", "properties"],
  35288. "additionalProperties": false
  35289. },
  35290. "EventQuestionAsked": {
  35291. "type": "object",
  35292. "properties": {
  35293. "id": {
  35294. "type": "string",
  35295. "pattern": "^evt_"
  35296. },
  35297. "type": {
  35298. "type": "string",
  35299. "enum": ["question.asked"]
  35300. },
  35301. "properties": {
  35302. "type": "object",
  35303. "properties": {
  35304. "id": {
  35305. "type": "string",
  35306. "pattern": "^que"
  35307. },
  35308. "sessionID": {
  35309. "type": "string",
  35310. "pattern": "^ses"
  35311. },
  35312. "questions": {
  35313. "type": "array",
  35314. "items": {
  35315. "$ref": "#/components/schemas/QuestionInfo"
  35316. },
  35317. "description": "Questions to ask"
  35318. },
  35319. "tool": {
  35320. "$ref": "#/components/schemas/QuestionTool"
  35321. }
  35322. },
  35323. "required": ["id", "sessionID", "questions"],
  35324. "additionalProperties": false
  35325. }
  35326. },
  35327. "required": ["id", "type", "properties"],
  35328. "additionalProperties": false
  35329. },
  35330. "EventQuestionReplied": {
  35331. "type": "object",
  35332. "properties": {
  35333. "id": {
  35334. "type": "string",
  35335. "pattern": "^evt_"
  35336. },
  35337. "type": {
  35338. "type": "string",
  35339. "enum": ["question.replied"]
  35340. },
  35341. "properties": {
  35342. "type": "object",
  35343. "properties": {
  35344. "sessionID": {
  35345. "type": "string",
  35346. "pattern": "^ses"
  35347. },
  35348. "requestID": {
  35349. "type": "string",
  35350. "pattern": "^que"
  35351. },
  35352. "answers": {
  35353. "type": "array",
  35354. "items": {
  35355. "$ref": "#/components/schemas/QuestionAnswer"
  35356. }
  35357. }
  35358. },
  35359. "required": ["sessionID", "requestID", "answers"],
  35360. "additionalProperties": false
  35361. }
  35362. },
  35363. "required": ["id", "type", "properties"],
  35364. "additionalProperties": false
  35365. },
  35366. "EventQuestionRejected": {
  35367. "type": "object",
  35368. "properties": {
  35369. "id": {
  35370. "type": "string",
  35371. "pattern": "^evt_"
  35372. },
  35373. "type": {
  35374. "type": "string",
  35375. "enum": ["question.rejected"]
  35376. },
  35377. "properties": {
  35378. "type": "object",
  35379. "properties": {
  35380. "sessionID": {
  35381. "type": "string",
  35382. "pattern": "^ses"
  35383. },
  35384. "requestID": {
  35385. "type": "string",
  35386. "pattern": "^que"
  35387. }
  35388. },
  35389. "required": ["sessionID", "requestID"],
  35390. "additionalProperties": false
  35391. }
  35392. },
  35393. "required": ["id", "type", "properties"],
  35394. "additionalProperties": false
  35395. },
  35396. "EventSessionCompacted": {
  35397. "type": "object",
  35398. "properties": {
  35399. "id": {
  35400. "type": "string",
  35401. "pattern": "^evt_"
  35402. },
  35403. "type": {
  35404. "type": "string",
  35405. "enum": ["session.compacted"]
  35406. },
  35407. "properties": {
  35408. "type": "object",
  35409. "properties": {
  35410. "sessionID": {
  35411. "type": "string",
  35412. "pattern": "^ses"
  35413. }
  35414. },
  35415. "required": ["sessionID"],
  35416. "additionalProperties": false
  35417. }
  35418. },
  35419. "required": ["id", "type", "properties"],
  35420. "additionalProperties": false
  35421. },
  35422. "EventVcsBranchUpdated": {
  35423. "type": "object",
  35424. "properties": {
  35425. "id": {
  35426. "type": "string",
  35427. "pattern": "^evt_"
  35428. },
  35429. "type": {
  35430. "type": "string",
  35431. "enum": ["vcs.branch.updated"]
  35432. },
  35433. "properties": {
  35434. "type": "object",
  35435. "properties": {
  35436. "branch": {
  35437. "type": "string"
  35438. }
  35439. },
  35440. "additionalProperties": false
  35441. }
  35442. },
  35443. "required": ["id", "type", "properties"],
  35444. "additionalProperties": false
  35445. },
  35446. "EventWorkspaceReady": {
  35447. "type": "object",
  35448. "properties": {
  35449. "id": {
  35450. "type": "string",
  35451. "pattern": "^evt_"
  35452. },
  35453. "type": {
  35454. "type": "string",
  35455. "enum": ["workspace.ready"]
  35456. },
  35457. "properties": {
  35458. "type": "object",
  35459. "properties": {
  35460. "name": {
  35461. "type": "string"
  35462. }
  35463. },
  35464. "required": ["name"],
  35465. "additionalProperties": false
  35466. }
  35467. },
  35468. "required": ["id", "type", "properties"],
  35469. "additionalProperties": false
  35470. },
  35471. "EventWorkspaceFailed": {
  35472. "type": "object",
  35473. "properties": {
  35474. "id": {
  35475. "type": "string",
  35476. "pattern": "^evt_"
  35477. },
  35478. "type": {
  35479. "type": "string",
  35480. "enum": ["workspace.failed"]
  35481. },
  35482. "properties": {
  35483. "type": "object",
  35484. "properties": {
  35485. "message": {
  35486. "type": "string"
  35487. }
  35488. },
  35489. "required": ["message"],
  35490. "additionalProperties": false
  35491. }
  35492. },
  35493. "required": ["id", "type", "properties"],
  35494. "additionalProperties": false
  35495. },
  35496. "EventWorkspaceStatus": {
  35497. "type": "object",
  35498. "properties": {
  35499. "id": {
  35500. "type": "string",
  35501. "pattern": "^evt_"
  35502. },
  35503. "type": {
  35504. "type": "string",
  35505. "enum": ["workspace.status"]
  35506. },
  35507. "properties": {
  35508. "type": "object",
  35509. "properties": {
  35510. "workspaceID": {
  35511. "type": "string",
  35512. "pattern": "^wrk"
  35513. },
  35514. "status": {
  35515. "type": "string",
  35516. "enum": ["connected", "connecting", "disconnected", "error"]
  35517. }
  35518. },
  35519. "required": ["workspaceID", "status"],
  35520. "additionalProperties": false
  35521. }
  35522. },
  35523. "required": ["id", "type", "properties"],
  35524. "additionalProperties": false
  35525. },
  35526. "EventWorktreeReady": {
  35527. "type": "object",
  35528. "properties": {
  35529. "id": {
  35530. "type": "string",
  35531. "pattern": "^evt_"
  35532. },
  35533. "type": {
  35534. "type": "string",
  35535. "enum": ["worktree.ready"]
  35536. },
  35537. "properties": {
  35538. "type": "object",
  35539. "properties": {
  35540. "name": {
  35541. "type": "string"
  35542. },
  35543. "branch": {
  35544. "type": "string"
  35545. }
  35546. },
  35547. "required": ["name"],
  35548. "additionalProperties": false
  35549. }
  35550. },
  35551. "required": ["id", "type", "properties"],
  35552. "additionalProperties": false
  35553. },
  35554. "EventWorktreeFailed": {
  35555. "type": "object",
  35556. "properties": {
  35557. "id": {
  35558. "type": "string",
  35559. "pattern": "^evt_"
  35560. },
  35561. "type": {
  35562. "type": "string",
  35563. "enum": ["worktree.failed"]
  35564. },
  35565. "properties": {
  35566. "type": "object",
  35567. "properties": {
  35568. "message": {
  35569. "type": "string"
  35570. }
  35571. },
  35572. "required": ["message"],
  35573. "additionalProperties": false
  35574. }
  35575. },
  35576. "required": ["id", "type", "properties"],
  35577. "additionalProperties": false
  35578. },
  35579. "EventServerConnected": {
  35580. "type": "object",
  35581. "properties": {
  35582. "id": {
  35583. "type": "string",
  35584. "pattern": "^evt_"
  35585. },
  35586. "type": {
  35587. "type": "string",
  35588. "enum": ["server.connected"]
  35589. },
  35590. "properties": {
  35591. "type": "object",
  35592. "properties": {}
  35593. }
  35594. },
  35595. "required": ["id", "type", "properties"],
  35596. "additionalProperties": false
  35597. },
  35598. "EventGlobalDisposed": {
  35599. "type": "object",
  35600. "properties": {
  35601. "id": {
  35602. "type": "string",
  35603. "pattern": "^evt_"
  35604. },
  35605. "type": {
  35606. "type": "string",
  35607. "enum": ["global.disposed"]
  35608. },
  35609. "properties": {
  35610. "type": "object",
  35611. "properties": {}
  35612. }
  35613. },
  35614. "required": ["id", "type", "properties"],
  35615. "additionalProperties": false
  35616. },
  35617. "CredentialOAuth": {
  35618. "type": "object",
  35619. "properties": {
  35620. "type": {
  35621. "type": "string",
  35622. "enum": ["oauth"]
  35623. },
  35624. "methodID": {
  35625. "type": "string"
  35626. },
  35627. "refresh": {
  35628. "type": "string"
  35629. },
  35630. "access": {
  35631. "type": "string"
  35632. },
  35633. "expires": {
  35634. "type": "integer",
  35635. "minimum": 0
  35636. },
  35637. "metadata": {
  35638. "type": "object"
  35639. }
  35640. },
  35641. "required": ["type", "methodID", "refresh", "access", "expires"],
  35642. "additionalProperties": false
  35643. },
  35644. "CredentialKey": {
  35645. "type": "object",
  35646. "properties": {
  35647. "type": {
  35648. "type": "string",
  35649. "enum": ["key"]
  35650. },
  35651. "key": {
  35652. "type": "string"
  35653. },
  35654. "metadata": {
  35655. "type": "object"
  35656. }
  35657. },
  35658. "required": ["type", "key"],
  35659. "additionalProperties": false
  35660. },
  35661. "SkillV2DirectorySource": {
  35662. "type": "object",
  35663. "properties": {
  35664. "type": {
  35665. "type": "string",
  35666. "enum": ["directory"]
  35667. },
  35668. "path": {
  35669. "type": "string"
  35670. }
  35671. },
  35672. "required": ["type", "path"],
  35673. "additionalProperties": false
  35674. },
  35675. "SkillV2UrlSource": {
  35676. "type": "object",
  35677. "properties": {
  35678. "type": {
  35679. "type": "string",
  35680. "enum": ["url"]
  35681. },
  35682. "url": {
  35683. "type": "string"
  35684. }
  35685. },
  35686. "required": ["type", "url"],
  35687. "additionalProperties": false
  35688. },
  35689. "SkillV2EmbeddedSource": {
  35690. "type": "object",
  35691. "properties": {
  35692. "type": {
  35693. "type": "string",
  35694. "enum": ["embedded"]
  35695. },
  35696. "skill": {
  35697. "$ref": "#/components/schemas/SkillV2Info"
  35698. }
  35699. },
  35700. "required": ["type", "skill"],
  35701. "additionalProperties": false
  35702. },
  35703. "BadRequestError": {
  35704. "type": "object",
  35705. "required": ["name", "data"],
  35706. "properties": {
  35707. "name": {
  35708. "type": "string",
  35709. "enum": ["BadRequest"]
  35710. },
  35711. "data": {
  35712. "type": "object",
  35713. "required": ["message"],
  35714. "properties": {
  35715. "message": {
  35716. "type": "string"
  35717. },
  35718. "kind": {
  35719. "type": "string",
  35720. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  35721. }
  35722. }
  35723. }
  35724. }
  35725. }
  35726. }
  35727. },
  35728. "security": [],
  35729. "tags": [
  35730. {
  35731. "name": "control",
  35732. "description": "Control plane routes."
  35733. },
  35734. {
  35735. "name": "controlPlane",
  35736. "description": "Control-plane orchestration routes."
  35737. },
  35738. {
  35739. "name": "global",
  35740. "description": "Global server routes."
  35741. },
  35742. {
  35743. "name": "event",
  35744. "description": "Instance event stream route."
  35745. },
  35746. {
  35747. "name": "config",
  35748. "description": "Experimental HttpApi config routes."
  35749. },
  35750. {
  35751. "name": "experimental",
  35752. "description": "Experimental HttpApi read-only routes."
  35753. },
  35754. {
  35755. "name": "file",
  35756. "description": "Experimental HttpApi file routes."
  35757. },
  35758. {
  35759. "name": "instance",
  35760. "description": "Experimental HttpApi instance read routes."
  35761. },
  35762. {
  35763. "name": "mcp",
  35764. "description": "Experimental HttpApi MCP routes."
  35765. },
  35766. {
  35767. "name": "project",
  35768. "description": "Experimental HttpApi project routes."
  35769. },
  35770. {
  35771. "name": "projectCopy",
  35772. "description": "Project copy naming routes."
  35773. },
  35774. {
  35775. "name": "pty",
  35776. "description": "Experimental HttpApi PTY routes."
  35777. },
  35778. {
  35779. "name": "question",
  35780. "description": "Question routes."
  35781. },
  35782. {
  35783. "name": "permission",
  35784. "description": "Experimental HttpApi permission routes."
  35785. },
  35786. {
  35787. "name": "provider",
  35788. "description": "Experimental HttpApi provider routes."
  35789. },
  35790. {
  35791. "name": "session",
  35792. "description": "Experimental HttpApi session routes."
  35793. },
  35794. {
  35795. "name": "sync",
  35796. "description": "Experimental HttpApi sync routes."
  35797. },
  35798. {
  35799. "name": "tui",
  35800. "description": "Experimental HttpApi TUI routes."
  35801. },
  35802. {
  35803. "name": "workspace",
  35804. "description": "Experimental HttpApi workspace routes."
  35805. },
  35806. {
  35807. "name": "opencode HttpApi",
  35808. "description": "Experimental HttpApi surface for selected instance routes."
  35809. },
  35810. {
  35811. "name": "opencode HttpApi",
  35812. "description": "Experimental HttpApi surface for selected instance routes."
  35813. },
  35814. {
  35815. "name": "opencode HttpApi",
  35816. "description": "Experimental HttpApi surface for selected instance routes."
  35817. },
  35818. {
  35819. "name": "sessions",
  35820. "description": "Experimental session routes."
  35821. },
  35822. {
  35823. "name": "messages",
  35824. "description": "Experimental message routes."
  35825. },
  35826. {
  35827. "name": "models",
  35828. "description": "Experimental model routes."
  35829. },
  35830. {
  35831. "name": "providers",
  35832. "description": "Experimental provider routes."
  35833. },
  35834. {
  35835. "name": "integrations",
  35836. "description": "Integration discovery and authentication routes."
  35837. },
  35838. {
  35839. "name": "opencode HttpApi",
  35840. "description": "Experimental HttpApi surface for selected instance routes."
  35841. },
  35842. {
  35843. "name": "permissions",
  35844. "description": "Experimental permission routes."
  35845. },
  35846. {
  35847. "name": "filesystem",
  35848. "description": "Experimental location-scoped filesystem routes."
  35849. },
  35850. {
  35851. "name": "commands",
  35852. "description": "Experimental command routes."
  35853. },
  35854. {
  35855. "name": "skills",
  35856. "description": "Experimental skill routes."
  35857. },
  35858. {
  35859. "name": "events",
  35860. "description": "Experimental event stream route."
  35861. },
  35862. {
  35863. "name": "pty",
  35864. "description": "Experimental location-scoped PTY routes."
  35865. },
  35866. {
  35867. "name": "session questions",
  35868. "description": "Experimental session question routes."
  35869. },
  35870. {
  35871. "name": "reference",
  35872. "description": "Location-scoped project references."
  35873. },
  35874. {
  35875. "name": "projectCopy",
  35876. "description": "Project copy management routes."
  35877. },
  35878. {
  35879. "name": "pty",
  35880. "description": "PTY websocket route."
  35881. }
  35882. ]
  35883. }