openapi.json 1.1 MB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440274412744227443274442744527446274472744827449274502745127452274532745427455274562745727458274592746027461274622746327464274652746627467274682746927470274712747227473274742747527476274772747827479274802748127482274832748427485274862748727488274892749027491274922749327494274952749627497274982749927500275012750227503275042750527506275072750827509275102751127512275132751427515275162751727518275192752027521275222752327524275252752627527275282752927530275312753227533275342753527536275372753827539275402754127542275432754427545275462754727548275492755027551275522755327554275552755627557275582755927560275612756227563275642756527566275672756827569275702757127572275732757427575275762757727578275792758027581275822758327584275852758627587275882758927590275912759227593275942759527596275972759827599276002760127602276032760427605276062760727608276092761027611276122761327614276152761627617276182761927620276212762227623276242762527626276272762827629276302763127632276332763427635276362763727638276392764027641276422764327644276452764627647276482764927650276512765227653276542765527656276572765827659276602766127662276632766427665276662766727668276692767027671276722767327674276752767627677276782767927680276812768227683276842768527686276872768827689276902769127692276932769427695276962769727698276992770027701277022770327704277052770627707277082770927710277112771227713277142771527716277172771827719277202772127722277232772427725277262772727728277292773027731277322773327734277352773627737277382773927740277412774227743277442774527746277472774827749277502775127752277532775427755277562775727758277592776027761277622776327764277652776627767277682776927770277712777227773277742777527776277772777827779277802778127782277832778427785277862778727788277892779027791277922779327794277952779627797277982779927800278012780227803278042780527806278072780827809278102781127812278132781427815278162781727818278192782027821278222782327824278252782627827278282782927830278312783227833278342783527836278372783827839278402784127842278432784427845278462784727848278492785027851278522785327854278552785627857278582785927860278612786227863278642786527866278672786827869278702787127872278732787427875278762787727878278792788027881278822788327884278852788627887278882788927890278912789227893278942789527896278972789827899279002790127902279032790427905279062790727908279092791027911279122791327914279152791627917279182791927920279212792227923279242792527926279272792827929279302793127932279332793427935279362793727938279392794027941279422794327944279452794627947279482794927950279512795227953279542795527956279572795827959279602796127962279632796427965279662796727968279692797027971279722797327974279752797627977279782797927980279812798227983279842798527986279872798827989279902799127992279932799427995279962799727998279992800028001280022800328004280052800628007280082800928010280112801228013280142801528016280172801828019280202802128022280232802428025280262802728028280292803028031280322803328034280352803628037280382803928040280412804228043280442804528046280472804828049280502805128052280532805428055280562805728058280592806028061280622806328064280652806628067280682806928070280712807228073280742807528076280772807828079280802808128082280832808428085280862808728088280892809028091280922809328094280952809628097280982809928100281012810228103281042810528106281072810828109281102811128112281132811428115281162811728118281192812028121281222812328124281252812628127281282812928130281312813228133281342813528136281372813828139281402814128142281432814428145281462814728148281492815028151281522815328154281552815628157281582815928160281612816228163281642816528166281672816828169281702817128172281732817428175281762817728178281792818028181281822818328184281852818628187281882818928190281912819228193281942819528196281972819828199282002820128202282032820428205282062820728208282092821028211282122821328214282152821628217282182821928220282212822228223282242822528226282272822828229282302823128232282332823428235282362823728238282392824028241282422824328244282452824628247282482824928250282512825228253282542825528256282572825828259282602826128262282632826428265282662826728268282692827028271282722827328274282752827628277282782827928280282812828228283282842828528286282872828828289282902829128292282932829428295282962829728298282992830028301283022830328304283052830628307283082830928310283112831228313283142831528316283172831828319283202832128322283232832428325283262832728328283292833028331283322833328334283352833628337283382833928340283412834228343283442834528346283472834828349283502835128352283532835428355283562835728358283592836028361283622836328364283652836628367283682836928370283712837228373283742837528376283772837828379283802838128382283832838428385283862838728388283892839028391283922839328394283952839628397283982839928400284012840228403284042840528406284072840828409284102841128412284132841428415284162841728418284192842028421284222842328424284252842628427284282842928430284312843228433284342843528436284372843828439284402844128442284432844428445284462844728448284492845028451284522845328454284552845628457284582845928460284612846228463284642846528466284672846828469284702847128472284732847428475284762847728478284792848028481284822848328484284852848628487284882848928490284912849228493284942849528496284972849828499285002850128502285032850428505285062850728508285092851028511285122851328514285152851628517285182851928520285212852228523285242852528526285272852828529285302853128532285332853428535285362853728538285392854028541285422854328544285452854628547285482854928550285512855228553285542855528556285572855828559285602856128562285632856428565285662856728568285692857028571285722857328574285752857628577285782857928580285812858228583285842858528586285872858828589285902859128592285932859428595285962859728598285992860028601286022860328604286052860628607286082860928610286112861228613286142861528616286172861828619286202862128622286232862428625286262862728628286292863028631286322863328634286352863628637286382863928640286412864228643286442864528646286472864828649286502865128652286532865428655286562865728658286592866028661286622866328664286652866628667286682866928670286712867228673286742867528676286772867828679286802868128682286832868428685286862868728688286892869028691286922869328694286952869628697286982869928700287012870228703287042870528706287072870828709287102871128712287132871428715287162871728718287192872028721287222872328724287252872628727287282872928730287312873228733287342873528736287372873828739287402874128742287432874428745287462874728748287492875028751287522875328754287552875628757287582875928760287612876228763287642876528766287672876828769287702877128772287732877428775287762877728778287792878028781287822878328784287852878628787287882878928790287912879228793287942879528796287972879828799288002880128802288032880428805288062880728808288092881028811288122881328814288152881628817288182881928820288212882228823288242882528826288272882828829288302883128832288332883428835288362883728838288392884028841288422884328844288452884628847288482884928850288512885228853288542885528856288572885828859288602886128862288632886428865288662886728868288692887028871288722887328874288752887628877288782887928880288812888228883288842888528886288872888828889288902889128892288932889428895288962889728898288992890028901289022890328904289052890628907289082890928910289112891228913289142891528916289172891828919289202892128922289232892428925289262892728928289292893028931289322893328934289352893628937289382893928940289412894228943289442894528946289472894828949289502895128952289532895428955289562895728958289592896028961289622896328964289652896628967289682896928970289712897228973289742897528976289772897828979289802898128982289832898428985289862898728988289892899028991289922899328994289952899628997289982899929000290012900229003290042900529006290072900829009290102901129012290132901429015290162901729018290192902029021290222902329024290252902629027290282902929030290312903229033290342903529036290372903829039290402904129042290432904429045290462904729048290492905029051290522905329054290552905629057290582905929060290612906229063290642906529066290672906829069290702907129072290732907429075290762907729078290792908029081290822908329084290852908629087290882908929090290912909229093290942909529096290972909829099291002910129102291032910429105291062910729108291092911029111291122911329114291152911629117291182911929120291212912229123291242912529126291272912829129291302913129132291332913429135291362913729138291392914029141291422914329144291452914629147291482914929150291512915229153291542915529156291572915829159291602916129162291632916429165291662916729168291692917029171291722917329174291752917629177291782917929180291812918229183291842918529186291872918829189291902919129192291932919429195291962919729198291992920029201292022920329204292052920629207292082920929210292112921229213292142921529216292172921829219292202922129222292232922429225292262922729228292292923029231292322923329234292352923629237292382923929240292412924229243292442924529246292472924829249292502925129252292532925429255292562925729258292592926029261292622926329264292652926629267292682926929270292712927229273292742927529276292772927829279292802928129282292832928429285292862928729288292892929029291292922929329294292952929629297292982929929300293012930229303293042930529306293072930829309293102931129312293132931429315293162931729318293192932029321293222932329324293252932629327293282932929330293312933229333293342933529336293372933829339293402934129342293432934429345293462934729348293492935029351293522935329354293552935629357293582935929360293612936229363293642936529366293672936829369293702937129372293732937429375293762937729378293792938029381293822938329384293852938629387293882938929390293912939229393293942939529396293972939829399294002940129402294032940429405294062940729408294092941029411294122941329414294152941629417294182941929420294212942229423294242942529426294272942829429294302943129432294332943429435294362943729438294392944029441294422944329444294452944629447294482944929450294512945229453294542945529456294572945829459294602946129462294632946429465294662946729468294692947029471294722947329474294752947629477294782947929480294812948229483294842948529486294872948829489294902949129492294932949429495294962949729498294992950029501295022950329504295052950629507295082950929510295112951229513295142951529516295172951829519295202952129522295232952429525295262952729528295292953029531295322953329534295352953629537295382953929540295412954229543295442954529546295472954829549295502955129552295532955429555295562955729558295592956029561295622956329564295652956629567295682956929570295712957229573295742957529576295772957829579295802958129582295832958429585295862958729588295892959029591295922959329594295952959629597295982959929600296012960229603296042960529606296072960829609296102961129612296132961429615296162961729618296192962029621296222962329624296252962629627296282962929630296312963229633296342963529636296372963829639296402964129642296432964429645296462964729648296492965029651296522965329654296552965629657296582965929660296612966229663296642966529666296672966829669296702967129672296732967429675296762967729678296792968029681296822968329684296852968629687296882968929690296912969229693296942969529696296972969829699297002970129702297032970429705297062970729708297092971029711297122971329714297152971629717297182971929720297212972229723297242972529726297272972829729297302973129732297332973429735297362973729738297392974029741297422974329744297452974629747297482974929750297512975229753297542975529756297572975829759297602976129762297632976429765297662976729768297692977029771297722977329774297752977629777297782977929780297812978229783297842978529786297872978829789297902979129792297932979429795297962979729798297992980029801298022980329804298052980629807298082980929810298112981229813298142981529816298172981829819298202982129822298232982429825298262982729828298292983029831298322983329834298352983629837298382983929840298412984229843298442984529846298472984829849298502985129852298532985429855298562985729858298592986029861298622986329864298652986629867298682986929870298712987229873298742987529876298772987829879298802988129882298832988429885298862988729888298892989029891298922989329894298952989629897298982989929900299012990229903299042990529906299072990829909299102991129912299132991429915299162991729918299192992029921299222992329924299252992629927299282992929930299312993229933299342993529936299372993829939299402994129942299432994429945299462994729948299492995029951299522995329954299552995629957299582995929960299612996229963299642996529966299672996829969299702997129972299732997429975299762997729978299792998029981299822998329984299852998629987299882998929990299912999229993299942999529996299972999829999300003000130002300033000430005300063000730008300093001030011300123001330014300153001630017300183001930020300213002230023300243002530026300273002830029300303003130032300333003430035300363003730038300393004030041300423004330044300453004630047300483004930050300513005230053300543005530056300573005830059300603006130062300633006430065300663006730068300693007030071300723007330074300753007630077300783007930080300813008230083300843008530086300873008830089300903009130092300933009430095300963009730098300993010030101301023010330104301053010630107301083010930110301113011230113301143011530116301173011830119301203012130122301233012430125301263012730128301293013030131301323013330134301353013630137301383013930140301413014230143301443014530146301473014830149301503015130152301533015430155301563015730158301593016030161301623016330164301653016630167301683016930170301713017230173301743017530176301773017830179301803018130182301833018430185301863018730188301893019030191301923019330194301953019630197301983019930200302013020230203302043020530206302073020830209302103021130212302133021430215302163021730218302193022030221302223022330224302253022630227302283022930230302313023230233302343023530236302373023830239302403024130242302433024430245302463024730248302493025030251302523025330254302553025630257302583025930260302613026230263302643026530266302673026830269302703027130272302733027430275302763027730278302793028030281302823028330284302853028630287302883028930290302913029230293302943029530296302973029830299303003030130302303033030430305303063030730308303093031030311303123031330314303153031630317303183031930320303213032230323303243032530326303273032830329303303033130332303333033430335303363033730338303393034030341303423034330344303453034630347303483034930350303513035230353303543035530356303573035830359303603036130362303633036430365303663036730368303693037030371303723037330374303753037630377303783037930380303813038230383303843038530386303873038830389303903039130392303933039430395303963039730398303993040030401304023040330404304053040630407304083040930410304113041230413304143041530416304173041830419304203042130422304233042430425304263042730428304293043030431304323043330434304353043630437304383043930440304413044230443304443044530446304473044830449304503045130452304533045430455304563045730458304593046030461304623046330464304653046630467304683046930470304713047230473304743047530476304773047830479304803048130482304833048430485304863048730488304893049030491304923049330494304953049630497304983049930500305013050230503305043050530506305073050830509305103051130512305133051430515305163051730518305193052030521305223052330524305253052630527305283052930530305313053230533305343053530536305373053830539305403054130542305433054430545305463054730548305493055030551305523055330554305553055630557305583055930560305613056230563305643056530566305673056830569305703057130572305733057430575305763057730578305793058030581305823058330584305853058630587305883058930590305913059230593305943059530596305973059830599306003060130602306033060430605306063060730608306093061030611306123061330614306153061630617306183061930620306213062230623306243062530626306273062830629306303063130632306333063430635306363063730638306393064030641306423064330644306453064630647306483064930650306513065230653306543065530656306573065830659306603066130662306633066430665306663066730668306693067030671306723067330674306753067630677306783067930680306813068230683306843068530686306873068830689306903069130692306933069430695306963069730698306993070030701307023070330704307053070630707307083070930710307113071230713307143071530716307173071830719307203072130722307233072430725307263072730728307293073030731307323073330734307353073630737307383073930740307413074230743307443074530746307473074830749307503075130752307533075430755307563075730758307593076030761307623076330764307653076630767307683076930770307713077230773307743077530776307773077830779307803078130782307833078430785307863078730788307893079030791307923079330794307953079630797307983079930800308013080230803308043080530806308073080830809308103081130812308133081430815308163081730818308193082030821308223082330824308253082630827308283082930830308313083230833308343083530836308373083830839308403084130842308433084430845308463084730848308493085030851308523085330854308553085630857308583085930860308613086230863308643086530866308673086830869308703087130872308733087430875308763087730878308793088030881308823088330884308853088630887308883088930890308913089230893308943089530896308973089830899309003090130902309033090430905309063090730908309093091030911309123091330914309153091630917309183091930920309213092230923309243092530926309273092830929309303093130932309333093430935309363093730938309393094030941309423094330944309453094630947309483094930950309513095230953309543095530956309573095830959309603096130962309633096430965309663096730968309693097030971309723097330974309753097630977309783097930980309813098230983309843098530986309873098830989309903099130992309933099430995309963099730998309993100031001310023100331004310053100631007310083100931010310113101231013310143101531016310173101831019310203102131022310233102431025310263102731028310293103031031310323103331034310353103631037310383103931040310413104231043310443104531046310473104831049310503105131052310533105431055310563105731058310593106031061310623106331064310653106631067310683106931070310713107231073310743107531076310773107831079310803108131082310833108431085310863108731088310893109031091310923109331094310953109631097310983109931100311013110231103311043110531106311073110831109311103111131112311133111431115311163111731118311193112031121311223112331124311253112631127311283112931130311313113231133311343113531136311373113831139311403114131142311433114431145311463114731148311493115031151311523115331154311553115631157311583115931160311613116231163311643116531166311673116831169311703117131172311733117431175311763117731178311793118031181311823118331184311853118631187311883118931190311913119231193311943119531196311973119831199312003120131202312033120431205312063120731208312093121031211312123121331214312153121631217312183121931220312213122231223312243122531226312273122831229312303123131232312333123431235312363123731238312393124031241312423124331244312453124631247312483124931250312513125231253312543125531256312573125831259312603126131262312633126431265312663126731268312693127031271312723127331274312753127631277312783127931280312813128231283312843128531286312873128831289312903129131292312933129431295312963129731298312993130031301313023130331304313053130631307313083130931310313113131231313313143131531316313173131831319313203132131322313233132431325313263132731328313293133031331313323133331334313353133631337313383133931340313413134231343313443134531346313473134831349313503135131352313533135431355313563135731358313593136031361313623136331364313653136631367313683136931370313713137231373313743137531376313773137831379313803138131382313833138431385313863138731388313893139031391313923139331394313953139631397313983139931400314013140231403314043140531406314073140831409314103141131412314133141431415314163141731418314193142031421314223142331424314253142631427314283142931430314313143231433314343143531436314373143831439314403144131442314433144431445314463144731448314493145031451314523145331454314553145631457314583145931460314613146231463314643146531466314673146831469314703147131472314733147431475314763147731478314793148031481314823148331484314853148631487314883148931490314913149231493314943149531496314973149831499315003150131502315033150431505315063150731508315093151031511315123151331514315153151631517315183151931520315213152231523315243152531526315273152831529315303153131532315333153431535315363153731538315393154031541315423154331544315453154631547315483154931550315513155231553315543155531556315573155831559315603156131562315633156431565315663156731568315693157031571315723157331574315753157631577315783157931580315813158231583315843158531586315873158831589315903159131592315933159431595315963159731598315993160031601316023160331604316053160631607316083160931610316113161231613316143161531616316173161831619316203162131622316233162431625316263162731628316293163031631316323163331634316353163631637316383163931640316413164231643316443164531646316473164831649316503165131652316533165431655316563165731658316593166031661316623166331664316653166631667316683166931670316713167231673316743167531676316773167831679316803168131682316833168431685316863168731688316893169031691316923169331694316953169631697316983169931700317013170231703317043170531706317073170831709317103171131712317133171431715317163171731718317193172031721317223172331724317253172631727317283172931730317313173231733317343173531736317373173831739317403174131742317433174431745317463174731748317493175031751317523175331754317553175631757317583175931760317613176231763317643176531766317673176831769317703177131772317733177431775317763177731778317793178031781317823178331784317853178631787317883178931790317913179231793317943179531796317973179831799318003180131802318033180431805318063180731808318093181031811318123181331814318153181631817318183181931820318213182231823318243182531826318273182831829318303183131832318333183431835318363183731838318393184031841318423184331844318453184631847318483184931850318513185231853318543185531856318573185831859318603186131862318633186431865318663186731868318693187031871318723187331874318753187631877318783187931880318813188231883318843188531886318873188831889318903189131892318933189431895318963189731898318993190031901319023190331904319053190631907319083190931910319113191231913319143191531916319173191831919319203192131922319233192431925319263192731928319293193031931319323193331934319353193631937319383193931940319413194231943319443194531946319473194831949319503195131952319533195431955319563195731958319593196031961319623196331964319653196631967319683196931970319713197231973319743197531976319773197831979319803198131982319833198431985319863198731988319893199031991319923199331994319953199631997319983199932000320013200232003320043200532006320073200832009320103201132012320133201432015320163201732018320193202032021320223202332024320253202632027320283202932030320313203232033320343203532036320373203832039320403204132042320433204432045320463204732048320493205032051320523205332054320553205632057320583205932060320613206232063320643206532066320673206832069320703207132072320733207432075320763207732078320793208032081320823208332084320853208632087320883208932090320913209232093320943209532096320973209832099321003210132102321033210432105321063210732108321093211032111321123211332114321153211632117321183211932120321213212232123321243212532126321273212832129321303213132132321333213432135321363213732138321393214032141321423214332144321453214632147321483214932150321513215232153321543215532156321573215832159321603216132162321633216432165321663216732168321693217032171321723217332174321753217632177321783217932180321813218232183321843218532186321873218832189321903219132192321933219432195321963219732198321993220032201322023220332204322053220632207322083220932210322113221232213322143221532216322173221832219322203222132222322233222432225322263222732228322293223032231322323223332234322353223632237322383223932240322413224232243322443224532246322473224832249322503225132252322533225432255322563225732258322593226032261322623226332264322653226632267322683226932270322713227232273322743227532276322773227832279322803228132282322833228432285322863228732288322893229032291322923229332294322953229632297322983229932300323013230232303323043230532306323073230832309323103231132312323133231432315323163231732318323193232032321323223232332324323253232632327323283232932330323313233232333323343233532336323373233832339323403234132342323433234432345323463234732348323493235032351323523235332354323553235632357323583235932360323613236232363323643236532366323673236832369323703237132372323733237432375323763237732378323793238032381323823238332384323853238632387323883238932390323913239232393323943239532396323973239832399324003240132402324033240432405324063240732408324093241032411324123241332414324153241632417324183241932420324213242232423324243242532426324273242832429324303243132432324333243432435324363243732438324393244032441324423244332444324453244632447324483244932450324513245232453324543245532456324573245832459324603246132462324633246432465324663246732468324693247032471324723247332474324753247632477324783247932480324813248232483324843248532486324873248832489324903249132492324933249432495324963249732498324993250032501325023250332504325053250632507325083250932510325113251232513325143251532516325173251832519325203252132522325233252432525325263252732528325293253032531325323253332534325353253632537325383253932540325413254232543325443254532546325473254832549325503255132552325533255432555325563255732558325593256032561325623256332564325653256632567325683256932570325713257232573325743257532576325773257832579325803258132582325833258432585325863258732588325893259032591325923259332594325953259632597325983259932600326013260232603326043260532606326073260832609326103261132612326133261432615326163261732618326193262032621326223262332624326253262632627326283262932630326313263232633326343263532636326373263832639326403264132642326433264432645326463264732648326493265032651326523265332654326553265632657326583265932660326613266232663326643266532666326673266832669326703267132672326733267432675326763267732678326793268032681326823268332684326853268632687326883268932690326913269232693326943269532696326973269832699327003270132702327033270432705327063270732708327093271032711327123271332714327153271632717327183271932720327213272232723327243272532726327273272832729327303273132732327333273432735327363273732738327393274032741327423274332744327453274632747327483274932750327513275232753327543275532756327573275832759327603276132762327633276432765327663276732768327693277032771327723277332774327753277632777327783277932780327813278232783327843278532786327873278832789327903279132792327933279432795327963279732798327993280032801328023280332804328053280632807328083280932810328113281232813328143281532816328173281832819328203282132822328233282432825328263282732828328293283032831328323283332834328353283632837328383283932840328413284232843328443284532846328473284832849328503285132852328533285432855328563285732858328593286032861328623286332864328653286632867328683286932870328713287232873328743287532876328773287832879328803288132882328833288432885328863288732888328893289032891328923289332894328953289632897328983289932900329013290232903329043290532906329073290832909329103291132912329133291432915329163291732918329193292032921329223292332924329253292632927329283292932930329313293232933329343293532936329373293832939329403294132942329433294432945329463294732948329493295032951329523295332954329553295632957329583295932960329613296232963329643296532966329673296832969329703297132972329733297432975329763297732978329793298032981329823298332984329853298632987329883298932990329913299232993329943299532996329973299832999330003300133002330033300433005330063300733008330093301033011330123301333014330153301633017330183301933020330213302233023330243302533026330273302833029330303303133032330333303433035330363303733038330393304033041330423304333044330453304633047330483304933050330513305233053330543305533056330573305833059330603306133062330633306433065330663306733068330693307033071330723307333074330753307633077330783307933080330813308233083330843308533086330873308833089330903309133092330933309433095330963309733098330993310033101331023310333104331053310633107331083310933110331113311233113331143311533116331173311833119331203312133122331233312433125331263312733128331293313033131331323313333134331353313633137331383313933140331413314233143331443314533146331473314833149331503315133152331533315433155331563315733158331593316033161331623316333164331653316633167331683316933170331713317233173331743317533176331773317833179331803318133182331833318433185331863318733188331893319033191331923319333194331953319633197331983319933200332013320233203332043320533206332073320833209332103321133212332133321433215332163321733218332193322033221332223322333224332253322633227332283322933230332313323233233332343323533236332373323833239332403324133242332433324433245332463324733248332493325033251332523325333254332553325633257332583325933260332613326233263332643326533266332673326833269332703327133272332733327433275332763327733278332793328033281332823328333284332853328633287332883328933290332913329233293332943329533296332973329833299333003330133302333033330433305333063330733308333093331033311333123331333314333153331633317333183331933320333213332233323333243332533326333273332833329333303333133332333333333433335333363333733338333393334033341333423334333344333453334633347333483334933350333513335233353333543335533356333573335833359333603336133362333633336433365333663336733368333693337033371333723337333374333753337633377333783337933380333813338233383333843338533386333873338833389333903339133392333933339433395333963339733398333993340033401334023340333404334053340633407334083340933410334113341233413334143341533416334173341833419334203342133422334233342433425334263342733428334293343033431334323343333434334353343633437334383343933440334413344233443334443344533446334473344833449334503345133452334533345433455334563345733458334593346033461334623346333464334653346633467334683346933470334713347233473334743347533476334773347833479334803348133482334833348433485334863348733488334893349033491334923349333494334953349633497334983349933500335013350233503335043350533506335073350833509335103351133512335133351433515335163351733518335193352033521335223352333524335253352633527335283352933530335313353233533335343353533536335373353833539335403354133542335433354433545335463354733548335493355033551335523355333554335553355633557335583355933560335613356233563335643356533566335673356833569335703357133572335733357433575335763357733578335793358033581335823358333584335853358633587335883358933590335913359233593335943359533596335973359833599336003360133602336033360433605336063360733608336093361033611336123361333614336153361633617336183361933620336213362233623336243362533626336273362833629336303363133632336333363433635336363363733638336393364033641336423364333644336453364633647336483364933650336513365233653336543365533656336573365833659336603366133662336633366433665336663366733668336693367033671336723367333674336753367633677336783367933680336813368233683336843368533686336873368833689336903369133692336933369433695336963369733698336993370033701337023370333704337053370633707337083370933710337113371233713337143371533716337173371833719337203372133722337233372433725337263372733728337293373033731337323373333734337353373633737337383373933740337413374233743337443374533746337473374833749337503375133752337533375433755337563375733758337593376033761337623376333764337653376633767337683376933770337713377233773337743377533776337773377833779337803378133782337833378433785337863378733788337893379033791337923379333794337953379633797337983379933800338013380233803338043380533806338073380833809338103381133812338133381433815338163381733818338193382033821338223382333824338253382633827338283382933830338313383233833338343383533836338373383833839338403384133842338433384433845338463384733848338493385033851338523385333854338553385633857338583385933860338613386233863338643386533866338673386833869338703387133872338733387433875338763387733878338793388033881338823388333884338853388633887338883388933890338913389233893338943389533896338973389833899339003390133902339033390433905339063390733908339093391033911339123391333914339153391633917339183391933920339213392233923339243392533926339273392833929339303393133932339333393433935339363393733938339393394033941339423394333944339453394633947339483394933950339513395233953339543395533956339573395833959339603396133962339633396433965339663396733968339693397033971339723397333974339753397633977339783397933980339813398233983339843398533986339873398833989339903399133992339933399433995339963399733998339993400034001340023400334004340053400634007340083400934010340113401234013340143401534016340173401834019340203402134022340233402434025340263402734028340293403034031340323403334034340353403634037340383403934040340413404234043340443404534046340473404834049340503405134052340533405434055340563405734058340593406034061340623406334064340653406634067340683406934070340713407234073340743407534076340773407834079340803408134082340833408434085340863408734088340893409034091340923409334094340953409634097340983409934100341013410234103341043410534106341073410834109341103411134112341133411434115341163411734118341193412034121341223412334124341253412634127341283412934130341313413234133341343413534136341373413834139341403414134142341433414434145341463414734148341493415034151341523415334154341553415634157341583415934160341613416234163341643416534166341673416834169341703417134172341733417434175341763417734178341793418034181341823418334184341853418634187341883418934190341913419234193341943419534196341973419834199342003420134202342033420434205342063420734208342093421034211342123421334214342153421634217342183421934220342213422234223342243422534226342273422834229342303423134232342333423434235342363423734238342393424034241342423424334244342453424634247342483424934250342513425234253342543425534256342573425834259342603426134262342633426434265342663426734268342693427034271342723427334274342753427634277342783427934280342813428234283342843428534286342873428834289342903429134292342933429434295342963429734298342993430034301343023430334304343053430634307343083430934310343113431234313343143431534316343173431834319343203432134322343233432434325343263432734328343293433034331343323433334334343353433634337343383433934340343413434234343343443434534346343473434834349343503435134352343533435434355343563435734358343593436034361343623436334364343653436634367343683436934370343713437234373343743437534376343773437834379343803438134382343833438434385343863438734388343893439034391343923439334394343953439634397343983439934400344013440234403344043440534406344073440834409344103441134412344133441434415344163441734418344193442034421344223442334424344253442634427344283442934430344313443234433344343443534436344373443834439344403444134442344433444434445344463444734448344493445034451344523445334454344553445634457344583445934460344613446234463344643446534466344673446834469344703447134472344733447434475344763447734478344793448034481344823448334484344853448634487344883448934490344913449234493344943449534496344973449834499345003450134502345033450434505345063450734508345093451034511345123451334514345153451634517345183451934520345213452234523345243452534526345273452834529345303453134532345333453434535345363453734538345393454034541345423454334544345453454634547345483454934550345513455234553345543455534556345573455834559345603456134562345633456434565345663456734568345693457034571345723457334574345753457634577345783457934580345813458234583345843458534586345873458834589345903459134592345933459434595345963459734598345993460034601346023460334604346053460634607346083460934610346113461234613346143461534616346173461834619346203462134622346233462434625346263462734628346293463034631346323463334634346353463634637346383463934640346413464234643346443464534646346473464834649346503465134652346533465434655346563465734658346593466034661346623466334664346653466634667346683466934670346713467234673346743467534676346773467834679346803468134682346833468434685346863468734688346893469034691346923469334694346953469634697346983469934700347013470234703347043470534706347073470834709347103471134712347133471434715347163471734718347193472034721347223472334724347253472634727347283472934730347313473234733347343473534736347373473834739347403474134742347433474434745347463474734748347493475034751347523475334754347553475634757347583475934760347613476234763347643476534766347673476834769347703477134772347733477434775347763477734778347793478034781347823478334784347853478634787347883478934790347913479234793347943479534796347973479834799348003480134802348033480434805348063480734808348093481034811348123481334814348153481634817348183481934820348213482234823348243482534826348273482834829348303483134832348333483434835348363483734838348393484034841348423484334844348453484634847348483484934850348513485234853348543485534856348573485834859348603486134862348633486434865348663486734868348693487034871348723487334874348753487634877348783487934880348813488234883348843488534886348873488834889348903489134892348933489434895348963489734898348993490034901349023490334904349053490634907349083490934910349113491234913349143491534916349173491834919349203492134922349233492434925349263492734928349293493034931349323493334934349353493634937349383493934940349413494234943349443494534946349473494834949349503495134952349533495434955349563495734958349593496034961349623496334964349653496634967349683496934970349713497234973349743497534976349773497834979349803498134982349833498434985349863498734988349893499034991349923499334994349953499634997349983499935000350013500235003350043500535006350073500835009350103501135012350133501435015350163501735018350193502035021350223502335024350253502635027350283502935030350313503235033350343503535036350373503835039350403504135042350433504435045350463504735048350493505035051350523505335054350553505635057350583505935060350613506235063350643506535066350673506835069350703507135072350733507435075350763507735078350793508035081350823508335084350853508635087350883508935090350913509235093350943509535096350973509835099351003510135102351033510435105351063510735108351093511035111351123511335114351153511635117351183511935120351213512235123351243512535126351273512835129351303513135132351333513435135351363513735138351393514035141351423514335144351453514635147351483514935150351513515235153351543515535156351573515835159351603516135162351633516435165351663516735168351693517035171351723517335174351753517635177351783517935180351813518235183351843518535186351873518835189351903519135192351933519435195351963519735198351993520035201352023520335204352053520635207352083520935210352113521235213352143521535216352173521835219352203522135222352233522435225352263522735228352293523035231352323523335234352353523635237352383523935240352413524235243352443524535246352473524835249352503525135252352533525435255352563525735258352593526035261352623526335264352653526635267352683526935270352713527235273352743527535276352773527835279352803528135282352833528435285352863528735288352893529035291352923529335294352953529635297352983529935300353013530235303353043530535306353073530835309353103531135312353133531435315353163531735318353193532035321353223532335324353253532635327353283532935330353313533235333353343533535336353373533835339353403534135342353433534435345353463534735348353493535035351353523535335354353553535635357353583535935360353613536235363353643536535366353673536835369353703537135372353733537435375353763537735378353793538035381353823538335384353853538635387353883538935390353913539235393353943539535396353973539835399354003540135402354033540435405354063540735408354093541035411354123541335414354153541635417354183541935420354213542235423354243542535426354273542835429354303543135432354333543435435354363543735438354393544035441354423544335444354453544635447354483544935450354513545235453354543545535456354573545835459354603546135462354633546435465354663546735468354693547035471354723547335474354753547635477354783547935480354813548235483354843548535486354873548835489354903549135492354933549435495354963549735498354993550035501355023550335504355053550635507355083550935510355113551235513355143551535516355173551835519355203552135522355233552435525355263552735528355293553035531355323553335534355353553635537355383553935540355413554235543355443554535546355473554835549355503555135552355533555435555355563555735558355593556035561355623556335564355653556635567355683556935570355713557235573355743557535576355773557835579355803558135582355833558435585355863558735588355893559035591355923559335594355953559635597355983559935600356013560235603356043560535606356073560835609356103561135612356133561435615356163561735618356193562035621356223562335624356253562635627356283562935630356313563235633356343563535636356373563835639356403564135642356433564435645356463564735648356493565035651356523565335654356553565635657356583565935660356613566235663356643566535666356673566835669356703567135672356733567435675356763567735678356793568035681356823568335684356853568635687356883568935690356913569235693356943569535696356973569835699357003570135702357033570435705357063570735708357093571035711357123571335714357153571635717357183571935720357213572235723357243572535726357273572835729357303573135732357333573435735357363573735738357393574035741357423574335744357453574635747357483574935750357513575235753357543575535756357573575835759357603576135762357633576435765357663576735768357693577035771357723577335774357753577635777357783577935780357813578235783357843578535786357873578835789357903579135792357933579435795357963579735798357993580035801358023580335804358053580635807358083580935810358113581235813358143581535816358173581835819358203582135822358233582435825358263582735828358293583035831358323583335834358353583635837358383583935840358413584235843358443584535846358473584835849358503585135852358533585435855358563585735858358593586035861358623586335864358653586635867358683586935870358713587235873358743587535876358773587835879358803588135882358833588435885358863588735888358893589035891358923589335894358953589635897358983589935900359013590235903359043590535906359073590835909359103591135912359133591435915359163591735918359193592035921359223592335924359253592635927359283592935930359313593235933359343593535936359373593835939359403594135942359433594435945359463594735948359493595035951359523595335954359553595635957359583595935960359613596235963359643596535966359673596835969359703597135972359733597435975359763597735978359793598035981359823598335984359853598635987359883598935990359913599235993359943599535996359973599835999360003600136002360033600436005360063600736008360093601036011360123601336014360153601636017360183601936020360213602236023360243602536026360273602836029360303603136032360333603436035360363603736038360393604036041360423604336044360453604636047360483604936050360513605236053360543605536056360573605836059360603606136062360633606436065360663606736068360693607036071360723607336074360753607636077360783607936080360813608236083360843608536086360873608836089360903609136092360933609436095360963609736098360993610036101361023610336104361053610636107361083610936110361113611236113361143611536116361173611836119361203612136122361233612436125361263612736128361293613036131361323613336134361353613636137361383613936140361413614236143361443614536146361473614836149361503615136152361533615436155361563615736158361593616036161361623616336164361653616636167361683616936170361713617236173361743617536176361773617836179361803618136182361833618436185361863618736188361893619036191361923619336194361953619636197361983619936200362013620236203362043620536206362073620836209362103621136212362133621436215362163621736218362193622036221362223622336224362253622636227362283622936230362313623236233362343623536236362373623836239362403624136242362433624436245362463624736248362493625036251362523625336254362553625636257362583625936260362613626236263362643626536266362673626836269362703627136272362733627436275362763627736278362793628036281362823628336284362853628636287362883628936290362913629236293362943629536296362973629836299363003630136302363033630436305363063630736308363093631036311363123631336314363153631636317363183631936320363213632236323363243632536326363273632836329363303633136332363333633436335363363633736338363393634036341363423634336344363453634636347363483634936350363513635236353363543635536356363573635836359363603636136362363633636436365363663636736368363693637036371363723637336374363753637636377363783637936380363813638236383363843638536386363873638836389363903639136392363933639436395363963639736398363993640036401364023640336404364053640636407364083640936410364113641236413364143641536416364173641836419364203642136422364233642436425364263642736428364293643036431364323643336434364353643636437364383643936440364413644236443364443644536446364473644836449364503645136452364533645436455364563645736458364593646036461364623646336464364653646636467364683646936470364713647236473364743647536476364773647836479364803648136482364833648436485364863648736488364893649036491364923649336494364953649636497364983649936500365013650236503365043650536506365073650836509365103651136512365133651436515365163651736518365193652036521365223652336524365253652636527365283652936530365313653236533365343653536536365373653836539365403654136542365433654436545365463654736548365493655036551365523655336554365553655636557365583655936560365613656236563365643656536566365673656836569365703657136572365733657436575365763657736578365793658036581365823658336584365853658636587365883658936590365913659236593365943659536596365973659836599366003660136602366033660436605366063660736608366093661036611366123661336614366153661636617366183661936620366213662236623366243662536626366273662836629366303663136632366333663436635366363663736638366393664036641366423664336644366453664636647366483664936650366513665236653366543665536656366573665836659366603666136662366633666436665366663666736668366693667036671366723667336674366753667636677366783667936680366813668236683366843668536686366873668836689366903669136692366933669436695366963669736698366993670036701367023670336704367053670636707367083670936710367113671236713367143671536716367173671836719367203672136722367233672436725367263672736728367293673036731367323673336734367353673636737367383673936740367413674236743367443674536746367473674836749367503675136752367533675436755367563675736758367593676036761367623676336764367653676636767367683676936770367713677236773367743677536776367773677836779367803678136782367833678436785367863678736788367893679036791367923679336794367953679636797367983679936800368013680236803368043680536806368073680836809368103681136812368133681436815368163681736818368193682036821368223682336824368253682636827368283682936830368313683236833368343683536836368373683836839368403684136842368433684436845368463684736848368493685036851368523685336854368553685636857368583685936860368613686236863368643686536866368673686836869368703687136872368733687436875368763687736878368793688036881368823688336884368853688636887368883688936890368913689236893368943689536896368973689836899369003690136902369033690436905369063690736908369093691036911369123691336914369153691636917369183691936920369213692236923369243692536926369273692836929369303693136932369333693436935369363693736938369393694036941369423694336944369453694636947369483694936950369513695236953369543695536956369573695836959369603696136962369633696436965369663696736968369693697036971369723697336974369753697636977369783697936980369813698236983369843698536986369873698836989369903699136992369933699436995369963699736998369993700037001370023700337004370053700637007370083700937010370113701237013370143701537016370173701837019370203702137022370233702437025370263702737028370293703037031370323703337034370353703637037370383703937040370413704237043370443704537046370473704837049370503705137052370533705437055370563705737058370593706037061370623706337064370653706637067370683706937070370713707237073370743707537076370773707837079370803708137082370833708437085370863708737088370893709037091370923709337094370953709637097370983709937100371013710237103371043710537106371073710837109371103711137112371133711437115371163711737118371193712037121371223712337124371253712637127371283712937130371313713237133371343713537136371373713837139371403714137142371433714437145371463714737148371493715037151371523715337154371553715637157371583715937160371613716237163371643716537166371673716837169371703717137172371733717437175371763717737178371793718037181371823718337184371853718637187371883718937190371913719237193371943719537196371973719837199372003720137202372033720437205372063720737208372093721037211372123721337214372153721637217372183721937220372213722237223372243722537226372273722837229372303723137232372333723437235372363723737238372393724037241372423724337244372453724637247372483724937250372513725237253372543725537256372573725837259372603726137262372633726437265372663726737268372693727037271372723727337274372753727637277372783727937280372813728237283372843728537286372873728837289372903729137292372933729437295372963729737298372993730037301373023730337304373053730637307373083730937310373113731237313373143731537316373173731837319373203732137322373233732437325373263732737328373293733037331373323733337334373353733637337373383733937340373413734237343373443734537346373473734837349373503735137352373533735437355373563735737358373593736037361373623736337364373653736637367373683736937370373713737237373373743737537376373773737837379373803738137382373833738437385373863738737388373893739037391373923739337394373953739637397373983739937400374013740237403374043740537406374073740837409374103741137412374133741437415374163741737418374193742037421374223742337424374253742637427374283742937430374313743237433374343743537436374373743837439374403744137442374433744437445374463744737448374493745037451374523745337454374553745637457374583745937460374613746237463374643746537466374673746837469374703747137472374733747437475374763747737478374793748037481374823748337484374853748637487374883748937490374913749237493374943749537496374973749837499375003750137502375033750437505375063750737508375093751037511375123751337514375153751637517375183751937520375213752237523375243752537526375273752837529375303753137532375333753437535375363753737538375393754037541375423754337544375453754637547375483754937550375513755237553375543755537556375573755837559375603756137562375633756437565375663756737568375693757037571375723757337574375753757637577375783757937580375813758237583375843758537586375873758837589375903759137592375933759437595375963759737598375993760037601376023760337604376053760637607376083760937610376113761237613376143761537616376173761837619376203762137622376233762437625376263762737628376293763037631376323763337634376353763637637376383763937640376413764237643376443764537646376473764837649376503765137652376533765437655376563765737658376593766037661376623766337664376653766637667376683766937670376713767237673376743767537676376773767837679376803768137682376833768437685376863768737688376893769037691376923769337694376953769637697376983769937700377013770237703377043770537706377073770837709377103771137712377133771437715377163771737718377193772037721377223772337724377253772637727377283772937730377313773237733377343773537736377373773837739377403774137742377433774437745377463774737748377493775037751377523775337754377553775637757377583775937760377613776237763377643776537766377673776837769377703777137772377733777437775377763777737778377793778037781377823778337784377853778637787377883778937790377913779237793377943779537796377973779837799378003780137802378033780437805378063780737808378093781037811378123781337814378153781637817378183781937820378213782237823378243782537826378273782837829378303783137832378333783437835378363783737838378393784037841378423784337844378453784637847378483784937850378513785237853378543785537856378573785837859378603786137862378633786437865378663786737868378693787037871378723787337874378753787637877378783787937880378813788237883378843788537886378873788837889378903789137892378933789437895378963789737898378993790037901379023790337904379053790637907379083790937910379113791237913379143791537916379173791837919379203792137922379233792437925379263792737928379293793037931379323793337934379353793637937379383793937940379413794237943379443794537946379473794837949379503795137952379533795437955379563795737958379593796037961379623796337964379653796637967379683796937970379713797237973379743797537976379773797837979379803798137982379833798437985379863798737988379893799037991379923799337994379953799637997379983799938000380013800238003380043800538006380073800838009380103801138012380133801438015380163801738018380193802038021380223802338024380253802638027380283802938030380313803238033380343803538036380373803838039380403804138042380433804438045380463804738048380493805038051380523805338054380553805638057380583805938060380613806238063380643806538066380673806838069380703807138072380733807438075380763807738078380793808038081380823808338084380853808638087380883808938090380913809238093380943809538096380973809838099381003810138102381033810438105381063810738108381093811038111381123811338114381153811638117381183811938120381213812238123381243812538126381273812838129381303813138132381333813438135381363813738138381393814038141381423814338144381453814638147381483814938150381513815238153381543815538156381573815838159381603816138162381633816438165381663816738168381693817038171381723817338174381753817638177381783817938180381813818238183381843818538186381873818838189381903819138192381933819438195381963819738198381993820038201382023820338204382053820638207382083820938210382113821238213382143821538216382173821838219382203822138222382233822438225382263822738228382293823038231382323823338234382353823638237382383823938240382413824238243382443824538246382473824838249382503825138252382533825438255382563825738258382593826038261382623826338264382653826638267382683826938270382713827238273382743827538276382773827838279382803828138282382833828438285382863828738288382893829038291382923829338294382953829638297382983829938300383013830238303383043830538306383073830838309383103831138312383133831438315383163831738318383193832038321383223832338324383253832638327383283832938330383313833238333383343833538336383373833838339383403834138342383433834438345383463834738348383493835038351383523835338354383553835638357383583835938360383613836238363383643836538366383673836838369383703837138372383733837438375383763837738378383793838038381383823838338384383853838638387383883838938390383913839238393383943839538396383973839838399384003840138402384033840438405384063840738408384093841038411384123841338414384153841638417384183841938420384213842238423384243842538426384273842838429384303843138432384333843438435384363843738438384393844038441384423844338444384453844638447384483844938450384513845238453384543845538456384573845838459384603846138462384633846438465384663846738468384693847038471384723847338474384753847638477384783847938480384813848238483384843848538486384873848838489384903849138492384933849438495384963849738498384993850038501385023850338504385053850638507385083850938510385113851238513385143851538516385173851838519385203852138522385233852438525385263852738528385293853038531385323853338534385353853638537385383853938540385413854238543385443854538546385473854838549385503855138552385533855438555385563855738558385593856038561385623856338564385653856638567385683856938570385713857238573385743857538576385773857838579385803858138582385833858438585385863858738588385893859038591385923859338594385953859638597385983859938600386013860238603386043860538606386073860838609386103861138612386133861438615386163861738618386193862038621386223862338624386253862638627386283862938630386313863238633386343863538636386373863838639386403864138642386433864438645386463864738648386493865038651386523865338654386553865638657386583865938660386613866238663386643866538666386673866838669386703867138672386733867438675386763867738678386793868038681386823868338684386853868638687386883868938690386913869238693386943869538696386973869838699387003870138702387033870438705387063870738708387093871038711387123871338714387153871638717387183871938720387213872238723387243872538726387273872838729387303873138732387333873438735387363873738738387393874038741387423874338744387453874638747387483874938750387513875238753387543875538756387573875838759387603876138762387633876438765387663876738768387693877038771387723877338774387753877638777387783877938780387813878238783387843878538786387873878838789387903879138792387933879438795387963879738798387993880038801388023880338804388053880638807388083880938810388113881238813388143881538816388173881838819388203882138822388233882438825388263882738828388293883038831388323883338834388353883638837388383883938840388413884238843388443884538846388473884838849388503885138852388533885438855388563885738858388593886038861388623886338864388653886638867388683886938870388713887238873388743887538876388773887838879388803888138882388833888438885388863888738888388893889038891388923889338894388953889638897388983889938900389013890238903389043890538906389073890838909389103891138912389133891438915389163891738918389193892038921389223892338924389253892638927389283892938930389313893238933389343893538936389373893838939389403894138942389433894438945389463894738948389493895038951389523895338954389553895638957389583895938960389613896238963389643896538966389673896838969389703897138972389733897438975389763897738978389793898038981389823898338984389853898638987389883898938990389913899238993389943899538996389973899838999390003900139002390033900439005390063900739008390093901039011390123901339014390153901639017390183901939020390213902239023390243902539026390273902839029390303903139032390333903439035390363903739038390393904039041390423904339044390453904639047390483904939050390513905239053390543905539056390573905839059390603906139062390633906439065390663906739068390693907039071390723907339074390753907639077390783907939080390813908239083390843908539086390873908839089390903909139092390933909439095390963909739098390993910039101391023910339104391053910639107391083910939110391113911239113391143911539116391173911839119391203912139122391233912439125391263912739128391293913039131391323913339134391353913639137391383913939140391413914239143391443914539146391473914839149391503915139152391533915439155391563915739158391593916039161391623916339164391653916639167391683916939170391713917239173391743917539176391773917839179391803918139182391833918439185391863918739188391893919039191391923919339194391953919639197391983919939200392013920239203392043920539206392073920839209392103921139212392133921439215392163921739218392193922039221392223922339224392253922639227392283922939230392313923239233392343923539236392373923839239392403924139242392433924439245392463924739248392493925039251392523925339254392553925639257392583925939260392613926239263392643926539266392673926839269392703927139272392733927439275392763927739278392793928039281392823928339284392853928639287392883928939290392913929239293392943929539296392973929839299393003930139302393033930439305393063930739308393093931039311393123931339314393153931639317393183931939320393213932239323393243932539326393273932839329393303933139332393333933439335393363933739338393393934039341393423934339344393453934639347393483934939350393513935239353393543935539356393573935839359393603936139362393633936439365393663936739368393693937039371393723937339374393753937639377393783937939380393813938239383393843938539386393873938839389393903939139392393933939439395393963939739398393993940039401394023940339404394053940639407394083940939410394113941239413394143941539416394173941839419
  1. {
  2. "openapi": "3.1.0",
  3. "info": {
  4. "title": "opencode",
  5. "version": "1.0.0",
  6. "description": "opencode api"
  7. },
  8. "paths": {
  9. "/auth/{providerID}": {
  10. "put": {
  11. "tags": ["control"],
  12. "operationId": "auth.set",
  13. "parameters": [
  14. {
  15. "name": "providerID",
  16. "in": "path",
  17. "schema": {
  18. "type": "string"
  19. },
  20. "required": true
  21. }
  22. ],
  23. "responses": {
  24. "200": {
  25. "description": "Successfully set authentication credentials",
  26. "content": {
  27. "application/json": {
  28. "schema": {
  29. "type": "boolean",
  30. "description": "Successfully set authentication credentials"
  31. }
  32. }
  33. }
  34. },
  35. "400": {
  36. "description": "BadRequest | InvalidRequestError",
  37. "content": {
  38. "application/json": {
  39. "schema": {
  40. "anyOf": [
  41. {
  42. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  43. },
  44. {
  45. "$ref": "#/components/schemas/InvalidRequestError"
  46. }
  47. ]
  48. }
  49. }
  50. }
  51. }
  52. },
  53. "description": "Set authentication credentials",
  54. "summary": "Set auth credentials",
  55. "requestBody": {
  56. "content": {
  57. "application/json": {
  58. "schema": {
  59. "$ref": "#/components/schemas/Auth"
  60. }
  61. }
  62. }
  63. },
  64. "x-codeSamples": [
  65. {
  66. "lang": "js",
  67. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.set({\n ...\n})"
  68. }
  69. ]
  70. },
  71. "delete": {
  72. "tags": ["control"],
  73. "operationId": "auth.remove",
  74. "parameters": [
  75. {
  76. "name": "providerID",
  77. "in": "path",
  78. "schema": {
  79. "type": "string"
  80. },
  81. "required": true
  82. }
  83. ],
  84. "responses": {
  85. "200": {
  86. "description": "Successfully removed authentication credentials",
  87. "content": {
  88. "application/json": {
  89. "schema": {
  90. "type": "boolean",
  91. "description": "Successfully removed authentication credentials"
  92. }
  93. }
  94. }
  95. },
  96. "400": {
  97. "description": "BadRequest | InvalidRequestError",
  98. "content": {
  99. "application/json": {
  100. "schema": {
  101. "anyOf": [
  102. {
  103. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  104. },
  105. {
  106. "$ref": "#/components/schemas/InvalidRequestError"
  107. }
  108. ]
  109. }
  110. }
  111. }
  112. }
  113. },
  114. "description": "Remove authentication credentials",
  115. "summary": "Remove auth credentials",
  116. "x-codeSamples": [
  117. {
  118. "lang": "js",
  119. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.remove({\n ...\n})"
  120. }
  121. ]
  122. }
  123. },
  124. "/log": {
  125. "post": {
  126. "tags": ["control"],
  127. "operationId": "app.log",
  128. "parameters": [
  129. {
  130. "name": "directory",
  131. "in": "query",
  132. "schema": {
  133. "type": "string"
  134. },
  135. "required": false
  136. },
  137. {
  138. "name": "workspace",
  139. "in": "query",
  140. "schema": {
  141. "type": "string"
  142. },
  143. "required": false
  144. }
  145. ],
  146. "responses": {
  147. "200": {
  148. "description": "Log entry written successfully",
  149. "content": {
  150. "application/json": {
  151. "schema": {
  152. "type": "boolean",
  153. "description": "Log entry written successfully"
  154. }
  155. }
  156. }
  157. },
  158. "400": {
  159. "description": "BadRequest | InvalidRequestError",
  160. "content": {
  161. "application/json": {
  162. "schema": {
  163. "anyOf": [
  164. {
  165. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  166. },
  167. {
  168. "$ref": "#/components/schemas/InvalidRequestError"
  169. }
  170. ]
  171. }
  172. }
  173. }
  174. }
  175. },
  176. "description": "Write a log entry to the server logs with specified level and metadata.",
  177. "summary": "Write log",
  178. "requestBody": {
  179. "content": {
  180. "application/json": {
  181. "schema": {
  182. "type": "object",
  183. "properties": {
  184. "service": {
  185. "type": "string",
  186. "description": "Service name for the log entry"
  187. },
  188. "level": {
  189. "type": "string",
  190. "enum": ["debug", "info", "error", "warn"],
  191. "description": "Log level"
  192. },
  193. "message": {
  194. "type": "string",
  195. "description": "Log message"
  196. },
  197. "extra": {
  198. "type": "object"
  199. }
  200. },
  201. "required": ["service", "level", "message"],
  202. "additionalProperties": false
  203. }
  204. }
  205. }
  206. },
  207. "x-codeSamples": [
  208. {
  209. "lang": "js",
  210. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.log({\n ...\n})"
  211. }
  212. ]
  213. }
  214. },
  215. "/experimental/control-plane/move-session": {
  216. "post": {
  217. "tags": ["controlPlane"],
  218. "operationId": "experimental.controlPlane.moveSession",
  219. "parameters": [],
  220. "responses": {
  221. "204": {
  222. "description": "Session moved"
  223. },
  224. "400": {
  225. "description": "MoveSessionError | InvalidRequestError",
  226. "content": {
  227. "application/json": {
  228. "schema": {
  229. "anyOf": [
  230. {
  231. "$ref": "#/components/schemas/MoveSessionError"
  232. },
  233. {
  234. "$ref": "#/components/schemas/InvalidRequestError"
  235. }
  236. ]
  237. }
  238. }
  239. }
  240. }
  241. },
  242. "description": "Move a session to another project directory, optionally transferring local changes.",
  243. "summary": "Move session",
  244. "requestBody": {
  245. "content": {
  246. "application/json": {
  247. "schema": {
  248. "type": "object",
  249. "properties": {
  250. "sessionID": {
  251. "type": "string",
  252. "pattern": "^ses"
  253. },
  254. "destination": {
  255. "$ref": "#/components/schemas/MoveSessionDestination"
  256. },
  257. "moveChanges": {
  258. "type": "boolean"
  259. }
  260. },
  261. "required": ["sessionID", "destination"],
  262. "additionalProperties": false
  263. }
  264. }
  265. }
  266. },
  267. "x-codeSamples": [
  268. {
  269. "lang": "js",
  270. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.controlPlane.moveSession({\n ...\n})"
  271. }
  272. ]
  273. }
  274. },
  275. "/global/health": {
  276. "get": {
  277. "tags": ["global"],
  278. "operationId": "global.health",
  279. "parameters": [],
  280. "responses": {
  281. "200": {
  282. "description": "Health information",
  283. "content": {
  284. "application/json": {
  285. "schema": {
  286. "type": "object",
  287. "properties": {
  288. "healthy": {
  289. "type": "boolean",
  290. "enum": [true]
  291. },
  292. "version": {
  293. "type": "string"
  294. }
  295. },
  296. "required": ["healthy", "version"],
  297. "additionalProperties": false,
  298. "description": "Health information"
  299. }
  300. }
  301. }
  302. },
  303. "400": {
  304. "description": "Bad request",
  305. "content": {
  306. "application/json": {
  307. "schema": {
  308. "$ref": "#/components/schemas/BadRequestError"
  309. }
  310. }
  311. }
  312. }
  313. },
  314. "description": "Get health information about the OpenCode server.",
  315. "summary": "Get health",
  316. "x-codeSamples": [
  317. {
  318. "lang": "js",
  319. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.health({\n ...\n})"
  320. }
  321. ]
  322. }
  323. },
  324. "/global/event": {
  325. "get": {
  326. "tags": ["global"],
  327. "operationId": "global.event",
  328. "parameters": [],
  329. "responses": {
  330. "200": {
  331. "description": "Event stream",
  332. "content": {
  333. "text/event-stream": {
  334. "schema": {
  335. "$ref": "#/components/schemas/GlobalEvent"
  336. }
  337. }
  338. }
  339. },
  340. "400": {
  341. "description": "Bad request",
  342. "content": {
  343. "application/json": {
  344. "schema": {
  345. "$ref": "#/components/schemas/BadRequestError"
  346. }
  347. }
  348. }
  349. }
  350. },
  351. "description": "Subscribe to global events from the OpenCode system using server-sent events.",
  352. "summary": "Get global events",
  353. "x-codeSamples": [
  354. {
  355. "lang": "js",
  356. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.event({\n ...\n})"
  357. }
  358. ]
  359. }
  360. },
  361. "/global/config": {
  362. "get": {
  363. "tags": ["global"],
  364. "operationId": "global.config.get",
  365. "parameters": [],
  366. "responses": {
  367. "200": {
  368. "description": "Get global config info",
  369. "content": {
  370. "application/json": {
  371. "schema": {
  372. "$ref": "#/components/schemas/Config"
  373. }
  374. }
  375. }
  376. },
  377. "400": {
  378. "description": "Bad request",
  379. "content": {
  380. "application/json": {
  381. "schema": {
  382. "$ref": "#/components/schemas/BadRequestError"
  383. }
  384. }
  385. }
  386. }
  387. },
  388. "description": "Retrieve the current global OpenCode configuration settings and preferences.",
  389. "summary": "Get global configuration",
  390. "x-codeSamples": [
  391. {
  392. "lang": "js",
  393. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.get({\n ...\n})"
  394. }
  395. ]
  396. },
  397. "patch": {
  398. "tags": ["global"],
  399. "operationId": "global.config.update",
  400. "parameters": [],
  401. "responses": {
  402. "200": {
  403. "description": "Successfully updated global config",
  404. "content": {
  405. "application/json": {
  406. "schema": {
  407. "$ref": "#/components/schemas/Config"
  408. }
  409. }
  410. }
  411. },
  412. "400": {
  413. "description": "BadRequest | InvalidRequestError",
  414. "content": {
  415. "application/json": {
  416. "schema": {
  417. "anyOf": [
  418. {
  419. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  420. },
  421. {
  422. "$ref": "#/components/schemas/InvalidRequestError"
  423. }
  424. ]
  425. }
  426. }
  427. }
  428. }
  429. },
  430. "description": "Update global OpenCode configuration settings and preferences.",
  431. "summary": "Update global configuration",
  432. "requestBody": {
  433. "content": {
  434. "application/json": {
  435. "schema": {
  436. "$ref": "#/components/schemas/Config"
  437. }
  438. }
  439. }
  440. },
  441. "x-codeSamples": [
  442. {
  443. "lang": "js",
  444. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.update({\n ...\n})"
  445. }
  446. ]
  447. }
  448. },
  449. "/global/dispose": {
  450. "post": {
  451. "tags": ["global"],
  452. "operationId": "global.dispose",
  453. "parameters": [],
  454. "responses": {
  455. "200": {
  456. "description": "Global disposed",
  457. "content": {
  458. "application/json": {
  459. "schema": {
  460. "type": "boolean",
  461. "description": "Global disposed"
  462. }
  463. }
  464. }
  465. },
  466. "400": {
  467. "description": "Bad request",
  468. "content": {
  469. "application/json": {
  470. "schema": {
  471. "$ref": "#/components/schemas/BadRequestError"
  472. }
  473. }
  474. }
  475. }
  476. },
  477. "description": "Clean up and dispose all OpenCode instances, releasing all resources.",
  478. "summary": "Dispose instance",
  479. "x-codeSamples": [
  480. {
  481. "lang": "js",
  482. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.dispose({\n ...\n})"
  483. }
  484. ]
  485. }
  486. },
  487. "/global/upgrade": {
  488. "post": {
  489. "tags": ["global"],
  490. "operationId": "global.upgrade",
  491. "parameters": [],
  492. "responses": {
  493. "200": {
  494. "description": "Upgrade result",
  495. "content": {
  496. "application/json": {
  497. "schema": {
  498. "anyOf": [
  499. {
  500. "type": "object",
  501. "properties": {
  502. "success": {
  503. "type": "boolean",
  504. "enum": [true]
  505. },
  506. "version": {
  507. "type": "string"
  508. }
  509. },
  510. "required": ["success", "version"],
  511. "additionalProperties": false
  512. },
  513. {
  514. "type": "object",
  515. "properties": {
  516. "success": {
  517. "type": "boolean",
  518. "enum": [false]
  519. },
  520. "error": {
  521. "type": "string"
  522. }
  523. },
  524. "required": ["success", "error"],
  525. "additionalProperties": false
  526. }
  527. ],
  528. "description": "Upgrade result"
  529. }
  530. }
  531. }
  532. },
  533. "400": {
  534. "description": "BadRequest | InvalidRequestError",
  535. "content": {
  536. "application/json": {
  537. "schema": {
  538. "anyOf": [
  539. {
  540. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  541. },
  542. {
  543. "$ref": "#/components/schemas/InvalidRequestError"
  544. }
  545. ]
  546. }
  547. }
  548. }
  549. }
  550. },
  551. "description": "Upgrade opencode to the specified version or latest if not specified.",
  552. "summary": "Upgrade opencode",
  553. "requestBody": {
  554. "content": {
  555. "application/json": {
  556. "schema": {
  557. "type": "object",
  558. "properties": {
  559. "target": {
  560. "type": "string"
  561. }
  562. },
  563. "additionalProperties": false
  564. }
  565. }
  566. }
  567. },
  568. "x-codeSamples": [
  569. {
  570. "lang": "js",
  571. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.upgrade({\n ...\n})"
  572. }
  573. ]
  574. }
  575. },
  576. "/event": {
  577. "get": {
  578. "tags": ["event"],
  579. "operationId": "event.subscribe",
  580. "parameters": [
  581. {
  582. "name": "directory",
  583. "in": "query",
  584. "schema": {
  585. "type": "string"
  586. },
  587. "required": false
  588. },
  589. {
  590. "name": "workspace",
  591. "in": "query",
  592. "schema": {
  593. "type": "string"
  594. },
  595. "required": false
  596. }
  597. ],
  598. "responses": {
  599. "200": {
  600. "description": "Event stream",
  601. "content": {
  602. "text/event-stream": {
  603. "schema": {
  604. "$ref": "#/components/schemas/Event"
  605. }
  606. }
  607. }
  608. }
  609. },
  610. "description": "Get events",
  611. "summary": "Subscribe to events",
  612. "x-codeSamples": [
  613. {
  614. "lang": "js",
  615. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.event.subscribe({\n ...\n})"
  616. }
  617. ]
  618. }
  619. },
  620. "/config": {
  621. "get": {
  622. "tags": ["config"],
  623. "operationId": "config.get",
  624. "parameters": [
  625. {
  626. "name": "directory",
  627. "in": "query",
  628. "schema": {
  629. "type": "string"
  630. },
  631. "required": false
  632. },
  633. {
  634. "name": "workspace",
  635. "in": "query",
  636. "schema": {
  637. "type": "string"
  638. },
  639. "required": false
  640. }
  641. ],
  642. "responses": {
  643. "200": {
  644. "description": "Get config info",
  645. "content": {
  646. "application/json": {
  647. "schema": {
  648. "$ref": "#/components/schemas/Config"
  649. }
  650. }
  651. }
  652. },
  653. "400": {
  654. "description": "Bad request",
  655. "content": {
  656. "application/json": {
  657. "schema": {
  658. "$ref": "#/components/schemas/BadRequestError"
  659. }
  660. }
  661. }
  662. }
  663. },
  664. "description": "Retrieve the current OpenCode configuration settings and preferences.",
  665. "summary": "Get configuration",
  666. "x-codeSamples": [
  667. {
  668. "lang": "js",
  669. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.get({\n ...\n})"
  670. }
  671. ]
  672. },
  673. "patch": {
  674. "tags": ["config"],
  675. "operationId": "config.update",
  676. "parameters": [
  677. {
  678. "name": "directory",
  679. "in": "query",
  680. "schema": {
  681. "type": "string"
  682. },
  683. "required": false
  684. },
  685. {
  686. "name": "workspace",
  687. "in": "query",
  688. "schema": {
  689. "type": "string"
  690. },
  691. "required": false
  692. }
  693. ],
  694. "responses": {
  695. "200": {
  696. "description": "Successfully updated config",
  697. "content": {
  698. "application/json": {
  699. "schema": {
  700. "$ref": "#/components/schemas/Config"
  701. }
  702. }
  703. }
  704. },
  705. "400": {
  706. "description": "BadRequest | InvalidRequestError",
  707. "content": {
  708. "application/json": {
  709. "schema": {
  710. "anyOf": [
  711. {
  712. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  713. },
  714. {
  715. "$ref": "#/components/schemas/InvalidRequestError"
  716. }
  717. ]
  718. }
  719. }
  720. }
  721. }
  722. },
  723. "description": "Update OpenCode configuration settings and preferences.",
  724. "summary": "Update configuration",
  725. "requestBody": {
  726. "content": {
  727. "application/json": {
  728. "schema": {
  729. "$ref": "#/components/schemas/Config"
  730. }
  731. }
  732. }
  733. },
  734. "x-codeSamples": [
  735. {
  736. "lang": "js",
  737. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.update({\n ...\n})"
  738. }
  739. ]
  740. }
  741. },
  742. "/config/providers": {
  743. "get": {
  744. "tags": ["config"],
  745. "operationId": "config.providers",
  746. "parameters": [
  747. {
  748. "name": "directory",
  749. "in": "query",
  750. "schema": {
  751. "type": "string"
  752. },
  753. "required": false
  754. },
  755. {
  756. "name": "workspace",
  757. "in": "query",
  758. "schema": {
  759. "type": "string"
  760. },
  761. "required": false
  762. }
  763. ],
  764. "responses": {
  765. "200": {
  766. "description": "List of providers",
  767. "content": {
  768. "application/json": {
  769. "schema": {
  770. "type": "object",
  771. "properties": {
  772. "providers": {
  773. "type": "array",
  774. "items": {
  775. "$ref": "#/components/schemas/Provider"
  776. }
  777. },
  778. "default": {
  779. "type": "object",
  780. "additionalProperties": {
  781. "type": "string"
  782. }
  783. }
  784. },
  785. "required": ["providers", "default"],
  786. "additionalProperties": false,
  787. "description": "List of providers"
  788. }
  789. }
  790. }
  791. },
  792. "400": {
  793. "description": "Bad request",
  794. "content": {
  795. "application/json": {
  796. "schema": {
  797. "$ref": "#/components/schemas/BadRequestError"
  798. }
  799. }
  800. }
  801. }
  802. },
  803. "description": "Get a list of all configured AI providers and their default models.",
  804. "summary": "List config providers",
  805. "x-codeSamples": [
  806. {
  807. "lang": "js",
  808. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.providers({\n ...\n})"
  809. }
  810. ]
  811. }
  812. },
  813. "/experimental/capabilities": {
  814. "get": {
  815. "tags": ["experimental"],
  816. "operationId": "experimental.capabilities.get",
  817. "parameters": [
  818. {
  819. "name": "directory",
  820. "in": "query",
  821. "schema": {
  822. "type": "string"
  823. },
  824. "required": false
  825. },
  826. {
  827. "name": "workspace",
  828. "in": "query",
  829. "schema": {
  830. "type": "string"
  831. },
  832. "required": false
  833. }
  834. ],
  835. "responses": {
  836. "200": {
  837. "description": "Experimental capabilities",
  838. "content": {
  839. "application/json": {
  840. "schema": {
  841. "$ref": "#/components/schemas/ExperimentalCapabilities"
  842. }
  843. }
  844. }
  845. },
  846. "400": {
  847. "description": "Bad request",
  848. "content": {
  849. "application/json": {
  850. "schema": {
  851. "$ref": "#/components/schemas/BadRequestError"
  852. }
  853. }
  854. }
  855. }
  856. },
  857. "description": "Get experimental features enabled on the OpenCode server.",
  858. "summary": "Get experimental capabilities",
  859. "x-codeSamples": [
  860. {
  861. "lang": "js",
  862. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.capabilities.get({\n ...\n})"
  863. }
  864. ]
  865. }
  866. },
  867. "/experimental/console": {
  868. "get": {
  869. "tags": ["experimental"],
  870. "operationId": "experimental.console.get",
  871. "parameters": [
  872. {
  873. "name": "directory",
  874. "in": "query",
  875. "schema": {
  876. "type": "string"
  877. },
  878. "required": false
  879. },
  880. {
  881. "name": "workspace",
  882. "in": "query",
  883. "schema": {
  884. "type": "string"
  885. },
  886. "required": false
  887. }
  888. ],
  889. "responses": {
  890. "200": {
  891. "description": "Active Console provider metadata",
  892. "content": {
  893. "application/json": {
  894. "schema": {
  895. "$ref": "#/components/schemas/ConsoleState"
  896. }
  897. }
  898. }
  899. },
  900. "400": {
  901. "description": "Bad request",
  902. "content": {
  903. "application/json": {
  904. "schema": {
  905. "$ref": "#/components/schemas/BadRequestError"
  906. }
  907. }
  908. }
  909. },
  910. "500": {
  911. "description": "InternalServerError",
  912. "content": {
  913. "application/json": {
  914. "schema": {
  915. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  916. }
  917. }
  918. }
  919. }
  920. },
  921. "description": "Get the active Console org name and the set of provider IDs managed by that Console org.",
  922. "summary": "Get active Console provider metadata",
  923. "x-codeSamples": [
  924. {
  925. "lang": "js",
  926. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.get({\n ...\n})"
  927. }
  928. ]
  929. }
  930. },
  931. "/experimental/console/orgs": {
  932. "get": {
  933. "tags": ["experimental"],
  934. "operationId": "experimental.console.listOrgs",
  935. "parameters": [
  936. {
  937. "name": "directory",
  938. "in": "query",
  939. "schema": {
  940. "type": "string"
  941. },
  942. "required": false
  943. },
  944. {
  945. "name": "workspace",
  946. "in": "query",
  947. "schema": {
  948. "type": "string"
  949. },
  950. "required": false
  951. }
  952. ],
  953. "responses": {
  954. "200": {
  955. "description": "Switchable Console orgs",
  956. "content": {
  957. "application/json": {
  958. "schema": {
  959. "type": "object",
  960. "properties": {
  961. "orgs": {
  962. "type": "array",
  963. "items": {
  964. "type": "object",
  965. "properties": {
  966. "accountID": {
  967. "type": "string"
  968. },
  969. "accountEmail": {
  970. "type": "string"
  971. },
  972. "accountUrl": {
  973. "type": "string"
  974. },
  975. "orgID": {
  976. "type": "string"
  977. },
  978. "orgName": {
  979. "type": "string"
  980. },
  981. "active": {
  982. "type": "boolean"
  983. }
  984. },
  985. "required": ["accountID", "accountEmail", "accountUrl", "orgID", "orgName", "active"],
  986. "additionalProperties": false
  987. }
  988. }
  989. },
  990. "required": ["orgs"],
  991. "additionalProperties": false,
  992. "description": "Switchable Console orgs"
  993. }
  994. }
  995. }
  996. },
  997. "400": {
  998. "description": "Bad request",
  999. "content": {
  1000. "application/json": {
  1001. "schema": {
  1002. "$ref": "#/components/schemas/BadRequestError"
  1003. }
  1004. }
  1005. }
  1006. },
  1007. "500": {
  1008. "description": "InternalServerError",
  1009. "content": {
  1010. "application/json": {
  1011. "schema": {
  1012. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  1013. }
  1014. }
  1015. }
  1016. }
  1017. },
  1018. "description": "Get the available Console orgs across logged-in accounts, including the current active org.",
  1019. "summary": "List switchable Console orgs",
  1020. "x-codeSamples": [
  1021. {
  1022. "lang": "js",
  1023. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.listOrgs({\n ...\n})"
  1024. }
  1025. ]
  1026. }
  1027. },
  1028. "/experimental/console/switch": {
  1029. "post": {
  1030. "tags": ["experimental"],
  1031. "operationId": "experimental.console.switchOrg",
  1032. "parameters": [
  1033. {
  1034. "name": "directory",
  1035. "in": "query",
  1036. "schema": {
  1037. "type": "string"
  1038. },
  1039. "required": false
  1040. },
  1041. {
  1042. "name": "workspace",
  1043. "in": "query",
  1044. "schema": {
  1045. "type": "string"
  1046. },
  1047. "required": false
  1048. }
  1049. ],
  1050. "responses": {
  1051. "200": {
  1052. "description": "Switch success",
  1053. "content": {
  1054. "application/json": {
  1055. "schema": {
  1056. "type": "boolean",
  1057. "description": "Switch success"
  1058. }
  1059. }
  1060. }
  1061. }
  1062. },
  1063. "description": "Persist a new active Console account/org selection for the current local OpenCode state.",
  1064. "summary": "Switch active Console org",
  1065. "requestBody": {
  1066. "content": {
  1067. "application/json": {
  1068. "schema": {
  1069. "type": "object",
  1070. "properties": {
  1071. "accountID": {
  1072. "type": "string"
  1073. },
  1074. "orgID": {
  1075. "type": "string"
  1076. }
  1077. },
  1078. "required": ["accountID", "orgID"],
  1079. "additionalProperties": false
  1080. }
  1081. }
  1082. }
  1083. },
  1084. "x-codeSamples": [
  1085. {
  1086. "lang": "js",
  1087. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.switchOrg({\n ...\n})"
  1088. }
  1089. ]
  1090. }
  1091. },
  1092. "/experimental/tool": {
  1093. "get": {
  1094. "tags": ["experimental"],
  1095. "operationId": "tool.list",
  1096. "parameters": [
  1097. {
  1098. "name": "directory",
  1099. "in": "query",
  1100. "schema": {
  1101. "type": "string"
  1102. },
  1103. "required": false
  1104. },
  1105. {
  1106. "name": "workspace",
  1107. "in": "query",
  1108. "schema": {
  1109. "type": "string"
  1110. },
  1111. "required": false
  1112. },
  1113. {
  1114. "name": "provider",
  1115. "in": "query",
  1116. "schema": {
  1117. "type": "string"
  1118. },
  1119. "required": true
  1120. },
  1121. {
  1122. "name": "model",
  1123. "in": "query",
  1124. "schema": {
  1125. "type": "string"
  1126. },
  1127. "required": true
  1128. }
  1129. ],
  1130. "responses": {
  1131. "200": {
  1132. "description": "Tools",
  1133. "content": {
  1134. "application/json": {
  1135. "schema": {
  1136. "$ref": "#/components/schemas/ToolList"
  1137. }
  1138. }
  1139. }
  1140. },
  1141. "400": {
  1142. "description": "BadRequest | InvalidRequestError",
  1143. "content": {
  1144. "application/json": {
  1145. "schema": {
  1146. "anyOf": [
  1147. {
  1148. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1149. },
  1150. {
  1151. "$ref": "#/components/schemas/InvalidRequestError"
  1152. }
  1153. ]
  1154. }
  1155. }
  1156. }
  1157. }
  1158. },
  1159. "description": "Get a list of available tools with their JSON schema parameters for a specific provider and model combination.",
  1160. "summary": "List tools",
  1161. "x-codeSamples": [
  1162. {
  1163. "lang": "js",
  1164. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.list({\n ...\n})"
  1165. }
  1166. ]
  1167. }
  1168. },
  1169. "/experimental/tool/ids": {
  1170. "get": {
  1171. "tags": ["experimental"],
  1172. "operationId": "tool.ids",
  1173. "parameters": [
  1174. {
  1175. "name": "directory",
  1176. "in": "query",
  1177. "schema": {
  1178. "type": "string"
  1179. },
  1180. "required": false
  1181. },
  1182. {
  1183. "name": "workspace",
  1184. "in": "query",
  1185. "schema": {
  1186. "type": "string"
  1187. },
  1188. "required": false
  1189. }
  1190. ],
  1191. "responses": {
  1192. "200": {
  1193. "description": "Tool IDs",
  1194. "content": {
  1195. "application/json": {
  1196. "schema": {
  1197. "$ref": "#/components/schemas/ToolIDs"
  1198. }
  1199. }
  1200. }
  1201. },
  1202. "400": {
  1203. "description": "BadRequest | InvalidRequestError",
  1204. "content": {
  1205. "application/json": {
  1206. "schema": {
  1207. "anyOf": [
  1208. {
  1209. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1210. },
  1211. {
  1212. "$ref": "#/components/schemas/InvalidRequestError"
  1213. }
  1214. ]
  1215. }
  1216. }
  1217. }
  1218. }
  1219. },
  1220. "description": "Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.",
  1221. "summary": "List tool IDs",
  1222. "x-codeSamples": [
  1223. {
  1224. "lang": "js",
  1225. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.ids({\n ...\n})"
  1226. }
  1227. ]
  1228. }
  1229. },
  1230. "/experimental/worktree": {
  1231. "get": {
  1232. "tags": ["experimental"],
  1233. "operationId": "worktree.list",
  1234. "parameters": [
  1235. {
  1236. "name": "directory",
  1237. "in": "query",
  1238. "schema": {
  1239. "type": "string"
  1240. },
  1241. "required": false
  1242. },
  1243. {
  1244. "name": "workspace",
  1245. "in": "query",
  1246. "schema": {
  1247. "type": "string"
  1248. },
  1249. "required": false
  1250. }
  1251. ],
  1252. "responses": {
  1253. "200": {
  1254. "description": "List of worktree directories",
  1255. "content": {
  1256. "application/json": {
  1257. "schema": {
  1258. "type": "array",
  1259. "items": {
  1260. "type": "string"
  1261. },
  1262. "description": "List of worktree directories"
  1263. }
  1264. }
  1265. }
  1266. },
  1267. "400": {
  1268. "description": "WorktreeError | InvalidRequestError",
  1269. "content": {
  1270. "application/json": {
  1271. "schema": {
  1272. "anyOf": [
  1273. {
  1274. "$ref": "#/components/schemas/WorktreeError"
  1275. },
  1276. {
  1277. "$ref": "#/components/schemas/InvalidRequestError"
  1278. }
  1279. ]
  1280. }
  1281. }
  1282. }
  1283. }
  1284. },
  1285. "description": "List all sandbox worktrees for the current project.",
  1286. "summary": "List worktrees",
  1287. "x-codeSamples": [
  1288. {
  1289. "lang": "js",
  1290. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.list({\n ...\n})"
  1291. }
  1292. ]
  1293. },
  1294. "post": {
  1295. "tags": ["experimental"],
  1296. "operationId": "worktree.create",
  1297. "parameters": [
  1298. {
  1299. "name": "directory",
  1300. "in": "query",
  1301. "schema": {
  1302. "type": "string"
  1303. },
  1304. "required": false
  1305. },
  1306. {
  1307. "name": "workspace",
  1308. "in": "query",
  1309. "schema": {
  1310. "type": "string"
  1311. },
  1312. "required": false
  1313. }
  1314. ],
  1315. "responses": {
  1316. "200": {
  1317. "description": "Worktree created",
  1318. "content": {
  1319. "application/json": {
  1320. "schema": {
  1321. "$ref": "#/components/schemas/Worktree"
  1322. }
  1323. }
  1324. }
  1325. },
  1326. "400": {
  1327. "description": "WorktreeError | InvalidRequestError",
  1328. "content": {
  1329. "application/json": {
  1330. "schema": {
  1331. "anyOf": [
  1332. {
  1333. "$ref": "#/components/schemas/WorktreeError"
  1334. },
  1335. {
  1336. "$ref": "#/components/schemas/InvalidRequestError"
  1337. }
  1338. ]
  1339. }
  1340. }
  1341. }
  1342. }
  1343. },
  1344. "description": "Create a new git worktree for the current project and run any configured startup scripts.",
  1345. "summary": "Create worktree",
  1346. "requestBody": {
  1347. "content": {
  1348. "application/json": {
  1349. "schema": {
  1350. "$ref": "#/components/schemas/WorktreeCreateInput"
  1351. }
  1352. }
  1353. }
  1354. },
  1355. "x-codeSamples": [
  1356. {
  1357. "lang": "js",
  1358. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.create({\n ...\n})"
  1359. }
  1360. ]
  1361. },
  1362. "delete": {
  1363. "tags": ["experimental"],
  1364. "operationId": "worktree.remove",
  1365. "parameters": [
  1366. {
  1367. "name": "directory",
  1368. "in": "query",
  1369. "schema": {
  1370. "type": "string"
  1371. },
  1372. "required": false
  1373. },
  1374. {
  1375. "name": "workspace",
  1376. "in": "query",
  1377. "schema": {
  1378. "type": "string"
  1379. },
  1380. "required": false
  1381. }
  1382. ],
  1383. "responses": {
  1384. "200": {
  1385. "description": "Worktree removed",
  1386. "content": {
  1387. "application/json": {
  1388. "schema": {
  1389. "type": "boolean",
  1390. "description": "Worktree removed"
  1391. }
  1392. }
  1393. }
  1394. },
  1395. "400": {
  1396. "description": "WorktreeError | InvalidRequestError",
  1397. "content": {
  1398. "application/json": {
  1399. "schema": {
  1400. "anyOf": [
  1401. {
  1402. "$ref": "#/components/schemas/WorktreeError"
  1403. },
  1404. {
  1405. "$ref": "#/components/schemas/InvalidRequestError"
  1406. }
  1407. ]
  1408. }
  1409. }
  1410. }
  1411. }
  1412. },
  1413. "description": "Remove a git worktree and delete its branch.",
  1414. "summary": "Remove worktree",
  1415. "requestBody": {
  1416. "content": {
  1417. "application/json": {
  1418. "schema": {
  1419. "$ref": "#/components/schemas/WorktreeRemoveInput"
  1420. }
  1421. }
  1422. }
  1423. },
  1424. "x-codeSamples": [
  1425. {
  1426. "lang": "js",
  1427. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.remove({\n ...\n})"
  1428. }
  1429. ]
  1430. }
  1431. },
  1432. "/experimental/worktree/reset": {
  1433. "post": {
  1434. "tags": ["experimental"],
  1435. "operationId": "worktree.reset",
  1436. "parameters": [
  1437. {
  1438. "name": "directory",
  1439. "in": "query",
  1440. "schema": {
  1441. "type": "string"
  1442. },
  1443. "required": false
  1444. },
  1445. {
  1446. "name": "workspace",
  1447. "in": "query",
  1448. "schema": {
  1449. "type": "string"
  1450. },
  1451. "required": false
  1452. }
  1453. ],
  1454. "responses": {
  1455. "200": {
  1456. "description": "Worktree reset",
  1457. "content": {
  1458. "application/json": {
  1459. "schema": {
  1460. "type": "boolean",
  1461. "description": "Worktree reset"
  1462. }
  1463. }
  1464. }
  1465. },
  1466. "400": {
  1467. "description": "WorktreeError | InvalidRequestError",
  1468. "content": {
  1469. "application/json": {
  1470. "schema": {
  1471. "anyOf": [
  1472. {
  1473. "$ref": "#/components/schemas/WorktreeError"
  1474. },
  1475. {
  1476. "$ref": "#/components/schemas/InvalidRequestError"
  1477. }
  1478. ]
  1479. }
  1480. }
  1481. }
  1482. }
  1483. },
  1484. "description": "Reset a worktree branch to the primary default branch.",
  1485. "summary": "Reset worktree",
  1486. "requestBody": {
  1487. "content": {
  1488. "application/json": {
  1489. "schema": {
  1490. "$ref": "#/components/schemas/WorktreeResetInput"
  1491. }
  1492. }
  1493. }
  1494. },
  1495. "x-codeSamples": [
  1496. {
  1497. "lang": "js",
  1498. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.reset({\n ...\n})"
  1499. }
  1500. ]
  1501. }
  1502. },
  1503. "/experimental/session": {
  1504. "get": {
  1505. "tags": ["experimental"],
  1506. "operationId": "experimental.session.list",
  1507. "parameters": [
  1508. {
  1509. "name": "directory",
  1510. "in": "query",
  1511. "schema": {
  1512. "type": "string"
  1513. },
  1514. "required": false
  1515. },
  1516. {
  1517. "name": "workspace",
  1518. "in": "query",
  1519. "schema": {
  1520. "type": "string"
  1521. },
  1522. "required": false
  1523. },
  1524. {
  1525. "name": "roots",
  1526. "in": "query",
  1527. "schema": {
  1528. "anyOf": [
  1529. {
  1530. "type": "boolean"
  1531. },
  1532. {
  1533. "type": "string",
  1534. "enum": ["true", "false"]
  1535. }
  1536. ]
  1537. },
  1538. "required": false
  1539. },
  1540. {
  1541. "name": "start",
  1542. "in": "query",
  1543. "schema": {
  1544. "type": "number"
  1545. },
  1546. "required": false
  1547. },
  1548. {
  1549. "name": "cursor",
  1550. "in": "query",
  1551. "schema": {
  1552. "type": "number"
  1553. },
  1554. "required": false
  1555. },
  1556. {
  1557. "name": "search",
  1558. "in": "query",
  1559. "schema": {
  1560. "type": "string"
  1561. },
  1562. "required": false
  1563. },
  1564. {
  1565. "name": "limit",
  1566. "in": "query",
  1567. "schema": {
  1568. "type": "number"
  1569. },
  1570. "required": false
  1571. },
  1572. {
  1573. "name": "archived",
  1574. "in": "query",
  1575. "schema": {
  1576. "anyOf": [
  1577. {
  1578. "type": "boolean"
  1579. },
  1580. {
  1581. "type": "string",
  1582. "enum": ["true", "false"]
  1583. }
  1584. ]
  1585. },
  1586. "required": false
  1587. }
  1588. ],
  1589. "responses": {
  1590. "200": {
  1591. "description": "List of sessions",
  1592. "content": {
  1593. "application/json": {
  1594. "schema": {
  1595. "type": "array",
  1596. "items": {
  1597. "$ref": "#/components/schemas/GlobalSession"
  1598. },
  1599. "description": "List of sessions"
  1600. }
  1601. }
  1602. }
  1603. },
  1604. "400": {
  1605. "description": "Bad request",
  1606. "content": {
  1607. "application/json": {
  1608. "schema": {
  1609. "$ref": "#/components/schemas/BadRequestError"
  1610. }
  1611. }
  1612. }
  1613. }
  1614. },
  1615. "description": "Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.",
  1616. "summary": "List sessions",
  1617. "x-codeSamples": [
  1618. {
  1619. "lang": "js",
  1620. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.list({\n ...\n})"
  1621. }
  1622. ]
  1623. }
  1624. },
  1625. "/experimental/session/{sessionID}/background": {
  1626. "post": {
  1627. "tags": ["experimental"],
  1628. "operationId": "experimental.session.background",
  1629. "parameters": [
  1630. {
  1631. "name": "sessionID",
  1632. "in": "path",
  1633. "schema": {
  1634. "type": "string",
  1635. "pattern": "^ses"
  1636. },
  1637. "required": true
  1638. },
  1639. {
  1640. "name": "directory",
  1641. "in": "query",
  1642. "schema": {
  1643. "type": "string"
  1644. },
  1645. "required": false
  1646. },
  1647. {
  1648. "name": "workspace",
  1649. "in": "query",
  1650. "schema": {
  1651. "type": "string"
  1652. },
  1653. "required": false
  1654. }
  1655. ],
  1656. "responses": {
  1657. "200": {
  1658. "description": "Backgrounded subagents",
  1659. "content": {
  1660. "application/json": {
  1661. "schema": {
  1662. "type": "boolean",
  1663. "description": "Backgrounded subagents"
  1664. }
  1665. }
  1666. }
  1667. },
  1668. "400": {
  1669. "description": "BadRequest | InvalidRequestError",
  1670. "content": {
  1671. "application/json": {
  1672. "schema": {
  1673. "anyOf": [
  1674. {
  1675. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1676. },
  1677. {
  1678. "$ref": "#/components/schemas/InvalidRequestError"
  1679. }
  1680. ]
  1681. }
  1682. }
  1683. }
  1684. }
  1685. },
  1686. "description": "Detach any synchronous subagents currently blocking the session and continue them in the background.",
  1687. "summary": "Background subagents",
  1688. "x-codeSamples": [
  1689. {
  1690. "lang": "js",
  1691. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.background({\n ...\n})"
  1692. }
  1693. ]
  1694. }
  1695. },
  1696. "/experimental/resource": {
  1697. "get": {
  1698. "tags": ["experimental"],
  1699. "operationId": "experimental.resource.list",
  1700. "parameters": [
  1701. {
  1702. "name": "directory",
  1703. "in": "query",
  1704. "schema": {
  1705. "type": "string"
  1706. },
  1707. "required": false
  1708. },
  1709. {
  1710. "name": "workspace",
  1711. "in": "query",
  1712. "schema": {
  1713. "type": "string"
  1714. },
  1715. "required": false
  1716. }
  1717. ],
  1718. "responses": {
  1719. "200": {
  1720. "description": "MCP resources",
  1721. "content": {
  1722. "application/json": {
  1723. "schema": {
  1724. "type": "object",
  1725. "additionalProperties": {
  1726. "$ref": "#/components/schemas/McpResource"
  1727. },
  1728. "description": "MCP resources"
  1729. }
  1730. }
  1731. }
  1732. },
  1733. "400": {
  1734. "description": "Bad request",
  1735. "content": {
  1736. "application/json": {
  1737. "schema": {
  1738. "$ref": "#/components/schemas/BadRequestError"
  1739. }
  1740. }
  1741. }
  1742. }
  1743. },
  1744. "description": "Get all available MCP resources from connected servers. Optionally filter by name.",
  1745. "summary": "Get MCP resources",
  1746. "x-codeSamples": [
  1747. {
  1748. "lang": "js",
  1749. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.resource.list({\n ...\n})"
  1750. }
  1751. ]
  1752. }
  1753. },
  1754. "/find": {
  1755. "get": {
  1756. "tags": ["file"],
  1757. "operationId": "find.text",
  1758. "parameters": [
  1759. {
  1760. "name": "directory",
  1761. "in": "query",
  1762. "schema": {
  1763. "type": "string"
  1764. },
  1765. "required": false
  1766. },
  1767. {
  1768. "name": "workspace",
  1769. "in": "query",
  1770. "schema": {
  1771. "type": "string"
  1772. },
  1773. "required": false
  1774. },
  1775. {
  1776. "name": "pattern",
  1777. "in": "query",
  1778. "schema": {
  1779. "type": "string"
  1780. },
  1781. "required": true
  1782. }
  1783. ],
  1784. "responses": {
  1785. "200": {
  1786. "description": "Matches",
  1787. "content": {
  1788. "application/json": {
  1789. "schema": {
  1790. "type": "array",
  1791. "items": {
  1792. "type": "object",
  1793. "properties": {
  1794. "path": {
  1795. "type": "object",
  1796. "properties": {
  1797. "text": {
  1798. "type": "string"
  1799. }
  1800. },
  1801. "required": ["text"],
  1802. "additionalProperties": false
  1803. },
  1804. "lines": {
  1805. "type": "object",
  1806. "properties": {
  1807. "text": {
  1808. "type": "string"
  1809. }
  1810. },
  1811. "required": ["text"],
  1812. "additionalProperties": false
  1813. },
  1814. "line_number": {
  1815. "type": "integer",
  1816. "minimum": 0
  1817. },
  1818. "absolute_offset": {
  1819. "type": "integer",
  1820. "minimum": 0
  1821. },
  1822. "submatches": {
  1823. "type": "array",
  1824. "items": {
  1825. "type": "object",
  1826. "properties": {
  1827. "match": {
  1828. "type": "object",
  1829. "properties": {
  1830. "text": {
  1831. "type": "string"
  1832. }
  1833. },
  1834. "required": ["text"],
  1835. "additionalProperties": false
  1836. },
  1837. "start": {
  1838. "type": "integer",
  1839. "minimum": 0
  1840. },
  1841. "end": {
  1842. "type": "integer",
  1843. "minimum": 0
  1844. }
  1845. },
  1846. "required": ["match", "start", "end"],
  1847. "additionalProperties": false
  1848. }
  1849. }
  1850. },
  1851. "required": ["path", "lines", "line_number", "absolute_offset", "submatches"],
  1852. "additionalProperties": false
  1853. },
  1854. "description": "Matches"
  1855. }
  1856. }
  1857. }
  1858. },
  1859. "400": {
  1860. "description": "Bad request",
  1861. "content": {
  1862. "application/json": {
  1863. "schema": {
  1864. "$ref": "#/components/schemas/BadRequestError"
  1865. }
  1866. }
  1867. }
  1868. }
  1869. },
  1870. "description": "Search for text patterns across files in the project using ripgrep.",
  1871. "summary": "Find text",
  1872. "x-codeSamples": [
  1873. {
  1874. "lang": "js",
  1875. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
  1876. }
  1877. ]
  1878. }
  1879. },
  1880. "/find/file": {
  1881. "get": {
  1882. "tags": ["file"],
  1883. "operationId": "find.files",
  1884. "parameters": [
  1885. {
  1886. "name": "directory",
  1887. "in": "query",
  1888. "schema": {
  1889. "type": "string"
  1890. },
  1891. "required": false
  1892. },
  1893. {
  1894. "name": "workspace",
  1895. "in": "query",
  1896. "schema": {
  1897. "type": "string"
  1898. },
  1899. "required": false
  1900. },
  1901. {
  1902. "name": "query",
  1903. "in": "query",
  1904. "schema": {
  1905. "type": "string"
  1906. },
  1907. "required": true
  1908. },
  1909. {
  1910. "name": "dirs",
  1911. "in": "query",
  1912. "schema": {
  1913. "type": "string",
  1914. "enum": ["true", "false"]
  1915. },
  1916. "required": false
  1917. },
  1918. {
  1919. "name": "type",
  1920. "in": "query",
  1921. "schema": {
  1922. "type": "string",
  1923. "enum": ["file", "directory"]
  1924. },
  1925. "required": false
  1926. },
  1927. {
  1928. "name": "limit",
  1929. "in": "query",
  1930. "schema": {
  1931. "type": "integer",
  1932. "minimum": 1,
  1933. "maximum": 200
  1934. },
  1935. "required": false
  1936. }
  1937. ],
  1938. "responses": {
  1939. "200": {
  1940. "description": "File paths",
  1941. "content": {
  1942. "application/json": {
  1943. "schema": {
  1944. "type": "array",
  1945. "items": {
  1946. "type": "string"
  1947. },
  1948. "description": "File paths"
  1949. }
  1950. }
  1951. }
  1952. },
  1953. "400": {
  1954. "description": "Bad request",
  1955. "content": {
  1956. "application/json": {
  1957. "schema": {
  1958. "$ref": "#/components/schemas/BadRequestError"
  1959. }
  1960. }
  1961. }
  1962. }
  1963. },
  1964. "description": "Search for files or directories by name or pattern in the project directory.",
  1965. "summary": "Find files",
  1966. "x-codeSamples": [
  1967. {
  1968. "lang": "js",
  1969. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
  1970. }
  1971. ]
  1972. }
  1973. },
  1974. "/find/symbol": {
  1975. "get": {
  1976. "tags": ["file"],
  1977. "operationId": "find.symbols",
  1978. "parameters": [
  1979. {
  1980. "name": "directory",
  1981. "in": "query",
  1982. "schema": {
  1983. "type": "string"
  1984. },
  1985. "required": false
  1986. },
  1987. {
  1988. "name": "workspace",
  1989. "in": "query",
  1990. "schema": {
  1991. "type": "string"
  1992. },
  1993. "required": false
  1994. },
  1995. {
  1996. "name": "query",
  1997. "in": "query",
  1998. "schema": {
  1999. "type": "string"
  2000. },
  2001. "required": true
  2002. }
  2003. ],
  2004. "responses": {
  2005. "200": {
  2006. "description": "Symbols",
  2007. "content": {
  2008. "application/json": {
  2009. "schema": {
  2010. "type": "array",
  2011. "items": {
  2012. "$ref": "#/components/schemas/Symbol"
  2013. },
  2014. "description": "Symbols"
  2015. }
  2016. }
  2017. }
  2018. },
  2019. "400": {
  2020. "description": "Bad request",
  2021. "content": {
  2022. "application/json": {
  2023. "schema": {
  2024. "$ref": "#/components/schemas/BadRequestError"
  2025. }
  2026. }
  2027. }
  2028. }
  2029. },
  2030. "description": "Search for workspace symbols like functions, classes, and variables using LSP.",
  2031. "summary": "Find symbols",
  2032. "x-codeSamples": [
  2033. {
  2034. "lang": "js",
  2035. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
  2036. }
  2037. ]
  2038. }
  2039. },
  2040. "/file": {
  2041. "get": {
  2042. "tags": ["file"],
  2043. "operationId": "file.list",
  2044. "parameters": [
  2045. {
  2046. "name": "directory",
  2047. "in": "query",
  2048. "schema": {
  2049. "type": "string"
  2050. },
  2051. "required": false
  2052. },
  2053. {
  2054. "name": "workspace",
  2055. "in": "query",
  2056. "schema": {
  2057. "type": "string"
  2058. },
  2059. "required": false
  2060. },
  2061. {
  2062. "name": "path",
  2063. "in": "query",
  2064. "schema": {
  2065. "type": "string"
  2066. },
  2067. "required": true
  2068. }
  2069. ],
  2070. "responses": {
  2071. "200": {
  2072. "description": "Files and directories",
  2073. "content": {
  2074. "application/json": {
  2075. "schema": {
  2076. "type": "array",
  2077. "items": {
  2078. "$ref": "#/components/schemas/FileNode"
  2079. },
  2080. "description": "Files and directories"
  2081. }
  2082. }
  2083. }
  2084. },
  2085. "400": {
  2086. "description": "Bad request",
  2087. "content": {
  2088. "application/json": {
  2089. "schema": {
  2090. "$ref": "#/components/schemas/BadRequestError"
  2091. }
  2092. }
  2093. }
  2094. }
  2095. },
  2096. "description": "List files and directories in a specified path.",
  2097. "summary": "List files",
  2098. "x-codeSamples": [
  2099. {
  2100. "lang": "js",
  2101. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
  2102. }
  2103. ]
  2104. }
  2105. },
  2106. "/file/content": {
  2107. "get": {
  2108. "tags": ["file"],
  2109. "operationId": "file.read",
  2110. "parameters": [
  2111. {
  2112. "name": "directory",
  2113. "in": "query",
  2114. "schema": {
  2115. "type": "string"
  2116. },
  2117. "required": false
  2118. },
  2119. {
  2120. "name": "workspace",
  2121. "in": "query",
  2122. "schema": {
  2123. "type": "string"
  2124. },
  2125. "required": false
  2126. },
  2127. {
  2128. "name": "path",
  2129. "in": "query",
  2130. "schema": {
  2131. "type": "string"
  2132. },
  2133. "required": true
  2134. }
  2135. ],
  2136. "responses": {
  2137. "200": {
  2138. "description": "File content",
  2139. "content": {
  2140. "application/json": {
  2141. "schema": {
  2142. "$ref": "#/components/schemas/FileContent"
  2143. }
  2144. }
  2145. }
  2146. },
  2147. "400": {
  2148. "description": "Bad request",
  2149. "content": {
  2150. "application/json": {
  2151. "schema": {
  2152. "$ref": "#/components/schemas/BadRequestError"
  2153. }
  2154. }
  2155. }
  2156. }
  2157. },
  2158. "description": "Read the content of a specified file.",
  2159. "summary": "Read file",
  2160. "x-codeSamples": [
  2161. {
  2162. "lang": "js",
  2163. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
  2164. }
  2165. ]
  2166. }
  2167. },
  2168. "/file/status": {
  2169. "get": {
  2170. "tags": ["file"],
  2171. "operationId": "file.status",
  2172. "parameters": [
  2173. {
  2174. "name": "directory",
  2175. "in": "query",
  2176. "schema": {
  2177. "type": "string"
  2178. },
  2179. "required": false
  2180. },
  2181. {
  2182. "name": "workspace",
  2183. "in": "query",
  2184. "schema": {
  2185. "type": "string"
  2186. },
  2187. "required": false
  2188. }
  2189. ],
  2190. "responses": {
  2191. "200": {
  2192. "description": "File status",
  2193. "content": {
  2194. "application/json": {
  2195. "schema": {
  2196. "type": "array",
  2197. "items": {
  2198. "$ref": "#/components/schemas/File"
  2199. },
  2200. "description": "File status"
  2201. }
  2202. }
  2203. }
  2204. },
  2205. "400": {
  2206. "description": "Bad request",
  2207. "content": {
  2208. "application/json": {
  2209. "schema": {
  2210. "$ref": "#/components/schemas/BadRequestError"
  2211. }
  2212. }
  2213. }
  2214. }
  2215. },
  2216. "description": "Get the git status of all files in the project.",
  2217. "summary": "Get file status",
  2218. "x-codeSamples": [
  2219. {
  2220. "lang": "js",
  2221. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
  2222. }
  2223. ]
  2224. }
  2225. },
  2226. "/instance/dispose": {
  2227. "post": {
  2228. "tags": ["instance"],
  2229. "operationId": "instance.dispose",
  2230. "parameters": [
  2231. {
  2232. "name": "directory",
  2233. "in": "query",
  2234. "schema": {
  2235. "type": "string"
  2236. },
  2237. "required": false
  2238. },
  2239. {
  2240. "name": "workspace",
  2241. "in": "query",
  2242. "schema": {
  2243. "type": "string"
  2244. },
  2245. "required": false
  2246. }
  2247. ],
  2248. "responses": {
  2249. "200": {
  2250. "description": "Instance disposed",
  2251. "content": {
  2252. "application/json": {
  2253. "schema": {
  2254. "type": "boolean",
  2255. "description": "Instance disposed"
  2256. }
  2257. }
  2258. }
  2259. },
  2260. "400": {
  2261. "description": "Bad request",
  2262. "content": {
  2263. "application/json": {
  2264. "schema": {
  2265. "$ref": "#/components/schemas/BadRequestError"
  2266. }
  2267. }
  2268. }
  2269. }
  2270. },
  2271. "description": "Clean up and dispose the current OpenCode instance, releasing all resources.",
  2272. "summary": "Dispose instance",
  2273. "x-codeSamples": [
  2274. {
  2275. "lang": "js",
  2276. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.instance.dispose({\n ...\n})"
  2277. }
  2278. ]
  2279. }
  2280. },
  2281. "/path": {
  2282. "get": {
  2283. "tags": ["instance"],
  2284. "operationId": "path.get",
  2285. "parameters": [
  2286. {
  2287. "name": "directory",
  2288. "in": "query",
  2289. "schema": {
  2290. "type": "string"
  2291. },
  2292. "required": false
  2293. },
  2294. {
  2295. "name": "workspace",
  2296. "in": "query",
  2297. "schema": {
  2298. "type": "string"
  2299. },
  2300. "required": false
  2301. }
  2302. ],
  2303. "responses": {
  2304. "200": {
  2305. "description": "Path",
  2306. "content": {
  2307. "application/json": {
  2308. "schema": {
  2309. "$ref": "#/components/schemas/Path"
  2310. }
  2311. }
  2312. }
  2313. },
  2314. "400": {
  2315. "description": "Bad request",
  2316. "content": {
  2317. "application/json": {
  2318. "schema": {
  2319. "$ref": "#/components/schemas/BadRequestError"
  2320. }
  2321. }
  2322. }
  2323. }
  2324. },
  2325. "description": "Retrieve the current working directory and related path information for the OpenCode instance.",
  2326. "summary": "Get paths",
  2327. "x-codeSamples": [
  2328. {
  2329. "lang": "js",
  2330. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.path.get({\n ...\n})"
  2331. }
  2332. ]
  2333. }
  2334. },
  2335. "/vcs": {
  2336. "get": {
  2337. "tags": ["instance"],
  2338. "operationId": "vcs.get",
  2339. "parameters": [
  2340. {
  2341. "name": "directory",
  2342. "in": "query",
  2343. "schema": {
  2344. "type": "string"
  2345. },
  2346. "required": false
  2347. },
  2348. {
  2349. "name": "workspace",
  2350. "in": "query",
  2351. "schema": {
  2352. "type": "string"
  2353. },
  2354. "required": false
  2355. }
  2356. ],
  2357. "responses": {
  2358. "200": {
  2359. "description": "VCS info",
  2360. "content": {
  2361. "application/json": {
  2362. "schema": {
  2363. "$ref": "#/components/schemas/VcsInfo"
  2364. }
  2365. }
  2366. }
  2367. },
  2368. "400": {
  2369. "description": "Bad request",
  2370. "content": {
  2371. "application/json": {
  2372. "schema": {
  2373. "$ref": "#/components/schemas/BadRequestError"
  2374. }
  2375. }
  2376. }
  2377. }
  2378. },
  2379. "description": "Retrieve version control system (VCS) information for the current project, such as git branch.",
  2380. "summary": "Get VCS info",
  2381. "x-codeSamples": [
  2382. {
  2383. "lang": "js",
  2384. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.get({\n ...\n})"
  2385. }
  2386. ]
  2387. }
  2388. },
  2389. "/vcs/status": {
  2390. "get": {
  2391. "tags": ["instance"],
  2392. "operationId": "vcs.status",
  2393. "parameters": [
  2394. {
  2395. "name": "directory",
  2396. "in": "query",
  2397. "schema": {
  2398. "type": "string"
  2399. },
  2400. "required": false
  2401. },
  2402. {
  2403. "name": "workspace",
  2404. "in": "query",
  2405. "schema": {
  2406. "type": "string"
  2407. },
  2408. "required": false
  2409. }
  2410. ],
  2411. "responses": {
  2412. "200": {
  2413. "description": "VCS status",
  2414. "content": {
  2415. "application/json": {
  2416. "schema": {
  2417. "type": "array",
  2418. "items": {
  2419. "$ref": "#/components/schemas/VcsFileStatus"
  2420. },
  2421. "description": "VCS status"
  2422. }
  2423. }
  2424. }
  2425. },
  2426. "400": {
  2427. "description": "Bad request",
  2428. "content": {
  2429. "application/json": {
  2430. "schema": {
  2431. "$ref": "#/components/schemas/BadRequestError"
  2432. }
  2433. }
  2434. }
  2435. }
  2436. },
  2437. "description": "Retrieve changed files in the current working tree without patches.",
  2438. "summary": "Get VCS status",
  2439. "x-codeSamples": [
  2440. {
  2441. "lang": "js",
  2442. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.status({\n ...\n})"
  2443. }
  2444. ]
  2445. }
  2446. },
  2447. "/vcs/diff": {
  2448. "get": {
  2449. "tags": ["instance"],
  2450. "operationId": "vcs.diff",
  2451. "parameters": [
  2452. {
  2453. "name": "directory",
  2454. "in": "query",
  2455. "schema": {
  2456. "type": "string"
  2457. },
  2458. "required": false
  2459. },
  2460. {
  2461. "name": "workspace",
  2462. "in": "query",
  2463. "schema": {
  2464. "type": "string"
  2465. },
  2466. "required": false
  2467. },
  2468. {
  2469. "name": "mode",
  2470. "in": "query",
  2471. "schema": {
  2472. "type": "string",
  2473. "enum": ["git", "branch"]
  2474. },
  2475. "required": true
  2476. },
  2477. {
  2478. "name": "context",
  2479. "in": "query",
  2480. "schema": {
  2481. "type": "integer",
  2482. "minimum": 0
  2483. },
  2484. "required": false
  2485. }
  2486. ],
  2487. "responses": {
  2488. "200": {
  2489. "description": "VCS diff",
  2490. "content": {
  2491. "application/json": {
  2492. "schema": {
  2493. "type": "array",
  2494. "items": {
  2495. "$ref": "#/components/schemas/VcsFileDiff"
  2496. },
  2497. "description": "VCS diff"
  2498. }
  2499. }
  2500. }
  2501. },
  2502. "400": {
  2503. "description": "Bad request",
  2504. "content": {
  2505. "application/json": {
  2506. "schema": {
  2507. "$ref": "#/components/schemas/BadRequestError"
  2508. }
  2509. }
  2510. }
  2511. }
  2512. },
  2513. "description": "Retrieve the current git diff for the working tree or against the default branch.",
  2514. "summary": "Get VCS diff",
  2515. "x-codeSamples": [
  2516. {
  2517. "lang": "js",
  2518. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff({\n ...\n})"
  2519. }
  2520. ]
  2521. }
  2522. },
  2523. "/vcs/diff/raw": {
  2524. "get": {
  2525. "tags": ["instance"],
  2526. "operationId": "vcs.diff.raw",
  2527. "parameters": [
  2528. {
  2529. "name": "directory",
  2530. "in": "query",
  2531. "schema": {
  2532. "type": "string"
  2533. },
  2534. "required": false
  2535. },
  2536. {
  2537. "name": "workspace",
  2538. "in": "query",
  2539. "schema": {
  2540. "type": "string"
  2541. },
  2542. "required": false
  2543. }
  2544. ],
  2545. "responses": {
  2546. "200": {
  2547. "description": "Raw VCS diff",
  2548. "content": {
  2549. "text/x-diff; charset=utf-8": {
  2550. "schema": {
  2551. "type": "string"
  2552. }
  2553. }
  2554. }
  2555. },
  2556. "400": {
  2557. "description": "Bad request",
  2558. "content": {
  2559. "application/json": {
  2560. "schema": {
  2561. "$ref": "#/components/schemas/BadRequestError"
  2562. }
  2563. }
  2564. }
  2565. }
  2566. },
  2567. "description": "Retrieve a raw patch for current uncommitted changes.",
  2568. "summary": "Get raw VCS diff",
  2569. "x-codeSamples": [
  2570. {
  2571. "lang": "js",
  2572. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff.raw({\n ...\n})"
  2573. }
  2574. ]
  2575. }
  2576. },
  2577. "/vcs/apply": {
  2578. "post": {
  2579. "tags": ["instance"],
  2580. "operationId": "vcs.apply",
  2581. "parameters": [
  2582. {
  2583. "name": "directory",
  2584. "in": "query",
  2585. "schema": {
  2586. "type": "string"
  2587. },
  2588. "required": false
  2589. },
  2590. {
  2591. "name": "workspace",
  2592. "in": "query",
  2593. "schema": {
  2594. "type": "string"
  2595. },
  2596. "required": false
  2597. }
  2598. ],
  2599. "responses": {
  2600. "200": {
  2601. "description": "VCS patch applied",
  2602. "content": {
  2603. "application/json": {
  2604. "schema": {
  2605. "type": "object",
  2606. "properties": {
  2607. "applied": {
  2608. "type": "boolean"
  2609. }
  2610. },
  2611. "required": ["applied"],
  2612. "additionalProperties": false,
  2613. "description": "VCS patch applied"
  2614. }
  2615. }
  2616. }
  2617. },
  2618. "400": {
  2619. "description": "VcsApplyError | InvalidRequestError",
  2620. "content": {
  2621. "application/json": {
  2622. "schema": {
  2623. "anyOf": [
  2624. {
  2625. "$ref": "#/components/schemas/VcsApplyError"
  2626. },
  2627. {
  2628. "$ref": "#/components/schemas/InvalidRequestError"
  2629. }
  2630. ]
  2631. }
  2632. }
  2633. }
  2634. }
  2635. },
  2636. "description": "Apply a raw patch to the current working tree.",
  2637. "summary": "Apply VCS patch",
  2638. "requestBody": {
  2639. "content": {
  2640. "application/json": {
  2641. "schema": {
  2642. "type": "object",
  2643. "properties": {
  2644. "patch": {
  2645. "type": "string"
  2646. }
  2647. },
  2648. "required": ["patch"],
  2649. "additionalProperties": false
  2650. }
  2651. }
  2652. }
  2653. },
  2654. "x-codeSamples": [
  2655. {
  2656. "lang": "js",
  2657. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.apply({\n ...\n})"
  2658. }
  2659. ]
  2660. }
  2661. },
  2662. "/command": {
  2663. "get": {
  2664. "tags": ["instance"],
  2665. "operationId": "command.list",
  2666. "parameters": [
  2667. {
  2668. "name": "directory",
  2669. "in": "query",
  2670. "schema": {
  2671. "type": "string"
  2672. },
  2673. "required": false
  2674. },
  2675. {
  2676. "name": "workspace",
  2677. "in": "query",
  2678. "schema": {
  2679. "type": "string"
  2680. },
  2681. "required": false
  2682. }
  2683. ],
  2684. "responses": {
  2685. "200": {
  2686. "description": "List of commands",
  2687. "content": {
  2688. "application/json": {
  2689. "schema": {
  2690. "type": "array",
  2691. "items": {
  2692. "$ref": "#/components/schemas/Command"
  2693. },
  2694. "description": "List of commands"
  2695. }
  2696. }
  2697. }
  2698. },
  2699. "400": {
  2700. "description": "Bad request",
  2701. "content": {
  2702. "application/json": {
  2703. "schema": {
  2704. "$ref": "#/components/schemas/BadRequestError"
  2705. }
  2706. }
  2707. }
  2708. }
  2709. },
  2710. "description": "Get a list of all available commands in the OpenCode system.",
  2711. "summary": "List commands",
  2712. "x-codeSamples": [
  2713. {
  2714. "lang": "js",
  2715. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
  2716. }
  2717. ]
  2718. }
  2719. },
  2720. "/agent": {
  2721. "get": {
  2722. "tags": ["instance"],
  2723. "operationId": "app.agents",
  2724. "parameters": [
  2725. {
  2726. "name": "directory",
  2727. "in": "query",
  2728. "schema": {
  2729. "type": "string"
  2730. },
  2731. "required": false
  2732. },
  2733. {
  2734. "name": "workspace",
  2735. "in": "query",
  2736. "schema": {
  2737. "type": "string"
  2738. },
  2739. "required": false
  2740. }
  2741. ],
  2742. "responses": {
  2743. "200": {
  2744. "description": "List of agents",
  2745. "content": {
  2746. "application/json": {
  2747. "schema": {
  2748. "type": "array",
  2749. "items": {
  2750. "$ref": "#/components/schemas/Agent"
  2751. },
  2752. "description": "List of agents"
  2753. }
  2754. }
  2755. }
  2756. },
  2757. "400": {
  2758. "description": "Bad request",
  2759. "content": {
  2760. "application/json": {
  2761. "schema": {
  2762. "$ref": "#/components/schemas/BadRequestError"
  2763. }
  2764. }
  2765. }
  2766. }
  2767. },
  2768. "description": "Get a list of all available AI agents in the OpenCode system.",
  2769. "summary": "List agents",
  2770. "x-codeSamples": [
  2771. {
  2772. "lang": "js",
  2773. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
  2774. }
  2775. ]
  2776. }
  2777. },
  2778. "/skill": {
  2779. "get": {
  2780. "tags": ["instance"],
  2781. "operationId": "app.skills",
  2782. "parameters": [
  2783. {
  2784. "name": "directory",
  2785. "in": "query",
  2786. "schema": {
  2787. "type": "string"
  2788. },
  2789. "required": false
  2790. },
  2791. {
  2792. "name": "workspace",
  2793. "in": "query",
  2794. "schema": {
  2795. "type": "string"
  2796. },
  2797. "required": false
  2798. }
  2799. ],
  2800. "responses": {
  2801. "200": {
  2802. "description": "List of skills",
  2803. "content": {
  2804. "application/json": {
  2805. "schema": {
  2806. "type": "array",
  2807. "items": {
  2808. "type": "object",
  2809. "properties": {
  2810. "name": {
  2811. "type": "string"
  2812. },
  2813. "description": {
  2814. "type": "string"
  2815. },
  2816. "location": {
  2817. "type": "string"
  2818. },
  2819. "content": {
  2820. "type": "string"
  2821. }
  2822. },
  2823. "required": ["name", "location", "content"],
  2824. "additionalProperties": false
  2825. },
  2826. "description": "List of skills"
  2827. }
  2828. }
  2829. }
  2830. },
  2831. "400": {
  2832. "description": "Bad request",
  2833. "content": {
  2834. "application/json": {
  2835. "schema": {
  2836. "$ref": "#/components/schemas/BadRequestError"
  2837. }
  2838. }
  2839. }
  2840. }
  2841. },
  2842. "description": "Get a list of all available skills in the OpenCode system.",
  2843. "summary": "List skills",
  2844. "x-codeSamples": [
  2845. {
  2846. "lang": "js",
  2847. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.skills({\n ...\n})"
  2848. }
  2849. ]
  2850. }
  2851. },
  2852. "/lsp": {
  2853. "get": {
  2854. "tags": ["instance"],
  2855. "operationId": "lsp.status",
  2856. "parameters": [
  2857. {
  2858. "name": "directory",
  2859. "in": "query",
  2860. "schema": {
  2861. "type": "string"
  2862. },
  2863. "required": false
  2864. },
  2865. {
  2866. "name": "workspace",
  2867. "in": "query",
  2868. "schema": {
  2869. "type": "string"
  2870. },
  2871. "required": false
  2872. }
  2873. ],
  2874. "responses": {
  2875. "200": {
  2876. "description": "LSP server status",
  2877. "content": {
  2878. "application/json": {
  2879. "schema": {
  2880. "type": "array",
  2881. "items": {
  2882. "$ref": "#/components/schemas/LSPStatus"
  2883. },
  2884. "description": "LSP server status"
  2885. }
  2886. }
  2887. }
  2888. },
  2889. "400": {
  2890. "description": "Bad request",
  2891. "content": {
  2892. "application/json": {
  2893. "schema": {
  2894. "$ref": "#/components/schemas/BadRequestError"
  2895. }
  2896. }
  2897. }
  2898. }
  2899. },
  2900. "description": "Get LSP server status",
  2901. "summary": "Get LSP status",
  2902. "x-codeSamples": [
  2903. {
  2904. "lang": "js",
  2905. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
  2906. }
  2907. ]
  2908. }
  2909. },
  2910. "/formatter": {
  2911. "get": {
  2912. "tags": ["instance"],
  2913. "operationId": "formatter.status",
  2914. "parameters": [
  2915. {
  2916. "name": "directory",
  2917. "in": "query",
  2918. "schema": {
  2919. "type": "string"
  2920. },
  2921. "required": false
  2922. },
  2923. {
  2924. "name": "workspace",
  2925. "in": "query",
  2926. "schema": {
  2927. "type": "string"
  2928. },
  2929. "required": false
  2930. }
  2931. ],
  2932. "responses": {
  2933. "200": {
  2934. "description": "Formatter status",
  2935. "content": {
  2936. "application/json": {
  2937. "schema": {
  2938. "type": "array",
  2939. "items": {
  2940. "$ref": "#/components/schemas/FormatterStatus"
  2941. },
  2942. "description": "Formatter status"
  2943. }
  2944. }
  2945. }
  2946. },
  2947. "400": {
  2948. "description": "Bad request",
  2949. "content": {
  2950. "application/json": {
  2951. "schema": {
  2952. "$ref": "#/components/schemas/BadRequestError"
  2953. }
  2954. }
  2955. }
  2956. }
  2957. },
  2958. "description": "Get formatter status",
  2959. "summary": "Get formatter status",
  2960. "x-codeSamples": [
  2961. {
  2962. "lang": "js",
  2963. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
  2964. }
  2965. ]
  2966. }
  2967. },
  2968. "/mcp": {
  2969. "get": {
  2970. "tags": ["mcp"],
  2971. "operationId": "mcp.status",
  2972. "parameters": [
  2973. {
  2974. "name": "directory",
  2975. "in": "query",
  2976. "schema": {
  2977. "type": "string"
  2978. },
  2979. "required": false
  2980. },
  2981. {
  2982. "name": "workspace",
  2983. "in": "query",
  2984. "schema": {
  2985. "type": "string"
  2986. },
  2987. "required": false
  2988. }
  2989. ],
  2990. "responses": {
  2991. "200": {
  2992. "description": "MCP server status",
  2993. "content": {
  2994. "application/json": {
  2995. "schema": {
  2996. "type": "object",
  2997. "additionalProperties": {
  2998. "$ref": "#/components/schemas/MCPStatus"
  2999. },
  3000. "description": "MCP server status"
  3001. }
  3002. }
  3003. }
  3004. },
  3005. "400": {
  3006. "description": "Bad request",
  3007. "content": {
  3008. "application/json": {
  3009. "schema": {
  3010. "$ref": "#/components/schemas/BadRequestError"
  3011. }
  3012. }
  3013. }
  3014. }
  3015. },
  3016. "description": "Get the status of all Model Context Protocol (MCP) servers.",
  3017. "summary": "Get MCP status",
  3018. "x-codeSamples": [
  3019. {
  3020. "lang": "js",
  3021. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
  3022. }
  3023. ]
  3024. },
  3025. "post": {
  3026. "tags": ["mcp"],
  3027. "operationId": "mcp.add",
  3028. "parameters": [
  3029. {
  3030. "name": "directory",
  3031. "in": "query",
  3032. "schema": {
  3033. "type": "string"
  3034. },
  3035. "required": false
  3036. },
  3037. {
  3038. "name": "workspace",
  3039. "in": "query",
  3040. "schema": {
  3041. "type": "string"
  3042. },
  3043. "required": false
  3044. }
  3045. ],
  3046. "responses": {
  3047. "200": {
  3048. "description": "MCP server added successfully",
  3049. "content": {
  3050. "application/json": {
  3051. "schema": {
  3052. "type": "object",
  3053. "additionalProperties": {
  3054. "$ref": "#/components/schemas/MCPStatus"
  3055. },
  3056. "description": "MCP server added successfully"
  3057. }
  3058. }
  3059. }
  3060. },
  3061. "400": {
  3062. "description": "BadRequest | InvalidRequestError",
  3063. "content": {
  3064. "application/json": {
  3065. "schema": {
  3066. "anyOf": [
  3067. {
  3068. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3069. },
  3070. {
  3071. "$ref": "#/components/schemas/InvalidRequestError"
  3072. }
  3073. ]
  3074. }
  3075. }
  3076. }
  3077. }
  3078. },
  3079. "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
  3080. "summary": "Add MCP server",
  3081. "requestBody": {
  3082. "content": {
  3083. "application/json": {
  3084. "schema": {
  3085. "type": "object",
  3086. "properties": {
  3087. "name": {
  3088. "type": "string"
  3089. },
  3090. "config": {
  3091. "anyOf": [
  3092. {
  3093. "$ref": "#/components/schemas/McpLocalConfig"
  3094. },
  3095. {
  3096. "$ref": "#/components/schemas/McpRemoteConfig"
  3097. }
  3098. ]
  3099. }
  3100. },
  3101. "required": ["name", "config"],
  3102. "additionalProperties": false
  3103. }
  3104. }
  3105. }
  3106. },
  3107. "x-codeSamples": [
  3108. {
  3109. "lang": "js",
  3110. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
  3111. }
  3112. ]
  3113. }
  3114. },
  3115. "/mcp/{name}/auth": {
  3116. "post": {
  3117. "tags": ["mcp"],
  3118. "operationId": "mcp.auth.start",
  3119. "parameters": [
  3120. {
  3121. "name": "name",
  3122. "in": "path",
  3123. "schema": {
  3124. "type": "string"
  3125. },
  3126. "required": true
  3127. },
  3128. {
  3129. "name": "directory",
  3130. "in": "query",
  3131. "schema": {
  3132. "type": "string"
  3133. },
  3134. "required": false
  3135. },
  3136. {
  3137. "name": "workspace",
  3138. "in": "query",
  3139. "schema": {
  3140. "type": "string"
  3141. },
  3142. "required": false
  3143. }
  3144. ],
  3145. "responses": {
  3146. "200": {
  3147. "description": "OAuth flow started",
  3148. "content": {
  3149. "application/json": {
  3150. "schema": {
  3151. "type": "object",
  3152. "properties": {
  3153. "authorizationUrl": {
  3154. "type": "string"
  3155. },
  3156. "oauthState": {
  3157. "type": "string"
  3158. }
  3159. },
  3160. "required": ["authorizationUrl", "oauthState"],
  3161. "additionalProperties": false,
  3162. "description": "OAuth flow started"
  3163. }
  3164. }
  3165. }
  3166. },
  3167. "400": {
  3168. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3169. "content": {
  3170. "application/json": {
  3171. "schema": {
  3172. "anyOf": [
  3173. {
  3174. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3175. },
  3176. {
  3177. "$ref": "#/components/schemas/InvalidRequestError"
  3178. }
  3179. ]
  3180. }
  3181. }
  3182. }
  3183. },
  3184. "404": {
  3185. "description": "McpServerNotFoundError",
  3186. "content": {
  3187. "application/json": {
  3188. "schema": {
  3189. "$ref": "#/components/schemas/McpServerNotFoundError"
  3190. }
  3191. }
  3192. }
  3193. }
  3194. },
  3195. "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
  3196. "summary": "Start MCP OAuth",
  3197. "x-codeSamples": [
  3198. {
  3199. "lang": "js",
  3200. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
  3201. }
  3202. ]
  3203. },
  3204. "delete": {
  3205. "tags": ["mcp"],
  3206. "operationId": "mcp.auth.remove",
  3207. "parameters": [
  3208. {
  3209. "name": "name",
  3210. "in": "path",
  3211. "schema": {
  3212. "type": "string"
  3213. },
  3214. "required": true
  3215. },
  3216. {
  3217. "name": "directory",
  3218. "in": "query",
  3219. "schema": {
  3220. "type": "string"
  3221. },
  3222. "required": false
  3223. },
  3224. {
  3225. "name": "workspace",
  3226. "in": "query",
  3227. "schema": {
  3228. "type": "string"
  3229. },
  3230. "required": false
  3231. }
  3232. ],
  3233. "responses": {
  3234. "200": {
  3235. "description": "OAuth credentials removed",
  3236. "content": {
  3237. "application/json": {
  3238. "schema": {
  3239. "type": "object",
  3240. "properties": {
  3241. "success": {
  3242. "type": "boolean",
  3243. "enum": [true]
  3244. }
  3245. },
  3246. "required": ["success"],
  3247. "additionalProperties": false,
  3248. "description": "OAuth credentials removed"
  3249. }
  3250. }
  3251. }
  3252. },
  3253. "400": {
  3254. "description": "Bad request",
  3255. "content": {
  3256. "application/json": {
  3257. "schema": {
  3258. "$ref": "#/components/schemas/BadRequestError"
  3259. }
  3260. }
  3261. }
  3262. },
  3263. "404": {
  3264. "description": "McpServerNotFoundError",
  3265. "content": {
  3266. "application/json": {
  3267. "schema": {
  3268. "$ref": "#/components/schemas/McpServerNotFoundError"
  3269. }
  3270. }
  3271. }
  3272. }
  3273. },
  3274. "description": "Remove OAuth credentials for an MCP server.",
  3275. "summary": "Remove MCP OAuth",
  3276. "x-codeSamples": [
  3277. {
  3278. "lang": "js",
  3279. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
  3280. }
  3281. ]
  3282. }
  3283. },
  3284. "/mcp/{name}/auth/callback": {
  3285. "post": {
  3286. "tags": ["mcp"],
  3287. "operationId": "mcp.auth.callback",
  3288. "parameters": [
  3289. {
  3290. "name": "name",
  3291. "in": "path",
  3292. "schema": {
  3293. "type": "string"
  3294. },
  3295. "required": true
  3296. },
  3297. {
  3298. "name": "directory",
  3299. "in": "query",
  3300. "schema": {
  3301. "type": "string"
  3302. },
  3303. "required": false
  3304. },
  3305. {
  3306. "name": "workspace",
  3307. "in": "query",
  3308. "schema": {
  3309. "type": "string"
  3310. },
  3311. "required": false
  3312. }
  3313. ],
  3314. "responses": {
  3315. "200": {
  3316. "description": "OAuth authentication completed",
  3317. "content": {
  3318. "application/json": {
  3319. "schema": {
  3320. "$ref": "#/components/schemas/MCPStatus"
  3321. }
  3322. }
  3323. }
  3324. },
  3325. "400": {
  3326. "description": "BadRequest | InvalidRequestError",
  3327. "content": {
  3328. "application/json": {
  3329. "schema": {
  3330. "anyOf": [
  3331. {
  3332. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3333. },
  3334. {
  3335. "$ref": "#/components/schemas/InvalidRequestError"
  3336. }
  3337. ]
  3338. }
  3339. }
  3340. }
  3341. },
  3342. "404": {
  3343. "description": "McpServerNotFoundError",
  3344. "content": {
  3345. "application/json": {
  3346. "schema": {
  3347. "$ref": "#/components/schemas/McpServerNotFoundError"
  3348. }
  3349. }
  3350. }
  3351. }
  3352. },
  3353. "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
  3354. "summary": "Complete MCP OAuth",
  3355. "requestBody": {
  3356. "content": {
  3357. "application/json": {
  3358. "schema": {
  3359. "type": "object",
  3360. "properties": {
  3361. "code": {
  3362. "type": "string"
  3363. }
  3364. },
  3365. "required": ["code"],
  3366. "additionalProperties": false
  3367. }
  3368. }
  3369. }
  3370. },
  3371. "x-codeSamples": [
  3372. {
  3373. "lang": "js",
  3374. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
  3375. }
  3376. ]
  3377. }
  3378. },
  3379. "/mcp/{name}/auth/authenticate": {
  3380. "post": {
  3381. "tags": ["mcp"],
  3382. "operationId": "mcp.auth.authenticate",
  3383. "parameters": [
  3384. {
  3385. "name": "name",
  3386. "in": "path",
  3387. "schema": {
  3388. "type": "string"
  3389. },
  3390. "required": true
  3391. },
  3392. {
  3393. "name": "directory",
  3394. "in": "query",
  3395. "schema": {
  3396. "type": "string"
  3397. },
  3398. "required": false
  3399. },
  3400. {
  3401. "name": "workspace",
  3402. "in": "query",
  3403. "schema": {
  3404. "type": "string"
  3405. },
  3406. "required": false
  3407. }
  3408. ],
  3409. "responses": {
  3410. "200": {
  3411. "description": "OAuth authentication completed",
  3412. "content": {
  3413. "application/json": {
  3414. "schema": {
  3415. "$ref": "#/components/schemas/MCPStatus"
  3416. }
  3417. }
  3418. }
  3419. },
  3420. "400": {
  3421. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3422. "content": {
  3423. "application/json": {
  3424. "schema": {
  3425. "anyOf": [
  3426. {
  3427. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3428. },
  3429. {
  3430. "$ref": "#/components/schemas/InvalidRequestError"
  3431. }
  3432. ]
  3433. }
  3434. }
  3435. }
  3436. },
  3437. "404": {
  3438. "description": "McpServerNotFoundError",
  3439. "content": {
  3440. "application/json": {
  3441. "schema": {
  3442. "$ref": "#/components/schemas/McpServerNotFoundError"
  3443. }
  3444. }
  3445. }
  3446. }
  3447. },
  3448. "description": "Start OAuth flow and wait for callback (opens browser).",
  3449. "summary": "Authenticate MCP OAuth",
  3450. "x-codeSamples": [
  3451. {
  3452. "lang": "js",
  3453. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
  3454. }
  3455. ]
  3456. }
  3457. },
  3458. "/mcp/{name}/connect": {
  3459. "post": {
  3460. "tags": ["mcp"],
  3461. "operationId": "mcp.connect",
  3462. "parameters": [
  3463. {
  3464. "name": "name",
  3465. "in": "path",
  3466. "schema": {
  3467. "type": "string"
  3468. },
  3469. "required": true
  3470. },
  3471. {
  3472. "name": "directory",
  3473. "in": "query",
  3474. "schema": {
  3475. "type": "string"
  3476. },
  3477. "required": false
  3478. },
  3479. {
  3480. "name": "workspace",
  3481. "in": "query",
  3482. "schema": {
  3483. "type": "string"
  3484. },
  3485. "required": false
  3486. }
  3487. ],
  3488. "responses": {
  3489. "200": {
  3490. "description": "MCP server connected successfully",
  3491. "content": {
  3492. "application/json": {
  3493. "schema": {
  3494. "type": "boolean",
  3495. "description": "MCP server connected successfully"
  3496. }
  3497. }
  3498. }
  3499. },
  3500. "400": {
  3501. "description": "Bad request",
  3502. "content": {
  3503. "application/json": {
  3504. "schema": {
  3505. "$ref": "#/components/schemas/BadRequestError"
  3506. }
  3507. }
  3508. }
  3509. },
  3510. "404": {
  3511. "description": "McpServerNotFoundError",
  3512. "content": {
  3513. "application/json": {
  3514. "schema": {
  3515. "$ref": "#/components/schemas/McpServerNotFoundError"
  3516. }
  3517. }
  3518. }
  3519. }
  3520. },
  3521. "description": "Connect an MCP server.",
  3522. "x-codeSamples": [
  3523. {
  3524. "lang": "js",
  3525. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
  3526. }
  3527. ]
  3528. }
  3529. },
  3530. "/mcp/{name}/disconnect": {
  3531. "post": {
  3532. "tags": ["mcp"],
  3533. "operationId": "mcp.disconnect",
  3534. "parameters": [
  3535. {
  3536. "name": "name",
  3537. "in": "path",
  3538. "schema": {
  3539. "type": "string"
  3540. },
  3541. "required": true
  3542. },
  3543. {
  3544. "name": "directory",
  3545. "in": "query",
  3546. "schema": {
  3547. "type": "string"
  3548. },
  3549. "required": false
  3550. },
  3551. {
  3552. "name": "workspace",
  3553. "in": "query",
  3554. "schema": {
  3555. "type": "string"
  3556. },
  3557. "required": false
  3558. }
  3559. ],
  3560. "responses": {
  3561. "200": {
  3562. "description": "MCP server disconnected successfully",
  3563. "content": {
  3564. "application/json": {
  3565. "schema": {
  3566. "type": "boolean",
  3567. "description": "MCP server disconnected successfully"
  3568. }
  3569. }
  3570. }
  3571. },
  3572. "400": {
  3573. "description": "Bad request",
  3574. "content": {
  3575. "application/json": {
  3576. "schema": {
  3577. "$ref": "#/components/schemas/BadRequestError"
  3578. }
  3579. }
  3580. }
  3581. },
  3582. "404": {
  3583. "description": "McpServerNotFoundError",
  3584. "content": {
  3585. "application/json": {
  3586. "schema": {
  3587. "$ref": "#/components/schemas/McpServerNotFoundError"
  3588. }
  3589. }
  3590. }
  3591. }
  3592. },
  3593. "description": "Disconnect an MCP server.",
  3594. "x-codeSamples": [
  3595. {
  3596. "lang": "js",
  3597. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
  3598. }
  3599. ]
  3600. }
  3601. },
  3602. "/project": {
  3603. "get": {
  3604. "tags": ["project"],
  3605. "operationId": "project.list",
  3606. "parameters": [
  3607. {
  3608. "name": "directory",
  3609. "in": "query",
  3610. "schema": {
  3611. "type": "string"
  3612. },
  3613. "required": false
  3614. },
  3615. {
  3616. "name": "workspace",
  3617. "in": "query",
  3618. "schema": {
  3619. "type": "string"
  3620. },
  3621. "required": false
  3622. }
  3623. ],
  3624. "responses": {
  3625. "200": {
  3626. "description": "List of projects",
  3627. "content": {
  3628. "application/json": {
  3629. "schema": {
  3630. "type": "array",
  3631. "items": {
  3632. "$ref": "#/components/schemas/Project"
  3633. },
  3634. "description": "List of projects"
  3635. }
  3636. }
  3637. }
  3638. },
  3639. "400": {
  3640. "description": "Bad request",
  3641. "content": {
  3642. "application/json": {
  3643. "schema": {
  3644. "$ref": "#/components/schemas/BadRequestError"
  3645. }
  3646. }
  3647. }
  3648. }
  3649. },
  3650. "description": "Get a list of projects that have been opened with OpenCode.",
  3651. "summary": "List all projects",
  3652. "x-codeSamples": [
  3653. {
  3654. "lang": "js",
  3655. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.list({\n ...\n})"
  3656. }
  3657. ]
  3658. }
  3659. },
  3660. "/project/current": {
  3661. "get": {
  3662. "tags": ["project"],
  3663. "operationId": "project.current",
  3664. "parameters": [
  3665. {
  3666. "name": "directory",
  3667. "in": "query",
  3668. "schema": {
  3669. "type": "string"
  3670. },
  3671. "required": false
  3672. },
  3673. {
  3674. "name": "workspace",
  3675. "in": "query",
  3676. "schema": {
  3677. "type": "string"
  3678. },
  3679. "required": false
  3680. }
  3681. ],
  3682. "responses": {
  3683. "200": {
  3684. "description": "Current project information",
  3685. "content": {
  3686. "application/json": {
  3687. "schema": {
  3688. "$ref": "#/components/schemas/Project"
  3689. }
  3690. }
  3691. }
  3692. },
  3693. "400": {
  3694. "description": "Bad request",
  3695. "content": {
  3696. "application/json": {
  3697. "schema": {
  3698. "$ref": "#/components/schemas/BadRequestError"
  3699. }
  3700. }
  3701. }
  3702. }
  3703. },
  3704. "description": "Retrieve the currently active project that OpenCode is working with.",
  3705. "summary": "Get current project",
  3706. "x-codeSamples": [
  3707. {
  3708. "lang": "js",
  3709. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.current({\n ...\n})"
  3710. }
  3711. ]
  3712. }
  3713. },
  3714. "/project/git/init": {
  3715. "post": {
  3716. "tags": ["project"],
  3717. "operationId": "project.initGit",
  3718. "parameters": [
  3719. {
  3720. "name": "directory",
  3721. "in": "query",
  3722. "schema": {
  3723. "type": "string"
  3724. },
  3725. "required": false
  3726. },
  3727. {
  3728. "name": "workspace",
  3729. "in": "query",
  3730. "schema": {
  3731. "type": "string"
  3732. },
  3733. "required": false
  3734. }
  3735. ],
  3736. "responses": {
  3737. "200": {
  3738. "description": "Project information after git initialization",
  3739. "content": {
  3740. "application/json": {
  3741. "schema": {
  3742. "$ref": "#/components/schemas/Project"
  3743. }
  3744. }
  3745. }
  3746. },
  3747. "400": {
  3748. "description": "Bad request",
  3749. "content": {
  3750. "application/json": {
  3751. "schema": {
  3752. "$ref": "#/components/schemas/BadRequestError"
  3753. }
  3754. }
  3755. }
  3756. }
  3757. },
  3758. "description": "Create a git repository for the current project and return the refreshed project info.",
  3759. "summary": "Initialize git repository",
  3760. "x-codeSamples": [
  3761. {
  3762. "lang": "js",
  3763. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.initGit({\n ...\n})"
  3764. }
  3765. ]
  3766. }
  3767. },
  3768. "/project/{projectID}": {
  3769. "patch": {
  3770. "tags": ["project"],
  3771. "operationId": "project.update",
  3772. "parameters": [
  3773. {
  3774. "name": "projectID",
  3775. "in": "path",
  3776. "schema": {
  3777. "type": "string"
  3778. },
  3779. "required": true
  3780. },
  3781. {
  3782. "name": "directory",
  3783. "in": "query",
  3784. "schema": {
  3785. "type": "string"
  3786. },
  3787. "required": false
  3788. },
  3789. {
  3790. "name": "workspace",
  3791. "in": "query",
  3792. "schema": {
  3793. "type": "string"
  3794. },
  3795. "required": false
  3796. }
  3797. ],
  3798. "responses": {
  3799. "200": {
  3800. "description": "Updated project information",
  3801. "content": {
  3802. "application/json": {
  3803. "schema": {
  3804. "$ref": "#/components/schemas/Project"
  3805. }
  3806. }
  3807. }
  3808. },
  3809. "400": {
  3810. "description": "BadRequest | InvalidRequestError",
  3811. "content": {
  3812. "application/json": {
  3813. "schema": {
  3814. "anyOf": [
  3815. {
  3816. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3817. },
  3818. {
  3819. "$ref": "#/components/schemas/InvalidRequestError"
  3820. }
  3821. ]
  3822. }
  3823. }
  3824. }
  3825. },
  3826. "404": {
  3827. "description": "ProjectNotFoundError",
  3828. "content": {
  3829. "application/json": {
  3830. "schema": {
  3831. "$ref": "#/components/schemas/ProjectNotFoundError"
  3832. }
  3833. }
  3834. }
  3835. }
  3836. },
  3837. "description": "Update project properties such as name, icon, and commands.",
  3838. "summary": "Update project",
  3839. "requestBody": {
  3840. "content": {
  3841. "application/json": {
  3842. "schema": {
  3843. "type": "object",
  3844. "properties": {
  3845. "name": {
  3846. "type": "string"
  3847. },
  3848. "icon": {
  3849. "$ref": "#/components/schemas/ProjectIcon"
  3850. },
  3851. "commands": {
  3852. "$ref": "#/components/schemas/ProjectCommands"
  3853. }
  3854. },
  3855. "additionalProperties": false
  3856. }
  3857. }
  3858. }
  3859. },
  3860. "x-codeSamples": [
  3861. {
  3862. "lang": "js",
  3863. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.update({\n ...\n})"
  3864. }
  3865. ]
  3866. }
  3867. },
  3868. "/project/{projectID}/directories": {
  3869. "get": {
  3870. "tags": ["project"],
  3871. "operationId": "project.directories",
  3872. "parameters": [
  3873. {
  3874. "name": "projectID",
  3875. "in": "path",
  3876. "schema": {
  3877. "type": "string"
  3878. },
  3879. "required": true
  3880. },
  3881. {
  3882. "name": "directory",
  3883. "in": "query",
  3884. "schema": {
  3885. "type": "string"
  3886. },
  3887. "required": false
  3888. },
  3889. {
  3890. "name": "workspace",
  3891. "in": "query",
  3892. "schema": {
  3893. "type": "string"
  3894. },
  3895. "required": false
  3896. }
  3897. ],
  3898. "responses": {
  3899. "200": {
  3900. "description": "Project directories",
  3901. "content": {
  3902. "application/json": {
  3903. "schema": {
  3904. "$ref": "#/components/schemas/ProjectDirectories"
  3905. }
  3906. }
  3907. }
  3908. },
  3909. "400": {
  3910. "description": "Bad request",
  3911. "content": {
  3912. "application/json": {
  3913. "schema": {
  3914. "$ref": "#/components/schemas/BadRequestError"
  3915. }
  3916. }
  3917. }
  3918. }
  3919. },
  3920. "description": "List known local absolute directories for a project.",
  3921. "summary": "List project directories",
  3922. "x-codeSamples": [
  3923. {
  3924. "lang": "js",
  3925. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.directories({\n ...\n})"
  3926. }
  3927. ]
  3928. }
  3929. },
  3930. "/experimental/project/{projectID}/copy/generate-name": {
  3931. "post": {
  3932. "tags": ["projectCopy"],
  3933. "operationId": "experimental.projectCopy.generateName",
  3934. "parameters": [
  3935. {
  3936. "name": "projectID",
  3937. "in": "path",
  3938. "schema": {
  3939. "type": "string"
  3940. },
  3941. "required": true
  3942. },
  3943. {
  3944. "name": "directory",
  3945. "in": "query",
  3946. "schema": {
  3947. "type": "string"
  3948. },
  3949. "required": false
  3950. },
  3951. {
  3952. "name": "workspace",
  3953. "in": "query",
  3954. "schema": {
  3955. "type": "string"
  3956. },
  3957. "required": false
  3958. }
  3959. ],
  3960. "responses": {
  3961. "200": {
  3962. "description": "Success",
  3963. "content": {
  3964. "application/json": {
  3965. "schema": {
  3966. "type": "object",
  3967. "properties": {
  3968. "name": {
  3969. "type": "string"
  3970. }
  3971. },
  3972. "required": ["name"],
  3973. "additionalProperties": false
  3974. }
  3975. }
  3976. }
  3977. },
  3978. "400": {
  3979. "description": "Bad request",
  3980. "content": {
  3981. "application/json": {
  3982. "schema": {
  3983. "$ref": "#/components/schemas/BadRequestError"
  3984. }
  3985. }
  3986. }
  3987. }
  3988. },
  3989. "description": "Generate a short name for a project copy from task context.",
  3990. "summary": "Generate project copy name",
  3991. "requestBody": {
  3992. "content": {
  3993. "application/json": {
  3994. "schema": {
  3995. "type": "object",
  3996. "properties": {
  3997. "context": {
  3998. "type": "string"
  3999. }
  4000. },
  4001. "additionalProperties": false
  4002. }
  4003. }
  4004. }
  4005. },
  4006. "x-codeSamples": [
  4007. {
  4008. "lang": "js",
  4009. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.projectCopy.generateName({\n ...\n})"
  4010. }
  4011. ]
  4012. }
  4013. },
  4014. "/pty/shells": {
  4015. "get": {
  4016. "tags": ["pty"],
  4017. "operationId": "pty.shells",
  4018. "parameters": [
  4019. {
  4020. "name": "directory",
  4021. "in": "query",
  4022. "schema": {
  4023. "type": "string"
  4024. },
  4025. "required": false
  4026. },
  4027. {
  4028. "name": "workspace",
  4029. "in": "query",
  4030. "schema": {
  4031. "type": "string"
  4032. },
  4033. "required": false
  4034. }
  4035. ],
  4036. "responses": {
  4037. "200": {
  4038. "description": "List of shells",
  4039. "content": {
  4040. "application/json": {
  4041. "schema": {
  4042. "type": "array",
  4043. "items": {
  4044. "type": "object",
  4045. "properties": {
  4046. "path": {
  4047. "type": "string"
  4048. },
  4049. "name": {
  4050. "type": "string"
  4051. },
  4052. "acceptable": {
  4053. "type": "boolean"
  4054. }
  4055. },
  4056. "required": ["path", "name", "acceptable"],
  4057. "additionalProperties": false
  4058. },
  4059. "description": "List of shells"
  4060. }
  4061. }
  4062. }
  4063. },
  4064. "400": {
  4065. "description": "Bad request",
  4066. "content": {
  4067. "application/json": {
  4068. "schema": {
  4069. "$ref": "#/components/schemas/BadRequestError"
  4070. }
  4071. }
  4072. }
  4073. }
  4074. },
  4075. "description": "Get a list of available shells on the system.",
  4076. "summary": "List available shells",
  4077. "x-codeSamples": [
  4078. {
  4079. "lang": "js",
  4080. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.shells({\n ...\n})"
  4081. }
  4082. ]
  4083. }
  4084. },
  4085. "/pty": {
  4086. "get": {
  4087. "tags": ["pty"],
  4088. "operationId": "pty.list",
  4089. "parameters": [
  4090. {
  4091. "name": "directory",
  4092. "in": "query",
  4093. "schema": {
  4094. "type": "string"
  4095. },
  4096. "required": false
  4097. },
  4098. {
  4099. "name": "workspace",
  4100. "in": "query",
  4101. "schema": {
  4102. "type": "string"
  4103. },
  4104. "required": false
  4105. }
  4106. ],
  4107. "responses": {
  4108. "200": {
  4109. "description": "List of sessions",
  4110. "content": {
  4111. "application/json": {
  4112. "schema": {
  4113. "type": "array",
  4114. "items": {
  4115. "$ref": "#/components/schemas/Pty"
  4116. },
  4117. "description": "List of sessions"
  4118. }
  4119. }
  4120. }
  4121. },
  4122. "400": {
  4123. "description": "Bad request",
  4124. "content": {
  4125. "application/json": {
  4126. "schema": {
  4127. "$ref": "#/components/schemas/BadRequestError"
  4128. }
  4129. }
  4130. }
  4131. }
  4132. },
  4133. "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
  4134. "summary": "List PTY sessions",
  4135. "x-codeSamples": [
  4136. {
  4137. "lang": "js",
  4138. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
  4139. }
  4140. ]
  4141. },
  4142. "post": {
  4143. "tags": ["pty"],
  4144. "operationId": "pty.create",
  4145. "parameters": [
  4146. {
  4147. "name": "directory",
  4148. "in": "query",
  4149. "schema": {
  4150. "type": "string"
  4151. },
  4152. "required": false
  4153. },
  4154. {
  4155. "name": "workspace",
  4156. "in": "query",
  4157. "schema": {
  4158. "type": "string"
  4159. },
  4160. "required": false
  4161. }
  4162. ],
  4163. "responses": {
  4164. "200": {
  4165. "description": "Created session",
  4166. "content": {
  4167. "application/json": {
  4168. "schema": {
  4169. "$ref": "#/components/schemas/Pty"
  4170. }
  4171. }
  4172. }
  4173. },
  4174. "400": {
  4175. "description": "BadRequest | InvalidRequestError",
  4176. "content": {
  4177. "application/json": {
  4178. "schema": {
  4179. "anyOf": [
  4180. {
  4181. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4182. },
  4183. {
  4184. "$ref": "#/components/schemas/InvalidRequestError"
  4185. }
  4186. ]
  4187. }
  4188. }
  4189. }
  4190. }
  4191. },
  4192. "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
  4193. "summary": "Create PTY session",
  4194. "requestBody": {
  4195. "content": {
  4196. "application/json": {
  4197. "schema": {
  4198. "type": "object",
  4199. "properties": {
  4200. "command": {
  4201. "type": "string"
  4202. },
  4203. "args": {
  4204. "type": "array",
  4205. "items": {
  4206. "type": "string"
  4207. }
  4208. },
  4209. "cwd": {
  4210. "type": "string"
  4211. },
  4212. "title": {
  4213. "type": "string"
  4214. },
  4215. "env": {
  4216. "type": "object",
  4217. "additionalProperties": {
  4218. "type": "string"
  4219. }
  4220. }
  4221. },
  4222. "additionalProperties": false
  4223. }
  4224. }
  4225. }
  4226. },
  4227. "x-codeSamples": [
  4228. {
  4229. "lang": "js",
  4230. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
  4231. }
  4232. ]
  4233. }
  4234. },
  4235. "/pty/{ptyID}": {
  4236. "get": {
  4237. "tags": ["pty"],
  4238. "operationId": "pty.get",
  4239. "parameters": [
  4240. {
  4241. "name": "ptyID",
  4242. "in": "path",
  4243. "schema": {
  4244. "type": "string",
  4245. "pattern": "^pty"
  4246. },
  4247. "required": true
  4248. },
  4249. {
  4250. "name": "directory",
  4251. "in": "query",
  4252. "schema": {
  4253. "type": "string"
  4254. },
  4255. "required": false
  4256. },
  4257. {
  4258. "name": "workspace",
  4259. "in": "query",
  4260. "schema": {
  4261. "type": "string"
  4262. },
  4263. "required": false
  4264. }
  4265. ],
  4266. "responses": {
  4267. "200": {
  4268. "description": "Session info",
  4269. "content": {
  4270. "application/json": {
  4271. "schema": {
  4272. "$ref": "#/components/schemas/Pty"
  4273. }
  4274. }
  4275. }
  4276. },
  4277. "400": {
  4278. "description": "Bad request",
  4279. "content": {
  4280. "application/json": {
  4281. "schema": {
  4282. "$ref": "#/components/schemas/BadRequestError"
  4283. }
  4284. }
  4285. }
  4286. },
  4287. "404": {
  4288. "description": "PtyNotFoundError",
  4289. "content": {
  4290. "application/json": {
  4291. "schema": {
  4292. "$ref": "#/components/schemas/PtyNotFoundError"
  4293. }
  4294. }
  4295. }
  4296. }
  4297. },
  4298. "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
  4299. "summary": "Get PTY session",
  4300. "x-codeSamples": [
  4301. {
  4302. "lang": "js",
  4303. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
  4304. }
  4305. ]
  4306. },
  4307. "put": {
  4308. "tags": ["pty"],
  4309. "operationId": "pty.update",
  4310. "parameters": [
  4311. {
  4312. "name": "ptyID",
  4313. "in": "path",
  4314. "schema": {
  4315. "type": "string",
  4316. "pattern": "^pty"
  4317. },
  4318. "required": true
  4319. },
  4320. {
  4321. "name": "directory",
  4322. "in": "query",
  4323. "schema": {
  4324. "type": "string"
  4325. },
  4326. "required": false
  4327. },
  4328. {
  4329. "name": "workspace",
  4330. "in": "query",
  4331. "schema": {
  4332. "type": "string"
  4333. },
  4334. "required": false
  4335. }
  4336. ],
  4337. "responses": {
  4338. "200": {
  4339. "description": "Updated session",
  4340. "content": {
  4341. "application/json": {
  4342. "schema": {
  4343. "$ref": "#/components/schemas/Pty"
  4344. }
  4345. }
  4346. }
  4347. },
  4348. "400": {
  4349. "description": "BadRequest | InvalidRequestError",
  4350. "content": {
  4351. "application/json": {
  4352. "schema": {
  4353. "anyOf": [
  4354. {
  4355. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4356. },
  4357. {
  4358. "$ref": "#/components/schemas/InvalidRequestError"
  4359. }
  4360. ]
  4361. }
  4362. }
  4363. }
  4364. },
  4365. "404": {
  4366. "description": "PtyNotFoundError",
  4367. "content": {
  4368. "application/json": {
  4369. "schema": {
  4370. "$ref": "#/components/schemas/PtyNotFoundError"
  4371. }
  4372. }
  4373. }
  4374. }
  4375. },
  4376. "description": "Update properties of an existing pseudo-terminal (PTY) session.",
  4377. "summary": "Update PTY session",
  4378. "requestBody": {
  4379. "content": {
  4380. "application/json": {
  4381. "schema": {
  4382. "type": "object",
  4383. "properties": {
  4384. "title": {
  4385. "type": "string"
  4386. },
  4387. "size": {
  4388. "type": "object",
  4389. "properties": {
  4390. "rows": {
  4391. "type": "integer",
  4392. "exclusiveMinimum": 0
  4393. },
  4394. "cols": {
  4395. "type": "integer",
  4396. "exclusiveMinimum": 0
  4397. }
  4398. },
  4399. "required": ["rows", "cols"],
  4400. "additionalProperties": false
  4401. }
  4402. },
  4403. "additionalProperties": false
  4404. }
  4405. }
  4406. }
  4407. },
  4408. "x-codeSamples": [
  4409. {
  4410. "lang": "js",
  4411. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
  4412. }
  4413. ]
  4414. },
  4415. "delete": {
  4416. "tags": ["pty"],
  4417. "operationId": "pty.remove",
  4418. "parameters": [
  4419. {
  4420. "name": "ptyID",
  4421. "in": "path",
  4422. "schema": {
  4423. "type": "string",
  4424. "pattern": "^pty"
  4425. },
  4426. "required": true
  4427. },
  4428. {
  4429. "name": "directory",
  4430. "in": "query",
  4431. "schema": {
  4432. "type": "string"
  4433. },
  4434. "required": false
  4435. },
  4436. {
  4437. "name": "workspace",
  4438. "in": "query",
  4439. "schema": {
  4440. "type": "string"
  4441. },
  4442. "required": false
  4443. }
  4444. ],
  4445. "responses": {
  4446. "200": {
  4447. "description": "Session removed",
  4448. "content": {
  4449. "application/json": {
  4450. "schema": {
  4451. "type": "boolean",
  4452. "description": "Session removed"
  4453. }
  4454. }
  4455. }
  4456. },
  4457. "400": {
  4458. "description": "Bad request",
  4459. "content": {
  4460. "application/json": {
  4461. "schema": {
  4462. "$ref": "#/components/schemas/BadRequestError"
  4463. }
  4464. }
  4465. }
  4466. },
  4467. "404": {
  4468. "description": "PtyNotFoundError",
  4469. "content": {
  4470. "application/json": {
  4471. "schema": {
  4472. "$ref": "#/components/schemas/PtyNotFoundError"
  4473. }
  4474. }
  4475. }
  4476. }
  4477. },
  4478. "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
  4479. "summary": "Remove PTY session",
  4480. "x-codeSamples": [
  4481. {
  4482. "lang": "js",
  4483. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
  4484. }
  4485. ]
  4486. }
  4487. },
  4488. "/pty/{ptyID}/connect-token": {
  4489. "post": {
  4490. "tags": ["pty"],
  4491. "operationId": "pty.connectToken",
  4492. "parameters": [
  4493. {
  4494. "name": "ptyID",
  4495. "in": "path",
  4496. "schema": {
  4497. "type": "string",
  4498. "pattern": "^pty"
  4499. },
  4500. "required": true
  4501. },
  4502. {
  4503. "name": "directory",
  4504. "in": "query",
  4505. "schema": {
  4506. "type": "string"
  4507. },
  4508. "required": false
  4509. },
  4510. {
  4511. "name": "workspace",
  4512. "in": "query",
  4513. "schema": {
  4514. "type": "string"
  4515. },
  4516. "required": false
  4517. }
  4518. ],
  4519. "responses": {
  4520. "200": {
  4521. "description": "WebSocket connect token",
  4522. "content": {
  4523. "application/json": {
  4524. "schema": {
  4525. "$ref": "#/components/schemas/PtyTicketConnectToken"
  4526. }
  4527. }
  4528. }
  4529. },
  4530. "400": {
  4531. "description": "Bad request",
  4532. "content": {
  4533. "application/json": {
  4534. "schema": {
  4535. "$ref": "#/components/schemas/BadRequestError"
  4536. }
  4537. }
  4538. }
  4539. },
  4540. "403": {
  4541. "description": "PtyForbiddenError",
  4542. "content": {
  4543. "application/json": {
  4544. "schema": {
  4545. "$ref": "#/components/schemas/PtyForbiddenError"
  4546. }
  4547. }
  4548. }
  4549. },
  4550. "404": {
  4551. "description": "PtyNotFoundError",
  4552. "content": {
  4553. "application/json": {
  4554. "schema": {
  4555. "$ref": "#/components/schemas/PtyNotFoundError"
  4556. }
  4557. }
  4558. }
  4559. }
  4560. },
  4561. "description": "Create a short-lived ticket for opening a PTY WebSocket connection.",
  4562. "summary": "Create PTY WebSocket token",
  4563. "x-codeSamples": [
  4564. {
  4565. "lang": "js",
  4566. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connectToken({\n ...\n})"
  4567. }
  4568. ]
  4569. }
  4570. },
  4571. "/question": {
  4572. "get": {
  4573. "tags": ["question"],
  4574. "operationId": "question.list",
  4575. "parameters": [
  4576. {
  4577. "name": "directory",
  4578. "in": "query",
  4579. "schema": {
  4580. "type": "string"
  4581. },
  4582. "required": false
  4583. },
  4584. {
  4585. "name": "workspace",
  4586. "in": "query",
  4587. "schema": {
  4588. "type": "string"
  4589. },
  4590. "required": false
  4591. }
  4592. ],
  4593. "responses": {
  4594. "200": {
  4595. "description": "List of pending questions",
  4596. "content": {
  4597. "application/json": {
  4598. "schema": {
  4599. "type": "array",
  4600. "items": {
  4601. "$ref": "#/components/schemas/QuestionRequest"
  4602. },
  4603. "description": "List of pending questions"
  4604. }
  4605. }
  4606. }
  4607. },
  4608. "400": {
  4609. "description": "Bad request",
  4610. "content": {
  4611. "application/json": {
  4612. "schema": {
  4613. "$ref": "#/components/schemas/BadRequestError"
  4614. }
  4615. }
  4616. }
  4617. }
  4618. },
  4619. "description": "Get all pending question requests across all sessions.",
  4620. "summary": "List pending questions",
  4621. "x-codeSamples": [
  4622. {
  4623. "lang": "js",
  4624. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
  4625. }
  4626. ]
  4627. }
  4628. },
  4629. "/question/{requestID}/reply": {
  4630. "post": {
  4631. "tags": ["question"],
  4632. "operationId": "question.reply",
  4633. "parameters": [
  4634. {
  4635. "name": "requestID",
  4636. "in": "path",
  4637. "schema": {
  4638. "type": "string",
  4639. "pattern": "^que"
  4640. },
  4641. "required": true
  4642. },
  4643. {
  4644. "name": "directory",
  4645. "in": "query",
  4646. "schema": {
  4647. "type": "string"
  4648. },
  4649. "required": false
  4650. },
  4651. {
  4652. "name": "workspace",
  4653. "in": "query",
  4654. "schema": {
  4655. "type": "string"
  4656. },
  4657. "required": false
  4658. }
  4659. ],
  4660. "responses": {
  4661. "200": {
  4662. "description": "Question answered successfully",
  4663. "content": {
  4664. "application/json": {
  4665. "schema": {
  4666. "type": "boolean",
  4667. "description": "Question answered successfully"
  4668. }
  4669. }
  4670. }
  4671. },
  4672. "400": {
  4673. "description": "BadRequest | InvalidRequestError",
  4674. "content": {
  4675. "application/json": {
  4676. "schema": {
  4677. "anyOf": [
  4678. {
  4679. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4680. },
  4681. {
  4682. "$ref": "#/components/schemas/InvalidRequestError"
  4683. }
  4684. ]
  4685. }
  4686. }
  4687. }
  4688. },
  4689. "404": {
  4690. "description": "QuestionNotFoundError",
  4691. "content": {
  4692. "application/json": {
  4693. "schema": {
  4694. "$ref": "#/components/schemas/QuestionNotFoundError"
  4695. }
  4696. }
  4697. }
  4698. }
  4699. },
  4700. "description": "Provide answers to a question request from the AI assistant.",
  4701. "summary": "Reply to question request",
  4702. "requestBody": {
  4703. "content": {
  4704. "application/json": {
  4705. "schema": {
  4706. "type": "object",
  4707. "properties": {
  4708. "answers": {
  4709. "type": "array",
  4710. "items": {
  4711. "$ref": "#/components/schemas/QuestionAnswer"
  4712. },
  4713. "description": "User answers in order of questions (each answer is an array of selected labels)"
  4714. }
  4715. },
  4716. "required": ["answers"],
  4717. "additionalProperties": false
  4718. }
  4719. }
  4720. }
  4721. },
  4722. "x-codeSamples": [
  4723. {
  4724. "lang": "js",
  4725. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
  4726. }
  4727. ]
  4728. }
  4729. },
  4730. "/question/{requestID}/reject": {
  4731. "post": {
  4732. "tags": ["question"],
  4733. "operationId": "question.reject",
  4734. "parameters": [
  4735. {
  4736. "name": "requestID",
  4737. "in": "path",
  4738. "schema": {
  4739. "type": "string",
  4740. "pattern": "^que"
  4741. },
  4742. "required": true
  4743. },
  4744. {
  4745. "name": "directory",
  4746. "in": "query",
  4747. "schema": {
  4748. "type": "string"
  4749. },
  4750. "required": false
  4751. },
  4752. {
  4753. "name": "workspace",
  4754. "in": "query",
  4755. "schema": {
  4756. "type": "string"
  4757. },
  4758. "required": false
  4759. }
  4760. ],
  4761. "responses": {
  4762. "200": {
  4763. "description": "Question rejected successfully",
  4764. "content": {
  4765. "application/json": {
  4766. "schema": {
  4767. "type": "boolean",
  4768. "description": "Question rejected successfully"
  4769. }
  4770. }
  4771. }
  4772. },
  4773. "400": {
  4774. "description": "BadRequest | InvalidRequestError",
  4775. "content": {
  4776. "application/json": {
  4777. "schema": {
  4778. "anyOf": [
  4779. {
  4780. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4781. },
  4782. {
  4783. "$ref": "#/components/schemas/InvalidRequestError"
  4784. }
  4785. ]
  4786. }
  4787. }
  4788. }
  4789. },
  4790. "404": {
  4791. "description": "QuestionNotFoundError",
  4792. "content": {
  4793. "application/json": {
  4794. "schema": {
  4795. "$ref": "#/components/schemas/QuestionNotFoundError"
  4796. }
  4797. }
  4798. }
  4799. }
  4800. },
  4801. "description": "Reject a question request from the AI assistant.",
  4802. "summary": "Reject question request",
  4803. "x-codeSamples": [
  4804. {
  4805. "lang": "js",
  4806. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
  4807. }
  4808. ]
  4809. }
  4810. },
  4811. "/permission": {
  4812. "get": {
  4813. "tags": ["permission"],
  4814. "operationId": "permission.list",
  4815. "parameters": [
  4816. {
  4817. "name": "directory",
  4818. "in": "query",
  4819. "schema": {
  4820. "type": "string"
  4821. },
  4822. "required": false
  4823. },
  4824. {
  4825. "name": "workspace",
  4826. "in": "query",
  4827. "schema": {
  4828. "type": "string"
  4829. },
  4830. "required": false
  4831. }
  4832. ],
  4833. "responses": {
  4834. "200": {
  4835. "description": "List of pending permissions",
  4836. "content": {
  4837. "application/json": {
  4838. "schema": {
  4839. "type": "array",
  4840. "items": {
  4841. "$ref": "#/components/schemas/PermissionRequest"
  4842. },
  4843. "description": "List of pending permissions"
  4844. }
  4845. }
  4846. }
  4847. },
  4848. "400": {
  4849. "description": "Bad request",
  4850. "content": {
  4851. "application/json": {
  4852. "schema": {
  4853. "$ref": "#/components/schemas/BadRequestError"
  4854. }
  4855. }
  4856. }
  4857. }
  4858. },
  4859. "description": "Get all pending permission requests across all sessions.",
  4860. "summary": "List pending permissions",
  4861. "x-codeSamples": [
  4862. {
  4863. "lang": "js",
  4864. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
  4865. }
  4866. ]
  4867. }
  4868. },
  4869. "/permission/{requestID}/reply": {
  4870. "post": {
  4871. "tags": ["permission"],
  4872. "operationId": "permission.reply",
  4873. "parameters": [
  4874. {
  4875. "name": "requestID",
  4876. "in": "path",
  4877. "schema": {
  4878. "type": "string",
  4879. "pattern": "^per"
  4880. },
  4881. "required": true
  4882. },
  4883. {
  4884. "name": "directory",
  4885. "in": "query",
  4886. "schema": {
  4887. "type": "string"
  4888. },
  4889. "required": false
  4890. },
  4891. {
  4892. "name": "workspace",
  4893. "in": "query",
  4894. "schema": {
  4895. "type": "string"
  4896. },
  4897. "required": false
  4898. }
  4899. ],
  4900. "responses": {
  4901. "200": {
  4902. "description": "Permission processed successfully",
  4903. "content": {
  4904. "application/json": {
  4905. "schema": {
  4906. "type": "boolean",
  4907. "description": "Permission processed successfully"
  4908. }
  4909. }
  4910. }
  4911. },
  4912. "400": {
  4913. "description": "BadRequest | InvalidRequestError",
  4914. "content": {
  4915. "application/json": {
  4916. "schema": {
  4917. "anyOf": [
  4918. {
  4919. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4920. },
  4921. {
  4922. "$ref": "#/components/schemas/InvalidRequestError"
  4923. }
  4924. ]
  4925. }
  4926. }
  4927. }
  4928. },
  4929. "404": {
  4930. "description": "PermissionNotFoundError",
  4931. "content": {
  4932. "application/json": {
  4933. "schema": {
  4934. "$ref": "#/components/schemas/PermissionNotFoundError"
  4935. }
  4936. }
  4937. }
  4938. }
  4939. },
  4940. "description": "Approve or deny a permission request from the AI assistant.",
  4941. "summary": "Respond to permission request",
  4942. "requestBody": {
  4943. "content": {
  4944. "application/json": {
  4945. "schema": {
  4946. "type": "object",
  4947. "properties": {
  4948. "reply": {
  4949. "type": "string",
  4950. "enum": ["once", "always", "reject"]
  4951. },
  4952. "message": {
  4953. "type": "string"
  4954. }
  4955. },
  4956. "required": ["reply"],
  4957. "additionalProperties": false
  4958. }
  4959. }
  4960. }
  4961. },
  4962. "x-codeSamples": [
  4963. {
  4964. "lang": "js",
  4965. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
  4966. }
  4967. ]
  4968. }
  4969. },
  4970. "/provider": {
  4971. "get": {
  4972. "tags": ["provider"],
  4973. "operationId": "provider.list",
  4974. "parameters": [
  4975. {
  4976. "name": "directory",
  4977. "in": "query",
  4978. "schema": {
  4979. "type": "string"
  4980. },
  4981. "required": false
  4982. },
  4983. {
  4984. "name": "workspace",
  4985. "in": "query",
  4986. "schema": {
  4987. "type": "string"
  4988. },
  4989. "required": false
  4990. }
  4991. ],
  4992. "responses": {
  4993. "200": {
  4994. "description": "List of providers",
  4995. "content": {
  4996. "application/json": {
  4997. "schema": {
  4998. "type": "object",
  4999. "properties": {
  5000. "all": {
  5001. "type": "array",
  5002. "items": {
  5003. "$ref": "#/components/schemas/Provider"
  5004. }
  5005. },
  5006. "default": {
  5007. "type": "object",
  5008. "additionalProperties": {
  5009. "type": "string"
  5010. }
  5011. },
  5012. "connected": {
  5013. "type": "array",
  5014. "items": {
  5015. "type": "string"
  5016. }
  5017. }
  5018. },
  5019. "required": ["all", "default", "connected"],
  5020. "additionalProperties": false,
  5021. "description": "List of providers"
  5022. }
  5023. }
  5024. }
  5025. },
  5026. "400": {
  5027. "description": "Bad request",
  5028. "content": {
  5029. "application/json": {
  5030. "schema": {
  5031. "$ref": "#/components/schemas/BadRequestError"
  5032. }
  5033. }
  5034. }
  5035. }
  5036. },
  5037. "description": "Get a list of all available AI providers, including both available and connected ones.",
  5038. "summary": "List providers",
  5039. "x-codeSamples": [
  5040. {
  5041. "lang": "js",
  5042. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  5043. }
  5044. ]
  5045. }
  5046. },
  5047. "/provider/auth": {
  5048. "get": {
  5049. "tags": ["provider"],
  5050. "operationId": "provider.auth",
  5051. "parameters": [
  5052. {
  5053. "name": "directory",
  5054. "in": "query",
  5055. "schema": {
  5056. "type": "string"
  5057. },
  5058. "required": false
  5059. },
  5060. {
  5061. "name": "workspace",
  5062. "in": "query",
  5063. "schema": {
  5064. "type": "string"
  5065. },
  5066. "required": false
  5067. }
  5068. ],
  5069. "responses": {
  5070. "200": {
  5071. "description": "Provider auth methods",
  5072. "content": {
  5073. "application/json": {
  5074. "schema": {
  5075. "type": "object",
  5076. "additionalProperties": {
  5077. "type": "array",
  5078. "items": {
  5079. "$ref": "#/components/schemas/ProviderAuthMethod"
  5080. }
  5081. },
  5082. "description": "Provider auth methods"
  5083. }
  5084. }
  5085. }
  5086. },
  5087. "400": {
  5088. "description": "Bad request",
  5089. "content": {
  5090. "application/json": {
  5091. "schema": {
  5092. "$ref": "#/components/schemas/BadRequestError"
  5093. }
  5094. }
  5095. }
  5096. }
  5097. },
  5098. "description": "Retrieve available authentication methods for all AI providers.",
  5099. "summary": "Get provider auth methods",
  5100. "x-codeSamples": [
  5101. {
  5102. "lang": "js",
  5103. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  5104. }
  5105. ]
  5106. }
  5107. },
  5108. "/provider/{providerID}/oauth/authorize": {
  5109. "post": {
  5110. "tags": ["provider"],
  5111. "operationId": "provider.oauth.authorize",
  5112. "parameters": [
  5113. {
  5114. "name": "providerID",
  5115. "in": "path",
  5116. "schema": {
  5117. "type": "string"
  5118. },
  5119. "required": true
  5120. },
  5121. {
  5122. "name": "directory",
  5123. "in": "query",
  5124. "schema": {
  5125. "type": "string"
  5126. },
  5127. "required": false
  5128. },
  5129. {
  5130. "name": "workspace",
  5131. "in": "query",
  5132. "schema": {
  5133. "type": "string"
  5134. },
  5135. "required": false
  5136. }
  5137. ],
  5138. "responses": {
  5139. "200": {
  5140. "description": "Authorization URL and method",
  5141. "content": {
  5142. "application/json": {
  5143. "schema": {
  5144. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  5145. }
  5146. }
  5147. }
  5148. },
  5149. "400": {
  5150. "description": "ProviderAuthError | InvalidRequestError",
  5151. "content": {
  5152. "application/json": {
  5153. "schema": {
  5154. "anyOf": [
  5155. {
  5156. "$ref": "#/components/schemas/ProviderAuthError1"
  5157. },
  5158. {
  5159. "$ref": "#/components/schemas/InvalidRequestError"
  5160. }
  5161. ]
  5162. }
  5163. }
  5164. }
  5165. }
  5166. },
  5167. "description": "Start the OAuth authorization flow for a provider.",
  5168. "summary": "Start OAuth authorization",
  5169. "requestBody": {
  5170. "content": {
  5171. "application/json": {
  5172. "schema": {
  5173. "type": "object",
  5174. "properties": {
  5175. "method": {
  5176. "type": "number",
  5177. "description": "Auth method index"
  5178. },
  5179. "inputs": {
  5180. "type": "object",
  5181. "additionalProperties": {
  5182. "type": "string"
  5183. }
  5184. }
  5185. },
  5186. "required": ["method"],
  5187. "additionalProperties": false
  5188. }
  5189. }
  5190. }
  5191. },
  5192. "x-codeSamples": [
  5193. {
  5194. "lang": "js",
  5195. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  5196. }
  5197. ]
  5198. }
  5199. },
  5200. "/provider/{providerID}/oauth/callback": {
  5201. "post": {
  5202. "tags": ["provider"],
  5203. "operationId": "provider.oauth.callback",
  5204. "parameters": [
  5205. {
  5206. "name": "providerID",
  5207. "in": "path",
  5208. "schema": {
  5209. "type": "string"
  5210. },
  5211. "required": true
  5212. },
  5213. {
  5214. "name": "directory",
  5215. "in": "query",
  5216. "schema": {
  5217. "type": "string"
  5218. },
  5219. "required": false
  5220. },
  5221. {
  5222. "name": "workspace",
  5223. "in": "query",
  5224. "schema": {
  5225. "type": "string"
  5226. },
  5227. "required": false
  5228. }
  5229. ],
  5230. "responses": {
  5231. "200": {
  5232. "description": "OAuth callback processed successfully",
  5233. "content": {
  5234. "application/json": {
  5235. "schema": {
  5236. "type": "boolean",
  5237. "description": "OAuth callback processed successfully"
  5238. }
  5239. }
  5240. }
  5241. },
  5242. "400": {
  5243. "description": "ProviderAuthError | InvalidRequestError",
  5244. "content": {
  5245. "application/json": {
  5246. "schema": {
  5247. "anyOf": [
  5248. {
  5249. "$ref": "#/components/schemas/ProviderAuthError1"
  5250. },
  5251. {
  5252. "$ref": "#/components/schemas/InvalidRequestError"
  5253. }
  5254. ]
  5255. }
  5256. }
  5257. }
  5258. }
  5259. },
  5260. "description": "Handle the OAuth callback from a provider after user authorization.",
  5261. "summary": "Handle OAuth callback",
  5262. "requestBody": {
  5263. "content": {
  5264. "application/json": {
  5265. "schema": {
  5266. "type": "object",
  5267. "properties": {
  5268. "method": {
  5269. "type": "number",
  5270. "description": "Auth method index"
  5271. },
  5272. "code": {
  5273. "type": "string"
  5274. }
  5275. },
  5276. "required": ["method"],
  5277. "additionalProperties": false
  5278. }
  5279. }
  5280. }
  5281. },
  5282. "x-codeSamples": [
  5283. {
  5284. "lang": "js",
  5285. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  5286. }
  5287. ]
  5288. }
  5289. },
  5290. "/session": {
  5291. "get": {
  5292. "tags": ["session"],
  5293. "operationId": "session.list",
  5294. "parameters": [
  5295. {
  5296. "name": "directory",
  5297. "in": "query",
  5298. "schema": {
  5299. "type": "string"
  5300. },
  5301. "required": false
  5302. },
  5303. {
  5304. "name": "workspace",
  5305. "in": "query",
  5306. "schema": {
  5307. "type": "string"
  5308. },
  5309. "required": false
  5310. },
  5311. {
  5312. "name": "scope",
  5313. "in": "query",
  5314. "schema": {
  5315. "type": "string",
  5316. "enum": ["project"]
  5317. },
  5318. "required": false
  5319. },
  5320. {
  5321. "name": "path",
  5322. "in": "query",
  5323. "schema": {
  5324. "type": "string"
  5325. },
  5326. "required": false
  5327. },
  5328. {
  5329. "name": "roots",
  5330. "in": "query",
  5331. "schema": {
  5332. "anyOf": [
  5333. {
  5334. "type": "boolean"
  5335. },
  5336. {
  5337. "type": "string",
  5338. "enum": ["true", "false"]
  5339. }
  5340. ]
  5341. },
  5342. "required": false
  5343. },
  5344. {
  5345. "name": "start",
  5346. "in": "query",
  5347. "schema": {
  5348. "type": "number"
  5349. },
  5350. "required": false
  5351. },
  5352. {
  5353. "name": "search",
  5354. "in": "query",
  5355. "schema": {
  5356. "type": "string"
  5357. },
  5358. "required": false
  5359. },
  5360. {
  5361. "name": "limit",
  5362. "in": "query",
  5363. "schema": {
  5364. "type": "number"
  5365. },
  5366. "required": false
  5367. }
  5368. ],
  5369. "responses": {
  5370. "200": {
  5371. "description": "List of sessions",
  5372. "content": {
  5373. "application/json": {
  5374. "schema": {
  5375. "type": "array",
  5376. "items": {
  5377. "$ref": "#/components/schemas/Session"
  5378. },
  5379. "description": "List of sessions"
  5380. }
  5381. }
  5382. }
  5383. },
  5384. "400": {
  5385. "description": "Bad request",
  5386. "content": {
  5387. "application/json": {
  5388. "schema": {
  5389. "$ref": "#/components/schemas/BadRequestError"
  5390. }
  5391. }
  5392. }
  5393. }
  5394. },
  5395. "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
  5396. "summary": "List sessions",
  5397. "x-codeSamples": [
  5398. {
  5399. "lang": "js",
  5400. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
  5401. }
  5402. ]
  5403. },
  5404. "post": {
  5405. "tags": ["session"],
  5406. "operationId": "session.create",
  5407. "parameters": [
  5408. {
  5409. "name": "directory",
  5410. "in": "query",
  5411. "schema": {
  5412. "type": "string"
  5413. },
  5414. "required": false
  5415. },
  5416. {
  5417. "name": "workspace",
  5418. "in": "query",
  5419. "schema": {
  5420. "type": "string"
  5421. },
  5422. "required": false
  5423. }
  5424. ],
  5425. "responses": {
  5426. "200": {
  5427. "description": "Successfully created session",
  5428. "content": {
  5429. "application/json": {
  5430. "schema": {
  5431. "$ref": "#/components/schemas/Session"
  5432. }
  5433. }
  5434. }
  5435. },
  5436. "400": {
  5437. "description": "BadRequest | InvalidRequestError",
  5438. "content": {
  5439. "application/json": {
  5440. "schema": {
  5441. "anyOf": [
  5442. {
  5443. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5444. },
  5445. {
  5446. "$ref": "#/components/schemas/InvalidRequestError"
  5447. }
  5448. ]
  5449. }
  5450. }
  5451. }
  5452. }
  5453. },
  5454. "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
  5455. "summary": "Create session",
  5456. "requestBody": {
  5457. "content": {
  5458. "application/json": {
  5459. "schema": {
  5460. "type": "object",
  5461. "properties": {
  5462. "parentID": {
  5463. "type": "string",
  5464. "pattern": "^ses"
  5465. },
  5466. "title": {
  5467. "type": "string"
  5468. },
  5469. "agent": {
  5470. "type": "string"
  5471. },
  5472. "model": {
  5473. "type": "object",
  5474. "properties": {
  5475. "id": {
  5476. "type": "string"
  5477. },
  5478. "providerID": {
  5479. "type": "string"
  5480. },
  5481. "variant": {
  5482. "type": "string"
  5483. }
  5484. },
  5485. "required": ["id", "providerID"],
  5486. "additionalProperties": false
  5487. },
  5488. "metadata": {
  5489. "type": "object"
  5490. },
  5491. "permission": {
  5492. "$ref": "#/components/schemas/PermissionRuleset"
  5493. },
  5494. "workspaceID": {
  5495. "type": "string",
  5496. "pattern": "^wrk"
  5497. }
  5498. },
  5499. "additionalProperties": false
  5500. }
  5501. }
  5502. }
  5503. },
  5504. "x-codeSamples": [
  5505. {
  5506. "lang": "js",
  5507. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
  5508. }
  5509. ]
  5510. }
  5511. },
  5512. "/session/status": {
  5513. "get": {
  5514. "tags": ["session"],
  5515. "operationId": "session.status",
  5516. "parameters": [
  5517. {
  5518. "name": "directory",
  5519. "in": "query",
  5520. "schema": {
  5521. "type": "string"
  5522. },
  5523. "required": false
  5524. },
  5525. {
  5526. "name": "workspace",
  5527. "in": "query",
  5528. "schema": {
  5529. "type": "string"
  5530. },
  5531. "required": false
  5532. }
  5533. ],
  5534. "responses": {
  5535. "200": {
  5536. "description": "Get session status",
  5537. "content": {
  5538. "application/json": {
  5539. "schema": {
  5540. "type": "object",
  5541. "additionalProperties": {
  5542. "$ref": "#/components/schemas/SessionStatus"
  5543. },
  5544. "description": "Get session status"
  5545. }
  5546. }
  5547. }
  5548. },
  5549. "400": {
  5550. "description": "BadRequest | InvalidRequestError",
  5551. "content": {
  5552. "application/json": {
  5553. "schema": {
  5554. "anyOf": [
  5555. {
  5556. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5557. },
  5558. {
  5559. "$ref": "#/components/schemas/InvalidRequestError"
  5560. }
  5561. ]
  5562. }
  5563. }
  5564. }
  5565. }
  5566. },
  5567. "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
  5568. "summary": "Get session status",
  5569. "x-codeSamples": [
  5570. {
  5571. "lang": "js",
  5572. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
  5573. }
  5574. ]
  5575. }
  5576. },
  5577. "/session/{sessionID}": {
  5578. "get": {
  5579. "tags": ["session"],
  5580. "operationId": "session.get",
  5581. "parameters": [
  5582. {
  5583. "name": "sessionID",
  5584. "in": "path",
  5585. "schema": {
  5586. "type": "string",
  5587. "pattern": "^ses"
  5588. },
  5589. "required": true
  5590. },
  5591. {
  5592. "name": "directory",
  5593. "in": "query",
  5594. "schema": {
  5595. "type": "string"
  5596. },
  5597. "required": false
  5598. },
  5599. {
  5600. "name": "workspace",
  5601. "in": "query",
  5602. "schema": {
  5603. "type": "string"
  5604. },
  5605. "required": false
  5606. }
  5607. ],
  5608. "responses": {
  5609. "200": {
  5610. "description": "Get session",
  5611. "content": {
  5612. "application/json": {
  5613. "schema": {
  5614. "$ref": "#/components/schemas/Session"
  5615. }
  5616. }
  5617. }
  5618. },
  5619. "400": {
  5620. "description": "BadRequest | InvalidRequestError",
  5621. "content": {
  5622. "application/json": {
  5623. "schema": {
  5624. "anyOf": [
  5625. {
  5626. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5627. },
  5628. {
  5629. "$ref": "#/components/schemas/InvalidRequestError"
  5630. }
  5631. ]
  5632. }
  5633. }
  5634. }
  5635. },
  5636. "404": {
  5637. "description": "NotFoundError",
  5638. "content": {
  5639. "application/json": {
  5640. "schema": {
  5641. "$ref": "#/components/schemas/NotFoundError"
  5642. }
  5643. }
  5644. }
  5645. }
  5646. },
  5647. "description": "Retrieve detailed information about a specific OpenCode session.",
  5648. "summary": "Get session",
  5649. "x-codeSamples": [
  5650. {
  5651. "lang": "js",
  5652. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
  5653. }
  5654. ]
  5655. },
  5656. "delete": {
  5657. "tags": ["session"],
  5658. "operationId": "session.delete",
  5659. "parameters": [
  5660. {
  5661. "name": "sessionID",
  5662. "in": "path",
  5663. "schema": {
  5664. "type": "string",
  5665. "pattern": "^ses"
  5666. },
  5667. "required": true
  5668. },
  5669. {
  5670. "name": "directory",
  5671. "in": "query",
  5672. "schema": {
  5673. "type": "string"
  5674. },
  5675. "required": false
  5676. },
  5677. {
  5678. "name": "workspace",
  5679. "in": "query",
  5680. "schema": {
  5681. "type": "string"
  5682. },
  5683. "required": false
  5684. }
  5685. ],
  5686. "responses": {
  5687. "200": {
  5688. "description": "Successfully deleted session",
  5689. "content": {
  5690. "application/json": {
  5691. "schema": {
  5692. "type": "boolean",
  5693. "description": "Successfully deleted session"
  5694. }
  5695. }
  5696. }
  5697. },
  5698. "400": {
  5699. "description": "BadRequest | InvalidRequestError",
  5700. "content": {
  5701. "application/json": {
  5702. "schema": {
  5703. "anyOf": [
  5704. {
  5705. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5706. },
  5707. {
  5708. "$ref": "#/components/schemas/InvalidRequestError"
  5709. }
  5710. ]
  5711. }
  5712. }
  5713. }
  5714. },
  5715. "404": {
  5716. "description": "NotFoundError",
  5717. "content": {
  5718. "application/json": {
  5719. "schema": {
  5720. "$ref": "#/components/schemas/NotFoundError"
  5721. }
  5722. }
  5723. }
  5724. }
  5725. },
  5726. "description": "Delete a session and permanently remove all associated data, including messages and history.",
  5727. "summary": "Delete session",
  5728. "x-codeSamples": [
  5729. {
  5730. "lang": "js",
  5731. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
  5732. }
  5733. ]
  5734. },
  5735. "patch": {
  5736. "tags": ["session"],
  5737. "operationId": "session.update",
  5738. "parameters": [
  5739. {
  5740. "name": "sessionID",
  5741. "in": "path",
  5742. "schema": {
  5743. "type": "string",
  5744. "pattern": "^ses"
  5745. },
  5746. "required": true
  5747. },
  5748. {
  5749. "name": "directory",
  5750. "in": "query",
  5751. "schema": {
  5752. "type": "string"
  5753. },
  5754. "required": false
  5755. },
  5756. {
  5757. "name": "workspace",
  5758. "in": "query",
  5759. "schema": {
  5760. "type": "string"
  5761. },
  5762. "required": false
  5763. }
  5764. ],
  5765. "responses": {
  5766. "200": {
  5767. "description": "Successfully updated session",
  5768. "content": {
  5769. "application/json": {
  5770. "schema": {
  5771. "$ref": "#/components/schemas/Session"
  5772. }
  5773. }
  5774. }
  5775. },
  5776. "400": {
  5777. "description": "BadRequest | InvalidRequestError",
  5778. "content": {
  5779. "application/json": {
  5780. "schema": {
  5781. "anyOf": [
  5782. {
  5783. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5784. },
  5785. {
  5786. "$ref": "#/components/schemas/InvalidRequestError"
  5787. }
  5788. ]
  5789. }
  5790. }
  5791. }
  5792. },
  5793. "404": {
  5794. "description": "NotFoundError",
  5795. "content": {
  5796. "application/json": {
  5797. "schema": {
  5798. "$ref": "#/components/schemas/NotFoundError"
  5799. }
  5800. }
  5801. }
  5802. }
  5803. },
  5804. "description": "Update properties of an existing session, such as title or other metadata.",
  5805. "summary": "Update session",
  5806. "requestBody": {
  5807. "content": {
  5808. "application/json": {
  5809. "schema": {
  5810. "type": "object",
  5811. "properties": {
  5812. "title": {
  5813. "type": "string"
  5814. },
  5815. "metadata": {
  5816. "type": "object"
  5817. },
  5818. "permission": {
  5819. "$ref": "#/components/schemas/PermissionRuleset"
  5820. },
  5821. "time": {
  5822. "type": "object",
  5823. "properties": {
  5824. "archived": {
  5825. "type": "number"
  5826. }
  5827. },
  5828. "additionalProperties": false
  5829. }
  5830. },
  5831. "additionalProperties": false
  5832. }
  5833. }
  5834. }
  5835. },
  5836. "x-codeSamples": [
  5837. {
  5838. "lang": "js",
  5839. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
  5840. }
  5841. ]
  5842. }
  5843. },
  5844. "/session/{sessionID}/children": {
  5845. "get": {
  5846. "tags": ["session"],
  5847. "operationId": "session.children",
  5848. "parameters": [
  5849. {
  5850. "name": "sessionID",
  5851. "in": "path",
  5852. "schema": {
  5853. "type": "string",
  5854. "pattern": "^ses"
  5855. },
  5856. "required": true
  5857. },
  5858. {
  5859. "name": "directory",
  5860. "in": "query",
  5861. "schema": {
  5862. "type": "string"
  5863. },
  5864. "required": false
  5865. },
  5866. {
  5867. "name": "workspace",
  5868. "in": "query",
  5869. "schema": {
  5870. "type": "string"
  5871. },
  5872. "required": false
  5873. }
  5874. ],
  5875. "responses": {
  5876. "200": {
  5877. "description": "List of children",
  5878. "content": {
  5879. "application/json": {
  5880. "schema": {
  5881. "type": "array",
  5882. "items": {
  5883. "$ref": "#/components/schemas/Session"
  5884. },
  5885. "description": "List of children"
  5886. }
  5887. }
  5888. }
  5889. },
  5890. "400": {
  5891. "description": "BadRequest | InvalidRequestError",
  5892. "content": {
  5893. "application/json": {
  5894. "schema": {
  5895. "anyOf": [
  5896. {
  5897. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5898. },
  5899. {
  5900. "$ref": "#/components/schemas/InvalidRequestError"
  5901. }
  5902. ]
  5903. }
  5904. }
  5905. }
  5906. },
  5907. "404": {
  5908. "description": "NotFoundError",
  5909. "content": {
  5910. "application/json": {
  5911. "schema": {
  5912. "$ref": "#/components/schemas/NotFoundError"
  5913. }
  5914. }
  5915. }
  5916. }
  5917. },
  5918. "description": "Retrieve all child sessions that were forked from the specified parent session.",
  5919. "summary": "Get session children",
  5920. "x-codeSamples": [
  5921. {
  5922. "lang": "js",
  5923. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
  5924. }
  5925. ]
  5926. }
  5927. },
  5928. "/session/{sessionID}/todo": {
  5929. "get": {
  5930. "tags": ["session"],
  5931. "operationId": "session.todo",
  5932. "parameters": [
  5933. {
  5934. "name": "sessionID",
  5935. "in": "path",
  5936. "schema": {
  5937. "type": "string",
  5938. "pattern": "^ses"
  5939. },
  5940. "required": true
  5941. },
  5942. {
  5943. "name": "directory",
  5944. "in": "query",
  5945. "schema": {
  5946. "type": "string"
  5947. },
  5948. "required": false
  5949. },
  5950. {
  5951. "name": "workspace",
  5952. "in": "query",
  5953. "schema": {
  5954. "type": "string"
  5955. },
  5956. "required": false
  5957. }
  5958. ],
  5959. "responses": {
  5960. "200": {
  5961. "description": "Todo list",
  5962. "content": {
  5963. "application/json": {
  5964. "schema": {
  5965. "type": "array",
  5966. "items": {
  5967. "$ref": "#/components/schemas/Todo"
  5968. },
  5969. "description": "Todo list"
  5970. }
  5971. }
  5972. }
  5973. },
  5974. "400": {
  5975. "description": "BadRequest | InvalidRequestError",
  5976. "content": {
  5977. "application/json": {
  5978. "schema": {
  5979. "anyOf": [
  5980. {
  5981. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5982. },
  5983. {
  5984. "$ref": "#/components/schemas/InvalidRequestError"
  5985. }
  5986. ]
  5987. }
  5988. }
  5989. }
  5990. },
  5991. "404": {
  5992. "description": "NotFoundError",
  5993. "content": {
  5994. "application/json": {
  5995. "schema": {
  5996. "$ref": "#/components/schemas/NotFoundError"
  5997. }
  5998. }
  5999. }
  6000. }
  6001. },
  6002. "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
  6003. "summary": "Get session todos",
  6004. "x-codeSamples": [
  6005. {
  6006. "lang": "js",
  6007. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
  6008. }
  6009. ]
  6010. }
  6011. },
  6012. "/session/{sessionID}/diff": {
  6013. "get": {
  6014. "tags": ["session"],
  6015. "operationId": "session.diff",
  6016. "parameters": [
  6017. {
  6018. "name": "sessionID",
  6019. "in": "path",
  6020. "schema": {
  6021. "type": "string",
  6022. "pattern": "^ses"
  6023. },
  6024. "required": true
  6025. },
  6026. {
  6027. "name": "directory",
  6028. "in": "query",
  6029. "schema": {
  6030. "type": "string"
  6031. },
  6032. "required": false
  6033. },
  6034. {
  6035. "name": "workspace",
  6036. "in": "query",
  6037. "schema": {
  6038. "type": "string"
  6039. },
  6040. "required": false
  6041. },
  6042. {
  6043. "name": "messageID",
  6044. "in": "query",
  6045. "schema": {
  6046. "type": "string",
  6047. "pattern": "^msg"
  6048. },
  6049. "required": false
  6050. }
  6051. ],
  6052. "responses": {
  6053. "200": {
  6054. "description": "Successfully retrieved diff",
  6055. "content": {
  6056. "application/json": {
  6057. "schema": {
  6058. "type": "array",
  6059. "items": {
  6060. "$ref": "#/components/schemas/SnapshotFileDiff"
  6061. },
  6062. "description": "Successfully retrieved diff"
  6063. }
  6064. }
  6065. }
  6066. },
  6067. "400": {
  6068. "description": "Bad request",
  6069. "content": {
  6070. "application/json": {
  6071. "schema": {
  6072. "$ref": "#/components/schemas/BadRequestError"
  6073. }
  6074. }
  6075. }
  6076. }
  6077. },
  6078. "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
  6079. "summary": "Get message diff",
  6080. "x-codeSamples": [
  6081. {
  6082. "lang": "js",
  6083. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
  6084. }
  6085. ]
  6086. }
  6087. },
  6088. "/session/{sessionID}/message": {
  6089. "get": {
  6090. "tags": ["session"],
  6091. "operationId": "session.messages",
  6092. "parameters": [
  6093. {
  6094. "name": "sessionID",
  6095. "in": "path",
  6096. "schema": {
  6097. "type": "string",
  6098. "pattern": "^ses"
  6099. },
  6100. "required": true
  6101. },
  6102. {
  6103. "name": "directory",
  6104. "in": "query",
  6105. "schema": {
  6106. "type": "string"
  6107. },
  6108. "required": false
  6109. },
  6110. {
  6111. "name": "workspace",
  6112. "in": "query",
  6113. "schema": {
  6114. "type": "string"
  6115. },
  6116. "required": false
  6117. },
  6118. {
  6119. "name": "limit",
  6120. "in": "query",
  6121. "schema": {
  6122. "type": "integer",
  6123. "minimum": 0,
  6124. "maximum": 9007199254740991
  6125. },
  6126. "required": false
  6127. },
  6128. {
  6129. "name": "before",
  6130. "in": "query",
  6131. "schema": {
  6132. "type": "string"
  6133. },
  6134. "required": false
  6135. }
  6136. ],
  6137. "responses": {
  6138. "200": {
  6139. "description": "List of messages",
  6140. "content": {
  6141. "application/json": {
  6142. "schema": {
  6143. "type": "array",
  6144. "items": {
  6145. "type": "object",
  6146. "properties": {
  6147. "info": {
  6148. "$ref": "#/components/schemas/Message"
  6149. },
  6150. "parts": {
  6151. "type": "array",
  6152. "items": {
  6153. "$ref": "#/components/schemas/Part"
  6154. }
  6155. }
  6156. },
  6157. "required": ["info", "parts"],
  6158. "additionalProperties": false
  6159. },
  6160. "description": "List of messages"
  6161. }
  6162. }
  6163. }
  6164. },
  6165. "400": {
  6166. "description": "BadRequest | InvalidRequestError",
  6167. "content": {
  6168. "application/json": {
  6169. "schema": {
  6170. "anyOf": [
  6171. {
  6172. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6173. },
  6174. {
  6175. "$ref": "#/components/schemas/InvalidRequestError"
  6176. }
  6177. ]
  6178. }
  6179. }
  6180. }
  6181. },
  6182. "404": {
  6183. "description": "NotFoundError",
  6184. "content": {
  6185. "application/json": {
  6186. "schema": {
  6187. "$ref": "#/components/schemas/NotFoundError"
  6188. }
  6189. }
  6190. }
  6191. }
  6192. },
  6193. "description": "Retrieve all messages in a session, including user prompts and AI responses.",
  6194. "summary": "Get session messages",
  6195. "x-codeSamples": [
  6196. {
  6197. "lang": "js",
  6198. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
  6199. }
  6200. ]
  6201. },
  6202. "post": {
  6203. "tags": ["session"],
  6204. "operationId": "session.prompt",
  6205. "parameters": [
  6206. {
  6207. "name": "sessionID",
  6208. "in": "path",
  6209. "schema": {
  6210. "type": "string",
  6211. "pattern": "^ses"
  6212. },
  6213. "required": true
  6214. },
  6215. {
  6216. "name": "directory",
  6217. "in": "query",
  6218. "schema": {
  6219. "type": "string"
  6220. },
  6221. "required": false
  6222. },
  6223. {
  6224. "name": "workspace",
  6225. "in": "query",
  6226. "schema": {
  6227. "type": "string"
  6228. },
  6229. "required": false
  6230. }
  6231. ],
  6232. "responses": {
  6233. "200": {
  6234. "description": "Created message",
  6235. "content": {
  6236. "application/json": {
  6237. "schema": {
  6238. "type": "object",
  6239. "required": ["info", "parts"],
  6240. "properties": {
  6241. "info": {
  6242. "$ref": "#/components/schemas/AssistantMessage"
  6243. },
  6244. "parts": {
  6245. "type": "array",
  6246. "items": {
  6247. "$ref": "#/components/schemas/Part"
  6248. }
  6249. }
  6250. }
  6251. }
  6252. }
  6253. }
  6254. },
  6255. "400": {
  6256. "description": "BadRequest | InvalidRequestError",
  6257. "content": {
  6258. "application/json": {
  6259. "schema": {
  6260. "anyOf": [
  6261. {
  6262. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6263. },
  6264. {
  6265. "$ref": "#/components/schemas/InvalidRequestError"
  6266. }
  6267. ]
  6268. }
  6269. }
  6270. }
  6271. },
  6272. "404": {
  6273. "description": "NotFoundError",
  6274. "content": {
  6275. "application/json": {
  6276. "schema": {
  6277. "$ref": "#/components/schemas/NotFoundError"
  6278. }
  6279. }
  6280. }
  6281. }
  6282. },
  6283. "description": "Create and send a new message to a session, streaming the AI response.",
  6284. "summary": "Send message",
  6285. "requestBody": {
  6286. "content": {
  6287. "application/json": {
  6288. "schema": {
  6289. "type": "object",
  6290. "properties": {
  6291. "messageID": {
  6292. "type": "string",
  6293. "pattern": "^msg"
  6294. },
  6295. "model": {
  6296. "type": "object",
  6297. "properties": {
  6298. "providerID": {
  6299. "type": "string"
  6300. },
  6301. "modelID": {
  6302. "type": "string"
  6303. }
  6304. },
  6305. "required": ["providerID", "modelID"],
  6306. "additionalProperties": false
  6307. },
  6308. "agent": {
  6309. "type": "string"
  6310. },
  6311. "noReply": {
  6312. "type": "boolean"
  6313. },
  6314. "tools": {
  6315. "type": "object",
  6316. "additionalProperties": {
  6317. "type": "boolean"
  6318. }
  6319. },
  6320. "format": {
  6321. "$ref": "#/components/schemas/OutputFormat"
  6322. },
  6323. "system": {
  6324. "type": "string"
  6325. },
  6326. "variant": {
  6327. "type": "string"
  6328. },
  6329. "parts": {
  6330. "type": "array",
  6331. "items": {
  6332. "anyOf": [
  6333. {
  6334. "$ref": "#/components/schemas/TextPartInput"
  6335. },
  6336. {
  6337. "$ref": "#/components/schemas/FilePartInput"
  6338. },
  6339. {
  6340. "$ref": "#/components/schemas/AgentPartInput"
  6341. },
  6342. {
  6343. "$ref": "#/components/schemas/SubtaskPartInput"
  6344. }
  6345. ]
  6346. }
  6347. }
  6348. },
  6349. "required": ["parts"],
  6350. "additionalProperties": false
  6351. }
  6352. }
  6353. }
  6354. },
  6355. "x-codeSamples": [
  6356. {
  6357. "lang": "js",
  6358. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  6359. }
  6360. ]
  6361. }
  6362. },
  6363. "/session/{sessionID}/message/{messageID}": {
  6364. "get": {
  6365. "tags": ["session"],
  6366. "operationId": "session.message",
  6367. "parameters": [
  6368. {
  6369. "name": "sessionID",
  6370. "in": "path",
  6371. "schema": {
  6372. "type": "string",
  6373. "pattern": "^ses"
  6374. },
  6375. "required": true
  6376. },
  6377. {
  6378. "name": "messageID",
  6379. "in": "path",
  6380. "schema": {
  6381. "type": "string",
  6382. "pattern": "^msg"
  6383. },
  6384. "required": true
  6385. },
  6386. {
  6387. "name": "directory",
  6388. "in": "query",
  6389. "schema": {
  6390. "type": "string"
  6391. },
  6392. "required": false
  6393. },
  6394. {
  6395. "name": "workspace",
  6396. "in": "query",
  6397. "schema": {
  6398. "type": "string"
  6399. },
  6400. "required": false
  6401. }
  6402. ],
  6403. "responses": {
  6404. "200": {
  6405. "description": "Message",
  6406. "content": {
  6407. "application/json": {
  6408. "schema": {
  6409. "type": "object",
  6410. "properties": {
  6411. "info": {
  6412. "$ref": "#/components/schemas/Message"
  6413. },
  6414. "parts": {
  6415. "type": "array",
  6416. "items": {
  6417. "$ref": "#/components/schemas/Part"
  6418. }
  6419. }
  6420. },
  6421. "required": ["info", "parts"],
  6422. "additionalProperties": false,
  6423. "description": "Message"
  6424. }
  6425. }
  6426. }
  6427. },
  6428. "400": {
  6429. "description": "BadRequest | InvalidRequestError",
  6430. "content": {
  6431. "application/json": {
  6432. "schema": {
  6433. "anyOf": [
  6434. {
  6435. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6436. },
  6437. {
  6438. "$ref": "#/components/schemas/InvalidRequestError"
  6439. }
  6440. ]
  6441. }
  6442. }
  6443. }
  6444. },
  6445. "404": {
  6446. "description": "NotFoundError",
  6447. "content": {
  6448. "application/json": {
  6449. "schema": {
  6450. "$ref": "#/components/schemas/NotFoundError"
  6451. }
  6452. }
  6453. }
  6454. }
  6455. },
  6456. "description": "Retrieve a specific message from a session by its message ID.",
  6457. "summary": "Get message",
  6458. "x-codeSamples": [
  6459. {
  6460. "lang": "js",
  6461. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  6462. }
  6463. ]
  6464. },
  6465. "delete": {
  6466. "tags": ["session"],
  6467. "operationId": "session.deleteMessage",
  6468. "parameters": [
  6469. {
  6470. "name": "sessionID",
  6471. "in": "path",
  6472. "schema": {
  6473. "type": "string",
  6474. "pattern": "^ses"
  6475. },
  6476. "required": true
  6477. },
  6478. {
  6479. "name": "messageID",
  6480. "in": "path",
  6481. "schema": {
  6482. "type": "string",
  6483. "pattern": "^msg"
  6484. },
  6485. "required": true
  6486. },
  6487. {
  6488. "name": "directory",
  6489. "in": "query",
  6490. "schema": {
  6491. "type": "string"
  6492. },
  6493. "required": false
  6494. },
  6495. {
  6496. "name": "workspace",
  6497. "in": "query",
  6498. "schema": {
  6499. "type": "string"
  6500. },
  6501. "required": false
  6502. }
  6503. ],
  6504. "responses": {
  6505. "200": {
  6506. "description": "Successfully deleted message",
  6507. "content": {
  6508. "application/json": {
  6509. "schema": {
  6510. "type": "boolean",
  6511. "description": "Successfully deleted message"
  6512. }
  6513. }
  6514. }
  6515. },
  6516. "400": {
  6517. "description": "BadRequest | InvalidRequestError",
  6518. "content": {
  6519. "application/json": {
  6520. "schema": {
  6521. "anyOf": [
  6522. {
  6523. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6524. },
  6525. {
  6526. "$ref": "#/components/schemas/InvalidRequestError"
  6527. }
  6528. ]
  6529. }
  6530. }
  6531. }
  6532. },
  6533. "404": {
  6534. "description": "NotFoundError",
  6535. "content": {
  6536. "application/json": {
  6537. "schema": {
  6538. "$ref": "#/components/schemas/NotFoundError"
  6539. }
  6540. }
  6541. }
  6542. },
  6543. "409": {
  6544. "description": "SessionBusyError",
  6545. "content": {
  6546. "application/json": {
  6547. "schema": {
  6548. "$ref": "#/components/schemas/SessionBusyError"
  6549. }
  6550. }
  6551. }
  6552. }
  6553. },
  6554. "description": "Permanently delete a specific message and all of its parts from a session without reverting file changes.",
  6555. "summary": "Delete message",
  6556. "x-codeSamples": [
  6557. {
  6558. "lang": "js",
  6559. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.deleteMessage({\n ...\n})"
  6560. }
  6561. ]
  6562. }
  6563. },
  6564. "/session/{sessionID}/fork": {
  6565. "post": {
  6566. "tags": ["session"],
  6567. "operationId": "session.fork",
  6568. "parameters": [
  6569. {
  6570. "name": "sessionID",
  6571. "in": "path",
  6572. "schema": {
  6573. "type": "string",
  6574. "pattern": "^ses"
  6575. },
  6576. "required": true
  6577. },
  6578. {
  6579. "name": "directory",
  6580. "in": "query",
  6581. "schema": {
  6582. "type": "string"
  6583. },
  6584. "required": false
  6585. },
  6586. {
  6587. "name": "workspace",
  6588. "in": "query",
  6589. "schema": {
  6590. "type": "string"
  6591. },
  6592. "required": false
  6593. }
  6594. ],
  6595. "responses": {
  6596. "200": {
  6597. "description": "200",
  6598. "content": {
  6599. "application/json": {
  6600. "schema": {
  6601. "$ref": "#/components/schemas/Session"
  6602. }
  6603. }
  6604. }
  6605. },
  6606. "400": {
  6607. "description": "BadRequest | InvalidRequestError",
  6608. "content": {
  6609. "application/json": {
  6610. "schema": {
  6611. "anyOf": [
  6612. {
  6613. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6614. },
  6615. {
  6616. "$ref": "#/components/schemas/InvalidRequestError"
  6617. }
  6618. ]
  6619. }
  6620. }
  6621. }
  6622. },
  6623. "404": {
  6624. "description": "NotFoundError",
  6625. "content": {
  6626. "application/json": {
  6627. "schema": {
  6628. "$ref": "#/components/schemas/NotFoundError"
  6629. }
  6630. }
  6631. }
  6632. }
  6633. },
  6634. "description": "Create a new session by forking an existing session at a specific message point.",
  6635. "summary": "Fork session",
  6636. "requestBody": {
  6637. "content": {
  6638. "application/json": {
  6639. "schema": {
  6640. "type": "object",
  6641. "properties": {
  6642. "messageID": {
  6643. "type": "string",
  6644. "pattern": "^msg"
  6645. }
  6646. },
  6647. "additionalProperties": false
  6648. }
  6649. }
  6650. }
  6651. },
  6652. "x-codeSamples": [
  6653. {
  6654. "lang": "js",
  6655. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  6656. }
  6657. ]
  6658. }
  6659. },
  6660. "/session/{sessionID}/abort": {
  6661. "post": {
  6662. "tags": ["session"],
  6663. "operationId": "session.abort",
  6664. "parameters": [
  6665. {
  6666. "name": "sessionID",
  6667. "in": "path",
  6668. "schema": {
  6669. "type": "string",
  6670. "pattern": "^ses"
  6671. },
  6672. "required": true
  6673. },
  6674. {
  6675. "name": "directory",
  6676. "in": "query",
  6677. "schema": {
  6678. "type": "string"
  6679. },
  6680. "required": false
  6681. },
  6682. {
  6683. "name": "workspace",
  6684. "in": "query",
  6685. "schema": {
  6686. "type": "string"
  6687. },
  6688. "required": false
  6689. }
  6690. ],
  6691. "responses": {
  6692. "200": {
  6693. "description": "Aborted session",
  6694. "content": {
  6695. "application/json": {
  6696. "schema": {
  6697. "type": "boolean",
  6698. "description": "Aborted session"
  6699. }
  6700. }
  6701. }
  6702. },
  6703. "400": {
  6704. "description": "BadRequest | InvalidRequestError",
  6705. "content": {
  6706. "application/json": {
  6707. "schema": {
  6708. "anyOf": [
  6709. {
  6710. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6711. },
  6712. {
  6713. "$ref": "#/components/schemas/InvalidRequestError"
  6714. }
  6715. ]
  6716. }
  6717. }
  6718. }
  6719. }
  6720. },
  6721. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  6722. "summary": "Abort session",
  6723. "x-codeSamples": [
  6724. {
  6725. "lang": "js",
  6726. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  6727. }
  6728. ]
  6729. }
  6730. },
  6731. "/session/{sessionID}/init": {
  6732. "post": {
  6733. "tags": ["session"],
  6734. "operationId": "session.init",
  6735. "parameters": [
  6736. {
  6737. "name": "sessionID",
  6738. "in": "path",
  6739. "schema": {
  6740. "type": "string",
  6741. "pattern": "^ses"
  6742. },
  6743. "required": true
  6744. },
  6745. {
  6746. "name": "directory",
  6747. "in": "query",
  6748. "schema": {
  6749. "type": "string"
  6750. },
  6751. "required": false
  6752. },
  6753. {
  6754. "name": "workspace",
  6755. "in": "query",
  6756. "schema": {
  6757. "type": "string"
  6758. },
  6759. "required": false
  6760. }
  6761. ],
  6762. "responses": {
  6763. "200": {
  6764. "description": "200",
  6765. "content": {
  6766. "application/json": {
  6767. "schema": {
  6768. "type": "boolean",
  6769. "description": "200"
  6770. }
  6771. }
  6772. }
  6773. },
  6774. "400": {
  6775. "description": "BadRequest | InvalidRequestError",
  6776. "content": {
  6777. "application/json": {
  6778. "schema": {
  6779. "anyOf": [
  6780. {
  6781. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6782. },
  6783. {
  6784. "$ref": "#/components/schemas/InvalidRequestError"
  6785. }
  6786. ]
  6787. }
  6788. }
  6789. }
  6790. },
  6791. "404": {
  6792. "description": "NotFoundError",
  6793. "content": {
  6794. "application/json": {
  6795. "schema": {
  6796. "$ref": "#/components/schemas/NotFoundError"
  6797. }
  6798. }
  6799. }
  6800. }
  6801. },
  6802. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  6803. "summary": "Initialize session",
  6804. "requestBody": {
  6805. "content": {
  6806. "application/json": {
  6807. "schema": {
  6808. "type": "object",
  6809. "properties": {
  6810. "modelID": {
  6811. "type": "string"
  6812. },
  6813. "providerID": {
  6814. "type": "string"
  6815. },
  6816. "messageID": {
  6817. "type": "string",
  6818. "pattern": "^msg"
  6819. }
  6820. },
  6821. "required": ["modelID", "providerID", "messageID"],
  6822. "additionalProperties": false
  6823. }
  6824. }
  6825. }
  6826. },
  6827. "x-codeSamples": [
  6828. {
  6829. "lang": "js",
  6830. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  6831. }
  6832. ]
  6833. }
  6834. },
  6835. "/session/{sessionID}/share": {
  6836. "post": {
  6837. "tags": ["session"],
  6838. "operationId": "session.share",
  6839. "parameters": [
  6840. {
  6841. "name": "sessionID",
  6842. "in": "path",
  6843. "schema": {
  6844. "type": "string",
  6845. "pattern": "^ses"
  6846. },
  6847. "required": true
  6848. },
  6849. {
  6850. "name": "directory",
  6851. "in": "query",
  6852. "schema": {
  6853. "type": "string"
  6854. },
  6855. "required": false
  6856. },
  6857. {
  6858. "name": "workspace",
  6859. "in": "query",
  6860. "schema": {
  6861. "type": "string"
  6862. },
  6863. "required": false
  6864. }
  6865. ],
  6866. "responses": {
  6867. "200": {
  6868. "description": "Successfully shared session",
  6869. "content": {
  6870. "application/json": {
  6871. "schema": {
  6872. "$ref": "#/components/schemas/Session"
  6873. }
  6874. }
  6875. }
  6876. },
  6877. "400": {
  6878. "description": "Bad request",
  6879. "content": {
  6880. "application/json": {
  6881. "schema": {
  6882. "$ref": "#/components/schemas/BadRequestError"
  6883. }
  6884. }
  6885. }
  6886. },
  6887. "404": {
  6888. "description": "NotFoundError",
  6889. "content": {
  6890. "application/json": {
  6891. "schema": {
  6892. "$ref": "#/components/schemas/NotFoundError"
  6893. }
  6894. }
  6895. }
  6896. },
  6897. "500": {
  6898. "description": "InternalServerError",
  6899. "content": {
  6900. "application/json": {
  6901. "schema": {
  6902. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6903. }
  6904. }
  6905. }
  6906. }
  6907. },
  6908. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  6909. "summary": "Share session",
  6910. "x-codeSamples": [
  6911. {
  6912. "lang": "js",
  6913. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  6914. }
  6915. ]
  6916. },
  6917. "delete": {
  6918. "tags": ["session"],
  6919. "operationId": "session.unshare",
  6920. "parameters": [
  6921. {
  6922. "name": "sessionID",
  6923. "in": "path",
  6924. "schema": {
  6925. "type": "string",
  6926. "pattern": "^ses"
  6927. },
  6928. "required": true
  6929. },
  6930. {
  6931. "name": "directory",
  6932. "in": "query",
  6933. "schema": {
  6934. "type": "string"
  6935. },
  6936. "required": false
  6937. },
  6938. {
  6939. "name": "workspace",
  6940. "in": "query",
  6941. "schema": {
  6942. "type": "string"
  6943. },
  6944. "required": false
  6945. }
  6946. ],
  6947. "responses": {
  6948. "200": {
  6949. "description": "Successfully unshared session",
  6950. "content": {
  6951. "application/json": {
  6952. "schema": {
  6953. "$ref": "#/components/schemas/Session"
  6954. }
  6955. }
  6956. }
  6957. },
  6958. "400": {
  6959. "description": "Bad request",
  6960. "content": {
  6961. "application/json": {
  6962. "schema": {
  6963. "$ref": "#/components/schemas/BadRequestError"
  6964. }
  6965. }
  6966. }
  6967. },
  6968. "404": {
  6969. "description": "NotFoundError",
  6970. "content": {
  6971. "application/json": {
  6972. "schema": {
  6973. "$ref": "#/components/schemas/NotFoundError"
  6974. }
  6975. }
  6976. }
  6977. },
  6978. "500": {
  6979. "description": "InternalServerError",
  6980. "content": {
  6981. "application/json": {
  6982. "schema": {
  6983. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6984. }
  6985. }
  6986. }
  6987. }
  6988. },
  6989. "description": "Remove the shareable link for a session, making it private again.",
  6990. "summary": "Unshare session",
  6991. "x-codeSamples": [
  6992. {
  6993. "lang": "js",
  6994. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  6995. }
  6996. ]
  6997. }
  6998. },
  6999. "/session/{sessionID}/summarize": {
  7000. "post": {
  7001. "tags": ["session"],
  7002. "operationId": "session.summarize",
  7003. "parameters": [
  7004. {
  7005. "name": "sessionID",
  7006. "in": "path",
  7007. "schema": {
  7008. "type": "string",
  7009. "pattern": "^ses"
  7010. },
  7011. "required": true
  7012. },
  7013. {
  7014. "name": "directory",
  7015. "in": "query",
  7016. "schema": {
  7017. "type": "string"
  7018. },
  7019. "required": false
  7020. },
  7021. {
  7022. "name": "workspace",
  7023. "in": "query",
  7024. "schema": {
  7025. "type": "string"
  7026. },
  7027. "required": false
  7028. }
  7029. ],
  7030. "responses": {
  7031. "200": {
  7032. "description": "Summarized session",
  7033. "content": {
  7034. "application/json": {
  7035. "schema": {
  7036. "type": "boolean",
  7037. "description": "Summarized session"
  7038. }
  7039. }
  7040. }
  7041. },
  7042. "400": {
  7043. "description": "BadRequest | InvalidRequestError",
  7044. "content": {
  7045. "application/json": {
  7046. "schema": {
  7047. "anyOf": [
  7048. {
  7049. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7050. },
  7051. {
  7052. "$ref": "#/components/schemas/InvalidRequestError"
  7053. }
  7054. ]
  7055. }
  7056. }
  7057. }
  7058. },
  7059. "404": {
  7060. "description": "NotFoundError",
  7061. "content": {
  7062. "application/json": {
  7063. "schema": {
  7064. "$ref": "#/components/schemas/NotFoundError"
  7065. }
  7066. }
  7067. }
  7068. }
  7069. },
  7070. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  7071. "summary": "Summarize session",
  7072. "requestBody": {
  7073. "content": {
  7074. "application/json": {
  7075. "schema": {
  7076. "type": "object",
  7077. "properties": {
  7078. "providerID": {
  7079. "type": "string"
  7080. },
  7081. "modelID": {
  7082. "type": "string"
  7083. },
  7084. "auto": {
  7085. "type": "boolean"
  7086. }
  7087. },
  7088. "required": ["providerID", "modelID"],
  7089. "additionalProperties": false
  7090. }
  7091. }
  7092. }
  7093. },
  7094. "x-codeSamples": [
  7095. {
  7096. "lang": "js",
  7097. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  7098. }
  7099. ]
  7100. }
  7101. },
  7102. "/session/{sessionID}/prompt_async": {
  7103. "post": {
  7104. "tags": ["session"],
  7105. "operationId": "session.prompt_async",
  7106. "parameters": [
  7107. {
  7108. "name": "sessionID",
  7109. "in": "path",
  7110. "schema": {
  7111. "type": "string",
  7112. "pattern": "^ses"
  7113. },
  7114. "required": true
  7115. },
  7116. {
  7117. "name": "directory",
  7118. "in": "query",
  7119. "schema": {
  7120. "type": "string"
  7121. },
  7122. "required": false
  7123. },
  7124. {
  7125. "name": "workspace",
  7126. "in": "query",
  7127. "schema": {
  7128. "type": "string"
  7129. },
  7130. "required": false
  7131. }
  7132. ],
  7133. "responses": {
  7134. "204": {
  7135. "description": "Prompt accepted"
  7136. },
  7137. "400": {
  7138. "description": "BadRequest | InvalidRequestError",
  7139. "content": {
  7140. "application/json": {
  7141. "schema": {
  7142. "anyOf": [
  7143. {
  7144. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7145. },
  7146. {
  7147. "$ref": "#/components/schemas/InvalidRequestError"
  7148. }
  7149. ]
  7150. }
  7151. }
  7152. }
  7153. },
  7154. "404": {
  7155. "description": "NotFoundError",
  7156. "content": {
  7157. "application/json": {
  7158. "schema": {
  7159. "$ref": "#/components/schemas/NotFoundError"
  7160. }
  7161. }
  7162. }
  7163. }
  7164. },
  7165. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  7166. "summary": "Send async message",
  7167. "requestBody": {
  7168. "content": {
  7169. "application/json": {
  7170. "schema": {
  7171. "type": "object",
  7172. "properties": {
  7173. "messageID": {
  7174. "type": "string",
  7175. "pattern": "^msg"
  7176. },
  7177. "model": {
  7178. "type": "object",
  7179. "properties": {
  7180. "providerID": {
  7181. "type": "string"
  7182. },
  7183. "modelID": {
  7184. "type": "string"
  7185. }
  7186. },
  7187. "required": ["providerID", "modelID"],
  7188. "additionalProperties": false
  7189. },
  7190. "agent": {
  7191. "type": "string"
  7192. },
  7193. "noReply": {
  7194. "type": "boolean"
  7195. },
  7196. "tools": {
  7197. "type": "object",
  7198. "additionalProperties": {
  7199. "type": "boolean"
  7200. }
  7201. },
  7202. "format": {
  7203. "$ref": "#/components/schemas/OutputFormat"
  7204. },
  7205. "system": {
  7206. "type": "string"
  7207. },
  7208. "variant": {
  7209. "type": "string"
  7210. },
  7211. "parts": {
  7212. "type": "array",
  7213. "items": {
  7214. "anyOf": [
  7215. {
  7216. "$ref": "#/components/schemas/TextPartInput"
  7217. },
  7218. {
  7219. "$ref": "#/components/schemas/FilePartInput"
  7220. },
  7221. {
  7222. "$ref": "#/components/schemas/AgentPartInput"
  7223. },
  7224. {
  7225. "$ref": "#/components/schemas/SubtaskPartInput"
  7226. }
  7227. ]
  7228. }
  7229. }
  7230. },
  7231. "required": ["parts"],
  7232. "additionalProperties": false
  7233. }
  7234. }
  7235. }
  7236. },
  7237. "x-codeSamples": [
  7238. {
  7239. "lang": "js",
  7240. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  7241. }
  7242. ]
  7243. }
  7244. },
  7245. "/session/{sessionID}/command": {
  7246. "post": {
  7247. "tags": ["session"],
  7248. "operationId": "session.command",
  7249. "parameters": [
  7250. {
  7251. "name": "sessionID",
  7252. "in": "path",
  7253. "schema": {
  7254. "type": "string",
  7255. "pattern": "^ses"
  7256. },
  7257. "required": true
  7258. },
  7259. {
  7260. "name": "directory",
  7261. "in": "query",
  7262. "schema": {
  7263. "type": "string"
  7264. },
  7265. "required": false
  7266. },
  7267. {
  7268. "name": "workspace",
  7269. "in": "query",
  7270. "schema": {
  7271. "type": "string"
  7272. },
  7273. "required": false
  7274. }
  7275. ],
  7276. "responses": {
  7277. "200": {
  7278. "description": "Created message",
  7279. "content": {
  7280. "application/json": {
  7281. "schema": {
  7282. "type": "object",
  7283. "required": ["info", "parts"],
  7284. "properties": {
  7285. "info": {
  7286. "$ref": "#/components/schemas/AssistantMessage"
  7287. },
  7288. "parts": {
  7289. "type": "array",
  7290. "items": {
  7291. "$ref": "#/components/schemas/Part"
  7292. }
  7293. }
  7294. }
  7295. }
  7296. }
  7297. }
  7298. },
  7299. "400": {
  7300. "description": "BadRequest | InvalidRequestError",
  7301. "content": {
  7302. "application/json": {
  7303. "schema": {
  7304. "anyOf": [
  7305. {
  7306. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7307. },
  7308. {
  7309. "$ref": "#/components/schemas/InvalidRequestError"
  7310. }
  7311. ]
  7312. }
  7313. }
  7314. }
  7315. },
  7316. "404": {
  7317. "description": "NotFoundError",
  7318. "content": {
  7319. "application/json": {
  7320. "schema": {
  7321. "$ref": "#/components/schemas/NotFoundError"
  7322. }
  7323. }
  7324. }
  7325. }
  7326. },
  7327. "description": "Send a new command to a session for execution by the AI assistant.",
  7328. "summary": "Send command",
  7329. "requestBody": {
  7330. "content": {
  7331. "application/json": {
  7332. "schema": {
  7333. "type": "object",
  7334. "properties": {
  7335. "messageID": {
  7336. "type": "string",
  7337. "pattern": "^msg"
  7338. },
  7339. "agent": {
  7340. "type": "string"
  7341. },
  7342. "model": {
  7343. "type": "string"
  7344. },
  7345. "arguments": {
  7346. "type": "string"
  7347. },
  7348. "command": {
  7349. "type": "string"
  7350. },
  7351. "variant": {
  7352. "type": "string"
  7353. },
  7354. "parts": {
  7355. "type": "array",
  7356. "items": {
  7357. "type": "object",
  7358. "properties": {
  7359. "id": {
  7360. "type": "string",
  7361. "pattern": "^prt"
  7362. },
  7363. "type": {
  7364. "type": "string",
  7365. "enum": ["file"]
  7366. },
  7367. "mime": {
  7368. "type": "string"
  7369. },
  7370. "filename": {
  7371. "type": "string"
  7372. },
  7373. "url": {
  7374. "type": "string"
  7375. },
  7376. "source": {
  7377. "$ref": "#/components/schemas/FilePartSource"
  7378. }
  7379. },
  7380. "required": ["type", "mime", "url"],
  7381. "additionalProperties": false
  7382. }
  7383. }
  7384. },
  7385. "required": ["arguments", "command"],
  7386. "additionalProperties": false
  7387. }
  7388. }
  7389. }
  7390. },
  7391. "x-codeSamples": [
  7392. {
  7393. "lang": "js",
  7394. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  7395. }
  7396. ]
  7397. }
  7398. },
  7399. "/session/{sessionID}/shell": {
  7400. "post": {
  7401. "tags": ["session"],
  7402. "operationId": "session.shell",
  7403. "parameters": [
  7404. {
  7405. "name": "sessionID",
  7406. "in": "path",
  7407. "schema": {
  7408. "type": "string",
  7409. "pattern": "^ses"
  7410. },
  7411. "required": true
  7412. },
  7413. {
  7414. "name": "directory",
  7415. "in": "query",
  7416. "schema": {
  7417. "type": "string"
  7418. },
  7419. "required": false
  7420. },
  7421. {
  7422. "name": "workspace",
  7423. "in": "query",
  7424. "schema": {
  7425. "type": "string"
  7426. },
  7427. "required": false
  7428. }
  7429. ],
  7430. "responses": {
  7431. "200": {
  7432. "description": "Created message",
  7433. "content": {
  7434. "application/json": {
  7435. "schema": {
  7436. "type": "object",
  7437. "properties": {
  7438. "info": {
  7439. "$ref": "#/components/schemas/Message"
  7440. },
  7441. "parts": {
  7442. "type": "array",
  7443. "items": {
  7444. "$ref": "#/components/schemas/Part"
  7445. }
  7446. }
  7447. },
  7448. "required": ["info", "parts"],
  7449. "additionalProperties": false,
  7450. "description": "Created message"
  7451. }
  7452. }
  7453. }
  7454. },
  7455. "400": {
  7456. "description": "BadRequest | InvalidRequestError",
  7457. "content": {
  7458. "application/json": {
  7459. "schema": {
  7460. "anyOf": [
  7461. {
  7462. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7463. },
  7464. {
  7465. "$ref": "#/components/schemas/InvalidRequestError"
  7466. }
  7467. ]
  7468. }
  7469. }
  7470. }
  7471. },
  7472. "404": {
  7473. "description": "NotFoundError",
  7474. "content": {
  7475. "application/json": {
  7476. "schema": {
  7477. "$ref": "#/components/schemas/NotFoundError"
  7478. }
  7479. }
  7480. }
  7481. },
  7482. "409": {
  7483. "description": "SessionBusyError",
  7484. "content": {
  7485. "application/json": {
  7486. "schema": {
  7487. "$ref": "#/components/schemas/SessionBusyError"
  7488. }
  7489. }
  7490. }
  7491. }
  7492. },
  7493. "description": "Execute a shell command within the session context and return the AI's response.",
  7494. "summary": "Run shell command",
  7495. "requestBody": {
  7496. "content": {
  7497. "application/json": {
  7498. "schema": {
  7499. "type": "object",
  7500. "properties": {
  7501. "messageID": {
  7502. "type": "string",
  7503. "pattern": "^msg"
  7504. },
  7505. "agent": {
  7506. "type": "string"
  7507. },
  7508. "model": {
  7509. "type": "object",
  7510. "properties": {
  7511. "providerID": {
  7512. "type": "string"
  7513. },
  7514. "modelID": {
  7515. "type": "string"
  7516. }
  7517. },
  7518. "required": ["providerID", "modelID"],
  7519. "additionalProperties": false
  7520. },
  7521. "command": {
  7522. "type": "string"
  7523. }
  7524. },
  7525. "required": ["agent", "command"],
  7526. "additionalProperties": false
  7527. }
  7528. }
  7529. }
  7530. },
  7531. "x-codeSamples": [
  7532. {
  7533. "lang": "js",
  7534. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  7535. }
  7536. ]
  7537. }
  7538. },
  7539. "/session/{sessionID}/revert": {
  7540. "post": {
  7541. "tags": ["session"],
  7542. "operationId": "session.revert",
  7543. "parameters": [
  7544. {
  7545. "name": "sessionID",
  7546. "in": "path",
  7547. "schema": {
  7548. "type": "string",
  7549. "pattern": "^ses"
  7550. },
  7551. "required": true
  7552. },
  7553. {
  7554. "name": "directory",
  7555. "in": "query",
  7556. "schema": {
  7557. "type": "string"
  7558. },
  7559. "required": false
  7560. },
  7561. {
  7562. "name": "workspace",
  7563. "in": "query",
  7564. "schema": {
  7565. "type": "string"
  7566. },
  7567. "required": false
  7568. }
  7569. ],
  7570. "responses": {
  7571. "200": {
  7572. "description": "Updated session",
  7573. "content": {
  7574. "application/json": {
  7575. "schema": {
  7576. "$ref": "#/components/schemas/Session"
  7577. }
  7578. }
  7579. }
  7580. },
  7581. "400": {
  7582. "description": "BadRequest | InvalidRequestError",
  7583. "content": {
  7584. "application/json": {
  7585. "schema": {
  7586. "anyOf": [
  7587. {
  7588. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7589. },
  7590. {
  7591. "$ref": "#/components/schemas/InvalidRequestError"
  7592. }
  7593. ]
  7594. }
  7595. }
  7596. }
  7597. },
  7598. "404": {
  7599. "description": "NotFoundError",
  7600. "content": {
  7601. "application/json": {
  7602. "schema": {
  7603. "$ref": "#/components/schemas/NotFoundError"
  7604. }
  7605. }
  7606. }
  7607. },
  7608. "409": {
  7609. "description": "SessionBusyError",
  7610. "content": {
  7611. "application/json": {
  7612. "schema": {
  7613. "$ref": "#/components/schemas/SessionBusyError"
  7614. }
  7615. }
  7616. }
  7617. }
  7618. },
  7619. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  7620. "summary": "Revert message",
  7621. "requestBody": {
  7622. "content": {
  7623. "application/json": {
  7624. "schema": {
  7625. "type": "object",
  7626. "properties": {
  7627. "messageID": {
  7628. "type": "string",
  7629. "pattern": "^msg"
  7630. },
  7631. "partID": {
  7632. "type": "string",
  7633. "pattern": "^prt"
  7634. }
  7635. },
  7636. "required": ["messageID"],
  7637. "additionalProperties": false
  7638. }
  7639. }
  7640. }
  7641. },
  7642. "x-codeSamples": [
  7643. {
  7644. "lang": "js",
  7645. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  7646. }
  7647. ]
  7648. }
  7649. },
  7650. "/session/{sessionID}/unrevert": {
  7651. "post": {
  7652. "tags": ["session"],
  7653. "operationId": "session.unrevert",
  7654. "parameters": [
  7655. {
  7656. "name": "sessionID",
  7657. "in": "path",
  7658. "schema": {
  7659. "type": "string",
  7660. "pattern": "^ses"
  7661. },
  7662. "required": true
  7663. },
  7664. {
  7665. "name": "directory",
  7666. "in": "query",
  7667. "schema": {
  7668. "type": "string"
  7669. },
  7670. "required": false
  7671. },
  7672. {
  7673. "name": "workspace",
  7674. "in": "query",
  7675. "schema": {
  7676. "type": "string"
  7677. },
  7678. "required": false
  7679. }
  7680. ],
  7681. "responses": {
  7682. "200": {
  7683. "description": "Updated session",
  7684. "content": {
  7685. "application/json": {
  7686. "schema": {
  7687. "$ref": "#/components/schemas/Session"
  7688. }
  7689. }
  7690. }
  7691. },
  7692. "400": {
  7693. "description": "BadRequest | InvalidRequestError",
  7694. "content": {
  7695. "application/json": {
  7696. "schema": {
  7697. "anyOf": [
  7698. {
  7699. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7700. },
  7701. {
  7702. "$ref": "#/components/schemas/InvalidRequestError"
  7703. }
  7704. ]
  7705. }
  7706. }
  7707. }
  7708. },
  7709. "404": {
  7710. "description": "NotFoundError",
  7711. "content": {
  7712. "application/json": {
  7713. "schema": {
  7714. "$ref": "#/components/schemas/NotFoundError"
  7715. }
  7716. }
  7717. }
  7718. },
  7719. "409": {
  7720. "description": "SessionBusyError",
  7721. "content": {
  7722. "application/json": {
  7723. "schema": {
  7724. "$ref": "#/components/schemas/SessionBusyError"
  7725. }
  7726. }
  7727. }
  7728. }
  7729. },
  7730. "description": "Restore all previously reverted messages in a session.",
  7731. "summary": "Restore reverted messages",
  7732. "x-codeSamples": [
  7733. {
  7734. "lang": "js",
  7735. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  7736. }
  7737. ]
  7738. }
  7739. },
  7740. "/session/{sessionID}/permissions/{permissionID}": {
  7741. "post": {
  7742. "tags": ["session"],
  7743. "operationId": "permission.respond",
  7744. "parameters": [
  7745. {
  7746. "name": "sessionID",
  7747. "in": "path",
  7748. "schema": {
  7749. "type": "string",
  7750. "pattern": "^ses"
  7751. },
  7752. "required": true
  7753. },
  7754. {
  7755. "name": "permissionID",
  7756. "in": "path",
  7757. "schema": {
  7758. "type": "string",
  7759. "pattern": "^per"
  7760. },
  7761. "required": true
  7762. },
  7763. {
  7764. "name": "directory",
  7765. "in": "query",
  7766. "schema": {
  7767. "type": "string"
  7768. },
  7769. "required": false
  7770. },
  7771. {
  7772. "name": "workspace",
  7773. "in": "query",
  7774. "schema": {
  7775. "type": "string"
  7776. },
  7777. "required": false
  7778. }
  7779. ],
  7780. "responses": {
  7781. "200": {
  7782. "description": "Permission processed successfully",
  7783. "content": {
  7784. "application/json": {
  7785. "schema": {
  7786. "type": "boolean",
  7787. "description": "Permission processed successfully"
  7788. }
  7789. }
  7790. }
  7791. },
  7792. "400": {
  7793. "description": "BadRequest | InvalidRequestError",
  7794. "content": {
  7795. "application/json": {
  7796. "schema": {
  7797. "anyOf": [
  7798. {
  7799. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7800. },
  7801. {
  7802. "$ref": "#/components/schemas/InvalidRequestError"
  7803. }
  7804. ]
  7805. }
  7806. }
  7807. }
  7808. },
  7809. "404": {
  7810. "description": "NotFoundError | PermissionNotFoundError",
  7811. "content": {
  7812. "application/json": {
  7813. "schema": {
  7814. "anyOf": [
  7815. {
  7816. "$ref": "#/components/schemas/NotFoundError"
  7817. },
  7818. {
  7819. "$ref": "#/components/schemas/PermissionNotFoundError"
  7820. }
  7821. ]
  7822. }
  7823. }
  7824. }
  7825. }
  7826. },
  7827. "description": "Approve or deny a permission request from the AI assistant.",
  7828. "summary": "Respond to permission",
  7829. "deprecated": true,
  7830. "requestBody": {
  7831. "content": {
  7832. "application/json": {
  7833. "schema": {
  7834. "type": "object",
  7835. "properties": {
  7836. "response": {
  7837. "type": "string",
  7838. "enum": ["once", "always", "reject"]
  7839. }
  7840. },
  7841. "required": ["response"],
  7842. "additionalProperties": false
  7843. }
  7844. }
  7845. }
  7846. },
  7847. "x-codeSamples": [
  7848. {
  7849. "lang": "js",
  7850. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  7851. }
  7852. ]
  7853. }
  7854. },
  7855. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  7856. "delete": {
  7857. "tags": ["session"],
  7858. "operationId": "part.delete",
  7859. "parameters": [
  7860. {
  7861. "name": "sessionID",
  7862. "in": "path",
  7863. "schema": {
  7864. "type": "string",
  7865. "pattern": "^ses"
  7866. },
  7867. "required": true
  7868. },
  7869. {
  7870. "name": "messageID",
  7871. "in": "path",
  7872. "schema": {
  7873. "type": "string",
  7874. "pattern": "^msg"
  7875. },
  7876. "required": true
  7877. },
  7878. {
  7879. "name": "partID",
  7880. "in": "path",
  7881. "schema": {
  7882. "type": "string",
  7883. "pattern": "^prt"
  7884. },
  7885. "required": true
  7886. },
  7887. {
  7888. "name": "directory",
  7889. "in": "query",
  7890. "schema": {
  7891. "type": "string"
  7892. },
  7893. "required": false
  7894. },
  7895. {
  7896. "name": "workspace",
  7897. "in": "query",
  7898. "schema": {
  7899. "type": "string"
  7900. },
  7901. "required": false
  7902. }
  7903. ],
  7904. "responses": {
  7905. "200": {
  7906. "description": "Successfully deleted part",
  7907. "content": {
  7908. "application/json": {
  7909. "schema": {
  7910. "type": "boolean",
  7911. "description": "Successfully deleted part"
  7912. }
  7913. }
  7914. }
  7915. },
  7916. "400": {
  7917. "description": "BadRequest | InvalidRequestError",
  7918. "content": {
  7919. "application/json": {
  7920. "schema": {
  7921. "anyOf": [
  7922. {
  7923. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7924. },
  7925. {
  7926. "$ref": "#/components/schemas/InvalidRequestError"
  7927. }
  7928. ]
  7929. }
  7930. }
  7931. }
  7932. },
  7933. "404": {
  7934. "description": "NotFoundError",
  7935. "content": {
  7936. "application/json": {
  7937. "schema": {
  7938. "$ref": "#/components/schemas/NotFoundError"
  7939. }
  7940. }
  7941. }
  7942. }
  7943. },
  7944. "description": "Delete a part from a message.",
  7945. "x-codeSamples": [
  7946. {
  7947. "lang": "js",
  7948. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  7949. }
  7950. ]
  7951. },
  7952. "patch": {
  7953. "tags": ["session"],
  7954. "operationId": "part.update",
  7955. "parameters": [
  7956. {
  7957. "name": "sessionID",
  7958. "in": "path",
  7959. "schema": {
  7960. "type": "string",
  7961. "pattern": "^ses"
  7962. },
  7963. "required": true
  7964. },
  7965. {
  7966. "name": "messageID",
  7967. "in": "path",
  7968. "schema": {
  7969. "type": "string",
  7970. "pattern": "^msg"
  7971. },
  7972. "required": true
  7973. },
  7974. {
  7975. "name": "partID",
  7976. "in": "path",
  7977. "schema": {
  7978. "type": "string",
  7979. "pattern": "^prt"
  7980. },
  7981. "required": true
  7982. },
  7983. {
  7984. "name": "directory",
  7985. "in": "query",
  7986. "schema": {
  7987. "type": "string"
  7988. },
  7989. "required": false
  7990. },
  7991. {
  7992. "name": "workspace",
  7993. "in": "query",
  7994. "schema": {
  7995. "type": "string"
  7996. },
  7997. "required": false
  7998. }
  7999. ],
  8000. "responses": {
  8001. "200": {
  8002. "description": "Successfully updated part",
  8003. "content": {
  8004. "application/json": {
  8005. "schema": {
  8006. "$ref": "#/components/schemas/Part"
  8007. }
  8008. }
  8009. }
  8010. },
  8011. "400": {
  8012. "description": "BadRequest | InvalidRequestError",
  8013. "content": {
  8014. "application/json": {
  8015. "schema": {
  8016. "anyOf": [
  8017. {
  8018. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8019. },
  8020. {
  8021. "$ref": "#/components/schemas/InvalidRequestError"
  8022. }
  8023. ]
  8024. }
  8025. }
  8026. }
  8027. },
  8028. "404": {
  8029. "description": "NotFoundError",
  8030. "content": {
  8031. "application/json": {
  8032. "schema": {
  8033. "$ref": "#/components/schemas/NotFoundError"
  8034. }
  8035. }
  8036. }
  8037. }
  8038. },
  8039. "description": "Update a part in a message.",
  8040. "requestBody": {
  8041. "content": {
  8042. "application/json": {
  8043. "schema": {
  8044. "$ref": "#/components/schemas/Part"
  8045. }
  8046. }
  8047. }
  8048. },
  8049. "x-codeSamples": [
  8050. {
  8051. "lang": "js",
  8052. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  8053. }
  8054. ]
  8055. }
  8056. },
  8057. "/sync/start": {
  8058. "post": {
  8059. "tags": ["sync"],
  8060. "operationId": "sync.start",
  8061. "parameters": [
  8062. {
  8063. "name": "directory",
  8064. "in": "query",
  8065. "schema": {
  8066. "type": "string"
  8067. },
  8068. "required": false
  8069. },
  8070. {
  8071. "name": "workspace",
  8072. "in": "query",
  8073. "schema": {
  8074. "type": "string"
  8075. },
  8076. "required": false
  8077. }
  8078. ],
  8079. "responses": {
  8080. "200": {
  8081. "description": "Workspace sync started",
  8082. "content": {
  8083. "application/json": {
  8084. "schema": {
  8085. "type": "boolean",
  8086. "description": "Workspace sync started"
  8087. }
  8088. }
  8089. }
  8090. },
  8091. "400": {
  8092. "description": "Bad request",
  8093. "content": {
  8094. "application/json": {
  8095. "schema": {
  8096. "$ref": "#/components/schemas/BadRequestError"
  8097. }
  8098. }
  8099. }
  8100. }
  8101. },
  8102. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  8103. "summary": "Start workspace sync",
  8104. "x-codeSamples": [
  8105. {
  8106. "lang": "js",
  8107. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  8108. }
  8109. ]
  8110. }
  8111. },
  8112. "/sync/replay": {
  8113. "post": {
  8114. "tags": ["sync"],
  8115. "operationId": "sync.replay",
  8116. "parameters": [
  8117. {
  8118. "name": "directory",
  8119. "in": "query",
  8120. "schema": {
  8121. "type": "string"
  8122. },
  8123. "required": false
  8124. },
  8125. {
  8126. "name": "workspace",
  8127. "in": "query",
  8128. "schema": {
  8129. "type": "string"
  8130. },
  8131. "required": false
  8132. }
  8133. ],
  8134. "responses": {
  8135. "200": {
  8136. "description": "Replayed sync events",
  8137. "content": {
  8138. "application/json": {
  8139. "schema": {
  8140. "type": "object",
  8141. "properties": {
  8142. "sessionID": {
  8143. "type": "string"
  8144. }
  8145. },
  8146. "required": ["sessionID"],
  8147. "additionalProperties": false,
  8148. "description": "Replayed sync events"
  8149. }
  8150. }
  8151. }
  8152. },
  8153. "400": {
  8154. "description": "BadRequest | InvalidRequestError",
  8155. "content": {
  8156. "application/json": {
  8157. "schema": {
  8158. "anyOf": [
  8159. {
  8160. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8161. },
  8162. {
  8163. "$ref": "#/components/schemas/InvalidRequestError"
  8164. }
  8165. ]
  8166. }
  8167. }
  8168. }
  8169. }
  8170. },
  8171. "description": "Validate and replay a complete sync event history.",
  8172. "summary": "Replay sync events",
  8173. "requestBody": {
  8174. "content": {
  8175. "application/json": {
  8176. "schema": {
  8177. "type": "object",
  8178. "properties": {
  8179. "directory": {
  8180. "type": "string"
  8181. },
  8182. "events": {
  8183. "type": "array",
  8184. "minItems": 1,
  8185. "items": {
  8186. "type": "object",
  8187. "properties": {
  8188. "id": {
  8189. "type": "string",
  8190. "pattern": "^evt_"
  8191. },
  8192. "aggregateID": {
  8193. "type": "string"
  8194. },
  8195. "seq": {
  8196. "type": "integer",
  8197. "minimum": 0
  8198. },
  8199. "type": {
  8200. "type": "string"
  8201. },
  8202. "data": {
  8203. "type": "object"
  8204. }
  8205. },
  8206. "required": ["id", "aggregateID", "seq", "type", "data"],
  8207. "additionalProperties": false
  8208. }
  8209. }
  8210. },
  8211. "required": ["directory", "events"],
  8212. "additionalProperties": false
  8213. }
  8214. }
  8215. }
  8216. },
  8217. "x-codeSamples": [
  8218. {
  8219. "lang": "js",
  8220. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  8221. }
  8222. ]
  8223. }
  8224. },
  8225. "/sync/steal": {
  8226. "post": {
  8227. "tags": ["sync"],
  8228. "operationId": "sync.steal",
  8229. "parameters": [
  8230. {
  8231. "name": "directory",
  8232. "in": "query",
  8233. "schema": {
  8234. "type": "string"
  8235. },
  8236. "required": false
  8237. },
  8238. {
  8239. "name": "workspace",
  8240. "in": "query",
  8241. "schema": {
  8242. "type": "string"
  8243. },
  8244. "required": false
  8245. }
  8246. ],
  8247. "responses": {
  8248. "200": {
  8249. "description": "Session stolen into workspace",
  8250. "content": {
  8251. "application/json": {
  8252. "schema": {
  8253. "type": "object",
  8254. "properties": {
  8255. "sessionID": {
  8256. "type": "string",
  8257. "pattern": "^ses"
  8258. }
  8259. },
  8260. "required": ["sessionID"],
  8261. "additionalProperties": false,
  8262. "description": "Session stolen into workspace"
  8263. }
  8264. }
  8265. }
  8266. },
  8267. "400": {
  8268. "description": "BadRequest | InvalidRequestError",
  8269. "content": {
  8270. "application/json": {
  8271. "schema": {
  8272. "anyOf": [
  8273. {
  8274. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8275. },
  8276. {
  8277. "$ref": "#/components/schemas/InvalidRequestError"
  8278. }
  8279. ]
  8280. }
  8281. }
  8282. }
  8283. }
  8284. },
  8285. "description": "Update a session to belong to the current workspace through the sync event system.",
  8286. "summary": "Steal session into workspace",
  8287. "requestBody": {
  8288. "content": {
  8289. "application/json": {
  8290. "schema": {
  8291. "type": "object",
  8292. "properties": {
  8293. "sessionID": {
  8294. "type": "string",
  8295. "pattern": "^ses"
  8296. }
  8297. },
  8298. "required": ["sessionID"],
  8299. "additionalProperties": false
  8300. }
  8301. }
  8302. }
  8303. },
  8304. "x-codeSamples": [
  8305. {
  8306. "lang": "js",
  8307. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.steal({\n ...\n})"
  8308. }
  8309. ]
  8310. }
  8311. },
  8312. "/sync/history": {
  8313. "post": {
  8314. "tags": ["sync"],
  8315. "operationId": "sync.history.list",
  8316. "parameters": [
  8317. {
  8318. "name": "directory",
  8319. "in": "query",
  8320. "schema": {
  8321. "type": "string"
  8322. },
  8323. "required": false
  8324. },
  8325. {
  8326. "name": "workspace",
  8327. "in": "query",
  8328. "schema": {
  8329. "type": "string"
  8330. },
  8331. "required": false
  8332. }
  8333. ],
  8334. "responses": {
  8335. "200": {
  8336. "description": "Sync events",
  8337. "content": {
  8338. "application/json": {
  8339. "schema": {
  8340. "type": "array",
  8341. "items": {
  8342. "type": "object",
  8343. "properties": {
  8344. "id": {
  8345. "type": "string",
  8346. "pattern": "^evt_"
  8347. },
  8348. "aggregate_id": {
  8349. "type": "string"
  8350. },
  8351. "seq": {
  8352. "type": "integer",
  8353. "minimum": 0
  8354. },
  8355. "type": {
  8356. "type": "string"
  8357. },
  8358. "data": {
  8359. "type": "object"
  8360. }
  8361. },
  8362. "required": ["id", "aggregate_id", "seq", "type", "data"],
  8363. "additionalProperties": false
  8364. },
  8365. "description": "Sync events"
  8366. }
  8367. }
  8368. }
  8369. },
  8370. "400": {
  8371. "description": "BadRequest | InvalidRequestError",
  8372. "content": {
  8373. "application/json": {
  8374. "schema": {
  8375. "anyOf": [
  8376. {
  8377. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8378. },
  8379. {
  8380. "$ref": "#/components/schemas/InvalidRequestError"
  8381. }
  8382. ]
  8383. }
  8384. }
  8385. }
  8386. }
  8387. },
  8388. "description": "List sync events for all aggregates. Keys are aggregate IDs the client already knows about, values are the last known sequence ID. Events with seq > value are returned for those aggregates. Aggregates not listed in the input get their full history.",
  8389. "summary": "List sync events",
  8390. "requestBody": {
  8391. "content": {
  8392. "application/json": {
  8393. "schema": {
  8394. "type": "object",
  8395. "additionalProperties": {
  8396. "type": "integer",
  8397. "minimum": 0
  8398. }
  8399. }
  8400. }
  8401. }
  8402. },
  8403. "x-codeSamples": [
  8404. {
  8405. "lang": "js",
  8406. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  8407. }
  8408. ]
  8409. }
  8410. },
  8411. "/tui/append-prompt": {
  8412. "post": {
  8413. "tags": ["tui"],
  8414. "operationId": "tui.appendPrompt",
  8415. "parameters": [
  8416. {
  8417. "name": "directory",
  8418. "in": "query",
  8419. "schema": {
  8420. "type": "string"
  8421. },
  8422. "required": false
  8423. },
  8424. {
  8425. "name": "workspace",
  8426. "in": "query",
  8427. "schema": {
  8428. "type": "string"
  8429. },
  8430. "required": false
  8431. }
  8432. ],
  8433. "responses": {
  8434. "200": {
  8435. "description": "Prompt processed successfully",
  8436. "content": {
  8437. "application/json": {
  8438. "schema": {
  8439. "type": "boolean",
  8440. "description": "Prompt processed successfully"
  8441. }
  8442. }
  8443. }
  8444. },
  8445. "400": {
  8446. "description": "BadRequest | InvalidRequestError",
  8447. "content": {
  8448. "application/json": {
  8449. "schema": {
  8450. "anyOf": [
  8451. {
  8452. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8453. },
  8454. {
  8455. "$ref": "#/components/schemas/InvalidRequestError"
  8456. }
  8457. ]
  8458. }
  8459. }
  8460. }
  8461. }
  8462. },
  8463. "description": "Append prompt to the TUI.",
  8464. "summary": "Append TUI prompt",
  8465. "requestBody": {
  8466. "content": {
  8467. "application/json": {
  8468. "schema": {
  8469. "type": "object",
  8470. "properties": {
  8471. "text": {
  8472. "type": "string"
  8473. }
  8474. },
  8475. "required": ["text"],
  8476. "additionalProperties": false
  8477. }
  8478. }
  8479. }
  8480. },
  8481. "x-codeSamples": [
  8482. {
  8483. "lang": "js",
  8484. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  8485. }
  8486. ]
  8487. }
  8488. },
  8489. "/tui/open-help": {
  8490. "post": {
  8491. "tags": ["tui"],
  8492. "operationId": "tui.openHelp",
  8493. "parameters": [
  8494. {
  8495. "name": "directory",
  8496. "in": "query",
  8497. "schema": {
  8498. "type": "string"
  8499. },
  8500. "required": false
  8501. },
  8502. {
  8503. "name": "workspace",
  8504. "in": "query",
  8505. "schema": {
  8506. "type": "string"
  8507. },
  8508. "required": false
  8509. }
  8510. ],
  8511. "responses": {
  8512. "200": {
  8513. "description": "Help dialog opened successfully",
  8514. "content": {
  8515. "application/json": {
  8516. "schema": {
  8517. "type": "boolean",
  8518. "description": "Help dialog opened successfully"
  8519. }
  8520. }
  8521. }
  8522. },
  8523. "400": {
  8524. "description": "Bad request",
  8525. "content": {
  8526. "application/json": {
  8527. "schema": {
  8528. "$ref": "#/components/schemas/BadRequestError"
  8529. }
  8530. }
  8531. }
  8532. }
  8533. },
  8534. "description": "Open the help dialog in the TUI to display user assistance information.",
  8535. "summary": "Open help dialog",
  8536. "x-codeSamples": [
  8537. {
  8538. "lang": "js",
  8539. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  8540. }
  8541. ]
  8542. }
  8543. },
  8544. "/tui/open-sessions": {
  8545. "post": {
  8546. "tags": ["tui"],
  8547. "operationId": "tui.openSessions",
  8548. "parameters": [
  8549. {
  8550. "name": "directory",
  8551. "in": "query",
  8552. "schema": {
  8553. "type": "string"
  8554. },
  8555. "required": false
  8556. },
  8557. {
  8558. "name": "workspace",
  8559. "in": "query",
  8560. "schema": {
  8561. "type": "string"
  8562. },
  8563. "required": false
  8564. }
  8565. ],
  8566. "responses": {
  8567. "200": {
  8568. "description": "Session dialog opened successfully",
  8569. "content": {
  8570. "application/json": {
  8571. "schema": {
  8572. "type": "boolean",
  8573. "description": "Session dialog opened successfully"
  8574. }
  8575. }
  8576. }
  8577. },
  8578. "400": {
  8579. "description": "Bad request",
  8580. "content": {
  8581. "application/json": {
  8582. "schema": {
  8583. "$ref": "#/components/schemas/BadRequestError"
  8584. }
  8585. }
  8586. }
  8587. }
  8588. },
  8589. "description": "Open the session dialog.",
  8590. "summary": "Open sessions dialog",
  8591. "x-codeSamples": [
  8592. {
  8593. "lang": "js",
  8594. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  8595. }
  8596. ]
  8597. }
  8598. },
  8599. "/tui/open-themes": {
  8600. "post": {
  8601. "tags": ["tui"],
  8602. "operationId": "tui.openThemes",
  8603. "parameters": [
  8604. {
  8605. "name": "directory",
  8606. "in": "query",
  8607. "schema": {
  8608. "type": "string"
  8609. },
  8610. "required": false
  8611. },
  8612. {
  8613. "name": "workspace",
  8614. "in": "query",
  8615. "schema": {
  8616. "type": "string"
  8617. },
  8618. "required": false
  8619. }
  8620. ],
  8621. "responses": {
  8622. "200": {
  8623. "description": "Theme dialog opened successfully",
  8624. "content": {
  8625. "application/json": {
  8626. "schema": {
  8627. "type": "boolean",
  8628. "description": "Theme dialog opened successfully"
  8629. }
  8630. }
  8631. }
  8632. },
  8633. "400": {
  8634. "description": "Bad request",
  8635. "content": {
  8636. "application/json": {
  8637. "schema": {
  8638. "$ref": "#/components/schemas/BadRequestError"
  8639. }
  8640. }
  8641. }
  8642. }
  8643. },
  8644. "description": "Open the theme dialog.",
  8645. "summary": "Open themes dialog",
  8646. "x-codeSamples": [
  8647. {
  8648. "lang": "js",
  8649. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  8650. }
  8651. ]
  8652. }
  8653. },
  8654. "/tui/open-models": {
  8655. "post": {
  8656. "tags": ["tui"],
  8657. "operationId": "tui.openModels",
  8658. "parameters": [
  8659. {
  8660. "name": "directory",
  8661. "in": "query",
  8662. "schema": {
  8663. "type": "string"
  8664. },
  8665. "required": false
  8666. },
  8667. {
  8668. "name": "workspace",
  8669. "in": "query",
  8670. "schema": {
  8671. "type": "string"
  8672. },
  8673. "required": false
  8674. }
  8675. ],
  8676. "responses": {
  8677. "200": {
  8678. "description": "Model dialog opened successfully",
  8679. "content": {
  8680. "application/json": {
  8681. "schema": {
  8682. "type": "boolean",
  8683. "description": "Model dialog opened successfully"
  8684. }
  8685. }
  8686. }
  8687. },
  8688. "400": {
  8689. "description": "Bad request",
  8690. "content": {
  8691. "application/json": {
  8692. "schema": {
  8693. "$ref": "#/components/schemas/BadRequestError"
  8694. }
  8695. }
  8696. }
  8697. }
  8698. },
  8699. "description": "Open the model dialog.",
  8700. "summary": "Open models dialog",
  8701. "x-codeSamples": [
  8702. {
  8703. "lang": "js",
  8704. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  8705. }
  8706. ]
  8707. }
  8708. },
  8709. "/tui/submit-prompt": {
  8710. "post": {
  8711. "tags": ["tui"],
  8712. "operationId": "tui.submitPrompt",
  8713. "parameters": [
  8714. {
  8715. "name": "directory",
  8716. "in": "query",
  8717. "schema": {
  8718. "type": "string"
  8719. },
  8720. "required": false
  8721. },
  8722. {
  8723. "name": "workspace",
  8724. "in": "query",
  8725. "schema": {
  8726. "type": "string"
  8727. },
  8728. "required": false
  8729. }
  8730. ],
  8731. "responses": {
  8732. "200": {
  8733. "description": "Prompt submitted successfully",
  8734. "content": {
  8735. "application/json": {
  8736. "schema": {
  8737. "type": "boolean",
  8738. "description": "Prompt submitted successfully"
  8739. }
  8740. }
  8741. }
  8742. },
  8743. "400": {
  8744. "description": "Bad request",
  8745. "content": {
  8746. "application/json": {
  8747. "schema": {
  8748. "$ref": "#/components/schemas/BadRequestError"
  8749. }
  8750. }
  8751. }
  8752. }
  8753. },
  8754. "description": "Submit the prompt.",
  8755. "summary": "Submit TUI prompt",
  8756. "x-codeSamples": [
  8757. {
  8758. "lang": "js",
  8759. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  8760. }
  8761. ]
  8762. }
  8763. },
  8764. "/tui/clear-prompt": {
  8765. "post": {
  8766. "tags": ["tui"],
  8767. "operationId": "tui.clearPrompt",
  8768. "parameters": [
  8769. {
  8770. "name": "directory",
  8771. "in": "query",
  8772. "schema": {
  8773. "type": "string"
  8774. },
  8775. "required": false
  8776. },
  8777. {
  8778. "name": "workspace",
  8779. "in": "query",
  8780. "schema": {
  8781. "type": "string"
  8782. },
  8783. "required": false
  8784. }
  8785. ],
  8786. "responses": {
  8787. "200": {
  8788. "description": "Prompt cleared successfully",
  8789. "content": {
  8790. "application/json": {
  8791. "schema": {
  8792. "type": "boolean",
  8793. "description": "Prompt cleared successfully"
  8794. }
  8795. }
  8796. }
  8797. },
  8798. "400": {
  8799. "description": "Bad request",
  8800. "content": {
  8801. "application/json": {
  8802. "schema": {
  8803. "$ref": "#/components/schemas/BadRequestError"
  8804. }
  8805. }
  8806. }
  8807. }
  8808. },
  8809. "description": "Clear the prompt.",
  8810. "summary": "Clear TUI prompt",
  8811. "x-codeSamples": [
  8812. {
  8813. "lang": "js",
  8814. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  8815. }
  8816. ]
  8817. }
  8818. },
  8819. "/tui/execute-command": {
  8820. "post": {
  8821. "tags": ["tui"],
  8822. "operationId": "tui.executeCommand",
  8823. "parameters": [
  8824. {
  8825. "name": "directory",
  8826. "in": "query",
  8827. "schema": {
  8828. "type": "string"
  8829. },
  8830. "required": false
  8831. },
  8832. {
  8833. "name": "workspace",
  8834. "in": "query",
  8835. "schema": {
  8836. "type": "string"
  8837. },
  8838. "required": false
  8839. }
  8840. ],
  8841. "responses": {
  8842. "200": {
  8843. "description": "Command executed successfully",
  8844. "content": {
  8845. "application/json": {
  8846. "schema": {
  8847. "type": "boolean",
  8848. "description": "Command executed successfully"
  8849. }
  8850. }
  8851. }
  8852. },
  8853. "400": {
  8854. "description": "BadRequest | InvalidRequestError",
  8855. "content": {
  8856. "application/json": {
  8857. "schema": {
  8858. "anyOf": [
  8859. {
  8860. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8861. },
  8862. {
  8863. "$ref": "#/components/schemas/InvalidRequestError"
  8864. }
  8865. ]
  8866. }
  8867. }
  8868. }
  8869. }
  8870. },
  8871. "description": "Execute a TUI command.",
  8872. "summary": "Execute TUI command",
  8873. "requestBody": {
  8874. "content": {
  8875. "application/json": {
  8876. "schema": {
  8877. "type": "object",
  8878. "properties": {
  8879. "command": {
  8880. "type": "string"
  8881. }
  8882. },
  8883. "required": ["command"],
  8884. "additionalProperties": false
  8885. }
  8886. }
  8887. }
  8888. },
  8889. "x-codeSamples": [
  8890. {
  8891. "lang": "js",
  8892. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  8893. }
  8894. ]
  8895. }
  8896. },
  8897. "/tui/show-toast": {
  8898. "post": {
  8899. "tags": ["tui"],
  8900. "operationId": "tui.showToast",
  8901. "parameters": [
  8902. {
  8903. "name": "directory",
  8904. "in": "query",
  8905. "schema": {
  8906. "type": "string"
  8907. },
  8908. "required": false
  8909. },
  8910. {
  8911. "name": "workspace",
  8912. "in": "query",
  8913. "schema": {
  8914. "type": "string"
  8915. },
  8916. "required": false
  8917. }
  8918. ],
  8919. "responses": {
  8920. "200": {
  8921. "description": "Toast notification shown successfully",
  8922. "content": {
  8923. "application/json": {
  8924. "schema": {
  8925. "type": "boolean",
  8926. "description": "Toast notification shown successfully"
  8927. }
  8928. }
  8929. }
  8930. },
  8931. "400": {
  8932. "description": "Bad request",
  8933. "content": {
  8934. "application/json": {
  8935. "schema": {
  8936. "$ref": "#/components/schemas/BadRequestError"
  8937. }
  8938. }
  8939. }
  8940. }
  8941. },
  8942. "description": "Show a toast notification in the TUI.",
  8943. "summary": "Show TUI toast",
  8944. "requestBody": {
  8945. "content": {
  8946. "application/json": {
  8947. "schema": {
  8948. "type": "object",
  8949. "properties": {
  8950. "title": {
  8951. "type": "string"
  8952. },
  8953. "message": {
  8954. "type": "string"
  8955. },
  8956. "variant": {
  8957. "type": "string",
  8958. "enum": ["info", "success", "warning", "error"]
  8959. },
  8960. "duration": {
  8961. "type": "integer",
  8962. "exclusiveMinimum": 0
  8963. }
  8964. },
  8965. "required": ["message", "variant"],
  8966. "additionalProperties": false
  8967. }
  8968. }
  8969. }
  8970. },
  8971. "x-codeSamples": [
  8972. {
  8973. "lang": "js",
  8974. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  8975. }
  8976. ]
  8977. }
  8978. },
  8979. "/tui/publish": {
  8980. "post": {
  8981. "tags": ["tui"],
  8982. "operationId": "tui.publish",
  8983. "parameters": [
  8984. {
  8985. "name": "directory",
  8986. "in": "query",
  8987. "schema": {
  8988. "type": "string"
  8989. },
  8990. "required": false
  8991. },
  8992. {
  8993. "name": "workspace",
  8994. "in": "query",
  8995. "schema": {
  8996. "type": "string"
  8997. },
  8998. "required": false
  8999. }
  9000. ],
  9001. "responses": {
  9002. "200": {
  9003. "description": "Event published successfully",
  9004. "content": {
  9005. "application/json": {
  9006. "schema": {
  9007. "type": "boolean",
  9008. "description": "Event published successfully"
  9009. }
  9010. }
  9011. }
  9012. },
  9013. "400": {
  9014. "description": "BadRequest | InvalidRequestError",
  9015. "content": {
  9016. "application/json": {
  9017. "schema": {
  9018. "anyOf": [
  9019. {
  9020. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9021. },
  9022. {
  9023. "$ref": "#/components/schemas/InvalidRequestError"
  9024. }
  9025. ]
  9026. }
  9027. }
  9028. }
  9029. }
  9030. },
  9031. "description": "Publish a TUI event.",
  9032. "summary": "Publish TUI event",
  9033. "requestBody": {
  9034. "content": {
  9035. "application/json": {
  9036. "schema": {
  9037. "anyOf": [
  9038. {
  9039. "$ref": "#/components/schemas/EventTuiPromptAppend"
  9040. },
  9041. {
  9042. "$ref": "#/components/schemas/EventTuiCommandExecute"
  9043. },
  9044. {
  9045. "$ref": "#/components/schemas/EventTuiToastShow"
  9046. },
  9047. {
  9048. "$ref": "#/components/schemas/EventTuiSessionSelect"
  9049. }
  9050. ]
  9051. }
  9052. }
  9053. }
  9054. },
  9055. "x-codeSamples": [
  9056. {
  9057. "lang": "js",
  9058. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  9059. }
  9060. ]
  9061. }
  9062. },
  9063. "/tui/select-session": {
  9064. "post": {
  9065. "tags": ["tui"],
  9066. "operationId": "tui.selectSession",
  9067. "parameters": [
  9068. {
  9069. "name": "directory",
  9070. "in": "query",
  9071. "schema": {
  9072. "type": "string"
  9073. },
  9074. "required": false
  9075. },
  9076. {
  9077. "name": "workspace",
  9078. "in": "query",
  9079. "schema": {
  9080. "type": "string"
  9081. },
  9082. "required": false
  9083. }
  9084. ],
  9085. "responses": {
  9086. "200": {
  9087. "description": "Session selected successfully",
  9088. "content": {
  9089. "application/json": {
  9090. "schema": {
  9091. "type": "boolean",
  9092. "description": "Session selected successfully"
  9093. }
  9094. }
  9095. }
  9096. },
  9097. "400": {
  9098. "description": "BadRequest | InvalidRequestError",
  9099. "content": {
  9100. "application/json": {
  9101. "schema": {
  9102. "anyOf": [
  9103. {
  9104. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9105. },
  9106. {
  9107. "$ref": "#/components/schemas/InvalidRequestError"
  9108. }
  9109. ]
  9110. }
  9111. }
  9112. }
  9113. },
  9114. "404": {
  9115. "description": "NotFoundError",
  9116. "content": {
  9117. "application/json": {
  9118. "schema": {
  9119. "$ref": "#/components/schemas/NotFoundError"
  9120. }
  9121. }
  9122. }
  9123. }
  9124. },
  9125. "description": "Navigate the TUI to display the specified session.",
  9126. "summary": "Select session",
  9127. "requestBody": {
  9128. "content": {
  9129. "application/json": {
  9130. "schema": {
  9131. "type": "object",
  9132. "properties": {
  9133. "sessionID": {
  9134. "type": "string",
  9135. "pattern": "^ses",
  9136. "description": "Session ID to navigate to"
  9137. }
  9138. },
  9139. "required": ["sessionID"],
  9140. "additionalProperties": false
  9141. }
  9142. }
  9143. }
  9144. },
  9145. "x-codeSamples": [
  9146. {
  9147. "lang": "js",
  9148. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  9149. }
  9150. ]
  9151. }
  9152. },
  9153. "/tui/control/next": {
  9154. "get": {
  9155. "tags": ["tui"],
  9156. "operationId": "tui.control.next",
  9157. "parameters": [
  9158. {
  9159. "name": "directory",
  9160. "in": "query",
  9161. "schema": {
  9162. "type": "string"
  9163. },
  9164. "required": false
  9165. },
  9166. {
  9167. "name": "workspace",
  9168. "in": "query",
  9169. "schema": {
  9170. "type": "string"
  9171. },
  9172. "required": false
  9173. }
  9174. ],
  9175. "responses": {
  9176. "200": {
  9177. "description": "Next TUI request",
  9178. "content": {
  9179. "application/json": {
  9180. "schema": {
  9181. "type": "object",
  9182. "properties": {
  9183. "path": {
  9184. "type": "string"
  9185. },
  9186. "body": {}
  9187. },
  9188. "required": ["path", "body"],
  9189. "additionalProperties": false,
  9190. "description": "Next TUI request"
  9191. }
  9192. }
  9193. }
  9194. },
  9195. "400": {
  9196. "description": "Bad request",
  9197. "content": {
  9198. "application/json": {
  9199. "schema": {
  9200. "$ref": "#/components/schemas/BadRequestError"
  9201. }
  9202. }
  9203. }
  9204. }
  9205. },
  9206. "description": "Retrieve the next TUI request from the queue for processing.",
  9207. "summary": "Get next TUI request",
  9208. "x-codeSamples": [
  9209. {
  9210. "lang": "js",
  9211. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  9212. }
  9213. ]
  9214. }
  9215. },
  9216. "/tui/control/response": {
  9217. "post": {
  9218. "tags": ["tui"],
  9219. "operationId": "tui.control.response",
  9220. "parameters": [
  9221. {
  9222. "name": "directory",
  9223. "in": "query",
  9224. "schema": {
  9225. "type": "string"
  9226. },
  9227. "required": false
  9228. },
  9229. {
  9230. "name": "workspace",
  9231. "in": "query",
  9232. "schema": {
  9233. "type": "string"
  9234. },
  9235. "required": false
  9236. }
  9237. ],
  9238. "responses": {
  9239. "200": {
  9240. "description": "Response submitted successfully",
  9241. "content": {
  9242. "application/json": {
  9243. "schema": {
  9244. "type": "boolean",
  9245. "description": "Response submitted successfully"
  9246. }
  9247. }
  9248. }
  9249. },
  9250. "400": {
  9251. "description": "Bad request",
  9252. "content": {
  9253. "application/json": {
  9254. "schema": {
  9255. "$ref": "#/components/schemas/BadRequestError"
  9256. }
  9257. }
  9258. }
  9259. }
  9260. },
  9261. "description": "Submit a response to the TUI request queue to complete a pending request.",
  9262. "summary": "Submit TUI response",
  9263. "requestBody": {
  9264. "content": {
  9265. "application/json": {
  9266. "schema": {}
  9267. }
  9268. }
  9269. },
  9270. "x-codeSamples": [
  9271. {
  9272. "lang": "js",
  9273. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  9274. }
  9275. ]
  9276. }
  9277. },
  9278. "/experimental/workspace/adapter": {
  9279. "get": {
  9280. "tags": ["workspace"],
  9281. "operationId": "experimental.workspace.adapter.list",
  9282. "parameters": [
  9283. {
  9284. "name": "directory",
  9285. "in": "query",
  9286. "schema": {
  9287. "type": "string"
  9288. },
  9289. "required": false
  9290. },
  9291. {
  9292. "name": "workspace",
  9293. "in": "query",
  9294. "schema": {
  9295. "type": "string"
  9296. },
  9297. "required": false
  9298. }
  9299. ],
  9300. "responses": {
  9301. "200": {
  9302. "description": "Workspace adapters",
  9303. "content": {
  9304. "application/json": {
  9305. "schema": {
  9306. "type": "array",
  9307. "items": {
  9308. "type": "object",
  9309. "properties": {
  9310. "type": {
  9311. "type": "string"
  9312. },
  9313. "name": {
  9314. "type": "string"
  9315. },
  9316. "description": {
  9317. "type": "string"
  9318. }
  9319. },
  9320. "required": ["type", "name", "description"],
  9321. "additionalProperties": false
  9322. },
  9323. "description": "Workspace adapters"
  9324. }
  9325. }
  9326. }
  9327. },
  9328. "400": {
  9329. "description": "Bad request",
  9330. "content": {
  9331. "application/json": {
  9332. "schema": {
  9333. "$ref": "#/components/schemas/BadRequestError"
  9334. }
  9335. }
  9336. }
  9337. }
  9338. },
  9339. "description": "List all available workspace adapters for the current project.",
  9340. "summary": "List workspace adapters",
  9341. "x-codeSamples": [
  9342. {
  9343. "lang": "js",
  9344. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  9345. }
  9346. ]
  9347. }
  9348. },
  9349. "/experimental/workspace": {
  9350. "get": {
  9351. "tags": ["workspace"],
  9352. "operationId": "experimental.workspace.list",
  9353. "parameters": [
  9354. {
  9355. "name": "directory",
  9356. "in": "query",
  9357. "schema": {
  9358. "type": "string"
  9359. },
  9360. "required": false
  9361. },
  9362. {
  9363. "name": "workspace",
  9364. "in": "query",
  9365. "schema": {
  9366. "type": "string"
  9367. },
  9368. "required": false
  9369. }
  9370. ],
  9371. "responses": {
  9372. "200": {
  9373. "description": "Workspaces",
  9374. "content": {
  9375. "application/json": {
  9376. "schema": {
  9377. "type": "array",
  9378. "items": {
  9379. "$ref": "#/components/schemas/Workspace"
  9380. },
  9381. "description": "Workspaces"
  9382. }
  9383. }
  9384. }
  9385. },
  9386. "400": {
  9387. "description": "Bad request",
  9388. "content": {
  9389. "application/json": {
  9390. "schema": {
  9391. "$ref": "#/components/schemas/BadRequestError"
  9392. }
  9393. }
  9394. }
  9395. }
  9396. },
  9397. "description": "List all workspaces.",
  9398. "summary": "List workspaces",
  9399. "x-codeSamples": [
  9400. {
  9401. "lang": "js",
  9402. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  9403. }
  9404. ]
  9405. },
  9406. "post": {
  9407. "tags": ["workspace"],
  9408. "operationId": "experimental.workspace.create",
  9409. "parameters": [
  9410. {
  9411. "name": "directory",
  9412. "in": "query",
  9413. "schema": {
  9414. "type": "string"
  9415. },
  9416. "required": false
  9417. },
  9418. {
  9419. "name": "workspace",
  9420. "in": "query",
  9421. "schema": {
  9422. "type": "string"
  9423. },
  9424. "required": false
  9425. }
  9426. ],
  9427. "responses": {
  9428. "200": {
  9429. "description": "Workspace created",
  9430. "content": {
  9431. "application/json": {
  9432. "schema": {
  9433. "$ref": "#/components/schemas/Workspace"
  9434. }
  9435. }
  9436. }
  9437. },
  9438. "400": {
  9439. "description": "WorkspaceCreateError | BadRequest | InvalidRequestError",
  9440. "content": {
  9441. "application/json": {
  9442. "schema": {
  9443. "anyOf": [
  9444. {
  9445. "$ref": "#/components/schemas/WorkspaceCreateError"
  9446. },
  9447. {
  9448. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9449. },
  9450. {
  9451. "$ref": "#/components/schemas/InvalidRequestError"
  9452. }
  9453. ]
  9454. }
  9455. }
  9456. }
  9457. }
  9458. },
  9459. "description": "Create a workspace for the current project.",
  9460. "summary": "Create workspace",
  9461. "requestBody": {
  9462. "content": {
  9463. "application/json": {
  9464. "schema": {
  9465. "type": "object",
  9466. "properties": {
  9467. "id": {
  9468. "type": "string",
  9469. "pattern": "^wrk"
  9470. },
  9471. "type": {
  9472. "type": "string"
  9473. },
  9474. "branch": {
  9475. "anyOf": [
  9476. {
  9477. "type": "string"
  9478. },
  9479. {
  9480. "type": "null"
  9481. }
  9482. ]
  9483. },
  9484. "extra": {
  9485. "anyOf": [
  9486. {},
  9487. {
  9488. "type": "null"
  9489. }
  9490. ]
  9491. }
  9492. },
  9493. "required": ["type"],
  9494. "additionalProperties": false
  9495. }
  9496. }
  9497. }
  9498. },
  9499. "x-codeSamples": [
  9500. {
  9501. "lang": "js",
  9502. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  9503. }
  9504. ]
  9505. }
  9506. },
  9507. "/experimental/workspace/sync-list": {
  9508. "post": {
  9509. "tags": ["workspace"],
  9510. "operationId": "experimental.workspace.syncList",
  9511. "parameters": [
  9512. {
  9513. "name": "directory",
  9514. "in": "query",
  9515. "schema": {
  9516. "type": "string"
  9517. },
  9518. "required": false
  9519. },
  9520. {
  9521. "name": "workspace",
  9522. "in": "query",
  9523. "schema": {
  9524. "type": "string"
  9525. },
  9526. "required": false
  9527. }
  9528. ],
  9529. "responses": {
  9530. "204": {
  9531. "description": "Workspace list synced"
  9532. },
  9533. "400": {
  9534. "description": "Bad request",
  9535. "content": {
  9536. "application/json": {
  9537. "schema": {
  9538. "$ref": "#/components/schemas/BadRequestError"
  9539. }
  9540. }
  9541. }
  9542. }
  9543. },
  9544. "description": "Register missing workspaces returned by workspace adapters.",
  9545. "summary": "Sync workspace list",
  9546. "x-codeSamples": [
  9547. {
  9548. "lang": "js",
  9549. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.syncList({\n ...\n})"
  9550. }
  9551. ]
  9552. }
  9553. },
  9554. "/experimental/workspace/status": {
  9555. "get": {
  9556. "tags": ["workspace"],
  9557. "operationId": "experimental.workspace.status",
  9558. "parameters": [
  9559. {
  9560. "name": "directory",
  9561. "in": "query",
  9562. "schema": {
  9563. "type": "string"
  9564. },
  9565. "required": false
  9566. },
  9567. {
  9568. "name": "workspace",
  9569. "in": "query",
  9570. "schema": {
  9571. "type": "string"
  9572. },
  9573. "required": false
  9574. }
  9575. ],
  9576. "responses": {
  9577. "200": {
  9578. "description": "Workspace status",
  9579. "content": {
  9580. "application/json": {
  9581. "schema": {
  9582. "type": "array",
  9583. "items": {
  9584. "$ref": "#/components/schemas/WorkspaceEventConnectionStatus"
  9585. },
  9586. "description": "Workspace status"
  9587. }
  9588. }
  9589. }
  9590. },
  9591. "400": {
  9592. "description": "Bad request",
  9593. "content": {
  9594. "application/json": {
  9595. "schema": {
  9596. "$ref": "#/components/schemas/BadRequestError"
  9597. }
  9598. }
  9599. }
  9600. }
  9601. },
  9602. "description": "Get connection status for workspaces in the current project.",
  9603. "summary": "Workspace status",
  9604. "x-codeSamples": [
  9605. {
  9606. "lang": "js",
  9607. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  9608. }
  9609. ]
  9610. }
  9611. },
  9612. "/experimental/workspace/{id}": {
  9613. "delete": {
  9614. "tags": ["workspace"],
  9615. "operationId": "experimental.workspace.remove",
  9616. "parameters": [
  9617. {
  9618. "name": "id",
  9619. "in": "path",
  9620. "schema": {
  9621. "type": "string",
  9622. "pattern": "^wrk"
  9623. },
  9624. "required": true
  9625. },
  9626. {
  9627. "name": "directory",
  9628. "in": "query",
  9629. "schema": {
  9630. "type": "string"
  9631. },
  9632. "required": false
  9633. },
  9634. {
  9635. "name": "workspace",
  9636. "in": "query",
  9637. "schema": {
  9638. "type": "string"
  9639. },
  9640. "required": false
  9641. }
  9642. ],
  9643. "responses": {
  9644. "200": {
  9645. "description": "Workspace removed",
  9646. "content": {
  9647. "application/json": {
  9648. "schema": {
  9649. "$ref": "#/components/schemas/Workspace"
  9650. }
  9651. }
  9652. }
  9653. },
  9654. "400": {
  9655. "description": "BadRequest | InvalidRequestError",
  9656. "content": {
  9657. "application/json": {
  9658. "schema": {
  9659. "anyOf": [
  9660. {
  9661. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9662. },
  9663. {
  9664. "$ref": "#/components/schemas/InvalidRequestError"
  9665. }
  9666. ]
  9667. }
  9668. }
  9669. }
  9670. }
  9671. },
  9672. "description": "Remove an existing workspace.",
  9673. "summary": "Remove workspace",
  9674. "x-codeSamples": [
  9675. {
  9676. "lang": "js",
  9677. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  9678. }
  9679. ]
  9680. }
  9681. },
  9682. "/experimental/workspace/warp": {
  9683. "post": {
  9684. "tags": ["workspace"],
  9685. "operationId": "experimental.workspace.warp",
  9686. "parameters": [
  9687. {
  9688. "name": "directory",
  9689. "in": "query",
  9690. "schema": {
  9691. "type": "string"
  9692. },
  9693. "required": false
  9694. },
  9695. {
  9696. "name": "workspace",
  9697. "in": "query",
  9698. "schema": {
  9699. "type": "string"
  9700. },
  9701. "required": false
  9702. }
  9703. ],
  9704. "responses": {
  9705. "204": {
  9706. "description": "Session warped"
  9707. },
  9708. "400": {
  9709. "description": "WorkspaceWarpError | VcsApplyError | InvalidRequestError",
  9710. "content": {
  9711. "application/json": {
  9712. "schema": {
  9713. "anyOf": [
  9714. {
  9715. "$ref": "#/components/schemas/WorkspaceWarpError"
  9716. },
  9717. {
  9718. "$ref": "#/components/schemas/VcsApplyError"
  9719. },
  9720. {
  9721. "$ref": "#/components/schemas/InvalidRequestError"
  9722. }
  9723. ]
  9724. }
  9725. }
  9726. }
  9727. },
  9728. "404": {
  9729. "description": "NotFoundError",
  9730. "content": {
  9731. "application/json": {
  9732. "schema": {
  9733. "$ref": "#/components/schemas/NotFoundError"
  9734. }
  9735. }
  9736. }
  9737. }
  9738. },
  9739. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  9740. "summary": "Warp session into workspace",
  9741. "requestBody": {
  9742. "content": {
  9743. "application/json": {
  9744. "schema": {
  9745. "type": "object",
  9746. "properties": {
  9747. "id": {
  9748. "anyOf": [
  9749. {
  9750. "type": "string",
  9751. "pattern": "^wrk"
  9752. },
  9753. {
  9754. "type": "null"
  9755. }
  9756. ]
  9757. },
  9758. "sessionID": {
  9759. "type": "string",
  9760. "pattern": "^ses"
  9761. },
  9762. "copyChanges": {
  9763. "type": "boolean"
  9764. }
  9765. },
  9766. "required": ["id", "sessionID"],
  9767. "additionalProperties": false
  9768. }
  9769. }
  9770. }
  9771. },
  9772. "x-codeSamples": [
  9773. {
  9774. "lang": "js",
  9775. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  9776. }
  9777. ]
  9778. }
  9779. },
  9780. "/api/health": {
  9781. "get": {
  9782. "tags": ["opencode HttpApi"],
  9783. "operationId": "v2.health.get",
  9784. "parameters": [],
  9785. "security": [],
  9786. "responses": {
  9787. "200": {
  9788. "description": "Success",
  9789. "content": {
  9790. "application/json": {
  9791. "schema": {
  9792. "type": "object",
  9793. "properties": {
  9794. "healthy": {
  9795. "type": "boolean",
  9796. "enum": [true]
  9797. }
  9798. },
  9799. "required": ["healthy"],
  9800. "additionalProperties": false
  9801. }
  9802. }
  9803. }
  9804. },
  9805. "400": {
  9806. "description": "InvalidRequestError",
  9807. "content": {
  9808. "application/json": {
  9809. "schema": {
  9810. "$ref": "#/components/schemas/InvalidRequestError"
  9811. }
  9812. }
  9813. }
  9814. },
  9815. "401": {
  9816. "description": "UnauthorizedError",
  9817. "content": {
  9818. "application/json": {
  9819. "schema": {
  9820. "$ref": "#/components/schemas/UnauthorizedError"
  9821. }
  9822. }
  9823. }
  9824. }
  9825. },
  9826. "description": "Check whether the API server is ready to accept requests.",
  9827. "summary": "Check server health",
  9828. "x-codeSamples": [
  9829. {
  9830. "lang": "js",
  9831. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.health.get({\n ...\n})"
  9832. }
  9833. ]
  9834. }
  9835. },
  9836. "/api/location": {
  9837. "get": {
  9838. "tags": ["opencode HttpApi"],
  9839. "operationId": "v2.location.get",
  9840. "parameters": [
  9841. {
  9842. "name": "location",
  9843. "in": "query",
  9844. "schema": {
  9845. "type": "object",
  9846. "properties": {
  9847. "directory": {
  9848. "type": "string"
  9849. },
  9850. "workspace": {
  9851. "type": "string"
  9852. }
  9853. },
  9854. "additionalProperties": false
  9855. },
  9856. "required": false,
  9857. "style": "deepObject",
  9858. "explode": true
  9859. }
  9860. ],
  9861. "security": [],
  9862. "responses": {
  9863. "200": {
  9864. "description": "Location.Info",
  9865. "content": {
  9866. "application/json": {
  9867. "schema": {
  9868. "$ref": "#/components/schemas/LocationInfo"
  9869. }
  9870. }
  9871. }
  9872. },
  9873. "400": {
  9874. "description": "InvalidRequestError",
  9875. "content": {
  9876. "application/json": {
  9877. "schema": {
  9878. "$ref": "#/components/schemas/InvalidRequestError"
  9879. }
  9880. }
  9881. }
  9882. },
  9883. "401": {
  9884. "description": "UnauthorizedError",
  9885. "content": {
  9886. "application/json": {
  9887. "schema": {
  9888. "$ref": "#/components/schemas/UnauthorizedError"
  9889. }
  9890. }
  9891. }
  9892. }
  9893. },
  9894. "description": "Resolve the requested location or the server default location.",
  9895. "summary": "Get location",
  9896. "x-codeSamples": [
  9897. {
  9898. "lang": "js",
  9899. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.location.get({\n ...\n})"
  9900. }
  9901. ]
  9902. }
  9903. },
  9904. "/api/agent": {
  9905. "get": {
  9906. "tags": ["opencode HttpApi"],
  9907. "operationId": "v2.agent.list",
  9908. "parameters": [
  9909. {
  9910. "name": "location",
  9911. "in": "query",
  9912. "schema": {
  9913. "type": "object",
  9914. "properties": {
  9915. "directory": {
  9916. "type": "string"
  9917. },
  9918. "workspace": {
  9919. "type": "string"
  9920. }
  9921. },
  9922. "additionalProperties": false
  9923. },
  9924. "required": false,
  9925. "style": "deepObject",
  9926. "explode": true
  9927. }
  9928. ],
  9929. "security": [],
  9930. "responses": {
  9931. "200": {
  9932. "description": "Success",
  9933. "content": {
  9934. "application/json": {
  9935. "schema": {
  9936. "type": "object",
  9937. "properties": {
  9938. "location": {
  9939. "$ref": "#/components/schemas/LocationInfo"
  9940. },
  9941. "data": {
  9942. "type": "array",
  9943. "items": {
  9944. "$ref": "#/components/schemas/AgentV2Info"
  9945. }
  9946. }
  9947. },
  9948. "required": ["location", "data"],
  9949. "additionalProperties": false
  9950. }
  9951. }
  9952. }
  9953. },
  9954. "400": {
  9955. "description": "InvalidRequestError",
  9956. "content": {
  9957. "application/json": {
  9958. "schema": {
  9959. "$ref": "#/components/schemas/InvalidRequestError"
  9960. }
  9961. }
  9962. }
  9963. },
  9964. "401": {
  9965. "description": "UnauthorizedError",
  9966. "content": {
  9967. "application/json": {
  9968. "schema": {
  9969. "$ref": "#/components/schemas/UnauthorizedError"
  9970. }
  9971. }
  9972. }
  9973. }
  9974. },
  9975. "description": "Retrieve currently registered agents.",
  9976. "summary": "List agents",
  9977. "x-codeSamples": [
  9978. {
  9979. "lang": "js",
  9980. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.agent.list({\n ...\n})"
  9981. }
  9982. ]
  9983. }
  9984. },
  9985. "/api/session": {
  9986. "get": {
  9987. "tags": ["sessions"],
  9988. "operationId": "v2.session.list",
  9989. "parameters": [
  9990. {
  9991. "name": "workspace",
  9992. "in": "query",
  9993. "schema": {
  9994. "type": "string",
  9995. "pattern": "^wrk"
  9996. },
  9997. "required": false
  9998. },
  9999. {
  10000. "name": "limit",
  10001. "in": "query",
  10002. "schema": {
  10003. "type": "number"
  10004. },
  10005. "required": false
  10006. },
  10007. {
  10008. "name": "order",
  10009. "in": "query",
  10010. "schema": {
  10011. "type": "string",
  10012. "enum": ["asc", "desc"]
  10013. },
  10014. "required": false
  10015. },
  10016. {
  10017. "name": "search",
  10018. "in": "query",
  10019. "schema": {
  10020. "type": "string"
  10021. },
  10022. "required": false
  10023. },
  10024. {
  10025. "name": "directory",
  10026. "in": "query",
  10027. "schema": {
  10028. "type": "string"
  10029. },
  10030. "required": false
  10031. },
  10032. {
  10033. "name": "project",
  10034. "in": "query",
  10035. "schema": {
  10036. "type": "string"
  10037. },
  10038. "required": false
  10039. },
  10040. {
  10041. "name": "subpath",
  10042. "in": "query",
  10043. "schema": {
  10044. "type": "string"
  10045. },
  10046. "required": false
  10047. },
  10048. {
  10049. "name": "cursor",
  10050. "in": "query",
  10051. "schema": {
  10052. "type": "string",
  10053. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response."
  10054. },
  10055. "required": false
  10056. }
  10057. ],
  10058. "security": [],
  10059. "responses": {
  10060. "200": {
  10061. "description": "SessionsResponse",
  10062. "content": {
  10063. "application/json": {
  10064. "schema": {
  10065. "$ref": "#/components/schemas/SessionsResponse"
  10066. }
  10067. }
  10068. }
  10069. },
  10070. "400": {
  10071. "description": "InvalidCursorError | InvalidRequestError",
  10072. "content": {
  10073. "application/json": {
  10074. "schema": {
  10075. "anyOf": [
  10076. {
  10077. "$ref": "#/components/schemas/InvalidCursorError"
  10078. },
  10079. {
  10080. "$ref": "#/components/schemas/InvalidRequestError"
  10081. },
  10082. {
  10083. "$ref": "#/components/schemas/InvalidRequestError"
  10084. }
  10085. ]
  10086. }
  10087. }
  10088. }
  10089. },
  10090. "401": {
  10091. "description": "UnauthorizedError",
  10092. "content": {
  10093. "application/json": {
  10094. "schema": {
  10095. "$ref": "#/components/schemas/UnauthorizedError"
  10096. }
  10097. }
  10098. }
  10099. }
  10100. },
  10101. "description": "Retrieve sessions in the requested order. Items keep that order across pages; use cursor.next or cursor.previous to move through the ordered list.",
  10102. "summary": "List sessions",
  10103. "x-codeSamples": [
  10104. {
  10105. "lang": "js",
  10106. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  10107. }
  10108. ]
  10109. },
  10110. "post": {
  10111. "tags": ["sessions"],
  10112. "operationId": "v2.session.create",
  10113. "parameters": [],
  10114. "security": [],
  10115. "responses": {
  10116. "200": {
  10117. "description": "Success",
  10118. "content": {
  10119. "application/json": {
  10120. "schema": {
  10121. "type": "object",
  10122. "properties": {
  10123. "data": {
  10124. "$ref": "#/components/schemas/SessionV2Info"
  10125. }
  10126. },
  10127. "required": ["data"],
  10128. "additionalProperties": false
  10129. }
  10130. }
  10131. }
  10132. },
  10133. "400": {
  10134. "description": "InvalidRequestError",
  10135. "content": {
  10136. "application/json": {
  10137. "schema": {
  10138. "$ref": "#/components/schemas/InvalidRequestError"
  10139. }
  10140. }
  10141. }
  10142. },
  10143. "401": {
  10144. "description": "UnauthorizedError",
  10145. "content": {
  10146. "application/json": {
  10147. "schema": {
  10148. "$ref": "#/components/schemas/UnauthorizedError"
  10149. }
  10150. }
  10151. }
  10152. }
  10153. },
  10154. "description": "Create a session at the requested location.",
  10155. "summary": "Create session",
  10156. "requestBody": {
  10157. "content": {
  10158. "application/json": {
  10159. "schema": {
  10160. "type": "object",
  10161. "properties": {
  10162. "id": {
  10163. "type": "string",
  10164. "pattern": "^ses"
  10165. },
  10166. "agent": {
  10167. "type": "string"
  10168. },
  10169. "model": {
  10170. "$ref": "#/components/schemas/ModelRef"
  10171. },
  10172. "location": {
  10173. "$ref": "#/components/schemas/LocationRef"
  10174. }
  10175. },
  10176. "additionalProperties": false
  10177. }
  10178. }
  10179. },
  10180. "required": true
  10181. },
  10182. "x-codeSamples": [
  10183. {
  10184. "lang": "js",
  10185. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.create({\n ...\n})"
  10186. }
  10187. ]
  10188. }
  10189. },
  10190. "/api/session/active": {
  10191. "get": {
  10192. "tags": ["sessions"],
  10193. "operationId": "v2.session.active",
  10194. "parameters": [],
  10195. "security": [],
  10196. "responses": {
  10197. "200": {
  10198. "description": "Success",
  10199. "content": {
  10200. "application/json": {
  10201. "schema": {
  10202. "type": "object",
  10203. "properties": {
  10204. "data": {
  10205. "type": "object",
  10206. "patternProperties": {
  10207. "^ses": {
  10208. "$ref": "#/components/schemas/SessionActive"
  10209. }
  10210. }
  10211. }
  10212. },
  10213. "required": ["data"],
  10214. "additionalProperties": false
  10215. }
  10216. }
  10217. }
  10218. },
  10219. "400": {
  10220. "description": "InvalidRequestError",
  10221. "content": {
  10222. "application/json": {
  10223. "schema": {
  10224. "$ref": "#/components/schemas/InvalidRequestError"
  10225. }
  10226. }
  10227. }
  10228. },
  10229. "401": {
  10230. "description": "UnauthorizedError",
  10231. "content": {
  10232. "application/json": {
  10233. "schema": {
  10234. "$ref": "#/components/schemas/UnauthorizedError"
  10235. }
  10236. }
  10237. }
  10238. }
  10239. },
  10240. "description": "Retrieve foreground Session drains currently owned by this OpenCode process. Sessions absent from the result are inactive.",
  10241. "summary": "List active sessions",
  10242. "x-codeSamples": [
  10243. {
  10244. "lang": "js",
  10245. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.active({\n ...\n})"
  10246. }
  10247. ]
  10248. }
  10249. },
  10250. "/api/session/{sessionID}": {
  10251. "get": {
  10252. "tags": ["sessions"],
  10253. "operationId": "v2.session.get",
  10254. "parameters": [
  10255. {
  10256. "name": "sessionID",
  10257. "in": "path",
  10258. "schema": {
  10259. "type": "string",
  10260. "pattern": "^ses"
  10261. },
  10262. "required": true
  10263. }
  10264. ],
  10265. "security": [],
  10266. "responses": {
  10267. "200": {
  10268. "description": "Success",
  10269. "content": {
  10270. "application/json": {
  10271. "schema": {
  10272. "type": "object",
  10273. "properties": {
  10274. "data": {
  10275. "$ref": "#/components/schemas/SessionV2Info"
  10276. }
  10277. },
  10278. "required": ["data"],
  10279. "additionalProperties": false
  10280. }
  10281. }
  10282. }
  10283. },
  10284. "400": {
  10285. "description": "InvalidRequestError",
  10286. "content": {
  10287. "application/json": {
  10288. "schema": {
  10289. "$ref": "#/components/schemas/InvalidRequestError"
  10290. }
  10291. }
  10292. }
  10293. },
  10294. "401": {
  10295. "description": "UnauthorizedError",
  10296. "content": {
  10297. "application/json": {
  10298. "schema": {
  10299. "$ref": "#/components/schemas/UnauthorizedError"
  10300. }
  10301. }
  10302. }
  10303. },
  10304. "404": {
  10305. "description": "SessionNotFoundError",
  10306. "content": {
  10307. "application/json": {
  10308. "schema": {
  10309. "anyOf": [
  10310. {
  10311. "$ref": "#/components/schemas/SessionNotFoundError"
  10312. },
  10313. {
  10314. "$ref": "#/components/schemas/SessionNotFoundError"
  10315. }
  10316. ]
  10317. }
  10318. }
  10319. }
  10320. }
  10321. },
  10322. "description": "Retrieve a session by ID.",
  10323. "summary": "Get session",
  10324. "x-codeSamples": [
  10325. {
  10326. "lang": "js",
  10327. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.get({\n ...\n})"
  10328. }
  10329. ]
  10330. }
  10331. },
  10332. "/api/session/{sessionID}/agent": {
  10333. "post": {
  10334. "tags": ["sessions"],
  10335. "operationId": "v2.session.switchAgent",
  10336. "parameters": [
  10337. {
  10338. "name": "sessionID",
  10339. "in": "path",
  10340. "schema": {
  10341. "type": "string",
  10342. "pattern": "^ses"
  10343. },
  10344. "required": true
  10345. }
  10346. ],
  10347. "security": [],
  10348. "responses": {
  10349. "204": {
  10350. "description": "<No Content>"
  10351. },
  10352. "400": {
  10353. "description": "InvalidRequestError",
  10354. "content": {
  10355. "application/json": {
  10356. "schema": {
  10357. "$ref": "#/components/schemas/InvalidRequestError"
  10358. }
  10359. }
  10360. }
  10361. },
  10362. "401": {
  10363. "description": "UnauthorizedError",
  10364. "content": {
  10365. "application/json": {
  10366. "schema": {
  10367. "$ref": "#/components/schemas/UnauthorizedError"
  10368. }
  10369. }
  10370. }
  10371. },
  10372. "404": {
  10373. "description": "SessionNotFoundError",
  10374. "content": {
  10375. "application/json": {
  10376. "schema": {
  10377. "anyOf": [
  10378. {
  10379. "$ref": "#/components/schemas/SessionNotFoundError"
  10380. },
  10381. {
  10382. "$ref": "#/components/schemas/SessionNotFoundError"
  10383. }
  10384. ]
  10385. }
  10386. }
  10387. }
  10388. }
  10389. },
  10390. "description": "Switch the agent used by subsequent provider turns.",
  10391. "summary": "Switch session agent",
  10392. "requestBody": {
  10393. "content": {
  10394. "application/json": {
  10395. "schema": {
  10396. "type": "object",
  10397. "properties": {
  10398. "agent": {
  10399. "type": "string"
  10400. }
  10401. },
  10402. "required": ["agent"],
  10403. "additionalProperties": false
  10404. }
  10405. }
  10406. },
  10407. "required": true
  10408. },
  10409. "x-codeSamples": [
  10410. {
  10411. "lang": "js",
  10412. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.switchAgent({\n ...\n})"
  10413. }
  10414. ]
  10415. }
  10416. },
  10417. "/api/session/{sessionID}/model": {
  10418. "post": {
  10419. "tags": ["sessions"],
  10420. "operationId": "v2.session.switchModel",
  10421. "parameters": [
  10422. {
  10423. "name": "sessionID",
  10424. "in": "path",
  10425. "schema": {
  10426. "type": "string",
  10427. "pattern": "^ses"
  10428. },
  10429. "required": true
  10430. }
  10431. ],
  10432. "security": [],
  10433. "responses": {
  10434. "204": {
  10435. "description": "<No Content>"
  10436. },
  10437. "400": {
  10438. "description": "InvalidRequestError",
  10439. "content": {
  10440. "application/json": {
  10441. "schema": {
  10442. "$ref": "#/components/schemas/InvalidRequestError"
  10443. }
  10444. }
  10445. }
  10446. },
  10447. "401": {
  10448. "description": "UnauthorizedError",
  10449. "content": {
  10450. "application/json": {
  10451. "schema": {
  10452. "$ref": "#/components/schemas/UnauthorizedError"
  10453. }
  10454. }
  10455. }
  10456. },
  10457. "404": {
  10458. "description": "SessionNotFoundError",
  10459. "content": {
  10460. "application/json": {
  10461. "schema": {
  10462. "anyOf": [
  10463. {
  10464. "$ref": "#/components/schemas/SessionNotFoundError"
  10465. },
  10466. {
  10467. "$ref": "#/components/schemas/SessionNotFoundError"
  10468. }
  10469. ]
  10470. }
  10471. }
  10472. }
  10473. }
  10474. },
  10475. "description": "Switch the model used by subsequent provider turns.",
  10476. "summary": "Switch session model",
  10477. "requestBody": {
  10478. "content": {
  10479. "application/json": {
  10480. "schema": {
  10481. "type": "object",
  10482. "properties": {
  10483. "model": {
  10484. "$ref": "#/components/schemas/ModelRef"
  10485. }
  10486. },
  10487. "required": ["model"],
  10488. "additionalProperties": false
  10489. }
  10490. }
  10491. },
  10492. "required": true
  10493. },
  10494. "x-codeSamples": [
  10495. {
  10496. "lang": "js",
  10497. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.switchModel({\n ...\n})"
  10498. }
  10499. ]
  10500. }
  10501. },
  10502. "/api/session/{sessionID}/prompt": {
  10503. "post": {
  10504. "tags": ["sessions"],
  10505. "operationId": "v2.session.prompt",
  10506. "parameters": [
  10507. {
  10508. "name": "sessionID",
  10509. "in": "path",
  10510. "schema": {
  10511. "type": "string",
  10512. "pattern": "^ses"
  10513. },
  10514. "required": true
  10515. }
  10516. ],
  10517. "security": [],
  10518. "responses": {
  10519. "200": {
  10520. "description": "Success",
  10521. "content": {
  10522. "application/json": {
  10523. "schema": {
  10524. "type": "object",
  10525. "properties": {
  10526. "data": {
  10527. "$ref": "#/components/schemas/SessionInputAdmitted"
  10528. }
  10529. },
  10530. "required": ["data"],
  10531. "additionalProperties": false
  10532. }
  10533. }
  10534. }
  10535. },
  10536. "400": {
  10537. "description": "InvalidRequestError",
  10538. "content": {
  10539. "application/json": {
  10540. "schema": {
  10541. "$ref": "#/components/schemas/InvalidRequestError"
  10542. }
  10543. }
  10544. }
  10545. },
  10546. "401": {
  10547. "description": "UnauthorizedError",
  10548. "content": {
  10549. "application/json": {
  10550. "schema": {
  10551. "$ref": "#/components/schemas/UnauthorizedError"
  10552. }
  10553. }
  10554. }
  10555. },
  10556. "404": {
  10557. "description": "SessionNotFoundError",
  10558. "content": {
  10559. "application/json": {
  10560. "schema": {
  10561. "anyOf": [
  10562. {
  10563. "$ref": "#/components/schemas/SessionNotFoundError"
  10564. },
  10565. {
  10566. "$ref": "#/components/schemas/SessionNotFoundError"
  10567. }
  10568. ]
  10569. }
  10570. }
  10571. }
  10572. },
  10573. "409": {
  10574. "description": "ConflictError",
  10575. "content": {
  10576. "application/json": {
  10577. "schema": {
  10578. "$ref": "#/components/schemas/ConflictError"
  10579. }
  10580. }
  10581. }
  10582. }
  10583. },
  10584. "description": "Durably admit one session input and schedule agent-loop execution unless resume is false.",
  10585. "summary": "Send message",
  10586. "requestBody": {
  10587. "content": {
  10588. "application/json": {
  10589. "schema": {
  10590. "type": "object",
  10591. "properties": {
  10592. "id": {
  10593. "type": "string",
  10594. "pattern": "^msg_"
  10595. },
  10596. "prompt": {
  10597. "$ref": "#/components/schemas/PromptInput"
  10598. },
  10599. "delivery": {
  10600. "type": "string",
  10601. "enum": ["steer", "queue"]
  10602. },
  10603. "resume": {
  10604. "type": "boolean"
  10605. }
  10606. },
  10607. "required": ["prompt"],
  10608. "additionalProperties": false
  10609. }
  10610. }
  10611. },
  10612. "required": true
  10613. },
  10614. "x-codeSamples": [
  10615. {
  10616. "lang": "js",
  10617. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  10618. }
  10619. ]
  10620. }
  10621. },
  10622. "/api/session/{sessionID}/compact": {
  10623. "post": {
  10624. "tags": ["sessions"],
  10625. "operationId": "v2.session.compact",
  10626. "parameters": [
  10627. {
  10628. "name": "sessionID",
  10629. "in": "path",
  10630. "schema": {
  10631. "type": "string",
  10632. "pattern": "^ses"
  10633. },
  10634. "required": true
  10635. }
  10636. ],
  10637. "security": [],
  10638. "responses": {
  10639. "204": {
  10640. "description": "<No Content>"
  10641. },
  10642. "400": {
  10643. "description": "InvalidRequestError",
  10644. "content": {
  10645. "application/json": {
  10646. "schema": {
  10647. "$ref": "#/components/schemas/InvalidRequestError"
  10648. }
  10649. }
  10650. }
  10651. },
  10652. "401": {
  10653. "description": "UnauthorizedError",
  10654. "content": {
  10655. "application/json": {
  10656. "schema": {
  10657. "$ref": "#/components/schemas/UnauthorizedError"
  10658. }
  10659. }
  10660. }
  10661. },
  10662. "404": {
  10663. "description": "SessionNotFoundError",
  10664. "content": {
  10665. "application/json": {
  10666. "schema": {
  10667. "anyOf": [
  10668. {
  10669. "$ref": "#/components/schemas/SessionNotFoundError"
  10670. },
  10671. {
  10672. "$ref": "#/components/schemas/SessionNotFoundError"
  10673. }
  10674. ]
  10675. }
  10676. }
  10677. }
  10678. },
  10679. "503": {
  10680. "description": "ServiceUnavailableError",
  10681. "content": {
  10682. "application/json": {
  10683. "schema": {
  10684. "$ref": "#/components/schemas/ServiceUnavailableError"
  10685. }
  10686. }
  10687. }
  10688. }
  10689. },
  10690. "description": "Compact a session conversation.",
  10691. "summary": "Compact session",
  10692. "x-codeSamples": [
  10693. {
  10694. "lang": "js",
  10695. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  10696. }
  10697. ]
  10698. }
  10699. },
  10700. "/api/session/{sessionID}/wait": {
  10701. "post": {
  10702. "tags": ["sessions"],
  10703. "operationId": "v2.session.wait",
  10704. "parameters": [
  10705. {
  10706. "name": "sessionID",
  10707. "in": "path",
  10708. "schema": {
  10709. "type": "string",
  10710. "pattern": "^ses"
  10711. },
  10712. "required": true
  10713. }
  10714. ],
  10715. "security": [],
  10716. "responses": {
  10717. "204": {
  10718. "description": "<No Content>"
  10719. },
  10720. "400": {
  10721. "description": "InvalidRequestError",
  10722. "content": {
  10723. "application/json": {
  10724. "schema": {
  10725. "$ref": "#/components/schemas/InvalidRequestError"
  10726. }
  10727. }
  10728. }
  10729. },
  10730. "401": {
  10731. "description": "UnauthorizedError",
  10732. "content": {
  10733. "application/json": {
  10734. "schema": {
  10735. "$ref": "#/components/schemas/UnauthorizedError"
  10736. }
  10737. }
  10738. }
  10739. },
  10740. "404": {
  10741. "description": "SessionNotFoundError",
  10742. "content": {
  10743. "application/json": {
  10744. "schema": {
  10745. "anyOf": [
  10746. {
  10747. "$ref": "#/components/schemas/SessionNotFoundError"
  10748. },
  10749. {
  10750. "$ref": "#/components/schemas/SessionNotFoundError"
  10751. }
  10752. ]
  10753. }
  10754. }
  10755. }
  10756. },
  10757. "503": {
  10758. "description": "ServiceUnavailableError",
  10759. "content": {
  10760. "application/json": {
  10761. "schema": {
  10762. "$ref": "#/components/schemas/ServiceUnavailableError"
  10763. }
  10764. }
  10765. }
  10766. }
  10767. },
  10768. "description": "Wait for a session agent loop to become idle.",
  10769. "summary": "Wait for session",
  10770. "x-codeSamples": [
  10771. {
  10772. "lang": "js",
  10773. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  10774. }
  10775. ]
  10776. }
  10777. },
  10778. "/api/session/{sessionID}/revert/stage": {
  10779. "post": {
  10780. "tags": ["sessions"],
  10781. "operationId": "v2.session.revert.stage",
  10782. "parameters": [
  10783. {
  10784. "name": "sessionID",
  10785. "in": "path",
  10786. "schema": {
  10787. "type": "string",
  10788. "pattern": "^ses"
  10789. },
  10790. "required": true
  10791. }
  10792. ],
  10793. "security": [],
  10794. "responses": {
  10795. "200": {
  10796. "description": "Success",
  10797. "content": {
  10798. "application/json": {
  10799. "schema": {
  10800. "type": "object",
  10801. "properties": {
  10802. "data": {
  10803. "$ref": "#/components/schemas/RevertState"
  10804. }
  10805. },
  10806. "required": ["data"],
  10807. "additionalProperties": false
  10808. }
  10809. }
  10810. }
  10811. },
  10812. "400": {
  10813. "description": "InvalidRequestError",
  10814. "content": {
  10815. "application/json": {
  10816. "schema": {
  10817. "$ref": "#/components/schemas/InvalidRequestError"
  10818. }
  10819. }
  10820. }
  10821. },
  10822. "401": {
  10823. "description": "UnauthorizedError",
  10824. "content": {
  10825. "application/json": {
  10826. "schema": {
  10827. "$ref": "#/components/schemas/UnauthorizedError"
  10828. }
  10829. }
  10830. }
  10831. },
  10832. "404": {
  10833. "description": "MessageNotFoundError | SessionNotFoundError",
  10834. "content": {
  10835. "application/json": {
  10836. "schema": {
  10837. "anyOf": [
  10838. {
  10839. "$ref": "#/components/schemas/MessageNotFoundError"
  10840. },
  10841. {
  10842. "$ref": "#/components/schemas/SessionNotFoundError"
  10843. },
  10844. {
  10845. "$ref": "#/components/schemas/SessionNotFoundError"
  10846. }
  10847. ]
  10848. }
  10849. }
  10850. }
  10851. },
  10852. "500": {
  10853. "description": "UnknownError",
  10854. "content": {
  10855. "application/json": {
  10856. "schema": {
  10857. "$ref": "#/components/schemas/UnknownError1"
  10858. }
  10859. }
  10860. }
  10861. }
  10862. },
  10863. "description": "Stage or move a reversible session boundary and optionally apply its file changes.",
  10864. "summary": "Stage session revert",
  10865. "requestBody": {
  10866. "content": {
  10867. "application/json": {
  10868. "schema": {
  10869. "type": "object",
  10870. "properties": {
  10871. "messageID": {
  10872. "type": "string",
  10873. "pattern": "^msg_"
  10874. },
  10875. "files": {
  10876. "type": "boolean"
  10877. }
  10878. },
  10879. "required": ["messageID"],
  10880. "additionalProperties": false
  10881. }
  10882. }
  10883. },
  10884. "required": true
  10885. },
  10886. "x-codeSamples": [
  10887. {
  10888. "lang": "js",
  10889. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.revert.stage({\n ...\n})"
  10890. }
  10891. ]
  10892. }
  10893. },
  10894. "/api/session/{sessionID}/revert/clear": {
  10895. "post": {
  10896. "tags": ["sessions"],
  10897. "operationId": "v2.session.revert.clear",
  10898. "parameters": [
  10899. {
  10900. "name": "sessionID",
  10901. "in": "path",
  10902. "schema": {
  10903. "type": "string",
  10904. "pattern": "^ses"
  10905. },
  10906. "required": true
  10907. }
  10908. ],
  10909. "security": [],
  10910. "responses": {
  10911. "204": {
  10912. "description": "<No Content>"
  10913. },
  10914. "400": {
  10915. "description": "InvalidRequestError",
  10916. "content": {
  10917. "application/json": {
  10918. "schema": {
  10919. "$ref": "#/components/schemas/InvalidRequestError"
  10920. }
  10921. }
  10922. }
  10923. },
  10924. "401": {
  10925. "description": "UnauthorizedError",
  10926. "content": {
  10927. "application/json": {
  10928. "schema": {
  10929. "$ref": "#/components/schemas/UnauthorizedError"
  10930. }
  10931. }
  10932. }
  10933. },
  10934. "404": {
  10935. "description": "SessionNotFoundError",
  10936. "content": {
  10937. "application/json": {
  10938. "schema": {
  10939. "anyOf": [
  10940. {
  10941. "$ref": "#/components/schemas/SessionNotFoundError"
  10942. },
  10943. {
  10944. "$ref": "#/components/schemas/SessionNotFoundError"
  10945. }
  10946. ]
  10947. }
  10948. }
  10949. }
  10950. },
  10951. "500": {
  10952. "description": "UnknownError",
  10953. "content": {
  10954. "application/json": {
  10955. "schema": {
  10956. "$ref": "#/components/schemas/UnknownError1"
  10957. }
  10958. }
  10959. }
  10960. }
  10961. },
  10962. "summary": "Clear staged revert",
  10963. "x-codeSamples": [
  10964. {
  10965. "lang": "js",
  10966. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.revert.clear({\n ...\n})"
  10967. }
  10968. ]
  10969. }
  10970. },
  10971. "/api/session/{sessionID}/revert/commit": {
  10972. "post": {
  10973. "tags": ["sessions"],
  10974. "operationId": "v2.session.revert.commit",
  10975. "parameters": [
  10976. {
  10977. "name": "sessionID",
  10978. "in": "path",
  10979. "schema": {
  10980. "type": "string",
  10981. "pattern": "^ses"
  10982. },
  10983. "required": true
  10984. }
  10985. ],
  10986. "security": [],
  10987. "responses": {
  10988. "204": {
  10989. "description": "<No Content>"
  10990. },
  10991. "400": {
  10992. "description": "InvalidRequestError",
  10993. "content": {
  10994. "application/json": {
  10995. "schema": {
  10996. "$ref": "#/components/schemas/InvalidRequestError"
  10997. }
  10998. }
  10999. }
  11000. },
  11001. "401": {
  11002. "description": "UnauthorizedError",
  11003. "content": {
  11004. "application/json": {
  11005. "schema": {
  11006. "$ref": "#/components/schemas/UnauthorizedError"
  11007. }
  11008. }
  11009. }
  11010. },
  11011. "404": {
  11012. "description": "SessionNotFoundError",
  11013. "content": {
  11014. "application/json": {
  11015. "schema": {
  11016. "anyOf": [
  11017. {
  11018. "$ref": "#/components/schemas/SessionNotFoundError"
  11019. },
  11020. {
  11021. "$ref": "#/components/schemas/SessionNotFoundError"
  11022. }
  11023. ]
  11024. }
  11025. }
  11026. }
  11027. }
  11028. },
  11029. "summary": "Commit staged revert",
  11030. "x-codeSamples": [
  11031. {
  11032. "lang": "js",
  11033. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.revert.commit({\n ...\n})"
  11034. }
  11035. ]
  11036. }
  11037. },
  11038. "/api/session/{sessionID}/context": {
  11039. "get": {
  11040. "tags": ["sessions"],
  11041. "operationId": "v2.session.context",
  11042. "parameters": [
  11043. {
  11044. "name": "sessionID",
  11045. "in": "path",
  11046. "schema": {
  11047. "type": "string",
  11048. "pattern": "^ses"
  11049. },
  11050. "required": true
  11051. }
  11052. ],
  11053. "security": [],
  11054. "responses": {
  11055. "200": {
  11056. "description": "Success",
  11057. "content": {
  11058. "application/json": {
  11059. "schema": {
  11060. "type": "object",
  11061. "properties": {
  11062. "data": {
  11063. "type": "array",
  11064. "items": {
  11065. "$ref": "#/components/schemas/SessionMessage"
  11066. }
  11067. }
  11068. },
  11069. "required": ["data"],
  11070. "additionalProperties": false
  11071. }
  11072. }
  11073. }
  11074. },
  11075. "400": {
  11076. "description": "InvalidRequestError",
  11077. "content": {
  11078. "application/json": {
  11079. "schema": {
  11080. "$ref": "#/components/schemas/InvalidRequestError"
  11081. }
  11082. }
  11083. }
  11084. },
  11085. "401": {
  11086. "description": "UnauthorizedError",
  11087. "content": {
  11088. "application/json": {
  11089. "schema": {
  11090. "$ref": "#/components/schemas/UnauthorizedError"
  11091. }
  11092. }
  11093. }
  11094. },
  11095. "404": {
  11096. "description": "SessionNotFoundError",
  11097. "content": {
  11098. "application/json": {
  11099. "schema": {
  11100. "anyOf": [
  11101. {
  11102. "$ref": "#/components/schemas/SessionNotFoundError"
  11103. },
  11104. {
  11105. "$ref": "#/components/schemas/SessionNotFoundError"
  11106. }
  11107. ]
  11108. }
  11109. }
  11110. }
  11111. },
  11112. "500": {
  11113. "description": "UnknownError",
  11114. "content": {
  11115. "application/json": {
  11116. "schema": {
  11117. "$ref": "#/components/schemas/UnknownError1"
  11118. }
  11119. }
  11120. }
  11121. }
  11122. },
  11123. "description": "Retrieve the active context messages for a session (all messages after the last compaction).",
  11124. "summary": "Get session context",
  11125. "x-codeSamples": [
  11126. {
  11127. "lang": "js",
  11128. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  11129. }
  11130. ]
  11131. }
  11132. },
  11133. "/api/session/{sessionID}/event": {
  11134. "get": {
  11135. "tags": ["sessions"],
  11136. "operationId": "v2.session.events",
  11137. "parameters": [
  11138. {
  11139. "name": "sessionID",
  11140. "in": "path",
  11141. "schema": {
  11142. "type": "string",
  11143. "pattern": "^ses"
  11144. },
  11145. "required": true
  11146. },
  11147. {
  11148. "name": "after",
  11149. "in": "query",
  11150. "schema": {
  11151. "type": "string"
  11152. },
  11153. "required": false
  11154. }
  11155. ],
  11156. "security": [],
  11157. "responses": {
  11158. "200": {
  11159. "description": "Success",
  11160. "content": {
  11161. "text/event-stream": {
  11162. "schema": {
  11163. "type": "object",
  11164. "properties": {
  11165. "id": {
  11166. "type": "string"
  11167. },
  11168. "event": {
  11169. "type": "string"
  11170. },
  11171. "data": {
  11172. "type": "string",
  11173. "contentSchema": {
  11174. "oneOf": [
  11175. {
  11176. "$ref": "#/components/schemas/SessionNextAgentSwitched"
  11177. },
  11178. {
  11179. "$ref": "#/components/schemas/SessionNextModelSwitched"
  11180. },
  11181. {
  11182. "$ref": "#/components/schemas/SessionNextMoved"
  11183. },
  11184. {
  11185. "$ref": "#/components/schemas/SessionNextPrompted"
  11186. },
  11187. {
  11188. "$ref": "#/components/schemas/SessionNextPromptAdmitted"
  11189. },
  11190. {
  11191. "$ref": "#/components/schemas/SessionNextContextUpdated"
  11192. },
  11193. {
  11194. "$ref": "#/components/schemas/SessionNextSynthetic"
  11195. },
  11196. {
  11197. "$ref": "#/components/schemas/SessionNextShellStarted"
  11198. },
  11199. {
  11200. "$ref": "#/components/schemas/SessionNextShellEnded"
  11201. },
  11202. {
  11203. "$ref": "#/components/schemas/SessionNextStepStarted"
  11204. },
  11205. {
  11206. "$ref": "#/components/schemas/SessionNextStepEnded"
  11207. },
  11208. {
  11209. "$ref": "#/components/schemas/SessionNextStepFailed"
  11210. },
  11211. {
  11212. "$ref": "#/components/schemas/SessionNextTextStarted"
  11213. },
  11214. {
  11215. "$ref": "#/components/schemas/SessionNextTextEnded"
  11216. },
  11217. {
  11218. "$ref": "#/components/schemas/SessionNextToolInputStarted"
  11219. },
  11220. {
  11221. "$ref": "#/components/schemas/SessionNextToolInputEnded"
  11222. },
  11223. {
  11224. "$ref": "#/components/schemas/SessionNextToolCalled"
  11225. },
  11226. {
  11227. "$ref": "#/components/schemas/SessionNextToolProgress"
  11228. },
  11229. {
  11230. "$ref": "#/components/schemas/SessionNextToolSuccess"
  11231. },
  11232. {
  11233. "$ref": "#/components/schemas/SessionNextToolFailed"
  11234. },
  11235. {
  11236. "$ref": "#/components/schemas/SessionNextReasoningStarted"
  11237. },
  11238. {
  11239. "$ref": "#/components/schemas/SessionNextReasoningEnded"
  11240. },
  11241. {
  11242. "$ref": "#/components/schemas/SessionNextRetried"
  11243. },
  11244. {
  11245. "$ref": "#/components/schemas/SessionNextCompactionStarted"
  11246. },
  11247. {
  11248. "$ref": "#/components/schemas/SessionNextCompactionEnded"
  11249. },
  11250. {
  11251. "$ref": "#/components/schemas/SessionNextRevertStaged"
  11252. },
  11253. {
  11254. "$ref": "#/components/schemas/SessionNextRevertCleared"
  11255. },
  11256. {
  11257. "$ref": "#/components/schemas/SessionNextRevertCommitted"
  11258. }
  11259. ]
  11260. },
  11261. "contentMediaType": "application/json"
  11262. }
  11263. },
  11264. "required": ["id", "event", "data"],
  11265. "additionalProperties": false
  11266. },
  11267. "x-effect-stream": {
  11268. "encoding": "sse",
  11269. "causeSchema": {
  11270. "type": "array",
  11271. "items": {
  11272. "anyOf": [
  11273. {
  11274. "type": "object",
  11275. "properties": {
  11276. "_tag": {
  11277. "type": "string",
  11278. "enum": ["Fail"]
  11279. },
  11280. "error": {
  11281. "not": {}
  11282. }
  11283. },
  11284. "required": ["_tag", "error"],
  11285. "additionalProperties": false
  11286. },
  11287. {
  11288. "type": "object",
  11289. "properties": {
  11290. "_tag": {
  11291. "type": "string",
  11292. "enum": ["Die"]
  11293. },
  11294. "defect": {}
  11295. },
  11296. "required": ["_tag", "defect"],
  11297. "additionalProperties": false
  11298. },
  11299. {
  11300. "type": "object",
  11301. "properties": {
  11302. "_tag": {
  11303. "type": "string",
  11304. "enum": ["Interrupt"]
  11305. },
  11306. "fiberId": {
  11307. "anyOf": [
  11308. {
  11309. "type": "number"
  11310. },
  11311. {
  11312. "type": "null"
  11313. }
  11314. ]
  11315. }
  11316. },
  11317. "required": ["_tag", "fiberId"],
  11318. "additionalProperties": false
  11319. }
  11320. ]
  11321. }
  11322. },
  11323. "errorSchema": {
  11324. "not": {}
  11325. },
  11326. "failureEvent": "effect/httpapi/stream/failure"
  11327. }
  11328. }
  11329. }
  11330. },
  11331. "400": {
  11332. "description": "InvalidRequestError",
  11333. "content": {
  11334. "application/json": {
  11335. "schema": {
  11336. "$ref": "#/components/schemas/InvalidRequestError"
  11337. }
  11338. }
  11339. }
  11340. },
  11341. "401": {
  11342. "description": "UnauthorizedError",
  11343. "content": {
  11344. "application/json": {
  11345. "schema": {
  11346. "$ref": "#/components/schemas/UnauthorizedError"
  11347. }
  11348. }
  11349. }
  11350. },
  11351. "404": {
  11352. "description": "SessionNotFoundError",
  11353. "content": {
  11354. "application/json": {
  11355. "schema": {
  11356. "anyOf": [
  11357. {
  11358. "$ref": "#/components/schemas/SessionNotFoundError"
  11359. },
  11360. {
  11361. "$ref": "#/components/schemas/SessionNotFoundError"
  11362. }
  11363. ]
  11364. }
  11365. }
  11366. }
  11367. }
  11368. },
  11369. "description": "Replay durable events after an aggregate sequence, then continue with new durable events.",
  11370. "summary": "Subscribe to session events",
  11371. "x-codeSamples": [
  11372. {
  11373. "lang": "js",
  11374. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.events({\n ...\n})"
  11375. }
  11376. ]
  11377. }
  11378. },
  11379. "/api/session/{sessionID}/interrupt": {
  11380. "post": {
  11381. "tags": ["sessions"],
  11382. "operationId": "v2.session.interrupt",
  11383. "parameters": [
  11384. {
  11385. "name": "sessionID",
  11386. "in": "path",
  11387. "schema": {
  11388. "type": "string",
  11389. "pattern": "^ses"
  11390. },
  11391. "required": true
  11392. }
  11393. ],
  11394. "security": [],
  11395. "responses": {
  11396. "204": {
  11397. "description": "<No Content>"
  11398. },
  11399. "400": {
  11400. "description": "InvalidRequestError",
  11401. "content": {
  11402. "application/json": {
  11403. "schema": {
  11404. "$ref": "#/components/schemas/InvalidRequestError"
  11405. }
  11406. }
  11407. }
  11408. },
  11409. "401": {
  11410. "description": "UnauthorizedError",
  11411. "content": {
  11412. "application/json": {
  11413. "schema": {
  11414. "$ref": "#/components/schemas/UnauthorizedError"
  11415. }
  11416. }
  11417. }
  11418. },
  11419. "404": {
  11420. "description": "SessionNotFoundError",
  11421. "content": {
  11422. "application/json": {
  11423. "schema": {
  11424. "anyOf": [
  11425. {
  11426. "$ref": "#/components/schemas/SessionNotFoundError"
  11427. },
  11428. {
  11429. "$ref": "#/components/schemas/SessionNotFoundError"
  11430. }
  11431. ]
  11432. }
  11433. }
  11434. }
  11435. }
  11436. },
  11437. "description": "Interrupt active execution owned by this OpenCode process. Idle interruption is a no-op.",
  11438. "summary": "Interrupt session execution",
  11439. "x-codeSamples": [
  11440. {
  11441. "lang": "js",
  11442. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.interrupt({\n ...\n})"
  11443. }
  11444. ]
  11445. }
  11446. },
  11447. "/api/session/{sessionID}/message/{messageID}": {
  11448. "get": {
  11449. "tags": ["sessions"],
  11450. "operationId": "v2.session.message",
  11451. "parameters": [
  11452. {
  11453. "name": "sessionID",
  11454. "in": "path",
  11455. "schema": {
  11456. "type": "string",
  11457. "pattern": "^ses"
  11458. },
  11459. "required": true
  11460. },
  11461. {
  11462. "name": "messageID",
  11463. "in": "path",
  11464. "schema": {
  11465. "type": "string",
  11466. "pattern": "^msg_"
  11467. },
  11468. "required": true
  11469. }
  11470. ],
  11471. "security": [],
  11472. "responses": {
  11473. "200": {
  11474. "description": "Success",
  11475. "content": {
  11476. "application/json": {
  11477. "schema": {
  11478. "type": "object",
  11479. "properties": {
  11480. "data": {
  11481. "$ref": "#/components/schemas/SessionMessage"
  11482. }
  11483. },
  11484. "required": ["data"],
  11485. "additionalProperties": false
  11486. }
  11487. }
  11488. }
  11489. },
  11490. "400": {
  11491. "description": "InvalidRequestError",
  11492. "content": {
  11493. "application/json": {
  11494. "schema": {
  11495. "$ref": "#/components/schemas/InvalidRequestError"
  11496. }
  11497. }
  11498. }
  11499. },
  11500. "401": {
  11501. "description": "UnauthorizedError",
  11502. "content": {
  11503. "application/json": {
  11504. "schema": {
  11505. "$ref": "#/components/schemas/UnauthorizedError"
  11506. }
  11507. }
  11508. }
  11509. },
  11510. "404": {
  11511. "description": "SessionNotFoundError | MessageNotFoundError",
  11512. "content": {
  11513. "application/json": {
  11514. "schema": {
  11515. "anyOf": [
  11516. {
  11517. "$ref": "#/components/schemas/MessageNotFoundError"
  11518. },
  11519. {
  11520. "$ref": "#/components/schemas/SessionNotFoundError"
  11521. },
  11522. {
  11523. "$ref": "#/components/schemas/SessionNotFoundError"
  11524. }
  11525. ]
  11526. }
  11527. }
  11528. }
  11529. }
  11530. },
  11531. "description": "Retrieve one projected message owned by the Session.",
  11532. "summary": "Get session message",
  11533. "x-codeSamples": [
  11534. {
  11535. "lang": "js",
  11536. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.message({\n ...\n})"
  11537. }
  11538. ]
  11539. }
  11540. },
  11541. "/api/session/{sessionID}/message": {
  11542. "get": {
  11543. "tags": ["messages"],
  11544. "operationId": "v2.session.messages",
  11545. "parameters": [
  11546. {
  11547. "name": "sessionID",
  11548. "in": "path",
  11549. "schema": {
  11550. "type": "string",
  11551. "pattern": "^ses"
  11552. },
  11553. "required": true
  11554. },
  11555. {
  11556. "name": "limit",
  11557. "in": "query",
  11558. "schema": {
  11559. "type": "number"
  11560. },
  11561. "required": false
  11562. },
  11563. {
  11564. "name": "order",
  11565. "in": "query",
  11566. "schema": {
  11567. "type": "string",
  11568. "enum": ["asc", "desc"]
  11569. },
  11570. "required": false
  11571. },
  11572. {
  11573. "name": "cursor",
  11574. "in": "query",
  11575. "schema": {
  11576. "type": "string",
  11577. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."
  11578. },
  11579. "required": false
  11580. }
  11581. ],
  11582. "security": [],
  11583. "responses": {
  11584. "200": {
  11585. "description": "SessionMessagesResponse",
  11586. "content": {
  11587. "application/json": {
  11588. "schema": {
  11589. "$ref": "#/components/schemas/SessionMessagesResponse"
  11590. }
  11591. }
  11592. }
  11593. },
  11594. "400": {
  11595. "description": "InvalidCursorError | InvalidRequestError",
  11596. "content": {
  11597. "application/json": {
  11598. "schema": {
  11599. "anyOf": [
  11600. {
  11601. "$ref": "#/components/schemas/InvalidCursorError"
  11602. },
  11603. {
  11604. "$ref": "#/components/schemas/InvalidRequestError"
  11605. }
  11606. ]
  11607. }
  11608. }
  11609. }
  11610. },
  11611. "401": {
  11612. "description": "UnauthorizedError",
  11613. "content": {
  11614. "application/json": {
  11615. "schema": {
  11616. "$ref": "#/components/schemas/UnauthorizedError"
  11617. }
  11618. }
  11619. }
  11620. },
  11621. "404": {
  11622. "description": "SessionNotFoundError",
  11623. "content": {
  11624. "application/json": {
  11625. "schema": {
  11626. "anyOf": [
  11627. {
  11628. "$ref": "#/components/schemas/SessionNotFoundError"
  11629. },
  11630. {
  11631. "$ref": "#/components/schemas/SessionNotFoundError"
  11632. }
  11633. ]
  11634. }
  11635. }
  11636. }
  11637. },
  11638. "500": {
  11639. "description": "UnknownError",
  11640. "content": {
  11641. "application/json": {
  11642. "schema": {
  11643. "$ref": "#/components/schemas/UnknownError1"
  11644. }
  11645. }
  11646. }
  11647. }
  11648. },
  11649. "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.",
  11650. "summary": "Get session messages",
  11651. "x-codeSamples": [
  11652. {
  11653. "lang": "js",
  11654. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  11655. }
  11656. ]
  11657. }
  11658. },
  11659. "/api/model": {
  11660. "get": {
  11661. "tags": ["models"],
  11662. "operationId": "v2.model.list",
  11663. "parameters": [
  11664. {
  11665. "name": "location",
  11666. "in": "query",
  11667. "schema": {
  11668. "type": "object",
  11669. "properties": {
  11670. "directory": {
  11671. "type": "string"
  11672. },
  11673. "workspace": {
  11674. "type": "string"
  11675. }
  11676. },
  11677. "additionalProperties": false
  11678. },
  11679. "required": false,
  11680. "style": "deepObject",
  11681. "explode": true
  11682. }
  11683. ],
  11684. "security": [],
  11685. "responses": {
  11686. "200": {
  11687. "description": "Success",
  11688. "content": {
  11689. "application/json": {
  11690. "schema": {
  11691. "type": "object",
  11692. "properties": {
  11693. "location": {
  11694. "$ref": "#/components/schemas/LocationInfo"
  11695. },
  11696. "data": {
  11697. "type": "array",
  11698. "items": {
  11699. "$ref": "#/components/schemas/ModelV2Info"
  11700. }
  11701. }
  11702. },
  11703. "required": ["location", "data"],
  11704. "additionalProperties": false
  11705. }
  11706. }
  11707. }
  11708. },
  11709. "400": {
  11710. "description": "InvalidRequestError",
  11711. "content": {
  11712. "application/json": {
  11713. "schema": {
  11714. "$ref": "#/components/schemas/InvalidRequestError"
  11715. }
  11716. }
  11717. }
  11718. },
  11719. "401": {
  11720. "description": "UnauthorizedError",
  11721. "content": {
  11722. "application/json": {
  11723. "schema": {
  11724. "$ref": "#/components/schemas/UnauthorizedError"
  11725. }
  11726. }
  11727. }
  11728. },
  11729. "503": {
  11730. "description": "ServiceUnavailableError",
  11731. "content": {
  11732. "application/json": {
  11733. "schema": {
  11734. "$ref": "#/components/schemas/ServiceUnavailableError"
  11735. }
  11736. }
  11737. }
  11738. }
  11739. },
  11740. "description": "Retrieve available models ordered by release date.",
  11741. "summary": "List models",
  11742. "x-codeSamples": [
  11743. {
  11744. "lang": "js",
  11745. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.model.list({\n ...\n})"
  11746. }
  11747. ]
  11748. }
  11749. },
  11750. "/api/provider": {
  11751. "get": {
  11752. "tags": ["providers"],
  11753. "operationId": "v2.provider.list",
  11754. "parameters": [
  11755. {
  11756. "name": "location",
  11757. "in": "query",
  11758. "schema": {
  11759. "type": "object",
  11760. "properties": {
  11761. "directory": {
  11762. "type": "string"
  11763. },
  11764. "workspace": {
  11765. "type": "string"
  11766. }
  11767. },
  11768. "additionalProperties": false
  11769. },
  11770. "required": false,
  11771. "style": "deepObject",
  11772. "explode": true
  11773. }
  11774. ],
  11775. "security": [],
  11776. "responses": {
  11777. "200": {
  11778. "description": "Success",
  11779. "content": {
  11780. "application/json": {
  11781. "schema": {
  11782. "type": "object",
  11783. "properties": {
  11784. "location": {
  11785. "$ref": "#/components/schemas/LocationInfo"
  11786. },
  11787. "data": {
  11788. "type": "array",
  11789. "items": {
  11790. "$ref": "#/components/schemas/ProviderV2Info"
  11791. }
  11792. }
  11793. },
  11794. "required": ["location", "data"],
  11795. "additionalProperties": false
  11796. }
  11797. }
  11798. }
  11799. },
  11800. "400": {
  11801. "description": "InvalidRequestError",
  11802. "content": {
  11803. "application/json": {
  11804. "schema": {
  11805. "$ref": "#/components/schemas/InvalidRequestError"
  11806. }
  11807. }
  11808. }
  11809. },
  11810. "401": {
  11811. "description": "UnauthorizedError",
  11812. "content": {
  11813. "application/json": {
  11814. "schema": {
  11815. "$ref": "#/components/schemas/UnauthorizedError"
  11816. }
  11817. }
  11818. }
  11819. },
  11820. "503": {
  11821. "description": "ServiceUnavailableError",
  11822. "content": {
  11823. "application/json": {
  11824. "schema": {
  11825. "$ref": "#/components/schemas/ServiceUnavailableError"
  11826. }
  11827. }
  11828. }
  11829. }
  11830. },
  11831. "description": "Retrieve active AI providers so clients can show provider availability and configuration.",
  11832. "summary": "List providers",
  11833. "x-codeSamples": [
  11834. {
  11835. "lang": "js",
  11836. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.list({\n ...\n})"
  11837. }
  11838. ]
  11839. }
  11840. },
  11841. "/api/provider/{providerID}": {
  11842. "get": {
  11843. "tags": ["providers"],
  11844. "operationId": "v2.provider.get",
  11845. "parameters": [
  11846. {
  11847. "name": "providerID",
  11848. "in": "path",
  11849. "schema": {
  11850. "type": "string"
  11851. },
  11852. "required": true
  11853. },
  11854. {
  11855. "name": "location",
  11856. "in": "query",
  11857. "schema": {
  11858. "type": "object",
  11859. "properties": {
  11860. "directory": {
  11861. "type": "string"
  11862. },
  11863. "workspace": {
  11864. "type": "string"
  11865. }
  11866. },
  11867. "additionalProperties": false
  11868. },
  11869. "required": false,
  11870. "style": "deepObject",
  11871. "explode": true
  11872. }
  11873. ],
  11874. "security": [],
  11875. "responses": {
  11876. "200": {
  11877. "description": "Success",
  11878. "content": {
  11879. "application/json": {
  11880. "schema": {
  11881. "type": "object",
  11882. "properties": {
  11883. "location": {
  11884. "$ref": "#/components/schemas/LocationInfo"
  11885. },
  11886. "data": {
  11887. "$ref": "#/components/schemas/ProviderV2Info"
  11888. }
  11889. },
  11890. "required": ["location", "data"],
  11891. "additionalProperties": false
  11892. }
  11893. }
  11894. }
  11895. },
  11896. "400": {
  11897. "description": "InvalidRequestError",
  11898. "content": {
  11899. "application/json": {
  11900. "schema": {
  11901. "$ref": "#/components/schemas/InvalidRequestError"
  11902. }
  11903. }
  11904. }
  11905. },
  11906. "401": {
  11907. "description": "UnauthorizedError",
  11908. "content": {
  11909. "application/json": {
  11910. "schema": {
  11911. "$ref": "#/components/schemas/UnauthorizedError"
  11912. }
  11913. }
  11914. }
  11915. },
  11916. "404": {
  11917. "description": "ProviderNotFoundError",
  11918. "content": {
  11919. "application/json": {
  11920. "schema": {
  11921. "$ref": "#/components/schemas/ProviderNotFoundError"
  11922. }
  11923. }
  11924. }
  11925. },
  11926. "503": {
  11927. "description": "ServiceUnavailableError",
  11928. "content": {
  11929. "application/json": {
  11930. "schema": {
  11931. "$ref": "#/components/schemas/ServiceUnavailableError"
  11932. }
  11933. }
  11934. }
  11935. }
  11936. },
  11937. "description": "Retrieve a single AI provider so clients can inspect its availability and endpoint settings.",
  11938. "summary": "Get provider",
  11939. "x-codeSamples": [
  11940. {
  11941. "lang": "js",
  11942. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.get({\n ...\n})"
  11943. }
  11944. ]
  11945. }
  11946. },
  11947. "/api/integration": {
  11948. "get": {
  11949. "tags": ["integrations"],
  11950. "operationId": "v2.integration.list",
  11951. "parameters": [
  11952. {
  11953. "name": "location",
  11954. "in": "query",
  11955. "schema": {
  11956. "type": "object",
  11957. "properties": {
  11958. "directory": {
  11959. "type": "string"
  11960. },
  11961. "workspace": {
  11962. "type": "string"
  11963. }
  11964. },
  11965. "additionalProperties": false
  11966. },
  11967. "required": false,
  11968. "style": "deepObject",
  11969. "explode": true
  11970. }
  11971. ],
  11972. "security": [],
  11973. "responses": {
  11974. "200": {
  11975. "description": "Success",
  11976. "content": {
  11977. "application/json": {
  11978. "schema": {
  11979. "type": "object",
  11980. "properties": {
  11981. "location": {
  11982. "$ref": "#/components/schemas/LocationInfo"
  11983. },
  11984. "data": {
  11985. "type": "array",
  11986. "items": {
  11987. "$ref": "#/components/schemas/IntegrationInfo"
  11988. }
  11989. }
  11990. },
  11991. "required": ["location", "data"],
  11992. "additionalProperties": false
  11993. }
  11994. }
  11995. }
  11996. },
  11997. "400": {
  11998. "description": "InvalidRequestError",
  11999. "content": {
  12000. "application/json": {
  12001. "schema": {
  12002. "$ref": "#/components/schemas/InvalidRequestError"
  12003. }
  12004. }
  12005. }
  12006. },
  12007. "401": {
  12008. "description": "UnauthorizedError",
  12009. "content": {
  12010. "application/json": {
  12011. "schema": {
  12012. "$ref": "#/components/schemas/UnauthorizedError"
  12013. }
  12014. }
  12015. }
  12016. }
  12017. },
  12018. "description": "Retrieve available integrations and their authentication methods.",
  12019. "summary": "List integrations",
  12020. "x-codeSamples": [
  12021. {
  12022. "lang": "js",
  12023. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.list({\n ...\n})"
  12024. }
  12025. ]
  12026. }
  12027. },
  12028. "/api/integration/{integrationID}": {
  12029. "get": {
  12030. "tags": ["integrations"],
  12031. "operationId": "v2.integration.get",
  12032. "parameters": [
  12033. {
  12034. "name": "integrationID",
  12035. "in": "path",
  12036. "schema": {
  12037. "type": "string"
  12038. },
  12039. "required": true
  12040. },
  12041. {
  12042. "name": "location",
  12043. "in": "query",
  12044. "schema": {
  12045. "type": "object",
  12046. "properties": {
  12047. "directory": {
  12048. "type": "string"
  12049. },
  12050. "workspace": {
  12051. "type": "string"
  12052. }
  12053. },
  12054. "additionalProperties": false
  12055. },
  12056. "required": false,
  12057. "style": "deepObject",
  12058. "explode": true
  12059. }
  12060. ],
  12061. "security": [],
  12062. "responses": {
  12063. "200": {
  12064. "description": "Success",
  12065. "content": {
  12066. "application/json": {
  12067. "schema": {
  12068. "type": "object",
  12069. "properties": {
  12070. "location": {
  12071. "$ref": "#/components/schemas/LocationInfo"
  12072. },
  12073. "data": {
  12074. "$ref": "#/components/schemas/IntegrationInfo"
  12075. }
  12076. },
  12077. "required": ["location", "data"],
  12078. "additionalProperties": false
  12079. }
  12080. }
  12081. }
  12082. },
  12083. "400": {
  12084. "description": "InvalidRequestError",
  12085. "content": {
  12086. "application/json": {
  12087. "schema": {
  12088. "$ref": "#/components/schemas/InvalidRequestError"
  12089. }
  12090. }
  12091. }
  12092. },
  12093. "401": {
  12094. "description": "UnauthorizedError",
  12095. "content": {
  12096. "application/json": {
  12097. "schema": {
  12098. "$ref": "#/components/schemas/UnauthorizedError"
  12099. }
  12100. }
  12101. }
  12102. }
  12103. },
  12104. "description": "Retrieve one integration and its authentication methods.",
  12105. "summary": "Get integration",
  12106. "x-codeSamples": [
  12107. {
  12108. "lang": "js",
  12109. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.get({\n ...\n})"
  12110. }
  12111. ]
  12112. }
  12113. },
  12114. "/api/integration/{integrationID}/connect/key": {
  12115. "post": {
  12116. "tags": ["integrations"],
  12117. "operationId": "v2.integration.connect.key",
  12118. "parameters": [
  12119. {
  12120. "name": "integrationID",
  12121. "in": "path",
  12122. "schema": {
  12123. "type": "string"
  12124. },
  12125. "required": true
  12126. },
  12127. {
  12128. "name": "location",
  12129. "in": "query",
  12130. "schema": {
  12131. "type": "object",
  12132. "properties": {
  12133. "directory": {
  12134. "type": "string"
  12135. },
  12136. "workspace": {
  12137. "type": "string"
  12138. }
  12139. },
  12140. "additionalProperties": false
  12141. },
  12142. "required": false,
  12143. "style": "deepObject",
  12144. "explode": true
  12145. }
  12146. ],
  12147. "security": [],
  12148. "responses": {
  12149. "204": {
  12150. "description": "<No Content>"
  12151. },
  12152. "400": {
  12153. "description": "InvalidRequestError",
  12154. "content": {
  12155. "application/json": {
  12156. "schema": {
  12157. "anyOf": [
  12158. {
  12159. "$ref": "#/components/schemas/InvalidRequestError"
  12160. },
  12161. {
  12162. "$ref": "#/components/schemas/InvalidRequestError"
  12163. }
  12164. ]
  12165. }
  12166. }
  12167. }
  12168. },
  12169. "401": {
  12170. "description": "UnauthorizedError",
  12171. "content": {
  12172. "application/json": {
  12173. "schema": {
  12174. "$ref": "#/components/schemas/UnauthorizedError"
  12175. }
  12176. }
  12177. }
  12178. }
  12179. },
  12180. "description": "Run a key authentication method and store the resulting credential.",
  12181. "summary": "Connect with key",
  12182. "requestBody": {
  12183. "content": {
  12184. "application/json": {
  12185. "schema": {
  12186. "type": "object",
  12187. "properties": {
  12188. "key": {
  12189. "type": "string"
  12190. },
  12191. "label": {
  12192. "type": "string"
  12193. }
  12194. },
  12195. "required": ["key"],
  12196. "additionalProperties": false
  12197. }
  12198. }
  12199. },
  12200. "required": true
  12201. },
  12202. "x-codeSamples": [
  12203. {
  12204. "lang": "js",
  12205. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.connect.key({\n ...\n})"
  12206. }
  12207. ]
  12208. }
  12209. },
  12210. "/api/integration/{integrationID}/connect/oauth": {
  12211. "post": {
  12212. "tags": ["integrations"],
  12213. "operationId": "v2.integration.connect.oauth",
  12214. "parameters": [
  12215. {
  12216. "name": "integrationID",
  12217. "in": "path",
  12218. "schema": {
  12219. "type": "string"
  12220. },
  12221. "required": true
  12222. },
  12223. {
  12224. "name": "location",
  12225. "in": "query",
  12226. "schema": {
  12227. "type": "object",
  12228. "properties": {
  12229. "directory": {
  12230. "type": "string"
  12231. },
  12232. "workspace": {
  12233. "type": "string"
  12234. }
  12235. },
  12236. "additionalProperties": false
  12237. },
  12238. "required": false,
  12239. "style": "deepObject",
  12240. "explode": true
  12241. }
  12242. ],
  12243. "security": [],
  12244. "responses": {
  12245. "200": {
  12246. "description": "Success",
  12247. "content": {
  12248. "application/json": {
  12249. "schema": {
  12250. "type": "object",
  12251. "properties": {
  12252. "location": {
  12253. "$ref": "#/components/schemas/LocationInfo"
  12254. },
  12255. "data": {
  12256. "$ref": "#/components/schemas/IntegrationAttempt"
  12257. }
  12258. },
  12259. "required": ["location", "data"],
  12260. "additionalProperties": false
  12261. }
  12262. }
  12263. }
  12264. },
  12265. "400": {
  12266. "description": "InvalidRequestError",
  12267. "content": {
  12268. "application/json": {
  12269. "schema": {
  12270. "anyOf": [
  12271. {
  12272. "$ref": "#/components/schemas/InvalidRequestError"
  12273. },
  12274. {
  12275. "$ref": "#/components/schemas/InvalidRequestError"
  12276. }
  12277. ]
  12278. }
  12279. }
  12280. }
  12281. },
  12282. "401": {
  12283. "description": "UnauthorizedError",
  12284. "content": {
  12285. "application/json": {
  12286. "schema": {
  12287. "$ref": "#/components/schemas/UnauthorizedError"
  12288. }
  12289. }
  12290. }
  12291. }
  12292. },
  12293. "description": "Start an OAuth attempt and return the authorization details.",
  12294. "summary": "Begin OAuth connection",
  12295. "requestBody": {
  12296. "content": {
  12297. "application/json": {
  12298. "schema": {
  12299. "type": "object",
  12300. "properties": {
  12301. "methodID": {
  12302. "type": "string"
  12303. },
  12304. "inputs": {
  12305. "type": "object",
  12306. "additionalProperties": {
  12307. "type": "string"
  12308. }
  12309. },
  12310. "label": {
  12311. "type": "string"
  12312. }
  12313. },
  12314. "required": ["methodID", "inputs"],
  12315. "additionalProperties": false
  12316. }
  12317. }
  12318. },
  12319. "required": true
  12320. },
  12321. "x-codeSamples": [
  12322. {
  12323. "lang": "js",
  12324. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.connect.oauth({\n ...\n})"
  12325. }
  12326. ]
  12327. }
  12328. },
  12329. "/api/integration/attempt/{attemptID}": {
  12330. "get": {
  12331. "tags": ["integrations"],
  12332. "operationId": "v2.integration.attempt.status",
  12333. "parameters": [
  12334. {
  12335. "name": "attemptID",
  12336. "in": "path",
  12337. "schema": {
  12338. "type": "string"
  12339. },
  12340. "required": true
  12341. },
  12342. {
  12343. "name": "location",
  12344. "in": "query",
  12345. "schema": {
  12346. "type": "object",
  12347. "properties": {
  12348. "directory": {
  12349. "type": "string"
  12350. },
  12351. "workspace": {
  12352. "type": "string"
  12353. }
  12354. },
  12355. "additionalProperties": false
  12356. },
  12357. "required": false,
  12358. "style": "deepObject",
  12359. "explode": true
  12360. }
  12361. ],
  12362. "security": [],
  12363. "responses": {
  12364. "200": {
  12365. "description": "Success",
  12366. "content": {
  12367. "application/json": {
  12368. "schema": {
  12369. "type": "object",
  12370. "properties": {
  12371. "location": {
  12372. "$ref": "#/components/schemas/LocationInfo"
  12373. },
  12374. "data": {
  12375. "$ref": "#/components/schemas/IntegrationAttemptStatus"
  12376. }
  12377. },
  12378. "required": ["location", "data"],
  12379. "additionalProperties": false
  12380. }
  12381. }
  12382. }
  12383. },
  12384. "400": {
  12385. "description": "InvalidRequestError",
  12386. "content": {
  12387. "application/json": {
  12388. "schema": {
  12389. "$ref": "#/components/schemas/InvalidRequestError"
  12390. }
  12391. }
  12392. }
  12393. },
  12394. "401": {
  12395. "description": "UnauthorizedError",
  12396. "content": {
  12397. "application/json": {
  12398. "schema": {
  12399. "$ref": "#/components/schemas/UnauthorizedError"
  12400. }
  12401. }
  12402. }
  12403. }
  12404. },
  12405. "description": "Poll the current status of an OAuth attempt.",
  12406. "summary": "Get OAuth attempt status",
  12407. "x-codeSamples": [
  12408. {
  12409. "lang": "js",
  12410. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.attempt.status({\n ...\n})"
  12411. }
  12412. ]
  12413. },
  12414. "delete": {
  12415. "tags": ["integrations"],
  12416. "operationId": "v2.integration.attempt.cancel",
  12417. "parameters": [
  12418. {
  12419. "name": "attemptID",
  12420. "in": "path",
  12421. "schema": {
  12422. "type": "string"
  12423. },
  12424. "required": true
  12425. },
  12426. {
  12427. "name": "location",
  12428. "in": "query",
  12429. "schema": {
  12430. "type": "object",
  12431. "properties": {
  12432. "directory": {
  12433. "type": "string"
  12434. },
  12435. "workspace": {
  12436. "type": "string"
  12437. }
  12438. },
  12439. "additionalProperties": false
  12440. },
  12441. "required": false,
  12442. "style": "deepObject",
  12443. "explode": true
  12444. }
  12445. ],
  12446. "security": [],
  12447. "responses": {
  12448. "204": {
  12449. "description": "<No Content>"
  12450. },
  12451. "400": {
  12452. "description": "InvalidRequestError",
  12453. "content": {
  12454. "application/json": {
  12455. "schema": {
  12456. "$ref": "#/components/schemas/InvalidRequestError"
  12457. }
  12458. }
  12459. }
  12460. },
  12461. "401": {
  12462. "description": "UnauthorizedError",
  12463. "content": {
  12464. "application/json": {
  12465. "schema": {
  12466. "$ref": "#/components/schemas/UnauthorizedError"
  12467. }
  12468. }
  12469. }
  12470. }
  12471. },
  12472. "description": "Cancel an OAuth attempt and release its resources.",
  12473. "summary": "Cancel OAuth connection",
  12474. "x-codeSamples": [
  12475. {
  12476. "lang": "js",
  12477. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.attempt.cancel({\n ...\n})"
  12478. }
  12479. ]
  12480. }
  12481. },
  12482. "/api/integration/attempt/{attemptID}/complete": {
  12483. "post": {
  12484. "tags": ["integrations"],
  12485. "operationId": "v2.integration.attempt.complete",
  12486. "parameters": [
  12487. {
  12488. "name": "attemptID",
  12489. "in": "path",
  12490. "schema": {
  12491. "type": "string"
  12492. },
  12493. "required": true
  12494. },
  12495. {
  12496. "name": "location",
  12497. "in": "query",
  12498. "schema": {
  12499. "type": "object",
  12500. "properties": {
  12501. "directory": {
  12502. "type": "string"
  12503. },
  12504. "workspace": {
  12505. "type": "string"
  12506. }
  12507. },
  12508. "additionalProperties": false
  12509. },
  12510. "required": false,
  12511. "style": "deepObject",
  12512. "explode": true
  12513. }
  12514. ],
  12515. "security": [],
  12516. "responses": {
  12517. "204": {
  12518. "description": "<No Content>"
  12519. },
  12520. "400": {
  12521. "description": "InvalidRequestError",
  12522. "content": {
  12523. "application/json": {
  12524. "schema": {
  12525. "anyOf": [
  12526. {
  12527. "$ref": "#/components/schemas/InvalidRequestError"
  12528. },
  12529. {
  12530. "$ref": "#/components/schemas/InvalidRequestError"
  12531. }
  12532. ]
  12533. }
  12534. }
  12535. }
  12536. },
  12537. "401": {
  12538. "description": "UnauthorizedError",
  12539. "content": {
  12540. "application/json": {
  12541. "schema": {
  12542. "$ref": "#/components/schemas/UnauthorizedError"
  12543. }
  12544. }
  12545. }
  12546. }
  12547. },
  12548. "description": "Complete a code-based OAuth attempt and store the resulting credential.",
  12549. "summary": "Complete OAuth connection",
  12550. "requestBody": {
  12551. "content": {
  12552. "application/json": {
  12553. "schema": {
  12554. "type": "object",
  12555. "properties": {
  12556. "code": {
  12557. "type": "string"
  12558. }
  12559. },
  12560. "additionalProperties": false
  12561. }
  12562. }
  12563. },
  12564. "required": true
  12565. },
  12566. "x-codeSamples": [
  12567. {
  12568. "lang": "js",
  12569. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.attempt.complete({\n ...\n})"
  12570. }
  12571. ]
  12572. }
  12573. },
  12574. "/api/credential/{credentialID}": {
  12575. "patch": {
  12576. "tags": ["opencode HttpApi"],
  12577. "operationId": "v2.credential.update",
  12578. "parameters": [
  12579. {
  12580. "name": "credentialID",
  12581. "in": "path",
  12582. "schema": {
  12583. "type": "string"
  12584. },
  12585. "required": true
  12586. },
  12587. {
  12588. "name": "location",
  12589. "in": "query",
  12590. "schema": {
  12591. "type": "object",
  12592. "properties": {
  12593. "directory": {
  12594. "type": "string"
  12595. },
  12596. "workspace": {
  12597. "type": "string"
  12598. }
  12599. },
  12600. "additionalProperties": false
  12601. },
  12602. "required": false,
  12603. "style": "deepObject",
  12604. "explode": true
  12605. }
  12606. ],
  12607. "security": [],
  12608. "responses": {
  12609. "204": {
  12610. "description": "<No Content>"
  12611. },
  12612. "400": {
  12613. "description": "InvalidRequestError",
  12614. "content": {
  12615. "application/json": {
  12616. "schema": {
  12617. "$ref": "#/components/schemas/InvalidRequestError"
  12618. }
  12619. }
  12620. }
  12621. },
  12622. "401": {
  12623. "description": "UnauthorizedError",
  12624. "content": {
  12625. "application/json": {
  12626. "schema": {
  12627. "$ref": "#/components/schemas/UnauthorizedError"
  12628. }
  12629. }
  12630. }
  12631. }
  12632. },
  12633. "description": "Update a stored credential label.",
  12634. "summary": "Update credential",
  12635. "requestBody": {
  12636. "content": {
  12637. "application/json": {
  12638. "schema": {
  12639. "type": "object",
  12640. "properties": {
  12641. "label": {
  12642. "type": "string"
  12643. }
  12644. },
  12645. "required": ["label"],
  12646. "additionalProperties": false
  12647. }
  12648. }
  12649. },
  12650. "required": true
  12651. },
  12652. "x-codeSamples": [
  12653. {
  12654. "lang": "js",
  12655. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.credential.update({\n ...\n})"
  12656. }
  12657. ]
  12658. },
  12659. "delete": {
  12660. "tags": ["opencode HttpApi"],
  12661. "operationId": "v2.credential.remove",
  12662. "parameters": [
  12663. {
  12664. "name": "credentialID",
  12665. "in": "path",
  12666. "schema": {
  12667. "type": "string"
  12668. },
  12669. "required": true
  12670. },
  12671. {
  12672. "name": "location",
  12673. "in": "query",
  12674. "schema": {
  12675. "type": "object",
  12676. "properties": {
  12677. "directory": {
  12678. "type": "string"
  12679. },
  12680. "workspace": {
  12681. "type": "string"
  12682. }
  12683. },
  12684. "additionalProperties": false
  12685. },
  12686. "required": false,
  12687. "style": "deepObject",
  12688. "explode": true
  12689. }
  12690. ],
  12691. "security": [],
  12692. "responses": {
  12693. "204": {
  12694. "description": "<No Content>"
  12695. },
  12696. "400": {
  12697. "description": "InvalidRequestError",
  12698. "content": {
  12699. "application/json": {
  12700. "schema": {
  12701. "$ref": "#/components/schemas/InvalidRequestError"
  12702. }
  12703. }
  12704. }
  12705. },
  12706. "401": {
  12707. "description": "UnauthorizedError",
  12708. "content": {
  12709. "application/json": {
  12710. "schema": {
  12711. "$ref": "#/components/schemas/UnauthorizedError"
  12712. }
  12713. }
  12714. }
  12715. }
  12716. },
  12717. "description": "Remove a stored integration credential.",
  12718. "summary": "Remove credential",
  12719. "x-codeSamples": [
  12720. {
  12721. "lang": "js",
  12722. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.credential.remove({\n ...\n})"
  12723. }
  12724. ]
  12725. }
  12726. },
  12727. "/api/permission/request": {
  12728. "get": {
  12729. "tags": ["permissions"],
  12730. "operationId": "v2.permission.request.list",
  12731. "parameters": [
  12732. {
  12733. "name": "location",
  12734. "in": "query",
  12735. "schema": {
  12736. "type": "object",
  12737. "properties": {
  12738. "directory": {
  12739. "type": "string"
  12740. },
  12741. "workspace": {
  12742. "type": "string"
  12743. }
  12744. },
  12745. "additionalProperties": false
  12746. },
  12747. "required": false,
  12748. "style": "deepObject",
  12749. "explode": true
  12750. }
  12751. ],
  12752. "security": [],
  12753. "responses": {
  12754. "200": {
  12755. "description": "Success",
  12756. "content": {
  12757. "application/json": {
  12758. "schema": {
  12759. "type": "object",
  12760. "properties": {
  12761. "location": {
  12762. "$ref": "#/components/schemas/LocationInfo"
  12763. },
  12764. "data": {
  12765. "type": "array",
  12766. "items": {
  12767. "$ref": "#/components/schemas/PermissionV2Request"
  12768. }
  12769. }
  12770. },
  12771. "required": ["location", "data"],
  12772. "additionalProperties": false
  12773. }
  12774. }
  12775. }
  12776. },
  12777. "400": {
  12778. "description": "InvalidRequestError",
  12779. "content": {
  12780. "application/json": {
  12781. "schema": {
  12782. "$ref": "#/components/schemas/InvalidRequestError"
  12783. }
  12784. }
  12785. }
  12786. },
  12787. "401": {
  12788. "description": "UnauthorizedError",
  12789. "content": {
  12790. "application/json": {
  12791. "schema": {
  12792. "$ref": "#/components/schemas/UnauthorizedError"
  12793. }
  12794. }
  12795. }
  12796. }
  12797. },
  12798. "description": "Retrieve pending permission requests for a location.",
  12799. "summary": "List pending permission requests",
  12800. "x-codeSamples": [
  12801. {
  12802. "lang": "js",
  12803. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.request.list({\n ...\n})"
  12804. }
  12805. ]
  12806. }
  12807. },
  12808. "/api/permission/saved": {
  12809. "get": {
  12810. "tags": ["permissions"],
  12811. "operationId": "v2.permission.saved.list",
  12812. "parameters": [
  12813. {
  12814. "name": "projectID",
  12815. "in": "query",
  12816. "schema": {
  12817. "type": "string"
  12818. },
  12819. "required": false
  12820. }
  12821. ],
  12822. "security": [],
  12823. "responses": {
  12824. "200": {
  12825. "description": "Success",
  12826. "content": {
  12827. "application/json": {
  12828. "schema": {
  12829. "type": "object",
  12830. "properties": {
  12831. "data": {
  12832. "type": "array",
  12833. "items": {
  12834. "$ref": "#/components/schemas/PermissionSavedInfo"
  12835. }
  12836. }
  12837. },
  12838. "required": ["data"],
  12839. "additionalProperties": false
  12840. }
  12841. }
  12842. }
  12843. },
  12844. "400": {
  12845. "description": "InvalidRequestError",
  12846. "content": {
  12847. "application/json": {
  12848. "schema": {
  12849. "$ref": "#/components/schemas/InvalidRequestError"
  12850. }
  12851. }
  12852. }
  12853. },
  12854. "401": {
  12855. "description": "UnauthorizedError",
  12856. "content": {
  12857. "application/json": {
  12858. "schema": {
  12859. "$ref": "#/components/schemas/UnauthorizedError"
  12860. }
  12861. }
  12862. }
  12863. }
  12864. },
  12865. "description": "Retrieve saved permissions, optionally filtered by project.",
  12866. "summary": "List saved permissions",
  12867. "x-codeSamples": [
  12868. {
  12869. "lang": "js",
  12870. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.list({\n ...\n})"
  12871. }
  12872. ]
  12873. }
  12874. },
  12875. "/api/permission/saved/{id}": {
  12876. "delete": {
  12877. "tags": ["permissions"],
  12878. "operationId": "v2.permission.saved.remove",
  12879. "parameters": [
  12880. {
  12881. "name": "id",
  12882. "in": "path",
  12883. "schema": {
  12884. "type": "string"
  12885. },
  12886. "required": true
  12887. }
  12888. ],
  12889. "security": [],
  12890. "responses": {
  12891. "204": {
  12892. "description": "<No Content>"
  12893. },
  12894. "400": {
  12895. "description": "InvalidRequestError",
  12896. "content": {
  12897. "application/json": {
  12898. "schema": {
  12899. "$ref": "#/components/schemas/InvalidRequestError"
  12900. }
  12901. }
  12902. }
  12903. },
  12904. "401": {
  12905. "description": "UnauthorizedError",
  12906. "content": {
  12907. "application/json": {
  12908. "schema": {
  12909. "$ref": "#/components/schemas/UnauthorizedError"
  12910. }
  12911. }
  12912. }
  12913. }
  12914. },
  12915. "description": "Remove a saved permission by ID.",
  12916. "summary": "Remove saved permission",
  12917. "x-codeSamples": [
  12918. {
  12919. "lang": "js",
  12920. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.remove({\n ...\n})"
  12921. }
  12922. ]
  12923. }
  12924. },
  12925. "/api/session/{sessionID}/permission": {
  12926. "post": {
  12927. "tags": ["permissions"],
  12928. "operationId": "v2.session.permission.create",
  12929. "parameters": [
  12930. {
  12931. "name": "sessionID",
  12932. "in": "path",
  12933. "schema": {
  12934. "type": "string",
  12935. "pattern": "^ses"
  12936. },
  12937. "required": true
  12938. }
  12939. ],
  12940. "security": [],
  12941. "responses": {
  12942. "200": {
  12943. "description": "Success",
  12944. "content": {
  12945. "application/json": {
  12946. "schema": {
  12947. "type": "object",
  12948. "properties": {
  12949. "data": {
  12950. "type": "object",
  12951. "properties": {
  12952. "id": {
  12953. "type": "string",
  12954. "pattern": "^per"
  12955. },
  12956. "effect": {
  12957. "$ref": "#/components/schemas/PermissionV2Effect"
  12958. }
  12959. },
  12960. "required": ["id", "effect"],
  12961. "additionalProperties": false
  12962. }
  12963. },
  12964. "required": ["data"],
  12965. "additionalProperties": false
  12966. }
  12967. }
  12968. }
  12969. },
  12970. "400": {
  12971. "description": "InvalidRequestError",
  12972. "content": {
  12973. "application/json": {
  12974. "schema": {
  12975. "$ref": "#/components/schemas/InvalidRequestError"
  12976. }
  12977. }
  12978. }
  12979. },
  12980. "401": {
  12981. "description": "UnauthorizedError",
  12982. "content": {
  12983. "application/json": {
  12984. "schema": {
  12985. "$ref": "#/components/schemas/UnauthorizedError"
  12986. }
  12987. }
  12988. }
  12989. },
  12990. "404": {
  12991. "description": "SessionNotFoundError",
  12992. "content": {
  12993. "application/json": {
  12994. "schema": {
  12995. "anyOf": [
  12996. {
  12997. "$ref": "#/components/schemas/SessionNotFoundError"
  12998. },
  12999. {
  13000. "$ref": "#/components/schemas/SessionNotFoundError"
  13001. }
  13002. ]
  13003. }
  13004. }
  13005. }
  13006. }
  13007. },
  13008. "description": "Evaluate and, when approval is required, create a permission request for a session.",
  13009. "summary": "Create permission request",
  13010. "requestBody": {
  13011. "content": {
  13012. "application/json": {
  13013. "schema": {
  13014. "type": "object",
  13015. "properties": {
  13016. "id": {
  13017. "type": "string",
  13018. "pattern": "^per"
  13019. },
  13020. "action": {
  13021. "type": "string"
  13022. },
  13023. "resources": {
  13024. "type": "array",
  13025. "items": {
  13026. "type": "string"
  13027. }
  13028. },
  13029. "save": {
  13030. "type": "array",
  13031. "items": {
  13032. "type": "string"
  13033. }
  13034. },
  13035. "metadata": {
  13036. "type": "object"
  13037. },
  13038. "source": {
  13039. "$ref": "#/components/schemas/PermissionV2Source"
  13040. },
  13041. "agent": {
  13042. "type": "string"
  13043. }
  13044. },
  13045. "required": ["action", "resources"],
  13046. "additionalProperties": false
  13047. }
  13048. }
  13049. },
  13050. "required": true
  13051. },
  13052. "x-codeSamples": [
  13053. {
  13054. "lang": "js",
  13055. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.create({\n ...\n})"
  13056. }
  13057. ]
  13058. },
  13059. "get": {
  13060. "tags": ["permissions"],
  13061. "operationId": "v2.session.permission.list",
  13062. "parameters": [
  13063. {
  13064. "name": "sessionID",
  13065. "in": "path",
  13066. "schema": {
  13067. "type": "string",
  13068. "pattern": "^ses"
  13069. },
  13070. "required": true
  13071. }
  13072. ],
  13073. "security": [],
  13074. "responses": {
  13075. "200": {
  13076. "description": "Success",
  13077. "content": {
  13078. "application/json": {
  13079. "schema": {
  13080. "type": "object",
  13081. "properties": {
  13082. "data": {
  13083. "type": "array",
  13084. "items": {
  13085. "$ref": "#/components/schemas/PermissionV2Request"
  13086. }
  13087. }
  13088. },
  13089. "required": ["data"],
  13090. "additionalProperties": false
  13091. }
  13092. }
  13093. }
  13094. },
  13095. "400": {
  13096. "description": "InvalidRequestError",
  13097. "content": {
  13098. "application/json": {
  13099. "schema": {
  13100. "$ref": "#/components/schemas/InvalidRequestError"
  13101. }
  13102. }
  13103. }
  13104. },
  13105. "401": {
  13106. "description": "UnauthorizedError",
  13107. "content": {
  13108. "application/json": {
  13109. "schema": {
  13110. "$ref": "#/components/schemas/UnauthorizedError"
  13111. }
  13112. }
  13113. }
  13114. },
  13115. "404": {
  13116. "description": "SessionNotFoundError",
  13117. "content": {
  13118. "application/json": {
  13119. "schema": {
  13120. "anyOf": [
  13121. {
  13122. "$ref": "#/components/schemas/SessionNotFoundError"
  13123. },
  13124. {
  13125. "$ref": "#/components/schemas/SessionNotFoundError"
  13126. }
  13127. ]
  13128. }
  13129. }
  13130. }
  13131. }
  13132. },
  13133. "description": "Retrieve pending permission requests owned by a session.",
  13134. "summary": "List session permission requests",
  13135. "x-codeSamples": [
  13136. {
  13137. "lang": "js",
  13138. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.list({\n ...\n})"
  13139. }
  13140. ]
  13141. }
  13142. },
  13143. "/api/session/{sessionID}/permission/{requestID}": {
  13144. "get": {
  13145. "tags": ["permissions"],
  13146. "operationId": "v2.session.permission.get",
  13147. "parameters": [
  13148. {
  13149. "name": "sessionID",
  13150. "in": "path",
  13151. "schema": {
  13152. "type": "string",
  13153. "pattern": "^ses"
  13154. },
  13155. "required": true
  13156. },
  13157. {
  13158. "name": "requestID",
  13159. "in": "path",
  13160. "schema": {
  13161. "type": "string",
  13162. "pattern": "^per"
  13163. },
  13164. "required": true
  13165. }
  13166. ],
  13167. "security": [],
  13168. "responses": {
  13169. "200": {
  13170. "description": "Success",
  13171. "content": {
  13172. "application/json": {
  13173. "schema": {
  13174. "type": "object",
  13175. "properties": {
  13176. "data": {
  13177. "$ref": "#/components/schemas/PermissionV2Request"
  13178. }
  13179. },
  13180. "required": ["data"],
  13181. "additionalProperties": false
  13182. }
  13183. }
  13184. }
  13185. },
  13186. "400": {
  13187. "description": "InvalidRequestError",
  13188. "content": {
  13189. "application/json": {
  13190. "schema": {
  13191. "$ref": "#/components/schemas/InvalidRequestError"
  13192. }
  13193. }
  13194. }
  13195. },
  13196. "401": {
  13197. "description": "UnauthorizedError",
  13198. "content": {
  13199. "application/json": {
  13200. "schema": {
  13201. "$ref": "#/components/schemas/UnauthorizedError"
  13202. }
  13203. }
  13204. }
  13205. },
  13206. "404": {
  13207. "description": "SessionNotFoundError | PermissionNotFoundError",
  13208. "content": {
  13209. "application/json": {
  13210. "schema": {
  13211. "anyOf": [
  13212. {
  13213. "$ref": "#/components/schemas/PermissionNotFoundError"
  13214. },
  13215. {
  13216. "$ref": "#/components/schemas/SessionNotFoundError"
  13217. },
  13218. {
  13219. "$ref": "#/components/schemas/SessionNotFoundError"
  13220. }
  13221. ]
  13222. }
  13223. }
  13224. }
  13225. }
  13226. },
  13227. "description": "Retrieve a pending permission request owned by a session.",
  13228. "summary": "Get permission request",
  13229. "x-codeSamples": [
  13230. {
  13231. "lang": "js",
  13232. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.get({\n ...\n})"
  13233. }
  13234. ]
  13235. }
  13236. },
  13237. "/api/session/{sessionID}/permission/{requestID}/reply": {
  13238. "post": {
  13239. "tags": ["permissions"],
  13240. "operationId": "v2.session.permission.reply",
  13241. "parameters": [
  13242. {
  13243. "name": "sessionID",
  13244. "in": "path",
  13245. "schema": {
  13246. "type": "string",
  13247. "pattern": "^ses"
  13248. },
  13249. "required": true
  13250. },
  13251. {
  13252. "name": "requestID",
  13253. "in": "path",
  13254. "schema": {
  13255. "type": "string",
  13256. "pattern": "^per"
  13257. },
  13258. "required": true
  13259. }
  13260. ],
  13261. "security": [],
  13262. "responses": {
  13263. "204": {
  13264. "description": "<No Content>"
  13265. },
  13266. "400": {
  13267. "description": "InvalidRequestError",
  13268. "content": {
  13269. "application/json": {
  13270. "schema": {
  13271. "$ref": "#/components/schemas/InvalidRequestError"
  13272. }
  13273. }
  13274. }
  13275. },
  13276. "401": {
  13277. "description": "UnauthorizedError",
  13278. "content": {
  13279. "application/json": {
  13280. "schema": {
  13281. "$ref": "#/components/schemas/UnauthorizedError"
  13282. }
  13283. }
  13284. }
  13285. },
  13286. "404": {
  13287. "description": "SessionNotFoundError | PermissionNotFoundError",
  13288. "content": {
  13289. "application/json": {
  13290. "schema": {
  13291. "anyOf": [
  13292. {
  13293. "$ref": "#/components/schemas/PermissionNotFoundError"
  13294. },
  13295. {
  13296. "$ref": "#/components/schemas/SessionNotFoundError"
  13297. },
  13298. {
  13299. "$ref": "#/components/schemas/SessionNotFoundError"
  13300. }
  13301. ]
  13302. }
  13303. }
  13304. }
  13305. }
  13306. },
  13307. "description": "Respond to a pending permission request owned by a session.",
  13308. "summary": "Reply to pending permission request",
  13309. "requestBody": {
  13310. "content": {
  13311. "application/json": {
  13312. "schema": {
  13313. "type": "object",
  13314. "properties": {
  13315. "reply": {
  13316. "$ref": "#/components/schemas/PermissionV2Reply"
  13317. },
  13318. "message": {
  13319. "type": "string"
  13320. }
  13321. },
  13322. "required": ["reply"],
  13323. "additionalProperties": false
  13324. }
  13325. }
  13326. },
  13327. "required": true
  13328. },
  13329. "x-codeSamples": [
  13330. {
  13331. "lang": "js",
  13332. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.reply({\n ...\n})"
  13333. }
  13334. ]
  13335. }
  13336. },
  13337. "/api/fs/read/*": {
  13338. "get": {
  13339. "tags": ["filesystem"],
  13340. "operationId": "v2.fs.read",
  13341. "parameters": [
  13342. {
  13343. "name": "location",
  13344. "in": "query",
  13345. "schema": {
  13346. "type": "object",
  13347. "properties": {
  13348. "directory": {
  13349. "type": "string"
  13350. },
  13351. "workspace": {
  13352. "type": "string"
  13353. }
  13354. },
  13355. "additionalProperties": false
  13356. },
  13357. "required": false,
  13358. "style": "deepObject",
  13359. "explode": true
  13360. }
  13361. ],
  13362. "security": [],
  13363. "responses": {
  13364. "200": {
  13365. "description": "Success",
  13366. "content": {
  13367. "application/octet-stream": {
  13368. "schema": {
  13369. "type": "string",
  13370. "format": "binary"
  13371. }
  13372. }
  13373. }
  13374. },
  13375. "400": {
  13376. "description": "InvalidRequestError",
  13377. "content": {
  13378. "application/json": {
  13379. "schema": {
  13380. "$ref": "#/components/schemas/InvalidRequestError"
  13381. }
  13382. }
  13383. }
  13384. },
  13385. "401": {
  13386. "description": "UnauthorizedError",
  13387. "content": {
  13388. "application/json": {
  13389. "schema": {
  13390. "$ref": "#/components/schemas/UnauthorizedError"
  13391. }
  13392. }
  13393. }
  13394. }
  13395. },
  13396. "description": "Serve one file relative to the requested location.",
  13397. "summary": "Read file",
  13398. "x-codeSamples": [
  13399. {
  13400. "lang": "js",
  13401. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.read({\n ...\n})"
  13402. }
  13403. ]
  13404. }
  13405. },
  13406. "/api/fs/list": {
  13407. "get": {
  13408. "tags": ["filesystem"],
  13409. "operationId": "v2.fs.list",
  13410. "parameters": [
  13411. {
  13412. "name": "location",
  13413. "in": "query",
  13414. "schema": {
  13415. "type": "object",
  13416. "properties": {
  13417. "directory": {
  13418. "type": "string"
  13419. },
  13420. "workspace": {
  13421. "type": "string"
  13422. }
  13423. },
  13424. "additionalProperties": false
  13425. },
  13426. "required": false,
  13427. "style": "deepObject",
  13428. "explode": true
  13429. },
  13430. {
  13431. "name": "path",
  13432. "in": "query",
  13433. "schema": {
  13434. "type": "string"
  13435. },
  13436. "required": false
  13437. }
  13438. ],
  13439. "security": [],
  13440. "responses": {
  13441. "200": {
  13442. "description": "Success",
  13443. "content": {
  13444. "application/json": {
  13445. "schema": {
  13446. "type": "object",
  13447. "properties": {
  13448. "location": {
  13449. "$ref": "#/components/schemas/LocationInfo"
  13450. },
  13451. "data": {
  13452. "type": "array",
  13453. "items": {
  13454. "$ref": "#/components/schemas/FileSystemEntry"
  13455. }
  13456. }
  13457. },
  13458. "required": ["location", "data"],
  13459. "additionalProperties": false
  13460. }
  13461. }
  13462. }
  13463. },
  13464. "400": {
  13465. "description": "InvalidRequestError",
  13466. "content": {
  13467. "application/json": {
  13468. "schema": {
  13469. "$ref": "#/components/schemas/InvalidRequestError"
  13470. }
  13471. }
  13472. }
  13473. },
  13474. "401": {
  13475. "description": "UnauthorizedError",
  13476. "content": {
  13477. "application/json": {
  13478. "schema": {
  13479. "$ref": "#/components/schemas/UnauthorizedError"
  13480. }
  13481. }
  13482. }
  13483. }
  13484. },
  13485. "description": "List direct children of one directory relative to the requested location.",
  13486. "summary": "List directory",
  13487. "x-codeSamples": [
  13488. {
  13489. "lang": "js",
  13490. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.list({\n ...\n})"
  13491. }
  13492. ]
  13493. }
  13494. },
  13495. "/api/fs/find": {
  13496. "get": {
  13497. "tags": ["filesystem"],
  13498. "operationId": "v2.fs.find",
  13499. "parameters": [
  13500. {
  13501. "name": "location",
  13502. "in": "query",
  13503. "schema": {
  13504. "type": "object",
  13505. "properties": {
  13506. "directory": {
  13507. "type": "string"
  13508. },
  13509. "workspace": {
  13510. "type": "string"
  13511. }
  13512. },
  13513. "additionalProperties": false
  13514. },
  13515. "required": false,
  13516. "style": "deepObject",
  13517. "explode": true
  13518. },
  13519. {
  13520. "name": "query",
  13521. "in": "query",
  13522. "schema": {
  13523. "type": "string"
  13524. },
  13525. "required": true
  13526. },
  13527. {
  13528. "name": "type",
  13529. "in": "query",
  13530. "schema": {
  13531. "type": "string",
  13532. "enum": ["file", "directory"]
  13533. },
  13534. "required": false
  13535. },
  13536. {
  13537. "name": "limit",
  13538. "in": "query",
  13539. "schema": {
  13540. "type": "string"
  13541. },
  13542. "required": false
  13543. }
  13544. ],
  13545. "security": [],
  13546. "responses": {
  13547. "200": {
  13548. "description": "Success",
  13549. "content": {
  13550. "application/json": {
  13551. "schema": {
  13552. "type": "object",
  13553. "properties": {
  13554. "location": {
  13555. "$ref": "#/components/schemas/LocationInfo"
  13556. },
  13557. "data": {
  13558. "type": "array",
  13559. "items": {
  13560. "$ref": "#/components/schemas/FileSystemEntry"
  13561. }
  13562. }
  13563. },
  13564. "required": ["location", "data"],
  13565. "additionalProperties": false
  13566. }
  13567. }
  13568. }
  13569. },
  13570. "400": {
  13571. "description": "InvalidRequestError",
  13572. "content": {
  13573. "application/json": {
  13574. "schema": {
  13575. "$ref": "#/components/schemas/InvalidRequestError"
  13576. }
  13577. }
  13578. }
  13579. },
  13580. "401": {
  13581. "description": "UnauthorizedError",
  13582. "content": {
  13583. "application/json": {
  13584. "schema": {
  13585. "$ref": "#/components/schemas/UnauthorizedError"
  13586. }
  13587. }
  13588. }
  13589. }
  13590. },
  13591. "description": "Find recursively ranked filesystem entries relative to the requested location.",
  13592. "summary": "Find files",
  13593. "x-codeSamples": [
  13594. {
  13595. "lang": "js",
  13596. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.find({\n ...\n})"
  13597. }
  13598. ]
  13599. }
  13600. },
  13601. "/api/command": {
  13602. "get": {
  13603. "tags": ["commands"],
  13604. "operationId": "v2.command.list",
  13605. "parameters": [
  13606. {
  13607. "name": "location",
  13608. "in": "query",
  13609. "schema": {
  13610. "type": "object",
  13611. "properties": {
  13612. "directory": {
  13613. "type": "string"
  13614. },
  13615. "workspace": {
  13616. "type": "string"
  13617. }
  13618. },
  13619. "additionalProperties": false
  13620. },
  13621. "required": false,
  13622. "style": "deepObject",
  13623. "explode": true
  13624. }
  13625. ],
  13626. "security": [],
  13627. "responses": {
  13628. "200": {
  13629. "description": "Success",
  13630. "content": {
  13631. "application/json": {
  13632. "schema": {
  13633. "type": "object",
  13634. "properties": {
  13635. "location": {
  13636. "$ref": "#/components/schemas/LocationInfo"
  13637. },
  13638. "data": {
  13639. "type": "array",
  13640. "items": {
  13641. "$ref": "#/components/schemas/CommandV2Info"
  13642. }
  13643. }
  13644. },
  13645. "required": ["location", "data"],
  13646. "additionalProperties": false
  13647. }
  13648. }
  13649. }
  13650. },
  13651. "400": {
  13652. "description": "InvalidRequestError",
  13653. "content": {
  13654. "application/json": {
  13655. "schema": {
  13656. "$ref": "#/components/schemas/InvalidRequestError"
  13657. }
  13658. }
  13659. }
  13660. },
  13661. "401": {
  13662. "description": "UnauthorizedError",
  13663. "content": {
  13664. "application/json": {
  13665. "schema": {
  13666. "$ref": "#/components/schemas/UnauthorizedError"
  13667. }
  13668. }
  13669. }
  13670. }
  13671. },
  13672. "description": "Retrieve currently registered commands.",
  13673. "summary": "List commands",
  13674. "x-codeSamples": [
  13675. {
  13676. "lang": "js",
  13677. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.command.list({\n ...\n})"
  13678. }
  13679. ]
  13680. }
  13681. },
  13682. "/api/skill": {
  13683. "get": {
  13684. "tags": ["skills"],
  13685. "operationId": "v2.skill.list",
  13686. "parameters": [
  13687. {
  13688. "name": "location",
  13689. "in": "query",
  13690. "schema": {
  13691. "type": "object",
  13692. "properties": {
  13693. "directory": {
  13694. "type": "string"
  13695. },
  13696. "workspace": {
  13697. "type": "string"
  13698. }
  13699. },
  13700. "additionalProperties": false
  13701. },
  13702. "required": false,
  13703. "style": "deepObject",
  13704. "explode": true
  13705. }
  13706. ],
  13707. "security": [],
  13708. "responses": {
  13709. "200": {
  13710. "description": "Success",
  13711. "content": {
  13712. "application/json": {
  13713. "schema": {
  13714. "type": "object",
  13715. "properties": {
  13716. "location": {
  13717. "$ref": "#/components/schemas/LocationInfo"
  13718. },
  13719. "data": {
  13720. "type": "array",
  13721. "items": {
  13722. "$ref": "#/components/schemas/SkillV2Info"
  13723. }
  13724. }
  13725. },
  13726. "required": ["location", "data"],
  13727. "additionalProperties": false
  13728. }
  13729. }
  13730. }
  13731. },
  13732. "400": {
  13733. "description": "InvalidRequestError",
  13734. "content": {
  13735. "application/json": {
  13736. "schema": {
  13737. "$ref": "#/components/schemas/InvalidRequestError"
  13738. }
  13739. }
  13740. }
  13741. },
  13742. "401": {
  13743. "description": "UnauthorizedError",
  13744. "content": {
  13745. "application/json": {
  13746. "schema": {
  13747. "$ref": "#/components/schemas/UnauthorizedError"
  13748. }
  13749. }
  13750. }
  13751. }
  13752. },
  13753. "description": "Retrieve currently registered skills.",
  13754. "summary": "List skills",
  13755. "x-codeSamples": [
  13756. {
  13757. "lang": "js",
  13758. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.skill.list({\n ...\n})"
  13759. }
  13760. ]
  13761. }
  13762. },
  13763. "/api/event": {
  13764. "get": {
  13765. "tags": ["events"],
  13766. "operationId": "v2.event.subscribe",
  13767. "parameters": [],
  13768. "security": [],
  13769. "responses": {
  13770. "200": {
  13771. "description": "Event stream",
  13772. "content": {
  13773. "text/event-stream": {
  13774. "schema": {
  13775. "$ref": "#/components/schemas/V2Event"
  13776. }
  13777. }
  13778. }
  13779. },
  13780. "400": {
  13781. "description": "InvalidRequestError",
  13782. "content": {
  13783. "application/json": {
  13784. "schema": {
  13785. "$ref": "#/components/schemas/InvalidRequestError"
  13786. }
  13787. }
  13788. }
  13789. },
  13790. "401": {
  13791. "description": "UnauthorizedError",
  13792. "content": {
  13793. "application/json": {
  13794. "schema": {
  13795. "$ref": "#/components/schemas/UnauthorizedError"
  13796. }
  13797. }
  13798. }
  13799. }
  13800. },
  13801. "description": "Subscribe to native event payloads for the server.",
  13802. "summary": "Subscribe to events",
  13803. "x-codeSamples": [
  13804. {
  13805. "lang": "js",
  13806. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.event.subscribe({\n ...\n})"
  13807. }
  13808. ]
  13809. }
  13810. },
  13811. "/api/pty": {
  13812. "get": {
  13813. "tags": ["pty"],
  13814. "operationId": "v2.pty.list",
  13815. "parameters": [
  13816. {
  13817. "name": "location",
  13818. "in": "query",
  13819. "schema": {
  13820. "type": "object",
  13821. "properties": {
  13822. "directory": {
  13823. "type": "string"
  13824. },
  13825. "workspace": {
  13826. "type": "string"
  13827. }
  13828. },
  13829. "additionalProperties": false
  13830. },
  13831. "required": false,
  13832. "style": "deepObject",
  13833. "explode": true
  13834. }
  13835. ],
  13836. "security": [],
  13837. "responses": {
  13838. "200": {
  13839. "description": "Success",
  13840. "content": {
  13841. "application/json": {
  13842. "schema": {
  13843. "type": "object",
  13844. "properties": {
  13845. "location": {
  13846. "$ref": "#/components/schemas/LocationInfo"
  13847. },
  13848. "data": {
  13849. "type": "array",
  13850. "items": {
  13851. "$ref": "#/components/schemas/Pty"
  13852. }
  13853. }
  13854. },
  13855. "required": ["location", "data"],
  13856. "additionalProperties": false
  13857. }
  13858. }
  13859. }
  13860. },
  13861. "400": {
  13862. "description": "InvalidRequestError",
  13863. "content": {
  13864. "application/json": {
  13865. "schema": {
  13866. "$ref": "#/components/schemas/InvalidRequestError"
  13867. }
  13868. }
  13869. }
  13870. },
  13871. "401": {
  13872. "description": "UnauthorizedError",
  13873. "content": {
  13874. "application/json": {
  13875. "schema": {
  13876. "$ref": "#/components/schemas/UnauthorizedError"
  13877. }
  13878. }
  13879. }
  13880. }
  13881. },
  13882. "description": "List PTY sessions for a location, including exited sessions retained until removal.",
  13883. "summary": "List PTY sessions",
  13884. "x-codeSamples": [
  13885. {
  13886. "lang": "js",
  13887. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.list({\n ...\n})"
  13888. }
  13889. ]
  13890. },
  13891. "post": {
  13892. "tags": ["pty"],
  13893. "operationId": "v2.pty.create",
  13894. "parameters": [
  13895. {
  13896. "name": "location",
  13897. "in": "query",
  13898. "schema": {
  13899. "type": "object",
  13900. "properties": {
  13901. "directory": {
  13902. "type": "string"
  13903. },
  13904. "workspace": {
  13905. "type": "string"
  13906. }
  13907. },
  13908. "additionalProperties": false
  13909. },
  13910. "required": false,
  13911. "style": "deepObject",
  13912. "explode": true
  13913. }
  13914. ],
  13915. "security": [],
  13916. "responses": {
  13917. "200": {
  13918. "description": "Success",
  13919. "content": {
  13920. "application/json": {
  13921. "schema": {
  13922. "type": "object",
  13923. "properties": {
  13924. "location": {
  13925. "$ref": "#/components/schemas/LocationInfo"
  13926. },
  13927. "data": {
  13928. "$ref": "#/components/schemas/Pty"
  13929. }
  13930. },
  13931. "required": ["location", "data"],
  13932. "additionalProperties": false
  13933. }
  13934. }
  13935. }
  13936. },
  13937. "400": {
  13938. "description": "InvalidRequestError",
  13939. "content": {
  13940. "application/json": {
  13941. "schema": {
  13942. "$ref": "#/components/schemas/InvalidRequestError"
  13943. }
  13944. }
  13945. }
  13946. },
  13947. "401": {
  13948. "description": "UnauthorizedError",
  13949. "content": {
  13950. "application/json": {
  13951. "schema": {
  13952. "$ref": "#/components/schemas/UnauthorizedError"
  13953. }
  13954. }
  13955. }
  13956. }
  13957. },
  13958. "description": "Create a pseudo-terminal session for a location.",
  13959. "summary": "Create PTY session",
  13960. "requestBody": {
  13961. "content": {
  13962. "application/json": {
  13963. "schema": {
  13964. "type": "object",
  13965. "properties": {
  13966. "command": {
  13967. "type": "string"
  13968. },
  13969. "args": {
  13970. "type": "array",
  13971. "items": {
  13972. "type": "string"
  13973. }
  13974. },
  13975. "cwd": {
  13976. "type": "string"
  13977. },
  13978. "title": {
  13979. "type": "string"
  13980. },
  13981. "env": {
  13982. "type": "object",
  13983. "additionalProperties": {
  13984. "type": "string"
  13985. }
  13986. }
  13987. },
  13988. "additionalProperties": false
  13989. }
  13990. }
  13991. },
  13992. "required": true
  13993. },
  13994. "x-codeSamples": [
  13995. {
  13996. "lang": "js",
  13997. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.create({\n ...\n})"
  13998. }
  13999. ]
  14000. }
  14001. },
  14002. "/api/pty/{ptyID}": {
  14003. "get": {
  14004. "tags": ["pty"],
  14005. "operationId": "v2.pty.get",
  14006. "parameters": [
  14007. {
  14008. "name": "ptyID",
  14009. "in": "path",
  14010. "schema": {
  14011. "type": "string",
  14012. "pattern": "^pty"
  14013. },
  14014. "required": true
  14015. },
  14016. {
  14017. "name": "location",
  14018. "in": "query",
  14019. "schema": {
  14020. "type": "object",
  14021. "properties": {
  14022. "directory": {
  14023. "type": "string"
  14024. },
  14025. "workspace": {
  14026. "type": "string"
  14027. }
  14028. },
  14029. "additionalProperties": false
  14030. },
  14031. "required": false,
  14032. "style": "deepObject",
  14033. "explode": true
  14034. }
  14035. ],
  14036. "security": [],
  14037. "responses": {
  14038. "200": {
  14039. "description": "Success",
  14040. "content": {
  14041. "application/json": {
  14042. "schema": {
  14043. "type": "object",
  14044. "properties": {
  14045. "location": {
  14046. "$ref": "#/components/schemas/LocationInfo"
  14047. },
  14048. "data": {
  14049. "$ref": "#/components/schemas/Pty"
  14050. }
  14051. },
  14052. "required": ["location", "data"],
  14053. "additionalProperties": false
  14054. }
  14055. }
  14056. }
  14057. },
  14058. "400": {
  14059. "description": "InvalidRequestError",
  14060. "content": {
  14061. "application/json": {
  14062. "schema": {
  14063. "$ref": "#/components/schemas/InvalidRequestError"
  14064. }
  14065. }
  14066. }
  14067. },
  14068. "401": {
  14069. "description": "UnauthorizedError",
  14070. "content": {
  14071. "application/json": {
  14072. "schema": {
  14073. "$ref": "#/components/schemas/UnauthorizedError"
  14074. }
  14075. }
  14076. }
  14077. },
  14078. "404": {
  14079. "description": "PtyNotFoundError",
  14080. "content": {
  14081. "application/json": {
  14082. "schema": {
  14083. "$ref": "#/components/schemas/PtyNotFoundError"
  14084. }
  14085. }
  14086. }
  14087. }
  14088. },
  14089. "description": "Get one PTY session, including its exit code once exited.",
  14090. "summary": "Get PTY session",
  14091. "x-codeSamples": [
  14092. {
  14093. "lang": "js",
  14094. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.get({\n ...\n})"
  14095. }
  14096. ]
  14097. },
  14098. "put": {
  14099. "tags": ["pty"],
  14100. "operationId": "v2.pty.update",
  14101. "parameters": [
  14102. {
  14103. "name": "ptyID",
  14104. "in": "path",
  14105. "schema": {
  14106. "type": "string",
  14107. "pattern": "^pty"
  14108. },
  14109. "required": true
  14110. },
  14111. {
  14112. "name": "location",
  14113. "in": "query",
  14114. "schema": {
  14115. "type": "object",
  14116. "properties": {
  14117. "directory": {
  14118. "type": "string"
  14119. },
  14120. "workspace": {
  14121. "type": "string"
  14122. }
  14123. },
  14124. "additionalProperties": false
  14125. },
  14126. "required": false,
  14127. "style": "deepObject",
  14128. "explode": true
  14129. }
  14130. ],
  14131. "security": [],
  14132. "responses": {
  14133. "200": {
  14134. "description": "Success",
  14135. "content": {
  14136. "application/json": {
  14137. "schema": {
  14138. "type": "object",
  14139. "properties": {
  14140. "location": {
  14141. "$ref": "#/components/schemas/LocationInfo"
  14142. },
  14143. "data": {
  14144. "$ref": "#/components/schemas/Pty"
  14145. }
  14146. },
  14147. "required": ["location", "data"],
  14148. "additionalProperties": false
  14149. }
  14150. }
  14151. }
  14152. },
  14153. "400": {
  14154. "description": "InvalidRequestError",
  14155. "content": {
  14156. "application/json": {
  14157. "schema": {
  14158. "$ref": "#/components/schemas/InvalidRequestError"
  14159. }
  14160. }
  14161. }
  14162. },
  14163. "401": {
  14164. "description": "UnauthorizedError",
  14165. "content": {
  14166. "application/json": {
  14167. "schema": {
  14168. "$ref": "#/components/schemas/UnauthorizedError"
  14169. }
  14170. }
  14171. }
  14172. },
  14173. "404": {
  14174. "description": "PtyNotFoundError",
  14175. "content": {
  14176. "application/json": {
  14177. "schema": {
  14178. "$ref": "#/components/schemas/PtyNotFoundError"
  14179. }
  14180. }
  14181. }
  14182. }
  14183. },
  14184. "description": "Update the title or viewport size of one PTY session.",
  14185. "summary": "Update PTY session",
  14186. "requestBody": {
  14187. "content": {
  14188. "application/json": {
  14189. "schema": {
  14190. "type": "object",
  14191. "properties": {
  14192. "title": {
  14193. "type": "string"
  14194. },
  14195. "size": {
  14196. "type": "object",
  14197. "properties": {
  14198. "rows": {
  14199. "type": "integer",
  14200. "exclusiveMinimum": 0
  14201. },
  14202. "cols": {
  14203. "type": "integer",
  14204. "exclusiveMinimum": 0
  14205. }
  14206. },
  14207. "required": ["rows", "cols"],
  14208. "additionalProperties": false
  14209. }
  14210. },
  14211. "additionalProperties": false
  14212. }
  14213. }
  14214. },
  14215. "required": true
  14216. },
  14217. "x-codeSamples": [
  14218. {
  14219. "lang": "js",
  14220. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.update({\n ...\n})"
  14221. }
  14222. ]
  14223. },
  14224. "delete": {
  14225. "tags": ["pty"],
  14226. "operationId": "v2.pty.remove",
  14227. "parameters": [
  14228. {
  14229. "name": "ptyID",
  14230. "in": "path",
  14231. "schema": {
  14232. "type": "string",
  14233. "pattern": "^pty"
  14234. },
  14235. "required": true
  14236. },
  14237. {
  14238. "name": "location",
  14239. "in": "query",
  14240. "schema": {
  14241. "type": "object",
  14242. "properties": {
  14243. "directory": {
  14244. "type": "string"
  14245. },
  14246. "workspace": {
  14247. "type": "string"
  14248. }
  14249. },
  14250. "additionalProperties": false
  14251. },
  14252. "required": false,
  14253. "style": "deepObject",
  14254. "explode": true
  14255. }
  14256. ],
  14257. "security": [],
  14258. "responses": {
  14259. "204": {
  14260. "description": "<No Content>"
  14261. },
  14262. "400": {
  14263. "description": "InvalidRequestError",
  14264. "content": {
  14265. "application/json": {
  14266. "schema": {
  14267. "$ref": "#/components/schemas/InvalidRequestError"
  14268. }
  14269. }
  14270. }
  14271. },
  14272. "401": {
  14273. "description": "UnauthorizedError",
  14274. "content": {
  14275. "application/json": {
  14276. "schema": {
  14277. "$ref": "#/components/schemas/UnauthorizedError"
  14278. }
  14279. }
  14280. }
  14281. },
  14282. "404": {
  14283. "description": "PtyNotFoundError",
  14284. "content": {
  14285. "application/json": {
  14286. "schema": {
  14287. "$ref": "#/components/schemas/PtyNotFoundError"
  14288. }
  14289. }
  14290. }
  14291. }
  14292. },
  14293. "description": "Terminate and remove one PTY session.",
  14294. "summary": "Remove PTY session",
  14295. "x-codeSamples": [
  14296. {
  14297. "lang": "js",
  14298. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.remove({\n ...\n})"
  14299. }
  14300. ]
  14301. }
  14302. },
  14303. "/api/pty/{ptyID}/connect-token": {
  14304. "post": {
  14305. "tags": ["pty"],
  14306. "operationId": "v2.pty.connectToken",
  14307. "parameters": [
  14308. {
  14309. "name": "ptyID",
  14310. "in": "path",
  14311. "schema": {
  14312. "type": "string",
  14313. "pattern": "^pty"
  14314. },
  14315. "required": true
  14316. },
  14317. {
  14318. "name": "location",
  14319. "in": "query",
  14320. "schema": {
  14321. "type": "object",
  14322. "properties": {
  14323. "directory": {
  14324. "type": "string"
  14325. },
  14326. "workspace": {
  14327. "type": "string"
  14328. }
  14329. },
  14330. "additionalProperties": false
  14331. },
  14332. "required": false,
  14333. "style": "deepObject",
  14334. "explode": true
  14335. }
  14336. ],
  14337. "security": [],
  14338. "responses": {
  14339. "200": {
  14340. "description": "Success",
  14341. "content": {
  14342. "application/json": {
  14343. "schema": {
  14344. "type": "object",
  14345. "properties": {
  14346. "location": {
  14347. "$ref": "#/components/schemas/LocationInfo"
  14348. },
  14349. "data": {
  14350. "$ref": "#/components/schemas/PtyTicketConnectToken"
  14351. }
  14352. },
  14353. "required": ["location", "data"],
  14354. "additionalProperties": false
  14355. }
  14356. }
  14357. }
  14358. },
  14359. "400": {
  14360. "description": "InvalidRequestError",
  14361. "content": {
  14362. "application/json": {
  14363. "schema": {
  14364. "$ref": "#/components/schemas/InvalidRequestError"
  14365. }
  14366. }
  14367. }
  14368. },
  14369. "401": {
  14370. "description": "UnauthorizedError",
  14371. "content": {
  14372. "application/json": {
  14373. "schema": {
  14374. "$ref": "#/components/schemas/UnauthorizedError"
  14375. }
  14376. }
  14377. }
  14378. },
  14379. "403": {
  14380. "description": "ForbiddenError",
  14381. "content": {
  14382. "application/json": {
  14383. "schema": {
  14384. "$ref": "#/components/schemas/ForbiddenError"
  14385. }
  14386. }
  14387. }
  14388. },
  14389. "404": {
  14390. "description": "PtyNotFoundError",
  14391. "content": {
  14392. "application/json": {
  14393. "schema": {
  14394. "$ref": "#/components/schemas/PtyNotFoundError"
  14395. }
  14396. }
  14397. }
  14398. }
  14399. },
  14400. "description": "Create a short-lived single-use ticket for opening a PTY WebSocket connection.",
  14401. "summary": "Create PTY WebSocket token",
  14402. "x-codeSamples": [
  14403. {
  14404. "lang": "js",
  14405. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.connectToken({\n ...\n})"
  14406. }
  14407. ]
  14408. }
  14409. },
  14410. "/api/pty/{ptyID}/connect": {
  14411. "get": {
  14412. "tags": ["pty"],
  14413. "operationId": "v2.pty.connect",
  14414. "parameters": [
  14415. {
  14416. "name": "ptyID",
  14417. "in": "path",
  14418. "schema": {
  14419. "type": "string",
  14420. "pattern": "^pty"
  14421. },
  14422. "required": true
  14423. },
  14424. {
  14425. "in": "query",
  14426. "name": "location[directory]",
  14427. "schema": {
  14428. "type": "string"
  14429. }
  14430. },
  14431. {
  14432. "in": "query",
  14433. "name": "location[workspace]",
  14434. "schema": {
  14435. "type": "string"
  14436. }
  14437. },
  14438. {
  14439. "in": "query",
  14440. "name": "cursor",
  14441. "schema": {
  14442. "type": "string"
  14443. }
  14444. },
  14445. {
  14446. "in": "query",
  14447. "name": "ticket",
  14448. "schema": {
  14449. "type": "string"
  14450. }
  14451. }
  14452. ],
  14453. "security": [],
  14454. "responses": {
  14455. "200": {
  14456. "description": "Success",
  14457. "content": {
  14458. "application/json": {
  14459. "schema": {
  14460. "type": "boolean"
  14461. }
  14462. }
  14463. }
  14464. },
  14465. "400": {
  14466. "description": "InvalidRequestError",
  14467. "content": {
  14468. "application/json": {
  14469. "schema": {
  14470. "$ref": "#/components/schemas/InvalidRequestError"
  14471. }
  14472. }
  14473. }
  14474. },
  14475. "401": {
  14476. "description": "UnauthorizedError",
  14477. "content": {
  14478. "application/json": {
  14479. "schema": {
  14480. "$ref": "#/components/schemas/UnauthorizedError"
  14481. }
  14482. }
  14483. }
  14484. },
  14485. "403": {
  14486. "description": "ForbiddenError",
  14487. "content": {
  14488. "application/json": {
  14489. "schema": {
  14490. "$ref": "#/components/schemas/ForbiddenError"
  14491. }
  14492. }
  14493. }
  14494. },
  14495. "404": {
  14496. "description": "PtyNotFoundError",
  14497. "content": {
  14498. "application/json": {
  14499. "schema": {
  14500. "$ref": "#/components/schemas/PtyNotFoundError"
  14501. }
  14502. }
  14503. }
  14504. }
  14505. },
  14506. "description": "Establish a WebSocket connection streaming PTY output and accepting terminal input.",
  14507. "summary": "Connect to PTY session",
  14508. "x-codeSamples": [
  14509. {
  14510. "lang": "js",
  14511. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.connect({\n ...\n})"
  14512. }
  14513. ]
  14514. }
  14515. },
  14516. "/api/question/request": {
  14517. "get": {
  14518. "tags": ["session questions"],
  14519. "operationId": "v2.question.request.list",
  14520. "parameters": [
  14521. {
  14522. "name": "location",
  14523. "in": "query",
  14524. "schema": {
  14525. "type": "object",
  14526. "properties": {
  14527. "directory": {
  14528. "type": "string"
  14529. },
  14530. "workspace": {
  14531. "type": "string"
  14532. }
  14533. },
  14534. "additionalProperties": false
  14535. },
  14536. "required": false,
  14537. "style": "deepObject",
  14538. "explode": true
  14539. }
  14540. ],
  14541. "security": [],
  14542. "responses": {
  14543. "200": {
  14544. "description": "Success",
  14545. "content": {
  14546. "application/json": {
  14547. "schema": {
  14548. "type": "object",
  14549. "properties": {
  14550. "location": {
  14551. "$ref": "#/components/schemas/LocationInfo"
  14552. },
  14553. "data": {
  14554. "type": "array",
  14555. "items": {
  14556. "$ref": "#/components/schemas/QuestionV2Request"
  14557. }
  14558. }
  14559. },
  14560. "required": ["location", "data"],
  14561. "additionalProperties": false
  14562. }
  14563. }
  14564. }
  14565. },
  14566. "400": {
  14567. "description": "InvalidRequestError",
  14568. "content": {
  14569. "application/json": {
  14570. "schema": {
  14571. "$ref": "#/components/schemas/InvalidRequestError"
  14572. }
  14573. }
  14574. }
  14575. },
  14576. "401": {
  14577. "description": "UnauthorizedError",
  14578. "content": {
  14579. "application/json": {
  14580. "schema": {
  14581. "$ref": "#/components/schemas/UnauthorizedError"
  14582. }
  14583. }
  14584. }
  14585. }
  14586. },
  14587. "description": "Retrieve pending question requests for a location.",
  14588. "summary": "List pending question requests",
  14589. "x-codeSamples": [
  14590. {
  14591. "lang": "js",
  14592. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.question.request.list({\n ...\n})"
  14593. }
  14594. ]
  14595. }
  14596. },
  14597. "/api/session/{sessionID}/question": {
  14598. "get": {
  14599. "tags": ["session questions"],
  14600. "operationId": "v2.session.question.list",
  14601. "parameters": [
  14602. {
  14603. "name": "sessionID",
  14604. "in": "path",
  14605. "schema": {
  14606. "type": "string",
  14607. "pattern": "^ses"
  14608. },
  14609. "required": true
  14610. }
  14611. ],
  14612. "security": [],
  14613. "responses": {
  14614. "200": {
  14615. "description": "Success",
  14616. "content": {
  14617. "application/json": {
  14618. "schema": {
  14619. "type": "object",
  14620. "properties": {
  14621. "data": {
  14622. "type": "array",
  14623. "items": {
  14624. "$ref": "#/components/schemas/QuestionV2Request"
  14625. }
  14626. }
  14627. },
  14628. "required": ["data"],
  14629. "additionalProperties": false
  14630. }
  14631. }
  14632. }
  14633. },
  14634. "400": {
  14635. "description": "InvalidRequestError",
  14636. "content": {
  14637. "application/json": {
  14638. "schema": {
  14639. "$ref": "#/components/schemas/InvalidRequestError"
  14640. }
  14641. }
  14642. }
  14643. },
  14644. "401": {
  14645. "description": "UnauthorizedError",
  14646. "content": {
  14647. "application/json": {
  14648. "schema": {
  14649. "$ref": "#/components/schemas/UnauthorizedError"
  14650. }
  14651. }
  14652. }
  14653. },
  14654. "404": {
  14655. "description": "SessionNotFoundError",
  14656. "content": {
  14657. "application/json": {
  14658. "schema": {
  14659. "anyOf": [
  14660. {
  14661. "$ref": "#/components/schemas/SessionNotFoundError"
  14662. },
  14663. {
  14664. "$ref": "#/components/schemas/SessionNotFoundError"
  14665. }
  14666. ]
  14667. }
  14668. }
  14669. }
  14670. }
  14671. },
  14672. "description": "Retrieve pending question requests owned by a session.",
  14673. "summary": "List session question requests",
  14674. "x-codeSamples": [
  14675. {
  14676. "lang": "js",
  14677. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.list({\n ...\n})"
  14678. }
  14679. ]
  14680. }
  14681. },
  14682. "/api/session/{sessionID}/question/{requestID}/reply": {
  14683. "post": {
  14684. "tags": ["session questions"],
  14685. "operationId": "v2.session.question.reply",
  14686. "parameters": [
  14687. {
  14688. "name": "sessionID",
  14689. "in": "path",
  14690. "schema": {
  14691. "type": "string",
  14692. "pattern": "^ses"
  14693. },
  14694. "required": true
  14695. },
  14696. {
  14697. "name": "requestID",
  14698. "in": "path",
  14699. "schema": {
  14700. "type": "string",
  14701. "pattern": "^que"
  14702. },
  14703. "required": true
  14704. }
  14705. ],
  14706. "security": [],
  14707. "responses": {
  14708. "204": {
  14709. "description": "<No Content>"
  14710. },
  14711. "400": {
  14712. "description": "InvalidRequestError",
  14713. "content": {
  14714. "application/json": {
  14715. "schema": {
  14716. "$ref": "#/components/schemas/InvalidRequestError"
  14717. }
  14718. }
  14719. }
  14720. },
  14721. "401": {
  14722. "description": "UnauthorizedError",
  14723. "content": {
  14724. "application/json": {
  14725. "schema": {
  14726. "$ref": "#/components/schemas/UnauthorizedError"
  14727. }
  14728. }
  14729. }
  14730. },
  14731. "404": {
  14732. "description": "SessionNotFoundError | QuestionNotFoundError",
  14733. "content": {
  14734. "application/json": {
  14735. "schema": {
  14736. "anyOf": [
  14737. {
  14738. "$ref": "#/components/schemas/QuestionNotFoundError"
  14739. },
  14740. {
  14741. "$ref": "#/components/schemas/SessionNotFoundError"
  14742. },
  14743. {
  14744. "$ref": "#/components/schemas/SessionNotFoundError"
  14745. }
  14746. ]
  14747. }
  14748. }
  14749. }
  14750. }
  14751. },
  14752. "description": "Answer a pending question request owned by a session.",
  14753. "summary": "Reply to pending question request",
  14754. "requestBody": {
  14755. "content": {
  14756. "application/json": {
  14757. "schema": {
  14758. "$ref": "#/components/schemas/QuestionV2Reply"
  14759. }
  14760. }
  14761. },
  14762. "required": true
  14763. },
  14764. "x-codeSamples": [
  14765. {
  14766. "lang": "js",
  14767. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reply({\n ...\n})"
  14768. }
  14769. ]
  14770. }
  14771. },
  14772. "/api/session/{sessionID}/question/{requestID}/reject": {
  14773. "post": {
  14774. "tags": ["session questions"],
  14775. "operationId": "v2.session.question.reject",
  14776. "parameters": [
  14777. {
  14778. "name": "sessionID",
  14779. "in": "path",
  14780. "schema": {
  14781. "type": "string",
  14782. "pattern": "^ses"
  14783. },
  14784. "required": true
  14785. },
  14786. {
  14787. "name": "requestID",
  14788. "in": "path",
  14789. "schema": {
  14790. "type": "string",
  14791. "pattern": "^que"
  14792. },
  14793. "required": true
  14794. }
  14795. ],
  14796. "security": [],
  14797. "responses": {
  14798. "204": {
  14799. "description": "<No Content>"
  14800. },
  14801. "400": {
  14802. "description": "InvalidRequestError",
  14803. "content": {
  14804. "application/json": {
  14805. "schema": {
  14806. "$ref": "#/components/schemas/InvalidRequestError"
  14807. }
  14808. }
  14809. }
  14810. },
  14811. "401": {
  14812. "description": "UnauthorizedError",
  14813. "content": {
  14814. "application/json": {
  14815. "schema": {
  14816. "$ref": "#/components/schemas/UnauthorizedError"
  14817. }
  14818. }
  14819. }
  14820. },
  14821. "404": {
  14822. "description": "SessionNotFoundError | QuestionNotFoundError",
  14823. "content": {
  14824. "application/json": {
  14825. "schema": {
  14826. "anyOf": [
  14827. {
  14828. "$ref": "#/components/schemas/QuestionNotFoundError"
  14829. },
  14830. {
  14831. "$ref": "#/components/schemas/SessionNotFoundError"
  14832. },
  14833. {
  14834. "$ref": "#/components/schemas/SessionNotFoundError"
  14835. }
  14836. ]
  14837. }
  14838. }
  14839. }
  14840. }
  14841. },
  14842. "description": "Reject a pending question request owned by a session.",
  14843. "summary": "Reject pending question request",
  14844. "x-codeSamples": [
  14845. {
  14846. "lang": "js",
  14847. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reject({\n ...\n})"
  14848. }
  14849. ]
  14850. }
  14851. },
  14852. "/api/reference": {
  14853. "get": {
  14854. "tags": ["reference"],
  14855. "operationId": "v2.reference.list",
  14856. "parameters": [
  14857. {
  14858. "name": "location",
  14859. "in": "query",
  14860. "schema": {
  14861. "type": "object",
  14862. "properties": {
  14863. "directory": {
  14864. "type": "string"
  14865. },
  14866. "workspace": {
  14867. "type": "string"
  14868. }
  14869. },
  14870. "additionalProperties": false
  14871. },
  14872. "required": false,
  14873. "style": "deepObject",
  14874. "explode": true
  14875. }
  14876. ],
  14877. "security": [],
  14878. "responses": {
  14879. "200": {
  14880. "description": "Success",
  14881. "content": {
  14882. "application/json": {
  14883. "schema": {
  14884. "type": "object",
  14885. "properties": {
  14886. "location": {
  14887. "$ref": "#/components/schemas/LocationInfo"
  14888. },
  14889. "data": {
  14890. "type": "array",
  14891. "items": {
  14892. "$ref": "#/components/schemas/ReferenceInfo"
  14893. }
  14894. }
  14895. },
  14896. "required": ["location", "data"],
  14897. "additionalProperties": false
  14898. }
  14899. }
  14900. }
  14901. },
  14902. "400": {
  14903. "description": "InvalidRequestError",
  14904. "content": {
  14905. "application/json": {
  14906. "schema": {
  14907. "$ref": "#/components/schemas/InvalidRequestError"
  14908. }
  14909. }
  14910. }
  14911. },
  14912. "401": {
  14913. "description": "UnauthorizedError",
  14914. "content": {
  14915. "application/json": {
  14916. "schema": {
  14917. "$ref": "#/components/schemas/UnauthorizedError"
  14918. }
  14919. }
  14920. }
  14921. }
  14922. },
  14923. "description": "List references available in the requested location.",
  14924. "summary": "List references",
  14925. "x-codeSamples": [
  14926. {
  14927. "lang": "js",
  14928. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.reference.list({\n ...\n})"
  14929. }
  14930. ]
  14931. }
  14932. },
  14933. "/experimental/project/{projectID}/copy": {
  14934. "post": {
  14935. "tags": ["projectCopy"],
  14936. "operationId": "v2.projectCopy.create",
  14937. "parameters": [
  14938. {
  14939. "name": "projectID",
  14940. "in": "path",
  14941. "schema": {
  14942. "type": "string"
  14943. },
  14944. "required": true
  14945. },
  14946. {
  14947. "name": "location",
  14948. "in": "query",
  14949. "schema": {
  14950. "type": "object",
  14951. "properties": {
  14952. "directory": {
  14953. "type": "string"
  14954. },
  14955. "workspace": {
  14956. "type": "string"
  14957. }
  14958. },
  14959. "additionalProperties": false
  14960. },
  14961. "required": false,
  14962. "style": "deepObject",
  14963. "explode": true
  14964. }
  14965. ],
  14966. "responses": {
  14967. "200": {
  14968. "description": "ProjectCopy.Copy",
  14969. "content": {
  14970. "application/json": {
  14971. "schema": {
  14972. "$ref": "#/components/schemas/ProjectCopyCopy"
  14973. }
  14974. }
  14975. }
  14976. },
  14977. "400": {
  14978. "description": "ProjectCopyError | InvalidRequestError",
  14979. "content": {
  14980. "application/json": {
  14981. "schema": {
  14982. "anyOf": [
  14983. {
  14984. "$ref": "#/components/schemas/ProjectCopyError"
  14985. },
  14986. {
  14987. "$ref": "#/components/schemas/InvalidRequestError"
  14988. }
  14989. ]
  14990. }
  14991. }
  14992. }
  14993. }
  14994. },
  14995. "requestBody": {
  14996. "content": {
  14997. "application/json": {
  14998. "schema": {
  14999. "type": "object",
  15000. "properties": {
  15001. "strategy": {
  15002. "type": "string"
  15003. },
  15004. "directory": {
  15005. "type": "string"
  15006. },
  15007. "name": {
  15008. "type": "string"
  15009. }
  15010. },
  15011. "required": ["strategy", "directory"],
  15012. "additionalProperties": false
  15013. }
  15014. }
  15015. }
  15016. },
  15017. "x-codeSamples": [
  15018. {
  15019. "lang": "js",
  15020. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.create({\n ...\n})"
  15021. }
  15022. ]
  15023. },
  15024. "delete": {
  15025. "tags": ["projectCopy"],
  15026. "operationId": "v2.projectCopy.remove",
  15027. "parameters": [
  15028. {
  15029. "name": "projectID",
  15030. "in": "path",
  15031. "schema": {
  15032. "type": "string"
  15033. },
  15034. "required": true
  15035. },
  15036. {
  15037. "name": "location",
  15038. "in": "query",
  15039. "schema": {
  15040. "type": "object",
  15041. "properties": {
  15042. "directory": {
  15043. "type": "string"
  15044. },
  15045. "workspace": {
  15046. "type": "string"
  15047. }
  15048. },
  15049. "additionalProperties": false
  15050. },
  15051. "required": false,
  15052. "style": "deepObject",
  15053. "explode": true
  15054. }
  15055. ],
  15056. "responses": {
  15057. "204": {
  15058. "description": "<No Content>"
  15059. },
  15060. "400": {
  15061. "description": "ProjectCopyError | InvalidRequestError",
  15062. "content": {
  15063. "application/json": {
  15064. "schema": {
  15065. "anyOf": [
  15066. {
  15067. "$ref": "#/components/schemas/ProjectCopyError"
  15068. },
  15069. {
  15070. "$ref": "#/components/schemas/InvalidRequestError"
  15071. }
  15072. ]
  15073. }
  15074. }
  15075. }
  15076. }
  15077. },
  15078. "requestBody": {
  15079. "content": {
  15080. "application/json": {
  15081. "schema": {
  15082. "type": "object",
  15083. "properties": {
  15084. "directory": {
  15085. "type": "string"
  15086. },
  15087. "force": {
  15088. "type": "boolean"
  15089. }
  15090. },
  15091. "required": ["directory", "force"],
  15092. "additionalProperties": false
  15093. }
  15094. }
  15095. }
  15096. },
  15097. "x-codeSamples": [
  15098. {
  15099. "lang": "js",
  15100. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.remove({\n ...\n})"
  15101. }
  15102. ]
  15103. }
  15104. },
  15105. "/experimental/project/{projectID}/copy/refresh": {
  15106. "post": {
  15107. "tags": ["projectCopy"],
  15108. "operationId": "v2.projectCopy.refresh",
  15109. "parameters": [
  15110. {
  15111. "name": "projectID",
  15112. "in": "path",
  15113. "schema": {
  15114. "type": "string"
  15115. },
  15116. "required": true
  15117. },
  15118. {
  15119. "name": "location",
  15120. "in": "query",
  15121. "schema": {
  15122. "type": "object",
  15123. "properties": {
  15124. "directory": {
  15125. "type": "string"
  15126. },
  15127. "workspace": {
  15128. "type": "string"
  15129. }
  15130. },
  15131. "additionalProperties": false
  15132. },
  15133. "required": false,
  15134. "style": "deepObject",
  15135. "explode": true
  15136. }
  15137. ],
  15138. "responses": {
  15139. "204": {
  15140. "description": "<No Content>"
  15141. },
  15142. "400": {
  15143. "description": "ProjectCopyError | InvalidRequestError",
  15144. "content": {
  15145. "application/json": {
  15146. "schema": {
  15147. "anyOf": [
  15148. {
  15149. "$ref": "#/components/schemas/ProjectCopyError"
  15150. },
  15151. {
  15152. "$ref": "#/components/schemas/InvalidRequestError"
  15153. }
  15154. ]
  15155. }
  15156. }
  15157. }
  15158. }
  15159. },
  15160. "x-codeSamples": [
  15161. {
  15162. "lang": "js",
  15163. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.refresh({\n ...\n})"
  15164. }
  15165. ]
  15166. }
  15167. },
  15168. "/pty/{ptyID}/connect": {
  15169. "get": {
  15170. "tags": ["pty"],
  15171. "operationId": "pty.connect",
  15172. "parameters": [
  15173. {
  15174. "name": "ptyID",
  15175. "in": "path",
  15176. "schema": {
  15177. "type": "string",
  15178. "pattern": "^pty"
  15179. },
  15180. "required": true
  15181. },
  15182. {
  15183. "in": "query",
  15184. "name": "directory",
  15185. "schema": {
  15186. "type": "string"
  15187. }
  15188. },
  15189. {
  15190. "in": "query",
  15191. "name": "workspace",
  15192. "schema": {
  15193. "type": "string"
  15194. }
  15195. },
  15196. {
  15197. "in": "query",
  15198. "name": "cursor",
  15199. "schema": {
  15200. "type": "string"
  15201. }
  15202. },
  15203. {
  15204. "in": "query",
  15205. "name": "ticket",
  15206. "schema": {
  15207. "type": "string"
  15208. }
  15209. }
  15210. ],
  15211. "responses": {
  15212. "200": {
  15213. "description": "Connected session",
  15214. "content": {
  15215. "application/json": {
  15216. "schema": {
  15217. "type": "boolean",
  15218. "description": "Connected session"
  15219. }
  15220. }
  15221. }
  15222. },
  15223. "403": {
  15224. "description": "Forbidden",
  15225. "content": {
  15226. "application/json": {
  15227. "schema": {
  15228. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  15229. }
  15230. }
  15231. }
  15232. },
  15233. "404": {
  15234. "description": "Not found",
  15235. "content": {
  15236. "application/json": {
  15237. "schema": {
  15238. "$ref": "#/components/schemas/NotFoundError"
  15239. }
  15240. }
  15241. }
  15242. }
  15243. },
  15244. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  15245. "summary": "Connect to PTY session",
  15246. "x-codeSamples": [
  15247. {
  15248. "lang": "js",
  15249. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  15250. }
  15251. ]
  15252. }
  15253. }
  15254. },
  15255. "components": {
  15256. "schemas": {
  15257. "Event": {
  15258. "anyOf": [
  15259. {
  15260. "$ref": "#/components/schemas/EventModels-devRefreshed"
  15261. },
  15262. {
  15263. "$ref": "#/components/schemas/EventIntegrationUpdated"
  15264. },
  15265. {
  15266. "$ref": "#/components/schemas/EventIntegrationConnectionUpdated"
  15267. },
  15268. {
  15269. "$ref": "#/components/schemas/EventCatalogUpdated"
  15270. },
  15271. {
  15272. "$ref": "#/components/schemas/EventSessionCreated"
  15273. },
  15274. {
  15275. "$ref": "#/components/schemas/EventSessionUpdated"
  15276. },
  15277. {
  15278. "$ref": "#/components/schemas/EventSessionDeleted"
  15279. },
  15280. {
  15281. "$ref": "#/components/schemas/EventMessageUpdated"
  15282. },
  15283. {
  15284. "$ref": "#/components/schemas/EventMessageRemoved"
  15285. },
  15286. {
  15287. "$ref": "#/components/schemas/EventMessagePartUpdated"
  15288. },
  15289. {
  15290. "$ref": "#/components/schemas/EventMessagePartRemoved"
  15291. },
  15292. {
  15293. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  15294. },
  15295. {
  15296. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  15297. },
  15298. {
  15299. "$ref": "#/components/schemas/EventSessionNextMoved"
  15300. },
  15301. {
  15302. "$ref": "#/components/schemas/EventSessionNextPrompted"
  15303. },
  15304. {
  15305. "$ref": "#/components/schemas/EventSessionNextPromptAdmitted"
  15306. },
  15307. {
  15308. "$ref": "#/components/schemas/EventSessionNextContextUpdated"
  15309. },
  15310. {
  15311. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  15312. },
  15313. {
  15314. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  15315. },
  15316. {
  15317. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  15318. },
  15319. {
  15320. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  15321. },
  15322. {
  15323. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  15324. },
  15325. {
  15326. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  15327. },
  15328. {
  15329. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  15330. },
  15331. {
  15332. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  15333. },
  15334. {
  15335. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  15336. },
  15337. {
  15338. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  15339. },
  15340. {
  15341. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  15342. },
  15343. {
  15344. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  15345. },
  15346. {
  15347. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  15348. },
  15349. {
  15350. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  15351. },
  15352. {
  15353. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  15354. },
  15355. {
  15356. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  15357. },
  15358. {
  15359. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  15360. },
  15361. {
  15362. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  15363. },
  15364. {
  15365. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  15366. },
  15367. {
  15368. "$ref": "#/components/schemas/EventSessionNextRetried"
  15369. },
  15370. {
  15371. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  15372. },
  15373. {
  15374. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  15375. },
  15376. {
  15377. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  15378. },
  15379. {
  15380. "$ref": "#/components/schemas/EventSessionNextRevertStaged"
  15381. },
  15382. {
  15383. "$ref": "#/components/schemas/EventSessionNextRevertCleared"
  15384. },
  15385. {
  15386. "$ref": "#/components/schemas/EventSessionNextRevertCommitted"
  15387. },
  15388. {
  15389. "$ref": "#/components/schemas/EventMessagePartDelta"
  15390. },
  15391. {
  15392. "$ref": "#/components/schemas/EventSessionDiff"
  15393. },
  15394. {
  15395. "$ref": "#/components/schemas/EventSessionError"
  15396. },
  15397. {
  15398. "$ref": "#/components/schemas/EventInstallationUpdated"
  15399. },
  15400. {
  15401. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  15402. },
  15403. {
  15404. "$ref": "#/components/schemas/EventFileEdited"
  15405. },
  15406. {
  15407. "$ref": "#/components/schemas/EventReferenceUpdated"
  15408. },
  15409. {
  15410. "$ref": "#/components/schemas/EventPermissionV2Asked"
  15411. },
  15412. {
  15413. "$ref": "#/components/schemas/EventPermissionV2Replied"
  15414. },
  15415. {
  15416. "$ref": "#/components/schemas/EventPluginAdded"
  15417. },
  15418. {
  15419. "$ref": "#/components/schemas/EventProjectDirectoriesUpdated"
  15420. },
  15421. {
  15422. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  15423. },
  15424. {
  15425. "$ref": "#/components/schemas/EventPtyCreated"
  15426. },
  15427. {
  15428. "$ref": "#/components/schemas/EventPtyUpdated"
  15429. },
  15430. {
  15431. "$ref": "#/components/schemas/EventPtyExited"
  15432. },
  15433. {
  15434. "$ref": "#/components/schemas/EventPtyDeleted"
  15435. },
  15436. {
  15437. "$ref": "#/components/schemas/EventQuestionV2Asked"
  15438. },
  15439. {
  15440. "$ref": "#/components/schemas/EventQuestionV2Replied"
  15441. },
  15442. {
  15443. "$ref": "#/components/schemas/EventQuestionV2Rejected"
  15444. },
  15445. {
  15446. "$ref": "#/components/schemas/EventTodoUpdated"
  15447. },
  15448. {
  15449. "$ref": "#/components/schemas/EventLspUpdated"
  15450. },
  15451. {
  15452. "$ref": "#/components/schemas/EventPermissionAsked"
  15453. },
  15454. {
  15455. "$ref": "#/components/schemas/EventPermissionReplied"
  15456. },
  15457. {
  15458. "$ref": "#/components/schemas/Event.tui.prompt.append"
  15459. },
  15460. {
  15461. "$ref": "#/components/schemas/Event.tui.command.execute"
  15462. },
  15463. {
  15464. "$ref": "#/components/schemas/Event.tui.toast.show"
  15465. },
  15466. {
  15467. "$ref": "#/components/schemas/Event.tui.session.select"
  15468. },
  15469. {
  15470. "$ref": "#/components/schemas/EventMcpToolsChanged"
  15471. },
  15472. {
  15473. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  15474. },
  15475. {
  15476. "$ref": "#/components/schemas/EventCommandExecuted"
  15477. },
  15478. {
  15479. "$ref": "#/components/schemas/EventProjectUpdated"
  15480. },
  15481. {
  15482. "$ref": "#/components/schemas/EventSessionStatus"
  15483. },
  15484. {
  15485. "$ref": "#/components/schemas/EventSessionIdle"
  15486. },
  15487. {
  15488. "$ref": "#/components/schemas/EventQuestionAsked"
  15489. },
  15490. {
  15491. "$ref": "#/components/schemas/EventQuestionReplied"
  15492. },
  15493. {
  15494. "$ref": "#/components/schemas/EventQuestionRejected"
  15495. },
  15496. {
  15497. "$ref": "#/components/schemas/EventSessionCompacted"
  15498. },
  15499. {
  15500. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  15501. },
  15502. {
  15503. "$ref": "#/components/schemas/EventWorkspaceReady"
  15504. },
  15505. {
  15506. "$ref": "#/components/schemas/EventWorkspaceFailed"
  15507. },
  15508. {
  15509. "$ref": "#/components/schemas/EventWorkspaceStatus"
  15510. },
  15511. {
  15512. "$ref": "#/components/schemas/EventWorktreeReady"
  15513. },
  15514. {
  15515. "$ref": "#/components/schemas/EventWorktreeFailed"
  15516. },
  15517. {
  15518. "$ref": "#/components/schemas/EventServerConnected"
  15519. },
  15520. {
  15521. "$ref": "#/components/schemas/EventGlobalDisposed"
  15522. },
  15523. {
  15524. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  15525. }
  15526. ]
  15527. },
  15528. "QuestionReplied": {
  15529. "type": "object",
  15530. "properties": {
  15531. "sessionID": {
  15532. "type": "string",
  15533. "pattern": "^ses"
  15534. },
  15535. "requestID": {
  15536. "type": "string",
  15537. "pattern": "^que"
  15538. },
  15539. "answers": {
  15540. "type": "array",
  15541. "items": {
  15542. "$ref": "#/components/schemas/QuestionAnswer"
  15543. }
  15544. }
  15545. },
  15546. "required": ["sessionID", "requestID", "answers"],
  15547. "additionalProperties": false
  15548. },
  15549. "QuestionRejected": {
  15550. "type": "object",
  15551. "properties": {
  15552. "sessionID": {
  15553. "type": "string",
  15554. "pattern": "^ses"
  15555. },
  15556. "requestID": {
  15557. "type": "string",
  15558. "pattern": "^que"
  15559. }
  15560. },
  15561. "required": ["sessionID", "requestID"],
  15562. "additionalProperties": false
  15563. },
  15564. "OAuth": {
  15565. "type": "object",
  15566. "properties": {
  15567. "type": {
  15568. "type": "string",
  15569. "enum": ["oauth"]
  15570. },
  15571. "refresh": {
  15572. "type": "string"
  15573. },
  15574. "access": {
  15575. "type": "string"
  15576. },
  15577. "expires": {
  15578. "type": "integer",
  15579. "minimum": 0
  15580. },
  15581. "accountId": {
  15582. "type": "string"
  15583. },
  15584. "enterpriseUrl": {
  15585. "type": "string"
  15586. }
  15587. },
  15588. "required": ["type", "refresh", "access", "expires"],
  15589. "additionalProperties": false
  15590. },
  15591. "ApiAuth": {
  15592. "type": "object",
  15593. "properties": {
  15594. "type": {
  15595. "type": "string",
  15596. "enum": ["api"]
  15597. },
  15598. "key": {
  15599. "type": "string"
  15600. },
  15601. "metadata": {
  15602. "type": "object",
  15603. "additionalProperties": {
  15604. "type": "string"
  15605. }
  15606. }
  15607. },
  15608. "required": ["type", "key"],
  15609. "additionalProperties": false
  15610. },
  15611. "WellKnownAuth": {
  15612. "type": "object",
  15613. "properties": {
  15614. "type": {
  15615. "type": "string",
  15616. "enum": ["wellknown"]
  15617. },
  15618. "key": {
  15619. "type": "string"
  15620. },
  15621. "token": {
  15622. "type": "string"
  15623. }
  15624. },
  15625. "required": ["type", "key", "token"],
  15626. "additionalProperties": false
  15627. },
  15628. "Auth": {
  15629. "anyOf": [
  15630. {
  15631. "$ref": "#/components/schemas/OAuth"
  15632. },
  15633. {
  15634. "$ref": "#/components/schemas/ApiAuth"
  15635. },
  15636. {
  15637. "$ref": "#/components/schemas/WellKnownAuth"
  15638. }
  15639. ]
  15640. },
  15641. "effect_HttpApiError_BadRequest": {
  15642. "type": "object",
  15643. "properties": {
  15644. "_tag": {
  15645. "type": "string",
  15646. "enum": ["BadRequest"]
  15647. }
  15648. },
  15649. "required": ["_tag"],
  15650. "additionalProperties": false
  15651. },
  15652. "InvalidRequestError": {
  15653. "type": "object",
  15654. "properties": {
  15655. "_tag": {
  15656. "type": "string",
  15657. "enum": ["InvalidRequestError"]
  15658. },
  15659. "message": {
  15660. "type": "string"
  15661. },
  15662. "kind": {
  15663. "type": "string"
  15664. },
  15665. "field": {
  15666. "type": "string"
  15667. }
  15668. },
  15669. "required": ["_tag", "message"],
  15670. "additionalProperties": false
  15671. },
  15672. "MoveSessionError": {
  15673. "type": "object",
  15674. "properties": {
  15675. "name": {
  15676. "type": "string",
  15677. "enum": ["MoveSessionError"]
  15678. },
  15679. "data": {
  15680. "type": "object",
  15681. "properties": {
  15682. "message": {
  15683. "type": "string"
  15684. }
  15685. },
  15686. "required": ["message"],
  15687. "additionalProperties": false
  15688. }
  15689. },
  15690. "required": ["name", "data"],
  15691. "additionalProperties": false
  15692. },
  15693. "SnapshotFileDiff": {
  15694. "type": "object",
  15695. "properties": {
  15696. "file": {
  15697. "type": "string"
  15698. },
  15699. "patch": {
  15700. "type": "string"
  15701. },
  15702. "additions": {
  15703. "type": "number"
  15704. },
  15705. "deletions": {
  15706. "type": "number"
  15707. },
  15708. "status": {
  15709. "type": "string",
  15710. "enum": ["added", "deleted", "modified"]
  15711. }
  15712. },
  15713. "required": ["additions", "deletions"],
  15714. "additionalProperties": false
  15715. },
  15716. "PermissionAction": {
  15717. "type": "string",
  15718. "enum": ["allow", "deny", "ask"]
  15719. },
  15720. "PermissionRule": {
  15721. "type": "object",
  15722. "properties": {
  15723. "permission": {
  15724. "type": "string"
  15725. },
  15726. "pattern": {
  15727. "type": "string"
  15728. },
  15729. "action": {
  15730. "$ref": "#/components/schemas/PermissionAction"
  15731. }
  15732. },
  15733. "required": ["permission", "pattern", "action"],
  15734. "additionalProperties": false
  15735. },
  15736. "PermissionRuleset": {
  15737. "type": "array",
  15738. "items": {
  15739. "$ref": "#/components/schemas/PermissionRule"
  15740. }
  15741. },
  15742. "Session": {
  15743. "type": "object",
  15744. "properties": {
  15745. "id": {
  15746. "type": "string",
  15747. "pattern": "^ses"
  15748. },
  15749. "slug": {
  15750. "type": "string"
  15751. },
  15752. "projectID": {
  15753. "type": "string"
  15754. },
  15755. "workspaceID": {
  15756. "type": "string",
  15757. "pattern": "^wrk"
  15758. },
  15759. "directory": {
  15760. "type": "string"
  15761. },
  15762. "path": {
  15763. "type": "string"
  15764. },
  15765. "parentID": {
  15766. "type": "string",
  15767. "pattern": "^ses"
  15768. },
  15769. "summary": {
  15770. "type": "object",
  15771. "properties": {
  15772. "additions": {
  15773. "type": "number"
  15774. },
  15775. "deletions": {
  15776. "type": "number"
  15777. },
  15778. "files": {
  15779. "type": "number"
  15780. },
  15781. "diffs": {
  15782. "type": "array",
  15783. "items": {
  15784. "$ref": "#/components/schemas/SnapshotFileDiff"
  15785. }
  15786. }
  15787. },
  15788. "required": ["additions", "deletions", "files"],
  15789. "additionalProperties": false
  15790. },
  15791. "cost": {
  15792. "type": "number"
  15793. },
  15794. "tokens": {
  15795. "type": "object",
  15796. "properties": {
  15797. "input": {
  15798. "type": "number"
  15799. },
  15800. "output": {
  15801. "type": "number"
  15802. },
  15803. "reasoning": {
  15804. "type": "number"
  15805. },
  15806. "cache": {
  15807. "type": "object",
  15808. "properties": {
  15809. "read": {
  15810. "type": "number"
  15811. },
  15812. "write": {
  15813. "type": "number"
  15814. }
  15815. },
  15816. "required": ["read", "write"],
  15817. "additionalProperties": false
  15818. }
  15819. },
  15820. "required": ["input", "output", "reasoning", "cache"],
  15821. "additionalProperties": false
  15822. },
  15823. "share": {
  15824. "type": "object",
  15825. "properties": {
  15826. "url": {
  15827. "type": "string"
  15828. }
  15829. },
  15830. "required": ["url"],
  15831. "additionalProperties": false
  15832. },
  15833. "title": {
  15834. "type": "string"
  15835. },
  15836. "agent": {
  15837. "type": "string"
  15838. },
  15839. "model": {
  15840. "type": "object",
  15841. "properties": {
  15842. "id": {
  15843. "type": "string"
  15844. },
  15845. "providerID": {
  15846. "type": "string"
  15847. },
  15848. "variant": {
  15849. "type": "string"
  15850. }
  15851. },
  15852. "required": ["id", "providerID"],
  15853. "additionalProperties": false
  15854. },
  15855. "version": {
  15856. "type": "string"
  15857. },
  15858. "metadata": {
  15859. "type": "object"
  15860. },
  15861. "time": {
  15862. "type": "object",
  15863. "properties": {
  15864. "created": {
  15865. "type": "integer",
  15866. "minimum": 0
  15867. },
  15868. "updated": {
  15869. "type": "integer",
  15870. "minimum": 0
  15871. },
  15872. "compacting": {
  15873. "type": "integer",
  15874. "minimum": 0
  15875. },
  15876. "archived": {
  15877. "type": "number"
  15878. }
  15879. },
  15880. "required": ["created", "updated"],
  15881. "additionalProperties": false
  15882. },
  15883. "permission": {
  15884. "$ref": "#/components/schemas/PermissionRuleset"
  15885. },
  15886. "revert": {
  15887. "type": "object",
  15888. "properties": {
  15889. "messageID": {
  15890. "type": "string",
  15891. "pattern": "^msg"
  15892. },
  15893. "partID": {
  15894. "type": "string",
  15895. "pattern": "^prt"
  15896. },
  15897. "snapshot": {
  15898. "type": "string"
  15899. },
  15900. "diff": {
  15901. "type": "string"
  15902. }
  15903. },
  15904. "required": ["messageID"],
  15905. "additionalProperties": false
  15906. }
  15907. },
  15908. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  15909. "additionalProperties": false
  15910. },
  15911. "OutputFormatText": {
  15912. "type": "object",
  15913. "properties": {
  15914. "type": {
  15915. "type": "string",
  15916. "enum": ["text"]
  15917. }
  15918. },
  15919. "required": ["type"],
  15920. "additionalProperties": false
  15921. },
  15922. "JSONSchema": {
  15923. "type": "object"
  15924. },
  15925. "OutputFormatJsonSchema": {
  15926. "type": "object",
  15927. "properties": {
  15928. "type": {
  15929. "type": "string",
  15930. "enum": ["json_schema"]
  15931. },
  15932. "schema": {
  15933. "$ref": "#/components/schemas/JSONSchema"
  15934. },
  15935. "retryCount": {
  15936. "type": "integer",
  15937. "minimum": 0
  15938. }
  15939. },
  15940. "required": ["type", "schema"],
  15941. "additionalProperties": false
  15942. },
  15943. "OutputFormat": {
  15944. "anyOf": [
  15945. {
  15946. "$ref": "#/components/schemas/OutputFormatText"
  15947. },
  15948. {
  15949. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  15950. }
  15951. ]
  15952. },
  15953. "UserMessage": {
  15954. "type": "object",
  15955. "properties": {
  15956. "id": {
  15957. "type": "string",
  15958. "pattern": "^msg"
  15959. },
  15960. "sessionID": {
  15961. "type": "string",
  15962. "pattern": "^ses"
  15963. },
  15964. "role": {
  15965. "type": "string",
  15966. "enum": ["user"]
  15967. },
  15968. "time": {
  15969. "type": "object",
  15970. "properties": {
  15971. "created": {
  15972. "type": "number",
  15973. "minimum": 0
  15974. }
  15975. },
  15976. "required": ["created"],
  15977. "additionalProperties": false
  15978. },
  15979. "format": {
  15980. "$ref": "#/components/schemas/OutputFormat"
  15981. },
  15982. "summary": {
  15983. "type": "object",
  15984. "properties": {
  15985. "title": {
  15986. "type": "string"
  15987. },
  15988. "body": {
  15989. "type": "string"
  15990. },
  15991. "diffs": {
  15992. "type": "array",
  15993. "items": {
  15994. "$ref": "#/components/schemas/SnapshotFileDiff"
  15995. }
  15996. }
  15997. },
  15998. "required": ["diffs"],
  15999. "additionalProperties": false
  16000. },
  16001. "agent": {
  16002. "type": "string"
  16003. },
  16004. "model": {
  16005. "type": "object",
  16006. "properties": {
  16007. "providerID": {
  16008. "type": "string"
  16009. },
  16010. "modelID": {
  16011. "type": "string"
  16012. },
  16013. "variant": {
  16014. "type": "string"
  16015. }
  16016. },
  16017. "required": ["providerID", "modelID"],
  16018. "additionalProperties": false
  16019. },
  16020. "system": {
  16021. "type": "string"
  16022. },
  16023. "tools": {
  16024. "type": "object",
  16025. "additionalProperties": {
  16026. "type": "boolean"
  16027. }
  16028. }
  16029. },
  16030. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  16031. "additionalProperties": false
  16032. },
  16033. "ProviderAuthError": {
  16034. "type": "object",
  16035. "properties": {
  16036. "name": {
  16037. "type": "string",
  16038. "enum": ["ProviderAuthError"]
  16039. },
  16040. "data": {
  16041. "type": "object",
  16042. "properties": {
  16043. "providerID": {
  16044. "type": "string"
  16045. },
  16046. "message": {
  16047. "type": "string"
  16048. }
  16049. },
  16050. "required": ["providerID", "message"],
  16051. "additionalProperties": false
  16052. }
  16053. },
  16054. "required": ["name", "data"],
  16055. "additionalProperties": false
  16056. },
  16057. "UnknownError": {
  16058. "type": "object",
  16059. "properties": {
  16060. "name": {
  16061. "type": "string",
  16062. "enum": ["UnknownError"]
  16063. },
  16064. "data": {
  16065. "type": "object",
  16066. "properties": {
  16067. "message": {
  16068. "type": "string"
  16069. },
  16070. "ref": {
  16071. "type": "string"
  16072. }
  16073. },
  16074. "required": ["message"],
  16075. "additionalProperties": false
  16076. }
  16077. },
  16078. "required": ["name", "data"],
  16079. "additionalProperties": false
  16080. },
  16081. "MessageOutputLengthError": {
  16082. "type": "object",
  16083. "properties": {
  16084. "name": {
  16085. "type": "string",
  16086. "enum": ["MessageOutputLengthError"]
  16087. },
  16088. "data": {
  16089. "type": "object",
  16090. "properties": {}
  16091. }
  16092. },
  16093. "required": ["name", "data"],
  16094. "additionalProperties": false
  16095. },
  16096. "MessageAbortedError": {
  16097. "type": "object",
  16098. "properties": {
  16099. "name": {
  16100. "type": "string",
  16101. "enum": ["MessageAbortedError"]
  16102. },
  16103. "data": {
  16104. "type": "object",
  16105. "properties": {
  16106. "message": {
  16107. "type": "string"
  16108. }
  16109. },
  16110. "required": ["message"],
  16111. "additionalProperties": false
  16112. }
  16113. },
  16114. "required": ["name", "data"],
  16115. "additionalProperties": false
  16116. },
  16117. "StructuredOutputError": {
  16118. "type": "object",
  16119. "properties": {
  16120. "name": {
  16121. "type": "string",
  16122. "enum": ["StructuredOutputError"]
  16123. },
  16124. "data": {
  16125. "type": "object",
  16126. "properties": {
  16127. "message": {
  16128. "type": "string"
  16129. },
  16130. "retries": {
  16131. "type": "integer",
  16132. "minimum": 0
  16133. }
  16134. },
  16135. "required": ["message", "retries"],
  16136. "additionalProperties": false
  16137. }
  16138. },
  16139. "required": ["name", "data"],
  16140. "additionalProperties": false
  16141. },
  16142. "ContextOverflowError": {
  16143. "type": "object",
  16144. "properties": {
  16145. "name": {
  16146. "type": "string",
  16147. "enum": ["ContextOverflowError"]
  16148. },
  16149. "data": {
  16150. "type": "object",
  16151. "properties": {
  16152. "message": {
  16153. "type": "string"
  16154. },
  16155. "responseBody": {
  16156. "type": "string"
  16157. }
  16158. },
  16159. "required": ["message"],
  16160. "additionalProperties": false
  16161. }
  16162. },
  16163. "required": ["name", "data"],
  16164. "additionalProperties": false
  16165. },
  16166. "ContentFilterError": {
  16167. "type": "object",
  16168. "properties": {
  16169. "name": {
  16170. "type": "string",
  16171. "enum": ["ContentFilterError"]
  16172. },
  16173. "data": {
  16174. "type": "object",
  16175. "properties": {
  16176. "message": {
  16177. "type": "string"
  16178. }
  16179. },
  16180. "required": ["message"],
  16181. "additionalProperties": false
  16182. }
  16183. },
  16184. "required": ["name", "data"],
  16185. "additionalProperties": false
  16186. },
  16187. "APIError": {
  16188. "type": "object",
  16189. "properties": {
  16190. "name": {
  16191. "type": "string",
  16192. "enum": ["APIError"]
  16193. },
  16194. "data": {
  16195. "type": "object",
  16196. "properties": {
  16197. "message": {
  16198. "type": "string"
  16199. },
  16200. "statusCode": {
  16201. "type": "integer",
  16202. "minimum": 0
  16203. },
  16204. "isRetryable": {
  16205. "type": "boolean"
  16206. },
  16207. "responseHeaders": {
  16208. "type": "object",
  16209. "additionalProperties": {
  16210. "type": "string"
  16211. }
  16212. },
  16213. "responseBody": {
  16214. "type": "string"
  16215. },
  16216. "metadata": {
  16217. "type": "object",
  16218. "additionalProperties": {
  16219. "type": "string"
  16220. }
  16221. }
  16222. },
  16223. "required": ["message", "isRetryable"],
  16224. "additionalProperties": false
  16225. }
  16226. },
  16227. "required": ["name", "data"],
  16228. "additionalProperties": false
  16229. },
  16230. "AssistantMessage": {
  16231. "type": "object",
  16232. "properties": {
  16233. "id": {
  16234. "type": "string",
  16235. "pattern": "^msg"
  16236. },
  16237. "sessionID": {
  16238. "type": "string",
  16239. "pattern": "^ses"
  16240. },
  16241. "role": {
  16242. "type": "string",
  16243. "enum": ["assistant"]
  16244. },
  16245. "time": {
  16246. "type": "object",
  16247. "properties": {
  16248. "created": {
  16249. "type": "integer",
  16250. "minimum": 0
  16251. },
  16252. "completed": {
  16253. "type": "integer",
  16254. "minimum": 0
  16255. }
  16256. },
  16257. "required": ["created"],
  16258. "additionalProperties": false
  16259. },
  16260. "error": {
  16261. "anyOf": [
  16262. {
  16263. "$ref": "#/components/schemas/ProviderAuthError"
  16264. },
  16265. {
  16266. "$ref": "#/components/schemas/UnknownError"
  16267. },
  16268. {
  16269. "$ref": "#/components/schemas/MessageOutputLengthError"
  16270. },
  16271. {
  16272. "$ref": "#/components/schemas/MessageAbortedError"
  16273. },
  16274. {
  16275. "$ref": "#/components/schemas/StructuredOutputError"
  16276. },
  16277. {
  16278. "$ref": "#/components/schemas/ContextOverflowError"
  16279. },
  16280. {
  16281. "$ref": "#/components/schemas/ContentFilterError"
  16282. },
  16283. {
  16284. "$ref": "#/components/schemas/APIError"
  16285. }
  16286. ]
  16287. },
  16288. "parentID": {
  16289. "type": "string",
  16290. "pattern": "^msg"
  16291. },
  16292. "modelID": {
  16293. "type": "string"
  16294. },
  16295. "providerID": {
  16296. "type": "string"
  16297. },
  16298. "mode": {
  16299. "type": "string"
  16300. },
  16301. "agent": {
  16302. "type": "string"
  16303. },
  16304. "path": {
  16305. "type": "object",
  16306. "properties": {
  16307. "cwd": {
  16308. "type": "string"
  16309. },
  16310. "root": {
  16311. "type": "string"
  16312. }
  16313. },
  16314. "required": ["cwd", "root"],
  16315. "additionalProperties": false
  16316. },
  16317. "summary": {
  16318. "type": "boolean"
  16319. },
  16320. "cost": {
  16321. "type": "number"
  16322. },
  16323. "tokens": {
  16324. "type": "object",
  16325. "properties": {
  16326. "total": {
  16327. "type": "number"
  16328. },
  16329. "input": {
  16330. "type": "number"
  16331. },
  16332. "output": {
  16333. "type": "number"
  16334. },
  16335. "reasoning": {
  16336. "type": "number"
  16337. },
  16338. "cache": {
  16339. "type": "object",
  16340. "properties": {
  16341. "read": {
  16342. "type": "number"
  16343. },
  16344. "write": {
  16345. "type": "number"
  16346. }
  16347. },
  16348. "required": ["read", "write"],
  16349. "additionalProperties": false
  16350. }
  16351. },
  16352. "required": ["input", "output", "reasoning", "cache"],
  16353. "additionalProperties": false
  16354. },
  16355. "structured": {},
  16356. "variant": {
  16357. "type": "string"
  16358. },
  16359. "finish": {
  16360. "type": "string"
  16361. }
  16362. },
  16363. "required": [
  16364. "id",
  16365. "sessionID",
  16366. "role",
  16367. "time",
  16368. "parentID",
  16369. "modelID",
  16370. "providerID",
  16371. "mode",
  16372. "agent",
  16373. "path",
  16374. "cost",
  16375. "tokens"
  16376. ],
  16377. "additionalProperties": false
  16378. },
  16379. "Message": {
  16380. "anyOf": [
  16381. {
  16382. "$ref": "#/components/schemas/UserMessage"
  16383. },
  16384. {
  16385. "$ref": "#/components/schemas/AssistantMessage"
  16386. }
  16387. ]
  16388. },
  16389. "TextPart": {
  16390. "type": "object",
  16391. "properties": {
  16392. "id": {
  16393. "type": "string",
  16394. "pattern": "^prt"
  16395. },
  16396. "sessionID": {
  16397. "type": "string",
  16398. "pattern": "^ses"
  16399. },
  16400. "messageID": {
  16401. "type": "string",
  16402. "pattern": "^msg"
  16403. },
  16404. "type": {
  16405. "type": "string",
  16406. "enum": ["text"]
  16407. },
  16408. "text": {
  16409. "type": "string"
  16410. },
  16411. "synthetic": {
  16412. "type": "boolean"
  16413. },
  16414. "ignored": {
  16415. "type": "boolean"
  16416. },
  16417. "time": {
  16418. "type": "object",
  16419. "properties": {
  16420. "start": {
  16421. "type": "integer",
  16422. "minimum": 0
  16423. },
  16424. "end": {
  16425. "type": "integer",
  16426. "minimum": 0
  16427. }
  16428. },
  16429. "required": ["start"],
  16430. "additionalProperties": false
  16431. },
  16432. "metadata": {
  16433. "type": "object"
  16434. }
  16435. },
  16436. "required": ["id", "sessionID", "messageID", "type", "text"],
  16437. "additionalProperties": false
  16438. },
  16439. "SubtaskPart": {
  16440. "type": "object",
  16441. "properties": {
  16442. "id": {
  16443. "type": "string",
  16444. "pattern": "^prt"
  16445. },
  16446. "sessionID": {
  16447. "type": "string",
  16448. "pattern": "^ses"
  16449. },
  16450. "messageID": {
  16451. "type": "string",
  16452. "pattern": "^msg"
  16453. },
  16454. "type": {
  16455. "type": "string",
  16456. "enum": ["subtask"]
  16457. },
  16458. "prompt": {
  16459. "type": "string"
  16460. },
  16461. "description": {
  16462. "type": "string"
  16463. },
  16464. "agent": {
  16465. "type": "string"
  16466. },
  16467. "model": {
  16468. "type": "object",
  16469. "properties": {
  16470. "providerID": {
  16471. "type": "string"
  16472. },
  16473. "modelID": {
  16474. "type": "string"
  16475. }
  16476. },
  16477. "required": ["providerID", "modelID"],
  16478. "additionalProperties": false
  16479. },
  16480. "command": {
  16481. "type": "string"
  16482. }
  16483. },
  16484. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  16485. "additionalProperties": false
  16486. },
  16487. "ReasoningPart": {
  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": ["reasoning"]
  16505. },
  16506. "text": {
  16507. "type": "string"
  16508. },
  16509. "metadata": {
  16510. "type": "object"
  16511. },
  16512. "time": {
  16513. "type": "object",
  16514. "properties": {
  16515. "start": {
  16516. "type": "integer",
  16517. "minimum": 0
  16518. },
  16519. "end": {
  16520. "type": "integer",
  16521. "minimum": 0
  16522. }
  16523. },
  16524. "required": ["start"],
  16525. "additionalProperties": false
  16526. }
  16527. },
  16528. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  16529. "additionalProperties": false
  16530. },
  16531. "FilePartSourceText": {
  16532. "type": "object",
  16533. "properties": {
  16534. "value": {
  16535. "type": "string"
  16536. },
  16537. "start": {
  16538. "type": "number"
  16539. },
  16540. "end": {
  16541. "type": "number"
  16542. }
  16543. },
  16544. "required": ["value", "start", "end"],
  16545. "additionalProperties": false
  16546. },
  16547. "FileSource": {
  16548. "type": "object",
  16549. "properties": {
  16550. "text": {
  16551. "$ref": "#/components/schemas/FilePartSourceText"
  16552. },
  16553. "type": {
  16554. "type": "string",
  16555. "enum": ["file"]
  16556. },
  16557. "path": {
  16558. "type": "string"
  16559. }
  16560. },
  16561. "required": ["text", "type", "path"],
  16562. "additionalProperties": false
  16563. },
  16564. "Range": {
  16565. "type": "object",
  16566. "properties": {
  16567. "start": {
  16568. "type": "object",
  16569. "properties": {
  16570. "line": {
  16571. "type": "integer",
  16572. "minimum": 0
  16573. },
  16574. "character": {
  16575. "type": "integer",
  16576. "minimum": 0
  16577. }
  16578. },
  16579. "required": ["line", "character"],
  16580. "additionalProperties": false
  16581. },
  16582. "end": {
  16583. "type": "object",
  16584. "properties": {
  16585. "line": {
  16586. "type": "integer",
  16587. "minimum": 0
  16588. },
  16589. "character": {
  16590. "type": "integer",
  16591. "minimum": 0
  16592. }
  16593. },
  16594. "required": ["line", "character"],
  16595. "additionalProperties": false
  16596. }
  16597. },
  16598. "required": ["start", "end"],
  16599. "additionalProperties": false
  16600. },
  16601. "SymbolSource": {
  16602. "type": "object",
  16603. "properties": {
  16604. "text": {
  16605. "$ref": "#/components/schemas/FilePartSourceText"
  16606. },
  16607. "type": {
  16608. "type": "string",
  16609. "enum": ["symbol"]
  16610. },
  16611. "path": {
  16612. "type": "string"
  16613. },
  16614. "range": {
  16615. "$ref": "#/components/schemas/Range"
  16616. },
  16617. "name": {
  16618. "type": "string"
  16619. },
  16620. "kind": {
  16621. "type": "integer",
  16622. "minimum": 0
  16623. }
  16624. },
  16625. "required": ["text", "type", "path", "range", "name", "kind"],
  16626. "additionalProperties": false
  16627. },
  16628. "ResourceSource": {
  16629. "type": "object",
  16630. "properties": {
  16631. "text": {
  16632. "$ref": "#/components/schemas/FilePartSourceText"
  16633. },
  16634. "type": {
  16635. "type": "string",
  16636. "enum": ["resource"]
  16637. },
  16638. "clientName": {
  16639. "type": "string"
  16640. },
  16641. "uri": {
  16642. "type": "string"
  16643. }
  16644. },
  16645. "required": ["text", "type", "clientName", "uri"],
  16646. "additionalProperties": false
  16647. },
  16648. "FilePartSource": {
  16649. "anyOf": [
  16650. {
  16651. "$ref": "#/components/schemas/FileSource"
  16652. },
  16653. {
  16654. "$ref": "#/components/schemas/SymbolSource"
  16655. },
  16656. {
  16657. "$ref": "#/components/schemas/ResourceSource"
  16658. }
  16659. ]
  16660. },
  16661. "FilePart": {
  16662. "type": "object",
  16663. "properties": {
  16664. "id": {
  16665. "type": "string",
  16666. "pattern": "^prt"
  16667. },
  16668. "sessionID": {
  16669. "type": "string",
  16670. "pattern": "^ses"
  16671. },
  16672. "messageID": {
  16673. "type": "string",
  16674. "pattern": "^msg"
  16675. },
  16676. "type": {
  16677. "type": "string",
  16678. "enum": ["file"]
  16679. },
  16680. "mime": {
  16681. "type": "string"
  16682. },
  16683. "filename": {
  16684. "type": "string"
  16685. },
  16686. "url": {
  16687. "type": "string"
  16688. },
  16689. "source": {
  16690. "$ref": "#/components/schemas/FilePartSource"
  16691. }
  16692. },
  16693. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  16694. "additionalProperties": false
  16695. },
  16696. "ToolStatePending": {
  16697. "type": "object",
  16698. "properties": {
  16699. "status": {
  16700. "type": "string",
  16701. "enum": ["pending"]
  16702. },
  16703. "input": {
  16704. "type": "object"
  16705. },
  16706. "raw": {
  16707. "type": "string"
  16708. }
  16709. },
  16710. "required": ["status", "input", "raw"],
  16711. "additionalProperties": false
  16712. },
  16713. "ToolStateRunning": {
  16714. "type": "object",
  16715. "properties": {
  16716. "status": {
  16717. "type": "string",
  16718. "enum": ["running"]
  16719. },
  16720. "input": {
  16721. "type": "object"
  16722. },
  16723. "title": {
  16724. "type": "string"
  16725. },
  16726. "metadata": {
  16727. "type": "object"
  16728. },
  16729. "time": {
  16730. "type": "object",
  16731. "properties": {
  16732. "start": {
  16733. "type": "integer",
  16734. "minimum": 0
  16735. }
  16736. },
  16737. "required": ["start"],
  16738. "additionalProperties": false
  16739. }
  16740. },
  16741. "required": ["status", "input", "time"],
  16742. "additionalProperties": false
  16743. },
  16744. "ToolStateCompleted": {
  16745. "type": "object",
  16746. "properties": {
  16747. "status": {
  16748. "type": "string",
  16749. "enum": ["completed"]
  16750. },
  16751. "input": {
  16752. "type": "object"
  16753. },
  16754. "output": {
  16755. "type": "string"
  16756. },
  16757. "title": {
  16758. "type": "string"
  16759. },
  16760. "metadata": {
  16761. "type": "object"
  16762. },
  16763. "time": {
  16764. "type": "object",
  16765. "properties": {
  16766. "start": {
  16767. "type": "integer",
  16768. "minimum": 0
  16769. },
  16770. "end": {
  16771. "type": "integer",
  16772. "minimum": 0
  16773. },
  16774. "compacted": {
  16775. "type": "integer",
  16776. "minimum": 0
  16777. }
  16778. },
  16779. "required": ["start", "end"],
  16780. "additionalProperties": false
  16781. },
  16782. "attachments": {
  16783. "type": "array",
  16784. "items": {
  16785. "$ref": "#/components/schemas/FilePart"
  16786. }
  16787. }
  16788. },
  16789. "required": ["status", "input", "output", "title", "metadata", "time"],
  16790. "additionalProperties": false
  16791. },
  16792. "ToolStateError": {
  16793. "type": "object",
  16794. "properties": {
  16795. "status": {
  16796. "type": "string",
  16797. "enum": ["error"]
  16798. },
  16799. "input": {
  16800. "type": "object"
  16801. },
  16802. "error": {
  16803. "type": "string"
  16804. },
  16805. "metadata": {
  16806. "type": "object"
  16807. },
  16808. "time": {
  16809. "type": "object",
  16810. "properties": {
  16811. "start": {
  16812. "type": "integer",
  16813. "minimum": 0
  16814. },
  16815. "end": {
  16816. "type": "integer",
  16817. "minimum": 0
  16818. }
  16819. },
  16820. "required": ["start", "end"],
  16821. "additionalProperties": false
  16822. }
  16823. },
  16824. "required": ["status", "input", "error", "time"],
  16825. "additionalProperties": false
  16826. },
  16827. "ToolState": {
  16828. "anyOf": [
  16829. {
  16830. "$ref": "#/components/schemas/ToolStatePending"
  16831. },
  16832. {
  16833. "$ref": "#/components/schemas/ToolStateRunning"
  16834. },
  16835. {
  16836. "$ref": "#/components/schemas/ToolStateCompleted"
  16837. },
  16838. {
  16839. "$ref": "#/components/schemas/ToolStateError"
  16840. }
  16841. ]
  16842. },
  16843. "ToolPart": {
  16844. "type": "object",
  16845. "properties": {
  16846. "id": {
  16847. "type": "string",
  16848. "pattern": "^prt"
  16849. },
  16850. "sessionID": {
  16851. "type": "string",
  16852. "pattern": "^ses"
  16853. },
  16854. "messageID": {
  16855. "type": "string",
  16856. "pattern": "^msg"
  16857. },
  16858. "type": {
  16859. "type": "string",
  16860. "enum": ["tool"]
  16861. },
  16862. "callID": {
  16863. "type": "string"
  16864. },
  16865. "tool": {
  16866. "type": "string"
  16867. },
  16868. "state": {
  16869. "$ref": "#/components/schemas/ToolState"
  16870. },
  16871. "metadata": {
  16872. "type": "object"
  16873. }
  16874. },
  16875. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  16876. "additionalProperties": false
  16877. },
  16878. "StepStartPart": {
  16879. "type": "object",
  16880. "properties": {
  16881. "id": {
  16882. "type": "string",
  16883. "pattern": "^prt"
  16884. },
  16885. "sessionID": {
  16886. "type": "string",
  16887. "pattern": "^ses"
  16888. },
  16889. "messageID": {
  16890. "type": "string",
  16891. "pattern": "^msg"
  16892. },
  16893. "type": {
  16894. "type": "string",
  16895. "enum": ["step-start"]
  16896. },
  16897. "snapshot": {
  16898. "type": "string"
  16899. }
  16900. },
  16901. "required": ["id", "sessionID", "messageID", "type"],
  16902. "additionalProperties": false
  16903. },
  16904. "StepFinishPart": {
  16905. "type": "object",
  16906. "properties": {
  16907. "id": {
  16908. "type": "string",
  16909. "pattern": "^prt"
  16910. },
  16911. "sessionID": {
  16912. "type": "string",
  16913. "pattern": "^ses"
  16914. },
  16915. "messageID": {
  16916. "type": "string",
  16917. "pattern": "^msg"
  16918. },
  16919. "type": {
  16920. "type": "string",
  16921. "enum": ["step-finish"]
  16922. },
  16923. "reason": {
  16924. "type": "string"
  16925. },
  16926. "snapshot": {
  16927. "type": "string"
  16928. },
  16929. "cost": {
  16930. "type": "number"
  16931. },
  16932. "tokens": {
  16933. "type": "object",
  16934. "properties": {
  16935. "total": {
  16936. "type": "number"
  16937. },
  16938. "input": {
  16939. "type": "number"
  16940. },
  16941. "output": {
  16942. "type": "number"
  16943. },
  16944. "reasoning": {
  16945. "type": "number"
  16946. },
  16947. "cache": {
  16948. "type": "object",
  16949. "properties": {
  16950. "read": {
  16951. "type": "number"
  16952. },
  16953. "write": {
  16954. "type": "number"
  16955. }
  16956. },
  16957. "required": ["read", "write"],
  16958. "additionalProperties": false
  16959. }
  16960. },
  16961. "required": ["input", "output", "reasoning", "cache"],
  16962. "additionalProperties": false
  16963. }
  16964. },
  16965. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  16966. "additionalProperties": false
  16967. },
  16968. "SnapshotPart": {
  16969. "type": "object",
  16970. "properties": {
  16971. "id": {
  16972. "type": "string",
  16973. "pattern": "^prt"
  16974. },
  16975. "sessionID": {
  16976. "type": "string",
  16977. "pattern": "^ses"
  16978. },
  16979. "messageID": {
  16980. "type": "string",
  16981. "pattern": "^msg"
  16982. },
  16983. "type": {
  16984. "type": "string",
  16985. "enum": ["snapshot"]
  16986. },
  16987. "snapshot": {
  16988. "type": "string"
  16989. }
  16990. },
  16991. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  16992. "additionalProperties": false
  16993. },
  16994. "PatchPart": {
  16995. "type": "object",
  16996. "properties": {
  16997. "id": {
  16998. "type": "string",
  16999. "pattern": "^prt"
  17000. },
  17001. "sessionID": {
  17002. "type": "string",
  17003. "pattern": "^ses"
  17004. },
  17005. "messageID": {
  17006. "type": "string",
  17007. "pattern": "^msg"
  17008. },
  17009. "type": {
  17010. "type": "string",
  17011. "enum": ["patch"]
  17012. },
  17013. "hash": {
  17014. "type": "string"
  17015. },
  17016. "files": {
  17017. "type": "array",
  17018. "items": {
  17019. "type": "string"
  17020. }
  17021. }
  17022. },
  17023. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  17024. "additionalProperties": false
  17025. },
  17026. "AgentPart": {
  17027. "type": "object",
  17028. "properties": {
  17029. "id": {
  17030. "type": "string",
  17031. "pattern": "^prt"
  17032. },
  17033. "sessionID": {
  17034. "type": "string",
  17035. "pattern": "^ses"
  17036. },
  17037. "messageID": {
  17038. "type": "string",
  17039. "pattern": "^msg"
  17040. },
  17041. "type": {
  17042. "type": "string",
  17043. "enum": ["agent"]
  17044. },
  17045. "name": {
  17046. "type": "string"
  17047. },
  17048. "source": {
  17049. "type": "object",
  17050. "properties": {
  17051. "value": {
  17052. "type": "string"
  17053. },
  17054. "start": {
  17055. "type": "integer",
  17056. "minimum": 0
  17057. },
  17058. "end": {
  17059. "type": "integer",
  17060. "minimum": 0
  17061. }
  17062. },
  17063. "required": ["value", "start", "end"],
  17064. "additionalProperties": false
  17065. }
  17066. },
  17067. "required": ["id", "sessionID", "messageID", "type", "name"],
  17068. "additionalProperties": false
  17069. },
  17070. "RetryPart": {
  17071. "type": "object",
  17072. "properties": {
  17073. "id": {
  17074. "type": "string",
  17075. "pattern": "^prt"
  17076. },
  17077. "sessionID": {
  17078. "type": "string",
  17079. "pattern": "^ses"
  17080. },
  17081. "messageID": {
  17082. "type": "string",
  17083. "pattern": "^msg"
  17084. },
  17085. "type": {
  17086. "type": "string",
  17087. "enum": ["retry"]
  17088. },
  17089. "attempt": {
  17090. "type": "integer",
  17091. "minimum": 0
  17092. },
  17093. "error": {
  17094. "$ref": "#/components/schemas/APIError"
  17095. },
  17096. "time": {
  17097. "type": "object",
  17098. "properties": {
  17099. "created": {
  17100. "type": "integer",
  17101. "minimum": 0
  17102. }
  17103. },
  17104. "required": ["created"],
  17105. "additionalProperties": false
  17106. }
  17107. },
  17108. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  17109. "additionalProperties": false
  17110. },
  17111. "CompactionPart": {
  17112. "type": "object",
  17113. "properties": {
  17114. "id": {
  17115. "type": "string",
  17116. "pattern": "^prt"
  17117. },
  17118. "sessionID": {
  17119. "type": "string",
  17120. "pattern": "^ses"
  17121. },
  17122. "messageID": {
  17123. "type": "string",
  17124. "pattern": "^msg"
  17125. },
  17126. "type": {
  17127. "type": "string",
  17128. "enum": ["compaction"]
  17129. },
  17130. "auto": {
  17131. "type": "boolean"
  17132. },
  17133. "overflow": {
  17134. "type": "boolean"
  17135. },
  17136. "tail_start_id": {
  17137. "type": "string",
  17138. "pattern": "^msg"
  17139. }
  17140. },
  17141. "required": ["id", "sessionID", "messageID", "type", "auto"],
  17142. "additionalProperties": false
  17143. },
  17144. "Part": {
  17145. "anyOf": [
  17146. {
  17147. "$ref": "#/components/schemas/TextPart"
  17148. },
  17149. {
  17150. "$ref": "#/components/schemas/SubtaskPart"
  17151. },
  17152. {
  17153. "$ref": "#/components/schemas/ReasoningPart"
  17154. },
  17155. {
  17156. "$ref": "#/components/schemas/FilePart"
  17157. },
  17158. {
  17159. "$ref": "#/components/schemas/ToolPart"
  17160. },
  17161. {
  17162. "$ref": "#/components/schemas/StepStartPart"
  17163. },
  17164. {
  17165. "$ref": "#/components/schemas/StepFinishPart"
  17166. },
  17167. {
  17168. "$ref": "#/components/schemas/SnapshotPart"
  17169. },
  17170. {
  17171. "$ref": "#/components/schemas/PatchPart"
  17172. },
  17173. {
  17174. "$ref": "#/components/schemas/AgentPart"
  17175. },
  17176. {
  17177. "$ref": "#/components/schemas/RetryPart"
  17178. },
  17179. {
  17180. "$ref": "#/components/schemas/CompactionPart"
  17181. }
  17182. ]
  17183. },
  17184. "Prompt": {
  17185. "type": "object",
  17186. "properties": {
  17187. "text": {
  17188. "type": "string"
  17189. },
  17190. "files": {
  17191. "type": "array",
  17192. "items": {
  17193. "$ref": "#/components/schemas/PromptFileAttachment"
  17194. }
  17195. },
  17196. "agents": {
  17197. "type": "array",
  17198. "items": {
  17199. "$ref": "#/components/schemas/PromptAgentAttachment"
  17200. }
  17201. }
  17202. },
  17203. "required": ["text"],
  17204. "additionalProperties": false
  17205. },
  17206. "Pty": {
  17207. "type": "object",
  17208. "properties": {
  17209. "id": {
  17210. "type": "string",
  17211. "pattern": "^pty"
  17212. },
  17213. "title": {
  17214. "type": "string"
  17215. },
  17216. "command": {
  17217. "type": "string"
  17218. },
  17219. "args": {
  17220. "type": "array",
  17221. "items": {
  17222. "type": "string"
  17223. }
  17224. },
  17225. "cwd": {
  17226. "type": "string"
  17227. },
  17228. "status": {
  17229. "type": "string",
  17230. "enum": ["running", "exited"]
  17231. },
  17232. "pid": {
  17233. "type": "integer",
  17234. "minimum": 0
  17235. },
  17236. "exitCode": {
  17237. "type": "integer",
  17238. "minimum": 0
  17239. }
  17240. },
  17241. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  17242. "additionalProperties": false
  17243. },
  17244. "Todo": {
  17245. "type": "object",
  17246. "properties": {
  17247. "content": {
  17248. "type": "string",
  17249. "description": "Brief description of the task"
  17250. },
  17251. "status": {
  17252. "type": "string",
  17253. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  17254. },
  17255. "priority": {
  17256. "type": "string",
  17257. "description": "Priority level of the task: high, medium, low"
  17258. }
  17259. },
  17260. "required": ["content", "status", "priority"],
  17261. "additionalProperties": false
  17262. },
  17263. "SessionStatus": {
  17264. "anyOf": [
  17265. {
  17266. "type": "object",
  17267. "properties": {
  17268. "type": {
  17269. "type": "string",
  17270. "enum": ["idle"]
  17271. }
  17272. },
  17273. "required": ["type"],
  17274. "additionalProperties": false
  17275. },
  17276. {
  17277. "type": "object",
  17278. "properties": {
  17279. "type": {
  17280. "type": "string",
  17281. "enum": ["retry"]
  17282. },
  17283. "attempt": {
  17284. "type": "integer",
  17285. "minimum": 0
  17286. },
  17287. "message": {
  17288. "type": "string"
  17289. },
  17290. "action": {
  17291. "type": "object",
  17292. "properties": {
  17293. "reason": {
  17294. "type": "string"
  17295. },
  17296. "provider": {
  17297. "type": "string"
  17298. },
  17299. "title": {
  17300. "type": "string"
  17301. },
  17302. "message": {
  17303. "type": "string"
  17304. },
  17305. "label": {
  17306. "type": "string"
  17307. },
  17308. "link": {
  17309. "type": "string"
  17310. }
  17311. },
  17312. "required": ["reason", "provider", "title", "message", "label"],
  17313. "additionalProperties": false
  17314. },
  17315. "next": {
  17316. "type": "integer",
  17317. "minimum": 0
  17318. }
  17319. },
  17320. "required": ["type", "attempt", "message", "next"],
  17321. "additionalProperties": false
  17322. },
  17323. {
  17324. "type": "object",
  17325. "properties": {
  17326. "type": {
  17327. "type": "string",
  17328. "enum": ["busy"]
  17329. }
  17330. },
  17331. "required": ["type"],
  17332. "additionalProperties": false
  17333. }
  17334. ]
  17335. },
  17336. "QuestionOption": {
  17337. "type": "object",
  17338. "properties": {
  17339. "label": {
  17340. "type": "string",
  17341. "description": "Display text (1-5 words, concise)"
  17342. },
  17343. "description": {
  17344. "type": "string",
  17345. "description": "Explanation of choice"
  17346. }
  17347. },
  17348. "required": ["label", "description"],
  17349. "additionalProperties": false
  17350. },
  17351. "QuestionInfo": {
  17352. "type": "object",
  17353. "properties": {
  17354. "question": {
  17355. "type": "string",
  17356. "description": "Complete question"
  17357. },
  17358. "header": {
  17359. "type": "string",
  17360. "description": "Very short label (max 30 chars)"
  17361. },
  17362. "options": {
  17363. "type": "array",
  17364. "items": {
  17365. "$ref": "#/components/schemas/QuestionOption"
  17366. },
  17367. "description": "Available choices"
  17368. },
  17369. "multiple": {
  17370. "type": "boolean"
  17371. },
  17372. "custom": {
  17373. "type": "boolean"
  17374. }
  17375. },
  17376. "required": ["question", "header", "options"],
  17377. "additionalProperties": false
  17378. },
  17379. "QuestionTool": {
  17380. "type": "object",
  17381. "properties": {
  17382. "messageID": {
  17383. "type": "string",
  17384. "pattern": "^msg"
  17385. },
  17386. "callID": {
  17387. "type": "string"
  17388. }
  17389. },
  17390. "required": ["messageID", "callID"],
  17391. "additionalProperties": false
  17392. },
  17393. "QuestionAnswer": {
  17394. "type": "array",
  17395. "items": {
  17396. "type": "string"
  17397. }
  17398. },
  17399. "GlobalEvent": {
  17400. "type": "object",
  17401. "properties": {
  17402. "directory": {
  17403. "type": "string"
  17404. },
  17405. "project": {
  17406. "type": "string"
  17407. },
  17408. "workspace": {
  17409. "type": "string"
  17410. },
  17411. "payload": {
  17412. "anyOf": [
  17413. {
  17414. "type": "object",
  17415. "properties": {
  17416. "id": {
  17417. "type": "string",
  17418. "pattern": "^evt_"
  17419. },
  17420. "type": {
  17421. "type": "string",
  17422. "enum": ["models-dev.refreshed"]
  17423. },
  17424. "properties": {
  17425. "type": "object",
  17426. "properties": {}
  17427. }
  17428. },
  17429. "required": ["id", "type", "properties"],
  17430. "additionalProperties": false
  17431. },
  17432. {
  17433. "type": "object",
  17434. "properties": {
  17435. "id": {
  17436. "type": "string",
  17437. "pattern": "^evt_"
  17438. },
  17439. "type": {
  17440. "type": "string",
  17441. "enum": ["integration.updated"]
  17442. },
  17443. "properties": {
  17444. "type": "object",
  17445. "properties": {}
  17446. }
  17447. },
  17448. "required": ["id", "type", "properties"],
  17449. "additionalProperties": false
  17450. },
  17451. {
  17452. "type": "object",
  17453. "properties": {
  17454. "id": {
  17455. "type": "string",
  17456. "pattern": "^evt_"
  17457. },
  17458. "type": {
  17459. "type": "string",
  17460. "enum": ["integration.connection.updated"]
  17461. },
  17462. "properties": {
  17463. "type": "object",
  17464. "properties": {
  17465. "integrationID": {
  17466. "type": "string"
  17467. }
  17468. },
  17469. "required": ["integrationID"],
  17470. "additionalProperties": false
  17471. }
  17472. },
  17473. "required": ["id", "type", "properties"],
  17474. "additionalProperties": false
  17475. },
  17476. {
  17477. "type": "object",
  17478. "properties": {
  17479. "id": {
  17480. "type": "string",
  17481. "pattern": "^evt_"
  17482. },
  17483. "type": {
  17484. "type": "string",
  17485. "enum": ["catalog.updated"]
  17486. },
  17487. "properties": {
  17488. "type": "object",
  17489. "properties": {}
  17490. }
  17491. },
  17492. "required": ["id", "type", "properties"],
  17493. "additionalProperties": false
  17494. },
  17495. {
  17496. "type": "object",
  17497. "properties": {
  17498. "id": {
  17499. "type": "string",
  17500. "pattern": "^evt_"
  17501. },
  17502. "type": {
  17503. "type": "string",
  17504. "enum": ["session.created"]
  17505. },
  17506. "properties": {
  17507. "type": "object",
  17508. "properties": {
  17509. "sessionID": {
  17510. "type": "string",
  17511. "pattern": "^ses"
  17512. },
  17513. "info": {
  17514. "$ref": "#/components/schemas/Session"
  17515. }
  17516. },
  17517. "required": ["sessionID", "info"],
  17518. "additionalProperties": false
  17519. }
  17520. },
  17521. "required": ["id", "type", "properties"],
  17522. "additionalProperties": false
  17523. },
  17524. {
  17525. "type": "object",
  17526. "properties": {
  17527. "id": {
  17528. "type": "string",
  17529. "pattern": "^evt_"
  17530. },
  17531. "type": {
  17532. "type": "string",
  17533. "enum": ["session.updated"]
  17534. },
  17535. "properties": {
  17536. "type": "object",
  17537. "properties": {
  17538. "sessionID": {
  17539. "type": "string",
  17540. "pattern": "^ses"
  17541. },
  17542. "info": {
  17543. "$ref": "#/components/schemas/Session"
  17544. }
  17545. },
  17546. "required": ["sessionID", "info"],
  17547. "additionalProperties": false
  17548. }
  17549. },
  17550. "required": ["id", "type", "properties"],
  17551. "additionalProperties": false
  17552. },
  17553. {
  17554. "type": "object",
  17555. "properties": {
  17556. "id": {
  17557. "type": "string",
  17558. "pattern": "^evt_"
  17559. },
  17560. "type": {
  17561. "type": "string",
  17562. "enum": ["session.deleted"]
  17563. },
  17564. "properties": {
  17565. "type": "object",
  17566. "properties": {
  17567. "sessionID": {
  17568. "type": "string",
  17569. "pattern": "^ses"
  17570. },
  17571. "info": {
  17572. "$ref": "#/components/schemas/Session"
  17573. }
  17574. },
  17575. "required": ["sessionID", "info"],
  17576. "additionalProperties": false
  17577. }
  17578. },
  17579. "required": ["id", "type", "properties"],
  17580. "additionalProperties": false
  17581. },
  17582. {
  17583. "type": "object",
  17584. "properties": {
  17585. "id": {
  17586. "type": "string",
  17587. "pattern": "^evt_"
  17588. },
  17589. "type": {
  17590. "type": "string",
  17591. "enum": ["message.updated"]
  17592. },
  17593. "properties": {
  17594. "type": "object",
  17595. "properties": {
  17596. "sessionID": {
  17597. "type": "string",
  17598. "pattern": "^ses"
  17599. },
  17600. "info": {
  17601. "$ref": "#/components/schemas/Message"
  17602. }
  17603. },
  17604. "required": ["sessionID", "info"],
  17605. "additionalProperties": false
  17606. }
  17607. },
  17608. "required": ["id", "type", "properties"],
  17609. "additionalProperties": false
  17610. },
  17611. {
  17612. "type": "object",
  17613. "properties": {
  17614. "id": {
  17615. "type": "string",
  17616. "pattern": "^evt_"
  17617. },
  17618. "type": {
  17619. "type": "string",
  17620. "enum": ["message.removed"]
  17621. },
  17622. "properties": {
  17623. "type": "object",
  17624. "properties": {
  17625. "sessionID": {
  17626. "type": "string",
  17627. "pattern": "^ses"
  17628. },
  17629. "messageID": {
  17630. "type": "string",
  17631. "pattern": "^msg"
  17632. }
  17633. },
  17634. "required": ["sessionID", "messageID"],
  17635. "additionalProperties": false
  17636. }
  17637. },
  17638. "required": ["id", "type", "properties"],
  17639. "additionalProperties": false
  17640. },
  17641. {
  17642. "type": "object",
  17643. "properties": {
  17644. "id": {
  17645. "type": "string",
  17646. "pattern": "^evt_"
  17647. },
  17648. "type": {
  17649. "type": "string",
  17650. "enum": ["message.part.updated"]
  17651. },
  17652. "properties": {
  17653. "type": "object",
  17654. "properties": {
  17655. "sessionID": {
  17656. "type": "string",
  17657. "pattern": "^ses"
  17658. },
  17659. "part": {
  17660. "$ref": "#/components/schemas/Part"
  17661. },
  17662. "time": {
  17663. "type": "number"
  17664. }
  17665. },
  17666. "required": ["sessionID", "part", "time"],
  17667. "additionalProperties": false
  17668. }
  17669. },
  17670. "required": ["id", "type", "properties"],
  17671. "additionalProperties": false
  17672. },
  17673. {
  17674. "type": "object",
  17675. "properties": {
  17676. "id": {
  17677. "type": "string",
  17678. "pattern": "^evt_"
  17679. },
  17680. "type": {
  17681. "type": "string",
  17682. "enum": ["message.part.removed"]
  17683. },
  17684. "properties": {
  17685. "type": "object",
  17686. "properties": {
  17687. "sessionID": {
  17688. "type": "string",
  17689. "pattern": "^ses"
  17690. },
  17691. "messageID": {
  17692. "type": "string",
  17693. "pattern": "^msg"
  17694. },
  17695. "partID": {
  17696. "type": "string",
  17697. "pattern": "^prt"
  17698. }
  17699. },
  17700. "required": ["sessionID", "messageID", "partID"],
  17701. "additionalProperties": false
  17702. }
  17703. },
  17704. "required": ["id", "type", "properties"],
  17705. "additionalProperties": false
  17706. },
  17707. {
  17708. "type": "object",
  17709. "properties": {
  17710. "id": {
  17711. "type": "string",
  17712. "pattern": "^evt_"
  17713. },
  17714. "type": {
  17715. "type": "string",
  17716. "enum": ["session.next.agent.switched"]
  17717. },
  17718. "properties": {
  17719. "type": "object",
  17720. "properties": {
  17721. "timestamp": {
  17722. "type": "number"
  17723. },
  17724. "sessionID": {
  17725. "type": "string",
  17726. "pattern": "^ses"
  17727. },
  17728. "messageID": {
  17729. "type": "string",
  17730. "pattern": "^msg_"
  17731. },
  17732. "agent": {
  17733. "type": "string"
  17734. }
  17735. },
  17736. "required": ["timestamp", "sessionID", "messageID", "agent"],
  17737. "additionalProperties": false
  17738. }
  17739. },
  17740. "required": ["id", "type", "properties"],
  17741. "additionalProperties": false
  17742. },
  17743. {
  17744. "type": "object",
  17745. "properties": {
  17746. "id": {
  17747. "type": "string",
  17748. "pattern": "^evt_"
  17749. },
  17750. "type": {
  17751. "type": "string",
  17752. "enum": ["session.next.model.switched"]
  17753. },
  17754. "properties": {
  17755. "type": "object",
  17756. "properties": {
  17757. "timestamp": {
  17758. "type": "number"
  17759. },
  17760. "sessionID": {
  17761. "type": "string",
  17762. "pattern": "^ses"
  17763. },
  17764. "messageID": {
  17765. "type": "string",
  17766. "pattern": "^msg_"
  17767. },
  17768. "model": {
  17769. "$ref": "#/components/schemas/ModelRef"
  17770. }
  17771. },
  17772. "required": ["timestamp", "sessionID", "messageID", "model"],
  17773. "additionalProperties": false
  17774. }
  17775. },
  17776. "required": ["id", "type", "properties"],
  17777. "additionalProperties": false
  17778. },
  17779. {
  17780. "type": "object",
  17781. "properties": {
  17782. "id": {
  17783. "type": "string",
  17784. "pattern": "^evt_"
  17785. },
  17786. "type": {
  17787. "type": "string",
  17788. "enum": ["session.next.moved"]
  17789. },
  17790. "properties": {
  17791. "type": "object",
  17792. "properties": {
  17793. "timestamp": {
  17794. "type": "number"
  17795. },
  17796. "sessionID": {
  17797. "type": "string",
  17798. "pattern": "^ses"
  17799. },
  17800. "location": {
  17801. "$ref": "#/components/schemas/LocationRef"
  17802. },
  17803. "subdirectory": {
  17804. "type": "string"
  17805. }
  17806. },
  17807. "required": ["timestamp", "sessionID", "location"],
  17808. "additionalProperties": false
  17809. }
  17810. },
  17811. "required": ["id", "type", "properties"],
  17812. "additionalProperties": false
  17813. },
  17814. {
  17815. "type": "object",
  17816. "properties": {
  17817. "id": {
  17818. "type": "string",
  17819. "pattern": "^evt_"
  17820. },
  17821. "type": {
  17822. "type": "string",
  17823. "enum": ["session.next.prompted"]
  17824. },
  17825. "properties": {
  17826. "type": "object",
  17827. "properties": {
  17828. "timestamp": {
  17829. "type": "number"
  17830. },
  17831. "sessionID": {
  17832. "type": "string",
  17833. "pattern": "^ses"
  17834. },
  17835. "messageID": {
  17836. "type": "string",
  17837. "pattern": "^msg_"
  17838. },
  17839. "prompt": {
  17840. "$ref": "#/components/schemas/Prompt"
  17841. },
  17842. "delivery": {
  17843. "type": "string",
  17844. "enum": ["steer", "queue"]
  17845. }
  17846. },
  17847. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  17848. "additionalProperties": false
  17849. }
  17850. },
  17851. "required": ["id", "type", "properties"],
  17852. "additionalProperties": false
  17853. },
  17854. {
  17855. "type": "object",
  17856. "properties": {
  17857. "id": {
  17858. "type": "string",
  17859. "pattern": "^evt_"
  17860. },
  17861. "type": {
  17862. "type": "string",
  17863. "enum": ["session.next.prompt.admitted"]
  17864. },
  17865. "properties": {
  17866. "type": "object",
  17867. "properties": {
  17868. "timestamp": {
  17869. "type": "number"
  17870. },
  17871. "sessionID": {
  17872. "type": "string",
  17873. "pattern": "^ses"
  17874. },
  17875. "messageID": {
  17876. "type": "string",
  17877. "pattern": "^msg_"
  17878. },
  17879. "prompt": {
  17880. "$ref": "#/components/schemas/Prompt"
  17881. },
  17882. "delivery": {
  17883. "type": "string",
  17884. "enum": ["steer", "queue"]
  17885. }
  17886. },
  17887. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  17888. "additionalProperties": false
  17889. }
  17890. },
  17891. "required": ["id", "type", "properties"],
  17892. "additionalProperties": false
  17893. },
  17894. {
  17895. "type": "object",
  17896. "properties": {
  17897. "id": {
  17898. "type": "string",
  17899. "pattern": "^evt_"
  17900. },
  17901. "type": {
  17902. "type": "string",
  17903. "enum": ["session.next.context.updated"]
  17904. },
  17905. "properties": {
  17906. "type": "object",
  17907. "properties": {
  17908. "timestamp": {
  17909. "type": "number"
  17910. },
  17911. "sessionID": {
  17912. "type": "string",
  17913. "pattern": "^ses"
  17914. },
  17915. "messageID": {
  17916. "type": "string",
  17917. "pattern": "^msg_"
  17918. },
  17919. "text": {
  17920. "type": "string"
  17921. }
  17922. },
  17923. "required": ["timestamp", "sessionID", "messageID", "text"],
  17924. "additionalProperties": false
  17925. }
  17926. },
  17927. "required": ["id", "type", "properties"],
  17928. "additionalProperties": false
  17929. },
  17930. {
  17931. "type": "object",
  17932. "properties": {
  17933. "id": {
  17934. "type": "string",
  17935. "pattern": "^evt_"
  17936. },
  17937. "type": {
  17938. "type": "string",
  17939. "enum": ["session.next.synthetic"]
  17940. },
  17941. "properties": {
  17942. "type": "object",
  17943. "properties": {
  17944. "timestamp": {
  17945. "type": "number"
  17946. },
  17947. "sessionID": {
  17948. "type": "string",
  17949. "pattern": "^ses"
  17950. },
  17951. "messageID": {
  17952. "type": "string",
  17953. "pattern": "^msg_"
  17954. },
  17955. "text": {
  17956. "type": "string"
  17957. }
  17958. },
  17959. "required": ["timestamp", "sessionID", "messageID", "text"],
  17960. "additionalProperties": false
  17961. }
  17962. },
  17963. "required": ["id", "type", "properties"],
  17964. "additionalProperties": false
  17965. },
  17966. {
  17967. "type": "object",
  17968. "properties": {
  17969. "id": {
  17970. "type": "string",
  17971. "pattern": "^evt_"
  17972. },
  17973. "type": {
  17974. "type": "string",
  17975. "enum": ["session.next.shell.started"]
  17976. },
  17977. "properties": {
  17978. "type": "object",
  17979. "properties": {
  17980. "timestamp": {
  17981. "type": "number"
  17982. },
  17983. "sessionID": {
  17984. "type": "string",
  17985. "pattern": "^ses"
  17986. },
  17987. "messageID": {
  17988. "type": "string",
  17989. "pattern": "^msg_"
  17990. },
  17991. "callID": {
  17992. "type": "string"
  17993. },
  17994. "command": {
  17995. "type": "string"
  17996. }
  17997. },
  17998. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  17999. "additionalProperties": false
  18000. }
  18001. },
  18002. "required": ["id", "type", "properties"],
  18003. "additionalProperties": false
  18004. },
  18005. {
  18006. "type": "object",
  18007. "properties": {
  18008. "id": {
  18009. "type": "string",
  18010. "pattern": "^evt_"
  18011. },
  18012. "type": {
  18013. "type": "string",
  18014. "enum": ["session.next.shell.ended"]
  18015. },
  18016. "properties": {
  18017. "type": "object",
  18018. "properties": {
  18019. "timestamp": {
  18020. "type": "number"
  18021. },
  18022. "sessionID": {
  18023. "type": "string",
  18024. "pattern": "^ses"
  18025. },
  18026. "callID": {
  18027. "type": "string"
  18028. },
  18029. "output": {
  18030. "type": "string"
  18031. }
  18032. },
  18033. "required": ["timestamp", "sessionID", "callID", "output"],
  18034. "additionalProperties": false
  18035. }
  18036. },
  18037. "required": ["id", "type", "properties"],
  18038. "additionalProperties": false
  18039. },
  18040. {
  18041. "type": "object",
  18042. "properties": {
  18043. "id": {
  18044. "type": "string",
  18045. "pattern": "^evt_"
  18046. },
  18047. "type": {
  18048. "type": "string",
  18049. "enum": ["session.next.step.started"]
  18050. },
  18051. "properties": {
  18052. "type": "object",
  18053. "properties": {
  18054. "timestamp": {
  18055. "type": "number"
  18056. },
  18057. "sessionID": {
  18058. "type": "string",
  18059. "pattern": "^ses"
  18060. },
  18061. "assistantMessageID": {
  18062. "type": "string",
  18063. "pattern": "^msg_"
  18064. },
  18065. "agent": {
  18066. "type": "string"
  18067. },
  18068. "model": {
  18069. "$ref": "#/components/schemas/ModelRef"
  18070. },
  18071. "snapshot": {
  18072. "type": "string"
  18073. }
  18074. },
  18075. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  18076. "additionalProperties": false
  18077. }
  18078. },
  18079. "required": ["id", "type", "properties"],
  18080. "additionalProperties": false
  18081. },
  18082. {
  18083. "type": "object",
  18084. "properties": {
  18085. "id": {
  18086. "type": "string",
  18087. "pattern": "^evt_"
  18088. },
  18089. "type": {
  18090. "type": "string",
  18091. "enum": ["session.next.step.ended"]
  18092. },
  18093. "properties": {
  18094. "type": "object",
  18095. "properties": {
  18096. "timestamp": {
  18097. "type": "number"
  18098. },
  18099. "sessionID": {
  18100. "type": "string",
  18101. "pattern": "^ses"
  18102. },
  18103. "assistantMessageID": {
  18104. "type": "string",
  18105. "pattern": "^msg_"
  18106. },
  18107. "finish": {
  18108. "type": "string"
  18109. },
  18110. "cost": {
  18111. "type": "number"
  18112. },
  18113. "tokens": {
  18114. "type": "object",
  18115. "properties": {
  18116. "input": {
  18117. "type": "number"
  18118. },
  18119. "output": {
  18120. "type": "number"
  18121. },
  18122. "reasoning": {
  18123. "type": "number"
  18124. },
  18125. "cache": {
  18126. "type": "object",
  18127. "properties": {
  18128. "read": {
  18129. "type": "number"
  18130. },
  18131. "write": {
  18132. "type": "number"
  18133. }
  18134. },
  18135. "required": ["read", "write"],
  18136. "additionalProperties": false
  18137. }
  18138. },
  18139. "required": ["input", "output", "reasoning", "cache"],
  18140. "additionalProperties": false
  18141. },
  18142. "snapshot": {
  18143. "type": "string"
  18144. },
  18145. "files": {
  18146. "type": "array",
  18147. "items": {
  18148. "type": "string"
  18149. }
  18150. }
  18151. },
  18152. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  18153. "additionalProperties": false
  18154. }
  18155. },
  18156. "required": ["id", "type", "properties"],
  18157. "additionalProperties": false
  18158. },
  18159. {
  18160. "type": "object",
  18161. "properties": {
  18162. "id": {
  18163. "type": "string",
  18164. "pattern": "^evt_"
  18165. },
  18166. "type": {
  18167. "type": "string",
  18168. "enum": ["session.next.step.failed"]
  18169. },
  18170. "properties": {
  18171. "type": "object",
  18172. "properties": {
  18173. "timestamp": {
  18174. "type": "number"
  18175. },
  18176. "sessionID": {
  18177. "type": "string",
  18178. "pattern": "^ses"
  18179. },
  18180. "assistantMessageID": {
  18181. "type": "string",
  18182. "pattern": "^msg_"
  18183. },
  18184. "error": {
  18185. "$ref": "#/components/schemas/SessionErrorUnknown"
  18186. }
  18187. },
  18188. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  18189. "additionalProperties": false
  18190. }
  18191. },
  18192. "required": ["id", "type", "properties"],
  18193. "additionalProperties": false
  18194. },
  18195. {
  18196. "type": "object",
  18197. "properties": {
  18198. "id": {
  18199. "type": "string",
  18200. "pattern": "^evt_"
  18201. },
  18202. "type": {
  18203. "type": "string",
  18204. "enum": ["session.next.text.started"]
  18205. },
  18206. "properties": {
  18207. "type": "object",
  18208. "properties": {
  18209. "timestamp": {
  18210. "type": "number"
  18211. },
  18212. "sessionID": {
  18213. "type": "string",
  18214. "pattern": "^ses"
  18215. },
  18216. "assistantMessageID": {
  18217. "type": "string",
  18218. "pattern": "^msg_"
  18219. },
  18220. "textID": {
  18221. "type": "string"
  18222. }
  18223. },
  18224. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  18225. "additionalProperties": false
  18226. }
  18227. },
  18228. "required": ["id", "type", "properties"],
  18229. "additionalProperties": false
  18230. },
  18231. {
  18232. "type": "object",
  18233. "properties": {
  18234. "id": {
  18235. "type": "string",
  18236. "pattern": "^evt_"
  18237. },
  18238. "type": {
  18239. "type": "string",
  18240. "enum": ["session.next.text.delta"]
  18241. },
  18242. "properties": {
  18243. "type": "object",
  18244. "properties": {
  18245. "timestamp": {
  18246. "type": "number"
  18247. },
  18248. "sessionID": {
  18249. "type": "string",
  18250. "pattern": "^ses"
  18251. },
  18252. "assistantMessageID": {
  18253. "type": "string",
  18254. "pattern": "^msg_"
  18255. },
  18256. "textID": {
  18257. "type": "string"
  18258. },
  18259. "delta": {
  18260. "type": "string"
  18261. }
  18262. },
  18263. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  18264. "additionalProperties": false
  18265. }
  18266. },
  18267. "required": ["id", "type", "properties"],
  18268. "additionalProperties": false
  18269. },
  18270. {
  18271. "type": "object",
  18272. "properties": {
  18273. "id": {
  18274. "type": "string",
  18275. "pattern": "^evt_"
  18276. },
  18277. "type": {
  18278. "type": "string",
  18279. "enum": ["session.next.text.ended"]
  18280. },
  18281. "properties": {
  18282. "type": "object",
  18283. "properties": {
  18284. "timestamp": {
  18285. "type": "number"
  18286. },
  18287. "sessionID": {
  18288. "type": "string",
  18289. "pattern": "^ses"
  18290. },
  18291. "assistantMessageID": {
  18292. "type": "string",
  18293. "pattern": "^msg_"
  18294. },
  18295. "textID": {
  18296. "type": "string"
  18297. },
  18298. "text": {
  18299. "type": "string"
  18300. }
  18301. },
  18302. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  18303. "additionalProperties": false
  18304. }
  18305. },
  18306. "required": ["id", "type", "properties"],
  18307. "additionalProperties": false
  18308. },
  18309. {
  18310. "type": "object",
  18311. "properties": {
  18312. "id": {
  18313. "type": "string",
  18314. "pattern": "^evt_"
  18315. },
  18316. "type": {
  18317. "type": "string",
  18318. "enum": ["session.next.reasoning.started"]
  18319. },
  18320. "properties": {
  18321. "type": "object",
  18322. "properties": {
  18323. "timestamp": {
  18324. "type": "number"
  18325. },
  18326. "sessionID": {
  18327. "type": "string",
  18328. "pattern": "^ses"
  18329. },
  18330. "assistantMessageID": {
  18331. "type": "string",
  18332. "pattern": "^msg_"
  18333. },
  18334. "reasoningID": {
  18335. "type": "string"
  18336. },
  18337. "providerMetadata": {
  18338. "$ref": "#/components/schemas/LLMProviderMetadata"
  18339. }
  18340. },
  18341. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  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": ["session.next.reasoning.delta"]
  18358. },
  18359. "properties": {
  18360. "type": "object",
  18361. "properties": {
  18362. "timestamp": {
  18363. "type": "number"
  18364. },
  18365. "sessionID": {
  18366. "type": "string",
  18367. "pattern": "^ses"
  18368. },
  18369. "assistantMessageID": {
  18370. "type": "string",
  18371. "pattern": "^msg_"
  18372. },
  18373. "reasoningID": {
  18374. "type": "string"
  18375. },
  18376. "delta": {
  18377. "type": "string"
  18378. }
  18379. },
  18380. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  18381. "additionalProperties": false
  18382. }
  18383. },
  18384. "required": ["id", "type", "properties"],
  18385. "additionalProperties": false
  18386. },
  18387. {
  18388. "type": "object",
  18389. "properties": {
  18390. "id": {
  18391. "type": "string",
  18392. "pattern": "^evt_"
  18393. },
  18394. "type": {
  18395. "type": "string",
  18396. "enum": ["session.next.reasoning.ended"]
  18397. },
  18398. "properties": {
  18399. "type": "object",
  18400. "properties": {
  18401. "timestamp": {
  18402. "type": "number"
  18403. },
  18404. "sessionID": {
  18405. "type": "string",
  18406. "pattern": "^ses"
  18407. },
  18408. "assistantMessageID": {
  18409. "type": "string",
  18410. "pattern": "^msg_"
  18411. },
  18412. "reasoningID": {
  18413. "type": "string"
  18414. },
  18415. "text": {
  18416. "type": "string"
  18417. },
  18418. "providerMetadata": {
  18419. "$ref": "#/components/schemas/LLMProviderMetadata"
  18420. }
  18421. },
  18422. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  18423. "additionalProperties": false
  18424. }
  18425. },
  18426. "required": ["id", "type", "properties"],
  18427. "additionalProperties": false
  18428. },
  18429. {
  18430. "type": "object",
  18431. "properties": {
  18432. "id": {
  18433. "type": "string",
  18434. "pattern": "^evt_"
  18435. },
  18436. "type": {
  18437. "type": "string",
  18438. "enum": ["session.next.tool.input.started"]
  18439. },
  18440. "properties": {
  18441. "type": "object",
  18442. "properties": {
  18443. "timestamp": {
  18444. "type": "number"
  18445. },
  18446. "sessionID": {
  18447. "type": "string",
  18448. "pattern": "^ses"
  18449. },
  18450. "assistantMessageID": {
  18451. "type": "string",
  18452. "pattern": "^msg_"
  18453. },
  18454. "callID": {
  18455. "type": "string"
  18456. },
  18457. "name": {
  18458. "type": "string"
  18459. }
  18460. },
  18461. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  18462. "additionalProperties": false
  18463. }
  18464. },
  18465. "required": ["id", "type", "properties"],
  18466. "additionalProperties": false
  18467. },
  18468. {
  18469. "type": "object",
  18470. "properties": {
  18471. "id": {
  18472. "type": "string",
  18473. "pattern": "^evt_"
  18474. },
  18475. "type": {
  18476. "type": "string",
  18477. "enum": ["session.next.tool.input.delta"]
  18478. },
  18479. "properties": {
  18480. "type": "object",
  18481. "properties": {
  18482. "timestamp": {
  18483. "type": "number"
  18484. },
  18485. "sessionID": {
  18486. "type": "string",
  18487. "pattern": "^ses"
  18488. },
  18489. "assistantMessageID": {
  18490. "type": "string",
  18491. "pattern": "^msg_"
  18492. },
  18493. "callID": {
  18494. "type": "string"
  18495. },
  18496. "delta": {
  18497. "type": "string"
  18498. }
  18499. },
  18500. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  18501. "additionalProperties": false
  18502. }
  18503. },
  18504. "required": ["id", "type", "properties"],
  18505. "additionalProperties": false
  18506. },
  18507. {
  18508. "type": "object",
  18509. "properties": {
  18510. "id": {
  18511. "type": "string",
  18512. "pattern": "^evt_"
  18513. },
  18514. "type": {
  18515. "type": "string",
  18516. "enum": ["session.next.tool.input.ended"]
  18517. },
  18518. "properties": {
  18519. "type": "object",
  18520. "properties": {
  18521. "timestamp": {
  18522. "type": "number"
  18523. },
  18524. "sessionID": {
  18525. "type": "string",
  18526. "pattern": "^ses"
  18527. },
  18528. "assistantMessageID": {
  18529. "type": "string",
  18530. "pattern": "^msg_"
  18531. },
  18532. "callID": {
  18533. "type": "string"
  18534. },
  18535. "text": {
  18536. "type": "string"
  18537. }
  18538. },
  18539. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  18540. "additionalProperties": false
  18541. }
  18542. },
  18543. "required": ["id", "type", "properties"],
  18544. "additionalProperties": false
  18545. },
  18546. {
  18547. "type": "object",
  18548. "properties": {
  18549. "id": {
  18550. "type": "string",
  18551. "pattern": "^evt_"
  18552. },
  18553. "type": {
  18554. "type": "string",
  18555. "enum": ["session.next.tool.called"]
  18556. },
  18557. "properties": {
  18558. "type": "object",
  18559. "properties": {
  18560. "timestamp": {
  18561. "type": "number"
  18562. },
  18563. "sessionID": {
  18564. "type": "string",
  18565. "pattern": "^ses"
  18566. },
  18567. "assistantMessageID": {
  18568. "type": "string",
  18569. "pattern": "^msg_"
  18570. },
  18571. "callID": {
  18572. "type": "string"
  18573. },
  18574. "tool": {
  18575. "type": "string"
  18576. },
  18577. "input": {
  18578. "type": "object"
  18579. },
  18580. "provider": {
  18581. "type": "object",
  18582. "properties": {
  18583. "executed": {
  18584. "type": "boolean"
  18585. },
  18586. "metadata": {
  18587. "$ref": "#/components/schemas/LLMProviderMetadata"
  18588. }
  18589. },
  18590. "required": ["executed"],
  18591. "additionalProperties": false
  18592. }
  18593. },
  18594. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  18595. "additionalProperties": false
  18596. }
  18597. },
  18598. "required": ["id", "type", "properties"],
  18599. "additionalProperties": false
  18600. },
  18601. {
  18602. "type": "object",
  18603. "properties": {
  18604. "id": {
  18605. "type": "string",
  18606. "pattern": "^evt_"
  18607. },
  18608. "type": {
  18609. "type": "string",
  18610. "enum": ["session.next.tool.progress"]
  18611. },
  18612. "properties": {
  18613. "type": "object",
  18614. "properties": {
  18615. "timestamp": {
  18616. "type": "number"
  18617. },
  18618. "sessionID": {
  18619. "type": "string",
  18620. "pattern": "^ses"
  18621. },
  18622. "assistantMessageID": {
  18623. "type": "string",
  18624. "pattern": "^msg_"
  18625. },
  18626. "callID": {
  18627. "type": "string"
  18628. },
  18629. "structured": {
  18630. "type": "object"
  18631. },
  18632. "content": {
  18633. "type": "array",
  18634. "items": {
  18635. "$ref": "#/components/schemas/LLMToolContent"
  18636. }
  18637. }
  18638. },
  18639. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  18640. "additionalProperties": false
  18641. }
  18642. },
  18643. "required": ["id", "type", "properties"],
  18644. "additionalProperties": false
  18645. },
  18646. {
  18647. "type": "object",
  18648. "properties": {
  18649. "id": {
  18650. "type": "string",
  18651. "pattern": "^evt_"
  18652. },
  18653. "type": {
  18654. "type": "string",
  18655. "enum": ["session.next.tool.success"]
  18656. },
  18657. "properties": {
  18658. "type": "object",
  18659. "properties": {
  18660. "timestamp": {
  18661. "type": "number"
  18662. },
  18663. "sessionID": {
  18664. "type": "string",
  18665. "pattern": "^ses"
  18666. },
  18667. "assistantMessageID": {
  18668. "type": "string",
  18669. "pattern": "^msg_"
  18670. },
  18671. "callID": {
  18672. "type": "string"
  18673. },
  18674. "structured": {
  18675. "type": "object"
  18676. },
  18677. "content": {
  18678. "type": "array",
  18679. "items": {
  18680. "$ref": "#/components/schemas/LLMToolContent"
  18681. }
  18682. },
  18683. "outputPaths": {
  18684. "type": "array",
  18685. "items": {
  18686. "type": "string"
  18687. }
  18688. },
  18689. "result": {},
  18690. "provider": {
  18691. "type": "object",
  18692. "properties": {
  18693. "executed": {
  18694. "type": "boolean"
  18695. },
  18696. "metadata": {
  18697. "$ref": "#/components/schemas/LLMProviderMetadata"
  18698. }
  18699. },
  18700. "required": ["executed"],
  18701. "additionalProperties": false
  18702. }
  18703. },
  18704. "required": [
  18705. "timestamp",
  18706. "sessionID",
  18707. "assistantMessageID",
  18708. "callID",
  18709. "structured",
  18710. "content",
  18711. "provider"
  18712. ],
  18713. "additionalProperties": false
  18714. }
  18715. },
  18716. "required": ["id", "type", "properties"],
  18717. "additionalProperties": false
  18718. },
  18719. {
  18720. "type": "object",
  18721. "properties": {
  18722. "id": {
  18723. "type": "string",
  18724. "pattern": "^evt_"
  18725. },
  18726. "type": {
  18727. "type": "string",
  18728. "enum": ["session.next.tool.failed"]
  18729. },
  18730. "properties": {
  18731. "type": "object",
  18732. "properties": {
  18733. "timestamp": {
  18734. "type": "number"
  18735. },
  18736. "sessionID": {
  18737. "type": "string",
  18738. "pattern": "^ses"
  18739. },
  18740. "assistantMessageID": {
  18741. "type": "string",
  18742. "pattern": "^msg_"
  18743. },
  18744. "callID": {
  18745. "type": "string"
  18746. },
  18747. "error": {
  18748. "$ref": "#/components/schemas/SessionErrorUnknown"
  18749. },
  18750. "result": {},
  18751. "provider": {
  18752. "type": "object",
  18753. "properties": {
  18754. "executed": {
  18755. "type": "boolean"
  18756. },
  18757. "metadata": {
  18758. "$ref": "#/components/schemas/LLMProviderMetadata"
  18759. }
  18760. },
  18761. "required": ["executed"],
  18762. "additionalProperties": false
  18763. }
  18764. },
  18765. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  18766. "additionalProperties": false
  18767. }
  18768. },
  18769. "required": ["id", "type", "properties"],
  18770. "additionalProperties": false
  18771. },
  18772. {
  18773. "type": "object",
  18774. "properties": {
  18775. "id": {
  18776. "type": "string",
  18777. "pattern": "^evt_"
  18778. },
  18779. "type": {
  18780. "type": "string",
  18781. "enum": ["session.next.retried"]
  18782. },
  18783. "properties": {
  18784. "type": "object",
  18785. "properties": {
  18786. "timestamp": {
  18787. "type": "number"
  18788. },
  18789. "sessionID": {
  18790. "type": "string",
  18791. "pattern": "^ses"
  18792. },
  18793. "attempt": {
  18794. "type": "number"
  18795. },
  18796. "error": {
  18797. "$ref": "#/components/schemas/SessionNextRetry_error"
  18798. }
  18799. },
  18800. "required": ["timestamp", "sessionID", "attempt", "error"],
  18801. "additionalProperties": false
  18802. }
  18803. },
  18804. "required": ["id", "type", "properties"],
  18805. "additionalProperties": false
  18806. },
  18807. {
  18808. "type": "object",
  18809. "properties": {
  18810. "id": {
  18811. "type": "string",
  18812. "pattern": "^evt_"
  18813. },
  18814. "type": {
  18815. "type": "string",
  18816. "enum": ["session.next.compaction.started"]
  18817. },
  18818. "properties": {
  18819. "type": "object",
  18820. "properties": {
  18821. "timestamp": {
  18822. "type": "number"
  18823. },
  18824. "sessionID": {
  18825. "type": "string",
  18826. "pattern": "^ses"
  18827. },
  18828. "messageID": {
  18829. "type": "string",
  18830. "pattern": "^msg_"
  18831. },
  18832. "reason": {
  18833. "type": "string",
  18834. "enum": ["auto", "manual"]
  18835. }
  18836. },
  18837. "required": ["timestamp", "sessionID", "messageID", "reason"],
  18838. "additionalProperties": false
  18839. }
  18840. },
  18841. "required": ["id", "type", "properties"],
  18842. "additionalProperties": false
  18843. },
  18844. {
  18845. "type": "object",
  18846. "properties": {
  18847. "id": {
  18848. "type": "string",
  18849. "pattern": "^evt_"
  18850. },
  18851. "type": {
  18852. "type": "string",
  18853. "enum": ["session.next.compaction.delta"]
  18854. },
  18855. "properties": {
  18856. "type": "object",
  18857. "properties": {
  18858. "timestamp": {
  18859. "type": "number"
  18860. },
  18861. "sessionID": {
  18862. "type": "string",
  18863. "pattern": "^ses"
  18864. },
  18865. "messageID": {
  18866. "type": "string",
  18867. "pattern": "^msg_"
  18868. },
  18869. "text": {
  18870. "type": "string"
  18871. }
  18872. },
  18873. "required": ["timestamp", "sessionID", "messageID", "text"],
  18874. "additionalProperties": false
  18875. }
  18876. },
  18877. "required": ["id", "type", "properties"],
  18878. "additionalProperties": false
  18879. },
  18880. {
  18881. "type": "object",
  18882. "properties": {
  18883. "id": {
  18884. "type": "string",
  18885. "pattern": "^evt_"
  18886. },
  18887. "type": {
  18888. "type": "string",
  18889. "enum": ["session.next.compaction.ended"]
  18890. },
  18891. "properties": {
  18892. "type": "object",
  18893. "properties": {
  18894. "timestamp": {
  18895. "type": "number"
  18896. },
  18897. "sessionID": {
  18898. "type": "string",
  18899. "pattern": "^ses"
  18900. },
  18901. "messageID": {
  18902. "type": "string",
  18903. "pattern": "^msg_"
  18904. },
  18905. "reason": {
  18906. "type": "string",
  18907. "enum": ["auto", "manual"]
  18908. },
  18909. "text": {
  18910. "type": "string"
  18911. },
  18912. "recent": {
  18913. "type": "string"
  18914. }
  18915. },
  18916. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  18917. "additionalProperties": false
  18918. }
  18919. },
  18920. "required": ["id", "type", "properties"],
  18921. "additionalProperties": false
  18922. },
  18923. {
  18924. "type": "object",
  18925. "properties": {
  18926. "id": {
  18927. "type": "string",
  18928. "pattern": "^evt_"
  18929. },
  18930. "type": {
  18931. "type": "string",
  18932. "enum": ["session.next.revert.staged"]
  18933. },
  18934. "properties": {
  18935. "type": "object",
  18936. "properties": {
  18937. "timestamp": {
  18938. "type": "number"
  18939. },
  18940. "sessionID": {
  18941. "type": "string",
  18942. "pattern": "^ses"
  18943. },
  18944. "revert": {
  18945. "$ref": "#/components/schemas/RevertState"
  18946. }
  18947. },
  18948. "required": ["timestamp", "sessionID", "revert"],
  18949. "additionalProperties": false
  18950. }
  18951. },
  18952. "required": ["id", "type", "properties"],
  18953. "additionalProperties": false
  18954. },
  18955. {
  18956. "type": "object",
  18957. "properties": {
  18958. "id": {
  18959. "type": "string",
  18960. "pattern": "^evt_"
  18961. },
  18962. "type": {
  18963. "type": "string",
  18964. "enum": ["session.next.revert.cleared"]
  18965. },
  18966. "properties": {
  18967. "type": "object",
  18968. "properties": {
  18969. "timestamp": {
  18970. "type": "number"
  18971. },
  18972. "sessionID": {
  18973. "type": "string",
  18974. "pattern": "^ses"
  18975. }
  18976. },
  18977. "required": ["timestamp", "sessionID"],
  18978. "additionalProperties": false
  18979. }
  18980. },
  18981. "required": ["id", "type", "properties"],
  18982. "additionalProperties": false
  18983. },
  18984. {
  18985. "type": "object",
  18986. "properties": {
  18987. "id": {
  18988. "type": "string",
  18989. "pattern": "^evt_"
  18990. },
  18991. "type": {
  18992. "type": "string",
  18993. "enum": ["session.next.revert.committed"]
  18994. },
  18995. "properties": {
  18996. "type": "object",
  18997. "properties": {
  18998. "timestamp": {
  18999. "type": "number"
  19000. },
  19001. "sessionID": {
  19002. "type": "string",
  19003. "pattern": "^ses"
  19004. },
  19005. "messageID": {
  19006. "type": "string",
  19007. "pattern": "^msg_"
  19008. }
  19009. },
  19010. "required": ["timestamp", "sessionID", "messageID"],
  19011. "additionalProperties": false
  19012. }
  19013. },
  19014. "required": ["id", "type", "properties"],
  19015. "additionalProperties": false
  19016. },
  19017. {
  19018. "type": "object",
  19019. "properties": {
  19020. "id": {
  19021. "type": "string",
  19022. "pattern": "^evt_"
  19023. },
  19024. "type": {
  19025. "type": "string",
  19026. "enum": ["message.part.delta"]
  19027. },
  19028. "properties": {
  19029. "type": "object",
  19030. "properties": {
  19031. "sessionID": {
  19032. "type": "string",
  19033. "pattern": "^ses"
  19034. },
  19035. "messageID": {
  19036. "type": "string",
  19037. "pattern": "^msg"
  19038. },
  19039. "partID": {
  19040. "type": "string",
  19041. "pattern": "^prt"
  19042. },
  19043. "field": {
  19044. "type": "string"
  19045. },
  19046. "delta": {
  19047. "type": "string"
  19048. }
  19049. },
  19050. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  19051. "additionalProperties": false
  19052. }
  19053. },
  19054. "required": ["id", "type", "properties"],
  19055. "additionalProperties": false
  19056. },
  19057. {
  19058. "type": "object",
  19059. "properties": {
  19060. "id": {
  19061. "type": "string",
  19062. "pattern": "^evt_"
  19063. },
  19064. "type": {
  19065. "type": "string",
  19066. "enum": ["session.diff"]
  19067. },
  19068. "properties": {
  19069. "type": "object",
  19070. "properties": {
  19071. "sessionID": {
  19072. "type": "string",
  19073. "pattern": "^ses"
  19074. },
  19075. "diff": {
  19076. "type": "array",
  19077. "items": {
  19078. "$ref": "#/components/schemas/SnapshotFileDiff"
  19079. }
  19080. }
  19081. },
  19082. "required": ["sessionID", "diff"],
  19083. "additionalProperties": false
  19084. }
  19085. },
  19086. "required": ["id", "type", "properties"],
  19087. "additionalProperties": false
  19088. },
  19089. {
  19090. "type": "object",
  19091. "properties": {
  19092. "id": {
  19093. "type": "string",
  19094. "pattern": "^evt_"
  19095. },
  19096. "type": {
  19097. "type": "string",
  19098. "enum": ["session.error"]
  19099. },
  19100. "properties": {
  19101. "type": "object",
  19102. "properties": {
  19103. "sessionID": {
  19104. "type": "string",
  19105. "pattern": "^ses"
  19106. },
  19107. "error": {
  19108. "anyOf": [
  19109. {
  19110. "$ref": "#/components/schemas/ProviderAuthError"
  19111. },
  19112. {
  19113. "$ref": "#/components/schemas/UnknownError"
  19114. },
  19115. {
  19116. "$ref": "#/components/schemas/MessageOutputLengthError"
  19117. },
  19118. {
  19119. "$ref": "#/components/schemas/MessageAbortedError"
  19120. },
  19121. {
  19122. "$ref": "#/components/schemas/StructuredOutputError"
  19123. },
  19124. {
  19125. "$ref": "#/components/schemas/ContextOverflowError"
  19126. },
  19127. {
  19128. "$ref": "#/components/schemas/ContentFilterError"
  19129. },
  19130. {
  19131. "$ref": "#/components/schemas/APIError"
  19132. }
  19133. ]
  19134. }
  19135. },
  19136. "additionalProperties": false
  19137. }
  19138. },
  19139. "required": ["id", "type", "properties"],
  19140. "additionalProperties": false
  19141. },
  19142. {
  19143. "type": "object",
  19144. "properties": {
  19145. "id": {
  19146. "type": "string",
  19147. "pattern": "^evt_"
  19148. },
  19149. "type": {
  19150. "type": "string",
  19151. "enum": ["installation.updated"]
  19152. },
  19153. "properties": {
  19154. "type": "object",
  19155. "properties": {
  19156. "version": {
  19157. "type": "string"
  19158. }
  19159. },
  19160. "required": ["version"],
  19161. "additionalProperties": false
  19162. }
  19163. },
  19164. "required": ["id", "type", "properties"],
  19165. "additionalProperties": false
  19166. },
  19167. {
  19168. "type": "object",
  19169. "properties": {
  19170. "id": {
  19171. "type": "string",
  19172. "pattern": "^evt_"
  19173. },
  19174. "type": {
  19175. "type": "string",
  19176. "enum": ["installation.update-available"]
  19177. },
  19178. "properties": {
  19179. "type": "object",
  19180. "properties": {
  19181. "version": {
  19182. "type": "string"
  19183. }
  19184. },
  19185. "required": ["version"],
  19186. "additionalProperties": false
  19187. }
  19188. },
  19189. "required": ["id", "type", "properties"],
  19190. "additionalProperties": false
  19191. },
  19192. {
  19193. "type": "object",
  19194. "properties": {
  19195. "id": {
  19196. "type": "string",
  19197. "pattern": "^evt_"
  19198. },
  19199. "type": {
  19200. "type": "string",
  19201. "enum": ["file.edited"]
  19202. },
  19203. "properties": {
  19204. "type": "object",
  19205. "properties": {
  19206. "file": {
  19207. "type": "string"
  19208. }
  19209. },
  19210. "required": ["file"],
  19211. "additionalProperties": false
  19212. }
  19213. },
  19214. "required": ["id", "type", "properties"],
  19215. "additionalProperties": false
  19216. },
  19217. {
  19218. "type": "object",
  19219. "properties": {
  19220. "id": {
  19221. "type": "string",
  19222. "pattern": "^evt_"
  19223. },
  19224. "type": {
  19225. "type": "string",
  19226. "enum": ["reference.updated"]
  19227. },
  19228. "properties": {
  19229. "type": "object",
  19230. "properties": {}
  19231. }
  19232. },
  19233. "required": ["id", "type", "properties"],
  19234. "additionalProperties": false
  19235. },
  19236. {
  19237. "type": "object",
  19238. "properties": {
  19239. "id": {
  19240. "type": "string",
  19241. "pattern": "^evt_"
  19242. },
  19243. "type": {
  19244. "type": "string",
  19245. "enum": ["permission.v2.asked"]
  19246. },
  19247. "properties": {
  19248. "type": "object",
  19249. "properties": {
  19250. "id": {
  19251. "type": "string",
  19252. "pattern": "^per"
  19253. },
  19254. "sessionID": {
  19255. "type": "string",
  19256. "pattern": "^ses"
  19257. },
  19258. "action": {
  19259. "type": "string"
  19260. },
  19261. "resources": {
  19262. "type": "array",
  19263. "items": {
  19264. "type": "string"
  19265. }
  19266. },
  19267. "save": {
  19268. "type": "array",
  19269. "items": {
  19270. "type": "string"
  19271. }
  19272. },
  19273. "metadata": {
  19274. "type": "object"
  19275. },
  19276. "source": {
  19277. "$ref": "#/components/schemas/PermissionV2Source"
  19278. }
  19279. },
  19280. "required": ["id", "sessionID", "action", "resources"],
  19281. "additionalProperties": false
  19282. }
  19283. },
  19284. "required": ["id", "type", "properties"],
  19285. "additionalProperties": false
  19286. },
  19287. {
  19288. "type": "object",
  19289. "properties": {
  19290. "id": {
  19291. "type": "string",
  19292. "pattern": "^evt_"
  19293. },
  19294. "type": {
  19295. "type": "string",
  19296. "enum": ["permission.v2.replied"]
  19297. },
  19298. "properties": {
  19299. "type": "object",
  19300. "properties": {
  19301. "sessionID": {
  19302. "type": "string",
  19303. "pattern": "^ses"
  19304. },
  19305. "requestID": {
  19306. "type": "string",
  19307. "pattern": "^per"
  19308. },
  19309. "reply": {
  19310. "$ref": "#/components/schemas/PermissionV2Reply"
  19311. }
  19312. },
  19313. "required": ["sessionID", "requestID", "reply"],
  19314. "additionalProperties": false
  19315. }
  19316. },
  19317. "required": ["id", "type", "properties"],
  19318. "additionalProperties": false
  19319. },
  19320. {
  19321. "type": "object",
  19322. "properties": {
  19323. "id": {
  19324. "type": "string",
  19325. "pattern": "^evt_"
  19326. },
  19327. "type": {
  19328. "type": "string",
  19329. "enum": ["plugin.added"]
  19330. },
  19331. "properties": {
  19332. "type": "object",
  19333. "properties": {
  19334. "id": {
  19335. "type": "string"
  19336. }
  19337. },
  19338. "required": ["id"],
  19339. "additionalProperties": false
  19340. }
  19341. },
  19342. "required": ["id", "type", "properties"],
  19343. "additionalProperties": false
  19344. },
  19345. {
  19346. "type": "object",
  19347. "properties": {
  19348. "id": {
  19349. "type": "string",
  19350. "pattern": "^evt_"
  19351. },
  19352. "type": {
  19353. "type": "string",
  19354. "enum": ["project.directories.updated"]
  19355. },
  19356. "properties": {
  19357. "type": "object",
  19358. "properties": {
  19359. "projectID": {
  19360. "type": "string"
  19361. }
  19362. },
  19363. "required": ["projectID"],
  19364. "additionalProperties": false
  19365. }
  19366. },
  19367. "required": ["id", "type", "properties"],
  19368. "additionalProperties": false
  19369. },
  19370. {
  19371. "type": "object",
  19372. "properties": {
  19373. "id": {
  19374. "type": "string",
  19375. "pattern": "^evt_"
  19376. },
  19377. "type": {
  19378. "type": "string",
  19379. "enum": ["file.watcher.updated"]
  19380. },
  19381. "properties": {
  19382. "type": "object",
  19383. "properties": {
  19384. "file": {
  19385. "type": "string"
  19386. },
  19387. "event": {
  19388. "type": "string",
  19389. "enum": ["add", "change", "unlink"]
  19390. }
  19391. },
  19392. "required": ["file", "event"],
  19393. "additionalProperties": false
  19394. }
  19395. },
  19396. "required": ["id", "type", "properties"],
  19397. "additionalProperties": false
  19398. },
  19399. {
  19400. "type": "object",
  19401. "properties": {
  19402. "id": {
  19403. "type": "string",
  19404. "pattern": "^evt_"
  19405. },
  19406. "type": {
  19407. "type": "string",
  19408. "enum": ["pty.created"]
  19409. },
  19410. "properties": {
  19411. "type": "object",
  19412. "properties": {
  19413. "info": {
  19414. "$ref": "#/components/schemas/Pty"
  19415. }
  19416. },
  19417. "required": ["info"],
  19418. "additionalProperties": false
  19419. }
  19420. },
  19421. "required": ["id", "type", "properties"],
  19422. "additionalProperties": false
  19423. },
  19424. {
  19425. "type": "object",
  19426. "properties": {
  19427. "id": {
  19428. "type": "string",
  19429. "pattern": "^evt_"
  19430. },
  19431. "type": {
  19432. "type": "string",
  19433. "enum": ["pty.updated"]
  19434. },
  19435. "properties": {
  19436. "type": "object",
  19437. "properties": {
  19438. "info": {
  19439. "$ref": "#/components/schemas/Pty"
  19440. }
  19441. },
  19442. "required": ["info"],
  19443. "additionalProperties": false
  19444. }
  19445. },
  19446. "required": ["id", "type", "properties"],
  19447. "additionalProperties": false
  19448. },
  19449. {
  19450. "type": "object",
  19451. "properties": {
  19452. "id": {
  19453. "type": "string",
  19454. "pattern": "^evt_"
  19455. },
  19456. "type": {
  19457. "type": "string",
  19458. "enum": ["pty.exited"]
  19459. },
  19460. "properties": {
  19461. "type": "object",
  19462. "properties": {
  19463. "id": {
  19464. "type": "string",
  19465. "pattern": "^pty"
  19466. },
  19467. "exitCode": {
  19468. "type": "integer",
  19469. "minimum": 0
  19470. }
  19471. },
  19472. "required": ["id", "exitCode"],
  19473. "additionalProperties": false
  19474. }
  19475. },
  19476. "required": ["id", "type", "properties"],
  19477. "additionalProperties": false
  19478. },
  19479. {
  19480. "type": "object",
  19481. "properties": {
  19482. "id": {
  19483. "type": "string",
  19484. "pattern": "^evt_"
  19485. },
  19486. "type": {
  19487. "type": "string",
  19488. "enum": ["pty.deleted"]
  19489. },
  19490. "properties": {
  19491. "type": "object",
  19492. "properties": {
  19493. "id": {
  19494. "type": "string",
  19495. "pattern": "^pty"
  19496. }
  19497. },
  19498. "required": ["id"],
  19499. "additionalProperties": false
  19500. }
  19501. },
  19502. "required": ["id", "type", "properties"],
  19503. "additionalProperties": false
  19504. },
  19505. {
  19506. "type": "object",
  19507. "properties": {
  19508. "id": {
  19509. "type": "string",
  19510. "pattern": "^evt_"
  19511. },
  19512. "type": {
  19513. "type": "string",
  19514. "enum": ["question.v2.asked"]
  19515. },
  19516. "properties": {
  19517. "type": "object",
  19518. "properties": {
  19519. "id": {
  19520. "type": "string",
  19521. "pattern": "^que"
  19522. },
  19523. "sessionID": {
  19524. "type": "string",
  19525. "pattern": "^ses"
  19526. },
  19527. "questions": {
  19528. "type": "array",
  19529. "items": {
  19530. "$ref": "#/components/schemas/QuestionV2Info"
  19531. },
  19532. "description": "Questions to ask"
  19533. },
  19534. "tool": {
  19535. "$ref": "#/components/schemas/QuestionV2Tool"
  19536. }
  19537. },
  19538. "required": ["id", "sessionID", "questions"],
  19539. "additionalProperties": false
  19540. }
  19541. },
  19542. "required": ["id", "type", "properties"],
  19543. "additionalProperties": false
  19544. },
  19545. {
  19546. "type": "object",
  19547. "properties": {
  19548. "id": {
  19549. "type": "string",
  19550. "pattern": "^evt_"
  19551. },
  19552. "type": {
  19553. "type": "string",
  19554. "enum": ["question.v2.replied"]
  19555. },
  19556. "properties": {
  19557. "type": "object",
  19558. "properties": {
  19559. "sessionID": {
  19560. "type": "string",
  19561. "pattern": "^ses"
  19562. },
  19563. "requestID": {
  19564. "type": "string",
  19565. "pattern": "^que"
  19566. },
  19567. "answers": {
  19568. "type": "array",
  19569. "items": {
  19570. "$ref": "#/components/schemas/QuestionV2Answer"
  19571. }
  19572. }
  19573. },
  19574. "required": ["sessionID", "requestID", "answers"],
  19575. "additionalProperties": false
  19576. }
  19577. },
  19578. "required": ["id", "type", "properties"],
  19579. "additionalProperties": false
  19580. },
  19581. {
  19582. "type": "object",
  19583. "properties": {
  19584. "id": {
  19585. "type": "string",
  19586. "pattern": "^evt_"
  19587. },
  19588. "type": {
  19589. "type": "string",
  19590. "enum": ["question.v2.rejected"]
  19591. },
  19592. "properties": {
  19593. "type": "object",
  19594. "properties": {
  19595. "sessionID": {
  19596. "type": "string",
  19597. "pattern": "^ses"
  19598. },
  19599. "requestID": {
  19600. "type": "string",
  19601. "pattern": "^que"
  19602. }
  19603. },
  19604. "required": ["sessionID", "requestID"],
  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": ["todo.updated"]
  19621. },
  19622. "properties": {
  19623. "type": "object",
  19624. "properties": {
  19625. "sessionID": {
  19626. "type": "string",
  19627. "pattern": "^ses"
  19628. },
  19629. "todos": {
  19630. "type": "array",
  19631. "items": {
  19632. "$ref": "#/components/schemas/Todo"
  19633. }
  19634. }
  19635. },
  19636. "required": ["sessionID", "todos"],
  19637. "additionalProperties": false
  19638. }
  19639. },
  19640. "required": ["id", "type", "properties"],
  19641. "additionalProperties": false
  19642. },
  19643. {
  19644. "type": "object",
  19645. "properties": {
  19646. "id": {
  19647. "type": "string",
  19648. "pattern": "^evt_"
  19649. },
  19650. "type": {
  19651. "type": "string",
  19652. "enum": ["lsp.updated"]
  19653. },
  19654. "properties": {
  19655. "type": "object",
  19656. "properties": {}
  19657. }
  19658. },
  19659. "required": ["id", "type", "properties"],
  19660. "additionalProperties": false
  19661. },
  19662. {
  19663. "type": "object",
  19664. "properties": {
  19665. "id": {
  19666. "type": "string",
  19667. "pattern": "^evt_"
  19668. },
  19669. "type": {
  19670. "type": "string",
  19671. "enum": ["permission.asked"]
  19672. },
  19673. "properties": {
  19674. "type": "object",
  19675. "properties": {
  19676. "id": {
  19677. "type": "string",
  19678. "pattern": "^per"
  19679. },
  19680. "sessionID": {
  19681. "type": "string",
  19682. "pattern": "^ses"
  19683. },
  19684. "permission": {
  19685. "type": "string"
  19686. },
  19687. "patterns": {
  19688. "type": "array",
  19689. "items": {
  19690. "type": "string"
  19691. }
  19692. },
  19693. "metadata": {
  19694. "type": "object"
  19695. },
  19696. "always": {
  19697. "type": "array",
  19698. "items": {
  19699. "type": "string"
  19700. }
  19701. },
  19702. "tool": {
  19703. "type": "object",
  19704. "properties": {
  19705. "messageID": {
  19706. "type": "string"
  19707. },
  19708. "callID": {
  19709. "type": "string"
  19710. }
  19711. },
  19712. "required": ["messageID", "callID"],
  19713. "additionalProperties": false
  19714. }
  19715. },
  19716. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  19717. "additionalProperties": false
  19718. }
  19719. },
  19720. "required": ["id", "type", "properties"],
  19721. "additionalProperties": false
  19722. },
  19723. {
  19724. "type": "object",
  19725. "properties": {
  19726. "id": {
  19727. "type": "string",
  19728. "pattern": "^evt_"
  19729. },
  19730. "type": {
  19731. "type": "string",
  19732. "enum": ["permission.replied"]
  19733. },
  19734. "properties": {
  19735. "type": "object",
  19736. "properties": {
  19737. "sessionID": {
  19738. "type": "string",
  19739. "pattern": "^ses"
  19740. },
  19741. "requestID": {
  19742. "type": "string",
  19743. "pattern": "^per"
  19744. },
  19745. "reply": {
  19746. "type": "string",
  19747. "enum": ["once", "always", "reject"]
  19748. }
  19749. },
  19750. "required": ["sessionID", "requestID", "reply"],
  19751. "additionalProperties": false
  19752. }
  19753. },
  19754. "required": ["id", "type", "properties"],
  19755. "additionalProperties": false
  19756. },
  19757. {
  19758. "type": "object",
  19759. "properties": {
  19760. "id": {
  19761. "type": "string",
  19762. "pattern": "^evt_"
  19763. },
  19764. "type": {
  19765. "type": "string",
  19766. "enum": ["tui.prompt.append"]
  19767. },
  19768. "properties": {
  19769. "type": "object",
  19770. "properties": {
  19771. "text": {
  19772. "type": "string"
  19773. }
  19774. },
  19775. "required": ["text"],
  19776. "additionalProperties": false
  19777. }
  19778. },
  19779. "required": ["id", "type", "properties"],
  19780. "additionalProperties": false
  19781. },
  19782. {
  19783. "type": "object",
  19784. "properties": {
  19785. "id": {
  19786. "type": "string",
  19787. "pattern": "^evt_"
  19788. },
  19789. "type": {
  19790. "type": "string",
  19791. "enum": ["tui.command.execute"]
  19792. },
  19793. "properties": {
  19794. "type": "object",
  19795. "properties": {
  19796. "command": {
  19797. "anyOf": [
  19798. {
  19799. "type": "string",
  19800. "enum": [
  19801. "session.list",
  19802. "session.new",
  19803. "session.share",
  19804. "session.interrupt",
  19805. "session.compact",
  19806. "session.page.up",
  19807. "session.page.down",
  19808. "session.line.up",
  19809. "session.line.down",
  19810. "session.half.page.up",
  19811. "session.half.page.down",
  19812. "session.first",
  19813. "session.last",
  19814. "prompt.clear",
  19815. "prompt.submit",
  19816. "agent.cycle"
  19817. ]
  19818. },
  19819. {
  19820. "type": "string"
  19821. }
  19822. ]
  19823. }
  19824. },
  19825. "required": ["command"],
  19826. "additionalProperties": false
  19827. }
  19828. },
  19829. "required": ["id", "type", "properties"],
  19830. "additionalProperties": false
  19831. },
  19832. {
  19833. "type": "object",
  19834. "properties": {
  19835. "id": {
  19836. "type": "string",
  19837. "pattern": "^evt_"
  19838. },
  19839. "type": {
  19840. "type": "string",
  19841. "enum": ["tui.toast.show"]
  19842. },
  19843. "properties": {
  19844. "type": "object",
  19845. "properties": {
  19846. "title": {
  19847. "type": "string"
  19848. },
  19849. "message": {
  19850. "type": "string"
  19851. },
  19852. "variant": {
  19853. "type": "string",
  19854. "enum": ["info", "success", "warning", "error"]
  19855. },
  19856. "duration": {
  19857. "type": "integer",
  19858. "exclusiveMinimum": 0
  19859. }
  19860. },
  19861. "required": ["message", "variant"],
  19862. "additionalProperties": false
  19863. }
  19864. },
  19865. "required": ["id", "type", "properties"],
  19866. "additionalProperties": false
  19867. },
  19868. {
  19869. "type": "object",
  19870. "properties": {
  19871. "id": {
  19872. "type": "string",
  19873. "pattern": "^evt_"
  19874. },
  19875. "type": {
  19876. "type": "string",
  19877. "enum": ["tui.session.select"]
  19878. },
  19879. "properties": {
  19880. "type": "object",
  19881. "properties": {
  19882. "sessionID": {
  19883. "type": "string",
  19884. "pattern": "^ses",
  19885. "description": "Session ID to navigate to"
  19886. }
  19887. },
  19888. "required": ["sessionID"],
  19889. "additionalProperties": false
  19890. }
  19891. },
  19892. "required": ["id", "type", "properties"],
  19893. "additionalProperties": false
  19894. },
  19895. {
  19896. "type": "object",
  19897. "properties": {
  19898. "id": {
  19899. "type": "string",
  19900. "pattern": "^evt_"
  19901. },
  19902. "type": {
  19903. "type": "string",
  19904. "enum": ["mcp.tools.changed"]
  19905. },
  19906. "properties": {
  19907. "type": "object",
  19908. "properties": {
  19909. "server": {
  19910. "type": "string"
  19911. }
  19912. },
  19913. "required": ["server"],
  19914. "additionalProperties": false
  19915. }
  19916. },
  19917. "required": ["id", "type", "properties"],
  19918. "additionalProperties": false
  19919. },
  19920. {
  19921. "type": "object",
  19922. "properties": {
  19923. "id": {
  19924. "type": "string",
  19925. "pattern": "^evt_"
  19926. },
  19927. "type": {
  19928. "type": "string",
  19929. "enum": ["mcp.browser.open.failed"]
  19930. },
  19931. "properties": {
  19932. "type": "object",
  19933. "properties": {
  19934. "mcpName": {
  19935. "type": "string"
  19936. },
  19937. "url": {
  19938. "type": "string"
  19939. }
  19940. },
  19941. "required": ["mcpName", "url"],
  19942. "additionalProperties": false
  19943. }
  19944. },
  19945. "required": ["id", "type", "properties"],
  19946. "additionalProperties": false
  19947. },
  19948. {
  19949. "type": "object",
  19950. "properties": {
  19951. "id": {
  19952. "type": "string",
  19953. "pattern": "^evt_"
  19954. },
  19955. "type": {
  19956. "type": "string",
  19957. "enum": ["command.executed"]
  19958. },
  19959. "properties": {
  19960. "type": "object",
  19961. "properties": {
  19962. "name": {
  19963. "type": "string"
  19964. },
  19965. "sessionID": {
  19966. "type": "string",
  19967. "pattern": "^ses"
  19968. },
  19969. "arguments": {
  19970. "type": "string"
  19971. },
  19972. "messageID": {
  19973. "type": "string",
  19974. "pattern": "^msg"
  19975. }
  19976. },
  19977. "required": ["name", "sessionID", "arguments", "messageID"],
  19978. "additionalProperties": false
  19979. }
  19980. },
  19981. "required": ["id", "type", "properties"],
  19982. "additionalProperties": false
  19983. },
  19984. {
  19985. "type": "object",
  19986. "properties": {
  19987. "id": {
  19988. "type": "string",
  19989. "pattern": "^evt_"
  19990. },
  19991. "type": {
  19992. "type": "string",
  19993. "enum": ["project.updated"]
  19994. },
  19995. "properties": {
  19996. "type": "object",
  19997. "properties": {
  19998. "id": {
  19999. "type": "string"
  20000. },
  20001. "worktree": {
  20002. "type": "string"
  20003. },
  20004. "vcs": {
  20005. "$ref": "#/components/schemas/ProjectVcs"
  20006. },
  20007. "name": {
  20008. "type": "string"
  20009. },
  20010. "icon": {
  20011. "$ref": "#/components/schemas/ProjectIcon"
  20012. },
  20013. "commands": {
  20014. "$ref": "#/components/schemas/ProjectCommands"
  20015. },
  20016. "time": {
  20017. "$ref": "#/components/schemas/ProjectTime"
  20018. },
  20019. "sandboxes": {
  20020. "type": "array",
  20021. "items": {
  20022. "type": "string"
  20023. }
  20024. }
  20025. },
  20026. "required": ["id", "worktree", "time", "sandboxes"],
  20027. "additionalProperties": false
  20028. }
  20029. },
  20030. "required": ["id", "type", "properties"],
  20031. "additionalProperties": false
  20032. },
  20033. {
  20034. "type": "object",
  20035. "properties": {
  20036. "id": {
  20037. "type": "string",
  20038. "pattern": "^evt_"
  20039. },
  20040. "type": {
  20041. "type": "string",
  20042. "enum": ["session.status"]
  20043. },
  20044. "properties": {
  20045. "type": "object",
  20046. "properties": {
  20047. "sessionID": {
  20048. "type": "string",
  20049. "pattern": "^ses"
  20050. },
  20051. "status": {
  20052. "$ref": "#/components/schemas/SessionStatus"
  20053. }
  20054. },
  20055. "required": ["sessionID", "status"],
  20056. "additionalProperties": false
  20057. }
  20058. },
  20059. "required": ["id", "type", "properties"],
  20060. "additionalProperties": false
  20061. },
  20062. {
  20063. "type": "object",
  20064. "properties": {
  20065. "id": {
  20066. "type": "string",
  20067. "pattern": "^evt_"
  20068. },
  20069. "type": {
  20070. "type": "string",
  20071. "enum": ["session.idle"]
  20072. },
  20073. "properties": {
  20074. "type": "object",
  20075. "properties": {
  20076. "sessionID": {
  20077. "type": "string",
  20078. "pattern": "^ses"
  20079. }
  20080. },
  20081. "required": ["sessionID"],
  20082. "additionalProperties": false
  20083. }
  20084. },
  20085. "required": ["id", "type", "properties"],
  20086. "additionalProperties": false
  20087. },
  20088. {
  20089. "type": "object",
  20090. "properties": {
  20091. "id": {
  20092. "type": "string",
  20093. "pattern": "^evt_"
  20094. },
  20095. "type": {
  20096. "type": "string",
  20097. "enum": ["question.asked"]
  20098. },
  20099. "properties": {
  20100. "type": "object",
  20101. "properties": {
  20102. "id": {
  20103. "type": "string",
  20104. "pattern": "^que"
  20105. },
  20106. "sessionID": {
  20107. "type": "string",
  20108. "pattern": "^ses"
  20109. },
  20110. "questions": {
  20111. "type": "array",
  20112. "items": {
  20113. "$ref": "#/components/schemas/QuestionInfo"
  20114. },
  20115. "description": "Questions to ask"
  20116. },
  20117. "tool": {
  20118. "$ref": "#/components/schemas/QuestionTool"
  20119. }
  20120. },
  20121. "required": ["id", "sessionID", "questions"],
  20122. "additionalProperties": false
  20123. }
  20124. },
  20125. "required": ["id", "type", "properties"],
  20126. "additionalProperties": false
  20127. },
  20128. {
  20129. "type": "object",
  20130. "properties": {
  20131. "id": {
  20132. "type": "string",
  20133. "pattern": "^evt_"
  20134. },
  20135. "type": {
  20136. "type": "string",
  20137. "enum": ["question.replied"]
  20138. },
  20139. "properties": {
  20140. "type": "object",
  20141. "properties": {
  20142. "sessionID": {
  20143. "type": "string",
  20144. "pattern": "^ses"
  20145. },
  20146. "requestID": {
  20147. "type": "string",
  20148. "pattern": "^que"
  20149. },
  20150. "answers": {
  20151. "type": "array",
  20152. "items": {
  20153. "$ref": "#/components/schemas/QuestionAnswer"
  20154. }
  20155. }
  20156. },
  20157. "required": ["sessionID", "requestID", "answers"],
  20158. "additionalProperties": false
  20159. }
  20160. },
  20161. "required": ["id", "type", "properties"],
  20162. "additionalProperties": false
  20163. },
  20164. {
  20165. "type": "object",
  20166. "properties": {
  20167. "id": {
  20168. "type": "string",
  20169. "pattern": "^evt_"
  20170. },
  20171. "type": {
  20172. "type": "string",
  20173. "enum": ["question.rejected"]
  20174. },
  20175. "properties": {
  20176. "type": "object",
  20177. "properties": {
  20178. "sessionID": {
  20179. "type": "string",
  20180. "pattern": "^ses"
  20181. },
  20182. "requestID": {
  20183. "type": "string",
  20184. "pattern": "^que"
  20185. }
  20186. },
  20187. "required": ["sessionID", "requestID"],
  20188. "additionalProperties": false
  20189. }
  20190. },
  20191. "required": ["id", "type", "properties"],
  20192. "additionalProperties": false
  20193. },
  20194. {
  20195. "type": "object",
  20196. "properties": {
  20197. "id": {
  20198. "type": "string",
  20199. "pattern": "^evt_"
  20200. },
  20201. "type": {
  20202. "type": "string",
  20203. "enum": ["session.compacted"]
  20204. },
  20205. "properties": {
  20206. "type": "object",
  20207. "properties": {
  20208. "sessionID": {
  20209. "type": "string",
  20210. "pattern": "^ses"
  20211. }
  20212. },
  20213. "required": ["sessionID"],
  20214. "additionalProperties": false
  20215. }
  20216. },
  20217. "required": ["id", "type", "properties"],
  20218. "additionalProperties": false
  20219. },
  20220. {
  20221. "type": "object",
  20222. "properties": {
  20223. "id": {
  20224. "type": "string",
  20225. "pattern": "^evt_"
  20226. },
  20227. "type": {
  20228. "type": "string",
  20229. "enum": ["vcs.branch.updated"]
  20230. },
  20231. "properties": {
  20232. "type": "object",
  20233. "properties": {
  20234. "branch": {
  20235. "type": "string"
  20236. }
  20237. },
  20238. "additionalProperties": false
  20239. }
  20240. },
  20241. "required": ["id", "type", "properties"],
  20242. "additionalProperties": false
  20243. },
  20244. {
  20245. "type": "object",
  20246. "properties": {
  20247. "id": {
  20248. "type": "string",
  20249. "pattern": "^evt_"
  20250. },
  20251. "type": {
  20252. "type": "string",
  20253. "enum": ["workspace.ready"]
  20254. },
  20255. "properties": {
  20256. "type": "object",
  20257. "properties": {
  20258. "name": {
  20259. "type": "string"
  20260. }
  20261. },
  20262. "required": ["name"],
  20263. "additionalProperties": false
  20264. }
  20265. },
  20266. "required": ["id", "type", "properties"],
  20267. "additionalProperties": false
  20268. },
  20269. {
  20270. "type": "object",
  20271. "properties": {
  20272. "id": {
  20273. "type": "string",
  20274. "pattern": "^evt_"
  20275. },
  20276. "type": {
  20277. "type": "string",
  20278. "enum": ["workspace.failed"]
  20279. },
  20280. "properties": {
  20281. "type": "object",
  20282. "properties": {
  20283. "message": {
  20284. "type": "string"
  20285. }
  20286. },
  20287. "required": ["message"],
  20288. "additionalProperties": false
  20289. }
  20290. },
  20291. "required": ["id", "type", "properties"],
  20292. "additionalProperties": false
  20293. },
  20294. {
  20295. "type": "object",
  20296. "properties": {
  20297. "id": {
  20298. "type": "string",
  20299. "pattern": "^evt_"
  20300. },
  20301. "type": {
  20302. "type": "string",
  20303. "enum": ["workspace.status"]
  20304. },
  20305. "properties": {
  20306. "type": "object",
  20307. "properties": {
  20308. "workspaceID": {
  20309. "type": "string",
  20310. "pattern": "^wrk"
  20311. },
  20312. "status": {
  20313. "type": "string",
  20314. "enum": ["connected", "connecting", "disconnected", "error"]
  20315. }
  20316. },
  20317. "required": ["workspaceID", "status"],
  20318. "additionalProperties": false
  20319. }
  20320. },
  20321. "required": ["id", "type", "properties"],
  20322. "additionalProperties": false
  20323. },
  20324. {
  20325. "type": "object",
  20326. "properties": {
  20327. "id": {
  20328. "type": "string",
  20329. "pattern": "^evt_"
  20330. },
  20331. "type": {
  20332. "type": "string",
  20333. "enum": ["worktree.ready"]
  20334. },
  20335. "properties": {
  20336. "type": "object",
  20337. "properties": {
  20338. "name": {
  20339. "type": "string"
  20340. },
  20341. "branch": {
  20342. "type": "string"
  20343. }
  20344. },
  20345. "required": ["name"],
  20346. "additionalProperties": false
  20347. }
  20348. },
  20349. "required": ["id", "type", "properties"],
  20350. "additionalProperties": false
  20351. },
  20352. {
  20353. "type": "object",
  20354. "properties": {
  20355. "id": {
  20356. "type": "string",
  20357. "pattern": "^evt_"
  20358. },
  20359. "type": {
  20360. "type": "string",
  20361. "enum": ["worktree.failed"]
  20362. },
  20363. "properties": {
  20364. "type": "object",
  20365. "properties": {
  20366. "message": {
  20367. "type": "string"
  20368. }
  20369. },
  20370. "required": ["message"],
  20371. "additionalProperties": false
  20372. }
  20373. },
  20374. "required": ["id", "type", "properties"],
  20375. "additionalProperties": false
  20376. },
  20377. {
  20378. "type": "object",
  20379. "properties": {
  20380. "id": {
  20381. "type": "string",
  20382. "pattern": "^evt_"
  20383. },
  20384. "type": {
  20385. "type": "string",
  20386. "enum": ["server.connected"]
  20387. },
  20388. "properties": {
  20389. "type": "object",
  20390. "properties": {}
  20391. }
  20392. },
  20393. "required": ["id", "type", "properties"],
  20394. "additionalProperties": false
  20395. },
  20396. {
  20397. "type": "object",
  20398. "properties": {
  20399. "id": {
  20400. "type": "string",
  20401. "pattern": "^evt_"
  20402. },
  20403. "type": {
  20404. "type": "string",
  20405. "enum": ["global.disposed"]
  20406. },
  20407. "properties": {
  20408. "type": "object",
  20409. "properties": {}
  20410. }
  20411. },
  20412. "required": ["id", "type", "properties"],
  20413. "additionalProperties": false
  20414. },
  20415. {
  20416. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  20417. },
  20418. {
  20419. "$ref": "#/components/schemas/SyncEventSessionCreated"
  20420. },
  20421. {
  20422. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  20423. },
  20424. {
  20425. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  20426. },
  20427. {
  20428. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  20429. },
  20430. {
  20431. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  20432. },
  20433. {
  20434. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  20435. },
  20436. {
  20437. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  20438. },
  20439. {
  20440. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  20441. },
  20442. {
  20443. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  20444. },
  20445. {
  20446. "$ref": "#/components/schemas/SyncEventSessionNextMoved"
  20447. },
  20448. {
  20449. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  20450. },
  20451. {
  20452. "$ref": "#/components/schemas/SyncEventSessionNextPromptAdmitted"
  20453. },
  20454. {
  20455. "$ref": "#/components/schemas/SyncEventSessionNextContextUpdated"
  20456. },
  20457. {
  20458. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  20459. },
  20460. {
  20461. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  20462. },
  20463. {
  20464. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  20465. },
  20466. {
  20467. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  20468. },
  20469. {
  20470. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  20471. },
  20472. {
  20473. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  20474. },
  20475. {
  20476. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  20477. },
  20478. {
  20479. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  20480. },
  20481. {
  20482. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  20483. },
  20484. {
  20485. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  20486. },
  20487. {
  20488. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  20489. },
  20490. {
  20491. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  20492. },
  20493. {
  20494. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  20495. },
  20496. {
  20497. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  20498. },
  20499. {
  20500. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  20501. },
  20502. {
  20503. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  20504. },
  20505. {
  20506. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  20507. },
  20508. {
  20509. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  20510. },
  20511. {
  20512. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  20513. },
  20514. {
  20515. "$ref": "#/components/schemas/SyncEventSessionNextRevertStaged"
  20516. },
  20517. {
  20518. "$ref": "#/components/schemas/SyncEventSessionNextRevertCleared"
  20519. },
  20520. {
  20521. "$ref": "#/components/schemas/SyncEventSessionNextRevertCommitted"
  20522. }
  20523. ]
  20524. }
  20525. },
  20526. "required": ["directory", "payload"],
  20527. "additionalProperties": false
  20528. },
  20529. "LogLevel": {
  20530. "type": "string",
  20531. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  20532. "description": "Log level"
  20533. },
  20534. "ServerConfig": {
  20535. "type": "object",
  20536. "properties": {
  20537. "port": {
  20538. "type": "integer",
  20539. "exclusiveMinimum": 0
  20540. },
  20541. "hostname": {
  20542. "type": "string"
  20543. },
  20544. "mdns": {
  20545. "type": "boolean"
  20546. },
  20547. "mdnsDomain": {
  20548. "type": "string"
  20549. },
  20550. "cors": {
  20551. "type": "array",
  20552. "items": {
  20553. "type": "string"
  20554. }
  20555. }
  20556. },
  20557. "additionalProperties": false,
  20558. "description": "Server configuration for opencode serve and web commands"
  20559. },
  20560. "PermissionActionConfig": {
  20561. "type": "string",
  20562. "enum": ["ask", "allow", "deny"]
  20563. },
  20564. "PermissionObjectConfig": {
  20565. "type": "object",
  20566. "additionalProperties": {
  20567. "$ref": "#/components/schemas/PermissionActionConfig"
  20568. }
  20569. },
  20570. "PermissionRuleConfig": {
  20571. "anyOf": [
  20572. {
  20573. "$ref": "#/components/schemas/PermissionActionConfig"
  20574. },
  20575. {
  20576. "$ref": "#/components/schemas/PermissionObjectConfig"
  20577. }
  20578. ]
  20579. },
  20580. "PermissionConfig": {
  20581. "anyOf": [
  20582. {
  20583. "$ref": "#/components/schemas/PermissionActionConfig"
  20584. },
  20585. {
  20586. "type": "object",
  20587. "properties": {
  20588. "read": {
  20589. "$ref": "#/components/schemas/PermissionRuleConfig"
  20590. },
  20591. "edit": {
  20592. "$ref": "#/components/schemas/PermissionRuleConfig"
  20593. },
  20594. "glob": {
  20595. "$ref": "#/components/schemas/PermissionRuleConfig"
  20596. },
  20597. "grep": {
  20598. "$ref": "#/components/schemas/PermissionRuleConfig"
  20599. },
  20600. "list": {
  20601. "$ref": "#/components/schemas/PermissionRuleConfig"
  20602. },
  20603. "bash": {
  20604. "$ref": "#/components/schemas/PermissionRuleConfig"
  20605. },
  20606. "task": {
  20607. "$ref": "#/components/schemas/PermissionRuleConfig"
  20608. },
  20609. "external_directory": {
  20610. "$ref": "#/components/schemas/PermissionRuleConfig"
  20611. },
  20612. "todowrite": {
  20613. "$ref": "#/components/schemas/PermissionActionConfig"
  20614. },
  20615. "question": {
  20616. "$ref": "#/components/schemas/PermissionActionConfig"
  20617. },
  20618. "webfetch": {
  20619. "$ref": "#/components/schemas/PermissionActionConfig"
  20620. },
  20621. "websearch": {
  20622. "$ref": "#/components/schemas/PermissionActionConfig"
  20623. },
  20624. "lsp": {
  20625. "$ref": "#/components/schemas/PermissionRuleConfig"
  20626. },
  20627. "doom_loop": {
  20628. "$ref": "#/components/schemas/PermissionActionConfig"
  20629. },
  20630. "skill": {
  20631. "$ref": "#/components/schemas/PermissionRuleConfig"
  20632. }
  20633. },
  20634. "additionalProperties": {
  20635. "$ref": "#/components/schemas/PermissionRuleConfig"
  20636. }
  20637. }
  20638. ]
  20639. },
  20640. "AgentConfig": {
  20641. "type": "object",
  20642. "properties": {
  20643. "model": {
  20644. "type": "string"
  20645. },
  20646. "variant": {
  20647. "type": "string"
  20648. },
  20649. "temperature": {
  20650. "type": "number"
  20651. },
  20652. "top_p": {
  20653. "type": "number"
  20654. },
  20655. "prompt": {
  20656. "type": "string"
  20657. },
  20658. "tools": {
  20659. "type": "object",
  20660. "additionalProperties": {
  20661. "type": "boolean"
  20662. }
  20663. },
  20664. "disable": {
  20665. "type": "boolean"
  20666. },
  20667. "description": {
  20668. "type": "string"
  20669. },
  20670. "mode": {
  20671. "type": "string",
  20672. "enum": ["subagent", "primary", "all"]
  20673. },
  20674. "hidden": {
  20675. "type": "boolean"
  20676. },
  20677. "options": {
  20678. "type": "object"
  20679. },
  20680. "color": {
  20681. "anyOf": [
  20682. {
  20683. "type": "string",
  20684. "pattern": "^#[0-9a-fA-F]{6}$"
  20685. },
  20686. {
  20687. "type": "string",
  20688. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  20689. }
  20690. ],
  20691. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  20692. },
  20693. "steps": {
  20694. "type": "integer",
  20695. "exclusiveMinimum": 0
  20696. },
  20697. "maxSteps": {
  20698. "type": "integer",
  20699. "exclusiveMinimum": 0
  20700. },
  20701. "permission": {
  20702. "$ref": "#/components/schemas/PermissionConfig"
  20703. }
  20704. },
  20705. "additionalProperties": {}
  20706. },
  20707. "ProviderConfig": {
  20708. "type": "object",
  20709. "properties": {
  20710. "api": {
  20711. "type": "string"
  20712. },
  20713. "name": {
  20714. "type": "string"
  20715. },
  20716. "env": {
  20717. "type": "array",
  20718. "items": {
  20719. "type": "string"
  20720. }
  20721. },
  20722. "id": {
  20723. "type": "string"
  20724. },
  20725. "npm": {
  20726. "type": "string"
  20727. },
  20728. "whitelist": {
  20729. "type": "array",
  20730. "items": {
  20731. "type": "string"
  20732. }
  20733. },
  20734. "blacklist": {
  20735. "type": "array",
  20736. "items": {
  20737. "type": "string"
  20738. }
  20739. },
  20740. "options": {
  20741. "type": "object",
  20742. "properties": {
  20743. "apiKey": {
  20744. "type": "string"
  20745. },
  20746. "baseURL": {
  20747. "type": "string"
  20748. },
  20749. "enterpriseUrl": {
  20750. "type": "string"
  20751. },
  20752. "setCacheKey": {
  20753. "type": "boolean"
  20754. },
  20755. "timeout": {
  20756. "anyOf": [
  20757. {
  20758. "type": "integer",
  20759. "exclusiveMinimum": 0
  20760. },
  20761. {
  20762. "type": "boolean",
  20763. "enum": [false]
  20764. }
  20765. ],
  20766. "description": "Timeout in milliseconds for full requests to this provider. Set to false to disable timeout."
  20767. },
  20768. "headerTimeout": {
  20769. "anyOf": [
  20770. {
  20771. "type": "integer",
  20772. "exclusiveMinimum": 0
  20773. },
  20774. {
  20775. "type": "boolean",
  20776. "enum": [false]
  20777. }
  20778. ],
  20779. "description": "Timeout in milliseconds to wait for response headers. Provider integrations may set defaults. Set to false to disable timeout."
  20780. },
  20781. "chunkTimeout": {
  20782. "type": "integer",
  20783. "exclusiveMinimum": 0
  20784. }
  20785. },
  20786. "additionalProperties": {}
  20787. },
  20788. "models": {
  20789. "type": "object",
  20790. "additionalProperties": {
  20791. "type": "object",
  20792. "properties": {
  20793. "id": {
  20794. "type": "string"
  20795. },
  20796. "name": {
  20797. "type": "string"
  20798. },
  20799. "family": {
  20800. "type": "string"
  20801. },
  20802. "release_date": {
  20803. "type": "string"
  20804. },
  20805. "attachment": {
  20806. "type": "boolean"
  20807. },
  20808. "reasoning": {
  20809. "type": "boolean"
  20810. },
  20811. "temperature": {
  20812. "type": "boolean"
  20813. },
  20814. "tool_call": {
  20815. "type": "boolean"
  20816. },
  20817. "interleaved": {
  20818. "anyOf": [
  20819. {
  20820. "type": "boolean",
  20821. "enum": [true]
  20822. },
  20823. {
  20824. "type": "object",
  20825. "properties": {
  20826. "field": {
  20827. "type": "string",
  20828. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  20829. }
  20830. },
  20831. "required": ["field"],
  20832. "additionalProperties": false
  20833. }
  20834. ]
  20835. },
  20836. "cost": {
  20837. "type": "object",
  20838. "properties": {
  20839. "input": {
  20840. "type": "number"
  20841. },
  20842. "output": {
  20843. "type": "number"
  20844. },
  20845. "cache_read": {
  20846. "type": "number"
  20847. },
  20848. "cache_write": {
  20849. "type": "number"
  20850. },
  20851. "context_over_200k": {
  20852. "type": "object",
  20853. "properties": {
  20854. "input": {
  20855. "type": "number"
  20856. },
  20857. "output": {
  20858. "type": "number"
  20859. },
  20860. "cache_read": {
  20861. "type": "number"
  20862. },
  20863. "cache_write": {
  20864. "type": "number"
  20865. }
  20866. },
  20867. "required": ["input", "output"],
  20868. "additionalProperties": false
  20869. }
  20870. },
  20871. "required": ["input", "output"],
  20872. "additionalProperties": false
  20873. },
  20874. "limit": {
  20875. "type": "object",
  20876. "properties": {
  20877. "context": {
  20878. "type": "number"
  20879. },
  20880. "input": {
  20881. "type": "number"
  20882. },
  20883. "output": {
  20884. "type": "number"
  20885. }
  20886. },
  20887. "required": ["context", "output"],
  20888. "additionalProperties": false
  20889. },
  20890. "modalities": {
  20891. "type": "object",
  20892. "properties": {
  20893. "input": {
  20894. "type": "array",
  20895. "items": {
  20896. "type": "string",
  20897. "enum": ["text", "audio", "image", "video", "pdf"]
  20898. }
  20899. },
  20900. "output": {
  20901. "type": "array",
  20902. "items": {
  20903. "type": "string",
  20904. "enum": ["text", "audio", "image", "video", "pdf"]
  20905. }
  20906. }
  20907. },
  20908. "additionalProperties": false
  20909. },
  20910. "experimental": {
  20911. "type": "boolean"
  20912. },
  20913. "status": {
  20914. "type": "string",
  20915. "enum": ["alpha", "beta", "deprecated", "active"]
  20916. },
  20917. "provider": {
  20918. "type": "object",
  20919. "properties": {
  20920. "npm": {
  20921. "type": "string"
  20922. },
  20923. "api": {
  20924. "type": "string"
  20925. }
  20926. },
  20927. "additionalProperties": false
  20928. },
  20929. "options": {
  20930. "type": "object"
  20931. },
  20932. "headers": {
  20933. "type": "object",
  20934. "additionalProperties": {
  20935. "type": "string"
  20936. }
  20937. },
  20938. "variants": {
  20939. "type": "object",
  20940. "additionalProperties": {
  20941. "type": "object",
  20942. "properties": {
  20943. "disabled": {
  20944. "type": "boolean"
  20945. }
  20946. },
  20947. "additionalProperties": {}
  20948. },
  20949. "description": "Variant-specific configuration"
  20950. }
  20951. },
  20952. "additionalProperties": false
  20953. }
  20954. }
  20955. },
  20956. "additionalProperties": false
  20957. },
  20958. "McpLocalConfig": {
  20959. "type": "object",
  20960. "properties": {
  20961. "type": {
  20962. "type": "string",
  20963. "enum": ["local"],
  20964. "description": "Type of MCP server connection"
  20965. },
  20966. "command": {
  20967. "type": "array",
  20968. "items": {
  20969. "type": "string"
  20970. },
  20971. "description": "Command and arguments to run the MCP server"
  20972. },
  20973. "cwd": {
  20974. "type": "string"
  20975. },
  20976. "environment": {
  20977. "type": "object",
  20978. "additionalProperties": {
  20979. "type": "string"
  20980. }
  20981. },
  20982. "enabled": {
  20983. "type": "boolean"
  20984. },
  20985. "timeout": {
  20986. "type": "integer",
  20987. "exclusiveMinimum": 0
  20988. }
  20989. },
  20990. "required": ["type", "command"],
  20991. "additionalProperties": false
  20992. },
  20993. "McpOAuthConfig": {
  20994. "type": "object",
  20995. "properties": {
  20996. "clientId": {
  20997. "type": "string"
  20998. },
  20999. "clientSecret": {
  21000. "type": "string"
  21001. },
  21002. "scope": {
  21003. "type": "string"
  21004. },
  21005. "callbackPort": {
  21006. "type": "integer",
  21007. "minimum": 1,
  21008. "maximum": 65535
  21009. },
  21010. "redirectUri": {
  21011. "type": "string"
  21012. }
  21013. },
  21014. "additionalProperties": false
  21015. },
  21016. "McpRemoteConfig": {
  21017. "type": "object",
  21018. "properties": {
  21019. "type": {
  21020. "type": "string",
  21021. "enum": ["remote"],
  21022. "description": "Type of MCP server connection"
  21023. },
  21024. "url": {
  21025. "type": "string",
  21026. "description": "URL of the remote MCP server"
  21027. },
  21028. "enabled": {
  21029. "type": "boolean"
  21030. },
  21031. "headers": {
  21032. "type": "object",
  21033. "additionalProperties": {
  21034. "type": "string"
  21035. }
  21036. },
  21037. "oauth": {
  21038. "anyOf": [
  21039. {
  21040. "$ref": "#/components/schemas/McpOAuthConfig"
  21041. },
  21042. {
  21043. "type": "boolean",
  21044. "enum": [false]
  21045. }
  21046. ],
  21047. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  21048. },
  21049. "timeout": {
  21050. "type": "integer",
  21051. "exclusiveMinimum": 0
  21052. }
  21053. },
  21054. "required": ["type", "url"],
  21055. "additionalProperties": false
  21056. },
  21057. "LayoutConfig": {
  21058. "type": "string",
  21059. "enum": ["auto", "stretch"],
  21060. "description": "@deprecated Always uses stretch layout."
  21061. },
  21062. "ImageAttachmentConfig": {
  21063. "type": "object",
  21064. "properties": {
  21065. "auto_resize": {
  21066. "type": "boolean"
  21067. },
  21068. "max_width": {
  21069. "type": "integer",
  21070. "exclusiveMinimum": 0
  21071. },
  21072. "max_height": {
  21073. "type": "integer",
  21074. "exclusiveMinimum": 0
  21075. },
  21076. "max_base64_bytes": {
  21077. "type": "integer",
  21078. "exclusiveMinimum": 0
  21079. }
  21080. },
  21081. "additionalProperties": false
  21082. },
  21083. "AttachmentConfig": {
  21084. "type": "object",
  21085. "properties": {
  21086. "image": {
  21087. "$ref": "#/components/schemas/ImageAttachmentConfig"
  21088. }
  21089. },
  21090. "additionalProperties": false
  21091. },
  21092. "Config": {
  21093. "type": "object",
  21094. "properties": {
  21095. "$schema": {
  21096. "type": "string"
  21097. },
  21098. "shell": {
  21099. "type": "string"
  21100. },
  21101. "logLevel": {
  21102. "$ref": "#/components/schemas/LogLevel"
  21103. },
  21104. "server": {
  21105. "$ref": "#/components/schemas/ServerConfig"
  21106. },
  21107. "command": {
  21108. "type": "object",
  21109. "additionalProperties": {
  21110. "type": "object",
  21111. "properties": {
  21112. "template": {
  21113. "type": "string"
  21114. },
  21115. "description": {
  21116. "type": "string"
  21117. },
  21118. "agent": {
  21119. "type": "string"
  21120. },
  21121. "model": {
  21122. "type": "string"
  21123. },
  21124. "variant": {
  21125. "type": "string"
  21126. },
  21127. "subtask": {
  21128. "type": "boolean"
  21129. }
  21130. },
  21131. "required": ["template"],
  21132. "additionalProperties": false
  21133. }
  21134. },
  21135. "skills": {
  21136. "type": "object",
  21137. "properties": {
  21138. "paths": {
  21139. "type": "array",
  21140. "items": {
  21141. "type": "string"
  21142. }
  21143. },
  21144. "urls": {
  21145. "type": "array",
  21146. "items": {
  21147. "type": "string"
  21148. }
  21149. }
  21150. },
  21151. "additionalProperties": false
  21152. },
  21153. "references": {
  21154. "type": "object",
  21155. "additionalProperties": {
  21156. "anyOf": [
  21157. {
  21158. "type": "string"
  21159. },
  21160. {
  21161. "$ref": "#/components/schemas/ConfigV2ReferenceGit"
  21162. },
  21163. {
  21164. "$ref": "#/components/schemas/ConfigV2ReferenceLocal"
  21165. }
  21166. ]
  21167. }
  21168. },
  21169. "reference": {
  21170. "type": "object",
  21171. "additionalProperties": {
  21172. "anyOf": [
  21173. {
  21174. "type": "string"
  21175. },
  21176. {
  21177. "$ref": "#/components/schemas/ConfigV2ReferenceGit"
  21178. },
  21179. {
  21180. "$ref": "#/components/schemas/ConfigV2ReferenceLocal"
  21181. }
  21182. ]
  21183. }
  21184. },
  21185. "watcher": {
  21186. "type": "object",
  21187. "properties": {
  21188. "ignore": {
  21189. "type": "array",
  21190. "items": {
  21191. "type": "string"
  21192. }
  21193. }
  21194. },
  21195. "additionalProperties": false
  21196. },
  21197. "snapshot": {
  21198. "type": "boolean"
  21199. },
  21200. "plugin": {
  21201. "type": "array",
  21202. "items": {
  21203. "anyOf": [
  21204. {
  21205. "type": "string"
  21206. },
  21207. {
  21208. "type": "array",
  21209. "prefixItems": [
  21210. {
  21211. "type": "string"
  21212. },
  21213. {
  21214. "type": "object"
  21215. }
  21216. ],
  21217. "maxItems": 2,
  21218. "minItems": 2
  21219. }
  21220. ]
  21221. }
  21222. },
  21223. "share": {
  21224. "type": "string",
  21225. "enum": ["manual", "auto", "disabled"]
  21226. },
  21227. "autoshare": {
  21228. "type": "boolean"
  21229. },
  21230. "autoupdate": {
  21231. "anyOf": [
  21232. {
  21233. "type": "boolean"
  21234. },
  21235. {
  21236. "type": "string",
  21237. "enum": ["notify"]
  21238. }
  21239. ],
  21240. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  21241. },
  21242. "disabled_providers": {
  21243. "type": "array",
  21244. "items": {
  21245. "type": "string"
  21246. }
  21247. },
  21248. "enabled_providers": {
  21249. "type": "array",
  21250. "items": {
  21251. "type": "string"
  21252. }
  21253. },
  21254. "model": {
  21255. "type": "string"
  21256. },
  21257. "small_model": {
  21258. "type": "string"
  21259. },
  21260. "default_agent": {
  21261. "type": "string"
  21262. },
  21263. "username": {
  21264. "type": "string"
  21265. },
  21266. "mode": {
  21267. "type": "object",
  21268. "properties": {
  21269. "build": {
  21270. "$ref": "#/components/schemas/AgentConfig"
  21271. },
  21272. "plan": {
  21273. "$ref": "#/components/schemas/AgentConfig"
  21274. }
  21275. },
  21276. "additionalProperties": {
  21277. "$ref": "#/components/schemas/AgentConfig"
  21278. }
  21279. },
  21280. "agent": {
  21281. "type": "object",
  21282. "properties": {
  21283. "plan": {
  21284. "$ref": "#/components/schemas/AgentConfig"
  21285. },
  21286. "build": {
  21287. "$ref": "#/components/schemas/AgentConfig"
  21288. },
  21289. "general": {
  21290. "$ref": "#/components/schemas/AgentConfig"
  21291. },
  21292. "explore": {
  21293. "$ref": "#/components/schemas/AgentConfig"
  21294. },
  21295. "title": {
  21296. "$ref": "#/components/schemas/AgentConfig"
  21297. },
  21298. "summary": {
  21299. "$ref": "#/components/schemas/AgentConfig"
  21300. },
  21301. "compaction": {
  21302. "$ref": "#/components/schemas/AgentConfig"
  21303. }
  21304. },
  21305. "additionalProperties": {
  21306. "$ref": "#/components/schemas/AgentConfig"
  21307. }
  21308. },
  21309. "provider": {
  21310. "type": "object",
  21311. "additionalProperties": {
  21312. "$ref": "#/components/schemas/ProviderConfig"
  21313. }
  21314. },
  21315. "mcp": {
  21316. "type": "object",
  21317. "additionalProperties": {
  21318. "anyOf": [
  21319. {
  21320. "$ref": "#/components/schemas/McpLocalConfig"
  21321. },
  21322. {
  21323. "$ref": "#/components/schemas/McpRemoteConfig"
  21324. },
  21325. {
  21326. "type": "object",
  21327. "properties": {
  21328. "enabled": {
  21329. "type": "boolean"
  21330. }
  21331. },
  21332. "required": ["enabled"],
  21333. "additionalProperties": false
  21334. }
  21335. ]
  21336. }
  21337. },
  21338. "formatter": {
  21339. "anyOf": [
  21340. {
  21341. "type": "boolean"
  21342. },
  21343. {
  21344. "type": "object",
  21345. "additionalProperties": {
  21346. "type": "object",
  21347. "properties": {
  21348. "disabled": {
  21349. "type": "boolean"
  21350. },
  21351. "command": {
  21352. "type": "array",
  21353. "items": {
  21354. "type": "string"
  21355. }
  21356. },
  21357. "environment": {
  21358. "type": "object",
  21359. "additionalProperties": {
  21360. "type": "string"
  21361. }
  21362. },
  21363. "extensions": {
  21364. "type": "array",
  21365. "items": {
  21366. "type": "string"
  21367. }
  21368. }
  21369. },
  21370. "additionalProperties": false
  21371. }
  21372. }
  21373. ],
  21374. "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."
  21375. },
  21376. "lsp": {
  21377. "anyOf": [
  21378. {
  21379. "type": "boolean"
  21380. },
  21381. {
  21382. "type": "object",
  21383. "additionalProperties": {
  21384. "anyOf": [
  21385. {
  21386. "type": "object",
  21387. "properties": {
  21388. "disabled": {
  21389. "type": "boolean",
  21390. "enum": [true]
  21391. }
  21392. },
  21393. "required": ["disabled"],
  21394. "additionalProperties": false
  21395. },
  21396. {
  21397. "type": "object",
  21398. "properties": {
  21399. "command": {
  21400. "type": "array",
  21401. "items": {
  21402. "type": "string"
  21403. }
  21404. },
  21405. "extensions": {
  21406. "type": "array",
  21407. "items": {
  21408. "type": "string"
  21409. }
  21410. },
  21411. "disabled": {
  21412. "type": "boolean"
  21413. },
  21414. "env": {
  21415. "type": "object",
  21416. "additionalProperties": {
  21417. "type": "string"
  21418. }
  21419. },
  21420. "initialization": {
  21421. "type": "object"
  21422. }
  21423. },
  21424. "required": ["command"],
  21425. "additionalProperties": false
  21426. }
  21427. ]
  21428. }
  21429. }
  21430. ],
  21431. "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."
  21432. },
  21433. "instructions": {
  21434. "type": "array",
  21435. "items": {
  21436. "type": "string"
  21437. }
  21438. },
  21439. "layout": {
  21440. "$ref": "#/components/schemas/LayoutConfig"
  21441. },
  21442. "permission": {
  21443. "$ref": "#/components/schemas/PermissionConfig"
  21444. },
  21445. "tools": {
  21446. "type": "object",
  21447. "additionalProperties": {
  21448. "type": "boolean"
  21449. }
  21450. },
  21451. "attachment": {
  21452. "$ref": "#/components/schemas/AttachmentConfig"
  21453. },
  21454. "enterprise": {
  21455. "type": "object",
  21456. "properties": {
  21457. "url": {
  21458. "type": "string"
  21459. }
  21460. },
  21461. "additionalProperties": false
  21462. },
  21463. "tool_output": {
  21464. "type": "object",
  21465. "properties": {
  21466. "max_lines": {
  21467. "type": "integer",
  21468. "exclusiveMinimum": 0
  21469. },
  21470. "max_bytes": {
  21471. "type": "integer",
  21472. "exclusiveMinimum": 0
  21473. }
  21474. },
  21475. "additionalProperties": false
  21476. },
  21477. "compaction": {
  21478. "type": "object",
  21479. "properties": {
  21480. "auto": {
  21481. "type": "boolean"
  21482. },
  21483. "prune": {
  21484. "type": "boolean"
  21485. },
  21486. "tail_turns": {
  21487. "type": "integer",
  21488. "minimum": 0
  21489. },
  21490. "preserve_recent_tokens": {
  21491. "type": "integer",
  21492. "minimum": 0
  21493. },
  21494. "reserved": {
  21495. "type": "integer",
  21496. "minimum": 0
  21497. }
  21498. },
  21499. "additionalProperties": false
  21500. },
  21501. "experimental": {
  21502. "type": "object",
  21503. "properties": {
  21504. "disable_paste_summary": {
  21505. "type": "boolean"
  21506. },
  21507. "batch_tool": {
  21508. "type": "boolean"
  21509. },
  21510. "openTelemetry": {
  21511. "type": "boolean"
  21512. },
  21513. "primary_tools": {
  21514. "type": "array",
  21515. "items": {
  21516. "type": "string"
  21517. }
  21518. },
  21519. "continue_loop_on_deny": {
  21520. "type": "boolean"
  21521. },
  21522. "mcp_timeout": {
  21523. "type": "integer",
  21524. "exclusiveMinimum": 0
  21525. },
  21526. "policies": {
  21527. "type": "array",
  21528. "items": {
  21529. "$ref": "#/components/schemas/ConfigV2ExperimentalPolicy"
  21530. }
  21531. }
  21532. },
  21533. "additionalProperties": false
  21534. }
  21535. },
  21536. "additionalProperties": false
  21537. },
  21538. "Model": {
  21539. "type": "object",
  21540. "properties": {
  21541. "id": {
  21542. "type": "string"
  21543. },
  21544. "providerID": {
  21545. "type": "string"
  21546. },
  21547. "api": {
  21548. "type": "object",
  21549. "properties": {
  21550. "id": {
  21551. "type": "string"
  21552. },
  21553. "url": {
  21554. "type": "string"
  21555. },
  21556. "npm": {
  21557. "type": "string"
  21558. }
  21559. },
  21560. "required": ["id", "url", "npm"],
  21561. "additionalProperties": false
  21562. },
  21563. "name": {
  21564. "type": "string"
  21565. },
  21566. "family": {
  21567. "type": "string"
  21568. },
  21569. "capabilities": {
  21570. "type": "object",
  21571. "properties": {
  21572. "temperature": {
  21573. "type": "boolean"
  21574. },
  21575. "reasoning": {
  21576. "type": "boolean"
  21577. },
  21578. "attachment": {
  21579. "type": "boolean"
  21580. },
  21581. "toolcall": {
  21582. "type": "boolean"
  21583. },
  21584. "input": {
  21585. "type": "object",
  21586. "properties": {
  21587. "text": {
  21588. "type": "boolean"
  21589. },
  21590. "audio": {
  21591. "type": "boolean"
  21592. },
  21593. "image": {
  21594. "type": "boolean"
  21595. },
  21596. "video": {
  21597. "type": "boolean"
  21598. },
  21599. "pdf": {
  21600. "type": "boolean"
  21601. }
  21602. },
  21603. "required": ["text", "audio", "image", "video", "pdf"],
  21604. "additionalProperties": false
  21605. },
  21606. "output": {
  21607. "type": "object",
  21608. "properties": {
  21609. "text": {
  21610. "type": "boolean"
  21611. },
  21612. "audio": {
  21613. "type": "boolean"
  21614. },
  21615. "image": {
  21616. "type": "boolean"
  21617. },
  21618. "video": {
  21619. "type": "boolean"
  21620. },
  21621. "pdf": {
  21622. "type": "boolean"
  21623. }
  21624. },
  21625. "required": ["text", "audio", "image", "video", "pdf"],
  21626. "additionalProperties": false
  21627. },
  21628. "interleaved": {
  21629. "anyOf": [
  21630. {
  21631. "type": "boolean"
  21632. },
  21633. {
  21634. "type": "object",
  21635. "properties": {
  21636. "field": {
  21637. "type": "string",
  21638. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  21639. }
  21640. },
  21641. "required": ["field"],
  21642. "additionalProperties": false
  21643. }
  21644. ]
  21645. }
  21646. },
  21647. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  21648. "additionalProperties": false
  21649. },
  21650. "cost": {
  21651. "type": "object",
  21652. "properties": {
  21653. "input": {
  21654. "type": "number"
  21655. },
  21656. "output": {
  21657. "type": "number"
  21658. },
  21659. "cache": {
  21660. "type": "object",
  21661. "properties": {
  21662. "read": {
  21663. "type": "number"
  21664. },
  21665. "write": {
  21666. "type": "number"
  21667. }
  21668. },
  21669. "required": ["read", "write"],
  21670. "additionalProperties": false
  21671. },
  21672. "tiers": {
  21673. "type": "array",
  21674. "items": {
  21675. "type": "object",
  21676. "properties": {
  21677. "input": {
  21678. "type": "number"
  21679. },
  21680. "output": {
  21681. "type": "number"
  21682. },
  21683. "cache": {
  21684. "type": "object",
  21685. "properties": {
  21686. "read": {
  21687. "type": "number"
  21688. },
  21689. "write": {
  21690. "type": "number"
  21691. }
  21692. },
  21693. "required": ["read", "write"],
  21694. "additionalProperties": false
  21695. },
  21696. "tier": {
  21697. "type": "object",
  21698. "properties": {
  21699. "type": {
  21700. "type": "string",
  21701. "enum": ["context"]
  21702. },
  21703. "size": {
  21704. "type": "number"
  21705. }
  21706. },
  21707. "required": ["type", "size"],
  21708. "additionalProperties": false
  21709. }
  21710. },
  21711. "required": ["input", "output", "cache", "tier"],
  21712. "additionalProperties": false
  21713. }
  21714. },
  21715. "experimentalOver200K": {
  21716. "type": "object",
  21717. "properties": {
  21718. "input": {
  21719. "type": "number"
  21720. },
  21721. "output": {
  21722. "type": "number"
  21723. },
  21724. "cache": {
  21725. "type": "object",
  21726. "properties": {
  21727. "read": {
  21728. "type": "number"
  21729. },
  21730. "write": {
  21731. "type": "number"
  21732. }
  21733. },
  21734. "required": ["read", "write"],
  21735. "additionalProperties": false
  21736. }
  21737. },
  21738. "required": ["input", "output", "cache"],
  21739. "additionalProperties": false
  21740. }
  21741. },
  21742. "required": ["input", "output", "cache"],
  21743. "additionalProperties": false
  21744. },
  21745. "limit": {
  21746. "type": "object",
  21747. "properties": {
  21748. "context": {
  21749. "type": "number"
  21750. },
  21751. "input": {
  21752. "type": "number"
  21753. },
  21754. "output": {
  21755. "type": "number"
  21756. }
  21757. },
  21758. "required": ["context", "output"],
  21759. "additionalProperties": false
  21760. },
  21761. "status": {
  21762. "type": "string",
  21763. "enum": ["alpha", "beta", "deprecated", "active"]
  21764. },
  21765. "options": {
  21766. "type": "object"
  21767. },
  21768. "headers": {
  21769. "type": "object",
  21770. "additionalProperties": {
  21771. "type": "string"
  21772. }
  21773. },
  21774. "release_date": {
  21775. "type": "string"
  21776. },
  21777. "variants": {
  21778. "type": "object",
  21779. "additionalProperties": {
  21780. "type": "object"
  21781. }
  21782. }
  21783. },
  21784. "required": [
  21785. "id",
  21786. "providerID",
  21787. "api",
  21788. "name",
  21789. "capabilities",
  21790. "cost",
  21791. "limit",
  21792. "status",
  21793. "options",
  21794. "headers",
  21795. "release_date"
  21796. ],
  21797. "additionalProperties": false
  21798. },
  21799. "Provider": {
  21800. "type": "object",
  21801. "properties": {
  21802. "id": {
  21803. "type": "string"
  21804. },
  21805. "name": {
  21806. "type": "string"
  21807. },
  21808. "source": {
  21809. "type": "string",
  21810. "enum": ["env", "config", "custom", "api"]
  21811. },
  21812. "env": {
  21813. "type": "array",
  21814. "items": {
  21815. "type": "string"
  21816. }
  21817. },
  21818. "key": {
  21819. "type": "string"
  21820. },
  21821. "options": {
  21822. "type": "object"
  21823. },
  21824. "models": {
  21825. "type": "object",
  21826. "additionalProperties": {
  21827. "$ref": "#/components/schemas/Model"
  21828. }
  21829. }
  21830. },
  21831. "required": ["id", "name", "source", "env", "options", "models"],
  21832. "additionalProperties": false
  21833. },
  21834. "ExperimentalCapabilities": {
  21835. "type": "object",
  21836. "properties": {
  21837. "backgroundSubagents": {
  21838. "type": "boolean"
  21839. }
  21840. },
  21841. "required": ["backgroundSubagents"],
  21842. "additionalProperties": false
  21843. },
  21844. "ConsoleState": {
  21845. "type": "object",
  21846. "properties": {
  21847. "consoleManagedProviders": {
  21848. "type": "array",
  21849. "items": {
  21850. "type": "string"
  21851. }
  21852. },
  21853. "activeOrgName": {
  21854. "type": "string"
  21855. },
  21856. "switchableOrgCount": {
  21857. "type": "integer",
  21858. "minimum": 0
  21859. }
  21860. },
  21861. "required": ["consoleManagedProviders", "switchableOrgCount"],
  21862. "additionalProperties": false
  21863. },
  21864. "effect_HttpApiError_InternalServerError": {
  21865. "type": "object",
  21866. "properties": {
  21867. "_tag": {
  21868. "type": "string",
  21869. "enum": ["InternalServerError"]
  21870. }
  21871. },
  21872. "required": ["_tag"],
  21873. "additionalProperties": false
  21874. },
  21875. "ToolListItem": {
  21876. "type": "object",
  21877. "properties": {
  21878. "id": {
  21879. "type": "string"
  21880. },
  21881. "description": {
  21882. "type": "string"
  21883. },
  21884. "parameters": {}
  21885. },
  21886. "required": ["id", "description", "parameters"],
  21887. "additionalProperties": false
  21888. },
  21889. "ToolList": {
  21890. "type": "array",
  21891. "items": {
  21892. "$ref": "#/components/schemas/ToolListItem"
  21893. }
  21894. },
  21895. "ToolIDs": {
  21896. "type": "array",
  21897. "items": {
  21898. "type": "string"
  21899. }
  21900. },
  21901. "WorktreeError": {
  21902. "type": "object",
  21903. "properties": {
  21904. "name": {
  21905. "type": "string",
  21906. "enum": [
  21907. "WorktreeNotGitError",
  21908. "WorktreeNameGenerationFailedError",
  21909. "WorktreeCreateFailedError",
  21910. "WorktreeStartCommandFailedError",
  21911. "WorktreeRemoveFailedError",
  21912. "WorktreeResetFailedError",
  21913. "WorktreeListFailedError"
  21914. ]
  21915. },
  21916. "data": {
  21917. "type": "object",
  21918. "properties": {
  21919. "message": {
  21920. "type": "string"
  21921. }
  21922. },
  21923. "required": ["message"],
  21924. "additionalProperties": false
  21925. }
  21926. },
  21927. "required": ["name", "data"],
  21928. "additionalProperties": false
  21929. },
  21930. "WorktreeCreateInput": {
  21931. "type": "object",
  21932. "properties": {
  21933. "name": {
  21934. "type": "string"
  21935. },
  21936. "startCommand": {
  21937. "type": "string",
  21938. "description": "Additional startup script to run after the project's start command"
  21939. }
  21940. },
  21941. "additionalProperties": false
  21942. },
  21943. "Worktree": {
  21944. "type": "object",
  21945. "properties": {
  21946. "name": {
  21947. "type": "string"
  21948. },
  21949. "branch": {
  21950. "type": "string"
  21951. },
  21952. "directory": {
  21953. "type": "string"
  21954. }
  21955. },
  21956. "required": ["name", "directory"],
  21957. "additionalProperties": false
  21958. },
  21959. "WorktreeRemoveInput": {
  21960. "type": "object",
  21961. "properties": {
  21962. "directory": {
  21963. "type": "string"
  21964. }
  21965. },
  21966. "required": ["directory"],
  21967. "additionalProperties": false
  21968. },
  21969. "WorktreeResetInput": {
  21970. "type": "object",
  21971. "properties": {
  21972. "directory": {
  21973. "type": "string"
  21974. }
  21975. },
  21976. "required": ["directory"],
  21977. "additionalProperties": false
  21978. },
  21979. "ProjectSummary": {
  21980. "type": "object",
  21981. "properties": {
  21982. "id": {
  21983. "type": "string"
  21984. },
  21985. "name": {
  21986. "type": "string"
  21987. },
  21988. "worktree": {
  21989. "type": "string"
  21990. }
  21991. },
  21992. "required": ["id", "worktree"],
  21993. "additionalProperties": false
  21994. },
  21995. "GlobalSession": {
  21996. "type": "object",
  21997. "properties": {
  21998. "id": {
  21999. "type": "string",
  22000. "pattern": "^ses"
  22001. },
  22002. "slug": {
  22003. "type": "string"
  22004. },
  22005. "projectID": {
  22006. "type": "string"
  22007. },
  22008. "workspaceID": {
  22009. "type": "string",
  22010. "pattern": "^wrk"
  22011. },
  22012. "directory": {
  22013. "type": "string"
  22014. },
  22015. "path": {
  22016. "type": "string"
  22017. },
  22018. "parentID": {
  22019. "type": "string",
  22020. "pattern": "^ses"
  22021. },
  22022. "summary": {
  22023. "type": "object",
  22024. "properties": {
  22025. "additions": {
  22026. "type": "number"
  22027. },
  22028. "deletions": {
  22029. "type": "number"
  22030. },
  22031. "files": {
  22032. "type": "number"
  22033. },
  22034. "diffs": {
  22035. "type": "array",
  22036. "items": {
  22037. "$ref": "#/components/schemas/SnapshotFileDiff"
  22038. }
  22039. }
  22040. },
  22041. "required": ["additions", "deletions", "files"],
  22042. "additionalProperties": false
  22043. },
  22044. "cost": {
  22045. "type": "number"
  22046. },
  22047. "tokens": {
  22048. "type": "object",
  22049. "properties": {
  22050. "input": {
  22051. "type": "number"
  22052. },
  22053. "output": {
  22054. "type": "number"
  22055. },
  22056. "reasoning": {
  22057. "type": "number"
  22058. },
  22059. "cache": {
  22060. "type": "object",
  22061. "properties": {
  22062. "read": {
  22063. "type": "number"
  22064. },
  22065. "write": {
  22066. "type": "number"
  22067. }
  22068. },
  22069. "required": ["read", "write"],
  22070. "additionalProperties": false
  22071. }
  22072. },
  22073. "required": ["input", "output", "reasoning", "cache"],
  22074. "additionalProperties": false
  22075. },
  22076. "share": {
  22077. "type": "object",
  22078. "properties": {
  22079. "url": {
  22080. "type": "string"
  22081. }
  22082. },
  22083. "required": ["url"],
  22084. "additionalProperties": false
  22085. },
  22086. "title": {
  22087. "type": "string"
  22088. },
  22089. "agent": {
  22090. "type": "string"
  22091. },
  22092. "model": {
  22093. "type": "object",
  22094. "properties": {
  22095. "id": {
  22096. "type": "string"
  22097. },
  22098. "providerID": {
  22099. "type": "string"
  22100. },
  22101. "variant": {
  22102. "type": "string"
  22103. }
  22104. },
  22105. "required": ["id", "providerID"],
  22106. "additionalProperties": false
  22107. },
  22108. "version": {
  22109. "type": "string"
  22110. },
  22111. "metadata": {
  22112. "type": "object"
  22113. },
  22114. "time": {
  22115. "type": "object",
  22116. "properties": {
  22117. "created": {
  22118. "type": "integer",
  22119. "minimum": 0
  22120. },
  22121. "updated": {
  22122. "type": "integer",
  22123. "minimum": 0
  22124. },
  22125. "compacting": {
  22126. "type": "integer",
  22127. "minimum": 0
  22128. },
  22129. "archived": {
  22130. "type": "number"
  22131. }
  22132. },
  22133. "required": ["created", "updated"],
  22134. "additionalProperties": false
  22135. },
  22136. "permission": {
  22137. "$ref": "#/components/schemas/PermissionRuleset"
  22138. },
  22139. "revert": {
  22140. "type": "object",
  22141. "properties": {
  22142. "messageID": {
  22143. "type": "string",
  22144. "pattern": "^msg"
  22145. },
  22146. "partID": {
  22147. "type": "string",
  22148. "pattern": "^prt"
  22149. },
  22150. "snapshot": {
  22151. "type": "string"
  22152. },
  22153. "diff": {
  22154. "type": "string"
  22155. }
  22156. },
  22157. "required": ["messageID"],
  22158. "additionalProperties": false
  22159. },
  22160. "project": {
  22161. "anyOf": [
  22162. {
  22163. "$ref": "#/components/schemas/ProjectSummary"
  22164. },
  22165. {
  22166. "type": "null"
  22167. }
  22168. ]
  22169. }
  22170. },
  22171. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  22172. "additionalProperties": false
  22173. },
  22174. "McpResource": {
  22175. "type": "object",
  22176. "properties": {
  22177. "name": {
  22178. "type": "string"
  22179. },
  22180. "uri": {
  22181. "type": "string"
  22182. },
  22183. "description": {
  22184. "type": "string"
  22185. },
  22186. "mimeType": {
  22187. "type": "string"
  22188. },
  22189. "client": {
  22190. "type": "string"
  22191. }
  22192. },
  22193. "required": ["name", "uri", "client"],
  22194. "additionalProperties": false
  22195. },
  22196. "Symbol": {
  22197. "type": "object",
  22198. "properties": {
  22199. "name": {
  22200. "type": "string"
  22201. },
  22202. "kind": {
  22203. "type": "integer",
  22204. "minimum": 0
  22205. },
  22206. "location": {
  22207. "type": "object",
  22208. "properties": {
  22209. "uri": {
  22210. "type": "string"
  22211. },
  22212. "range": {
  22213. "$ref": "#/components/schemas/Range"
  22214. }
  22215. },
  22216. "required": ["uri", "range"],
  22217. "additionalProperties": false
  22218. }
  22219. },
  22220. "required": ["name", "kind", "location"],
  22221. "additionalProperties": false
  22222. },
  22223. "FileNode": {
  22224. "type": "object",
  22225. "properties": {
  22226. "name": {
  22227. "type": "string"
  22228. },
  22229. "path": {
  22230. "type": "string"
  22231. },
  22232. "absolute": {
  22233. "type": "string"
  22234. },
  22235. "type": {
  22236. "type": "string",
  22237. "enum": ["file", "directory"]
  22238. },
  22239. "ignored": {
  22240. "type": "boolean"
  22241. }
  22242. },
  22243. "required": ["name", "path", "absolute", "type", "ignored"],
  22244. "additionalProperties": false
  22245. },
  22246. "FileContent": {
  22247. "type": "object",
  22248. "properties": {
  22249. "type": {
  22250. "type": "string",
  22251. "enum": ["text", "binary"]
  22252. },
  22253. "content": {
  22254. "type": "string"
  22255. },
  22256. "diff": {
  22257. "type": "string"
  22258. },
  22259. "patch": {
  22260. "type": "object",
  22261. "properties": {
  22262. "oldFileName": {
  22263. "type": "string"
  22264. },
  22265. "newFileName": {
  22266. "type": "string"
  22267. },
  22268. "oldHeader": {
  22269. "type": "string"
  22270. },
  22271. "newHeader": {
  22272. "type": "string"
  22273. },
  22274. "hunks": {
  22275. "type": "array",
  22276. "items": {
  22277. "type": "object",
  22278. "properties": {
  22279. "oldStart": {
  22280. "type": "integer",
  22281. "minimum": 0
  22282. },
  22283. "oldLines": {
  22284. "type": "integer",
  22285. "minimum": 0
  22286. },
  22287. "newStart": {
  22288. "type": "integer",
  22289. "minimum": 0
  22290. },
  22291. "newLines": {
  22292. "type": "integer",
  22293. "minimum": 0
  22294. },
  22295. "lines": {
  22296. "type": "array",
  22297. "items": {
  22298. "type": "string"
  22299. }
  22300. }
  22301. },
  22302. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  22303. "additionalProperties": false
  22304. }
  22305. },
  22306. "index": {
  22307. "type": "string"
  22308. }
  22309. },
  22310. "required": ["oldFileName", "newFileName", "hunks"],
  22311. "additionalProperties": false
  22312. },
  22313. "encoding": {
  22314. "type": "string",
  22315. "enum": ["base64"]
  22316. },
  22317. "mimeType": {
  22318. "type": "string"
  22319. }
  22320. },
  22321. "required": ["type", "content"],
  22322. "additionalProperties": false
  22323. },
  22324. "File": {
  22325. "type": "object",
  22326. "properties": {
  22327. "path": {
  22328. "type": "string"
  22329. },
  22330. "added": {
  22331. "type": "integer",
  22332. "minimum": 0
  22333. },
  22334. "removed": {
  22335. "type": "integer",
  22336. "minimum": 0
  22337. },
  22338. "status": {
  22339. "type": "string",
  22340. "enum": ["added", "deleted", "modified"]
  22341. }
  22342. },
  22343. "required": ["path", "added", "removed", "status"],
  22344. "additionalProperties": false
  22345. },
  22346. "Path": {
  22347. "type": "object",
  22348. "properties": {
  22349. "home": {
  22350. "type": "string"
  22351. },
  22352. "state": {
  22353. "type": "string"
  22354. },
  22355. "config": {
  22356. "type": "string"
  22357. },
  22358. "worktree": {
  22359. "type": "string"
  22360. },
  22361. "directory": {
  22362. "type": "string"
  22363. }
  22364. },
  22365. "required": ["home", "state", "config", "worktree", "directory"],
  22366. "additionalProperties": false
  22367. },
  22368. "VcsInfo": {
  22369. "type": "object",
  22370. "properties": {
  22371. "branch": {
  22372. "type": "string"
  22373. },
  22374. "default_branch": {
  22375. "type": "string"
  22376. }
  22377. },
  22378. "additionalProperties": false
  22379. },
  22380. "VcsFileStatus": {
  22381. "type": "object",
  22382. "properties": {
  22383. "file": {
  22384. "type": "string"
  22385. },
  22386. "additions": {
  22387. "type": "number"
  22388. },
  22389. "deletions": {
  22390. "type": "number"
  22391. },
  22392. "status": {
  22393. "type": "string",
  22394. "enum": ["added", "deleted", "modified"]
  22395. }
  22396. },
  22397. "required": ["file", "additions", "deletions", "status"],
  22398. "additionalProperties": false
  22399. },
  22400. "VcsFileDiff": {
  22401. "type": "object",
  22402. "properties": {
  22403. "file": {
  22404. "type": "string"
  22405. },
  22406. "patch": {
  22407. "type": "string"
  22408. },
  22409. "additions": {
  22410. "type": "number"
  22411. },
  22412. "deletions": {
  22413. "type": "number"
  22414. },
  22415. "status": {
  22416. "type": "string",
  22417. "enum": ["added", "deleted", "modified"]
  22418. }
  22419. },
  22420. "required": ["file", "additions", "deletions"],
  22421. "additionalProperties": false
  22422. },
  22423. "VcsApplyError": {
  22424. "type": "object",
  22425. "properties": {
  22426. "name": {
  22427. "type": "string",
  22428. "enum": ["VcsApplyError"]
  22429. },
  22430. "data": {
  22431. "type": "object",
  22432. "properties": {
  22433. "message": {
  22434. "type": "string"
  22435. },
  22436. "reason": {
  22437. "type": "string",
  22438. "enum": ["non-git", "not-clean"]
  22439. }
  22440. },
  22441. "required": ["message", "reason"],
  22442. "additionalProperties": false
  22443. }
  22444. },
  22445. "required": ["name", "data"],
  22446. "additionalProperties": false
  22447. },
  22448. "Command": {
  22449. "type": "object",
  22450. "properties": {
  22451. "name": {
  22452. "type": "string"
  22453. },
  22454. "description": {
  22455. "type": "string"
  22456. },
  22457. "agent": {
  22458. "type": "string"
  22459. },
  22460. "model": {
  22461. "type": "string"
  22462. },
  22463. "source": {
  22464. "type": "string",
  22465. "enum": ["command", "mcp", "skill"]
  22466. },
  22467. "template": {
  22468. "type": "string"
  22469. },
  22470. "subtask": {
  22471. "type": "boolean"
  22472. },
  22473. "hints": {
  22474. "type": "array",
  22475. "items": {
  22476. "type": "string"
  22477. }
  22478. }
  22479. },
  22480. "required": ["name", "template", "hints"],
  22481. "additionalProperties": false
  22482. },
  22483. "Agent": {
  22484. "type": "object",
  22485. "properties": {
  22486. "name": {
  22487. "type": "string"
  22488. },
  22489. "description": {
  22490. "type": "string"
  22491. },
  22492. "mode": {
  22493. "type": "string",
  22494. "enum": ["subagent", "primary", "all"]
  22495. },
  22496. "native": {
  22497. "type": "boolean"
  22498. },
  22499. "hidden": {
  22500. "type": "boolean"
  22501. },
  22502. "topP": {
  22503. "type": "number"
  22504. },
  22505. "temperature": {
  22506. "type": "number"
  22507. },
  22508. "color": {
  22509. "type": "string"
  22510. },
  22511. "permission": {
  22512. "$ref": "#/components/schemas/PermissionRuleset"
  22513. },
  22514. "model": {
  22515. "type": "object",
  22516. "properties": {
  22517. "modelID": {
  22518. "type": "string"
  22519. },
  22520. "providerID": {
  22521. "type": "string"
  22522. }
  22523. },
  22524. "required": ["modelID", "providerID"],
  22525. "additionalProperties": false
  22526. },
  22527. "variant": {
  22528. "type": "string"
  22529. },
  22530. "prompt": {
  22531. "type": "string"
  22532. },
  22533. "options": {
  22534. "type": "object"
  22535. },
  22536. "steps": {
  22537. "type": "number"
  22538. }
  22539. },
  22540. "required": ["name", "mode", "permission", "options"],
  22541. "additionalProperties": false
  22542. },
  22543. "LSPStatus": {
  22544. "type": "object",
  22545. "properties": {
  22546. "id": {
  22547. "type": "string"
  22548. },
  22549. "name": {
  22550. "type": "string"
  22551. },
  22552. "root": {
  22553. "type": "string"
  22554. },
  22555. "status": {
  22556. "type": "string",
  22557. "enum": ["connected", "error"]
  22558. }
  22559. },
  22560. "required": ["id", "name", "root", "status"],
  22561. "additionalProperties": false
  22562. },
  22563. "FormatterStatus": {
  22564. "type": "object",
  22565. "properties": {
  22566. "name": {
  22567. "type": "string"
  22568. },
  22569. "extensions": {
  22570. "type": "array",
  22571. "items": {
  22572. "type": "string"
  22573. }
  22574. },
  22575. "enabled": {
  22576. "type": "boolean"
  22577. }
  22578. },
  22579. "required": ["name", "extensions", "enabled"],
  22580. "additionalProperties": false
  22581. },
  22582. "MCPStatusConnected": {
  22583. "type": "object",
  22584. "properties": {
  22585. "status": {
  22586. "type": "string",
  22587. "enum": ["connected"]
  22588. }
  22589. },
  22590. "required": ["status"],
  22591. "additionalProperties": false
  22592. },
  22593. "MCPStatusDisabled": {
  22594. "type": "object",
  22595. "properties": {
  22596. "status": {
  22597. "type": "string",
  22598. "enum": ["disabled"]
  22599. }
  22600. },
  22601. "required": ["status"],
  22602. "additionalProperties": false
  22603. },
  22604. "MCPStatusFailed": {
  22605. "type": "object",
  22606. "properties": {
  22607. "status": {
  22608. "type": "string",
  22609. "enum": ["failed"]
  22610. },
  22611. "error": {
  22612. "type": "string"
  22613. }
  22614. },
  22615. "required": ["status", "error"],
  22616. "additionalProperties": false
  22617. },
  22618. "MCPStatusNeedsAuth": {
  22619. "type": "object",
  22620. "properties": {
  22621. "status": {
  22622. "type": "string",
  22623. "enum": ["needs_auth"]
  22624. }
  22625. },
  22626. "required": ["status"],
  22627. "additionalProperties": false
  22628. },
  22629. "MCPStatusNeedsClientRegistration": {
  22630. "type": "object",
  22631. "properties": {
  22632. "status": {
  22633. "type": "string",
  22634. "enum": ["needs_client_registration"]
  22635. },
  22636. "error": {
  22637. "type": "string"
  22638. }
  22639. },
  22640. "required": ["status", "error"],
  22641. "additionalProperties": false
  22642. },
  22643. "MCPStatus": {
  22644. "anyOf": [
  22645. {
  22646. "$ref": "#/components/schemas/MCPStatusConnected"
  22647. },
  22648. {
  22649. "$ref": "#/components/schemas/MCPStatusDisabled"
  22650. },
  22651. {
  22652. "$ref": "#/components/schemas/MCPStatusFailed"
  22653. },
  22654. {
  22655. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  22656. },
  22657. {
  22658. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  22659. }
  22660. ]
  22661. },
  22662. "McpUnsupportedOAuthError": {
  22663. "type": "object",
  22664. "properties": {
  22665. "error": {
  22666. "type": "string"
  22667. }
  22668. },
  22669. "required": ["error"],
  22670. "additionalProperties": false
  22671. },
  22672. "McpServerNotFoundError": {
  22673. "type": "object",
  22674. "properties": {
  22675. "_tag": {
  22676. "type": "string",
  22677. "enum": ["McpServerNotFoundError"]
  22678. },
  22679. "name": {
  22680. "type": "string"
  22681. },
  22682. "message": {
  22683. "type": "string"
  22684. }
  22685. },
  22686. "required": ["_tag", "name", "message"],
  22687. "additionalProperties": false
  22688. },
  22689. "Project": {
  22690. "type": "object",
  22691. "properties": {
  22692. "id": {
  22693. "type": "string"
  22694. },
  22695. "worktree": {
  22696. "type": "string"
  22697. },
  22698. "vcs": {
  22699. "$ref": "#/components/schemas/ProjectVcs"
  22700. },
  22701. "name": {
  22702. "type": "string"
  22703. },
  22704. "icon": {
  22705. "$ref": "#/components/schemas/ProjectIcon"
  22706. },
  22707. "commands": {
  22708. "$ref": "#/components/schemas/ProjectCommands"
  22709. },
  22710. "time": {
  22711. "$ref": "#/components/schemas/ProjectTime"
  22712. },
  22713. "sandboxes": {
  22714. "type": "array",
  22715. "items": {
  22716. "type": "string"
  22717. }
  22718. }
  22719. },
  22720. "required": ["id", "worktree", "time", "sandboxes"],
  22721. "additionalProperties": false
  22722. },
  22723. "ProjectNotFoundError": {
  22724. "type": "object",
  22725. "properties": {
  22726. "_tag": {
  22727. "type": "string",
  22728. "enum": ["ProjectNotFoundError"]
  22729. },
  22730. "projectID": {
  22731. "type": "string"
  22732. },
  22733. "message": {
  22734. "type": "string"
  22735. }
  22736. },
  22737. "required": ["_tag", "projectID", "message"],
  22738. "additionalProperties": false
  22739. },
  22740. "PtyNotFoundError": {
  22741. "type": "object",
  22742. "properties": {
  22743. "_tag": {
  22744. "type": "string",
  22745. "enum": ["PtyNotFoundError"]
  22746. },
  22747. "ptyID": {
  22748. "type": "string"
  22749. },
  22750. "message": {
  22751. "type": "string"
  22752. }
  22753. },
  22754. "required": ["_tag", "ptyID", "message"],
  22755. "additionalProperties": false
  22756. },
  22757. "PtyForbiddenError": {
  22758. "type": "object",
  22759. "properties": {
  22760. "_tag": {
  22761. "type": "string",
  22762. "enum": ["PtyForbiddenError"]
  22763. },
  22764. "message": {
  22765. "type": "string"
  22766. }
  22767. },
  22768. "required": ["_tag", "message"],
  22769. "additionalProperties": false
  22770. },
  22771. "QuestionRequest": {
  22772. "type": "object",
  22773. "properties": {
  22774. "id": {
  22775. "type": "string",
  22776. "pattern": "^que"
  22777. },
  22778. "sessionID": {
  22779. "type": "string",
  22780. "pattern": "^ses"
  22781. },
  22782. "questions": {
  22783. "type": "array",
  22784. "items": {
  22785. "$ref": "#/components/schemas/QuestionInfo"
  22786. },
  22787. "description": "Questions to ask"
  22788. },
  22789. "tool": {
  22790. "$ref": "#/components/schemas/QuestionTool"
  22791. }
  22792. },
  22793. "required": ["id", "sessionID", "questions"],
  22794. "additionalProperties": false
  22795. },
  22796. "QuestionNotFoundError": {
  22797. "type": "object",
  22798. "properties": {
  22799. "_tag": {
  22800. "type": "string",
  22801. "enum": ["QuestionNotFoundError"]
  22802. },
  22803. "requestID": {
  22804. "type": "string"
  22805. },
  22806. "message": {
  22807. "type": "string"
  22808. }
  22809. },
  22810. "required": ["_tag", "requestID", "message"],
  22811. "additionalProperties": false
  22812. },
  22813. "PermissionRequest": {
  22814. "type": "object",
  22815. "properties": {
  22816. "id": {
  22817. "type": "string",
  22818. "pattern": "^per"
  22819. },
  22820. "sessionID": {
  22821. "type": "string",
  22822. "pattern": "^ses"
  22823. },
  22824. "permission": {
  22825. "type": "string"
  22826. },
  22827. "patterns": {
  22828. "type": "array",
  22829. "items": {
  22830. "type": "string"
  22831. }
  22832. },
  22833. "metadata": {
  22834. "type": "object"
  22835. },
  22836. "always": {
  22837. "type": "array",
  22838. "items": {
  22839. "type": "string"
  22840. }
  22841. },
  22842. "tool": {
  22843. "type": "object",
  22844. "properties": {
  22845. "messageID": {
  22846. "type": "string"
  22847. },
  22848. "callID": {
  22849. "type": "string"
  22850. }
  22851. },
  22852. "required": ["messageID", "callID"],
  22853. "additionalProperties": false
  22854. }
  22855. },
  22856. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  22857. "additionalProperties": false
  22858. },
  22859. "PermissionNotFoundError": {
  22860. "type": "object",
  22861. "properties": {
  22862. "_tag": {
  22863. "type": "string",
  22864. "enum": ["PermissionNotFoundError"]
  22865. },
  22866. "requestID": {
  22867. "type": "string"
  22868. },
  22869. "message": {
  22870. "type": "string"
  22871. }
  22872. },
  22873. "required": ["_tag", "requestID", "message"],
  22874. "additionalProperties": false
  22875. },
  22876. "ProviderAuthMethod": {
  22877. "type": "object",
  22878. "properties": {
  22879. "type": {
  22880. "type": "string",
  22881. "enum": ["oauth", "api"]
  22882. },
  22883. "label": {
  22884. "type": "string"
  22885. },
  22886. "prompts": {
  22887. "type": "array",
  22888. "items": {
  22889. "anyOf": [
  22890. {
  22891. "type": "object",
  22892. "properties": {
  22893. "type": {
  22894. "type": "string",
  22895. "enum": ["text"]
  22896. },
  22897. "key": {
  22898. "type": "string"
  22899. },
  22900. "message": {
  22901. "type": "string"
  22902. },
  22903. "placeholder": {
  22904. "type": "string"
  22905. },
  22906. "when": {
  22907. "type": "object",
  22908. "properties": {
  22909. "key": {
  22910. "type": "string"
  22911. },
  22912. "op": {
  22913. "type": "string",
  22914. "enum": ["eq", "neq"]
  22915. },
  22916. "value": {
  22917. "type": "string"
  22918. }
  22919. },
  22920. "required": ["key", "op", "value"],
  22921. "additionalProperties": false
  22922. }
  22923. },
  22924. "required": ["type", "key", "message"],
  22925. "additionalProperties": false
  22926. },
  22927. {
  22928. "type": "object",
  22929. "properties": {
  22930. "type": {
  22931. "type": "string",
  22932. "enum": ["select"]
  22933. },
  22934. "key": {
  22935. "type": "string"
  22936. },
  22937. "message": {
  22938. "type": "string"
  22939. },
  22940. "options": {
  22941. "type": "array",
  22942. "items": {
  22943. "type": "object",
  22944. "properties": {
  22945. "label": {
  22946. "type": "string"
  22947. },
  22948. "value": {
  22949. "type": "string"
  22950. },
  22951. "hint": {
  22952. "type": "string"
  22953. }
  22954. },
  22955. "required": ["label", "value"],
  22956. "additionalProperties": false
  22957. }
  22958. },
  22959. "when": {
  22960. "type": "object",
  22961. "properties": {
  22962. "key": {
  22963. "type": "string"
  22964. },
  22965. "op": {
  22966. "type": "string",
  22967. "enum": ["eq", "neq"]
  22968. },
  22969. "value": {
  22970. "type": "string"
  22971. }
  22972. },
  22973. "required": ["key", "op", "value"],
  22974. "additionalProperties": false
  22975. }
  22976. },
  22977. "required": ["type", "key", "message", "options"],
  22978. "additionalProperties": false
  22979. }
  22980. ]
  22981. }
  22982. }
  22983. },
  22984. "required": ["type", "label"],
  22985. "additionalProperties": false
  22986. },
  22987. "ProviderAuthAuthorization": {
  22988. "type": "object",
  22989. "properties": {
  22990. "url": {
  22991. "type": "string"
  22992. },
  22993. "method": {
  22994. "type": "string",
  22995. "enum": ["auto", "code"]
  22996. },
  22997. "instructions": {
  22998. "type": "string"
  22999. }
  23000. },
  23001. "required": ["url", "method", "instructions"],
  23002. "additionalProperties": false
  23003. },
  23004. "ProviderAuthError1": {
  23005. "type": "object",
  23006. "properties": {
  23007. "name": {
  23008. "type": "string",
  23009. "enum": [
  23010. "BadRequest",
  23011. "ProviderAuthOauthMissing",
  23012. "ProviderAuthOauthCodeMissing",
  23013. "ProviderAuthOauthCallbackFailed",
  23014. "ProviderAuthValidationFailed"
  23015. ]
  23016. },
  23017. "data": {
  23018. "type": "object",
  23019. "properties": {
  23020. "providerID": {
  23021. "type": "string"
  23022. },
  23023. "field": {
  23024. "type": "string"
  23025. },
  23026. "message": {
  23027. "type": "string"
  23028. },
  23029. "kind": {
  23030. "type": "string"
  23031. }
  23032. },
  23033. "additionalProperties": false
  23034. }
  23035. },
  23036. "required": ["name", "data"],
  23037. "additionalProperties": false
  23038. },
  23039. "NotFoundError": {
  23040. "type": "object",
  23041. "required": ["name", "data"],
  23042. "properties": {
  23043. "name": {
  23044. "type": "string",
  23045. "enum": ["NotFoundError"]
  23046. },
  23047. "data": {
  23048. "type": "object",
  23049. "required": ["message"],
  23050. "properties": {
  23051. "message": {
  23052. "type": "string"
  23053. }
  23054. }
  23055. }
  23056. }
  23057. },
  23058. "TextPartInput": {
  23059. "type": "object",
  23060. "properties": {
  23061. "id": {
  23062. "type": "string",
  23063. "pattern": "^prt"
  23064. },
  23065. "type": {
  23066. "type": "string",
  23067. "enum": ["text"]
  23068. },
  23069. "text": {
  23070. "type": "string"
  23071. },
  23072. "synthetic": {
  23073. "type": "boolean"
  23074. },
  23075. "ignored": {
  23076. "type": "boolean"
  23077. },
  23078. "time": {
  23079. "type": "object",
  23080. "properties": {
  23081. "start": {
  23082. "type": "integer",
  23083. "minimum": 0
  23084. },
  23085. "end": {
  23086. "type": "integer",
  23087. "minimum": 0
  23088. }
  23089. },
  23090. "required": ["start"],
  23091. "additionalProperties": false
  23092. },
  23093. "metadata": {
  23094. "type": "object"
  23095. }
  23096. },
  23097. "required": ["type", "text"],
  23098. "additionalProperties": false
  23099. },
  23100. "FilePartInput": {
  23101. "type": "object",
  23102. "properties": {
  23103. "id": {
  23104. "type": "string",
  23105. "pattern": "^prt"
  23106. },
  23107. "type": {
  23108. "type": "string",
  23109. "enum": ["file"]
  23110. },
  23111. "mime": {
  23112. "type": "string"
  23113. },
  23114. "filename": {
  23115. "type": "string"
  23116. },
  23117. "url": {
  23118. "type": "string"
  23119. },
  23120. "source": {
  23121. "$ref": "#/components/schemas/FilePartSource"
  23122. }
  23123. },
  23124. "required": ["type", "mime", "url"],
  23125. "additionalProperties": false
  23126. },
  23127. "AgentPartInput": {
  23128. "type": "object",
  23129. "properties": {
  23130. "id": {
  23131. "type": "string",
  23132. "pattern": "^prt"
  23133. },
  23134. "type": {
  23135. "type": "string",
  23136. "enum": ["agent"]
  23137. },
  23138. "name": {
  23139. "type": "string"
  23140. },
  23141. "source": {
  23142. "type": "object",
  23143. "properties": {
  23144. "value": {
  23145. "type": "string"
  23146. },
  23147. "start": {
  23148. "type": "integer",
  23149. "minimum": 0
  23150. },
  23151. "end": {
  23152. "type": "integer",
  23153. "minimum": 0
  23154. }
  23155. },
  23156. "required": ["value", "start", "end"],
  23157. "additionalProperties": false
  23158. }
  23159. },
  23160. "required": ["type", "name"],
  23161. "additionalProperties": false
  23162. },
  23163. "SubtaskPartInput": {
  23164. "type": "object",
  23165. "properties": {
  23166. "id": {
  23167. "type": "string",
  23168. "pattern": "^prt"
  23169. },
  23170. "type": {
  23171. "type": "string",
  23172. "enum": ["subtask"]
  23173. },
  23174. "prompt": {
  23175. "type": "string"
  23176. },
  23177. "description": {
  23178. "type": "string"
  23179. },
  23180. "agent": {
  23181. "type": "string"
  23182. },
  23183. "model": {
  23184. "type": "object",
  23185. "properties": {
  23186. "providerID": {
  23187. "type": "string"
  23188. },
  23189. "modelID": {
  23190. "type": "string"
  23191. }
  23192. },
  23193. "required": ["providerID", "modelID"],
  23194. "additionalProperties": false
  23195. },
  23196. "command": {
  23197. "type": "string"
  23198. }
  23199. },
  23200. "required": ["type", "prompt", "description", "agent"],
  23201. "additionalProperties": false
  23202. },
  23203. "SessionBusyError": {
  23204. "type": "object",
  23205. "properties": {
  23206. "_tag": {
  23207. "type": "string",
  23208. "enum": ["SessionBusyError"]
  23209. },
  23210. "sessionID": {
  23211. "type": "string"
  23212. },
  23213. "message": {
  23214. "type": "string"
  23215. }
  23216. },
  23217. "required": ["_tag", "sessionID", "message"],
  23218. "additionalProperties": false
  23219. },
  23220. "EventTuiPromptAppend": {
  23221. "type": "object",
  23222. "properties": {
  23223. "type": {
  23224. "type": "string",
  23225. "enum": ["tui.prompt.append"]
  23226. },
  23227. "properties": {
  23228. "type": "object",
  23229. "properties": {
  23230. "text": {
  23231. "type": "string"
  23232. }
  23233. },
  23234. "required": ["text"],
  23235. "additionalProperties": false
  23236. }
  23237. },
  23238. "required": ["type", "properties"],
  23239. "additionalProperties": false
  23240. },
  23241. "EventTuiCommandExecute": {
  23242. "type": "object",
  23243. "properties": {
  23244. "type": {
  23245. "type": "string",
  23246. "enum": ["tui.command.execute"]
  23247. },
  23248. "properties": {
  23249. "type": "object",
  23250. "properties": {
  23251. "command": {
  23252. "anyOf": [
  23253. {
  23254. "type": "string",
  23255. "enum": [
  23256. "session.list",
  23257. "session.new",
  23258. "session.share",
  23259. "session.interrupt",
  23260. "session.compact",
  23261. "session.page.up",
  23262. "session.page.down",
  23263. "session.line.up",
  23264. "session.line.down",
  23265. "session.half.page.up",
  23266. "session.half.page.down",
  23267. "session.first",
  23268. "session.last",
  23269. "prompt.clear",
  23270. "prompt.submit",
  23271. "agent.cycle"
  23272. ]
  23273. },
  23274. {
  23275. "type": "string"
  23276. }
  23277. ]
  23278. }
  23279. },
  23280. "required": ["command"],
  23281. "additionalProperties": false
  23282. }
  23283. },
  23284. "required": ["type", "properties"],
  23285. "additionalProperties": false
  23286. },
  23287. "EventTuiToastShow": {
  23288. "type": "object",
  23289. "properties": {
  23290. "type": {
  23291. "type": "string",
  23292. "enum": ["tui.toast.show"]
  23293. },
  23294. "properties": {
  23295. "type": "object",
  23296. "properties": {
  23297. "title": {
  23298. "type": "string"
  23299. },
  23300. "message": {
  23301. "type": "string"
  23302. },
  23303. "variant": {
  23304. "type": "string",
  23305. "enum": ["info", "success", "warning", "error"]
  23306. },
  23307. "duration": {
  23308. "type": "integer",
  23309. "exclusiveMinimum": 0
  23310. }
  23311. },
  23312. "required": ["message", "variant"],
  23313. "additionalProperties": false
  23314. }
  23315. },
  23316. "required": ["type", "properties"],
  23317. "additionalProperties": false
  23318. },
  23319. "EventTuiSessionSelect": {
  23320. "type": "object",
  23321. "properties": {
  23322. "type": {
  23323. "type": "string",
  23324. "enum": ["tui.session.select"]
  23325. },
  23326. "properties": {
  23327. "type": "object",
  23328. "properties": {
  23329. "sessionID": {
  23330. "type": "string",
  23331. "pattern": "^ses",
  23332. "description": "Session ID to navigate to"
  23333. }
  23334. },
  23335. "required": ["sessionID"],
  23336. "additionalProperties": false
  23337. }
  23338. },
  23339. "required": ["type", "properties"],
  23340. "additionalProperties": false
  23341. },
  23342. "Workspace": {
  23343. "type": "object",
  23344. "properties": {
  23345. "id": {
  23346. "type": "string",
  23347. "pattern": "^wrk"
  23348. },
  23349. "type": {
  23350. "type": "string"
  23351. },
  23352. "name": {
  23353. "type": "string"
  23354. },
  23355. "branch": {
  23356. "anyOf": [
  23357. {
  23358. "type": "string"
  23359. },
  23360. {
  23361. "type": "null"
  23362. }
  23363. ]
  23364. },
  23365. "directory": {
  23366. "anyOf": [
  23367. {
  23368. "type": "string"
  23369. },
  23370. {
  23371. "type": "null"
  23372. }
  23373. ]
  23374. },
  23375. "extra": {
  23376. "anyOf": [
  23377. {},
  23378. {
  23379. "type": "null"
  23380. }
  23381. ]
  23382. },
  23383. "projectID": {
  23384. "type": "string"
  23385. },
  23386. "timeUsed": {
  23387. "anyOf": [
  23388. {
  23389. "type": "number"
  23390. },
  23391. {
  23392. "type": "string",
  23393. "enum": ["NaN"]
  23394. },
  23395. {
  23396. "type": "string",
  23397. "enum": ["Infinity"]
  23398. },
  23399. {
  23400. "type": "string",
  23401. "enum": ["-Infinity"]
  23402. },
  23403. {
  23404. "type": "string",
  23405. "enum": ["Infinity", "-Infinity", "NaN"]
  23406. }
  23407. ]
  23408. }
  23409. },
  23410. "required": ["id", "type", "name", "projectID", "timeUsed"],
  23411. "additionalProperties": false
  23412. },
  23413. "WorkspaceCreateError": {
  23414. "type": "object",
  23415. "properties": {
  23416. "name": {
  23417. "type": "string",
  23418. "enum": ["WorkspaceCreateError"]
  23419. },
  23420. "data": {
  23421. "type": "object",
  23422. "properties": {
  23423. "message": {
  23424. "type": "string"
  23425. }
  23426. },
  23427. "required": ["message"],
  23428. "additionalProperties": false
  23429. }
  23430. },
  23431. "required": ["name", "data"],
  23432. "additionalProperties": false
  23433. },
  23434. "WorkspaceWarpError": {
  23435. "type": "object",
  23436. "properties": {
  23437. "name": {
  23438. "type": "string",
  23439. "enum": ["WorkspaceWarpError"]
  23440. },
  23441. "data": {
  23442. "type": "object",
  23443. "properties": {
  23444. "message": {
  23445. "type": "string"
  23446. }
  23447. },
  23448. "required": ["message"],
  23449. "additionalProperties": false
  23450. }
  23451. },
  23452. "required": ["name", "data"],
  23453. "additionalProperties": false
  23454. },
  23455. "UnauthorizedError": {
  23456. "type": "object",
  23457. "properties": {
  23458. "_tag": {
  23459. "type": "string",
  23460. "enum": ["UnauthorizedError"]
  23461. },
  23462. "message": {
  23463. "type": "string"
  23464. }
  23465. },
  23466. "required": ["_tag", "message"],
  23467. "additionalProperties": false
  23468. },
  23469. "SessionsResponse": {
  23470. "type": "object",
  23471. "properties": {
  23472. "data": {
  23473. "type": "array",
  23474. "items": {
  23475. "$ref": "#/components/schemas/SessionV2Info"
  23476. }
  23477. },
  23478. "cursor": {
  23479. "type": "object",
  23480. "properties": {
  23481. "previous": {
  23482. "type": "string"
  23483. },
  23484. "next": {
  23485. "type": "string"
  23486. }
  23487. },
  23488. "additionalProperties": false
  23489. }
  23490. },
  23491. "required": ["data", "cursor"],
  23492. "additionalProperties": false
  23493. },
  23494. "InvalidCursorError": {
  23495. "type": "object",
  23496. "properties": {
  23497. "_tag": {
  23498. "type": "string",
  23499. "enum": ["InvalidCursorError"]
  23500. },
  23501. "message": {
  23502. "type": "string"
  23503. }
  23504. },
  23505. "required": ["_tag", "message"],
  23506. "additionalProperties": false
  23507. },
  23508. "SessionActive": {
  23509. "type": "object",
  23510. "properties": {
  23511. "type": {
  23512. "type": "string",
  23513. "enum": ["running"]
  23514. }
  23515. },
  23516. "required": ["type"],
  23517. "additionalProperties": false
  23518. },
  23519. "SessionNotFoundError": {
  23520. "type": "object",
  23521. "properties": {
  23522. "_tag": {
  23523. "type": "string",
  23524. "enum": ["SessionNotFoundError"]
  23525. },
  23526. "sessionID": {
  23527. "type": "string"
  23528. },
  23529. "message": {
  23530. "type": "string"
  23531. }
  23532. },
  23533. "required": ["_tag", "sessionID", "message"],
  23534. "additionalProperties": false
  23535. },
  23536. "PromptInput": {
  23537. "type": "object",
  23538. "properties": {
  23539. "text": {
  23540. "type": "string"
  23541. },
  23542. "files": {
  23543. "type": "array",
  23544. "items": {
  23545. "$ref": "#/components/schemas/PromptInputFileAttachment"
  23546. }
  23547. },
  23548. "agents": {
  23549. "type": "array",
  23550. "items": {
  23551. "$ref": "#/components/schemas/PromptAgentAttachment"
  23552. }
  23553. }
  23554. },
  23555. "required": ["text"],
  23556. "additionalProperties": false
  23557. },
  23558. "ConflictError": {
  23559. "type": "object",
  23560. "properties": {
  23561. "_tag": {
  23562. "type": "string",
  23563. "enum": ["ConflictError"]
  23564. },
  23565. "message": {
  23566. "type": "string"
  23567. },
  23568. "resource": {
  23569. "type": "string"
  23570. }
  23571. },
  23572. "required": ["_tag", "message"],
  23573. "additionalProperties": false
  23574. },
  23575. "ServiceUnavailableError": {
  23576. "type": "object",
  23577. "properties": {
  23578. "_tag": {
  23579. "type": "string",
  23580. "enum": ["ServiceUnavailableError"]
  23581. },
  23582. "message": {
  23583. "type": "string"
  23584. },
  23585. "service": {
  23586. "type": "string"
  23587. }
  23588. },
  23589. "required": ["_tag", "message"],
  23590. "additionalProperties": false
  23591. },
  23592. "MessageNotFoundError": {
  23593. "type": "object",
  23594. "properties": {
  23595. "_tag": {
  23596. "type": "string",
  23597. "enum": ["MessageNotFoundError"]
  23598. },
  23599. "sessionID": {
  23600. "type": "string"
  23601. },
  23602. "messageID": {
  23603. "type": "string"
  23604. },
  23605. "message": {
  23606. "type": "string"
  23607. }
  23608. },
  23609. "required": ["_tag", "sessionID", "messageID", "message"],
  23610. "additionalProperties": false
  23611. },
  23612. "UnknownError1": {
  23613. "type": "object",
  23614. "properties": {
  23615. "_tag": {
  23616. "type": "string",
  23617. "enum": ["UnknownError"]
  23618. },
  23619. "message": {
  23620. "type": "string"
  23621. },
  23622. "ref": {
  23623. "type": "string"
  23624. }
  23625. },
  23626. "required": ["_tag", "message"],
  23627. "additionalProperties": false
  23628. },
  23629. "SessionMessagesResponse": {
  23630. "type": "object",
  23631. "properties": {
  23632. "data": {
  23633. "type": "array",
  23634. "items": {
  23635. "$ref": "#/components/schemas/SessionMessage"
  23636. }
  23637. },
  23638. "cursor": {
  23639. "type": "object",
  23640. "properties": {
  23641. "previous": {
  23642. "type": "string"
  23643. },
  23644. "next": {
  23645. "type": "string"
  23646. }
  23647. },
  23648. "additionalProperties": false
  23649. }
  23650. },
  23651. "required": ["data", "cursor"],
  23652. "additionalProperties": false
  23653. },
  23654. "ProviderNotFoundError": {
  23655. "type": "object",
  23656. "properties": {
  23657. "_tag": {
  23658. "type": "string",
  23659. "enum": ["ProviderNotFoundError"]
  23660. },
  23661. "providerID": {
  23662. "type": "string"
  23663. },
  23664. "message": {
  23665. "type": "string"
  23666. }
  23667. },
  23668. "required": ["_tag", "providerID", "message"],
  23669. "additionalProperties": false
  23670. },
  23671. "V2Event": {
  23672. "anyOf": [
  23673. {
  23674. "$ref": "#/components/schemas/V2EventModels-devRefreshed"
  23675. },
  23676. {
  23677. "$ref": "#/components/schemas/V2EventIntegrationUpdated"
  23678. },
  23679. {
  23680. "$ref": "#/components/schemas/V2EventIntegrationConnectionUpdated"
  23681. },
  23682. {
  23683. "$ref": "#/components/schemas/V2EventCatalogUpdated"
  23684. },
  23685. {
  23686. "$ref": "#/components/schemas/V2EventSessionCreated"
  23687. },
  23688. {
  23689. "$ref": "#/components/schemas/V2EventSessionUpdated"
  23690. },
  23691. {
  23692. "$ref": "#/components/schemas/V2EventSessionDeleted"
  23693. },
  23694. {
  23695. "$ref": "#/components/schemas/V2EventMessageUpdated"
  23696. },
  23697. {
  23698. "$ref": "#/components/schemas/V2EventMessageRemoved"
  23699. },
  23700. {
  23701. "$ref": "#/components/schemas/V2EventMessagePartUpdated"
  23702. },
  23703. {
  23704. "$ref": "#/components/schemas/V2EventMessagePartRemoved"
  23705. },
  23706. {
  23707. "$ref": "#/components/schemas/V2EventSessionNextAgentSwitched"
  23708. },
  23709. {
  23710. "$ref": "#/components/schemas/V2EventSessionNextModelSwitched"
  23711. },
  23712. {
  23713. "$ref": "#/components/schemas/V2EventSessionNextMoved"
  23714. },
  23715. {
  23716. "$ref": "#/components/schemas/V2EventSessionNextPrompted"
  23717. },
  23718. {
  23719. "$ref": "#/components/schemas/V2EventSessionNextPromptAdmitted"
  23720. },
  23721. {
  23722. "$ref": "#/components/schemas/V2EventSessionNextContextUpdated"
  23723. },
  23724. {
  23725. "$ref": "#/components/schemas/V2EventSessionNextSynthetic"
  23726. },
  23727. {
  23728. "$ref": "#/components/schemas/V2EventSessionNextShellStarted"
  23729. },
  23730. {
  23731. "$ref": "#/components/schemas/V2EventSessionNextShellEnded"
  23732. },
  23733. {
  23734. "$ref": "#/components/schemas/V2EventSessionNextStepStarted"
  23735. },
  23736. {
  23737. "$ref": "#/components/schemas/V2EventSessionNextStepEnded"
  23738. },
  23739. {
  23740. "$ref": "#/components/schemas/V2EventSessionNextStepFailed"
  23741. },
  23742. {
  23743. "$ref": "#/components/schemas/V2EventSessionNextTextStarted"
  23744. },
  23745. {
  23746. "$ref": "#/components/schemas/V2EventSessionNextTextDelta"
  23747. },
  23748. {
  23749. "$ref": "#/components/schemas/V2EventSessionNextTextEnded"
  23750. },
  23751. {
  23752. "$ref": "#/components/schemas/V2EventSessionNextReasoningStarted"
  23753. },
  23754. {
  23755. "$ref": "#/components/schemas/V2EventSessionNextReasoningDelta"
  23756. },
  23757. {
  23758. "$ref": "#/components/schemas/V2EventSessionNextReasoningEnded"
  23759. },
  23760. {
  23761. "$ref": "#/components/schemas/V2EventSessionNextToolInputStarted"
  23762. },
  23763. {
  23764. "$ref": "#/components/schemas/V2EventSessionNextToolInputDelta"
  23765. },
  23766. {
  23767. "$ref": "#/components/schemas/V2EventSessionNextToolInputEnded"
  23768. },
  23769. {
  23770. "$ref": "#/components/schemas/V2EventSessionNextToolCalled"
  23771. },
  23772. {
  23773. "$ref": "#/components/schemas/V2EventSessionNextToolProgress"
  23774. },
  23775. {
  23776. "$ref": "#/components/schemas/V2EventSessionNextToolSuccess"
  23777. },
  23778. {
  23779. "$ref": "#/components/schemas/V2EventSessionNextToolFailed"
  23780. },
  23781. {
  23782. "$ref": "#/components/schemas/V2EventSessionNextRetried"
  23783. },
  23784. {
  23785. "$ref": "#/components/schemas/V2EventSessionNextCompactionStarted"
  23786. },
  23787. {
  23788. "$ref": "#/components/schemas/V2EventSessionNextCompactionDelta"
  23789. },
  23790. {
  23791. "$ref": "#/components/schemas/V2EventSessionNextCompactionEnded"
  23792. },
  23793. {
  23794. "$ref": "#/components/schemas/V2EventSessionNextRevertStaged"
  23795. },
  23796. {
  23797. "$ref": "#/components/schemas/V2EventSessionNextRevertCleared"
  23798. },
  23799. {
  23800. "$ref": "#/components/schemas/V2EventSessionNextRevertCommitted"
  23801. },
  23802. {
  23803. "$ref": "#/components/schemas/V2EventMessagePartDelta"
  23804. },
  23805. {
  23806. "$ref": "#/components/schemas/V2EventSessionDiff"
  23807. },
  23808. {
  23809. "$ref": "#/components/schemas/V2EventSessionError"
  23810. },
  23811. {
  23812. "$ref": "#/components/schemas/V2EventInstallationUpdated"
  23813. },
  23814. {
  23815. "$ref": "#/components/schemas/V2EventInstallationUpdate-available"
  23816. },
  23817. {
  23818. "$ref": "#/components/schemas/V2EventFileEdited"
  23819. },
  23820. {
  23821. "$ref": "#/components/schemas/V2EventReferenceUpdated"
  23822. },
  23823. {
  23824. "$ref": "#/components/schemas/V2EventPermissionV2Asked"
  23825. },
  23826. {
  23827. "$ref": "#/components/schemas/V2EventPermissionV2Replied"
  23828. },
  23829. {
  23830. "$ref": "#/components/schemas/V2EventPluginAdded"
  23831. },
  23832. {
  23833. "$ref": "#/components/schemas/V2EventProjectDirectoriesUpdated"
  23834. },
  23835. {
  23836. "$ref": "#/components/schemas/V2EventFileWatcherUpdated"
  23837. },
  23838. {
  23839. "$ref": "#/components/schemas/V2EventPtyCreated"
  23840. },
  23841. {
  23842. "$ref": "#/components/schemas/V2EventPtyUpdated"
  23843. },
  23844. {
  23845. "$ref": "#/components/schemas/V2EventPtyExited"
  23846. },
  23847. {
  23848. "$ref": "#/components/schemas/V2EventPtyDeleted"
  23849. },
  23850. {
  23851. "$ref": "#/components/schemas/V2EventQuestionV2Asked"
  23852. },
  23853. {
  23854. "$ref": "#/components/schemas/V2EventQuestionV2Replied"
  23855. },
  23856. {
  23857. "$ref": "#/components/schemas/V2EventQuestionV2Rejected"
  23858. },
  23859. {
  23860. "$ref": "#/components/schemas/V2EventTodoUpdated"
  23861. },
  23862. {
  23863. "$ref": "#/components/schemas/V2EventLspUpdated"
  23864. },
  23865. {
  23866. "$ref": "#/components/schemas/V2EventPermissionAsked"
  23867. },
  23868. {
  23869. "$ref": "#/components/schemas/V2EventPermissionReplied"
  23870. },
  23871. {
  23872. "$ref": "#/components/schemas/V2EventTuiPromptAppend"
  23873. },
  23874. {
  23875. "$ref": "#/components/schemas/V2EventTuiCommandExecute"
  23876. },
  23877. {
  23878. "$ref": "#/components/schemas/V2EventTuiToastShow"
  23879. },
  23880. {
  23881. "$ref": "#/components/schemas/V2EventTuiSessionSelect"
  23882. },
  23883. {
  23884. "$ref": "#/components/schemas/V2EventMcpToolsChanged"
  23885. },
  23886. {
  23887. "$ref": "#/components/schemas/V2EventMcpBrowserOpenFailed"
  23888. },
  23889. {
  23890. "$ref": "#/components/schemas/V2EventCommandExecuted"
  23891. },
  23892. {
  23893. "$ref": "#/components/schemas/V2EventProjectUpdated"
  23894. },
  23895. {
  23896. "$ref": "#/components/schemas/V2EventSessionStatus"
  23897. },
  23898. {
  23899. "$ref": "#/components/schemas/V2EventSessionIdle"
  23900. },
  23901. {
  23902. "$ref": "#/components/schemas/V2EventQuestionAsked"
  23903. },
  23904. {
  23905. "$ref": "#/components/schemas/V2EventQuestionReplied"
  23906. },
  23907. {
  23908. "$ref": "#/components/schemas/V2EventQuestionRejected"
  23909. },
  23910. {
  23911. "$ref": "#/components/schemas/V2EventSessionCompacted"
  23912. },
  23913. {
  23914. "$ref": "#/components/schemas/V2EventVcsBranchUpdated"
  23915. },
  23916. {
  23917. "$ref": "#/components/schemas/V2EventWorkspaceReady"
  23918. },
  23919. {
  23920. "$ref": "#/components/schemas/V2EventWorkspaceFailed"
  23921. },
  23922. {
  23923. "$ref": "#/components/schemas/V2EventWorkspaceStatus"
  23924. },
  23925. {
  23926. "$ref": "#/components/schemas/V2EventWorktreeReady"
  23927. },
  23928. {
  23929. "$ref": "#/components/schemas/V2EventWorktreeFailed"
  23930. },
  23931. {
  23932. "$ref": "#/components/schemas/V2EventServerConnected"
  23933. },
  23934. {
  23935. "$ref": "#/components/schemas/V2EventGlobalDisposed"
  23936. }
  23937. ]
  23938. },
  23939. "ForbiddenError": {
  23940. "type": "object",
  23941. "properties": {
  23942. "_tag": {
  23943. "type": "string",
  23944. "enum": ["ForbiddenError"]
  23945. },
  23946. "message": {
  23947. "type": "string"
  23948. }
  23949. },
  23950. "required": ["_tag", "message"],
  23951. "additionalProperties": false
  23952. },
  23953. "ProjectCopyError": {
  23954. "type": "object",
  23955. "properties": {
  23956. "name": {
  23957. "type": "string",
  23958. "enum": ["ProjectCopyError"]
  23959. },
  23960. "data": {
  23961. "type": "object",
  23962. "properties": {
  23963. "message": {
  23964. "type": "string"
  23965. },
  23966. "forceRequired": {
  23967. "type": "boolean"
  23968. }
  23969. },
  23970. "required": ["message"],
  23971. "additionalProperties": false
  23972. }
  23973. },
  23974. "required": ["name", "data"],
  23975. "additionalProperties": false
  23976. },
  23977. "effect_HttpApiError_Forbidden": {
  23978. "type": "object",
  23979. "properties": {
  23980. "_tag": {
  23981. "type": "string",
  23982. "enum": ["Forbidden"]
  23983. }
  23984. },
  23985. "required": ["_tag"],
  23986. "additionalProperties": false
  23987. },
  23988. "Event.tui.prompt.append": {
  23989. "type": "object",
  23990. "properties": {
  23991. "id": {
  23992. "type": "string",
  23993. "pattern": "^evt_"
  23994. },
  23995. "type": {
  23996. "type": "string",
  23997. "enum": ["tui.prompt.append"]
  23998. },
  23999. "properties": {
  24000. "type": "object",
  24001. "properties": {
  24002. "text": {
  24003. "type": "string"
  24004. }
  24005. },
  24006. "required": ["text"],
  24007. "additionalProperties": false
  24008. }
  24009. },
  24010. "required": ["id", "type", "properties"],
  24011. "additionalProperties": false
  24012. },
  24013. "Event.tui.command.execute": {
  24014. "type": "object",
  24015. "properties": {
  24016. "id": {
  24017. "type": "string",
  24018. "pattern": "^evt_"
  24019. },
  24020. "type": {
  24021. "type": "string",
  24022. "enum": ["tui.command.execute"]
  24023. },
  24024. "properties": {
  24025. "type": "object",
  24026. "properties": {
  24027. "command": {
  24028. "anyOf": [
  24029. {
  24030. "type": "string",
  24031. "enum": [
  24032. "session.list",
  24033. "session.new",
  24034. "session.share",
  24035. "session.interrupt",
  24036. "session.compact",
  24037. "session.page.up",
  24038. "session.page.down",
  24039. "session.line.up",
  24040. "session.line.down",
  24041. "session.half.page.up",
  24042. "session.half.page.down",
  24043. "session.first",
  24044. "session.last",
  24045. "prompt.clear",
  24046. "prompt.submit",
  24047. "agent.cycle"
  24048. ]
  24049. },
  24050. {
  24051. "type": "string"
  24052. }
  24053. ]
  24054. }
  24055. },
  24056. "required": ["command"],
  24057. "additionalProperties": false
  24058. }
  24059. },
  24060. "required": ["id", "type", "properties"],
  24061. "additionalProperties": false
  24062. },
  24063. "Event.tui.toast.show": {
  24064. "type": "object",
  24065. "properties": {
  24066. "id": {
  24067. "type": "string",
  24068. "pattern": "^evt_"
  24069. },
  24070. "type": {
  24071. "type": "string",
  24072. "enum": ["tui.toast.show"]
  24073. },
  24074. "properties": {
  24075. "type": "object",
  24076. "properties": {
  24077. "title": {
  24078. "type": "string"
  24079. },
  24080. "message": {
  24081. "type": "string"
  24082. },
  24083. "variant": {
  24084. "type": "string",
  24085. "enum": ["info", "success", "warning", "error"]
  24086. },
  24087. "duration": {
  24088. "type": "integer",
  24089. "exclusiveMinimum": 0
  24090. }
  24091. },
  24092. "required": ["message", "variant"],
  24093. "additionalProperties": false
  24094. }
  24095. },
  24096. "required": ["id", "type", "properties"],
  24097. "additionalProperties": false
  24098. },
  24099. "Event.tui.session.select": {
  24100. "type": "object",
  24101. "properties": {
  24102. "id": {
  24103. "type": "string",
  24104. "pattern": "^evt_"
  24105. },
  24106. "type": {
  24107. "type": "string",
  24108. "enum": ["tui.session.select"]
  24109. },
  24110. "properties": {
  24111. "type": "object",
  24112. "properties": {
  24113. "sessionID": {
  24114. "type": "string",
  24115. "pattern": "^ses",
  24116. "description": "Session ID to navigate to"
  24117. }
  24118. },
  24119. "required": ["sessionID"],
  24120. "additionalProperties": false
  24121. }
  24122. },
  24123. "required": ["id", "type", "properties"],
  24124. "additionalProperties": false
  24125. },
  24126. "CredentialValue": {
  24127. "anyOf": [
  24128. {
  24129. "$ref": "#/components/schemas/CredentialOAuth"
  24130. },
  24131. {
  24132. "$ref": "#/components/schemas/CredentialKey"
  24133. }
  24134. ]
  24135. },
  24136. "IntegrationInputs": {
  24137. "type": "object",
  24138. "additionalProperties": {
  24139. "type": "string"
  24140. }
  24141. },
  24142. "IntegrationMethod": {
  24143. "anyOf": [
  24144. {
  24145. "$ref": "#/components/schemas/IntegrationOAuthMethod"
  24146. },
  24147. {
  24148. "$ref": "#/components/schemas/IntegrationKeyMethod"
  24149. },
  24150. {
  24151. "$ref": "#/components/schemas/IntegrationEnvMethod"
  24152. }
  24153. ]
  24154. },
  24155. "IntegrationRef": {
  24156. "type": "object",
  24157. "properties": {
  24158. "id": {
  24159. "type": "string"
  24160. },
  24161. "name": {
  24162. "type": "string"
  24163. }
  24164. },
  24165. "required": ["id", "name"],
  24166. "additionalProperties": false
  24167. },
  24168. "SkillV2Source": {
  24169. "anyOf": [
  24170. {
  24171. "$ref": "#/components/schemas/SkillV2DirectorySource"
  24172. },
  24173. {
  24174. "$ref": "#/components/schemas/SkillV2UrlSource"
  24175. },
  24176. {
  24177. "$ref": "#/components/schemas/SkillV2EmbeddedSource"
  24178. }
  24179. ]
  24180. },
  24181. "MoveSessionDestination": {
  24182. "type": "object",
  24183. "properties": {
  24184. "directory": {
  24185. "type": "string"
  24186. }
  24187. },
  24188. "required": ["directory"],
  24189. "additionalProperties": false
  24190. },
  24191. "ModelRef": {
  24192. "type": "object",
  24193. "properties": {
  24194. "id": {
  24195. "type": "string"
  24196. },
  24197. "providerID": {
  24198. "type": "string"
  24199. },
  24200. "variant": {
  24201. "type": "string"
  24202. }
  24203. },
  24204. "required": ["id", "providerID"],
  24205. "additionalProperties": false
  24206. },
  24207. "LocationRef": {
  24208. "type": "object",
  24209. "properties": {
  24210. "directory": {
  24211. "type": "string"
  24212. },
  24213. "workspaceID": {
  24214. "type": "string",
  24215. "pattern": "^wrk"
  24216. }
  24217. },
  24218. "required": ["directory"],
  24219. "additionalProperties": false
  24220. },
  24221. "PromptSource": {
  24222. "type": "object",
  24223. "properties": {
  24224. "start": {
  24225. "type": "number"
  24226. },
  24227. "end": {
  24228. "type": "number"
  24229. },
  24230. "text": {
  24231. "type": "string"
  24232. }
  24233. },
  24234. "required": ["start", "end", "text"],
  24235. "additionalProperties": false
  24236. },
  24237. "PromptFileAttachment": {
  24238. "type": "object",
  24239. "properties": {
  24240. "uri": {
  24241. "type": "string"
  24242. },
  24243. "mime": {
  24244. "type": "string"
  24245. },
  24246. "name": {
  24247. "type": "string"
  24248. },
  24249. "description": {
  24250. "type": "string"
  24251. },
  24252. "source": {
  24253. "$ref": "#/components/schemas/PromptSource"
  24254. }
  24255. },
  24256. "required": ["uri", "mime"],
  24257. "additionalProperties": false
  24258. },
  24259. "PromptAgentAttachment": {
  24260. "type": "object",
  24261. "properties": {
  24262. "name": {
  24263. "type": "string"
  24264. },
  24265. "source": {
  24266. "$ref": "#/components/schemas/PromptSource"
  24267. }
  24268. },
  24269. "required": ["name"],
  24270. "additionalProperties": false
  24271. },
  24272. "SessionErrorUnknown": {
  24273. "type": "object",
  24274. "properties": {
  24275. "type": {
  24276. "type": "string",
  24277. "enum": ["unknown"]
  24278. },
  24279. "message": {
  24280. "type": "string"
  24281. }
  24282. },
  24283. "required": ["type", "message"],
  24284. "additionalProperties": false
  24285. },
  24286. "LLMProviderMetadata": {
  24287. "type": "object",
  24288. "additionalProperties": {
  24289. "type": "object"
  24290. }
  24291. },
  24292. "ToolTextContent": {
  24293. "type": "object",
  24294. "properties": {
  24295. "type": {
  24296. "type": "string",
  24297. "enum": ["text"]
  24298. },
  24299. "text": {
  24300. "type": "string"
  24301. }
  24302. },
  24303. "required": ["type", "text"],
  24304. "additionalProperties": false
  24305. },
  24306. "ToolFileContent": {
  24307. "type": "object",
  24308. "properties": {
  24309. "type": {
  24310. "type": "string",
  24311. "enum": ["file"]
  24312. },
  24313. "uri": {
  24314. "type": "string"
  24315. },
  24316. "mime": {
  24317. "type": "string"
  24318. },
  24319. "name": {
  24320. "type": "string"
  24321. }
  24322. },
  24323. "required": ["type", "uri", "mime"],
  24324. "additionalProperties": false
  24325. },
  24326. "LLMToolContent": {
  24327. "anyOf": [
  24328. {
  24329. "$ref": "#/components/schemas/ToolTextContent"
  24330. },
  24331. {
  24332. "$ref": "#/components/schemas/ToolFileContent"
  24333. }
  24334. ]
  24335. },
  24336. "SessionNextRetry_error": {
  24337. "type": "object",
  24338. "properties": {
  24339. "message": {
  24340. "type": "string"
  24341. },
  24342. "statusCode": {
  24343. "type": "number"
  24344. },
  24345. "isRetryable": {
  24346. "type": "boolean"
  24347. },
  24348. "responseHeaders": {
  24349. "type": "object",
  24350. "additionalProperties": {
  24351. "type": "string"
  24352. }
  24353. },
  24354. "responseBody": {
  24355. "type": "string"
  24356. },
  24357. "metadata": {
  24358. "type": "object",
  24359. "additionalProperties": {
  24360. "type": "string"
  24361. }
  24362. }
  24363. },
  24364. "required": ["message", "isRetryable"],
  24365. "additionalProperties": false
  24366. },
  24367. "FileDiff": {
  24368. "type": "object",
  24369. "properties": {
  24370. "path": {
  24371. "type": "string"
  24372. },
  24373. "status": {
  24374. "type": "string",
  24375. "enum": ["added", "modified", "deleted"]
  24376. },
  24377. "additions": {
  24378. "type": "integer",
  24379. "minimum": 0
  24380. },
  24381. "deletions": {
  24382. "type": "integer",
  24383. "minimum": 0
  24384. },
  24385. "patch": {
  24386. "type": "string"
  24387. }
  24388. },
  24389. "required": ["path", "status", "additions", "deletions", "patch"],
  24390. "additionalProperties": false
  24391. },
  24392. "RevertState": {
  24393. "type": "object",
  24394. "properties": {
  24395. "messageID": {
  24396. "type": "string",
  24397. "pattern": "^msg_"
  24398. },
  24399. "partID": {
  24400. "type": "string"
  24401. },
  24402. "snapshot": {
  24403. "type": "string"
  24404. },
  24405. "diff": {
  24406. "type": "string"
  24407. },
  24408. "files": {
  24409. "type": "array",
  24410. "items": {
  24411. "$ref": "#/components/schemas/FileDiff"
  24412. }
  24413. }
  24414. },
  24415. "required": ["messageID"],
  24416. "additionalProperties": false
  24417. },
  24418. "PermissionV2Source": {
  24419. "type": "object",
  24420. "properties": {
  24421. "type": {
  24422. "type": "string",
  24423. "enum": ["tool"]
  24424. },
  24425. "messageID": {
  24426. "type": "string"
  24427. },
  24428. "callID": {
  24429. "type": "string"
  24430. }
  24431. },
  24432. "required": ["type", "messageID", "callID"],
  24433. "additionalProperties": false
  24434. },
  24435. "PermissionV2Reply": {
  24436. "type": "string",
  24437. "enum": ["once", "always", "reject"]
  24438. },
  24439. "QuestionV2Option": {
  24440. "type": "object",
  24441. "properties": {
  24442. "label": {
  24443. "type": "string",
  24444. "description": "Display text (1-5 words, concise)"
  24445. },
  24446. "description": {
  24447. "type": "string",
  24448. "description": "Explanation of choice"
  24449. }
  24450. },
  24451. "required": ["label", "description"],
  24452. "additionalProperties": false
  24453. },
  24454. "QuestionV2Info": {
  24455. "type": "object",
  24456. "properties": {
  24457. "question": {
  24458. "type": "string",
  24459. "description": "Complete question"
  24460. },
  24461. "header": {
  24462. "type": "string",
  24463. "description": "Very short label (max 30 chars)"
  24464. },
  24465. "options": {
  24466. "type": "array",
  24467. "items": {
  24468. "$ref": "#/components/schemas/QuestionV2Option"
  24469. },
  24470. "description": "Available choices"
  24471. },
  24472. "multiple": {
  24473. "type": "boolean"
  24474. },
  24475. "custom": {
  24476. "type": "boolean"
  24477. }
  24478. },
  24479. "required": ["question", "header", "options"],
  24480. "additionalProperties": false
  24481. },
  24482. "QuestionV2Tool": {
  24483. "type": "object",
  24484. "properties": {
  24485. "messageID": {
  24486. "type": "string"
  24487. },
  24488. "callID": {
  24489. "type": "string"
  24490. }
  24491. },
  24492. "required": ["messageID", "callID"],
  24493. "additionalProperties": false
  24494. },
  24495. "QuestionV2Answer": {
  24496. "type": "array",
  24497. "items": {
  24498. "type": "string"
  24499. }
  24500. },
  24501. "ProjectVcs": {
  24502. "type": "string",
  24503. "enum": ["git"]
  24504. },
  24505. "ProjectIcon": {
  24506. "type": "object",
  24507. "properties": {
  24508. "url": {
  24509. "type": "string"
  24510. },
  24511. "override": {
  24512. "type": "string"
  24513. },
  24514. "color": {
  24515. "type": "string"
  24516. }
  24517. },
  24518. "additionalProperties": false
  24519. },
  24520. "ProjectCommands": {
  24521. "type": "object",
  24522. "properties": {
  24523. "start": {
  24524. "type": "string",
  24525. "description": "Startup script to run when creating a new workspace (worktree)"
  24526. }
  24527. },
  24528. "additionalProperties": false
  24529. },
  24530. "ProjectTime": {
  24531. "type": "object",
  24532. "properties": {
  24533. "created": {
  24534. "type": "integer",
  24535. "minimum": 0
  24536. },
  24537. "updated": {
  24538. "type": "integer",
  24539. "minimum": 0
  24540. },
  24541. "initialized": {
  24542. "type": "integer",
  24543. "minimum": 0
  24544. }
  24545. },
  24546. "required": ["created", "updated"],
  24547. "additionalProperties": false
  24548. },
  24549. "EventServerInstanceDisposed": {
  24550. "type": "object",
  24551. "properties": {
  24552. "id": {
  24553. "type": "string"
  24554. },
  24555. "type": {
  24556. "type": "string",
  24557. "enum": ["server.instance.disposed"]
  24558. },
  24559. "properties": {
  24560. "type": "object",
  24561. "properties": {
  24562. "directory": {
  24563. "type": "string"
  24564. }
  24565. },
  24566. "required": ["directory"],
  24567. "additionalProperties": false
  24568. }
  24569. },
  24570. "required": ["id", "type", "properties"],
  24571. "additionalProperties": false
  24572. },
  24573. "SyncEventSessionCreated": {
  24574. "type": "object",
  24575. "properties": {
  24576. "type": {
  24577. "type": "string",
  24578. "enum": ["sync"]
  24579. },
  24580. "id": {
  24581. "type": "string",
  24582. "pattern": "^evt_"
  24583. },
  24584. "syncEvent": {
  24585. "type": "object",
  24586. "properties": {
  24587. "type": {
  24588. "type": "string",
  24589. "enum": ["session.created.1"]
  24590. },
  24591. "id": {
  24592. "type": "string",
  24593. "pattern": "^evt_"
  24594. },
  24595. "seq": {
  24596. "type": "number"
  24597. },
  24598. "aggregateID": {
  24599. "type": "string"
  24600. },
  24601. "data": {
  24602. "type": "object",
  24603. "properties": {
  24604. "sessionID": {
  24605. "type": "string",
  24606. "pattern": "^ses"
  24607. },
  24608. "info": {
  24609. "$ref": "#/components/schemas/Session"
  24610. }
  24611. },
  24612. "required": ["sessionID", "info"],
  24613. "additionalProperties": false
  24614. }
  24615. },
  24616. "required": ["type", "id", "seq", "aggregateID", "data"],
  24617. "additionalProperties": false
  24618. }
  24619. },
  24620. "required": ["type", "id", "syncEvent"],
  24621. "additionalProperties": false
  24622. },
  24623. "SyncEventSessionUpdated": {
  24624. "type": "object",
  24625. "properties": {
  24626. "type": {
  24627. "type": "string",
  24628. "enum": ["sync"]
  24629. },
  24630. "id": {
  24631. "type": "string",
  24632. "pattern": "^evt_"
  24633. },
  24634. "syncEvent": {
  24635. "type": "object",
  24636. "properties": {
  24637. "type": {
  24638. "type": "string",
  24639. "enum": ["session.updated.1"]
  24640. },
  24641. "id": {
  24642. "type": "string",
  24643. "pattern": "^evt_"
  24644. },
  24645. "seq": {
  24646. "type": "number"
  24647. },
  24648. "aggregateID": {
  24649. "type": "string"
  24650. },
  24651. "data": {
  24652. "type": "object",
  24653. "properties": {
  24654. "sessionID": {
  24655. "type": "string",
  24656. "pattern": "^ses"
  24657. },
  24658. "info": {
  24659. "$ref": "#/components/schemas/Session"
  24660. }
  24661. },
  24662. "required": ["sessionID", "info"],
  24663. "additionalProperties": false
  24664. }
  24665. },
  24666. "required": ["type", "id", "seq", "aggregateID", "data"],
  24667. "additionalProperties": false
  24668. }
  24669. },
  24670. "required": ["type", "id", "syncEvent"],
  24671. "additionalProperties": false
  24672. },
  24673. "SyncEventSessionDeleted": {
  24674. "type": "object",
  24675. "properties": {
  24676. "type": {
  24677. "type": "string",
  24678. "enum": ["sync"]
  24679. },
  24680. "id": {
  24681. "type": "string",
  24682. "pattern": "^evt_"
  24683. },
  24684. "syncEvent": {
  24685. "type": "object",
  24686. "properties": {
  24687. "type": {
  24688. "type": "string",
  24689. "enum": ["session.deleted.1"]
  24690. },
  24691. "id": {
  24692. "type": "string",
  24693. "pattern": "^evt_"
  24694. },
  24695. "seq": {
  24696. "type": "number"
  24697. },
  24698. "aggregateID": {
  24699. "type": "string"
  24700. },
  24701. "data": {
  24702. "type": "object",
  24703. "properties": {
  24704. "sessionID": {
  24705. "type": "string",
  24706. "pattern": "^ses"
  24707. },
  24708. "info": {
  24709. "$ref": "#/components/schemas/Session"
  24710. }
  24711. },
  24712. "required": ["sessionID", "info"],
  24713. "additionalProperties": false
  24714. }
  24715. },
  24716. "required": ["type", "id", "seq", "aggregateID", "data"],
  24717. "additionalProperties": false
  24718. }
  24719. },
  24720. "required": ["type", "id", "syncEvent"],
  24721. "additionalProperties": false
  24722. },
  24723. "SyncEventMessageUpdated": {
  24724. "type": "object",
  24725. "properties": {
  24726. "type": {
  24727. "type": "string",
  24728. "enum": ["sync"]
  24729. },
  24730. "id": {
  24731. "type": "string",
  24732. "pattern": "^evt_"
  24733. },
  24734. "syncEvent": {
  24735. "type": "object",
  24736. "properties": {
  24737. "type": {
  24738. "type": "string",
  24739. "enum": ["message.updated.1"]
  24740. },
  24741. "id": {
  24742. "type": "string",
  24743. "pattern": "^evt_"
  24744. },
  24745. "seq": {
  24746. "type": "number"
  24747. },
  24748. "aggregateID": {
  24749. "type": "string"
  24750. },
  24751. "data": {
  24752. "type": "object",
  24753. "properties": {
  24754. "sessionID": {
  24755. "type": "string",
  24756. "pattern": "^ses"
  24757. },
  24758. "info": {
  24759. "$ref": "#/components/schemas/Message"
  24760. }
  24761. },
  24762. "required": ["sessionID", "info"],
  24763. "additionalProperties": false
  24764. }
  24765. },
  24766. "required": ["type", "id", "seq", "aggregateID", "data"],
  24767. "additionalProperties": false
  24768. }
  24769. },
  24770. "required": ["type", "id", "syncEvent"],
  24771. "additionalProperties": false
  24772. },
  24773. "SyncEventMessageRemoved": {
  24774. "type": "object",
  24775. "properties": {
  24776. "type": {
  24777. "type": "string",
  24778. "enum": ["sync"]
  24779. },
  24780. "id": {
  24781. "type": "string",
  24782. "pattern": "^evt_"
  24783. },
  24784. "syncEvent": {
  24785. "type": "object",
  24786. "properties": {
  24787. "type": {
  24788. "type": "string",
  24789. "enum": ["message.removed.1"]
  24790. },
  24791. "id": {
  24792. "type": "string",
  24793. "pattern": "^evt_"
  24794. },
  24795. "seq": {
  24796. "type": "number"
  24797. },
  24798. "aggregateID": {
  24799. "type": "string"
  24800. },
  24801. "data": {
  24802. "type": "object",
  24803. "properties": {
  24804. "sessionID": {
  24805. "type": "string",
  24806. "pattern": "^ses"
  24807. },
  24808. "messageID": {
  24809. "type": "string",
  24810. "pattern": "^msg"
  24811. }
  24812. },
  24813. "required": ["sessionID", "messageID"],
  24814. "additionalProperties": false
  24815. }
  24816. },
  24817. "required": ["type", "id", "seq", "aggregateID", "data"],
  24818. "additionalProperties": false
  24819. }
  24820. },
  24821. "required": ["type", "id", "syncEvent"],
  24822. "additionalProperties": false
  24823. },
  24824. "SyncEventMessagePartUpdated": {
  24825. "type": "object",
  24826. "properties": {
  24827. "type": {
  24828. "type": "string",
  24829. "enum": ["sync"]
  24830. },
  24831. "id": {
  24832. "type": "string",
  24833. "pattern": "^evt_"
  24834. },
  24835. "syncEvent": {
  24836. "type": "object",
  24837. "properties": {
  24838. "type": {
  24839. "type": "string",
  24840. "enum": ["message.part.updated.1"]
  24841. },
  24842. "id": {
  24843. "type": "string",
  24844. "pattern": "^evt_"
  24845. },
  24846. "seq": {
  24847. "type": "number"
  24848. },
  24849. "aggregateID": {
  24850. "type": "string"
  24851. },
  24852. "data": {
  24853. "type": "object",
  24854. "properties": {
  24855. "sessionID": {
  24856. "type": "string",
  24857. "pattern": "^ses"
  24858. },
  24859. "part": {
  24860. "$ref": "#/components/schemas/Part"
  24861. },
  24862. "time": {
  24863. "type": "number"
  24864. }
  24865. },
  24866. "required": ["sessionID", "part", "time"],
  24867. "additionalProperties": false
  24868. }
  24869. },
  24870. "required": ["type", "id", "seq", "aggregateID", "data"],
  24871. "additionalProperties": false
  24872. }
  24873. },
  24874. "required": ["type", "id", "syncEvent"],
  24875. "additionalProperties": false
  24876. },
  24877. "SyncEventMessagePartRemoved": {
  24878. "type": "object",
  24879. "properties": {
  24880. "type": {
  24881. "type": "string",
  24882. "enum": ["sync"]
  24883. },
  24884. "id": {
  24885. "type": "string",
  24886. "pattern": "^evt_"
  24887. },
  24888. "syncEvent": {
  24889. "type": "object",
  24890. "properties": {
  24891. "type": {
  24892. "type": "string",
  24893. "enum": ["message.part.removed.1"]
  24894. },
  24895. "id": {
  24896. "type": "string",
  24897. "pattern": "^evt_"
  24898. },
  24899. "seq": {
  24900. "type": "number"
  24901. },
  24902. "aggregateID": {
  24903. "type": "string"
  24904. },
  24905. "data": {
  24906. "type": "object",
  24907. "properties": {
  24908. "sessionID": {
  24909. "type": "string",
  24910. "pattern": "^ses"
  24911. },
  24912. "messageID": {
  24913. "type": "string",
  24914. "pattern": "^msg"
  24915. },
  24916. "partID": {
  24917. "type": "string",
  24918. "pattern": "^prt"
  24919. }
  24920. },
  24921. "required": ["sessionID", "messageID", "partID"],
  24922. "additionalProperties": false
  24923. }
  24924. },
  24925. "required": ["type", "id", "seq", "aggregateID", "data"],
  24926. "additionalProperties": false
  24927. }
  24928. },
  24929. "required": ["type", "id", "syncEvent"],
  24930. "additionalProperties": false
  24931. },
  24932. "SyncEventSessionNextAgentSwitched": {
  24933. "type": "object",
  24934. "properties": {
  24935. "type": {
  24936. "type": "string",
  24937. "enum": ["sync"]
  24938. },
  24939. "id": {
  24940. "type": "string",
  24941. "pattern": "^evt_"
  24942. },
  24943. "syncEvent": {
  24944. "type": "object",
  24945. "properties": {
  24946. "type": {
  24947. "type": "string",
  24948. "enum": ["session.next.agent.switched.1"]
  24949. },
  24950. "id": {
  24951. "type": "string",
  24952. "pattern": "^evt_"
  24953. },
  24954. "seq": {
  24955. "type": "number"
  24956. },
  24957. "aggregateID": {
  24958. "type": "string"
  24959. },
  24960. "data": {
  24961. "type": "object",
  24962. "properties": {
  24963. "timestamp": {
  24964. "type": "number"
  24965. },
  24966. "sessionID": {
  24967. "type": "string",
  24968. "pattern": "^ses"
  24969. },
  24970. "messageID": {
  24971. "type": "string",
  24972. "pattern": "^msg_"
  24973. },
  24974. "agent": {
  24975. "type": "string"
  24976. }
  24977. },
  24978. "required": ["timestamp", "sessionID", "messageID", "agent"],
  24979. "additionalProperties": false
  24980. }
  24981. },
  24982. "required": ["type", "id", "seq", "aggregateID", "data"],
  24983. "additionalProperties": false
  24984. }
  24985. },
  24986. "required": ["type", "id", "syncEvent"],
  24987. "additionalProperties": false
  24988. },
  24989. "SyncEventSessionNextModelSwitched": {
  24990. "type": "object",
  24991. "properties": {
  24992. "type": {
  24993. "type": "string",
  24994. "enum": ["sync"]
  24995. },
  24996. "id": {
  24997. "type": "string",
  24998. "pattern": "^evt_"
  24999. },
  25000. "syncEvent": {
  25001. "type": "object",
  25002. "properties": {
  25003. "type": {
  25004. "type": "string",
  25005. "enum": ["session.next.model.switched.1"]
  25006. },
  25007. "id": {
  25008. "type": "string",
  25009. "pattern": "^evt_"
  25010. },
  25011. "seq": {
  25012. "type": "number"
  25013. },
  25014. "aggregateID": {
  25015. "type": "string"
  25016. },
  25017. "data": {
  25018. "type": "object",
  25019. "properties": {
  25020. "timestamp": {
  25021. "type": "number"
  25022. },
  25023. "sessionID": {
  25024. "type": "string",
  25025. "pattern": "^ses"
  25026. },
  25027. "messageID": {
  25028. "type": "string",
  25029. "pattern": "^msg_"
  25030. },
  25031. "model": {
  25032. "$ref": "#/components/schemas/ModelRef"
  25033. }
  25034. },
  25035. "required": ["timestamp", "sessionID", "messageID", "model"],
  25036. "additionalProperties": false
  25037. }
  25038. },
  25039. "required": ["type", "id", "seq", "aggregateID", "data"],
  25040. "additionalProperties": false
  25041. }
  25042. },
  25043. "required": ["type", "id", "syncEvent"],
  25044. "additionalProperties": false
  25045. },
  25046. "SyncEventSessionNextMoved": {
  25047. "type": "object",
  25048. "properties": {
  25049. "type": {
  25050. "type": "string",
  25051. "enum": ["sync"]
  25052. },
  25053. "id": {
  25054. "type": "string",
  25055. "pattern": "^evt_"
  25056. },
  25057. "syncEvent": {
  25058. "type": "object",
  25059. "properties": {
  25060. "type": {
  25061. "type": "string",
  25062. "enum": ["session.next.moved.1"]
  25063. },
  25064. "id": {
  25065. "type": "string",
  25066. "pattern": "^evt_"
  25067. },
  25068. "seq": {
  25069. "type": "number"
  25070. },
  25071. "aggregateID": {
  25072. "type": "string"
  25073. },
  25074. "data": {
  25075. "type": "object",
  25076. "properties": {
  25077. "timestamp": {
  25078. "type": "number"
  25079. },
  25080. "sessionID": {
  25081. "type": "string",
  25082. "pattern": "^ses"
  25083. },
  25084. "location": {
  25085. "$ref": "#/components/schemas/LocationRef"
  25086. },
  25087. "subdirectory": {
  25088. "type": "string"
  25089. }
  25090. },
  25091. "required": ["timestamp", "sessionID", "location"],
  25092. "additionalProperties": false
  25093. }
  25094. },
  25095. "required": ["type", "id", "seq", "aggregateID", "data"],
  25096. "additionalProperties": false
  25097. }
  25098. },
  25099. "required": ["type", "id", "syncEvent"],
  25100. "additionalProperties": false
  25101. },
  25102. "SyncEventSessionNextPrompted": {
  25103. "type": "object",
  25104. "properties": {
  25105. "type": {
  25106. "type": "string",
  25107. "enum": ["sync"]
  25108. },
  25109. "id": {
  25110. "type": "string",
  25111. "pattern": "^evt_"
  25112. },
  25113. "syncEvent": {
  25114. "type": "object",
  25115. "properties": {
  25116. "type": {
  25117. "type": "string",
  25118. "enum": ["session.next.prompted.1"]
  25119. },
  25120. "id": {
  25121. "type": "string",
  25122. "pattern": "^evt_"
  25123. },
  25124. "seq": {
  25125. "type": "number"
  25126. },
  25127. "aggregateID": {
  25128. "type": "string"
  25129. },
  25130. "data": {
  25131. "type": "object",
  25132. "properties": {
  25133. "timestamp": {
  25134. "type": "number"
  25135. },
  25136. "sessionID": {
  25137. "type": "string",
  25138. "pattern": "^ses"
  25139. },
  25140. "messageID": {
  25141. "type": "string",
  25142. "pattern": "^msg_"
  25143. },
  25144. "prompt": {
  25145. "$ref": "#/components/schemas/Prompt"
  25146. },
  25147. "delivery": {
  25148. "type": "string",
  25149. "enum": ["steer", "queue"]
  25150. }
  25151. },
  25152. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  25153. "additionalProperties": false
  25154. }
  25155. },
  25156. "required": ["type", "id", "seq", "aggregateID", "data"],
  25157. "additionalProperties": false
  25158. }
  25159. },
  25160. "required": ["type", "id", "syncEvent"],
  25161. "additionalProperties": false
  25162. },
  25163. "SyncEventSessionNextPromptAdmitted": {
  25164. "type": "object",
  25165. "properties": {
  25166. "type": {
  25167. "type": "string",
  25168. "enum": ["sync"]
  25169. },
  25170. "id": {
  25171. "type": "string",
  25172. "pattern": "^evt_"
  25173. },
  25174. "syncEvent": {
  25175. "type": "object",
  25176. "properties": {
  25177. "type": {
  25178. "type": "string",
  25179. "enum": ["session.next.prompt.admitted.1"]
  25180. },
  25181. "id": {
  25182. "type": "string",
  25183. "pattern": "^evt_"
  25184. },
  25185. "seq": {
  25186. "type": "number"
  25187. },
  25188. "aggregateID": {
  25189. "type": "string"
  25190. },
  25191. "data": {
  25192. "type": "object",
  25193. "properties": {
  25194. "timestamp": {
  25195. "type": "number"
  25196. },
  25197. "sessionID": {
  25198. "type": "string",
  25199. "pattern": "^ses"
  25200. },
  25201. "messageID": {
  25202. "type": "string",
  25203. "pattern": "^msg_"
  25204. },
  25205. "prompt": {
  25206. "$ref": "#/components/schemas/Prompt"
  25207. },
  25208. "delivery": {
  25209. "type": "string",
  25210. "enum": ["steer", "queue"]
  25211. }
  25212. },
  25213. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  25214. "additionalProperties": false
  25215. }
  25216. },
  25217. "required": ["type", "id", "seq", "aggregateID", "data"],
  25218. "additionalProperties": false
  25219. }
  25220. },
  25221. "required": ["type", "id", "syncEvent"],
  25222. "additionalProperties": false
  25223. },
  25224. "SyncEventSessionNextContextUpdated": {
  25225. "type": "object",
  25226. "properties": {
  25227. "type": {
  25228. "type": "string",
  25229. "enum": ["sync"]
  25230. },
  25231. "id": {
  25232. "type": "string",
  25233. "pattern": "^evt_"
  25234. },
  25235. "syncEvent": {
  25236. "type": "object",
  25237. "properties": {
  25238. "type": {
  25239. "type": "string",
  25240. "enum": ["session.next.context.updated.1"]
  25241. },
  25242. "id": {
  25243. "type": "string",
  25244. "pattern": "^evt_"
  25245. },
  25246. "seq": {
  25247. "type": "number"
  25248. },
  25249. "aggregateID": {
  25250. "type": "string"
  25251. },
  25252. "data": {
  25253. "type": "object",
  25254. "properties": {
  25255. "timestamp": {
  25256. "type": "number"
  25257. },
  25258. "sessionID": {
  25259. "type": "string",
  25260. "pattern": "^ses"
  25261. },
  25262. "messageID": {
  25263. "type": "string",
  25264. "pattern": "^msg_"
  25265. },
  25266. "text": {
  25267. "type": "string"
  25268. }
  25269. },
  25270. "required": ["timestamp", "sessionID", "messageID", "text"],
  25271. "additionalProperties": false
  25272. }
  25273. },
  25274. "required": ["type", "id", "seq", "aggregateID", "data"],
  25275. "additionalProperties": false
  25276. }
  25277. },
  25278. "required": ["type", "id", "syncEvent"],
  25279. "additionalProperties": false
  25280. },
  25281. "SyncEventSessionNextSynthetic": {
  25282. "type": "object",
  25283. "properties": {
  25284. "type": {
  25285. "type": "string",
  25286. "enum": ["sync"]
  25287. },
  25288. "id": {
  25289. "type": "string",
  25290. "pattern": "^evt_"
  25291. },
  25292. "syncEvent": {
  25293. "type": "object",
  25294. "properties": {
  25295. "type": {
  25296. "type": "string",
  25297. "enum": ["session.next.synthetic.1"]
  25298. },
  25299. "id": {
  25300. "type": "string",
  25301. "pattern": "^evt_"
  25302. },
  25303. "seq": {
  25304. "type": "number"
  25305. },
  25306. "aggregateID": {
  25307. "type": "string"
  25308. },
  25309. "data": {
  25310. "type": "object",
  25311. "properties": {
  25312. "timestamp": {
  25313. "type": "number"
  25314. },
  25315. "sessionID": {
  25316. "type": "string",
  25317. "pattern": "^ses"
  25318. },
  25319. "messageID": {
  25320. "type": "string",
  25321. "pattern": "^msg_"
  25322. },
  25323. "text": {
  25324. "type": "string"
  25325. }
  25326. },
  25327. "required": ["timestamp", "sessionID", "messageID", "text"],
  25328. "additionalProperties": false
  25329. }
  25330. },
  25331. "required": ["type", "id", "seq", "aggregateID", "data"],
  25332. "additionalProperties": false
  25333. }
  25334. },
  25335. "required": ["type", "id", "syncEvent"],
  25336. "additionalProperties": false
  25337. },
  25338. "SyncEventSessionNextShellStarted": {
  25339. "type": "object",
  25340. "properties": {
  25341. "type": {
  25342. "type": "string",
  25343. "enum": ["sync"]
  25344. },
  25345. "id": {
  25346. "type": "string",
  25347. "pattern": "^evt_"
  25348. },
  25349. "syncEvent": {
  25350. "type": "object",
  25351. "properties": {
  25352. "type": {
  25353. "type": "string",
  25354. "enum": ["session.next.shell.started.1"]
  25355. },
  25356. "id": {
  25357. "type": "string",
  25358. "pattern": "^evt_"
  25359. },
  25360. "seq": {
  25361. "type": "number"
  25362. },
  25363. "aggregateID": {
  25364. "type": "string"
  25365. },
  25366. "data": {
  25367. "type": "object",
  25368. "properties": {
  25369. "timestamp": {
  25370. "type": "number"
  25371. },
  25372. "sessionID": {
  25373. "type": "string",
  25374. "pattern": "^ses"
  25375. },
  25376. "messageID": {
  25377. "type": "string",
  25378. "pattern": "^msg_"
  25379. },
  25380. "callID": {
  25381. "type": "string"
  25382. },
  25383. "command": {
  25384. "type": "string"
  25385. }
  25386. },
  25387. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  25388. "additionalProperties": false
  25389. }
  25390. },
  25391. "required": ["type", "id", "seq", "aggregateID", "data"],
  25392. "additionalProperties": false
  25393. }
  25394. },
  25395. "required": ["type", "id", "syncEvent"],
  25396. "additionalProperties": false
  25397. },
  25398. "SyncEventSessionNextShellEnded": {
  25399. "type": "object",
  25400. "properties": {
  25401. "type": {
  25402. "type": "string",
  25403. "enum": ["sync"]
  25404. },
  25405. "id": {
  25406. "type": "string",
  25407. "pattern": "^evt_"
  25408. },
  25409. "syncEvent": {
  25410. "type": "object",
  25411. "properties": {
  25412. "type": {
  25413. "type": "string",
  25414. "enum": ["session.next.shell.ended.1"]
  25415. },
  25416. "id": {
  25417. "type": "string",
  25418. "pattern": "^evt_"
  25419. },
  25420. "seq": {
  25421. "type": "number"
  25422. },
  25423. "aggregateID": {
  25424. "type": "string"
  25425. },
  25426. "data": {
  25427. "type": "object",
  25428. "properties": {
  25429. "timestamp": {
  25430. "type": "number"
  25431. },
  25432. "sessionID": {
  25433. "type": "string",
  25434. "pattern": "^ses"
  25435. },
  25436. "callID": {
  25437. "type": "string"
  25438. },
  25439. "output": {
  25440. "type": "string"
  25441. }
  25442. },
  25443. "required": ["timestamp", "sessionID", "callID", "output"],
  25444. "additionalProperties": false
  25445. }
  25446. },
  25447. "required": ["type", "id", "seq", "aggregateID", "data"],
  25448. "additionalProperties": false
  25449. }
  25450. },
  25451. "required": ["type", "id", "syncEvent"],
  25452. "additionalProperties": false
  25453. },
  25454. "SyncEventSessionNextStepStarted": {
  25455. "type": "object",
  25456. "properties": {
  25457. "type": {
  25458. "type": "string",
  25459. "enum": ["sync"]
  25460. },
  25461. "id": {
  25462. "type": "string",
  25463. "pattern": "^evt_"
  25464. },
  25465. "syncEvent": {
  25466. "type": "object",
  25467. "properties": {
  25468. "type": {
  25469. "type": "string",
  25470. "enum": ["session.next.step.started.1"]
  25471. },
  25472. "id": {
  25473. "type": "string",
  25474. "pattern": "^evt_"
  25475. },
  25476. "seq": {
  25477. "type": "number"
  25478. },
  25479. "aggregateID": {
  25480. "type": "string"
  25481. },
  25482. "data": {
  25483. "type": "object",
  25484. "properties": {
  25485. "timestamp": {
  25486. "type": "number"
  25487. },
  25488. "sessionID": {
  25489. "type": "string",
  25490. "pattern": "^ses"
  25491. },
  25492. "assistantMessageID": {
  25493. "type": "string",
  25494. "pattern": "^msg_"
  25495. },
  25496. "agent": {
  25497. "type": "string"
  25498. },
  25499. "model": {
  25500. "$ref": "#/components/schemas/ModelRef"
  25501. },
  25502. "snapshot": {
  25503. "type": "string"
  25504. }
  25505. },
  25506. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  25507. "additionalProperties": false
  25508. }
  25509. },
  25510. "required": ["type", "id", "seq", "aggregateID", "data"],
  25511. "additionalProperties": false
  25512. }
  25513. },
  25514. "required": ["type", "id", "syncEvent"],
  25515. "additionalProperties": false
  25516. },
  25517. "SyncEventSessionNextStepEnded": {
  25518. "type": "object",
  25519. "properties": {
  25520. "type": {
  25521. "type": "string",
  25522. "enum": ["sync"]
  25523. },
  25524. "id": {
  25525. "type": "string",
  25526. "pattern": "^evt_"
  25527. },
  25528. "syncEvent": {
  25529. "type": "object",
  25530. "properties": {
  25531. "type": {
  25532. "type": "string",
  25533. "enum": ["session.next.step.ended.2"]
  25534. },
  25535. "id": {
  25536. "type": "string",
  25537. "pattern": "^evt_"
  25538. },
  25539. "seq": {
  25540. "type": "number"
  25541. },
  25542. "aggregateID": {
  25543. "type": "string"
  25544. },
  25545. "data": {
  25546. "type": "object",
  25547. "properties": {
  25548. "timestamp": {
  25549. "type": "number"
  25550. },
  25551. "sessionID": {
  25552. "type": "string",
  25553. "pattern": "^ses"
  25554. },
  25555. "assistantMessageID": {
  25556. "type": "string",
  25557. "pattern": "^msg_"
  25558. },
  25559. "finish": {
  25560. "type": "string"
  25561. },
  25562. "cost": {
  25563. "type": "number"
  25564. },
  25565. "tokens": {
  25566. "type": "object",
  25567. "properties": {
  25568. "input": {
  25569. "type": "number"
  25570. },
  25571. "output": {
  25572. "type": "number"
  25573. },
  25574. "reasoning": {
  25575. "type": "number"
  25576. },
  25577. "cache": {
  25578. "type": "object",
  25579. "properties": {
  25580. "read": {
  25581. "type": "number"
  25582. },
  25583. "write": {
  25584. "type": "number"
  25585. }
  25586. },
  25587. "required": ["read", "write"],
  25588. "additionalProperties": false
  25589. }
  25590. },
  25591. "required": ["input", "output", "reasoning", "cache"],
  25592. "additionalProperties": false
  25593. },
  25594. "snapshot": {
  25595. "type": "string"
  25596. },
  25597. "files": {
  25598. "type": "array",
  25599. "items": {
  25600. "type": "string"
  25601. }
  25602. }
  25603. },
  25604. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  25605. "additionalProperties": false
  25606. }
  25607. },
  25608. "required": ["type", "id", "seq", "aggregateID", "data"],
  25609. "additionalProperties": false
  25610. }
  25611. },
  25612. "required": ["type", "id", "syncEvent"],
  25613. "additionalProperties": false
  25614. },
  25615. "SyncEventSessionNextStepFailed": {
  25616. "type": "object",
  25617. "properties": {
  25618. "type": {
  25619. "type": "string",
  25620. "enum": ["sync"]
  25621. },
  25622. "id": {
  25623. "type": "string",
  25624. "pattern": "^evt_"
  25625. },
  25626. "syncEvent": {
  25627. "type": "object",
  25628. "properties": {
  25629. "type": {
  25630. "type": "string",
  25631. "enum": ["session.next.step.failed.2"]
  25632. },
  25633. "id": {
  25634. "type": "string",
  25635. "pattern": "^evt_"
  25636. },
  25637. "seq": {
  25638. "type": "number"
  25639. },
  25640. "aggregateID": {
  25641. "type": "string"
  25642. },
  25643. "data": {
  25644. "type": "object",
  25645. "properties": {
  25646. "timestamp": {
  25647. "type": "number"
  25648. },
  25649. "sessionID": {
  25650. "type": "string",
  25651. "pattern": "^ses"
  25652. },
  25653. "assistantMessageID": {
  25654. "type": "string",
  25655. "pattern": "^msg_"
  25656. },
  25657. "error": {
  25658. "$ref": "#/components/schemas/SessionErrorUnknown"
  25659. }
  25660. },
  25661. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  25662. "additionalProperties": false
  25663. }
  25664. },
  25665. "required": ["type", "id", "seq", "aggregateID", "data"],
  25666. "additionalProperties": false
  25667. }
  25668. },
  25669. "required": ["type", "id", "syncEvent"],
  25670. "additionalProperties": false
  25671. },
  25672. "SyncEventSessionNextTextStarted": {
  25673. "type": "object",
  25674. "properties": {
  25675. "type": {
  25676. "type": "string",
  25677. "enum": ["sync"]
  25678. },
  25679. "id": {
  25680. "type": "string",
  25681. "pattern": "^evt_"
  25682. },
  25683. "syncEvent": {
  25684. "type": "object",
  25685. "properties": {
  25686. "type": {
  25687. "type": "string",
  25688. "enum": ["session.next.text.started.1"]
  25689. },
  25690. "id": {
  25691. "type": "string",
  25692. "pattern": "^evt_"
  25693. },
  25694. "seq": {
  25695. "type": "number"
  25696. },
  25697. "aggregateID": {
  25698. "type": "string"
  25699. },
  25700. "data": {
  25701. "type": "object",
  25702. "properties": {
  25703. "timestamp": {
  25704. "type": "number"
  25705. },
  25706. "sessionID": {
  25707. "type": "string",
  25708. "pattern": "^ses"
  25709. },
  25710. "assistantMessageID": {
  25711. "type": "string",
  25712. "pattern": "^msg_"
  25713. },
  25714. "textID": {
  25715. "type": "string"
  25716. }
  25717. },
  25718. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  25719. "additionalProperties": false
  25720. }
  25721. },
  25722. "required": ["type", "id", "seq", "aggregateID", "data"],
  25723. "additionalProperties": false
  25724. }
  25725. },
  25726. "required": ["type", "id", "syncEvent"],
  25727. "additionalProperties": false
  25728. },
  25729. "SyncEventSessionNextTextEnded": {
  25730. "type": "object",
  25731. "properties": {
  25732. "type": {
  25733. "type": "string",
  25734. "enum": ["sync"]
  25735. },
  25736. "id": {
  25737. "type": "string",
  25738. "pattern": "^evt_"
  25739. },
  25740. "syncEvent": {
  25741. "type": "object",
  25742. "properties": {
  25743. "type": {
  25744. "type": "string",
  25745. "enum": ["session.next.text.ended.1"]
  25746. },
  25747. "id": {
  25748. "type": "string",
  25749. "pattern": "^evt_"
  25750. },
  25751. "seq": {
  25752. "type": "number"
  25753. },
  25754. "aggregateID": {
  25755. "type": "string"
  25756. },
  25757. "data": {
  25758. "type": "object",
  25759. "properties": {
  25760. "timestamp": {
  25761. "type": "number"
  25762. },
  25763. "sessionID": {
  25764. "type": "string",
  25765. "pattern": "^ses"
  25766. },
  25767. "assistantMessageID": {
  25768. "type": "string",
  25769. "pattern": "^msg_"
  25770. },
  25771. "textID": {
  25772. "type": "string"
  25773. },
  25774. "text": {
  25775. "type": "string"
  25776. }
  25777. },
  25778. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  25779. "additionalProperties": false
  25780. }
  25781. },
  25782. "required": ["type", "id", "seq", "aggregateID", "data"],
  25783. "additionalProperties": false
  25784. }
  25785. },
  25786. "required": ["type", "id", "syncEvent"],
  25787. "additionalProperties": false
  25788. },
  25789. "SyncEventSessionNextReasoningStarted": {
  25790. "type": "object",
  25791. "properties": {
  25792. "type": {
  25793. "type": "string",
  25794. "enum": ["sync"]
  25795. },
  25796. "id": {
  25797. "type": "string",
  25798. "pattern": "^evt_"
  25799. },
  25800. "syncEvent": {
  25801. "type": "object",
  25802. "properties": {
  25803. "type": {
  25804. "type": "string",
  25805. "enum": ["session.next.reasoning.started.1"]
  25806. },
  25807. "id": {
  25808. "type": "string",
  25809. "pattern": "^evt_"
  25810. },
  25811. "seq": {
  25812. "type": "number"
  25813. },
  25814. "aggregateID": {
  25815. "type": "string"
  25816. },
  25817. "data": {
  25818. "type": "object",
  25819. "properties": {
  25820. "timestamp": {
  25821. "type": "number"
  25822. },
  25823. "sessionID": {
  25824. "type": "string",
  25825. "pattern": "^ses"
  25826. },
  25827. "assistantMessageID": {
  25828. "type": "string",
  25829. "pattern": "^msg_"
  25830. },
  25831. "reasoningID": {
  25832. "type": "string"
  25833. },
  25834. "providerMetadata": {
  25835. "$ref": "#/components/schemas/LLMProviderMetadata"
  25836. }
  25837. },
  25838. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  25839. "additionalProperties": false
  25840. }
  25841. },
  25842. "required": ["type", "id", "seq", "aggregateID", "data"],
  25843. "additionalProperties": false
  25844. }
  25845. },
  25846. "required": ["type", "id", "syncEvent"],
  25847. "additionalProperties": false
  25848. },
  25849. "SyncEventSessionNextReasoningEnded": {
  25850. "type": "object",
  25851. "properties": {
  25852. "type": {
  25853. "type": "string",
  25854. "enum": ["sync"]
  25855. },
  25856. "id": {
  25857. "type": "string",
  25858. "pattern": "^evt_"
  25859. },
  25860. "syncEvent": {
  25861. "type": "object",
  25862. "properties": {
  25863. "type": {
  25864. "type": "string",
  25865. "enum": ["session.next.reasoning.ended.1"]
  25866. },
  25867. "id": {
  25868. "type": "string",
  25869. "pattern": "^evt_"
  25870. },
  25871. "seq": {
  25872. "type": "number"
  25873. },
  25874. "aggregateID": {
  25875. "type": "string"
  25876. },
  25877. "data": {
  25878. "type": "object",
  25879. "properties": {
  25880. "timestamp": {
  25881. "type": "number"
  25882. },
  25883. "sessionID": {
  25884. "type": "string",
  25885. "pattern": "^ses"
  25886. },
  25887. "assistantMessageID": {
  25888. "type": "string",
  25889. "pattern": "^msg_"
  25890. },
  25891. "reasoningID": {
  25892. "type": "string"
  25893. },
  25894. "text": {
  25895. "type": "string"
  25896. },
  25897. "providerMetadata": {
  25898. "$ref": "#/components/schemas/LLMProviderMetadata"
  25899. }
  25900. },
  25901. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  25902. "additionalProperties": false
  25903. }
  25904. },
  25905. "required": ["type", "id", "seq", "aggregateID", "data"],
  25906. "additionalProperties": false
  25907. }
  25908. },
  25909. "required": ["type", "id", "syncEvent"],
  25910. "additionalProperties": false
  25911. },
  25912. "SyncEventSessionNextToolInputStarted": {
  25913. "type": "object",
  25914. "properties": {
  25915. "type": {
  25916. "type": "string",
  25917. "enum": ["sync"]
  25918. },
  25919. "id": {
  25920. "type": "string",
  25921. "pattern": "^evt_"
  25922. },
  25923. "syncEvent": {
  25924. "type": "object",
  25925. "properties": {
  25926. "type": {
  25927. "type": "string",
  25928. "enum": ["session.next.tool.input.started.1"]
  25929. },
  25930. "id": {
  25931. "type": "string",
  25932. "pattern": "^evt_"
  25933. },
  25934. "seq": {
  25935. "type": "number"
  25936. },
  25937. "aggregateID": {
  25938. "type": "string"
  25939. },
  25940. "data": {
  25941. "type": "object",
  25942. "properties": {
  25943. "timestamp": {
  25944. "type": "number"
  25945. },
  25946. "sessionID": {
  25947. "type": "string",
  25948. "pattern": "^ses"
  25949. },
  25950. "assistantMessageID": {
  25951. "type": "string",
  25952. "pattern": "^msg_"
  25953. },
  25954. "callID": {
  25955. "type": "string"
  25956. },
  25957. "name": {
  25958. "type": "string"
  25959. }
  25960. },
  25961. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  25962. "additionalProperties": false
  25963. }
  25964. },
  25965. "required": ["type", "id", "seq", "aggregateID", "data"],
  25966. "additionalProperties": false
  25967. }
  25968. },
  25969. "required": ["type", "id", "syncEvent"],
  25970. "additionalProperties": false
  25971. },
  25972. "SyncEventSessionNextToolInputEnded": {
  25973. "type": "object",
  25974. "properties": {
  25975. "type": {
  25976. "type": "string",
  25977. "enum": ["sync"]
  25978. },
  25979. "id": {
  25980. "type": "string",
  25981. "pattern": "^evt_"
  25982. },
  25983. "syncEvent": {
  25984. "type": "object",
  25985. "properties": {
  25986. "type": {
  25987. "type": "string",
  25988. "enum": ["session.next.tool.input.ended.1"]
  25989. },
  25990. "id": {
  25991. "type": "string",
  25992. "pattern": "^evt_"
  25993. },
  25994. "seq": {
  25995. "type": "number"
  25996. },
  25997. "aggregateID": {
  25998. "type": "string"
  25999. },
  26000. "data": {
  26001. "type": "object",
  26002. "properties": {
  26003. "timestamp": {
  26004. "type": "number"
  26005. },
  26006. "sessionID": {
  26007. "type": "string",
  26008. "pattern": "^ses"
  26009. },
  26010. "assistantMessageID": {
  26011. "type": "string",
  26012. "pattern": "^msg_"
  26013. },
  26014. "callID": {
  26015. "type": "string"
  26016. },
  26017. "text": {
  26018. "type": "string"
  26019. }
  26020. },
  26021. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  26022. "additionalProperties": false
  26023. }
  26024. },
  26025. "required": ["type", "id", "seq", "aggregateID", "data"],
  26026. "additionalProperties": false
  26027. }
  26028. },
  26029. "required": ["type", "id", "syncEvent"],
  26030. "additionalProperties": false
  26031. },
  26032. "SyncEventSessionNextToolCalled": {
  26033. "type": "object",
  26034. "properties": {
  26035. "type": {
  26036. "type": "string",
  26037. "enum": ["sync"]
  26038. },
  26039. "id": {
  26040. "type": "string",
  26041. "pattern": "^evt_"
  26042. },
  26043. "syncEvent": {
  26044. "type": "object",
  26045. "properties": {
  26046. "type": {
  26047. "type": "string",
  26048. "enum": ["session.next.tool.called.1"]
  26049. },
  26050. "id": {
  26051. "type": "string",
  26052. "pattern": "^evt_"
  26053. },
  26054. "seq": {
  26055. "type": "number"
  26056. },
  26057. "aggregateID": {
  26058. "type": "string"
  26059. },
  26060. "data": {
  26061. "type": "object",
  26062. "properties": {
  26063. "timestamp": {
  26064. "type": "number"
  26065. },
  26066. "sessionID": {
  26067. "type": "string",
  26068. "pattern": "^ses"
  26069. },
  26070. "assistantMessageID": {
  26071. "type": "string",
  26072. "pattern": "^msg_"
  26073. },
  26074. "callID": {
  26075. "type": "string"
  26076. },
  26077. "tool": {
  26078. "type": "string"
  26079. },
  26080. "input": {
  26081. "type": "object"
  26082. },
  26083. "provider": {
  26084. "type": "object",
  26085. "properties": {
  26086. "executed": {
  26087. "type": "boolean"
  26088. },
  26089. "metadata": {
  26090. "$ref": "#/components/schemas/LLMProviderMetadata"
  26091. }
  26092. },
  26093. "required": ["executed"],
  26094. "additionalProperties": false
  26095. }
  26096. },
  26097. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  26098. "additionalProperties": false
  26099. }
  26100. },
  26101. "required": ["type", "id", "seq", "aggregateID", "data"],
  26102. "additionalProperties": false
  26103. }
  26104. },
  26105. "required": ["type", "id", "syncEvent"],
  26106. "additionalProperties": false
  26107. },
  26108. "SyncEventSessionNextToolProgress": {
  26109. "type": "object",
  26110. "properties": {
  26111. "type": {
  26112. "type": "string",
  26113. "enum": ["sync"]
  26114. },
  26115. "id": {
  26116. "type": "string",
  26117. "pattern": "^evt_"
  26118. },
  26119. "syncEvent": {
  26120. "type": "object",
  26121. "properties": {
  26122. "type": {
  26123. "type": "string",
  26124. "enum": ["session.next.tool.progress.1"]
  26125. },
  26126. "id": {
  26127. "type": "string",
  26128. "pattern": "^evt_"
  26129. },
  26130. "seq": {
  26131. "type": "number"
  26132. },
  26133. "aggregateID": {
  26134. "type": "string"
  26135. },
  26136. "data": {
  26137. "type": "object",
  26138. "properties": {
  26139. "timestamp": {
  26140. "type": "number"
  26141. },
  26142. "sessionID": {
  26143. "type": "string",
  26144. "pattern": "^ses"
  26145. },
  26146. "assistantMessageID": {
  26147. "type": "string",
  26148. "pattern": "^msg_"
  26149. },
  26150. "callID": {
  26151. "type": "string"
  26152. },
  26153. "structured": {
  26154. "type": "object"
  26155. },
  26156. "content": {
  26157. "type": "array",
  26158. "items": {
  26159. "$ref": "#/components/schemas/LLMToolContent"
  26160. }
  26161. }
  26162. },
  26163. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  26164. "additionalProperties": false
  26165. }
  26166. },
  26167. "required": ["type", "id", "seq", "aggregateID", "data"],
  26168. "additionalProperties": false
  26169. }
  26170. },
  26171. "required": ["type", "id", "syncEvent"],
  26172. "additionalProperties": false
  26173. },
  26174. "SyncEventSessionNextToolSuccess": {
  26175. "type": "object",
  26176. "properties": {
  26177. "type": {
  26178. "type": "string",
  26179. "enum": ["sync"]
  26180. },
  26181. "id": {
  26182. "type": "string",
  26183. "pattern": "^evt_"
  26184. },
  26185. "syncEvent": {
  26186. "type": "object",
  26187. "properties": {
  26188. "type": {
  26189. "type": "string",
  26190. "enum": ["session.next.tool.success.1"]
  26191. },
  26192. "id": {
  26193. "type": "string",
  26194. "pattern": "^evt_"
  26195. },
  26196. "seq": {
  26197. "type": "number"
  26198. },
  26199. "aggregateID": {
  26200. "type": "string"
  26201. },
  26202. "data": {
  26203. "type": "object",
  26204. "properties": {
  26205. "timestamp": {
  26206. "type": "number"
  26207. },
  26208. "sessionID": {
  26209. "type": "string",
  26210. "pattern": "^ses"
  26211. },
  26212. "assistantMessageID": {
  26213. "type": "string",
  26214. "pattern": "^msg_"
  26215. },
  26216. "callID": {
  26217. "type": "string"
  26218. },
  26219. "structured": {
  26220. "type": "object"
  26221. },
  26222. "content": {
  26223. "type": "array",
  26224. "items": {
  26225. "$ref": "#/components/schemas/LLMToolContent"
  26226. }
  26227. },
  26228. "outputPaths": {
  26229. "type": "array",
  26230. "items": {
  26231. "type": "string"
  26232. }
  26233. },
  26234. "result": {},
  26235. "provider": {
  26236. "type": "object",
  26237. "properties": {
  26238. "executed": {
  26239. "type": "boolean"
  26240. },
  26241. "metadata": {
  26242. "$ref": "#/components/schemas/LLMProviderMetadata"
  26243. }
  26244. },
  26245. "required": ["executed"],
  26246. "additionalProperties": false
  26247. }
  26248. },
  26249. "required": [
  26250. "timestamp",
  26251. "sessionID",
  26252. "assistantMessageID",
  26253. "callID",
  26254. "structured",
  26255. "content",
  26256. "provider"
  26257. ],
  26258. "additionalProperties": false
  26259. }
  26260. },
  26261. "required": ["type", "id", "seq", "aggregateID", "data"],
  26262. "additionalProperties": false
  26263. }
  26264. },
  26265. "required": ["type", "id", "syncEvent"],
  26266. "additionalProperties": false
  26267. },
  26268. "SyncEventSessionNextToolFailed": {
  26269. "type": "object",
  26270. "properties": {
  26271. "type": {
  26272. "type": "string",
  26273. "enum": ["sync"]
  26274. },
  26275. "id": {
  26276. "type": "string",
  26277. "pattern": "^evt_"
  26278. },
  26279. "syncEvent": {
  26280. "type": "object",
  26281. "properties": {
  26282. "type": {
  26283. "type": "string",
  26284. "enum": ["session.next.tool.failed.1"]
  26285. },
  26286. "id": {
  26287. "type": "string",
  26288. "pattern": "^evt_"
  26289. },
  26290. "seq": {
  26291. "type": "number"
  26292. },
  26293. "aggregateID": {
  26294. "type": "string"
  26295. },
  26296. "data": {
  26297. "type": "object",
  26298. "properties": {
  26299. "timestamp": {
  26300. "type": "number"
  26301. },
  26302. "sessionID": {
  26303. "type": "string",
  26304. "pattern": "^ses"
  26305. },
  26306. "assistantMessageID": {
  26307. "type": "string",
  26308. "pattern": "^msg_"
  26309. },
  26310. "callID": {
  26311. "type": "string"
  26312. },
  26313. "error": {
  26314. "$ref": "#/components/schemas/SessionErrorUnknown"
  26315. },
  26316. "result": {},
  26317. "provider": {
  26318. "type": "object",
  26319. "properties": {
  26320. "executed": {
  26321. "type": "boolean"
  26322. },
  26323. "metadata": {
  26324. "$ref": "#/components/schemas/LLMProviderMetadata"
  26325. }
  26326. },
  26327. "required": ["executed"],
  26328. "additionalProperties": false
  26329. }
  26330. },
  26331. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  26332. "additionalProperties": false
  26333. }
  26334. },
  26335. "required": ["type", "id", "seq", "aggregateID", "data"],
  26336. "additionalProperties": false
  26337. }
  26338. },
  26339. "required": ["type", "id", "syncEvent"],
  26340. "additionalProperties": false
  26341. },
  26342. "SyncEventSessionNextRetried": {
  26343. "type": "object",
  26344. "properties": {
  26345. "type": {
  26346. "type": "string",
  26347. "enum": ["sync"]
  26348. },
  26349. "id": {
  26350. "type": "string",
  26351. "pattern": "^evt_"
  26352. },
  26353. "syncEvent": {
  26354. "type": "object",
  26355. "properties": {
  26356. "type": {
  26357. "type": "string",
  26358. "enum": ["session.next.retried.1"]
  26359. },
  26360. "id": {
  26361. "type": "string",
  26362. "pattern": "^evt_"
  26363. },
  26364. "seq": {
  26365. "type": "number"
  26366. },
  26367. "aggregateID": {
  26368. "type": "string"
  26369. },
  26370. "data": {
  26371. "type": "object",
  26372. "properties": {
  26373. "timestamp": {
  26374. "type": "number"
  26375. },
  26376. "sessionID": {
  26377. "type": "string",
  26378. "pattern": "^ses"
  26379. },
  26380. "attempt": {
  26381. "type": "number"
  26382. },
  26383. "error": {
  26384. "$ref": "#/components/schemas/SessionNextRetry_error"
  26385. }
  26386. },
  26387. "required": ["timestamp", "sessionID", "attempt", "error"],
  26388. "additionalProperties": false
  26389. }
  26390. },
  26391. "required": ["type", "id", "seq", "aggregateID", "data"],
  26392. "additionalProperties": false
  26393. }
  26394. },
  26395. "required": ["type", "id", "syncEvent"],
  26396. "additionalProperties": false
  26397. },
  26398. "SyncEventSessionNextCompactionStarted": {
  26399. "type": "object",
  26400. "properties": {
  26401. "type": {
  26402. "type": "string",
  26403. "enum": ["sync"]
  26404. },
  26405. "id": {
  26406. "type": "string",
  26407. "pattern": "^evt_"
  26408. },
  26409. "syncEvent": {
  26410. "type": "object",
  26411. "properties": {
  26412. "type": {
  26413. "type": "string",
  26414. "enum": ["session.next.compaction.started.1"]
  26415. },
  26416. "id": {
  26417. "type": "string",
  26418. "pattern": "^evt_"
  26419. },
  26420. "seq": {
  26421. "type": "number"
  26422. },
  26423. "aggregateID": {
  26424. "type": "string"
  26425. },
  26426. "data": {
  26427. "type": "object",
  26428. "properties": {
  26429. "timestamp": {
  26430. "type": "number"
  26431. },
  26432. "sessionID": {
  26433. "type": "string",
  26434. "pattern": "^ses"
  26435. },
  26436. "messageID": {
  26437. "type": "string",
  26438. "pattern": "^msg_"
  26439. },
  26440. "reason": {
  26441. "type": "string",
  26442. "enum": ["auto", "manual"]
  26443. }
  26444. },
  26445. "required": ["timestamp", "sessionID", "messageID", "reason"],
  26446. "additionalProperties": false
  26447. }
  26448. },
  26449. "required": ["type", "id", "seq", "aggregateID", "data"],
  26450. "additionalProperties": false
  26451. }
  26452. },
  26453. "required": ["type", "id", "syncEvent"],
  26454. "additionalProperties": false
  26455. },
  26456. "SyncEventSessionNextCompactionEnded": {
  26457. "type": "object",
  26458. "properties": {
  26459. "type": {
  26460. "type": "string",
  26461. "enum": ["sync"]
  26462. },
  26463. "id": {
  26464. "type": "string",
  26465. "pattern": "^evt_"
  26466. },
  26467. "syncEvent": {
  26468. "type": "object",
  26469. "properties": {
  26470. "type": {
  26471. "type": "string",
  26472. "enum": ["session.next.compaction.ended.1"]
  26473. },
  26474. "id": {
  26475. "type": "string",
  26476. "pattern": "^evt_"
  26477. },
  26478. "seq": {
  26479. "type": "number"
  26480. },
  26481. "aggregateID": {
  26482. "type": "string"
  26483. },
  26484. "data": {
  26485. "type": "object",
  26486. "properties": {
  26487. "timestamp": {
  26488. "type": "number"
  26489. },
  26490. "sessionID": {
  26491. "type": "string",
  26492. "pattern": "^ses"
  26493. },
  26494. "messageID": {
  26495. "type": "string",
  26496. "pattern": "^msg_"
  26497. },
  26498. "reason": {
  26499. "type": "string",
  26500. "enum": ["auto", "manual"]
  26501. },
  26502. "text": {
  26503. "type": "string"
  26504. },
  26505. "recent": {
  26506. "type": "string"
  26507. }
  26508. },
  26509. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  26510. "additionalProperties": false
  26511. }
  26512. },
  26513. "required": ["type", "id", "seq", "aggregateID", "data"],
  26514. "additionalProperties": false
  26515. }
  26516. },
  26517. "required": ["type", "id", "syncEvent"],
  26518. "additionalProperties": false
  26519. },
  26520. "SyncEventSessionNextRevertStaged": {
  26521. "type": "object",
  26522. "properties": {
  26523. "type": {
  26524. "type": "string",
  26525. "enum": ["sync"]
  26526. },
  26527. "id": {
  26528. "type": "string",
  26529. "pattern": "^evt_"
  26530. },
  26531. "syncEvent": {
  26532. "type": "object",
  26533. "properties": {
  26534. "type": {
  26535. "type": "string",
  26536. "enum": ["session.next.revert.staged.1"]
  26537. },
  26538. "id": {
  26539. "type": "string",
  26540. "pattern": "^evt_"
  26541. },
  26542. "seq": {
  26543. "type": "number"
  26544. },
  26545. "aggregateID": {
  26546. "type": "string"
  26547. },
  26548. "data": {
  26549. "type": "object",
  26550. "properties": {
  26551. "timestamp": {
  26552. "type": "number"
  26553. },
  26554. "sessionID": {
  26555. "type": "string",
  26556. "pattern": "^ses"
  26557. },
  26558. "revert": {
  26559. "$ref": "#/components/schemas/RevertState"
  26560. }
  26561. },
  26562. "required": ["timestamp", "sessionID", "revert"],
  26563. "additionalProperties": false
  26564. }
  26565. },
  26566. "required": ["type", "id", "seq", "aggregateID", "data"],
  26567. "additionalProperties": false
  26568. }
  26569. },
  26570. "required": ["type", "id", "syncEvent"],
  26571. "additionalProperties": false
  26572. },
  26573. "SyncEventSessionNextRevertCleared": {
  26574. "type": "object",
  26575. "properties": {
  26576. "type": {
  26577. "type": "string",
  26578. "enum": ["sync"]
  26579. },
  26580. "id": {
  26581. "type": "string",
  26582. "pattern": "^evt_"
  26583. },
  26584. "syncEvent": {
  26585. "type": "object",
  26586. "properties": {
  26587. "type": {
  26588. "type": "string",
  26589. "enum": ["session.next.revert.cleared.1"]
  26590. },
  26591. "id": {
  26592. "type": "string",
  26593. "pattern": "^evt_"
  26594. },
  26595. "seq": {
  26596. "type": "number"
  26597. },
  26598. "aggregateID": {
  26599. "type": "string"
  26600. },
  26601. "data": {
  26602. "type": "object",
  26603. "properties": {
  26604. "timestamp": {
  26605. "type": "number"
  26606. },
  26607. "sessionID": {
  26608. "type": "string",
  26609. "pattern": "^ses"
  26610. }
  26611. },
  26612. "required": ["timestamp", "sessionID"],
  26613. "additionalProperties": false
  26614. }
  26615. },
  26616. "required": ["type", "id", "seq", "aggregateID", "data"],
  26617. "additionalProperties": false
  26618. }
  26619. },
  26620. "required": ["type", "id", "syncEvent"],
  26621. "additionalProperties": false
  26622. },
  26623. "SyncEventSessionNextRevertCommitted": {
  26624. "type": "object",
  26625. "properties": {
  26626. "type": {
  26627. "type": "string",
  26628. "enum": ["sync"]
  26629. },
  26630. "id": {
  26631. "type": "string",
  26632. "pattern": "^evt_"
  26633. },
  26634. "syncEvent": {
  26635. "type": "object",
  26636. "properties": {
  26637. "type": {
  26638. "type": "string",
  26639. "enum": ["session.next.revert.committed.1"]
  26640. },
  26641. "id": {
  26642. "type": "string",
  26643. "pattern": "^evt_"
  26644. },
  26645. "seq": {
  26646. "type": "number"
  26647. },
  26648. "aggregateID": {
  26649. "type": "string"
  26650. },
  26651. "data": {
  26652. "type": "object",
  26653. "properties": {
  26654. "timestamp": {
  26655. "type": "number"
  26656. },
  26657. "sessionID": {
  26658. "type": "string",
  26659. "pattern": "^ses"
  26660. },
  26661. "messageID": {
  26662. "type": "string",
  26663. "pattern": "^msg_"
  26664. }
  26665. },
  26666. "required": ["timestamp", "sessionID", "messageID"],
  26667. "additionalProperties": false
  26668. }
  26669. },
  26670. "required": ["type", "id", "seq", "aggregateID", "data"],
  26671. "additionalProperties": false
  26672. }
  26673. },
  26674. "required": ["type", "id", "syncEvent"],
  26675. "additionalProperties": false
  26676. },
  26677. "ConfigV2ReferenceGit": {
  26678. "type": "object",
  26679. "properties": {
  26680. "repository": {
  26681. "type": "string"
  26682. },
  26683. "branch": {
  26684. "type": "string"
  26685. },
  26686. "description": {
  26687. "type": "string"
  26688. },
  26689. "hidden": {
  26690. "type": "boolean"
  26691. }
  26692. },
  26693. "required": ["repository"],
  26694. "additionalProperties": false
  26695. },
  26696. "ConfigV2ReferenceLocal": {
  26697. "type": "object",
  26698. "properties": {
  26699. "path": {
  26700. "type": "string"
  26701. },
  26702. "description": {
  26703. "type": "string"
  26704. },
  26705. "hidden": {
  26706. "type": "boolean"
  26707. }
  26708. },
  26709. "required": ["path"],
  26710. "additionalProperties": false
  26711. },
  26712. "PolicyEffect": {
  26713. "type": "string",
  26714. "enum": ["allow", "deny"]
  26715. },
  26716. "ConfigV2ExperimentalPolicy": {
  26717. "type": "object",
  26718. "properties": {
  26719. "action": {
  26720. "type": "string",
  26721. "enum": ["provider.use"]
  26722. },
  26723. "effect": {
  26724. "$ref": "#/components/schemas/PolicyEffect"
  26725. },
  26726. "resource": {
  26727. "type": "string"
  26728. }
  26729. },
  26730. "required": ["action", "effect", "resource"],
  26731. "additionalProperties": false
  26732. },
  26733. "ProjectDirectories": {
  26734. "type": "array",
  26735. "items": {
  26736. "type": "object",
  26737. "properties": {
  26738. "directory": {
  26739. "type": "string"
  26740. },
  26741. "strategy": {
  26742. "type": "string"
  26743. }
  26744. },
  26745. "required": ["directory"],
  26746. "additionalProperties": false
  26747. }
  26748. },
  26749. "PtyTicketConnectToken": {
  26750. "type": "object",
  26751. "properties": {
  26752. "ticket": {
  26753. "type": "string"
  26754. },
  26755. "expires_in": {
  26756. "type": "integer",
  26757. "exclusiveMinimum": 0
  26758. }
  26759. },
  26760. "required": ["ticket", "expires_in"],
  26761. "additionalProperties": false
  26762. },
  26763. "WorkspaceEventConnectionStatus": {
  26764. "type": "object",
  26765. "properties": {
  26766. "workspaceID": {
  26767. "type": "string",
  26768. "pattern": "^wrk"
  26769. },
  26770. "status": {
  26771. "type": "string",
  26772. "enum": ["connected", "connecting", "disconnected", "error"]
  26773. }
  26774. },
  26775. "required": ["workspaceID", "status"],
  26776. "additionalProperties": false
  26777. },
  26778. "LocationInfo": {
  26779. "type": "object",
  26780. "properties": {
  26781. "directory": {
  26782. "type": "string"
  26783. },
  26784. "workspaceID": {
  26785. "type": "string",
  26786. "pattern": "^wrk"
  26787. },
  26788. "project": {
  26789. "type": "object",
  26790. "properties": {
  26791. "id": {
  26792. "type": "string"
  26793. },
  26794. "directory": {
  26795. "type": "string"
  26796. }
  26797. },
  26798. "required": ["id", "directory"],
  26799. "additionalProperties": false
  26800. }
  26801. },
  26802. "required": ["directory", "project"],
  26803. "additionalProperties": false
  26804. },
  26805. "ProviderRequest": {
  26806. "type": "object",
  26807. "properties": {
  26808. "headers": {
  26809. "type": "object",
  26810. "additionalProperties": {
  26811. "type": "string"
  26812. }
  26813. },
  26814. "body": {
  26815. "type": "object"
  26816. }
  26817. },
  26818. "required": ["headers", "body"],
  26819. "additionalProperties": false
  26820. },
  26821. "AgentColor": {
  26822. "anyOf": [
  26823. {
  26824. "type": "string",
  26825. "pattern": "^#[0-9a-fA-F]{6}$"
  26826. },
  26827. {
  26828. "type": "string",
  26829. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  26830. }
  26831. ]
  26832. },
  26833. "PermissionV2Effect": {
  26834. "type": "string",
  26835. "enum": ["allow", "deny", "ask"]
  26836. },
  26837. "PermissionV2Rule": {
  26838. "type": "object",
  26839. "properties": {
  26840. "action": {
  26841. "type": "string"
  26842. },
  26843. "resource": {
  26844. "type": "string"
  26845. },
  26846. "effect": {
  26847. "$ref": "#/components/schemas/PermissionV2Effect"
  26848. }
  26849. },
  26850. "required": ["action", "resource", "effect"],
  26851. "additionalProperties": false
  26852. },
  26853. "PermissionV2Ruleset": {
  26854. "type": "array",
  26855. "items": {
  26856. "$ref": "#/components/schemas/PermissionV2Rule"
  26857. }
  26858. },
  26859. "AgentV2Info": {
  26860. "type": "object",
  26861. "properties": {
  26862. "id": {
  26863. "type": "string"
  26864. },
  26865. "model": {
  26866. "$ref": "#/components/schemas/ModelRef"
  26867. },
  26868. "request": {
  26869. "$ref": "#/components/schemas/ProviderRequest"
  26870. },
  26871. "system": {
  26872. "type": "string"
  26873. },
  26874. "description": {
  26875. "type": "string"
  26876. },
  26877. "mode": {
  26878. "type": "string",
  26879. "enum": ["subagent", "primary", "all"]
  26880. },
  26881. "hidden": {
  26882. "type": "boolean"
  26883. },
  26884. "color": {
  26885. "$ref": "#/components/schemas/AgentColor"
  26886. },
  26887. "steps": {
  26888. "type": "integer",
  26889. "exclusiveMinimum": 0
  26890. },
  26891. "permissions": {
  26892. "$ref": "#/components/schemas/PermissionV2Ruleset"
  26893. }
  26894. },
  26895. "required": ["id", "request", "mode", "hidden", "permissions"],
  26896. "additionalProperties": false
  26897. },
  26898. "SessionV2Info": {
  26899. "type": "object",
  26900. "properties": {
  26901. "id": {
  26902. "type": "string",
  26903. "pattern": "^ses"
  26904. },
  26905. "parentID": {
  26906. "type": "string",
  26907. "pattern": "^ses"
  26908. },
  26909. "projectID": {
  26910. "type": "string"
  26911. },
  26912. "agent": {
  26913. "type": "string"
  26914. },
  26915. "model": {
  26916. "$ref": "#/components/schemas/ModelRef"
  26917. },
  26918. "cost": {
  26919. "type": "number"
  26920. },
  26921. "tokens": {
  26922. "type": "object",
  26923. "properties": {
  26924. "input": {
  26925. "type": "number"
  26926. },
  26927. "output": {
  26928. "type": "number"
  26929. },
  26930. "reasoning": {
  26931. "type": "number"
  26932. },
  26933. "cache": {
  26934. "type": "object",
  26935. "properties": {
  26936. "read": {
  26937. "type": "number"
  26938. },
  26939. "write": {
  26940. "type": "number"
  26941. }
  26942. },
  26943. "required": ["read", "write"],
  26944. "additionalProperties": false
  26945. }
  26946. },
  26947. "required": ["input", "output", "reasoning", "cache"],
  26948. "additionalProperties": false
  26949. },
  26950. "time": {
  26951. "type": "object",
  26952. "properties": {
  26953. "created": {
  26954. "type": "number"
  26955. },
  26956. "updated": {
  26957. "type": "number"
  26958. },
  26959. "archived": {
  26960. "type": "number"
  26961. }
  26962. },
  26963. "required": ["created", "updated"],
  26964. "additionalProperties": false
  26965. },
  26966. "title": {
  26967. "type": "string"
  26968. },
  26969. "location": {
  26970. "$ref": "#/components/schemas/LocationRef"
  26971. },
  26972. "subpath": {
  26973. "type": "string"
  26974. },
  26975. "revert": {
  26976. "$ref": "#/components/schemas/RevertState"
  26977. }
  26978. },
  26979. "required": ["id", "projectID", "cost", "tokens", "time", "title", "location"],
  26980. "additionalProperties": false
  26981. },
  26982. "PromptInputFileAttachment": {
  26983. "type": "object",
  26984. "properties": {
  26985. "uri": {
  26986. "type": "string"
  26987. },
  26988. "name": {
  26989. "type": "string"
  26990. },
  26991. "description": {
  26992. "type": "string"
  26993. },
  26994. "source": {
  26995. "$ref": "#/components/schemas/PromptSource"
  26996. }
  26997. },
  26998. "required": ["uri"],
  26999. "additionalProperties": false
  27000. },
  27001. "SessionInputAdmitted": {
  27002. "type": "object",
  27003. "properties": {
  27004. "admittedSeq": {
  27005. "type": "integer",
  27006. "minimum": 0
  27007. },
  27008. "id": {
  27009. "type": "string",
  27010. "pattern": "^msg_"
  27011. },
  27012. "sessionID": {
  27013. "type": "string",
  27014. "pattern": "^ses"
  27015. },
  27016. "prompt": {
  27017. "$ref": "#/components/schemas/Prompt"
  27018. },
  27019. "delivery": {
  27020. "type": "string",
  27021. "enum": ["steer", "queue"]
  27022. },
  27023. "timeCreated": {
  27024. "type": "number"
  27025. },
  27026. "promotedSeq": {
  27027. "type": "integer",
  27028. "minimum": 0
  27029. }
  27030. },
  27031. "required": ["admittedSeq", "id", "sessionID", "prompt", "delivery", "timeCreated"],
  27032. "additionalProperties": false
  27033. },
  27034. "SessionMessageAgentSwitched": {
  27035. "type": "object",
  27036. "properties": {
  27037. "id": {
  27038. "type": "string",
  27039. "pattern": "^msg_"
  27040. },
  27041. "metadata": {
  27042. "type": "object"
  27043. },
  27044. "time": {
  27045. "type": "object",
  27046. "properties": {
  27047. "created": {
  27048. "type": "number"
  27049. }
  27050. },
  27051. "required": ["created"],
  27052. "additionalProperties": false
  27053. },
  27054. "type": {
  27055. "type": "string",
  27056. "enum": ["agent-switched"]
  27057. },
  27058. "agent": {
  27059. "type": "string"
  27060. }
  27061. },
  27062. "required": ["id", "time", "type", "agent"],
  27063. "additionalProperties": false
  27064. },
  27065. "SessionMessageModelSwitched": {
  27066. "type": "object",
  27067. "properties": {
  27068. "id": {
  27069. "type": "string",
  27070. "pattern": "^msg_"
  27071. },
  27072. "metadata": {
  27073. "type": "object"
  27074. },
  27075. "time": {
  27076. "type": "object",
  27077. "properties": {
  27078. "created": {
  27079. "type": "number"
  27080. }
  27081. },
  27082. "required": ["created"],
  27083. "additionalProperties": false
  27084. },
  27085. "type": {
  27086. "type": "string",
  27087. "enum": ["model-switched"]
  27088. },
  27089. "model": {
  27090. "$ref": "#/components/schemas/ModelRef"
  27091. }
  27092. },
  27093. "required": ["id", "time", "type", "model"],
  27094. "additionalProperties": false
  27095. },
  27096. "SessionMessageUser": {
  27097. "type": "object",
  27098. "properties": {
  27099. "id": {
  27100. "type": "string",
  27101. "pattern": "^msg_"
  27102. },
  27103. "metadata": {
  27104. "type": "object"
  27105. },
  27106. "time": {
  27107. "type": "object",
  27108. "properties": {
  27109. "created": {
  27110. "type": "number"
  27111. }
  27112. },
  27113. "required": ["created"],
  27114. "additionalProperties": false
  27115. },
  27116. "text": {
  27117. "type": "string"
  27118. },
  27119. "files": {
  27120. "type": "array",
  27121. "items": {
  27122. "$ref": "#/components/schemas/PromptFileAttachment"
  27123. }
  27124. },
  27125. "agents": {
  27126. "type": "array",
  27127. "items": {
  27128. "$ref": "#/components/schemas/PromptAgentAttachment"
  27129. }
  27130. },
  27131. "type": {
  27132. "type": "string",
  27133. "enum": ["user"]
  27134. }
  27135. },
  27136. "required": ["id", "time", "text", "type"],
  27137. "additionalProperties": false
  27138. },
  27139. "SessionMessageSynthetic": {
  27140. "type": "object",
  27141. "properties": {
  27142. "id": {
  27143. "type": "string",
  27144. "pattern": "^msg_"
  27145. },
  27146. "metadata": {
  27147. "type": "object"
  27148. },
  27149. "time": {
  27150. "type": "object",
  27151. "properties": {
  27152. "created": {
  27153. "type": "number"
  27154. }
  27155. },
  27156. "required": ["created"],
  27157. "additionalProperties": false
  27158. },
  27159. "sessionID": {
  27160. "type": "string",
  27161. "pattern": "^ses"
  27162. },
  27163. "text": {
  27164. "type": "string"
  27165. },
  27166. "type": {
  27167. "type": "string",
  27168. "enum": ["synthetic"]
  27169. }
  27170. },
  27171. "required": ["id", "time", "sessionID", "text", "type"],
  27172. "additionalProperties": false
  27173. },
  27174. "SessionMessageSystem": {
  27175. "type": "object",
  27176. "properties": {
  27177. "id": {
  27178. "type": "string",
  27179. "pattern": "^msg_"
  27180. },
  27181. "metadata": {
  27182. "type": "object"
  27183. },
  27184. "time": {
  27185. "type": "object",
  27186. "properties": {
  27187. "created": {
  27188. "type": "number"
  27189. }
  27190. },
  27191. "required": ["created"],
  27192. "additionalProperties": false
  27193. },
  27194. "type": {
  27195. "type": "string",
  27196. "enum": ["system"]
  27197. },
  27198. "text": {
  27199. "type": "string"
  27200. }
  27201. },
  27202. "required": ["id", "time", "type", "text"],
  27203. "additionalProperties": false
  27204. },
  27205. "SessionMessageShell": {
  27206. "type": "object",
  27207. "properties": {
  27208. "id": {
  27209. "type": "string",
  27210. "pattern": "^msg_"
  27211. },
  27212. "metadata": {
  27213. "type": "object"
  27214. },
  27215. "time": {
  27216. "type": "object",
  27217. "properties": {
  27218. "created": {
  27219. "type": "number"
  27220. },
  27221. "completed": {
  27222. "type": "number"
  27223. }
  27224. },
  27225. "required": ["created"],
  27226. "additionalProperties": false
  27227. },
  27228. "type": {
  27229. "type": "string",
  27230. "enum": ["shell"]
  27231. },
  27232. "callID": {
  27233. "type": "string"
  27234. },
  27235. "command": {
  27236. "type": "string"
  27237. },
  27238. "output": {
  27239. "type": "string"
  27240. }
  27241. },
  27242. "required": ["id", "time", "type", "callID", "command", "output"],
  27243. "additionalProperties": false
  27244. },
  27245. "SessionMessageAssistantText": {
  27246. "type": "object",
  27247. "properties": {
  27248. "type": {
  27249. "type": "string",
  27250. "enum": ["text"]
  27251. },
  27252. "id": {
  27253. "type": "string"
  27254. },
  27255. "text": {
  27256. "type": "string"
  27257. }
  27258. },
  27259. "required": ["type", "id", "text"],
  27260. "additionalProperties": false
  27261. },
  27262. "SessionMessageAssistantReasoning": {
  27263. "type": "object",
  27264. "properties": {
  27265. "type": {
  27266. "type": "string",
  27267. "enum": ["reasoning"]
  27268. },
  27269. "id": {
  27270. "type": "string"
  27271. },
  27272. "text": {
  27273. "type": "string"
  27274. },
  27275. "providerMetadata": {
  27276. "$ref": "#/components/schemas/LLMProviderMetadata"
  27277. }
  27278. },
  27279. "required": ["type", "id", "text"],
  27280. "additionalProperties": false
  27281. },
  27282. "SessionMessageToolStatePending": {
  27283. "type": "object",
  27284. "properties": {
  27285. "status": {
  27286. "type": "string",
  27287. "enum": ["pending"]
  27288. },
  27289. "input": {
  27290. "type": "string"
  27291. }
  27292. },
  27293. "required": ["status", "input"],
  27294. "additionalProperties": false
  27295. },
  27296. "SessionMessageToolStateRunning": {
  27297. "type": "object",
  27298. "properties": {
  27299. "status": {
  27300. "type": "string",
  27301. "enum": ["running"]
  27302. },
  27303. "input": {
  27304. "type": "object"
  27305. },
  27306. "structured": {
  27307. "type": "object"
  27308. },
  27309. "content": {
  27310. "type": "array",
  27311. "items": {
  27312. "$ref": "#/components/schemas/LLMToolContent"
  27313. }
  27314. }
  27315. },
  27316. "required": ["status", "input", "structured", "content"],
  27317. "additionalProperties": false
  27318. },
  27319. "SessionMessageToolStateCompleted": {
  27320. "type": "object",
  27321. "properties": {
  27322. "status": {
  27323. "type": "string",
  27324. "enum": ["completed"]
  27325. },
  27326. "input": {
  27327. "type": "object"
  27328. },
  27329. "attachments": {
  27330. "type": "array",
  27331. "items": {
  27332. "$ref": "#/components/schemas/PromptFileAttachment"
  27333. }
  27334. },
  27335. "content": {
  27336. "type": "array",
  27337. "items": {
  27338. "$ref": "#/components/schemas/LLMToolContent"
  27339. }
  27340. },
  27341. "outputPaths": {
  27342. "type": "array",
  27343. "items": {
  27344. "type": "string"
  27345. }
  27346. },
  27347. "structured": {
  27348. "type": "object"
  27349. },
  27350. "result": {}
  27351. },
  27352. "required": ["status", "input", "content", "structured"],
  27353. "additionalProperties": false
  27354. },
  27355. "SessionMessageToolStateError": {
  27356. "type": "object",
  27357. "properties": {
  27358. "status": {
  27359. "type": "string",
  27360. "enum": ["error"]
  27361. },
  27362. "input": {
  27363. "type": "object"
  27364. },
  27365. "content": {
  27366. "type": "array",
  27367. "items": {
  27368. "$ref": "#/components/schemas/LLMToolContent"
  27369. }
  27370. },
  27371. "structured": {
  27372. "type": "object"
  27373. },
  27374. "error": {
  27375. "$ref": "#/components/schemas/SessionErrorUnknown"
  27376. },
  27377. "result": {}
  27378. },
  27379. "required": ["status", "input", "content", "structured", "error"],
  27380. "additionalProperties": false
  27381. },
  27382. "SessionMessageAssistantTool": {
  27383. "type": "object",
  27384. "properties": {
  27385. "type": {
  27386. "type": "string",
  27387. "enum": ["tool"]
  27388. },
  27389. "id": {
  27390. "type": "string"
  27391. },
  27392. "name": {
  27393. "type": "string"
  27394. },
  27395. "provider": {
  27396. "type": "object",
  27397. "properties": {
  27398. "executed": {
  27399. "type": "boolean"
  27400. },
  27401. "metadata": {
  27402. "$ref": "#/components/schemas/LLMProviderMetadata"
  27403. },
  27404. "resultMetadata": {
  27405. "$ref": "#/components/schemas/LLMProviderMetadata"
  27406. }
  27407. },
  27408. "required": ["executed"],
  27409. "additionalProperties": false
  27410. },
  27411. "state": {
  27412. "anyOf": [
  27413. {
  27414. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  27415. },
  27416. {
  27417. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  27418. },
  27419. {
  27420. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  27421. },
  27422. {
  27423. "$ref": "#/components/schemas/SessionMessageToolStateError"
  27424. }
  27425. ]
  27426. },
  27427. "time": {
  27428. "type": "object",
  27429. "properties": {
  27430. "created": {
  27431. "type": "number"
  27432. },
  27433. "ran": {
  27434. "type": "number"
  27435. },
  27436. "completed": {
  27437. "type": "number"
  27438. },
  27439. "pruned": {
  27440. "type": "number"
  27441. }
  27442. },
  27443. "required": ["created"],
  27444. "additionalProperties": false
  27445. }
  27446. },
  27447. "required": ["type", "id", "name", "state", "time"],
  27448. "additionalProperties": false
  27449. },
  27450. "SessionMessageAssistant": {
  27451. "type": "object",
  27452. "properties": {
  27453. "id": {
  27454. "type": "string",
  27455. "pattern": "^msg_"
  27456. },
  27457. "metadata": {
  27458. "type": "object"
  27459. },
  27460. "time": {
  27461. "type": "object",
  27462. "properties": {
  27463. "created": {
  27464. "type": "number"
  27465. },
  27466. "completed": {
  27467. "type": "number"
  27468. }
  27469. },
  27470. "required": ["created"],
  27471. "additionalProperties": false
  27472. },
  27473. "type": {
  27474. "type": "string",
  27475. "enum": ["assistant"]
  27476. },
  27477. "agent": {
  27478. "type": "string"
  27479. },
  27480. "model": {
  27481. "$ref": "#/components/schemas/ModelRef"
  27482. },
  27483. "content": {
  27484. "type": "array",
  27485. "items": {
  27486. "anyOf": [
  27487. {
  27488. "$ref": "#/components/schemas/SessionMessageAssistantText"
  27489. },
  27490. {
  27491. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  27492. },
  27493. {
  27494. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  27495. }
  27496. ]
  27497. }
  27498. },
  27499. "snapshot": {
  27500. "type": "object",
  27501. "properties": {
  27502. "start": {
  27503. "type": "string"
  27504. },
  27505. "end": {
  27506. "type": "string"
  27507. },
  27508. "files": {
  27509. "type": "array",
  27510. "items": {
  27511. "type": "string"
  27512. }
  27513. }
  27514. },
  27515. "additionalProperties": false
  27516. },
  27517. "finish": {
  27518. "type": "string"
  27519. },
  27520. "cost": {
  27521. "type": "number"
  27522. },
  27523. "tokens": {
  27524. "type": "object",
  27525. "properties": {
  27526. "input": {
  27527. "type": "number"
  27528. },
  27529. "output": {
  27530. "type": "number"
  27531. },
  27532. "reasoning": {
  27533. "type": "number"
  27534. },
  27535. "cache": {
  27536. "type": "object",
  27537. "properties": {
  27538. "read": {
  27539. "type": "number"
  27540. },
  27541. "write": {
  27542. "type": "number"
  27543. }
  27544. },
  27545. "required": ["read", "write"],
  27546. "additionalProperties": false
  27547. }
  27548. },
  27549. "required": ["input", "output", "reasoning", "cache"],
  27550. "additionalProperties": false
  27551. },
  27552. "error": {
  27553. "$ref": "#/components/schemas/SessionErrorUnknown"
  27554. }
  27555. },
  27556. "required": ["id", "time", "type", "agent", "model", "content"],
  27557. "additionalProperties": false
  27558. },
  27559. "SessionMessageCompaction": {
  27560. "type": "object",
  27561. "properties": {
  27562. "type": {
  27563. "type": "string",
  27564. "enum": ["compaction"]
  27565. },
  27566. "reason": {
  27567. "type": "string",
  27568. "enum": ["auto", "manual"]
  27569. },
  27570. "summary": {
  27571. "type": "string"
  27572. },
  27573. "recent": {
  27574. "type": "string"
  27575. },
  27576. "id": {
  27577. "type": "string",
  27578. "pattern": "^msg_"
  27579. },
  27580. "metadata": {
  27581. "type": "object"
  27582. },
  27583. "time": {
  27584. "type": "object",
  27585. "properties": {
  27586. "created": {
  27587. "type": "number"
  27588. }
  27589. },
  27590. "required": ["created"],
  27591. "additionalProperties": false
  27592. }
  27593. },
  27594. "required": ["type", "reason", "summary", "recent", "id", "time"],
  27595. "additionalProperties": false
  27596. },
  27597. "SessionMessage": {
  27598. "anyOf": [
  27599. {
  27600. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  27601. },
  27602. {
  27603. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  27604. },
  27605. {
  27606. "$ref": "#/components/schemas/SessionMessageUser"
  27607. },
  27608. {
  27609. "$ref": "#/components/schemas/SessionMessageSynthetic"
  27610. },
  27611. {
  27612. "$ref": "#/components/schemas/SessionMessageSystem"
  27613. },
  27614. {
  27615. "$ref": "#/components/schemas/SessionMessageShell"
  27616. },
  27617. {
  27618. "$ref": "#/components/schemas/SessionMessageAssistant"
  27619. },
  27620. {
  27621. "$ref": "#/components/schemas/SessionMessageCompaction"
  27622. }
  27623. ]
  27624. },
  27625. "SessionNextAgentSwitched": {
  27626. "type": "object",
  27627. "properties": {
  27628. "id": {
  27629. "type": "string",
  27630. "pattern": "^evt_"
  27631. },
  27632. "metadata": {
  27633. "type": "object"
  27634. },
  27635. "type": {
  27636. "type": "string",
  27637. "enum": ["session.next.agent.switched"]
  27638. },
  27639. "durable": {
  27640. "type": "object",
  27641. "properties": {
  27642. "aggregateID": {
  27643. "type": "string"
  27644. },
  27645. "seq": {
  27646. "anyOf": [
  27647. {
  27648. "type": "number"
  27649. },
  27650. {
  27651. "type": "string",
  27652. "enum": ["NaN"]
  27653. },
  27654. {
  27655. "type": "string",
  27656. "enum": ["Infinity"]
  27657. },
  27658. {
  27659. "type": "string",
  27660. "enum": ["-Infinity"]
  27661. }
  27662. ]
  27663. },
  27664. "version": {
  27665. "anyOf": [
  27666. {
  27667. "type": "number"
  27668. },
  27669. {
  27670. "type": "string",
  27671. "enum": ["NaN"]
  27672. },
  27673. {
  27674. "type": "string",
  27675. "enum": ["Infinity"]
  27676. },
  27677. {
  27678. "type": "string",
  27679. "enum": ["-Infinity"]
  27680. }
  27681. ]
  27682. }
  27683. },
  27684. "required": ["aggregateID", "seq", "version"],
  27685. "additionalProperties": false
  27686. },
  27687. "location": {
  27688. "$ref": "#/components/schemas/LocationRef"
  27689. },
  27690. "data": {
  27691. "type": "object",
  27692. "properties": {
  27693. "timestamp": {
  27694. "type": "number"
  27695. },
  27696. "sessionID": {
  27697. "type": "string",
  27698. "pattern": "^ses"
  27699. },
  27700. "messageID": {
  27701. "type": "string",
  27702. "pattern": "^msg_"
  27703. },
  27704. "agent": {
  27705. "type": "string"
  27706. }
  27707. },
  27708. "required": ["timestamp", "sessionID", "messageID", "agent"],
  27709. "additionalProperties": false
  27710. }
  27711. },
  27712. "required": ["id", "type", "data"],
  27713. "additionalProperties": false
  27714. },
  27715. "SessionNextModelSwitched": {
  27716. "type": "object",
  27717. "properties": {
  27718. "id": {
  27719. "type": "string",
  27720. "pattern": "^evt_"
  27721. },
  27722. "metadata": {
  27723. "type": "object"
  27724. },
  27725. "type": {
  27726. "type": "string",
  27727. "enum": ["session.next.model.switched"]
  27728. },
  27729. "durable": {
  27730. "type": "object",
  27731. "properties": {
  27732. "aggregateID": {
  27733. "type": "string"
  27734. },
  27735. "seq": {
  27736. "anyOf": [
  27737. {
  27738. "type": "number"
  27739. },
  27740. {
  27741. "type": "string",
  27742. "enum": ["NaN"]
  27743. },
  27744. {
  27745. "type": "string",
  27746. "enum": ["Infinity"]
  27747. },
  27748. {
  27749. "type": "string",
  27750. "enum": ["-Infinity"]
  27751. }
  27752. ]
  27753. },
  27754. "version": {
  27755. "anyOf": [
  27756. {
  27757. "type": "number"
  27758. },
  27759. {
  27760. "type": "string",
  27761. "enum": ["NaN"]
  27762. },
  27763. {
  27764. "type": "string",
  27765. "enum": ["Infinity"]
  27766. },
  27767. {
  27768. "type": "string",
  27769. "enum": ["-Infinity"]
  27770. }
  27771. ]
  27772. }
  27773. },
  27774. "required": ["aggregateID", "seq", "version"],
  27775. "additionalProperties": false
  27776. },
  27777. "location": {
  27778. "$ref": "#/components/schemas/LocationRef"
  27779. },
  27780. "data": {
  27781. "type": "object",
  27782. "properties": {
  27783. "timestamp": {
  27784. "type": "number"
  27785. },
  27786. "sessionID": {
  27787. "type": "string",
  27788. "pattern": "^ses"
  27789. },
  27790. "messageID": {
  27791. "type": "string",
  27792. "pattern": "^msg_"
  27793. },
  27794. "model": {
  27795. "$ref": "#/components/schemas/ModelRef"
  27796. }
  27797. },
  27798. "required": ["timestamp", "sessionID", "messageID", "model"],
  27799. "additionalProperties": false
  27800. }
  27801. },
  27802. "required": ["id", "type", "data"],
  27803. "additionalProperties": false
  27804. },
  27805. "SessionNextMoved": {
  27806. "type": "object",
  27807. "properties": {
  27808. "id": {
  27809. "type": "string",
  27810. "pattern": "^evt_"
  27811. },
  27812. "metadata": {
  27813. "type": "object"
  27814. },
  27815. "type": {
  27816. "type": "string",
  27817. "enum": ["session.next.moved"]
  27818. },
  27819. "durable": {
  27820. "type": "object",
  27821. "properties": {
  27822. "aggregateID": {
  27823. "type": "string"
  27824. },
  27825. "seq": {
  27826. "anyOf": [
  27827. {
  27828. "type": "number"
  27829. },
  27830. {
  27831. "type": "string",
  27832. "enum": ["NaN"]
  27833. },
  27834. {
  27835. "type": "string",
  27836. "enum": ["Infinity"]
  27837. },
  27838. {
  27839. "type": "string",
  27840. "enum": ["-Infinity"]
  27841. }
  27842. ]
  27843. },
  27844. "version": {
  27845. "anyOf": [
  27846. {
  27847. "type": "number"
  27848. },
  27849. {
  27850. "type": "string",
  27851. "enum": ["NaN"]
  27852. },
  27853. {
  27854. "type": "string",
  27855. "enum": ["Infinity"]
  27856. },
  27857. {
  27858. "type": "string",
  27859. "enum": ["-Infinity"]
  27860. }
  27861. ]
  27862. }
  27863. },
  27864. "required": ["aggregateID", "seq", "version"],
  27865. "additionalProperties": false
  27866. },
  27867. "location": {
  27868. "$ref": "#/components/schemas/LocationRef"
  27869. },
  27870. "data": {
  27871. "type": "object",
  27872. "properties": {
  27873. "timestamp": {
  27874. "type": "number"
  27875. },
  27876. "sessionID": {
  27877. "type": "string",
  27878. "pattern": "^ses"
  27879. },
  27880. "location": {
  27881. "$ref": "#/components/schemas/LocationRef"
  27882. },
  27883. "subdirectory": {
  27884. "type": "string"
  27885. }
  27886. },
  27887. "required": ["timestamp", "sessionID", "location"],
  27888. "additionalProperties": false
  27889. }
  27890. },
  27891. "required": ["id", "type", "data"],
  27892. "additionalProperties": false
  27893. },
  27894. "SessionNextPrompted": {
  27895. "type": "object",
  27896. "properties": {
  27897. "id": {
  27898. "type": "string",
  27899. "pattern": "^evt_"
  27900. },
  27901. "metadata": {
  27902. "type": "object"
  27903. },
  27904. "type": {
  27905. "type": "string",
  27906. "enum": ["session.next.prompted"]
  27907. },
  27908. "durable": {
  27909. "type": "object",
  27910. "properties": {
  27911. "aggregateID": {
  27912. "type": "string"
  27913. },
  27914. "seq": {
  27915. "anyOf": [
  27916. {
  27917. "type": "number"
  27918. },
  27919. {
  27920. "type": "string",
  27921. "enum": ["NaN"]
  27922. },
  27923. {
  27924. "type": "string",
  27925. "enum": ["Infinity"]
  27926. },
  27927. {
  27928. "type": "string",
  27929. "enum": ["-Infinity"]
  27930. }
  27931. ]
  27932. },
  27933. "version": {
  27934. "anyOf": [
  27935. {
  27936. "type": "number"
  27937. },
  27938. {
  27939. "type": "string",
  27940. "enum": ["NaN"]
  27941. },
  27942. {
  27943. "type": "string",
  27944. "enum": ["Infinity"]
  27945. },
  27946. {
  27947. "type": "string",
  27948. "enum": ["-Infinity"]
  27949. }
  27950. ]
  27951. }
  27952. },
  27953. "required": ["aggregateID", "seq", "version"],
  27954. "additionalProperties": false
  27955. },
  27956. "location": {
  27957. "$ref": "#/components/schemas/LocationRef"
  27958. },
  27959. "data": {
  27960. "type": "object",
  27961. "properties": {
  27962. "timestamp": {
  27963. "type": "number"
  27964. },
  27965. "sessionID": {
  27966. "type": "string",
  27967. "pattern": "^ses"
  27968. },
  27969. "messageID": {
  27970. "type": "string",
  27971. "pattern": "^msg_"
  27972. },
  27973. "prompt": {
  27974. "$ref": "#/components/schemas/Prompt"
  27975. },
  27976. "delivery": {
  27977. "type": "string",
  27978. "enum": ["steer", "queue"]
  27979. }
  27980. },
  27981. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  27982. "additionalProperties": false
  27983. }
  27984. },
  27985. "required": ["id", "type", "data"],
  27986. "additionalProperties": false
  27987. },
  27988. "SessionNextPromptAdmitted": {
  27989. "type": "object",
  27990. "properties": {
  27991. "id": {
  27992. "type": "string",
  27993. "pattern": "^evt_"
  27994. },
  27995. "metadata": {
  27996. "type": "object"
  27997. },
  27998. "type": {
  27999. "type": "string",
  28000. "enum": ["session.next.prompt.admitted"]
  28001. },
  28002. "durable": {
  28003. "type": "object",
  28004. "properties": {
  28005. "aggregateID": {
  28006. "type": "string"
  28007. },
  28008. "seq": {
  28009. "anyOf": [
  28010. {
  28011. "type": "number"
  28012. },
  28013. {
  28014. "type": "string",
  28015. "enum": ["NaN"]
  28016. },
  28017. {
  28018. "type": "string",
  28019. "enum": ["Infinity"]
  28020. },
  28021. {
  28022. "type": "string",
  28023. "enum": ["-Infinity"]
  28024. }
  28025. ]
  28026. },
  28027. "version": {
  28028. "anyOf": [
  28029. {
  28030. "type": "number"
  28031. },
  28032. {
  28033. "type": "string",
  28034. "enum": ["NaN"]
  28035. },
  28036. {
  28037. "type": "string",
  28038. "enum": ["Infinity"]
  28039. },
  28040. {
  28041. "type": "string",
  28042. "enum": ["-Infinity"]
  28043. }
  28044. ]
  28045. }
  28046. },
  28047. "required": ["aggregateID", "seq", "version"],
  28048. "additionalProperties": false
  28049. },
  28050. "location": {
  28051. "$ref": "#/components/schemas/LocationRef"
  28052. },
  28053. "data": {
  28054. "type": "object",
  28055. "properties": {
  28056. "timestamp": {
  28057. "type": "number"
  28058. },
  28059. "sessionID": {
  28060. "type": "string",
  28061. "pattern": "^ses"
  28062. },
  28063. "messageID": {
  28064. "type": "string",
  28065. "pattern": "^msg_"
  28066. },
  28067. "prompt": {
  28068. "$ref": "#/components/schemas/Prompt"
  28069. },
  28070. "delivery": {
  28071. "type": "string",
  28072. "enum": ["steer", "queue"]
  28073. }
  28074. },
  28075. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  28076. "additionalProperties": false
  28077. }
  28078. },
  28079. "required": ["id", "type", "data"],
  28080. "additionalProperties": false
  28081. },
  28082. "SessionNextContextUpdated": {
  28083. "type": "object",
  28084. "properties": {
  28085. "id": {
  28086. "type": "string",
  28087. "pattern": "^evt_"
  28088. },
  28089. "metadata": {
  28090. "type": "object"
  28091. },
  28092. "type": {
  28093. "type": "string",
  28094. "enum": ["session.next.context.updated"]
  28095. },
  28096. "durable": {
  28097. "type": "object",
  28098. "properties": {
  28099. "aggregateID": {
  28100. "type": "string"
  28101. },
  28102. "seq": {
  28103. "anyOf": [
  28104. {
  28105. "type": "number"
  28106. },
  28107. {
  28108. "type": "string",
  28109. "enum": ["NaN"]
  28110. },
  28111. {
  28112. "type": "string",
  28113. "enum": ["Infinity"]
  28114. },
  28115. {
  28116. "type": "string",
  28117. "enum": ["-Infinity"]
  28118. }
  28119. ]
  28120. },
  28121. "version": {
  28122. "anyOf": [
  28123. {
  28124. "type": "number"
  28125. },
  28126. {
  28127. "type": "string",
  28128. "enum": ["NaN"]
  28129. },
  28130. {
  28131. "type": "string",
  28132. "enum": ["Infinity"]
  28133. },
  28134. {
  28135. "type": "string",
  28136. "enum": ["-Infinity"]
  28137. }
  28138. ]
  28139. }
  28140. },
  28141. "required": ["aggregateID", "seq", "version"],
  28142. "additionalProperties": false
  28143. },
  28144. "location": {
  28145. "$ref": "#/components/schemas/LocationRef"
  28146. },
  28147. "data": {
  28148. "type": "object",
  28149. "properties": {
  28150. "timestamp": {
  28151. "type": "number"
  28152. },
  28153. "sessionID": {
  28154. "type": "string",
  28155. "pattern": "^ses"
  28156. },
  28157. "messageID": {
  28158. "type": "string",
  28159. "pattern": "^msg_"
  28160. },
  28161. "text": {
  28162. "type": "string"
  28163. }
  28164. },
  28165. "required": ["timestamp", "sessionID", "messageID", "text"],
  28166. "additionalProperties": false
  28167. }
  28168. },
  28169. "required": ["id", "type", "data"],
  28170. "additionalProperties": false
  28171. },
  28172. "SessionNextSynthetic": {
  28173. "type": "object",
  28174. "properties": {
  28175. "id": {
  28176. "type": "string",
  28177. "pattern": "^evt_"
  28178. },
  28179. "metadata": {
  28180. "type": "object"
  28181. },
  28182. "type": {
  28183. "type": "string",
  28184. "enum": ["session.next.synthetic"]
  28185. },
  28186. "durable": {
  28187. "type": "object",
  28188. "properties": {
  28189. "aggregateID": {
  28190. "type": "string"
  28191. },
  28192. "seq": {
  28193. "anyOf": [
  28194. {
  28195. "type": "number"
  28196. },
  28197. {
  28198. "type": "string",
  28199. "enum": ["NaN"]
  28200. },
  28201. {
  28202. "type": "string",
  28203. "enum": ["Infinity"]
  28204. },
  28205. {
  28206. "type": "string",
  28207. "enum": ["-Infinity"]
  28208. }
  28209. ]
  28210. },
  28211. "version": {
  28212. "anyOf": [
  28213. {
  28214. "type": "number"
  28215. },
  28216. {
  28217. "type": "string",
  28218. "enum": ["NaN"]
  28219. },
  28220. {
  28221. "type": "string",
  28222. "enum": ["Infinity"]
  28223. },
  28224. {
  28225. "type": "string",
  28226. "enum": ["-Infinity"]
  28227. }
  28228. ]
  28229. }
  28230. },
  28231. "required": ["aggregateID", "seq", "version"],
  28232. "additionalProperties": false
  28233. },
  28234. "location": {
  28235. "$ref": "#/components/schemas/LocationRef"
  28236. },
  28237. "data": {
  28238. "type": "object",
  28239. "properties": {
  28240. "timestamp": {
  28241. "type": "number"
  28242. },
  28243. "sessionID": {
  28244. "type": "string",
  28245. "pattern": "^ses"
  28246. },
  28247. "messageID": {
  28248. "type": "string",
  28249. "pattern": "^msg_"
  28250. },
  28251. "text": {
  28252. "type": "string"
  28253. }
  28254. },
  28255. "required": ["timestamp", "sessionID", "messageID", "text"],
  28256. "additionalProperties": false
  28257. }
  28258. },
  28259. "required": ["id", "type", "data"],
  28260. "additionalProperties": false
  28261. },
  28262. "SessionNextShellStarted": {
  28263. "type": "object",
  28264. "properties": {
  28265. "id": {
  28266. "type": "string",
  28267. "pattern": "^evt_"
  28268. },
  28269. "metadata": {
  28270. "type": "object"
  28271. },
  28272. "type": {
  28273. "type": "string",
  28274. "enum": ["session.next.shell.started"]
  28275. },
  28276. "durable": {
  28277. "type": "object",
  28278. "properties": {
  28279. "aggregateID": {
  28280. "type": "string"
  28281. },
  28282. "seq": {
  28283. "anyOf": [
  28284. {
  28285. "type": "number"
  28286. },
  28287. {
  28288. "type": "string",
  28289. "enum": ["NaN"]
  28290. },
  28291. {
  28292. "type": "string",
  28293. "enum": ["Infinity"]
  28294. },
  28295. {
  28296. "type": "string",
  28297. "enum": ["-Infinity"]
  28298. }
  28299. ]
  28300. },
  28301. "version": {
  28302. "anyOf": [
  28303. {
  28304. "type": "number"
  28305. },
  28306. {
  28307. "type": "string",
  28308. "enum": ["NaN"]
  28309. },
  28310. {
  28311. "type": "string",
  28312. "enum": ["Infinity"]
  28313. },
  28314. {
  28315. "type": "string",
  28316. "enum": ["-Infinity"]
  28317. }
  28318. ]
  28319. }
  28320. },
  28321. "required": ["aggregateID", "seq", "version"],
  28322. "additionalProperties": false
  28323. },
  28324. "location": {
  28325. "$ref": "#/components/schemas/LocationRef"
  28326. },
  28327. "data": {
  28328. "type": "object",
  28329. "properties": {
  28330. "timestamp": {
  28331. "type": "number"
  28332. },
  28333. "sessionID": {
  28334. "type": "string",
  28335. "pattern": "^ses"
  28336. },
  28337. "messageID": {
  28338. "type": "string",
  28339. "pattern": "^msg_"
  28340. },
  28341. "callID": {
  28342. "type": "string"
  28343. },
  28344. "command": {
  28345. "type": "string"
  28346. }
  28347. },
  28348. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  28349. "additionalProperties": false
  28350. }
  28351. },
  28352. "required": ["id", "type", "data"],
  28353. "additionalProperties": false
  28354. },
  28355. "SessionNextShellEnded": {
  28356. "type": "object",
  28357. "properties": {
  28358. "id": {
  28359. "type": "string",
  28360. "pattern": "^evt_"
  28361. },
  28362. "metadata": {
  28363. "type": "object"
  28364. },
  28365. "type": {
  28366. "type": "string",
  28367. "enum": ["session.next.shell.ended"]
  28368. },
  28369. "durable": {
  28370. "type": "object",
  28371. "properties": {
  28372. "aggregateID": {
  28373. "type": "string"
  28374. },
  28375. "seq": {
  28376. "anyOf": [
  28377. {
  28378. "type": "number"
  28379. },
  28380. {
  28381. "type": "string",
  28382. "enum": ["NaN"]
  28383. },
  28384. {
  28385. "type": "string",
  28386. "enum": ["Infinity"]
  28387. },
  28388. {
  28389. "type": "string",
  28390. "enum": ["-Infinity"]
  28391. }
  28392. ]
  28393. },
  28394. "version": {
  28395. "anyOf": [
  28396. {
  28397. "type": "number"
  28398. },
  28399. {
  28400. "type": "string",
  28401. "enum": ["NaN"]
  28402. },
  28403. {
  28404. "type": "string",
  28405. "enum": ["Infinity"]
  28406. },
  28407. {
  28408. "type": "string",
  28409. "enum": ["-Infinity"]
  28410. }
  28411. ]
  28412. }
  28413. },
  28414. "required": ["aggregateID", "seq", "version"],
  28415. "additionalProperties": false
  28416. },
  28417. "location": {
  28418. "$ref": "#/components/schemas/LocationRef"
  28419. },
  28420. "data": {
  28421. "type": "object",
  28422. "properties": {
  28423. "timestamp": {
  28424. "type": "number"
  28425. },
  28426. "sessionID": {
  28427. "type": "string",
  28428. "pattern": "^ses"
  28429. },
  28430. "callID": {
  28431. "type": "string"
  28432. },
  28433. "output": {
  28434. "type": "string"
  28435. }
  28436. },
  28437. "required": ["timestamp", "sessionID", "callID", "output"],
  28438. "additionalProperties": false
  28439. }
  28440. },
  28441. "required": ["id", "type", "data"],
  28442. "additionalProperties": false
  28443. },
  28444. "SessionNextStepStarted": {
  28445. "type": "object",
  28446. "properties": {
  28447. "id": {
  28448. "type": "string",
  28449. "pattern": "^evt_"
  28450. },
  28451. "metadata": {
  28452. "type": "object"
  28453. },
  28454. "type": {
  28455. "type": "string",
  28456. "enum": ["session.next.step.started"]
  28457. },
  28458. "durable": {
  28459. "type": "object",
  28460. "properties": {
  28461. "aggregateID": {
  28462. "type": "string"
  28463. },
  28464. "seq": {
  28465. "anyOf": [
  28466. {
  28467. "type": "number"
  28468. },
  28469. {
  28470. "type": "string",
  28471. "enum": ["NaN"]
  28472. },
  28473. {
  28474. "type": "string",
  28475. "enum": ["Infinity"]
  28476. },
  28477. {
  28478. "type": "string",
  28479. "enum": ["-Infinity"]
  28480. }
  28481. ]
  28482. },
  28483. "version": {
  28484. "anyOf": [
  28485. {
  28486. "type": "number"
  28487. },
  28488. {
  28489. "type": "string",
  28490. "enum": ["NaN"]
  28491. },
  28492. {
  28493. "type": "string",
  28494. "enum": ["Infinity"]
  28495. },
  28496. {
  28497. "type": "string",
  28498. "enum": ["-Infinity"]
  28499. }
  28500. ]
  28501. }
  28502. },
  28503. "required": ["aggregateID", "seq", "version"],
  28504. "additionalProperties": false
  28505. },
  28506. "location": {
  28507. "$ref": "#/components/schemas/LocationRef"
  28508. },
  28509. "data": {
  28510. "type": "object",
  28511. "properties": {
  28512. "timestamp": {
  28513. "type": "number"
  28514. },
  28515. "sessionID": {
  28516. "type": "string",
  28517. "pattern": "^ses"
  28518. },
  28519. "assistantMessageID": {
  28520. "type": "string",
  28521. "pattern": "^msg_"
  28522. },
  28523. "agent": {
  28524. "type": "string"
  28525. },
  28526. "model": {
  28527. "$ref": "#/components/schemas/ModelRef"
  28528. },
  28529. "snapshot": {
  28530. "type": "string"
  28531. }
  28532. },
  28533. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  28534. "additionalProperties": false
  28535. }
  28536. },
  28537. "required": ["id", "type", "data"],
  28538. "additionalProperties": false
  28539. },
  28540. "SessionNextStepEnded": {
  28541. "type": "object",
  28542. "properties": {
  28543. "id": {
  28544. "type": "string",
  28545. "pattern": "^evt_"
  28546. },
  28547. "metadata": {
  28548. "type": "object"
  28549. },
  28550. "type": {
  28551. "type": "string",
  28552. "enum": ["session.next.step.ended"]
  28553. },
  28554. "durable": {
  28555. "type": "object",
  28556. "properties": {
  28557. "aggregateID": {
  28558. "type": "string"
  28559. },
  28560. "seq": {
  28561. "anyOf": [
  28562. {
  28563. "type": "number"
  28564. },
  28565. {
  28566. "type": "string",
  28567. "enum": ["NaN"]
  28568. },
  28569. {
  28570. "type": "string",
  28571. "enum": ["Infinity"]
  28572. },
  28573. {
  28574. "type": "string",
  28575. "enum": ["-Infinity"]
  28576. }
  28577. ]
  28578. },
  28579. "version": {
  28580. "anyOf": [
  28581. {
  28582. "type": "number"
  28583. },
  28584. {
  28585. "type": "string",
  28586. "enum": ["NaN"]
  28587. },
  28588. {
  28589. "type": "string",
  28590. "enum": ["Infinity"]
  28591. },
  28592. {
  28593. "type": "string",
  28594. "enum": ["-Infinity"]
  28595. }
  28596. ]
  28597. }
  28598. },
  28599. "required": ["aggregateID", "seq", "version"],
  28600. "additionalProperties": false
  28601. },
  28602. "location": {
  28603. "$ref": "#/components/schemas/LocationRef"
  28604. },
  28605. "data": {
  28606. "type": "object",
  28607. "properties": {
  28608. "timestamp": {
  28609. "type": "number"
  28610. },
  28611. "sessionID": {
  28612. "type": "string",
  28613. "pattern": "^ses"
  28614. },
  28615. "assistantMessageID": {
  28616. "type": "string",
  28617. "pattern": "^msg_"
  28618. },
  28619. "finish": {
  28620. "type": "string"
  28621. },
  28622. "cost": {
  28623. "type": "number"
  28624. },
  28625. "tokens": {
  28626. "type": "object",
  28627. "properties": {
  28628. "input": {
  28629. "type": "number"
  28630. },
  28631. "output": {
  28632. "type": "number"
  28633. },
  28634. "reasoning": {
  28635. "type": "number"
  28636. },
  28637. "cache": {
  28638. "type": "object",
  28639. "properties": {
  28640. "read": {
  28641. "type": "number"
  28642. },
  28643. "write": {
  28644. "type": "number"
  28645. }
  28646. },
  28647. "required": ["read", "write"],
  28648. "additionalProperties": false
  28649. }
  28650. },
  28651. "required": ["input", "output", "reasoning", "cache"],
  28652. "additionalProperties": false
  28653. },
  28654. "snapshot": {
  28655. "type": "string"
  28656. },
  28657. "files": {
  28658. "type": "array",
  28659. "items": {
  28660. "type": "string"
  28661. }
  28662. }
  28663. },
  28664. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  28665. "additionalProperties": false
  28666. }
  28667. },
  28668. "required": ["id", "type", "data"],
  28669. "additionalProperties": false
  28670. },
  28671. "SessionNextStepFailed": {
  28672. "type": "object",
  28673. "properties": {
  28674. "id": {
  28675. "type": "string",
  28676. "pattern": "^evt_"
  28677. },
  28678. "metadata": {
  28679. "type": "object"
  28680. },
  28681. "type": {
  28682. "type": "string",
  28683. "enum": ["session.next.step.failed"]
  28684. },
  28685. "durable": {
  28686. "type": "object",
  28687. "properties": {
  28688. "aggregateID": {
  28689. "type": "string"
  28690. },
  28691. "seq": {
  28692. "anyOf": [
  28693. {
  28694. "type": "number"
  28695. },
  28696. {
  28697. "type": "string",
  28698. "enum": ["NaN"]
  28699. },
  28700. {
  28701. "type": "string",
  28702. "enum": ["Infinity"]
  28703. },
  28704. {
  28705. "type": "string",
  28706. "enum": ["-Infinity"]
  28707. }
  28708. ]
  28709. },
  28710. "version": {
  28711. "anyOf": [
  28712. {
  28713. "type": "number"
  28714. },
  28715. {
  28716. "type": "string",
  28717. "enum": ["NaN"]
  28718. },
  28719. {
  28720. "type": "string",
  28721. "enum": ["Infinity"]
  28722. },
  28723. {
  28724. "type": "string",
  28725. "enum": ["-Infinity"]
  28726. }
  28727. ]
  28728. }
  28729. },
  28730. "required": ["aggregateID", "seq", "version"],
  28731. "additionalProperties": false
  28732. },
  28733. "location": {
  28734. "$ref": "#/components/schemas/LocationRef"
  28735. },
  28736. "data": {
  28737. "type": "object",
  28738. "properties": {
  28739. "timestamp": {
  28740. "type": "number"
  28741. },
  28742. "sessionID": {
  28743. "type": "string",
  28744. "pattern": "^ses"
  28745. },
  28746. "assistantMessageID": {
  28747. "type": "string",
  28748. "pattern": "^msg_"
  28749. },
  28750. "error": {
  28751. "$ref": "#/components/schemas/SessionErrorUnknown"
  28752. }
  28753. },
  28754. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  28755. "additionalProperties": false
  28756. }
  28757. },
  28758. "required": ["id", "type", "data"],
  28759. "additionalProperties": false
  28760. },
  28761. "SessionNextTextStarted": {
  28762. "type": "object",
  28763. "properties": {
  28764. "id": {
  28765. "type": "string",
  28766. "pattern": "^evt_"
  28767. },
  28768. "metadata": {
  28769. "type": "object"
  28770. },
  28771. "type": {
  28772. "type": "string",
  28773. "enum": ["session.next.text.started"]
  28774. },
  28775. "durable": {
  28776. "type": "object",
  28777. "properties": {
  28778. "aggregateID": {
  28779. "type": "string"
  28780. },
  28781. "seq": {
  28782. "anyOf": [
  28783. {
  28784. "type": "number"
  28785. },
  28786. {
  28787. "type": "string",
  28788. "enum": ["NaN"]
  28789. },
  28790. {
  28791. "type": "string",
  28792. "enum": ["Infinity"]
  28793. },
  28794. {
  28795. "type": "string",
  28796. "enum": ["-Infinity"]
  28797. }
  28798. ]
  28799. },
  28800. "version": {
  28801. "anyOf": [
  28802. {
  28803. "type": "number"
  28804. },
  28805. {
  28806. "type": "string",
  28807. "enum": ["NaN"]
  28808. },
  28809. {
  28810. "type": "string",
  28811. "enum": ["Infinity"]
  28812. },
  28813. {
  28814. "type": "string",
  28815. "enum": ["-Infinity"]
  28816. }
  28817. ]
  28818. }
  28819. },
  28820. "required": ["aggregateID", "seq", "version"],
  28821. "additionalProperties": false
  28822. },
  28823. "location": {
  28824. "$ref": "#/components/schemas/LocationRef"
  28825. },
  28826. "data": {
  28827. "type": "object",
  28828. "properties": {
  28829. "timestamp": {
  28830. "type": "number"
  28831. },
  28832. "sessionID": {
  28833. "type": "string",
  28834. "pattern": "^ses"
  28835. },
  28836. "assistantMessageID": {
  28837. "type": "string",
  28838. "pattern": "^msg_"
  28839. },
  28840. "textID": {
  28841. "type": "string"
  28842. }
  28843. },
  28844. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  28845. "additionalProperties": false
  28846. }
  28847. },
  28848. "required": ["id", "type", "data"],
  28849. "additionalProperties": false
  28850. },
  28851. "SessionNextTextEnded": {
  28852. "type": "object",
  28853. "properties": {
  28854. "id": {
  28855. "type": "string",
  28856. "pattern": "^evt_"
  28857. },
  28858. "metadata": {
  28859. "type": "object"
  28860. },
  28861. "type": {
  28862. "type": "string",
  28863. "enum": ["session.next.text.ended"]
  28864. },
  28865. "durable": {
  28866. "type": "object",
  28867. "properties": {
  28868. "aggregateID": {
  28869. "type": "string"
  28870. },
  28871. "seq": {
  28872. "anyOf": [
  28873. {
  28874. "type": "number"
  28875. },
  28876. {
  28877. "type": "string",
  28878. "enum": ["NaN"]
  28879. },
  28880. {
  28881. "type": "string",
  28882. "enum": ["Infinity"]
  28883. },
  28884. {
  28885. "type": "string",
  28886. "enum": ["-Infinity"]
  28887. }
  28888. ]
  28889. },
  28890. "version": {
  28891. "anyOf": [
  28892. {
  28893. "type": "number"
  28894. },
  28895. {
  28896. "type": "string",
  28897. "enum": ["NaN"]
  28898. },
  28899. {
  28900. "type": "string",
  28901. "enum": ["Infinity"]
  28902. },
  28903. {
  28904. "type": "string",
  28905. "enum": ["-Infinity"]
  28906. }
  28907. ]
  28908. }
  28909. },
  28910. "required": ["aggregateID", "seq", "version"],
  28911. "additionalProperties": false
  28912. },
  28913. "location": {
  28914. "$ref": "#/components/schemas/LocationRef"
  28915. },
  28916. "data": {
  28917. "type": "object",
  28918. "properties": {
  28919. "timestamp": {
  28920. "type": "number"
  28921. },
  28922. "sessionID": {
  28923. "type": "string",
  28924. "pattern": "^ses"
  28925. },
  28926. "assistantMessageID": {
  28927. "type": "string",
  28928. "pattern": "^msg_"
  28929. },
  28930. "textID": {
  28931. "type": "string"
  28932. },
  28933. "text": {
  28934. "type": "string"
  28935. }
  28936. },
  28937. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  28938. "additionalProperties": false
  28939. }
  28940. },
  28941. "required": ["id", "type", "data"],
  28942. "additionalProperties": false
  28943. },
  28944. "SessionNextToolInputStarted": {
  28945. "type": "object",
  28946. "properties": {
  28947. "id": {
  28948. "type": "string",
  28949. "pattern": "^evt_"
  28950. },
  28951. "metadata": {
  28952. "type": "object"
  28953. },
  28954. "type": {
  28955. "type": "string",
  28956. "enum": ["session.next.tool.input.started"]
  28957. },
  28958. "durable": {
  28959. "type": "object",
  28960. "properties": {
  28961. "aggregateID": {
  28962. "type": "string"
  28963. },
  28964. "seq": {
  28965. "anyOf": [
  28966. {
  28967. "type": "number"
  28968. },
  28969. {
  28970. "type": "string",
  28971. "enum": ["NaN"]
  28972. },
  28973. {
  28974. "type": "string",
  28975. "enum": ["Infinity"]
  28976. },
  28977. {
  28978. "type": "string",
  28979. "enum": ["-Infinity"]
  28980. }
  28981. ]
  28982. },
  28983. "version": {
  28984. "anyOf": [
  28985. {
  28986. "type": "number"
  28987. },
  28988. {
  28989. "type": "string",
  28990. "enum": ["NaN"]
  28991. },
  28992. {
  28993. "type": "string",
  28994. "enum": ["Infinity"]
  28995. },
  28996. {
  28997. "type": "string",
  28998. "enum": ["-Infinity"]
  28999. }
  29000. ]
  29001. }
  29002. },
  29003. "required": ["aggregateID", "seq", "version"],
  29004. "additionalProperties": false
  29005. },
  29006. "location": {
  29007. "$ref": "#/components/schemas/LocationRef"
  29008. },
  29009. "data": {
  29010. "type": "object",
  29011. "properties": {
  29012. "timestamp": {
  29013. "type": "number"
  29014. },
  29015. "sessionID": {
  29016. "type": "string",
  29017. "pattern": "^ses"
  29018. },
  29019. "assistantMessageID": {
  29020. "type": "string",
  29021. "pattern": "^msg_"
  29022. },
  29023. "callID": {
  29024. "type": "string"
  29025. },
  29026. "name": {
  29027. "type": "string"
  29028. }
  29029. },
  29030. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  29031. "additionalProperties": false
  29032. }
  29033. },
  29034. "required": ["id", "type", "data"],
  29035. "additionalProperties": false
  29036. },
  29037. "SessionNextToolInputEnded": {
  29038. "type": "object",
  29039. "properties": {
  29040. "id": {
  29041. "type": "string",
  29042. "pattern": "^evt_"
  29043. },
  29044. "metadata": {
  29045. "type": "object"
  29046. },
  29047. "type": {
  29048. "type": "string",
  29049. "enum": ["session.next.tool.input.ended"]
  29050. },
  29051. "durable": {
  29052. "type": "object",
  29053. "properties": {
  29054. "aggregateID": {
  29055. "type": "string"
  29056. },
  29057. "seq": {
  29058. "anyOf": [
  29059. {
  29060. "type": "number"
  29061. },
  29062. {
  29063. "type": "string",
  29064. "enum": ["NaN"]
  29065. },
  29066. {
  29067. "type": "string",
  29068. "enum": ["Infinity"]
  29069. },
  29070. {
  29071. "type": "string",
  29072. "enum": ["-Infinity"]
  29073. }
  29074. ]
  29075. },
  29076. "version": {
  29077. "anyOf": [
  29078. {
  29079. "type": "number"
  29080. },
  29081. {
  29082. "type": "string",
  29083. "enum": ["NaN"]
  29084. },
  29085. {
  29086. "type": "string",
  29087. "enum": ["Infinity"]
  29088. },
  29089. {
  29090. "type": "string",
  29091. "enum": ["-Infinity"]
  29092. }
  29093. ]
  29094. }
  29095. },
  29096. "required": ["aggregateID", "seq", "version"],
  29097. "additionalProperties": false
  29098. },
  29099. "location": {
  29100. "$ref": "#/components/schemas/LocationRef"
  29101. },
  29102. "data": {
  29103. "type": "object",
  29104. "properties": {
  29105. "timestamp": {
  29106. "type": "number"
  29107. },
  29108. "sessionID": {
  29109. "type": "string",
  29110. "pattern": "^ses"
  29111. },
  29112. "assistantMessageID": {
  29113. "type": "string",
  29114. "pattern": "^msg_"
  29115. },
  29116. "callID": {
  29117. "type": "string"
  29118. },
  29119. "text": {
  29120. "type": "string"
  29121. }
  29122. },
  29123. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  29124. "additionalProperties": false
  29125. }
  29126. },
  29127. "required": ["id", "type", "data"],
  29128. "additionalProperties": false
  29129. },
  29130. "SessionNextToolCalled": {
  29131. "type": "object",
  29132. "properties": {
  29133. "id": {
  29134. "type": "string",
  29135. "pattern": "^evt_"
  29136. },
  29137. "metadata": {
  29138. "type": "object"
  29139. },
  29140. "type": {
  29141. "type": "string",
  29142. "enum": ["session.next.tool.called"]
  29143. },
  29144. "durable": {
  29145. "type": "object",
  29146. "properties": {
  29147. "aggregateID": {
  29148. "type": "string"
  29149. },
  29150. "seq": {
  29151. "anyOf": [
  29152. {
  29153. "type": "number"
  29154. },
  29155. {
  29156. "type": "string",
  29157. "enum": ["NaN"]
  29158. },
  29159. {
  29160. "type": "string",
  29161. "enum": ["Infinity"]
  29162. },
  29163. {
  29164. "type": "string",
  29165. "enum": ["-Infinity"]
  29166. }
  29167. ]
  29168. },
  29169. "version": {
  29170. "anyOf": [
  29171. {
  29172. "type": "number"
  29173. },
  29174. {
  29175. "type": "string",
  29176. "enum": ["NaN"]
  29177. },
  29178. {
  29179. "type": "string",
  29180. "enum": ["Infinity"]
  29181. },
  29182. {
  29183. "type": "string",
  29184. "enum": ["-Infinity"]
  29185. }
  29186. ]
  29187. }
  29188. },
  29189. "required": ["aggregateID", "seq", "version"],
  29190. "additionalProperties": false
  29191. },
  29192. "location": {
  29193. "$ref": "#/components/schemas/LocationRef"
  29194. },
  29195. "data": {
  29196. "type": "object",
  29197. "properties": {
  29198. "timestamp": {
  29199. "type": "number"
  29200. },
  29201. "sessionID": {
  29202. "type": "string",
  29203. "pattern": "^ses"
  29204. },
  29205. "assistantMessageID": {
  29206. "type": "string",
  29207. "pattern": "^msg_"
  29208. },
  29209. "callID": {
  29210. "type": "string"
  29211. },
  29212. "tool": {
  29213. "type": "string"
  29214. },
  29215. "input": {
  29216. "type": "object"
  29217. },
  29218. "provider": {
  29219. "type": "object",
  29220. "properties": {
  29221. "executed": {
  29222. "type": "boolean"
  29223. },
  29224. "metadata": {
  29225. "$ref": "#/components/schemas/LLMProviderMetadata"
  29226. }
  29227. },
  29228. "required": ["executed"],
  29229. "additionalProperties": false
  29230. }
  29231. },
  29232. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  29233. "additionalProperties": false
  29234. }
  29235. },
  29236. "required": ["id", "type", "data"],
  29237. "additionalProperties": false
  29238. },
  29239. "SessionNextToolProgress": {
  29240. "type": "object",
  29241. "properties": {
  29242. "id": {
  29243. "type": "string",
  29244. "pattern": "^evt_"
  29245. },
  29246. "metadata": {
  29247. "type": "object"
  29248. },
  29249. "type": {
  29250. "type": "string",
  29251. "enum": ["session.next.tool.progress"]
  29252. },
  29253. "durable": {
  29254. "type": "object",
  29255. "properties": {
  29256. "aggregateID": {
  29257. "type": "string"
  29258. },
  29259. "seq": {
  29260. "anyOf": [
  29261. {
  29262. "type": "number"
  29263. },
  29264. {
  29265. "type": "string",
  29266. "enum": ["NaN"]
  29267. },
  29268. {
  29269. "type": "string",
  29270. "enum": ["Infinity"]
  29271. },
  29272. {
  29273. "type": "string",
  29274. "enum": ["-Infinity"]
  29275. }
  29276. ]
  29277. },
  29278. "version": {
  29279. "anyOf": [
  29280. {
  29281. "type": "number"
  29282. },
  29283. {
  29284. "type": "string",
  29285. "enum": ["NaN"]
  29286. },
  29287. {
  29288. "type": "string",
  29289. "enum": ["Infinity"]
  29290. },
  29291. {
  29292. "type": "string",
  29293. "enum": ["-Infinity"]
  29294. }
  29295. ]
  29296. }
  29297. },
  29298. "required": ["aggregateID", "seq", "version"],
  29299. "additionalProperties": false
  29300. },
  29301. "location": {
  29302. "$ref": "#/components/schemas/LocationRef"
  29303. },
  29304. "data": {
  29305. "type": "object",
  29306. "properties": {
  29307. "timestamp": {
  29308. "type": "number"
  29309. },
  29310. "sessionID": {
  29311. "type": "string",
  29312. "pattern": "^ses"
  29313. },
  29314. "assistantMessageID": {
  29315. "type": "string",
  29316. "pattern": "^msg_"
  29317. },
  29318. "callID": {
  29319. "type": "string"
  29320. },
  29321. "structured": {
  29322. "type": "object"
  29323. },
  29324. "content": {
  29325. "type": "array",
  29326. "items": {
  29327. "$ref": "#/components/schemas/LLMToolContent"
  29328. }
  29329. }
  29330. },
  29331. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  29332. "additionalProperties": false
  29333. }
  29334. },
  29335. "required": ["id", "type", "data"],
  29336. "additionalProperties": false
  29337. },
  29338. "SessionNextToolSuccess": {
  29339. "type": "object",
  29340. "properties": {
  29341. "id": {
  29342. "type": "string",
  29343. "pattern": "^evt_"
  29344. },
  29345. "metadata": {
  29346. "type": "object"
  29347. },
  29348. "type": {
  29349. "type": "string",
  29350. "enum": ["session.next.tool.success"]
  29351. },
  29352. "durable": {
  29353. "type": "object",
  29354. "properties": {
  29355. "aggregateID": {
  29356. "type": "string"
  29357. },
  29358. "seq": {
  29359. "anyOf": [
  29360. {
  29361. "type": "number"
  29362. },
  29363. {
  29364. "type": "string",
  29365. "enum": ["NaN"]
  29366. },
  29367. {
  29368. "type": "string",
  29369. "enum": ["Infinity"]
  29370. },
  29371. {
  29372. "type": "string",
  29373. "enum": ["-Infinity"]
  29374. }
  29375. ]
  29376. },
  29377. "version": {
  29378. "anyOf": [
  29379. {
  29380. "type": "number"
  29381. },
  29382. {
  29383. "type": "string",
  29384. "enum": ["NaN"]
  29385. },
  29386. {
  29387. "type": "string",
  29388. "enum": ["Infinity"]
  29389. },
  29390. {
  29391. "type": "string",
  29392. "enum": ["-Infinity"]
  29393. }
  29394. ]
  29395. }
  29396. },
  29397. "required": ["aggregateID", "seq", "version"],
  29398. "additionalProperties": false
  29399. },
  29400. "location": {
  29401. "$ref": "#/components/schemas/LocationRef"
  29402. },
  29403. "data": {
  29404. "type": "object",
  29405. "properties": {
  29406. "timestamp": {
  29407. "type": "number"
  29408. },
  29409. "sessionID": {
  29410. "type": "string",
  29411. "pattern": "^ses"
  29412. },
  29413. "assistantMessageID": {
  29414. "type": "string",
  29415. "pattern": "^msg_"
  29416. },
  29417. "callID": {
  29418. "type": "string"
  29419. },
  29420. "structured": {
  29421. "type": "object"
  29422. },
  29423. "content": {
  29424. "type": "array",
  29425. "items": {
  29426. "$ref": "#/components/schemas/LLMToolContent"
  29427. }
  29428. },
  29429. "outputPaths": {
  29430. "type": "array",
  29431. "items": {
  29432. "type": "string"
  29433. }
  29434. },
  29435. "result": {},
  29436. "provider": {
  29437. "type": "object",
  29438. "properties": {
  29439. "executed": {
  29440. "type": "boolean"
  29441. },
  29442. "metadata": {
  29443. "$ref": "#/components/schemas/LLMProviderMetadata"
  29444. }
  29445. },
  29446. "required": ["executed"],
  29447. "additionalProperties": false
  29448. }
  29449. },
  29450. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  29451. "additionalProperties": false
  29452. }
  29453. },
  29454. "required": ["id", "type", "data"],
  29455. "additionalProperties": false
  29456. },
  29457. "SessionNextToolFailed": {
  29458. "type": "object",
  29459. "properties": {
  29460. "id": {
  29461. "type": "string",
  29462. "pattern": "^evt_"
  29463. },
  29464. "metadata": {
  29465. "type": "object"
  29466. },
  29467. "type": {
  29468. "type": "string",
  29469. "enum": ["session.next.tool.failed"]
  29470. },
  29471. "durable": {
  29472. "type": "object",
  29473. "properties": {
  29474. "aggregateID": {
  29475. "type": "string"
  29476. },
  29477. "seq": {
  29478. "anyOf": [
  29479. {
  29480. "type": "number"
  29481. },
  29482. {
  29483. "type": "string",
  29484. "enum": ["NaN"]
  29485. },
  29486. {
  29487. "type": "string",
  29488. "enum": ["Infinity"]
  29489. },
  29490. {
  29491. "type": "string",
  29492. "enum": ["-Infinity"]
  29493. }
  29494. ]
  29495. },
  29496. "version": {
  29497. "anyOf": [
  29498. {
  29499. "type": "number"
  29500. },
  29501. {
  29502. "type": "string",
  29503. "enum": ["NaN"]
  29504. },
  29505. {
  29506. "type": "string",
  29507. "enum": ["Infinity"]
  29508. },
  29509. {
  29510. "type": "string",
  29511. "enum": ["-Infinity"]
  29512. }
  29513. ]
  29514. }
  29515. },
  29516. "required": ["aggregateID", "seq", "version"],
  29517. "additionalProperties": false
  29518. },
  29519. "location": {
  29520. "$ref": "#/components/schemas/LocationRef"
  29521. },
  29522. "data": {
  29523. "type": "object",
  29524. "properties": {
  29525. "timestamp": {
  29526. "type": "number"
  29527. },
  29528. "sessionID": {
  29529. "type": "string",
  29530. "pattern": "^ses"
  29531. },
  29532. "assistantMessageID": {
  29533. "type": "string",
  29534. "pattern": "^msg_"
  29535. },
  29536. "callID": {
  29537. "type": "string"
  29538. },
  29539. "error": {
  29540. "$ref": "#/components/schemas/SessionErrorUnknown"
  29541. },
  29542. "result": {},
  29543. "provider": {
  29544. "type": "object",
  29545. "properties": {
  29546. "executed": {
  29547. "type": "boolean"
  29548. },
  29549. "metadata": {
  29550. "$ref": "#/components/schemas/LLMProviderMetadata"
  29551. }
  29552. },
  29553. "required": ["executed"],
  29554. "additionalProperties": false
  29555. }
  29556. },
  29557. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  29558. "additionalProperties": false
  29559. }
  29560. },
  29561. "required": ["id", "type", "data"],
  29562. "additionalProperties": false
  29563. },
  29564. "SessionNextReasoningStarted": {
  29565. "type": "object",
  29566. "properties": {
  29567. "id": {
  29568. "type": "string",
  29569. "pattern": "^evt_"
  29570. },
  29571. "metadata": {
  29572. "type": "object"
  29573. },
  29574. "type": {
  29575. "type": "string",
  29576. "enum": ["session.next.reasoning.started"]
  29577. },
  29578. "durable": {
  29579. "type": "object",
  29580. "properties": {
  29581. "aggregateID": {
  29582. "type": "string"
  29583. },
  29584. "seq": {
  29585. "anyOf": [
  29586. {
  29587. "type": "number"
  29588. },
  29589. {
  29590. "type": "string",
  29591. "enum": ["NaN"]
  29592. },
  29593. {
  29594. "type": "string",
  29595. "enum": ["Infinity"]
  29596. },
  29597. {
  29598. "type": "string",
  29599. "enum": ["-Infinity"]
  29600. }
  29601. ]
  29602. },
  29603. "version": {
  29604. "anyOf": [
  29605. {
  29606. "type": "number"
  29607. },
  29608. {
  29609. "type": "string",
  29610. "enum": ["NaN"]
  29611. },
  29612. {
  29613. "type": "string",
  29614. "enum": ["Infinity"]
  29615. },
  29616. {
  29617. "type": "string",
  29618. "enum": ["-Infinity"]
  29619. }
  29620. ]
  29621. }
  29622. },
  29623. "required": ["aggregateID", "seq", "version"],
  29624. "additionalProperties": false
  29625. },
  29626. "location": {
  29627. "$ref": "#/components/schemas/LocationRef"
  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. "reasoningID": {
  29644. "type": "string"
  29645. },
  29646. "providerMetadata": {
  29647. "$ref": "#/components/schemas/LLMProviderMetadata"
  29648. }
  29649. },
  29650. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  29651. "additionalProperties": false
  29652. }
  29653. },
  29654. "required": ["id", "type", "data"],
  29655. "additionalProperties": false
  29656. },
  29657. "SessionNextReasoningEnded": {
  29658. "type": "object",
  29659. "properties": {
  29660. "id": {
  29661. "type": "string",
  29662. "pattern": "^evt_"
  29663. },
  29664. "metadata": {
  29665. "type": "object"
  29666. },
  29667. "type": {
  29668. "type": "string",
  29669. "enum": ["session.next.reasoning.ended"]
  29670. },
  29671. "durable": {
  29672. "type": "object",
  29673. "properties": {
  29674. "aggregateID": {
  29675. "type": "string"
  29676. },
  29677. "seq": {
  29678. "anyOf": [
  29679. {
  29680. "type": "number"
  29681. },
  29682. {
  29683. "type": "string",
  29684. "enum": ["NaN"]
  29685. },
  29686. {
  29687. "type": "string",
  29688. "enum": ["Infinity"]
  29689. },
  29690. {
  29691. "type": "string",
  29692. "enum": ["-Infinity"]
  29693. }
  29694. ]
  29695. },
  29696. "version": {
  29697. "anyOf": [
  29698. {
  29699. "type": "number"
  29700. },
  29701. {
  29702. "type": "string",
  29703. "enum": ["NaN"]
  29704. },
  29705. {
  29706. "type": "string",
  29707. "enum": ["Infinity"]
  29708. },
  29709. {
  29710. "type": "string",
  29711. "enum": ["-Infinity"]
  29712. }
  29713. ]
  29714. }
  29715. },
  29716. "required": ["aggregateID", "seq", "version"],
  29717. "additionalProperties": false
  29718. },
  29719. "location": {
  29720. "$ref": "#/components/schemas/LocationRef"
  29721. },
  29722. "data": {
  29723. "type": "object",
  29724. "properties": {
  29725. "timestamp": {
  29726. "type": "number"
  29727. },
  29728. "sessionID": {
  29729. "type": "string",
  29730. "pattern": "^ses"
  29731. },
  29732. "assistantMessageID": {
  29733. "type": "string",
  29734. "pattern": "^msg_"
  29735. },
  29736. "reasoningID": {
  29737. "type": "string"
  29738. },
  29739. "text": {
  29740. "type": "string"
  29741. },
  29742. "providerMetadata": {
  29743. "$ref": "#/components/schemas/LLMProviderMetadata"
  29744. }
  29745. },
  29746. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  29747. "additionalProperties": false
  29748. }
  29749. },
  29750. "required": ["id", "type", "data"],
  29751. "additionalProperties": false
  29752. },
  29753. "SessionNextRetried": {
  29754. "type": "object",
  29755. "properties": {
  29756. "id": {
  29757. "type": "string",
  29758. "pattern": "^evt_"
  29759. },
  29760. "metadata": {
  29761. "type": "object"
  29762. },
  29763. "type": {
  29764. "type": "string",
  29765. "enum": ["session.next.retried"]
  29766. },
  29767. "durable": {
  29768. "type": "object",
  29769. "properties": {
  29770. "aggregateID": {
  29771. "type": "string"
  29772. },
  29773. "seq": {
  29774. "anyOf": [
  29775. {
  29776. "type": "number"
  29777. },
  29778. {
  29779. "type": "string",
  29780. "enum": ["NaN"]
  29781. },
  29782. {
  29783. "type": "string",
  29784. "enum": ["Infinity"]
  29785. },
  29786. {
  29787. "type": "string",
  29788. "enum": ["-Infinity"]
  29789. }
  29790. ]
  29791. },
  29792. "version": {
  29793. "anyOf": [
  29794. {
  29795. "type": "number"
  29796. },
  29797. {
  29798. "type": "string",
  29799. "enum": ["NaN"]
  29800. },
  29801. {
  29802. "type": "string",
  29803. "enum": ["Infinity"]
  29804. },
  29805. {
  29806. "type": "string",
  29807. "enum": ["-Infinity"]
  29808. }
  29809. ]
  29810. }
  29811. },
  29812. "required": ["aggregateID", "seq", "version"],
  29813. "additionalProperties": false
  29814. },
  29815. "location": {
  29816. "$ref": "#/components/schemas/LocationRef"
  29817. },
  29818. "data": {
  29819. "type": "object",
  29820. "properties": {
  29821. "timestamp": {
  29822. "type": "number"
  29823. },
  29824. "sessionID": {
  29825. "type": "string",
  29826. "pattern": "^ses"
  29827. },
  29828. "attempt": {
  29829. "type": "number"
  29830. },
  29831. "error": {
  29832. "$ref": "#/components/schemas/SessionNextRetry_error"
  29833. }
  29834. },
  29835. "required": ["timestamp", "sessionID", "attempt", "error"],
  29836. "additionalProperties": false
  29837. }
  29838. },
  29839. "required": ["id", "type", "data"],
  29840. "additionalProperties": false
  29841. },
  29842. "SessionNextCompactionStarted": {
  29843. "type": "object",
  29844. "properties": {
  29845. "id": {
  29846. "type": "string",
  29847. "pattern": "^evt_"
  29848. },
  29849. "metadata": {
  29850. "type": "object"
  29851. },
  29852. "type": {
  29853. "type": "string",
  29854. "enum": ["session.next.compaction.started"]
  29855. },
  29856. "durable": {
  29857. "type": "object",
  29858. "properties": {
  29859. "aggregateID": {
  29860. "type": "string"
  29861. },
  29862. "seq": {
  29863. "anyOf": [
  29864. {
  29865. "type": "number"
  29866. },
  29867. {
  29868. "type": "string",
  29869. "enum": ["NaN"]
  29870. },
  29871. {
  29872. "type": "string",
  29873. "enum": ["Infinity"]
  29874. },
  29875. {
  29876. "type": "string",
  29877. "enum": ["-Infinity"]
  29878. }
  29879. ]
  29880. },
  29881. "version": {
  29882. "anyOf": [
  29883. {
  29884. "type": "number"
  29885. },
  29886. {
  29887. "type": "string",
  29888. "enum": ["NaN"]
  29889. },
  29890. {
  29891. "type": "string",
  29892. "enum": ["Infinity"]
  29893. },
  29894. {
  29895. "type": "string",
  29896. "enum": ["-Infinity"]
  29897. }
  29898. ]
  29899. }
  29900. },
  29901. "required": ["aggregateID", "seq", "version"],
  29902. "additionalProperties": false
  29903. },
  29904. "location": {
  29905. "$ref": "#/components/schemas/LocationRef"
  29906. },
  29907. "data": {
  29908. "type": "object",
  29909. "properties": {
  29910. "timestamp": {
  29911. "type": "number"
  29912. },
  29913. "sessionID": {
  29914. "type": "string",
  29915. "pattern": "^ses"
  29916. },
  29917. "messageID": {
  29918. "type": "string",
  29919. "pattern": "^msg_"
  29920. },
  29921. "reason": {
  29922. "type": "string",
  29923. "enum": ["auto", "manual"]
  29924. }
  29925. },
  29926. "required": ["timestamp", "sessionID", "messageID", "reason"],
  29927. "additionalProperties": false
  29928. }
  29929. },
  29930. "required": ["id", "type", "data"],
  29931. "additionalProperties": false
  29932. },
  29933. "SessionNextCompactionEnded": {
  29934. "type": "object",
  29935. "properties": {
  29936. "id": {
  29937. "type": "string",
  29938. "pattern": "^evt_"
  29939. },
  29940. "metadata": {
  29941. "type": "object"
  29942. },
  29943. "type": {
  29944. "type": "string",
  29945. "enum": ["session.next.compaction.ended"]
  29946. },
  29947. "durable": {
  29948. "type": "object",
  29949. "properties": {
  29950. "aggregateID": {
  29951. "type": "string"
  29952. },
  29953. "seq": {
  29954. "anyOf": [
  29955. {
  29956. "type": "number"
  29957. },
  29958. {
  29959. "type": "string",
  29960. "enum": ["NaN"]
  29961. },
  29962. {
  29963. "type": "string",
  29964. "enum": ["Infinity"]
  29965. },
  29966. {
  29967. "type": "string",
  29968. "enum": ["-Infinity"]
  29969. }
  29970. ]
  29971. },
  29972. "version": {
  29973. "anyOf": [
  29974. {
  29975. "type": "number"
  29976. },
  29977. {
  29978. "type": "string",
  29979. "enum": ["NaN"]
  29980. },
  29981. {
  29982. "type": "string",
  29983. "enum": ["Infinity"]
  29984. },
  29985. {
  29986. "type": "string",
  29987. "enum": ["-Infinity"]
  29988. }
  29989. ]
  29990. }
  29991. },
  29992. "required": ["aggregateID", "seq", "version"],
  29993. "additionalProperties": false
  29994. },
  29995. "location": {
  29996. "$ref": "#/components/schemas/LocationRef"
  29997. },
  29998. "data": {
  29999. "type": "object",
  30000. "properties": {
  30001. "timestamp": {
  30002. "type": "number"
  30003. },
  30004. "sessionID": {
  30005. "type": "string",
  30006. "pattern": "^ses"
  30007. },
  30008. "messageID": {
  30009. "type": "string",
  30010. "pattern": "^msg_"
  30011. },
  30012. "reason": {
  30013. "type": "string",
  30014. "enum": ["auto", "manual"]
  30015. },
  30016. "text": {
  30017. "type": "string"
  30018. },
  30019. "recent": {
  30020. "type": "string"
  30021. }
  30022. },
  30023. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  30024. "additionalProperties": false
  30025. }
  30026. },
  30027. "required": ["id", "type", "data"],
  30028. "additionalProperties": false
  30029. },
  30030. "SessionNextRevertStaged": {
  30031. "type": "object",
  30032. "properties": {
  30033. "id": {
  30034. "type": "string",
  30035. "pattern": "^evt_"
  30036. },
  30037. "metadata": {
  30038. "type": "object"
  30039. },
  30040. "type": {
  30041. "type": "string",
  30042. "enum": ["session.next.revert.staged"]
  30043. },
  30044. "durable": {
  30045. "type": "object",
  30046. "properties": {
  30047. "aggregateID": {
  30048. "type": "string"
  30049. },
  30050. "seq": {
  30051. "anyOf": [
  30052. {
  30053. "type": "number"
  30054. },
  30055. {
  30056. "type": "string",
  30057. "enum": ["NaN"]
  30058. },
  30059. {
  30060. "type": "string",
  30061. "enum": ["Infinity"]
  30062. },
  30063. {
  30064. "type": "string",
  30065. "enum": ["-Infinity"]
  30066. }
  30067. ]
  30068. },
  30069. "version": {
  30070. "anyOf": [
  30071. {
  30072. "type": "number"
  30073. },
  30074. {
  30075. "type": "string",
  30076. "enum": ["NaN"]
  30077. },
  30078. {
  30079. "type": "string",
  30080. "enum": ["Infinity"]
  30081. },
  30082. {
  30083. "type": "string",
  30084. "enum": ["-Infinity"]
  30085. }
  30086. ]
  30087. }
  30088. },
  30089. "required": ["aggregateID", "seq", "version"],
  30090. "additionalProperties": false
  30091. },
  30092. "location": {
  30093. "$ref": "#/components/schemas/LocationRef"
  30094. },
  30095. "data": {
  30096. "type": "object",
  30097. "properties": {
  30098. "timestamp": {
  30099. "type": "number"
  30100. },
  30101. "sessionID": {
  30102. "type": "string",
  30103. "pattern": "^ses"
  30104. },
  30105. "revert": {
  30106. "$ref": "#/components/schemas/RevertState"
  30107. }
  30108. },
  30109. "required": ["timestamp", "sessionID", "revert"],
  30110. "additionalProperties": false
  30111. }
  30112. },
  30113. "required": ["id", "type", "data"],
  30114. "additionalProperties": false
  30115. },
  30116. "SessionNextRevertCleared": {
  30117. "type": "object",
  30118. "properties": {
  30119. "id": {
  30120. "type": "string",
  30121. "pattern": "^evt_"
  30122. },
  30123. "metadata": {
  30124. "type": "object"
  30125. },
  30126. "type": {
  30127. "type": "string",
  30128. "enum": ["session.next.revert.cleared"]
  30129. },
  30130. "durable": {
  30131. "type": "object",
  30132. "properties": {
  30133. "aggregateID": {
  30134. "type": "string"
  30135. },
  30136. "seq": {
  30137. "anyOf": [
  30138. {
  30139. "type": "number"
  30140. },
  30141. {
  30142. "type": "string",
  30143. "enum": ["NaN"]
  30144. },
  30145. {
  30146. "type": "string",
  30147. "enum": ["Infinity"]
  30148. },
  30149. {
  30150. "type": "string",
  30151. "enum": ["-Infinity"]
  30152. }
  30153. ]
  30154. },
  30155. "version": {
  30156. "anyOf": [
  30157. {
  30158. "type": "number"
  30159. },
  30160. {
  30161. "type": "string",
  30162. "enum": ["NaN"]
  30163. },
  30164. {
  30165. "type": "string",
  30166. "enum": ["Infinity"]
  30167. },
  30168. {
  30169. "type": "string",
  30170. "enum": ["-Infinity"]
  30171. }
  30172. ]
  30173. }
  30174. },
  30175. "required": ["aggregateID", "seq", "version"],
  30176. "additionalProperties": false
  30177. },
  30178. "location": {
  30179. "$ref": "#/components/schemas/LocationRef"
  30180. },
  30181. "data": {
  30182. "type": "object",
  30183. "properties": {
  30184. "timestamp": {
  30185. "type": "number"
  30186. },
  30187. "sessionID": {
  30188. "type": "string",
  30189. "pattern": "^ses"
  30190. }
  30191. },
  30192. "required": ["timestamp", "sessionID"],
  30193. "additionalProperties": false
  30194. }
  30195. },
  30196. "required": ["id", "type", "data"],
  30197. "additionalProperties": false
  30198. },
  30199. "SessionNextRevertCommitted": {
  30200. "type": "object",
  30201. "properties": {
  30202. "id": {
  30203. "type": "string",
  30204. "pattern": "^evt_"
  30205. },
  30206. "metadata": {
  30207. "type": "object"
  30208. },
  30209. "type": {
  30210. "type": "string",
  30211. "enum": ["session.next.revert.committed"]
  30212. },
  30213. "durable": {
  30214. "type": "object",
  30215. "properties": {
  30216. "aggregateID": {
  30217. "type": "string"
  30218. },
  30219. "seq": {
  30220. "anyOf": [
  30221. {
  30222. "type": "number"
  30223. },
  30224. {
  30225. "type": "string",
  30226. "enum": ["NaN"]
  30227. },
  30228. {
  30229. "type": "string",
  30230. "enum": ["Infinity"]
  30231. },
  30232. {
  30233. "type": "string",
  30234. "enum": ["-Infinity"]
  30235. }
  30236. ]
  30237. },
  30238. "version": {
  30239. "anyOf": [
  30240. {
  30241. "type": "number"
  30242. },
  30243. {
  30244. "type": "string",
  30245. "enum": ["NaN"]
  30246. },
  30247. {
  30248. "type": "string",
  30249. "enum": ["Infinity"]
  30250. },
  30251. {
  30252. "type": "string",
  30253. "enum": ["-Infinity"]
  30254. }
  30255. ]
  30256. }
  30257. },
  30258. "required": ["aggregateID", "seq", "version"],
  30259. "additionalProperties": false
  30260. },
  30261. "location": {
  30262. "$ref": "#/components/schemas/LocationRef"
  30263. },
  30264. "data": {
  30265. "type": "object",
  30266. "properties": {
  30267. "timestamp": {
  30268. "type": "number"
  30269. },
  30270. "sessionID": {
  30271. "type": "string",
  30272. "pattern": "^ses"
  30273. },
  30274. "messageID": {
  30275. "type": "string",
  30276. "pattern": "^msg_"
  30277. }
  30278. },
  30279. "required": ["timestamp", "sessionID", "messageID"],
  30280. "additionalProperties": false
  30281. }
  30282. },
  30283. "required": ["id", "type", "data"],
  30284. "additionalProperties": false
  30285. },
  30286. "ModelApi": {
  30287. "anyOf": [
  30288. {
  30289. "type": "object",
  30290. "properties": {
  30291. "id": {
  30292. "type": "string"
  30293. },
  30294. "type": {
  30295. "type": "string",
  30296. "enum": ["aisdk"]
  30297. },
  30298. "package": {
  30299. "type": "string"
  30300. },
  30301. "url": {
  30302. "type": "string"
  30303. },
  30304. "settings": {
  30305. "type": "object"
  30306. }
  30307. },
  30308. "required": ["id", "type", "package"],
  30309. "additionalProperties": false
  30310. },
  30311. {
  30312. "type": "object",
  30313. "properties": {
  30314. "id": {
  30315. "type": "string"
  30316. },
  30317. "type": {
  30318. "type": "string",
  30319. "enum": ["native"]
  30320. },
  30321. "url": {
  30322. "type": "string"
  30323. },
  30324. "settings": {
  30325. "type": "object"
  30326. }
  30327. },
  30328. "required": ["id", "type", "settings"],
  30329. "additionalProperties": false
  30330. }
  30331. ]
  30332. },
  30333. "ModelCapabilities": {
  30334. "type": "object",
  30335. "properties": {
  30336. "tools": {
  30337. "type": "boolean"
  30338. },
  30339. "input": {
  30340. "type": "array",
  30341. "items": {
  30342. "type": "string"
  30343. }
  30344. },
  30345. "output": {
  30346. "type": "array",
  30347. "items": {
  30348. "type": "string"
  30349. }
  30350. }
  30351. },
  30352. "required": ["tools", "input", "output"],
  30353. "additionalProperties": false
  30354. },
  30355. "ModelCost": {
  30356. "type": "object",
  30357. "properties": {
  30358. "tier": {
  30359. "type": "object",
  30360. "properties": {
  30361. "type": {
  30362. "type": "string",
  30363. "enum": ["context"]
  30364. },
  30365. "size": {
  30366. "type": "integer"
  30367. }
  30368. },
  30369. "required": ["type", "size"],
  30370. "additionalProperties": false
  30371. },
  30372. "input": {
  30373. "type": "number"
  30374. },
  30375. "output": {
  30376. "type": "number"
  30377. },
  30378. "cache": {
  30379. "type": "object",
  30380. "properties": {
  30381. "read": {
  30382. "type": "number"
  30383. },
  30384. "write": {
  30385. "type": "number"
  30386. }
  30387. },
  30388. "required": ["read", "write"],
  30389. "additionalProperties": false
  30390. }
  30391. },
  30392. "required": ["input", "output", "cache"],
  30393. "additionalProperties": false
  30394. },
  30395. "ModelV2Info": {
  30396. "type": "object",
  30397. "properties": {
  30398. "id": {
  30399. "type": "string"
  30400. },
  30401. "providerID": {
  30402. "type": "string"
  30403. },
  30404. "family": {
  30405. "type": "string"
  30406. },
  30407. "name": {
  30408. "type": "string"
  30409. },
  30410. "api": {
  30411. "$ref": "#/components/schemas/ModelApi"
  30412. },
  30413. "capabilities": {
  30414. "$ref": "#/components/schemas/ModelCapabilities"
  30415. },
  30416. "request": {
  30417. "type": "object",
  30418. "properties": {
  30419. "headers": {
  30420. "type": "object",
  30421. "additionalProperties": {
  30422. "type": "string"
  30423. }
  30424. },
  30425. "body": {
  30426. "type": "object"
  30427. },
  30428. "variant": {
  30429. "type": "string"
  30430. }
  30431. },
  30432. "required": ["headers", "body"],
  30433. "additionalProperties": false
  30434. },
  30435. "variants": {
  30436. "type": "array",
  30437. "items": {
  30438. "type": "object",
  30439. "properties": {
  30440. "id": {
  30441. "type": "string"
  30442. },
  30443. "headers": {
  30444. "type": "object",
  30445. "additionalProperties": {
  30446. "type": "string"
  30447. }
  30448. },
  30449. "body": {
  30450. "type": "object"
  30451. }
  30452. },
  30453. "required": ["id", "headers", "body"],
  30454. "additionalProperties": false
  30455. }
  30456. },
  30457. "time": {
  30458. "type": "object",
  30459. "properties": {
  30460. "released": {
  30461. "type": "number"
  30462. }
  30463. },
  30464. "required": ["released"],
  30465. "additionalProperties": false
  30466. },
  30467. "cost": {
  30468. "type": "array",
  30469. "items": {
  30470. "$ref": "#/components/schemas/ModelCost"
  30471. }
  30472. },
  30473. "status": {
  30474. "type": "string",
  30475. "enum": ["alpha", "beta", "deprecated", "active"]
  30476. },
  30477. "enabled": {
  30478. "type": "boolean"
  30479. },
  30480. "limit": {
  30481. "type": "object",
  30482. "properties": {
  30483. "context": {
  30484. "type": "integer"
  30485. },
  30486. "input": {
  30487. "type": "integer"
  30488. },
  30489. "output": {
  30490. "type": "integer"
  30491. }
  30492. },
  30493. "required": ["context", "output"],
  30494. "additionalProperties": false
  30495. }
  30496. },
  30497. "required": [
  30498. "id",
  30499. "providerID",
  30500. "name",
  30501. "api",
  30502. "capabilities",
  30503. "request",
  30504. "variants",
  30505. "time",
  30506. "cost",
  30507. "status",
  30508. "enabled",
  30509. "limit"
  30510. ],
  30511. "additionalProperties": false
  30512. },
  30513. "ProviderAISDK": {
  30514. "type": "object",
  30515. "properties": {
  30516. "type": {
  30517. "type": "string",
  30518. "enum": ["aisdk"]
  30519. },
  30520. "package": {
  30521. "type": "string"
  30522. },
  30523. "url": {
  30524. "type": "string"
  30525. },
  30526. "settings": {
  30527. "type": "object"
  30528. }
  30529. },
  30530. "required": ["type", "package"],
  30531. "additionalProperties": false
  30532. },
  30533. "ProviderNative": {
  30534. "type": "object",
  30535. "properties": {
  30536. "type": {
  30537. "type": "string",
  30538. "enum": ["native"]
  30539. },
  30540. "url": {
  30541. "type": "string"
  30542. },
  30543. "settings": {
  30544. "type": "object"
  30545. }
  30546. },
  30547. "required": ["type", "settings"],
  30548. "additionalProperties": false
  30549. },
  30550. "ProviderApi": {
  30551. "anyOf": [
  30552. {
  30553. "$ref": "#/components/schemas/ProviderAISDK"
  30554. },
  30555. {
  30556. "$ref": "#/components/schemas/ProviderNative"
  30557. }
  30558. ]
  30559. },
  30560. "ProviderV2Info": {
  30561. "type": "object",
  30562. "properties": {
  30563. "id": {
  30564. "type": "string"
  30565. },
  30566. "integrationID": {
  30567. "type": "string"
  30568. },
  30569. "name": {
  30570. "type": "string"
  30571. },
  30572. "disabled": {
  30573. "type": "boolean"
  30574. },
  30575. "api": {
  30576. "$ref": "#/components/schemas/ProviderApi"
  30577. },
  30578. "request": {
  30579. "$ref": "#/components/schemas/ProviderRequest"
  30580. }
  30581. },
  30582. "required": ["id", "name", "api", "request"],
  30583. "additionalProperties": false
  30584. },
  30585. "IntegrationWhen": {
  30586. "type": "object",
  30587. "properties": {
  30588. "key": {
  30589. "type": "string"
  30590. },
  30591. "op": {
  30592. "type": "string",
  30593. "enum": ["eq", "neq"]
  30594. },
  30595. "value": {
  30596. "type": "string"
  30597. }
  30598. },
  30599. "required": ["key", "op", "value"],
  30600. "additionalProperties": false
  30601. },
  30602. "IntegrationTextPrompt": {
  30603. "type": "object",
  30604. "properties": {
  30605. "type": {
  30606. "type": "string",
  30607. "enum": ["text"]
  30608. },
  30609. "key": {
  30610. "type": "string"
  30611. },
  30612. "message": {
  30613. "type": "string"
  30614. },
  30615. "placeholder": {
  30616. "type": "string"
  30617. },
  30618. "when": {
  30619. "$ref": "#/components/schemas/IntegrationWhen"
  30620. }
  30621. },
  30622. "required": ["type", "key", "message"],
  30623. "additionalProperties": false
  30624. },
  30625. "IntegrationSelectPrompt": {
  30626. "type": "object",
  30627. "properties": {
  30628. "type": {
  30629. "type": "string",
  30630. "enum": ["select"]
  30631. },
  30632. "key": {
  30633. "type": "string"
  30634. },
  30635. "message": {
  30636. "type": "string"
  30637. },
  30638. "options": {
  30639. "type": "array",
  30640. "items": {
  30641. "type": "object",
  30642. "properties": {
  30643. "label": {
  30644. "type": "string"
  30645. },
  30646. "value": {
  30647. "type": "string"
  30648. },
  30649. "hint": {
  30650. "type": "string"
  30651. }
  30652. },
  30653. "required": ["label", "value"],
  30654. "additionalProperties": false
  30655. }
  30656. },
  30657. "when": {
  30658. "$ref": "#/components/schemas/IntegrationWhen"
  30659. }
  30660. },
  30661. "required": ["type", "key", "message", "options"],
  30662. "additionalProperties": false
  30663. },
  30664. "IntegrationOAuthMethod": {
  30665. "type": "object",
  30666. "properties": {
  30667. "id": {
  30668. "type": "string"
  30669. },
  30670. "type": {
  30671. "type": "string",
  30672. "enum": ["oauth"]
  30673. },
  30674. "label": {
  30675. "type": "string"
  30676. },
  30677. "prompts": {
  30678. "type": "array",
  30679. "items": {
  30680. "anyOf": [
  30681. {
  30682. "$ref": "#/components/schemas/IntegrationTextPrompt"
  30683. },
  30684. {
  30685. "$ref": "#/components/schemas/IntegrationSelectPrompt"
  30686. }
  30687. ]
  30688. }
  30689. }
  30690. },
  30691. "required": ["id", "type", "label"],
  30692. "additionalProperties": false
  30693. },
  30694. "IntegrationKeyMethod": {
  30695. "type": "object",
  30696. "properties": {
  30697. "type": {
  30698. "type": "string",
  30699. "enum": ["key"]
  30700. },
  30701. "label": {
  30702. "type": "string"
  30703. }
  30704. },
  30705. "required": ["type"],
  30706. "additionalProperties": false
  30707. },
  30708. "IntegrationEnvMethod": {
  30709. "type": "object",
  30710. "properties": {
  30711. "type": {
  30712. "type": "string",
  30713. "enum": ["env"]
  30714. },
  30715. "names": {
  30716. "type": "array",
  30717. "items": {
  30718. "type": "string"
  30719. }
  30720. }
  30721. },
  30722. "required": ["type", "names"],
  30723. "additionalProperties": false
  30724. },
  30725. "ConnectionCredentialInfo": {
  30726. "type": "object",
  30727. "properties": {
  30728. "type": {
  30729. "type": "string",
  30730. "enum": ["credential"]
  30731. },
  30732. "id": {
  30733. "type": "string"
  30734. },
  30735. "label": {
  30736. "type": "string"
  30737. }
  30738. },
  30739. "required": ["type", "id", "label"],
  30740. "additionalProperties": false
  30741. },
  30742. "ConnectionEnvInfo": {
  30743. "type": "object",
  30744. "properties": {
  30745. "type": {
  30746. "type": "string",
  30747. "enum": ["env"]
  30748. },
  30749. "name": {
  30750. "type": "string"
  30751. }
  30752. },
  30753. "required": ["type", "name"],
  30754. "additionalProperties": false
  30755. },
  30756. "ConnectionInfo": {
  30757. "anyOf": [
  30758. {
  30759. "$ref": "#/components/schemas/ConnectionCredentialInfo"
  30760. },
  30761. {
  30762. "$ref": "#/components/schemas/ConnectionEnvInfo"
  30763. }
  30764. ]
  30765. },
  30766. "IntegrationInfo": {
  30767. "type": "object",
  30768. "properties": {
  30769. "id": {
  30770. "type": "string"
  30771. },
  30772. "name": {
  30773. "type": "string"
  30774. },
  30775. "methods": {
  30776. "type": "array",
  30777. "items": {
  30778. "$ref": "#/components/schemas/IntegrationMethod"
  30779. }
  30780. },
  30781. "connections": {
  30782. "type": "array",
  30783. "items": {
  30784. "$ref": "#/components/schemas/ConnectionInfo"
  30785. }
  30786. }
  30787. },
  30788. "required": ["id", "name", "methods", "connections"],
  30789. "additionalProperties": false
  30790. },
  30791. "IntegrationAttempt": {
  30792. "type": "object",
  30793. "properties": {
  30794. "attemptID": {
  30795. "type": "string"
  30796. },
  30797. "url": {
  30798. "type": "string"
  30799. },
  30800. "instructions": {
  30801. "type": "string"
  30802. },
  30803. "mode": {
  30804. "type": "string",
  30805. "enum": ["auto", "code"]
  30806. },
  30807. "time": {
  30808. "type": "object",
  30809. "properties": {
  30810. "created": {
  30811. "anyOf": [
  30812. {
  30813. "type": "number"
  30814. },
  30815. {
  30816. "type": "string",
  30817. "enum": ["NaN"]
  30818. },
  30819. {
  30820. "type": "string",
  30821. "enum": ["Infinity"]
  30822. },
  30823. {
  30824. "type": "string",
  30825. "enum": ["-Infinity"]
  30826. },
  30827. {
  30828. "type": "string",
  30829. "enum": ["Infinity", "-Infinity", "NaN"]
  30830. }
  30831. ]
  30832. },
  30833. "expires": {
  30834. "anyOf": [
  30835. {
  30836. "type": "number"
  30837. },
  30838. {
  30839. "type": "string",
  30840. "enum": ["NaN"]
  30841. },
  30842. {
  30843. "type": "string",
  30844. "enum": ["Infinity"]
  30845. },
  30846. {
  30847. "type": "string",
  30848. "enum": ["-Infinity"]
  30849. },
  30850. {
  30851. "type": "string",
  30852. "enum": ["Infinity", "-Infinity", "NaN"]
  30853. }
  30854. ]
  30855. }
  30856. },
  30857. "required": ["created", "expires"],
  30858. "additionalProperties": false
  30859. }
  30860. },
  30861. "required": ["attemptID", "url", "instructions", "mode", "time"],
  30862. "additionalProperties": false
  30863. },
  30864. "IntegrationAttemptStatus": {
  30865. "anyOf": [
  30866. {
  30867. "type": "object",
  30868. "properties": {
  30869. "status": {
  30870. "type": "string",
  30871. "enum": ["pending"]
  30872. },
  30873. "time": {
  30874. "type": "object",
  30875. "properties": {
  30876. "created": {
  30877. "anyOf": [
  30878. {
  30879. "type": "number"
  30880. },
  30881. {
  30882. "type": "string",
  30883. "enum": ["NaN"]
  30884. },
  30885. {
  30886. "type": "string",
  30887. "enum": ["Infinity"]
  30888. },
  30889. {
  30890. "type": "string",
  30891. "enum": ["-Infinity"]
  30892. },
  30893. {
  30894. "type": "string",
  30895. "enum": ["Infinity", "-Infinity", "NaN"]
  30896. }
  30897. ]
  30898. },
  30899. "expires": {
  30900. "anyOf": [
  30901. {
  30902. "type": "number"
  30903. },
  30904. {
  30905. "type": "string",
  30906. "enum": ["NaN"]
  30907. },
  30908. {
  30909. "type": "string",
  30910. "enum": ["Infinity"]
  30911. },
  30912. {
  30913. "type": "string",
  30914. "enum": ["-Infinity"]
  30915. },
  30916. {
  30917. "type": "string",
  30918. "enum": ["Infinity", "-Infinity", "NaN"]
  30919. }
  30920. ]
  30921. }
  30922. },
  30923. "required": ["created", "expires"],
  30924. "additionalProperties": false
  30925. }
  30926. },
  30927. "required": ["status", "time"],
  30928. "additionalProperties": false
  30929. },
  30930. {
  30931. "type": "object",
  30932. "properties": {
  30933. "status": {
  30934. "type": "string",
  30935. "enum": ["complete"]
  30936. },
  30937. "time": {
  30938. "type": "object",
  30939. "properties": {
  30940. "created": {
  30941. "anyOf": [
  30942. {
  30943. "type": "number"
  30944. },
  30945. {
  30946. "type": "string",
  30947. "enum": ["NaN"]
  30948. },
  30949. {
  30950. "type": "string",
  30951. "enum": ["Infinity"]
  30952. },
  30953. {
  30954. "type": "string",
  30955. "enum": ["-Infinity"]
  30956. },
  30957. {
  30958. "type": "string",
  30959. "enum": ["Infinity", "-Infinity", "NaN"]
  30960. }
  30961. ]
  30962. },
  30963. "expires": {
  30964. "anyOf": [
  30965. {
  30966. "type": "number"
  30967. },
  30968. {
  30969. "type": "string",
  30970. "enum": ["NaN"]
  30971. },
  30972. {
  30973. "type": "string",
  30974. "enum": ["Infinity"]
  30975. },
  30976. {
  30977. "type": "string",
  30978. "enum": ["-Infinity"]
  30979. },
  30980. {
  30981. "type": "string",
  30982. "enum": ["Infinity", "-Infinity", "NaN"]
  30983. }
  30984. ]
  30985. }
  30986. },
  30987. "required": ["created", "expires"],
  30988. "additionalProperties": false
  30989. }
  30990. },
  30991. "required": ["status", "time"],
  30992. "additionalProperties": false
  30993. },
  30994. {
  30995. "type": "object",
  30996. "properties": {
  30997. "status": {
  30998. "type": "string",
  30999. "enum": ["failed"]
  31000. },
  31001. "message": {
  31002. "type": "string"
  31003. },
  31004. "time": {
  31005. "type": "object",
  31006. "properties": {
  31007. "created": {
  31008. "anyOf": [
  31009. {
  31010. "type": "number"
  31011. },
  31012. {
  31013. "type": "string",
  31014. "enum": ["NaN"]
  31015. },
  31016. {
  31017. "type": "string",
  31018. "enum": ["Infinity"]
  31019. },
  31020. {
  31021. "type": "string",
  31022. "enum": ["-Infinity"]
  31023. },
  31024. {
  31025. "type": "string",
  31026. "enum": ["Infinity", "-Infinity", "NaN"]
  31027. }
  31028. ]
  31029. },
  31030. "expires": {
  31031. "anyOf": [
  31032. {
  31033. "type": "number"
  31034. },
  31035. {
  31036. "type": "string",
  31037. "enum": ["NaN"]
  31038. },
  31039. {
  31040. "type": "string",
  31041. "enum": ["Infinity"]
  31042. },
  31043. {
  31044. "type": "string",
  31045. "enum": ["-Infinity"]
  31046. },
  31047. {
  31048. "type": "string",
  31049. "enum": ["Infinity", "-Infinity", "NaN"]
  31050. }
  31051. ]
  31052. }
  31053. },
  31054. "required": ["created", "expires"],
  31055. "additionalProperties": false
  31056. }
  31057. },
  31058. "required": ["status", "message", "time"],
  31059. "additionalProperties": false
  31060. },
  31061. {
  31062. "type": "object",
  31063. "properties": {
  31064. "status": {
  31065. "type": "string",
  31066. "enum": ["expired"]
  31067. },
  31068. "time": {
  31069. "type": "object",
  31070. "properties": {
  31071. "created": {
  31072. "anyOf": [
  31073. {
  31074. "type": "number"
  31075. },
  31076. {
  31077. "type": "string",
  31078. "enum": ["NaN"]
  31079. },
  31080. {
  31081. "type": "string",
  31082. "enum": ["Infinity"]
  31083. },
  31084. {
  31085. "type": "string",
  31086. "enum": ["-Infinity"]
  31087. },
  31088. {
  31089. "type": "string",
  31090. "enum": ["Infinity", "-Infinity", "NaN"]
  31091. }
  31092. ]
  31093. },
  31094. "expires": {
  31095. "anyOf": [
  31096. {
  31097. "type": "number"
  31098. },
  31099. {
  31100. "type": "string",
  31101. "enum": ["NaN"]
  31102. },
  31103. {
  31104. "type": "string",
  31105. "enum": ["Infinity"]
  31106. },
  31107. {
  31108. "type": "string",
  31109. "enum": ["-Infinity"]
  31110. },
  31111. {
  31112. "type": "string",
  31113. "enum": ["Infinity", "-Infinity", "NaN"]
  31114. }
  31115. ]
  31116. }
  31117. },
  31118. "required": ["created", "expires"],
  31119. "additionalProperties": false
  31120. }
  31121. },
  31122. "required": ["status", "time"],
  31123. "additionalProperties": false
  31124. }
  31125. ]
  31126. },
  31127. "PermissionV2Request": {
  31128. "type": "object",
  31129. "properties": {
  31130. "id": {
  31131. "type": "string",
  31132. "pattern": "^per"
  31133. },
  31134. "sessionID": {
  31135. "type": "string",
  31136. "pattern": "^ses"
  31137. },
  31138. "action": {
  31139. "type": "string"
  31140. },
  31141. "resources": {
  31142. "type": "array",
  31143. "items": {
  31144. "type": "string"
  31145. }
  31146. },
  31147. "save": {
  31148. "type": "array",
  31149. "items": {
  31150. "type": "string"
  31151. }
  31152. },
  31153. "metadata": {
  31154. "type": "object"
  31155. },
  31156. "source": {
  31157. "$ref": "#/components/schemas/PermissionV2Source"
  31158. }
  31159. },
  31160. "required": ["id", "sessionID", "action", "resources"],
  31161. "additionalProperties": false
  31162. },
  31163. "PermissionSavedInfo": {
  31164. "type": "object",
  31165. "properties": {
  31166. "id": {
  31167. "type": "string"
  31168. },
  31169. "projectID": {
  31170. "type": "string"
  31171. },
  31172. "action": {
  31173. "type": "string"
  31174. },
  31175. "resource": {
  31176. "type": "string"
  31177. }
  31178. },
  31179. "required": ["id", "projectID", "action", "resource"],
  31180. "additionalProperties": false
  31181. },
  31182. "FileSystemEntry": {
  31183. "type": "object",
  31184. "properties": {
  31185. "path": {
  31186. "type": "string"
  31187. },
  31188. "type": {
  31189. "type": "string",
  31190. "enum": ["file", "directory"]
  31191. }
  31192. },
  31193. "required": ["path", "type"],
  31194. "additionalProperties": false
  31195. },
  31196. "CommandV2Info": {
  31197. "type": "object",
  31198. "properties": {
  31199. "name": {
  31200. "type": "string"
  31201. },
  31202. "template": {
  31203. "type": "string"
  31204. },
  31205. "description": {
  31206. "type": "string"
  31207. },
  31208. "agent": {
  31209. "type": "string"
  31210. },
  31211. "model": {
  31212. "$ref": "#/components/schemas/ModelRef"
  31213. },
  31214. "subtask": {
  31215. "type": "boolean"
  31216. }
  31217. },
  31218. "required": ["name", "template"],
  31219. "additionalProperties": false
  31220. },
  31221. "SkillV2Info": {
  31222. "type": "object",
  31223. "properties": {
  31224. "name": {
  31225. "type": "string"
  31226. },
  31227. "description": {
  31228. "type": "string"
  31229. },
  31230. "slash": {
  31231. "type": "boolean"
  31232. },
  31233. "location": {
  31234. "type": "string"
  31235. },
  31236. "content": {
  31237. "type": "string"
  31238. }
  31239. },
  31240. "required": ["name", "location", "content"],
  31241. "additionalProperties": false
  31242. },
  31243. "V2EventModels-devRefreshed": {
  31244. "type": "object",
  31245. "properties": {
  31246. "id": {
  31247. "type": "string",
  31248. "pattern": "^evt_"
  31249. },
  31250. "metadata": {
  31251. "type": "object"
  31252. },
  31253. "durable": {
  31254. "type": "object",
  31255. "properties": {
  31256. "aggregateID": {
  31257. "type": "string"
  31258. },
  31259. "seq": {
  31260. "type": "integer"
  31261. },
  31262. "version": {
  31263. "type": "integer"
  31264. }
  31265. },
  31266. "required": ["aggregateID", "seq", "version"],
  31267. "additionalProperties": false
  31268. },
  31269. "location": {
  31270. "$ref": "#/components/schemas/LocationRef"
  31271. },
  31272. "type": {
  31273. "type": "string",
  31274. "enum": ["models-dev.refreshed"]
  31275. },
  31276. "data": {
  31277. "type": "object",
  31278. "properties": {}
  31279. }
  31280. },
  31281. "required": ["id", "type", "data"],
  31282. "additionalProperties": false
  31283. },
  31284. "V2EventIntegrationUpdated": {
  31285. "type": "object",
  31286. "properties": {
  31287. "id": {
  31288. "type": "string",
  31289. "pattern": "^evt_"
  31290. },
  31291. "metadata": {
  31292. "type": "object"
  31293. },
  31294. "durable": {
  31295. "type": "object",
  31296. "properties": {
  31297. "aggregateID": {
  31298. "type": "string"
  31299. },
  31300. "seq": {
  31301. "type": "integer"
  31302. },
  31303. "version": {
  31304. "type": "integer"
  31305. }
  31306. },
  31307. "required": ["aggregateID", "seq", "version"],
  31308. "additionalProperties": false
  31309. },
  31310. "location": {
  31311. "$ref": "#/components/schemas/LocationRef"
  31312. },
  31313. "type": {
  31314. "type": "string",
  31315. "enum": ["integration.updated"]
  31316. },
  31317. "data": {
  31318. "type": "object",
  31319. "properties": {}
  31320. }
  31321. },
  31322. "required": ["id", "type", "data"],
  31323. "additionalProperties": false
  31324. },
  31325. "V2EventIntegrationConnectionUpdated": {
  31326. "type": "object",
  31327. "properties": {
  31328. "id": {
  31329. "type": "string",
  31330. "pattern": "^evt_"
  31331. },
  31332. "metadata": {
  31333. "type": "object"
  31334. },
  31335. "durable": {
  31336. "type": "object",
  31337. "properties": {
  31338. "aggregateID": {
  31339. "type": "string"
  31340. },
  31341. "seq": {
  31342. "type": "integer"
  31343. },
  31344. "version": {
  31345. "type": "integer"
  31346. }
  31347. },
  31348. "required": ["aggregateID", "seq", "version"],
  31349. "additionalProperties": false
  31350. },
  31351. "location": {
  31352. "$ref": "#/components/schemas/LocationRef"
  31353. },
  31354. "type": {
  31355. "type": "string",
  31356. "enum": ["integration.connection.updated"]
  31357. },
  31358. "data": {
  31359. "type": "object",
  31360. "properties": {
  31361. "integrationID": {
  31362. "type": "string"
  31363. }
  31364. },
  31365. "required": ["integrationID"],
  31366. "additionalProperties": false
  31367. }
  31368. },
  31369. "required": ["id", "type", "data"],
  31370. "additionalProperties": false
  31371. },
  31372. "V2EventCatalogUpdated": {
  31373. "type": "object",
  31374. "properties": {
  31375. "id": {
  31376. "type": "string",
  31377. "pattern": "^evt_"
  31378. },
  31379. "metadata": {
  31380. "type": "object"
  31381. },
  31382. "durable": {
  31383. "type": "object",
  31384. "properties": {
  31385. "aggregateID": {
  31386. "type": "string"
  31387. },
  31388. "seq": {
  31389. "type": "integer"
  31390. },
  31391. "version": {
  31392. "type": "integer"
  31393. }
  31394. },
  31395. "required": ["aggregateID", "seq", "version"],
  31396. "additionalProperties": false
  31397. },
  31398. "location": {
  31399. "$ref": "#/components/schemas/LocationRef"
  31400. },
  31401. "type": {
  31402. "type": "string",
  31403. "enum": ["catalog.updated"]
  31404. },
  31405. "data": {
  31406. "type": "object",
  31407. "properties": {}
  31408. }
  31409. },
  31410. "required": ["id", "type", "data"],
  31411. "additionalProperties": false
  31412. },
  31413. "V2EventSessionCreated": {
  31414. "type": "object",
  31415. "properties": {
  31416. "id": {
  31417. "type": "string",
  31418. "pattern": "^evt_"
  31419. },
  31420. "metadata": {
  31421. "type": "object"
  31422. },
  31423. "durable": {
  31424. "type": "object",
  31425. "properties": {
  31426. "aggregateID": {
  31427. "type": "string"
  31428. },
  31429. "seq": {
  31430. "type": "integer"
  31431. },
  31432. "version": {
  31433. "type": "integer"
  31434. }
  31435. },
  31436. "required": ["aggregateID", "seq", "version"],
  31437. "additionalProperties": false
  31438. },
  31439. "location": {
  31440. "$ref": "#/components/schemas/LocationRef"
  31441. },
  31442. "type": {
  31443. "type": "string",
  31444. "enum": ["session.created"]
  31445. },
  31446. "data": {
  31447. "type": "object",
  31448. "properties": {
  31449. "sessionID": {
  31450. "type": "string",
  31451. "pattern": "^ses"
  31452. },
  31453. "info": {
  31454. "$ref": "#/components/schemas/Session"
  31455. }
  31456. },
  31457. "required": ["sessionID", "info"],
  31458. "additionalProperties": false
  31459. }
  31460. },
  31461. "required": ["id", "type", "data"],
  31462. "additionalProperties": false
  31463. },
  31464. "V2EventSessionUpdated": {
  31465. "type": "object",
  31466. "properties": {
  31467. "id": {
  31468. "type": "string",
  31469. "pattern": "^evt_"
  31470. },
  31471. "metadata": {
  31472. "type": "object"
  31473. },
  31474. "durable": {
  31475. "type": "object",
  31476. "properties": {
  31477. "aggregateID": {
  31478. "type": "string"
  31479. },
  31480. "seq": {
  31481. "type": "integer"
  31482. },
  31483. "version": {
  31484. "type": "integer"
  31485. }
  31486. },
  31487. "required": ["aggregateID", "seq", "version"],
  31488. "additionalProperties": false
  31489. },
  31490. "location": {
  31491. "$ref": "#/components/schemas/LocationRef"
  31492. },
  31493. "type": {
  31494. "type": "string",
  31495. "enum": ["session.updated"]
  31496. },
  31497. "data": {
  31498. "type": "object",
  31499. "properties": {
  31500. "sessionID": {
  31501. "type": "string",
  31502. "pattern": "^ses"
  31503. },
  31504. "info": {
  31505. "$ref": "#/components/schemas/Session"
  31506. }
  31507. },
  31508. "required": ["sessionID", "info"],
  31509. "additionalProperties": false
  31510. }
  31511. },
  31512. "required": ["id", "type", "data"],
  31513. "additionalProperties": false
  31514. },
  31515. "V2EventSessionDeleted": {
  31516. "type": "object",
  31517. "properties": {
  31518. "id": {
  31519. "type": "string",
  31520. "pattern": "^evt_"
  31521. },
  31522. "metadata": {
  31523. "type": "object"
  31524. },
  31525. "durable": {
  31526. "type": "object",
  31527. "properties": {
  31528. "aggregateID": {
  31529. "type": "string"
  31530. },
  31531. "seq": {
  31532. "type": "integer"
  31533. },
  31534. "version": {
  31535. "type": "integer"
  31536. }
  31537. },
  31538. "required": ["aggregateID", "seq", "version"],
  31539. "additionalProperties": false
  31540. },
  31541. "location": {
  31542. "$ref": "#/components/schemas/LocationRef"
  31543. },
  31544. "type": {
  31545. "type": "string",
  31546. "enum": ["session.deleted"]
  31547. },
  31548. "data": {
  31549. "type": "object",
  31550. "properties": {
  31551. "sessionID": {
  31552. "type": "string",
  31553. "pattern": "^ses"
  31554. },
  31555. "info": {
  31556. "$ref": "#/components/schemas/Session"
  31557. }
  31558. },
  31559. "required": ["sessionID", "info"],
  31560. "additionalProperties": false
  31561. }
  31562. },
  31563. "required": ["id", "type", "data"],
  31564. "additionalProperties": false
  31565. },
  31566. "V2EventMessageUpdated": {
  31567. "type": "object",
  31568. "properties": {
  31569. "id": {
  31570. "type": "string",
  31571. "pattern": "^evt_"
  31572. },
  31573. "metadata": {
  31574. "type": "object"
  31575. },
  31576. "durable": {
  31577. "type": "object",
  31578. "properties": {
  31579. "aggregateID": {
  31580. "type": "string"
  31581. },
  31582. "seq": {
  31583. "type": "integer"
  31584. },
  31585. "version": {
  31586. "type": "integer"
  31587. }
  31588. },
  31589. "required": ["aggregateID", "seq", "version"],
  31590. "additionalProperties": false
  31591. },
  31592. "location": {
  31593. "$ref": "#/components/schemas/LocationRef"
  31594. },
  31595. "type": {
  31596. "type": "string",
  31597. "enum": ["message.updated"]
  31598. },
  31599. "data": {
  31600. "type": "object",
  31601. "properties": {
  31602. "sessionID": {
  31603. "type": "string",
  31604. "pattern": "^ses"
  31605. },
  31606. "info": {
  31607. "$ref": "#/components/schemas/Message"
  31608. }
  31609. },
  31610. "required": ["sessionID", "info"],
  31611. "additionalProperties": false
  31612. }
  31613. },
  31614. "required": ["id", "type", "data"],
  31615. "additionalProperties": false
  31616. },
  31617. "V2EventMessageRemoved": {
  31618. "type": "object",
  31619. "properties": {
  31620. "id": {
  31621. "type": "string",
  31622. "pattern": "^evt_"
  31623. },
  31624. "metadata": {
  31625. "type": "object"
  31626. },
  31627. "durable": {
  31628. "type": "object",
  31629. "properties": {
  31630. "aggregateID": {
  31631. "type": "string"
  31632. },
  31633. "seq": {
  31634. "type": "integer"
  31635. },
  31636. "version": {
  31637. "type": "integer"
  31638. }
  31639. },
  31640. "required": ["aggregateID", "seq", "version"],
  31641. "additionalProperties": false
  31642. },
  31643. "location": {
  31644. "$ref": "#/components/schemas/LocationRef"
  31645. },
  31646. "type": {
  31647. "type": "string",
  31648. "enum": ["message.removed"]
  31649. },
  31650. "data": {
  31651. "type": "object",
  31652. "properties": {
  31653. "sessionID": {
  31654. "type": "string",
  31655. "pattern": "^ses"
  31656. },
  31657. "messageID": {
  31658. "type": "string",
  31659. "pattern": "^msg"
  31660. }
  31661. },
  31662. "required": ["sessionID", "messageID"],
  31663. "additionalProperties": false
  31664. }
  31665. },
  31666. "required": ["id", "type", "data"],
  31667. "additionalProperties": false
  31668. },
  31669. "V2EventMessagePartUpdated": {
  31670. "type": "object",
  31671. "properties": {
  31672. "id": {
  31673. "type": "string",
  31674. "pattern": "^evt_"
  31675. },
  31676. "metadata": {
  31677. "type": "object"
  31678. },
  31679. "durable": {
  31680. "type": "object",
  31681. "properties": {
  31682. "aggregateID": {
  31683. "type": "string"
  31684. },
  31685. "seq": {
  31686. "type": "integer"
  31687. },
  31688. "version": {
  31689. "type": "integer"
  31690. }
  31691. },
  31692. "required": ["aggregateID", "seq", "version"],
  31693. "additionalProperties": false
  31694. },
  31695. "location": {
  31696. "$ref": "#/components/schemas/LocationRef"
  31697. },
  31698. "type": {
  31699. "type": "string",
  31700. "enum": ["message.part.updated"]
  31701. },
  31702. "data": {
  31703. "type": "object",
  31704. "properties": {
  31705. "sessionID": {
  31706. "type": "string",
  31707. "pattern": "^ses"
  31708. },
  31709. "part": {
  31710. "$ref": "#/components/schemas/Part"
  31711. },
  31712. "time": {
  31713. "type": "number"
  31714. }
  31715. },
  31716. "required": ["sessionID", "part", "time"],
  31717. "additionalProperties": false
  31718. }
  31719. },
  31720. "required": ["id", "type", "data"],
  31721. "additionalProperties": false
  31722. },
  31723. "V2EventMessagePartRemoved": {
  31724. "type": "object",
  31725. "properties": {
  31726. "id": {
  31727. "type": "string",
  31728. "pattern": "^evt_"
  31729. },
  31730. "metadata": {
  31731. "type": "object"
  31732. },
  31733. "durable": {
  31734. "type": "object",
  31735. "properties": {
  31736. "aggregateID": {
  31737. "type": "string"
  31738. },
  31739. "seq": {
  31740. "type": "integer"
  31741. },
  31742. "version": {
  31743. "type": "integer"
  31744. }
  31745. },
  31746. "required": ["aggregateID", "seq", "version"],
  31747. "additionalProperties": false
  31748. },
  31749. "location": {
  31750. "$ref": "#/components/schemas/LocationRef"
  31751. },
  31752. "type": {
  31753. "type": "string",
  31754. "enum": ["message.part.removed"]
  31755. },
  31756. "data": {
  31757. "type": "object",
  31758. "properties": {
  31759. "sessionID": {
  31760. "type": "string",
  31761. "pattern": "^ses"
  31762. },
  31763. "messageID": {
  31764. "type": "string",
  31765. "pattern": "^msg"
  31766. },
  31767. "partID": {
  31768. "type": "string",
  31769. "pattern": "^prt"
  31770. }
  31771. },
  31772. "required": ["sessionID", "messageID", "partID"],
  31773. "additionalProperties": false
  31774. }
  31775. },
  31776. "required": ["id", "type", "data"],
  31777. "additionalProperties": false
  31778. },
  31779. "V2EventSessionNextAgentSwitched": {
  31780. "type": "object",
  31781. "properties": {
  31782. "id": {
  31783. "type": "string",
  31784. "pattern": "^evt_"
  31785. },
  31786. "metadata": {
  31787. "type": "object"
  31788. },
  31789. "durable": {
  31790. "type": "object",
  31791. "properties": {
  31792. "aggregateID": {
  31793. "type": "string"
  31794. },
  31795. "seq": {
  31796. "type": "integer"
  31797. },
  31798. "version": {
  31799. "type": "integer"
  31800. }
  31801. },
  31802. "required": ["aggregateID", "seq", "version"],
  31803. "additionalProperties": false
  31804. },
  31805. "location": {
  31806. "$ref": "#/components/schemas/LocationRef"
  31807. },
  31808. "type": {
  31809. "type": "string",
  31810. "enum": ["session.next.agent.switched"]
  31811. },
  31812. "data": {
  31813. "type": "object",
  31814. "properties": {
  31815. "timestamp": {
  31816. "type": "number"
  31817. },
  31818. "sessionID": {
  31819. "type": "string",
  31820. "pattern": "^ses"
  31821. },
  31822. "messageID": {
  31823. "type": "string",
  31824. "pattern": "^msg_"
  31825. },
  31826. "agent": {
  31827. "type": "string"
  31828. }
  31829. },
  31830. "required": ["timestamp", "sessionID", "messageID", "agent"],
  31831. "additionalProperties": false
  31832. }
  31833. },
  31834. "required": ["id", "type", "data"],
  31835. "additionalProperties": false
  31836. },
  31837. "V2EventSessionNextModelSwitched": {
  31838. "type": "object",
  31839. "properties": {
  31840. "id": {
  31841. "type": "string",
  31842. "pattern": "^evt_"
  31843. },
  31844. "metadata": {
  31845. "type": "object"
  31846. },
  31847. "durable": {
  31848. "type": "object",
  31849. "properties": {
  31850. "aggregateID": {
  31851. "type": "string"
  31852. },
  31853. "seq": {
  31854. "type": "integer"
  31855. },
  31856. "version": {
  31857. "type": "integer"
  31858. }
  31859. },
  31860. "required": ["aggregateID", "seq", "version"],
  31861. "additionalProperties": false
  31862. },
  31863. "location": {
  31864. "$ref": "#/components/schemas/LocationRef"
  31865. },
  31866. "type": {
  31867. "type": "string",
  31868. "enum": ["session.next.model.switched"]
  31869. },
  31870. "data": {
  31871. "type": "object",
  31872. "properties": {
  31873. "timestamp": {
  31874. "type": "number"
  31875. },
  31876. "sessionID": {
  31877. "type": "string",
  31878. "pattern": "^ses"
  31879. },
  31880. "messageID": {
  31881. "type": "string",
  31882. "pattern": "^msg_"
  31883. },
  31884. "model": {
  31885. "$ref": "#/components/schemas/ModelRef"
  31886. }
  31887. },
  31888. "required": ["timestamp", "sessionID", "messageID", "model"],
  31889. "additionalProperties": false
  31890. }
  31891. },
  31892. "required": ["id", "type", "data"],
  31893. "additionalProperties": false
  31894. },
  31895. "V2EventSessionNextMoved": {
  31896. "type": "object",
  31897. "properties": {
  31898. "id": {
  31899. "type": "string",
  31900. "pattern": "^evt_"
  31901. },
  31902. "metadata": {
  31903. "type": "object"
  31904. },
  31905. "durable": {
  31906. "type": "object",
  31907. "properties": {
  31908. "aggregateID": {
  31909. "type": "string"
  31910. },
  31911. "seq": {
  31912. "type": "integer"
  31913. },
  31914. "version": {
  31915. "type": "integer"
  31916. }
  31917. },
  31918. "required": ["aggregateID", "seq", "version"],
  31919. "additionalProperties": false
  31920. },
  31921. "location": {
  31922. "$ref": "#/components/schemas/LocationRef"
  31923. },
  31924. "type": {
  31925. "type": "string",
  31926. "enum": ["session.next.moved"]
  31927. },
  31928. "data": {
  31929. "type": "object",
  31930. "properties": {
  31931. "timestamp": {
  31932. "type": "number"
  31933. },
  31934. "sessionID": {
  31935. "type": "string",
  31936. "pattern": "^ses"
  31937. },
  31938. "location": {
  31939. "$ref": "#/components/schemas/LocationRef"
  31940. },
  31941. "subdirectory": {
  31942. "type": "string"
  31943. }
  31944. },
  31945. "required": ["timestamp", "sessionID", "location"],
  31946. "additionalProperties": false
  31947. }
  31948. },
  31949. "required": ["id", "type", "data"],
  31950. "additionalProperties": false
  31951. },
  31952. "V2EventSessionNextPrompted": {
  31953. "type": "object",
  31954. "properties": {
  31955. "id": {
  31956. "type": "string",
  31957. "pattern": "^evt_"
  31958. },
  31959. "metadata": {
  31960. "type": "object"
  31961. },
  31962. "durable": {
  31963. "type": "object",
  31964. "properties": {
  31965. "aggregateID": {
  31966. "type": "string"
  31967. },
  31968. "seq": {
  31969. "type": "integer"
  31970. },
  31971. "version": {
  31972. "type": "integer"
  31973. }
  31974. },
  31975. "required": ["aggregateID", "seq", "version"],
  31976. "additionalProperties": false
  31977. },
  31978. "location": {
  31979. "$ref": "#/components/schemas/LocationRef"
  31980. },
  31981. "type": {
  31982. "type": "string",
  31983. "enum": ["session.next.prompted"]
  31984. },
  31985. "data": {
  31986. "type": "object",
  31987. "properties": {
  31988. "timestamp": {
  31989. "type": "number"
  31990. },
  31991. "sessionID": {
  31992. "type": "string",
  31993. "pattern": "^ses"
  31994. },
  31995. "messageID": {
  31996. "type": "string",
  31997. "pattern": "^msg_"
  31998. },
  31999. "prompt": {
  32000. "$ref": "#/components/schemas/Prompt"
  32001. },
  32002. "delivery": {
  32003. "type": "string",
  32004. "enum": ["steer", "queue"]
  32005. }
  32006. },
  32007. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  32008. "additionalProperties": false
  32009. }
  32010. },
  32011. "required": ["id", "type", "data"],
  32012. "additionalProperties": false
  32013. },
  32014. "V2EventSessionNextPromptAdmitted": {
  32015. "type": "object",
  32016. "properties": {
  32017. "id": {
  32018. "type": "string",
  32019. "pattern": "^evt_"
  32020. },
  32021. "metadata": {
  32022. "type": "object"
  32023. },
  32024. "durable": {
  32025. "type": "object",
  32026. "properties": {
  32027. "aggregateID": {
  32028. "type": "string"
  32029. },
  32030. "seq": {
  32031. "type": "integer"
  32032. },
  32033. "version": {
  32034. "type": "integer"
  32035. }
  32036. },
  32037. "required": ["aggregateID", "seq", "version"],
  32038. "additionalProperties": false
  32039. },
  32040. "location": {
  32041. "$ref": "#/components/schemas/LocationRef"
  32042. },
  32043. "type": {
  32044. "type": "string",
  32045. "enum": ["session.next.prompt.admitted"]
  32046. },
  32047. "data": {
  32048. "type": "object",
  32049. "properties": {
  32050. "timestamp": {
  32051. "type": "number"
  32052. },
  32053. "sessionID": {
  32054. "type": "string",
  32055. "pattern": "^ses"
  32056. },
  32057. "messageID": {
  32058. "type": "string",
  32059. "pattern": "^msg_"
  32060. },
  32061. "prompt": {
  32062. "$ref": "#/components/schemas/Prompt"
  32063. },
  32064. "delivery": {
  32065. "type": "string",
  32066. "enum": ["steer", "queue"]
  32067. }
  32068. },
  32069. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  32070. "additionalProperties": false
  32071. }
  32072. },
  32073. "required": ["id", "type", "data"],
  32074. "additionalProperties": false
  32075. },
  32076. "V2EventSessionNextContextUpdated": {
  32077. "type": "object",
  32078. "properties": {
  32079. "id": {
  32080. "type": "string",
  32081. "pattern": "^evt_"
  32082. },
  32083. "metadata": {
  32084. "type": "object"
  32085. },
  32086. "durable": {
  32087. "type": "object",
  32088. "properties": {
  32089. "aggregateID": {
  32090. "type": "string"
  32091. },
  32092. "seq": {
  32093. "type": "integer"
  32094. },
  32095. "version": {
  32096. "type": "integer"
  32097. }
  32098. },
  32099. "required": ["aggregateID", "seq", "version"],
  32100. "additionalProperties": false
  32101. },
  32102. "location": {
  32103. "$ref": "#/components/schemas/LocationRef"
  32104. },
  32105. "type": {
  32106. "type": "string",
  32107. "enum": ["session.next.context.updated"]
  32108. },
  32109. "data": {
  32110. "type": "object",
  32111. "properties": {
  32112. "timestamp": {
  32113. "type": "number"
  32114. },
  32115. "sessionID": {
  32116. "type": "string",
  32117. "pattern": "^ses"
  32118. },
  32119. "messageID": {
  32120. "type": "string",
  32121. "pattern": "^msg_"
  32122. },
  32123. "text": {
  32124. "type": "string"
  32125. }
  32126. },
  32127. "required": ["timestamp", "sessionID", "messageID", "text"],
  32128. "additionalProperties": false
  32129. }
  32130. },
  32131. "required": ["id", "type", "data"],
  32132. "additionalProperties": false
  32133. },
  32134. "V2EventSessionNextSynthetic": {
  32135. "type": "object",
  32136. "properties": {
  32137. "id": {
  32138. "type": "string",
  32139. "pattern": "^evt_"
  32140. },
  32141. "metadata": {
  32142. "type": "object"
  32143. },
  32144. "durable": {
  32145. "type": "object",
  32146. "properties": {
  32147. "aggregateID": {
  32148. "type": "string"
  32149. },
  32150. "seq": {
  32151. "type": "integer"
  32152. },
  32153. "version": {
  32154. "type": "integer"
  32155. }
  32156. },
  32157. "required": ["aggregateID", "seq", "version"],
  32158. "additionalProperties": false
  32159. },
  32160. "location": {
  32161. "$ref": "#/components/schemas/LocationRef"
  32162. },
  32163. "type": {
  32164. "type": "string",
  32165. "enum": ["session.next.synthetic"]
  32166. },
  32167. "data": {
  32168. "type": "object",
  32169. "properties": {
  32170. "timestamp": {
  32171. "type": "number"
  32172. },
  32173. "sessionID": {
  32174. "type": "string",
  32175. "pattern": "^ses"
  32176. },
  32177. "messageID": {
  32178. "type": "string",
  32179. "pattern": "^msg_"
  32180. },
  32181. "text": {
  32182. "type": "string"
  32183. }
  32184. },
  32185. "required": ["timestamp", "sessionID", "messageID", "text"],
  32186. "additionalProperties": false
  32187. }
  32188. },
  32189. "required": ["id", "type", "data"],
  32190. "additionalProperties": false
  32191. },
  32192. "V2EventSessionNextShellStarted": {
  32193. "type": "object",
  32194. "properties": {
  32195. "id": {
  32196. "type": "string",
  32197. "pattern": "^evt_"
  32198. },
  32199. "metadata": {
  32200. "type": "object"
  32201. },
  32202. "durable": {
  32203. "type": "object",
  32204. "properties": {
  32205. "aggregateID": {
  32206. "type": "string"
  32207. },
  32208. "seq": {
  32209. "type": "integer"
  32210. },
  32211. "version": {
  32212. "type": "integer"
  32213. }
  32214. },
  32215. "required": ["aggregateID", "seq", "version"],
  32216. "additionalProperties": false
  32217. },
  32218. "location": {
  32219. "$ref": "#/components/schemas/LocationRef"
  32220. },
  32221. "type": {
  32222. "type": "string",
  32223. "enum": ["session.next.shell.started"]
  32224. },
  32225. "data": {
  32226. "type": "object",
  32227. "properties": {
  32228. "timestamp": {
  32229. "type": "number"
  32230. },
  32231. "sessionID": {
  32232. "type": "string",
  32233. "pattern": "^ses"
  32234. },
  32235. "messageID": {
  32236. "type": "string",
  32237. "pattern": "^msg_"
  32238. },
  32239. "callID": {
  32240. "type": "string"
  32241. },
  32242. "command": {
  32243. "type": "string"
  32244. }
  32245. },
  32246. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  32247. "additionalProperties": false
  32248. }
  32249. },
  32250. "required": ["id", "type", "data"],
  32251. "additionalProperties": false
  32252. },
  32253. "V2EventSessionNextShellEnded": {
  32254. "type": "object",
  32255. "properties": {
  32256. "id": {
  32257. "type": "string",
  32258. "pattern": "^evt_"
  32259. },
  32260. "metadata": {
  32261. "type": "object"
  32262. },
  32263. "durable": {
  32264. "type": "object",
  32265. "properties": {
  32266. "aggregateID": {
  32267. "type": "string"
  32268. },
  32269. "seq": {
  32270. "type": "integer"
  32271. },
  32272. "version": {
  32273. "type": "integer"
  32274. }
  32275. },
  32276. "required": ["aggregateID", "seq", "version"],
  32277. "additionalProperties": false
  32278. },
  32279. "location": {
  32280. "$ref": "#/components/schemas/LocationRef"
  32281. },
  32282. "type": {
  32283. "type": "string",
  32284. "enum": ["session.next.shell.ended"]
  32285. },
  32286. "data": {
  32287. "type": "object",
  32288. "properties": {
  32289. "timestamp": {
  32290. "type": "number"
  32291. },
  32292. "sessionID": {
  32293. "type": "string",
  32294. "pattern": "^ses"
  32295. },
  32296. "callID": {
  32297. "type": "string"
  32298. },
  32299. "output": {
  32300. "type": "string"
  32301. }
  32302. },
  32303. "required": ["timestamp", "sessionID", "callID", "output"],
  32304. "additionalProperties": false
  32305. }
  32306. },
  32307. "required": ["id", "type", "data"],
  32308. "additionalProperties": false
  32309. },
  32310. "V2EventSessionNextStepStarted": {
  32311. "type": "object",
  32312. "properties": {
  32313. "id": {
  32314. "type": "string",
  32315. "pattern": "^evt_"
  32316. },
  32317. "metadata": {
  32318. "type": "object"
  32319. },
  32320. "durable": {
  32321. "type": "object",
  32322. "properties": {
  32323. "aggregateID": {
  32324. "type": "string"
  32325. },
  32326. "seq": {
  32327. "type": "integer"
  32328. },
  32329. "version": {
  32330. "type": "integer"
  32331. }
  32332. },
  32333. "required": ["aggregateID", "seq", "version"],
  32334. "additionalProperties": false
  32335. },
  32336. "location": {
  32337. "$ref": "#/components/schemas/LocationRef"
  32338. },
  32339. "type": {
  32340. "type": "string",
  32341. "enum": ["session.next.step.started"]
  32342. },
  32343. "data": {
  32344. "type": "object",
  32345. "properties": {
  32346. "timestamp": {
  32347. "type": "number"
  32348. },
  32349. "sessionID": {
  32350. "type": "string",
  32351. "pattern": "^ses"
  32352. },
  32353. "assistantMessageID": {
  32354. "type": "string",
  32355. "pattern": "^msg_"
  32356. },
  32357. "agent": {
  32358. "type": "string"
  32359. },
  32360. "model": {
  32361. "$ref": "#/components/schemas/ModelRef"
  32362. },
  32363. "snapshot": {
  32364. "type": "string"
  32365. }
  32366. },
  32367. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  32368. "additionalProperties": false
  32369. }
  32370. },
  32371. "required": ["id", "type", "data"],
  32372. "additionalProperties": false
  32373. },
  32374. "V2EventSessionNextStepEnded": {
  32375. "type": "object",
  32376. "properties": {
  32377. "id": {
  32378. "type": "string",
  32379. "pattern": "^evt_"
  32380. },
  32381. "metadata": {
  32382. "type": "object"
  32383. },
  32384. "durable": {
  32385. "type": "object",
  32386. "properties": {
  32387. "aggregateID": {
  32388. "type": "string"
  32389. },
  32390. "seq": {
  32391. "type": "integer"
  32392. },
  32393. "version": {
  32394. "type": "integer"
  32395. }
  32396. },
  32397. "required": ["aggregateID", "seq", "version"],
  32398. "additionalProperties": false
  32399. },
  32400. "location": {
  32401. "$ref": "#/components/schemas/LocationRef"
  32402. },
  32403. "type": {
  32404. "type": "string",
  32405. "enum": ["session.next.step.ended"]
  32406. },
  32407. "data": {
  32408. "type": "object",
  32409. "properties": {
  32410. "timestamp": {
  32411. "type": "number"
  32412. },
  32413. "sessionID": {
  32414. "type": "string",
  32415. "pattern": "^ses"
  32416. },
  32417. "assistantMessageID": {
  32418. "type": "string",
  32419. "pattern": "^msg_"
  32420. },
  32421. "finish": {
  32422. "type": "string"
  32423. },
  32424. "cost": {
  32425. "type": "number"
  32426. },
  32427. "tokens": {
  32428. "type": "object",
  32429. "properties": {
  32430. "input": {
  32431. "type": "number"
  32432. },
  32433. "output": {
  32434. "type": "number"
  32435. },
  32436. "reasoning": {
  32437. "type": "number"
  32438. },
  32439. "cache": {
  32440. "type": "object",
  32441. "properties": {
  32442. "read": {
  32443. "type": "number"
  32444. },
  32445. "write": {
  32446. "type": "number"
  32447. }
  32448. },
  32449. "required": ["read", "write"],
  32450. "additionalProperties": false
  32451. }
  32452. },
  32453. "required": ["input", "output", "reasoning", "cache"],
  32454. "additionalProperties": false
  32455. },
  32456. "snapshot": {
  32457. "type": "string"
  32458. },
  32459. "files": {
  32460. "type": "array",
  32461. "items": {
  32462. "type": "string"
  32463. }
  32464. }
  32465. },
  32466. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  32467. "additionalProperties": false
  32468. }
  32469. },
  32470. "required": ["id", "type", "data"],
  32471. "additionalProperties": false
  32472. },
  32473. "V2EventSessionNextStepFailed": {
  32474. "type": "object",
  32475. "properties": {
  32476. "id": {
  32477. "type": "string",
  32478. "pattern": "^evt_"
  32479. },
  32480. "metadata": {
  32481. "type": "object"
  32482. },
  32483. "durable": {
  32484. "type": "object",
  32485. "properties": {
  32486. "aggregateID": {
  32487. "type": "string"
  32488. },
  32489. "seq": {
  32490. "type": "integer"
  32491. },
  32492. "version": {
  32493. "type": "integer"
  32494. }
  32495. },
  32496. "required": ["aggregateID", "seq", "version"],
  32497. "additionalProperties": false
  32498. },
  32499. "location": {
  32500. "$ref": "#/components/schemas/LocationRef"
  32501. },
  32502. "type": {
  32503. "type": "string",
  32504. "enum": ["session.next.step.failed"]
  32505. },
  32506. "data": {
  32507. "type": "object",
  32508. "properties": {
  32509. "timestamp": {
  32510. "type": "number"
  32511. },
  32512. "sessionID": {
  32513. "type": "string",
  32514. "pattern": "^ses"
  32515. },
  32516. "assistantMessageID": {
  32517. "type": "string",
  32518. "pattern": "^msg_"
  32519. },
  32520. "error": {
  32521. "$ref": "#/components/schemas/SessionErrorUnknown"
  32522. }
  32523. },
  32524. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  32525. "additionalProperties": false
  32526. }
  32527. },
  32528. "required": ["id", "type", "data"],
  32529. "additionalProperties": false
  32530. },
  32531. "V2EventSessionNextTextStarted": {
  32532. "type": "object",
  32533. "properties": {
  32534. "id": {
  32535. "type": "string",
  32536. "pattern": "^evt_"
  32537. },
  32538. "metadata": {
  32539. "type": "object"
  32540. },
  32541. "durable": {
  32542. "type": "object",
  32543. "properties": {
  32544. "aggregateID": {
  32545. "type": "string"
  32546. },
  32547. "seq": {
  32548. "type": "integer"
  32549. },
  32550. "version": {
  32551. "type": "integer"
  32552. }
  32553. },
  32554. "required": ["aggregateID", "seq", "version"],
  32555. "additionalProperties": false
  32556. },
  32557. "location": {
  32558. "$ref": "#/components/schemas/LocationRef"
  32559. },
  32560. "type": {
  32561. "type": "string",
  32562. "enum": ["session.next.text.started"]
  32563. },
  32564. "data": {
  32565. "type": "object",
  32566. "properties": {
  32567. "timestamp": {
  32568. "type": "number"
  32569. },
  32570. "sessionID": {
  32571. "type": "string",
  32572. "pattern": "^ses"
  32573. },
  32574. "assistantMessageID": {
  32575. "type": "string",
  32576. "pattern": "^msg_"
  32577. },
  32578. "textID": {
  32579. "type": "string"
  32580. }
  32581. },
  32582. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  32583. "additionalProperties": false
  32584. }
  32585. },
  32586. "required": ["id", "type", "data"],
  32587. "additionalProperties": false
  32588. },
  32589. "V2EventSessionNextTextDelta": {
  32590. "type": "object",
  32591. "properties": {
  32592. "id": {
  32593. "type": "string",
  32594. "pattern": "^evt_"
  32595. },
  32596. "metadata": {
  32597. "type": "object"
  32598. },
  32599. "durable": {
  32600. "type": "object",
  32601. "properties": {
  32602. "aggregateID": {
  32603. "type": "string"
  32604. },
  32605. "seq": {
  32606. "type": "integer"
  32607. },
  32608. "version": {
  32609. "type": "integer"
  32610. }
  32611. },
  32612. "required": ["aggregateID", "seq", "version"],
  32613. "additionalProperties": false
  32614. },
  32615. "location": {
  32616. "$ref": "#/components/schemas/LocationRef"
  32617. },
  32618. "type": {
  32619. "type": "string",
  32620. "enum": ["session.next.text.delta"]
  32621. },
  32622. "data": {
  32623. "type": "object",
  32624. "properties": {
  32625. "timestamp": {
  32626. "type": "number"
  32627. },
  32628. "sessionID": {
  32629. "type": "string",
  32630. "pattern": "^ses"
  32631. },
  32632. "assistantMessageID": {
  32633. "type": "string",
  32634. "pattern": "^msg_"
  32635. },
  32636. "textID": {
  32637. "type": "string"
  32638. },
  32639. "delta": {
  32640. "type": "string"
  32641. }
  32642. },
  32643. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  32644. "additionalProperties": false
  32645. }
  32646. },
  32647. "required": ["id", "type", "data"],
  32648. "additionalProperties": false
  32649. },
  32650. "V2EventSessionNextTextEnded": {
  32651. "type": "object",
  32652. "properties": {
  32653. "id": {
  32654. "type": "string",
  32655. "pattern": "^evt_"
  32656. },
  32657. "metadata": {
  32658. "type": "object"
  32659. },
  32660. "durable": {
  32661. "type": "object",
  32662. "properties": {
  32663. "aggregateID": {
  32664. "type": "string"
  32665. },
  32666. "seq": {
  32667. "type": "integer"
  32668. },
  32669. "version": {
  32670. "type": "integer"
  32671. }
  32672. },
  32673. "required": ["aggregateID", "seq", "version"],
  32674. "additionalProperties": false
  32675. },
  32676. "location": {
  32677. "$ref": "#/components/schemas/LocationRef"
  32678. },
  32679. "type": {
  32680. "type": "string",
  32681. "enum": ["session.next.text.ended"]
  32682. },
  32683. "data": {
  32684. "type": "object",
  32685. "properties": {
  32686. "timestamp": {
  32687. "type": "number"
  32688. },
  32689. "sessionID": {
  32690. "type": "string",
  32691. "pattern": "^ses"
  32692. },
  32693. "assistantMessageID": {
  32694. "type": "string",
  32695. "pattern": "^msg_"
  32696. },
  32697. "textID": {
  32698. "type": "string"
  32699. },
  32700. "text": {
  32701. "type": "string"
  32702. }
  32703. },
  32704. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  32705. "additionalProperties": false
  32706. }
  32707. },
  32708. "required": ["id", "type", "data"],
  32709. "additionalProperties": false
  32710. },
  32711. "V2EventSessionNextReasoningStarted": {
  32712. "type": "object",
  32713. "properties": {
  32714. "id": {
  32715. "type": "string",
  32716. "pattern": "^evt_"
  32717. },
  32718. "metadata": {
  32719. "type": "object"
  32720. },
  32721. "durable": {
  32722. "type": "object",
  32723. "properties": {
  32724. "aggregateID": {
  32725. "type": "string"
  32726. },
  32727. "seq": {
  32728. "type": "integer"
  32729. },
  32730. "version": {
  32731. "type": "integer"
  32732. }
  32733. },
  32734. "required": ["aggregateID", "seq", "version"],
  32735. "additionalProperties": false
  32736. },
  32737. "location": {
  32738. "$ref": "#/components/schemas/LocationRef"
  32739. },
  32740. "type": {
  32741. "type": "string",
  32742. "enum": ["session.next.reasoning.started"]
  32743. },
  32744. "data": {
  32745. "type": "object",
  32746. "properties": {
  32747. "timestamp": {
  32748. "type": "number"
  32749. },
  32750. "sessionID": {
  32751. "type": "string",
  32752. "pattern": "^ses"
  32753. },
  32754. "assistantMessageID": {
  32755. "type": "string",
  32756. "pattern": "^msg_"
  32757. },
  32758. "reasoningID": {
  32759. "type": "string"
  32760. },
  32761. "providerMetadata": {
  32762. "$ref": "#/components/schemas/LLMProviderMetadata"
  32763. }
  32764. },
  32765. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  32766. "additionalProperties": false
  32767. }
  32768. },
  32769. "required": ["id", "type", "data"],
  32770. "additionalProperties": false
  32771. },
  32772. "V2EventSessionNextReasoningDelta": {
  32773. "type": "object",
  32774. "properties": {
  32775. "id": {
  32776. "type": "string",
  32777. "pattern": "^evt_"
  32778. },
  32779. "metadata": {
  32780. "type": "object"
  32781. },
  32782. "durable": {
  32783. "type": "object",
  32784. "properties": {
  32785. "aggregateID": {
  32786. "type": "string"
  32787. },
  32788. "seq": {
  32789. "type": "integer"
  32790. },
  32791. "version": {
  32792. "type": "integer"
  32793. }
  32794. },
  32795. "required": ["aggregateID", "seq", "version"],
  32796. "additionalProperties": false
  32797. },
  32798. "location": {
  32799. "$ref": "#/components/schemas/LocationRef"
  32800. },
  32801. "type": {
  32802. "type": "string",
  32803. "enum": ["session.next.reasoning.delta"]
  32804. },
  32805. "data": {
  32806. "type": "object",
  32807. "properties": {
  32808. "timestamp": {
  32809. "type": "number"
  32810. },
  32811. "sessionID": {
  32812. "type": "string",
  32813. "pattern": "^ses"
  32814. },
  32815. "assistantMessageID": {
  32816. "type": "string",
  32817. "pattern": "^msg_"
  32818. },
  32819. "reasoningID": {
  32820. "type": "string"
  32821. },
  32822. "delta": {
  32823. "type": "string"
  32824. }
  32825. },
  32826. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  32827. "additionalProperties": false
  32828. }
  32829. },
  32830. "required": ["id", "type", "data"],
  32831. "additionalProperties": false
  32832. },
  32833. "V2EventSessionNextReasoningEnded": {
  32834. "type": "object",
  32835. "properties": {
  32836. "id": {
  32837. "type": "string",
  32838. "pattern": "^evt_"
  32839. },
  32840. "metadata": {
  32841. "type": "object"
  32842. },
  32843. "durable": {
  32844. "type": "object",
  32845. "properties": {
  32846. "aggregateID": {
  32847. "type": "string"
  32848. },
  32849. "seq": {
  32850. "type": "integer"
  32851. },
  32852. "version": {
  32853. "type": "integer"
  32854. }
  32855. },
  32856. "required": ["aggregateID", "seq", "version"],
  32857. "additionalProperties": false
  32858. },
  32859. "location": {
  32860. "$ref": "#/components/schemas/LocationRef"
  32861. },
  32862. "type": {
  32863. "type": "string",
  32864. "enum": ["session.next.reasoning.ended"]
  32865. },
  32866. "data": {
  32867. "type": "object",
  32868. "properties": {
  32869. "timestamp": {
  32870. "type": "number"
  32871. },
  32872. "sessionID": {
  32873. "type": "string",
  32874. "pattern": "^ses"
  32875. },
  32876. "assistantMessageID": {
  32877. "type": "string",
  32878. "pattern": "^msg_"
  32879. },
  32880. "reasoningID": {
  32881. "type": "string"
  32882. },
  32883. "text": {
  32884. "type": "string"
  32885. },
  32886. "providerMetadata": {
  32887. "$ref": "#/components/schemas/LLMProviderMetadata"
  32888. }
  32889. },
  32890. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  32891. "additionalProperties": false
  32892. }
  32893. },
  32894. "required": ["id", "type", "data"],
  32895. "additionalProperties": false
  32896. },
  32897. "V2EventSessionNextToolInputStarted": {
  32898. "type": "object",
  32899. "properties": {
  32900. "id": {
  32901. "type": "string",
  32902. "pattern": "^evt_"
  32903. },
  32904. "metadata": {
  32905. "type": "object"
  32906. },
  32907. "durable": {
  32908. "type": "object",
  32909. "properties": {
  32910. "aggregateID": {
  32911. "type": "string"
  32912. },
  32913. "seq": {
  32914. "type": "integer"
  32915. },
  32916. "version": {
  32917. "type": "integer"
  32918. }
  32919. },
  32920. "required": ["aggregateID", "seq", "version"],
  32921. "additionalProperties": false
  32922. },
  32923. "location": {
  32924. "$ref": "#/components/schemas/LocationRef"
  32925. },
  32926. "type": {
  32927. "type": "string",
  32928. "enum": ["session.next.tool.input.started"]
  32929. },
  32930. "data": {
  32931. "type": "object",
  32932. "properties": {
  32933. "timestamp": {
  32934. "type": "number"
  32935. },
  32936. "sessionID": {
  32937. "type": "string",
  32938. "pattern": "^ses"
  32939. },
  32940. "assistantMessageID": {
  32941. "type": "string",
  32942. "pattern": "^msg_"
  32943. },
  32944. "callID": {
  32945. "type": "string"
  32946. },
  32947. "name": {
  32948. "type": "string"
  32949. }
  32950. },
  32951. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  32952. "additionalProperties": false
  32953. }
  32954. },
  32955. "required": ["id", "type", "data"],
  32956. "additionalProperties": false
  32957. },
  32958. "V2EventSessionNextToolInputDelta": {
  32959. "type": "object",
  32960. "properties": {
  32961. "id": {
  32962. "type": "string",
  32963. "pattern": "^evt_"
  32964. },
  32965. "metadata": {
  32966. "type": "object"
  32967. },
  32968. "durable": {
  32969. "type": "object",
  32970. "properties": {
  32971. "aggregateID": {
  32972. "type": "string"
  32973. },
  32974. "seq": {
  32975. "type": "integer"
  32976. },
  32977. "version": {
  32978. "type": "integer"
  32979. }
  32980. },
  32981. "required": ["aggregateID", "seq", "version"],
  32982. "additionalProperties": false
  32983. },
  32984. "location": {
  32985. "$ref": "#/components/schemas/LocationRef"
  32986. },
  32987. "type": {
  32988. "type": "string",
  32989. "enum": ["session.next.tool.input.delta"]
  32990. },
  32991. "data": {
  32992. "type": "object",
  32993. "properties": {
  32994. "timestamp": {
  32995. "type": "number"
  32996. },
  32997. "sessionID": {
  32998. "type": "string",
  32999. "pattern": "^ses"
  33000. },
  33001. "assistantMessageID": {
  33002. "type": "string",
  33003. "pattern": "^msg_"
  33004. },
  33005. "callID": {
  33006. "type": "string"
  33007. },
  33008. "delta": {
  33009. "type": "string"
  33010. }
  33011. },
  33012. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  33013. "additionalProperties": false
  33014. }
  33015. },
  33016. "required": ["id", "type", "data"],
  33017. "additionalProperties": false
  33018. },
  33019. "V2EventSessionNextToolInputEnded": {
  33020. "type": "object",
  33021. "properties": {
  33022. "id": {
  33023. "type": "string",
  33024. "pattern": "^evt_"
  33025. },
  33026. "metadata": {
  33027. "type": "object"
  33028. },
  33029. "durable": {
  33030. "type": "object",
  33031. "properties": {
  33032. "aggregateID": {
  33033. "type": "string"
  33034. },
  33035. "seq": {
  33036. "type": "integer"
  33037. },
  33038. "version": {
  33039. "type": "integer"
  33040. }
  33041. },
  33042. "required": ["aggregateID", "seq", "version"],
  33043. "additionalProperties": false
  33044. },
  33045. "location": {
  33046. "$ref": "#/components/schemas/LocationRef"
  33047. },
  33048. "type": {
  33049. "type": "string",
  33050. "enum": ["session.next.tool.input.ended"]
  33051. },
  33052. "data": {
  33053. "type": "object",
  33054. "properties": {
  33055. "timestamp": {
  33056. "type": "number"
  33057. },
  33058. "sessionID": {
  33059. "type": "string",
  33060. "pattern": "^ses"
  33061. },
  33062. "assistantMessageID": {
  33063. "type": "string",
  33064. "pattern": "^msg_"
  33065. },
  33066. "callID": {
  33067. "type": "string"
  33068. },
  33069. "text": {
  33070. "type": "string"
  33071. }
  33072. },
  33073. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  33074. "additionalProperties": false
  33075. }
  33076. },
  33077. "required": ["id", "type", "data"],
  33078. "additionalProperties": false
  33079. },
  33080. "V2EventSessionNextToolCalled": {
  33081. "type": "object",
  33082. "properties": {
  33083. "id": {
  33084. "type": "string",
  33085. "pattern": "^evt_"
  33086. },
  33087. "metadata": {
  33088. "type": "object"
  33089. },
  33090. "durable": {
  33091. "type": "object",
  33092. "properties": {
  33093. "aggregateID": {
  33094. "type": "string"
  33095. },
  33096. "seq": {
  33097. "type": "integer"
  33098. },
  33099. "version": {
  33100. "type": "integer"
  33101. }
  33102. },
  33103. "required": ["aggregateID", "seq", "version"],
  33104. "additionalProperties": false
  33105. },
  33106. "location": {
  33107. "$ref": "#/components/schemas/LocationRef"
  33108. },
  33109. "type": {
  33110. "type": "string",
  33111. "enum": ["session.next.tool.called"]
  33112. },
  33113. "data": {
  33114. "type": "object",
  33115. "properties": {
  33116. "timestamp": {
  33117. "type": "number"
  33118. },
  33119. "sessionID": {
  33120. "type": "string",
  33121. "pattern": "^ses"
  33122. },
  33123. "assistantMessageID": {
  33124. "type": "string",
  33125. "pattern": "^msg_"
  33126. },
  33127. "callID": {
  33128. "type": "string"
  33129. },
  33130. "tool": {
  33131. "type": "string"
  33132. },
  33133. "input": {
  33134. "type": "object"
  33135. },
  33136. "provider": {
  33137. "type": "object",
  33138. "properties": {
  33139. "executed": {
  33140. "type": "boolean"
  33141. },
  33142. "metadata": {
  33143. "$ref": "#/components/schemas/LLMProviderMetadata"
  33144. }
  33145. },
  33146. "required": ["executed"],
  33147. "additionalProperties": false
  33148. }
  33149. },
  33150. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  33151. "additionalProperties": false
  33152. }
  33153. },
  33154. "required": ["id", "type", "data"],
  33155. "additionalProperties": false
  33156. },
  33157. "V2EventSessionNextToolProgress": {
  33158. "type": "object",
  33159. "properties": {
  33160. "id": {
  33161. "type": "string",
  33162. "pattern": "^evt_"
  33163. },
  33164. "metadata": {
  33165. "type": "object"
  33166. },
  33167. "durable": {
  33168. "type": "object",
  33169. "properties": {
  33170. "aggregateID": {
  33171. "type": "string"
  33172. },
  33173. "seq": {
  33174. "type": "integer"
  33175. },
  33176. "version": {
  33177. "type": "integer"
  33178. }
  33179. },
  33180. "required": ["aggregateID", "seq", "version"],
  33181. "additionalProperties": false
  33182. },
  33183. "location": {
  33184. "$ref": "#/components/schemas/LocationRef"
  33185. },
  33186. "type": {
  33187. "type": "string",
  33188. "enum": ["session.next.tool.progress"]
  33189. },
  33190. "data": {
  33191. "type": "object",
  33192. "properties": {
  33193. "timestamp": {
  33194. "type": "number"
  33195. },
  33196. "sessionID": {
  33197. "type": "string",
  33198. "pattern": "^ses"
  33199. },
  33200. "assistantMessageID": {
  33201. "type": "string",
  33202. "pattern": "^msg_"
  33203. },
  33204. "callID": {
  33205. "type": "string"
  33206. },
  33207. "structured": {
  33208. "type": "object"
  33209. },
  33210. "content": {
  33211. "type": "array",
  33212. "items": {
  33213. "$ref": "#/components/schemas/LLMToolContent"
  33214. }
  33215. }
  33216. },
  33217. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  33218. "additionalProperties": false
  33219. }
  33220. },
  33221. "required": ["id", "type", "data"],
  33222. "additionalProperties": false
  33223. },
  33224. "V2EventSessionNextToolSuccess": {
  33225. "type": "object",
  33226. "properties": {
  33227. "id": {
  33228. "type": "string",
  33229. "pattern": "^evt_"
  33230. },
  33231. "metadata": {
  33232. "type": "object"
  33233. },
  33234. "durable": {
  33235. "type": "object",
  33236. "properties": {
  33237. "aggregateID": {
  33238. "type": "string"
  33239. },
  33240. "seq": {
  33241. "type": "integer"
  33242. },
  33243. "version": {
  33244. "type": "integer"
  33245. }
  33246. },
  33247. "required": ["aggregateID", "seq", "version"],
  33248. "additionalProperties": false
  33249. },
  33250. "location": {
  33251. "$ref": "#/components/schemas/LocationRef"
  33252. },
  33253. "type": {
  33254. "type": "string",
  33255. "enum": ["session.next.tool.success"]
  33256. },
  33257. "data": {
  33258. "type": "object",
  33259. "properties": {
  33260. "timestamp": {
  33261. "type": "number"
  33262. },
  33263. "sessionID": {
  33264. "type": "string",
  33265. "pattern": "^ses"
  33266. },
  33267. "assistantMessageID": {
  33268. "type": "string",
  33269. "pattern": "^msg_"
  33270. },
  33271. "callID": {
  33272. "type": "string"
  33273. },
  33274. "structured": {
  33275. "type": "object"
  33276. },
  33277. "content": {
  33278. "type": "array",
  33279. "items": {
  33280. "$ref": "#/components/schemas/LLMToolContent"
  33281. }
  33282. },
  33283. "outputPaths": {
  33284. "type": "array",
  33285. "items": {
  33286. "type": "string"
  33287. }
  33288. },
  33289. "result": {},
  33290. "provider": {
  33291. "type": "object",
  33292. "properties": {
  33293. "executed": {
  33294. "type": "boolean"
  33295. },
  33296. "metadata": {
  33297. "$ref": "#/components/schemas/LLMProviderMetadata"
  33298. }
  33299. },
  33300. "required": ["executed"],
  33301. "additionalProperties": false
  33302. }
  33303. },
  33304. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  33305. "additionalProperties": false
  33306. }
  33307. },
  33308. "required": ["id", "type", "data"],
  33309. "additionalProperties": false
  33310. },
  33311. "V2EventSessionNextToolFailed": {
  33312. "type": "object",
  33313. "properties": {
  33314. "id": {
  33315. "type": "string",
  33316. "pattern": "^evt_"
  33317. },
  33318. "metadata": {
  33319. "type": "object"
  33320. },
  33321. "durable": {
  33322. "type": "object",
  33323. "properties": {
  33324. "aggregateID": {
  33325. "type": "string"
  33326. },
  33327. "seq": {
  33328. "type": "integer"
  33329. },
  33330. "version": {
  33331. "type": "integer"
  33332. }
  33333. },
  33334. "required": ["aggregateID", "seq", "version"],
  33335. "additionalProperties": false
  33336. },
  33337. "location": {
  33338. "$ref": "#/components/schemas/LocationRef"
  33339. },
  33340. "type": {
  33341. "type": "string",
  33342. "enum": ["session.next.tool.failed"]
  33343. },
  33344. "data": {
  33345. "type": "object",
  33346. "properties": {
  33347. "timestamp": {
  33348. "type": "number"
  33349. },
  33350. "sessionID": {
  33351. "type": "string",
  33352. "pattern": "^ses"
  33353. },
  33354. "assistantMessageID": {
  33355. "type": "string",
  33356. "pattern": "^msg_"
  33357. },
  33358. "callID": {
  33359. "type": "string"
  33360. },
  33361. "error": {
  33362. "$ref": "#/components/schemas/SessionErrorUnknown"
  33363. },
  33364. "result": {},
  33365. "provider": {
  33366. "type": "object",
  33367. "properties": {
  33368. "executed": {
  33369. "type": "boolean"
  33370. },
  33371. "metadata": {
  33372. "$ref": "#/components/schemas/LLMProviderMetadata"
  33373. }
  33374. },
  33375. "required": ["executed"],
  33376. "additionalProperties": false
  33377. }
  33378. },
  33379. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  33380. "additionalProperties": false
  33381. }
  33382. },
  33383. "required": ["id", "type", "data"],
  33384. "additionalProperties": false
  33385. },
  33386. "V2EventSessionNextRetried": {
  33387. "type": "object",
  33388. "properties": {
  33389. "id": {
  33390. "type": "string",
  33391. "pattern": "^evt_"
  33392. },
  33393. "metadata": {
  33394. "type": "object"
  33395. },
  33396. "durable": {
  33397. "type": "object",
  33398. "properties": {
  33399. "aggregateID": {
  33400. "type": "string"
  33401. },
  33402. "seq": {
  33403. "type": "integer"
  33404. },
  33405. "version": {
  33406. "type": "integer"
  33407. }
  33408. },
  33409. "required": ["aggregateID", "seq", "version"],
  33410. "additionalProperties": false
  33411. },
  33412. "location": {
  33413. "$ref": "#/components/schemas/LocationRef"
  33414. },
  33415. "type": {
  33416. "type": "string",
  33417. "enum": ["session.next.retried"]
  33418. },
  33419. "data": {
  33420. "type": "object",
  33421. "properties": {
  33422. "timestamp": {
  33423. "type": "number"
  33424. },
  33425. "sessionID": {
  33426. "type": "string",
  33427. "pattern": "^ses"
  33428. },
  33429. "attempt": {
  33430. "type": "number"
  33431. },
  33432. "error": {
  33433. "$ref": "#/components/schemas/SessionNextRetry_error"
  33434. }
  33435. },
  33436. "required": ["timestamp", "sessionID", "attempt", "error"],
  33437. "additionalProperties": false
  33438. }
  33439. },
  33440. "required": ["id", "type", "data"],
  33441. "additionalProperties": false
  33442. },
  33443. "V2EventSessionNextCompactionStarted": {
  33444. "type": "object",
  33445. "properties": {
  33446. "id": {
  33447. "type": "string",
  33448. "pattern": "^evt_"
  33449. },
  33450. "metadata": {
  33451. "type": "object"
  33452. },
  33453. "durable": {
  33454. "type": "object",
  33455. "properties": {
  33456. "aggregateID": {
  33457. "type": "string"
  33458. },
  33459. "seq": {
  33460. "type": "integer"
  33461. },
  33462. "version": {
  33463. "type": "integer"
  33464. }
  33465. },
  33466. "required": ["aggregateID", "seq", "version"],
  33467. "additionalProperties": false
  33468. },
  33469. "location": {
  33470. "$ref": "#/components/schemas/LocationRef"
  33471. },
  33472. "type": {
  33473. "type": "string",
  33474. "enum": ["session.next.compaction.started"]
  33475. },
  33476. "data": {
  33477. "type": "object",
  33478. "properties": {
  33479. "timestamp": {
  33480. "type": "number"
  33481. },
  33482. "sessionID": {
  33483. "type": "string",
  33484. "pattern": "^ses"
  33485. },
  33486. "messageID": {
  33487. "type": "string",
  33488. "pattern": "^msg_"
  33489. },
  33490. "reason": {
  33491. "type": "string",
  33492. "enum": ["auto", "manual"]
  33493. }
  33494. },
  33495. "required": ["timestamp", "sessionID", "messageID", "reason"],
  33496. "additionalProperties": false
  33497. }
  33498. },
  33499. "required": ["id", "type", "data"],
  33500. "additionalProperties": false
  33501. },
  33502. "V2EventSessionNextCompactionDelta": {
  33503. "type": "object",
  33504. "properties": {
  33505. "id": {
  33506. "type": "string",
  33507. "pattern": "^evt_"
  33508. },
  33509. "metadata": {
  33510. "type": "object"
  33511. },
  33512. "durable": {
  33513. "type": "object",
  33514. "properties": {
  33515. "aggregateID": {
  33516. "type": "string"
  33517. },
  33518. "seq": {
  33519. "type": "integer"
  33520. },
  33521. "version": {
  33522. "type": "integer"
  33523. }
  33524. },
  33525. "required": ["aggregateID", "seq", "version"],
  33526. "additionalProperties": false
  33527. },
  33528. "location": {
  33529. "$ref": "#/components/schemas/LocationRef"
  33530. },
  33531. "type": {
  33532. "type": "string",
  33533. "enum": ["session.next.compaction.delta"]
  33534. },
  33535. "data": {
  33536. "type": "object",
  33537. "properties": {
  33538. "timestamp": {
  33539. "type": "number"
  33540. },
  33541. "sessionID": {
  33542. "type": "string",
  33543. "pattern": "^ses"
  33544. },
  33545. "messageID": {
  33546. "type": "string",
  33547. "pattern": "^msg_"
  33548. },
  33549. "text": {
  33550. "type": "string"
  33551. }
  33552. },
  33553. "required": ["timestamp", "sessionID", "messageID", "text"],
  33554. "additionalProperties": false
  33555. }
  33556. },
  33557. "required": ["id", "type", "data"],
  33558. "additionalProperties": false
  33559. },
  33560. "V2EventSessionNextCompactionEnded": {
  33561. "type": "object",
  33562. "properties": {
  33563. "id": {
  33564. "type": "string",
  33565. "pattern": "^evt_"
  33566. },
  33567. "metadata": {
  33568. "type": "object"
  33569. },
  33570. "durable": {
  33571. "type": "object",
  33572. "properties": {
  33573. "aggregateID": {
  33574. "type": "string"
  33575. },
  33576. "seq": {
  33577. "type": "integer"
  33578. },
  33579. "version": {
  33580. "type": "integer"
  33581. }
  33582. },
  33583. "required": ["aggregateID", "seq", "version"],
  33584. "additionalProperties": false
  33585. },
  33586. "location": {
  33587. "$ref": "#/components/schemas/LocationRef"
  33588. },
  33589. "type": {
  33590. "type": "string",
  33591. "enum": ["session.next.compaction.ended"]
  33592. },
  33593. "data": {
  33594. "type": "object",
  33595. "properties": {
  33596. "timestamp": {
  33597. "type": "number"
  33598. },
  33599. "sessionID": {
  33600. "type": "string",
  33601. "pattern": "^ses"
  33602. },
  33603. "messageID": {
  33604. "type": "string",
  33605. "pattern": "^msg_"
  33606. },
  33607. "reason": {
  33608. "type": "string",
  33609. "enum": ["auto", "manual"]
  33610. },
  33611. "text": {
  33612. "type": "string"
  33613. },
  33614. "recent": {
  33615. "type": "string"
  33616. }
  33617. },
  33618. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  33619. "additionalProperties": false
  33620. }
  33621. },
  33622. "required": ["id", "type", "data"],
  33623. "additionalProperties": false
  33624. },
  33625. "V2EventSessionNextRevertStaged": {
  33626. "type": "object",
  33627. "properties": {
  33628. "id": {
  33629. "type": "string",
  33630. "pattern": "^evt_"
  33631. },
  33632. "metadata": {
  33633. "type": "object"
  33634. },
  33635. "durable": {
  33636. "type": "object",
  33637. "properties": {
  33638. "aggregateID": {
  33639. "type": "string"
  33640. },
  33641. "seq": {
  33642. "type": "integer"
  33643. },
  33644. "version": {
  33645. "type": "integer"
  33646. }
  33647. },
  33648. "required": ["aggregateID", "seq", "version"],
  33649. "additionalProperties": false
  33650. },
  33651. "location": {
  33652. "$ref": "#/components/schemas/LocationRef"
  33653. },
  33654. "type": {
  33655. "type": "string",
  33656. "enum": ["session.next.revert.staged"]
  33657. },
  33658. "data": {
  33659. "type": "object",
  33660. "properties": {
  33661. "timestamp": {
  33662. "type": "number"
  33663. },
  33664. "sessionID": {
  33665. "type": "string",
  33666. "pattern": "^ses"
  33667. },
  33668. "revert": {
  33669. "$ref": "#/components/schemas/RevertState"
  33670. }
  33671. },
  33672. "required": ["timestamp", "sessionID", "revert"],
  33673. "additionalProperties": false
  33674. }
  33675. },
  33676. "required": ["id", "type", "data"],
  33677. "additionalProperties": false
  33678. },
  33679. "V2EventSessionNextRevertCleared": {
  33680. "type": "object",
  33681. "properties": {
  33682. "id": {
  33683. "type": "string",
  33684. "pattern": "^evt_"
  33685. },
  33686. "metadata": {
  33687. "type": "object"
  33688. },
  33689. "durable": {
  33690. "type": "object",
  33691. "properties": {
  33692. "aggregateID": {
  33693. "type": "string"
  33694. },
  33695. "seq": {
  33696. "type": "integer"
  33697. },
  33698. "version": {
  33699. "type": "integer"
  33700. }
  33701. },
  33702. "required": ["aggregateID", "seq", "version"],
  33703. "additionalProperties": false
  33704. },
  33705. "location": {
  33706. "$ref": "#/components/schemas/LocationRef"
  33707. },
  33708. "type": {
  33709. "type": "string",
  33710. "enum": ["session.next.revert.cleared"]
  33711. },
  33712. "data": {
  33713. "type": "object",
  33714. "properties": {
  33715. "timestamp": {
  33716. "type": "number"
  33717. },
  33718. "sessionID": {
  33719. "type": "string",
  33720. "pattern": "^ses"
  33721. }
  33722. },
  33723. "required": ["timestamp", "sessionID"],
  33724. "additionalProperties": false
  33725. }
  33726. },
  33727. "required": ["id", "type", "data"],
  33728. "additionalProperties": false
  33729. },
  33730. "V2EventSessionNextRevertCommitted": {
  33731. "type": "object",
  33732. "properties": {
  33733. "id": {
  33734. "type": "string",
  33735. "pattern": "^evt_"
  33736. },
  33737. "metadata": {
  33738. "type": "object"
  33739. },
  33740. "durable": {
  33741. "type": "object",
  33742. "properties": {
  33743. "aggregateID": {
  33744. "type": "string"
  33745. },
  33746. "seq": {
  33747. "type": "integer"
  33748. },
  33749. "version": {
  33750. "type": "integer"
  33751. }
  33752. },
  33753. "required": ["aggregateID", "seq", "version"],
  33754. "additionalProperties": false
  33755. },
  33756. "location": {
  33757. "$ref": "#/components/schemas/LocationRef"
  33758. },
  33759. "type": {
  33760. "type": "string",
  33761. "enum": ["session.next.revert.committed"]
  33762. },
  33763. "data": {
  33764. "type": "object",
  33765. "properties": {
  33766. "timestamp": {
  33767. "type": "number"
  33768. },
  33769. "sessionID": {
  33770. "type": "string",
  33771. "pattern": "^ses"
  33772. },
  33773. "messageID": {
  33774. "type": "string",
  33775. "pattern": "^msg_"
  33776. }
  33777. },
  33778. "required": ["timestamp", "sessionID", "messageID"],
  33779. "additionalProperties": false
  33780. }
  33781. },
  33782. "required": ["id", "type", "data"],
  33783. "additionalProperties": false
  33784. },
  33785. "V2EventMessagePartDelta": {
  33786. "type": "object",
  33787. "properties": {
  33788. "id": {
  33789. "type": "string",
  33790. "pattern": "^evt_"
  33791. },
  33792. "metadata": {
  33793. "type": "object"
  33794. },
  33795. "durable": {
  33796. "type": "object",
  33797. "properties": {
  33798. "aggregateID": {
  33799. "type": "string"
  33800. },
  33801. "seq": {
  33802. "type": "integer"
  33803. },
  33804. "version": {
  33805. "type": "integer"
  33806. }
  33807. },
  33808. "required": ["aggregateID", "seq", "version"],
  33809. "additionalProperties": false
  33810. },
  33811. "location": {
  33812. "$ref": "#/components/schemas/LocationRef"
  33813. },
  33814. "type": {
  33815. "type": "string",
  33816. "enum": ["message.part.delta"]
  33817. },
  33818. "data": {
  33819. "type": "object",
  33820. "properties": {
  33821. "sessionID": {
  33822. "type": "string",
  33823. "pattern": "^ses"
  33824. },
  33825. "messageID": {
  33826. "type": "string",
  33827. "pattern": "^msg"
  33828. },
  33829. "partID": {
  33830. "type": "string",
  33831. "pattern": "^prt"
  33832. },
  33833. "field": {
  33834. "type": "string"
  33835. },
  33836. "delta": {
  33837. "type": "string"
  33838. }
  33839. },
  33840. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  33841. "additionalProperties": false
  33842. }
  33843. },
  33844. "required": ["id", "type", "data"],
  33845. "additionalProperties": false
  33846. },
  33847. "V2EventSessionDiff": {
  33848. "type": "object",
  33849. "properties": {
  33850. "id": {
  33851. "type": "string",
  33852. "pattern": "^evt_"
  33853. },
  33854. "metadata": {
  33855. "type": "object"
  33856. },
  33857. "durable": {
  33858. "type": "object",
  33859. "properties": {
  33860. "aggregateID": {
  33861. "type": "string"
  33862. },
  33863. "seq": {
  33864. "type": "integer"
  33865. },
  33866. "version": {
  33867. "type": "integer"
  33868. }
  33869. },
  33870. "required": ["aggregateID", "seq", "version"],
  33871. "additionalProperties": false
  33872. },
  33873. "location": {
  33874. "$ref": "#/components/schemas/LocationRef"
  33875. },
  33876. "type": {
  33877. "type": "string",
  33878. "enum": ["session.diff"]
  33879. },
  33880. "data": {
  33881. "type": "object",
  33882. "properties": {
  33883. "sessionID": {
  33884. "type": "string",
  33885. "pattern": "^ses"
  33886. },
  33887. "diff": {
  33888. "type": "array",
  33889. "items": {
  33890. "$ref": "#/components/schemas/SnapshotFileDiff"
  33891. }
  33892. }
  33893. },
  33894. "required": ["sessionID", "diff"],
  33895. "additionalProperties": false
  33896. }
  33897. },
  33898. "required": ["id", "type", "data"],
  33899. "additionalProperties": false
  33900. },
  33901. "V2EventSessionError": {
  33902. "type": "object",
  33903. "properties": {
  33904. "id": {
  33905. "type": "string",
  33906. "pattern": "^evt_"
  33907. },
  33908. "metadata": {
  33909. "type": "object"
  33910. },
  33911. "durable": {
  33912. "type": "object",
  33913. "properties": {
  33914. "aggregateID": {
  33915. "type": "string"
  33916. },
  33917. "seq": {
  33918. "type": "integer"
  33919. },
  33920. "version": {
  33921. "type": "integer"
  33922. }
  33923. },
  33924. "required": ["aggregateID", "seq", "version"],
  33925. "additionalProperties": false
  33926. },
  33927. "location": {
  33928. "$ref": "#/components/schemas/LocationRef"
  33929. },
  33930. "type": {
  33931. "type": "string",
  33932. "enum": ["session.error"]
  33933. },
  33934. "data": {
  33935. "type": "object",
  33936. "properties": {
  33937. "sessionID": {
  33938. "type": "string",
  33939. "pattern": "^ses"
  33940. },
  33941. "error": {
  33942. "anyOf": [
  33943. {
  33944. "$ref": "#/components/schemas/ProviderAuthError"
  33945. },
  33946. {
  33947. "$ref": "#/components/schemas/UnknownError"
  33948. },
  33949. {
  33950. "$ref": "#/components/schemas/MessageOutputLengthError"
  33951. },
  33952. {
  33953. "$ref": "#/components/schemas/MessageAbortedError"
  33954. },
  33955. {
  33956. "$ref": "#/components/schemas/StructuredOutputError"
  33957. },
  33958. {
  33959. "$ref": "#/components/schemas/ContextOverflowError"
  33960. },
  33961. {
  33962. "$ref": "#/components/schemas/ContentFilterError"
  33963. },
  33964. {
  33965. "$ref": "#/components/schemas/APIError"
  33966. }
  33967. ]
  33968. }
  33969. },
  33970. "additionalProperties": false
  33971. }
  33972. },
  33973. "required": ["id", "type", "data"],
  33974. "additionalProperties": false
  33975. },
  33976. "V2EventInstallationUpdated": {
  33977. "type": "object",
  33978. "properties": {
  33979. "id": {
  33980. "type": "string",
  33981. "pattern": "^evt_"
  33982. },
  33983. "metadata": {
  33984. "type": "object"
  33985. },
  33986. "durable": {
  33987. "type": "object",
  33988. "properties": {
  33989. "aggregateID": {
  33990. "type": "string"
  33991. },
  33992. "seq": {
  33993. "type": "integer"
  33994. },
  33995. "version": {
  33996. "type": "integer"
  33997. }
  33998. },
  33999. "required": ["aggregateID", "seq", "version"],
  34000. "additionalProperties": false
  34001. },
  34002. "location": {
  34003. "$ref": "#/components/schemas/LocationRef"
  34004. },
  34005. "type": {
  34006. "type": "string",
  34007. "enum": ["installation.updated"]
  34008. },
  34009. "data": {
  34010. "type": "object",
  34011. "properties": {
  34012. "version": {
  34013. "type": "string"
  34014. }
  34015. },
  34016. "required": ["version"],
  34017. "additionalProperties": false
  34018. }
  34019. },
  34020. "required": ["id", "type", "data"],
  34021. "additionalProperties": false
  34022. },
  34023. "V2EventInstallationUpdate-available": {
  34024. "type": "object",
  34025. "properties": {
  34026. "id": {
  34027. "type": "string",
  34028. "pattern": "^evt_"
  34029. },
  34030. "metadata": {
  34031. "type": "object"
  34032. },
  34033. "durable": {
  34034. "type": "object",
  34035. "properties": {
  34036. "aggregateID": {
  34037. "type": "string"
  34038. },
  34039. "seq": {
  34040. "type": "integer"
  34041. },
  34042. "version": {
  34043. "type": "integer"
  34044. }
  34045. },
  34046. "required": ["aggregateID", "seq", "version"],
  34047. "additionalProperties": false
  34048. },
  34049. "location": {
  34050. "$ref": "#/components/schemas/LocationRef"
  34051. },
  34052. "type": {
  34053. "type": "string",
  34054. "enum": ["installation.update-available"]
  34055. },
  34056. "data": {
  34057. "type": "object",
  34058. "properties": {
  34059. "version": {
  34060. "type": "string"
  34061. }
  34062. },
  34063. "required": ["version"],
  34064. "additionalProperties": false
  34065. }
  34066. },
  34067. "required": ["id", "type", "data"],
  34068. "additionalProperties": false
  34069. },
  34070. "V2EventFileEdited": {
  34071. "type": "object",
  34072. "properties": {
  34073. "id": {
  34074. "type": "string",
  34075. "pattern": "^evt_"
  34076. },
  34077. "metadata": {
  34078. "type": "object"
  34079. },
  34080. "durable": {
  34081. "type": "object",
  34082. "properties": {
  34083. "aggregateID": {
  34084. "type": "string"
  34085. },
  34086. "seq": {
  34087. "type": "integer"
  34088. },
  34089. "version": {
  34090. "type": "integer"
  34091. }
  34092. },
  34093. "required": ["aggregateID", "seq", "version"],
  34094. "additionalProperties": false
  34095. },
  34096. "location": {
  34097. "$ref": "#/components/schemas/LocationRef"
  34098. },
  34099. "type": {
  34100. "type": "string",
  34101. "enum": ["file.edited"]
  34102. },
  34103. "data": {
  34104. "type": "object",
  34105. "properties": {
  34106. "file": {
  34107. "type": "string"
  34108. }
  34109. },
  34110. "required": ["file"],
  34111. "additionalProperties": false
  34112. }
  34113. },
  34114. "required": ["id", "type", "data"],
  34115. "additionalProperties": false
  34116. },
  34117. "V2EventReferenceUpdated": {
  34118. "type": "object",
  34119. "properties": {
  34120. "id": {
  34121. "type": "string",
  34122. "pattern": "^evt_"
  34123. },
  34124. "metadata": {
  34125. "type": "object"
  34126. },
  34127. "durable": {
  34128. "type": "object",
  34129. "properties": {
  34130. "aggregateID": {
  34131. "type": "string"
  34132. },
  34133. "seq": {
  34134. "type": "integer"
  34135. },
  34136. "version": {
  34137. "type": "integer"
  34138. }
  34139. },
  34140. "required": ["aggregateID", "seq", "version"],
  34141. "additionalProperties": false
  34142. },
  34143. "location": {
  34144. "$ref": "#/components/schemas/LocationRef"
  34145. },
  34146. "type": {
  34147. "type": "string",
  34148. "enum": ["reference.updated"]
  34149. },
  34150. "data": {
  34151. "type": "object",
  34152. "properties": {}
  34153. }
  34154. },
  34155. "required": ["id", "type", "data"],
  34156. "additionalProperties": false
  34157. },
  34158. "V2EventPermissionV2Asked": {
  34159. "type": "object",
  34160. "properties": {
  34161. "id": {
  34162. "type": "string",
  34163. "pattern": "^evt_"
  34164. },
  34165. "metadata": {
  34166. "type": "object"
  34167. },
  34168. "durable": {
  34169. "type": "object",
  34170. "properties": {
  34171. "aggregateID": {
  34172. "type": "string"
  34173. },
  34174. "seq": {
  34175. "type": "integer"
  34176. },
  34177. "version": {
  34178. "type": "integer"
  34179. }
  34180. },
  34181. "required": ["aggregateID", "seq", "version"],
  34182. "additionalProperties": false
  34183. },
  34184. "location": {
  34185. "$ref": "#/components/schemas/LocationRef"
  34186. },
  34187. "type": {
  34188. "type": "string",
  34189. "enum": ["permission.v2.asked"]
  34190. },
  34191. "data": {
  34192. "type": "object",
  34193. "properties": {
  34194. "id": {
  34195. "type": "string",
  34196. "pattern": "^per"
  34197. },
  34198. "sessionID": {
  34199. "type": "string",
  34200. "pattern": "^ses"
  34201. },
  34202. "action": {
  34203. "type": "string"
  34204. },
  34205. "resources": {
  34206. "type": "array",
  34207. "items": {
  34208. "type": "string"
  34209. }
  34210. },
  34211. "save": {
  34212. "type": "array",
  34213. "items": {
  34214. "type": "string"
  34215. }
  34216. },
  34217. "metadata": {
  34218. "type": "object"
  34219. },
  34220. "source": {
  34221. "$ref": "#/components/schemas/PermissionV2Source"
  34222. }
  34223. },
  34224. "required": ["id", "sessionID", "action", "resources"],
  34225. "additionalProperties": false
  34226. }
  34227. },
  34228. "required": ["id", "type", "data"],
  34229. "additionalProperties": false
  34230. },
  34231. "V2EventPermissionV2Replied": {
  34232. "type": "object",
  34233. "properties": {
  34234. "id": {
  34235. "type": "string",
  34236. "pattern": "^evt_"
  34237. },
  34238. "metadata": {
  34239. "type": "object"
  34240. },
  34241. "durable": {
  34242. "type": "object",
  34243. "properties": {
  34244. "aggregateID": {
  34245. "type": "string"
  34246. },
  34247. "seq": {
  34248. "type": "integer"
  34249. },
  34250. "version": {
  34251. "type": "integer"
  34252. }
  34253. },
  34254. "required": ["aggregateID", "seq", "version"],
  34255. "additionalProperties": false
  34256. },
  34257. "location": {
  34258. "$ref": "#/components/schemas/LocationRef"
  34259. },
  34260. "type": {
  34261. "type": "string",
  34262. "enum": ["permission.v2.replied"]
  34263. },
  34264. "data": {
  34265. "type": "object",
  34266. "properties": {
  34267. "sessionID": {
  34268. "type": "string",
  34269. "pattern": "^ses"
  34270. },
  34271. "requestID": {
  34272. "type": "string",
  34273. "pattern": "^per"
  34274. },
  34275. "reply": {
  34276. "$ref": "#/components/schemas/PermissionV2Reply"
  34277. }
  34278. },
  34279. "required": ["sessionID", "requestID", "reply"],
  34280. "additionalProperties": false
  34281. }
  34282. },
  34283. "required": ["id", "type", "data"],
  34284. "additionalProperties": false
  34285. },
  34286. "V2EventPluginAdded": {
  34287. "type": "object",
  34288. "properties": {
  34289. "id": {
  34290. "type": "string",
  34291. "pattern": "^evt_"
  34292. },
  34293. "metadata": {
  34294. "type": "object"
  34295. },
  34296. "durable": {
  34297. "type": "object",
  34298. "properties": {
  34299. "aggregateID": {
  34300. "type": "string"
  34301. },
  34302. "seq": {
  34303. "type": "integer"
  34304. },
  34305. "version": {
  34306. "type": "integer"
  34307. }
  34308. },
  34309. "required": ["aggregateID", "seq", "version"],
  34310. "additionalProperties": false
  34311. },
  34312. "location": {
  34313. "$ref": "#/components/schemas/LocationRef"
  34314. },
  34315. "type": {
  34316. "type": "string",
  34317. "enum": ["plugin.added"]
  34318. },
  34319. "data": {
  34320. "type": "object",
  34321. "properties": {
  34322. "id": {
  34323. "type": "string"
  34324. }
  34325. },
  34326. "required": ["id"],
  34327. "additionalProperties": false
  34328. }
  34329. },
  34330. "required": ["id", "type", "data"],
  34331. "additionalProperties": false
  34332. },
  34333. "V2EventProjectDirectoriesUpdated": {
  34334. "type": "object",
  34335. "properties": {
  34336. "id": {
  34337. "type": "string",
  34338. "pattern": "^evt_"
  34339. },
  34340. "metadata": {
  34341. "type": "object"
  34342. },
  34343. "durable": {
  34344. "type": "object",
  34345. "properties": {
  34346. "aggregateID": {
  34347. "type": "string"
  34348. },
  34349. "seq": {
  34350. "type": "integer"
  34351. },
  34352. "version": {
  34353. "type": "integer"
  34354. }
  34355. },
  34356. "required": ["aggregateID", "seq", "version"],
  34357. "additionalProperties": false
  34358. },
  34359. "location": {
  34360. "$ref": "#/components/schemas/LocationRef"
  34361. },
  34362. "type": {
  34363. "type": "string",
  34364. "enum": ["project.directories.updated"]
  34365. },
  34366. "data": {
  34367. "type": "object",
  34368. "properties": {
  34369. "projectID": {
  34370. "type": "string"
  34371. }
  34372. },
  34373. "required": ["projectID"],
  34374. "additionalProperties": false
  34375. }
  34376. },
  34377. "required": ["id", "type", "data"],
  34378. "additionalProperties": false
  34379. },
  34380. "V2EventFileWatcherUpdated": {
  34381. "type": "object",
  34382. "properties": {
  34383. "id": {
  34384. "type": "string",
  34385. "pattern": "^evt_"
  34386. },
  34387. "metadata": {
  34388. "type": "object"
  34389. },
  34390. "durable": {
  34391. "type": "object",
  34392. "properties": {
  34393. "aggregateID": {
  34394. "type": "string"
  34395. },
  34396. "seq": {
  34397. "type": "integer"
  34398. },
  34399. "version": {
  34400. "type": "integer"
  34401. }
  34402. },
  34403. "required": ["aggregateID", "seq", "version"],
  34404. "additionalProperties": false
  34405. },
  34406. "location": {
  34407. "$ref": "#/components/schemas/LocationRef"
  34408. },
  34409. "type": {
  34410. "type": "string",
  34411. "enum": ["file.watcher.updated"]
  34412. },
  34413. "data": {
  34414. "type": "object",
  34415. "properties": {
  34416. "file": {
  34417. "type": "string"
  34418. },
  34419. "event": {
  34420. "type": "string",
  34421. "enum": ["add", "change", "unlink"]
  34422. }
  34423. },
  34424. "required": ["file", "event"],
  34425. "additionalProperties": false
  34426. }
  34427. },
  34428. "required": ["id", "type", "data"],
  34429. "additionalProperties": false
  34430. },
  34431. "V2EventPtyCreated": {
  34432. "type": "object",
  34433. "properties": {
  34434. "id": {
  34435. "type": "string",
  34436. "pattern": "^evt_"
  34437. },
  34438. "metadata": {
  34439. "type": "object"
  34440. },
  34441. "durable": {
  34442. "type": "object",
  34443. "properties": {
  34444. "aggregateID": {
  34445. "type": "string"
  34446. },
  34447. "seq": {
  34448. "type": "integer"
  34449. },
  34450. "version": {
  34451. "type": "integer"
  34452. }
  34453. },
  34454. "required": ["aggregateID", "seq", "version"],
  34455. "additionalProperties": false
  34456. },
  34457. "location": {
  34458. "$ref": "#/components/schemas/LocationRef"
  34459. },
  34460. "type": {
  34461. "type": "string",
  34462. "enum": ["pty.created"]
  34463. },
  34464. "data": {
  34465. "type": "object",
  34466. "properties": {
  34467. "info": {
  34468. "$ref": "#/components/schemas/Pty"
  34469. }
  34470. },
  34471. "required": ["info"],
  34472. "additionalProperties": false
  34473. }
  34474. },
  34475. "required": ["id", "type", "data"],
  34476. "additionalProperties": false
  34477. },
  34478. "V2EventPtyUpdated": {
  34479. "type": "object",
  34480. "properties": {
  34481. "id": {
  34482. "type": "string",
  34483. "pattern": "^evt_"
  34484. },
  34485. "metadata": {
  34486. "type": "object"
  34487. },
  34488. "durable": {
  34489. "type": "object",
  34490. "properties": {
  34491. "aggregateID": {
  34492. "type": "string"
  34493. },
  34494. "seq": {
  34495. "type": "integer"
  34496. },
  34497. "version": {
  34498. "type": "integer"
  34499. }
  34500. },
  34501. "required": ["aggregateID", "seq", "version"],
  34502. "additionalProperties": false
  34503. },
  34504. "location": {
  34505. "$ref": "#/components/schemas/LocationRef"
  34506. },
  34507. "type": {
  34508. "type": "string",
  34509. "enum": ["pty.updated"]
  34510. },
  34511. "data": {
  34512. "type": "object",
  34513. "properties": {
  34514. "info": {
  34515. "$ref": "#/components/schemas/Pty"
  34516. }
  34517. },
  34518. "required": ["info"],
  34519. "additionalProperties": false
  34520. }
  34521. },
  34522. "required": ["id", "type", "data"],
  34523. "additionalProperties": false
  34524. },
  34525. "V2EventPtyExited": {
  34526. "type": "object",
  34527. "properties": {
  34528. "id": {
  34529. "type": "string",
  34530. "pattern": "^evt_"
  34531. },
  34532. "metadata": {
  34533. "type": "object"
  34534. },
  34535. "durable": {
  34536. "type": "object",
  34537. "properties": {
  34538. "aggregateID": {
  34539. "type": "string"
  34540. },
  34541. "seq": {
  34542. "type": "integer"
  34543. },
  34544. "version": {
  34545. "type": "integer"
  34546. }
  34547. },
  34548. "required": ["aggregateID", "seq", "version"],
  34549. "additionalProperties": false
  34550. },
  34551. "location": {
  34552. "$ref": "#/components/schemas/LocationRef"
  34553. },
  34554. "type": {
  34555. "type": "string",
  34556. "enum": ["pty.exited"]
  34557. },
  34558. "data": {
  34559. "type": "object",
  34560. "properties": {
  34561. "id": {
  34562. "type": "string",
  34563. "pattern": "^pty"
  34564. },
  34565. "exitCode": {
  34566. "type": "integer",
  34567. "minimum": 0
  34568. }
  34569. },
  34570. "required": ["id", "exitCode"],
  34571. "additionalProperties": false
  34572. }
  34573. },
  34574. "required": ["id", "type", "data"],
  34575. "additionalProperties": false
  34576. },
  34577. "V2EventPtyDeleted": {
  34578. "type": "object",
  34579. "properties": {
  34580. "id": {
  34581. "type": "string",
  34582. "pattern": "^evt_"
  34583. },
  34584. "metadata": {
  34585. "type": "object"
  34586. },
  34587. "durable": {
  34588. "type": "object",
  34589. "properties": {
  34590. "aggregateID": {
  34591. "type": "string"
  34592. },
  34593. "seq": {
  34594. "type": "integer"
  34595. },
  34596. "version": {
  34597. "type": "integer"
  34598. }
  34599. },
  34600. "required": ["aggregateID", "seq", "version"],
  34601. "additionalProperties": false
  34602. },
  34603. "location": {
  34604. "$ref": "#/components/schemas/LocationRef"
  34605. },
  34606. "type": {
  34607. "type": "string",
  34608. "enum": ["pty.deleted"]
  34609. },
  34610. "data": {
  34611. "type": "object",
  34612. "properties": {
  34613. "id": {
  34614. "type": "string",
  34615. "pattern": "^pty"
  34616. }
  34617. },
  34618. "required": ["id"],
  34619. "additionalProperties": false
  34620. }
  34621. },
  34622. "required": ["id", "type", "data"],
  34623. "additionalProperties": false
  34624. },
  34625. "V2EventQuestionV2Asked": {
  34626. "type": "object",
  34627. "properties": {
  34628. "id": {
  34629. "type": "string",
  34630. "pattern": "^evt_"
  34631. },
  34632. "metadata": {
  34633. "type": "object"
  34634. },
  34635. "durable": {
  34636. "type": "object",
  34637. "properties": {
  34638. "aggregateID": {
  34639. "type": "string"
  34640. },
  34641. "seq": {
  34642. "type": "integer"
  34643. },
  34644. "version": {
  34645. "type": "integer"
  34646. }
  34647. },
  34648. "required": ["aggregateID", "seq", "version"],
  34649. "additionalProperties": false
  34650. },
  34651. "location": {
  34652. "$ref": "#/components/schemas/LocationRef"
  34653. },
  34654. "type": {
  34655. "type": "string",
  34656. "enum": ["question.v2.asked"]
  34657. },
  34658. "data": {
  34659. "type": "object",
  34660. "properties": {
  34661. "id": {
  34662. "type": "string",
  34663. "pattern": "^que"
  34664. },
  34665. "sessionID": {
  34666. "type": "string",
  34667. "pattern": "^ses"
  34668. },
  34669. "questions": {
  34670. "type": "array",
  34671. "items": {
  34672. "$ref": "#/components/schemas/QuestionV2Info"
  34673. },
  34674. "description": "Questions to ask"
  34675. },
  34676. "tool": {
  34677. "$ref": "#/components/schemas/QuestionV2Tool"
  34678. }
  34679. },
  34680. "required": ["id", "sessionID", "questions"],
  34681. "additionalProperties": false
  34682. }
  34683. },
  34684. "required": ["id", "type", "data"],
  34685. "additionalProperties": false
  34686. },
  34687. "V2EventQuestionV2Replied": {
  34688. "type": "object",
  34689. "properties": {
  34690. "id": {
  34691. "type": "string",
  34692. "pattern": "^evt_"
  34693. },
  34694. "metadata": {
  34695. "type": "object"
  34696. },
  34697. "durable": {
  34698. "type": "object",
  34699. "properties": {
  34700. "aggregateID": {
  34701. "type": "string"
  34702. },
  34703. "seq": {
  34704. "type": "integer"
  34705. },
  34706. "version": {
  34707. "type": "integer"
  34708. }
  34709. },
  34710. "required": ["aggregateID", "seq", "version"],
  34711. "additionalProperties": false
  34712. },
  34713. "location": {
  34714. "$ref": "#/components/schemas/LocationRef"
  34715. },
  34716. "type": {
  34717. "type": "string",
  34718. "enum": ["question.v2.replied"]
  34719. },
  34720. "data": {
  34721. "type": "object",
  34722. "properties": {
  34723. "sessionID": {
  34724. "type": "string",
  34725. "pattern": "^ses"
  34726. },
  34727. "requestID": {
  34728. "type": "string",
  34729. "pattern": "^que"
  34730. },
  34731. "answers": {
  34732. "type": "array",
  34733. "items": {
  34734. "$ref": "#/components/schemas/QuestionV2Answer"
  34735. }
  34736. }
  34737. },
  34738. "required": ["sessionID", "requestID", "answers"],
  34739. "additionalProperties": false
  34740. }
  34741. },
  34742. "required": ["id", "type", "data"],
  34743. "additionalProperties": false
  34744. },
  34745. "V2EventQuestionV2Rejected": {
  34746. "type": "object",
  34747. "properties": {
  34748. "id": {
  34749. "type": "string",
  34750. "pattern": "^evt_"
  34751. },
  34752. "metadata": {
  34753. "type": "object"
  34754. },
  34755. "durable": {
  34756. "type": "object",
  34757. "properties": {
  34758. "aggregateID": {
  34759. "type": "string"
  34760. },
  34761. "seq": {
  34762. "type": "integer"
  34763. },
  34764. "version": {
  34765. "type": "integer"
  34766. }
  34767. },
  34768. "required": ["aggregateID", "seq", "version"],
  34769. "additionalProperties": false
  34770. },
  34771. "location": {
  34772. "$ref": "#/components/schemas/LocationRef"
  34773. },
  34774. "type": {
  34775. "type": "string",
  34776. "enum": ["question.v2.rejected"]
  34777. },
  34778. "data": {
  34779. "type": "object",
  34780. "properties": {
  34781. "sessionID": {
  34782. "type": "string",
  34783. "pattern": "^ses"
  34784. },
  34785. "requestID": {
  34786. "type": "string",
  34787. "pattern": "^que"
  34788. }
  34789. },
  34790. "required": ["sessionID", "requestID"],
  34791. "additionalProperties": false
  34792. }
  34793. },
  34794. "required": ["id", "type", "data"],
  34795. "additionalProperties": false
  34796. },
  34797. "V2EventTodoUpdated": {
  34798. "type": "object",
  34799. "properties": {
  34800. "id": {
  34801. "type": "string",
  34802. "pattern": "^evt_"
  34803. },
  34804. "metadata": {
  34805. "type": "object"
  34806. },
  34807. "durable": {
  34808. "type": "object",
  34809. "properties": {
  34810. "aggregateID": {
  34811. "type": "string"
  34812. },
  34813. "seq": {
  34814. "type": "integer"
  34815. },
  34816. "version": {
  34817. "type": "integer"
  34818. }
  34819. },
  34820. "required": ["aggregateID", "seq", "version"],
  34821. "additionalProperties": false
  34822. },
  34823. "location": {
  34824. "$ref": "#/components/schemas/LocationRef"
  34825. },
  34826. "type": {
  34827. "type": "string",
  34828. "enum": ["todo.updated"]
  34829. },
  34830. "data": {
  34831. "type": "object",
  34832. "properties": {
  34833. "sessionID": {
  34834. "type": "string",
  34835. "pattern": "^ses"
  34836. },
  34837. "todos": {
  34838. "type": "array",
  34839. "items": {
  34840. "$ref": "#/components/schemas/Todo"
  34841. }
  34842. }
  34843. },
  34844. "required": ["sessionID", "todos"],
  34845. "additionalProperties": false
  34846. }
  34847. },
  34848. "required": ["id", "type", "data"],
  34849. "additionalProperties": false
  34850. },
  34851. "V2EventLspUpdated": {
  34852. "type": "object",
  34853. "properties": {
  34854. "id": {
  34855. "type": "string",
  34856. "pattern": "^evt_"
  34857. },
  34858. "metadata": {
  34859. "type": "object"
  34860. },
  34861. "durable": {
  34862. "type": "object",
  34863. "properties": {
  34864. "aggregateID": {
  34865. "type": "string"
  34866. },
  34867. "seq": {
  34868. "type": "integer"
  34869. },
  34870. "version": {
  34871. "type": "integer"
  34872. }
  34873. },
  34874. "required": ["aggregateID", "seq", "version"],
  34875. "additionalProperties": false
  34876. },
  34877. "location": {
  34878. "$ref": "#/components/schemas/LocationRef"
  34879. },
  34880. "type": {
  34881. "type": "string",
  34882. "enum": ["lsp.updated"]
  34883. },
  34884. "data": {
  34885. "type": "object",
  34886. "properties": {}
  34887. }
  34888. },
  34889. "required": ["id", "type", "data"],
  34890. "additionalProperties": false
  34891. },
  34892. "V2EventPermissionAsked": {
  34893. "type": "object",
  34894. "properties": {
  34895. "id": {
  34896. "type": "string",
  34897. "pattern": "^evt_"
  34898. },
  34899. "metadata": {
  34900. "type": "object"
  34901. },
  34902. "durable": {
  34903. "type": "object",
  34904. "properties": {
  34905. "aggregateID": {
  34906. "type": "string"
  34907. },
  34908. "seq": {
  34909. "type": "integer"
  34910. },
  34911. "version": {
  34912. "type": "integer"
  34913. }
  34914. },
  34915. "required": ["aggregateID", "seq", "version"],
  34916. "additionalProperties": false
  34917. },
  34918. "location": {
  34919. "$ref": "#/components/schemas/LocationRef"
  34920. },
  34921. "type": {
  34922. "type": "string",
  34923. "enum": ["permission.asked"]
  34924. },
  34925. "data": {
  34926. "type": "object",
  34927. "properties": {
  34928. "id": {
  34929. "type": "string",
  34930. "pattern": "^per"
  34931. },
  34932. "sessionID": {
  34933. "type": "string",
  34934. "pattern": "^ses"
  34935. },
  34936. "permission": {
  34937. "type": "string"
  34938. },
  34939. "patterns": {
  34940. "type": "array",
  34941. "items": {
  34942. "type": "string"
  34943. }
  34944. },
  34945. "metadata": {
  34946. "type": "object"
  34947. },
  34948. "always": {
  34949. "type": "array",
  34950. "items": {
  34951. "type": "string"
  34952. }
  34953. },
  34954. "tool": {
  34955. "type": "object",
  34956. "properties": {
  34957. "messageID": {
  34958. "type": "string"
  34959. },
  34960. "callID": {
  34961. "type": "string"
  34962. }
  34963. },
  34964. "required": ["messageID", "callID"],
  34965. "additionalProperties": false
  34966. }
  34967. },
  34968. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  34969. "additionalProperties": false
  34970. }
  34971. },
  34972. "required": ["id", "type", "data"],
  34973. "additionalProperties": false
  34974. },
  34975. "V2EventPermissionReplied": {
  34976. "type": "object",
  34977. "properties": {
  34978. "id": {
  34979. "type": "string",
  34980. "pattern": "^evt_"
  34981. },
  34982. "metadata": {
  34983. "type": "object"
  34984. },
  34985. "durable": {
  34986. "type": "object",
  34987. "properties": {
  34988. "aggregateID": {
  34989. "type": "string"
  34990. },
  34991. "seq": {
  34992. "type": "integer"
  34993. },
  34994. "version": {
  34995. "type": "integer"
  34996. }
  34997. },
  34998. "required": ["aggregateID", "seq", "version"],
  34999. "additionalProperties": false
  35000. },
  35001. "location": {
  35002. "$ref": "#/components/schemas/LocationRef"
  35003. },
  35004. "type": {
  35005. "type": "string",
  35006. "enum": ["permission.replied"]
  35007. },
  35008. "data": {
  35009. "type": "object",
  35010. "properties": {
  35011. "sessionID": {
  35012. "type": "string",
  35013. "pattern": "^ses"
  35014. },
  35015. "requestID": {
  35016. "type": "string",
  35017. "pattern": "^per"
  35018. },
  35019. "reply": {
  35020. "type": "string",
  35021. "enum": ["once", "always", "reject"]
  35022. }
  35023. },
  35024. "required": ["sessionID", "requestID", "reply"],
  35025. "additionalProperties": false
  35026. }
  35027. },
  35028. "required": ["id", "type", "data"],
  35029. "additionalProperties": false
  35030. },
  35031. "V2EventTuiPromptAppend": {
  35032. "type": "object",
  35033. "properties": {
  35034. "id": {
  35035. "type": "string",
  35036. "pattern": "^evt_"
  35037. },
  35038. "metadata": {
  35039. "type": "object"
  35040. },
  35041. "durable": {
  35042. "type": "object",
  35043. "properties": {
  35044. "aggregateID": {
  35045. "type": "string"
  35046. },
  35047. "seq": {
  35048. "type": "integer"
  35049. },
  35050. "version": {
  35051. "type": "integer"
  35052. }
  35053. },
  35054. "required": ["aggregateID", "seq", "version"],
  35055. "additionalProperties": false
  35056. },
  35057. "location": {
  35058. "$ref": "#/components/schemas/LocationRef"
  35059. },
  35060. "type": {
  35061. "type": "string",
  35062. "enum": ["tui.prompt.append"]
  35063. },
  35064. "data": {
  35065. "type": "object",
  35066. "properties": {
  35067. "text": {
  35068. "type": "string"
  35069. }
  35070. },
  35071. "required": ["text"],
  35072. "additionalProperties": false
  35073. }
  35074. },
  35075. "required": ["id", "type", "data"],
  35076. "additionalProperties": false
  35077. },
  35078. "V2EventTuiCommandExecute": {
  35079. "type": "object",
  35080. "properties": {
  35081. "id": {
  35082. "type": "string",
  35083. "pattern": "^evt_"
  35084. },
  35085. "metadata": {
  35086. "type": "object"
  35087. },
  35088. "durable": {
  35089. "type": "object",
  35090. "properties": {
  35091. "aggregateID": {
  35092. "type": "string"
  35093. },
  35094. "seq": {
  35095. "type": "integer"
  35096. },
  35097. "version": {
  35098. "type": "integer"
  35099. }
  35100. },
  35101. "required": ["aggregateID", "seq", "version"],
  35102. "additionalProperties": false
  35103. },
  35104. "location": {
  35105. "$ref": "#/components/schemas/LocationRef"
  35106. },
  35107. "type": {
  35108. "type": "string",
  35109. "enum": ["tui.command.execute"]
  35110. },
  35111. "data": {
  35112. "type": "object",
  35113. "properties": {
  35114. "command": {
  35115. "anyOf": [
  35116. {
  35117. "type": "string",
  35118. "enum": [
  35119. "session.list",
  35120. "session.new",
  35121. "session.share",
  35122. "session.interrupt",
  35123. "session.compact",
  35124. "session.page.up",
  35125. "session.page.down",
  35126. "session.line.up",
  35127. "session.line.down",
  35128. "session.half.page.up",
  35129. "session.half.page.down",
  35130. "session.first",
  35131. "session.last",
  35132. "prompt.clear",
  35133. "prompt.submit",
  35134. "agent.cycle"
  35135. ]
  35136. },
  35137. {
  35138. "type": "string"
  35139. }
  35140. ]
  35141. }
  35142. },
  35143. "required": ["command"],
  35144. "additionalProperties": false
  35145. }
  35146. },
  35147. "required": ["id", "type", "data"],
  35148. "additionalProperties": false
  35149. },
  35150. "V2EventTuiToastShow": {
  35151. "type": "object",
  35152. "properties": {
  35153. "id": {
  35154. "type": "string",
  35155. "pattern": "^evt_"
  35156. },
  35157. "metadata": {
  35158. "type": "object"
  35159. },
  35160. "durable": {
  35161. "type": "object",
  35162. "properties": {
  35163. "aggregateID": {
  35164. "type": "string"
  35165. },
  35166. "seq": {
  35167. "type": "integer"
  35168. },
  35169. "version": {
  35170. "type": "integer"
  35171. }
  35172. },
  35173. "required": ["aggregateID", "seq", "version"],
  35174. "additionalProperties": false
  35175. },
  35176. "location": {
  35177. "$ref": "#/components/schemas/LocationRef"
  35178. },
  35179. "type": {
  35180. "type": "string",
  35181. "enum": ["tui.toast.show"]
  35182. },
  35183. "data": {
  35184. "type": "object",
  35185. "properties": {
  35186. "title": {
  35187. "type": "string"
  35188. },
  35189. "message": {
  35190. "type": "string"
  35191. },
  35192. "variant": {
  35193. "type": "string",
  35194. "enum": ["info", "success", "warning", "error"]
  35195. },
  35196. "duration": {
  35197. "type": "integer",
  35198. "exclusiveMinimum": 0
  35199. }
  35200. },
  35201. "required": ["message", "variant"],
  35202. "additionalProperties": false
  35203. }
  35204. },
  35205. "required": ["id", "type", "data"],
  35206. "additionalProperties": false
  35207. },
  35208. "V2EventTuiSessionSelect": {
  35209. "type": "object",
  35210. "properties": {
  35211. "id": {
  35212. "type": "string",
  35213. "pattern": "^evt_"
  35214. },
  35215. "metadata": {
  35216. "type": "object"
  35217. },
  35218. "durable": {
  35219. "type": "object",
  35220. "properties": {
  35221. "aggregateID": {
  35222. "type": "string"
  35223. },
  35224. "seq": {
  35225. "type": "integer"
  35226. },
  35227. "version": {
  35228. "type": "integer"
  35229. }
  35230. },
  35231. "required": ["aggregateID", "seq", "version"],
  35232. "additionalProperties": false
  35233. },
  35234. "location": {
  35235. "$ref": "#/components/schemas/LocationRef"
  35236. },
  35237. "type": {
  35238. "type": "string",
  35239. "enum": ["tui.session.select"]
  35240. },
  35241. "data": {
  35242. "type": "object",
  35243. "properties": {
  35244. "sessionID": {
  35245. "type": "string",
  35246. "pattern": "^ses",
  35247. "description": "Session ID to navigate to"
  35248. }
  35249. },
  35250. "required": ["sessionID"],
  35251. "additionalProperties": false
  35252. }
  35253. },
  35254. "required": ["id", "type", "data"],
  35255. "additionalProperties": false
  35256. },
  35257. "V2EventMcpToolsChanged": {
  35258. "type": "object",
  35259. "properties": {
  35260. "id": {
  35261. "type": "string",
  35262. "pattern": "^evt_"
  35263. },
  35264. "metadata": {
  35265. "type": "object"
  35266. },
  35267. "durable": {
  35268. "type": "object",
  35269. "properties": {
  35270. "aggregateID": {
  35271. "type": "string"
  35272. },
  35273. "seq": {
  35274. "type": "integer"
  35275. },
  35276. "version": {
  35277. "type": "integer"
  35278. }
  35279. },
  35280. "required": ["aggregateID", "seq", "version"],
  35281. "additionalProperties": false
  35282. },
  35283. "location": {
  35284. "$ref": "#/components/schemas/LocationRef"
  35285. },
  35286. "type": {
  35287. "type": "string",
  35288. "enum": ["mcp.tools.changed"]
  35289. },
  35290. "data": {
  35291. "type": "object",
  35292. "properties": {
  35293. "server": {
  35294. "type": "string"
  35295. }
  35296. },
  35297. "required": ["server"],
  35298. "additionalProperties": false
  35299. }
  35300. },
  35301. "required": ["id", "type", "data"],
  35302. "additionalProperties": false
  35303. },
  35304. "V2EventMcpBrowserOpenFailed": {
  35305. "type": "object",
  35306. "properties": {
  35307. "id": {
  35308. "type": "string",
  35309. "pattern": "^evt_"
  35310. },
  35311. "metadata": {
  35312. "type": "object"
  35313. },
  35314. "durable": {
  35315. "type": "object",
  35316. "properties": {
  35317. "aggregateID": {
  35318. "type": "string"
  35319. },
  35320. "seq": {
  35321. "type": "integer"
  35322. },
  35323. "version": {
  35324. "type": "integer"
  35325. }
  35326. },
  35327. "required": ["aggregateID", "seq", "version"],
  35328. "additionalProperties": false
  35329. },
  35330. "location": {
  35331. "$ref": "#/components/schemas/LocationRef"
  35332. },
  35333. "type": {
  35334. "type": "string",
  35335. "enum": ["mcp.browser.open.failed"]
  35336. },
  35337. "data": {
  35338. "type": "object",
  35339. "properties": {
  35340. "mcpName": {
  35341. "type": "string"
  35342. },
  35343. "url": {
  35344. "type": "string"
  35345. }
  35346. },
  35347. "required": ["mcpName", "url"],
  35348. "additionalProperties": false
  35349. }
  35350. },
  35351. "required": ["id", "type", "data"],
  35352. "additionalProperties": false
  35353. },
  35354. "V2EventCommandExecuted": {
  35355. "type": "object",
  35356. "properties": {
  35357. "id": {
  35358. "type": "string",
  35359. "pattern": "^evt_"
  35360. },
  35361. "metadata": {
  35362. "type": "object"
  35363. },
  35364. "durable": {
  35365. "type": "object",
  35366. "properties": {
  35367. "aggregateID": {
  35368. "type": "string"
  35369. },
  35370. "seq": {
  35371. "type": "integer"
  35372. },
  35373. "version": {
  35374. "type": "integer"
  35375. }
  35376. },
  35377. "required": ["aggregateID", "seq", "version"],
  35378. "additionalProperties": false
  35379. },
  35380. "location": {
  35381. "$ref": "#/components/schemas/LocationRef"
  35382. },
  35383. "type": {
  35384. "type": "string",
  35385. "enum": ["command.executed"]
  35386. },
  35387. "data": {
  35388. "type": "object",
  35389. "properties": {
  35390. "name": {
  35391. "type": "string"
  35392. },
  35393. "sessionID": {
  35394. "type": "string",
  35395. "pattern": "^ses"
  35396. },
  35397. "arguments": {
  35398. "type": "string"
  35399. },
  35400. "messageID": {
  35401. "type": "string",
  35402. "pattern": "^msg"
  35403. }
  35404. },
  35405. "required": ["name", "sessionID", "arguments", "messageID"],
  35406. "additionalProperties": false
  35407. }
  35408. },
  35409. "required": ["id", "type", "data"],
  35410. "additionalProperties": false
  35411. },
  35412. "V2EventProjectUpdated": {
  35413. "type": "object",
  35414. "properties": {
  35415. "id": {
  35416. "type": "string",
  35417. "pattern": "^evt_"
  35418. },
  35419. "metadata": {
  35420. "type": "object"
  35421. },
  35422. "durable": {
  35423. "type": "object",
  35424. "properties": {
  35425. "aggregateID": {
  35426. "type": "string"
  35427. },
  35428. "seq": {
  35429. "type": "integer"
  35430. },
  35431. "version": {
  35432. "type": "integer"
  35433. }
  35434. },
  35435. "required": ["aggregateID", "seq", "version"],
  35436. "additionalProperties": false
  35437. },
  35438. "location": {
  35439. "$ref": "#/components/schemas/LocationRef"
  35440. },
  35441. "type": {
  35442. "type": "string",
  35443. "enum": ["project.updated"]
  35444. },
  35445. "data": {
  35446. "type": "object",
  35447. "properties": {
  35448. "id": {
  35449. "type": "string"
  35450. },
  35451. "worktree": {
  35452. "type": "string"
  35453. },
  35454. "vcs": {
  35455. "$ref": "#/components/schemas/ProjectVcs"
  35456. },
  35457. "name": {
  35458. "type": "string"
  35459. },
  35460. "icon": {
  35461. "$ref": "#/components/schemas/ProjectIcon"
  35462. },
  35463. "commands": {
  35464. "$ref": "#/components/schemas/ProjectCommands"
  35465. },
  35466. "time": {
  35467. "$ref": "#/components/schemas/ProjectTime"
  35468. },
  35469. "sandboxes": {
  35470. "type": "array",
  35471. "items": {
  35472. "type": "string"
  35473. }
  35474. }
  35475. },
  35476. "required": ["id", "worktree", "time", "sandboxes"],
  35477. "additionalProperties": false
  35478. }
  35479. },
  35480. "required": ["id", "type", "data"],
  35481. "additionalProperties": false
  35482. },
  35483. "V2EventSessionStatus": {
  35484. "type": "object",
  35485. "properties": {
  35486. "id": {
  35487. "type": "string",
  35488. "pattern": "^evt_"
  35489. },
  35490. "metadata": {
  35491. "type": "object"
  35492. },
  35493. "durable": {
  35494. "type": "object",
  35495. "properties": {
  35496. "aggregateID": {
  35497. "type": "string"
  35498. },
  35499. "seq": {
  35500. "type": "integer"
  35501. },
  35502. "version": {
  35503. "type": "integer"
  35504. }
  35505. },
  35506. "required": ["aggregateID", "seq", "version"],
  35507. "additionalProperties": false
  35508. },
  35509. "location": {
  35510. "$ref": "#/components/schemas/LocationRef"
  35511. },
  35512. "type": {
  35513. "type": "string",
  35514. "enum": ["session.status"]
  35515. },
  35516. "data": {
  35517. "type": "object",
  35518. "properties": {
  35519. "sessionID": {
  35520. "type": "string",
  35521. "pattern": "^ses"
  35522. },
  35523. "status": {
  35524. "$ref": "#/components/schemas/SessionStatus"
  35525. }
  35526. },
  35527. "required": ["sessionID", "status"],
  35528. "additionalProperties": false
  35529. }
  35530. },
  35531. "required": ["id", "type", "data"],
  35532. "additionalProperties": false
  35533. },
  35534. "V2EventSessionIdle": {
  35535. "type": "object",
  35536. "properties": {
  35537. "id": {
  35538. "type": "string",
  35539. "pattern": "^evt_"
  35540. },
  35541. "metadata": {
  35542. "type": "object"
  35543. },
  35544. "durable": {
  35545. "type": "object",
  35546. "properties": {
  35547. "aggregateID": {
  35548. "type": "string"
  35549. },
  35550. "seq": {
  35551. "type": "integer"
  35552. },
  35553. "version": {
  35554. "type": "integer"
  35555. }
  35556. },
  35557. "required": ["aggregateID", "seq", "version"],
  35558. "additionalProperties": false
  35559. },
  35560. "location": {
  35561. "$ref": "#/components/schemas/LocationRef"
  35562. },
  35563. "type": {
  35564. "type": "string",
  35565. "enum": ["session.idle"]
  35566. },
  35567. "data": {
  35568. "type": "object",
  35569. "properties": {
  35570. "sessionID": {
  35571. "type": "string",
  35572. "pattern": "^ses"
  35573. }
  35574. },
  35575. "required": ["sessionID"],
  35576. "additionalProperties": false
  35577. }
  35578. },
  35579. "required": ["id", "type", "data"],
  35580. "additionalProperties": false
  35581. },
  35582. "V2EventQuestionAsked": {
  35583. "type": "object",
  35584. "properties": {
  35585. "id": {
  35586. "type": "string",
  35587. "pattern": "^evt_"
  35588. },
  35589. "metadata": {
  35590. "type": "object"
  35591. },
  35592. "durable": {
  35593. "type": "object",
  35594. "properties": {
  35595. "aggregateID": {
  35596. "type": "string"
  35597. },
  35598. "seq": {
  35599. "type": "integer"
  35600. },
  35601. "version": {
  35602. "type": "integer"
  35603. }
  35604. },
  35605. "required": ["aggregateID", "seq", "version"],
  35606. "additionalProperties": false
  35607. },
  35608. "location": {
  35609. "$ref": "#/components/schemas/LocationRef"
  35610. },
  35611. "type": {
  35612. "type": "string",
  35613. "enum": ["question.asked"]
  35614. },
  35615. "data": {
  35616. "type": "object",
  35617. "properties": {
  35618. "id": {
  35619. "type": "string",
  35620. "pattern": "^que"
  35621. },
  35622. "sessionID": {
  35623. "type": "string",
  35624. "pattern": "^ses"
  35625. },
  35626. "questions": {
  35627. "type": "array",
  35628. "items": {
  35629. "$ref": "#/components/schemas/QuestionInfo"
  35630. },
  35631. "description": "Questions to ask"
  35632. },
  35633. "tool": {
  35634. "$ref": "#/components/schemas/QuestionTool"
  35635. }
  35636. },
  35637. "required": ["id", "sessionID", "questions"],
  35638. "additionalProperties": false
  35639. }
  35640. },
  35641. "required": ["id", "type", "data"],
  35642. "additionalProperties": false
  35643. },
  35644. "V2EventQuestionReplied": {
  35645. "type": "object",
  35646. "properties": {
  35647. "id": {
  35648. "type": "string",
  35649. "pattern": "^evt_"
  35650. },
  35651. "metadata": {
  35652. "type": "object"
  35653. },
  35654. "durable": {
  35655. "type": "object",
  35656. "properties": {
  35657. "aggregateID": {
  35658. "type": "string"
  35659. },
  35660. "seq": {
  35661. "type": "integer"
  35662. },
  35663. "version": {
  35664. "type": "integer"
  35665. }
  35666. },
  35667. "required": ["aggregateID", "seq", "version"],
  35668. "additionalProperties": false
  35669. },
  35670. "location": {
  35671. "$ref": "#/components/schemas/LocationRef"
  35672. },
  35673. "type": {
  35674. "type": "string",
  35675. "enum": ["question.replied"]
  35676. },
  35677. "data": {
  35678. "type": "object",
  35679. "properties": {
  35680. "sessionID": {
  35681. "type": "string",
  35682. "pattern": "^ses"
  35683. },
  35684. "requestID": {
  35685. "type": "string",
  35686. "pattern": "^que"
  35687. },
  35688. "answers": {
  35689. "type": "array",
  35690. "items": {
  35691. "$ref": "#/components/schemas/QuestionAnswer"
  35692. }
  35693. }
  35694. },
  35695. "required": ["sessionID", "requestID", "answers"],
  35696. "additionalProperties": false
  35697. }
  35698. },
  35699. "required": ["id", "type", "data"],
  35700. "additionalProperties": false
  35701. },
  35702. "V2EventQuestionRejected": {
  35703. "type": "object",
  35704. "properties": {
  35705. "id": {
  35706. "type": "string",
  35707. "pattern": "^evt_"
  35708. },
  35709. "metadata": {
  35710. "type": "object"
  35711. },
  35712. "durable": {
  35713. "type": "object",
  35714. "properties": {
  35715. "aggregateID": {
  35716. "type": "string"
  35717. },
  35718. "seq": {
  35719. "type": "integer"
  35720. },
  35721. "version": {
  35722. "type": "integer"
  35723. }
  35724. },
  35725. "required": ["aggregateID", "seq", "version"],
  35726. "additionalProperties": false
  35727. },
  35728. "location": {
  35729. "$ref": "#/components/schemas/LocationRef"
  35730. },
  35731. "type": {
  35732. "type": "string",
  35733. "enum": ["question.rejected"]
  35734. },
  35735. "data": {
  35736. "type": "object",
  35737. "properties": {
  35738. "sessionID": {
  35739. "type": "string",
  35740. "pattern": "^ses"
  35741. },
  35742. "requestID": {
  35743. "type": "string",
  35744. "pattern": "^que"
  35745. }
  35746. },
  35747. "required": ["sessionID", "requestID"],
  35748. "additionalProperties": false
  35749. }
  35750. },
  35751. "required": ["id", "type", "data"],
  35752. "additionalProperties": false
  35753. },
  35754. "V2EventSessionCompacted": {
  35755. "type": "object",
  35756. "properties": {
  35757. "id": {
  35758. "type": "string",
  35759. "pattern": "^evt_"
  35760. },
  35761. "metadata": {
  35762. "type": "object"
  35763. },
  35764. "durable": {
  35765. "type": "object",
  35766. "properties": {
  35767. "aggregateID": {
  35768. "type": "string"
  35769. },
  35770. "seq": {
  35771. "type": "integer"
  35772. },
  35773. "version": {
  35774. "type": "integer"
  35775. }
  35776. },
  35777. "required": ["aggregateID", "seq", "version"],
  35778. "additionalProperties": false
  35779. },
  35780. "location": {
  35781. "$ref": "#/components/schemas/LocationRef"
  35782. },
  35783. "type": {
  35784. "type": "string",
  35785. "enum": ["session.compacted"]
  35786. },
  35787. "data": {
  35788. "type": "object",
  35789. "properties": {
  35790. "sessionID": {
  35791. "type": "string",
  35792. "pattern": "^ses"
  35793. }
  35794. },
  35795. "required": ["sessionID"],
  35796. "additionalProperties": false
  35797. }
  35798. },
  35799. "required": ["id", "type", "data"],
  35800. "additionalProperties": false
  35801. },
  35802. "V2EventVcsBranchUpdated": {
  35803. "type": "object",
  35804. "properties": {
  35805. "id": {
  35806. "type": "string",
  35807. "pattern": "^evt_"
  35808. },
  35809. "metadata": {
  35810. "type": "object"
  35811. },
  35812. "durable": {
  35813. "type": "object",
  35814. "properties": {
  35815. "aggregateID": {
  35816. "type": "string"
  35817. },
  35818. "seq": {
  35819. "type": "integer"
  35820. },
  35821. "version": {
  35822. "type": "integer"
  35823. }
  35824. },
  35825. "required": ["aggregateID", "seq", "version"],
  35826. "additionalProperties": false
  35827. },
  35828. "location": {
  35829. "$ref": "#/components/schemas/LocationRef"
  35830. },
  35831. "type": {
  35832. "type": "string",
  35833. "enum": ["vcs.branch.updated"]
  35834. },
  35835. "data": {
  35836. "type": "object",
  35837. "properties": {
  35838. "branch": {
  35839. "type": "string"
  35840. }
  35841. },
  35842. "additionalProperties": false
  35843. }
  35844. },
  35845. "required": ["id", "type", "data"],
  35846. "additionalProperties": false
  35847. },
  35848. "V2EventWorkspaceReady": {
  35849. "type": "object",
  35850. "properties": {
  35851. "id": {
  35852. "type": "string",
  35853. "pattern": "^evt_"
  35854. },
  35855. "metadata": {
  35856. "type": "object"
  35857. },
  35858. "durable": {
  35859. "type": "object",
  35860. "properties": {
  35861. "aggregateID": {
  35862. "type": "string"
  35863. },
  35864. "seq": {
  35865. "type": "integer"
  35866. },
  35867. "version": {
  35868. "type": "integer"
  35869. }
  35870. },
  35871. "required": ["aggregateID", "seq", "version"],
  35872. "additionalProperties": false
  35873. },
  35874. "location": {
  35875. "$ref": "#/components/schemas/LocationRef"
  35876. },
  35877. "type": {
  35878. "type": "string",
  35879. "enum": ["workspace.ready"]
  35880. },
  35881. "data": {
  35882. "type": "object",
  35883. "properties": {
  35884. "name": {
  35885. "type": "string"
  35886. }
  35887. },
  35888. "required": ["name"],
  35889. "additionalProperties": false
  35890. }
  35891. },
  35892. "required": ["id", "type", "data"],
  35893. "additionalProperties": false
  35894. },
  35895. "V2EventWorkspaceFailed": {
  35896. "type": "object",
  35897. "properties": {
  35898. "id": {
  35899. "type": "string",
  35900. "pattern": "^evt_"
  35901. },
  35902. "metadata": {
  35903. "type": "object"
  35904. },
  35905. "durable": {
  35906. "type": "object",
  35907. "properties": {
  35908. "aggregateID": {
  35909. "type": "string"
  35910. },
  35911. "seq": {
  35912. "type": "integer"
  35913. },
  35914. "version": {
  35915. "type": "integer"
  35916. }
  35917. },
  35918. "required": ["aggregateID", "seq", "version"],
  35919. "additionalProperties": false
  35920. },
  35921. "location": {
  35922. "$ref": "#/components/schemas/LocationRef"
  35923. },
  35924. "type": {
  35925. "type": "string",
  35926. "enum": ["workspace.failed"]
  35927. },
  35928. "data": {
  35929. "type": "object",
  35930. "properties": {
  35931. "message": {
  35932. "type": "string"
  35933. }
  35934. },
  35935. "required": ["message"],
  35936. "additionalProperties": false
  35937. }
  35938. },
  35939. "required": ["id", "type", "data"],
  35940. "additionalProperties": false
  35941. },
  35942. "V2EventWorkspaceStatus": {
  35943. "type": "object",
  35944. "properties": {
  35945. "id": {
  35946. "type": "string",
  35947. "pattern": "^evt_"
  35948. },
  35949. "metadata": {
  35950. "type": "object"
  35951. },
  35952. "durable": {
  35953. "type": "object",
  35954. "properties": {
  35955. "aggregateID": {
  35956. "type": "string"
  35957. },
  35958. "seq": {
  35959. "type": "integer"
  35960. },
  35961. "version": {
  35962. "type": "integer"
  35963. }
  35964. },
  35965. "required": ["aggregateID", "seq", "version"],
  35966. "additionalProperties": false
  35967. },
  35968. "location": {
  35969. "$ref": "#/components/schemas/LocationRef"
  35970. },
  35971. "type": {
  35972. "type": "string",
  35973. "enum": ["workspace.status"]
  35974. },
  35975. "data": {
  35976. "type": "object",
  35977. "properties": {
  35978. "workspaceID": {
  35979. "type": "string",
  35980. "pattern": "^wrk"
  35981. },
  35982. "status": {
  35983. "type": "string",
  35984. "enum": ["connected", "connecting", "disconnected", "error"]
  35985. }
  35986. },
  35987. "required": ["workspaceID", "status"],
  35988. "additionalProperties": false
  35989. }
  35990. },
  35991. "required": ["id", "type", "data"],
  35992. "additionalProperties": false
  35993. },
  35994. "V2EventWorktreeReady": {
  35995. "type": "object",
  35996. "properties": {
  35997. "id": {
  35998. "type": "string",
  35999. "pattern": "^evt_"
  36000. },
  36001. "metadata": {
  36002. "type": "object"
  36003. },
  36004. "durable": {
  36005. "type": "object",
  36006. "properties": {
  36007. "aggregateID": {
  36008. "type": "string"
  36009. },
  36010. "seq": {
  36011. "type": "integer"
  36012. },
  36013. "version": {
  36014. "type": "integer"
  36015. }
  36016. },
  36017. "required": ["aggregateID", "seq", "version"],
  36018. "additionalProperties": false
  36019. },
  36020. "location": {
  36021. "$ref": "#/components/schemas/LocationRef"
  36022. },
  36023. "type": {
  36024. "type": "string",
  36025. "enum": ["worktree.ready"]
  36026. },
  36027. "data": {
  36028. "type": "object",
  36029. "properties": {
  36030. "name": {
  36031. "type": "string"
  36032. },
  36033. "branch": {
  36034. "type": "string"
  36035. }
  36036. },
  36037. "required": ["name"],
  36038. "additionalProperties": false
  36039. }
  36040. },
  36041. "required": ["id", "type", "data"],
  36042. "additionalProperties": false
  36043. },
  36044. "V2EventWorktreeFailed": {
  36045. "type": "object",
  36046. "properties": {
  36047. "id": {
  36048. "type": "string",
  36049. "pattern": "^evt_"
  36050. },
  36051. "metadata": {
  36052. "type": "object"
  36053. },
  36054. "durable": {
  36055. "type": "object",
  36056. "properties": {
  36057. "aggregateID": {
  36058. "type": "string"
  36059. },
  36060. "seq": {
  36061. "type": "integer"
  36062. },
  36063. "version": {
  36064. "type": "integer"
  36065. }
  36066. },
  36067. "required": ["aggregateID", "seq", "version"],
  36068. "additionalProperties": false
  36069. },
  36070. "location": {
  36071. "$ref": "#/components/schemas/LocationRef"
  36072. },
  36073. "type": {
  36074. "type": "string",
  36075. "enum": ["worktree.failed"]
  36076. },
  36077. "data": {
  36078. "type": "object",
  36079. "properties": {
  36080. "message": {
  36081. "type": "string"
  36082. }
  36083. },
  36084. "required": ["message"],
  36085. "additionalProperties": false
  36086. }
  36087. },
  36088. "required": ["id", "type", "data"],
  36089. "additionalProperties": false
  36090. },
  36091. "V2EventServerConnected": {
  36092. "type": "object",
  36093. "properties": {
  36094. "id": {
  36095. "type": "string",
  36096. "pattern": "^evt_"
  36097. },
  36098. "metadata": {
  36099. "type": "object"
  36100. },
  36101. "durable": {
  36102. "type": "object",
  36103. "properties": {
  36104. "aggregateID": {
  36105. "type": "string"
  36106. },
  36107. "seq": {
  36108. "type": "integer"
  36109. },
  36110. "version": {
  36111. "type": "integer"
  36112. }
  36113. },
  36114. "required": ["aggregateID", "seq", "version"],
  36115. "additionalProperties": false
  36116. },
  36117. "location": {
  36118. "$ref": "#/components/schemas/LocationRef"
  36119. },
  36120. "type": {
  36121. "type": "string",
  36122. "enum": ["server.connected"]
  36123. },
  36124. "data": {
  36125. "type": "object",
  36126. "properties": {}
  36127. }
  36128. },
  36129. "required": ["id", "type", "data"],
  36130. "additionalProperties": false
  36131. },
  36132. "V2EventGlobalDisposed": {
  36133. "type": "object",
  36134. "properties": {
  36135. "id": {
  36136. "type": "string",
  36137. "pattern": "^evt_"
  36138. },
  36139. "metadata": {
  36140. "type": "object"
  36141. },
  36142. "durable": {
  36143. "type": "object",
  36144. "properties": {
  36145. "aggregateID": {
  36146. "type": "string"
  36147. },
  36148. "seq": {
  36149. "type": "integer"
  36150. },
  36151. "version": {
  36152. "type": "integer"
  36153. }
  36154. },
  36155. "required": ["aggregateID", "seq", "version"],
  36156. "additionalProperties": false
  36157. },
  36158. "location": {
  36159. "$ref": "#/components/schemas/LocationRef"
  36160. },
  36161. "type": {
  36162. "type": "string",
  36163. "enum": ["global.disposed"]
  36164. },
  36165. "data": {
  36166. "type": "object",
  36167. "properties": {}
  36168. }
  36169. },
  36170. "required": ["id", "type", "data"],
  36171. "additionalProperties": false
  36172. },
  36173. "QuestionV2Request": {
  36174. "type": "object",
  36175. "properties": {
  36176. "id": {
  36177. "type": "string",
  36178. "pattern": "^que"
  36179. },
  36180. "sessionID": {
  36181. "type": "string",
  36182. "pattern": "^ses"
  36183. },
  36184. "questions": {
  36185. "type": "array",
  36186. "items": {
  36187. "$ref": "#/components/schemas/QuestionV2Info"
  36188. },
  36189. "description": "Questions to ask"
  36190. },
  36191. "tool": {
  36192. "$ref": "#/components/schemas/QuestionV2Tool"
  36193. }
  36194. },
  36195. "required": ["id", "sessionID", "questions"],
  36196. "additionalProperties": false
  36197. },
  36198. "QuestionV2Reply": {
  36199. "type": "object",
  36200. "properties": {
  36201. "answers": {
  36202. "type": "array",
  36203. "items": {
  36204. "$ref": "#/components/schemas/QuestionV2Answer"
  36205. },
  36206. "description": "User answers in order of questions (each answer is an array of selected labels)"
  36207. }
  36208. },
  36209. "required": ["answers"],
  36210. "additionalProperties": false
  36211. },
  36212. "ReferenceLocalSource": {
  36213. "type": "object",
  36214. "properties": {
  36215. "type": {
  36216. "type": "string",
  36217. "enum": ["local"]
  36218. },
  36219. "path": {
  36220. "type": "string"
  36221. },
  36222. "description": {
  36223. "type": "string"
  36224. },
  36225. "hidden": {
  36226. "type": "boolean"
  36227. }
  36228. },
  36229. "required": ["type", "path"],
  36230. "additionalProperties": false
  36231. },
  36232. "ReferenceGitSource": {
  36233. "type": "object",
  36234. "properties": {
  36235. "type": {
  36236. "type": "string",
  36237. "enum": ["git"]
  36238. },
  36239. "repository": {
  36240. "type": "string"
  36241. },
  36242. "branch": {
  36243. "type": "string"
  36244. },
  36245. "description": {
  36246. "type": "string"
  36247. },
  36248. "hidden": {
  36249. "type": "boolean"
  36250. }
  36251. },
  36252. "required": ["type", "repository"],
  36253. "additionalProperties": false
  36254. },
  36255. "ReferenceSource": {
  36256. "anyOf": [
  36257. {
  36258. "$ref": "#/components/schemas/ReferenceLocalSource"
  36259. },
  36260. {
  36261. "$ref": "#/components/schemas/ReferenceGitSource"
  36262. }
  36263. ]
  36264. },
  36265. "ReferenceInfo": {
  36266. "type": "object",
  36267. "properties": {
  36268. "name": {
  36269. "type": "string"
  36270. },
  36271. "path": {
  36272. "type": "string"
  36273. },
  36274. "description": {
  36275. "type": "string"
  36276. },
  36277. "hidden": {
  36278. "type": "boolean"
  36279. },
  36280. "source": {
  36281. "$ref": "#/components/schemas/ReferenceSource"
  36282. }
  36283. },
  36284. "required": ["name", "path", "source"],
  36285. "additionalProperties": false
  36286. },
  36287. "ProjectCopyCopy": {
  36288. "type": "object",
  36289. "properties": {
  36290. "directory": {
  36291. "type": "string"
  36292. }
  36293. },
  36294. "required": ["directory"],
  36295. "additionalProperties": false
  36296. },
  36297. "EventModels-devRefreshed": {
  36298. "type": "object",
  36299. "properties": {
  36300. "id": {
  36301. "type": "string",
  36302. "pattern": "^evt_"
  36303. },
  36304. "type": {
  36305. "type": "string",
  36306. "enum": ["models-dev.refreshed"]
  36307. },
  36308. "properties": {
  36309. "type": "object",
  36310. "properties": {}
  36311. }
  36312. },
  36313. "required": ["id", "type", "properties"],
  36314. "additionalProperties": false
  36315. },
  36316. "EventIntegrationUpdated": {
  36317. "type": "object",
  36318. "properties": {
  36319. "id": {
  36320. "type": "string",
  36321. "pattern": "^evt_"
  36322. },
  36323. "type": {
  36324. "type": "string",
  36325. "enum": ["integration.updated"]
  36326. },
  36327. "properties": {
  36328. "type": "object",
  36329. "properties": {}
  36330. }
  36331. },
  36332. "required": ["id", "type", "properties"],
  36333. "additionalProperties": false
  36334. },
  36335. "EventIntegrationConnectionUpdated": {
  36336. "type": "object",
  36337. "properties": {
  36338. "id": {
  36339. "type": "string",
  36340. "pattern": "^evt_"
  36341. },
  36342. "type": {
  36343. "type": "string",
  36344. "enum": ["integration.connection.updated"]
  36345. },
  36346. "properties": {
  36347. "type": "object",
  36348. "properties": {
  36349. "integrationID": {
  36350. "type": "string"
  36351. }
  36352. },
  36353. "required": ["integrationID"],
  36354. "additionalProperties": false
  36355. }
  36356. },
  36357. "required": ["id", "type", "properties"],
  36358. "additionalProperties": false
  36359. },
  36360. "EventCatalogUpdated": {
  36361. "type": "object",
  36362. "properties": {
  36363. "id": {
  36364. "type": "string",
  36365. "pattern": "^evt_"
  36366. },
  36367. "type": {
  36368. "type": "string",
  36369. "enum": ["catalog.updated"]
  36370. },
  36371. "properties": {
  36372. "type": "object",
  36373. "properties": {}
  36374. }
  36375. },
  36376. "required": ["id", "type", "properties"],
  36377. "additionalProperties": false
  36378. },
  36379. "EventSessionCreated": {
  36380. "type": "object",
  36381. "properties": {
  36382. "id": {
  36383. "type": "string",
  36384. "pattern": "^evt_"
  36385. },
  36386. "type": {
  36387. "type": "string",
  36388. "enum": ["session.created"]
  36389. },
  36390. "properties": {
  36391. "type": "object",
  36392. "properties": {
  36393. "sessionID": {
  36394. "type": "string",
  36395. "pattern": "^ses"
  36396. },
  36397. "info": {
  36398. "$ref": "#/components/schemas/Session"
  36399. }
  36400. },
  36401. "required": ["sessionID", "info"],
  36402. "additionalProperties": false
  36403. }
  36404. },
  36405. "required": ["id", "type", "properties"],
  36406. "additionalProperties": false
  36407. },
  36408. "EventSessionUpdated": {
  36409. "type": "object",
  36410. "properties": {
  36411. "id": {
  36412. "type": "string",
  36413. "pattern": "^evt_"
  36414. },
  36415. "type": {
  36416. "type": "string",
  36417. "enum": ["session.updated"]
  36418. },
  36419. "properties": {
  36420. "type": "object",
  36421. "properties": {
  36422. "sessionID": {
  36423. "type": "string",
  36424. "pattern": "^ses"
  36425. },
  36426. "info": {
  36427. "$ref": "#/components/schemas/Session"
  36428. }
  36429. },
  36430. "required": ["sessionID", "info"],
  36431. "additionalProperties": false
  36432. }
  36433. },
  36434. "required": ["id", "type", "properties"],
  36435. "additionalProperties": false
  36436. },
  36437. "EventSessionDeleted": {
  36438. "type": "object",
  36439. "properties": {
  36440. "id": {
  36441. "type": "string",
  36442. "pattern": "^evt_"
  36443. },
  36444. "type": {
  36445. "type": "string",
  36446. "enum": ["session.deleted"]
  36447. },
  36448. "properties": {
  36449. "type": "object",
  36450. "properties": {
  36451. "sessionID": {
  36452. "type": "string",
  36453. "pattern": "^ses"
  36454. },
  36455. "info": {
  36456. "$ref": "#/components/schemas/Session"
  36457. }
  36458. },
  36459. "required": ["sessionID", "info"],
  36460. "additionalProperties": false
  36461. }
  36462. },
  36463. "required": ["id", "type", "properties"],
  36464. "additionalProperties": false
  36465. },
  36466. "EventMessageUpdated": {
  36467. "type": "object",
  36468. "properties": {
  36469. "id": {
  36470. "type": "string",
  36471. "pattern": "^evt_"
  36472. },
  36473. "type": {
  36474. "type": "string",
  36475. "enum": ["message.updated"]
  36476. },
  36477. "properties": {
  36478. "type": "object",
  36479. "properties": {
  36480. "sessionID": {
  36481. "type": "string",
  36482. "pattern": "^ses"
  36483. },
  36484. "info": {
  36485. "$ref": "#/components/schemas/Message"
  36486. }
  36487. },
  36488. "required": ["sessionID", "info"],
  36489. "additionalProperties": false
  36490. }
  36491. },
  36492. "required": ["id", "type", "properties"],
  36493. "additionalProperties": false
  36494. },
  36495. "EventMessageRemoved": {
  36496. "type": "object",
  36497. "properties": {
  36498. "id": {
  36499. "type": "string",
  36500. "pattern": "^evt_"
  36501. },
  36502. "type": {
  36503. "type": "string",
  36504. "enum": ["message.removed"]
  36505. },
  36506. "properties": {
  36507. "type": "object",
  36508. "properties": {
  36509. "sessionID": {
  36510. "type": "string",
  36511. "pattern": "^ses"
  36512. },
  36513. "messageID": {
  36514. "type": "string",
  36515. "pattern": "^msg"
  36516. }
  36517. },
  36518. "required": ["sessionID", "messageID"],
  36519. "additionalProperties": false
  36520. }
  36521. },
  36522. "required": ["id", "type", "properties"],
  36523. "additionalProperties": false
  36524. },
  36525. "EventMessagePartUpdated": {
  36526. "type": "object",
  36527. "properties": {
  36528. "id": {
  36529. "type": "string",
  36530. "pattern": "^evt_"
  36531. },
  36532. "type": {
  36533. "type": "string",
  36534. "enum": ["message.part.updated"]
  36535. },
  36536. "properties": {
  36537. "type": "object",
  36538. "properties": {
  36539. "sessionID": {
  36540. "type": "string",
  36541. "pattern": "^ses"
  36542. },
  36543. "part": {
  36544. "$ref": "#/components/schemas/Part"
  36545. },
  36546. "time": {
  36547. "type": "number"
  36548. }
  36549. },
  36550. "required": ["sessionID", "part", "time"],
  36551. "additionalProperties": false
  36552. }
  36553. },
  36554. "required": ["id", "type", "properties"],
  36555. "additionalProperties": false
  36556. },
  36557. "EventMessagePartRemoved": {
  36558. "type": "object",
  36559. "properties": {
  36560. "id": {
  36561. "type": "string",
  36562. "pattern": "^evt_"
  36563. },
  36564. "type": {
  36565. "type": "string",
  36566. "enum": ["message.part.removed"]
  36567. },
  36568. "properties": {
  36569. "type": "object",
  36570. "properties": {
  36571. "sessionID": {
  36572. "type": "string",
  36573. "pattern": "^ses"
  36574. },
  36575. "messageID": {
  36576. "type": "string",
  36577. "pattern": "^msg"
  36578. },
  36579. "partID": {
  36580. "type": "string",
  36581. "pattern": "^prt"
  36582. }
  36583. },
  36584. "required": ["sessionID", "messageID", "partID"],
  36585. "additionalProperties": false
  36586. }
  36587. },
  36588. "required": ["id", "type", "properties"],
  36589. "additionalProperties": false
  36590. },
  36591. "EventSessionNextAgentSwitched": {
  36592. "type": "object",
  36593. "properties": {
  36594. "id": {
  36595. "type": "string",
  36596. "pattern": "^evt_"
  36597. },
  36598. "type": {
  36599. "type": "string",
  36600. "enum": ["session.next.agent.switched"]
  36601. },
  36602. "properties": {
  36603. "type": "object",
  36604. "properties": {
  36605. "timestamp": {
  36606. "type": "number"
  36607. },
  36608. "sessionID": {
  36609. "type": "string",
  36610. "pattern": "^ses"
  36611. },
  36612. "messageID": {
  36613. "type": "string",
  36614. "pattern": "^msg_"
  36615. },
  36616. "agent": {
  36617. "type": "string"
  36618. }
  36619. },
  36620. "required": ["timestamp", "sessionID", "messageID", "agent"],
  36621. "additionalProperties": false
  36622. }
  36623. },
  36624. "required": ["id", "type", "properties"],
  36625. "additionalProperties": false
  36626. },
  36627. "EventSessionNextModelSwitched": {
  36628. "type": "object",
  36629. "properties": {
  36630. "id": {
  36631. "type": "string",
  36632. "pattern": "^evt_"
  36633. },
  36634. "type": {
  36635. "type": "string",
  36636. "enum": ["session.next.model.switched"]
  36637. },
  36638. "properties": {
  36639. "type": "object",
  36640. "properties": {
  36641. "timestamp": {
  36642. "type": "number"
  36643. },
  36644. "sessionID": {
  36645. "type": "string",
  36646. "pattern": "^ses"
  36647. },
  36648. "messageID": {
  36649. "type": "string",
  36650. "pattern": "^msg_"
  36651. },
  36652. "model": {
  36653. "$ref": "#/components/schemas/ModelRef"
  36654. }
  36655. },
  36656. "required": ["timestamp", "sessionID", "messageID", "model"],
  36657. "additionalProperties": false
  36658. }
  36659. },
  36660. "required": ["id", "type", "properties"],
  36661. "additionalProperties": false
  36662. },
  36663. "EventSessionNextMoved": {
  36664. "type": "object",
  36665. "properties": {
  36666. "id": {
  36667. "type": "string",
  36668. "pattern": "^evt_"
  36669. },
  36670. "type": {
  36671. "type": "string",
  36672. "enum": ["session.next.moved"]
  36673. },
  36674. "properties": {
  36675. "type": "object",
  36676. "properties": {
  36677. "timestamp": {
  36678. "type": "number"
  36679. },
  36680. "sessionID": {
  36681. "type": "string",
  36682. "pattern": "^ses"
  36683. },
  36684. "location": {
  36685. "$ref": "#/components/schemas/LocationRef"
  36686. },
  36687. "subdirectory": {
  36688. "type": "string"
  36689. }
  36690. },
  36691. "required": ["timestamp", "sessionID", "location"],
  36692. "additionalProperties": false
  36693. }
  36694. },
  36695. "required": ["id", "type", "properties"],
  36696. "additionalProperties": false
  36697. },
  36698. "EventSessionNextPrompted": {
  36699. "type": "object",
  36700. "properties": {
  36701. "id": {
  36702. "type": "string",
  36703. "pattern": "^evt_"
  36704. },
  36705. "type": {
  36706. "type": "string",
  36707. "enum": ["session.next.prompted"]
  36708. },
  36709. "properties": {
  36710. "type": "object",
  36711. "properties": {
  36712. "timestamp": {
  36713. "type": "number"
  36714. },
  36715. "sessionID": {
  36716. "type": "string",
  36717. "pattern": "^ses"
  36718. },
  36719. "messageID": {
  36720. "type": "string",
  36721. "pattern": "^msg_"
  36722. },
  36723. "prompt": {
  36724. "$ref": "#/components/schemas/Prompt"
  36725. },
  36726. "delivery": {
  36727. "type": "string",
  36728. "enum": ["steer", "queue"]
  36729. }
  36730. },
  36731. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  36732. "additionalProperties": false
  36733. }
  36734. },
  36735. "required": ["id", "type", "properties"],
  36736. "additionalProperties": false
  36737. },
  36738. "EventSessionNextPromptAdmitted": {
  36739. "type": "object",
  36740. "properties": {
  36741. "id": {
  36742. "type": "string",
  36743. "pattern": "^evt_"
  36744. },
  36745. "type": {
  36746. "type": "string",
  36747. "enum": ["session.next.prompt.admitted"]
  36748. },
  36749. "properties": {
  36750. "type": "object",
  36751. "properties": {
  36752. "timestamp": {
  36753. "type": "number"
  36754. },
  36755. "sessionID": {
  36756. "type": "string",
  36757. "pattern": "^ses"
  36758. },
  36759. "messageID": {
  36760. "type": "string",
  36761. "pattern": "^msg_"
  36762. },
  36763. "prompt": {
  36764. "$ref": "#/components/schemas/Prompt"
  36765. },
  36766. "delivery": {
  36767. "type": "string",
  36768. "enum": ["steer", "queue"]
  36769. }
  36770. },
  36771. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  36772. "additionalProperties": false
  36773. }
  36774. },
  36775. "required": ["id", "type", "properties"],
  36776. "additionalProperties": false
  36777. },
  36778. "EventSessionNextContextUpdated": {
  36779. "type": "object",
  36780. "properties": {
  36781. "id": {
  36782. "type": "string",
  36783. "pattern": "^evt_"
  36784. },
  36785. "type": {
  36786. "type": "string",
  36787. "enum": ["session.next.context.updated"]
  36788. },
  36789. "properties": {
  36790. "type": "object",
  36791. "properties": {
  36792. "timestamp": {
  36793. "type": "number"
  36794. },
  36795. "sessionID": {
  36796. "type": "string",
  36797. "pattern": "^ses"
  36798. },
  36799. "messageID": {
  36800. "type": "string",
  36801. "pattern": "^msg_"
  36802. },
  36803. "text": {
  36804. "type": "string"
  36805. }
  36806. },
  36807. "required": ["timestamp", "sessionID", "messageID", "text"],
  36808. "additionalProperties": false
  36809. }
  36810. },
  36811. "required": ["id", "type", "properties"],
  36812. "additionalProperties": false
  36813. },
  36814. "EventSessionNextSynthetic": {
  36815. "type": "object",
  36816. "properties": {
  36817. "id": {
  36818. "type": "string",
  36819. "pattern": "^evt_"
  36820. },
  36821. "type": {
  36822. "type": "string",
  36823. "enum": ["session.next.synthetic"]
  36824. },
  36825. "properties": {
  36826. "type": "object",
  36827. "properties": {
  36828. "timestamp": {
  36829. "type": "number"
  36830. },
  36831. "sessionID": {
  36832. "type": "string",
  36833. "pattern": "^ses"
  36834. },
  36835. "messageID": {
  36836. "type": "string",
  36837. "pattern": "^msg_"
  36838. },
  36839. "text": {
  36840. "type": "string"
  36841. }
  36842. },
  36843. "required": ["timestamp", "sessionID", "messageID", "text"],
  36844. "additionalProperties": false
  36845. }
  36846. },
  36847. "required": ["id", "type", "properties"],
  36848. "additionalProperties": false
  36849. },
  36850. "EventSessionNextShellStarted": {
  36851. "type": "object",
  36852. "properties": {
  36853. "id": {
  36854. "type": "string",
  36855. "pattern": "^evt_"
  36856. },
  36857. "type": {
  36858. "type": "string",
  36859. "enum": ["session.next.shell.started"]
  36860. },
  36861. "properties": {
  36862. "type": "object",
  36863. "properties": {
  36864. "timestamp": {
  36865. "type": "number"
  36866. },
  36867. "sessionID": {
  36868. "type": "string",
  36869. "pattern": "^ses"
  36870. },
  36871. "messageID": {
  36872. "type": "string",
  36873. "pattern": "^msg_"
  36874. },
  36875. "callID": {
  36876. "type": "string"
  36877. },
  36878. "command": {
  36879. "type": "string"
  36880. }
  36881. },
  36882. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  36883. "additionalProperties": false
  36884. }
  36885. },
  36886. "required": ["id", "type", "properties"],
  36887. "additionalProperties": false
  36888. },
  36889. "EventSessionNextShellEnded": {
  36890. "type": "object",
  36891. "properties": {
  36892. "id": {
  36893. "type": "string",
  36894. "pattern": "^evt_"
  36895. },
  36896. "type": {
  36897. "type": "string",
  36898. "enum": ["session.next.shell.ended"]
  36899. },
  36900. "properties": {
  36901. "type": "object",
  36902. "properties": {
  36903. "timestamp": {
  36904. "type": "number"
  36905. },
  36906. "sessionID": {
  36907. "type": "string",
  36908. "pattern": "^ses"
  36909. },
  36910. "callID": {
  36911. "type": "string"
  36912. },
  36913. "output": {
  36914. "type": "string"
  36915. }
  36916. },
  36917. "required": ["timestamp", "sessionID", "callID", "output"],
  36918. "additionalProperties": false
  36919. }
  36920. },
  36921. "required": ["id", "type", "properties"],
  36922. "additionalProperties": false
  36923. },
  36924. "EventSessionNextStepStarted": {
  36925. "type": "object",
  36926. "properties": {
  36927. "id": {
  36928. "type": "string",
  36929. "pattern": "^evt_"
  36930. },
  36931. "type": {
  36932. "type": "string",
  36933. "enum": ["session.next.step.started"]
  36934. },
  36935. "properties": {
  36936. "type": "object",
  36937. "properties": {
  36938. "timestamp": {
  36939. "type": "number"
  36940. },
  36941. "sessionID": {
  36942. "type": "string",
  36943. "pattern": "^ses"
  36944. },
  36945. "assistantMessageID": {
  36946. "type": "string",
  36947. "pattern": "^msg_"
  36948. },
  36949. "agent": {
  36950. "type": "string"
  36951. },
  36952. "model": {
  36953. "$ref": "#/components/schemas/ModelRef"
  36954. },
  36955. "snapshot": {
  36956. "type": "string"
  36957. }
  36958. },
  36959. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  36960. "additionalProperties": false
  36961. }
  36962. },
  36963. "required": ["id", "type", "properties"],
  36964. "additionalProperties": false
  36965. },
  36966. "EventSessionNextStepEnded": {
  36967. "type": "object",
  36968. "properties": {
  36969. "id": {
  36970. "type": "string",
  36971. "pattern": "^evt_"
  36972. },
  36973. "type": {
  36974. "type": "string",
  36975. "enum": ["session.next.step.ended"]
  36976. },
  36977. "properties": {
  36978. "type": "object",
  36979. "properties": {
  36980. "timestamp": {
  36981. "type": "number"
  36982. },
  36983. "sessionID": {
  36984. "type": "string",
  36985. "pattern": "^ses"
  36986. },
  36987. "assistantMessageID": {
  36988. "type": "string",
  36989. "pattern": "^msg_"
  36990. },
  36991. "finish": {
  36992. "type": "string"
  36993. },
  36994. "cost": {
  36995. "type": "number"
  36996. },
  36997. "tokens": {
  36998. "type": "object",
  36999. "properties": {
  37000. "input": {
  37001. "type": "number"
  37002. },
  37003. "output": {
  37004. "type": "number"
  37005. },
  37006. "reasoning": {
  37007. "type": "number"
  37008. },
  37009. "cache": {
  37010. "type": "object",
  37011. "properties": {
  37012. "read": {
  37013. "type": "number"
  37014. },
  37015. "write": {
  37016. "type": "number"
  37017. }
  37018. },
  37019. "required": ["read", "write"],
  37020. "additionalProperties": false
  37021. }
  37022. },
  37023. "required": ["input", "output", "reasoning", "cache"],
  37024. "additionalProperties": false
  37025. },
  37026. "snapshot": {
  37027. "type": "string"
  37028. },
  37029. "files": {
  37030. "type": "array",
  37031. "items": {
  37032. "type": "string"
  37033. }
  37034. }
  37035. },
  37036. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  37037. "additionalProperties": false
  37038. }
  37039. },
  37040. "required": ["id", "type", "properties"],
  37041. "additionalProperties": false
  37042. },
  37043. "EventSessionNextStepFailed": {
  37044. "type": "object",
  37045. "properties": {
  37046. "id": {
  37047. "type": "string",
  37048. "pattern": "^evt_"
  37049. },
  37050. "type": {
  37051. "type": "string",
  37052. "enum": ["session.next.step.failed"]
  37053. },
  37054. "properties": {
  37055. "type": "object",
  37056. "properties": {
  37057. "timestamp": {
  37058. "type": "number"
  37059. },
  37060. "sessionID": {
  37061. "type": "string",
  37062. "pattern": "^ses"
  37063. },
  37064. "assistantMessageID": {
  37065. "type": "string",
  37066. "pattern": "^msg_"
  37067. },
  37068. "error": {
  37069. "$ref": "#/components/schemas/SessionErrorUnknown"
  37070. }
  37071. },
  37072. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  37073. "additionalProperties": false
  37074. }
  37075. },
  37076. "required": ["id", "type", "properties"],
  37077. "additionalProperties": false
  37078. },
  37079. "EventSessionNextTextStarted": {
  37080. "type": "object",
  37081. "properties": {
  37082. "id": {
  37083. "type": "string",
  37084. "pattern": "^evt_"
  37085. },
  37086. "type": {
  37087. "type": "string",
  37088. "enum": ["session.next.text.started"]
  37089. },
  37090. "properties": {
  37091. "type": "object",
  37092. "properties": {
  37093. "timestamp": {
  37094. "type": "number"
  37095. },
  37096. "sessionID": {
  37097. "type": "string",
  37098. "pattern": "^ses"
  37099. },
  37100. "assistantMessageID": {
  37101. "type": "string",
  37102. "pattern": "^msg_"
  37103. },
  37104. "textID": {
  37105. "type": "string"
  37106. }
  37107. },
  37108. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  37109. "additionalProperties": false
  37110. }
  37111. },
  37112. "required": ["id", "type", "properties"],
  37113. "additionalProperties": false
  37114. },
  37115. "EventSessionNextTextDelta": {
  37116. "type": "object",
  37117. "properties": {
  37118. "id": {
  37119. "type": "string",
  37120. "pattern": "^evt_"
  37121. },
  37122. "type": {
  37123. "type": "string",
  37124. "enum": ["session.next.text.delta"]
  37125. },
  37126. "properties": {
  37127. "type": "object",
  37128. "properties": {
  37129. "timestamp": {
  37130. "type": "number"
  37131. },
  37132. "sessionID": {
  37133. "type": "string",
  37134. "pattern": "^ses"
  37135. },
  37136. "assistantMessageID": {
  37137. "type": "string",
  37138. "pattern": "^msg_"
  37139. },
  37140. "textID": {
  37141. "type": "string"
  37142. },
  37143. "delta": {
  37144. "type": "string"
  37145. }
  37146. },
  37147. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  37148. "additionalProperties": false
  37149. }
  37150. },
  37151. "required": ["id", "type", "properties"],
  37152. "additionalProperties": false
  37153. },
  37154. "EventSessionNextTextEnded": {
  37155. "type": "object",
  37156. "properties": {
  37157. "id": {
  37158. "type": "string",
  37159. "pattern": "^evt_"
  37160. },
  37161. "type": {
  37162. "type": "string",
  37163. "enum": ["session.next.text.ended"]
  37164. },
  37165. "properties": {
  37166. "type": "object",
  37167. "properties": {
  37168. "timestamp": {
  37169. "type": "number"
  37170. },
  37171. "sessionID": {
  37172. "type": "string",
  37173. "pattern": "^ses"
  37174. },
  37175. "assistantMessageID": {
  37176. "type": "string",
  37177. "pattern": "^msg_"
  37178. },
  37179. "textID": {
  37180. "type": "string"
  37181. },
  37182. "text": {
  37183. "type": "string"
  37184. }
  37185. },
  37186. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  37187. "additionalProperties": false
  37188. }
  37189. },
  37190. "required": ["id", "type", "properties"],
  37191. "additionalProperties": false
  37192. },
  37193. "EventSessionNextReasoningStarted": {
  37194. "type": "object",
  37195. "properties": {
  37196. "id": {
  37197. "type": "string",
  37198. "pattern": "^evt_"
  37199. },
  37200. "type": {
  37201. "type": "string",
  37202. "enum": ["session.next.reasoning.started"]
  37203. },
  37204. "properties": {
  37205. "type": "object",
  37206. "properties": {
  37207. "timestamp": {
  37208. "type": "number"
  37209. },
  37210. "sessionID": {
  37211. "type": "string",
  37212. "pattern": "^ses"
  37213. },
  37214. "assistantMessageID": {
  37215. "type": "string",
  37216. "pattern": "^msg_"
  37217. },
  37218. "reasoningID": {
  37219. "type": "string"
  37220. },
  37221. "providerMetadata": {
  37222. "$ref": "#/components/schemas/LLMProviderMetadata"
  37223. }
  37224. },
  37225. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  37226. "additionalProperties": false
  37227. }
  37228. },
  37229. "required": ["id", "type", "properties"],
  37230. "additionalProperties": false
  37231. },
  37232. "EventSessionNextReasoningDelta": {
  37233. "type": "object",
  37234. "properties": {
  37235. "id": {
  37236. "type": "string",
  37237. "pattern": "^evt_"
  37238. },
  37239. "type": {
  37240. "type": "string",
  37241. "enum": ["session.next.reasoning.delta"]
  37242. },
  37243. "properties": {
  37244. "type": "object",
  37245. "properties": {
  37246. "timestamp": {
  37247. "type": "number"
  37248. },
  37249. "sessionID": {
  37250. "type": "string",
  37251. "pattern": "^ses"
  37252. },
  37253. "assistantMessageID": {
  37254. "type": "string",
  37255. "pattern": "^msg_"
  37256. },
  37257. "reasoningID": {
  37258. "type": "string"
  37259. },
  37260. "delta": {
  37261. "type": "string"
  37262. }
  37263. },
  37264. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  37265. "additionalProperties": false
  37266. }
  37267. },
  37268. "required": ["id", "type", "properties"],
  37269. "additionalProperties": false
  37270. },
  37271. "EventSessionNextReasoningEnded": {
  37272. "type": "object",
  37273. "properties": {
  37274. "id": {
  37275. "type": "string",
  37276. "pattern": "^evt_"
  37277. },
  37278. "type": {
  37279. "type": "string",
  37280. "enum": ["session.next.reasoning.ended"]
  37281. },
  37282. "properties": {
  37283. "type": "object",
  37284. "properties": {
  37285. "timestamp": {
  37286. "type": "number"
  37287. },
  37288. "sessionID": {
  37289. "type": "string",
  37290. "pattern": "^ses"
  37291. },
  37292. "assistantMessageID": {
  37293. "type": "string",
  37294. "pattern": "^msg_"
  37295. },
  37296. "reasoningID": {
  37297. "type": "string"
  37298. },
  37299. "text": {
  37300. "type": "string"
  37301. },
  37302. "providerMetadata": {
  37303. "$ref": "#/components/schemas/LLMProviderMetadata"
  37304. }
  37305. },
  37306. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  37307. "additionalProperties": false
  37308. }
  37309. },
  37310. "required": ["id", "type", "properties"],
  37311. "additionalProperties": false
  37312. },
  37313. "EventSessionNextToolInputStarted": {
  37314. "type": "object",
  37315. "properties": {
  37316. "id": {
  37317. "type": "string",
  37318. "pattern": "^evt_"
  37319. },
  37320. "type": {
  37321. "type": "string",
  37322. "enum": ["session.next.tool.input.started"]
  37323. },
  37324. "properties": {
  37325. "type": "object",
  37326. "properties": {
  37327. "timestamp": {
  37328. "type": "number"
  37329. },
  37330. "sessionID": {
  37331. "type": "string",
  37332. "pattern": "^ses"
  37333. },
  37334. "assistantMessageID": {
  37335. "type": "string",
  37336. "pattern": "^msg_"
  37337. },
  37338. "callID": {
  37339. "type": "string"
  37340. },
  37341. "name": {
  37342. "type": "string"
  37343. }
  37344. },
  37345. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  37346. "additionalProperties": false
  37347. }
  37348. },
  37349. "required": ["id", "type", "properties"],
  37350. "additionalProperties": false
  37351. },
  37352. "EventSessionNextToolInputDelta": {
  37353. "type": "object",
  37354. "properties": {
  37355. "id": {
  37356. "type": "string",
  37357. "pattern": "^evt_"
  37358. },
  37359. "type": {
  37360. "type": "string",
  37361. "enum": ["session.next.tool.input.delta"]
  37362. },
  37363. "properties": {
  37364. "type": "object",
  37365. "properties": {
  37366. "timestamp": {
  37367. "type": "number"
  37368. },
  37369. "sessionID": {
  37370. "type": "string",
  37371. "pattern": "^ses"
  37372. },
  37373. "assistantMessageID": {
  37374. "type": "string",
  37375. "pattern": "^msg_"
  37376. },
  37377. "callID": {
  37378. "type": "string"
  37379. },
  37380. "delta": {
  37381. "type": "string"
  37382. }
  37383. },
  37384. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  37385. "additionalProperties": false
  37386. }
  37387. },
  37388. "required": ["id", "type", "properties"],
  37389. "additionalProperties": false
  37390. },
  37391. "EventSessionNextToolInputEnded": {
  37392. "type": "object",
  37393. "properties": {
  37394. "id": {
  37395. "type": "string",
  37396. "pattern": "^evt_"
  37397. },
  37398. "type": {
  37399. "type": "string",
  37400. "enum": ["session.next.tool.input.ended"]
  37401. },
  37402. "properties": {
  37403. "type": "object",
  37404. "properties": {
  37405. "timestamp": {
  37406. "type": "number"
  37407. },
  37408. "sessionID": {
  37409. "type": "string",
  37410. "pattern": "^ses"
  37411. },
  37412. "assistantMessageID": {
  37413. "type": "string",
  37414. "pattern": "^msg_"
  37415. },
  37416. "callID": {
  37417. "type": "string"
  37418. },
  37419. "text": {
  37420. "type": "string"
  37421. }
  37422. },
  37423. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  37424. "additionalProperties": false
  37425. }
  37426. },
  37427. "required": ["id", "type", "properties"],
  37428. "additionalProperties": false
  37429. },
  37430. "EventSessionNextToolCalled": {
  37431. "type": "object",
  37432. "properties": {
  37433. "id": {
  37434. "type": "string",
  37435. "pattern": "^evt_"
  37436. },
  37437. "type": {
  37438. "type": "string",
  37439. "enum": ["session.next.tool.called"]
  37440. },
  37441. "properties": {
  37442. "type": "object",
  37443. "properties": {
  37444. "timestamp": {
  37445. "type": "number"
  37446. },
  37447. "sessionID": {
  37448. "type": "string",
  37449. "pattern": "^ses"
  37450. },
  37451. "assistantMessageID": {
  37452. "type": "string",
  37453. "pattern": "^msg_"
  37454. },
  37455. "callID": {
  37456. "type": "string"
  37457. },
  37458. "tool": {
  37459. "type": "string"
  37460. },
  37461. "input": {
  37462. "type": "object"
  37463. },
  37464. "provider": {
  37465. "type": "object",
  37466. "properties": {
  37467. "executed": {
  37468. "type": "boolean"
  37469. },
  37470. "metadata": {
  37471. "$ref": "#/components/schemas/LLMProviderMetadata"
  37472. }
  37473. },
  37474. "required": ["executed"],
  37475. "additionalProperties": false
  37476. }
  37477. },
  37478. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  37479. "additionalProperties": false
  37480. }
  37481. },
  37482. "required": ["id", "type", "properties"],
  37483. "additionalProperties": false
  37484. },
  37485. "EventSessionNextToolProgress": {
  37486. "type": "object",
  37487. "properties": {
  37488. "id": {
  37489. "type": "string",
  37490. "pattern": "^evt_"
  37491. },
  37492. "type": {
  37493. "type": "string",
  37494. "enum": ["session.next.tool.progress"]
  37495. },
  37496. "properties": {
  37497. "type": "object",
  37498. "properties": {
  37499. "timestamp": {
  37500. "type": "number"
  37501. },
  37502. "sessionID": {
  37503. "type": "string",
  37504. "pattern": "^ses"
  37505. },
  37506. "assistantMessageID": {
  37507. "type": "string",
  37508. "pattern": "^msg_"
  37509. },
  37510. "callID": {
  37511. "type": "string"
  37512. },
  37513. "structured": {
  37514. "type": "object"
  37515. },
  37516. "content": {
  37517. "type": "array",
  37518. "items": {
  37519. "$ref": "#/components/schemas/LLMToolContent"
  37520. }
  37521. }
  37522. },
  37523. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  37524. "additionalProperties": false
  37525. }
  37526. },
  37527. "required": ["id", "type", "properties"],
  37528. "additionalProperties": false
  37529. },
  37530. "EventSessionNextToolSuccess": {
  37531. "type": "object",
  37532. "properties": {
  37533. "id": {
  37534. "type": "string",
  37535. "pattern": "^evt_"
  37536. },
  37537. "type": {
  37538. "type": "string",
  37539. "enum": ["session.next.tool.success"]
  37540. },
  37541. "properties": {
  37542. "type": "object",
  37543. "properties": {
  37544. "timestamp": {
  37545. "type": "number"
  37546. },
  37547. "sessionID": {
  37548. "type": "string",
  37549. "pattern": "^ses"
  37550. },
  37551. "assistantMessageID": {
  37552. "type": "string",
  37553. "pattern": "^msg_"
  37554. },
  37555. "callID": {
  37556. "type": "string"
  37557. },
  37558. "structured": {
  37559. "type": "object"
  37560. },
  37561. "content": {
  37562. "type": "array",
  37563. "items": {
  37564. "$ref": "#/components/schemas/LLMToolContent"
  37565. }
  37566. },
  37567. "outputPaths": {
  37568. "type": "array",
  37569. "items": {
  37570. "type": "string"
  37571. }
  37572. },
  37573. "result": {},
  37574. "provider": {
  37575. "type": "object",
  37576. "properties": {
  37577. "executed": {
  37578. "type": "boolean"
  37579. },
  37580. "metadata": {
  37581. "$ref": "#/components/schemas/LLMProviderMetadata"
  37582. }
  37583. },
  37584. "required": ["executed"],
  37585. "additionalProperties": false
  37586. }
  37587. },
  37588. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  37589. "additionalProperties": false
  37590. }
  37591. },
  37592. "required": ["id", "type", "properties"],
  37593. "additionalProperties": false
  37594. },
  37595. "EventSessionNextToolFailed": {
  37596. "type": "object",
  37597. "properties": {
  37598. "id": {
  37599. "type": "string",
  37600. "pattern": "^evt_"
  37601. },
  37602. "type": {
  37603. "type": "string",
  37604. "enum": ["session.next.tool.failed"]
  37605. },
  37606. "properties": {
  37607. "type": "object",
  37608. "properties": {
  37609. "timestamp": {
  37610. "type": "number"
  37611. },
  37612. "sessionID": {
  37613. "type": "string",
  37614. "pattern": "^ses"
  37615. },
  37616. "assistantMessageID": {
  37617. "type": "string",
  37618. "pattern": "^msg_"
  37619. },
  37620. "callID": {
  37621. "type": "string"
  37622. },
  37623. "error": {
  37624. "$ref": "#/components/schemas/SessionErrorUnknown"
  37625. },
  37626. "result": {},
  37627. "provider": {
  37628. "type": "object",
  37629. "properties": {
  37630. "executed": {
  37631. "type": "boolean"
  37632. },
  37633. "metadata": {
  37634. "$ref": "#/components/schemas/LLMProviderMetadata"
  37635. }
  37636. },
  37637. "required": ["executed"],
  37638. "additionalProperties": false
  37639. }
  37640. },
  37641. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  37642. "additionalProperties": false
  37643. }
  37644. },
  37645. "required": ["id", "type", "properties"],
  37646. "additionalProperties": false
  37647. },
  37648. "EventSessionNextRetried": {
  37649. "type": "object",
  37650. "properties": {
  37651. "id": {
  37652. "type": "string",
  37653. "pattern": "^evt_"
  37654. },
  37655. "type": {
  37656. "type": "string",
  37657. "enum": ["session.next.retried"]
  37658. },
  37659. "properties": {
  37660. "type": "object",
  37661. "properties": {
  37662. "timestamp": {
  37663. "type": "number"
  37664. },
  37665. "sessionID": {
  37666. "type": "string",
  37667. "pattern": "^ses"
  37668. },
  37669. "attempt": {
  37670. "type": "number"
  37671. },
  37672. "error": {
  37673. "$ref": "#/components/schemas/SessionNextRetry_error"
  37674. }
  37675. },
  37676. "required": ["timestamp", "sessionID", "attempt", "error"],
  37677. "additionalProperties": false
  37678. }
  37679. },
  37680. "required": ["id", "type", "properties"],
  37681. "additionalProperties": false
  37682. },
  37683. "EventSessionNextCompactionStarted": {
  37684. "type": "object",
  37685. "properties": {
  37686. "id": {
  37687. "type": "string",
  37688. "pattern": "^evt_"
  37689. },
  37690. "type": {
  37691. "type": "string",
  37692. "enum": ["session.next.compaction.started"]
  37693. },
  37694. "properties": {
  37695. "type": "object",
  37696. "properties": {
  37697. "timestamp": {
  37698. "type": "number"
  37699. },
  37700. "sessionID": {
  37701. "type": "string",
  37702. "pattern": "^ses"
  37703. },
  37704. "messageID": {
  37705. "type": "string",
  37706. "pattern": "^msg_"
  37707. },
  37708. "reason": {
  37709. "type": "string",
  37710. "enum": ["auto", "manual"]
  37711. }
  37712. },
  37713. "required": ["timestamp", "sessionID", "messageID", "reason"],
  37714. "additionalProperties": false
  37715. }
  37716. },
  37717. "required": ["id", "type", "properties"],
  37718. "additionalProperties": false
  37719. },
  37720. "EventSessionNextCompactionDelta": {
  37721. "type": "object",
  37722. "properties": {
  37723. "id": {
  37724. "type": "string",
  37725. "pattern": "^evt_"
  37726. },
  37727. "type": {
  37728. "type": "string",
  37729. "enum": ["session.next.compaction.delta"]
  37730. },
  37731. "properties": {
  37732. "type": "object",
  37733. "properties": {
  37734. "timestamp": {
  37735. "type": "number"
  37736. },
  37737. "sessionID": {
  37738. "type": "string",
  37739. "pattern": "^ses"
  37740. },
  37741. "messageID": {
  37742. "type": "string",
  37743. "pattern": "^msg_"
  37744. },
  37745. "text": {
  37746. "type": "string"
  37747. }
  37748. },
  37749. "required": ["timestamp", "sessionID", "messageID", "text"],
  37750. "additionalProperties": false
  37751. }
  37752. },
  37753. "required": ["id", "type", "properties"],
  37754. "additionalProperties": false
  37755. },
  37756. "EventSessionNextCompactionEnded": {
  37757. "type": "object",
  37758. "properties": {
  37759. "id": {
  37760. "type": "string",
  37761. "pattern": "^evt_"
  37762. },
  37763. "type": {
  37764. "type": "string",
  37765. "enum": ["session.next.compaction.ended"]
  37766. },
  37767. "properties": {
  37768. "type": "object",
  37769. "properties": {
  37770. "timestamp": {
  37771. "type": "number"
  37772. },
  37773. "sessionID": {
  37774. "type": "string",
  37775. "pattern": "^ses"
  37776. },
  37777. "messageID": {
  37778. "type": "string",
  37779. "pattern": "^msg_"
  37780. },
  37781. "reason": {
  37782. "type": "string",
  37783. "enum": ["auto", "manual"]
  37784. },
  37785. "text": {
  37786. "type": "string"
  37787. },
  37788. "recent": {
  37789. "type": "string"
  37790. }
  37791. },
  37792. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  37793. "additionalProperties": false
  37794. }
  37795. },
  37796. "required": ["id", "type", "properties"],
  37797. "additionalProperties": false
  37798. },
  37799. "EventSessionNextRevertStaged": {
  37800. "type": "object",
  37801. "properties": {
  37802. "id": {
  37803. "type": "string",
  37804. "pattern": "^evt_"
  37805. },
  37806. "type": {
  37807. "type": "string",
  37808. "enum": ["session.next.revert.staged"]
  37809. },
  37810. "properties": {
  37811. "type": "object",
  37812. "properties": {
  37813. "timestamp": {
  37814. "type": "number"
  37815. },
  37816. "sessionID": {
  37817. "type": "string",
  37818. "pattern": "^ses"
  37819. },
  37820. "revert": {
  37821. "$ref": "#/components/schemas/RevertState"
  37822. }
  37823. },
  37824. "required": ["timestamp", "sessionID", "revert"],
  37825. "additionalProperties": false
  37826. }
  37827. },
  37828. "required": ["id", "type", "properties"],
  37829. "additionalProperties": false
  37830. },
  37831. "EventSessionNextRevertCleared": {
  37832. "type": "object",
  37833. "properties": {
  37834. "id": {
  37835. "type": "string",
  37836. "pattern": "^evt_"
  37837. },
  37838. "type": {
  37839. "type": "string",
  37840. "enum": ["session.next.revert.cleared"]
  37841. },
  37842. "properties": {
  37843. "type": "object",
  37844. "properties": {
  37845. "timestamp": {
  37846. "type": "number"
  37847. },
  37848. "sessionID": {
  37849. "type": "string",
  37850. "pattern": "^ses"
  37851. }
  37852. },
  37853. "required": ["timestamp", "sessionID"],
  37854. "additionalProperties": false
  37855. }
  37856. },
  37857. "required": ["id", "type", "properties"],
  37858. "additionalProperties": false
  37859. },
  37860. "EventSessionNextRevertCommitted": {
  37861. "type": "object",
  37862. "properties": {
  37863. "id": {
  37864. "type": "string",
  37865. "pattern": "^evt_"
  37866. },
  37867. "type": {
  37868. "type": "string",
  37869. "enum": ["session.next.revert.committed"]
  37870. },
  37871. "properties": {
  37872. "type": "object",
  37873. "properties": {
  37874. "timestamp": {
  37875. "type": "number"
  37876. },
  37877. "sessionID": {
  37878. "type": "string",
  37879. "pattern": "^ses"
  37880. },
  37881. "messageID": {
  37882. "type": "string",
  37883. "pattern": "^msg_"
  37884. }
  37885. },
  37886. "required": ["timestamp", "sessionID", "messageID"],
  37887. "additionalProperties": false
  37888. }
  37889. },
  37890. "required": ["id", "type", "properties"],
  37891. "additionalProperties": false
  37892. },
  37893. "EventMessagePartDelta": {
  37894. "type": "object",
  37895. "properties": {
  37896. "id": {
  37897. "type": "string",
  37898. "pattern": "^evt_"
  37899. },
  37900. "type": {
  37901. "type": "string",
  37902. "enum": ["message.part.delta"]
  37903. },
  37904. "properties": {
  37905. "type": "object",
  37906. "properties": {
  37907. "sessionID": {
  37908. "type": "string",
  37909. "pattern": "^ses"
  37910. },
  37911. "messageID": {
  37912. "type": "string",
  37913. "pattern": "^msg"
  37914. },
  37915. "partID": {
  37916. "type": "string",
  37917. "pattern": "^prt"
  37918. },
  37919. "field": {
  37920. "type": "string"
  37921. },
  37922. "delta": {
  37923. "type": "string"
  37924. }
  37925. },
  37926. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  37927. "additionalProperties": false
  37928. }
  37929. },
  37930. "required": ["id", "type", "properties"],
  37931. "additionalProperties": false
  37932. },
  37933. "EventSessionDiff": {
  37934. "type": "object",
  37935. "properties": {
  37936. "id": {
  37937. "type": "string",
  37938. "pattern": "^evt_"
  37939. },
  37940. "type": {
  37941. "type": "string",
  37942. "enum": ["session.diff"]
  37943. },
  37944. "properties": {
  37945. "type": "object",
  37946. "properties": {
  37947. "sessionID": {
  37948. "type": "string",
  37949. "pattern": "^ses"
  37950. },
  37951. "diff": {
  37952. "type": "array",
  37953. "items": {
  37954. "$ref": "#/components/schemas/SnapshotFileDiff"
  37955. }
  37956. }
  37957. },
  37958. "required": ["sessionID", "diff"],
  37959. "additionalProperties": false
  37960. }
  37961. },
  37962. "required": ["id", "type", "properties"],
  37963. "additionalProperties": false
  37964. },
  37965. "EventSessionError": {
  37966. "type": "object",
  37967. "properties": {
  37968. "id": {
  37969. "type": "string",
  37970. "pattern": "^evt_"
  37971. },
  37972. "type": {
  37973. "type": "string",
  37974. "enum": ["session.error"]
  37975. },
  37976. "properties": {
  37977. "type": "object",
  37978. "properties": {
  37979. "sessionID": {
  37980. "type": "string",
  37981. "pattern": "^ses"
  37982. },
  37983. "error": {
  37984. "anyOf": [
  37985. {
  37986. "$ref": "#/components/schemas/ProviderAuthError"
  37987. },
  37988. {
  37989. "$ref": "#/components/schemas/UnknownError"
  37990. },
  37991. {
  37992. "$ref": "#/components/schemas/MessageOutputLengthError"
  37993. },
  37994. {
  37995. "$ref": "#/components/schemas/MessageAbortedError"
  37996. },
  37997. {
  37998. "$ref": "#/components/schemas/StructuredOutputError"
  37999. },
  38000. {
  38001. "$ref": "#/components/schemas/ContextOverflowError"
  38002. },
  38003. {
  38004. "$ref": "#/components/schemas/ContentFilterError"
  38005. },
  38006. {
  38007. "$ref": "#/components/schemas/APIError"
  38008. }
  38009. ]
  38010. }
  38011. },
  38012. "additionalProperties": false
  38013. }
  38014. },
  38015. "required": ["id", "type", "properties"],
  38016. "additionalProperties": false
  38017. },
  38018. "EventInstallationUpdated": {
  38019. "type": "object",
  38020. "properties": {
  38021. "id": {
  38022. "type": "string",
  38023. "pattern": "^evt_"
  38024. },
  38025. "type": {
  38026. "type": "string",
  38027. "enum": ["installation.updated"]
  38028. },
  38029. "properties": {
  38030. "type": "object",
  38031. "properties": {
  38032. "version": {
  38033. "type": "string"
  38034. }
  38035. },
  38036. "required": ["version"],
  38037. "additionalProperties": false
  38038. }
  38039. },
  38040. "required": ["id", "type", "properties"],
  38041. "additionalProperties": false
  38042. },
  38043. "EventInstallationUpdate-available": {
  38044. "type": "object",
  38045. "properties": {
  38046. "id": {
  38047. "type": "string",
  38048. "pattern": "^evt_"
  38049. },
  38050. "type": {
  38051. "type": "string",
  38052. "enum": ["installation.update-available"]
  38053. },
  38054. "properties": {
  38055. "type": "object",
  38056. "properties": {
  38057. "version": {
  38058. "type": "string"
  38059. }
  38060. },
  38061. "required": ["version"],
  38062. "additionalProperties": false
  38063. }
  38064. },
  38065. "required": ["id", "type", "properties"],
  38066. "additionalProperties": false
  38067. },
  38068. "EventFileEdited": {
  38069. "type": "object",
  38070. "properties": {
  38071. "id": {
  38072. "type": "string",
  38073. "pattern": "^evt_"
  38074. },
  38075. "type": {
  38076. "type": "string",
  38077. "enum": ["file.edited"]
  38078. },
  38079. "properties": {
  38080. "type": "object",
  38081. "properties": {
  38082. "file": {
  38083. "type": "string"
  38084. }
  38085. },
  38086. "required": ["file"],
  38087. "additionalProperties": false
  38088. }
  38089. },
  38090. "required": ["id", "type", "properties"],
  38091. "additionalProperties": false
  38092. },
  38093. "EventReferenceUpdated": {
  38094. "type": "object",
  38095. "properties": {
  38096. "id": {
  38097. "type": "string",
  38098. "pattern": "^evt_"
  38099. },
  38100. "type": {
  38101. "type": "string",
  38102. "enum": ["reference.updated"]
  38103. },
  38104. "properties": {
  38105. "type": "object",
  38106. "properties": {}
  38107. }
  38108. },
  38109. "required": ["id", "type", "properties"],
  38110. "additionalProperties": false
  38111. },
  38112. "EventPermissionV2Asked": {
  38113. "type": "object",
  38114. "properties": {
  38115. "id": {
  38116. "type": "string",
  38117. "pattern": "^evt_"
  38118. },
  38119. "type": {
  38120. "type": "string",
  38121. "enum": ["permission.v2.asked"]
  38122. },
  38123. "properties": {
  38124. "type": "object",
  38125. "properties": {
  38126. "id": {
  38127. "type": "string",
  38128. "pattern": "^per"
  38129. },
  38130. "sessionID": {
  38131. "type": "string",
  38132. "pattern": "^ses"
  38133. },
  38134. "action": {
  38135. "type": "string"
  38136. },
  38137. "resources": {
  38138. "type": "array",
  38139. "items": {
  38140. "type": "string"
  38141. }
  38142. },
  38143. "save": {
  38144. "type": "array",
  38145. "items": {
  38146. "type": "string"
  38147. }
  38148. },
  38149. "metadata": {
  38150. "type": "object"
  38151. },
  38152. "source": {
  38153. "$ref": "#/components/schemas/PermissionV2Source"
  38154. }
  38155. },
  38156. "required": ["id", "sessionID", "action", "resources"],
  38157. "additionalProperties": false
  38158. }
  38159. },
  38160. "required": ["id", "type", "properties"],
  38161. "additionalProperties": false
  38162. },
  38163. "EventPermissionV2Replied": {
  38164. "type": "object",
  38165. "properties": {
  38166. "id": {
  38167. "type": "string",
  38168. "pattern": "^evt_"
  38169. },
  38170. "type": {
  38171. "type": "string",
  38172. "enum": ["permission.v2.replied"]
  38173. },
  38174. "properties": {
  38175. "type": "object",
  38176. "properties": {
  38177. "sessionID": {
  38178. "type": "string",
  38179. "pattern": "^ses"
  38180. },
  38181. "requestID": {
  38182. "type": "string",
  38183. "pattern": "^per"
  38184. },
  38185. "reply": {
  38186. "$ref": "#/components/schemas/PermissionV2Reply"
  38187. }
  38188. },
  38189. "required": ["sessionID", "requestID", "reply"],
  38190. "additionalProperties": false
  38191. }
  38192. },
  38193. "required": ["id", "type", "properties"],
  38194. "additionalProperties": false
  38195. },
  38196. "EventPluginAdded": {
  38197. "type": "object",
  38198. "properties": {
  38199. "id": {
  38200. "type": "string",
  38201. "pattern": "^evt_"
  38202. },
  38203. "type": {
  38204. "type": "string",
  38205. "enum": ["plugin.added"]
  38206. },
  38207. "properties": {
  38208. "type": "object",
  38209. "properties": {
  38210. "id": {
  38211. "type": "string"
  38212. }
  38213. },
  38214. "required": ["id"],
  38215. "additionalProperties": false
  38216. }
  38217. },
  38218. "required": ["id", "type", "properties"],
  38219. "additionalProperties": false
  38220. },
  38221. "EventProjectDirectoriesUpdated": {
  38222. "type": "object",
  38223. "properties": {
  38224. "id": {
  38225. "type": "string",
  38226. "pattern": "^evt_"
  38227. },
  38228. "type": {
  38229. "type": "string",
  38230. "enum": ["project.directories.updated"]
  38231. },
  38232. "properties": {
  38233. "type": "object",
  38234. "properties": {
  38235. "projectID": {
  38236. "type": "string"
  38237. }
  38238. },
  38239. "required": ["projectID"],
  38240. "additionalProperties": false
  38241. }
  38242. },
  38243. "required": ["id", "type", "properties"],
  38244. "additionalProperties": false
  38245. },
  38246. "EventFileWatcherUpdated": {
  38247. "type": "object",
  38248. "properties": {
  38249. "id": {
  38250. "type": "string",
  38251. "pattern": "^evt_"
  38252. },
  38253. "type": {
  38254. "type": "string",
  38255. "enum": ["file.watcher.updated"]
  38256. },
  38257. "properties": {
  38258. "type": "object",
  38259. "properties": {
  38260. "file": {
  38261. "type": "string"
  38262. },
  38263. "event": {
  38264. "type": "string",
  38265. "enum": ["add", "change", "unlink"]
  38266. }
  38267. },
  38268. "required": ["file", "event"],
  38269. "additionalProperties": false
  38270. }
  38271. },
  38272. "required": ["id", "type", "properties"],
  38273. "additionalProperties": false
  38274. },
  38275. "EventPtyCreated": {
  38276. "type": "object",
  38277. "properties": {
  38278. "id": {
  38279. "type": "string",
  38280. "pattern": "^evt_"
  38281. },
  38282. "type": {
  38283. "type": "string",
  38284. "enum": ["pty.created"]
  38285. },
  38286. "properties": {
  38287. "type": "object",
  38288. "properties": {
  38289. "info": {
  38290. "$ref": "#/components/schemas/Pty"
  38291. }
  38292. },
  38293. "required": ["info"],
  38294. "additionalProperties": false
  38295. }
  38296. },
  38297. "required": ["id", "type", "properties"],
  38298. "additionalProperties": false
  38299. },
  38300. "EventPtyUpdated": {
  38301. "type": "object",
  38302. "properties": {
  38303. "id": {
  38304. "type": "string",
  38305. "pattern": "^evt_"
  38306. },
  38307. "type": {
  38308. "type": "string",
  38309. "enum": ["pty.updated"]
  38310. },
  38311. "properties": {
  38312. "type": "object",
  38313. "properties": {
  38314. "info": {
  38315. "$ref": "#/components/schemas/Pty"
  38316. }
  38317. },
  38318. "required": ["info"],
  38319. "additionalProperties": false
  38320. }
  38321. },
  38322. "required": ["id", "type", "properties"],
  38323. "additionalProperties": false
  38324. },
  38325. "EventPtyExited": {
  38326. "type": "object",
  38327. "properties": {
  38328. "id": {
  38329. "type": "string",
  38330. "pattern": "^evt_"
  38331. },
  38332. "type": {
  38333. "type": "string",
  38334. "enum": ["pty.exited"]
  38335. },
  38336. "properties": {
  38337. "type": "object",
  38338. "properties": {
  38339. "id": {
  38340. "type": "string",
  38341. "pattern": "^pty"
  38342. },
  38343. "exitCode": {
  38344. "type": "integer",
  38345. "minimum": 0
  38346. }
  38347. },
  38348. "required": ["id", "exitCode"],
  38349. "additionalProperties": false
  38350. }
  38351. },
  38352. "required": ["id", "type", "properties"],
  38353. "additionalProperties": false
  38354. },
  38355. "EventPtyDeleted": {
  38356. "type": "object",
  38357. "properties": {
  38358. "id": {
  38359. "type": "string",
  38360. "pattern": "^evt_"
  38361. },
  38362. "type": {
  38363. "type": "string",
  38364. "enum": ["pty.deleted"]
  38365. },
  38366. "properties": {
  38367. "type": "object",
  38368. "properties": {
  38369. "id": {
  38370. "type": "string",
  38371. "pattern": "^pty"
  38372. }
  38373. },
  38374. "required": ["id"],
  38375. "additionalProperties": false
  38376. }
  38377. },
  38378. "required": ["id", "type", "properties"],
  38379. "additionalProperties": false
  38380. },
  38381. "EventQuestionV2Asked": {
  38382. "type": "object",
  38383. "properties": {
  38384. "id": {
  38385. "type": "string",
  38386. "pattern": "^evt_"
  38387. },
  38388. "type": {
  38389. "type": "string",
  38390. "enum": ["question.v2.asked"]
  38391. },
  38392. "properties": {
  38393. "type": "object",
  38394. "properties": {
  38395. "id": {
  38396. "type": "string",
  38397. "pattern": "^que"
  38398. },
  38399. "sessionID": {
  38400. "type": "string",
  38401. "pattern": "^ses"
  38402. },
  38403. "questions": {
  38404. "type": "array",
  38405. "items": {
  38406. "$ref": "#/components/schemas/QuestionV2Info"
  38407. },
  38408. "description": "Questions to ask"
  38409. },
  38410. "tool": {
  38411. "$ref": "#/components/schemas/QuestionV2Tool"
  38412. }
  38413. },
  38414. "required": ["id", "sessionID", "questions"],
  38415. "additionalProperties": false
  38416. }
  38417. },
  38418. "required": ["id", "type", "properties"],
  38419. "additionalProperties": false
  38420. },
  38421. "EventQuestionV2Replied": {
  38422. "type": "object",
  38423. "properties": {
  38424. "id": {
  38425. "type": "string",
  38426. "pattern": "^evt_"
  38427. },
  38428. "type": {
  38429. "type": "string",
  38430. "enum": ["question.v2.replied"]
  38431. },
  38432. "properties": {
  38433. "type": "object",
  38434. "properties": {
  38435. "sessionID": {
  38436. "type": "string",
  38437. "pattern": "^ses"
  38438. },
  38439. "requestID": {
  38440. "type": "string",
  38441. "pattern": "^que"
  38442. },
  38443. "answers": {
  38444. "type": "array",
  38445. "items": {
  38446. "$ref": "#/components/schemas/QuestionV2Answer"
  38447. }
  38448. }
  38449. },
  38450. "required": ["sessionID", "requestID", "answers"],
  38451. "additionalProperties": false
  38452. }
  38453. },
  38454. "required": ["id", "type", "properties"],
  38455. "additionalProperties": false
  38456. },
  38457. "EventQuestionV2Rejected": {
  38458. "type": "object",
  38459. "properties": {
  38460. "id": {
  38461. "type": "string",
  38462. "pattern": "^evt_"
  38463. },
  38464. "type": {
  38465. "type": "string",
  38466. "enum": ["question.v2.rejected"]
  38467. },
  38468. "properties": {
  38469. "type": "object",
  38470. "properties": {
  38471. "sessionID": {
  38472. "type": "string",
  38473. "pattern": "^ses"
  38474. },
  38475. "requestID": {
  38476. "type": "string",
  38477. "pattern": "^que"
  38478. }
  38479. },
  38480. "required": ["sessionID", "requestID"],
  38481. "additionalProperties": false
  38482. }
  38483. },
  38484. "required": ["id", "type", "properties"],
  38485. "additionalProperties": false
  38486. },
  38487. "EventTodoUpdated": {
  38488. "type": "object",
  38489. "properties": {
  38490. "id": {
  38491. "type": "string",
  38492. "pattern": "^evt_"
  38493. },
  38494. "type": {
  38495. "type": "string",
  38496. "enum": ["todo.updated"]
  38497. },
  38498. "properties": {
  38499. "type": "object",
  38500. "properties": {
  38501. "sessionID": {
  38502. "type": "string",
  38503. "pattern": "^ses"
  38504. },
  38505. "todos": {
  38506. "type": "array",
  38507. "items": {
  38508. "$ref": "#/components/schemas/Todo"
  38509. }
  38510. }
  38511. },
  38512. "required": ["sessionID", "todos"],
  38513. "additionalProperties": false
  38514. }
  38515. },
  38516. "required": ["id", "type", "properties"],
  38517. "additionalProperties": false
  38518. },
  38519. "EventLspUpdated": {
  38520. "type": "object",
  38521. "properties": {
  38522. "id": {
  38523. "type": "string",
  38524. "pattern": "^evt_"
  38525. },
  38526. "type": {
  38527. "type": "string",
  38528. "enum": ["lsp.updated"]
  38529. },
  38530. "properties": {
  38531. "type": "object",
  38532. "properties": {}
  38533. }
  38534. },
  38535. "required": ["id", "type", "properties"],
  38536. "additionalProperties": false
  38537. },
  38538. "EventPermissionAsked": {
  38539. "type": "object",
  38540. "properties": {
  38541. "id": {
  38542. "type": "string",
  38543. "pattern": "^evt_"
  38544. },
  38545. "type": {
  38546. "type": "string",
  38547. "enum": ["permission.asked"]
  38548. },
  38549. "properties": {
  38550. "type": "object",
  38551. "properties": {
  38552. "id": {
  38553. "type": "string",
  38554. "pattern": "^per"
  38555. },
  38556. "sessionID": {
  38557. "type": "string",
  38558. "pattern": "^ses"
  38559. },
  38560. "permission": {
  38561. "type": "string"
  38562. },
  38563. "patterns": {
  38564. "type": "array",
  38565. "items": {
  38566. "type": "string"
  38567. }
  38568. },
  38569. "metadata": {
  38570. "type": "object"
  38571. },
  38572. "always": {
  38573. "type": "array",
  38574. "items": {
  38575. "type": "string"
  38576. }
  38577. },
  38578. "tool": {
  38579. "type": "object",
  38580. "properties": {
  38581. "messageID": {
  38582. "type": "string"
  38583. },
  38584. "callID": {
  38585. "type": "string"
  38586. }
  38587. },
  38588. "required": ["messageID", "callID"],
  38589. "additionalProperties": false
  38590. }
  38591. },
  38592. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  38593. "additionalProperties": false
  38594. }
  38595. },
  38596. "required": ["id", "type", "properties"],
  38597. "additionalProperties": false
  38598. },
  38599. "EventPermissionReplied": {
  38600. "type": "object",
  38601. "properties": {
  38602. "id": {
  38603. "type": "string",
  38604. "pattern": "^evt_"
  38605. },
  38606. "type": {
  38607. "type": "string",
  38608. "enum": ["permission.replied"]
  38609. },
  38610. "properties": {
  38611. "type": "object",
  38612. "properties": {
  38613. "sessionID": {
  38614. "type": "string",
  38615. "pattern": "^ses"
  38616. },
  38617. "requestID": {
  38618. "type": "string",
  38619. "pattern": "^per"
  38620. },
  38621. "reply": {
  38622. "type": "string",
  38623. "enum": ["once", "always", "reject"]
  38624. }
  38625. },
  38626. "required": ["sessionID", "requestID", "reply"],
  38627. "additionalProperties": false
  38628. }
  38629. },
  38630. "required": ["id", "type", "properties"],
  38631. "additionalProperties": false
  38632. },
  38633. "EventMcpToolsChanged": {
  38634. "type": "object",
  38635. "properties": {
  38636. "id": {
  38637. "type": "string",
  38638. "pattern": "^evt_"
  38639. },
  38640. "type": {
  38641. "type": "string",
  38642. "enum": ["mcp.tools.changed"]
  38643. },
  38644. "properties": {
  38645. "type": "object",
  38646. "properties": {
  38647. "server": {
  38648. "type": "string"
  38649. }
  38650. },
  38651. "required": ["server"],
  38652. "additionalProperties": false
  38653. }
  38654. },
  38655. "required": ["id", "type", "properties"],
  38656. "additionalProperties": false
  38657. },
  38658. "EventMcpBrowserOpenFailed": {
  38659. "type": "object",
  38660. "properties": {
  38661. "id": {
  38662. "type": "string",
  38663. "pattern": "^evt_"
  38664. },
  38665. "type": {
  38666. "type": "string",
  38667. "enum": ["mcp.browser.open.failed"]
  38668. },
  38669. "properties": {
  38670. "type": "object",
  38671. "properties": {
  38672. "mcpName": {
  38673. "type": "string"
  38674. },
  38675. "url": {
  38676. "type": "string"
  38677. }
  38678. },
  38679. "required": ["mcpName", "url"],
  38680. "additionalProperties": false
  38681. }
  38682. },
  38683. "required": ["id", "type", "properties"],
  38684. "additionalProperties": false
  38685. },
  38686. "EventCommandExecuted": {
  38687. "type": "object",
  38688. "properties": {
  38689. "id": {
  38690. "type": "string",
  38691. "pattern": "^evt_"
  38692. },
  38693. "type": {
  38694. "type": "string",
  38695. "enum": ["command.executed"]
  38696. },
  38697. "properties": {
  38698. "type": "object",
  38699. "properties": {
  38700. "name": {
  38701. "type": "string"
  38702. },
  38703. "sessionID": {
  38704. "type": "string",
  38705. "pattern": "^ses"
  38706. },
  38707. "arguments": {
  38708. "type": "string"
  38709. },
  38710. "messageID": {
  38711. "type": "string",
  38712. "pattern": "^msg"
  38713. }
  38714. },
  38715. "required": ["name", "sessionID", "arguments", "messageID"],
  38716. "additionalProperties": false
  38717. }
  38718. },
  38719. "required": ["id", "type", "properties"],
  38720. "additionalProperties": false
  38721. },
  38722. "EventProjectUpdated": {
  38723. "type": "object",
  38724. "properties": {
  38725. "id": {
  38726. "type": "string",
  38727. "pattern": "^evt_"
  38728. },
  38729. "type": {
  38730. "type": "string",
  38731. "enum": ["project.updated"]
  38732. },
  38733. "properties": {
  38734. "type": "object",
  38735. "properties": {
  38736. "id": {
  38737. "type": "string"
  38738. },
  38739. "worktree": {
  38740. "type": "string"
  38741. },
  38742. "vcs": {
  38743. "$ref": "#/components/schemas/ProjectVcs"
  38744. },
  38745. "name": {
  38746. "type": "string"
  38747. },
  38748. "icon": {
  38749. "$ref": "#/components/schemas/ProjectIcon"
  38750. },
  38751. "commands": {
  38752. "$ref": "#/components/schemas/ProjectCommands"
  38753. },
  38754. "time": {
  38755. "$ref": "#/components/schemas/ProjectTime"
  38756. },
  38757. "sandboxes": {
  38758. "type": "array",
  38759. "items": {
  38760. "type": "string"
  38761. }
  38762. }
  38763. },
  38764. "required": ["id", "worktree", "time", "sandboxes"],
  38765. "additionalProperties": false
  38766. }
  38767. },
  38768. "required": ["id", "type", "properties"],
  38769. "additionalProperties": false
  38770. },
  38771. "EventSessionStatus": {
  38772. "type": "object",
  38773. "properties": {
  38774. "id": {
  38775. "type": "string",
  38776. "pattern": "^evt_"
  38777. },
  38778. "type": {
  38779. "type": "string",
  38780. "enum": ["session.status"]
  38781. },
  38782. "properties": {
  38783. "type": "object",
  38784. "properties": {
  38785. "sessionID": {
  38786. "type": "string",
  38787. "pattern": "^ses"
  38788. },
  38789. "status": {
  38790. "$ref": "#/components/schemas/SessionStatus"
  38791. }
  38792. },
  38793. "required": ["sessionID", "status"],
  38794. "additionalProperties": false
  38795. }
  38796. },
  38797. "required": ["id", "type", "properties"],
  38798. "additionalProperties": false
  38799. },
  38800. "EventSessionIdle": {
  38801. "type": "object",
  38802. "properties": {
  38803. "id": {
  38804. "type": "string",
  38805. "pattern": "^evt_"
  38806. },
  38807. "type": {
  38808. "type": "string",
  38809. "enum": ["session.idle"]
  38810. },
  38811. "properties": {
  38812. "type": "object",
  38813. "properties": {
  38814. "sessionID": {
  38815. "type": "string",
  38816. "pattern": "^ses"
  38817. }
  38818. },
  38819. "required": ["sessionID"],
  38820. "additionalProperties": false
  38821. }
  38822. },
  38823. "required": ["id", "type", "properties"],
  38824. "additionalProperties": false
  38825. },
  38826. "EventQuestionAsked": {
  38827. "type": "object",
  38828. "properties": {
  38829. "id": {
  38830. "type": "string",
  38831. "pattern": "^evt_"
  38832. },
  38833. "type": {
  38834. "type": "string",
  38835. "enum": ["question.asked"]
  38836. },
  38837. "properties": {
  38838. "type": "object",
  38839. "properties": {
  38840. "id": {
  38841. "type": "string",
  38842. "pattern": "^que"
  38843. },
  38844. "sessionID": {
  38845. "type": "string",
  38846. "pattern": "^ses"
  38847. },
  38848. "questions": {
  38849. "type": "array",
  38850. "items": {
  38851. "$ref": "#/components/schemas/QuestionInfo"
  38852. },
  38853. "description": "Questions to ask"
  38854. },
  38855. "tool": {
  38856. "$ref": "#/components/schemas/QuestionTool"
  38857. }
  38858. },
  38859. "required": ["id", "sessionID", "questions"],
  38860. "additionalProperties": false
  38861. }
  38862. },
  38863. "required": ["id", "type", "properties"],
  38864. "additionalProperties": false
  38865. },
  38866. "EventQuestionReplied": {
  38867. "type": "object",
  38868. "properties": {
  38869. "id": {
  38870. "type": "string",
  38871. "pattern": "^evt_"
  38872. },
  38873. "type": {
  38874. "type": "string",
  38875. "enum": ["question.replied"]
  38876. },
  38877. "properties": {
  38878. "type": "object",
  38879. "properties": {
  38880. "sessionID": {
  38881. "type": "string",
  38882. "pattern": "^ses"
  38883. },
  38884. "requestID": {
  38885. "type": "string",
  38886. "pattern": "^que"
  38887. },
  38888. "answers": {
  38889. "type": "array",
  38890. "items": {
  38891. "$ref": "#/components/schemas/QuestionAnswer"
  38892. }
  38893. }
  38894. },
  38895. "required": ["sessionID", "requestID", "answers"],
  38896. "additionalProperties": false
  38897. }
  38898. },
  38899. "required": ["id", "type", "properties"],
  38900. "additionalProperties": false
  38901. },
  38902. "EventQuestionRejected": {
  38903. "type": "object",
  38904. "properties": {
  38905. "id": {
  38906. "type": "string",
  38907. "pattern": "^evt_"
  38908. },
  38909. "type": {
  38910. "type": "string",
  38911. "enum": ["question.rejected"]
  38912. },
  38913. "properties": {
  38914. "type": "object",
  38915. "properties": {
  38916. "sessionID": {
  38917. "type": "string",
  38918. "pattern": "^ses"
  38919. },
  38920. "requestID": {
  38921. "type": "string",
  38922. "pattern": "^que"
  38923. }
  38924. },
  38925. "required": ["sessionID", "requestID"],
  38926. "additionalProperties": false
  38927. }
  38928. },
  38929. "required": ["id", "type", "properties"],
  38930. "additionalProperties": false
  38931. },
  38932. "EventSessionCompacted": {
  38933. "type": "object",
  38934. "properties": {
  38935. "id": {
  38936. "type": "string",
  38937. "pattern": "^evt_"
  38938. },
  38939. "type": {
  38940. "type": "string",
  38941. "enum": ["session.compacted"]
  38942. },
  38943. "properties": {
  38944. "type": "object",
  38945. "properties": {
  38946. "sessionID": {
  38947. "type": "string",
  38948. "pattern": "^ses"
  38949. }
  38950. },
  38951. "required": ["sessionID"],
  38952. "additionalProperties": false
  38953. }
  38954. },
  38955. "required": ["id", "type", "properties"],
  38956. "additionalProperties": false
  38957. },
  38958. "EventVcsBranchUpdated": {
  38959. "type": "object",
  38960. "properties": {
  38961. "id": {
  38962. "type": "string",
  38963. "pattern": "^evt_"
  38964. },
  38965. "type": {
  38966. "type": "string",
  38967. "enum": ["vcs.branch.updated"]
  38968. },
  38969. "properties": {
  38970. "type": "object",
  38971. "properties": {
  38972. "branch": {
  38973. "type": "string"
  38974. }
  38975. },
  38976. "additionalProperties": false
  38977. }
  38978. },
  38979. "required": ["id", "type", "properties"],
  38980. "additionalProperties": false
  38981. },
  38982. "EventWorkspaceReady": {
  38983. "type": "object",
  38984. "properties": {
  38985. "id": {
  38986. "type": "string",
  38987. "pattern": "^evt_"
  38988. },
  38989. "type": {
  38990. "type": "string",
  38991. "enum": ["workspace.ready"]
  38992. },
  38993. "properties": {
  38994. "type": "object",
  38995. "properties": {
  38996. "name": {
  38997. "type": "string"
  38998. }
  38999. },
  39000. "required": ["name"],
  39001. "additionalProperties": false
  39002. }
  39003. },
  39004. "required": ["id", "type", "properties"],
  39005. "additionalProperties": false
  39006. },
  39007. "EventWorkspaceFailed": {
  39008. "type": "object",
  39009. "properties": {
  39010. "id": {
  39011. "type": "string",
  39012. "pattern": "^evt_"
  39013. },
  39014. "type": {
  39015. "type": "string",
  39016. "enum": ["workspace.failed"]
  39017. },
  39018. "properties": {
  39019. "type": "object",
  39020. "properties": {
  39021. "message": {
  39022. "type": "string"
  39023. }
  39024. },
  39025. "required": ["message"],
  39026. "additionalProperties": false
  39027. }
  39028. },
  39029. "required": ["id", "type", "properties"],
  39030. "additionalProperties": false
  39031. },
  39032. "EventWorkspaceStatus": {
  39033. "type": "object",
  39034. "properties": {
  39035. "id": {
  39036. "type": "string",
  39037. "pattern": "^evt_"
  39038. },
  39039. "type": {
  39040. "type": "string",
  39041. "enum": ["workspace.status"]
  39042. },
  39043. "properties": {
  39044. "type": "object",
  39045. "properties": {
  39046. "workspaceID": {
  39047. "type": "string",
  39048. "pattern": "^wrk"
  39049. },
  39050. "status": {
  39051. "type": "string",
  39052. "enum": ["connected", "connecting", "disconnected", "error"]
  39053. }
  39054. },
  39055. "required": ["workspaceID", "status"],
  39056. "additionalProperties": false
  39057. }
  39058. },
  39059. "required": ["id", "type", "properties"],
  39060. "additionalProperties": false
  39061. },
  39062. "EventWorktreeReady": {
  39063. "type": "object",
  39064. "properties": {
  39065. "id": {
  39066. "type": "string",
  39067. "pattern": "^evt_"
  39068. },
  39069. "type": {
  39070. "type": "string",
  39071. "enum": ["worktree.ready"]
  39072. },
  39073. "properties": {
  39074. "type": "object",
  39075. "properties": {
  39076. "name": {
  39077. "type": "string"
  39078. },
  39079. "branch": {
  39080. "type": "string"
  39081. }
  39082. },
  39083. "required": ["name"],
  39084. "additionalProperties": false
  39085. }
  39086. },
  39087. "required": ["id", "type", "properties"],
  39088. "additionalProperties": false
  39089. },
  39090. "EventWorktreeFailed": {
  39091. "type": "object",
  39092. "properties": {
  39093. "id": {
  39094. "type": "string",
  39095. "pattern": "^evt_"
  39096. },
  39097. "type": {
  39098. "type": "string",
  39099. "enum": ["worktree.failed"]
  39100. },
  39101. "properties": {
  39102. "type": "object",
  39103. "properties": {
  39104. "message": {
  39105. "type": "string"
  39106. }
  39107. },
  39108. "required": ["message"],
  39109. "additionalProperties": false
  39110. }
  39111. },
  39112. "required": ["id", "type", "properties"],
  39113. "additionalProperties": false
  39114. },
  39115. "EventServerConnected": {
  39116. "type": "object",
  39117. "properties": {
  39118. "id": {
  39119. "type": "string",
  39120. "pattern": "^evt_"
  39121. },
  39122. "type": {
  39123. "type": "string",
  39124. "enum": ["server.connected"]
  39125. },
  39126. "properties": {
  39127. "type": "object",
  39128. "properties": {}
  39129. }
  39130. },
  39131. "required": ["id", "type", "properties"],
  39132. "additionalProperties": false
  39133. },
  39134. "EventGlobalDisposed": {
  39135. "type": "object",
  39136. "properties": {
  39137. "id": {
  39138. "type": "string",
  39139. "pattern": "^evt_"
  39140. },
  39141. "type": {
  39142. "type": "string",
  39143. "enum": ["global.disposed"]
  39144. },
  39145. "properties": {
  39146. "type": "object",
  39147. "properties": {}
  39148. }
  39149. },
  39150. "required": ["id", "type", "properties"],
  39151. "additionalProperties": false
  39152. },
  39153. "CredentialOAuth": {
  39154. "type": "object",
  39155. "properties": {
  39156. "type": {
  39157. "type": "string",
  39158. "enum": ["oauth"]
  39159. },
  39160. "methodID": {
  39161. "type": "string"
  39162. },
  39163. "refresh": {
  39164. "type": "string"
  39165. },
  39166. "access": {
  39167. "type": "string"
  39168. },
  39169. "expires": {
  39170. "type": "integer",
  39171. "minimum": 0
  39172. },
  39173. "metadata": {
  39174. "type": "object"
  39175. }
  39176. },
  39177. "required": ["type", "methodID", "refresh", "access", "expires"],
  39178. "additionalProperties": false
  39179. },
  39180. "CredentialKey": {
  39181. "type": "object",
  39182. "properties": {
  39183. "type": {
  39184. "type": "string",
  39185. "enum": ["key"]
  39186. },
  39187. "key": {
  39188. "type": "string"
  39189. },
  39190. "metadata": {
  39191. "type": "object"
  39192. }
  39193. },
  39194. "required": ["type", "key"],
  39195. "additionalProperties": false
  39196. },
  39197. "SkillV2DirectorySource": {
  39198. "type": "object",
  39199. "properties": {
  39200. "type": {
  39201. "type": "string",
  39202. "enum": ["directory"]
  39203. },
  39204. "path": {
  39205. "type": "string"
  39206. }
  39207. },
  39208. "required": ["type", "path"],
  39209. "additionalProperties": false
  39210. },
  39211. "SkillV2UrlSource": {
  39212. "type": "object",
  39213. "properties": {
  39214. "type": {
  39215. "type": "string",
  39216. "enum": ["url"]
  39217. },
  39218. "url": {
  39219. "type": "string"
  39220. }
  39221. },
  39222. "required": ["type", "url"],
  39223. "additionalProperties": false
  39224. },
  39225. "SkillV2EmbeddedSource": {
  39226. "type": "object",
  39227. "properties": {
  39228. "type": {
  39229. "type": "string",
  39230. "enum": ["embedded"]
  39231. },
  39232. "skill": {
  39233. "$ref": "#/components/schemas/SkillV2Info"
  39234. }
  39235. },
  39236. "required": ["type", "skill"],
  39237. "additionalProperties": false
  39238. },
  39239. "BadRequestError": {
  39240. "type": "object",
  39241. "required": ["name", "data"],
  39242. "properties": {
  39243. "name": {
  39244. "type": "string",
  39245. "enum": ["BadRequest"]
  39246. },
  39247. "data": {
  39248. "type": "object",
  39249. "required": ["message"],
  39250. "properties": {
  39251. "message": {
  39252. "type": "string"
  39253. },
  39254. "kind": {
  39255. "type": "string",
  39256. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  39257. }
  39258. }
  39259. }
  39260. }
  39261. }
  39262. }
  39263. },
  39264. "security": [],
  39265. "tags": [
  39266. {
  39267. "name": "control",
  39268. "description": "Control plane routes."
  39269. },
  39270. {
  39271. "name": "controlPlane",
  39272. "description": "Control-plane orchestration routes."
  39273. },
  39274. {
  39275. "name": "global",
  39276. "description": "Global server routes."
  39277. },
  39278. {
  39279. "name": "event",
  39280. "description": "Instance event stream route."
  39281. },
  39282. {
  39283. "name": "config",
  39284. "description": "Experimental HttpApi config routes."
  39285. },
  39286. {
  39287. "name": "experimental",
  39288. "description": "Experimental HttpApi read-only routes."
  39289. },
  39290. {
  39291. "name": "file",
  39292. "description": "Experimental HttpApi file routes."
  39293. },
  39294. {
  39295. "name": "instance",
  39296. "description": "Experimental HttpApi instance read routes."
  39297. },
  39298. {
  39299. "name": "mcp",
  39300. "description": "Experimental HttpApi MCP routes."
  39301. },
  39302. {
  39303. "name": "project",
  39304. "description": "Experimental HttpApi project routes."
  39305. },
  39306. {
  39307. "name": "projectCopy",
  39308. "description": "Project copy naming routes."
  39309. },
  39310. {
  39311. "name": "pty",
  39312. "description": "Experimental HttpApi PTY routes."
  39313. },
  39314. {
  39315. "name": "question",
  39316. "description": "Question routes."
  39317. },
  39318. {
  39319. "name": "permission",
  39320. "description": "Experimental HttpApi permission routes."
  39321. },
  39322. {
  39323. "name": "provider",
  39324. "description": "Experimental HttpApi provider routes."
  39325. },
  39326. {
  39327. "name": "session",
  39328. "description": "Experimental HttpApi session routes."
  39329. },
  39330. {
  39331. "name": "sync",
  39332. "description": "Experimental HttpApi sync routes."
  39333. },
  39334. {
  39335. "name": "tui",
  39336. "description": "Experimental HttpApi TUI routes."
  39337. },
  39338. {
  39339. "name": "workspace",
  39340. "description": "Experimental HttpApi workspace routes."
  39341. },
  39342. {
  39343. "name": "opencode HttpApi",
  39344. "description": "Experimental HttpApi surface for selected instance routes."
  39345. },
  39346. {
  39347. "name": "opencode HttpApi",
  39348. "description": "Experimental HttpApi surface for selected instance routes."
  39349. },
  39350. {
  39351. "name": "opencode HttpApi",
  39352. "description": "Experimental HttpApi surface for selected instance routes."
  39353. },
  39354. {
  39355. "name": "sessions",
  39356. "description": "Experimental session routes."
  39357. },
  39358. {
  39359. "name": "messages",
  39360. "description": "Experimental message routes."
  39361. },
  39362. {
  39363. "name": "models",
  39364. "description": "Experimental model routes."
  39365. },
  39366. {
  39367. "name": "providers",
  39368. "description": "Experimental provider routes."
  39369. },
  39370. {
  39371. "name": "integrations",
  39372. "description": "Integration discovery and authentication routes."
  39373. },
  39374. {
  39375. "name": "opencode HttpApi",
  39376. "description": "Experimental HttpApi surface for selected instance routes."
  39377. },
  39378. {
  39379. "name": "permissions",
  39380. "description": "Experimental permission routes."
  39381. },
  39382. {
  39383. "name": "filesystem",
  39384. "description": "Experimental location-scoped filesystem routes."
  39385. },
  39386. {
  39387. "name": "commands",
  39388. "description": "Experimental command routes."
  39389. },
  39390. {
  39391. "name": "skills",
  39392. "description": "Experimental skill routes."
  39393. },
  39394. {
  39395. "name": "events",
  39396. "description": "Experimental event stream route."
  39397. },
  39398. {
  39399. "name": "pty",
  39400. "description": "Experimental location-scoped PTY routes."
  39401. },
  39402. {
  39403. "name": "session questions",
  39404. "description": "Experimental session question routes."
  39405. },
  39406. {
  39407. "name": "reference",
  39408. "description": "Location-scoped project references."
  39409. },
  39410. {
  39411. "name": "projectCopy",
  39412. "description": "Project copy management routes."
  39413. },
  39414. {
  39415. "name": "pty",
  39416. "description": "PTY websocket route."
  39417. }
  39418. ]
  39419. }