openapi.json 1.1 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077280782807928080280812808228083280842808528086280872808828089280902809128092280932809428095280962809728098280992810028101281022810328104281052810628107281082810928110281112811228113281142811528116281172811828119281202812128122281232812428125281262812728128281292813028131281322813328134281352813628137281382813928140281412814228143281442814528146281472814828149281502815128152281532815428155281562815728158281592816028161281622816328164281652816628167281682816928170281712817228173281742817528176281772817828179281802818128182281832818428185281862818728188281892819028191281922819328194281952819628197281982819928200282012820228203282042820528206282072820828209282102821128212282132821428215282162821728218282192822028221282222822328224282252822628227282282822928230282312823228233282342823528236282372823828239282402824128242282432824428245282462824728248282492825028251282522825328254282552825628257282582825928260282612826228263282642826528266282672826828269282702827128272282732827428275282762827728278282792828028281282822828328284282852828628287282882828928290282912829228293282942829528296282972829828299283002830128302283032830428305283062830728308283092831028311283122831328314283152831628317283182831928320283212832228323283242832528326283272832828329283302833128332283332833428335283362833728338283392834028341283422834328344283452834628347283482834928350283512835228353283542835528356283572835828359283602836128362283632836428365283662836728368283692837028371283722837328374283752837628377283782837928380283812838228383283842838528386283872838828389283902839128392283932839428395283962839728398283992840028401284022840328404284052840628407284082840928410284112841228413284142841528416284172841828419284202842128422284232842428425284262842728428284292843028431284322843328434284352843628437284382843928440284412844228443284442844528446284472844828449284502845128452284532845428455284562845728458284592846028461284622846328464284652846628467284682846928470284712847228473284742847528476284772847828479284802848128482284832848428485284862848728488284892849028491284922849328494284952849628497284982849928500285012850228503285042850528506285072850828509285102851128512285132851428515285162851728518285192852028521285222852328524285252852628527285282852928530285312853228533285342853528536285372853828539285402854128542285432854428545285462854728548285492855028551285522855328554285552855628557285582855928560285612856228563285642856528566285672856828569285702857128572285732857428575285762857728578285792858028581285822858328584285852858628587285882858928590285912859228593285942859528596285972859828599286002860128602286032860428605286062860728608286092861028611286122861328614286152861628617286182861928620286212862228623286242862528626286272862828629286302863128632286332863428635286362863728638286392864028641286422864328644286452864628647286482864928650286512865228653286542865528656286572865828659286602866128662286632866428665286662866728668286692867028671286722867328674286752867628677286782867928680286812868228683286842868528686286872868828689286902869128692286932869428695286962869728698286992870028701287022870328704287052870628707287082870928710287112871228713287142871528716287172871828719287202872128722287232872428725287262872728728287292873028731287322873328734287352873628737287382873928740287412874228743287442874528746287472874828749287502875128752287532875428755287562875728758287592876028761287622876328764287652876628767287682876928770287712877228773287742877528776287772877828779287802878128782287832878428785287862878728788287892879028791287922879328794287952879628797287982879928800288012880228803288042880528806288072880828809288102881128812288132881428815288162881728818288192882028821288222882328824288252882628827288282882928830288312883228833288342883528836288372883828839288402884128842288432884428845288462884728848288492885028851288522885328854288552885628857288582885928860288612886228863288642886528866288672886828869288702887128872288732887428875288762887728878288792888028881288822888328884288852888628887288882888928890288912889228893288942889528896288972889828899289002890128902289032890428905289062890728908289092891028911289122891328914289152891628917289182891928920289212892228923289242892528926289272892828929289302893128932289332893428935289362893728938289392894028941289422894328944289452894628947289482894928950289512895228953289542895528956289572895828959289602896128962289632896428965289662896728968289692897028971289722897328974289752897628977289782897928980289812898228983289842898528986289872898828989289902899128992289932899428995289962899728998289992900029001290022900329004290052900629007290082900929010290112901229013290142901529016290172901829019290202902129022290232902429025290262902729028290292903029031290322903329034290352903629037290382903929040290412904229043290442904529046290472904829049290502905129052290532905429055290562905729058290592906029061290622906329064290652906629067290682906929070290712907229073290742907529076290772907829079290802908129082290832908429085290862908729088290892909029091290922909329094290952909629097290982909929100291012910229103291042910529106291072910829109291102911129112291132911429115291162911729118291192912029121291222912329124291252912629127291282912929130291312913229133291342913529136291372913829139291402914129142291432914429145291462914729148291492915029151291522915329154291552915629157291582915929160291612916229163291642916529166291672916829169291702917129172291732917429175291762917729178291792918029181291822918329184291852918629187291882918929190291912919229193291942919529196291972919829199292002920129202292032920429205292062920729208292092921029211292122921329214292152921629217292182921929220292212922229223292242922529226292272922829229292302923129232292332923429235292362923729238292392924029241292422924329244292452924629247292482924929250292512925229253292542925529256292572925829259292602926129262292632926429265292662926729268292692927029271292722927329274292752927629277292782927929280292812928229283292842928529286292872928829289292902929129292292932929429295292962929729298292992930029301293022930329304293052930629307293082930929310293112931229313293142931529316293172931829319293202932129322293232932429325293262932729328293292933029331293322933329334293352933629337293382933929340293412934229343293442934529346293472934829349293502935129352293532935429355293562935729358293592936029361293622936329364293652936629367293682936929370293712937229373293742937529376293772937829379293802938129382293832938429385293862938729388293892939029391293922939329394293952939629397293982939929400294012940229403294042940529406294072940829409294102941129412294132941429415294162941729418294192942029421294222942329424294252942629427294282942929430294312943229433294342943529436294372943829439294402944129442294432944429445294462944729448294492945029451294522945329454294552945629457294582945929460294612946229463294642946529466294672946829469294702947129472294732947429475294762947729478294792948029481294822948329484294852948629487294882948929490294912949229493294942949529496294972949829499295002950129502295032950429505295062950729508295092951029511295122951329514295152951629517295182951929520295212952229523295242952529526295272952829529295302953129532295332953429535295362953729538295392954029541295422954329544295452954629547295482954929550295512955229553295542955529556295572955829559295602956129562295632956429565295662956729568295692957029571295722957329574295752957629577295782957929580295812958229583295842958529586295872958829589295902959129592295932959429595295962959729598295992960029601296022960329604296052960629607296082960929610296112961229613296142961529616296172961829619296202962129622296232962429625296262962729628296292963029631296322963329634296352963629637296382963929640296412964229643296442964529646296472964829649296502965129652296532965429655296562965729658296592966029661296622966329664296652966629667296682966929670296712967229673296742967529676296772967829679296802968129682296832968429685296862968729688296892969029691296922969329694296952969629697296982969929700297012970229703297042970529706297072970829709297102971129712297132971429715297162971729718297192972029721297222972329724297252972629727297282972929730297312973229733297342973529736297372973829739297402974129742297432974429745297462974729748297492975029751297522975329754297552975629757297582975929760297612976229763297642976529766297672976829769297702977129772297732977429775297762977729778297792978029781297822978329784297852978629787297882978929790297912979229793297942979529796297972979829799298002980129802298032980429805298062980729808298092981029811298122981329814298152981629817298182981929820298212982229823298242982529826298272982829829298302983129832298332983429835298362983729838298392984029841298422984329844298452984629847298482984929850298512985229853298542985529856298572985829859298602986129862298632986429865298662986729868298692987029871298722987329874298752987629877298782987929880298812988229883298842988529886298872988829889298902989129892298932989429895298962989729898298992990029901299022990329904299052990629907299082990929910299112991229913299142991529916299172991829919299202992129922299232992429925299262992729928299292993029931299322993329934299352993629937299382993929940299412994229943299442994529946299472994829949299502995129952299532995429955299562995729958299592996029961299622996329964299652996629967299682996929970299712997229973299742997529976299772997829979299802998129982299832998429985299862998729988299892999029991299922999329994299952999629997299982999930000300013000230003300043000530006300073000830009300103001130012300133001430015300163001730018300193002030021300223002330024300253002630027300283002930030300313003230033300343003530036300373003830039300403004130042300433004430045300463004730048300493005030051300523005330054300553005630057300583005930060300613006230063300643006530066300673006830069300703007130072300733007430075300763007730078300793008030081300823008330084300853008630087300883008930090300913009230093300943009530096300973009830099301003010130102301033010430105301063010730108301093011030111301123011330114301153011630117301183011930120301213012230123301243012530126301273012830129301303013130132301333013430135301363013730138301393014030141301423014330144301453014630147301483014930150301513015230153301543015530156301573015830159301603016130162301633016430165301663016730168301693017030171301723017330174301753017630177301783017930180301813018230183301843018530186301873018830189301903019130192301933019430195301963019730198301993020030201302023020330204302053020630207302083020930210302113021230213302143021530216302173021830219302203022130222302233022430225302263022730228302293023030231302323023330234302353023630237302383023930240302413024230243302443024530246302473024830249302503025130252302533025430255302563025730258302593026030261302623026330264302653026630267302683026930270302713027230273302743027530276302773027830279302803028130282302833028430285302863028730288302893029030291302923029330294302953029630297302983029930300303013030230303303043030530306303073030830309303103031130312303133031430315303163031730318303193032030321303223032330324303253032630327303283032930330303313033230333303343033530336303373033830339303403034130342303433034430345303463034730348303493035030351303523035330354303553035630357303583035930360303613036230363303643036530366303673036830369303703037130372303733037430375303763037730378303793038030381303823038330384303853038630387303883038930390303913039230393303943039530396303973039830399304003040130402304033040430405304063040730408304093041030411304123041330414304153041630417304183041930420304213042230423304243042530426304273042830429304303043130432304333043430435304363043730438304393044030441304423044330444304453044630447304483044930450304513045230453304543045530456304573045830459304603046130462304633046430465304663046730468304693047030471304723047330474304753047630477304783047930480304813048230483304843048530486304873048830489304903049130492304933049430495304963049730498304993050030501305023050330504305053050630507305083050930510305113051230513305143051530516305173051830519305203052130522305233052430525305263052730528305293053030531305323053330534305353053630537305383053930540305413054230543305443054530546305473054830549305503055130552305533055430555305563055730558305593056030561305623056330564305653056630567305683056930570305713057230573305743057530576305773057830579305803058130582305833058430585305863058730588305893059030591305923059330594305953059630597305983059930600306013060230603306043060530606306073060830609306103061130612306133061430615306163061730618306193062030621306223062330624306253062630627306283062930630306313063230633306343063530636306373063830639306403064130642306433064430645306463064730648306493065030651306523065330654306553065630657306583065930660306613066230663306643066530666306673066830669306703067130672306733067430675306763067730678306793068030681306823068330684306853068630687306883068930690306913069230693306943069530696306973069830699307003070130702307033070430705307063070730708307093071030711307123071330714307153071630717307183071930720307213072230723307243072530726307273072830729307303073130732307333073430735307363073730738307393074030741307423074330744307453074630747307483074930750307513075230753307543075530756307573075830759307603076130762307633076430765307663076730768307693077030771307723077330774307753077630777307783077930780307813078230783307843078530786307873078830789307903079130792307933079430795307963079730798307993080030801308023080330804308053080630807308083080930810308113081230813308143081530816308173081830819308203082130822308233082430825308263082730828308293083030831308323083330834308353083630837308383083930840308413084230843308443084530846308473084830849308503085130852308533085430855308563085730858308593086030861308623086330864308653086630867308683086930870308713087230873308743087530876308773087830879308803088130882308833088430885308863088730888308893089030891308923089330894308953089630897308983089930900309013090230903309043090530906309073090830909309103091130912309133091430915309163091730918309193092030921309223092330924309253092630927309283092930930309313093230933309343093530936309373093830939309403094130942309433094430945309463094730948309493095030951309523095330954309553095630957309583095930960309613096230963309643096530966309673096830969309703097130972309733097430975309763097730978309793098030981309823098330984309853098630987309883098930990309913099230993309943099530996309973099830999310003100131002310033100431005310063100731008310093101031011310123101331014310153101631017310183101931020310213102231023310243102531026310273102831029310303103131032310333103431035310363103731038310393104031041310423104331044310453104631047310483104931050310513105231053310543105531056310573105831059310603106131062310633106431065310663106731068310693107031071310723107331074310753107631077310783107931080310813108231083310843108531086310873108831089310903109131092310933109431095310963109731098310993110031101311023110331104311053110631107311083110931110311113111231113311143111531116311173111831119311203112131122311233112431125311263112731128311293113031131311323113331134311353113631137311383113931140311413114231143311443114531146311473114831149311503115131152311533115431155311563115731158311593116031161311623116331164311653116631167311683116931170311713117231173311743117531176311773117831179311803118131182311833118431185311863118731188311893119031191311923119331194311953119631197311983119931200312013120231203312043120531206312073120831209312103121131212312133121431215312163121731218312193122031221312223122331224312253122631227312283122931230312313123231233312343123531236312373123831239312403124131242312433124431245312463124731248312493125031251312523125331254312553125631257312583125931260312613126231263312643126531266312673126831269312703127131272312733127431275312763127731278312793128031281312823128331284312853128631287312883128931290312913129231293312943129531296312973129831299313003130131302313033130431305313063130731308313093131031311313123131331314313153131631317313183131931320313213132231323313243132531326313273132831329313303133131332313333133431335313363133731338313393134031341313423134331344313453134631347313483134931350313513135231353313543135531356313573135831359313603136131362313633136431365313663136731368313693137031371313723137331374313753137631377313783137931380313813138231383313843138531386313873138831389313903139131392313933139431395313963139731398313993140031401314023140331404314053140631407314083140931410314113141231413314143141531416314173141831419314203142131422314233142431425314263142731428314293143031431314323143331434314353143631437314383143931440314413144231443314443144531446314473144831449314503145131452314533145431455314563145731458314593146031461314623146331464314653146631467314683146931470314713147231473314743147531476314773147831479314803148131482314833148431485314863148731488314893149031491314923149331494314953149631497314983149931500315013150231503315043150531506315073150831509315103151131512315133151431515315163151731518315193152031521315223152331524315253152631527315283152931530315313153231533315343153531536315373153831539315403154131542315433154431545315463154731548315493155031551315523155331554315553155631557315583155931560315613156231563315643156531566315673156831569315703157131572315733157431575315763157731578315793158031581315823158331584315853158631587315883158931590315913159231593315943159531596315973159831599316003160131602316033160431605316063160731608316093161031611316123161331614316153161631617316183161931620316213162231623316243162531626316273162831629316303163131632316333163431635316363163731638316393164031641316423164331644316453164631647316483164931650316513165231653316543165531656316573165831659316603166131662316633166431665316663166731668316693167031671316723167331674316753167631677316783167931680316813168231683316843168531686316873168831689316903169131692316933169431695316963169731698316993170031701317023170331704317053170631707317083170931710317113171231713317143171531716317173171831719317203172131722317233172431725317263172731728317293173031731317323173331734317353173631737317383173931740317413174231743317443174531746317473174831749317503175131752317533175431755317563175731758317593176031761317623176331764317653176631767317683176931770317713177231773317743177531776317773177831779317803178131782317833178431785317863178731788317893179031791317923179331794317953179631797317983179931800318013180231803318043180531806318073180831809318103181131812318133181431815318163181731818318193182031821318223182331824318253182631827318283182931830318313183231833318343183531836318373183831839318403184131842318433184431845318463184731848318493185031851318523185331854318553185631857318583185931860318613186231863318643186531866318673186831869318703187131872318733187431875318763187731878318793188031881318823188331884318853188631887318883188931890318913189231893318943189531896318973189831899319003190131902319033190431905319063190731908319093191031911319123191331914319153191631917319183191931920319213192231923319243192531926319273192831929319303193131932319333193431935319363193731938319393194031941319423194331944319453194631947319483194931950319513195231953319543195531956319573195831959319603196131962319633196431965319663196731968319693197031971319723197331974319753197631977319783197931980319813198231983319843198531986319873198831989319903199131992319933199431995319963199731998319993200032001320023200332004320053200632007320083200932010320113201232013320143201532016320173201832019320203202132022320233202432025320263202732028320293203032031320323203332034320353203632037320383203932040320413204232043320443204532046320473204832049320503205132052320533205432055320563205732058320593206032061320623206332064320653206632067320683206932070320713207232073320743207532076320773207832079320803208132082320833208432085320863208732088320893209032091320923209332094320953209632097320983209932100321013210232103321043210532106321073210832109321103211132112321133211432115321163211732118321193212032121321223212332124321253212632127321283212932130321313213232133321343213532136321373213832139321403214132142321433214432145321463214732148321493215032151321523215332154321553215632157321583215932160321613216232163321643216532166321673216832169321703217132172321733217432175321763217732178321793218032181321823218332184321853218632187321883218932190321913219232193321943219532196321973219832199322003220132202322033220432205322063220732208322093221032211322123221332214322153221632217322183221932220322213222232223322243222532226322273222832229322303223132232322333223432235322363223732238322393224032241322423224332244322453224632247322483224932250322513225232253322543225532256322573225832259322603226132262322633226432265322663226732268322693227032271322723227332274322753227632277322783227932280322813228232283322843228532286322873228832289322903229132292322933229432295322963229732298322993230032301323023230332304323053230632307323083230932310323113231232313323143231532316323173231832319323203232132322323233232432325323263232732328323293233032331323323233332334323353233632337323383233932340323413234232343323443234532346323473234832349323503235132352323533235432355323563235732358323593236032361323623236332364323653236632367323683236932370323713237232373323743237532376323773237832379323803238132382323833238432385323863238732388323893239032391323923239332394323953239632397323983239932400324013240232403324043240532406324073240832409324103241132412324133241432415324163241732418324193242032421324223242332424324253242632427324283242932430324313243232433324343243532436324373243832439324403244132442324433244432445324463244732448324493245032451324523245332454324553245632457324583245932460324613246232463324643246532466324673246832469324703247132472324733247432475324763247732478324793248032481324823248332484324853248632487324883248932490324913249232493324943249532496324973249832499325003250132502325033250432505325063250732508325093251032511325123251332514325153251632517325183251932520325213252232523325243252532526325273252832529325303253132532325333253432535325363253732538325393254032541325423254332544325453254632547325483254932550325513255232553325543255532556325573255832559325603256132562325633256432565325663256732568325693257032571325723257332574325753257632577325783257932580325813258232583325843258532586325873258832589325903259132592325933259432595325963259732598325993260032601326023260332604326053260632607326083260932610326113261232613326143261532616326173261832619326203262132622326233262432625326263262732628326293263032631326323263332634326353263632637326383263932640326413264232643326443264532646326473264832649326503265132652326533265432655326563265732658326593266032661326623266332664326653266632667326683266932670326713267232673326743267532676326773267832679326803268132682326833268432685326863268732688326893269032691326923269332694326953269632697326983269932700327013270232703327043270532706327073270832709327103271132712327133271432715327163271732718327193272032721327223272332724327253272632727327283272932730327313273232733327343273532736327373273832739327403274132742327433274432745327463274732748327493275032751327523275332754327553275632757327583275932760327613276232763327643276532766327673276832769327703277132772327733277432775327763277732778327793278032781327823278332784327853278632787327883278932790327913279232793327943279532796327973279832799328003280132802328033280432805328063280732808328093281032811328123281332814328153281632817328183281932820328213282232823328243282532826328273282832829328303283132832328333283432835328363283732838328393284032841328423284332844328453284632847328483284932850328513285232853328543285532856328573285832859328603286132862328633286432865328663286732868328693287032871328723287332874328753287632877328783287932880328813288232883328843288532886328873288832889328903289132892328933289432895328963289732898328993290032901329023290332904329053290632907329083290932910329113291232913329143291532916329173291832919329203292132922329233292432925329263292732928329293293032931329323293332934329353293632937329383293932940329413294232943329443294532946329473294832949329503295132952329533295432955329563295732958329593296032961329623296332964329653296632967329683296932970329713297232973329743297532976329773297832979329803298132982329833298432985329863298732988329893299032991329923299332994329953299632997329983299933000330013300233003330043300533006330073300833009330103301133012330133301433015330163301733018330193302033021330223302333024330253302633027330283302933030330313303233033330343303533036330373303833039330403304133042330433304433045330463304733048330493305033051330523305333054330553305633057330583305933060330613306233063330643306533066330673306833069330703307133072330733307433075330763307733078330793308033081330823308333084330853308633087330883308933090330913309233093330943309533096330973309833099331003310133102331033310433105331063310733108331093311033111331123311333114331153311633117331183311933120331213312233123331243312533126331273312833129331303313133132331333313433135331363313733138331393314033141331423314333144331453314633147331483314933150331513315233153331543315533156331573315833159331603316133162331633316433165331663316733168331693317033171331723317333174331753317633177331783317933180331813318233183331843318533186331873318833189331903319133192331933319433195331963319733198331993320033201332023320333204332053320633207332083320933210332113321233213332143321533216332173321833219332203322133222332233322433225332263322733228332293323033231332323323333234332353323633237332383323933240332413324233243332443324533246332473324833249332503325133252332533325433255332563325733258332593326033261332623326333264332653326633267332683326933270332713327233273332743327533276332773327833279332803328133282332833328433285332863328733288332893329033291332923329333294332953329633297332983329933300333013330233303333043330533306333073330833309333103331133312333133331433315333163331733318333193332033321333223332333324333253332633327333283332933330333313333233333333343333533336333373333833339333403334133342333433334433345333463334733348333493335033351333523335333354333553335633357333583335933360333613336233363333643336533366333673336833369333703337133372333733337433375333763337733378333793338033381333823338333384333853338633387333883338933390333913339233393333943339533396333973339833399334003340133402334033340433405334063340733408334093341033411334123341333414334153341633417334183341933420334213342233423334243342533426334273342833429334303343133432334333343433435334363343733438334393344033441334423344333444334453344633447334483344933450334513345233453334543345533456334573345833459334603346133462334633346433465334663346733468334693347033471334723347333474334753347633477334783347933480334813348233483334843348533486334873348833489334903349133492334933349433495334963349733498334993350033501335023350333504335053350633507335083350933510335113351233513335143351533516335173351833519335203352133522335233352433525335263352733528335293353033531335323353333534335353353633537335383353933540335413354233543335443354533546335473354833549335503355133552335533355433555335563355733558335593356033561335623356333564335653356633567335683356933570335713357233573335743357533576335773357833579335803358133582335833358433585335863358733588335893359033591335923359333594335953359633597335983359933600336013360233603336043360533606336073360833609336103361133612336133361433615336163361733618336193362033621336223362333624336253362633627336283362933630336313363233633336343363533636336373363833639336403364133642336433364433645336463364733648336493365033651336523365333654336553365633657336583365933660336613366233663336643366533666336673366833669336703367133672336733367433675336763367733678336793368033681336823368333684336853368633687336883368933690336913369233693336943369533696336973369833699337003370133702337033370433705337063370733708337093371033711337123371333714337153371633717337183371933720337213372233723337243372533726337273372833729337303373133732337333373433735337363373733738337393374033741337423374333744337453374633747337483374933750337513375233753337543375533756337573375833759337603376133762337633376433765337663376733768337693377033771337723377333774337753377633777337783377933780337813378233783337843378533786337873378833789337903379133792337933379433795337963379733798337993380033801338023380333804338053380633807338083380933810338113381233813338143381533816338173381833819338203382133822338233382433825338263382733828338293383033831338323383333834338353383633837338383383933840338413384233843338443384533846338473384833849338503385133852338533385433855338563385733858338593386033861338623386333864338653386633867338683386933870338713387233873338743387533876338773387833879338803388133882338833388433885338863388733888338893389033891338923389333894338953389633897338983389933900339013390233903339043390533906339073390833909339103391133912339133391433915339163391733918339193392033921339223392333924339253392633927339283392933930339313393233933339343393533936339373393833939339403394133942339433394433945339463394733948339493395033951339523395333954339553395633957339583395933960339613396233963339643396533966339673396833969339703397133972339733397433975339763397733978339793398033981339823398333984339853398633987339883398933990339913399233993339943399533996339973399833999340003400134002340033400434005340063400734008340093401034011340123401334014340153401634017340183401934020340213402234023340243402534026340273402834029340303403134032340333403434035340363403734038340393404034041340423404334044340453404634047340483404934050340513405234053340543405534056340573405834059340603406134062340633406434065340663406734068340693407034071340723407334074340753407634077340783407934080340813408234083340843408534086340873408834089340903409134092340933409434095340963409734098340993410034101341023410334104341053410634107341083410934110341113411234113341143411534116341173411834119341203412134122341233412434125341263412734128341293413034131341323413334134341353413634137341383413934140341413414234143341443414534146341473414834149341503415134152341533415434155341563415734158341593416034161341623416334164341653416634167341683416934170341713417234173341743417534176341773417834179341803418134182341833418434185341863418734188341893419034191341923419334194341953419634197341983419934200342013420234203342043420534206342073420834209342103421134212342133421434215342163421734218342193422034221342223422334224342253422634227342283422934230342313423234233342343423534236342373423834239342403424134242342433424434245342463424734248342493425034251342523425334254342553425634257342583425934260342613426234263342643426534266342673426834269342703427134272342733427434275342763427734278342793428034281342823428334284342853428634287342883428934290342913429234293342943429534296342973429834299343003430134302343033430434305343063430734308343093431034311343123431334314343153431634317343183431934320343213432234323343243432534326343273432834329343303433134332343333433434335343363433734338343393434034341343423434334344343453434634347343483434934350343513435234353343543435534356343573435834359343603436134362343633436434365343663436734368343693437034371343723437334374343753437634377343783437934380343813438234383343843438534386343873438834389343903439134392343933439434395343963439734398343993440034401344023440334404344053440634407344083440934410344113441234413344143441534416344173441834419344203442134422344233442434425344263442734428344293443034431344323443334434344353443634437344383443934440344413444234443344443444534446344473444834449344503445134452344533445434455344563445734458344593446034461344623446334464344653446634467344683446934470344713447234473344743447534476344773447834479344803448134482344833448434485344863448734488344893449034491344923449334494344953449634497344983449934500345013450234503345043450534506345073450834509345103451134512345133451434515345163451734518345193452034521345223452334524345253452634527345283452934530345313453234533345343453534536345373453834539345403454134542345433454434545345463454734548345493455034551345523455334554345553455634557345583455934560345613456234563345643456534566345673456834569345703457134572345733457434575345763457734578345793458034581345823458334584345853458634587345883458934590345913459234593345943459534596345973459834599346003460134602346033460434605346063460734608346093461034611346123461334614346153461634617346183461934620346213462234623346243462534626346273462834629346303463134632346333463434635346363463734638346393464034641346423464334644346453464634647346483464934650346513465234653346543465534656346573465834659346603466134662346633466434665346663466734668346693467034671346723467334674346753467634677346783467934680346813468234683346843468534686346873468834689346903469134692346933469434695346963469734698346993470034701347023470334704347053470634707347083470934710347113471234713347143471534716347173471834719347203472134722347233472434725347263472734728347293473034731347323473334734347353473634737347383473934740347413474234743347443474534746347473474834749347503475134752347533475434755347563475734758347593476034761347623476334764347653476634767347683476934770347713477234773347743477534776347773477834779347803478134782347833478434785347863478734788347893479034791347923479334794347953479634797347983479934800348013480234803348043480534806348073480834809348103481134812348133481434815348163481734818348193482034821348223482334824348253482634827348283482934830348313483234833348343483534836348373483834839348403484134842348433484434845348463484734848348493485034851348523485334854348553485634857348583485934860348613486234863348643486534866348673486834869348703487134872348733487434875348763487734878348793488034881348823488334884348853488634887348883488934890348913489234893348943489534896348973489834899349003490134902349033490434905349063490734908349093491034911349123491334914349153491634917349183491934920349213492234923349243492534926349273492834929349303493134932349333493434935349363493734938349393494034941349423494334944349453494634947349483494934950349513495234953349543495534956349573495834959349603496134962349633496434965349663496734968349693497034971349723497334974349753497634977349783497934980349813498234983349843498534986349873498834989349903499134992349933499434995349963499734998349993500035001350023500335004350053500635007350083500935010350113501235013350143501535016350173501835019350203502135022350233502435025350263502735028350293503035031350323503335034350353503635037350383503935040350413504235043350443504535046350473504835049350503505135052350533505435055350563505735058350593506035061350623506335064350653506635067350683506935070350713507235073350743507535076350773507835079350803508135082350833508435085350863508735088350893509035091350923509335094350953509635097350983509935100351013510235103351043510535106351073510835109351103511135112351133511435115351163511735118351193512035121351223512335124351253512635127351283512935130351313513235133351343513535136351373513835139351403514135142351433514435145351463514735148351493515035151351523515335154351553515635157351583515935160351613516235163351643516535166351673516835169351703517135172351733517435175351763517735178351793518035181351823518335184351853518635187351883518935190351913519235193351943519535196351973519835199352003520135202352033520435205352063520735208352093521035211352123521335214352153521635217352183521935220352213522235223352243522535226352273522835229352303523135232352333523435235352363523735238352393524035241352423524335244352453524635247352483524935250352513525235253352543525535256352573525835259352603526135262352633526435265352663526735268352693527035271352723527335274352753527635277352783527935280352813528235283352843528535286352873528835289352903529135292352933529435295352963529735298352993530035301353023530335304353053530635307353083530935310353113531235313353143531535316353173531835319353203532135322353233532435325353263532735328353293533035331353323533335334353353533635337353383533935340353413534235343353443534535346353473534835349353503535135352353533535435355353563535735358353593536035361353623536335364353653536635367353683536935370353713537235373353743537535376353773537835379353803538135382353833538435385353863538735388353893539035391353923539335394353953539635397353983539935400354013540235403354043540535406354073540835409354103541135412354133541435415354163541735418354193542035421354223542335424354253542635427354283542935430354313543235433354343543535436354373543835439354403544135442354433544435445354463544735448354493545035451354523545335454354553545635457354583545935460354613546235463354643546535466354673546835469354703547135472354733547435475354763547735478354793548035481354823548335484354853548635487354883548935490354913549235493354943549535496354973549835499355003550135502355033550435505355063550735508355093551035511355123551335514355153551635517355183551935520355213552235523355243552535526355273552835529355303553135532355333553435535355363553735538355393554035541355423554335544355453554635547355483554935550355513555235553355543555535556355573555835559355603556135562355633556435565355663556735568355693557035571355723557335574355753557635577355783557935580355813558235583355843558535586355873558835589355903559135592355933559435595355963559735598355993560035601356023560335604356053560635607356083560935610356113561235613356143561535616356173561835619356203562135622356233562435625356263562735628356293563035631356323563335634356353563635637356383563935640356413564235643356443564535646356473564835649356503565135652356533565435655356563565735658356593566035661356623566335664356653566635667356683566935670356713567235673356743567535676356773567835679356803568135682356833568435685356863568735688356893569035691356923569335694356953569635697356983569935700357013570235703357043570535706357073570835709357103571135712357133571435715357163571735718357193572035721357223572335724357253572635727357283572935730357313573235733357343573535736357373573835739357403574135742357433574435745357463574735748357493575035751357523575335754357553575635757357583575935760357613576235763357643576535766357673576835769357703577135772357733577435775357763577735778357793578035781357823578335784357853578635787357883578935790357913579235793357943579535796357973579835799358003580135802358033580435805358063580735808358093581035811358123581335814358153581635817358183581935820358213582235823358243582535826358273582835829358303583135832358333583435835358363583735838358393584035841358423584335844358453584635847358483584935850358513585235853358543585535856358573585835859358603586135862358633586435865358663586735868358693587035871358723587335874358753587635877358783587935880358813588235883358843588535886358873588835889358903589135892358933589435895358963589735898358993590035901359023590335904359053590635907359083590935910359113591235913359143591535916359173591835919359203592135922359233592435925359263592735928359293593035931359323593335934359353593635937359383593935940359413594235943359443594535946359473594835949359503595135952359533595435955359563595735958359593596035961359623596335964359653596635967359683596935970359713597235973359743597535976359773597835979359803598135982359833598435985359863598735988359893599035991359923599335994359953599635997359983599936000360013600236003360043600536006360073600836009360103601136012360133601436015360163601736018360193602036021360223602336024360253602636027360283602936030360313603236033360343603536036360373603836039360403604136042360433604436045360463604736048360493605036051360523605336054360553605636057360583605936060360613606236063360643606536066360673606836069360703607136072360733607436075360763607736078360793608036081360823608336084360853608636087360883608936090360913609236093360943609536096360973609836099361003610136102361033610436105361063610736108361093611036111361123611336114361153611636117361183611936120361213612236123361243612536126361273612836129361303613136132361333613436135361363613736138361393614036141361423614336144361453614636147361483614936150361513615236153361543615536156361573615836159361603616136162361633616436165361663616736168361693617036171361723617336174361753617636177361783617936180361813618236183361843618536186361873618836189361903619136192361933619436195361963619736198361993620036201362023620336204362053620636207362083620936210362113621236213362143621536216362173621836219362203622136222362233622436225362263622736228362293623036231362323623336234362353623636237362383623936240362413624236243362443624536246362473624836249362503625136252362533625436255362563625736258362593626036261362623626336264362653626636267362683626936270362713627236273362743627536276362773627836279362803628136282362833628436285362863628736288362893629036291362923629336294362953629636297362983629936300363013630236303363043630536306363073630836309363103631136312363133631436315363163631736318363193632036321363223632336324363253632636327363283632936330363313633236333363343633536336363373633836339363403634136342363433634436345363463634736348363493635036351363523635336354363553635636357363583635936360363613636236363363643636536366363673636836369363703637136372363733637436375363763637736378363793638036381363823638336384363853638636387363883638936390363913639236393363943639536396363973639836399364003640136402364033640436405364063640736408364093641036411364123641336414364153641636417364183641936420364213642236423364243642536426364273642836429364303643136432364333643436435364363643736438364393644036441364423644336444364453644636447364483644936450364513645236453364543645536456364573645836459364603646136462364633646436465364663646736468364693647036471364723647336474364753647636477364783647936480364813648236483364843648536486364873648836489364903649136492364933649436495364963649736498364993650036501365023650336504365053650636507365083650936510365113651236513365143651536516365173651836519365203652136522365233652436525365263652736528365293653036531365323653336534365353653636537365383653936540365413654236543365443654536546365473654836549365503655136552365533655436555365563655736558365593656036561365623656336564365653656636567365683656936570365713657236573365743657536576365773657836579365803658136582365833658436585365863658736588365893659036591365923659336594365953659636597365983659936600366013660236603366043660536606366073660836609366103661136612366133661436615366163661736618366193662036621366223662336624366253662636627366283662936630366313663236633366343663536636366373663836639366403664136642366433664436645366463664736648366493665036651366523665336654366553665636657366583665936660366613666236663366643666536666366673666836669366703667136672366733667436675366763667736678366793668036681366823668336684366853668636687366883668936690366913669236693366943669536696366973669836699367003670136702367033670436705367063670736708367093671036711367123671336714367153671636717367183671936720367213672236723367243672536726367273672836729367303673136732367333673436735367363673736738367393674036741367423674336744367453674636747367483674936750367513675236753367543675536756367573675836759367603676136762367633676436765367663676736768367693677036771367723677336774367753677636777367783677936780367813678236783367843678536786367873678836789367903679136792367933679436795367963679736798367993680036801368023680336804368053680636807368083680936810368113681236813368143681536816368173681836819368203682136822368233682436825368263682736828368293683036831368323683336834368353683636837368383683936840368413684236843368443684536846368473684836849368503685136852368533685436855368563685736858368593686036861368623686336864368653686636867368683686936870368713687236873368743687536876368773687836879368803688136882368833688436885368863688736888368893689036891368923689336894368953689636897368983689936900369013690236903369043690536906369073690836909369103691136912369133691436915369163691736918369193692036921369223692336924369253692636927369283692936930369313693236933369343693536936369373693836939369403694136942369433694436945369463694736948369493695036951369523695336954369553695636957369583695936960369613696236963369643696536966369673696836969369703697136972369733697436975369763697736978369793698036981369823698336984369853698636987369883698936990369913699236993369943699536996369973699836999370003700137002370033700437005370063700737008370093701037011370123701337014370153701637017370183701937020370213702237023370243702537026370273702837029370303703137032370333703437035370363703737038370393704037041370423704337044370453704637047370483704937050370513705237053370543705537056370573705837059370603706137062370633706437065370663706737068370693707037071370723707337074370753707637077370783707937080370813708237083370843708537086370873708837089370903709137092370933709437095370963709737098370993710037101371023710337104371053710637107371083710937110371113711237113371143711537116371173711837119371203712137122371233712437125371263712737128371293713037131371323713337134371353713637137371383713937140371413714237143371443714537146371473714837149371503715137152371533715437155371563715737158371593716037161371623716337164371653716637167371683716937170371713717237173371743717537176371773717837179371803718137182371833718437185371863718737188371893719037191371923719337194371953719637197371983719937200372013720237203372043720537206372073720837209372103721137212372133721437215372163721737218372193722037221372223722337224372253722637227372283722937230372313723237233372343723537236372373723837239372403724137242372433724437245372463724737248372493725037251372523725337254372553725637257372583725937260372613726237263372643726537266372673726837269372703727137272372733727437275372763727737278372793728037281372823728337284372853728637287372883728937290372913729237293372943729537296372973729837299373003730137302373033730437305373063730737308373093731037311373123731337314373153731637317373183731937320373213732237323373243732537326373273732837329373303733137332373333733437335373363733737338373393734037341373423734337344373453734637347373483734937350373513735237353373543735537356373573735837359373603736137362373633736437365373663736737368373693737037371373723737337374373753737637377373783737937380373813738237383373843738537386373873738837389373903739137392373933739437395373963739737398373993740037401374023740337404374053740637407374083740937410374113741237413374143741537416374173741837419374203742137422374233742437425374263742737428374293743037431374323743337434374353743637437374383743937440374413744237443374443744537446374473744837449374503745137452374533745437455374563745737458374593746037461374623746337464374653746637467374683746937470374713747237473374743747537476374773747837479374803748137482374833748437485374863748737488374893749037491374923749337494374953749637497374983749937500375013750237503375043750537506375073750837509375103751137512375133751437515375163751737518375193752037521375223752337524375253752637527375283752937530375313753237533375343753537536375373753837539375403754137542375433754437545375463754737548375493755037551375523755337554375553755637557375583755937560375613756237563375643756537566375673756837569375703757137572375733757437575375763757737578375793758037581375823758337584375853758637587375883758937590375913759237593375943759537596375973759837599376003760137602376033760437605376063760737608376093761037611376123761337614376153761637617376183761937620376213762237623376243762537626376273762837629376303763137632376333763437635376363763737638376393764037641376423764337644376453764637647376483764937650376513765237653376543765537656376573765837659376603766137662376633766437665376663766737668376693767037671376723767337674376753767637677376783767937680376813768237683376843768537686376873768837689376903769137692376933769437695376963769737698376993770037701377023770337704377053770637707377083770937710377113771237713377143771537716377173771837719377203772137722377233772437725377263772737728377293773037731377323773337734377353773637737377383773937740377413774237743377443774537746377473774837749377503775137752377533775437755377563775737758377593776037761377623776337764377653776637767377683776937770377713777237773377743777537776377773777837779377803778137782377833778437785377863778737788377893779037791377923779337794377953779637797377983779937800378013780237803378043780537806378073780837809378103781137812378133781437815378163781737818378193782037821378223782337824378253782637827378283782937830378313783237833378343783537836378373783837839378403784137842378433784437845378463784737848378493785037851378523785337854378553785637857378583785937860378613786237863378643786537866378673786837869378703787137872378733787437875378763787737878378793788037881378823788337884378853788637887378883788937890378913789237893378943789537896378973789837899379003790137902379033790437905379063790737908379093791037911379123791337914379153791637917379183791937920379213792237923379243792537926379273792837929379303793137932379333793437935379363793737938379393794037941379423794337944379453794637947379483794937950379513795237953379543795537956379573795837959379603796137962379633796437965379663796737968379693797037971379723797337974379753797637977379783797937980379813798237983379843798537986379873798837989379903799137992379933799437995379963799737998379993800038001380023800338004380053800638007380083800938010380113801238013380143801538016380173801838019380203802138022380233802438025380263802738028380293803038031380323803338034380353803638037380383803938040380413804238043380443804538046380473804838049380503805138052380533805438055380563805738058380593806038061380623806338064380653806638067380683806938070380713807238073380743807538076380773807838079380803808138082380833808438085380863808738088380893809038091380923809338094380953809638097380983809938100381013810238103381043810538106381073810838109381103811138112381133811438115381163811738118381193812038121381223812338124381253812638127381283812938130381313813238133381343813538136381373813838139381403814138142381433814438145381463814738148381493815038151381523815338154381553815638157381583815938160381613816238163381643816538166381673816838169381703817138172381733817438175381763817738178381793818038181381823818338184381853818638187381883818938190381913819238193381943819538196381973819838199382003820138202382033820438205382063820738208382093821038211382123821338214382153821638217382183821938220382213822238223382243822538226382273822838229382303823138232382333823438235382363823738238382393824038241382423824338244382453824638247382483824938250382513825238253382543825538256382573825838259382603826138262382633826438265382663826738268382693827038271382723827338274382753827638277382783827938280382813828238283382843828538286382873828838289382903829138292382933829438295382963829738298382993830038301383023830338304383053830638307383083830938310383113831238313383143831538316383173831838319383203832138322383233832438325383263832738328383293833038331383323833338334383353833638337383383833938340383413834238343383443834538346383473834838349383503835138352383533835438355383563835738358383593836038361383623836338364383653836638367383683836938370383713837238373383743837538376383773837838379383803838138382383833838438385383863838738388383893839038391383923839338394383953839638397383983839938400384013840238403384043840538406384073840838409384103841138412384133841438415384163841738418384193842038421384223842338424384253842638427384283842938430384313843238433384343843538436384373843838439384403844138442384433844438445384463844738448384493845038451384523845338454384553845638457384583845938460384613846238463384643846538466384673846838469384703847138472384733847438475384763847738478384793848038481384823848338484384853848638487384883848938490384913849238493384943849538496384973849838499385003850138502385033850438505385063850738508385093851038511385123851338514385153851638517385183851938520385213852238523385243852538526385273852838529385303853138532385333853438535385363853738538385393854038541385423854338544385453854638547385483854938550385513855238553385543855538556385573855838559385603856138562385633856438565385663856738568385693857038571385723857338574385753857638577385783857938580385813858238583385843858538586385873858838589385903859138592385933859438595385963859738598385993860038601386023860338604386053860638607386083860938610386113861238613386143861538616386173861838619386203862138622386233862438625386263862738628386293863038631386323863338634386353863638637386383863938640386413864238643386443864538646386473864838649386503865138652386533865438655386563865738658386593866038661386623866338664386653866638667386683866938670386713867238673386743867538676386773867838679386803868138682386833868438685386863868738688386893869038691386923869338694386953869638697386983869938700387013870238703387043870538706387073870838709387103871138712387133871438715387163871738718387193872038721387223872338724387253872638727387283872938730387313873238733387343873538736387373873838739387403874138742387433874438745387463874738748387493875038751387523875338754387553875638757387583875938760387613876238763387643876538766387673876838769387703877138772387733877438775387763877738778387793878038781387823878338784387853878638787387883878938790387913879238793387943879538796387973879838799388003880138802388033880438805388063880738808388093881038811388123881338814388153881638817388183881938820388213882238823388243882538826388273882838829388303883138832388333883438835388363883738838388393884038841388423884338844388453884638847388483884938850388513885238853388543885538856388573885838859388603886138862388633886438865388663886738868388693887038871388723887338874388753887638877388783887938880388813888238883388843888538886388873888838889388903889138892388933889438895388963889738898388993890038901389023890338904389053890638907389083890938910389113891238913389143891538916389173891838919389203892138922389233892438925389263892738928389293893038931389323893338934389353893638937389383893938940389413894238943389443894538946389473894838949389503895138952389533895438955389563895738958389593896038961389623896338964389653896638967389683896938970389713897238973389743897538976389773897838979389803898138982389833898438985389863898738988389893899038991389923899338994389953899638997389983899939000390013900239003390043900539006390073900839009390103901139012390133901439015390163901739018390193902039021390223902339024390253902639027390283902939030390313903239033390343903539036390373903839039390403904139042390433904439045390463904739048390493905039051390523905339054390553905639057390583905939060390613906239063390643906539066390673906839069390703907139072390733907439075390763907739078390793908039081390823908339084390853908639087390883908939090390913909239093390943909539096390973909839099391003910139102391033910439105391063910739108391093911039111391123911339114391153911639117391183911939120391213912239123391243912539126391273912839129391303913139132391333913439135391363913739138391393914039141391423914339144391453914639147391483914939150391513915239153391543915539156391573915839159391603916139162391633916439165391663916739168391693917039171391723917339174391753917639177391783917939180391813918239183391843918539186391873918839189391903919139192391933919439195391963919739198391993920039201392023920339204392053920639207392083920939210392113921239213392143921539216392173921839219392203922139222392233922439225392263922739228392293923039231392323923339234392353923639237392383923939240392413924239243392443924539246392473924839249392503925139252392533925439255392563925739258392593926039261392623926339264392653926639267392683926939270392713927239273392743927539276392773927839279392803928139282392833928439285392863928739288392893929039291392923929339294392953929639297392983929939300393013930239303393043930539306393073930839309393103931139312393133931439315393163931739318393193932039321393223932339324393253932639327393283932939330393313933239333393343933539336393373933839339393403934139342393433934439345393463934739348393493935039351393523935339354393553935639357393583935939360393613936239363393643936539366393673936839369393703937139372393733937439375393763937739378
  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/Prompt"
  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. "ConflictError": {
  23537. "type": "object",
  23538. "properties": {
  23539. "_tag": {
  23540. "type": "string",
  23541. "enum": ["ConflictError"]
  23542. },
  23543. "message": {
  23544. "type": "string"
  23545. },
  23546. "resource": {
  23547. "type": "string"
  23548. }
  23549. },
  23550. "required": ["_tag", "message"],
  23551. "additionalProperties": false
  23552. },
  23553. "ServiceUnavailableError": {
  23554. "type": "object",
  23555. "properties": {
  23556. "_tag": {
  23557. "type": "string",
  23558. "enum": ["ServiceUnavailableError"]
  23559. },
  23560. "message": {
  23561. "type": "string"
  23562. },
  23563. "service": {
  23564. "type": "string"
  23565. }
  23566. },
  23567. "required": ["_tag", "message"],
  23568. "additionalProperties": false
  23569. },
  23570. "MessageNotFoundError": {
  23571. "type": "object",
  23572. "properties": {
  23573. "_tag": {
  23574. "type": "string",
  23575. "enum": ["MessageNotFoundError"]
  23576. },
  23577. "sessionID": {
  23578. "type": "string"
  23579. },
  23580. "messageID": {
  23581. "type": "string"
  23582. },
  23583. "message": {
  23584. "type": "string"
  23585. }
  23586. },
  23587. "required": ["_tag", "sessionID", "messageID", "message"],
  23588. "additionalProperties": false
  23589. },
  23590. "UnknownError1": {
  23591. "type": "object",
  23592. "properties": {
  23593. "_tag": {
  23594. "type": "string",
  23595. "enum": ["UnknownError"]
  23596. },
  23597. "message": {
  23598. "type": "string"
  23599. },
  23600. "ref": {
  23601. "type": "string"
  23602. }
  23603. },
  23604. "required": ["_tag", "message"],
  23605. "additionalProperties": false
  23606. },
  23607. "SessionMessagesResponse": {
  23608. "type": "object",
  23609. "properties": {
  23610. "data": {
  23611. "type": "array",
  23612. "items": {
  23613. "$ref": "#/components/schemas/SessionMessage"
  23614. }
  23615. },
  23616. "cursor": {
  23617. "type": "object",
  23618. "properties": {
  23619. "previous": {
  23620. "type": "string"
  23621. },
  23622. "next": {
  23623. "type": "string"
  23624. }
  23625. },
  23626. "additionalProperties": false
  23627. }
  23628. },
  23629. "required": ["data", "cursor"],
  23630. "additionalProperties": false
  23631. },
  23632. "ProviderNotFoundError": {
  23633. "type": "object",
  23634. "properties": {
  23635. "_tag": {
  23636. "type": "string",
  23637. "enum": ["ProviderNotFoundError"]
  23638. },
  23639. "providerID": {
  23640. "type": "string"
  23641. },
  23642. "message": {
  23643. "type": "string"
  23644. }
  23645. },
  23646. "required": ["_tag", "providerID", "message"],
  23647. "additionalProperties": false
  23648. },
  23649. "V2Event": {
  23650. "anyOf": [
  23651. {
  23652. "$ref": "#/components/schemas/V2EventModels-devRefreshed"
  23653. },
  23654. {
  23655. "$ref": "#/components/schemas/V2EventIntegrationUpdated"
  23656. },
  23657. {
  23658. "$ref": "#/components/schemas/V2EventIntegrationConnectionUpdated"
  23659. },
  23660. {
  23661. "$ref": "#/components/schemas/V2EventCatalogUpdated"
  23662. },
  23663. {
  23664. "$ref": "#/components/schemas/V2EventSessionCreated"
  23665. },
  23666. {
  23667. "$ref": "#/components/schemas/V2EventSessionUpdated"
  23668. },
  23669. {
  23670. "$ref": "#/components/schemas/V2EventSessionDeleted"
  23671. },
  23672. {
  23673. "$ref": "#/components/schemas/V2EventMessageUpdated"
  23674. },
  23675. {
  23676. "$ref": "#/components/schemas/V2EventMessageRemoved"
  23677. },
  23678. {
  23679. "$ref": "#/components/schemas/V2EventMessagePartUpdated"
  23680. },
  23681. {
  23682. "$ref": "#/components/schemas/V2EventMessagePartRemoved"
  23683. },
  23684. {
  23685. "$ref": "#/components/schemas/V2EventSessionNextAgentSwitched"
  23686. },
  23687. {
  23688. "$ref": "#/components/schemas/V2EventSessionNextModelSwitched"
  23689. },
  23690. {
  23691. "$ref": "#/components/schemas/V2EventSessionNextMoved"
  23692. },
  23693. {
  23694. "$ref": "#/components/schemas/V2EventSessionNextPrompted"
  23695. },
  23696. {
  23697. "$ref": "#/components/schemas/V2EventSessionNextPromptAdmitted"
  23698. },
  23699. {
  23700. "$ref": "#/components/schemas/V2EventSessionNextContextUpdated"
  23701. },
  23702. {
  23703. "$ref": "#/components/schemas/V2EventSessionNextSynthetic"
  23704. },
  23705. {
  23706. "$ref": "#/components/schemas/V2EventSessionNextShellStarted"
  23707. },
  23708. {
  23709. "$ref": "#/components/schemas/V2EventSessionNextShellEnded"
  23710. },
  23711. {
  23712. "$ref": "#/components/schemas/V2EventSessionNextStepStarted"
  23713. },
  23714. {
  23715. "$ref": "#/components/schemas/V2EventSessionNextStepEnded"
  23716. },
  23717. {
  23718. "$ref": "#/components/schemas/V2EventSessionNextStepFailed"
  23719. },
  23720. {
  23721. "$ref": "#/components/schemas/V2EventSessionNextTextStarted"
  23722. },
  23723. {
  23724. "$ref": "#/components/schemas/V2EventSessionNextTextDelta"
  23725. },
  23726. {
  23727. "$ref": "#/components/schemas/V2EventSessionNextTextEnded"
  23728. },
  23729. {
  23730. "$ref": "#/components/schemas/V2EventSessionNextReasoningStarted"
  23731. },
  23732. {
  23733. "$ref": "#/components/schemas/V2EventSessionNextReasoningDelta"
  23734. },
  23735. {
  23736. "$ref": "#/components/schemas/V2EventSessionNextReasoningEnded"
  23737. },
  23738. {
  23739. "$ref": "#/components/schemas/V2EventSessionNextToolInputStarted"
  23740. },
  23741. {
  23742. "$ref": "#/components/schemas/V2EventSessionNextToolInputDelta"
  23743. },
  23744. {
  23745. "$ref": "#/components/schemas/V2EventSessionNextToolInputEnded"
  23746. },
  23747. {
  23748. "$ref": "#/components/schemas/V2EventSessionNextToolCalled"
  23749. },
  23750. {
  23751. "$ref": "#/components/schemas/V2EventSessionNextToolProgress"
  23752. },
  23753. {
  23754. "$ref": "#/components/schemas/V2EventSessionNextToolSuccess"
  23755. },
  23756. {
  23757. "$ref": "#/components/schemas/V2EventSessionNextToolFailed"
  23758. },
  23759. {
  23760. "$ref": "#/components/schemas/V2EventSessionNextRetried"
  23761. },
  23762. {
  23763. "$ref": "#/components/schemas/V2EventSessionNextCompactionStarted"
  23764. },
  23765. {
  23766. "$ref": "#/components/schemas/V2EventSessionNextCompactionDelta"
  23767. },
  23768. {
  23769. "$ref": "#/components/schemas/V2EventSessionNextCompactionEnded"
  23770. },
  23771. {
  23772. "$ref": "#/components/schemas/V2EventSessionNextRevertStaged"
  23773. },
  23774. {
  23775. "$ref": "#/components/schemas/V2EventSessionNextRevertCleared"
  23776. },
  23777. {
  23778. "$ref": "#/components/schemas/V2EventSessionNextRevertCommitted"
  23779. },
  23780. {
  23781. "$ref": "#/components/schemas/V2EventMessagePartDelta"
  23782. },
  23783. {
  23784. "$ref": "#/components/schemas/V2EventSessionDiff"
  23785. },
  23786. {
  23787. "$ref": "#/components/schemas/V2EventSessionError"
  23788. },
  23789. {
  23790. "$ref": "#/components/schemas/V2EventInstallationUpdated"
  23791. },
  23792. {
  23793. "$ref": "#/components/schemas/V2EventInstallationUpdate-available"
  23794. },
  23795. {
  23796. "$ref": "#/components/schemas/V2EventFileEdited"
  23797. },
  23798. {
  23799. "$ref": "#/components/schemas/V2EventReferenceUpdated"
  23800. },
  23801. {
  23802. "$ref": "#/components/schemas/V2EventPermissionV2Asked"
  23803. },
  23804. {
  23805. "$ref": "#/components/schemas/V2EventPermissionV2Replied"
  23806. },
  23807. {
  23808. "$ref": "#/components/schemas/V2EventPluginAdded"
  23809. },
  23810. {
  23811. "$ref": "#/components/schemas/V2EventProjectDirectoriesUpdated"
  23812. },
  23813. {
  23814. "$ref": "#/components/schemas/V2EventFileWatcherUpdated"
  23815. },
  23816. {
  23817. "$ref": "#/components/schemas/V2EventPtyCreated"
  23818. },
  23819. {
  23820. "$ref": "#/components/schemas/V2EventPtyUpdated"
  23821. },
  23822. {
  23823. "$ref": "#/components/schemas/V2EventPtyExited"
  23824. },
  23825. {
  23826. "$ref": "#/components/schemas/V2EventPtyDeleted"
  23827. },
  23828. {
  23829. "$ref": "#/components/schemas/V2EventQuestionV2Asked"
  23830. },
  23831. {
  23832. "$ref": "#/components/schemas/V2EventQuestionV2Replied"
  23833. },
  23834. {
  23835. "$ref": "#/components/schemas/V2EventQuestionV2Rejected"
  23836. },
  23837. {
  23838. "$ref": "#/components/schemas/V2EventTodoUpdated"
  23839. },
  23840. {
  23841. "$ref": "#/components/schemas/V2EventLspUpdated"
  23842. },
  23843. {
  23844. "$ref": "#/components/schemas/V2EventPermissionAsked"
  23845. },
  23846. {
  23847. "$ref": "#/components/schemas/V2EventPermissionReplied"
  23848. },
  23849. {
  23850. "$ref": "#/components/schemas/V2EventTuiPromptAppend"
  23851. },
  23852. {
  23853. "$ref": "#/components/schemas/V2EventTuiCommandExecute"
  23854. },
  23855. {
  23856. "$ref": "#/components/schemas/V2EventTuiToastShow"
  23857. },
  23858. {
  23859. "$ref": "#/components/schemas/V2EventTuiSessionSelect"
  23860. },
  23861. {
  23862. "$ref": "#/components/schemas/V2EventMcpToolsChanged"
  23863. },
  23864. {
  23865. "$ref": "#/components/schemas/V2EventMcpBrowserOpenFailed"
  23866. },
  23867. {
  23868. "$ref": "#/components/schemas/V2EventCommandExecuted"
  23869. },
  23870. {
  23871. "$ref": "#/components/schemas/V2EventProjectUpdated"
  23872. },
  23873. {
  23874. "$ref": "#/components/schemas/V2EventSessionStatus"
  23875. },
  23876. {
  23877. "$ref": "#/components/schemas/V2EventSessionIdle"
  23878. },
  23879. {
  23880. "$ref": "#/components/schemas/V2EventQuestionAsked"
  23881. },
  23882. {
  23883. "$ref": "#/components/schemas/V2EventQuestionReplied"
  23884. },
  23885. {
  23886. "$ref": "#/components/schemas/V2EventQuestionRejected"
  23887. },
  23888. {
  23889. "$ref": "#/components/schemas/V2EventSessionCompacted"
  23890. },
  23891. {
  23892. "$ref": "#/components/schemas/V2EventVcsBranchUpdated"
  23893. },
  23894. {
  23895. "$ref": "#/components/schemas/V2EventWorkspaceReady"
  23896. },
  23897. {
  23898. "$ref": "#/components/schemas/V2EventWorkspaceFailed"
  23899. },
  23900. {
  23901. "$ref": "#/components/schemas/V2EventWorkspaceStatus"
  23902. },
  23903. {
  23904. "$ref": "#/components/schemas/V2EventWorktreeReady"
  23905. },
  23906. {
  23907. "$ref": "#/components/schemas/V2EventWorktreeFailed"
  23908. },
  23909. {
  23910. "$ref": "#/components/schemas/V2EventServerConnected"
  23911. },
  23912. {
  23913. "$ref": "#/components/schemas/V2EventGlobalDisposed"
  23914. }
  23915. ]
  23916. },
  23917. "ForbiddenError": {
  23918. "type": "object",
  23919. "properties": {
  23920. "_tag": {
  23921. "type": "string",
  23922. "enum": ["ForbiddenError"]
  23923. },
  23924. "message": {
  23925. "type": "string"
  23926. }
  23927. },
  23928. "required": ["_tag", "message"],
  23929. "additionalProperties": false
  23930. },
  23931. "ProjectCopyError": {
  23932. "type": "object",
  23933. "properties": {
  23934. "name": {
  23935. "type": "string",
  23936. "enum": ["ProjectCopyError"]
  23937. },
  23938. "data": {
  23939. "type": "object",
  23940. "properties": {
  23941. "message": {
  23942. "type": "string"
  23943. },
  23944. "forceRequired": {
  23945. "type": "boolean"
  23946. }
  23947. },
  23948. "required": ["message"],
  23949. "additionalProperties": false
  23950. }
  23951. },
  23952. "required": ["name", "data"],
  23953. "additionalProperties": false
  23954. },
  23955. "effect_HttpApiError_Forbidden": {
  23956. "type": "object",
  23957. "properties": {
  23958. "_tag": {
  23959. "type": "string",
  23960. "enum": ["Forbidden"]
  23961. }
  23962. },
  23963. "required": ["_tag"],
  23964. "additionalProperties": false
  23965. },
  23966. "Event.tui.prompt.append": {
  23967. "type": "object",
  23968. "properties": {
  23969. "id": {
  23970. "type": "string",
  23971. "pattern": "^evt_"
  23972. },
  23973. "type": {
  23974. "type": "string",
  23975. "enum": ["tui.prompt.append"]
  23976. },
  23977. "properties": {
  23978. "type": "object",
  23979. "properties": {
  23980. "text": {
  23981. "type": "string"
  23982. }
  23983. },
  23984. "required": ["text"],
  23985. "additionalProperties": false
  23986. }
  23987. },
  23988. "required": ["id", "type", "properties"],
  23989. "additionalProperties": false
  23990. },
  23991. "Event.tui.command.execute": {
  23992. "type": "object",
  23993. "properties": {
  23994. "id": {
  23995. "type": "string",
  23996. "pattern": "^evt_"
  23997. },
  23998. "type": {
  23999. "type": "string",
  24000. "enum": ["tui.command.execute"]
  24001. },
  24002. "properties": {
  24003. "type": "object",
  24004. "properties": {
  24005. "command": {
  24006. "anyOf": [
  24007. {
  24008. "type": "string",
  24009. "enum": [
  24010. "session.list",
  24011. "session.new",
  24012. "session.share",
  24013. "session.interrupt",
  24014. "session.compact",
  24015. "session.page.up",
  24016. "session.page.down",
  24017. "session.line.up",
  24018. "session.line.down",
  24019. "session.half.page.up",
  24020. "session.half.page.down",
  24021. "session.first",
  24022. "session.last",
  24023. "prompt.clear",
  24024. "prompt.submit",
  24025. "agent.cycle"
  24026. ]
  24027. },
  24028. {
  24029. "type": "string"
  24030. }
  24031. ]
  24032. }
  24033. },
  24034. "required": ["command"],
  24035. "additionalProperties": false
  24036. }
  24037. },
  24038. "required": ["id", "type", "properties"],
  24039. "additionalProperties": false
  24040. },
  24041. "Event.tui.toast.show": {
  24042. "type": "object",
  24043. "properties": {
  24044. "id": {
  24045. "type": "string",
  24046. "pattern": "^evt_"
  24047. },
  24048. "type": {
  24049. "type": "string",
  24050. "enum": ["tui.toast.show"]
  24051. },
  24052. "properties": {
  24053. "type": "object",
  24054. "properties": {
  24055. "title": {
  24056. "type": "string"
  24057. },
  24058. "message": {
  24059. "type": "string"
  24060. },
  24061. "variant": {
  24062. "type": "string",
  24063. "enum": ["info", "success", "warning", "error"]
  24064. },
  24065. "duration": {
  24066. "type": "integer",
  24067. "exclusiveMinimum": 0
  24068. }
  24069. },
  24070. "required": ["message", "variant"],
  24071. "additionalProperties": false
  24072. }
  24073. },
  24074. "required": ["id", "type", "properties"],
  24075. "additionalProperties": false
  24076. },
  24077. "Event.tui.session.select": {
  24078. "type": "object",
  24079. "properties": {
  24080. "id": {
  24081. "type": "string",
  24082. "pattern": "^evt_"
  24083. },
  24084. "type": {
  24085. "type": "string",
  24086. "enum": ["tui.session.select"]
  24087. },
  24088. "properties": {
  24089. "type": "object",
  24090. "properties": {
  24091. "sessionID": {
  24092. "type": "string",
  24093. "pattern": "^ses",
  24094. "description": "Session ID to navigate to"
  24095. }
  24096. },
  24097. "required": ["sessionID"],
  24098. "additionalProperties": false
  24099. }
  24100. },
  24101. "required": ["id", "type", "properties"],
  24102. "additionalProperties": false
  24103. },
  24104. "CredentialValue": {
  24105. "anyOf": [
  24106. {
  24107. "$ref": "#/components/schemas/CredentialOAuth"
  24108. },
  24109. {
  24110. "$ref": "#/components/schemas/CredentialKey"
  24111. }
  24112. ]
  24113. },
  24114. "IntegrationInputs": {
  24115. "type": "object",
  24116. "additionalProperties": {
  24117. "type": "string"
  24118. }
  24119. },
  24120. "IntegrationMethod": {
  24121. "anyOf": [
  24122. {
  24123. "$ref": "#/components/schemas/IntegrationOAuthMethod"
  24124. },
  24125. {
  24126. "$ref": "#/components/schemas/IntegrationKeyMethod"
  24127. },
  24128. {
  24129. "$ref": "#/components/schemas/IntegrationEnvMethod"
  24130. }
  24131. ]
  24132. },
  24133. "IntegrationRef": {
  24134. "type": "object",
  24135. "properties": {
  24136. "id": {
  24137. "type": "string"
  24138. },
  24139. "name": {
  24140. "type": "string"
  24141. }
  24142. },
  24143. "required": ["id", "name"],
  24144. "additionalProperties": false
  24145. },
  24146. "SkillV2Source": {
  24147. "anyOf": [
  24148. {
  24149. "$ref": "#/components/schemas/SkillV2DirectorySource"
  24150. },
  24151. {
  24152. "$ref": "#/components/schemas/SkillV2UrlSource"
  24153. },
  24154. {
  24155. "$ref": "#/components/schemas/SkillV2EmbeddedSource"
  24156. }
  24157. ]
  24158. },
  24159. "MoveSessionDestination": {
  24160. "type": "object",
  24161. "properties": {
  24162. "directory": {
  24163. "type": "string"
  24164. }
  24165. },
  24166. "required": ["directory"],
  24167. "additionalProperties": false
  24168. },
  24169. "ModelRef": {
  24170. "type": "object",
  24171. "properties": {
  24172. "id": {
  24173. "type": "string"
  24174. },
  24175. "providerID": {
  24176. "type": "string"
  24177. },
  24178. "variant": {
  24179. "type": "string"
  24180. }
  24181. },
  24182. "required": ["id", "providerID"],
  24183. "additionalProperties": false
  24184. },
  24185. "LocationRef": {
  24186. "type": "object",
  24187. "properties": {
  24188. "directory": {
  24189. "type": "string"
  24190. },
  24191. "workspaceID": {
  24192. "type": "string",
  24193. "pattern": "^wrk"
  24194. }
  24195. },
  24196. "required": ["directory"],
  24197. "additionalProperties": false
  24198. },
  24199. "PromptSource": {
  24200. "type": "object",
  24201. "properties": {
  24202. "start": {
  24203. "type": "number"
  24204. },
  24205. "end": {
  24206. "type": "number"
  24207. },
  24208. "text": {
  24209. "type": "string"
  24210. }
  24211. },
  24212. "required": ["start", "end", "text"],
  24213. "additionalProperties": false
  24214. },
  24215. "PromptFileAttachment": {
  24216. "type": "object",
  24217. "properties": {
  24218. "uri": {
  24219. "type": "string"
  24220. },
  24221. "mime": {
  24222. "type": "string"
  24223. },
  24224. "name": {
  24225. "type": "string"
  24226. },
  24227. "description": {
  24228. "type": "string"
  24229. },
  24230. "source": {
  24231. "$ref": "#/components/schemas/PromptSource"
  24232. }
  24233. },
  24234. "required": ["uri", "mime"],
  24235. "additionalProperties": false
  24236. },
  24237. "PromptAgentAttachment": {
  24238. "type": "object",
  24239. "properties": {
  24240. "name": {
  24241. "type": "string"
  24242. },
  24243. "source": {
  24244. "$ref": "#/components/schemas/PromptSource"
  24245. }
  24246. },
  24247. "required": ["name"],
  24248. "additionalProperties": false
  24249. },
  24250. "SessionErrorUnknown": {
  24251. "type": "object",
  24252. "properties": {
  24253. "type": {
  24254. "type": "string",
  24255. "enum": ["unknown"]
  24256. },
  24257. "message": {
  24258. "type": "string"
  24259. }
  24260. },
  24261. "required": ["type", "message"],
  24262. "additionalProperties": false
  24263. },
  24264. "LLMProviderMetadata": {
  24265. "type": "object",
  24266. "additionalProperties": {
  24267. "type": "object"
  24268. }
  24269. },
  24270. "ToolTextContent": {
  24271. "type": "object",
  24272. "properties": {
  24273. "type": {
  24274. "type": "string",
  24275. "enum": ["text"]
  24276. },
  24277. "text": {
  24278. "type": "string"
  24279. }
  24280. },
  24281. "required": ["type", "text"],
  24282. "additionalProperties": false
  24283. },
  24284. "ToolFileContent": {
  24285. "type": "object",
  24286. "properties": {
  24287. "type": {
  24288. "type": "string",
  24289. "enum": ["file"]
  24290. },
  24291. "uri": {
  24292. "type": "string"
  24293. },
  24294. "mime": {
  24295. "type": "string"
  24296. },
  24297. "name": {
  24298. "type": "string"
  24299. }
  24300. },
  24301. "required": ["type", "uri", "mime"],
  24302. "additionalProperties": false
  24303. },
  24304. "LLMToolContent": {
  24305. "anyOf": [
  24306. {
  24307. "$ref": "#/components/schemas/ToolTextContent"
  24308. },
  24309. {
  24310. "$ref": "#/components/schemas/ToolFileContent"
  24311. }
  24312. ]
  24313. },
  24314. "SessionNextRetry_error": {
  24315. "type": "object",
  24316. "properties": {
  24317. "message": {
  24318. "type": "string"
  24319. },
  24320. "statusCode": {
  24321. "type": "number"
  24322. },
  24323. "isRetryable": {
  24324. "type": "boolean"
  24325. },
  24326. "responseHeaders": {
  24327. "type": "object",
  24328. "additionalProperties": {
  24329. "type": "string"
  24330. }
  24331. },
  24332. "responseBody": {
  24333. "type": "string"
  24334. },
  24335. "metadata": {
  24336. "type": "object",
  24337. "additionalProperties": {
  24338. "type": "string"
  24339. }
  24340. }
  24341. },
  24342. "required": ["message", "isRetryable"],
  24343. "additionalProperties": false
  24344. },
  24345. "FileDiff": {
  24346. "type": "object",
  24347. "properties": {
  24348. "path": {
  24349. "type": "string"
  24350. },
  24351. "status": {
  24352. "type": "string",
  24353. "enum": ["added", "modified", "deleted"]
  24354. },
  24355. "additions": {
  24356. "type": "integer",
  24357. "minimum": 0
  24358. },
  24359. "deletions": {
  24360. "type": "integer",
  24361. "minimum": 0
  24362. },
  24363. "patch": {
  24364. "type": "string"
  24365. }
  24366. },
  24367. "required": ["path", "status", "additions", "deletions", "patch"],
  24368. "additionalProperties": false
  24369. },
  24370. "RevertState": {
  24371. "type": "object",
  24372. "properties": {
  24373. "messageID": {
  24374. "type": "string",
  24375. "pattern": "^msg_"
  24376. },
  24377. "partID": {
  24378. "type": "string"
  24379. },
  24380. "snapshot": {
  24381. "type": "string"
  24382. },
  24383. "diff": {
  24384. "type": "string"
  24385. },
  24386. "files": {
  24387. "type": "array",
  24388. "items": {
  24389. "$ref": "#/components/schemas/FileDiff"
  24390. }
  24391. }
  24392. },
  24393. "required": ["messageID"],
  24394. "additionalProperties": false
  24395. },
  24396. "PermissionV2Source": {
  24397. "type": "object",
  24398. "properties": {
  24399. "type": {
  24400. "type": "string",
  24401. "enum": ["tool"]
  24402. },
  24403. "messageID": {
  24404. "type": "string"
  24405. },
  24406. "callID": {
  24407. "type": "string"
  24408. }
  24409. },
  24410. "required": ["type", "messageID", "callID"],
  24411. "additionalProperties": false
  24412. },
  24413. "PermissionV2Reply": {
  24414. "type": "string",
  24415. "enum": ["once", "always", "reject"]
  24416. },
  24417. "QuestionV2Option": {
  24418. "type": "object",
  24419. "properties": {
  24420. "label": {
  24421. "type": "string",
  24422. "description": "Display text (1-5 words, concise)"
  24423. },
  24424. "description": {
  24425. "type": "string",
  24426. "description": "Explanation of choice"
  24427. }
  24428. },
  24429. "required": ["label", "description"],
  24430. "additionalProperties": false
  24431. },
  24432. "QuestionV2Info": {
  24433. "type": "object",
  24434. "properties": {
  24435. "question": {
  24436. "type": "string",
  24437. "description": "Complete question"
  24438. },
  24439. "header": {
  24440. "type": "string",
  24441. "description": "Very short label (max 30 chars)"
  24442. },
  24443. "options": {
  24444. "type": "array",
  24445. "items": {
  24446. "$ref": "#/components/schemas/QuestionV2Option"
  24447. },
  24448. "description": "Available choices"
  24449. },
  24450. "multiple": {
  24451. "type": "boolean"
  24452. },
  24453. "custom": {
  24454. "type": "boolean"
  24455. }
  24456. },
  24457. "required": ["question", "header", "options"],
  24458. "additionalProperties": false
  24459. },
  24460. "QuestionV2Tool": {
  24461. "type": "object",
  24462. "properties": {
  24463. "messageID": {
  24464. "type": "string"
  24465. },
  24466. "callID": {
  24467. "type": "string"
  24468. }
  24469. },
  24470. "required": ["messageID", "callID"],
  24471. "additionalProperties": false
  24472. },
  24473. "QuestionV2Answer": {
  24474. "type": "array",
  24475. "items": {
  24476. "type": "string"
  24477. }
  24478. },
  24479. "ProjectVcs": {
  24480. "type": "string",
  24481. "enum": ["git"]
  24482. },
  24483. "ProjectIcon": {
  24484. "type": "object",
  24485. "properties": {
  24486. "url": {
  24487. "type": "string"
  24488. },
  24489. "override": {
  24490. "type": "string"
  24491. },
  24492. "color": {
  24493. "type": "string"
  24494. }
  24495. },
  24496. "additionalProperties": false
  24497. },
  24498. "ProjectCommands": {
  24499. "type": "object",
  24500. "properties": {
  24501. "start": {
  24502. "type": "string",
  24503. "description": "Startup script to run when creating a new workspace (worktree)"
  24504. }
  24505. },
  24506. "additionalProperties": false
  24507. },
  24508. "ProjectTime": {
  24509. "type": "object",
  24510. "properties": {
  24511. "created": {
  24512. "type": "integer",
  24513. "minimum": 0
  24514. },
  24515. "updated": {
  24516. "type": "integer",
  24517. "minimum": 0
  24518. },
  24519. "initialized": {
  24520. "type": "integer",
  24521. "minimum": 0
  24522. }
  24523. },
  24524. "required": ["created", "updated"],
  24525. "additionalProperties": false
  24526. },
  24527. "EventServerInstanceDisposed": {
  24528. "type": "object",
  24529. "properties": {
  24530. "id": {
  24531. "type": "string"
  24532. },
  24533. "type": {
  24534. "type": "string",
  24535. "enum": ["server.instance.disposed"]
  24536. },
  24537. "properties": {
  24538. "type": "object",
  24539. "properties": {
  24540. "directory": {
  24541. "type": "string"
  24542. }
  24543. },
  24544. "required": ["directory"],
  24545. "additionalProperties": false
  24546. }
  24547. },
  24548. "required": ["id", "type", "properties"],
  24549. "additionalProperties": false
  24550. },
  24551. "SyncEventSessionCreated": {
  24552. "type": "object",
  24553. "properties": {
  24554. "type": {
  24555. "type": "string",
  24556. "enum": ["sync"]
  24557. },
  24558. "id": {
  24559. "type": "string",
  24560. "pattern": "^evt_"
  24561. },
  24562. "syncEvent": {
  24563. "type": "object",
  24564. "properties": {
  24565. "type": {
  24566. "type": "string",
  24567. "enum": ["session.created.1"]
  24568. },
  24569. "id": {
  24570. "type": "string",
  24571. "pattern": "^evt_"
  24572. },
  24573. "seq": {
  24574. "type": "number"
  24575. },
  24576. "aggregateID": {
  24577. "type": "string"
  24578. },
  24579. "data": {
  24580. "type": "object",
  24581. "properties": {
  24582. "sessionID": {
  24583. "type": "string",
  24584. "pattern": "^ses"
  24585. },
  24586. "info": {
  24587. "$ref": "#/components/schemas/Session"
  24588. }
  24589. },
  24590. "required": ["sessionID", "info"],
  24591. "additionalProperties": false
  24592. }
  24593. },
  24594. "required": ["type", "id", "seq", "aggregateID", "data"],
  24595. "additionalProperties": false
  24596. }
  24597. },
  24598. "required": ["type", "id", "syncEvent"],
  24599. "additionalProperties": false
  24600. },
  24601. "SyncEventSessionUpdated": {
  24602. "type": "object",
  24603. "properties": {
  24604. "type": {
  24605. "type": "string",
  24606. "enum": ["sync"]
  24607. },
  24608. "id": {
  24609. "type": "string",
  24610. "pattern": "^evt_"
  24611. },
  24612. "syncEvent": {
  24613. "type": "object",
  24614. "properties": {
  24615. "type": {
  24616. "type": "string",
  24617. "enum": ["session.updated.1"]
  24618. },
  24619. "id": {
  24620. "type": "string",
  24621. "pattern": "^evt_"
  24622. },
  24623. "seq": {
  24624. "type": "number"
  24625. },
  24626. "aggregateID": {
  24627. "type": "string"
  24628. },
  24629. "data": {
  24630. "type": "object",
  24631. "properties": {
  24632. "sessionID": {
  24633. "type": "string",
  24634. "pattern": "^ses"
  24635. },
  24636. "info": {
  24637. "$ref": "#/components/schemas/Session"
  24638. }
  24639. },
  24640. "required": ["sessionID", "info"],
  24641. "additionalProperties": false
  24642. }
  24643. },
  24644. "required": ["type", "id", "seq", "aggregateID", "data"],
  24645. "additionalProperties": false
  24646. }
  24647. },
  24648. "required": ["type", "id", "syncEvent"],
  24649. "additionalProperties": false
  24650. },
  24651. "SyncEventSessionDeleted": {
  24652. "type": "object",
  24653. "properties": {
  24654. "type": {
  24655. "type": "string",
  24656. "enum": ["sync"]
  24657. },
  24658. "id": {
  24659. "type": "string",
  24660. "pattern": "^evt_"
  24661. },
  24662. "syncEvent": {
  24663. "type": "object",
  24664. "properties": {
  24665. "type": {
  24666. "type": "string",
  24667. "enum": ["session.deleted.1"]
  24668. },
  24669. "id": {
  24670. "type": "string",
  24671. "pattern": "^evt_"
  24672. },
  24673. "seq": {
  24674. "type": "number"
  24675. },
  24676. "aggregateID": {
  24677. "type": "string"
  24678. },
  24679. "data": {
  24680. "type": "object",
  24681. "properties": {
  24682. "sessionID": {
  24683. "type": "string",
  24684. "pattern": "^ses"
  24685. },
  24686. "info": {
  24687. "$ref": "#/components/schemas/Session"
  24688. }
  24689. },
  24690. "required": ["sessionID", "info"],
  24691. "additionalProperties": false
  24692. }
  24693. },
  24694. "required": ["type", "id", "seq", "aggregateID", "data"],
  24695. "additionalProperties": false
  24696. }
  24697. },
  24698. "required": ["type", "id", "syncEvent"],
  24699. "additionalProperties": false
  24700. },
  24701. "SyncEventMessageUpdated": {
  24702. "type": "object",
  24703. "properties": {
  24704. "type": {
  24705. "type": "string",
  24706. "enum": ["sync"]
  24707. },
  24708. "id": {
  24709. "type": "string",
  24710. "pattern": "^evt_"
  24711. },
  24712. "syncEvent": {
  24713. "type": "object",
  24714. "properties": {
  24715. "type": {
  24716. "type": "string",
  24717. "enum": ["message.updated.1"]
  24718. },
  24719. "id": {
  24720. "type": "string",
  24721. "pattern": "^evt_"
  24722. },
  24723. "seq": {
  24724. "type": "number"
  24725. },
  24726. "aggregateID": {
  24727. "type": "string"
  24728. },
  24729. "data": {
  24730. "type": "object",
  24731. "properties": {
  24732. "sessionID": {
  24733. "type": "string",
  24734. "pattern": "^ses"
  24735. },
  24736. "info": {
  24737. "$ref": "#/components/schemas/Message"
  24738. }
  24739. },
  24740. "required": ["sessionID", "info"],
  24741. "additionalProperties": false
  24742. }
  24743. },
  24744. "required": ["type", "id", "seq", "aggregateID", "data"],
  24745. "additionalProperties": false
  24746. }
  24747. },
  24748. "required": ["type", "id", "syncEvent"],
  24749. "additionalProperties": false
  24750. },
  24751. "SyncEventMessageRemoved": {
  24752. "type": "object",
  24753. "properties": {
  24754. "type": {
  24755. "type": "string",
  24756. "enum": ["sync"]
  24757. },
  24758. "id": {
  24759. "type": "string",
  24760. "pattern": "^evt_"
  24761. },
  24762. "syncEvent": {
  24763. "type": "object",
  24764. "properties": {
  24765. "type": {
  24766. "type": "string",
  24767. "enum": ["message.removed.1"]
  24768. },
  24769. "id": {
  24770. "type": "string",
  24771. "pattern": "^evt_"
  24772. },
  24773. "seq": {
  24774. "type": "number"
  24775. },
  24776. "aggregateID": {
  24777. "type": "string"
  24778. },
  24779. "data": {
  24780. "type": "object",
  24781. "properties": {
  24782. "sessionID": {
  24783. "type": "string",
  24784. "pattern": "^ses"
  24785. },
  24786. "messageID": {
  24787. "type": "string",
  24788. "pattern": "^msg"
  24789. }
  24790. },
  24791. "required": ["sessionID", "messageID"],
  24792. "additionalProperties": false
  24793. }
  24794. },
  24795. "required": ["type", "id", "seq", "aggregateID", "data"],
  24796. "additionalProperties": false
  24797. }
  24798. },
  24799. "required": ["type", "id", "syncEvent"],
  24800. "additionalProperties": false
  24801. },
  24802. "SyncEventMessagePartUpdated": {
  24803. "type": "object",
  24804. "properties": {
  24805. "type": {
  24806. "type": "string",
  24807. "enum": ["sync"]
  24808. },
  24809. "id": {
  24810. "type": "string",
  24811. "pattern": "^evt_"
  24812. },
  24813. "syncEvent": {
  24814. "type": "object",
  24815. "properties": {
  24816. "type": {
  24817. "type": "string",
  24818. "enum": ["message.part.updated.1"]
  24819. },
  24820. "id": {
  24821. "type": "string",
  24822. "pattern": "^evt_"
  24823. },
  24824. "seq": {
  24825. "type": "number"
  24826. },
  24827. "aggregateID": {
  24828. "type": "string"
  24829. },
  24830. "data": {
  24831. "type": "object",
  24832. "properties": {
  24833. "sessionID": {
  24834. "type": "string",
  24835. "pattern": "^ses"
  24836. },
  24837. "part": {
  24838. "$ref": "#/components/schemas/Part"
  24839. },
  24840. "time": {
  24841. "type": "number"
  24842. }
  24843. },
  24844. "required": ["sessionID", "part", "time"],
  24845. "additionalProperties": false
  24846. }
  24847. },
  24848. "required": ["type", "id", "seq", "aggregateID", "data"],
  24849. "additionalProperties": false
  24850. }
  24851. },
  24852. "required": ["type", "id", "syncEvent"],
  24853. "additionalProperties": false
  24854. },
  24855. "SyncEventMessagePartRemoved": {
  24856. "type": "object",
  24857. "properties": {
  24858. "type": {
  24859. "type": "string",
  24860. "enum": ["sync"]
  24861. },
  24862. "id": {
  24863. "type": "string",
  24864. "pattern": "^evt_"
  24865. },
  24866. "syncEvent": {
  24867. "type": "object",
  24868. "properties": {
  24869. "type": {
  24870. "type": "string",
  24871. "enum": ["message.part.removed.1"]
  24872. },
  24873. "id": {
  24874. "type": "string",
  24875. "pattern": "^evt_"
  24876. },
  24877. "seq": {
  24878. "type": "number"
  24879. },
  24880. "aggregateID": {
  24881. "type": "string"
  24882. },
  24883. "data": {
  24884. "type": "object",
  24885. "properties": {
  24886. "sessionID": {
  24887. "type": "string",
  24888. "pattern": "^ses"
  24889. },
  24890. "messageID": {
  24891. "type": "string",
  24892. "pattern": "^msg"
  24893. },
  24894. "partID": {
  24895. "type": "string",
  24896. "pattern": "^prt"
  24897. }
  24898. },
  24899. "required": ["sessionID", "messageID", "partID"],
  24900. "additionalProperties": false
  24901. }
  24902. },
  24903. "required": ["type", "id", "seq", "aggregateID", "data"],
  24904. "additionalProperties": false
  24905. }
  24906. },
  24907. "required": ["type", "id", "syncEvent"],
  24908. "additionalProperties": false
  24909. },
  24910. "SyncEventSessionNextAgentSwitched": {
  24911. "type": "object",
  24912. "properties": {
  24913. "type": {
  24914. "type": "string",
  24915. "enum": ["sync"]
  24916. },
  24917. "id": {
  24918. "type": "string",
  24919. "pattern": "^evt_"
  24920. },
  24921. "syncEvent": {
  24922. "type": "object",
  24923. "properties": {
  24924. "type": {
  24925. "type": "string",
  24926. "enum": ["session.next.agent.switched.1"]
  24927. },
  24928. "id": {
  24929. "type": "string",
  24930. "pattern": "^evt_"
  24931. },
  24932. "seq": {
  24933. "type": "number"
  24934. },
  24935. "aggregateID": {
  24936. "type": "string"
  24937. },
  24938. "data": {
  24939. "type": "object",
  24940. "properties": {
  24941. "timestamp": {
  24942. "type": "number"
  24943. },
  24944. "sessionID": {
  24945. "type": "string",
  24946. "pattern": "^ses"
  24947. },
  24948. "messageID": {
  24949. "type": "string",
  24950. "pattern": "^msg_"
  24951. },
  24952. "agent": {
  24953. "type": "string"
  24954. }
  24955. },
  24956. "required": ["timestamp", "sessionID", "messageID", "agent"],
  24957. "additionalProperties": false
  24958. }
  24959. },
  24960. "required": ["type", "id", "seq", "aggregateID", "data"],
  24961. "additionalProperties": false
  24962. }
  24963. },
  24964. "required": ["type", "id", "syncEvent"],
  24965. "additionalProperties": false
  24966. },
  24967. "SyncEventSessionNextModelSwitched": {
  24968. "type": "object",
  24969. "properties": {
  24970. "type": {
  24971. "type": "string",
  24972. "enum": ["sync"]
  24973. },
  24974. "id": {
  24975. "type": "string",
  24976. "pattern": "^evt_"
  24977. },
  24978. "syncEvent": {
  24979. "type": "object",
  24980. "properties": {
  24981. "type": {
  24982. "type": "string",
  24983. "enum": ["session.next.model.switched.1"]
  24984. },
  24985. "id": {
  24986. "type": "string",
  24987. "pattern": "^evt_"
  24988. },
  24989. "seq": {
  24990. "type": "number"
  24991. },
  24992. "aggregateID": {
  24993. "type": "string"
  24994. },
  24995. "data": {
  24996. "type": "object",
  24997. "properties": {
  24998. "timestamp": {
  24999. "type": "number"
  25000. },
  25001. "sessionID": {
  25002. "type": "string",
  25003. "pattern": "^ses"
  25004. },
  25005. "messageID": {
  25006. "type": "string",
  25007. "pattern": "^msg_"
  25008. },
  25009. "model": {
  25010. "$ref": "#/components/schemas/ModelRef"
  25011. }
  25012. },
  25013. "required": ["timestamp", "sessionID", "messageID", "model"],
  25014. "additionalProperties": false
  25015. }
  25016. },
  25017. "required": ["type", "id", "seq", "aggregateID", "data"],
  25018. "additionalProperties": false
  25019. }
  25020. },
  25021. "required": ["type", "id", "syncEvent"],
  25022. "additionalProperties": false
  25023. },
  25024. "SyncEventSessionNextMoved": {
  25025. "type": "object",
  25026. "properties": {
  25027. "type": {
  25028. "type": "string",
  25029. "enum": ["sync"]
  25030. },
  25031. "id": {
  25032. "type": "string",
  25033. "pattern": "^evt_"
  25034. },
  25035. "syncEvent": {
  25036. "type": "object",
  25037. "properties": {
  25038. "type": {
  25039. "type": "string",
  25040. "enum": ["session.next.moved.1"]
  25041. },
  25042. "id": {
  25043. "type": "string",
  25044. "pattern": "^evt_"
  25045. },
  25046. "seq": {
  25047. "type": "number"
  25048. },
  25049. "aggregateID": {
  25050. "type": "string"
  25051. },
  25052. "data": {
  25053. "type": "object",
  25054. "properties": {
  25055. "timestamp": {
  25056. "type": "number"
  25057. },
  25058. "sessionID": {
  25059. "type": "string",
  25060. "pattern": "^ses"
  25061. },
  25062. "location": {
  25063. "$ref": "#/components/schemas/LocationRef"
  25064. },
  25065. "subdirectory": {
  25066. "type": "string"
  25067. }
  25068. },
  25069. "required": ["timestamp", "sessionID", "location"],
  25070. "additionalProperties": false
  25071. }
  25072. },
  25073. "required": ["type", "id", "seq", "aggregateID", "data"],
  25074. "additionalProperties": false
  25075. }
  25076. },
  25077. "required": ["type", "id", "syncEvent"],
  25078. "additionalProperties": false
  25079. },
  25080. "SyncEventSessionNextPrompted": {
  25081. "type": "object",
  25082. "properties": {
  25083. "type": {
  25084. "type": "string",
  25085. "enum": ["sync"]
  25086. },
  25087. "id": {
  25088. "type": "string",
  25089. "pattern": "^evt_"
  25090. },
  25091. "syncEvent": {
  25092. "type": "object",
  25093. "properties": {
  25094. "type": {
  25095. "type": "string",
  25096. "enum": ["session.next.prompted.1"]
  25097. },
  25098. "id": {
  25099. "type": "string",
  25100. "pattern": "^evt_"
  25101. },
  25102. "seq": {
  25103. "type": "number"
  25104. },
  25105. "aggregateID": {
  25106. "type": "string"
  25107. },
  25108. "data": {
  25109. "type": "object",
  25110. "properties": {
  25111. "timestamp": {
  25112. "type": "number"
  25113. },
  25114. "sessionID": {
  25115. "type": "string",
  25116. "pattern": "^ses"
  25117. },
  25118. "messageID": {
  25119. "type": "string",
  25120. "pattern": "^msg_"
  25121. },
  25122. "prompt": {
  25123. "$ref": "#/components/schemas/Prompt"
  25124. },
  25125. "delivery": {
  25126. "type": "string",
  25127. "enum": ["steer", "queue"]
  25128. }
  25129. },
  25130. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  25131. "additionalProperties": false
  25132. }
  25133. },
  25134. "required": ["type", "id", "seq", "aggregateID", "data"],
  25135. "additionalProperties": false
  25136. }
  25137. },
  25138. "required": ["type", "id", "syncEvent"],
  25139. "additionalProperties": false
  25140. },
  25141. "SyncEventSessionNextPromptAdmitted": {
  25142. "type": "object",
  25143. "properties": {
  25144. "type": {
  25145. "type": "string",
  25146. "enum": ["sync"]
  25147. },
  25148. "id": {
  25149. "type": "string",
  25150. "pattern": "^evt_"
  25151. },
  25152. "syncEvent": {
  25153. "type": "object",
  25154. "properties": {
  25155. "type": {
  25156. "type": "string",
  25157. "enum": ["session.next.prompt.admitted.1"]
  25158. },
  25159. "id": {
  25160. "type": "string",
  25161. "pattern": "^evt_"
  25162. },
  25163. "seq": {
  25164. "type": "number"
  25165. },
  25166. "aggregateID": {
  25167. "type": "string"
  25168. },
  25169. "data": {
  25170. "type": "object",
  25171. "properties": {
  25172. "timestamp": {
  25173. "type": "number"
  25174. },
  25175. "sessionID": {
  25176. "type": "string",
  25177. "pattern": "^ses"
  25178. },
  25179. "messageID": {
  25180. "type": "string",
  25181. "pattern": "^msg_"
  25182. },
  25183. "prompt": {
  25184. "$ref": "#/components/schemas/Prompt"
  25185. },
  25186. "delivery": {
  25187. "type": "string",
  25188. "enum": ["steer", "queue"]
  25189. }
  25190. },
  25191. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  25192. "additionalProperties": false
  25193. }
  25194. },
  25195. "required": ["type", "id", "seq", "aggregateID", "data"],
  25196. "additionalProperties": false
  25197. }
  25198. },
  25199. "required": ["type", "id", "syncEvent"],
  25200. "additionalProperties": false
  25201. },
  25202. "SyncEventSessionNextContextUpdated": {
  25203. "type": "object",
  25204. "properties": {
  25205. "type": {
  25206. "type": "string",
  25207. "enum": ["sync"]
  25208. },
  25209. "id": {
  25210. "type": "string",
  25211. "pattern": "^evt_"
  25212. },
  25213. "syncEvent": {
  25214. "type": "object",
  25215. "properties": {
  25216. "type": {
  25217. "type": "string",
  25218. "enum": ["session.next.context.updated.1"]
  25219. },
  25220. "id": {
  25221. "type": "string",
  25222. "pattern": "^evt_"
  25223. },
  25224. "seq": {
  25225. "type": "number"
  25226. },
  25227. "aggregateID": {
  25228. "type": "string"
  25229. },
  25230. "data": {
  25231. "type": "object",
  25232. "properties": {
  25233. "timestamp": {
  25234. "type": "number"
  25235. },
  25236. "sessionID": {
  25237. "type": "string",
  25238. "pattern": "^ses"
  25239. },
  25240. "messageID": {
  25241. "type": "string",
  25242. "pattern": "^msg_"
  25243. },
  25244. "text": {
  25245. "type": "string"
  25246. }
  25247. },
  25248. "required": ["timestamp", "sessionID", "messageID", "text"],
  25249. "additionalProperties": false
  25250. }
  25251. },
  25252. "required": ["type", "id", "seq", "aggregateID", "data"],
  25253. "additionalProperties": false
  25254. }
  25255. },
  25256. "required": ["type", "id", "syncEvent"],
  25257. "additionalProperties": false
  25258. },
  25259. "SyncEventSessionNextSynthetic": {
  25260. "type": "object",
  25261. "properties": {
  25262. "type": {
  25263. "type": "string",
  25264. "enum": ["sync"]
  25265. },
  25266. "id": {
  25267. "type": "string",
  25268. "pattern": "^evt_"
  25269. },
  25270. "syncEvent": {
  25271. "type": "object",
  25272. "properties": {
  25273. "type": {
  25274. "type": "string",
  25275. "enum": ["session.next.synthetic.1"]
  25276. },
  25277. "id": {
  25278. "type": "string",
  25279. "pattern": "^evt_"
  25280. },
  25281. "seq": {
  25282. "type": "number"
  25283. },
  25284. "aggregateID": {
  25285. "type": "string"
  25286. },
  25287. "data": {
  25288. "type": "object",
  25289. "properties": {
  25290. "timestamp": {
  25291. "type": "number"
  25292. },
  25293. "sessionID": {
  25294. "type": "string",
  25295. "pattern": "^ses"
  25296. },
  25297. "messageID": {
  25298. "type": "string",
  25299. "pattern": "^msg_"
  25300. },
  25301. "text": {
  25302. "type": "string"
  25303. }
  25304. },
  25305. "required": ["timestamp", "sessionID", "messageID", "text"],
  25306. "additionalProperties": false
  25307. }
  25308. },
  25309. "required": ["type", "id", "seq", "aggregateID", "data"],
  25310. "additionalProperties": false
  25311. }
  25312. },
  25313. "required": ["type", "id", "syncEvent"],
  25314. "additionalProperties": false
  25315. },
  25316. "SyncEventSessionNextShellStarted": {
  25317. "type": "object",
  25318. "properties": {
  25319. "type": {
  25320. "type": "string",
  25321. "enum": ["sync"]
  25322. },
  25323. "id": {
  25324. "type": "string",
  25325. "pattern": "^evt_"
  25326. },
  25327. "syncEvent": {
  25328. "type": "object",
  25329. "properties": {
  25330. "type": {
  25331. "type": "string",
  25332. "enum": ["session.next.shell.started.1"]
  25333. },
  25334. "id": {
  25335. "type": "string",
  25336. "pattern": "^evt_"
  25337. },
  25338. "seq": {
  25339. "type": "number"
  25340. },
  25341. "aggregateID": {
  25342. "type": "string"
  25343. },
  25344. "data": {
  25345. "type": "object",
  25346. "properties": {
  25347. "timestamp": {
  25348. "type": "number"
  25349. },
  25350. "sessionID": {
  25351. "type": "string",
  25352. "pattern": "^ses"
  25353. },
  25354. "messageID": {
  25355. "type": "string",
  25356. "pattern": "^msg_"
  25357. },
  25358. "callID": {
  25359. "type": "string"
  25360. },
  25361. "command": {
  25362. "type": "string"
  25363. }
  25364. },
  25365. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  25366. "additionalProperties": false
  25367. }
  25368. },
  25369. "required": ["type", "id", "seq", "aggregateID", "data"],
  25370. "additionalProperties": false
  25371. }
  25372. },
  25373. "required": ["type", "id", "syncEvent"],
  25374. "additionalProperties": false
  25375. },
  25376. "SyncEventSessionNextShellEnded": {
  25377. "type": "object",
  25378. "properties": {
  25379. "type": {
  25380. "type": "string",
  25381. "enum": ["sync"]
  25382. },
  25383. "id": {
  25384. "type": "string",
  25385. "pattern": "^evt_"
  25386. },
  25387. "syncEvent": {
  25388. "type": "object",
  25389. "properties": {
  25390. "type": {
  25391. "type": "string",
  25392. "enum": ["session.next.shell.ended.1"]
  25393. },
  25394. "id": {
  25395. "type": "string",
  25396. "pattern": "^evt_"
  25397. },
  25398. "seq": {
  25399. "type": "number"
  25400. },
  25401. "aggregateID": {
  25402. "type": "string"
  25403. },
  25404. "data": {
  25405. "type": "object",
  25406. "properties": {
  25407. "timestamp": {
  25408. "type": "number"
  25409. },
  25410. "sessionID": {
  25411. "type": "string",
  25412. "pattern": "^ses"
  25413. },
  25414. "callID": {
  25415. "type": "string"
  25416. },
  25417. "output": {
  25418. "type": "string"
  25419. }
  25420. },
  25421. "required": ["timestamp", "sessionID", "callID", "output"],
  25422. "additionalProperties": false
  25423. }
  25424. },
  25425. "required": ["type", "id", "seq", "aggregateID", "data"],
  25426. "additionalProperties": false
  25427. }
  25428. },
  25429. "required": ["type", "id", "syncEvent"],
  25430. "additionalProperties": false
  25431. },
  25432. "SyncEventSessionNextStepStarted": {
  25433. "type": "object",
  25434. "properties": {
  25435. "type": {
  25436. "type": "string",
  25437. "enum": ["sync"]
  25438. },
  25439. "id": {
  25440. "type": "string",
  25441. "pattern": "^evt_"
  25442. },
  25443. "syncEvent": {
  25444. "type": "object",
  25445. "properties": {
  25446. "type": {
  25447. "type": "string",
  25448. "enum": ["session.next.step.started.1"]
  25449. },
  25450. "id": {
  25451. "type": "string",
  25452. "pattern": "^evt_"
  25453. },
  25454. "seq": {
  25455. "type": "number"
  25456. },
  25457. "aggregateID": {
  25458. "type": "string"
  25459. },
  25460. "data": {
  25461. "type": "object",
  25462. "properties": {
  25463. "timestamp": {
  25464. "type": "number"
  25465. },
  25466. "sessionID": {
  25467. "type": "string",
  25468. "pattern": "^ses"
  25469. },
  25470. "assistantMessageID": {
  25471. "type": "string",
  25472. "pattern": "^msg_"
  25473. },
  25474. "agent": {
  25475. "type": "string"
  25476. },
  25477. "model": {
  25478. "$ref": "#/components/schemas/ModelRef"
  25479. },
  25480. "snapshot": {
  25481. "type": "string"
  25482. }
  25483. },
  25484. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  25485. "additionalProperties": false
  25486. }
  25487. },
  25488. "required": ["type", "id", "seq", "aggregateID", "data"],
  25489. "additionalProperties": false
  25490. }
  25491. },
  25492. "required": ["type", "id", "syncEvent"],
  25493. "additionalProperties": false
  25494. },
  25495. "SyncEventSessionNextStepEnded": {
  25496. "type": "object",
  25497. "properties": {
  25498. "type": {
  25499. "type": "string",
  25500. "enum": ["sync"]
  25501. },
  25502. "id": {
  25503. "type": "string",
  25504. "pattern": "^evt_"
  25505. },
  25506. "syncEvent": {
  25507. "type": "object",
  25508. "properties": {
  25509. "type": {
  25510. "type": "string",
  25511. "enum": ["session.next.step.ended.2"]
  25512. },
  25513. "id": {
  25514. "type": "string",
  25515. "pattern": "^evt_"
  25516. },
  25517. "seq": {
  25518. "type": "number"
  25519. },
  25520. "aggregateID": {
  25521. "type": "string"
  25522. },
  25523. "data": {
  25524. "type": "object",
  25525. "properties": {
  25526. "timestamp": {
  25527. "type": "number"
  25528. },
  25529. "sessionID": {
  25530. "type": "string",
  25531. "pattern": "^ses"
  25532. },
  25533. "assistantMessageID": {
  25534. "type": "string",
  25535. "pattern": "^msg_"
  25536. },
  25537. "finish": {
  25538. "type": "string"
  25539. },
  25540. "cost": {
  25541. "type": "number"
  25542. },
  25543. "tokens": {
  25544. "type": "object",
  25545. "properties": {
  25546. "input": {
  25547. "type": "number"
  25548. },
  25549. "output": {
  25550. "type": "number"
  25551. },
  25552. "reasoning": {
  25553. "type": "number"
  25554. },
  25555. "cache": {
  25556. "type": "object",
  25557. "properties": {
  25558. "read": {
  25559. "type": "number"
  25560. },
  25561. "write": {
  25562. "type": "number"
  25563. }
  25564. },
  25565. "required": ["read", "write"],
  25566. "additionalProperties": false
  25567. }
  25568. },
  25569. "required": ["input", "output", "reasoning", "cache"],
  25570. "additionalProperties": false
  25571. },
  25572. "snapshot": {
  25573. "type": "string"
  25574. },
  25575. "files": {
  25576. "type": "array",
  25577. "items": {
  25578. "type": "string"
  25579. }
  25580. }
  25581. },
  25582. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  25583. "additionalProperties": false
  25584. }
  25585. },
  25586. "required": ["type", "id", "seq", "aggregateID", "data"],
  25587. "additionalProperties": false
  25588. }
  25589. },
  25590. "required": ["type", "id", "syncEvent"],
  25591. "additionalProperties": false
  25592. },
  25593. "SyncEventSessionNextStepFailed": {
  25594. "type": "object",
  25595. "properties": {
  25596. "type": {
  25597. "type": "string",
  25598. "enum": ["sync"]
  25599. },
  25600. "id": {
  25601. "type": "string",
  25602. "pattern": "^evt_"
  25603. },
  25604. "syncEvent": {
  25605. "type": "object",
  25606. "properties": {
  25607. "type": {
  25608. "type": "string",
  25609. "enum": ["session.next.step.failed.2"]
  25610. },
  25611. "id": {
  25612. "type": "string",
  25613. "pattern": "^evt_"
  25614. },
  25615. "seq": {
  25616. "type": "number"
  25617. },
  25618. "aggregateID": {
  25619. "type": "string"
  25620. },
  25621. "data": {
  25622. "type": "object",
  25623. "properties": {
  25624. "timestamp": {
  25625. "type": "number"
  25626. },
  25627. "sessionID": {
  25628. "type": "string",
  25629. "pattern": "^ses"
  25630. },
  25631. "assistantMessageID": {
  25632. "type": "string",
  25633. "pattern": "^msg_"
  25634. },
  25635. "error": {
  25636. "$ref": "#/components/schemas/SessionErrorUnknown"
  25637. }
  25638. },
  25639. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  25640. "additionalProperties": false
  25641. }
  25642. },
  25643. "required": ["type", "id", "seq", "aggregateID", "data"],
  25644. "additionalProperties": false
  25645. }
  25646. },
  25647. "required": ["type", "id", "syncEvent"],
  25648. "additionalProperties": false
  25649. },
  25650. "SyncEventSessionNextTextStarted": {
  25651. "type": "object",
  25652. "properties": {
  25653. "type": {
  25654. "type": "string",
  25655. "enum": ["sync"]
  25656. },
  25657. "id": {
  25658. "type": "string",
  25659. "pattern": "^evt_"
  25660. },
  25661. "syncEvent": {
  25662. "type": "object",
  25663. "properties": {
  25664. "type": {
  25665. "type": "string",
  25666. "enum": ["session.next.text.started.1"]
  25667. },
  25668. "id": {
  25669. "type": "string",
  25670. "pattern": "^evt_"
  25671. },
  25672. "seq": {
  25673. "type": "number"
  25674. },
  25675. "aggregateID": {
  25676. "type": "string"
  25677. },
  25678. "data": {
  25679. "type": "object",
  25680. "properties": {
  25681. "timestamp": {
  25682. "type": "number"
  25683. },
  25684. "sessionID": {
  25685. "type": "string",
  25686. "pattern": "^ses"
  25687. },
  25688. "assistantMessageID": {
  25689. "type": "string",
  25690. "pattern": "^msg_"
  25691. },
  25692. "textID": {
  25693. "type": "string"
  25694. }
  25695. },
  25696. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  25697. "additionalProperties": false
  25698. }
  25699. },
  25700. "required": ["type", "id", "seq", "aggregateID", "data"],
  25701. "additionalProperties": false
  25702. }
  25703. },
  25704. "required": ["type", "id", "syncEvent"],
  25705. "additionalProperties": false
  25706. },
  25707. "SyncEventSessionNextTextEnded": {
  25708. "type": "object",
  25709. "properties": {
  25710. "type": {
  25711. "type": "string",
  25712. "enum": ["sync"]
  25713. },
  25714. "id": {
  25715. "type": "string",
  25716. "pattern": "^evt_"
  25717. },
  25718. "syncEvent": {
  25719. "type": "object",
  25720. "properties": {
  25721. "type": {
  25722. "type": "string",
  25723. "enum": ["session.next.text.ended.1"]
  25724. },
  25725. "id": {
  25726. "type": "string",
  25727. "pattern": "^evt_"
  25728. },
  25729. "seq": {
  25730. "type": "number"
  25731. },
  25732. "aggregateID": {
  25733. "type": "string"
  25734. },
  25735. "data": {
  25736. "type": "object",
  25737. "properties": {
  25738. "timestamp": {
  25739. "type": "number"
  25740. },
  25741. "sessionID": {
  25742. "type": "string",
  25743. "pattern": "^ses"
  25744. },
  25745. "assistantMessageID": {
  25746. "type": "string",
  25747. "pattern": "^msg_"
  25748. },
  25749. "textID": {
  25750. "type": "string"
  25751. },
  25752. "text": {
  25753. "type": "string"
  25754. }
  25755. },
  25756. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  25757. "additionalProperties": false
  25758. }
  25759. },
  25760. "required": ["type", "id", "seq", "aggregateID", "data"],
  25761. "additionalProperties": false
  25762. }
  25763. },
  25764. "required": ["type", "id", "syncEvent"],
  25765. "additionalProperties": false
  25766. },
  25767. "SyncEventSessionNextReasoningStarted": {
  25768. "type": "object",
  25769. "properties": {
  25770. "type": {
  25771. "type": "string",
  25772. "enum": ["sync"]
  25773. },
  25774. "id": {
  25775. "type": "string",
  25776. "pattern": "^evt_"
  25777. },
  25778. "syncEvent": {
  25779. "type": "object",
  25780. "properties": {
  25781. "type": {
  25782. "type": "string",
  25783. "enum": ["session.next.reasoning.started.1"]
  25784. },
  25785. "id": {
  25786. "type": "string",
  25787. "pattern": "^evt_"
  25788. },
  25789. "seq": {
  25790. "type": "number"
  25791. },
  25792. "aggregateID": {
  25793. "type": "string"
  25794. },
  25795. "data": {
  25796. "type": "object",
  25797. "properties": {
  25798. "timestamp": {
  25799. "type": "number"
  25800. },
  25801. "sessionID": {
  25802. "type": "string",
  25803. "pattern": "^ses"
  25804. },
  25805. "assistantMessageID": {
  25806. "type": "string",
  25807. "pattern": "^msg_"
  25808. },
  25809. "reasoningID": {
  25810. "type": "string"
  25811. },
  25812. "providerMetadata": {
  25813. "$ref": "#/components/schemas/LLMProviderMetadata"
  25814. }
  25815. },
  25816. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  25817. "additionalProperties": false
  25818. }
  25819. },
  25820. "required": ["type", "id", "seq", "aggregateID", "data"],
  25821. "additionalProperties": false
  25822. }
  25823. },
  25824. "required": ["type", "id", "syncEvent"],
  25825. "additionalProperties": false
  25826. },
  25827. "SyncEventSessionNextReasoningEnded": {
  25828. "type": "object",
  25829. "properties": {
  25830. "type": {
  25831. "type": "string",
  25832. "enum": ["sync"]
  25833. },
  25834. "id": {
  25835. "type": "string",
  25836. "pattern": "^evt_"
  25837. },
  25838. "syncEvent": {
  25839. "type": "object",
  25840. "properties": {
  25841. "type": {
  25842. "type": "string",
  25843. "enum": ["session.next.reasoning.ended.1"]
  25844. },
  25845. "id": {
  25846. "type": "string",
  25847. "pattern": "^evt_"
  25848. },
  25849. "seq": {
  25850. "type": "number"
  25851. },
  25852. "aggregateID": {
  25853. "type": "string"
  25854. },
  25855. "data": {
  25856. "type": "object",
  25857. "properties": {
  25858. "timestamp": {
  25859. "type": "number"
  25860. },
  25861. "sessionID": {
  25862. "type": "string",
  25863. "pattern": "^ses"
  25864. },
  25865. "assistantMessageID": {
  25866. "type": "string",
  25867. "pattern": "^msg_"
  25868. },
  25869. "reasoningID": {
  25870. "type": "string"
  25871. },
  25872. "text": {
  25873. "type": "string"
  25874. },
  25875. "providerMetadata": {
  25876. "$ref": "#/components/schemas/LLMProviderMetadata"
  25877. }
  25878. },
  25879. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  25880. "additionalProperties": false
  25881. }
  25882. },
  25883. "required": ["type", "id", "seq", "aggregateID", "data"],
  25884. "additionalProperties": false
  25885. }
  25886. },
  25887. "required": ["type", "id", "syncEvent"],
  25888. "additionalProperties": false
  25889. },
  25890. "SyncEventSessionNextToolInputStarted": {
  25891. "type": "object",
  25892. "properties": {
  25893. "type": {
  25894. "type": "string",
  25895. "enum": ["sync"]
  25896. },
  25897. "id": {
  25898. "type": "string",
  25899. "pattern": "^evt_"
  25900. },
  25901. "syncEvent": {
  25902. "type": "object",
  25903. "properties": {
  25904. "type": {
  25905. "type": "string",
  25906. "enum": ["session.next.tool.input.started.1"]
  25907. },
  25908. "id": {
  25909. "type": "string",
  25910. "pattern": "^evt_"
  25911. },
  25912. "seq": {
  25913. "type": "number"
  25914. },
  25915. "aggregateID": {
  25916. "type": "string"
  25917. },
  25918. "data": {
  25919. "type": "object",
  25920. "properties": {
  25921. "timestamp": {
  25922. "type": "number"
  25923. },
  25924. "sessionID": {
  25925. "type": "string",
  25926. "pattern": "^ses"
  25927. },
  25928. "assistantMessageID": {
  25929. "type": "string",
  25930. "pattern": "^msg_"
  25931. },
  25932. "callID": {
  25933. "type": "string"
  25934. },
  25935. "name": {
  25936. "type": "string"
  25937. }
  25938. },
  25939. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  25940. "additionalProperties": false
  25941. }
  25942. },
  25943. "required": ["type", "id", "seq", "aggregateID", "data"],
  25944. "additionalProperties": false
  25945. }
  25946. },
  25947. "required": ["type", "id", "syncEvent"],
  25948. "additionalProperties": false
  25949. },
  25950. "SyncEventSessionNextToolInputEnded": {
  25951. "type": "object",
  25952. "properties": {
  25953. "type": {
  25954. "type": "string",
  25955. "enum": ["sync"]
  25956. },
  25957. "id": {
  25958. "type": "string",
  25959. "pattern": "^evt_"
  25960. },
  25961. "syncEvent": {
  25962. "type": "object",
  25963. "properties": {
  25964. "type": {
  25965. "type": "string",
  25966. "enum": ["session.next.tool.input.ended.1"]
  25967. },
  25968. "id": {
  25969. "type": "string",
  25970. "pattern": "^evt_"
  25971. },
  25972. "seq": {
  25973. "type": "number"
  25974. },
  25975. "aggregateID": {
  25976. "type": "string"
  25977. },
  25978. "data": {
  25979. "type": "object",
  25980. "properties": {
  25981. "timestamp": {
  25982. "type": "number"
  25983. },
  25984. "sessionID": {
  25985. "type": "string",
  25986. "pattern": "^ses"
  25987. },
  25988. "assistantMessageID": {
  25989. "type": "string",
  25990. "pattern": "^msg_"
  25991. },
  25992. "callID": {
  25993. "type": "string"
  25994. },
  25995. "text": {
  25996. "type": "string"
  25997. }
  25998. },
  25999. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  26000. "additionalProperties": false
  26001. }
  26002. },
  26003. "required": ["type", "id", "seq", "aggregateID", "data"],
  26004. "additionalProperties": false
  26005. }
  26006. },
  26007. "required": ["type", "id", "syncEvent"],
  26008. "additionalProperties": false
  26009. },
  26010. "SyncEventSessionNextToolCalled": {
  26011. "type": "object",
  26012. "properties": {
  26013. "type": {
  26014. "type": "string",
  26015. "enum": ["sync"]
  26016. },
  26017. "id": {
  26018. "type": "string",
  26019. "pattern": "^evt_"
  26020. },
  26021. "syncEvent": {
  26022. "type": "object",
  26023. "properties": {
  26024. "type": {
  26025. "type": "string",
  26026. "enum": ["session.next.tool.called.1"]
  26027. },
  26028. "id": {
  26029. "type": "string",
  26030. "pattern": "^evt_"
  26031. },
  26032. "seq": {
  26033. "type": "number"
  26034. },
  26035. "aggregateID": {
  26036. "type": "string"
  26037. },
  26038. "data": {
  26039. "type": "object",
  26040. "properties": {
  26041. "timestamp": {
  26042. "type": "number"
  26043. },
  26044. "sessionID": {
  26045. "type": "string",
  26046. "pattern": "^ses"
  26047. },
  26048. "assistantMessageID": {
  26049. "type": "string",
  26050. "pattern": "^msg_"
  26051. },
  26052. "callID": {
  26053. "type": "string"
  26054. },
  26055. "tool": {
  26056. "type": "string"
  26057. },
  26058. "input": {
  26059. "type": "object"
  26060. },
  26061. "provider": {
  26062. "type": "object",
  26063. "properties": {
  26064. "executed": {
  26065. "type": "boolean"
  26066. },
  26067. "metadata": {
  26068. "$ref": "#/components/schemas/LLMProviderMetadata"
  26069. }
  26070. },
  26071. "required": ["executed"],
  26072. "additionalProperties": false
  26073. }
  26074. },
  26075. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  26076. "additionalProperties": false
  26077. }
  26078. },
  26079. "required": ["type", "id", "seq", "aggregateID", "data"],
  26080. "additionalProperties": false
  26081. }
  26082. },
  26083. "required": ["type", "id", "syncEvent"],
  26084. "additionalProperties": false
  26085. },
  26086. "SyncEventSessionNextToolProgress": {
  26087. "type": "object",
  26088. "properties": {
  26089. "type": {
  26090. "type": "string",
  26091. "enum": ["sync"]
  26092. },
  26093. "id": {
  26094. "type": "string",
  26095. "pattern": "^evt_"
  26096. },
  26097. "syncEvent": {
  26098. "type": "object",
  26099. "properties": {
  26100. "type": {
  26101. "type": "string",
  26102. "enum": ["session.next.tool.progress.1"]
  26103. },
  26104. "id": {
  26105. "type": "string",
  26106. "pattern": "^evt_"
  26107. },
  26108. "seq": {
  26109. "type": "number"
  26110. },
  26111. "aggregateID": {
  26112. "type": "string"
  26113. },
  26114. "data": {
  26115. "type": "object",
  26116. "properties": {
  26117. "timestamp": {
  26118. "type": "number"
  26119. },
  26120. "sessionID": {
  26121. "type": "string",
  26122. "pattern": "^ses"
  26123. },
  26124. "assistantMessageID": {
  26125. "type": "string",
  26126. "pattern": "^msg_"
  26127. },
  26128. "callID": {
  26129. "type": "string"
  26130. },
  26131. "structured": {
  26132. "type": "object"
  26133. },
  26134. "content": {
  26135. "type": "array",
  26136. "items": {
  26137. "$ref": "#/components/schemas/LLMToolContent"
  26138. }
  26139. }
  26140. },
  26141. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  26142. "additionalProperties": false
  26143. }
  26144. },
  26145. "required": ["type", "id", "seq", "aggregateID", "data"],
  26146. "additionalProperties": false
  26147. }
  26148. },
  26149. "required": ["type", "id", "syncEvent"],
  26150. "additionalProperties": false
  26151. },
  26152. "SyncEventSessionNextToolSuccess": {
  26153. "type": "object",
  26154. "properties": {
  26155. "type": {
  26156. "type": "string",
  26157. "enum": ["sync"]
  26158. },
  26159. "id": {
  26160. "type": "string",
  26161. "pattern": "^evt_"
  26162. },
  26163. "syncEvent": {
  26164. "type": "object",
  26165. "properties": {
  26166. "type": {
  26167. "type": "string",
  26168. "enum": ["session.next.tool.success.1"]
  26169. },
  26170. "id": {
  26171. "type": "string",
  26172. "pattern": "^evt_"
  26173. },
  26174. "seq": {
  26175. "type": "number"
  26176. },
  26177. "aggregateID": {
  26178. "type": "string"
  26179. },
  26180. "data": {
  26181. "type": "object",
  26182. "properties": {
  26183. "timestamp": {
  26184. "type": "number"
  26185. },
  26186. "sessionID": {
  26187. "type": "string",
  26188. "pattern": "^ses"
  26189. },
  26190. "assistantMessageID": {
  26191. "type": "string",
  26192. "pattern": "^msg_"
  26193. },
  26194. "callID": {
  26195. "type": "string"
  26196. },
  26197. "structured": {
  26198. "type": "object"
  26199. },
  26200. "content": {
  26201. "type": "array",
  26202. "items": {
  26203. "$ref": "#/components/schemas/LLMToolContent"
  26204. }
  26205. },
  26206. "outputPaths": {
  26207. "type": "array",
  26208. "items": {
  26209. "type": "string"
  26210. }
  26211. },
  26212. "result": {},
  26213. "provider": {
  26214. "type": "object",
  26215. "properties": {
  26216. "executed": {
  26217. "type": "boolean"
  26218. },
  26219. "metadata": {
  26220. "$ref": "#/components/schemas/LLMProviderMetadata"
  26221. }
  26222. },
  26223. "required": ["executed"],
  26224. "additionalProperties": false
  26225. }
  26226. },
  26227. "required": [
  26228. "timestamp",
  26229. "sessionID",
  26230. "assistantMessageID",
  26231. "callID",
  26232. "structured",
  26233. "content",
  26234. "provider"
  26235. ],
  26236. "additionalProperties": false
  26237. }
  26238. },
  26239. "required": ["type", "id", "seq", "aggregateID", "data"],
  26240. "additionalProperties": false
  26241. }
  26242. },
  26243. "required": ["type", "id", "syncEvent"],
  26244. "additionalProperties": false
  26245. },
  26246. "SyncEventSessionNextToolFailed": {
  26247. "type": "object",
  26248. "properties": {
  26249. "type": {
  26250. "type": "string",
  26251. "enum": ["sync"]
  26252. },
  26253. "id": {
  26254. "type": "string",
  26255. "pattern": "^evt_"
  26256. },
  26257. "syncEvent": {
  26258. "type": "object",
  26259. "properties": {
  26260. "type": {
  26261. "type": "string",
  26262. "enum": ["session.next.tool.failed.1"]
  26263. },
  26264. "id": {
  26265. "type": "string",
  26266. "pattern": "^evt_"
  26267. },
  26268. "seq": {
  26269. "type": "number"
  26270. },
  26271. "aggregateID": {
  26272. "type": "string"
  26273. },
  26274. "data": {
  26275. "type": "object",
  26276. "properties": {
  26277. "timestamp": {
  26278. "type": "number"
  26279. },
  26280. "sessionID": {
  26281. "type": "string",
  26282. "pattern": "^ses"
  26283. },
  26284. "assistantMessageID": {
  26285. "type": "string",
  26286. "pattern": "^msg_"
  26287. },
  26288. "callID": {
  26289. "type": "string"
  26290. },
  26291. "error": {
  26292. "$ref": "#/components/schemas/SessionErrorUnknown"
  26293. },
  26294. "result": {},
  26295. "provider": {
  26296. "type": "object",
  26297. "properties": {
  26298. "executed": {
  26299. "type": "boolean"
  26300. },
  26301. "metadata": {
  26302. "$ref": "#/components/schemas/LLMProviderMetadata"
  26303. }
  26304. },
  26305. "required": ["executed"],
  26306. "additionalProperties": false
  26307. }
  26308. },
  26309. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  26310. "additionalProperties": false
  26311. }
  26312. },
  26313. "required": ["type", "id", "seq", "aggregateID", "data"],
  26314. "additionalProperties": false
  26315. }
  26316. },
  26317. "required": ["type", "id", "syncEvent"],
  26318. "additionalProperties": false
  26319. },
  26320. "SyncEventSessionNextRetried": {
  26321. "type": "object",
  26322. "properties": {
  26323. "type": {
  26324. "type": "string",
  26325. "enum": ["sync"]
  26326. },
  26327. "id": {
  26328. "type": "string",
  26329. "pattern": "^evt_"
  26330. },
  26331. "syncEvent": {
  26332. "type": "object",
  26333. "properties": {
  26334. "type": {
  26335. "type": "string",
  26336. "enum": ["session.next.retried.1"]
  26337. },
  26338. "id": {
  26339. "type": "string",
  26340. "pattern": "^evt_"
  26341. },
  26342. "seq": {
  26343. "type": "number"
  26344. },
  26345. "aggregateID": {
  26346. "type": "string"
  26347. },
  26348. "data": {
  26349. "type": "object",
  26350. "properties": {
  26351. "timestamp": {
  26352. "type": "number"
  26353. },
  26354. "sessionID": {
  26355. "type": "string",
  26356. "pattern": "^ses"
  26357. },
  26358. "attempt": {
  26359. "type": "number"
  26360. },
  26361. "error": {
  26362. "$ref": "#/components/schemas/SessionNextRetry_error"
  26363. }
  26364. },
  26365. "required": ["timestamp", "sessionID", "attempt", "error"],
  26366. "additionalProperties": false
  26367. }
  26368. },
  26369. "required": ["type", "id", "seq", "aggregateID", "data"],
  26370. "additionalProperties": false
  26371. }
  26372. },
  26373. "required": ["type", "id", "syncEvent"],
  26374. "additionalProperties": false
  26375. },
  26376. "SyncEventSessionNextCompactionStarted": {
  26377. "type": "object",
  26378. "properties": {
  26379. "type": {
  26380. "type": "string",
  26381. "enum": ["sync"]
  26382. },
  26383. "id": {
  26384. "type": "string",
  26385. "pattern": "^evt_"
  26386. },
  26387. "syncEvent": {
  26388. "type": "object",
  26389. "properties": {
  26390. "type": {
  26391. "type": "string",
  26392. "enum": ["session.next.compaction.started.1"]
  26393. },
  26394. "id": {
  26395. "type": "string",
  26396. "pattern": "^evt_"
  26397. },
  26398. "seq": {
  26399. "type": "number"
  26400. },
  26401. "aggregateID": {
  26402. "type": "string"
  26403. },
  26404. "data": {
  26405. "type": "object",
  26406. "properties": {
  26407. "timestamp": {
  26408. "type": "number"
  26409. },
  26410. "sessionID": {
  26411. "type": "string",
  26412. "pattern": "^ses"
  26413. },
  26414. "messageID": {
  26415. "type": "string",
  26416. "pattern": "^msg_"
  26417. },
  26418. "reason": {
  26419. "type": "string",
  26420. "enum": ["auto", "manual"]
  26421. }
  26422. },
  26423. "required": ["timestamp", "sessionID", "messageID", "reason"],
  26424. "additionalProperties": false
  26425. }
  26426. },
  26427. "required": ["type", "id", "seq", "aggregateID", "data"],
  26428. "additionalProperties": false
  26429. }
  26430. },
  26431. "required": ["type", "id", "syncEvent"],
  26432. "additionalProperties": false
  26433. },
  26434. "SyncEventSessionNextCompactionEnded": {
  26435. "type": "object",
  26436. "properties": {
  26437. "type": {
  26438. "type": "string",
  26439. "enum": ["sync"]
  26440. },
  26441. "id": {
  26442. "type": "string",
  26443. "pattern": "^evt_"
  26444. },
  26445. "syncEvent": {
  26446. "type": "object",
  26447. "properties": {
  26448. "type": {
  26449. "type": "string",
  26450. "enum": ["session.next.compaction.ended.1"]
  26451. },
  26452. "id": {
  26453. "type": "string",
  26454. "pattern": "^evt_"
  26455. },
  26456. "seq": {
  26457. "type": "number"
  26458. },
  26459. "aggregateID": {
  26460. "type": "string"
  26461. },
  26462. "data": {
  26463. "type": "object",
  26464. "properties": {
  26465. "timestamp": {
  26466. "type": "number"
  26467. },
  26468. "sessionID": {
  26469. "type": "string",
  26470. "pattern": "^ses"
  26471. },
  26472. "messageID": {
  26473. "type": "string",
  26474. "pattern": "^msg_"
  26475. },
  26476. "reason": {
  26477. "type": "string",
  26478. "enum": ["auto", "manual"]
  26479. },
  26480. "text": {
  26481. "type": "string"
  26482. },
  26483. "recent": {
  26484. "type": "string"
  26485. }
  26486. },
  26487. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  26488. "additionalProperties": false
  26489. }
  26490. },
  26491. "required": ["type", "id", "seq", "aggregateID", "data"],
  26492. "additionalProperties": false
  26493. }
  26494. },
  26495. "required": ["type", "id", "syncEvent"],
  26496. "additionalProperties": false
  26497. },
  26498. "SyncEventSessionNextRevertStaged": {
  26499. "type": "object",
  26500. "properties": {
  26501. "type": {
  26502. "type": "string",
  26503. "enum": ["sync"]
  26504. },
  26505. "id": {
  26506. "type": "string",
  26507. "pattern": "^evt_"
  26508. },
  26509. "syncEvent": {
  26510. "type": "object",
  26511. "properties": {
  26512. "type": {
  26513. "type": "string",
  26514. "enum": ["session.next.revert.staged.1"]
  26515. },
  26516. "id": {
  26517. "type": "string",
  26518. "pattern": "^evt_"
  26519. },
  26520. "seq": {
  26521. "type": "number"
  26522. },
  26523. "aggregateID": {
  26524. "type": "string"
  26525. },
  26526. "data": {
  26527. "type": "object",
  26528. "properties": {
  26529. "timestamp": {
  26530. "type": "number"
  26531. },
  26532. "sessionID": {
  26533. "type": "string",
  26534. "pattern": "^ses"
  26535. },
  26536. "revert": {
  26537. "$ref": "#/components/schemas/RevertState"
  26538. }
  26539. },
  26540. "required": ["timestamp", "sessionID", "revert"],
  26541. "additionalProperties": false
  26542. }
  26543. },
  26544. "required": ["type", "id", "seq", "aggregateID", "data"],
  26545. "additionalProperties": false
  26546. }
  26547. },
  26548. "required": ["type", "id", "syncEvent"],
  26549. "additionalProperties": false
  26550. },
  26551. "SyncEventSessionNextRevertCleared": {
  26552. "type": "object",
  26553. "properties": {
  26554. "type": {
  26555. "type": "string",
  26556. "enum": ["sync"]
  26557. },
  26558. "id": {
  26559. "type": "string",
  26560. "pattern": "^evt_"
  26561. },
  26562. "syncEvent": {
  26563. "type": "object",
  26564. "properties": {
  26565. "type": {
  26566. "type": "string",
  26567. "enum": ["session.next.revert.cleared.1"]
  26568. },
  26569. "id": {
  26570. "type": "string",
  26571. "pattern": "^evt_"
  26572. },
  26573. "seq": {
  26574. "type": "number"
  26575. },
  26576. "aggregateID": {
  26577. "type": "string"
  26578. },
  26579. "data": {
  26580. "type": "object",
  26581. "properties": {
  26582. "timestamp": {
  26583. "type": "number"
  26584. },
  26585. "sessionID": {
  26586. "type": "string",
  26587. "pattern": "^ses"
  26588. }
  26589. },
  26590. "required": ["timestamp", "sessionID"],
  26591. "additionalProperties": false
  26592. }
  26593. },
  26594. "required": ["type", "id", "seq", "aggregateID", "data"],
  26595. "additionalProperties": false
  26596. }
  26597. },
  26598. "required": ["type", "id", "syncEvent"],
  26599. "additionalProperties": false
  26600. },
  26601. "SyncEventSessionNextRevertCommitted": {
  26602. "type": "object",
  26603. "properties": {
  26604. "type": {
  26605. "type": "string",
  26606. "enum": ["sync"]
  26607. },
  26608. "id": {
  26609. "type": "string",
  26610. "pattern": "^evt_"
  26611. },
  26612. "syncEvent": {
  26613. "type": "object",
  26614. "properties": {
  26615. "type": {
  26616. "type": "string",
  26617. "enum": ["session.next.revert.committed.1"]
  26618. },
  26619. "id": {
  26620. "type": "string",
  26621. "pattern": "^evt_"
  26622. },
  26623. "seq": {
  26624. "type": "number"
  26625. },
  26626. "aggregateID": {
  26627. "type": "string"
  26628. },
  26629. "data": {
  26630. "type": "object",
  26631. "properties": {
  26632. "timestamp": {
  26633. "type": "number"
  26634. },
  26635. "sessionID": {
  26636. "type": "string",
  26637. "pattern": "^ses"
  26638. },
  26639. "messageID": {
  26640. "type": "string",
  26641. "pattern": "^msg_"
  26642. }
  26643. },
  26644. "required": ["timestamp", "sessionID", "messageID"],
  26645. "additionalProperties": false
  26646. }
  26647. },
  26648. "required": ["type", "id", "seq", "aggregateID", "data"],
  26649. "additionalProperties": false
  26650. }
  26651. },
  26652. "required": ["type", "id", "syncEvent"],
  26653. "additionalProperties": false
  26654. },
  26655. "ConfigV2ReferenceGit": {
  26656. "type": "object",
  26657. "properties": {
  26658. "repository": {
  26659. "type": "string"
  26660. },
  26661. "branch": {
  26662. "type": "string"
  26663. },
  26664. "description": {
  26665. "type": "string"
  26666. },
  26667. "hidden": {
  26668. "type": "boolean"
  26669. }
  26670. },
  26671. "required": ["repository"],
  26672. "additionalProperties": false
  26673. },
  26674. "ConfigV2ReferenceLocal": {
  26675. "type": "object",
  26676. "properties": {
  26677. "path": {
  26678. "type": "string"
  26679. },
  26680. "description": {
  26681. "type": "string"
  26682. },
  26683. "hidden": {
  26684. "type": "boolean"
  26685. }
  26686. },
  26687. "required": ["path"],
  26688. "additionalProperties": false
  26689. },
  26690. "PolicyEffect": {
  26691. "type": "string",
  26692. "enum": ["allow", "deny"]
  26693. },
  26694. "ConfigV2ExperimentalPolicy": {
  26695. "type": "object",
  26696. "properties": {
  26697. "action": {
  26698. "type": "string",
  26699. "enum": ["provider.use"]
  26700. },
  26701. "effect": {
  26702. "$ref": "#/components/schemas/PolicyEffect"
  26703. },
  26704. "resource": {
  26705. "type": "string"
  26706. }
  26707. },
  26708. "required": ["action", "effect", "resource"],
  26709. "additionalProperties": false
  26710. },
  26711. "ProjectDirectories": {
  26712. "type": "array",
  26713. "items": {
  26714. "type": "object",
  26715. "properties": {
  26716. "directory": {
  26717. "type": "string"
  26718. },
  26719. "strategy": {
  26720. "type": "string"
  26721. }
  26722. },
  26723. "required": ["directory"],
  26724. "additionalProperties": false
  26725. }
  26726. },
  26727. "PtyTicketConnectToken": {
  26728. "type": "object",
  26729. "properties": {
  26730. "ticket": {
  26731. "type": "string"
  26732. },
  26733. "expires_in": {
  26734. "type": "integer",
  26735. "exclusiveMinimum": 0
  26736. }
  26737. },
  26738. "required": ["ticket", "expires_in"],
  26739. "additionalProperties": false
  26740. },
  26741. "WorkspaceEventConnectionStatus": {
  26742. "type": "object",
  26743. "properties": {
  26744. "workspaceID": {
  26745. "type": "string",
  26746. "pattern": "^wrk"
  26747. },
  26748. "status": {
  26749. "type": "string",
  26750. "enum": ["connected", "connecting", "disconnected", "error"]
  26751. }
  26752. },
  26753. "required": ["workspaceID", "status"],
  26754. "additionalProperties": false
  26755. },
  26756. "LocationInfo": {
  26757. "type": "object",
  26758. "properties": {
  26759. "directory": {
  26760. "type": "string"
  26761. },
  26762. "workspaceID": {
  26763. "type": "string",
  26764. "pattern": "^wrk"
  26765. },
  26766. "project": {
  26767. "type": "object",
  26768. "properties": {
  26769. "id": {
  26770. "type": "string"
  26771. },
  26772. "directory": {
  26773. "type": "string"
  26774. }
  26775. },
  26776. "required": ["id", "directory"],
  26777. "additionalProperties": false
  26778. }
  26779. },
  26780. "required": ["directory", "project"],
  26781. "additionalProperties": false
  26782. },
  26783. "ProviderRequest": {
  26784. "type": "object",
  26785. "properties": {
  26786. "headers": {
  26787. "type": "object",
  26788. "additionalProperties": {
  26789. "type": "string"
  26790. }
  26791. },
  26792. "body": {
  26793. "type": "object"
  26794. }
  26795. },
  26796. "required": ["headers", "body"],
  26797. "additionalProperties": false
  26798. },
  26799. "AgentColor": {
  26800. "anyOf": [
  26801. {
  26802. "type": "string",
  26803. "pattern": "^#[0-9a-fA-F]{6}$"
  26804. },
  26805. {
  26806. "type": "string",
  26807. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  26808. }
  26809. ]
  26810. },
  26811. "PermissionV2Effect": {
  26812. "type": "string",
  26813. "enum": ["allow", "deny", "ask"]
  26814. },
  26815. "PermissionV2Rule": {
  26816. "type": "object",
  26817. "properties": {
  26818. "action": {
  26819. "type": "string"
  26820. },
  26821. "resource": {
  26822. "type": "string"
  26823. },
  26824. "effect": {
  26825. "$ref": "#/components/schemas/PermissionV2Effect"
  26826. }
  26827. },
  26828. "required": ["action", "resource", "effect"],
  26829. "additionalProperties": false
  26830. },
  26831. "PermissionV2Ruleset": {
  26832. "type": "array",
  26833. "items": {
  26834. "$ref": "#/components/schemas/PermissionV2Rule"
  26835. }
  26836. },
  26837. "AgentV2Info": {
  26838. "type": "object",
  26839. "properties": {
  26840. "id": {
  26841. "type": "string"
  26842. },
  26843. "model": {
  26844. "$ref": "#/components/schemas/ModelRef"
  26845. },
  26846. "request": {
  26847. "$ref": "#/components/schemas/ProviderRequest"
  26848. },
  26849. "system": {
  26850. "type": "string"
  26851. },
  26852. "description": {
  26853. "type": "string"
  26854. },
  26855. "mode": {
  26856. "type": "string",
  26857. "enum": ["subagent", "primary", "all"]
  26858. },
  26859. "hidden": {
  26860. "type": "boolean"
  26861. },
  26862. "color": {
  26863. "$ref": "#/components/schemas/AgentColor"
  26864. },
  26865. "steps": {
  26866. "type": "integer",
  26867. "exclusiveMinimum": 0
  26868. },
  26869. "permissions": {
  26870. "$ref": "#/components/schemas/PermissionV2Ruleset"
  26871. }
  26872. },
  26873. "required": ["id", "request", "mode", "hidden", "permissions"],
  26874. "additionalProperties": false
  26875. },
  26876. "SessionV2Info": {
  26877. "type": "object",
  26878. "properties": {
  26879. "id": {
  26880. "type": "string",
  26881. "pattern": "^ses"
  26882. },
  26883. "parentID": {
  26884. "type": "string",
  26885. "pattern": "^ses"
  26886. },
  26887. "projectID": {
  26888. "type": "string"
  26889. },
  26890. "agent": {
  26891. "type": "string"
  26892. },
  26893. "model": {
  26894. "$ref": "#/components/schemas/ModelRef"
  26895. },
  26896. "cost": {
  26897. "type": "number"
  26898. },
  26899. "tokens": {
  26900. "type": "object",
  26901. "properties": {
  26902. "input": {
  26903. "type": "number"
  26904. },
  26905. "output": {
  26906. "type": "number"
  26907. },
  26908. "reasoning": {
  26909. "type": "number"
  26910. },
  26911. "cache": {
  26912. "type": "object",
  26913. "properties": {
  26914. "read": {
  26915. "type": "number"
  26916. },
  26917. "write": {
  26918. "type": "number"
  26919. }
  26920. },
  26921. "required": ["read", "write"],
  26922. "additionalProperties": false
  26923. }
  26924. },
  26925. "required": ["input", "output", "reasoning", "cache"],
  26926. "additionalProperties": false
  26927. },
  26928. "time": {
  26929. "type": "object",
  26930. "properties": {
  26931. "created": {
  26932. "type": "number"
  26933. },
  26934. "updated": {
  26935. "type": "number"
  26936. },
  26937. "archived": {
  26938. "type": "number"
  26939. }
  26940. },
  26941. "required": ["created", "updated"],
  26942. "additionalProperties": false
  26943. },
  26944. "title": {
  26945. "type": "string"
  26946. },
  26947. "location": {
  26948. "$ref": "#/components/schemas/LocationRef"
  26949. },
  26950. "subpath": {
  26951. "type": "string"
  26952. },
  26953. "revert": {
  26954. "$ref": "#/components/schemas/RevertState"
  26955. }
  26956. },
  26957. "required": ["id", "projectID", "cost", "tokens", "time", "title", "location"],
  26958. "additionalProperties": false
  26959. },
  26960. "SessionInputAdmitted": {
  26961. "type": "object",
  26962. "properties": {
  26963. "admittedSeq": {
  26964. "type": "integer",
  26965. "minimum": 0
  26966. },
  26967. "id": {
  26968. "type": "string",
  26969. "pattern": "^msg_"
  26970. },
  26971. "sessionID": {
  26972. "type": "string",
  26973. "pattern": "^ses"
  26974. },
  26975. "prompt": {
  26976. "$ref": "#/components/schemas/Prompt"
  26977. },
  26978. "delivery": {
  26979. "type": "string",
  26980. "enum": ["steer", "queue"]
  26981. },
  26982. "timeCreated": {
  26983. "type": "number"
  26984. },
  26985. "promotedSeq": {
  26986. "type": "integer",
  26987. "minimum": 0
  26988. }
  26989. },
  26990. "required": ["admittedSeq", "id", "sessionID", "prompt", "delivery", "timeCreated"],
  26991. "additionalProperties": false
  26992. },
  26993. "SessionMessageAgentSwitched": {
  26994. "type": "object",
  26995. "properties": {
  26996. "id": {
  26997. "type": "string",
  26998. "pattern": "^msg_"
  26999. },
  27000. "metadata": {
  27001. "type": "object"
  27002. },
  27003. "time": {
  27004. "type": "object",
  27005. "properties": {
  27006. "created": {
  27007. "type": "number"
  27008. }
  27009. },
  27010. "required": ["created"],
  27011. "additionalProperties": false
  27012. },
  27013. "type": {
  27014. "type": "string",
  27015. "enum": ["agent-switched"]
  27016. },
  27017. "agent": {
  27018. "type": "string"
  27019. }
  27020. },
  27021. "required": ["id", "time", "type", "agent"],
  27022. "additionalProperties": false
  27023. },
  27024. "SessionMessageModelSwitched": {
  27025. "type": "object",
  27026. "properties": {
  27027. "id": {
  27028. "type": "string",
  27029. "pattern": "^msg_"
  27030. },
  27031. "metadata": {
  27032. "type": "object"
  27033. },
  27034. "time": {
  27035. "type": "object",
  27036. "properties": {
  27037. "created": {
  27038. "type": "number"
  27039. }
  27040. },
  27041. "required": ["created"],
  27042. "additionalProperties": false
  27043. },
  27044. "type": {
  27045. "type": "string",
  27046. "enum": ["model-switched"]
  27047. },
  27048. "model": {
  27049. "$ref": "#/components/schemas/ModelRef"
  27050. }
  27051. },
  27052. "required": ["id", "time", "type", "model"],
  27053. "additionalProperties": false
  27054. },
  27055. "SessionMessageUser": {
  27056. "type": "object",
  27057. "properties": {
  27058. "id": {
  27059. "type": "string",
  27060. "pattern": "^msg_"
  27061. },
  27062. "metadata": {
  27063. "type": "object"
  27064. },
  27065. "time": {
  27066. "type": "object",
  27067. "properties": {
  27068. "created": {
  27069. "type": "number"
  27070. }
  27071. },
  27072. "required": ["created"],
  27073. "additionalProperties": false
  27074. },
  27075. "text": {
  27076. "type": "string"
  27077. },
  27078. "files": {
  27079. "type": "array",
  27080. "items": {
  27081. "$ref": "#/components/schemas/PromptFileAttachment"
  27082. }
  27083. },
  27084. "agents": {
  27085. "type": "array",
  27086. "items": {
  27087. "$ref": "#/components/schemas/PromptAgentAttachment"
  27088. }
  27089. },
  27090. "type": {
  27091. "type": "string",
  27092. "enum": ["user"]
  27093. }
  27094. },
  27095. "required": ["id", "time", "text", "type"],
  27096. "additionalProperties": false
  27097. },
  27098. "SessionMessageSynthetic": {
  27099. "type": "object",
  27100. "properties": {
  27101. "id": {
  27102. "type": "string",
  27103. "pattern": "^msg_"
  27104. },
  27105. "metadata": {
  27106. "type": "object"
  27107. },
  27108. "time": {
  27109. "type": "object",
  27110. "properties": {
  27111. "created": {
  27112. "type": "number"
  27113. }
  27114. },
  27115. "required": ["created"],
  27116. "additionalProperties": false
  27117. },
  27118. "sessionID": {
  27119. "type": "string",
  27120. "pattern": "^ses"
  27121. },
  27122. "text": {
  27123. "type": "string"
  27124. },
  27125. "type": {
  27126. "type": "string",
  27127. "enum": ["synthetic"]
  27128. }
  27129. },
  27130. "required": ["id", "time", "sessionID", "text", "type"],
  27131. "additionalProperties": false
  27132. },
  27133. "SessionMessageSystem": {
  27134. "type": "object",
  27135. "properties": {
  27136. "id": {
  27137. "type": "string",
  27138. "pattern": "^msg_"
  27139. },
  27140. "metadata": {
  27141. "type": "object"
  27142. },
  27143. "time": {
  27144. "type": "object",
  27145. "properties": {
  27146. "created": {
  27147. "type": "number"
  27148. }
  27149. },
  27150. "required": ["created"],
  27151. "additionalProperties": false
  27152. },
  27153. "type": {
  27154. "type": "string",
  27155. "enum": ["system"]
  27156. },
  27157. "text": {
  27158. "type": "string"
  27159. }
  27160. },
  27161. "required": ["id", "time", "type", "text"],
  27162. "additionalProperties": false
  27163. },
  27164. "SessionMessageShell": {
  27165. "type": "object",
  27166. "properties": {
  27167. "id": {
  27168. "type": "string",
  27169. "pattern": "^msg_"
  27170. },
  27171. "metadata": {
  27172. "type": "object"
  27173. },
  27174. "time": {
  27175. "type": "object",
  27176. "properties": {
  27177. "created": {
  27178. "type": "number"
  27179. },
  27180. "completed": {
  27181. "type": "number"
  27182. }
  27183. },
  27184. "required": ["created"],
  27185. "additionalProperties": false
  27186. },
  27187. "type": {
  27188. "type": "string",
  27189. "enum": ["shell"]
  27190. },
  27191. "callID": {
  27192. "type": "string"
  27193. },
  27194. "command": {
  27195. "type": "string"
  27196. },
  27197. "output": {
  27198. "type": "string"
  27199. }
  27200. },
  27201. "required": ["id", "time", "type", "callID", "command", "output"],
  27202. "additionalProperties": false
  27203. },
  27204. "SessionMessageAssistantText": {
  27205. "type": "object",
  27206. "properties": {
  27207. "type": {
  27208. "type": "string",
  27209. "enum": ["text"]
  27210. },
  27211. "id": {
  27212. "type": "string"
  27213. },
  27214. "text": {
  27215. "type": "string"
  27216. }
  27217. },
  27218. "required": ["type", "id", "text"],
  27219. "additionalProperties": false
  27220. },
  27221. "SessionMessageAssistantReasoning": {
  27222. "type": "object",
  27223. "properties": {
  27224. "type": {
  27225. "type": "string",
  27226. "enum": ["reasoning"]
  27227. },
  27228. "id": {
  27229. "type": "string"
  27230. },
  27231. "text": {
  27232. "type": "string"
  27233. },
  27234. "providerMetadata": {
  27235. "$ref": "#/components/schemas/LLMProviderMetadata"
  27236. }
  27237. },
  27238. "required": ["type", "id", "text"],
  27239. "additionalProperties": false
  27240. },
  27241. "SessionMessageToolStatePending": {
  27242. "type": "object",
  27243. "properties": {
  27244. "status": {
  27245. "type": "string",
  27246. "enum": ["pending"]
  27247. },
  27248. "input": {
  27249. "type": "string"
  27250. }
  27251. },
  27252. "required": ["status", "input"],
  27253. "additionalProperties": false
  27254. },
  27255. "SessionMessageToolStateRunning": {
  27256. "type": "object",
  27257. "properties": {
  27258. "status": {
  27259. "type": "string",
  27260. "enum": ["running"]
  27261. },
  27262. "input": {
  27263. "type": "object"
  27264. },
  27265. "structured": {
  27266. "type": "object"
  27267. },
  27268. "content": {
  27269. "type": "array",
  27270. "items": {
  27271. "$ref": "#/components/schemas/LLMToolContent"
  27272. }
  27273. }
  27274. },
  27275. "required": ["status", "input", "structured", "content"],
  27276. "additionalProperties": false
  27277. },
  27278. "SessionMessageToolStateCompleted": {
  27279. "type": "object",
  27280. "properties": {
  27281. "status": {
  27282. "type": "string",
  27283. "enum": ["completed"]
  27284. },
  27285. "input": {
  27286. "type": "object"
  27287. },
  27288. "attachments": {
  27289. "type": "array",
  27290. "items": {
  27291. "$ref": "#/components/schemas/PromptFileAttachment"
  27292. }
  27293. },
  27294. "content": {
  27295. "type": "array",
  27296. "items": {
  27297. "$ref": "#/components/schemas/LLMToolContent"
  27298. }
  27299. },
  27300. "outputPaths": {
  27301. "type": "array",
  27302. "items": {
  27303. "type": "string"
  27304. }
  27305. },
  27306. "structured": {
  27307. "type": "object"
  27308. },
  27309. "result": {}
  27310. },
  27311. "required": ["status", "input", "content", "structured"],
  27312. "additionalProperties": false
  27313. },
  27314. "SessionMessageToolStateError": {
  27315. "type": "object",
  27316. "properties": {
  27317. "status": {
  27318. "type": "string",
  27319. "enum": ["error"]
  27320. },
  27321. "input": {
  27322. "type": "object"
  27323. },
  27324. "content": {
  27325. "type": "array",
  27326. "items": {
  27327. "$ref": "#/components/schemas/LLMToolContent"
  27328. }
  27329. },
  27330. "structured": {
  27331. "type": "object"
  27332. },
  27333. "error": {
  27334. "$ref": "#/components/schemas/SessionErrorUnknown"
  27335. },
  27336. "result": {}
  27337. },
  27338. "required": ["status", "input", "content", "structured", "error"],
  27339. "additionalProperties": false
  27340. },
  27341. "SessionMessageAssistantTool": {
  27342. "type": "object",
  27343. "properties": {
  27344. "type": {
  27345. "type": "string",
  27346. "enum": ["tool"]
  27347. },
  27348. "id": {
  27349. "type": "string"
  27350. },
  27351. "name": {
  27352. "type": "string"
  27353. },
  27354. "provider": {
  27355. "type": "object",
  27356. "properties": {
  27357. "executed": {
  27358. "type": "boolean"
  27359. },
  27360. "metadata": {
  27361. "$ref": "#/components/schemas/LLMProviderMetadata"
  27362. },
  27363. "resultMetadata": {
  27364. "$ref": "#/components/schemas/LLMProviderMetadata"
  27365. }
  27366. },
  27367. "required": ["executed"],
  27368. "additionalProperties": false
  27369. },
  27370. "state": {
  27371. "anyOf": [
  27372. {
  27373. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  27374. },
  27375. {
  27376. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  27377. },
  27378. {
  27379. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  27380. },
  27381. {
  27382. "$ref": "#/components/schemas/SessionMessageToolStateError"
  27383. }
  27384. ]
  27385. },
  27386. "time": {
  27387. "type": "object",
  27388. "properties": {
  27389. "created": {
  27390. "type": "number"
  27391. },
  27392. "ran": {
  27393. "type": "number"
  27394. },
  27395. "completed": {
  27396. "type": "number"
  27397. },
  27398. "pruned": {
  27399. "type": "number"
  27400. }
  27401. },
  27402. "required": ["created"],
  27403. "additionalProperties": false
  27404. }
  27405. },
  27406. "required": ["type", "id", "name", "state", "time"],
  27407. "additionalProperties": false
  27408. },
  27409. "SessionMessageAssistant": {
  27410. "type": "object",
  27411. "properties": {
  27412. "id": {
  27413. "type": "string",
  27414. "pattern": "^msg_"
  27415. },
  27416. "metadata": {
  27417. "type": "object"
  27418. },
  27419. "time": {
  27420. "type": "object",
  27421. "properties": {
  27422. "created": {
  27423. "type": "number"
  27424. },
  27425. "completed": {
  27426. "type": "number"
  27427. }
  27428. },
  27429. "required": ["created"],
  27430. "additionalProperties": false
  27431. },
  27432. "type": {
  27433. "type": "string",
  27434. "enum": ["assistant"]
  27435. },
  27436. "agent": {
  27437. "type": "string"
  27438. },
  27439. "model": {
  27440. "$ref": "#/components/schemas/ModelRef"
  27441. },
  27442. "content": {
  27443. "type": "array",
  27444. "items": {
  27445. "anyOf": [
  27446. {
  27447. "$ref": "#/components/schemas/SessionMessageAssistantText"
  27448. },
  27449. {
  27450. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  27451. },
  27452. {
  27453. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  27454. }
  27455. ]
  27456. }
  27457. },
  27458. "snapshot": {
  27459. "type": "object",
  27460. "properties": {
  27461. "start": {
  27462. "type": "string"
  27463. },
  27464. "end": {
  27465. "type": "string"
  27466. },
  27467. "files": {
  27468. "type": "array",
  27469. "items": {
  27470. "type": "string"
  27471. }
  27472. }
  27473. },
  27474. "additionalProperties": false
  27475. },
  27476. "finish": {
  27477. "type": "string"
  27478. },
  27479. "cost": {
  27480. "type": "number"
  27481. },
  27482. "tokens": {
  27483. "type": "object",
  27484. "properties": {
  27485. "input": {
  27486. "type": "number"
  27487. },
  27488. "output": {
  27489. "type": "number"
  27490. },
  27491. "reasoning": {
  27492. "type": "number"
  27493. },
  27494. "cache": {
  27495. "type": "object",
  27496. "properties": {
  27497. "read": {
  27498. "type": "number"
  27499. },
  27500. "write": {
  27501. "type": "number"
  27502. }
  27503. },
  27504. "required": ["read", "write"],
  27505. "additionalProperties": false
  27506. }
  27507. },
  27508. "required": ["input", "output", "reasoning", "cache"],
  27509. "additionalProperties": false
  27510. },
  27511. "error": {
  27512. "$ref": "#/components/schemas/SessionErrorUnknown"
  27513. }
  27514. },
  27515. "required": ["id", "time", "type", "agent", "model", "content"],
  27516. "additionalProperties": false
  27517. },
  27518. "SessionMessageCompaction": {
  27519. "type": "object",
  27520. "properties": {
  27521. "type": {
  27522. "type": "string",
  27523. "enum": ["compaction"]
  27524. },
  27525. "reason": {
  27526. "type": "string",
  27527. "enum": ["auto", "manual"]
  27528. },
  27529. "summary": {
  27530. "type": "string"
  27531. },
  27532. "recent": {
  27533. "type": "string"
  27534. },
  27535. "id": {
  27536. "type": "string",
  27537. "pattern": "^msg_"
  27538. },
  27539. "metadata": {
  27540. "type": "object"
  27541. },
  27542. "time": {
  27543. "type": "object",
  27544. "properties": {
  27545. "created": {
  27546. "type": "number"
  27547. }
  27548. },
  27549. "required": ["created"],
  27550. "additionalProperties": false
  27551. }
  27552. },
  27553. "required": ["type", "reason", "summary", "recent", "id", "time"],
  27554. "additionalProperties": false
  27555. },
  27556. "SessionMessage": {
  27557. "anyOf": [
  27558. {
  27559. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  27560. },
  27561. {
  27562. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  27563. },
  27564. {
  27565. "$ref": "#/components/schemas/SessionMessageUser"
  27566. },
  27567. {
  27568. "$ref": "#/components/schemas/SessionMessageSynthetic"
  27569. },
  27570. {
  27571. "$ref": "#/components/schemas/SessionMessageSystem"
  27572. },
  27573. {
  27574. "$ref": "#/components/schemas/SessionMessageShell"
  27575. },
  27576. {
  27577. "$ref": "#/components/schemas/SessionMessageAssistant"
  27578. },
  27579. {
  27580. "$ref": "#/components/schemas/SessionMessageCompaction"
  27581. }
  27582. ]
  27583. },
  27584. "SessionNextAgentSwitched": {
  27585. "type": "object",
  27586. "properties": {
  27587. "id": {
  27588. "type": "string",
  27589. "pattern": "^evt_"
  27590. },
  27591. "metadata": {
  27592. "type": "object"
  27593. },
  27594. "type": {
  27595. "type": "string",
  27596. "enum": ["session.next.agent.switched"]
  27597. },
  27598. "durable": {
  27599. "type": "object",
  27600. "properties": {
  27601. "aggregateID": {
  27602. "type": "string"
  27603. },
  27604. "seq": {
  27605. "anyOf": [
  27606. {
  27607. "type": "number"
  27608. },
  27609. {
  27610. "type": "string",
  27611. "enum": ["NaN"]
  27612. },
  27613. {
  27614. "type": "string",
  27615. "enum": ["Infinity"]
  27616. },
  27617. {
  27618. "type": "string",
  27619. "enum": ["-Infinity"]
  27620. }
  27621. ]
  27622. },
  27623. "version": {
  27624. "anyOf": [
  27625. {
  27626. "type": "number"
  27627. },
  27628. {
  27629. "type": "string",
  27630. "enum": ["NaN"]
  27631. },
  27632. {
  27633. "type": "string",
  27634. "enum": ["Infinity"]
  27635. },
  27636. {
  27637. "type": "string",
  27638. "enum": ["-Infinity"]
  27639. }
  27640. ]
  27641. }
  27642. },
  27643. "required": ["aggregateID", "seq", "version"],
  27644. "additionalProperties": false
  27645. },
  27646. "location": {
  27647. "$ref": "#/components/schemas/LocationRef"
  27648. },
  27649. "data": {
  27650. "type": "object",
  27651. "properties": {
  27652. "timestamp": {
  27653. "type": "number"
  27654. },
  27655. "sessionID": {
  27656. "type": "string",
  27657. "pattern": "^ses"
  27658. },
  27659. "messageID": {
  27660. "type": "string",
  27661. "pattern": "^msg_"
  27662. },
  27663. "agent": {
  27664. "type": "string"
  27665. }
  27666. },
  27667. "required": ["timestamp", "sessionID", "messageID", "agent"],
  27668. "additionalProperties": false
  27669. }
  27670. },
  27671. "required": ["id", "type", "data"],
  27672. "additionalProperties": false
  27673. },
  27674. "SessionNextModelSwitched": {
  27675. "type": "object",
  27676. "properties": {
  27677. "id": {
  27678. "type": "string",
  27679. "pattern": "^evt_"
  27680. },
  27681. "metadata": {
  27682. "type": "object"
  27683. },
  27684. "type": {
  27685. "type": "string",
  27686. "enum": ["session.next.model.switched"]
  27687. },
  27688. "durable": {
  27689. "type": "object",
  27690. "properties": {
  27691. "aggregateID": {
  27692. "type": "string"
  27693. },
  27694. "seq": {
  27695. "anyOf": [
  27696. {
  27697. "type": "number"
  27698. },
  27699. {
  27700. "type": "string",
  27701. "enum": ["NaN"]
  27702. },
  27703. {
  27704. "type": "string",
  27705. "enum": ["Infinity"]
  27706. },
  27707. {
  27708. "type": "string",
  27709. "enum": ["-Infinity"]
  27710. }
  27711. ]
  27712. },
  27713. "version": {
  27714. "anyOf": [
  27715. {
  27716. "type": "number"
  27717. },
  27718. {
  27719. "type": "string",
  27720. "enum": ["NaN"]
  27721. },
  27722. {
  27723. "type": "string",
  27724. "enum": ["Infinity"]
  27725. },
  27726. {
  27727. "type": "string",
  27728. "enum": ["-Infinity"]
  27729. }
  27730. ]
  27731. }
  27732. },
  27733. "required": ["aggregateID", "seq", "version"],
  27734. "additionalProperties": false
  27735. },
  27736. "location": {
  27737. "$ref": "#/components/schemas/LocationRef"
  27738. },
  27739. "data": {
  27740. "type": "object",
  27741. "properties": {
  27742. "timestamp": {
  27743. "type": "number"
  27744. },
  27745. "sessionID": {
  27746. "type": "string",
  27747. "pattern": "^ses"
  27748. },
  27749. "messageID": {
  27750. "type": "string",
  27751. "pattern": "^msg_"
  27752. },
  27753. "model": {
  27754. "$ref": "#/components/schemas/ModelRef"
  27755. }
  27756. },
  27757. "required": ["timestamp", "sessionID", "messageID", "model"],
  27758. "additionalProperties": false
  27759. }
  27760. },
  27761. "required": ["id", "type", "data"],
  27762. "additionalProperties": false
  27763. },
  27764. "SessionNextMoved": {
  27765. "type": "object",
  27766. "properties": {
  27767. "id": {
  27768. "type": "string",
  27769. "pattern": "^evt_"
  27770. },
  27771. "metadata": {
  27772. "type": "object"
  27773. },
  27774. "type": {
  27775. "type": "string",
  27776. "enum": ["session.next.moved"]
  27777. },
  27778. "durable": {
  27779. "type": "object",
  27780. "properties": {
  27781. "aggregateID": {
  27782. "type": "string"
  27783. },
  27784. "seq": {
  27785. "anyOf": [
  27786. {
  27787. "type": "number"
  27788. },
  27789. {
  27790. "type": "string",
  27791. "enum": ["NaN"]
  27792. },
  27793. {
  27794. "type": "string",
  27795. "enum": ["Infinity"]
  27796. },
  27797. {
  27798. "type": "string",
  27799. "enum": ["-Infinity"]
  27800. }
  27801. ]
  27802. },
  27803. "version": {
  27804. "anyOf": [
  27805. {
  27806. "type": "number"
  27807. },
  27808. {
  27809. "type": "string",
  27810. "enum": ["NaN"]
  27811. },
  27812. {
  27813. "type": "string",
  27814. "enum": ["Infinity"]
  27815. },
  27816. {
  27817. "type": "string",
  27818. "enum": ["-Infinity"]
  27819. }
  27820. ]
  27821. }
  27822. },
  27823. "required": ["aggregateID", "seq", "version"],
  27824. "additionalProperties": false
  27825. },
  27826. "location": {
  27827. "$ref": "#/components/schemas/LocationRef"
  27828. },
  27829. "data": {
  27830. "type": "object",
  27831. "properties": {
  27832. "timestamp": {
  27833. "type": "number"
  27834. },
  27835. "sessionID": {
  27836. "type": "string",
  27837. "pattern": "^ses"
  27838. },
  27839. "location": {
  27840. "$ref": "#/components/schemas/LocationRef"
  27841. },
  27842. "subdirectory": {
  27843. "type": "string"
  27844. }
  27845. },
  27846. "required": ["timestamp", "sessionID", "location"],
  27847. "additionalProperties": false
  27848. }
  27849. },
  27850. "required": ["id", "type", "data"],
  27851. "additionalProperties": false
  27852. },
  27853. "SessionNextPrompted": {
  27854. "type": "object",
  27855. "properties": {
  27856. "id": {
  27857. "type": "string",
  27858. "pattern": "^evt_"
  27859. },
  27860. "metadata": {
  27861. "type": "object"
  27862. },
  27863. "type": {
  27864. "type": "string",
  27865. "enum": ["session.next.prompted"]
  27866. },
  27867. "durable": {
  27868. "type": "object",
  27869. "properties": {
  27870. "aggregateID": {
  27871. "type": "string"
  27872. },
  27873. "seq": {
  27874. "anyOf": [
  27875. {
  27876. "type": "number"
  27877. },
  27878. {
  27879. "type": "string",
  27880. "enum": ["NaN"]
  27881. },
  27882. {
  27883. "type": "string",
  27884. "enum": ["Infinity"]
  27885. },
  27886. {
  27887. "type": "string",
  27888. "enum": ["-Infinity"]
  27889. }
  27890. ]
  27891. },
  27892. "version": {
  27893. "anyOf": [
  27894. {
  27895. "type": "number"
  27896. },
  27897. {
  27898. "type": "string",
  27899. "enum": ["NaN"]
  27900. },
  27901. {
  27902. "type": "string",
  27903. "enum": ["Infinity"]
  27904. },
  27905. {
  27906. "type": "string",
  27907. "enum": ["-Infinity"]
  27908. }
  27909. ]
  27910. }
  27911. },
  27912. "required": ["aggregateID", "seq", "version"],
  27913. "additionalProperties": false
  27914. },
  27915. "location": {
  27916. "$ref": "#/components/schemas/LocationRef"
  27917. },
  27918. "data": {
  27919. "type": "object",
  27920. "properties": {
  27921. "timestamp": {
  27922. "type": "number"
  27923. },
  27924. "sessionID": {
  27925. "type": "string",
  27926. "pattern": "^ses"
  27927. },
  27928. "messageID": {
  27929. "type": "string",
  27930. "pattern": "^msg_"
  27931. },
  27932. "prompt": {
  27933. "$ref": "#/components/schemas/Prompt"
  27934. },
  27935. "delivery": {
  27936. "type": "string",
  27937. "enum": ["steer", "queue"]
  27938. }
  27939. },
  27940. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  27941. "additionalProperties": false
  27942. }
  27943. },
  27944. "required": ["id", "type", "data"],
  27945. "additionalProperties": false
  27946. },
  27947. "SessionNextPromptAdmitted": {
  27948. "type": "object",
  27949. "properties": {
  27950. "id": {
  27951. "type": "string",
  27952. "pattern": "^evt_"
  27953. },
  27954. "metadata": {
  27955. "type": "object"
  27956. },
  27957. "type": {
  27958. "type": "string",
  27959. "enum": ["session.next.prompt.admitted"]
  27960. },
  27961. "durable": {
  27962. "type": "object",
  27963. "properties": {
  27964. "aggregateID": {
  27965. "type": "string"
  27966. },
  27967. "seq": {
  27968. "anyOf": [
  27969. {
  27970. "type": "number"
  27971. },
  27972. {
  27973. "type": "string",
  27974. "enum": ["NaN"]
  27975. },
  27976. {
  27977. "type": "string",
  27978. "enum": ["Infinity"]
  27979. },
  27980. {
  27981. "type": "string",
  27982. "enum": ["-Infinity"]
  27983. }
  27984. ]
  27985. },
  27986. "version": {
  27987. "anyOf": [
  27988. {
  27989. "type": "number"
  27990. },
  27991. {
  27992. "type": "string",
  27993. "enum": ["NaN"]
  27994. },
  27995. {
  27996. "type": "string",
  27997. "enum": ["Infinity"]
  27998. },
  27999. {
  28000. "type": "string",
  28001. "enum": ["-Infinity"]
  28002. }
  28003. ]
  28004. }
  28005. },
  28006. "required": ["aggregateID", "seq", "version"],
  28007. "additionalProperties": false
  28008. },
  28009. "location": {
  28010. "$ref": "#/components/schemas/LocationRef"
  28011. },
  28012. "data": {
  28013. "type": "object",
  28014. "properties": {
  28015. "timestamp": {
  28016. "type": "number"
  28017. },
  28018. "sessionID": {
  28019. "type": "string",
  28020. "pattern": "^ses"
  28021. },
  28022. "messageID": {
  28023. "type": "string",
  28024. "pattern": "^msg_"
  28025. },
  28026. "prompt": {
  28027. "$ref": "#/components/schemas/Prompt"
  28028. },
  28029. "delivery": {
  28030. "type": "string",
  28031. "enum": ["steer", "queue"]
  28032. }
  28033. },
  28034. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  28035. "additionalProperties": false
  28036. }
  28037. },
  28038. "required": ["id", "type", "data"],
  28039. "additionalProperties": false
  28040. },
  28041. "SessionNextContextUpdated": {
  28042. "type": "object",
  28043. "properties": {
  28044. "id": {
  28045. "type": "string",
  28046. "pattern": "^evt_"
  28047. },
  28048. "metadata": {
  28049. "type": "object"
  28050. },
  28051. "type": {
  28052. "type": "string",
  28053. "enum": ["session.next.context.updated"]
  28054. },
  28055. "durable": {
  28056. "type": "object",
  28057. "properties": {
  28058. "aggregateID": {
  28059. "type": "string"
  28060. },
  28061. "seq": {
  28062. "anyOf": [
  28063. {
  28064. "type": "number"
  28065. },
  28066. {
  28067. "type": "string",
  28068. "enum": ["NaN"]
  28069. },
  28070. {
  28071. "type": "string",
  28072. "enum": ["Infinity"]
  28073. },
  28074. {
  28075. "type": "string",
  28076. "enum": ["-Infinity"]
  28077. }
  28078. ]
  28079. },
  28080. "version": {
  28081. "anyOf": [
  28082. {
  28083. "type": "number"
  28084. },
  28085. {
  28086. "type": "string",
  28087. "enum": ["NaN"]
  28088. },
  28089. {
  28090. "type": "string",
  28091. "enum": ["Infinity"]
  28092. },
  28093. {
  28094. "type": "string",
  28095. "enum": ["-Infinity"]
  28096. }
  28097. ]
  28098. }
  28099. },
  28100. "required": ["aggregateID", "seq", "version"],
  28101. "additionalProperties": false
  28102. },
  28103. "location": {
  28104. "$ref": "#/components/schemas/LocationRef"
  28105. },
  28106. "data": {
  28107. "type": "object",
  28108. "properties": {
  28109. "timestamp": {
  28110. "type": "number"
  28111. },
  28112. "sessionID": {
  28113. "type": "string",
  28114. "pattern": "^ses"
  28115. },
  28116. "messageID": {
  28117. "type": "string",
  28118. "pattern": "^msg_"
  28119. },
  28120. "text": {
  28121. "type": "string"
  28122. }
  28123. },
  28124. "required": ["timestamp", "sessionID", "messageID", "text"],
  28125. "additionalProperties": false
  28126. }
  28127. },
  28128. "required": ["id", "type", "data"],
  28129. "additionalProperties": false
  28130. },
  28131. "SessionNextSynthetic": {
  28132. "type": "object",
  28133. "properties": {
  28134. "id": {
  28135. "type": "string",
  28136. "pattern": "^evt_"
  28137. },
  28138. "metadata": {
  28139. "type": "object"
  28140. },
  28141. "type": {
  28142. "type": "string",
  28143. "enum": ["session.next.synthetic"]
  28144. },
  28145. "durable": {
  28146. "type": "object",
  28147. "properties": {
  28148. "aggregateID": {
  28149. "type": "string"
  28150. },
  28151. "seq": {
  28152. "anyOf": [
  28153. {
  28154. "type": "number"
  28155. },
  28156. {
  28157. "type": "string",
  28158. "enum": ["NaN"]
  28159. },
  28160. {
  28161. "type": "string",
  28162. "enum": ["Infinity"]
  28163. },
  28164. {
  28165. "type": "string",
  28166. "enum": ["-Infinity"]
  28167. }
  28168. ]
  28169. },
  28170. "version": {
  28171. "anyOf": [
  28172. {
  28173. "type": "number"
  28174. },
  28175. {
  28176. "type": "string",
  28177. "enum": ["NaN"]
  28178. },
  28179. {
  28180. "type": "string",
  28181. "enum": ["Infinity"]
  28182. },
  28183. {
  28184. "type": "string",
  28185. "enum": ["-Infinity"]
  28186. }
  28187. ]
  28188. }
  28189. },
  28190. "required": ["aggregateID", "seq", "version"],
  28191. "additionalProperties": false
  28192. },
  28193. "location": {
  28194. "$ref": "#/components/schemas/LocationRef"
  28195. },
  28196. "data": {
  28197. "type": "object",
  28198. "properties": {
  28199. "timestamp": {
  28200. "type": "number"
  28201. },
  28202. "sessionID": {
  28203. "type": "string",
  28204. "pattern": "^ses"
  28205. },
  28206. "messageID": {
  28207. "type": "string",
  28208. "pattern": "^msg_"
  28209. },
  28210. "text": {
  28211. "type": "string"
  28212. }
  28213. },
  28214. "required": ["timestamp", "sessionID", "messageID", "text"],
  28215. "additionalProperties": false
  28216. }
  28217. },
  28218. "required": ["id", "type", "data"],
  28219. "additionalProperties": false
  28220. },
  28221. "SessionNextShellStarted": {
  28222. "type": "object",
  28223. "properties": {
  28224. "id": {
  28225. "type": "string",
  28226. "pattern": "^evt_"
  28227. },
  28228. "metadata": {
  28229. "type": "object"
  28230. },
  28231. "type": {
  28232. "type": "string",
  28233. "enum": ["session.next.shell.started"]
  28234. },
  28235. "durable": {
  28236. "type": "object",
  28237. "properties": {
  28238. "aggregateID": {
  28239. "type": "string"
  28240. },
  28241. "seq": {
  28242. "anyOf": [
  28243. {
  28244. "type": "number"
  28245. },
  28246. {
  28247. "type": "string",
  28248. "enum": ["NaN"]
  28249. },
  28250. {
  28251. "type": "string",
  28252. "enum": ["Infinity"]
  28253. },
  28254. {
  28255. "type": "string",
  28256. "enum": ["-Infinity"]
  28257. }
  28258. ]
  28259. },
  28260. "version": {
  28261. "anyOf": [
  28262. {
  28263. "type": "number"
  28264. },
  28265. {
  28266. "type": "string",
  28267. "enum": ["NaN"]
  28268. },
  28269. {
  28270. "type": "string",
  28271. "enum": ["Infinity"]
  28272. },
  28273. {
  28274. "type": "string",
  28275. "enum": ["-Infinity"]
  28276. }
  28277. ]
  28278. }
  28279. },
  28280. "required": ["aggregateID", "seq", "version"],
  28281. "additionalProperties": false
  28282. },
  28283. "location": {
  28284. "$ref": "#/components/schemas/LocationRef"
  28285. },
  28286. "data": {
  28287. "type": "object",
  28288. "properties": {
  28289. "timestamp": {
  28290. "type": "number"
  28291. },
  28292. "sessionID": {
  28293. "type": "string",
  28294. "pattern": "^ses"
  28295. },
  28296. "messageID": {
  28297. "type": "string",
  28298. "pattern": "^msg_"
  28299. },
  28300. "callID": {
  28301. "type": "string"
  28302. },
  28303. "command": {
  28304. "type": "string"
  28305. }
  28306. },
  28307. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  28308. "additionalProperties": false
  28309. }
  28310. },
  28311. "required": ["id", "type", "data"],
  28312. "additionalProperties": false
  28313. },
  28314. "SessionNextShellEnded": {
  28315. "type": "object",
  28316. "properties": {
  28317. "id": {
  28318. "type": "string",
  28319. "pattern": "^evt_"
  28320. },
  28321. "metadata": {
  28322. "type": "object"
  28323. },
  28324. "type": {
  28325. "type": "string",
  28326. "enum": ["session.next.shell.ended"]
  28327. },
  28328. "durable": {
  28329. "type": "object",
  28330. "properties": {
  28331. "aggregateID": {
  28332. "type": "string"
  28333. },
  28334. "seq": {
  28335. "anyOf": [
  28336. {
  28337. "type": "number"
  28338. },
  28339. {
  28340. "type": "string",
  28341. "enum": ["NaN"]
  28342. },
  28343. {
  28344. "type": "string",
  28345. "enum": ["Infinity"]
  28346. },
  28347. {
  28348. "type": "string",
  28349. "enum": ["-Infinity"]
  28350. }
  28351. ]
  28352. },
  28353. "version": {
  28354. "anyOf": [
  28355. {
  28356. "type": "number"
  28357. },
  28358. {
  28359. "type": "string",
  28360. "enum": ["NaN"]
  28361. },
  28362. {
  28363. "type": "string",
  28364. "enum": ["Infinity"]
  28365. },
  28366. {
  28367. "type": "string",
  28368. "enum": ["-Infinity"]
  28369. }
  28370. ]
  28371. }
  28372. },
  28373. "required": ["aggregateID", "seq", "version"],
  28374. "additionalProperties": false
  28375. },
  28376. "location": {
  28377. "$ref": "#/components/schemas/LocationRef"
  28378. },
  28379. "data": {
  28380. "type": "object",
  28381. "properties": {
  28382. "timestamp": {
  28383. "type": "number"
  28384. },
  28385. "sessionID": {
  28386. "type": "string",
  28387. "pattern": "^ses"
  28388. },
  28389. "callID": {
  28390. "type": "string"
  28391. },
  28392. "output": {
  28393. "type": "string"
  28394. }
  28395. },
  28396. "required": ["timestamp", "sessionID", "callID", "output"],
  28397. "additionalProperties": false
  28398. }
  28399. },
  28400. "required": ["id", "type", "data"],
  28401. "additionalProperties": false
  28402. },
  28403. "SessionNextStepStarted": {
  28404. "type": "object",
  28405. "properties": {
  28406. "id": {
  28407. "type": "string",
  28408. "pattern": "^evt_"
  28409. },
  28410. "metadata": {
  28411. "type": "object"
  28412. },
  28413. "type": {
  28414. "type": "string",
  28415. "enum": ["session.next.step.started"]
  28416. },
  28417. "durable": {
  28418. "type": "object",
  28419. "properties": {
  28420. "aggregateID": {
  28421. "type": "string"
  28422. },
  28423. "seq": {
  28424. "anyOf": [
  28425. {
  28426. "type": "number"
  28427. },
  28428. {
  28429. "type": "string",
  28430. "enum": ["NaN"]
  28431. },
  28432. {
  28433. "type": "string",
  28434. "enum": ["Infinity"]
  28435. },
  28436. {
  28437. "type": "string",
  28438. "enum": ["-Infinity"]
  28439. }
  28440. ]
  28441. },
  28442. "version": {
  28443. "anyOf": [
  28444. {
  28445. "type": "number"
  28446. },
  28447. {
  28448. "type": "string",
  28449. "enum": ["NaN"]
  28450. },
  28451. {
  28452. "type": "string",
  28453. "enum": ["Infinity"]
  28454. },
  28455. {
  28456. "type": "string",
  28457. "enum": ["-Infinity"]
  28458. }
  28459. ]
  28460. }
  28461. },
  28462. "required": ["aggregateID", "seq", "version"],
  28463. "additionalProperties": false
  28464. },
  28465. "location": {
  28466. "$ref": "#/components/schemas/LocationRef"
  28467. },
  28468. "data": {
  28469. "type": "object",
  28470. "properties": {
  28471. "timestamp": {
  28472. "type": "number"
  28473. },
  28474. "sessionID": {
  28475. "type": "string",
  28476. "pattern": "^ses"
  28477. },
  28478. "assistantMessageID": {
  28479. "type": "string",
  28480. "pattern": "^msg_"
  28481. },
  28482. "agent": {
  28483. "type": "string"
  28484. },
  28485. "model": {
  28486. "$ref": "#/components/schemas/ModelRef"
  28487. },
  28488. "snapshot": {
  28489. "type": "string"
  28490. }
  28491. },
  28492. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  28493. "additionalProperties": false
  28494. }
  28495. },
  28496. "required": ["id", "type", "data"],
  28497. "additionalProperties": false
  28498. },
  28499. "SessionNextStepEnded": {
  28500. "type": "object",
  28501. "properties": {
  28502. "id": {
  28503. "type": "string",
  28504. "pattern": "^evt_"
  28505. },
  28506. "metadata": {
  28507. "type": "object"
  28508. },
  28509. "type": {
  28510. "type": "string",
  28511. "enum": ["session.next.step.ended"]
  28512. },
  28513. "durable": {
  28514. "type": "object",
  28515. "properties": {
  28516. "aggregateID": {
  28517. "type": "string"
  28518. },
  28519. "seq": {
  28520. "anyOf": [
  28521. {
  28522. "type": "number"
  28523. },
  28524. {
  28525. "type": "string",
  28526. "enum": ["NaN"]
  28527. },
  28528. {
  28529. "type": "string",
  28530. "enum": ["Infinity"]
  28531. },
  28532. {
  28533. "type": "string",
  28534. "enum": ["-Infinity"]
  28535. }
  28536. ]
  28537. },
  28538. "version": {
  28539. "anyOf": [
  28540. {
  28541. "type": "number"
  28542. },
  28543. {
  28544. "type": "string",
  28545. "enum": ["NaN"]
  28546. },
  28547. {
  28548. "type": "string",
  28549. "enum": ["Infinity"]
  28550. },
  28551. {
  28552. "type": "string",
  28553. "enum": ["-Infinity"]
  28554. }
  28555. ]
  28556. }
  28557. },
  28558. "required": ["aggregateID", "seq", "version"],
  28559. "additionalProperties": false
  28560. },
  28561. "location": {
  28562. "$ref": "#/components/schemas/LocationRef"
  28563. },
  28564. "data": {
  28565. "type": "object",
  28566. "properties": {
  28567. "timestamp": {
  28568. "type": "number"
  28569. },
  28570. "sessionID": {
  28571. "type": "string",
  28572. "pattern": "^ses"
  28573. },
  28574. "assistantMessageID": {
  28575. "type": "string",
  28576. "pattern": "^msg_"
  28577. },
  28578. "finish": {
  28579. "type": "string"
  28580. },
  28581. "cost": {
  28582. "type": "number"
  28583. },
  28584. "tokens": {
  28585. "type": "object",
  28586. "properties": {
  28587. "input": {
  28588. "type": "number"
  28589. },
  28590. "output": {
  28591. "type": "number"
  28592. },
  28593. "reasoning": {
  28594. "type": "number"
  28595. },
  28596. "cache": {
  28597. "type": "object",
  28598. "properties": {
  28599. "read": {
  28600. "type": "number"
  28601. },
  28602. "write": {
  28603. "type": "number"
  28604. }
  28605. },
  28606. "required": ["read", "write"],
  28607. "additionalProperties": false
  28608. }
  28609. },
  28610. "required": ["input", "output", "reasoning", "cache"],
  28611. "additionalProperties": false
  28612. },
  28613. "snapshot": {
  28614. "type": "string"
  28615. },
  28616. "files": {
  28617. "type": "array",
  28618. "items": {
  28619. "type": "string"
  28620. }
  28621. }
  28622. },
  28623. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  28624. "additionalProperties": false
  28625. }
  28626. },
  28627. "required": ["id", "type", "data"],
  28628. "additionalProperties": false
  28629. },
  28630. "SessionNextStepFailed": {
  28631. "type": "object",
  28632. "properties": {
  28633. "id": {
  28634. "type": "string",
  28635. "pattern": "^evt_"
  28636. },
  28637. "metadata": {
  28638. "type": "object"
  28639. },
  28640. "type": {
  28641. "type": "string",
  28642. "enum": ["session.next.step.failed"]
  28643. },
  28644. "durable": {
  28645. "type": "object",
  28646. "properties": {
  28647. "aggregateID": {
  28648. "type": "string"
  28649. },
  28650. "seq": {
  28651. "anyOf": [
  28652. {
  28653. "type": "number"
  28654. },
  28655. {
  28656. "type": "string",
  28657. "enum": ["NaN"]
  28658. },
  28659. {
  28660. "type": "string",
  28661. "enum": ["Infinity"]
  28662. },
  28663. {
  28664. "type": "string",
  28665. "enum": ["-Infinity"]
  28666. }
  28667. ]
  28668. },
  28669. "version": {
  28670. "anyOf": [
  28671. {
  28672. "type": "number"
  28673. },
  28674. {
  28675. "type": "string",
  28676. "enum": ["NaN"]
  28677. },
  28678. {
  28679. "type": "string",
  28680. "enum": ["Infinity"]
  28681. },
  28682. {
  28683. "type": "string",
  28684. "enum": ["-Infinity"]
  28685. }
  28686. ]
  28687. }
  28688. },
  28689. "required": ["aggregateID", "seq", "version"],
  28690. "additionalProperties": false
  28691. },
  28692. "location": {
  28693. "$ref": "#/components/schemas/LocationRef"
  28694. },
  28695. "data": {
  28696. "type": "object",
  28697. "properties": {
  28698. "timestamp": {
  28699. "type": "number"
  28700. },
  28701. "sessionID": {
  28702. "type": "string",
  28703. "pattern": "^ses"
  28704. },
  28705. "assistantMessageID": {
  28706. "type": "string",
  28707. "pattern": "^msg_"
  28708. },
  28709. "error": {
  28710. "$ref": "#/components/schemas/SessionErrorUnknown"
  28711. }
  28712. },
  28713. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  28714. "additionalProperties": false
  28715. }
  28716. },
  28717. "required": ["id", "type", "data"],
  28718. "additionalProperties": false
  28719. },
  28720. "SessionNextTextStarted": {
  28721. "type": "object",
  28722. "properties": {
  28723. "id": {
  28724. "type": "string",
  28725. "pattern": "^evt_"
  28726. },
  28727. "metadata": {
  28728. "type": "object"
  28729. },
  28730. "type": {
  28731. "type": "string",
  28732. "enum": ["session.next.text.started"]
  28733. },
  28734. "durable": {
  28735. "type": "object",
  28736. "properties": {
  28737. "aggregateID": {
  28738. "type": "string"
  28739. },
  28740. "seq": {
  28741. "anyOf": [
  28742. {
  28743. "type": "number"
  28744. },
  28745. {
  28746. "type": "string",
  28747. "enum": ["NaN"]
  28748. },
  28749. {
  28750. "type": "string",
  28751. "enum": ["Infinity"]
  28752. },
  28753. {
  28754. "type": "string",
  28755. "enum": ["-Infinity"]
  28756. }
  28757. ]
  28758. },
  28759. "version": {
  28760. "anyOf": [
  28761. {
  28762. "type": "number"
  28763. },
  28764. {
  28765. "type": "string",
  28766. "enum": ["NaN"]
  28767. },
  28768. {
  28769. "type": "string",
  28770. "enum": ["Infinity"]
  28771. },
  28772. {
  28773. "type": "string",
  28774. "enum": ["-Infinity"]
  28775. }
  28776. ]
  28777. }
  28778. },
  28779. "required": ["aggregateID", "seq", "version"],
  28780. "additionalProperties": false
  28781. },
  28782. "location": {
  28783. "$ref": "#/components/schemas/LocationRef"
  28784. },
  28785. "data": {
  28786. "type": "object",
  28787. "properties": {
  28788. "timestamp": {
  28789. "type": "number"
  28790. },
  28791. "sessionID": {
  28792. "type": "string",
  28793. "pattern": "^ses"
  28794. },
  28795. "assistantMessageID": {
  28796. "type": "string",
  28797. "pattern": "^msg_"
  28798. },
  28799. "textID": {
  28800. "type": "string"
  28801. }
  28802. },
  28803. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  28804. "additionalProperties": false
  28805. }
  28806. },
  28807. "required": ["id", "type", "data"],
  28808. "additionalProperties": false
  28809. },
  28810. "SessionNextTextEnded": {
  28811. "type": "object",
  28812. "properties": {
  28813. "id": {
  28814. "type": "string",
  28815. "pattern": "^evt_"
  28816. },
  28817. "metadata": {
  28818. "type": "object"
  28819. },
  28820. "type": {
  28821. "type": "string",
  28822. "enum": ["session.next.text.ended"]
  28823. },
  28824. "durable": {
  28825. "type": "object",
  28826. "properties": {
  28827. "aggregateID": {
  28828. "type": "string"
  28829. },
  28830. "seq": {
  28831. "anyOf": [
  28832. {
  28833. "type": "number"
  28834. },
  28835. {
  28836. "type": "string",
  28837. "enum": ["NaN"]
  28838. },
  28839. {
  28840. "type": "string",
  28841. "enum": ["Infinity"]
  28842. },
  28843. {
  28844. "type": "string",
  28845. "enum": ["-Infinity"]
  28846. }
  28847. ]
  28848. },
  28849. "version": {
  28850. "anyOf": [
  28851. {
  28852. "type": "number"
  28853. },
  28854. {
  28855. "type": "string",
  28856. "enum": ["NaN"]
  28857. },
  28858. {
  28859. "type": "string",
  28860. "enum": ["Infinity"]
  28861. },
  28862. {
  28863. "type": "string",
  28864. "enum": ["-Infinity"]
  28865. }
  28866. ]
  28867. }
  28868. },
  28869. "required": ["aggregateID", "seq", "version"],
  28870. "additionalProperties": false
  28871. },
  28872. "location": {
  28873. "$ref": "#/components/schemas/LocationRef"
  28874. },
  28875. "data": {
  28876. "type": "object",
  28877. "properties": {
  28878. "timestamp": {
  28879. "type": "number"
  28880. },
  28881. "sessionID": {
  28882. "type": "string",
  28883. "pattern": "^ses"
  28884. },
  28885. "assistantMessageID": {
  28886. "type": "string",
  28887. "pattern": "^msg_"
  28888. },
  28889. "textID": {
  28890. "type": "string"
  28891. },
  28892. "text": {
  28893. "type": "string"
  28894. }
  28895. },
  28896. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  28897. "additionalProperties": false
  28898. }
  28899. },
  28900. "required": ["id", "type", "data"],
  28901. "additionalProperties": false
  28902. },
  28903. "SessionNextToolInputStarted": {
  28904. "type": "object",
  28905. "properties": {
  28906. "id": {
  28907. "type": "string",
  28908. "pattern": "^evt_"
  28909. },
  28910. "metadata": {
  28911. "type": "object"
  28912. },
  28913. "type": {
  28914. "type": "string",
  28915. "enum": ["session.next.tool.input.started"]
  28916. },
  28917. "durable": {
  28918. "type": "object",
  28919. "properties": {
  28920. "aggregateID": {
  28921. "type": "string"
  28922. },
  28923. "seq": {
  28924. "anyOf": [
  28925. {
  28926. "type": "number"
  28927. },
  28928. {
  28929. "type": "string",
  28930. "enum": ["NaN"]
  28931. },
  28932. {
  28933. "type": "string",
  28934. "enum": ["Infinity"]
  28935. },
  28936. {
  28937. "type": "string",
  28938. "enum": ["-Infinity"]
  28939. }
  28940. ]
  28941. },
  28942. "version": {
  28943. "anyOf": [
  28944. {
  28945. "type": "number"
  28946. },
  28947. {
  28948. "type": "string",
  28949. "enum": ["NaN"]
  28950. },
  28951. {
  28952. "type": "string",
  28953. "enum": ["Infinity"]
  28954. },
  28955. {
  28956. "type": "string",
  28957. "enum": ["-Infinity"]
  28958. }
  28959. ]
  28960. }
  28961. },
  28962. "required": ["aggregateID", "seq", "version"],
  28963. "additionalProperties": false
  28964. },
  28965. "location": {
  28966. "$ref": "#/components/schemas/LocationRef"
  28967. },
  28968. "data": {
  28969. "type": "object",
  28970. "properties": {
  28971. "timestamp": {
  28972. "type": "number"
  28973. },
  28974. "sessionID": {
  28975. "type": "string",
  28976. "pattern": "^ses"
  28977. },
  28978. "assistantMessageID": {
  28979. "type": "string",
  28980. "pattern": "^msg_"
  28981. },
  28982. "callID": {
  28983. "type": "string"
  28984. },
  28985. "name": {
  28986. "type": "string"
  28987. }
  28988. },
  28989. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  28990. "additionalProperties": false
  28991. }
  28992. },
  28993. "required": ["id", "type", "data"],
  28994. "additionalProperties": false
  28995. },
  28996. "SessionNextToolInputEnded": {
  28997. "type": "object",
  28998. "properties": {
  28999. "id": {
  29000. "type": "string",
  29001. "pattern": "^evt_"
  29002. },
  29003. "metadata": {
  29004. "type": "object"
  29005. },
  29006. "type": {
  29007. "type": "string",
  29008. "enum": ["session.next.tool.input.ended"]
  29009. },
  29010. "durable": {
  29011. "type": "object",
  29012. "properties": {
  29013. "aggregateID": {
  29014. "type": "string"
  29015. },
  29016. "seq": {
  29017. "anyOf": [
  29018. {
  29019. "type": "number"
  29020. },
  29021. {
  29022. "type": "string",
  29023. "enum": ["NaN"]
  29024. },
  29025. {
  29026. "type": "string",
  29027. "enum": ["Infinity"]
  29028. },
  29029. {
  29030. "type": "string",
  29031. "enum": ["-Infinity"]
  29032. }
  29033. ]
  29034. },
  29035. "version": {
  29036. "anyOf": [
  29037. {
  29038. "type": "number"
  29039. },
  29040. {
  29041. "type": "string",
  29042. "enum": ["NaN"]
  29043. },
  29044. {
  29045. "type": "string",
  29046. "enum": ["Infinity"]
  29047. },
  29048. {
  29049. "type": "string",
  29050. "enum": ["-Infinity"]
  29051. }
  29052. ]
  29053. }
  29054. },
  29055. "required": ["aggregateID", "seq", "version"],
  29056. "additionalProperties": false
  29057. },
  29058. "location": {
  29059. "$ref": "#/components/schemas/LocationRef"
  29060. },
  29061. "data": {
  29062. "type": "object",
  29063. "properties": {
  29064. "timestamp": {
  29065. "type": "number"
  29066. },
  29067. "sessionID": {
  29068. "type": "string",
  29069. "pattern": "^ses"
  29070. },
  29071. "assistantMessageID": {
  29072. "type": "string",
  29073. "pattern": "^msg_"
  29074. },
  29075. "callID": {
  29076. "type": "string"
  29077. },
  29078. "text": {
  29079. "type": "string"
  29080. }
  29081. },
  29082. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  29083. "additionalProperties": false
  29084. }
  29085. },
  29086. "required": ["id", "type", "data"],
  29087. "additionalProperties": false
  29088. },
  29089. "SessionNextToolCalled": {
  29090. "type": "object",
  29091. "properties": {
  29092. "id": {
  29093. "type": "string",
  29094. "pattern": "^evt_"
  29095. },
  29096. "metadata": {
  29097. "type": "object"
  29098. },
  29099. "type": {
  29100. "type": "string",
  29101. "enum": ["session.next.tool.called"]
  29102. },
  29103. "durable": {
  29104. "type": "object",
  29105. "properties": {
  29106. "aggregateID": {
  29107. "type": "string"
  29108. },
  29109. "seq": {
  29110. "anyOf": [
  29111. {
  29112. "type": "number"
  29113. },
  29114. {
  29115. "type": "string",
  29116. "enum": ["NaN"]
  29117. },
  29118. {
  29119. "type": "string",
  29120. "enum": ["Infinity"]
  29121. },
  29122. {
  29123. "type": "string",
  29124. "enum": ["-Infinity"]
  29125. }
  29126. ]
  29127. },
  29128. "version": {
  29129. "anyOf": [
  29130. {
  29131. "type": "number"
  29132. },
  29133. {
  29134. "type": "string",
  29135. "enum": ["NaN"]
  29136. },
  29137. {
  29138. "type": "string",
  29139. "enum": ["Infinity"]
  29140. },
  29141. {
  29142. "type": "string",
  29143. "enum": ["-Infinity"]
  29144. }
  29145. ]
  29146. }
  29147. },
  29148. "required": ["aggregateID", "seq", "version"],
  29149. "additionalProperties": false
  29150. },
  29151. "location": {
  29152. "$ref": "#/components/schemas/LocationRef"
  29153. },
  29154. "data": {
  29155. "type": "object",
  29156. "properties": {
  29157. "timestamp": {
  29158. "type": "number"
  29159. },
  29160. "sessionID": {
  29161. "type": "string",
  29162. "pattern": "^ses"
  29163. },
  29164. "assistantMessageID": {
  29165. "type": "string",
  29166. "pattern": "^msg_"
  29167. },
  29168. "callID": {
  29169. "type": "string"
  29170. },
  29171. "tool": {
  29172. "type": "string"
  29173. },
  29174. "input": {
  29175. "type": "object"
  29176. },
  29177. "provider": {
  29178. "type": "object",
  29179. "properties": {
  29180. "executed": {
  29181. "type": "boolean"
  29182. },
  29183. "metadata": {
  29184. "$ref": "#/components/schemas/LLMProviderMetadata"
  29185. }
  29186. },
  29187. "required": ["executed"],
  29188. "additionalProperties": false
  29189. }
  29190. },
  29191. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  29192. "additionalProperties": false
  29193. }
  29194. },
  29195. "required": ["id", "type", "data"],
  29196. "additionalProperties": false
  29197. },
  29198. "SessionNextToolProgress": {
  29199. "type": "object",
  29200. "properties": {
  29201. "id": {
  29202. "type": "string",
  29203. "pattern": "^evt_"
  29204. },
  29205. "metadata": {
  29206. "type": "object"
  29207. },
  29208. "type": {
  29209. "type": "string",
  29210. "enum": ["session.next.tool.progress"]
  29211. },
  29212. "durable": {
  29213. "type": "object",
  29214. "properties": {
  29215. "aggregateID": {
  29216. "type": "string"
  29217. },
  29218. "seq": {
  29219. "anyOf": [
  29220. {
  29221. "type": "number"
  29222. },
  29223. {
  29224. "type": "string",
  29225. "enum": ["NaN"]
  29226. },
  29227. {
  29228. "type": "string",
  29229. "enum": ["Infinity"]
  29230. },
  29231. {
  29232. "type": "string",
  29233. "enum": ["-Infinity"]
  29234. }
  29235. ]
  29236. },
  29237. "version": {
  29238. "anyOf": [
  29239. {
  29240. "type": "number"
  29241. },
  29242. {
  29243. "type": "string",
  29244. "enum": ["NaN"]
  29245. },
  29246. {
  29247. "type": "string",
  29248. "enum": ["Infinity"]
  29249. },
  29250. {
  29251. "type": "string",
  29252. "enum": ["-Infinity"]
  29253. }
  29254. ]
  29255. }
  29256. },
  29257. "required": ["aggregateID", "seq", "version"],
  29258. "additionalProperties": false
  29259. },
  29260. "location": {
  29261. "$ref": "#/components/schemas/LocationRef"
  29262. },
  29263. "data": {
  29264. "type": "object",
  29265. "properties": {
  29266. "timestamp": {
  29267. "type": "number"
  29268. },
  29269. "sessionID": {
  29270. "type": "string",
  29271. "pattern": "^ses"
  29272. },
  29273. "assistantMessageID": {
  29274. "type": "string",
  29275. "pattern": "^msg_"
  29276. },
  29277. "callID": {
  29278. "type": "string"
  29279. },
  29280. "structured": {
  29281. "type": "object"
  29282. },
  29283. "content": {
  29284. "type": "array",
  29285. "items": {
  29286. "$ref": "#/components/schemas/LLMToolContent"
  29287. }
  29288. }
  29289. },
  29290. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  29291. "additionalProperties": false
  29292. }
  29293. },
  29294. "required": ["id", "type", "data"],
  29295. "additionalProperties": false
  29296. },
  29297. "SessionNextToolSuccess": {
  29298. "type": "object",
  29299. "properties": {
  29300. "id": {
  29301. "type": "string",
  29302. "pattern": "^evt_"
  29303. },
  29304. "metadata": {
  29305. "type": "object"
  29306. },
  29307. "type": {
  29308. "type": "string",
  29309. "enum": ["session.next.tool.success"]
  29310. },
  29311. "durable": {
  29312. "type": "object",
  29313. "properties": {
  29314. "aggregateID": {
  29315. "type": "string"
  29316. },
  29317. "seq": {
  29318. "anyOf": [
  29319. {
  29320. "type": "number"
  29321. },
  29322. {
  29323. "type": "string",
  29324. "enum": ["NaN"]
  29325. },
  29326. {
  29327. "type": "string",
  29328. "enum": ["Infinity"]
  29329. },
  29330. {
  29331. "type": "string",
  29332. "enum": ["-Infinity"]
  29333. }
  29334. ]
  29335. },
  29336. "version": {
  29337. "anyOf": [
  29338. {
  29339. "type": "number"
  29340. },
  29341. {
  29342. "type": "string",
  29343. "enum": ["NaN"]
  29344. },
  29345. {
  29346. "type": "string",
  29347. "enum": ["Infinity"]
  29348. },
  29349. {
  29350. "type": "string",
  29351. "enum": ["-Infinity"]
  29352. }
  29353. ]
  29354. }
  29355. },
  29356. "required": ["aggregateID", "seq", "version"],
  29357. "additionalProperties": false
  29358. },
  29359. "location": {
  29360. "$ref": "#/components/schemas/LocationRef"
  29361. },
  29362. "data": {
  29363. "type": "object",
  29364. "properties": {
  29365. "timestamp": {
  29366. "type": "number"
  29367. },
  29368. "sessionID": {
  29369. "type": "string",
  29370. "pattern": "^ses"
  29371. },
  29372. "assistantMessageID": {
  29373. "type": "string",
  29374. "pattern": "^msg_"
  29375. },
  29376. "callID": {
  29377. "type": "string"
  29378. },
  29379. "structured": {
  29380. "type": "object"
  29381. },
  29382. "content": {
  29383. "type": "array",
  29384. "items": {
  29385. "$ref": "#/components/schemas/LLMToolContent"
  29386. }
  29387. },
  29388. "outputPaths": {
  29389. "type": "array",
  29390. "items": {
  29391. "type": "string"
  29392. }
  29393. },
  29394. "result": {},
  29395. "provider": {
  29396. "type": "object",
  29397. "properties": {
  29398. "executed": {
  29399. "type": "boolean"
  29400. },
  29401. "metadata": {
  29402. "$ref": "#/components/schemas/LLMProviderMetadata"
  29403. }
  29404. },
  29405. "required": ["executed"],
  29406. "additionalProperties": false
  29407. }
  29408. },
  29409. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  29410. "additionalProperties": false
  29411. }
  29412. },
  29413. "required": ["id", "type", "data"],
  29414. "additionalProperties": false
  29415. },
  29416. "SessionNextToolFailed": {
  29417. "type": "object",
  29418. "properties": {
  29419. "id": {
  29420. "type": "string",
  29421. "pattern": "^evt_"
  29422. },
  29423. "metadata": {
  29424. "type": "object"
  29425. },
  29426. "type": {
  29427. "type": "string",
  29428. "enum": ["session.next.tool.failed"]
  29429. },
  29430. "durable": {
  29431. "type": "object",
  29432. "properties": {
  29433. "aggregateID": {
  29434. "type": "string"
  29435. },
  29436. "seq": {
  29437. "anyOf": [
  29438. {
  29439. "type": "number"
  29440. },
  29441. {
  29442. "type": "string",
  29443. "enum": ["NaN"]
  29444. },
  29445. {
  29446. "type": "string",
  29447. "enum": ["Infinity"]
  29448. },
  29449. {
  29450. "type": "string",
  29451. "enum": ["-Infinity"]
  29452. }
  29453. ]
  29454. },
  29455. "version": {
  29456. "anyOf": [
  29457. {
  29458. "type": "number"
  29459. },
  29460. {
  29461. "type": "string",
  29462. "enum": ["NaN"]
  29463. },
  29464. {
  29465. "type": "string",
  29466. "enum": ["Infinity"]
  29467. },
  29468. {
  29469. "type": "string",
  29470. "enum": ["-Infinity"]
  29471. }
  29472. ]
  29473. }
  29474. },
  29475. "required": ["aggregateID", "seq", "version"],
  29476. "additionalProperties": false
  29477. },
  29478. "location": {
  29479. "$ref": "#/components/schemas/LocationRef"
  29480. },
  29481. "data": {
  29482. "type": "object",
  29483. "properties": {
  29484. "timestamp": {
  29485. "type": "number"
  29486. },
  29487. "sessionID": {
  29488. "type": "string",
  29489. "pattern": "^ses"
  29490. },
  29491. "assistantMessageID": {
  29492. "type": "string",
  29493. "pattern": "^msg_"
  29494. },
  29495. "callID": {
  29496. "type": "string"
  29497. },
  29498. "error": {
  29499. "$ref": "#/components/schemas/SessionErrorUnknown"
  29500. },
  29501. "result": {},
  29502. "provider": {
  29503. "type": "object",
  29504. "properties": {
  29505. "executed": {
  29506. "type": "boolean"
  29507. },
  29508. "metadata": {
  29509. "$ref": "#/components/schemas/LLMProviderMetadata"
  29510. }
  29511. },
  29512. "required": ["executed"],
  29513. "additionalProperties": false
  29514. }
  29515. },
  29516. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  29517. "additionalProperties": false
  29518. }
  29519. },
  29520. "required": ["id", "type", "data"],
  29521. "additionalProperties": false
  29522. },
  29523. "SessionNextReasoningStarted": {
  29524. "type": "object",
  29525. "properties": {
  29526. "id": {
  29527. "type": "string",
  29528. "pattern": "^evt_"
  29529. },
  29530. "metadata": {
  29531. "type": "object"
  29532. },
  29533. "type": {
  29534. "type": "string",
  29535. "enum": ["session.next.reasoning.started"]
  29536. },
  29537. "durable": {
  29538. "type": "object",
  29539. "properties": {
  29540. "aggregateID": {
  29541. "type": "string"
  29542. },
  29543. "seq": {
  29544. "anyOf": [
  29545. {
  29546. "type": "number"
  29547. },
  29548. {
  29549. "type": "string",
  29550. "enum": ["NaN"]
  29551. },
  29552. {
  29553. "type": "string",
  29554. "enum": ["Infinity"]
  29555. },
  29556. {
  29557. "type": "string",
  29558. "enum": ["-Infinity"]
  29559. }
  29560. ]
  29561. },
  29562. "version": {
  29563. "anyOf": [
  29564. {
  29565. "type": "number"
  29566. },
  29567. {
  29568. "type": "string",
  29569. "enum": ["NaN"]
  29570. },
  29571. {
  29572. "type": "string",
  29573. "enum": ["Infinity"]
  29574. },
  29575. {
  29576. "type": "string",
  29577. "enum": ["-Infinity"]
  29578. }
  29579. ]
  29580. }
  29581. },
  29582. "required": ["aggregateID", "seq", "version"],
  29583. "additionalProperties": false
  29584. },
  29585. "location": {
  29586. "$ref": "#/components/schemas/LocationRef"
  29587. },
  29588. "data": {
  29589. "type": "object",
  29590. "properties": {
  29591. "timestamp": {
  29592. "type": "number"
  29593. },
  29594. "sessionID": {
  29595. "type": "string",
  29596. "pattern": "^ses"
  29597. },
  29598. "assistantMessageID": {
  29599. "type": "string",
  29600. "pattern": "^msg_"
  29601. },
  29602. "reasoningID": {
  29603. "type": "string"
  29604. },
  29605. "providerMetadata": {
  29606. "$ref": "#/components/schemas/LLMProviderMetadata"
  29607. }
  29608. },
  29609. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  29610. "additionalProperties": false
  29611. }
  29612. },
  29613. "required": ["id", "type", "data"],
  29614. "additionalProperties": false
  29615. },
  29616. "SessionNextReasoningEnded": {
  29617. "type": "object",
  29618. "properties": {
  29619. "id": {
  29620. "type": "string",
  29621. "pattern": "^evt_"
  29622. },
  29623. "metadata": {
  29624. "type": "object"
  29625. },
  29626. "type": {
  29627. "type": "string",
  29628. "enum": ["session.next.reasoning.ended"]
  29629. },
  29630. "durable": {
  29631. "type": "object",
  29632. "properties": {
  29633. "aggregateID": {
  29634. "type": "string"
  29635. },
  29636. "seq": {
  29637. "anyOf": [
  29638. {
  29639. "type": "number"
  29640. },
  29641. {
  29642. "type": "string",
  29643. "enum": ["NaN"]
  29644. },
  29645. {
  29646. "type": "string",
  29647. "enum": ["Infinity"]
  29648. },
  29649. {
  29650. "type": "string",
  29651. "enum": ["-Infinity"]
  29652. }
  29653. ]
  29654. },
  29655. "version": {
  29656. "anyOf": [
  29657. {
  29658. "type": "number"
  29659. },
  29660. {
  29661. "type": "string",
  29662. "enum": ["NaN"]
  29663. },
  29664. {
  29665. "type": "string",
  29666. "enum": ["Infinity"]
  29667. },
  29668. {
  29669. "type": "string",
  29670. "enum": ["-Infinity"]
  29671. }
  29672. ]
  29673. }
  29674. },
  29675. "required": ["aggregateID", "seq", "version"],
  29676. "additionalProperties": false
  29677. },
  29678. "location": {
  29679. "$ref": "#/components/schemas/LocationRef"
  29680. },
  29681. "data": {
  29682. "type": "object",
  29683. "properties": {
  29684. "timestamp": {
  29685. "type": "number"
  29686. },
  29687. "sessionID": {
  29688. "type": "string",
  29689. "pattern": "^ses"
  29690. },
  29691. "assistantMessageID": {
  29692. "type": "string",
  29693. "pattern": "^msg_"
  29694. },
  29695. "reasoningID": {
  29696. "type": "string"
  29697. },
  29698. "text": {
  29699. "type": "string"
  29700. },
  29701. "providerMetadata": {
  29702. "$ref": "#/components/schemas/LLMProviderMetadata"
  29703. }
  29704. },
  29705. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  29706. "additionalProperties": false
  29707. }
  29708. },
  29709. "required": ["id", "type", "data"],
  29710. "additionalProperties": false
  29711. },
  29712. "SessionNextRetried": {
  29713. "type": "object",
  29714. "properties": {
  29715. "id": {
  29716. "type": "string",
  29717. "pattern": "^evt_"
  29718. },
  29719. "metadata": {
  29720. "type": "object"
  29721. },
  29722. "type": {
  29723. "type": "string",
  29724. "enum": ["session.next.retried"]
  29725. },
  29726. "durable": {
  29727. "type": "object",
  29728. "properties": {
  29729. "aggregateID": {
  29730. "type": "string"
  29731. },
  29732. "seq": {
  29733. "anyOf": [
  29734. {
  29735. "type": "number"
  29736. },
  29737. {
  29738. "type": "string",
  29739. "enum": ["NaN"]
  29740. },
  29741. {
  29742. "type": "string",
  29743. "enum": ["Infinity"]
  29744. },
  29745. {
  29746. "type": "string",
  29747. "enum": ["-Infinity"]
  29748. }
  29749. ]
  29750. },
  29751. "version": {
  29752. "anyOf": [
  29753. {
  29754. "type": "number"
  29755. },
  29756. {
  29757. "type": "string",
  29758. "enum": ["NaN"]
  29759. },
  29760. {
  29761. "type": "string",
  29762. "enum": ["Infinity"]
  29763. },
  29764. {
  29765. "type": "string",
  29766. "enum": ["-Infinity"]
  29767. }
  29768. ]
  29769. }
  29770. },
  29771. "required": ["aggregateID", "seq", "version"],
  29772. "additionalProperties": false
  29773. },
  29774. "location": {
  29775. "$ref": "#/components/schemas/LocationRef"
  29776. },
  29777. "data": {
  29778. "type": "object",
  29779. "properties": {
  29780. "timestamp": {
  29781. "type": "number"
  29782. },
  29783. "sessionID": {
  29784. "type": "string",
  29785. "pattern": "^ses"
  29786. },
  29787. "attempt": {
  29788. "type": "number"
  29789. },
  29790. "error": {
  29791. "$ref": "#/components/schemas/SessionNextRetry_error"
  29792. }
  29793. },
  29794. "required": ["timestamp", "sessionID", "attempt", "error"],
  29795. "additionalProperties": false
  29796. }
  29797. },
  29798. "required": ["id", "type", "data"],
  29799. "additionalProperties": false
  29800. },
  29801. "SessionNextCompactionStarted": {
  29802. "type": "object",
  29803. "properties": {
  29804. "id": {
  29805. "type": "string",
  29806. "pattern": "^evt_"
  29807. },
  29808. "metadata": {
  29809. "type": "object"
  29810. },
  29811. "type": {
  29812. "type": "string",
  29813. "enum": ["session.next.compaction.started"]
  29814. },
  29815. "durable": {
  29816. "type": "object",
  29817. "properties": {
  29818. "aggregateID": {
  29819. "type": "string"
  29820. },
  29821. "seq": {
  29822. "anyOf": [
  29823. {
  29824. "type": "number"
  29825. },
  29826. {
  29827. "type": "string",
  29828. "enum": ["NaN"]
  29829. },
  29830. {
  29831. "type": "string",
  29832. "enum": ["Infinity"]
  29833. },
  29834. {
  29835. "type": "string",
  29836. "enum": ["-Infinity"]
  29837. }
  29838. ]
  29839. },
  29840. "version": {
  29841. "anyOf": [
  29842. {
  29843. "type": "number"
  29844. },
  29845. {
  29846. "type": "string",
  29847. "enum": ["NaN"]
  29848. },
  29849. {
  29850. "type": "string",
  29851. "enum": ["Infinity"]
  29852. },
  29853. {
  29854. "type": "string",
  29855. "enum": ["-Infinity"]
  29856. }
  29857. ]
  29858. }
  29859. },
  29860. "required": ["aggregateID", "seq", "version"],
  29861. "additionalProperties": false
  29862. },
  29863. "location": {
  29864. "$ref": "#/components/schemas/LocationRef"
  29865. },
  29866. "data": {
  29867. "type": "object",
  29868. "properties": {
  29869. "timestamp": {
  29870. "type": "number"
  29871. },
  29872. "sessionID": {
  29873. "type": "string",
  29874. "pattern": "^ses"
  29875. },
  29876. "messageID": {
  29877. "type": "string",
  29878. "pattern": "^msg_"
  29879. },
  29880. "reason": {
  29881. "type": "string",
  29882. "enum": ["auto", "manual"]
  29883. }
  29884. },
  29885. "required": ["timestamp", "sessionID", "messageID", "reason"],
  29886. "additionalProperties": false
  29887. }
  29888. },
  29889. "required": ["id", "type", "data"],
  29890. "additionalProperties": false
  29891. },
  29892. "SessionNextCompactionEnded": {
  29893. "type": "object",
  29894. "properties": {
  29895. "id": {
  29896. "type": "string",
  29897. "pattern": "^evt_"
  29898. },
  29899. "metadata": {
  29900. "type": "object"
  29901. },
  29902. "type": {
  29903. "type": "string",
  29904. "enum": ["session.next.compaction.ended"]
  29905. },
  29906. "durable": {
  29907. "type": "object",
  29908. "properties": {
  29909. "aggregateID": {
  29910. "type": "string"
  29911. },
  29912. "seq": {
  29913. "anyOf": [
  29914. {
  29915. "type": "number"
  29916. },
  29917. {
  29918. "type": "string",
  29919. "enum": ["NaN"]
  29920. },
  29921. {
  29922. "type": "string",
  29923. "enum": ["Infinity"]
  29924. },
  29925. {
  29926. "type": "string",
  29927. "enum": ["-Infinity"]
  29928. }
  29929. ]
  29930. },
  29931. "version": {
  29932. "anyOf": [
  29933. {
  29934. "type": "number"
  29935. },
  29936. {
  29937. "type": "string",
  29938. "enum": ["NaN"]
  29939. },
  29940. {
  29941. "type": "string",
  29942. "enum": ["Infinity"]
  29943. },
  29944. {
  29945. "type": "string",
  29946. "enum": ["-Infinity"]
  29947. }
  29948. ]
  29949. }
  29950. },
  29951. "required": ["aggregateID", "seq", "version"],
  29952. "additionalProperties": false
  29953. },
  29954. "location": {
  29955. "$ref": "#/components/schemas/LocationRef"
  29956. },
  29957. "data": {
  29958. "type": "object",
  29959. "properties": {
  29960. "timestamp": {
  29961. "type": "number"
  29962. },
  29963. "sessionID": {
  29964. "type": "string",
  29965. "pattern": "^ses"
  29966. },
  29967. "messageID": {
  29968. "type": "string",
  29969. "pattern": "^msg_"
  29970. },
  29971. "reason": {
  29972. "type": "string",
  29973. "enum": ["auto", "manual"]
  29974. },
  29975. "text": {
  29976. "type": "string"
  29977. },
  29978. "recent": {
  29979. "type": "string"
  29980. }
  29981. },
  29982. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  29983. "additionalProperties": false
  29984. }
  29985. },
  29986. "required": ["id", "type", "data"],
  29987. "additionalProperties": false
  29988. },
  29989. "SessionNextRevertStaged": {
  29990. "type": "object",
  29991. "properties": {
  29992. "id": {
  29993. "type": "string",
  29994. "pattern": "^evt_"
  29995. },
  29996. "metadata": {
  29997. "type": "object"
  29998. },
  29999. "type": {
  30000. "type": "string",
  30001. "enum": ["session.next.revert.staged"]
  30002. },
  30003. "durable": {
  30004. "type": "object",
  30005. "properties": {
  30006. "aggregateID": {
  30007. "type": "string"
  30008. },
  30009. "seq": {
  30010. "anyOf": [
  30011. {
  30012. "type": "number"
  30013. },
  30014. {
  30015. "type": "string",
  30016. "enum": ["NaN"]
  30017. },
  30018. {
  30019. "type": "string",
  30020. "enum": ["Infinity"]
  30021. },
  30022. {
  30023. "type": "string",
  30024. "enum": ["-Infinity"]
  30025. }
  30026. ]
  30027. },
  30028. "version": {
  30029. "anyOf": [
  30030. {
  30031. "type": "number"
  30032. },
  30033. {
  30034. "type": "string",
  30035. "enum": ["NaN"]
  30036. },
  30037. {
  30038. "type": "string",
  30039. "enum": ["Infinity"]
  30040. },
  30041. {
  30042. "type": "string",
  30043. "enum": ["-Infinity"]
  30044. }
  30045. ]
  30046. }
  30047. },
  30048. "required": ["aggregateID", "seq", "version"],
  30049. "additionalProperties": false
  30050. },
  30051. "location": {
  30052. "$ref": "#/components/schemas/LocationRef"
  30053. },
  30054. "data": {
  30055. "type": "object",
  30056. "properties": {
  30057. "timestamp": {
  30058. "type": "number"
  30059. },
  30060. "sessionID": {
  30061. "type": "string",
  30062. "pattern": "^ses"
  30063. },
  30064. "revert": {
  30065. "$ref": "#/components/schemas/RevertState"
  30066. }
  30067. },
  30068. "required": ["timestamp", "sessionID", "revert"],
  30069. "additionalProperties": false
  30070. }
  30071. },
  30072. "required": ["id", "type", "data"],
  30073. "additionalProperties": false
  30074. },
  30075. "SessionNextRevertCleared": {
  30076. "type": "object",
  30077. "properties": {
  30078. "id": {
  30079. "type": "string",
  30080. "pattern": "^evt_"
  30081. },
  30082. "metadata": {
  30083. "type": "object"
  30084. },
  30085. "type": {
  30086. "type": "string",
  30087. "enum": ["session.next.revert.cleared"]
  30088. },
  30089. "durable": {
  30090. "type": "object",
  30091. "properties": {
  30092. "aggregateID": {
  30093. "type": "string"
  30094. },
  30095. "seq": {
  30096. "anyOf": [
  30097. {
  30098. "type": "number"
  30099. },
  30100. {
  30101. "type": "string",
  30102. "enum": ["NaN"]
  30103. },
  30104. {
  30105. "type": "string",
  30106. "enum": ["Infinity"]
  30107. },
  30108. {
  30109. "type": "string",
  30110. "enum": ["-Infinity"]
  30111. }
  30112. ]
  30113. },
  30114. "version": {
  30115. "anyOf": [
  30116. {
  30117. "type": "number"
  30118. },
  30119. {
  30120. "type": "string",
  30121. "enum": ["NaN"]
  30122. },
  30123. {
  30124. "type": "string",
  30125. "enum": ["Infinity"]
  30126. },
  30127. {
  30128. "type": "string",
  30129. "enum": ["-Infinity"]
  30130. }
  30131. ]
  30132. }
  30133. },
  30134. "required": ["aggregateID", "seq", "version"],
  30135. "additionalProperties": false
  30136. },
  30137. "location": {
  30138. "$ref": "#/components/schemas/LocationRef"
  30139. },
  30140. "data": {
  30141. "type": "object",
  30142. "properties": {
  30143. "timestamp": {
  30144. "type": "number"
  30145. },
  30146. "sessionID": {
  30147. "type": "string",
  30148. "pattern": "^ses"
  30149. }
  30150. },
  30151. "required": ["timestamp", "sessionID"],
  30152. "additionalProperties": false
  30153. }
  30154. },
  30155. "required": ["id", "type", "data"],
  30156. "additionalProperties": false
  30157. },
  30158. "SessionNextRevertCommitted": {
  30159. "type": "object",
  30160. "properties": {
  30161. "id": {
  30162. "type": "string",
  30163. "pattern": "^evt_"
  30164. },
  30165. "metadata": {
  30166. "type": "object"
  30167. },
  30168. "type": {
  30169. "type": "string",
  30170. "enum": ["session.next.revert.committed"]
  30171. },
  30172. "durable": {
  30173. "type": "object",
  30174. "properties": {
  30175. "aggregateID": {
  30176. "type": "string"
  30177. },
  30178. "seq": {
  30179. "anyOf": [
  30180. {
  30181. "type": "number"
  30182. },
  30183. {
  30184. "type": "string",
  30185. "enum": ["NaN"]
  30186. },
  30187. {
  30188. "type": "string",
  30189. "enum": ["Infinity"]
  30190. },
  30191. {
  30192. "type": "string",
  30193. "enum": ["-Infinity"]
  30194. }
  30195. ]
  30196. },
  30197. "version": {
  30198. "anyOf": [
  30199. {
  30200. "type": "number"
  30201. },
  30202. {
  30203. "type": "string",
  30204. "enum": ["NaN"]
  30205. },
  30206. {
  30207. "type": "string",
  30208. "enum": ["Infinity"]
  30209. },
  30210. {
  30211. "type": "string",
  30212. "enum": ["-Infinity"]
  30213. }
  30214. ]
  30215. }
  30216. },
  30217. "required": ["aggregateID", "seq", "version"],
  30218. "additionalProperties": false
  30219. },
  30220. "location": {
  30221. "$ref": "#/components/schemas/LocationRef"
  30222. },
  30223. "data": {
  30224. "type": "object",
  30225. "properties": {
  30226. "timestamp": {
  30227. "type": "number"
  30228. },
  30229. "sessionID": {
  30230. "type": "string",
  30231. "pattern": "^ses"
  30232. },
  30233. "messageID": {
  30234. "type": "string",
  30235. "pattern": "^msg_"
  30236. }
  30237. },
  30238. "required": ["timestamp", "sessionID", "messageID"],
  30239. "additionalProperties": false
  30240. }
  30241. },
  30242. "required": ["id", "type", "data"],
  30243. "additionalProperties": false
  30244. },
  30245. "ModelApi": {
  30246. "anyOf": [
  30247. {
  30248. "type": "object",
  30249. "properties": {
  30250. "id": {
  30251. "type": "string"
  30252. },
  30253. "type": {
  30254. "type": "string",
  30255. "enum": ["aisdk"]
  30256. },
  30257. "package": {
  30258. "type": "string"
  30259. },
  30260. "url": {
  30261. "type": "string"
  30262. },
  30263. "settings": {
  30264. "type": "object"
  30265. }
  30266. },
  30267. "required": ["id", "type", "package"],
  30268. "additionalProperties": false
  30269. },
  30270. {
  30271. "type": "object",
  30272. "properties": {
  30273. "id": {
  30274. "type": "string"
  30275. },
  30276. "type": {
  30277. "type": "string",
  30278. "enum": ["native"]
  30279. },
  30280. "url": {
  30281. "type": "string"
  30282. },
  30283. "settings": {
  30284. "type": "object"
  30285. }
  30286. },
  30287. "required": ["id", "type", "settings"],
  30288. "additionalProperties": false
  30289. }
  30290. ]
  30291. },
  30292. "ModelCapabilities": {
  30293. "type": "object",
  30294. "properties": {
  30295. "tools": {
  30296. "type": "boolean"
  30297. },
  30298. "input": {
  30299. "type": "array",
  30300. "items": {
  30301. "type": "string"
  30302. }
  30303. },
  30304. "output": {
  30305. "type": "array",
  30306. "items": {
  30307. "type": "string"
  30308. }
  30309. }
  30310. },
  30311. "required": ["tools", "input", "output"],
  30312. "additionalProperties": false
  30313. },
  30314. "ModelCost": {
  30315. "type": "object",
  30316. "properties": {
  30317. "tier": {
  30318. "type": "object",
  30319. "properties": {
  30320. "type": {
  30321. "type": "string",
  30322. "enum": ["context"]
  30323. },
  30324. "size": {
  30325. "type": "integer"
  30326. }
  30327. },
  30328. "required": ["type", "size"],
  30329. "additionalProperties": false
  30330. },
  30331. "input": {
  30332. "type": "number"
  30333. },
  30334. "output": {
  30335. "type": "number"
  30336. },
  30337. "cache": {
  30338. "type": "object",
  30339. "properties": {
  30340. "read": {
  30341. "type": "number"
  30342. },
  30343. "write": {
  30344. "type": "number"
  30345. }
  30346. },
  30347. "required": ["read", "write"],
  30348. "additionalProperties": false
  30349. }
  30350. },
  30351. "required": ["input", "output", "cache"],
  30352. "additionalProperties": false
  30353. },
  30354. "ModelV2Info": {
  30355. "type": "object",
  30356. "properties": {
  30357. "id": {
  30358. "type": "string"
  30359. },
  30360. "providerID": {
  30361. "type": "string"
  30362. },
  30363. "family": {
  30364. "type": "string"
  30365. },
  30366. "name": {
  30367. "type": "string"
  30368. },
  30369. "api": {
  30370. "$ref": "#/components/schemas/ModelApi"
  30371. },
  30372. "capabilities": {
  30373. "$ref": "#/components/schemas/ModelCapabilities"
  30374. },
  30375. "request": {
  30376. "type": "object",
  30377. "properties": {
  30378. "headers": {
  30379. "type": "object",
  30380. "additionalProperties": {
  30381. "type": "string"
  30382. }
  30383. },
  30384. "body": {
  30385. "type": "object"
  30386. },
  30387. "variant": {
  30388. "type": "string"
  30389. }
  30390. },
  30391. "required": ["headers", "body"],
  30392. "additionalProperties": false
  30393. },
  30394. "variants": {
  30395. "type": "array",
  30396. "items": {
  30397. "type": "object",
  30398. "properties": {
  30399. "id": {
  30400. "type": "string"
  30401. },
  30402. "headers": {
  30403. "type": "object",
  30404. "additionalProperties": {
  30405. "type": "string"
  30406. }
  30407. },
  30408. "body": {
  30409. "type": "object"
  30410. }
  30411. },
  30412. "required": ["id", "headers", "body"],
  30413. "additionalProperties": false
  30414. }
  30415. },
  30416. "time": {
  30417. "type": "object",
  30418. "properties": {
  30419. "released": {
  30420. "type": "number"
  30421. }
  30422. },
  30423. "required": ["released"],
  30424. "additionalProperties": false
  30425. },
  30426. "cost": {
  30427. "type": "array",
  30428. "items": {
  30429. "$ref": "#/components/schemas/ModelCost"
  30430. }
  30431. },
  30432. "status": {
  30433. "type": "string",
  30434. "enum": ["alpha", "beta", "deprecated", "active"]
  30435. },
  30436. "enabled": {
  30437. "type": "boolean"
  30438. },
  30439. "limit": {
  30440. "type": "object",
  30441. "properties": {
  30442. "context": {
  30443. "type": "integer"
  30444. },
  30445. "input": {
  30446. "type": "integer"
  30447. },
  30448. "output": {
  30449. "type": "integer"
  30450. }
  30451. },
  30452. "required": ["context", "output"],
  30453. "additionalProperties": false
  30454. }
  30455. },
  30456. "required": [
  30457. "id",
  30458. "providerID",
  30459. "name",
  30460. "api",
  30461. "capabilities",
  30462. "request",
  30463. "variants",
  30464. "time",
  30465. "cost",
  30466. "status",
  30467. "enabled",
  30468. "limit"
  30469. ],
  30470. "additionalProperties": false
  30471. },
  30472. "ProviderAISDK": {
  30473. "type": "object",
  30474. "properties": {
  30475. "type": {
  30476. "type": "string",
  30477. "enum": ["aisdk"]
  30478. },
  30479. "package": {
  30480. "type": "string"
  30481. },
  30482. "url": {
  30483. "type": "string"
  30484. },
  30485. "settings": {
  30486. "type": "object"
  30487. }
  30488. },
  30489. "required": ["type", "package"],
  30490. "additionalProperties": false
  30491. },
  30492. "ProviderNative": {
  30493. "type": "object",
  30494. "properties": {
  30495. "type": {
  30496. "type": "string",
  30497. "enum": ["native"]
  30498. },
  30499. "url": {
  30500. "type": "string"
  30501. },
  30502. "settings": {
  30503. "type": "object"
  30504. }
  30505. },
  30506. "required": ["type", "settings"],
  30507. "additionalProperties": false
  30508. },
  30509. "ProviderApi": {
  30510. "anyOf": [
  30511. {
  30512. "$ref": "#/components/schemas/ProviderAISDK"
  30513. },
  30514. {
  30515. "$ref": "#/components/schemas/ProviderNative"
  30516. }
  30517. ]
  30518. },
  30519. "ProviderV2Info": {
  30520. "type": "object",
  30521. "properties": {
  30522. "id": {
  30523. "type": "string"
  30524. },
  30525. "integrationID": {
  30526. "type": "string"
  30527. },
  30528. "name": {
  30529. "type": "string"
  30530. },
  30531. "disabled": {
  30532. "type": "boolean"
  30533. },
  30534. "api": {
  30535. "$ref": "#/components/schemas/ProviderApi"
  30536. },
  30537. "request": {
  30538. "$ref": "#/components/schemas/ProviderRequest"
  30539. }
  30540. },
  30541. "required": ["id", "name", "api", "request"],
  30542. "additionalProperties": false
  30543. },
  30544. "IntegrationWhen": {
  30545. "type": "object",
  30546. "properties": {
  30547. "key": {
  30548. "type": "string"
  30549. },
  30550. "op": {
  30551. "type": "string",
  30552. "enum": ["eq", "neq"]
  30553. },
  30554. "value": {
  30555. "type": "string"
  30556. }
  30557. },
  30558. "required": ["key", "op", "value"],
  30559. "additionalProperties": false
  30560. },
  30561. "IntegrationTextPrompt": {
  30562. "type": "object",
  30563. "properties": {
  30564. "type": {
  30565. "type": "string",
  30566. "enum": ["text"]
  30567. },
  30568. "key": {
  30569. "type": "string"
  30570. },
  30571. "message": {
  30572. "type": "string"
  30573. },
  30574. "placeholder": {
  30575. "type": "string"
  30576. },
  30577. "when": {
  30578. "$ref": "#/components/schemas/IntegrationWhen"
  30579. }
  30580. },
  30581. "required": ["type", "key", "message"],
  30582. "additionalProperties": false
  30583. },
  30584. "IntegrationSelectPrompt": {
  30585. "type": "object",
  30586. "properties": {
  30587. "type": {
  30588. "type": "string",
  30589. "enum": ["select"]
  30590. },
  30591. "key": {
  30592. "type": "string"
  30593. },
  30594. "message": {
  30595. "type": "string"
  30596. },
  30597. "options": {
  30598. "type": "array",
  30599. "items": {
  30600. "type": "object",
  30601. "properties": {
  30602. "label": {
  30603. "type": "string"
  30604. },
  30605. "value": {
  30606. "type": "string"
  30607. },
  30608. "hint": {
  30609. "type": "string"
  30610. }
  30611. },
  30612. "required": ["label", "value"],
  30613. "additionalProperties": false
  30614. }
  30615. },
  30616. "when": {
  30617. "$ref": "#/components/schemas/IntegrationWhen"
  30618. }
  30619. },
  30620. "required": ["type", "key", "message", "options"],
  30621. "additionalProperties": false
  30622. },
  30623. "IntegrationOAuthMethod": {
  30624. "type": "object",
  30625. "properties": {
  30626. "id": {
  30627. "type": "string"
  30628. },
  30629. "type": {
  30630. "type": "string",
  30631. "enum": ["oauth"]
  30632. },
  30633. "label": {
  30634. "type": "string"
  30635. },
  30636. "prompts": {
  30637. "type": "array",
  30638. "items": {
  30639. "anyOf": [
  30640. {
  30641. "$ref": "#/components/schemas/IntegrationTextPrompt"
  30642. },
  30643. {
  30644. "$ref": "#/components/schemas/IntegrationSelectPrompt"
  30645. }
  30646. ]
  30647. }
  30648. }
  30649. },
  30650. "required": ["id", "type", "label"],
  30651. "additionalProperties": false
  30652. },
  30653. "IntegrationKeyMethod": {
  30654. "type": "object",
  30655. "properties": {
  30656. "type": {
  30657. "type": "string",
  30658. "enum": ["key"]
  30659. },
  30660. "label": {
  30661. "type": "string"
  30662. }
  30663. },
  30664. "required": ["type"],
  30665. "additionalProperties": false
  30666. },
  30667. "IntegrationEnvMethod": {
  30668. "type": "object",
  30669. "properties": {
  30670. "type": {
  30671. "type": "string",
  30672. "enum": ["env"]
  30673. },
  30674. "names": {
  30675. "type": "array",
  30676. "items": {
  30677. "type": "string"
  30678. }
  30679. }
  30680. },
  30681. "required": ["type", "names"],
  30682. "additionalProperties": false
  30683. },
  30684. "ConnectionCredentialInfo": {
  30685. "type": "object",
  30686. "properties": {
  30687. "type": {
  30688. "type": "string",
  30689. "enum": ["credential"]
  30690. },
  30691. "id": {
  30692. "type": "string"
  30693. },
  30694. "label": {
  30695. "type": "string"
  30696. }
  30697. },
  30698. "required": ["type", "id", "label"],
  30699. "additionalProperties": false
  30700. },
  30701. "ConnectionEnvInfo": {
  30702. "type": "object",
  30703. "properties": {
  30704. "type": {
  30705. "type": "string",
  30706. "enum": ["env"]
  30707. },
  30708. "name": {
  30709. "type": "string"
  30710. }
  30711. },
  30712. "required": ["type", "name"],
  30713. "additionalProperties": false
  30714. },
  30715. "ConnectionInfo": {
  30716. "anyOf": [
  30717. {
  30718. "$ref": "#/components/schemas/ConnectionCredentialInfo"
  30719. },
  30720. {
  30721. "$ref": "#/components/schemas/ConnectionEnvInfo"
  30722. }
  30723. ]
  30724. },
  30725. "IntegrationInfo": {
  30726. "type": "object",
  30727. "properties": {
  30728. "id": {
  30729. "type": "string"
  30730. },
  30731. "name": {
  30732. "type": "string"
  30733. },
  30734. "methods": {
  30735. "type": "array",
  30736. "items": {
  30737. "$ref": "#/components/schemas/IntegrationMethod"
  30738. }
  30739. },
  30740. "connections": {
  30741. "type": "array",
  30742. "items": {
  30743. "$ref": "#/components/schemas/ConnectionInfo"
  30744. }
  30745. }
  30746. },
  30747. "required": ["id", "name", "methods", "connections"],
  30748. "additionalProperties": false
  30749. },
  30750. "IntegrationAttempt": {
  30751. "type": "object",
  30752. "properties": {
  30753. "attemptID": {
  30754. "type": "string"
  30755. },
  30756. "url": {
  30757. "type": "string"
  30758. },
  30759. "instructions": {
  30760. "type": "string"
  30761. },
  30762. "mode": {
  30763. "type": "string",
  30764. "enum": ["auto", "code"]
  30765. },
  30766. "time": {
  30767. "type": "object",
  30768. "properties": {
  30769. "created": {
  30770. "anyOf": [
  30771. {
  30772. "type": "number"
  30773. },
  30774. {
  30775. "type": "string",
  30776. "enum": ["NaN"]
  30777. },
  30778. {
  30779. "type": "string",
  30780. "enum": ["Infinity"]
  30781. },
  30782. {
  30783. "type": "string",
  30784. "enum": ["-Infinity"]
  30785. },
  30786. {
  30787. "type": "string",
  30788. "enum": ["Infinity", "-Infinity", "NaN"]
  30789. }
  30790. ]
  30791. },
  30792. "expires": {
  30793. "anyOf": [
  30794. {
  30795. "type": "number"
  30796. },
  30797. {
  30798. "type": "string",
  30799. "enum": ["NaN"]
  30800. },
  30801. {
  30802. "type": "string",
  30803. "enum": ["Infinity"]
  30804. },
  30805. {
  30806. "type": "string",
  30807. "enum": ["-Infinity"]
  30808. },
  30809. {
  30810. "type": "string",
  30811. "enum": ["Infinity", "-Infinity", "NaN"]
  30812. }
  30813. ]
  30814. }
  30815. },
  30816. "required": ["created", "expires"],
  30817. "additionalProperties": false
  30818. }
  30819. },
  30820. "required": ["attemptID", "url", "instructions", "mode", "time"],
  30821. "additionalProperties": false
  30822. },
  30823. "IntegrationAttemptStatus": {
  30824. "anyOf": [
  30825. {
  30826. "type": "object",
  30827. "properties": {
  30828. "status": {
  30829. "type": "string",
  30830. "enum": ["pending"]
  30831. },
  30832. "time": {
  30833. "type": "object",
  30834. "properties": {
  30835. "created": {
  30836. "anyOf": [
  30837. {
  30838. "type": "number"
  30839. },
  30840. {
  30841. "type": "string",
  30842. "enum": ["NaN"]
  30843. },
  30844. {
  30845. "type": "string",
  30846. "enum": ["Infinity"]
  30847. },
  30848. {
  30849. "type": "string",
  30850. "enum": ["-Infinity"]
  30851. },
  30852. {
  30853. "type": "string",
  30854. "enum": ["Infinity", "-Infinity", "NaN"]
  30855. }
  30856. ]
  30857. },
  30858. "expires": {
  30859. "anyOf": [
  30860. {
  30861. "type": "number"
  30862. },
  30863. {
  30864. "type": "string",
  30865. "enum": ["NaN"]
  30866. },
  30867. {
  30868. "type": "string",
  30869. "enum": ["Infinity"]
  30870. },
  30871. {
  30872. "type": "string",
  30873. "enum": ["-Infinity"]
  30874. },
  30875. {
  30876. "type": "string",
  30877. "enum": ["Infinity", "-Infinity", "NaN"]
  30878. }
  30879. ]
  30880. }
  30881. },
  30882. "required": ["created", "expires"],
  30883. "additionalProperties": false
  30884. }
  30885. },
  30886. "required": ["status", "time"],
  30887. "additionalProperties": false
  30888. },
  30889. {
  30890. "type": "object",
  30891. "properties": {
  30892. "status": {
  30893. "type": "string",
  30894. "enum": ["complete"]
  30895. },
  30896. "time": {
  30897. "type": "object",
  30898. "properties": {
  30899. "created": {
  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. "expires": {
  30923. "anyOf": [
  30924. {
  30925. "type": "number"
  30926. },
  30927. {
  30928. "type": "string",
  30929. "enum": ["NaN"]
  30930. },
  30931. {
  30932. "type": "string",
  30933. "enum": ["Infinity"]
  30934. },
  30935. {
  30936. "type": "string",
  30937. "enum": ["-Infinity"]
  30938. },
  30939. {
  30940. "type": "string",
  30941. "enum": ["Infinity", "-Infinity", "NaN"]
  30942. }
  30943. ]
  30944. }
  30945. },
  30946. "required": ["created", "expires"],
  30947. "additionalProperties": false
  30948. }
  30949. },
  30950. "required": ["status", "time"],
  30951. "additionalProperties": false
  30952. },
  30953. {
  30954. "type": "object",
  30955. "properties": {
  30956. "status": {
  30957. "type": "string",
  30958. "enum": ["failed"]
  30959. },
  30960. "message": {
  30961. "type": "string"
  30962. },
  30963. "time": {
  30964. "type": "object",
  30965. "properties": {
  30966. "created": {
  30967. "anyOf": [
  30968. {
  30969. "type": "number"
  30970. },
  30971. {
  30972. "type": "string",
  30973. "enum": ["NaN"]
  30974. },
  30975. {
  30976. "type": "string",
  30977. "enum": ["Infinity"]
  30978. },
  30979. {
  30980. "type": "string",
  30981. "enum": ["-Infinity"]
  30982. },
  30983. {
  30984. "type": "string",
  30985. "enum": ["Infinity", "-Infinity", "NaN"]
  30986. }
  30987. ]
  30988. },
  30989. "expires": {
  30990. "anyOf": [
  30991. {
  30992. "type": "number"
  30993. },
  30994. {
  30995. "type": "string",
  30996. "enum": ["NaN"]
  30997. },
  30998. {
  30999. "type": "string",
  31000. "enum": ["Infinity"]
  31001. },
  31002. {
  31003. "type": "string",
  31004. "enum": ["-Infinity"]
  31005. },
  31006. {
  31007. "type": "string",
  31008. "enum": ["Infinity", "-Infinity", "NaN"]
  31009. }
  31010. ]
  31011. }
  31012. },
  31013. "required": ["created", "expires"],
  31014. "additionalProperties": false
  31015. }
  31016. },
  31017. "required": ["status", "message", "time"],
  31018. "additionalProperties": false
  31019. },
  31020. {
  31021. "type": "object",
  31022. "properties": {
  31023. "status": {
  31024. "type": "string",
  31025. "enum": ["expired"]
  31026. },
  31027. "time": {
  31028. "type": "object",
  31029. "properties": {
  31030. "created": {
  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. "expires": {
  31054. "anyOf": [
  31055. {
  31056. "type": "number"
  31057. },
  31058. {
  31059. "type": "string",
  31060. "enum": ["NaN"]
  31061. },
  31062. {
  31063. "type": "string",
  31064. "enum": ["Infinity"]
  31065. },
  31066. {
  31067. "type": "string",
  31068. "enum": ["-Infinity"]
  31069. },
  31070. {
  31071. "type": "string",
  31072. "enum": ["Infinity", "-Infinity", "NaN"]
  31073. }
  31074. ]
  31075. }
  31076. },
  31077. "required": ["created", "expires"],
  31078. "additionalProperties": false
  31079. }
  31080. },
  31081. "required": ["status", "time"],
  31082. "additionalProperties": false
  31083. }
  31084. ]
  31085. },
  31086. "PermissionV2Request": {
  31087. "type": "object",
  31088. "properties": {
  31089. "id": {
  31090. "type": "string",
  31091. "pattern": "^per"
  31092. },
  31093. "sessionID": {
  31094. "type": "string",
  31095. "pattern": "^ses"
  31096. },
  31097. "action": {
  31098. "type": "string"
  31099. },
  31100. "resources": {
  31101. "type": "array",
  31102. "items": {
  31103. "type": "string"
  31104. }
  31105. },
  31106. "save": {
  31107. "type": "array",
  31108. "items": {
  31109. "type": "string"
  31110. }
  31111. },
  31112. "metadata": {
  31113. "type": "object"
  31114. },
  31115. "source": {
  31116. "$ref": "#/components/schemas/PermissionV2Source"
  31117. }
  31118. },
  31119. "required": ["id", "sessionID", "action", "resources"],
  31120. "additionalProperties": false
  31121. },
  31122. "PermissionSavedInfo": {
  31123. "type": "object",
  31124. "properties": {
  31125. "id": {
  31126. "type": "string"
  31127. },
  31128. "projectID": {
  31129. "type": "string"
  31130. },
  31131. "action": {
  31132. "type": "string"
  31133. },
  31134. "resource": {
  31135. "type": "string"
  31136. }
  31137. },
  31138. "required": ["id", "projectID", "action", "resource"],
  31139. "additionalProperties": false
  31140. },
  31141. "FileSystemEntry": {
  31142. "type": "object",
  31143. "properties": {
  31144. "path": {
  31145. "type": "string"
  31146. },
  31147. "type": {
  31148. "type": "string",
  31149. "enum": ["file", "directory"]
  31150. }
  31151. },
  31152. "required": ["path", "type"],
  31153. "additionalProperties": false
  31154. },
  31155. "CommandV2Info": {
  31156. "type": "object",
  31157. "properties": {
  31158. "name": {
  31159. "type": "string"
  31160. },
  31161. "template": {
  31162. "type": "string"
  31163. },
  31164. "description": {
  31165. "type": "string"
  31166. },
  31167. "agent": {
  31168. "type": "string"
  31169. },
  31170. "model": {
  31171. "$ref": "#/components/schemas/ModelRef"
  31172. },
  31173. "subtask": {
  31174. "type": "boolean"
  31175. }
  31176. },
  31177. "required": ["name", "template"],
  31178. "additionalProperties": false
  31179. },
  31180. "SkillV2Info": {
  31181. "type": "object",
  31182. "properties": {
  31183. "name": {
  31184. "type": "string"
  31185. },
  31186. "description": {
  31187. "type": "string"
  31188. },
  31189. "slash": {
  31190. "type": "boolean"
  31191. },
  31192. "location": {
  31193. "type": "string"
  31194. },
  31195. "content": {
  31196. "type": "string"
  31197. }
  31198. },
  31199. "required": ["name", "location", "content"],
  31200. "additionalProperties": false
  31201. },
  31202. "V2EventModels-devRefreshed": {
  31203. "type": "object",
  31204. "properties": {
  31205. "id": {
  31206. "type": "string",
  31207. "pattern": "^evt_"
  31208. },
  31209. "metadata": {
  31210. "type": "object"
  31211. },
  31212. "durable": {
  31213. "type": "object",
  31214. "properties": {
  31215. "aggregateID": {
  31216. "type": "string"
  31217. },
  31218. "seq": {
  31219. "type": "integer"
  31220. },
  31221. "version": {
  31222. "type": "integer"
  31223. }
  31224. },
  31225. "required": ["aggregateID", "seq", "version"],
  31226. "additionalProperties": false
  31227. },
  31228. "location": {
  31229. "$ref": "#/components/schemas/LocationRef"
  31230. },
  31231. "type": {
  31232. "type": "string",
  31233. "enum": ["models-dev.refreshed"]
  31234. },
  31235. "data": {
  31236. "type": "object",
  31237. "properties": {}
  31238. }
  31239. },
  31240. "required": ["id", "type", "data"],
  31241. "additionalProperties": false
  31242. },
  31243. "V2EventIntegrationUpdated": {
  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": ["integration.updated"]
  31275. },
  31276. "data": {
  31277. "type": "object",
  31278. "properties": {}
  31279. }
  31280. },
  31281. "required": ["id", "type", "data"],
  31282. "additionalProperties": false
  31283. },
  31284. "V2EventIntegrationConnectionUpdated": {
  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.connection.updated"]
  31316. },
  31317. "data": {
  31318. "type": "object",
  31319. "properties": {
  31320. "integrationID": {
  31321. "type": "string"
  31322. }
  31323. },
  31324. "required": ["integrationID"],
  31325. "additionalProperties": false
  31326. }
  31327. },
  31328. "required": ["id", "type", "data"],
  31329. "additionalProperties": false
  31330. },
  31331. "V2EventCatalogUpdated": {
  31332. "type": "object",
  31333. "properties": {
  31334. "id": {
  31335. "type": "string",
  31336. "pattern": "^evt_"
  31337. },
  31338. "metadata": {
  31339. "type": "object"
  31340. },
  31341. "durable": {
  31342. "type": "object",
  31343. "properties": {
  31344. "aggregateID": {
  31345. "type": "string"
  31346. },
  31347. "seq": {
  31348. "type": "integer"
  31349. },
  31350. "version": {
  31351. "type": "integer"
  31352. }
  31353. },
  31354. "required": ["aggregateID", "seq", "version"],
  31355. "additionalProperties": false
  31356. },
  31357. "location": {
  31358. "$ref": "#/components/schemas/LocationRef"
  31359. },
  31360. "type": {
  31361. "type": "string",
  31362. "enum": ["catalog.updated"]
  31363. },
  31364. "data": {
  31365. "type": "object",
  31366. "properties": {}
  31367. }
  31368. },
  31369. "required": ["id", "type", "data"],
  31370. "additionalProperties": false
  31371. },
  31372. "V2EventSessionCreated": {
  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": ["session.created"]
  31404. },
  31405. "data": {
  31406. "type": "object",
  31407. "properties": {
  31408. "sessionID": {
  31409. "type": "string",
  31410. "pattern": "^ses"
  31411. },
  31412. "info": {
  31413. "$ref": "#/components/schemas/Session"
  31414. }
  31415. },
  31416. "required": ["sessionID", "info"],
  31417. "additionalProperties": false
  31418. }
  31419. },
  31420. "required": ["id", "type", "data"],
  31421. "additionalProperties": false
  31422. },
  31423. "V2EventSessionUpdated": {
  31424. "type": "object",
  31425. "properties": {
  31426. "id": {
  31427. "type": "string",
  31428. "pattern": "^evt_"
  31429. },
  31430. "metadata": {
  31431. "type": "object"
  31432. },
  31433. "durable": {
  31434. "type": "object",
  31435. "properties": {
  31436. "aggregateID": {
  31437. "type": "string"
  31438. },
  31439. "seq": {
  31440. "type": "integer"
  31441. },
  31442. "version": {
  31443. "type": "integer"
  31444. }
  31445. },
  31446. "required": ["aggregateID", "seq", "version"],
  31447. "additionalProperties": false
  31448. },
  31449. "location": {
  31450. "$ref": "#/components/schemas/LocationRef"
  31451. },
  31452. "type": {
  31453. "type": "string",
  31454. "enum": ["session.updated"]
  31455. },
  31456. "data": {
  31457. "type": "object",
  31458. "properties": {
  31459. "sessionID": {
  31460. "type": "string",
  31461. "pattern": "^ses"
  31462. },
  31463. "info": {
  31464. "$ref": "#/components/schemas/Session"
  31465. }
  31466. },
  31467. "required": ["sessionID", "info"],
  31468. "additionalProperties": false
  31469. }
  31470. },
  31471. "required": ["id", "type", "data"],
  31472. "additionalProperties": false
  31473. },
  31474. "V2EventSessionDeleted": {
  31475. "type": "object",
  31476. "properties": {
  31477. "id": {
  31478. "type": "string",
  31479. "pattern": "^evt_"
  31480. },
  31481. "metadata": {
  31482. "type": "object"
  31483. },
  31484. "durable": {
  31485. "type": "object",
  31486. "properties": {
  31487. "aggregateID": {
  31488. "type": "string"
  31489. },
  31490. "seq": {
  31491. "type": "integer"
  31492. },
  31493. "version": {
  31494. "type": "integer"
  31495. }
  31496. },
  31497. "required": ["aggregateID", "seq", "version"],
  31498. "additionalProperties": false
  31499. },
  31500. "location": {
  31501. "$ref": "#/components/schemas/LocationRef"
  31502. },
  31503. "type": {
  31504. "type": "string",
  31505. "enum": ["session.deleted"]
  31506. },
  31507. "data": {
  31508. "type": "object",
  31509. "properties": {
  31510. "sessionID": {
  31511. "type": "string",
  31512. "pattern": "^ses"
  31513. },
  31514. "info": {
  31515. "$ref": "#/components/schemas/Session"
  31516. }
  31517. },
  31518. "required": ["sessionID", "info"],
  31519. "additionalProperties": false
  31520. }
  31521. },
  31522. "required": ["id", "type", "data"],
  31523. "additionalProperties": false
  31524. },
  31525. "V2EventMessageUpdated": {
  31526. "type": "object",
  31527. "properties": {
  31528. "id": {
  31529. "type": "string",
  31530. "pattern": "^evt_"
  31531. },
  31532. "metadata": {
  31533. "type": "object"
  31534. },
  31535. "durable": {
  31536. "type": "object",
  31537. "properties": {
  31538. "aggregateID": {
  31539. "type": "string"
  31540. },
  31541. "seq": {
  31542. "type": "integer"
  31543. },
  31544. "version": {
  31545. "type": "integer"
  31546. }
  31547. },
  31548. "required": ["aggregateID", "seq", "version"],
  31549. "additionalProperties": false
  31550. },
  31551. "location": {
  31552. "$ref": "#/components/schemas/LocationRef"
  31553. },
  31554. "type": {
  31555. "type": "string",
  31556. "enum": ["message.updated"]
  31557. },
  31558. "data": {
  31559. "type": "object",
  31560. "properties": {
  31561. "sessionID": {
  31562. "type": "string",
  31563. "pattern": "^ses"
  31564. },
  31565. "info": {
  31566. "$ref": "#/components/schemas/Message"
  31567. }
  31568. },
  31569. "required": ["sessionID", "info"],
  31570. "additionalProperties": false
  31571. }
  31572. },
  31573. "required": ["id", "type", "data"],
  31574. "additionalProperties": false
  31575. },
  31576. "V2EventMessageRemoved": {
  31577. "type": "object",
  31578. "properties": {
  31579. "id": {
  31580. "type": "string",
  31581. "pattern": "^evt_"
  31582. },
  31583. "metadata": {
  31584. "type": "object"
  31585. },
  31586. "durable": {
  31587. "type": "object",
  31588. "properties": {
  31589. "aggregateID": {
  31590. "type": "string"
  31591. },
  31592. "seq": {
  31593. "type": "integer"
  31594. },
  31595. "version": {
  31596. "type": "integer"
  31597. }
  31598. },
  31599. "required": ["aggregateID", "seq", "version"],
  31600. "additionalProperties": false
  31601. },
  31602. "location": {
  31603. "$ref": "#/components/schemas/LocationRef"
  31604. },
  31605. "type": {
  31606. "type": "string",
  31607. "enum": ["message.removed"]
  31608. },
  31609. "data": {
  31610. "type": "object",
  31611. "properties": {
  31612. "sessionID": {
  31613. "type": "string",
  31614. "pattern": "^ses"
  31615. },
  31616. "messageID": {
  31617. "type": "string",
  31618. "pattern": "^msg"
  31619. }
  31620. },
  31621. "required": ["sessionID", "messageID"],
  31622. "additionalProperties": false
  31623. }
  31624. },
  31625. "required": ["id", "type", "data"],
  31626. "additionalProperties": false
  31627. },
  31628. "V2EventMessagePartUpdated": {
  31629. "type": "object",
  31630. "properties": {
  31631. "id": {
  31632. "type": "string",
  31633. "pattern": "^evt_"
  31634. },
  31635. "metadata": {
  31636. "type": "object"
  31637. },
  31638. "durable": {
  31639. "type": "object",
  31640. "properties": {
  31641. "aggregateID": {
  31642. "type": "string"
  31643. },
  31644. "seq": {
  31645. "type": "integer"
  31646. },
  31647. "version": {
  31648. "type": "integer"
  31649. }
  31650. },
  31651. "required": ["aggregateID", "seq", "version"],
  31652. "additionalProperties": false
  31653. },
  31654. "location": {
  31655. "$ref": "#/components/schemas/LocationRef"
  31656. },
  31657. "type": {
  31658. "type": "string",
  31659. "enum": ["message.part.updated"]
  31660. },
  31661. "data": {
  31662. "type": "object",
  31663. "properties": {
  31664. "sessionID": {
  31665. "type": "string",
  31666. "pattern": "^ses"
  31667. },
  31668. "part": {
  31669. "$ref": "#/components/schemas/Part"
  31670. },
  31671. "time": {
  31672. "type": "number"
  31673. }
  31674. },
  31675. "required": ["sessionID", "part", "time"],
  31676. "additionalProperties": false
  31677. }
  31678. },
  31679. "required": ["id", "type", "data"],
  31680. "additionalProperties": false
  31681. },
  31682. "V2EventMessagePartRemoved": {
  31683. "type": "object",
  31684. "properties": {
  31685. "id": {
  31686. "type": "string",
  31687. "pattern": "^evt_"
  31688. },
  31689. "metadata": {
  31690. "type": "object"
  31691. },
  31692. "durable": {
  31693. "type": "object",
  31694. "properties": {
  31695. "aggregateID": {
  31696. "type": "string"
  31697. },
  31698. "seq": {
  31699. "type": "integer"
  31700. },
  31701. "version": {
  31702. "type": "integer"
  31703. }
  31704. },
  31705. "required": ["aggregateID", "seq", "version"],
  31706. "additionalProperties": false
  31707. },
  31708. "location": {
  31709. "$ref": "#/components/schemas/LocationRef"
  31710. },
  31711. "type": {
  31712. "type": "string",
  31713. "enum": ["message.part.removed"]
  31714. },
  31715. "data": {
  31716. "type": "object",
  31717. "properties": {
  31718. "sessionID": {
  31719. "type": "string",
  31720. "pattern": "^ses"
  31721. },
  31722. "messageID": {
  31723. "type": "string",
  31724. "pattern": "^msg"
  31725. },
  31726. "partID": {
  31727. "type": "string",
  31728. "pattern": "^prt"
  31729. }
  31730. },
  31731. "required": ["sessionID", "messageID", "partID"],
  31732. "additionalProperties": false
  31733. }
  31734. },
  31735. "required": ["id", "type", "data"],
  31736. "additionalProperties": false
  31737. },
  31738. "V2EventSessionNextAgentSwitched": {
  31739. "type": "object",
  31740. "properties": {
  31741. "id": {
  31742. "type": "string",
  31743. "pattern": "^evt_"
  31744. },
  31745. "metadata": {
  31746. "type": "object"
  31747. },
  31748. "durable": {
  31749. "type": "object",
  31750. "properties": {
  31751. "aggregateID": {
  31752. "type": "string"
  31753. },
  31754. "seq": {
  31755. "type": "integer"
  31756. },
  31757. "version": {
  31758. "type": "integer"
  31759. }
  31760. },
  31761. "required": ["aggregateID", "seq", "version"],
  31762. "additionalProperties": false
  31763. },
  31764. "location": {
  31765. "$ref": "#/components/schemas/LocationRef"
  31766. },
  31767. "type": {
  31768. "type": "string",
  31769. "enum": ["session.next.agent.switched"]
  31770. },
  31771. "data": {
  31772. "type": "object",
  31773. "properties": {
  31774. "timestamp": {
  31775. "type": "number"
  31776. },
  31777. "sessionID": {
  31778. "type": "string",
  31779. "pattern": "^ses"
  31780. },
  31781. "messageID": {
  31782. "type": "string",
  31783. "pattern": "^msg_"
  31784. },
  31785. "agent": {
  31786. "type": "string"
  31787. }
  31788. },
  31789. "required": ["timestamp", "sessionID", "messageID", "agent"],
  31790. "additionalProperties": false
  31791. }
  31792. },
  31793. "required": ["id", "type", "data"],
  31794. "additionalProperties": false
  31795. },
  31796. "V2EventSessionNextModelSwitched": {
  31797. "type": "object",
  31798. "properties": {
  31799. "id": {
  31800. "type": "string",
  31801. "pattern": "^evt_"
  31802. },
  31803. "metadata": {
  31804. "type": "object"
  31805. },
  31806. "durable": {
  31807. "type": "object",
  31808. "properties": {
  31809. "aggregateID": {
  31810. "type": "string"
  31811. },
  31812. "seq": {
  31813. "type": "integer"
  31814. },
  31815. "version": {
  31816. "type": "integer"
  31817. }
  31818. },
  31819. "required": ["aggregateID", "seq", "version"],
  31820. "additionalProperties": false
  31821. },
  31822. "location": {
  31823. "$ref": "#/components/schemas/LocationRef"
  31824. },
  31825. "type": {
  31826. "type": "string",
  31827. "enum": ["session.next.model.switched"]
  31828. },
  31829. "data": {
  31830. "type": "object",
  31831. "properties": {
  31832. "timestamp": {
  31833. "type": "number"
  31834. },
  31835. "sessionID": {
  31836. "type": "string",
  31837. "pattern": "^ses"
  31838. },
  31839. "messageID": {
  31840. "type": "string",
  31841. "pattern": "^msg_"
  31842. },
  31843. "model": {
  31844. "$ref": "#/components/schemas/ModelRef"
  31845. }
  31846. },
  31847. "required": ["timestamp", "sessionID", "messageID", "model"],
  31848. "additionalProperties": false
  31849. }
  31850. },
  31851. "required": ["id", "type", "data"],
  31852. "additionalProperties": false
  31853. },
  31854. "V2EventSessionNextMoved": {
  31855. "type": "object",
  31856. "properties": {
  31857. "id": {
  31858. "type": "string",
  31859. "pattern": "^evt_"
  31860. },
  31861. "metadata": {
  31862. "type": "object"
  31863. },
  31864. "durable": {
  31865. "type": "object",
  31866. "properties": {
  31867. "aggregateID": {
  31868. "type": "string"
  31869. },
  31870. "seq": {
  31871. "type": "integer"
  31872. },
  31873. "version": {
  31874. "type": "integer"
  31875. }
  31876. },
  31877. "required": ["aggregateID", "seq", "version"],
  31878. "additionalProperties": false
  31879. },
  31880. "location": {
  31881. "$ref": "#/components/schemas/LocationRef"
  31882. },
  31883. "type": {
  31884. "type": "string",
  31885. "enum": ["session.next.moved"]
  31886. },
  31887. "data": {
  31888. "type": "object",
  31889. "properties": {
  31890. "timestamp": {
  31891. "type": "number"
  31892. },
  31893. "sessionID": {
  31894. "type": "string",
  31895. "pattern": "^ses"
  31896. },
  31897. "location": {
  31898. "$ref": "#/components/schemas/LocationRef"
  31899. },
  31900. "subdirectory": {
  31901. "type": "string"
  31902. }
  31903. },
  31904. "required": ["timestamp", "sessionID", "location"],
  31905. "additionalProperties": false
  31906. }
  31907. },
  31908. "required": ["id", "type", "data"],
  31909. "additionalProperties": false
  31910. },
  31911. "V2EventSessionNextPrompted": {
  31912. "type": "object",
  31913. "properties": {
  31914. "id": {
  31915. "type": "string",
  31916. "pattern": "^evt_"
  31917. },
  31918. "metadata": {
  31919. "type": "object"
  31920. },
  31921. "durable": {
  31922. "type": "object",
  31923. "properties": {
  31924. "aggregateID": {
  31925. "type": "string"
  31926. },
  31927. "seq": {
  31928. "type": "integer"
  31929. },
  31930. "version": {
  31931. "type": "integer"
  31932. }
  31933. },
  31934. "required": ["aggregateID", "seq", "version"],
  31935. "additionalProperties": false
  31936. },
  31937. "location": {
  31938. "$ref": "#/components/schemas/LocationRef"
  31939. },
  31940. "type": {
  31941. "type": "string",
  31942. "enum": ["session.next.prompted"]
  31943. },
  31944. "data": {
  31945. "type": "object",
  31946. "properties": {
  31947. "timestamp": {
  31948. "type": "number"
  31949. },
  31950. "sessionID": {
  31951. "type": "string",
  31952. "pattern": "^ses"
  31953. },
  31954. "messageID": {
  31955. "type": "string",
  31956. "pattern": "^msg_"
  31957. },
  31958. "prompt": {
  31959. "$ref": "#/components/schemas/Prompt"
  31960. },
  31961. "delivery": {
  31962. "type": "string",
  31963. "enum": ["steer", "queue"]
  31964. }
  31965. },
  31966. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  31967. "additionalProperties": false
  31968. }
  31969. },
  31970. "required": ["id", "type", "data"],
  31971. "additionalProperties": false
  31972. },
  31973. "V2EventSessionNextPromptAdmitted": {
  31974. "type": "object",
  31975. "properties": {
  31976. "id": {
  31977. "type": "string",
  31978. "pattern": "^evt_"
  31979. },
  31980. "metadata": {
  31981. "type": "object"
  31982. },
  31983. "durable": {
  31984. "type": "object",
  31985. "properties": {
  31986. "aggregateID": {
  31987. "type": "string"
  31988. },
  31989. "seq": {
  31990. "type": "integer"
  31991. },
  31992. "version": {
  31993. "type": "integer"
  31994. }
  31995. },
  31996. "required": ["aggregateID", "seq", "version"],
  31997. "additionalProperties": false
  31998. },
  31999. "location": {
  32000. "$ref": "#/components/schemas/LocationRef"
  32001. },
  32002. "type": {
  32003. "type": "string",
  32004. "enum": ["session.next.prompt.admitted"]
  32005. },
  32006. "data": {
  32007. "type": "object",
  32008. "properties": {
  32009. "timestamp": {
  32010. "type": "number"
  32011. },
  32012. "sessionID": {
  32013. "type": "string",
  32014. "pattern": "^ses"
  32015. },
  32016. "messageID": {
  32017. "type": "string",
  32018. "pattern": "^msg_"
  32019. },
  32020. "prompt": {
  32021. "$ref": "#/components/schemas/Prompt"
  32022. },
  32023. "delivery": {
  32024. "type": "string",
  32025. "enum": ["steer", "queue"]
  32026. }
  32027. },
  32028. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  32029. "additionalProperties": false
  32030. }
  32031. },
  32032. "required": ["id", "type", "data"],
  32033. "additionalProperties": false
  32034. },
  32035. "V2EventSessionNextContextUpdated": {
  32036. "type": "object",
  32037. "properties": {
  32038. "id": {
  32039. "type": "string",
  32040. "pattern": "^evt_"
  32041. },
  32042. "metadata": {
  32043. "type": "object"
  32044. },
  32045. "durable": {
  32046. "type": "object",
  32047. "properties": {
  32048. "aggregateID": {
  32049. "type": "string"
  32050. },
  32051. "seq": {
  32052. "type": "integer"
  32053. },
  32054. "version": {
  32055. "type": "integer"
  32056. }
  32057. },
  32058. "required": ["aggregateID", "seq", "version"],
  32059. "additionalProperties": false
  32060. },
  32061. "location": {
  32062. "$ref": "#/components/schemas/LocationRef"
  32063. },
  32064. "type": {
  32065. "type": "string",
  32066. "enum": ["session.next.context.updated"]
  32067. },
  32068. "data": {
  32069. "type": "object",
  32070. "properties": {
  32071. "timestamp": {
  32072. "type": "number"
  32073. },
  32074. "sessionID": {
  32075. "type": "string",
  32076. "pattern": "^ses"
  32077. },
  32078. "messageID": {
  32079. "type": "string",
  32080. "pattern": "^msg_"
  32081. },
  32082. "text": {
  32083. "type": "string"
  32084. }
  32085. },
  32086. "required": ["timestamp", "sessionID", "messageID", "text"],
  32087. "additionalProperties": false
  32088. }
  32089. },
  32090. "required": ["id", "type", "data"],
  32091. "additionalProperties": false
  32092. },
  32093. "V2EventSessionNextSynthetic": {
  32094. "type": "object",
  32095. "properties": {
  32096. "id": {
  32097. "type": "string",
  32098. "pattern": "^evt_"
  32099. },
  32100. "metadata": {
  32101. "type": "object"
  32102. },
  32103. "durable": {
  32104. "type": "object",
  32105. "properties": {
  32106. "aggregateID": {
  32107. "type": "string"
  32108. },
  32109. "seq": {
  32110. "type": "integer"
  32111. },
  32112. "version": {
  32113. "type": "integer"
  32114. }
  32115. },
  32116. "required": ["aggregateID", "seq", "version"],
  32117. "additionalProperties": false
  32118. },
  32119. "location": {
  32120. "$ref": "#/components/schemas/LocationRef"
  32121. },
  32122. "type": {
  32123. "type": "string",
  32124. "enum": ["session.next.synthetic"]
  32125. },
  32126. "data": {
  32127. "type": "object",
  32128. "properties": {
  32129. "timestamp": {
  32130. "type": "number"
  32131. },
  32132. "sessionID": {
  32133. "type": "string",
  32134. "pattern": "^ses"
  32135. },
  32136. "messageID": {
  32137. "type": "string",
  32138. "pattern": "^msg_"
  32139. },
  32140. "text": {
  32141. "type": "string"
  32142. }
  32143. },
  32144. "required": ["timestamp", "sessionID", "messageID", "text"],
  32145. "additionalProperties": false
  32146. }
  32147. },
  32148. "required": ["id", "type", "data"],
  32149. "additionalProperties": false
  32150. },
  32151. "V2EventSessionNextShellStarted": {
  32152. "type": "object",
  32153. "properties": {
  32154. "id": {
  32155. "type": "string",
  32156. "pattern": "^evt_"
  32157. },
  32158. "metadata": {
  32159. "type": "object"
  32160. },
  32161. "durable": {
  32162. "type": "object",
  32163. "properties": {
  32164. "aggregateID": {
  32165. "type": "string"
  32166. },
  32167. "seq": {
  32168. "type": "integer"
  32169. },
  32170. "version": {
  32171. "type": "integer"
  32172. }
  32173. },
  32174. "required": ["aggregateID", "seq", "version"],
  32175. "additionalProperties": false
  32176. },
  32177. "location": {
  32178. "$ref": "#/components/schemas/LocationRef"
  32179. },
  32180. "type": {
  32181. "type": "string",
  32182. "enum": ["session.next.shell.started"]
  32183. },
  32184. "data": {
  32185. "type": "object",
  32186. "properties": {
  32187. "timestamp": {
  32188. "type": "number"
  32189. },
  32190. "sessionID": {
  32191. "type": "string",
  32192. "pattern": "^ses"
  32193. },
  32194. "messageID": {
  32195. "type": "string",
  32196. "pattern": "^msg_"
  32197. },
  32198. "callID": {
  32199. "type": "string"
  32200. },
  32201. "command": {
  32202. "type": "string"
  32203. }
  32204. },
  32205. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  32206. "additionalProperties": false
  32207. }
  32208. },
  32209. "required": ["id", "type", "data"],
  32210. "additionalProperties": false
  32211. },
  32212. "V2EventSessionNextShellEnded": {
  32213. "type": "object",
  32214. "properties": {
  32215. "id": {
  32216. "type": "string",
  32217. "pattern": "^evt_"
  32218. },
  32219. "metadata": {
  32220. "type": "object"
  32221. },
  32222. "durable": {
  32223. "type": "object",
  32224. "properties": {
  32225. "aggregateID": {
  32226. "type": "string"
  32227. },
  32228. "seq": {
  32229. "type": "integer"
  32230. },
  32231. "version": {
  32232. "type": "integer"
  32233. }
  32234. },
  32235. "required": ["aggregateID", "seq", "version"],
  32236. "additionalProperties": false
  32237. },
  32238. "location": {
  32239. "$ref": "#/components/schemas/LocationRef"
  32240. },
  32241. "type": {
  32242. "type": "string",
  32243. "enum": ["session.next.shell.ended"]
  32244. },
  32245. "data": {
  32246. "type": "object",
  32247. "properties": {
  32248. "timestamp": {
  32249. "type": "number"
  32250. },
  32251. "sessionID": {
  32252. "type": "string",
  32253. "pattern": "^ses"
  32254. },
  32255. "callID": {
  32256. "type": "string"
  32257. },
  32258. "output": {
  32259. "type": "string"
  32260. }
  32261. },
  32262. "required": ["timestamp", "sessionID", "callID", "output"],
  32263. "additionalProperties": false
  32264. }
  32265. },
  32266. "required": ["id", "type", "data"],
  32267. "additionalProperties": false
  32268. },
  32269. "V2EventSessionNextStepStarted": {
  32270. "type": "object",
  32271. "properties": {
  32272. "id": {
  32273. "type": "string",
  32274. "pattern": "^evt_"
  32275. },
  32276. "metadata": {
  32277. "type": "object"
  32278. },
  32279. "durable": {
  32280. "type": "object",
  32281. "properties": {
  32282. "aggregateID": {
  32283. "type": "string"
  32284. },
  32285. "seq": {
  32286. "type": "integer"
  32287. },
  32288. "version": {
  32289. "type": "integer"
  32290. }
  32291. },
  32292. "required": ["aggregateID", "seq", "version"],
  32293. "additionalProperties": false
  32294. },
  32295. "location": {
  32296. "$ref": "#/components/schemas/LocationRef"
  32297. },
  32298. "type": {
  32299. "type": "string",
  32300. "enum": ["session.next.step.started"]
  32301. },
  32302. "data": {
  32303. "type": "object",
  32304. "properties": {
  32305. "timestamp": {
  32306. "type": "number"
  32307. },
  32308. "sessionID": {
  32309. "type": "string",
  32310. "pattern": "^ses"
  32311. },
  32312. "assistantMessageID": {
  32313. "type": "string",
  32314. "pattern": "^msg_"
  32315. },
  32316. "agent": {
  32317. "type": "string"
  32318. },
  32319. "model": {
  32320. "$ref": "#/components/schemas/ModelRef"
  32321. },
  32322. "snapshot": {
  32323. "type": "string"
  32324. }
  32325. },
  32326. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  32327. "additionalProperties": false
  32328. }
  32329. },
  32330. "required": ["id", "type", "data"],
  32331. "additionalProperties": false
  32332. },
  32333. "V2EventSessionNextStepEnded": {
  32334. "type": "object",
  32335. "properties": {
  32336. "id": {
  32337. "type": "string",
  32338. "pattern": "^evt_"
  32339. },
  32340. "metadata": {
  32341. "type": "object"
  32342. },
  32343. "durable": {
  32344. "type": "object",
  32345. "properties": {
  32346. "aggregateID": {
  32347. "type": "string"
  32348. },
  32349. "seq": {
  32350. "type": "integer"
  32351. },
  32352. "version": {
  32353. "type": "integer"
  32354. }
  32355. },
  32356. "required": ["aggregateID", "seq", "version"],
  32357. "additionalProperties": false
  32358. },
  32359. "location": {
  32360. "$ref": "#/components/schemas/LocationRef"
  32361. },
  32362. "type": {
  32363. "type": "string",
  32364. "enum": ["session.next.step.ended"]
  32365. },
  32366. "data": {
  32367. "type": "object",
  32368. "properties": {
  32369. "timestamp": {
  32370. "type": "number"
  32371. },
  32372. "sessionID": {
  32373. "type": "string",
  32374. "pattern": "^ses"
  32375. },
  32376. "assistantMessageID": {
  32377. "type": "string",
  32378. "pattern": "^msg_"
  32379. },
  32380. "finish": {
  32381. "type": "string"
  32382. },
  32383. "cost": {
  32384. "type": "number"
  32385. },
  32386. "tokens": {
  32387. "type": "object",
  32388. "properties": {
  32389. "input": {
  32390. "type": "number"
  32391. },
  32392. "output": {
  32393. "type": "number"
  32394. },
  32395. "reasoning": {
  32396. "type": "number"
  32397. },
  32398. "cache": {
  32399. "type": "object",
  32400. "properties": {
  32401. "read": {
  32402. "type": "number"
  32403. },
  32404. "write": {
  32405. "type": "number"
  32406. }
  32407. },
  32408. "required": ["read", "write"],
  32409. "additionalProperties": false
  32410. }
  32411. },
  32412. "required": ["input", "output", "reasoning", "cache"],
  32413. "additionalProperties": false
  32414. },
  32415. "snapshot": {
  32416. "type": "string"
  32417. },
  32418. "files": {
  32419. "type": "array",
  32420. "items": {
  32421. "type": "string"
  32422. }
  32423. }
  32424. },
  32425. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  32426. "additionalProperties": false
  32427. }
  32428. },
  32429. "required": ["id", "type", "data"],
  32430. "additionalProperties": false
  32431. },
  32432. "V2EventSessionNextStepFailed": {
  32433. "type": "object",
  32434. "properties": {
  32435. "id": {
  32436. "type": "string",
  32437. "pattern": "^evt_"
  32438. },
  32439. "metadata": {
  32440. "type": "object"
  32441. },
  32442. "durable": {
  32443. "type": "object",
  32444. "properties": {
  32445. "aggregateID": {
  32446. "type": "string"
  32447. },
  32448. "seq": {
  32449. "type": "integer"
  32450. },
  32451. "version": {
  32452. "type": "integer"
  32453. }
  32454. },
  32455. "required": ["aggregateID", "seq", "version"],
  32456. "additionalProperties": false
  32457. },
  32458. "location": {
  32459. "$ref": "#/components/schemas/LocationRef"
  32460. },
  32461. "type": {
  32462. "type": "string",
  32463. "enum": ["session.next.step.failed"]
  32464. },
  32465. "data": {
  32466. "type": "object",
  32467. "properties": {
  32468. "timestamp": {
  32469. "type": "number"
  32470. },
  32471. "sessionID": {
  32472. "type": "string",
  32473. "pattern": "^ses"
  32474. },
  32475. "assistantMessageID": {
  32476. "type": "string",
  32477. "pattern": "^msg_"
  32478. },
  32479. "error": {
  32480. "$ref": "#/components/schemas/SessionErrorUnknown"
  32481. }
  32482. },
  32483. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  32484. "additionalProperties": false
  32485. }
  32486. },
  32487. "required": ["id", "type", "data"],
  32488. "additionalProperties": false
  32489. },
  32490. "V2EventSessionNextTextStarted": {
  32491. "type": "object",
  32492. "properties": {
  32493. "id": {
  32494. "type": "string",
  32495. "pattern": "^evt_"
  32496. },
  32497. "metadata": {
  32498. "type": "object"
  32499. },
  32500. "durable": {
  32501. "type": "object",
  32502. "properties": {
  32503. "aggregateID": {
  32504. "type": "string"
  32505. },
  32506. "seq": {
  32507. "type": "integer"
  32508. },
  32509. "version": {
  32510. "type": "integer"
  32511. }
  32512. },
  32513. "required": ["aggregateID", "seq", "version"],
  32514. "additionalProperties": false
  32515. },
  32516. "location": {
  32517. "$ref": "#/components/schemas/LocationRef"
  32518. },
  32519. "type": {
  32520. "type": "string",
  32521. "enum": ["session.next.text.started"]
  32522. },
  32523. "data": {
  32524. "type": "object",
  32525. "properties": {
  32526. "timestamp": {
  32527. "type": "number"
  32528. },
  32529. "sessionID": {
  32530. "type": "string",
  32531. "pattern": "^ses"
  32532. },
  32533. "assistantMessageID": {
  32534. "type": "string",
  32535. "pattern": "^msg_"
  32536. },
  32537. "textID": {
  32538. "type": "string"
  32539. }
  32540. },
  32541. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  32542. "additionalProperties": false
  32543. }
  32544. },
  32545. "required": ["id", "type", "data"],
  32546. "additionalProperties": false
  32547. },
  32548. "V2EventSessionNextTextDelta": {
  32549. "type": "object",
  32550. "properties": {
  32551. "id": {
  32552. "type": "string",
  32553. "pattern": "^evt_"
  32554. },
  32555. "metadata": {
  32556. "type": "object"
  32557. },
  32558. "durable": {
  32559. "type": "object",
  32560. "properties": {
  32561. "aggregateID": {
  32562. "type": "string"
  32563. },
  32564. "seq": {
  32565. "type": "integer"
  32566. },
  32567. "version": {
  32568. "type": "integer"
  32569. }
  32570. },
  32571. "required": ["aggregateID", "seq", "version"],
  32572. "additionalProperties": false
  32573. },
  32574. "location": {
  32575. "$ref": "#/components/schemas/LocationRef"
  32576. },
  32577. "type": {
  32578. "type": "string",
  32579. "enum": ["session.next.text.delta"]
  32580. },
  32581. "data": {
  32582. "type": "object",
  32583. "properties": {
  32584. "timestamp": {
  32585. "type": "number"
  32586. },
  32587. "sessionID": {
  32588. "type": "string",
  32589. "pattern": "^ses"
  32590. },
  32591. "assistantMessageID": {
  32592. "type": "string",
  32593. "pattern": "^msg_"
  32594. },
  32595. "textID": {
  32596. "type": "string"
  32597. },
  32598. "delta": {
  32599. "type": "string"
  32600. }
  32601. },
  32602. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  32603. "additionalProperties": false
  32604. }
  32605. },
  32606. "required": ["id", "type", "data"],
  32607. "additionalProperties": false
  32608. },
  32609. "V2EventSessionNextTextEnded": {
  32610. "type": "object",
  32611. "properties": {
  32612. "id": {
  32613. "type": "string",
  32614. "pattern": "^evt_"
  32615. },
  32616. "metadata": {
  32617. "type": "object"
  32618. },
  32619. "durable": {
  32620. "type": "object",
  32621. "properties": {
  32622. "aggregateID": {
  32623. "type": "string"
  32624. },
  32625. "seq": {
  32626. "type": "integer"
  32627. },
  32628. "version": {
  32629. "type": "integer"
  32630. }
  32631. },
  32632. "required": ["aggregateID", "seq", "version"],
  32633. "additionalProperties": false
  32634. },
  32635. "location": {
  32636. "$ref": "#/components/schemas/LocationRef"
  32637. },
  32638. "type": {
  32639. "type": "string",
  32640. "enum": ["session.next.text.ended"]
  32641. },
  32642. "data": {
  32643. "type": "object",
  32644. "properties": {
  32645. "timestamp": {
  32646. "type": "number"
  32647. },
  32648. "sessionID": {
  32649. "type": "string",
  32650. "pattern": "^ses"
  32651. },
  32652. "assistantMessageID": {
  32653. "type": "string",
  32654. "pattern": "^msg_"
  32655. },
  32656. "textID": {
  32657. "type": "string"
  32658. },
  32659. "text": {
  32660. "type": "string"
  32661. }
  32662. },
  32663. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  32664. "additionalProperties": false
  32665. }
  32666. },
  32667. "required": ["id", "type", "data"],
  32668. "additionalProperties": false
  32669. },
  32670. "V2EventSessionNextReasoningStarted": {
  32671. "type": "object",
  32672. "properties": {
  32673. "id": {
  32674. "type": "string",
  32675. "pattern": "^evt_"
  32676. },
  32677. "metadata": {
  32678. "type": "object"
  32679. },
  32680. "durable": {
  32681. "type": "object",
  32682. "properties": {
  32683. "aggregateID": {
  32684. "type": "string"
  32685. },
  32686. "seq": {
  32687. "type": "integer"
  32688. },
  32689. "version": {
  32690. "type": "integer"
  32691. }
  32692. },
  32693. "required": ["aggregateID", "seq", "version"],
  32694. "additionalProperties": false
  32695. },
  32696. "location": {
  32697. "$ref": "#/components/schemas/LocationRef"
  32698. },
  32699. "type": {
  32700. "type": "string",
  32701. "enum": ["session.next.reasoning.started"]
  32702. },
  32703. "data": {
  32704. "type": "object",
  32705. "properties": {
  32706. "timestamp": {
  32707. "type": "number"
  32708. },
  32709. "sessionID": {
  32710. "type": "string",
  32711. "pattern": "^ses"
  32712. },
  32713. "assistantMessageID": {
  32714. "type": "string",
  32715. "pattern": "^msg_"
  32716. },
  32717. "reasoningID": {
  32718. "type": "string"
  32719. },
  32720. "providerMetadata": {
  32721. "$ref": "#/components/schemas/LLMProviderMetadata"
  32722. }
  32723. },
  32724. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  32725. "additionalProperties": false
  32726. }
  32727. },
  32728. "required": ["id", "type", "data"],
  32729. "additionalProperties": false
  32730. },
  32731. "V2EventSessionNextReasoningDelta": {
  32732. "type": "object",
  32733. "properties": {
  32734. "id": {
  32735. "type": "string",
  32736. "pattern": "^evt_"
  32737. },
  32738. "metadata": {
  32739. "type": "object"
  32740. },
  32741. "durable": {
  32742. "type": "object",
  32743. "properties": {
  32744. "aggregateID": {
  32745. "type": "string"
  32746. },
  32747. "seq": {
  32748. "type": "integer"
  32749. },
  32750. "version": {
  32751. "type": "integer"
  32752. }
  32753. },
  32754. "required": ["aggregateID", "seq", "version"],
  32755. "additionalProperties": false
  32756. },
  32757. "location": {
  32758. "$ref": "#/components/schemas/LocationRef"
  32759. },
  32760. "type": {
  32761. "type": "string",
  32762. "enum": ["session.next.reasoning.delta"]
  32763. },
  32764. "data": {
  32765. "type": "object",
  32766. "properties": {
  32767. "timestamp": {
  32768. "type": "number"
  32769. },
  32770. "sessionID": {
  32771. "type": "string",
  32772. "pattern": "^ses"
  32773. },
  32774. "assistantMessageID": {
  32775. "type": "string",
  32776. "pattern": "^msg_"
  32777. },
  32778. "reasoningID": {
  32779. "type": "string"
  32780. },
  32781. "delta": {
  32782. "type": "string"
  32783. }
  32784. },
  32785. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  32786. "additionalProperties": false
  32787. }
  32788. },
  32789. "required": ["id", "type", "data"],
  32790. "additionalProperties": false
  32791. },
  32792. "V2EventSessionNextReasoningEnded": {
  32793. "type": "object",
  32794. "properties": {
  32795. "id": {
  32796. "type": "string",
  32797. "pattern": "^evt_"
  32798. },
  32799. "metadata": {
  32800. "type": "object"
  32801. },
  32802. "durable": {
  32803. "type": "object",
  32804. "properties": {
  32805. "aggregateID": {
  32806. "type": "string"
  32807. },
  32808. "seq": {
  32809. "type": "integer"
  32810. },
  32811. "version": {
  32812. "type": "integer"
  32813. }
  32814. },
  32815. "required": ["aggregateID", "seq", "version"],
  32816. "additionalProperties": false
  32817. },
  32818. "location": {
  32819. "$ref": "#/components/schemas/LocationRef"
  32820. },
  32821. "type": {
  32822. "type": "string",
  32823. "enum": ["session.next.reasoning.ended"]
  32824. },
  32825. "data": {
  32826. "type": "object",
  32827. "properties": {
  32828. "timestamp": {
  32829. "type": "number"
  32830. },
  32831. "sessionID": {
  32832. "type": "string",
  32833. "pattern": "^ses"
  32834. },
  32835. "assistantMessageID": {
  32836. "type": "string",
  32837. "pattern": "^msg_"
  32838. },
  32839. "reasoningID": {
  32840. "type": "string"
  32841. },
  32842. "text": {
  32843. "type": "string"
  32844. },
  32845. "providerMetadata": {
  32846. "$ref": "#/components/schemas/LLMProviderMetadata"
  32847. }
  32848. },
  32849. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  32850. "additionalProperties": false
  32851. }
  32852. },
  32853. "required": ["id", "type", "data"],
  32854. "additionalProperties": false
  32855. },
  32856. "V2EventSessionNextToolInputStarted": {
  32857. "type": "object",
  32858. "properties": {
  32859. "id": {
  32860. "type": "string",
  32861. "pattern": "^evt_"
  32862. },
  32863. "metadata": {
  32864. "type": "object"
  32865. },
  32866. "durable": {
  32867. "type": "object",
  32868. "properties": {
  32869. "aggregateID": {
  32870. "type": "string"
  32871. },
  32872. "seq": {
  32873. "type": "integer"
  32874. },
  32875. "version": {
  32876. "type": "integer"
  32877. }
  32878. },
  32879. "required": ["aggregateID", "seq", "version"],
  32880. "additionalProperties": false
  32881. },
  32882. "location": {
  32883. "$ref": "#/components/schemas/LocationRef"
  32884. },
  32885. "type": {
  32886. "type": "string",
  32887. "enum": ["session.next.tool.input.started"]
  32888. },
  32889. "data": {
  32890. "type": "object",
  32891. "properties": {
  32892. "timestamp": {
  32893. "type": "number"
  32894. },
  32895. "sessionID": {
  32896. "type": "string",
  32897. "pattern": "^ses"
  32898. },
  32899. "assistantMessageID": {
  32900. "type": "string",
  32901. "pattern": "^msg_"
  32902. },
  32903. "callID": {
  32904. "type": "string"
  32905. },
  32906. "name": {
  32907. "type": "string"
  32908. }
  32909. },
  32910. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  32911. "additionalProperties": false
  32912. }
  32913. },
  32914. "required": ["id", "type", "data"],
  32915. "additionalProperties": false
  32916. },
  32917. "V2EventSessionNextToolInputDelta": {
  32918. "type": "object",
  32919. "properties": {
  32920. "id": {
  32921. "type": "string",
  32922. "pattern": "^evt_"
  32923. },
  32924. "metadata": {
  32925. "type": "object"
  32926. },
  32927. "durable": {
  32928. "type": "object",
  32929. "properties": {
  32930. "aggregateID": {
  32931. "type": "string"
  32932. },
  32933. "seq": {
  32934. "type": "integer"
  32935. },
  32936. "version": {
  32937. "type": "integer"
  32938. }
  32939. },
  32940. "required": ["aggregateID", "seq", "version"],
  32941. "additionalProperties": false
  32942. },
  32943. "location": {
  32944. "$ref": "#/components/schemas/LocationRef"
  32945. },
  32946. "type": {
  32947. "type": "string",
  32948. "enum": ["session.next.tool.input.delta"]
  32949. },
  32950. "data": {
  32951. "type": "object",
  32952. "properties": {
  32953. "timestamp": {
  32954. "type": "number"
  32955. },
  32956. "sessionID": {
  32957. "type": "string",
  32958. "pattern": "^ses"
  32959. },
  32960. "assistantMessageID": {
  32961. "type": "string",
  32962. "pattern": "^msg_"
  32963. },
  32964. "callID": {
  32965. "type": "string"
  32966. },
  32967. "delta": {
  32968. "type": "string"
  32969. }
  32970. },
  32971. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  32972. "additionalProperties": false
  32973. }
  32974. },
  32975. "required": ["id", "type", "data"],
  32976. "additionalProperties": false
  32977. },
  32978. "V2EventSessionNextToolInputEnded": {
  32979. "type": "object",
  32980. "properties": {
  32981. "id": {
  32982. "type": "string",
  32983. "pattern": "^evt_"
  32984. },
  32985. "metadata": {
  32986. "type": "object"
  32987. },
  32988. "durable": {
  32989. "type": "object",
  32990. "properties": {
  32991. "aggregateID": {
  32992. "type": "string"
  32993. },
  32994. "seq": {
  32995. "type": "integer"
  32996. },
  32997. "version": {
  32998. "type": "integer"
  32999. }
  33000. },
  33001. "required": ["aggregateID", "seq", "version"],
  33002. "additionalProperties": false
  33003. },
  33004. "location": {
  33005. "$ref": "#/components/schemas/LocationRef"
  33006. },
  33007. "type": {
  33008. "type": "string",
  33009. "enum": ["session.next.tool.input.ended"]
  33010. },
  33011. "data": {
  33012. "type": "object",
  33013. "properties": {
  33014. "timestamp": {
  33015. "type": "number"
  33016. },
  33017. "sessionID": {
  33018. "type": "string",
  33019. "pattern": "^ses"
  33020. },
  33021. "assistantMessageID": {
  33022. "type": "string",
  33023. "pattern": "^msg_"
  33024. },
  33025. "callID": {
  33026. "type": "string"
  33027. },
  33028. "text": {
  33029. "type": "string"
  33030. }
  33031. },
  33032. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  33033. "additionalProperties": false
  33034. }
  33035. },
  33036. "required": ["id", "type", "data"],
  33037. "additionalProperties": false
  33038. },
  33039. "V2EventSessionNextToolCalled": {
  33040. "type": "object",
  33041. "properties": {
  33042. "id": {
  33043. "type": "string",
  33044. "pattern": "^evt_"
  33045. },
  33046. "metadata": {
  33047. "type": "object"
  33048. },
  33049. "durable": {
  33050. "type": "object",
  33051. "properties": {
  33052. "aggregateID": {
  33053. "type": "string"
  33054. },
  33055. "seq": {
  33056. "type": "integer"
  33057. },
  33058. "version": {
  33059. "type": "integer"
  33060. }
  33061. },
  33062. "required": ["aggregateID", "seq", "version"],
  33063. "additionalProperties": false
  33064. },
  33065. "location": {
  33066. "$ref": "#/components/schemas/LocationRef"
  33067. },
  33068. "type": {
  33069. "type": "string",
  33070. "enum": ["session.next.tool.called"]
  33071. },
  33072. "data": {
  33073. "type": "object",
  33074. "properties": {
  33075. "timestamp": {
  33076. "type": "number"
  33077. },
  33078. "sessionID": {
  33079. "type": "string",
  33080. "pattern": "^ses"
  33081. },
  33082. "assistantMessageID": {
  33083. "type": "string",
  33084. "pattern": "^msg_"
  33085. },
  33086. "callID": {
  33087. "type": "string"
  33088. },
  33089. "tool": {
  33090. "type": "string"
  33091. },
  33092. "input": {
  33093. "type": "object"
  33094. },
  33095. "provider": {
  33096. "type": "object",
  33097. "properties": {
  33098. "executed": {
  33099. "type": "boolean"
  33100. },
  33101. "metadata": {
  33102. "$ref": "#/components/schemas/LLMProviderMetadata"
  33103. }
  33104. },
  33105. "required": ["executed"],
  33106. "additionalProperties": false
  33107. }
  33108. },
  33109. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  33110. "additionalProperties": false
  33111. }
  33112. },
  33113. "required": ["id", "type", "data"],
  33114. "additionalProperties": false
  33115. },
  33116. "V2EventSessionNextToolProgress": {
  33117. "type": "object",
  33118. "properties": {
  33119. "id": {
  33120. "type": "string",
  33121. "pattern": "^evt_"
  33122. },
  33123. "metadata": {
  33124. "type": "object"
  33125. },
  33126. "durable": {
  33127. "type": "object",
  33128. "properties": {
  33129. "aggregateID": {
  33130. "type": "string"
  33131. },
  33132. "seq": {
  33133. "type": "integer"
  33134. },
  33135. "version": {
  33136. "type": "integer"
  33137. }
  33138. },
  33139. "required": ["aggregateID", "seq", "version"],
  33140. "additionalProperties": false
  33141. },
  33142. "location": {
  33143. "$ref": "#/components/schemas/LocationRef"
  33144. },
  33145. "type": {
  33146. "type": "string",
  33147. "enum": ["session.next.tool.progress"]
  33148. },
  33149. "data": {
  33150. "type": "object",
  33151. "properties": {
  33152. "timestamp": {
  33153. "type": "number"
  33154. },
  33155. "sessionID": {
  33156. "type": "string",
  33157. "pattern": "^ses"
  33158. },
  33159. "assistantMessageID": {
  33160. "type": "string",
  33161. "pattern": "^msg_"
  33162. },
  33163. "callID": {
  33164. "type": "string"
  33165. },
  33166. "structured": {
  33167. "type": "object"
  33168. },
  33169. "content": {
  33170. "type": "array",
  33171. "items": {
  33172. "$ref": "#/components/schemas/LLMToolContent"
  33173. }
  33174. }
  33175. },
  33176. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  33177. "additionalProperties": false
  33178. }
  33179. },
  33180. "required": ["id", "type", "data"],
  33181. "additionalProperties": false
  33182. },
  33183. "V2EventSessionNextToolSuccess": {
  33184. "type": "object",
  33185. "properties": {
  33186. "id": {
  33187. "type": "string",
  33188. "pattern": "^evt_"
  33189. },
  33190. "metadata": {
  33191. "type": "object"
  33192. },
  33193. "durable": {
  33194. "type": "object",
  33195. "properties": {
  33196. "aggregateID": {
  33197. "type": "string"
  33198. },
  33199. "seq": {
  33200. "type": "integer"
  33201. },
  33202. "version": {
  33203. "type": "integer"
  33204. }
  33205. },
  33206. "required": ["aggregateID", "seq", "version"],
  33207. "additionalProperties": false
  33208. },
  33209. "location": {
  33210. "$ref": "#/components/schemas/LocationRef"
  33211. },
  33212. "type": {
  33213. "type": "string",
  33214. "enum": ["session.next.tool.success"]
  33215. },
  33216. "data": {
  33217. "type": "object",
  33218. "properties": {
  33219. "timestamp": {
  33220. "type": "number"
  33221. },
  33222. "sessionID": {
  33223. "type": "string",
  33224. "pattern": "^ses"
  33225. },
  33226. "assistantMessageID": {
  33227. "type": "string",
  33228. "pattern": "^msg_"
  33229. },
  33230. "callID": {
  33231. "type": "string"
  33232. },
  33233. "structured": {
  33234. "type": "object"
  33235. },
  33236. "content": {
  33237. "type": "array",
  33238. "items": {
  33239. "$ref": "#/components/schemas/LLMToolContent"
  33240. }
  33241. },
  33242. "outputPaths": {
  33243. "type": "array",
  33244. "items": {
  33245. "type": "string"
  33246. }
  33247. },
  33248. "result": {},
  33249. "provider": {
  33250. "type": "object",
  33251. "properties": {
  33252. "executed": {
  33253. "type": "boolean"
  33254. },
  33255. "metadata": {
  33256. "$ref": "#/components/schemas/LLMProviderMetadata"
  33257. }
  33258. },
  33259. "required": ["executed"],
  33260. "additionalProperties": false
  33261. }
  33262. },
  33263. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  33264. "additionalProperties": false
  33265. }
  33266. },
  33267. "required": ["id", "type", "data"],
  33268. "additionalProperties": false
  33269. },
  33270. "V2EventSessionNextToolFailed": {
  33271. "type": "object",
  33272. "properties": {
  33273. "id": {
  33274. "type": "string",
  33275. "pattern": "^evt_"
  33276. },
  33277. "metadata": {
  33278. "type": "object"
  33279. },
  33280. "durable": {
  33281. "type": "object",
  33282. "properties": {
  33283. "aggregateID": {
  33284. "type": "string"
  33285. },
  33286. "seq": {
  33287. "type": "integer"
  33288. },
  33289. "version": {
  33290. "type": "integer"
  33291. }
  33292. },
  33293. "required": ["aggregateID", "seq", "version"],
  33294. "additionalProperties": false
  33295. },
  33296. "location": {
  33297. "$ref": "#/components/schemas/LocationRef"
  33298. },
  33299. "type": {
  33300. "type": "string",
  33301. "enum": ["session.next.tool.failed"]
  33302. },
  33303. "data": {
  33304. "type": "object",
  33305. "properties": {
  33306. "timestamp": {
  33307. "type": "number"
  33308. },
  33309. "sessionID": {
  33310. "type": "string",
  33311. "pattern": "^ses"
  33312. },
  33313. "assistantMessageID": {
  33314. "type": "string",
  33315. "pattern": "^msg_"
  33316. },
  33317. "callID": {
  33318. "type": "string"
  33319. },
  33320. "error": {
  33321. "$ref": "#/components/schemas/SessionErrorUnknown"
  33322. },
  33323. "result": {},
  33324. "provider": {
  33325. "type": "object",
  33326. "properties": {
  33327. "executed": {
  33328. "type": "boolean"
  33329. },
  33330. "metadata": {
  33331. "$ref": "#/components/schemas/LLMProviderMetadata"
  33332. }
  33333. },
  33334. "required": ["executed"],
  33335. "additionalProperties": false
  33336. }
  33337. },
  33338. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  33339. "additionalProperties": false
  33340. }
  33341. },
  33342. "required": ["id", "type", "data"],
  33343. "additionalProperties": false
  33344. },
  33345. "V2EventSessionNextRetried": {
  33346. "type": "object",
  33347. "properties": {
  33348. "id": {
  33349. "type": "string",
  33350. "pattern": "^evt_"
  33351. },
  33352. "metadata": {
  33353. "type": "object"
  33354. },
  33355. "durable": {
  33356. "type": "object",
  33357. "properties": {
  33358. "aggregateID": {
  33359. "type": "string"
  33360. },
  33361. "seq": {
  33362. "type": "integer"
  33363. },
  33364. "version": {
  33365. "type": "integer"
  33366. }
  33367. },
  33368. "required": ["aggregateID", "seq", "version"],
  33369. "additionalProperties": false
  33370. },
  33371. "location": {
  33372. "$ref": "#/components/schemas/LocationRef"
  33373. },
  33374. "type": {
  33375. "type": "string",
  33376. "enum": ["session.next.retried"]
  33377. },
  33378. "data": {
  33379. "type": "object",
  33380. "properties": {
  33381. "timestamp": {
  33382. "type": "number"
  33383. },
  33384. "sessionID": {
  33385. "type": "string",
  33386. "pattern": "^ses"
  33387. },
  33388. "attempt": {
  33389. "type": "number"
  33390. },
  33391. "error": {
  33392. "$ref": "#/components/schemas/SessionNextRetry_error"
  33393. }
  33394. },
  33395. "required": ["timestamp", "sessionID", "attempt", "error"],
  33396. "additionalProperties": false
  33397. }
  33398. },
  33399. "required": ["id", "type", "data"],
  33400. "additionalProperties": false
  33401. },
  33402. "V2EventSessionNextCompactionStarted": {
  33403. "type": "object",
  33404. "properties": {
  33405. "id": {
  33406. "type": "string",
  33407. "pattern": "^evt_"
  33408. },
  33409. "metadata": {
  33410. "type": "object"
  33411. },
  33412. "durable": {
  33413. "type": "object",
  33414. "properties": {
  33415. "aggregateID": {
  33416. "type": "string"
  33417. },
  33418. "seq": {
  33419. "type": "integer"
  33420. },
  33421. "version": {
  33422. "type": "integer"
  33423. }
  33424. },
  33425. "required": ["aggregateID", "seq", "version"],
  33426. "additionalProperties": false
  33427. },
  33428. "location": {
  33429. "$ref": "#/components/schemas/LocationRef"
  33430. },
  33431. "type": {
  33432. "type": "string",
  33433. "enum": ["session.next.compaction.started"]
  33434. },
  33435. "data": {
  33436. "type": "object",
  33437. "properties": {
  33438. "timestamp": {
  33439. "type": "number"
  33440. },
  33441. "sessionID": {
  33442. "type": "string",
  33443. "pattern": "^ses"
  33444. },
  33445. "messageID": {
  33446. "type": "string",
  33447. "pattern": "^msg_"
  33448. },
  33449. "reason": {
  33450. "type": "string",
  33451. "enum": ["auto", "manual"]
  33452. }
  33453. },
  33454. "required": ["timestamp", "sessionID", "messageID", "reason"],
  33455. "additionalProperties": false
  33456. }
  33457. },
  33458. "required": ["id", "type", "data"],
  33459. "additionalProperties": false
  33460. },
  33461. "V2EventSessionNextCompactionDelta": {
  33462. "type": "object",
  33463. "properties": {
  33464. "id": {
  33465. "type": "string",
  33466. "pattern": "^evt_"
  33467. },
  33468. "metadata": {
  33469. "type": "object"
  33470. },
  33471. "durable": {
  33472. "type": "object",
  33473. "properties": {
  33474. "aggregateID": {
  33475. "type": "string"
  33476. },
  33477. "seq": {
  33478. "type": "integer"
  33479. },
  33480. "version": {
  33481. "type": "integer"
  33482. }
  33483. },
  33484. "required": ["aggregateID", "seq", "version"],
  33485. "additionalProperties": false
  33486. },
  33487. "location": {
  33488. "$ref": "#/components/schemas/LocationRef"
  33489. },
  33490. "type": {
  33491. "type": "string",
  33492. "enum": ["session.next.compaction.delta"]
  33493. },
  33494. "data": {
  33495. "type": "object",
  33496. "properties": {
  33497. "timestamp": {
  33498. "type": "number"
  33499. },
  33500. "sessionID": {
  33501. "type": "string",
  33502. "pattern": "^ses"
  33503. },
  33504. "messageID": {
  33505. "type": "string",
  33506. "pattern": "^msg_"
  33507. },
  33508. "text": {
  33509. "type": "string"
  33510. }
  33511. },
  33512. "required": ["timestamp", "sessionID", "messageID", "text"],
  33513. "additionalProperties": false
  33514. }
  33515. },
  33516. "required": ["id", "type", "data"],
  33517. "additionalProperties": false
  33518. },
  33519. "V2EventSessionNextCompactionEnded": {
  33520. "type": "object",
  33521. "properties": {
  33522. "id": {
  33523. "type": "string",
  33524. "pattern": "^evt_"
  33525. },
  33526. "metadata": {
  33527. "type": "object"
  33528. },
  33529. "durable": {
  33530. "type": "object",
  33531. "properties": {
  33532. "aggregateID": {
  33533. "type": "string"
  33534. },
  33535. "seq": {
  33536. "type": "integer"
  33537. },
  33538. "version": {
  33539. "type": "integer"
  33540. }
  33541. },
  33542. "required": ["aggregateID", "seq", "version"],
  33543. "additionalProperties": false
  33544. },
  33545. "location": {
  33546. "$ref": "#/components/schemas/LocationRef"
  33547. },
  33548. "type": {
  33549. "type": "string",
  33550. "enum": ["session.next.compaction.ended"]
  33551. },
  33552. "data": {
  33553. "type": "object",
  33554. "properties": {
  33555. "timestamp": {
  33556. "type": "number"
  33557. },
  33558. "sessionID": {
  33559. "type": "string",
  33560. "pattern": "^ses"
  33561. },
  33562. "messageID": {
  33563. "type": "string",
  33564. "pattern": "^msg_"
  33565. },
  33566. "reason": {
  33567. "type": "string",
  33568. "enum": ["auto", "manual"]
  33569. },
  33570. "text": {
  33571. "type": "string"
  33572. },
  33573. "recent": {
  33574. "type": "string"
  33575. }
  33576. },
  33577. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  33578. "additionalProperties": false
  33579. }
  33580. },
  33581. "required": ["id", "type", "data"],
  33582. "additionalProperties": false
  33583. },
  33584. "V2EventSessionNextRevertStaged": {
  33585. "type": "object",
  33586. "properties": {
  33587. "id": {
  33588. "type": "string",
  33589. "pattern": "^evt_"
  33590. },
  33591. "metadata": {
  33592. "type": "object"
  33593. },
  33594. "durable": {
  33595. "type": "object",
  33596. "properties": {
  33597. "aggregateID": {
  33598. "type": "string"
  33599. },
  33600. "seq": {
  33601. "type": "integer"
  33602. },
  33603. "version": {
  33604. "type": "integer"
  33605. }
  33606. },
  33607. "required": ["aggregateID", "seq", "version"],
  33608. "additionalProperties": false
  33609. },
  33610. "location": {
  33611. "$ref": "#/components/schemas/LocationRef"
  33612. },
  33613. "type": {
  33614. "type": "string",
  33615. "enum": ["session.next.revert.staged"]
  33616. },
  33617. "data": {
  33618. "type": "object",
  33619. "properties": {
  33620. "timestamp": {
  33621. "type": "number"
  33622. },
  33623. "sessionID": {
  33624. "type": "string",
  33625. "pattern": "^ses"
  33626. },
  33627. "revert": {
  33628. "$ref": "#/components/schemas/RevertState"
  33629. }
  33630. },
  33631. "required": ["timestamp", "sessionID", "revert"],
  33632. "additionalProperties": false
  33633. }
  33634. },
  33635. "required": ["id", "type", "data"],
  33636. "additionalProperties": false
  33637. },
  33638. "V2EventSessionNextRevertCleared": {
  33639. "type": "object",
  33640. "properties": {
  33641. "id": {
  33642. "type": "string",
  33643. "pattern": "^evt_"
  33644. },
  33645. "metadata": {
  33646. "type": "object"
  33647. },
  33648. "durable": {
  33649. "type": "object",
  33650. "properties": {
  33651. "aggregateID": {
  33652. "type": "string"
  33653. },
  33654. "seq": {
  33655. "type": "integer"
  33656. },
  33657. "version": {
  33658. "type": "integer"
  33659. }
  33660. },
  33661. "required": ["aggregateID", "seq", "version"],
  33662. "additionalProperties": false
  33663. },
  33664. "location": {
  33665. "$ref": "#/components/schemas/LocationRef"
  33666. },
  33667. "type": {
  33668. "type": "string",
  33669. "enum": ["session.next.revert.cleared"]
  33670. },
  33671. "data": {
  33672. "type": "object",
  33673. "properties": {
  33674. "timestamp": {
  33675. "type": "number"
  33676. },
  33677. "sessionID": {
  33678. "type": "string",
  33679. "pattern": "^ses"
  33680. }
  33681. },
  33682. "required": ["timestamp", "sessionID"],
  33683. "additionalProperties": false
  33684. }
  33685. },
  33686. "required": ["id", "type", "data"],
  33687. "additionalProperties": false
  33688. },
  33689. "V2EventSessionNextRevertCommitted": {
  33690. "type": "object",
  33691. "properties": {
  33692. "id": {
  33693. "type": "string",
  33694. "pattern": "^evt_"
  33695. },
  33696. "metadata": {
  33697. "type": "object"
  33698. },
  33699. "durable": {
  33700. "type": "object",
  33701. "properties": {
  33702. "aggregateID": {
  33703. "type": "string"
  33704. },
  33705. "seq": {
  33706. "type": "integer"
  33707. },
  33708. "version": {
  33709. "type": "integer"
  33710. }
  33711. },
  33712. "required": ["aggregateID", "seq", "version"],
  33713. "additionalProperties": false
  33714. },
  33715. "location": {
  33716. "$ref": "#/components/schemas/LocationRef"
  33717. },
  33718. "type": {
  33719. "type": "string",
  33720. "enum": ["session.next.revert.committed"]
  33721. },
  33722. "data": {
  33723. "type": "object",
  33724. "properties": {
  33725. "timestamp": {
  33726. "type": "number"
  33727. },
  33728. "sessionID": {
  33729. "type": "string",
  33730. "pattern": "^ses"
  33731. },
  33732. "messageID": {
  33733. "type": "string",
  33734. "pattern": "^msg_"
  33735. }
  33736. },
  33737. "required": ["timestamp", "sessionID", "messageID"],
  33738. "additionalProperties": false
  33739. }
  33740. },
  33741. "required": ["id", "type", "data"],
  33742. "additionalProperties": false
  33743. },
  33744. "V2EventMessagePartDelta": {
  33745. "type": "object",
  33746. "properties": {
  33747. "id": {
  33748. "type": "string",
  33749. "pattern": "^evt_"
  33750. },
  33751. "metadata": {
  33752. "type": "object"
  33753. },
  33754. "durable": {
  33755. "type": "object",
  33756. "properties": {
  33757. "aggregateID": {
  33758. "type": "string"
  33759. },
  33760. "seq": {
  33761. "type": "integer"
  33762. },
  33763. "version": {
  33764. "type": "integer"
  33765. }
  33766. },
  33767. "required": ["aggregateID", "seq", "version"],
  33768. "additionalProperties": false
  33769. },
  33770. "location": {
  33771. "$ref": "#/components/schemas/LocationRef"
  33772. },
  33773. "type": {
  33774. "type": "string",
  33775. "enum": ["message.part.delta"]
  33776. },
  33777. "data": {
  33778. "type": "object",
  33779. "properties": {
  33780. "sessionID": {
  33781. "type": "string",
  33782. "pattern": "^ses"
  33783. },
  33784. "messageID": {
  33785. "type": "string",
  33786. "pattern": "^msg"
  33787. },
  33788. "partID": {
  33789. "type": "string",
  33790. "pattern": "^prt"
  33791. },
  33792. "field": {
  33793. "type": "string"
  33794. },
  33795. "delta": {
  33796. "type": "string"
  33797. }
  33798. },
  33799. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  33800. "additionalProperties": false
  33801. }
  33802. },
  33803. "required": ["id", "type", "data"],
  33804. "additionalProperties": false
  33805. },
  33806. "V2EventSessionDiff": {
  33807. "type": "object",
  33808. "properties": {
  33809. "id": {
  33810. "type": "string",
  33811. "pattern": "^evt_"
  33812. },
  33813. "metadata": {
  33814. "type": "object"
  33815. },
  33816. "durable": {
  33817. "type": "object",
  33818. "properties": {
  33819. "aggregateID": {
  33820. "type": "string"
  33821. },
  33822. "seq": {
  33823. "type": "integer"
  33824. },
  33825. "version": {
  33826. "type": "integer"
  33827. }
  33828. },
  33829. "required": ["aggregateID", "seq", "version"],
  33830. "additionalProperties": false
  33831. },
  33832. "location": {
  33833. "$ref": "#/components/schemas/LocationRef"
  33834. },
  33835. "type": {
  33836. "type": "string",
  33837. "enum": ["session.diff"]
  33838. },
  33839. "data": {
  33840. "type": "object",
  33841. "properties": {
  33842. "sessionID": {
  33843. "type": "string",
  33844. "pattern": "^ses"
  33845. },
  33846. "diff": {
  33847. "type": "array",
  33848. "items": {
  33849. "$ref": "#/components/schemas/SnapshotFileDiff"
  33850. }
  33851. }
  33852. },
  33853. "required": ["sessionID", "diff"],
  33854. "additionalProperties": false
  33855. }
  33856. },
  33857. "required": ["id", "type", "data"],
  33858. "additionalProperties": false
  33859. },
  33860. "V2EventSessionError": {
  33861. "type": "object",
  33862. "properties": {
  33863. "id": {
  33864. "type": "string",
  33865. "pattern": "^evt_"
  33866. },
  33867. "metadata": {
  33868. "type": "object"
  33869. },
  33870. "durable": {
  33871. "type": "object",
  33872. "properties": {
  33873. "aggregateID": {
  33874. "type": "string"
  33875. },
  33876. "seq": {
  33877. "type": "integer"
  33878. },
  33879. "version": {
  33880. "type": "integer"
  33881. }
  33882. },
  33883. "required": ["aggregateID", "seq", "version"],
  33884. "additionalProperties": false
  33885. },
  33886. "location": {
  33887. "$ref": "#/components/schemas/LocationRef"
  33888. },
  33889. "type": {
  33890. "type": "string",
  33891. "enum": ["session.error"]
  33892. },
  33893. "data": {
  33894. "type": "object",
  33895. "properties": {
  33896. "sessionID": {
  33897. "type": "string",
  33898. "pattern": "^ses"
  33899. },
  33900. "error": {
  33901. "anyOf": [
  33902. {
  33903. "$ref": "#/components/schemas/ProviderAuthError"
  33904. },
  33905. {
  33906. "$ref": "#/components/schemas/UnknownError"
  33907. },
  33908. {
  33909. "$ref": "#/components/schemas/MessageOutputLengthError"
  33910. },
  33911. {
  33912. "$ref": "#/components/schemas/MessageAbortedError"
  33913. },
  33914. {
  33915. "$ref": "#/components/schemas/StructuredOutputError"
  33916. },
  33917. {
  33918. "$ref": "#/components/schemas/ContextOverflowError"
  33919. },
  33920. {
  33921. "$ref": "#/components/schemas/ContentFilterError"
  33922. },
  33923. {
  33924. "$ref": "#/components/schemas/APIError"
  33925. }
  33926. ]
  33927. }
  33928. },
  33929. "additionalProperties": false
  33930. }
  33931. },
  33932. "required": ["id", "type", "data"],
  33933. "additionalProperties": false
  33934. },
  33935. "V2EventInstallationUpdated": {
  33936. "type": "object",
  33937. "properties": {
  33938. "id": {
  33939. "type": "string",
  33940. "pattern": "^evt_"
  33941. },
  33942. "metadata": {
  33943. "type": "object"
  33944. },
  33945. "durable": {
  33946. "type": "object",
  33947. "properties": {
  33948. "aggregateID": {
  33949. "type": "string"
  33950. },
  33951. "seq": {
  33952. "type": "integer"
  33953. },
  33954. "version": {
  33955. "type": "integer"
  33956. }
  33957. },
  33958. "required": ["aggregateID", "seq", "version"],
  33959. "additionalProperties": false
  33960. },
  33961. "location": {
  33962. "$ref": "#/components/schemas/LocationRef"
  33963. },
  33964. "type": {
  33965. "type": "string",
  33966. "enum": ["installation.updated"]
  33967. },
  33968. "data": {
  33969. "type": "object",
  33970. "properties": {
  33971. "version": {
  33972. "type": "string"
  33973. }
  33974. },
  33975. "required": ["version"],
  33976. "additionalProperties": false
  33977. }
  33978. },
  33979. "required": ["id", "type", "data"],
  33980. "additionalProperties": false
  33981. },
  33982. "V2EventInstallationUpdate-available": {
  33983. "type": "object",
  33984. "properties": {
  33985. "id": {
  33986. "type": "string",
  33987. "pattern": "^evt_"
  33988. },
  33989. "metadata": {
  33990. "type": "object"
  33991. },
  33992. "durable": {
  33993. "type": "object",
  33994. "properties": {
  33995. "aggregateID": {
  33996. "type": "string"
  33997. },
  33998. "seq": {
  33999. "type": "integer"
  34000. },
  34001. "version": {
  34002. "type": "integer"
  34003. }
  34004. },
  34005. "required": ["aggregateID", "seq", "version"],
  34006. "additionalProperties": false
  34007. },
  34008. "location": {
  34009. "$ref": "#/components/schemas/LocationRef"
  34010. },
  34011. "type": {
  34012. "type": "string",
  34013. "enum": ["installation.update-available"]
  34014. },
  34015. "data": {
  34016. "type": "object",
  34017. "properties": {
  34018. "version": {
  34019. "type": "string"
  34020. }
  34021. },
  34022. "required": ["version"],
  34023. "additionalProperties": false
  34024. }
  34025. },
  34026. "required": ["id", "type", "data"],
  34027. "additionalProperties": false
  34028. },
  34029. "V2EventFileEdited": {
  34030. "type": "object",
  34031. "properties": {
  34032. "id": {
  34033. "type": "string",
  34034. "pattern": "^evt_"
  34035. },
  34036. "metadata": {
  34037. "type": "object"
  34038. },
  34039. "durable": {
  34040. "type": "object",
  34041. "properties": {
  34042. "aggregateID": {
  34043. "type": "string"
  34044. },
  34045. "seq": {
  34046. "type": "integer"
  34047. },
  34048. "version": {
  34049. "type": "integer"
  34050. }
  34051. },
  34052. "required": ["aggregateID", "seq", "version"],
  34053. "additionalProperties": false
  34054. },
  34055. "location": {
  34056. "$ref": "#/components/schemas/LocationRef"
  34057. },
  34058. "type": {
  34059. "type": "string",
  34060. "enum": ["file.edited"]
  34061. },
  34062. "data": {
  34063. "type": "object",
  34064. "properties": {
  34065. "file": {
  34066. "type": "string"
  34067. }
  34068. },
  34069. "required": ["file"],
  34070. "additionalProperties": false
  34071. }
  34072. },
  34073. "required": ["id", "type", "data"],
  34074. "additionalProperties": false
  34075. },
  34076. "V2EventReferenceUpdated": {
  34077. "type": "object",
  34078. "properties": {
  34079. "id": {
  34080. "type": "string",
  34081. "pattern": "^evt_"
  34082. },
  34083. "metadata": {
  34084. "type": "object"
  34085. },
  34086. "durable": {
  34087. "type": "object",
  34088. "properties": {
  34089. "aggregateID": {
  34090. "type": "string"
  34091. },
  34092. "seq": {
  34093. "type": "integer"
  34094. },
  34095. "version": {
  34096. "type": "integer"
  34097. }
  34098. },
  34099. "required": ["aggregateID", "seq", "version"],
  34100. "additionalProperties": false
  34101. },
  34102. "location": {
  34103. "$ref": "#/components/schemas/LocationRef"
  34104. },
  34105. "type": {
  34106. "type": "string",
  34107. "enum": ["reference.updated"]
  34108. },
  34109. "data": {
  34110. "type": "object",
  34111. "properties": {}
  34112. }
  34113. },
  34114. "required": ["id", "type", "data"],
  34115. "additionalProperties": false
  34116. },
  34117. "V2EventPermissionV2Asked": {
  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": ["permission.v2.asked"]
  34149. },
  34150. "data": {
  34151. "type": "object",
  34152. "properties": {
  34153. "id": {
  34154. "type": "string",
  34155. "pattern": "^per"
  34156. },
  34157. "sessionID": {
  34158. "type": "string",
  34159. "pattern": "^ses"
  34160. },
  34161. "action": {
  34162. "type": "string"
  34163. },
  34164. "resources": {
  34165. "type": "array",
  34166. "items": {
  34167. "type": "string"
  34168. }
  34169. },
  34170. "save": {
  34171. "type": "array",
  34172. "items": {
  34173. "type": "string"
  34174. }
  34175. },
  34176. "metadata": {
  34177. "type": "object"
  34178. },
  34179. "source": {
  34180. "$ref": "#/components/schemas/PermissionV2Source"
  34181. }
  34182. },
  34183. "required": ["id", "sessionID", "action", "resources"],
  34184. "additionalProperties": false
  34185. }
  34186. },
  34187. "required": ["id", "type", "data"],
  34188. "additionalProperties": false
  34189. },
  34190. "V2EventPermissionV2Replied": {
  34191. "type": "object",
  34192. "properties": {
  34193. "id": {
  34194. "type": "string",
  34195. "pattern": "^evt_"
  34196. },
  34197. "metadata": {
  34198. "type": "object"
  34199. },
  34200. "durable": {
  34201. "type": "object",
  34202. "properties": {
  34203. "aggregateID": {
  34204. "type": "string"
  34205. },
  34206. "seq": {
  34207. "type": "integer"
  34208. },
  34209. "version": {
  34210. "type": "integer"
  34211. }
  34212. },
  34213. "required": ["aggregateID", "seq", "version"],
  34214. "additionalProperties": false
  34215. },
  34216. "location": {
  34217. "$ref": "#/components/schemas/LocationRef"
  34218. },
  34219. "type": {
  34220. "type": "string",
  34221. "enum": ["permission.v2.replied"]
  34222. },
  34223. "data": {
  34224. "type": "object",
  34225. "properties": {
  34226. "sessionID": {
  34227. "type": "string",
  34228. "pattern": "^ses"
  34229. },
  34230. "requestID": {
  34231. "type": "string",
  34232. "pattern": "^per"
  34233. },
  34234. "reply": {
  34235. "$ref": "#/components/schemas/PermissionV2Reply"
  34236. }
  34237. },
  34238. "required": ["sessionID", "requestID", "reply"],
  34239. "additionalProperties": false
  34240. }
  34241. },
  34242. "required": ["id", "type", "data"],
  34243. "additionalProperties": false
  34244. },
  34245. "V2EventPluginAdded": {
  34246. "type": "object",
  34247. "properties": {
  34248. "id": {
  34249. "type": "string",
  34250. "pattern": "^evt_"
  34251. },
  34252. "metadata": {
  34253. "type": "object"
  34254. },
  34255. "durable": {
  34256. "type": "object",
  34257. "properties": {
  34258. "aggregateID": {
  34259. "type": "string"
  34260. },
  34261. "seq": {
  34262. "type": "integer"
  34263. },
  34264. "version": {
  34265. "type": "integer"
  34266. }
  34267. },
  34268. "required": ["aggregateID", "seq", "version"],
  34269. "additionalProperties": false
  34270. },
  34271. "location": {
  34272. "$ref": "#/components/schemas/LocationRef"
  34273. },
  34274. "type": {
  34275. "type": "string",
  34276. "enum": ["plugin.added"]
  34277. },
  34278. "data": {
  34279. "type": "object",
  34280. "properties": {
  34281. "id": {
  34282. "type": "string"
  34283. }
  34284. },
  34285. "required": ["id"],
  34286. "additionalProperties": false
  34287. }
  34288. },
  34289. "required": ["id", "type", "data"],
  34290. "additionalProperties": false
  34291. },
  34292. "V2EventProjectDirectoriesUpdated": {
  34293. "type": "object",
  34294. "properties": {
  34295. "id": {
  34296. "type": "string",
  34297. "pattern": "^evt_"
  34298. },
  34299. "metadata": {
  34300. "type": "object"
  34301. },
  34302. "durable": {
  34303. "type": "object",
  34304. "properties": {
  34305. "aggregateID": {
  34306. "type": "string"
  34307. },
  34308. "seq": {
  34309. "type": "integer"
  34310. },
  34311. "version": {
  34312. "type": "integer"
  34313. }
  34314. },
  34315. "required": ["aggregateID", "seq", "version"],
  34316. "additionalProperties": false
  34317. },
  34318. "location": {
  34319. "$ref": "#/components/schemas/LocationRef"
  34320. },
  34321. "type": {
  34322. "type": "string",
  34323. "enum": ["project.directories.updated"]
  34324. },
  34325. "data": {
  34326. "type": "object",
  34327. "properties": {
  34328. "projectID": {
  34329. "type": "string"
  34330. }
  34331. },
  34332. "required": ["projectID"],
  34333. "additionalProperties": false
  34334. }
  34335. },
  34336. "required": ["id", "type", "data"],
  34337. "additionalProperties": false
  34338. },
  34339. "V2EventFileWatcherUpdated": {
  34340. "type": "object",
  34341. "properties": {
  34342. "id": {
  34343. "type": "string",
  34344. "pattern": "^evt_"
  34345. },
  34346. "metadata": {
  34347. "type": "object"
  34348. },
  34349. "durable": {
  34350. "type": "object",
  34351. "properties": {
  34352. "aggregateID": {
  34353. "type": "string"
  34354. },
  34355. "seq": {
  34356. "type": "integer"
  34357. },
  34358. "version": {
  34359. "type": "integer"
  34360. }
  34361. },
  34362. "required": ["aggregateID", "seq", "version"],
  34363. "additionalProperties": false
  34364. },
  34365. "location": {
  34366. "$ref": "#/components/schemas/LocationRef"
  34367. },
  34368. "type": {
  34369. "type": "string",
  34370. "enum": ["file.watcher.updated"]
  34371. },
  34372. "data": {
  34373. "type": "object",
  34374. "properties": {
  34375. "file": {
  34376. "type": "string"
  34377. },
  34378. "event": {
  34379. "type": "string",
  34380. "enum": ["add", "change", "unlink"]
  34381. }
  34382. },
  34383. "required": ["file", "event"],
  34384. "additionalProperties": false
  34385. }
  34386. },
  34387. "required": ["id", "type", "data"],
  34388. "additionalProperties": false
  34389. },
  34390. "V2EventPtyCreated": {
  34391. "type": "object",
  34392. "properties": {
  34393. "id": {
  34394. "type": "string",
  34395. "pattern": "^evt_"
  34396. },
  34397. "metadata": {
  34398. "type": "object"
  34399. },
  34400. "durable": {
  34401. "type": "object",
  34402. "properties": {
  34403. "aggregateID": {
  34404. "type": "string"
  34405. },
  34406. "seq": {
  34407. "type": "integer"
  34408. },
  34409. "version": {
  34410. "type": "integer"
  34411. }
  34412. },
  34413. "required": ["aggregateID", "seq", "version"],
  34414. "additionalProperties": false
  34415. },
  34416. "location": {
  34417. "$ref": "#/components/schemas/LocationRef"
  34418. },
  34419. "type": {
  34420. "type": "string",
  34421. "enum": ["pty.created"]
  34422. },
  34423. "data": {
  34424. "type": "object",
  34425. "properties": {
  34426. "info": {
  34427. "$ref": "#/components/schemas/Pty"
  34428. }
  34429. },
  34430. "required": ["info"],
  34431. "additionalProperties": false
  34432. }
  34433. },
  34434. "required": ["id", "type", "data"],
  34435. "additionalProperties": false
  34436. },
  34437. "V2EventPtyUpdated": {
  34438. "type": "object",
  34439. "properties": {
  34440. "id": {
  34441. "type": "string",
  34442. "pattern": "^evt_"
  34443. },
  34444. "metadata": {
  34445. "type": "object"
  34446. },
  34447. "durable": {
  34448. "type": "object",
  34449. "properties": {
  34450. "aggregateID": {
  34451. "type": "string"
  34452. },
  34453. "seq": {
  34454. "type": "integer"
  34455. },
  34456. "version": {
  34457. "type": "integer"
  34458. }
  34459. },
  34460. "required": ["aggregateID", "seq", "version"],
  34461. "additionalProperties": false
  34462. },
  34463. "location": {
  34464. "$ref": "#/components/schemas/LocationRef"
  34465. },
  34466. "type": {
  34467. "type": "string",
  34468. "enum": ["pty.updated"]
  34469. },
  34470. "data": {
  34471. "type": "object",
  34472. "properties": {
  34473. "info": {
  34474. "$ref": "#/components/schemas/Pty"
  34475. }
  34476. },
  34477. "required": ["info"],
  34478. "additionalProperties": false
  34479. }
  34480. },
  34481. "required": ["id", "type", "data"],
  34482. "additionalProperties": false
  34483. },
  34484. "V2EventPtyExited": {
  34485. "type": "object",
  34486. "properties": {
  34487. "id": {
  34488. "type": "string",
  34489. "pattern": "^evt_"
  34490. },
  34491. "metadata": {
  34492. "type": "object"
  34493. },
  34494. "durable": {
  34495. "type": "object",
  34496. "properties": {
  34497. "aggregateID": {
  34498. "type": "string"
  34499. },
  34500. "seq": {
  34501. "type": "integer"
  34502. },
  34503. "version": {
  34504. "type": "integer"
  34505. }
  34506. },
  34507. "required": ["aggregateID", "seq", "version"],
  34508. "additionalProperties": false
  34509. },
  34510. "location": {
  34511. "$ref": "#/components/schemas/LocationRef"
  34512. },
  34513. "type": {
  34514. "type": "string",
  34515. "enum": ["pty.exited"]
  34516. },
  34517. "data": {
  34518. "type": "object",
  34519. "properties": {
  34520. "id": {
  34521. "type": "string",
  34522. "pattern": "^pty"
  34523. },
  34524. "exitCode": {
  34525. "type": "integer",
  34526. "minimum": 0
  34527. }
  34528. },
  34529. "required": ["id", "exitCode"],
  34530. "additionalProperties": false
  34531. }
  34532. },
  34533. "required": ["id", "type", "data"],
  34534. "additionalProperties": false
  34535. },
  34536. "V2EventPtyDeleted": {
  34537. "type": "object",
  34538. "properties": {
  34539. "id": {
  34540. "type": "string",
  34541. "pattern": "^evt_"
  34542. },
  34543. "metadata": {
  34544. "type": "object"
  34545. },
  34546. "durable": {
  34547. "type": "object",
  34548. "properties": {
  34549. "aggregateID": {
  34550. "type": "string"
  34551. },
  34552. "seq": {
  34553. "type": "integer"
  34554. },
  34555. "version": {
  34556. "type": "integer"
  34557. }
  34558. },
  34559. "required": ["aggregateID", "seq", "version"],
  34560. "additionalProperties": false
  34561. },
  34562. "location": {
  34563. "$ref": "#/components/schemas/LocationRef"
  34564. },
  34565. "type": {
  34566. "type": "string",
  34567. "enum": ["pty.deleted"]
  34568. },
  34569. "data": {
  34570. "type": "object",
  34571. "properties": {
  34572. "id": {
  34573. "type": "string",
  34574. "pattern": "^pty"
  34575. }
  34576. },
  34577. "required": ["id"],
  34578. "additionalProperties": false
  34579. }
  34580. },
  34581. "required": ["id", "type", "data"],
  34582. "additionalProperties": false
  34583. },
  34584. "V2EventQuestionV2Asked": {
  34585. "type": "object",
  34586. "properties": {
  34587. "id": {
  34588. "type": "string",
  34589. "pattern": "^evt_"
  34590. },
  34591. "metadata": {
  34592. "type": "object"
  34593. },
  34594. "durable": {
  34595. "type": "object",
  34596. "properties": {
  34597. "aggregateID": {
  34598. "type": "string"
  34599. },
  34600. "seq": {
  34601. "type": "integer"
  34602. },
  34603. "version": {
  34604. "type": "integer"
  34605. }
  34606. },
  34607. "required": ["aggregateID", "seq", "version"],
  34608. "additionalProperties": false
  34609. },
  34610. "location": {
  34611. "$ref": "#/components/schemas/LocationRef"
  34612. },
  34613. "type": {
  34614. "type": "string",
  34615. "enum": ["question.v2.asked"]
  34616. },
  34617. "data": {
  34618. "type": "object",
  34619. "properties": {
  34620. "id": {
  34621. "type": "string",
  34622. "pattern": "^que"
  34623. },
  34624. "sessionID": {
  34625. "type": "string",
  34626. "pattern": "^ses"
  34627. },
  34628. "questions": {
  34629. "type": "array",
  34630. "items": {
  34631. "$ref": "#/components/schemas/QuestionV2Info"
  34632. },
  34633. "description": "Questions to ask"
  34634. },
  34635. "tool": {
  34636. "$ref": "#/components/schemas/QuestionV2Tool"
  34637. }
  34638. },
  34639. "required": ["id", "sessionID", "questions"],
  34640. "additionalProperties": false
  34641. }
  34642. },
  34643. "required": ["id", "type", "data"],
  34644. "additionalProperties": false
  34645. },
  34646. "V2EventQuestionV2Replied": {
  34647. "type": "object",
  34648. "properties": {
  34649. "id": {
  34650. "type": "string",
  34651. "pattern": "^evt_"
  34652. },
  34653. "metadata": {
  34654. "type": "object"
  34655. },
  34656. "durable": {
  34657. "type": "object",
  34658. "properties": {
  34659. "aggregateID": {
  34660. "type": "string"
  34661. },
  34662. "seq": {
  34663. "type": "integer"
  34664. },
  34665. "version": {
  34666. "type": "integer"
  34667. }
  34668. },
  34669. "required": ["aggregateID", "seq", "version"],
  34670. "additionalProperties": false
  34671. },
  34672. "location": {
  34673. "$ref": "#/components/schemas/LocationRef"
  34674. },
  34675. "type": {
  34676. "type": "string",
  34677. "enum": ["question.v2.replied"]
  34678. },
  34679. "data": {
  34680. "type": "object",
  34681. "properties": {
  34682. "sessionID": {
  34683. "type": "string",
  34684. "pattern": "^ses"
  34685. },
  34686. "requestID": {
  34687. "type": "string",
  34688. "pattern": "^que"
  34689. },
  34690. "answers": {
  34691. "type": "array",
  34692. "items": {
  34693. "$ref": "#/components/schemas/QuestionV2Answer"
  34694. }
  34695. }
  34696. },
  34697. "required": ["sessionID", "requestID", "answers"],
  34698. "additionalProperties": false
  34699. }
  34700. },
  34701. "required": ["id", "type", "data"],
  34702. "additionalProperties": false
  34703. },
  34704. "V2EventQuestionV2Rejected": {
  34705. "type": "object",
  34706. "properties": {
  34707. "id": {
  34708. "type": "string",
  34709. "pattern": "^evt_"
  34710. },
  34711. "metadata": {
  34712. "type": "object"
  34713. },
  34714. "durable": {
  34715. "type": "object",
  34716. "properties": {
  34717. "aggregateID": {
  34718. "type": "string"
  34719. },
  34720. "seq": {
  34721. "type": "integer"
  34722. },
  34723. "version": {
  34724. "type": "integer"
  34725. }
  34726. },
  34727. "required": ["aggregateID", "seq", "version"],
  34728. "additionalProperties": false
  34729. },
  34730. "location": {
  34731. "$ref": "#/components/schemas/LocationRef"
  34732. },
  34733. "type": {
  34734. "type": "string",
  34735. "enum": ["question.v2.rejected"]
  34736. },
  34737. "data": {
  34738. "type": "object",
  34739. "properties": {
  34740. "sessionID": {
  34741. "type": "string",
  34742. "pattern": "^ses"
  34743. },
  34744. "requestID": {
  34745. "type": "string",
  34746. "pattern": "^que"
  34747. }
  34748. },
  34749. "required": ["sessionID", "requestID"],
  34750. "additionalProperties": false
  34751. }
  34752. },
  34753. "required": ["id", "type", "data"],
  34754. "additionalProperties": false
  34755. },
  34756. "V2EventTodoUpdated": {
  34757. "type": "object",
  34758. "properties": {
  34759. "id": {
  34760. "type": "string",
  34761. "pattern": "^evt_"
  34762. },
  34763. "metadata": {
  34764. "type": "object"
  34765. },
  34766. "durable": {
  34767. "type": "object",
  34768. "properties": {
  34769. "aggregateID": {
  34770. "type": "string"
  34771. },
  34772. "seq": {
  34773. "type": "integer"
  34774. },
  34775. "version": {
  34776. "type": "integer"
  34777. }
  34778. },
  34779. "required": ["aggregateID", "seq", "version"],
  34780. "additionalProperties": false
  34781. },
  34782. "location": {
  34783. "$ref": "#/components/schemas/LocationRef"
  34784. },
  34785. "type": {
  34786. "type": "string",
  34787. "enum": ["todo.updated"]
  34788. },
  34789. "data": {
  34790. "type": "object",
  34791. "properties": {
  34792. "sessionID": {
  34793. "type": "string",
  34794. "pattern": "^ses"
  34795. },
  34796. "todos": {
  34797. "type": "array",
  34798. "items": {
  34799. "$ref": "#/components/schemas/Todo"
  34800. }
  34801. }
  34802. },
  34803. "required": ["sessionID", "todos"],
  34804. "additionalProperties": false
  34805. }
  34806. },
  34807. "required": ["id", "type", "data"],
  34808. "additionalProperties": false
  34809. },
  34810. "V2EventLspUpdated": {
  34811. "type": "object",
  34812. "properties": {
  34813. "id": {
  34814. "type": "string",
  34815. "pattern": "^evt_"
  34816. },
  34817. "metadata": {
  34818. "type": "object"
  34819. },
  34820. "durable": {
  34821. "type": "object",
  34822. "properties": {
  34823. "aggregateID": {
  34824. "type": "string"
  34825. },
  34826. "seq": {
  34827. "type": "integer"
  34828. },
  34829. "version": {
  34830. "type": "integer"
  34831. }
  34832. },
  34833. "required": ["aggregateID", "seq", "version"],
  34834. "additionalProperties": false
  34835. },
  34836. "location": {
  34837. "$ref": "#/components/schemas/LocationRef"
  34838. },
  34839. "type": {
  34840. "type": "string",
  34841. "enum": ["lsp.updated"]
  34842. },
  34843. "data": {
  34844. "type": "object",
  34845. "properties": {}
  34846. }
  34847. },
  34848. "required": ["id", "type", "data"],
  34849. "additionalProperties": false
  34850. },
  34851. "V2EventPermissionAsked": {
  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": ["permission.asked"]
  34883. },
  34884. "data": {
  34885. "type": "object",
  34886. "properties": {
  34887. "id": {
  34888. "type": "string",
  34889. "pattern": "^per"
  34890. },
  34891. "sessionID": {
  34892. "type": "string",
  34893. "pattern": "^ses"
  34894. },
  34895. "permission": {
  34896. "type": "string"
  34897. },
  34898. "patterns": {
  34899. "type": "array",
  34900. "items": {
  34901. "type": "string"
  34902. }
  34903. },
  34904. "metadata": {
  34905. "type": "object"
  34906. },
  34907. "always": {
  34908. "type": "array",
  34909. "items": {
  34910. "type": "string"
  34911. }
  34912. },
  34913. "tool": {
  34914. "type": "object",
  34915. "properties": {
  34916. "messageID": {
  34917. "type": "string"
  34918. },
  34919. "callID": {
  34920. "type": "string"
  34921. }
  34922. },
  34923. "required": ["messageID", "callID"],
  34924. "additionalProperties": false
  34925. }
  34926. },
  34927. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  34928. "additionalProperties": false
  34929. }
  34930. },
  34931. "required": ["id", "type", "data"],
  34932. "additionalProperties": false
  34933. },
  34934. "V2EventPermissionReplied": {
  34935. "type": "object",
  34936. "properties": {
  34937. "id": {
  34938. "type": "string",
  34939. "pattern": "^evt_"
  34940. },
  34941. "metadata": {
  34942. "type": "object"
  34943. },
  34944. "durable": {
  34945. "type": "object",
  34946. "properties": {
  34947. "aggregateID": {
  34948. "type": "string"
  34949. },
  34950. "seq": {
  34951. "type": "integer"
  34952. },
  34953. "version": {
  34954. "type": "integer"
  34955. }
  34956. },
  34957. "required": ["aggregateID", "seq", "version"],
  34958. "additionalProperties": false
  34959. },
  34960. "location": {
  34961. "$ref": "#/components/schemas/LocationRef"
  34962. },
  34963. "type": {
  34964. "type": "string",
  34965. "enum": ["permission.replied"]
  34966. },
  34967. "data": {
  34968. "type": "object",
  34969. "properties": {
  34970. "sessionID": {
  34971. "type": "string",
  34972. "pattern": "^ses"
  34973. },
  34974. "requestID": {
  34975. "type": "string",
  34976. "pattern": "^per"
  34977. },
  34978. "reply": {
  34979. "type": "string",
  34980. "enum": ["once", "always", "reject"]
  34981. }
  34982. },
  34983. "required": ["sessionID", "requestID", "reply"],
  34984. "additionalProperties": false
  34985. }
  34986. },
  34987. "required": ["id", "type", "data"],
  34988. "additionalProperties": false
  34989. },
  34990. "V2EventTuiPromptAppend": {
  34991. "type": "object",
  34992. "properties": {
  34993. "id": {
  34994. "type": "string",
  34995. "pattern": "^evt_"
  34996. },
  34997. "metadata": {
  34998. "type": "object"
  34999. },
  35000. "durable": {
  35001. "type": "object",
  35002. "properties": {
  35003. "aggregateID": {
  35004. "type": "string"
  35005. },
  35006. "seq": {
  35007. "type": "integer"
  35008. },
  35009. "version": {
  35010. "type": "integer"
  35011. }
  35012. },
  35013. "required": ["aggregateID", "seq", "version"],
  35014. "additionalProperties": false
  35015. },
  35016. "location": {
  35017. "$ref": "#/components/schemas/LocationRef"
  35018. },
  35019. "type": {
  35020. "type": "string",
  35021. "enum": ["tui.prompt.append"]
  35022. },
  35023. "data": {
  35024. "type": "object",
  35025. "properties": {
  35026. "text": {
  35027. "type": "string"
  35028. }
  35029. },
  35030. "required": ["text"],
  35031. "additionalProperties": false
  35032. }
  35033. },
  35034. "required": ["id", "type", "data"],
  35035. "additionalProperties": false
  35036. },
  35037. "V2EventTuiCommandExecute": {
  35038. "type": "object",
  35039. "properties": {
  35040. "id": {
  35041. "type": "string",
  35042. "pattern": "^evt_"
  35043. },
  35044. "metadata": {
  35045. "type": "object"
  35046. },
  35047. "durable": {
  35048. "type": "object",
  35049. "properties": {
  35050. "aggregateID": {
  35051. "type": "string"
  35052. },
  35053. "seq": {
  35054. "type": "integer"
  35055. },
  35056. "version": {
  35057. "type": "integer"
  35058. }
  35059. },
  35060. "required": ["aggregateID", "seq", "version"],
  35061. "additionalProperties": false
  35062. },
  35063. "location": {
  35064. "$ref": "#/components/schemas/LocationRef"
  35065. },
  35066. "type": {
  35067. "type": "string",
  35068. "enum": ["tui.command.execute"]
  35069. },
  35070. "data": {
  35071. "type": "object",
  35072. "properties": {
  35073. "command": {
  35074. "anyOf": [
  35075. {
  35076. "type": "string",
  35077. "enum": [
  35078. "session.list",
  35079. "session.new",
  35080. "session.share",
  35081. "session.interrupt",
  35082. "session.compact",
  35083. "session.page.up",
  35084. "session.page.down",
  35085. "session.line.up",
  35086. "session.line.down",
  35087. "session.half.page.up",
  35088. "session.half.page.down",
  35089. "session.first",
  35090. "session.last",
  35091. "prompt.clear",
  35092. "prompt.submit",
  35093. "agent.cycle"
  35094. ]
  35095. },
  35096. {
  35097. "type": "string"
  35098. }
  35099. ]
  35100. }
  35101. },
  35102. "required": ["command"],
  35103. "additionalProperties": false
  35104. }
  35105. },
  35106. "required": ["id", "type", "data"],
  35107. "additionalProperties": false
  35108. },
  35109. "V2EventTuiToastShow": {
  35110. "type": "object",
  35111. "properties": {
  35112. "id": {
  35113. "type": "string",
  35114. "pattern": "^evt_"
  35115. },
  35116. "metadata": {
  35117. "type": "object"
  35118. },
  35119. "durable": {
  35120. "type": "object",
  35121. "properties": {
  35122. "aggregateID": {
  35123. "type": "string"
  35124. },
  35125. "seq": {
  35126. "type": "integer"
  35127. },
  35128. "version": {
  35129. "type": "integer"
  35130. }
  35131. },
  35132. "required": ["aggregateID", "seq", "version"],
  35133. "additionalProperties": false
  35134. },
  35135. "location": {
  35136. "$ref": "#/components/schemas/LocationRef"
  35137. },
  35138. "type": {
  35139. "type": "string",
  35140. "enum": ["tui.toast.show"]
  35141. },
  35142. "data": {
  35143. "type": "object",
  35144. "properties": {
  35145. "title": {
  35146. "type": "string"
  35147. },
  35148. "message": {
  35149. "type": "string"
  35150. },
  35151. "variant": {
  35152. "type": "string",
  35153. "enum": ["info", "success", "warning", "error"]
  35154. },
  35155. "duration": {
  35156. "type": "integer",
  35157. "exclusiveMinimum": 0
  35158. }
  35159. },
  35160. "required": ["message", "variant"],
  35161. "additionalProperties": false
  35162. }
  35163. },
  35164. "required": ["id", "type", "data"],
  35165. "additionalProperties": false
  35166. },
  35167. "V2EventTuiSessionSelect": {
  35168. "type": "object",
  35169. "properties": {
  35170. "id": {
  35171. "type": "string",
  35172. "pattern": "^evt_"
  35173. },
  35174. "metadata": {
  35175. "type": "object"
  35176. },
  35177. "durable": {
  35178. "type": "object",
  35179. "properties": {
  35180. "aggregateID": {
  35181. "type": "string"
  35182. },
  35183. "seq": {
  35184. "type": "integer"
  35185. },
  35186. "version": {
  35187. "type": "integer"
  35188. }
  35189. },
  35190. "required": ["aggregateID", "seq", "version"],
  35191. "additionalProperties": false
  35192. },
  35193. "location": {
  35194. "$ref": "#/components/schemas/LocationRef"
  35195. },
  35196. "type": {
  35197. "type": "string",
  35198. "enum": ["tui.session.select"]
  35199. },
  35200. "data": {
  35201. "type": "object",
  35202. "properties": {
  35203. "sessionID": {
  35204. "type": "string",
  35205. "pattern": "^ses",
  35206. "description": "Session ID to navigate to"
  35207. }
  35208. },
  35209. "required": ["sessionID"],
  35210. "additionalProperties": false
  35211. }
  35212. },
  35213. "required": ["id", "type", "data"],
  35214. "additionalProperties": false
  35215. },
  35216. "V2EventMcpToolsChanged": {
  35217. "type": "object",
  35218. "properties": {
  35219. "id": {
  35220. "type": "string",
  35221. "pattern": "^evt_"
  35222. },
  35223. "metadata": {
  35224. "type": "object"
  35225. },
  35226. "durable": {
  35227. "type": "object",
  35228. "properties": {
  35229. "aggregateID": {
  35230. "type": "string"
  35231. },
  35232. "seq": {
  35233. "type": "integer"
  35234. },
  35235. "version": {
  35236. "type": "integer"
  35237. }
  35238. },
  35239. "required": ["aggregateID", "seq", "version"],
  35240. "additionalProperties": false
  35241. },
  35242. "location": {
  35243. "$ref": "#/components/schemas/LocationRef"
  35244. },
  35245. "type": {
  35246. "type": "string",
  35247. "enum": ["mcp.tools.changed"]
  35248. },
  35249. "data": {
  35250. "type": "object",
  35251. "properties": {
  35252. "server": {
  35253. "type": "string"
  35254. }
  35255. },
  35256. "required": ["server"],
  35257. "additionalProperties": false
  35258. }
  35259. },
  35260. "required": ["id", "type", "data"],
  35261. "additionalProperties": false
  35262. },
  35263. "V2EventMcpBrowserOpenFailed": {
  35264. "type": "object",
  35265. "properties": {
  35266. "id": {
  35267. "type": "string",
  35268. "pattern": "^evt_"
  35269. },
  35270. "metadata": {
  35271. "type": "object"
  35272. },
  35273. "durable": {
  35274. "type": "object",
  35275. "properties": {
  35276. "aggregateID": {
  35277. "type": "string"
  35278. },
  35279. "seq": {
  35280. "type": "integer"
  35281. },
  35282. "version": {
  35283. "type": "integer"
  35284. }
  35285. },
  35286. "required": ["aggregateID", "seq", "version"],
  35287. "additionalProperties": false
  35288. },
  35289. "location": {
  35290. "$ref": "#/components/schemas/LocationRef"
  35291. },
  35292. "type": {
  35293. "type": "string",
  35294. "enum": ["mcp.browser.open.failed"]
  35295. },
  35296. "data": {
  35297. "type": "object",
  35298. "properties": {
  35299. "mcpName": {
  35300. "type": "string"
  35301. },
  35302. "url": {
  35303. "type": "string"
  35304. }
  35305. },
  35306. "required": ["mcpName", "url"],
  35307. "additionalProperties": false
  35308. }
  35309. },
  35310. "required": ["id", "type", "data"],
  35311. "additionalProperties": false
  35312. },
  35313. "V2EventCommandExecuted": {
  35314. "type": "object",
  35315. "properties": {
  35316. "id": {
  35317. "type": "string",
  35318. "pattern": "^evt_"
  35319. },
  35320. "metadata": {
  35321. "type": "object"
  35322. },
  35323. "durable": {
  35324. "type": "object",
  35325. "properties": {
  35326. "aggregateID": {
  35327. "type": "string"
  35328. },
  35329. "seq": {
  35330. "type": "integer"
  35331. },
  35332. "version": {
  35333. "type": "integer"
  35334. }
  35335. },
  35336. "required": ["aggregateID", "seq", "version"],
  35337. "additionalProperties": false
  35338. },
  35339. "location": {
  35340. "$ref": "#/components/schemas/LocationRef"
  35341. },
  35342. "type": {
  35343. "type": "string",
  35344. "enum": ["command.executed"]
  35345. },
  35346. "data": {
  35347. "type": "object",
  35348. "properties": {
  35349. "name": {
  35350. "type": "string"
  35351. },
  35352. "sessionID": {
  35353. "type": "string",
  35354. "pattern": "^ses"
  35355. },
  35356. "arguments": {
  35357. "type": "string"
  35358. },
  35359. "messageID": {
  35360. "type": "string",
  35361. "pattern": "^msg"
  35362. }
  35363. },
  35364. "required": ["name", "sessionID", "arguments", "messageID"],
  35365. "additionalProperties": false
  35366. }
  35367. },
  35368. "required": ["id", "type", "data"],
  35369. "additionalProperties": false
  35370. },
  35371. "V2EventProjectUpdated": {
  35372. "type": "object",
  35373. "properties": {
  35374. "id": {
  35375. "type": "string",
  35376. "pattern": "^evt_"
  35377. },
  35378. "metadata": {
  35379. "type": "object"
  35380. },
  35381. "durable": {
  35382. "type": "object",
  35383. "properties": {
  35384. "aggregateID": {
  35385. "type": "string"
  35386. },
  35387. "seq": {
  35388. "type": "integer"
  35389. },
  35390. "version": {
  35391. "type": "integer"
  35392. }
  35393. },
  35394. "required": ["aggregateID", "seq", "version"],
  35395. "additionalProperties": false
  35396. },
  35397. "location": {
  35398. "$ref": "#/components/schemas/LocationRef"
  35399. },
  35400. "type": {
  35401. "type": "string",
  35402. "enum": ["project.updated"]
  35403. },
  35404. "data": {
  35405. "type": "object",
  35406. "properties": {
  35407. "id": {
  35408. "type": "string"
  35409. },
  35410. "worktree": {
  35411. "type": "string"
  35412. },
  35413. "vcs": {
  35414. "$ref": "#/components/schemas/ProjectVcs"
  35415. },
  35416. "name": {
  35417. "type": "string"
  35418. },
  35419. "icon": {
  35420. "$ref": "#/components/schemas/ProjectIcon"
  35421. },
  35422. "commands": {
  35423. "$ref": "#/components/schemas/ProjectCommands"
  35424. },
  35425. "time": {
  35426. "$ref": "#/components/schemas/ProjectTime"
  35427. },
  35428. "sandboxes": {
  35429. "type": "array",
  35430. "items": {
  35431. "type": "string"
  35432. }
  35433. }
  35434. },
  35435. "required": ["id", "worktree", "time", "sandboxes"],
  35436. "additionalProperties": false
  35437. }
  35438. },
  35439. "required": ["id", "type", "data"],
  35440. "additionalProperties": false
  35441. },
  35442. "V2EventSessionStatus": {
  35443. "type": "object",
  35444. "properties": {
  35445. "id": {
  35446. "type": "string",
  35447. "pattern": "^evt_"
  35448. },
  35449. "metadata": {
  35450. "type": "object"
  35451. },
  35452. "durable": {
  35453. "type": "object",
  35454. "properties": {
  35455. "aggregateID": {
  35456. "type": "string"
  35457. },
  35458. "seq": {
  35459. "type": "integer"
  35460. },
  35461. "version": {
  35462. "type": "integer"
  35463. }
  35464. },
  35465. "required": ["aggregateID", "seq", "version"],
  35466. "additionalProperties": false
  35467. },
  35468. "location": {
  35469. "$ref": "#/components/schemas/LocationRef"
  35470. },
  35471. "type": {
  35472. "type": "string",
  35473. "enum": ["session.status"]
  35474. },
  35475. "data": {
  35476. "type": "object",
  35477. "properties": {
  35478. "sessionID": {
  35479. "type": "string",
  35480. "pattern": "^ses"
  35481. },
  35482. "status": {
  35483. "$ref": "#/components/schemas/SessionStatus"
  35484. }
  35485. },
  35486. "required": ["sessionID", "status"],
  35487. "additionalProperties": false
  35488. }
  35489. },
  35490. "required": ["id", "type", "data"],
  35491. "additionalProperties": false
  35492. },
  35493. "V2EventSessionIdle": {
  35494. "type": "object",
  35495. "properties": {
  35496. "id": {
  35497. "type": "string",
  35498. "pattern": "^evt_"
  35499. },
  35500. "metadata": {
  35501. "type": "object"
  35502. },
  35503. "durable": {
  35504. "type": "object",
  35505. "properties": {
  35506. "aggregateID": {
  35507. "type": "string"
  35508. },
  35509. "seq": {
  35510. "type": "integer"
  35511. },
  35512. "version": {
  35513. "type": "integer"
  35514. }
  35515. },
  35516. "required": ["aggregateID", "seq", "version"],
  35517. "additionalProperties": false
  35518. },
  35519. "location": {
  35520. "$ref": "#/components/schemas/LocationRef"
  35521. },
  35522. "type": {
  35523. "type": "string",
  35524. "enum": ["session.idle"]
  35525. },
  35526. "data": {
  35527. "type": "object",
  35528. "properties": {
  35529. "sessionID": {
  35530. "type": "string",
  35531. "pattern": "^ses"
  35532. }
  35533. },
  35534. "required": ["sessionID"],
  35535. "additionalProperties": false
  35536. }
  35537. },
  35538. "required": ["id", "type", "data"],
  35539. "additionalProperties": false
  35540. },
  35541. "V2EventQuestionAsked": {
  35542. "type": "object",
  35543. "properties": {
  35544. "id": {
  35545. "type": "string",
  35546. "pattern": "^evt_"
  35547. },
  35548. "metadata": {
  35549. "type": "object"
  35550. },
  35551. "durable": {
  35552. "type": "object",
  35553. "properties": {
  35554. "aggregateID": {
  35555. "type": "string"
  35556. },
  35557. "seq": {
  35558. "type": "integer"
  35559. },
  35560. "version": {
  35561. "type": "integer"
  35562. }
  35563. },
  35564. "required": ["aggregateID", "seq", "version"],
  35565. "additionalProperties": false
  35566. },
  35567. "location": {
  35568. "$ref": "#/components/schemas/LocationRef"
  35569. },
  35570. "type": {
  35571. "type": "string",
  35572. "enum": ["question.asked"]
  35573. },
  35574. "data": {
  35575. "type": "object",
  35576. "properties": {
  35577. "id": {
  35578. "type": "string",
  35579. "pattern": "^que"
  35580. },
  35581. "sessionID": {
  35582. "type": "string",
  35583. "pattern": "^ses"
  35584. },
  35585. "questions": {
  35586. "type": "array",
  35587. "items": {
  35588. "$ref": "#/components/schemas/QuestionInfo"
  35589. },
  35590. "description": "Questions to ask"
  35591. },
  35592. "tool": {
  35593. "$ref": "#/components/schemas/QuestionTool"
  35594. }
  35595. },
  35596. "required": ["id", "sessionID", "questions"],
  35597. "additionalProperties": false
  35598. }
  35599. },
  35600. "required": ["id", "type", "data"],
  35601. "additionalProperties": false
  35602. },
  35603. "V2EventQuestionReplied": {
  35604. "type": "object",
  35605. "properties": {
  35606. "id": {
  35607. "type": "string",
  35608. "pattern": "^evt_"
  35609. },
  35610. "metadata": {
  35611. "type": "object"
  35612. },
  35613. "durable": {
  35614. "type": "object",
  35615. "properties": {
  35616. "aggregateID": {
  35617. "type": "string"
  35618. },
  35619. "seq": {
  35620. "type": "integer"
  35621. },
  35622. "version": {
  35623. "type": "integer"
  35624. }
  35625. },
  35626. "required": ["aggregateID", "seq", "version"],
  35627. "additionalProperties": false
  35628. },
  35629. "location": {
  35630. "$ref": "#/components/schemas/LocationRef"
  35631. },
  35632. "type": {
  35633. "type": "string",
  35634. "enum": ["question.replied"]
  35635. },
  35636. "data": {
  35637. "type": "object",
  35638. "properties": {
  35639. "sessionID": {
  35640. "type": "string",
  35641. "pattern": "^ses"
  35642. },
  35643. "requestID": {
  35644. "type": "string",
  35645. "pattern": "^que"
  35646. },
  35647. "answers": {
  35648. "type": "array",
  35649. "items": {
  35650. "$ref": "#/components/schemas/QuestionAnswer"
  35651. }
  35652. }
  35653. },
  35654. "required": ["sessionID", "requestID", "answers"],
  35655. "additionalProperties": false
  35656. }
  35657. },
  35658. "required": ["id", "type", "data"],
  35659. "additionalProperties": false
  35660. },
  35661. "V2EventQuestionRejected": {
  35662. "type": "object",
  35663. "properties": {
  35664. "id": {
  35665. "type": "string",
  35666. "pattern": "^evt_"
  35667. },
  35668. "metadata": {
  35669. "type": "object"
  35670. },
  35671. "durable": {
  35672. "type": "object",
  35673. "properties": {
  35674. "aggregateID": {
  35675. "type": "string"
  35676. },
  35677. "seq": {
  35678. "type": "integer"
  35679. },
  35680. "version": {
  35681. "type": "integer"
  35682. }
  35683. },
  35684. "required": ["aggregateID", "seq", "version"],
  35685. "additionalProperties": false
  35686. },
  35687. "location": {
  35688. "$ref": "#/components/schemas/LocationRef"
  35689. },
  35690. "type": {
  35691. "type": "string",
  35692. "enum": ["question.rejected"]
  35693. },
  35694. "data": {
  35695. "type": "object",
  35696. "properties": {
  35697. "sessionID": {
  35698. "type": "string",
  35699. "pattern": "^ses"
  35700. },
  35701. "requestID": {
  35702. "type": "string",
  35703. "pattern": "^que"
  35704. }
  35705. },
  35706. "required": ["sessionID", "requestID"],
  35707. "additionalProperties": false
  35708. }
  35709. },
  35710. "required": ["id", "type", "data"],
  35711. "additionalProperties": false
  35712. },
  35713. "V2EventSessionCompacted": {
  35714. "type": "object",
  35715. "properties": {
  35716. "id": {
  35717. "type": "string",
  35718. "pattern": "^evt_"
  35719. },
  35720. "metadata": {
  35721. "type": "object"
  35722. },
  35723. "durable": {
  35724. "type": "object",
  35725. "properties": {
  35726. "aggregateID": {
  35727. "type": "string"
  35728. },
  35729. "seq": {
  35730. "type": "integer"
  35731. },
  35732. "version": {
  35733. "type": "integer"
  35734. }
  35735. },
  35736. "required": ["aggregateID", "seq", "version"],
  35737. "additionalProperties": false
  35738. },
  35739. "location": {
  35740. "$ref": "#/components/schemas/LocationRef"
  35741. },
  35742. "type": {
  35743. "type": "string",
  35744. "enum": ["session.compacted"]
  35745. },
  35746. "data": {
  35747. "type": "object",
  35748. "properties": {
  35749. "sessionID": {
  35750. "type": "string",
  35751. "pattern": "^ses"
  35752. }
  35753. },
  35754. "required": ["sessionID"],
  35755. "additionalProperties": false
  35756. }
  35757. },
  35758. "required": ["id", "type", "data"],
  35759. "additionalProperties": false
  35760. },
  35761. "V2EventVcsBranchUpdated": {
  35762. "type": "object",
  35763. "properties": {
  35764. "id": {
  35765. "type": "string",
  35766. "pattern": "^evt_"
  35767. },
  35768. "metadata": {
  35769. "type": "object"
  35770. },
  35771. "durable": {
  35772. "type": "object",
  35773. "properties": {
  35774. "aggregateID": {
  35775. "type": "string"
  35776. },
  35777. "seq": {
  35778. "type": "integer"
  35779. },
  35780. "version": {
  35781. "type": "integer"
  35782. }
  35783. },
  35784. "required": ["aggregateID", "seq", "version"],
  35785. "additionalProperties": false
  35786. },
  35787. "location": {
  35788. "$ref": "#/components/schemas/LocationRef"
  35789. },
  35790. "type": {
  35791. "type": "string",
  35792. "enum": ["vcs.branch.updated"]
  35793. },
  35794. "data": {
  35795. "type": "object",
  35796. "properties": {
  35797. "branch": {
  35798. "type": "string"
  35799. }
  35800. },
  35801. "additionalProperties": false
  35802. }
  35803. },
  35804. "required": ["id", "type", "data"],
  35805. "additionalProperties": false
  35806. },
  35807. "V2EventWorkspaceReady": {
  35808. "type": "object",
  35809. "properties": {
  35810. "id": {
  35811. "type": "string",
  35812. "pattern": "^evt_"
  35813. },
  35814. "metadata": {
  35815. "type": "object"
  35816. },
  35817. "durable": {
  35818. "type": "object",
  35819. "properties": {
  35820. "aggregateID": {
  35821. "type": "string"
  35822. },
  35823. "seq": {
  35824. "type": "integer"
  35825. },
  35826. "version": {
  35827. "type": "integer"
  35828. }
  35829. },
  35830. "required": ["aggregateID", "seq", "version"],
  35831. "additionalProperties": false
  35832. },
  35833. "location": {
  35834. "$ref": "#/components/schemas/LocationRef"
  35835. },
  35836. "type": {
  35837. "type": "string",
  35838. "enum": ["workspace.ready"]
  35839. },
  35840. "data": {
  35841. "type": "object",
  35842. "properties": {
  35843. "name": {
  35844. "type": "string"
  35845. }
  35846. },
  35847. "required": ["name"],
  35848. "additionalProperties": false
  35849. }
  35850. },
  35851. "required": ["id", "type", "data"],
  35852. "additionalProperties": false
  35853. },
  35854. "V2EventWorkspaceFailed": {
  35855. "type": "object",
  35856. "properties": {
  35857. "id": {
  35858. "type": "string",
  35859. "pattern": "^evt_"
  35860. },
  35861. "metadata": {
  35862. "type": "object"
  35863. },
  35864. "durable": {
  35865. "type": "object",
  35866. "properties": {
  35867. "aggregateID": {
  35868. "type": "string"
  35869. },
  35870. "seq": {
  35871. "type": "integer"
  35872. },
  35873. "version": {
  35874. "type": "integer"
  35875. }
  35876. },
  35877. "required": ["aggregateID", "seq", "version"],
  35878. "additionalProperties": false
  35879. },
  35880. "location": {
  35881. "$ref": "#/components/schemas/LocationRef"
  35882. },
  35883. "type": {
  35884. "type": "string",
  35885. "enum": ["workspace.failed"]
  35886. },
  35887. "data": {
  35888. "type": "object",
  35889. "properties": {
  35890. "message": {
  35891. "type": "string"
  35892. }
  35893. },
  35894. "required": ["message"],
  35895. "additionalProperties": false
  35896. }
  35897. },
  35898. "required": ["id", "type", "data"],
  35899. "additionalProperties": false
  35900. },
  35901. "V2EventWorkspaceStatus": {
  35902. "type": "object",
  35903. "properties": {
  35904. "id": {
  35905. "type": "string",
  35906. "pattern": "^evt_"
  35907. },
  35908. "metadata": {
  35909. "type": "object"
  35910. },
  35911. "durable": {
  35912. "type": "object",
  35913. "properties": {
  35914. "aggregateID": {
  35915. "type": "string"
  35916. },
  35917. "seq": {
  35918. "type": "integer"
  35919. },
  35920. "version": {
  35921. "type": "integer"
  35922. }
  35923. },
  35924. "required": ["aggregateID", "seq", "version"],
  35925. "additionalProperties": false
  35926. },
  35927. "location": {
  35928. "$ref": "#/components/schemas/LocationRef"
  35929. },
  35930. "type": {
  35931. "type": "string",
  35932. "enum": ["workspace.status"]
  35933. },
  35934. "data": {
  35935. "type": "object",
  35936. "properties": {
  35937. "workspaceID": {
  35938. "type": "string",
  35939. "pattern": "^wrk"
  35940. },
  35941. "status": {
  35942. "type": "string",
  35943. "enum": ["connected", "connecting", "disconnected", "error"]
  35944. }
  35945. },
  35946. "required": ["workspaceID", "status"],
  35947. "additionalProperties": false
  35948. }
  35949. },
  35950. "required": ["id", "type", "data"],
  35951. "additionalProperties": false
  35952. },
  35953. "V2EventWorktreeReady": {
  35954. "type": "object",
  35955. "properties": {
  35956. "id": {
  35957. "type": "string",
  35958. "pattern": "^evt_"
  35959. },
  35960. "metadata": {
  35961. "type": "object"
  35962. },
  35963. "durable": {
  35964. "type": "object",
  35965. "properties": {
  35966. "aggregateID": {
  35967. "type": "string"
  35968. },
  35969. "seq": {
  35970. "type": "integer"
  35971. },
  35972. "version": {
  35973. "type": "integer"
  35974. }
  35975. },
  35976. "required": ["aggregateID", "seq", "version"],
  35977. "additionalProperties": false
  35978. },
  35979. "location": {
  35980. "$ref": "#/components/schemas/LocationRef"
  35981. },
  35982. "type": {
  35983. "type": "string",
  35984. "enum": ["worktree.ready"]
  35985. },
  35986. "data": {
  35987. "type": "object",
  35988. "properties": {
  35989. "name": {
  35990. "type": "string"
  35991. },
  35992. "branch": {
  35993. "type": "string"
  35994. }
  35995. },
  35996. "required": ["name"],
  35997. "additionalProperties": false
  35998. }
  35999. },
  36000. "required": ["id", "type", "data"],
  36001. "additionalProperties": false
  36002. },
  36003. "V2EventWorktreeFailed": {
  36004. "type": "object",
  36005. "properties": {
  36006. "id": {
  36007. "type": "string",
  36008. "pattern": "^evt_"
  36009. },
  36010. "metadata": {
  36011. "type": "object"
  36012. },
  36013. "durable": {
  36014. "type": "object",
  36015. "properties": {
  36016. "aggregateID": {
  36017. "type": "string"
  36018. },
  36019. "seq": {
  36020. "type": "integer"
  36021. },
  36022. "version": {
  36023. "type": "integer"
  36024. }
  36025. },
  36026. "required": ["aggregateID", "seq", "version"],
  36027. "additionalProperties": false
  36028. },
  36029. "location": {
  36030. "$ref": "#/components/schemas/LocationRef"
  36031. },
  36032. "type": {
  36033. "type": "string",
  36034. "enum": ["worktree.failed"]
  36035. },
  36036. "data": {
  36037. "type": "object",
  36038. "properties": {
  36039. "message": {
  36040. "type": "string"
  36041. }
  36042. },
  36043. "required": ["message"],
  36044. "additionalProperties": false
  36045. }
  36046. },
  36047. "required": ["id", "type", "data"],
  36048. "additionalProperties": false
  36049. },
  36050. "V2EventServerConnected": {
  36051. "type": "object",
  36052. "properties": {
  36053. "id": {
  36054. "type": "string",
  36055. "pattern": "^evt_"
  36056. },
  36057. "metadata": {
  36058. "type": "object"
  36059. },
  36060. "durable": {
  36061. "type": "object",
  36062. "properties": {
  36063. "aggregateID": {
  36064. "type": "string"
  36065. },
  36066. "seq": {
  36067. "type": "integer"
  36068. },
  36069. "version": {
  36070. "type": "integer"
  36071. }
  36072. },
  36073. "required": ["aggregateID", "seq", "version"],
  36074. "additionalProperties": false
  36075. },
  36076. "location": {
  36077. "$ref": "#/components/schemas/LocationRef"
  36078. },
  36079. "type": {
  36080. "type": "string",
  36081. "enum": ["server.connected"]
  36082. },
  36083. "data": {
  36084. "type": "object",
  36085. "properties": {}
  36086. }
  36087. },
  36088. "required": ["id", "type", "data"],
  36089. "additionalProperties": false
  36090. },
  36091. "V2EventGlobalDisposed": {
  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": ["global.disposed"]
  36123. },
  36124. "data": {
  36125. "type": "object",
  36126. "properties": {}
  36127. }
  36128. },
  36129. "required": ["id", "type", "data"],
  36130. "additionalProperties": false
  36131. },
  36132. "QuestionV2Request": {
  36133. "type": "object",
  36134. "properties": {
  36135. "id": {
  36136. "type": "string",
  36137. "pattern": "^que"
  36138. },
  36139. "sessionID": {
  36140. "type": "string",
  36141. "pattern": "^ses"
  36142. },
  36143. "questions": {
  36144. "type": "array",
  36145. "items": {
  36146. "$ref": "#/components/schemas/QuestionV2Info"
  36147. },
  36148. "description": "Questions to ask"
  36149. },
  36150. "tool": {
  36151. "$ref": "#/components/schemas/QuestionV2Tool"
  36152. }
  36153. },
  36154. "required": ["id", "sessionID", "questions"],
  36155. "additionalProperties": false
  36156. },
  36157. "QuestionV2Reply": {
  36158. "type": "object",
  36159. "properties": {
  36160. "answers": {
  36161. "type": "array",
  36162. "items": {
  36163. "$ref": "#/components/schemas/QuestionV2Answer"
  36164. },
  36165. "description": "User answers in order of questions (each answer is an array of selected labels)"
  36166. }
  36167. },
  36168. "required": ["answers"],
  36169. "additionalProperties": false
  36170. },
  36171. "ReferenceLocalSource": {
  36172. "type": "object",
  36173. "properties": {
  36174. "type": {
  36175. "type": "string",
  36176. "enum": ["local"]
  36177. },
  36178. "path": {
  36179. "type": "string"
  36180. },
  36181. "description": {
  36182. "type": "string"
  36183. },
  36184. "hidden": {
  36185. "type": "boolean"
  36186. }
  36187. },
  36188. "required": ["type", "path"],
  36189. "additionalProperties": false
  36190. },
  36191. "ReferenceGitSource": {
  36192. "type": "object",
  36193. "properties": {
  36194. "type": {
  36195. "type": "string",
  36196. "enum": ["git"]
  36197. },
  36198. "repository": {
  36199. "type": "string"
  36200. },
  36201. "branch": {
  36202. "type": "string"
  36203. },
  36204. "description": {
  36205. "type": "string"
  36206. },
  36207. "hidden": {
  36208. "type": "boolean"
  36209. }
  36210. },
  36211. "required": ["type", "repository"],
  36212. "additionalProperties": false
  36213. },
  36214. "ReferenceSource": {
  36215. "anyOf": [
  36216. {
  36217. "$ref": "#/components/schemas/ReferenceLocalSource"
  36218. },
  36219. {
  36220. "$ref": "#/components/schemas/ReferenceGitSource"
  36221. }
  36222. ]
  36223. },
  36224. "ReferenceInfo": {
  36225. "type": "object",
  36226. "properties": {
  36227. "name": {
  36228. "type": "string"
  36229. },
  36230. "path": {
  36231. "type": "string"
  36232. },
  36233. "description": {
  36234. "type": "string"
  36235. },
  36236. "hidden": {
  36237. "type": "boolean"
  36238. },
  36239. "source": {
  36240. "$ref": "#/components/schemas/ReferenceSource"
  36241. }
  36242. },
  36243. "required": ["name", "path", "source"],
  36244. "additionalProperties": false
  36245. },
  36246. "ProjectCopyCopy": {
  36247. "type": "object",
  36248. "properties": {
  36249. "directory": {
  36250. "type": "string"
  36251. }
  36252. },
  36253. "required": ["directory"],
  36254. "additionalProperties": false
  36255. },
  36256. "EventModels-devRefreshed": {
  36257. "type": "object",
  36258. "properties": {
  36259. "id": {
  36260. "type": "string",
  36261. "pattern": "^evt_"
  36262. },
  36263. "type": {
  36264. "type": "string",
  36265. "enum": ["models-dev.refreshed"]
  36266. },
  36267. "properties": {
  36268. "type": "object",
  36269. "properties": {}
  36270. }
  36271. },
  36272. "required": ["id", "type", "properties"],
  36273. "additionalProperties": false
  36274. },
  36275. "EventIntegrationUpdated": {
  36276. "type": "object",
  36277. "properties": {
  36278. "id": {
  36279. "type": "string",
  36280. "pattern": "^evt_"
  36281. },
  36282. "type": {
  36283. "type": "string",
  36284. "enum": ["integration.updated"]
  36285. },
  36286. "properties": {
  36287. "type": "object",
  36288. "properties": {}
  36289. }
  36290. },
  36291. "required": ["id", "type", "properties"],
  36292. "additionalProperties": false
  36293. },
  36294. "EventIntegrationConnectionUpdated": {
  36295. "type": "object",
  36296. "properties": {
  36297. "id": {
  36298. "type": "string",
  36299. "pattern": "^evt_"
  36300. },
  36301. "type": {
  36302. "type": "string",
  36303. "enum": ["integration.connection.updated"]
  36304. },
  36305. "properties": {
  36306. "type": "object",
  36307. "properties": {
  36308. "integrationID": {
  36309. "type": "string"
  36310. }
  36311. },
  36312. "required": ["integrationID"],
  36313. "additionalProperties": false
  36314. }
  36315. },
  36316. "required": ["id", "type", "properties"],
  36317. "additionalProperties": false
  36318. },
  36319. "EventCatalogUpdated": {
  36320. "type": "object",
  36321. "properties": {
  36322. "id": {
  36323. "type": "string",
  36324. "pattern": "^evt_"
  36325. },
  36326. "type": {
  36327. "type": "string",
  36328. "enum": ["catalog.updated"]
  36329. },
  36330. "properties": {
  36331. "type": "object",
  36332. "properties": {}
  36333. }
  36334. },
  36335. "required": ["id", "type", "properties"],
  36336. "additionalProperties": false
  36337. },
  36338. "EventSessionCreated": {
  36339. "type": "object",
  36340. "properties": {
  36341. "id": {
  36342. "type": "string",
  36343. "pattern": "^evt_"
  36344. },
  36345. "type": {
  36346. "type": "string",
  36347. "enum": ["session.created"]
  36348. },
  36349. "properties": {
  36350. "type": "object",
  36351. "properties": {
  36352. "sessionID": {
  36353. "type": "string",
  36354. "pattern": "^ses"
  36355. },
  36356. "info": {
  36357. "$ref": "#/components/schemas/Session"
  36358. }
  36359. },
  36360. "required": ["sessionID", "info"],
  36361. "additionalProperties": false
  36362. }
  36363. },
  36364. "required": ["id", "type", "properties"],
  36365. "additionalProperties": false
  36366. },
  36367. "EventSessionUpdated": {
  36368. "type": "object",
  36369. "properties": {
  36370. "id": {
  36371. "type": "string",
  36372. "pattern": "^evt_"
  36373. },
  36374. "type": {
  36375. "type": "string",
  36376. "enum": ["session.updated"]
  36377. },
  36378. "properties": {
  36379. "type": "object",
  36380. "properties": {
  36381. "sessionID": {
  36382. "type": "string",
  36383. "pattern": "^ses"
  36384. },
  36385. "info": {
  36386. "$ref": "#/components/schemas/Session"
  36387. }
  36388. },
  36389. "required": ["sessionID", "info"],
  36390. "additionalProperties": false
  36391. }
  36392. },
  36393. "required": ["id", "type", "properties"],
  36394. "additionalProperties": false
  36395. },
  36396. "EventSessionDeleted": {
  36397. "type": "object",
  36398. "properties": {
  36399. "id": {
  36400. "type": "string",
  36401. "pattern": "^evt_"
  36402. },
  36403. "type": {
  36404. "type": "string",
  36405. "enum": ["session.deleted"]
  36406. },
  36407. "properties": {
  36408. "type": "object",
  36409. "properties": {
  36410. "sessionID": {
  36411. "type": "string",
  36412. "pattern": "^ses"
  36413. },
  36414. "info": {
  36415. "$ref": "#/components/schemas/Session"
  36416. }
  36417. },
  36418. "required": ["sessionID", "info"],
  36419. "additionalProperties": false
  36420. }
  36421. },
  36422. "required": ["id", "type", "properties"],
  36423. "additionalProperties": false
  36424. },
  36425. "EventMessageUpdated": {
  36426. "type": "object",
  36427. "properties": {
  36428. "id": {
  36429. "type": "string",
  36430. "pattern": "^evt_"
  36431. },
  36432. "type": {
  36433. "type": "string",
  36434. "enum": ["message.updated"]
  36435. },
  36436. "properties": {
  36437. "type": "object",
  36438. "properties": {
  36439. "sessionID": {
  36440. "type": "string",
  36441. "pattern": "^ses"
  36442. },
  36443. "info": {
  36444. "$ref": "#/components/schemas/Message"
  36445. }
  36446. },
  36447. "required": ["sessionID", "info"],
  36448. "additionalProperties": false
  36449. }
  36450. },
  36451. "required": ["id", "type", "properties"],
  36452. "additionalProperties": false
  36453. },
  36454. "EventMessageRemoved": {
  36455. "type": "object",
  36456. "properties": {
  36457. "id": {
  36458. "type": "string",
  36459. "pattern": "^evt_"
  36460. },
  36461. "type": {
  36462. "type": "string",
  36463. "enum": ["message.removed"]
  36464. },
  36465. "properties": {
  36466. "type": "object",
  36467. "properties": {
  36468. "sessionID": {
  36469. "type": "string",
  36470. "pattern": "^ses"
  36471. },
  36472. "messageID": {
  36473. "type": "string",
  36474. "pattern": "^msg"
  36475. }
  36476. },
  36477. "required": ["sessionID", "messageID"],
  36478. "additionalProperties": false
  36479. }
  36480. },
  36481. "required": ["id", "type", "properties"],
  36482. "additionalProperties": false
  36483. },
  36484. "EventMessagePartUpdated": {
  36485. "type": "object",
  36486. "properties": {
  36487. "id": {
  36488. "type": "string",
  36489. "pattern": "^evt_"
  36490. },
  36491. "type": {
  36492. "type": "string",
  36493. "enum": ["message.part.updated"]
  36494. },
  36495. "properties": {
  36496. "type": "object",
  36497. "properties": {
  36498. "sessionID": {
  36499. "type": "string",
  36500. "pattern": "^ses"
  36501. },
  36502. "part": {
  36503. "$ref": "#/components/schemas/Part"
  36504. },
  36505. "time": {
  36506. "type": "number"
  36507. }
  36508. },
  36509. "required": ["sessionID", "part", "time"],
  36510. "additionalProperties": false
  36511. }
  36512. },
  36513. "required": ["id", "type", "properties"],
  36514. "additionalProperties": false
  36515. },
  36516. "EventMessagePartRemoved": {
  36517. "type": "object",
  36518. "properties": {
  36519. "id": {
  36520. "type": "string",
  36521. "pattern": "^evt_"
  36522. },
  36523. "type": {
  36524. "type": "string",
  36525. "enum": ["message.part.removed"]
  36526. },
  36527. "properties": {
  36528. "type": "object",
  36529. "properties": {
  36530. "sessionID": {
  36531. "type": "string",
  36532. "pattern": "^ses"
  36533. },
  36534. "messageID": {
  36535. "type": "string",
  36536. "pattern": "^msg"
  36537. },
  36538. "partID": {
  36539. "type": "string",
  36540. "pattern": "^prt"
  36541. }
  36542. },
  36543. "required": ["sessionID", "messageID", "partID"],
  36544. "additionalProperties": false
  36545. }
  36546. },
  36547. "required": ["id", "type", "properties"],
  36548. "additionalProperties": false
  36549. },
  36550. "EventSessionNextAgentSwitched": {
  36551. "type": "object",
  36552. "properties": {
  36553. "id": {
  36554. "type": "string",
  36555. "pattern": "^evt_"
  36556. },
  36557. "type": {
  36558. "type": "string",
  36559. "enum": ["session.next.agent.switched"]
  36560. },
  36561. "properties": {
  36562. "type": "object",
  36563. "properties": {
  36564. "timestamp": {
  36565. "type": "number"
  36566. },
  36567. "sessionID": {
  36568. "type": "string",
  36569. "pattern": "^ses"
  36570. },
  36571. "messageID": {
  36572. "type": "string",
  36573. "pattern": "^msg_"
  36574. },
  36575. "agent": {
  36576. "type": "string"
  36577. }
  36578. },
  36579. "required": ["timestamp", "sessionID", "messageID", "agent"],
  36580. "additionalProperties": false
  36581. }
  36582. },
  36583. "required": ["id", "type", "properties"],
  36584. "additionalProperties": false
  36585. },
  36586. "EventSessionNextModelSwitched": {
  36587. "type": "object",
  36588. "properties": {
  36589. "id": {
  36590. "type": "string",
  36591. "pattern": "^evt_"
  36592. },
  36593. "type": {
  36594. "type": "string",
  36595. "enum": ["session.next.model.switched"]
  36596. },
  36597. "properties": {
  36598. "type": "object",
  36599. "properties": {
  36600. "timestamp": {
  36601. "type": "number"
  36602. },
  36603. "sessionID": {
  36604. "type": "string",
  36605. "pattern": "^ses"
  36606. },
  36607. "messageID": {
  36608. "type": "string",
  36609. "pattern": "^msg_"
  36610. },
  36611. "model": {
  36612. "$ref": "#/components/schemas/ModelRef"
  36613. }
  36614. },
  36615. "required": ["timestamp", "sessionID", "messageID", "model"],
  36616. "additionalProperties": false
  36617. }
  36618. },
  36619. "required": ["id", "type", "properties"],
  36620. "additionalProperties": false
  36621. },
  36622. "EventSessionNextMoved": {
  36623. "type": "object",
  36624. "properties": {
  36625. "id": {
  36626. "type": "string",
  36627. "pattern": "^evt_"
  36628. },
  36629. "type": {
  36630. "type": "string",
  36631. "enum": ["session.next.moved"]
  36632. },
  36633. "properties": {
  36634. "type": "object",
  36635. "properties": {
  36636. "timestamp": {
  36637. "type": "number"
  36638. },
  36639. "sessionID": {
  36640. "type": "string",
  36641. "pattern": "^ses"
  36642. },
  36643. "location": {
  36644. "$ref": "#/components/schemas/LocationRef"
  36645. },
  36646. "subdirectory": {
  36647. "type": "string"
  36648. }
  36649. },
  36650. "required": ["timestamp", "sessionID", "location"],
  36651. "additionalProperties": false
  36652. }
  36653. },
  36654. "required": ["id", "type", "properties"],
  36655. "additionalProperties": false
  36656. },
  36657. "EventSessionNextPrompted": {
  36658. "type": "object",
  36659. "properties": {
  36660. "id": {
  36661. "type": "string",
  36662. "pattern": "^evt_"
  36663. },
  36664. "type": {
  36665. "type": "string",
  36666. "enum": ["session.next.prompted"]
  36667. },
  36668. "properties": {
  36669. "type": "object",
  36670. "properties": {
  36671. "timestamp": {
  36672. "type": "number"
  36673. },
  36674. "sessionID": {
  36675. "type": "string",
  36676. "pattern": "^ses"
  36677. },
  36678. "messageID": {
  36679. "type": "string",
  36680. "pattern": "^msg_"
  36681. },
  36682. "prompt": {
  36683. "$ref": "#/components/schemas/Prompt"
  36684. },
  36685. "delivery": {
  36686. "type": "string",
  36687. "enum": ["steer", "queue"]
  36688. }
  36689. },
  36690. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  36691. "additionalProperties": false
  36692. }
  36693. },
  36694. "required": ["id", "type", "properties"],
  36695. "additionalProperties": false
  36696. },
  36697. "EventSessionNextPromptAdmitted": {
  36698. "type": "object",
  36699. "properties": {
  36700. "id": {
  36701. "type": "string",
  36702. "pattern": "^evt_"
  36703. },
  36704. "type": {
  36705. "type": "string",
  36706. "enum": ["session.next.prompt.admitted"]
  36707. },
  36708. "properties": {
  36709. "type": "object",
  36710. "properties": {
  36711. "timestamp": {
  36712. "type": "number"
  36713. },
  36714. "sessionID": {
  36715. "type": "string",
  36716. "pattern": "^ses"
  36717. },
  36718. "messageID": {
  36719. "type": "string",
  36720. "pattern": "^msg_"
  36721. },
  36722. "prompt": {
  36723. "$ref": "#/components/schemas/Prompt"
  36724. },
  36725. "delivery": {
  36726. "type": "string",
  36727. "enum": ["steer", "queue"]
  36728. }
  36729. },
  36730. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  36731. "additionalProperties": false
  36732. }
  36733. },
  36734. "required": ["id", "type", "properties"],
  36735. "additionalProperties": false
  36736. },
  36737. "EventSessionNextContextUpdated": {
  36738. "type": "object",
  36739. "properties": {
  36740. "id": {
  36741. "type": "string",
  36742. "pattern": "^evt_"
  36743. },
  36744. "type": {
  36745. "type": "string",
  36746. "enum": ["session.next.context.updated"]
  36747. },
  36748. "properties": {
  36749. "type": "object",
  36750. "properties": {
  36751. "timestamp": {
  36752. "type": "number"
  36753. },
  36754. "sessionID": {
  36755. "type": "string",
  36756. "pattern": "^ses"
  36757. },
  36758. "messageID": {
  36759. "type": "string",
  36760. "pattern": "^msg_"
  36761. },
  36762. "text": {
  36763. "type": "string"
  36764. }
  36765. },
  36766. "required": ["timestamp", "sessionID", "messageID", "text"],
  36767. "additionalProperties": false
  36768. }
  36769. },
  36770. "required": ["id", "type", "properties"],
  36771. "additionalProperties": false
  36772. },
  36773. "EventSessionNextSynthetic": {
  36774. "type": "object",
  36775. "properties": {
  36776. "id": {
  36777. "type": "string",
  36778. "pattern": "^evt_"
  36779. },
  36780. "type": {
  36781. "type": "string",
  36782. "enum": ["session.next.synthetic"]
  36783. },
  36784. "properties": {
  36785. "type": "object",
  36786. "properties": {
  36787. "timestamp": {
  36788. "type": "number"
  36789. },
  36790. "sessionID": {
  36791. "type": "string",
  36792. "pattern": "^ses"
  36793. },
  36794. "messageID": {
  36795. "type": "string",
  36796. "pattern": "^msg_"
  36797. },
  36798. "text": {
  36799. "type": "string"
  36800. }
  36801. },
  36802. "required": ["timestamp", "sessionID", "messageID", "text"],
  36803. "additionalProperties": false
  36804. }
  36805. },
  36806. "required": ["id", "type", "properties"],
  36807. "additionalProperties": false
  36808. },
  36809. "EventSessionNextShellStarted": {
  36810. "type": "object",
  36811. "properties": {
  36812. "id": {
  36813. "type": "string",
  36814. "pattern": "^evt_"
  36815. },
  36816. "type": {
  36817. "type": "string",
  36818. "enum": ["session.next.shell.started"]
  36819. },
  36820. "properties": {
  36821. "type": "object",
  36822. "properties": {
  36823. "timestamp": {
  36824. "type": "number"
  36825. },
  36826. "sessionID": {
  36827. "type": "string",
  36828. "pattern": "^ses"
  36829. },
  36830. "messageID": {
  36831. "type": "string",
  36832. "pattern": "^msg_"
  36833. },
  36834. "callID": {
  36835. "type": "string"
  36836. },
  36837. "command": {
  36838. "type": "string"
  36839. }
  36840. },
  36841. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  36842. "additionalProperties": false
  36843. }
  36844. },
  36845. "required": ["id", "type", "properties"],
  36846. "additionalProperties": false
  36847. },
  36848. "EventSessionNextShellEnded": {
  36849. "type": "object",
  36850. "properties": {
  36851. "id": {
  36852. "type": "string",
  36853. "pattern": "^evt_"
  36854. },
  36855. "type": {
  36856. "type": "string",
  36857. "enum": ["session.next.shell.ended"]
  36858. },
  36859. "properties": {
  36860. "type": "object",
  36861. "properties": {
  36862. "timestamp": {
  36863. "type": "number"
  36864. },
  36865. "sessionID": {
  36866. "type": "string",
  36867. "pattern": "^ses"
  36868. },
  36869. "callID": {
  36870. "type": "string"
  36871. },
  36872. "output": {
  36873. "type": "string"
  36874. }
  36875. },
  36876. "required": ["timestamp", "sessionID", "callID", "output"],
  36877. "additionalProperties": false
  36878. }
  36879. },
  36880. "required": ["id", "type", "properties"],
  36881. "additionalProperties": false
  36882. },
  36883. "EventSessionNextStepStarted": {
  36884. "type": "object",
  36885. "properties": {
  36886. "id": {
  36887. "type": "string",
  36888. "pattern": "^evt_"
  36889. },
  36890. "type": {
  36891. "type": "string",
  36892. "enum": ["session.next.step.started"]
  36893. },
  36894. "properties": {
  36895. "type": "object",
  36896. "properties": {
  36897. "timestamp": {
  36898. "type": "number"
  36899. },
  36900. "sessionID": {
  36901. "type": "string",
  36902. "pattern": "^ses"
  36903. },
  36904. "assistantMessageID": {
  36905. "type": "string",
  36906. "pattern": "^msg_"
  36907. },
  36908. "agent": {
  36909. "type": "string"
  36910. },
  36911. "model": {
  36912. "$ref": "#/components/schemas/ModelRef"
  36913. },
  36914. "snapshot": {
  36915. "type": "string"
  36916. }
  36917. },
  36918. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  36919. "additionalProperties": false
  36920. }
  36921. },
  36922. "required": ["id", "type", "properties"],
  36923. "additionalProperties": false
  36924. },
  36925. "EventSessionNextStepEnded": {
  36926. "type": "object",
  36927. "properties": {
  36928. "id": {
  36929. "type": "string",
  36930. "pattern": "^evt_"
  36931. },
  36932. "type": {
  36933. "type": "string",
  36934. "enum": ["session.next.step.ended"]
  36935. },
  36936. "properties": {
  36937. "type": "object",
  36938. "properties": {
  36939. "timestamp": {
  36940. "type": "number"
  36941. },
  36942. "sessionID": {
  36943. "type": "string",
  36944. "pattern": "^ses"
  36945. },
  36946. "assistantMessageID": {
  36947. "type": "string",
  36948. "pattern": "^msg_"
  36949. },
  36950. "finish": {
  36951. "type": "string"
  36952. },
  36953. "cost": {
  36954. "type": "number"
  36955. },
  36956. "tokens": {
  36957. "type": "object",
  36958. "properties": {
  36959. "input": {
  36960. "type": "number"
  36961. },
  36962. "output": {
  36963. "type": "number"
  36964. },
  36965. "reasoning": {
  36966. "type": "number"
  36967. },
  36968. "cache": {
  36969. "type": "object",
  36970. "properties": {
  36971. "read": {
  36972. "type": "number"
  36973. },
  36974. "write": {
  36975. "type": "number"
  36976. }
  36977. },
  36978. "required": ["read", "write"],
  36979. "additionalProperties": false
  36980. }
  36981. },
  36982. "required": ["input", "output", "reasoning", "cache"],
  36983. "additionalProperties": false
  36984. },
  36985. "snapshot": {
  36986. "type": "string"
  36987. },
  36988. "files": {
  36989. "type": "array",
  36990. "items": {
  36991. "type": "string"
  36992. }
  36993. }
  36994. },
  36995. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  36996. "additionalProperties": false
  36997. }
  36998. },
  36999. "required": ["id", "type", "properties"],
  37000. "additionalProperties": false
  37001. },
  37002. "EventSessionNextStepFailed": {
  37003. "type": "object",
  37004. "properties": {
  37005. "id": {
  37006. "type": "string",
  37007. "pattern": "^evt_"
  37008. },
  37009. "type": {
  37010. "type": "string",
  37011. "enum": ["session.next.step.failed"]
  37012. },
  37013. "properties": {
  37014. "type": "object",
  37015. "properties": {
  37016. "timestamp": {
  37017. "type": "number"
  37018. },
  37019. "sessionID": {
  37020. "type": "string",
  37021. "pattern": "^ses"
  37022. },
  37023. "assistantMessageID": {
  37024. "type": "string",
  37025. "pattern": "^msg_"
  37026. },
  37027. "error": {
  37028. "$ref": "#/components/schemas/SessionErrorUnknown"
  37029. }
  37030. },
  37031. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  37032. "additionalProperties": false
  37033. }
  37034. },
  37035. "required": ["id", "type", "properties"],
  37036. "additionalProperties": false
  37037. },
  37038. "EventSessionNextTextStarted": {
  37039. "type": "object",
  37040. "properties": {
  37041. "id": {
  37042. "type": "string",
  37043. "pattern": "^evt_"
  37044. },
  37045. "type": {
  37046. "type": "string",
  37047. "enum": ["session.next.text.started"]
  37048. },
  37049. "properties": {
  37050. "type": "object",
  37051. "properties": {
  37052. "timestamp": {
  37053. "type": "number"
  37054. },
  37055. "sessionID": {
  37056. "type": "string",
  37057. "pattern": "^ses"
  37058. },
  37059. "assistantMessageID": {
  37060. "type": "string",
  37061. "pattern": "^msg_"
  37062. },
  37063. "textID": {
  37064. "type": "string"
  37065. }
  37066. },
  37067. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  37068. "additionalProperties": false
  37069. }
  37070. },
  37071. "required": ["id", "type", "properties"],
  37072. "additionalProperties": false
  37073. },
  37074. "EventSessionNextTextDelta": {
  37075. "type": "object",
  37076. "properties": {
  37077. "id": {
  37078. "type": "string",
  37079. "pattern": "^evt_"
  37080. },
  37081. "type": {
  37082. "type": "string",
  37083. "enum": ["session.next.text.delta"]
  37084. },
  37085. "properties": {
  37086. "type": "object",
  37087. "properties": {
  37088. "timestamp": {
  37089. "type": "number"
  37090. },
  37091. "sessionID": {
  37092. "type": "string",
  37093. "pattern": "^ses"
  37094. },
  37095. "assistantMessageID": {
  37096. "type": "string",
  37097. "pattern": "^msg_"
  37098. },
  37099. "textID": {
  37100. "type": "string"
  37101. },
  37102. "delta": {
  37103. "type": "string"
  37104. }
  37105. },
  37106. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  37107. "additionalProperties": false
  37108. }
  37109. },
  37110. "required": ["id", "type", "properties"],
  37111. "additionalProperties": false
  37112. },
  37113. "EventSessionNextTextEnded": {
  37114. "type": "object",
  37115. "properties": {
  37116. "id": {
  37117. "type": "string",
  37118. "pattern": "^evt_"
  37119. },
  37120. "type": {
  37121. "type": "string",
  37122. "enum": ["session.next.text.ended"]
  37123. },
  37124. "properties": {
  37125. "type": "object",
  37126. "properties": {
  37127. "timestamp": {
  37128. "type": "number"
  37129. },
  37130. "sessionID": {
  37131. "type": "string",
  37132. "pattern": "^ses"
  37133. },
  37134. "assistantMessageID": {
  37135. "type": "string",
  37136. "pattern": "^msg_"
  37137. },
  37138. "textID": {
  37139. "type": "string"
  37140. },
  37141. "text": {
  37142. "type": "string"
  37143. }
  37144. },
  37145. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  37146. "additionalProperties": false
  37147. }
  37148. },
  37149. "required": ["id", "type", "properties"],
  37150. "additionalProperties": false
  37151. },
  37152. "EventSessionNextReasoningStarted": {
  37153. "type": "object",
  37154. "properties": {
  37155. "id": {
  37156. "type": "string",
  37157. "pattern": "^evt_"
  37158. },
  37159. "type": {
  37160. "type": "string",
  37161. "enum": ["session.next.reasoning.started"]
  37162. },
  37163. "properties": {
  37164. "type": "object",
  37165. "properties": {
  37166. "timestamp": {
  37167. "type": "number"
  37168. },
  37169. "sessionID": {
  37170. "type": "string",
  37171. "pattern": "^ses"
  37172. },
  37173. "assistantMessageID": {
  37174. "type": "string",
  37175. "pattern": "^msg_"
  37176. },
  37177. "reasoningID": {
  37178. "type": "string"
  37179. },
  37180. "providerMetadata": {
  37181. "$ref": "#/components/schemas/LLMProviderMetadata"
  37182. }
  37183. },
  37184. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  37185. "additionalProperties": false
  37186. }
  37187. },
  37188. "required": ["id", "type", "properties"],
  37189. "additionalProperties": false
  37190. },
  37191. "EventSessionNextReasoningDelta": {
  37192. "type": "object",
  37193. "properties": {
  37194. "id": {
  37195. "type": "string",
  37196. "pattern": "^evt_"
  37197. },
  37198. "type": {
  37199. "type": "string",
  37200. "enum": ["session.next.reasoning.delta"]
  37201. },
  37202. "properties": {
  37203. "type": "object",
  37204. "properties": {
  37205. "timestamp": {
  37206. "type": "number"
  37207. },
  37208. "sessionID": {
  37209. "type": "string",
  37210. "pattern": "^ses"
  37211. },
  37212. "assistantMessageID": {
  37213. "type": "string",
  37214. "pattern": "^msg_"
  37215. },
  37216. "reasoningID": {
  37217. "type": "string"
  37218. },
  37219. "delta": {
  37220. "type": "string"
  37221. }
  37222. },
  37223. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  37224. "additionalProperties": false
  37225. }
  37226. },
  37227. "required": ["id", "type", "properties"],
  37228. "additionalProperties": false
  37229. },
  37230. "EventSessionNextReasoningEnded": {
  37231. "type": "object",
  37232. "properties": {
  37233. "id": {
  37234. "type": "string",
  37235. "pattern": "^evt_"
  37236. },
  37237. "type": {
  37238. "type": "string",
  37239. "enum": ["session.next.reasoning.ended"]
  37240. },
  37241. "properties": {
  37242. "type": "object",
  37243. "properties": {
  37244. "timestamp": {
  37245. "type": "number"
  37246. },
  37247. "sessionID": {
  37248. "type": "string",
  37249. "pattern": "^ses"
  37250. },
  37251. "assistantMessageID": {
  37252. "type": "string",
  37253. "pattern": "^msg_"
  37254. },
  37255. "reasoningID": {
  37256. "type": "string"
  37257. },
  37258. "text": {
  37259. "type": "string"
  37260. },
  37261. "providerMetadata": {
  37262. "$ref": "#/components/schemas/LLMProviderMetadata"
  37263. }
  37264. },
  37265. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  37266. "additionalProperties": false
  37267. }
  37268. },
  37269. "required": ["id", "type", "properties"],
  37270. "additionalProperties": false
  37271. },
  37272. "EventSessionNextToolInputStarted": {
  37273. "type": "object",
  37274. "properties": {
  37275. "id": {
  37276. "type": "string",
  37277. "pattern": "^evt_"
  37278. },
  37279. "type": {
  37280. "type": "string",
  37281. "enum": ["session.next.tool.input.started"]
  37282. },
  37283. "properties": {
  37284. "type": "object",
  37285. "properties": {
  37286. "timestamp": {
  37287. "type": "number"
  37288. },
  37289. "sessionID": {
  37290. "type": "string",
  37291. "pattern": "^ses"
  37292. },
  37293. "assistantMessageID": {
  37294. "type": "string",
  37295. "pattern": "^msg_"
  37296. },
  37297. "callID": {
  37298. "type": "string"
  37299. },
  37300. "name": {
  37301. "type": "string"
  37302. }
  37303. },
  37304. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  37305. "additionalProperties": false
  37306. }
  37307. },
  37308. "required": ["id", "type", "properties"],
  37309. "additionalProperties": false
  37310. },
  37311. "EventSessionNextToolInputDelta": {
  37312. "type": "object",
  37313. "properties": {
  37314. "id": {
  37315. "type": "string",
  37316. "pattern": "^evt_"
  37317. },
  37318. "type": {
  37319. "type": "string",
  37320. "enum": ["session.next.tool.input.delta"]
  37321. },
  37322. "properties": {
  37323. "type": "object",
  37324. "properties": {
  37325. "timestamp": {
  37326. "type": "number"
  37327. },
  37328. "sessionID": {
  37329. "type": "string",
  37330. "pattern": "^ses"
  37331. },
  37332. "assistantMessageID": {
  37333. "type": "string",
  37334. "pattern": "^msg_"
  37335. },
  37336. "callID": {
  37337. "type": "string"
  37338. },
  37339. "delta": {
  37340. "type": "string"
  37341. }
  37342. },
  37343. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  37344. "additionalProperties": false
  37345. }
  37346. },
  37347. "required": ["id", "type", "properties"],
  37348. "additionalProperties": false
  37349. },
  37350. "EventSessionNextToolInputEnded": {
  37351. "type": "object",
  37352. "properties": {
  37353. "id": {
  37354. "type": "string",
  37355. "pattern": "^evt_"
  37356. },
  37357. "type": {
  37358. "type": "string",
  37359. "enum": ["session.next.tool.input.ended"]
  37360. },
  37361. "properties": {
  37362. "type": "object",
  37363. "properties": {
  37364. "timestamp": {
  37365. "type": "number"
  37366. },
  37367. "sessionID": {
  37368. "type": "string",
  37369. "pattern": "^ses"
  37370. },
  37371. "assistantMessageID": {
  37372. "type": "string",
  37373. "pattern": "^msg_"
  37374. },
  37375. "callID": {
  37376. "type": "string"
  37377. },
  37378. "text": {
  37379. "type": "string"
  37380. }
  37381. },
  37382. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  37383. "additionalProperties": false
  37384. }
  37385. },
  37386. "required": ["id", "type", "properties"],
  37387. "additionalProperties": false
  37388. },
  37389. "EventSessionNextToolCalled": {
  37390. "type": "object",
  37391. "properties": {
  37392. "id": {
  37393. "type": "string",
  37394. "pattern": "^evt_"
  37395. },
  37396. "type": {
  37397. "type": "string",
  37398. "enum": ["session.next.tool.called"]
  37399. },
  37400. "properties": {
  37401. "type": "object",
  37402. "properties": {
  37403. "timestamp": {
  37404. "type": "number"
  37405. },
  37406. "sessionID": {
  37407. "type": "string",
  37408. "pattern": "^ses"
  37409. },
  37410. "assistantMessageID": {
  37411. "type": "string",
  37412. "pattern": "^msg_"
  37413. },
  37414. "callID": {
  37415. "type": "string"
  37416. },
  37417. "tool": {
  37418. "type": "string"
  37419. },
  37420. "input": {
  37421. "type": "object"
  37422. },
  37423. "provider": {
  37424. "type": "object",
  37425. "properties": {
  37426. "executed": {
  37427. "type": "boolean"
  37428. },
  37429. "metadata": {
  37430. "$ref": "#/components/schemas/LLMProviderMetadata"
  37431. }
  37432. },
  37433. "required": ["executed"],
  37434. "additionalProperties": false
  37435. }
  37436. },
  37437. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  37438. "additionalProperties": false
  37439. }
  37440. },
  37441. "required": ["id", "type", "properties"],
  37442. "additionalProperties": false
  37443. },
  37444. "EventSessionNextToolProgress": {
  37445. "type": "object",
  37446. "properties": {
  37447. "id": {
  37448. "type": "string",
  37449. "pattern": "^evt_"
  37450. },
  37451. "type": {
  37452. "type": "string",
  37453. "enum": ["session.next.tool.progress"]
  37454. },
  37455. "properties": {
  37456. "type": "object",
  37457. "properties": {
  37458. "timestamp": {
  37459. "type": "number"
  37460. },
  37461. "sessionID": {
  37462. "type": "string",
  37463. "pattern": "^ses"
  37464. },
  37465. "assistantMessageID": {
  37466. "type": "string",
  37467. "pattern": "^msg_"
  37468. },
  37469. "callID": {
  37470. "type": "string"
  37471. },
  37472. "structured": {
  37473. "type": "object"
  37474. },
  37475. "content": {
  37476. "type": "array",
  37477. "items": {
  37478. "$ref": "#/components/schemas/LLMToolContent"
  37479. }
  37480. }
  37481. },
  37482. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  37483. "additionalProperties": false
  37484. }
  37485. },
  37486. "required": ["id", "type", "properties"],
  37487. "additionalProperties": false
  37488. },
  37489. "EventSessionNextToolSuccess": {
  37490. "type": "object",
  37491. "properties": {
  37492. "id": {
  37493. "type": "string",
  37494. "pattern": "^evt_"
  37495. },
  37496. "type": {
  37497. "type": "string",
  37498. "enum": ["session.next.tool.success"]
  37499. },
  37500. "properties": {
  37501. "type": "object",
  37502. "properties": {
  37503. "timestamp": {
  37504. "type": "number"
  37505. },
  37506. "sessionID": {
  37507. "type": "string",
  37508. "pattern": "^ses"
  37509. },
  37510. "assistantMessageID": {
  37511. "type": "string",
  37512. "pattern": "^msg_"
  37513. },
  37514. "callID": {
  37515. "type": "string"
  37516. },
  37517. "structured": {
  37518. "type": "object"
  37519. },
  37520. "content": {
  37521. "type": "array",
  37522. "items": {
  37523. "$ref": "#/components/schemas/LLMToolContent"
  37524. }
  37525. },
  37526. "outputPaths": {
  37527. "type": "array",
  37528. "items": {
  37529. "type": "string"
  37530. }
  37531. },
  37532. "result": {},
  37533. "provider": {
  37534. "type": "object",
  37535. "properties": {
  37536. "executed": {
  37537. "type": "boolean"
  37538. },
  37539. "metadata": {
  37540. "$ref": "#/components/schemas/LLMProviderMetadata"
  37541. }
  37542. },
  37543. "required": ["executed"],
  37544. "additionalProperties": false
  37545. }
  37546. },
  37547. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  37548. "additionalProperties": false
  37549. }
  37550. },
  37551. "required": ["id", "type", "properties"],
  37552. "additionalProperties": false
  37553. },
  37554. "EventSessionNextToolFailed": {
  37555. "type": "object",
  37556. "properties": {
  37557. "id": {
  37558. "type": "string",
  37559. "pattern": "^evt_"
  37560. },
  37561. "type": {
  37562. "type": "string",
  37563. "enum": ["session.next.tool.failed"]
  37564. },
  37565. "properties": {
  37566. "type": "object",
  37567. "properties": {
  37568. "timestamp": {
  37569. "type": "number"
  37570. },
  37571. "sessionID": {
  37572. "type": "string",
  37573. "pattern": "^ses"
  37574. },
  37575. "assistantMessageID": {
  37576. "type": "string",
  37577. "pattern": "^msg_"
  37578. },
  37579. "callID": {
  37580. "type": "string"
  37581. },
  37582. "error": {
  37583. "$ref": "#/components/schemas/SessionErrorUnknown"
  37584. },
  37585. "result": {},
  37586. "provider": {
  37587. "type": "object",
  37588. "properties": {
  37589. "executed": {
  37590. "type": "boolean"
  37591. },
  37592. "metadata": {
  37593. "$ref": "#/components/schemas/LLMProviderMetadata"
  37594. }
  37595. },
  37596. "required": ["executed"],
  37597. "additionalProperties": false
  37598. }
  37599. },
  37600. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  37601. "additionalProperties": false
  37602. }
  37603. },
  37604. "required": ["id", "type", "properties"],
  37605. "additionalProperties": false
  37606. },
  37607. "EventSessionNextRetried": {
  37608. "type": "object",
  37609. "properties": {
  37610. "id": {
  37611. "type": "string",
  37612. "pattern": "^evt_"
  37613. },
  37614. "type": {
  37615. "type": "string",
  37616. "enum": ["session.next.retried"]
  37617. },
  37618. "properties": {
  37619. "type": "object",
  37620. "properties": {
  37621. "timestamp": {
  37622. "type": "number"
  37623. },
  37624. "sessionID": {
  37625. "type": "string",
  37626. "pattern": "^ses"
  37627. },
  37628. "attempt": {
  37629. "type": "number"
  37630. },
  37631. "error": {
  37632. "$ref": "#/components/schemas/SessionNextRetry_error"
  37633. }
  37634. },
  37635. "required": ["timestamp", "sessionID", "attempt", "error"],
  37636. "additionalProperties": false
  37637. }
  37638. },
  37639. "required": ["id", "type", "properties"],
  37640. "additionalProperties": false
  37641. },
  37642. "EventSessionNextCompactionStarted": {
  37643. "type": "object",
  37644. "properties": {
  37645. "id": {
  37646. "type": "string",
  37647. "pattern": "^evt_"
  37648. },
  37649. "type": {
  37650. "type": "string",
  37651. "enum": ["session.next.compaction.started"]
  37652. },
  37653. "properties": {
  37654. "type": "object",
  37655. "properties": {
  37656. "timestamp": {
  37657. "type": "number"
  37658. },
  37659. "sessionID": {
  37660. "type": "string",
  37661. "pattern": "^ses"
  37662. },
  37663. "messageID": {
  37664. "type": "string",
  37665. "pattern": "^msg_"
  37666. },
  37667. "reason": {
  37668. "type": "string",
  37669. "enum": ["auto", "manual"]
  37670. }
  37671. },
  37672. "required": ["timestamp", "sessionID", "messageID", "reason"],
  37673. "additionalProperties": false
  37674. }
  37675. },
  37676. "required": ["id", "type", "properties"],
  37677. "additionalProperties": false
  37678. },
  37679. "EventSessionNextCompactionDelta": {
  37680. "type": "object",
  37681. "properties": {
  37682. "id": {
  37683. "type": "string",
  37684. "pattern": "^evt_"
  37685. },
  37686. "type": {
  37687. "type": "string",
  37688. "enum": ["session.next.compaction.delta"]
  37689. },
  37690. "properties": {
  37691. "type": "object",
  37692. "properties": {
  37693. "timestamp": {
  37694. "type": "number"
  37695. },
  37696. "sessionID": {
  37697. "type": "string",
  37698. "pattern": "^ses"
  37699. },
  37700. "messageID": {
  37701. "type": "string",
  37702. "pattern": "^msg_"
  37703. },
  37704. "text": {
  37705. "type": "string"
  37706. }
  37707. },
  37708. "required": ["timestamp", "sessionID", "messageID", "text"],
  37709. "additionalProperties": false
  37710. }
  37711. },
  37712. "required": ["id", "type", "properties"],
  37713. "additionalProperties": false
  37714. },
  37715. "EventSessionNextCompactionEnded": {
  37716. "type": "object",
  37717. "properties": {
  37718. "id": {
  37719. "type": "string",
  37720. "pattern": "^evt_"
  37721. },
  37722. "type": {
  37723. "type": "string",
  37724. "enum": ["session.next.compaction.ended"]
  37725. },
  37726. "properties": {
  37727. "type": "object",
  37728. "properties": {
  37729. "timestamp": {
  37730. "type": "number"
  37731. },
  37732. "sessionID": {
  37733. "type": "string",
  37734. "pattern": "^ses"
  37735. },
  37736. "messageID": {
  37737. "type": "string",
  37738. "pattern": "^msg_"
  37739. },
  37740. "reason": {
  37741. "type": "string",
  37742. "enum": ["auto", "manual"]
  37743. },
  37744. "text": {
  37745. "type": "string"
  37746. },
  37747. "recent": {
  37748. "type": "string"
  37749. }
  37750. },
  37751. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  37752. "additionalProperties": false
  37753. }
  37754. },
  37755. "required": ["id", "type", "properties"],
  37756. "additionalProperties": false
  37757. },
  37758. "EventSessionNextRevertStaged": {
  37759. "type": "object",
  37760. "properties": {
  37761. "id": {
  37762. "type": "string",
  37763. "pattern": "^evt_"
  37764. },
  37765. "type": {
  37766. "type": "string",
  37767. "enum": ["session.next.revert.staged"]
  37768. },
  37769. "properties": {
  37770. "type": "object",
  37771. "properties": {
  37772. "timestamp": {
  37773. "type": "number"
  37774. },
  37775. "sessionID": {
  37776. "type": "string",
  37777. "pattern": "^ses"
  37778. },
  37779. "revert": {
  37780. "$ref": "#/components/schemas/RevertState"
  37781. }
  37782. },
  37783. "required": ["timestamp", "sessionID", "revert"],
  37784. "additionalProperties": false
  37785. }
  37786. },
  37787. "required": ["id", "type", "properties"],
  37788. "additionalProperties": false
  37789. },
  37790. "EventSessionNextRevertCleared": {
  37791. "type": "object",
  37792. "properties": {
  37793. "id": {
  37794. "type": "string",
  37795. "pattern": "^evt_"
  37796. },
  37797. "type": {
  37798. "type": "string",
  37799. "enum": ["session.next.revert.cleared"]
  37800. },
  37801. "properties": {
  37802. "type": "object",
  37803. "properties": {
  37804. "timestamp": {
  37805. "type": "number"
  37806. },
  37807. "sessionID": {
  37808. "type": "string",
  37809. "pattern": "^ses"
  37810. }
  37811. },
  37812. "required": ["timestamp", "sessionID"],
  37813. "additionalProperties": false
  37814. }
  37815. },
  37816. "required": ["id", "type", "properties"],
  37817. "additionalProperties": false
  37818. },
  37819. "EventSessionNextRevertCommitted": {
  37820. "type": "object",
  37821. "properties": {
  37822. "id": {
  37823. "type": "string",
  37824. "pattern": "^evt_"
  37825. },
  37826. "type": {
  37827. "type": "string",
  37828. "enum": ["session.next.revert.committed"]
  37829. },
  37830. "properties": {
  37831. "type": "object",
  37832. "properties": {
  37833. "timestamp": {
  37834. "type": "number"
  37835. },
  37836. "sessionID": {
  37837. "type": "string",
  37838. "pattern": "^ses"
  37839. },
  37840. "messageID": {
  37841. "type": "string",
  37842. "pattern": "^msg_"
  37843. }
  37844. },
  37845. "required": ["timestamp", "sessionID", "messageID"],
  37846. "additionalProperties": false
  37847. }
  37848. },
  37849. "required": ["id", "type", "properties"],
  37850. "additionalProperties": false
  37851. },
  37852. "EventMessagePartDelta": {
  37853. "type": "object",
  37854. "properties": {
  37855. "id": {
  37856. "type": "string",
  37857. "pattern": "^evt_"
  37858. },
  37859. "type": {
  37860. "type": "string",
  37861. "enum": ["message.part.delta"]
  37862. },
  37863. "properties": {
  37864. "type": "object",
  37865. "properties": {
  37866. "sessionID": {
  37867. "type": "string",
  37868. "pattern": "^ses"
  37869. },
  37870. "messageID": {
  37871. "type": "string",
  37872. "pattern": "^msg"
  37873. },
  37874. "partID": {
  37875. "type": "string",
  37876. "pattern": "^prt"
  37877. },
  37878. "field": {
  37879. "type": "string"
  37880. },
  37881. "delta": {
  37882. "type": "string"
  37883. }
  37884. },
  37885. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  37886. "additionalProperties": false
  37887. }
  37888. },
  37889. "required": ["id", "type", "properties"],
  37890. "additionalProperties": false
  37891. },
  37892. "EventSessionDiff": {
  37893. "type": "object",
  37894. "properties": {
  37895. "id": {
  37896. "type": "string",
  37897. "pattern": "^evt_"
  37898. },
  37899. "type": {
  37900. "type": "string",
  37901. "enum": ["session.diff"]
  37902. },
  37903. "properties": {
  37904. "type": "object",
  37905. "properties": {
  37906. "sessionID": {
  37907. "type": "string",
  37908. "pattern": "^ses"
  37909. },
  37910. "diff": {
  37911. "type": "array",
  37912. "items": {
  37913. "$ref": "#/components/schemas/SnapshotFileDiff"
  37914. }
  37915. }
  37916. },
  37917. "required": ["sessionID", "diff"],
  37918. "additionalProperties": false
  37919. }
  37920. },
  37921. "required": ["id", "type", "properties"],
  37922. "additionalProperties": false
  37923. },
  37924. "EventSessionError": {
  37925. "type": "object",
  37926. "properties": {
  37927. "id": {
  37928. "type": "string",
  37929. "pattern": "^evt_"
  37930. },
  37931. "type": {
  37932. "type": "string",
  37933. "enum": ["session.error"]
  37934. },
  37935. "properties": {
  37936. "type": "object",
  37937. "properties": {
  37938. "sessionID": {
  37939. "type": "string",
  37940. "pattern": "^ses"
  37941. },
  37942. "error": {
  37943. "anyOf": [
  37944. {
  37945. "$ref": "#/components/schemas/ProviderAuthError"
  37946. },
  37947. {
  37948. "$ref": "#/components/schemas/UnknownError"
  37949. },
  37950. {
  37951. "$ref": "#/components/schemas/MessageOutputLengthError"
  37952. },
  37953. {
  37954. "$ref": "#/components/schemas/MessageAbortedError"
  37955. },
  37956. {
  37957. "$ref": "#/components/schemas/StructuredOutputError"
  37958. },
  37959. {
  37960. "$ref": "#/components/schemas/ContextOverflowError"
  37961. },
  37962. {
  37963. "$ref": "#/components/schemas/ContentFilterError"
  37964. },
  37965. {
  37966. "$ref": "#/components/schemas/APIError"
  37967. }
  37968. ]
  37969. }
  37970. },
  37971. "additionalProperties": false
  37972. }
  37973. },
  37974. "required": ["id", "type", "properties"],
  37975. "additionalProperties": false
  37976. },
  37977. "EventInstallationUpdated": {
  37978. "type": "object",
  37979. "properties": {
  37980. "id": {
  37981. "type": "string",
  37982. "pattern": "^evt_"
  37983. },
  37984. "type": {
  37985. "type": "string",
  37986. "enum": ["installation.updated"]
  37987. },
  37988. "properties": {
  37989. "type": "object",
  37990. "properties": {
  37991. "version": {
  37992. "type": "string"
  37993. }
  37994. },
  37995. "required": ["version"],
  37996. "additionalProperties": false
  37997. }
  37998. },
  37999. "required": ["id", "type", "properties"],
  38000. "additionalProperties": false
  38001. },
  38002. "EventInstallationUpdate-available": {
  38003. "type": "object",
  38004. "properties": {
  38005. "id": {
  38006. "type": "string",
  38007. "pattern": "^evt_"
  38008. },
  38009. "type": {
  38010. "type": "string",
  38011. "enum": ["installation.update-available"]
  38012. },
  38013. "properties": {
  38014. "type": "object",
  38015. "properties": {
  38016. "version": {
  38017. "type": "string"
  38018. }
  38019. },
  38020. "required": ["version"],
  38021. "additionalProperties": false
  38022. }
  38023. },
  38024. "required": ["id", "type", "properties"],
  38025. "additionalProperties": false
  38026. },
  38027. "EventFileEdited": {
  38028. "type": "object",
  38029. "properties": {
  38030. "id": {
  38031. "type": "string",
  38032. "pattern": "^evt_"
  38033. },
  38034. "type": {
  38035. "type": "string",
  38036. "enum": ["file.edited"]
  38037. },
  38038. "properties": {
  38039. "type": "object",
  38040. "properties": {
  38041. "file": {
  38042. "type": "string"
  38043. }
  38044. },
  38045. "required": ["file"],
  38046. "additionalProperties": false
  38047. }
  38048. },
  38049. "required": ["id", "type", "properties"],
  38050. "additionalProperties": false
  38051. },
  38052. "EventReferenceUpdated": {
  38053. "type": "object",
  38054. "properties": {
  38055. "id": {
  38056. "type": "string",
  38057. "pattern": "^evt_"
  38058. },
  38059. "type": {
  38060. "type": "string",
  38061. "enum": ["reference.updated"]
  38062. },
  38063. "properties": {
  38064. "type": "object",
  38065. "properties": {}
  38066. }
  38067. },
  38068. "required": ["id", "type", "properties"],
  38069. "additionalProperties": false
  38070. },
  38071. "EventPermissionV2Asked": {
  38072. "type": "object",
  38073. "properties": {
  38074. "id": {
  38075. "type": "string",
  38076. "pattern": "^evt_"
  38077. },
  38078. "type": {
  38079. "type": "string",
  38080. "enum": ["permission.v2.asked"]
  38081. },
  38082. "properties": {
  38083. "type": "object",
  38084. "properties": {
  38085. "id": {
  38086. "type": "string",
  38087. "pattern": "^per"
  38088. },
  38089. "sessionID": {
  38090. "type": "string",
  38091. "pattern": "^ses"
  38092. },
  38093. "action": {
  38094. "type": "string"
  38095. },
  38096. "resources": {
  38097. "type": "array",
  38098. "items": {
  38099. "type": "string"
  38100. }
  38101. },
  38102. "save": {
  38103. "type": "array",
  38104. "items": {
  38105. "type": "string"
  38106. }
  38107. },
  38108. "metadata": {
  38109. "type": "object"
  38110. },
  38111. "source": {
  38112. "$ref": "#/components/schemas/PermissionV2Source"
  38113. }
  38114. },
  38115. "required": ["id", "sessionID", "action", "resources"],
  38116. "additionalProperties": false
  38117. }
  38118. },
  38119. "required": ["id", "type", "properties"],
  38120. "additionalProperties": false
  38121. },
  38122. "EventPermissionV2Replied": {
  38123. "type": "object",
  38124. "properties": {
  38125. "id": {
  38126. "type": "string",
  38127. "pattern": "^evt_"
  38128. },
  38129. "type": {
  38130. "type": "string",
  38131. "enum": ["permission.v2.replied"]
  38132. },
  38133. "properties": {
  38134. "type": "object",
  38135. "properties": {
  38136. "sessionID": {
  38137. "type": "string",
  38138. "pattern": "^ses"
  38139. },
  38140. "requestID": {
  38141. "type": "string",
  38142. "pattern": "^per"
  38143. },
  38144. "reply": {
  38145. "$ref": "#/components/schemas/PermissionV2Reply"
  38146. }
  38147. },
  38148. "required": ["sessionID", "requestID", "reply"],
  38149. "additionalProperties": false
  38150. }
  38151. },
  38152. "required": ["id", "type", "properties"],
  38153. "additionalProperties": false
  38154. },
  38155. "EventPluginAdded": {
  38156. "type": "object",
  38157. "properties": {
  38158. "id": {
  38159. "type": "string",
  38160. "pattern": "^evt_"
  38161. },
  38162. "type": {
  38163. "type": "string",
  38164. "enum": ["plugin.added"]
  38165. },
  38166. "properties": {
  38167. "type": "object",
  38168. "properties": {
  38169. "id": {
  38170. "type": "string"
  38171. }
  38172. },
  38173. "required": ["id"],
  38174. "additionalProperties": false
  38175. }
  38176. },
  38177. "required": ["id", "type", "properties"],
  38178. "additionalProperties": false
  38179. },
  38180. "EventProjectDirectoriesUpdated": {
  38181. "type": "object",
  38182. "properties": {
  38183. "id": {
  38184. "type": "string",
  38185. "pattern": "^evt_"
  38186. },
  38187. "type": {
  38188. "type": "string",
  38189. "enum": ["project.directories.updated"]
  38190. },
  38191. "properties": {
  38192. "type": "object",
  38193. "properties": {
  38194. "projectID": {
  38195. "type": "string"
  38196. }
  38197. },
  38198. "required": ["projectID"],
  38199. "additionalProperties": false
  38200. }
  38201. },
  38202. "required": ["id", "type", "properties"],
  38203. "additionalProperties": false
  38204. },
  38205. "EventFileWatcherUpdated": {
  38206. "type": "object",
  38207. "properties": {
  38208. "id": {
  38209. "type": "string",
  38210. "pattern": "^evt_"
  38211. },
  38212. "type": {
  38213. "type": "string",
  38214. "enum": ["file.watcher.updated"]
  38215. },
  38216. "properties": {
  38217. "type": "object",
  38218. "properties": {
  38219. "file": {
  38220. "type": "string"
  38221. },
  38222. "event": {
  38223. "type": "string",
  38224. "enum": ["add", "change", "unlink"]
  38225. }
  38226. },
  38227. "required": ["file", "event"],
  38228. "additionalProperties": false
  38229. }
  38230. },
  38231. "required": ["id", "type", "properties"],
  38232. "additionalProperties": false
  38233. },
  38234. "EventPtyCreated": {
  38235. "type": "object",
  38236. "properties": {
  38237. "id": {
  38238. "type": "string",
  38239. "pattern": "^evt_"
  38240. },
  38241. "type": {
  38242. "type": "string",
  38243. "enum": ["pty.created"]
  38244. },
  38245. "properties": {
  38246. "type": "object",
  38247. "properties": {
  38248. "info": {
  38249. "$ref": "#/components/schemas/Pty"
  38250. }
  38251. },
  38252. "required": ["info"],
  38253. "additionalProperties": false
  38254. }
  38255. },
  38256. "required": ["id", "type", "properties"],
  38257. "additionalProperties": false
  38258. },
  38259. "EventPtyUpdated": {
  38260. "type": "object",
  38261. "properties": {
  38262. "id": {
  38263. "type": "string",
  38264. "pattern": "^evt_"
  38265. },
  38266. "type": {
  38267. "type": "string",
  38268. "enum": ["pty.updated"]
  38269. },
  38270. "properties": {
  38271. "type": "object",
  38272. "properties": {
  38273. "info": {
  38274. "$ref": "#/components/schemas/Pty"
  38275. }
  38276. },
  38277. "required": ["info"],
  38278. "additionalProperties": false
  38279. }
  38280. },
  38281. "required": ["id", "type", "properties"],
  38282. "additionalProperties": false
  38283. },
  38284. "EventPtyExited": {
  38285. "type": "object",
  38286. "properties": {
  38287. "id": {
  38288. "type": "string",
  38289. "pattern": "^evt_"
  38290. },
  38291. "type": {
  38292. "type": "string",
  38293. "enum": ["pty.exited"]
  38294. },
  38295. "properties": {
  38296. "type": "object",
  38297. "properties": {
  38298. "id": {
  38299. "type": "string",
  38300. "pattern": "^pty"
  38301. },
  38302. "exitCode": {
  38303. "type": "integer",
  38304. "minimum": 0
  38305. }
  38306. },
  38307. "required": ["id", "exitCode"],
  38308. "additionalProperties": false
  38309. }
  38310. },
  38311. "required": ["id", "type", "properties"],
  38312. "additionalProperties": false
  38313. },
  38314. "EventPtyDeleted": {
  38315. "type": "object",
  38316. "properties": {
  38317. "id": {
  38318. "type": "string",
  38319. "pattern": "^evt_"
  38320. },
  38321. "type": {
  38322. "type": "string",
  38323. "enum": ["pty.deleted"]
  38324. },
  38325. "properties": {
  38326. "type": "object",
  38327. "properties": {
  38328. "id": {
  38329. "type": "string",
  38330. "pattern": "^pty"
  38331. }
  38332. },
  38333. "required": ["id"],
  38334. "additionalProperties": false
  38335. }
  38336. },
  38337. "required": ["id", "type", "properties"],
  38338. "additionalProperties": false
  38339. },
  38340. "EventQuestionV2Asked": {
  38341. "type": "object",
  38342. "properties": {
  38343. "id": {
  38344. "type": "string",
  38345. "pattern": "^evt_"
  38346. },
  38347. "type": {
  38348. "type": "string",
  38349. "enum": ["question.v2.asked"]
  38350. },
  38351. "properties": {
  38352. "type": "object",
  38353. "properties": {
  38354. "id": {
  38355. "type": "string",
  38356. "pattern": "^que"
  38357. },
  38358. "sessionID": {
  38359. "type": "string",
  38360. "pattern": "^ses"
  38361. },
  38362. "questions": {
  38363. "type": "array",
  38364. "items": {
  38365. "$ref": "#/components/schemas/QuestionV2Info"
  38366. },
  38367. "description": "Questions to ask"
  38368. },
  38369. "tool": {
  38370. "$ref": "#/components/schemas/QuestionV2Tool"
  38371. }
  38372. },
  38373. "required": ["id", "sessionID", "questions"],
  38374. "additionalProperties": false
  38375. }
  38376. },
  38377. "required": ["id", "type", "properties"],
  38378. "additionalProperties": false
  38379. },
  38380. "EventQuestionV2Replied": {
  38381. "type": "object",
  38382. "properties": {
  38383. "id": {
  38384. "type": "string",
  38385. "pattern": "^evt_"
  38386. },
  38387. "type": {
  38388. "type": "string",
  38389. "enum": ["question.v2.replied"]
  38390. },
  38391. "properties": {
  38392. "type": "object",
  38393. "properties": {
  38394. "sessionID": {
  38395. "type": "string",
  38396. "pattern": "^ses"
  38397. },
  38398. "requestID": {
  38399. "type": "string",
  38400. "pattern": "^que"
  38401. },
  38402. "answers": {
  38403. "type": "array",
  38404. "items": {
  38405. "$ref": "#/components/schemas/QuestionV2Answer"
  38406. }
  38407. }
  38408. },
  38409. "required": ["sessionID", "requestID", "answers"],
  38410. "additionalProperties": false
  38411. }
  38412. },
  38413. "required": ["id", "type", "properties"],
  38414. "additionalProperties": false
  38415. },
  38416. "EventQuestionV2Rejected": {
  38417. "type": "object",
  38418. "properties": {
  38419. "id": {
  38420. "type": "string",
  38421. "pattern": "^evt_"
  38422. },
  38423. "type": {
  38424. "type": "string",
  38425. "enum": ["question.v2.rejected"]
  38426. },
  38427. "properties": {
  38428. "type": "object",
  38429. "properties": {
  38430. "sessionID": {
  38431. "type": "string",
  38432. "pattern": "^ses"
  38433. },
  38434. "requestID": {
  38435. "type": "string",
  38436. "pattern": "^que"
  38437. }
  38438. },
  38439. "required": ["sessionID", "requestID"],
  38440. "additionalProperties": false
  38441. }
  38442. },
  38443. "required": ["id", "type", "properties"],
  38444. "additionalProperties": false
  38445. },
  38446. "EventTodoUpdated": {
  38447. "type": "object",
  38448. "properties": {
  38449. "id": {
  38450. "type": "string",
  38451. "pattern": "^evt_"
  38452. },
  38453. "type": {
  38454. "type": "string",
  38455. "enum": ["todo.updated"]
  38456. },
  38457. "properties": {
  38458. "type": "object",
  38459. "properties": {
  38460. "sessionID": {
  38461. "type": "string",
  38462. "pattern": "^ses"
  38463. },
  38464. "todos": {
  38465. "type": "array",
  38466. "items": {
  38467. "$ref": "#/components/schemas/Todo"
  38468. }
  38469. }
  38470. },
  38471. "required": ["sessionID", "todos"],
  38472. "additionalProperties": false
  38473. }
  38474. },
  38475. "required": ["id", "type", "properties"],
  38476. "additionalProperties": false
  38477. },
  38478. "EventLspUpdated": {
  38479. "type": "object",
  38480. "properties": {
  38481. "id": {
  38482. "type": "string",
  38483. "pattern": "^evt_"
  38484. },
  38485. "type": {
  38486. "type": "string",
  38487. "enum": ["lsp.updated"]
  38488. },
  38489. "properties": {
  38490. "type": "object",
  38491. "properties": {}
  38492. }
  38493. },
  38494. "required": ["id", "type", "properties"],
  38495. "additionalProperties": false
  38496. },
  38497. "EventPermissionAsked": {
  38498. "type": "object",
  38499. "properties": {
  38500. "id": {
  38501. "type": "string",
  38502. "pattern": "^evt_"
  38503. },
  38504. "type": {
  38505. "type": "string",
  38506. "enum": ["permission.asked"]
  38507. },
  38508. "properties": {
  38509. "type": "object",
  38510. "properties": {
  38511. "id": {
  38512. "type": "string",
  38513. "pattern": "^per"
  38514. },
  38515. "sessionID": {
  38516. "type": "string",
  38517. "pattern": "^ses"
  38518. },
  38519. "permission": {
  38520. "type": "string"
  38521. },
  38522. "patterns": {
  38523. "type": "array",
  38524. "items": {
  38525. "type": "string"
  38526. }
  38527. },
  38528. "metadata": {
  38529. "type": "object"
  38530. },
  38531. "always": {
  38532. "type": "array",
  38533. "items": {
  38534. "type": "string"
  38535. }
  38536. },
  38537. "tool": {
  38538. "type": "object",
  38539. "properties": {
  38540. "messageID": {
  38541. "type": "string"
  38542. },
  38543. "callID": {
  38544. "type": "string"
  38545. }
  38546. },
  38547. "required": ["messageID", "callID"],
  38548. "additionalProperties": false
  38549. }
  38550. },
  38551. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  38552. "additionalProperties": false
  38553. }
  38554. },
  38555. "required": ["id", "type", "properties"],
  38556. "additionalProperties": false
  38557. },
  38558. "EventPermissionReplied": {
  38559. "type": "object",
  38560. "properties": {
  38561. "id": {
  38562. "type": "string",
  38563. "pattern": "^evt_"
  38564. },
  38565. "type": {
  38566. "type": "string",
  38567. "enum": ["permission.replied"]
  38568. },
  38569. "properties": {
  38570. "type": "object",
  38571. "properties": {
  38572. "sessionID": {
  38573. "type": "string",
  38574. "pattern": "^ses"
  38575. },
  38576. "requestID": {
  38577. "type": "string",
  38578. "pattern": "^per"
  38579. },
  38580. "reply": {
  38581. "type": "string",
  38582. "enum": ["once", "always", "reject"]
  38583. }
  38584. },
  38585. "required": ["sessionID", "requestID", "reply"],
  38586. "additionalProperties": false
  38587. }
  38588. },
  38589. "required": ["id", "type", "properties"],
  38590. "additionalProperties": false
  38591. },
  38592. "EventMcpToolsChanged": {
  38593. "type": "object",
  38594. "properties": {
  38595. "id": {
  38596. "type": "string",
  38597. "pattern": "^evt_"
  38598. },
  38599. "type": {
  38600. "type": "string",
  38601. "enum": ["mcp.tools.changed"]
  38602. },
  38603. "properties": {
  38604. "type": "object",
  38605. "properties": {
  38606. "server": {
  38607. "type": "string"
  38608. }
  38609. },
  38610. "required": ["server"],
  38611. "additionalProperties": false
  38612. }
  38613. },
  38614. "required": ["id", "type", "properties"],
  38615. "additionalProperties": false
  38616. },
  38617. "EventMcpBrowserOpenFailed": {
  38618. "type": "object",
  38619. "properties": {
  38620. "id": {
  38621. "type": "string",
  38622. "pattern": "^evt_"
  38623. },
  38624. "type": {
  38625. "type": "string",
  38626. "enum": ["mcp.browser.open.failed"]
  38627. },
  38628. "properties": {
  38629. "type": "object",
  38630. "properties": {
  38631. "mcpName": {
  38632. "type": "string"
  38633. },
  38634. "url": {
  38635. "type": "string"
  38636. }
  38637. },
  38638. "required": ["mcpName", "url"],
  38639. "additionalProperties": false
  38640. }
  38641. },
  38642. "required": ["id", "type", "properties"],
  38643. "additionalProperties": false
  38644. },
  38645. "EventCommandExecuted": {
  38646. "type": "object",
  38647. "properties": {
  38648. "id": {
  38649. "type": "string",
  38650. "pattern": "^evt_"
  38651. },
  38652. "type": {
  38653. "type": "string",
  38654. "enum": ["command.executed"]
  38655. },
  38656. "properties": {
  38657. "type": "object",
  38658. "properties": {
  38659. "name": {
  38660. "type": "string"
  38661. },
  38662. "sessionID": {
  38663. "type": "string",
  38664. "pattern": "^ses"
  38665. },
  38666. "arguments": {
  38667. "type": "string"
  38668. },
  38669. "messageID": {
  38670. "type": "string",
  38671. "pattern": "^msg"
  38672. }
  38673. },
  38674. "required": ["name", "sessionID", "arguments", "messageID"],
  38675. "additionalProperties": false
  38676. }
  38677. },
  38678. "required": ["id", "type", "properties"],
  38679. "additionalProperties": false
  38680. },
  38681. "EventProjectUpdated": {
  38682. "type": "object",
  38683. "properties": {
  38684. "id": {
  38685. "type": "string",
  38686. "pattern": "^evt_"
  38687. },
  38688. "type": {
  38689. "type": "string",
  38690. "enum": ["project.updated"]
  38691. },
  38692. "properties": {
  38693. "type": "object",
  38694. "properties": {
  38695. "id": {
  38696. "type": "string"
  38697. },
  38698. "worktree": {
  38699. "type": "string"
  38700. },
  38701. "vcs": {
  38702. "$ref": "#/components/schemas/ProjectVcs"
  38703. },
  38704. "name": {
  38705. "type": "string"
  38706. },
  38707. "icon": {
  38708. "$ref": "#/components/schemas/ProjectIcon"
  38709. },
  38710. "commands": {
  38711. "$ref": "#/components/schemas/ProjectCommands"
  38712. },
  38713. "time": {
  38714. "$ref": "#/components/schemas/ProjectTime"
  38715. },
  38716. "sandboxes": {
  38717. "type": "array",
  38718. "items": {
  38719. "type": "string"
  38720. }
  38721. }
  38722. },
  38723. "required": ["id", "worktree", "time", "sandboxes"],
  38724. "additionalProperties": false
  38725. }
  38726. },
  38727. "required": ["id", "type", "properties"],
  38728. "additionalProperties": false
  38729. },
  38730. "EventSessionStatus": {
  38731. "type": "object",
  38732. "properties": {
  38733. "id": {
  38734. "type": "string",
  38735. "pattern": "^evt_"
  38736. },
  38737. "type": {
  38738. "type": "string",
  38739. "enum": ["session.status"]
  38740. },
  38741. "properties": {
  38742. "type": "object",
  38743. "properties": {
  38744. "sessionID": {
  38745. "type": "string",
  38746. "pattern": "^ses"
  38747. },
  38748. "status": {
  38749. "$ref": "#/components/schemas/SessionStatus"
  38750. }
  38751. },
  38752. "required": ["sessionID", "status"],
  38753. "additionalProperties": false
  38754. }
  38755. },
  38756. "required": ["id", "type", "properties"],
  38757. "additionalProperties": false
  38758. },
  38759. "EventSessionIdle": {
  38760. "type": "object",
  38761. "properties": {
  38762. "id": {
  38763. "type": "string",
  38764. "pattern": "^evt_"
  38765. },
  38766. "type": {
  38767. "type": "string",
  38768. "enum": ["session.idle"]
  38769. },
  38770. "properties": {
  38771. "type": "object",
  38772. "properties": {
  38773. "sessionID": {
  38774. "type": "string",
  38775. "pattern": "^ses"
  38776. }
  38777. },
  38778. "required": ["sessionID"],
  38779. "additionalProperties": false
  38780. }
  38781. },
  38782. "required": ["id", "type", "properties"],
  38783. "additionalProperties": false
  38784. },
  38785. "EventQuestionAsked": {
  38786. "type": "object",
  38787. "properties": {
  38788. "id": {
  38789. "type": "string",
  38790. "pattern": "^evt_"
  38791. },
  38792. "type": {
  38793. "type": "string",
  38794. "enum": ["question.asked"]
  38795. },
  38796. "properties": {
  38797. "type": "object",
  38798. "properties": {
  38799. "id": {
  38800. "type": "string",
  38801. "pattern": "^que"
  38802. },
  38803. "sessionID": {
  38804. "type": "string",
  38805. "pattern": "^ses"
  38806. },
  38807. "questions": {
  38808. "type": "array",
  38809. "items": {
  38810. "$ref": "#/components/schemas/QuestionInfo"
  38811. },
  38812. "description": "Questions to ask"
  38813. },
  38814. "tool": {
  38815. "$ref": "#/components/schemas/QuestionTool"
  38816. }
  38817. },
  38818. "required": ["id", "sessionID", "questions"],
  38819. "additionalProperties": false
  38820. }
  38821. },
  38822. "required": ["id", "type", "properties"],
  38823. "additionalProperties": false
  38824. },
  38825. "EventQuestionReplied": {
  38826. "type": "object",
  38827. "properties": {
  38828. "id": {
  38829. "type": "string",
  38830. "pattern": "^evt_"
  38831. },
  38832. "type": {
  38833. "type": "string",
  38834. "enum": ["question.replied"]
  38835. },
  38836. "properties": {
  38837. "type": "object",
  38838. "properties": {
  38839. "sessionID": {
  38840. "type": "string",
  38841. "pattern": "^ses"
  38842. },
  38843. "requestID": {
  38844. "type": "string",
  38845. "pattern": "^que"
  38846. },
  38847. "answers": {
  38848. "type": "array",
  38849. "items": {
  38850. "$ref": "#/components/schemas/QuestionAnswer"
  38851. }
  38852. }
  38853. },
  38854. "required": ["sessionID", "requestID", "answers"],
  38855. "additionalProperties": false
  38856. }
  38857. },
  38858. "required": ["id", "type", "properties"],
  38859. "additionalProperties": false
  38860. },
  38861. "EventQuestionRejected": {
  38862. "type": "object",
  38863. "properties": {
  38864. "id": {
  38865. "type": "string",
  38866. "pattern": "^evt_"
  38867. },
  38868. "type": {
  38869. "type": "string",
  38870. "enum": ["question.rejected"]
  38871. },
  38872. "properties": {
  38873. "type": "object",
  38874. "properties": {
  38875. "sessionID": {
  38876. "type": "string",
  38877. "pattern": "^ses"
  38878. },
  38879. "requestID": {
  38880. "type": "string",
  38881. "pattern": "^que"
  38882. }
  38883. },
  38884. "required": ["sessionID", "requestID"],
  38885. "additionalProperties": false
  38886. }
  38887. },
  38888. "required": ["id", "type", "properties"],
  38889. "additionalProperties": false
  38890. },
  38891. "EventSessionCompacted": {
  38892. "type": "object",
  38893. "properties": {
  38894. "id": {
  38895. "type": "string",
  38896. "pattern": "^evt_"
  38897. },
  38898. "type": {
  38899. "type": "string",
  38900. "enum": ["session.compacted"]
  38901. },
  38902. "properties": {
  38903. "type": "object",
  38904. "properties": {
  38905. "sessionID": {
  38906. "type": "string",
  38907. "pattern": "^ses"
  38908. }
  38909. },
  38910. "required": ["sessionID"],
  38911. "additionalProperties": false
  38912. }
  38913. },
  38914. "required": ["id", "type", "properties"],
  38915. "additionalProperties": false
  38916. },
  38917. "EventVcsBranchUpdated": {
  38918. "type": "object",
  38919. "properties": {
  38920. "id": {
  38921. "type": "string",
  38922. "pattern": "^evt_"
  38923. },
  38924. "type": {
  38925. "type": "string",
  38926. "enum": ["vcs.branch.updated"]
  38927. },
  38928. "properties": {
  38929. "type": "object",
  38930. "properties": {
  38931. "branch": {
  38932. "type": "string"
  38933. }
  38934. },
  38935. "additionalProperties": false
  38936. }
  38937. },
  38938. "required": ["id", "type", "properties"],
  38939. "additionalProperties": false
  38940. },
  38941. "EventWorkspaceReady": {
  38942. "type": "object",
  38943. "properties": {
  38944. "id": {
  38945. "type": "string",
  38946. "pattern": "^evt_"
  38947. },
  38948. "type": {
  38949. "type": "string",
  38950. "enum": ["workspace.ready"]
  38951. },
  38952. "properties": {
  38953. "type": "object",
  38954. "properties": {
  38955. "name": {
  38956. "type": "string"
  38957. }
  38958. },
  38959. "required": ["name"],
  38960. "additionalProperties": false
  38961. }
  38962. },
  38963. "required": ["id", "type", "properties"],
  38964. "additionalProperties": false
  38965. },
  38966. "EventWorkspaceFailed": {
  38967. "type": "object",
  38968. "properties": {
  38969. "id": {
  38970. "type": "string",
  38971. "pattern": "^evt_"
  38972. },
  38973. "type": {
  38974. "type": "string",
  38975. "enum": ["workspace.failed"]
  38976. },
  38977. "properties": {
  38978. "type": "object",
  38979. "properties": {
  38980. "message": {
  38981. "type": "string"
  38982. }
  38983. },
  38984. "required": ["message"],
  38985. "additionalProperties": false
  38986. }
  38987. },
  38988. "required": ["id", "type", "properties"],
  38989. "additionalProperties": false
  38990. },
  38991. "EventWorkspaceStatus": {
  38992. "type": "object",
  38993. "properties": {
  38994. "id": {
  38995. "type": "string",
  38996. "pattern": "^evt_"
  38997. },
  38998. "type": {
  38999. "type": "string",
  39000. "enum": ["workspace.status"]
  39001. },
  39002. "properties": {
  39003. "type": "object",
  39004. "properties": {
  39005. "workspaceID": {
  39006. "type": "string",
  39007. "pattern": "^wrk"
  39008. },
  39009. "status": {
  39010. "type": "string",
  39011. "enum": ["connected", "connecting", "disconnected", "error"]
  39012. }
  39013. },
  39014. "required": ["workspaceID", "status"],
  39015. "additionalProperties": false
  39016. }
  39017. },
  39018. "required": ["id", "type", "properties"],
  39019. "additionalProperties": false
  39020. },
  39021. "EventWorktreeReady": {
  39022. "type": "object",
  39023. "properties": {
  39024. "id": {
  39025. "type": "string",
  39026. "pattern": "^evt_"
  39027. },
  39028. "type": {
  39029. "type": "string",
  39030. "enum": ["worktree.ready"]
  39031. },
  39032. "properties": {
  39033. "type": "object",
  39034. "properties": {
  39035. "name": {
  39036. "type": "string"
  39037. },
  39038. "branch": {
  39039. "type": "string"
  39040. }
  39041. },
  39042. "required": ["name"],
  39043. "additionalProperties": false
  39044. }
  39045. },
  39046. "required": ["id", "type", "properties"],
  39047. "additionalProperties": false
  39048. },
  39049. "EventWorktreeFailed": {
  39050. "type": "object",
  39051. "properties": {
  39052. "id": {
  39053. "type": "string",
  39054. "pattern": "^evt_"
  39055. },
  39056. "type": {
  39057. "type": "string",
  39058. "enum": ["worktree.failed"]
  39059. },
  39060. "properties": {
  39061. "type": "object",
  39062. "properties": {
  39063. "message": {
  39064. "type": "string"
  39065. }
  39066. },
  39067. "required": ["message"],
  39068. "additionalProperties": false
  39069. }
  39070. },
  39071. "required": ["id", "type", "properties"],
  39072. "additionalProperties": false
  39073. },
  39074. "EventServerConnected": {
  39075. "type": "object",
  39076. "properties": {
  39077. "id": {
  39078. "type": "string",
  39079. "pattern": "^evt_"
  39080. },
  39081. "type": {
  39082. "type": "string",
  39083. "enum": ["server.connected"]
  39084. },
  39085. "properties": {
  39086. "type": "object",
  39087. "properties": {}
  39088. }
  39089. },
  39090. "required": ["id", "type", "properties"],
  39091. "additionalProperties": false
  39092. },
  39093. "EventGlobalDisposed": {
  39094. "type": "object",
  39095. "properties": {
  39096. "id": {
  39097. "type": "string",
  39098. "pattern": "^evt_"
  39099. },
  39100. "type": {
  39101. "type": "string",
  39102. "enum": ["global.disposed"]
  39103. },
  39104. "properties": {
  39105. "type": "object",
  39106. "properties": {}
  39107. }
  39108. },
  39109. "required": ["id", "type", "properties"],
  39110. "additionalProperties": false
  39111. },
  39112. "CredentialOAuth": {
  39113. "type": "object",
  39114. "properties": {
  39115. "type": {
  39116. "type": "string",
  39117. "enum": ["oauth"]
  39118. },
  39119. "methodID": {
  39120. "type": "string"
  39121. },
  39122. "refresh": {
  39123. "type": "string"
  39124. },
  39125. "access": {
  39126. "type": "string"
  39127. },
  39128. "expires": {
  39129. "type": "integer",
  39130. "minimum": 0
  39131. },
  39132. "metadata": {
  39133. "type": "object"
  39134. }
  39135. },
  39136. "required": ["type", "methodID", "refresh", "access", "expires"],
  39137. "additionalProperties": false
  39138. },
  39139. "CredentialKey": {
  39140. "type": "object",
  39141. "properties": {
  39142. "type": {
  39143. "type": "string",
  39144. "enum": ["key"]
  39145. },
  39146. "key": {
  39147. "type": "string"
  39148. },
  39149. "metadata": {
  39150. "type": "object"
  39151. }
  39152. },
  39153. "required": ["type", "key"],
  39154. "additionalProperties": false
  39155. },
  39156. "SkillV2DirectorySource": {
  39157. "type": "object",
  39158. "properties": {
  39159. "type": {
  39160. "type": "string",
  39161. "enum": ["directory"]
  39162. },
  39163. "path": {
  39164. "type": "string"
  39165. }
  39166. },
  39167. "required": ["type", "path"],
  39168. "additionalProperties": false
  39169. },
  39170. "SkillV2UrlSource": {
  39171. "type": "object",
  39172. "properties": {
  39173. "type": {
  39174. "type": "string",
  39175. "enum": ["url"]
  39176. },
  39177. "url": {
  39178. "type": "string"
  39179. }
  39180. },
  39181. "required": ["type", "url"],
  39182. "additionalProperties": false
  39183. },
  39184. "SkillV2EmbeddedSource": {
  39185. "type": "object",
  39186. "properties": {
  39187. "type": {
  39188. "type": "string",
  39189. "enum": ["embedded"]
  39190. },
  39191. "skill": {
  39192. "$ref": "#/components/schemas/SkillV2Info"
  39193. }
  39194. },
  39195. "required": ["type", "skill"],
  39196. "additionalProperties": false
  39197. },
  39198. "BadRequestError": {
  39199. "type": "object",
  39200. "required": ["name", "data"],
  39201. "properties": {
  39202. "name": {
  39203. "type": "string",
  39204. "enum": ["BadRequest"]
  39205. },
  39206. "data": {
  39207. "type": "object",
  39208. "required": ["message"],
  39209. "properties": {
  39210. "message": {
  39211. "type": "string"
  39212. },
  39213. "kind": {
  39214. "type": "string",
  39215. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  39216. }
  39217. }
  39218. }
  39219. }
  39220. }
  39221. }
  39222. },
  39223. "security": [],
  39224. "tags": [
  39225. {
  39226. "name": "control",
  39227. "description": "Control plane routes."
  39228. },
  39229. {
  39230. "name": "controlPlane",
  39231. "description": "Control-plane orchestration routes."
  39232. },
  39233. {
  39234. "name": "global",
  39235. "description": "Global server routes."
  39236. },
  39237. {
  39238. "name": "event",
  39239. "description": "Instance event stream route."
  39240. },
  39241. {
  39242. "name": "config",
  39243. "description": "Experimental HttpApi config routes."
  39244. },
  39245. {
  39246. "name": "experimental",
  39247. "description": "Experimental HttpApi read-only routes."
  39248. },
  39249. {
  39250. "name": "file",
  39251. "description": "Experimental HttpApi file routes."
  39252. },
  39253. {
  39254. "name": "instance",
  39255. "description": "Experimental HttpApi instance read routes."
  39256. },
  39257. {
  39258. "name": "mcp",
  39259. "description": "Experimental HttpApi MCP routes."
  39260. },
  39261. {
  39262. "name": "project",
  39263. "description": "Experimental HttpApi project routes."
  39264. },
  39265. {
  39266. "name": "projectCopy",
  39267. "description": "Project copy naming routes."
  39268. },
  39269. {
  39270. "name": "pty",
  39271. "description": "Experimental HttpApi PTY routes."
  39272. },
  39273. {
  39274. "name": "question",
  39275. "description": "Question routes."
  39276. },
  39277. {
  39278. "name": "permission",
  39279. "description": "Experimental HttpApi permission routes."
  39280. },
  39281. {
  39282. "name": "provider",
  39283. "description": "Experimental HttpApi provider routes."
  39284. },
  39285. {
  39286. "name": "session",
  39287. "description": "Experimental HttpApi session routes."
  39288. },
  39289. {
  39290. "name": "sync",
  39291. "description": "Experimental HttpApi sync routes."
  39292. },
  39293. {
  39294. "name": "tui",
  39295. "description": "Experimental HttpApi TUI routes."
  39296. },
  39297. {
  39298. "name": "workspace",
  39299. "description": "Experimental HttpApi workspace routes."
  39300. },
  39301. {
  39302. "name": "opencode HttpApi",
  39303. "description": "Experimental HttpApi surface for selected instance routes."
  39304. },
  39305. {
  39306. "name": "opencode HttpApi",
  39307. "description": "Experimental HttpApi surface for selected instance routes."
  39308. },
  39309. {
  39310. "name": "opencode HttpApi",
  39311. "description": "Experimental HttpApi surface for selected instance routes."
  39312. },
  39313. {
  39314. "name": "sessions",
  39315. "description": "Experimental session routes."
  39316. },
  39317. {
  39318. "name": "messages",
  39319. "description": "Experimental message routes."
  39320. },
  39321. {
  39322. "name": "models",
  39323. "description": "Experimental model routes."
  39324. },
  39325. {
  39326. "name": "providers",
  39327. "description": "Experimental provider routes."
  39328. },
  39329. {
  39330. "name": "integrations",
  39331. "description": "Integration discovery and authentication routes."
  39332. },
  39333. {
  39334. "name": "opencode HttpApi",
  39335. "description": "Experimental HttpApi surface for selected instance routes."
  39336. },
  39337. {
  39338. "name": "permissions",
  39339. "description": "Experimental permission routes."
  39340. },
  39341. {
  39342. "name": "filesystem",
  39343. "description": "Experimental location-scoped filesystem routes."
  39344. },
  39345. {
  39346. "name": "commands",
  39347. "description": "Experimental command routes."
  39348. },
  39349. {
  39350. "name": "skills",
  39351. "description": "Experimental skill routes."
  39352. },
  39353. {
  39354. "name": "events",
  39355. "description": "Experimental event stream route."
  39356. },
  39357. {
  39358. "name": "pty",
  39359. "description": "Experimental location-scoped PTY routes."
  39360. },
  39361. {
  39362. "name": "session questions",
  39363. "description": "Experimental session question routes."
  39364. },
  39365. {
  39366. "name": "reference",
  39367. "description": "Location-scoped project references."
  39368. },
  39369. {
  39370. "name": "projectCopy",
  39371. "description": "Project copy management routes."
  39372. },
  39373. {
  39374. "name": "pty",
  39375. "description": "PTY websocket route."
  39376. }
  39377. ]
  39378. }