openapi.json 1.1 MB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132251332513425135251362513725138251392514025141251422514325144251452514625147251482514925150251512515225153251542515525156251572515825159251602516125162251632516425165251662516725168251692517025171251722517325174251752517625177251782517925180251812518225183251842518525186251872518825189251902519125192251932519425195251962519725198251992520025201252022520325204252052520625207252082520925210252112521225213252142521525216252172521825219252202522125222252232522425225252262522725228252292523025231252322523325234252352523625237252382523925240252412524225243252442524525246252472524825249252502525125252252532525425255252562525725258252592526025261252622526325264252652526625267252682526925270252712527225273252742527525276252772527825279252802528125282252832528425285252862528725288252892529025291252922529325294252952529625297252982529925300253012530225303253042530525306253072530825309253102531125312253132531425315253162531725318253192532025321253222532325324253252532625327253282532925330253312533225333253342533525336253372533825339253402534125342253432534425345253462534725348253492535025351253522535325354253552535625357253582535925360253612536225363253642536525366253672536825369253702537125372253732537425375253762537725378253792538025381253822538325384253852538625387253882538925390253912539225393253942539525396253972539825399254002540125402254032540425405254062540725408254092541025411254122541325414254152541625417254182541925420254212542225423254242542525426254272542825429254302543125432254332543425435254362543725438254392544025441254422544325444254452544625447254482544925450254512545225453254542545525456254572545825459254602546125462254632546425465254662546725468254692547025471254722547325474254752547625477254782547925480254812548225483254842548525486254872548825489254902549125492254932549425495254962549725498254992550025501255022550325504255052550625507255082550925510255112551225513255142551525516255172551825519255202552125522255232552425525255262552725528255292553025531255322553325534255352553625537255382553925540255412554225543255442554525546255472554825549255502555125552255532555425555255562555725558255592556025561255622556325564255652556625567255682556925570255712557225573255742557525576255772557825579255802558125582255832558425585255862558725588255892559025591255922559325594255952559625597255982559925600256012560225603256042560525606256072560825609256102561125612256132561425615256162561725618256192562025621256222562325624256252562625627256282562925630256312563225633256342563525636256372563825639256402564125642256432564425645256462564725648256492565025651256522565325654256552565625657256582565925660256612566225663256642566525666256672566825669256702567125672256732567425675256762567725678256792568025681256822568325684256852568625687256882568925690256912569225693256942569525696256972569825699257002570125702257032570425705257062570725708257092571025711257122571325714257152571625717257182571925720257212572225723257242572525726257272572825729257302573125732257332573425735257362573725738257392574025741257422574325744257452574625747257482574925750257512575225753257542575525756257572575825759257602576125762257632576425765257662576725768257692577025771257722577325774257752577625777257782577925780257812578225783257842578525786257872578825789257902579125792257932579425795257962579725798257992580025801258022580325804258052580625807258082580925810258112581225813258142581525816258172581825819258202582125822258232582425825258262582725828258292583025831258322583325834258352583625837258382583925840258412584225843258442584525846258472584825849258502585125852258532585425855258562585725858258592586025861258622586325864258652586625867258682586925870258712587225873258742587525876258772587825879258802588125882258832588425885258862588725888258892589025891258922589325894258952589625897258982589925900259012590225903259042590525906259072590825909259102591125912259132591425915259162591725918259192592025921259222592325924259252592625927259282592925930259312593225933259342593525936259372593825939259402594125942259432594425945259462594725948259492595025951259522595325954259552595625957259582595925960259612596225963259642596525966259672596825969259702597125972259732597425975259762597725978259792598025981259822598325984259852598625987259882598925990259912599225993259942599525996259972599825999260002600126002260032600426005260062600726008260092601026011260122601326014260152601626017260182601926020260212602226023260242602526026260272602826029260302603126032260332603426035260362603726038260392604026041260422604326044260452604626047260482604926050260512605226053260542605526056260572605826059260602606126062260632606426065260662606726068260692607026071260722607326074260752607626077260782607926080260812608226083260842608526086260872608826089260902609126092260932609426095260962609726098260992610026101261022610326104261052610626107261082610926110261112611226113261142611526116261172611826119261202612126122261232612426125261262612726128261292613026131261322613326134261352613626137261382613926140261412614226143261442614526146261472614826149261502615126152261532615426155261562615726158261592616026161261622616326164261652616626167261682616926170261712617226173261742617526176261772617826179261802618126182261832618426185261862618726188261892619026191261922619326194261952619626197261982619926200262012620226203262042620526206262072620826209262102621126212262132621426215262162621726218262192622026221262222622326224262252622626227262282622926230262312623226233262342623526236262372623826239262402624126242262432624426245262462624726248262492625026251262522625326254262552625626257262582625926260262612626226263262642626526266262672626826269262702627126272262732627426275262762627726278262792628026281262822628326284262852628626287262882628926290262912629226293262942629526296262972629826299263002630126302263032630426305263062630726308263092631026311263122631326314263152631626317263182631926320263212632226323263242632526326263272632826329263302633126332263332633426335263362633726338263392634026341263422634326344263452634626347263482634926350263512635226353263542635526356263572635826359263602636126362263632636426365263662636726368263692637026371263722637326374263752637626377263782637926380263812638226383263842638526386263872638826389263902639126392263932639426395263962639726398263992640026401264022640326404264052640626407264082640926410264112641226413264142641526416264172641826419264202642126422264232642426425264262642726428264292643026431264322643326434264352643626437264382643926440264412644226443264442644526446264472644826449264502645126452264532645426455264562645726458264592646026461264622646326464264652646626467264682646926470264712647226473264742647526476264772647826479264802648126482264832648426485264862648726488264892649026491264922649326494264952649626497264982649926500265012650226503265042650526506265072650826509265102651126512265132651426515265162651726518265192652026521265222652326524265252652626527265282652926530265312653226533265342653526536265372653826539265402654126542265432654426545265462654726548265492655026551265522655326554265552655626557265582655926560265612656226563265642656526566265672656826569265702657126572265732657426575265762657726578265792658026581265822658326584265852658626587265882658926590265912659226593265942659526596265972659826599266002660126602266032660426605266062660726608266092661026611266122661326614266152661626617266182661926620266212662226623266242662526626266272662826629266302663126632266332663426635266362663726638266392664026641266422664326644266452664626647266482664926650266512665226653266542665526656266572665826659266602666126662266632666426665266662666726668266692667026671266722667326674266752667626677266782667926680266812668226683266842668526686266872668826689266902669126692266932669426695266962669726698266992670026701267022670326704267052670626707267082670926710267112671226713267142671526716267172671826719267202672126722267232672426725267262672726728267292673026731267322673326734267352673626737267382673926740267412674226743267442674526746267472674826749267502675126752267532675426755267562675726758267592676026761267622676326764267652676626767267682676926770267712677226773267742677526776267772677826779267802678126782267832678426785267862678726788267892679026791267922679326794267952679626797267982679926800268012680226803268042680526806268072680826809268102681126812268132681426815268162681726818268192682026821268222682326824268252682626827268282682926830268312683226833268342683526836268372683826839268402684126842268432684426845268462684726848268492685026851268522685326854268552685626857268582685926860268612686226863268642686526866268672686826869268702687126872268732687426875268762687726878268792688026881268822688326884268852688626887268882688926890268912689226893268942689526896268972689826899269002690126902269032690426905269062690726908269092691026911269122691326914269152691626917269182691926920269212692226923269242692526926269272692826929269302693126932269332693426935269362693726938269392694026941269422694326944269452694626947269482694926950269512695226953269542695526956269572695826959269602696126962269632696426965269662696726968269692697026971269722697326974269752697626977269782697926980269812698226983269842698526986269872698826989269902699126992269932699426995269962699726998269992700027001270022700327004270052700627007270082700927010270112701227013270142701527016270172701827019270202702127022270232702427025270262702727028270292703027031270322703327034270352703627037270382703927040270412704227043270442704527046270472704827049270502705127052270532705427055270562705727058270592706027061270622706327064270652706627067270682706927070270712707227073270742707527076270772707827079270802708127082270832708427085270862708727088270892709027091270922709327094270952709627097270982709927100271012710227103271042710527106271072710827109271102711127112271132711427115271162711727118271192712027121271222712327124271252712627127271282712927130271312713227133271342713527136271372713827139271402714127142271432714427145271462714727148271492715027151271522715327154271552715627157271582715927160271612716227163271642716527166271672716827169271702717127172271732717427175271762717727178271792718027181271822718327184271852718627187271882718927190271912719227193271942719527196271972719827199272002720127202272032720427205272062720727208272092721027211272122721327214272152721627217272182721927220272212722227223272242722527226272272722827229272302723127232272332723427235272362723727238272392724027241272422724327244272452724627247272482724927250272512725227253272542725527256272572725827259272602726127262272632726427265272662726727268272692727027271272722727327274272752727627277272782727927280272812728227283272842728527286272872728827289272902729127292272932729427295272962729727298272992730027301273022730327304273052730627307273082730927310273112731227313273142731527316273172731827319273202732127322273232732427325273262732727328273292733027331273322733327334273352733627337273382733927340273412734227343273442734527346273472734827349273502735127352273532735427355273562735727358273592736027361273622736327364273652736627367273682736927370273712737227373273742737527376273772737827379273802738127382273832738427385273862738727388273892739027391273922739327394273952739627397273982739927400274012740227403274042740527406274072740827409274102741127412274132741427415274162741727418274192742027421274222742327424274252742627427274282742927430274312743227433274342743527436274372743827439274402744127442274432744427445274462744727448274492745027451274522745327454274552745627457274582745927460274612746227463274642746527466274672746827469274702747127472274732747427475274762747727478274792748027481274822748327484274852748627487274882748927490274912749227493274942749527496274972749827499275002750127502275032750427505275062750727508275092751027511275122751327514275152751627517275182751927520275212752227523275242752527526275272752827529275302753127532275332753427535275362753727538275392754027541275422754327544275452754627547275482754927550275512755227553275542755527556275572755827559275602756127562275632756427565275662756727568275692757027571275722757327574275752757627577275782757927580275812758227583275842758527586275872758827589275902759127592275932759427595275962759727598275992760027601276022760327604276052760627607276082760927610276112761227613276142761527616276172761827619276202762127622276232762427625276262762727628276292763027631276322763327634276352763627637276382763927640276412764227643276442764527646276472764827649276502765127652276532765427655276562765727658276592766027661276622766327664276652766627667276682766927670276712767227673276742767527676276772767827679276802768127682276832768427685276862768727688276892769027691276922769327694276952769627697276982769927700277012770227703277042770527706277072770827709277102771127712277132771427715277162771727718277192772027721277222772327724277252772627727277282772927730277312773227733277342773527736277372773827739277402774127742277432774427745277462774727748277492775027751277522775327754277552775627757277582775927760277612776227763277642776527766277672776827769277702777127772277732777427775277762777727778277792778027781277822778327784277852778627787277882778927790277912779227793277942779527796277972779827799278002780127802278032780427805278062780727808278092781027811278122781327814278152781627817278182781927820278212782227823278242782527826278272782827829278302783127832278332783427835278362783727838278392784027841278422784327844278452784627847278482784927850278512785227853278542785527856278572785827859278602786127862278632786427865278662786727868278692787027871278722787327874278752787627877278782787927880278812788227883278842788527886278872788827889278902789127892278932789427895278962789727898278992790027901279022790327904279052790627907279082790927910279112791227913279142791527916279172791827919279202792127922279232792427925279262792727928279292793027931279322793327934279352793627937279382793927940279412794227943279442794527946279472794827949279502795127952279532795427955279562795727958279592796027961279622796327964279652796627967279682796927970279712797227973279742797527976279772797827979279802798127982279832798427985279862798727988279892799027991279922799327994279952799627997279982799928000280012800228003280042800528006280072800828009280102801128012280132801428015280162801728018280192802028021280222802328024280252802628027280282802928030280312803228033280342803528036280372803828039280402804128042280432804428045280462804728048280492805028051280522805328054280552805628057280582805928060280612806228063280642806528066280672806828069280702807128072280732807428075280762807728078280792808028081280822808328084280852808628087280882808928090280912809228093280942809528096280972809828099281002810128102281032810428105281062810728108281092811028111281122811328114281152811628117281182811928120281212812228123281242812528126281272812828129281302813128132281332813428135281362813728138281392814028141281422814328144281452814628147281482814928150281512815228153281542815528156281572815828159281602816128162281632816428165281662816728168281692817028171281722817328174281752817628177281782817928180281812818228183281842818528186281872818828189281902819128192281932819428195281962819728198281992820028201282022820328204282052820628207282082820928210282112821228213282142821528216282172821828219282202822128222282232822428225282262822728228282292823028231282322823328234282352823628237282382823928240282412824228243282442824528246282472824828249282502825128252282532825428255282562825728258282592826028261282622826328264282652826628267282682826928270282712827228273282742827528276282772827828279282802828128282282832828428285282862828728288282892829028291282922829328294282952829628297282982829928300283012830228303283042830528306283072830828309283102831128312283132831428315283162831728318283192832028321283222832328324283252832628327283282832928330283312833228333283342833528336283372833828339283402834128342283432834428345283462834728348283492835028351283522835328354283552835628357283582835928360283612836228363283642836528366283672836828369283702837128372283732837428375283762837728378283792838028381283822838328384283852838628387283882838928390283912839228393283942839528396283972839828399284002840128402284032840428405284062840728408284092841028411284122841328414284152841628417284182841928420284212842228423284242842528426284272842828429284302843128432284332843428435284362843728438284392844028441284422844328444284452844628447284482844928450284512845228453284542845528456284572845828459284602846128462284632846428465284662846728468284692847028471284722847328474284752847628477284782847928480284812848228483284842848528486284872848828489284902849128492284932849428495284962849728498284992850028501285022850328504285052850628507285082850928510285112851228513285142851528516285172851828519285202852128522285232852428525285262852728528285292853028531285322853328534285352853628537285382853928540285412854228543285442854528546285472854828549285502855128552285532855428555285562855728558285592856028561285622856328564285652856628567285682856928570285712857228573285742857528576285772857828579285802858128582285832858428585285862858728588285892859028591285922859328594285952859628597285982859928600286012860228603286042860528606286072860828609286102861128612286132861428615286162861728618286192862028621286222862328624286252862628627286282862928630286312863228633286342863528636286372863828639286402864128642286432864428645286462864728648286492865028651286522865328654286552865628657286582865928660286612866228663286642866528666286672866828669286702867128672286732867428675286762867728678286792868028681286822868328684286852868628687286882868928690286912869228693286942869528696286972869828699287002870128702287032870428705287062870728708287092871028711287122871328714287152871628717287182871928720287212872228723287242872528726287272872828729287302873128732287332873428735287362873728738287392874028741287422874328744287452874628747287482874928750287512875228753287542875528756287572875828759287602876128762287632876428765287662876728768287692877028771287722877328774287752877628777287782877928780287812878228783287842878528786287872878828789287902879128792287932879428795287962879728798287992880028801288022880328804288052880628807288082880928810288112881228813288142881528816288172881828819288202882128822288232882428825288262882728828288292883028831288322883328834288352883628837288382883928840288412884228843288442884528846288472884828849288502885128852288532885428855288562885728858288592886028861288622886328864288652886628867288682886928870288712887228873288742887528876288772887828879288802888128882288832888428885288862888728888288892889028891288922889328894288952889628897288982889928900289012890228903289042890528906289072890828909289102891128912289132891428915289162891728918289192892028921289222892328924289252892628927289282892928930289312893228933289342893528936289372893828939289402894128942289432894428945289462894728948289492895028951289522895328954289552895628957289582895928960289612896228963289642896528966289672896828969289702897128972289732897428975289762897728978289792898028981289822898328984289852898628987289882898928990289912899228993289942899528996289972899828999290002900129002290032900429005290062900729008290092901029011290122901329014290152901629017290182901929020290212902229023290242902529026290272902829029290302903129032290332903429035290362903729038290392904029041290422904329044290452904629047290482904929050290512905229053290542905529056290572905829059290602906129062290632906429065290662906729068290692907029071290722907329074290752907629077290782907929080290812908229083290842908529086290872908829089290902909129092290932909429095290962909729098290992910029101291022910329104291052910629107291082910929110291112911229113291142911529116291172911829119291202912129122291232912429125291262912729128291292913029131291322913329134291352913629137291382913929140291412914229143291442914529146291472914829149291502915129152291532915429155291562915729158291592916029161291622916329164291652916629167291682916929170291712917229173291742917529176291772917829179291802918129182291832918429185291862918729188291892919029191291922919329194291952919629197291982919929200292012920229203292042920529206292072920829209292102921129212292132921429215292162921729218292192922029221292222922329224292252922629227292282922929230292312923229233292342923529236292372923829239292402924129242292432924429245292462924729248292492925029251292522925329254292552925629257292582925929260292612926229263292642926529266292672926829269292702927129272292732927429275292762927729278292792928029281292822928329284292852928629287292882928929290292912929229293292942929529296292972929829299293002930129302293032930429305293062930729308293092931029311293122931329314293152931629317293182931929320293212932229323293242932529326293272932829329293302933129332293332933429335293362933729338293392934029341293422934329344293452934629347293482934929350293512935229353293542935529356293572935829359293602936129362293632936429365293662936729368293692937029371293722937329374293752937629377293782937929380293812938229383293842938529386293872938829389293902939129392293932939429395293962939729398293992940029401294022940329404294052940629407294082940929410294112941229413294142941529416294172941829419294202942129422294232942429425294262942729428294292943029431294322943329434294352943629437294382943929440294412944229443294442944529446294472944829449294502945129452294532945429455294562945729458294592946029461294622946329464294652946629467294682946929470294712947229473294742947529476294772947829479294802948129482294832948429485294862948729488294892949029491294922949329494294952949629497294982949929500295012950229503295042950529506295072950829509295102951129512295132951429515295162951729518295192952029521295222952329524295252952629527295282952929530295312953229533295342953529536295372953829539295402954129542295432954429545295462954729548295492955029551295522955329554295552955629557295582955929560295612956229563295642956529566295672956829569295702957129572295732957429575295762957729578295792958029581295822958329584295852958629587295882958929590295912959229593295942959529596295972959829599296002960129602296032960429605296062960729608296092961029611296122961329614296152961629617296182961929620296212962229623296242962529626296272962829629296302963129632296332963429635296362963729638296392964029641296422964329644296452964629647296482964929650296512965229653296542965529656296572965829659296602966129662296632966429665296662966729668296692967029671296722967329674296752967629677296782967929680296812968229683296842968529686296872968829689296902969129692296932969429695296962969729698296992970029701297022970329704297052970629707297082970929710297112971229713297142971529716297172971829719297202972129722297232972429725297262972729728297292973029731297322973329734297352973629737297382973929740297412974229743297442974529746297472974829749297502975129752297532975429755297562975729758297592976029761297622976329764297652976629767297682976929770297712977229773297742977529776297772977829779297802978129782297832978429785297862978729788297892979029791297922979329794297952979629797297982979929800298012980229803298042980529806298072980829809298102981129812298132981429815298162981729818298192982029821298222982329824298252982629827298282982929830298312983229833298342983529836298372983829839298402984129842298432984429845298462984729848298492985029851298522985329854298552985629857298582985929860298612986229863298642986529866298672986829869298702987129872298732987429875298762987729878298792988029881298822988329884298852988629887298882988929890298912989229893298942989529896298972989829899299002990129902299032990429905299062990729908299092991029911299122991329914299152991629917299182991929920299212992229923299242992529926299272992829929299302993129932299332993429935299362993729938299392994029941299422994329944299452994629947299482994929950299512995229953299542995529956299572995829959299602996129962299632996429965299662996729968299692997029971299722997329974299752997629977299782997929980299812998229983299842998529986299872998829989299902999129992299932999429995299962999729998299993000030001300023000330004300053000630007300083000930010300113001230013300143001530016300173001830019300203002130022300233002430025300263002730028300293003030031300323003330034300353003630037300383003930040300413004230043300443004530046300473004830049300503005130052300533005430055300563005730058300593006030061300623006330064300653006630067300683006930070300713007230073300743007530076300773007830079300803008130082300833008430085300863008730088300893009030091300923009330094300953009630097300983009930100301013010230103301043010530106301073010830109301103011130112301133011430115301163011730118301193012030121301223012330124301253012630127301283012930130301313013230133301343013530136301373013830139301403014130142301433014430145301463014730148301493015030151301523015330154301553015630157301583015930160301613016230163301643016530166301673016830169301703017130172301733017430175301763017730178301793018030181301823018330184301853018630187301883018930190301913019230193301943019530196301973019830199302003020130202302033020430205302063020730208302093021030211302123021330214302153021630217302183021930220302213022230223302243022530226302273022830229302303023130232302333023430235302363023730238302393024030241302423024330244302453024630247302483024930250302513025230253302543025530256302573025830259302603026130262302633026430265302663026730268302693027030271302723027330274302753027630277302783027930280302813028230283302843028530286302873028830289302903029130292302933029430295302963029730298302993030030301303023030330304303053030630307303083030930310303113031230313303143031530316303173031830319303203032130322303233032430325303263032730328303293033030331303323033330334303353033630337303383033930340303413034230343303443034530346303473034830349303503035130352303533035430355303563035730358303593036030361303623036330364303653036630367303683036930370303713037230373303743037530376303773037830379303803038130382303833038430385303863038730388303893039030391303923039330394303953039630397303983039930400304013040230403304043040530406304073040830409304103041130412304133041430415304163041730418304193042030421304223042330424304253042630427304283042930430304313043230433304343043530436304373043830439304403044130442304433044430445304463044730448304493045030451304523045330454304553045630457304583045930460304613046230463304643046530466304673046830469304703047130472304733047430475304763047730478304793048030481304823048330484304853048630487304883048930490304913049230493304943049530496304973049830499305003050130502305033050430505305063050730508305093051030511305123051330514305153051630517305183051930520305213052230523305243052530526305273052830529305303053130532305333053430535305363053730538305393054030541305423054330544305453054630547305483054930550305513055230553305543055530556305573055830559305603056130562305633056430565305663056730568305693057030571305723057330574305753057630577305783057930580305813058230583305843058530586305873058830589305903059130592305933059430595305963059730598305993060030601306023060330604306053060630607306083060930610306113061230613306143061530616306173061830619306203062130622306233062430625306263062730628306293063030631306323063330634306353063630637306383063930640306413064230643306443064530646306473064830649306503065130652306533065430655306563065730658306593066030661306623066330664306653066630667306683066930670306713067230673306743067530676306773067830679306803068130682306833068430685306863068730688306893069030691306923069330694306953069630697306983069930700307013070230703307043070530706307073070830709307103071130712307133071430715307163071730718307193072030721307223072330724307253072630727307283072930730307313073230733307343073530736307373073830739307403074130742307433074430745307463074730748307493075030751307523075330754307553075630757307583075930760307613076230763307643076530766307673076830769307703077130772307733077430775307763077730778307793078030781307823078330784307853078630787307883078930790307913079230793307943079530796307973079830799308003080130802308033080430805308063080730808308093081030811308123081330814308153081630817308183081930820308213082230823308243082530826308273082830829308303083130832308333083430835308363083730838308393084030841308423084330844308453084630847308483084930850308513085230853308543085530856308573085830859308603086130862308633086430865308663086730868308693087030871308723087330874308753087630877308783087930880308813088230883308843088530886308873088830889308903089130892308933089430895308963089730898308993090030901309023090330904309053090630907309083090930910309113091230913309143091530916309173091830919309203092130922309233092430925309263092730928309293093030931309323093330934309353093630937309383093930940309413094230943309443094530946309473094830949309503095130952309533095430955309563095730958309593096030961309623096330964309653096630967309683096930970309713097230973309743097530976309773097830979309803098130982309833098430985309863098730988309893099030991309923099330994309953099630997309983099931000310013100231003310043100531006310073100831009310103101131012310133101431015310163101731018310193102031021310223102331024310253102631027310283102931030310313103231033310343103531036310373103831039310403104131042310433104431045310463104731048310493105031051310523105331054310553105631057310583105931060310613106231063310643106531066310673106831069310703107131072310733107431075310763107731078310793108031081310823108331084310853108631087310883108931090310913109231093310943109531096310973109831099311003110131102311033110431105311063110731108311093111031111311123111331114311153111631117311183111931120311213112231123311243112531126311273112831129311303113131132311333113431135311363113731138311393114031141311423114331144311453114631147311483114931150311513115231153311543115531156311573115831159311603116131162311633116431165311663116731168311693117031171311723117331174311753117631177311783117931180311813118231183311843118531186311873118831189311903119131192311933119431195311963119731198311993120031201312023120331204312053120631207312083120931210312113121231213312143121531216312173121831219312203122131222312233122431225312263122731228312293123031231312323123331234312353123631237312383123931240312413124231243312443124531246312473124831249312503125131252312533125431255312563125731258312593126031261312623126331264312653126631267312683126931270312713127231273312743127531276312773127831279312803128131282312833128431285312863128731288312893129031291312923129331294312953129631297312983129931300313013130231303313043130531306313073130831309313103131131312313133131431315313163131731318313193132031321313223132331324313253132631327313283132931330313313133231333313343133531336313373133831339313403134131342313433134431345313463134731348313493135031351313523135331354313553135631357313583135931360313613136231363313643136531366313673136831369313703137131372313733137431375313763137731378313793138031381313823138331384313853138631387313883138931390313913139231393313943139531396313973139831399314003140131402314033140431405314063140731408314093141031411314123141331414314153141631417314183141931420314213142231423314243142531426314273142831429314303143131432314333143431435314363143731438314393144031441314423144331444314453144631447314483144931450314513145231453314543145531456314573145831459314603146131462314633146431465314663146731468314693147031471314723147331474314753147631477314783147931480314813148231483314843148531486314873148831489314903149131492314933149431495314963149731498314993150031501315023150331504315053150631507315083150931510315113151231513315143151531516315173151831519315203152131522315233152431525315263152731528315293153031531315323153331534315353153631537315383153931540315413154231543315443154531546315473154831549315503155131552315533155431555315563155731558315593156031561315623156331564315653156631567315683156931570315713157231573315743157531576315773157831579315803158131582315833158431585315863158731588315893159031591315923159331594315953159631597315983159931600316013160231603316043160531606316073160831609316103161131612316133161431615316163161731618316193162031621316223162331624316253162631627316283162931630316313163231633316343163531636316373163831639316403164131642316433164431645316463164731648316493165031651316523165331654316553165631657316583165931660316613166231663316643166531666316673166831669316703167131672316733167431675316763167731678316793168031681316823168331684316853168631687316883168931690316913169231693316943169531696316973169831699317003170131702317033170431705317063170731708317093171031711317123171331714317153171631717317183171931720317213172231723317243172531726317273172831729317303173131732317333173431735317363173731738317393174031741317423174331744317453174631747317483174931750317513175231753317543175531756317573175831759317603176131762317633176431765317663176731768317693177031771317723177331774317753177631777317783177931780317813178231783317843178531786317873178831789317903179131792317933179431795317963179731798317993180031801318023180331804318053180631807318083180931810318113181231813318143181531816318173181831819318203182131822318233182431825318263182731828318293183031831318323183331834318353183631837318383183931840318413184231843318443184531846318473184831849318503185131852318533185431855318563185731858318593186031861318623186331864318653186631867318683186931870318713187231873318743187531876318773187831879318803188131882318833188431885318863188731888318893189031891318923189331894318953189631897318983189931900319013190231903319043190531906319073190831909319103191131912319133191431915319163191731918319193192031921319223192331924319253192631927319283192931930319313193231933319343193531936319373193831939319403194131942319433194431945319463194731948319493195031951319523195331954319553195631957319583195931960319613196231963319643196531966319673196831969319703197131972319733197431975319763197731978319793198031981319823198331984319853198631987319883198931990319913199231993319943199531996319973199831999320003200132002320033200432005320063200732008320093201032011320123201332014320153201632017320183201932020320213202232023320243202532026320273202832029320303203132032320333203432035320363203732038320393204032041320423204332044320453204632047320483204932050320513205232053320543205532056320573205832059320603206132062320633206432065320663206732068320693207032071320723207332074320753207632077320783207932080320813208232083320843208532086320873208832089320903209132092320933209432095320963209732098320993210032101321023210332104321053210632107321083210932110321113211232113321143211532116321173211832119321203212132122321233212432125321263212732128321293213032131321323213332134321353213632137321383213932140321413214232143321443214532146321473214832149321503215132152321533215432155321563215732158321593216032161321623216332164321653216632167321683216932170321713217232173321743217532176321773217832179321803218132182321833218432185321863218732188321893219032191321923219332194321953219632197321983219932200322013220232203322043220532206322073220832209322103221132212322133221432215322163221732218322193222032221322223222332224322253222632227322283222932230322313223232233322343223532236322373223832239322403224132242322433224432245322463224732248322493225032251322523225332254322553225632257322583225932260322613226232263322643226532266322673226832269322703227132272322733227432275322763227732278322793228032281322823228332284322853228632287322883228932290322913229232293322943229532296322973229832299323003230132302323033230432305323063230732308323093231032311323123231332314323153231632317323183231932320323213232232323323243232532326323273232832329323303233132332323333233432335323363233732338323393234032341323423234332344323453234632347323483234932350323513235232353323543235532356323573235832359323603236132362323633236432365323663236732368323693237032371323723237332374323753237632377323783237932380323813238232383323843238532386323873238832389323903239132392323933239432395323963239732398323993240032401324023240332404324053240632407324083240932410324113241232413324143241532416324173241832419324203242132422324233242432425324263242732428324293243032431324323243332434324353243632437324383243932440324413244232443324443244532446324473244832449324503245132452324533245432455324563245732458324593246032461324623246332464324653246632467324683246932470324713247232473324743247532476324773247832479324803248132482324833248432485324863248732488324893249032491324923249332494324953249632497324983249932500325013250232503325043250532506325073250832509325103251132512325133251432515325163251732518325193252032521325223252332524325253252632527325283252932530325313253232533325343253532536325373253832539325403254132542325433254432545325463254732548325493255032551325523255332554325553255632557325583255932560325613256232563325643256532566325673256832569325703257132572325733257432575325763257732578325793258032581325823258332584325853258632587325883258932590325913259232593325943259532596325973259832599326003260132602326033260432605326063260732608326093261032611326123261332614326153261632617326183261932620326213262232623326243262532626326273262832629326303263132632326333263432635326363263732638326393264032641326423264332644326453264632647326483264932650326513265232653326543265532656326573265832659326603266132662326633266432665326663266732668326693267032671326723267332674326753267632677326783267932680326813268232683326843268532686326873268832689326903269132692326933269432695326963269732698326993270032701327023270332704327053270632707327083270932710327113271232713327143271532716327173271832719327203272132722327233272432725327263272732728327293273032731327323273332734327353273632737327383273932740327413274232743327443274532746327473274832749327503275132752327533275432755327563275732758327593276032761327623276332764327653276632767327683276932770327713277232773327743277532776327773277832779327803278132782327833278432785327863278732788327893279032791327923279332794327953279632797327983279932800328013280232803328043280532806328073280832809328103281132812328133281432815328163281732818328193282032821328223282332824328253282632827328283282932830328313283232833328343283532836328373283832839328403284132842328433284432845328463284732848328493285032851328523285332854328553285632857328583285932860328613286232863328643286532866328673286832869328703287132872328733287432875328763287732878328793288032881328823288332884328853288632887328883288932890328913289232893328943289532896328973289832899329003290132902329033290432905329063290732908329093291032911329123291332914329153291632917329183291932920329213292232923329243292532926329273292832929329303293132932329333293432935329363293732938329393294032941329423294332944329453294632947329483294932950329513295232953329543295532956329573295832959329603296132962329633296432965329663296732968329693297032971329723297332974329753297632977329783297932980329813298232983329843298532986329873298832989329903299132992329933299432995329963299732998329993300033001330023300333004330053300633007330083300933010330113301233013330143301533016330173301833019330203302133022330233302433025330263302733028330293303033031330323303333034330353303633037330383303933040330413304233043330443304533046330473304833049330503305133052330533305433055330563305733058330593306033061330623306333064330653306633067330683306933070330713307233073330743307533076330773307833079330803308133082330833308433085330863308733088330893309033091330923309333094330953309633097330983309933100331013310233103331043310533106331073310833109331103311133112331133311433115331163311733118331193312033121331223312333124331253312633127331283312933130331313313233133331343313533136331373313833139331403314133142331433314433145331463314733148331493315033151331523315333154331553315633157331583315933160331613316233163331643316533166331673316833169331703317133172331733317433175331763317733178331793318033181331823318333184331853318633187331883318933190331913319233193331943319533196331973319833199332003320133202332033320433205332063320733208332093321033211332123321333214332153321633217332183321933220332213322233223332243322533226332273322833229332303323133232332333323433235332363323733238332393324033241332423324333244332453324633247332483324933250332513325233253332543325533256332573325833259332603326133262332633326433265332663326733268332693327033271332723327333274332753327633277332783327933280332813328233283332843328533286332873328833289332903329133292332933329433295332963329733298332993330033301333023330333304333053330633307333083330933310333113331233313333143331533316333173331833319333203332133322333233332433325333263332733328333293333033331333323333333334333353333633337333383333933340333413334233343333443334533346333473334833349333503335133352333533335433355333563335733358333593336033361333623336333364333653336633367333683336933370333713337233373333743337533376333773337833379333803338133382333833338433385333863338733388333893339033391333923339333394333953339633397333983339933400334013340233403334043340533406334073340833409334103341133412334133341433415334163341733418334193342033421334223342333424334253342633427334283342933430334313343233433334343343533436334373343833439334403344133442334433344433445334463344733448334493345033451334523345333454334553345633457334583345933460334613346233463334643346533466334673346833469334703347133472334733347433475334763347733478334793348033481334823348333484334853348633487334883348933490334913349233493334943349533496334973349833499335003350133502335033350433505335063350733508335093351033511335123351333514335153351633517335183351933520335213352233523335243352533526335273352833529335303353133532335333353433535335363353733538335393354033541335423354333544335453354633547335483354933550335513355233553335543355533556335573355833559335603356133562335633356433565335663356733568335693357033571335723357333574335753357633577335783357933580335813358233583335843358533586335873358833589335903359133592335933359433595335963359733598335993360033601336023360333604336053360633607336083360933610336113361233613336143361533616336173361833619336203362133622336233362433625336263362733628336293363033631336323363333634336353363633637336383363933640336413364233643336443364533646336473364833649336503365133652336533365433655336563365733658336593366033661336623366333664336653366633667336683366933670336713367233673336743367533676336773367833679336803368133682336833368433685336863368733688336893369033691336923369333694336953369633697336983369933700337013370233703337043370533706337073370833709337103371133712337133371433715337163371733718337193372033721337223372333724337253372633727337283372933730337313373233733337343373533736337373373833739337403374133742337433374433745337463374733748337493375033751337523375333754337553375633757337583375933760337613376233763337643376533766337673376833769337703377133772337733377433775337763377733778337793378033781337823378333784337853378633787337883378933790337913379233793337943379533796337973379833799338003380133802338033380433805338063380733808338093381033811338123381333814338153381633817338183381933820338213382233823338243382533826338273382833829338303383133832338333383433835338363383733838338393384033841338423384333844338453384633847338483384933850338513385233853338543385533856338573385833859338603386133862338633386433865338663386733868338693387033871338723387333874338753387633877338783387933880338813388233883338843388533886338873388833889338903389133892338933389433895338963389733898338993390033901339023390333904339053390633907339083390933910339113391233913339143391533916339173391833919339203392133922339233392433925339263392733928339293393033931339323393333934339353393633937339383393933940339413394233943339443394533946339473394833949339503395133952339533395433955339563395733958339593396033961339623396333964339653396633967339683396933970339713397233973339743397533976339773397833979339803398133982339833398433985339863398733988339893399033991339923399333994339953399633997339983399934000340013400234003340043400534006340073400834009340103401134012340133401434015340163401734018340193402034021340223402334024340253402634027340283402934030340313403234033340343403534036340373403834039340403404134042340433404434045340463404734048340493405034051340523405334054340553405634057340583405934060340613406234063340643406534066340673406834069340703407134072340733407434075340763407734078340793408034081340823408334084340853408634087340883408934090340913409234093340943409534096340973409834099341003410134102341033410434105341063410734108341093411034111341123411334114341153411634117341183411934120341213412234123341243412534126341273412834129341303413134132341333413434135341363413734138341393414034141341423414334144341453414634147341483414934150341513415234153341543415534156341573415834159341603416134162341633416434165341663416734168341693417034171341723417334174341753417634177341783417934180341813418234183341843418534186341873418834189341903419134192341933419434195341963419734198341993420034201342023420334204342053420634207342083420934210342113421234213342143421534216342173421834219342203422134222342233422434225342263422734228342293423034231342323423334234342353423634237342383423934240342413424234243342443424534246342473424834249342503425134252342533425434255342563425734258342593426034261342623426334264342653426634267342683426934270342713427234273342743427534276342773427834279342803428134282342833428434285342863428734288342893429034291342923429334294342953429634297342983429934300343013430234303343043430534306343073430834309343103431134312343133431434315343163431734318343193432034321343223432334324343253432634327343283432934330343313433234333343343433534336343373433834339343403434134342343433434434345343463434734348343493435034351343523435334354343553435634357343583435934360343613436234363343643436534366343673436834369343703437134372343733437434375343763437734378343793438034381343823438334384343853438634387343883438934390343913439234393343943439534396343973439834399344003440134402344033440434405344063440734408344093441034411344123441334414344153441634417344183441934420344213442234423344243442534426344273442834429344303443134432344333443434435344363443734438344393444034441344423444334444344453444634447344483444934450344513445234453344543445534456344573445834459344603446134462344633446434465344663446734468344693447034471344723447334474344753447634477344783447934480344813448234483344843448534486344873448834489344903449134492344933449434495344963449734498344993450034501345023450334504345053450634507345083450934510345113451234513345143451534516345173451834519345203452134522345233452434525345263452734528345293453034531345323453334534345353453634537345383453934540345413454234543345443454534546345473454834549345503455134552345533455434555345563455734558345593456034561345623456334564345653456634567345683456934570345713457234573345743457534576345773457834579345803458134582345833458434585345863458734588345893459034591345923459334594345953459634597345983459934600346013460234603346043460534606346073460834609346103461134612346133461434615346163461734618346193462034621346223462334624346253462634627346283462934630346313463234633346343463534636346373463834639346403464134642346433464434645346463464734648346493465034651346523465334654346553465634657346583465934660346613466234663346643466534666346673466834669346703467134672346733467434675346763467734678346793468034681346823468334684346853468634687346883468934690346913469234693346943469534696346973469834699347003470134702347033470434705347063470734708347093471034711347123471334714347153471634717347183471934720347213472234723347243472534726347273472834729347303473134732347333473434735347363473734738347393474034741347423474334744347453474634747347483474934750347513475234753347543475534756347573475834759347603476134762347633476434765347663476734768347693477034771347723477334774347753477634777347783477934780347813478234783347843478534786347873478834789347903479134792347933479434795347963479734798347993480034801348023480334804348053480634807348083480934810348113481234813348143481534816348173481834819348203482134822348233482434825348263482734828348293483034831348323483334834348353483634837348383483934840348413484234843348443484534846348473484834849348503485134852348533485434855348563485734858348593486034861348623486334864348653486634867348683486934870348713487234873348743487534876348773487834879348803488134882348833488434885348863488734888348893489034891348923489334894348953489634897348983489934900349013490234903349043490534906349073490834909349103491134912349133491434915349163491734918349193492034921349223492334924349253492634927349283492934930349313493234933349343493534936349373493834939349403494134942349433494434945349463494734948349493495034951349523495334954349553495634957349583495934960349613496234963349643496534966349673496834969349703497134972349733497434975349763497734978349793498034981349823498334984349853498634987349883498934990349913499234993349943499534996349973499834999350003500135002350033500435005350063500735008350093501035011350123501335014350153501635017350183501935020350213502235023350243502535026350273502835029350303503135032350333503435035350363503735038350393504035041350423504335044350453504635047350483504935050350513505235053350543505535056350573505835059350603506135062350633506435065350663506735068350693507035071350723507335074350753507635077350783507935080350813508235083350843508535086350873508835089350903509135092350933509435095350963509735098350993510035101351023510335104351053510635107351083510935110351113511235113351143511535116351173511835119351203512135122351233512435125351263512735128351293513035131351323513335134351353513635137351383513935140351413514235143351443514535146351473514835149351503515135152351533515435155351563515735158351593516035161351623516335164351653516635167351683516935170351713517235173351743517535176351773517835179351803518135182351833518435185351863518735188351893519035191351923519335194351953519635197351983519935200352013520235203352043520535206352073520835209352103521135212352133521435215352163521735218352193522035221352223522335224352253522635227352283522935230352313523235233352343523535236352373523835239352403524135242352433524435245352463524735248352493525035251352523525335254352553525635257352583525935260352613526235263352643526535266352673526835269352703527135272352733527435275352763527735278352793528035281352823528335284352853528635287352883528935290352913529235293352943529535296352973529835299353003530135302353033530435305353063530735308353093531035311353123531335314353153531635317353183531935320353213532235323353243532535326353273532835329353303533135332353333533435335353363533735338353393534035341353423534335344353453534635347353483534935350353513535235353353543535535356353573535835359353603536135362353633536435365353663536735368353693537035371353723537335374353753537635377353783537935380353813538235383353843538535386353873538835389353903539135392353933539435395353963539735398353993540035401354023540335404354053540635407354083540935410354113541235413354143541535416354173541835419354203542135422354233542435425354263542735428354293543035431354323543335434354353543635437354383543935440354413544235443354443544535446354473544835449354503545135452354533545435455354563545735458354593546035461354623546335464354653546635467354683546935470354713547235473354743547535476354773547835479354803548135482354833548435485354863548735488354893549035491354923549335494354953549635497354983549935500355013550235503355043550535506355073550835509355103551135512355133551435515355163551735518355193552035521355223552335524355253552635527355283552935530355313553235533355343553535536355373553835539355403554135542355433554435545355463554735548355493555035551355523555335554355553555635557355583555935560355613556235563355643556535566355673556835569355703557135572355733557435575355763557735578355793558035581355823558335584355853558635587355883558935590355913559235593355943559535596355973559835599356003560135602356033560435605356063560735608356093561035611356123561335614356153561635617356183561935620356213562235623356243562535626356273562835629356303563135632356333563435635356363563735638356393564035641356423564335644356453564635647356483564935650356513565235653356543565535656356573565835659356603566135662356633566435665356663566735668356693567035671356723567335674356753567635677356783567935680356813568235683356843568535686356873568835689356903569135692356933569435695356963569735698356993570035701357023570335704357053570635707357083570935710357113571235713357143571535716357173571835719357203572135722357233572435725357263572735728357293573035731357323573335734357353573635737357383573935740357413574235743357443574535746357473574835749357503575135752357533575435755357563575735758357593576035761357623576335764357653576635767357683576935770357713577235773357743577535776357773577835779357803578135782357833578435785357863578735788357893579035791357923579335794357953579635797357983579935800358013580235803358043580535806358073580835809358103581135812358133581435815358163581735818358193582035821358223582335824358253582635827358283582935830358313583235833358343583535836358373583835839358403584135842358433584435845358463584735848358493585035851358523585335854358553585635857358583585935860358613586235863358643586535866358673586835869358703587135872358733587435875358763587735878358793588035881358823588335884358853588635887358883588935890358913589235893358943589535896358973589835899359003590135902359033590435905359063590735908359093591035911359123591335914359153591635917359183591935920359213592235923359243592535926359273592835929359303593135932359333593435935359363593735938359393594035941359423594335944359453594635947359483594935950359513595235953359543595535956359573595835959359603596135962359633596435965359663596735968359693597035971359723597335974359753597635977359783597935980359813598235983359843598535986359873598835989359903599135992359933599435995359963599735998359993600036001360023600336004360053600636007360083600936010360113601236013360143601536016360173601836019360203602136022360233602436025360263602736028360293603036031360323603336034360353603636037360383603936040360413604236043360443604536046360473604836049360503605136052360533605436055360563605736058360593606036061360623606336064360653606636067360683606936070360713607236073360743607536076360773607836079360803608136082360833608436085360863608736088360893609036091360923609336094360953609636097360983609936100361013610236103361043610536106361073610836109361103611136112361133611436115361163611736118361193612036121361223612336124361253612636127361283612936130361313613236133361343613536136361373613836139361403614136142361433614436145361463614736148361493615036151361523615336154361553615636157361583615936160361613616236163361643616536166361673616836169361703617136172361733617436175361763617736178361793618036181361823618336184361853618636187361883618936190361913619236193361943619536196361973619836199362003620136202362033620436205362063620736208362093621036211362123621336214362153621636217362183621936220362213622236223362243622536226362273622836229362303623136232362333623436235362363623736238362393624036241362423624336244362453624636247362483624936250362513625236253362543625536256362573625836259362603626136262362633626436265362663626736268362693627036271362723627336274362753627636277362783627936280362813628236283362843628536286362873628836289362903629136292362933629436295362963629736298362993630036301363023630336304363053630636307363083630936310363113631236313363143631536316363173631836319363203632136322363233632436325363263632736328363293633036331363323633336334363353633636337363383633936340363413634236343363443634536346363473634836349363503635136352363533635436355363563635736358363593636036361363623636336364363653636636367363683636936370363713637236373363743637536376363773637836379363803638136382363833638436385363863638736388363893639036391363923639336394363953639636397363983639936400364013640236403364043640536406364073640836409364103641136412364133641436415364163641736418364193642036421364223642336424364253642636427364283642936430364313643236433364343643536436364373643836439364403644136442364433644436445364463644736448364493645036451364523645336454364553645636457364583645936460364613646236463364643646536466364673646836469364703647136472364733647436475364763647736478364793648036481364823648336484364853648636487364883648936490364913649236493364943649536496364973649836499365003650136502365033650436505365063650736508365093651036511365123651336514365153651636517365183651936520365213652236523365243652536526365273652836529365303653136532365333653436535365363653736538365393654036541365423654336544365453654636547365483654936550365513655236553365543655536556365573655836559365603656136562365633656436565365663656736568365693657036571365723657336574365753657636577365783657936580365813658236583365843658536586365873658836589365903659136592365933659436595365963659736598365993660036601366023660336604366053660636607366083660936610366113661236613366143661536616366173661836619366203662136622366233662436625366263662736628366293663036631366323663336634366353663636637366383663936640366413664236643366443664536646366473664836649366503665136652366533665436655366563665736658366593666036661366623666336664366653666636667366683666936670366713667236673366743667536676366773667836679366803668136682366833668436685366863668736688366893669036691366923669336694366953669636697366983669936700367013670236703367043670536706367073670836709367103671136712367133671436715367163671736718367193672036721367223672336724367253672636727367283672936730367313673236733367343673536736367373673836739367403674136742367433674436745367463674736748367493675036751367523675336754367553675636757367583675936760367613676236763367643676536766367673676836769367703677136772367733677436775367763677736778367793678036781367823678336784367853678636787367883678936790367913679236793367943679536796367973679836799368003680136802368033680436805368063680736808368093681036811368123681336814368153681636817368183681936820368213682236823368243682536826368273682836829368303683136832368333683436835368363683736838368393684036841368423684336844368453684636847368483684936850368513685236853368543685536856368573685836859368603686136862368633686436865368663686736868368693687036871368723687336874368753687636877368783687936880368813688236883368843688536886368873688836889368903689136892368933689436895368963689736898368993690036901369023690336904369053690636907369083690936910369113691236913369143691536916369173691836919369203692136922369233692436925369263692736928369293693036931369323693336934369353693636937369383693936940369413694236943369443694536946369473694836949369503695136952369533695436955369563695736958369593696036961369623696336964369653696636967369683696936970369713697236973369743697536976369773697836979369803698136982369833698436985369863698736988369893699036991369923699336994369953699636997369983699937000370013700237003370043700537006370073700837009370103701137012370133701437015370163701737018370193702037021370223702337024370253702637027370283702937030370313703237033370343703537036370373703837039370403704137042370433704437045370463704737048370493705037051370523705337054370553705637057370583705937060370613706237063370643706537066370673706837069370703707137072370733707437075370763707737078370793708037081370823708337084370853708637087370883708937090370913709237093370943709537096370973709837099371003710137102371033710437105371063710737108371093711037111371123711337114371153711637117371183711937120371213712237123371243712537126371273712837129371303713137132371333713437135371363713737138371393714037141371423714337144371453714637147371483714937150371513715237153371543715537156371573715837159371603716137162371633716437165371663716737168371693717037171371723717337174371753717637177371783717937180371813718237183371843718537186371873718837189371903719137192371933719437195371963719737198371993720037201372023720337204372053720637207372083720937210372113721237213372143721537216372173721837219372203722137222372233722437225372263722737228372293723037231372323723337234372353723637237372383723937240372413724237243372443724537246372473724837249372503725137252372533725437255372563725737258372593726037261372623726337264372653726637267372683726937270372713727237273372743727537276372773727837279372803728137282372833728437285372863728737288372893729037291372923729337294372953729637297372983729937300373013730237303373043730537306373073730837309373103731137312373133731437315373163731737318373193732037321373223732337324373253732637327373283732937330373313733237333373343733537336373373733837339373403734137342373433734437345373463734737348373493735037351373523735337354373553735637357373583735937360373613736237363373643736537366373673736837369373703737137372373733737437375373763737737378373793738037381373823738337384373853738637387373883738937390373913739237393373943739537396373973739837399374003740137402374033740437405374063740737408374093741037411374123741337414374153741637417374183741937420374213742237423374243742537426374273742837429374303743137432374333743437435374363743737438374393744037441374423744337444374453744637447374483744937450374513745237453374543745537456374573745837459374603746137462374633746437465374663746737468374693747037471374723747337474374753747637477374783747937480374813748237483374843748537486374873748837489374903749137492374933749437495374963749737498374993750037501375023750337504375053750637507375083750937510375113751237513375143751537516375173751837519375203752137522375233752437525375263752737528375293753037531375323753337534375353753637537375383753937540375413754237543375443754537546375473754837549375503755137552375533755437555375563755737558375593756037561375623756337564375653756637567375683756937570375713757237573375743757537576375773757837579375803758137582375833758437585375863758737588375893759037591375923759337594375953759637597375983759937600376013760237603376043760537606376073760837609376103761137612376133761437615376163761737618376193762037621376223762337624376253762637627376283762937630376313763237633376343763537636376373763837639376403764137642376433764437645376463764737648376493765037651376523765337654376553765637657376583765937660376613766237663376643766537666376673766837669376703767137672376733767437675376763767737678376793768037681376823768337684376853768637687376883768937690376913769237693376943769537696376973769837699377003770137702377033770437705377063770737708377093771037711377123771337714377153771637717377183771937720377213772237723377243772537726377273772837729377303773137732377333773437735377363773737738377393774037741377423774337744377453774637747377483774937750377513775237753377543775537756377573775837759377603776137762377633776437765377663776737768377693777037771377723777337774377753777637777377783777937780377813778237783377843778537786377873778837789377903779137792377933779437795377963779737798377993780037801378023780337804378053780637807378083780937810378113781237813378143781537816378173781837819378203782137822378233782437825378263782737828378293783037831378323783337834378353783637837378383783937840378413784237843378443784537846378473784837849378503785137852378533785437855378563785737858378593786037861378623786337864378653786637867378683786937870378713787237873378743787537876378773787837879378803788137882378833788437885378863788737888378893789037891378923789337894378953789637897378983789937900379013790237903379043790537906379073790837909379103791137912379133791437915379163791737918379193792037921379223792337924379253792637927379283792937930379313793237933379343793537936379373793837939379403794137942379433794437945379463794737948379493795037951379523795337954379553795637957379583795937960379613796237963379643796537966379673796837969379703797137972379733797437975379763797737978379793798037981379823798337984379853798637987379883798937990379913799237993379943799537996379973799837999380003800138002380033800438005380063800738008380093801038011380123801338014380153801638017380183801938020380213802238023380243802538026380273802838029380303803138032380333803438035380363803738038380393804038041380423804338044380453804638047380483804938050380513805238053380543805538056380573805838059380603806138062380633806438065380663806738068380693807038071380723807338074380753807638077380783807938080380813808238083380843808538086380873808838089380903809138092380933809438095380963809738098380993810038101381023810338104381053810638107381083810938110381113811238113381143811538116381173811838119381203812138122381233812438125381263812738128381293813038131381323813338134381353813638137381383813938140381413814238143381443814538146381473814838149381503815138152381533815438155381563815738158381593816038161381623816338164381653816638167381683816938170381713817238173381743817538176381773817838179381803818138182381833818438185381863818738188381893819038191381923819338194381953819638197381983819938200382013820238203382043820538206382073820838209382103821138212382133821438215382163821738218382193822038221382223822338224382253822638227382283822938230382313823238233382343823538236382373823838239382403824138242382433824438245382463824738248382493825038251382523825338254382553825638257382583825938260382613826238263382643826538266382673826838269382703827138272382733827438275382763827738278382793828038281382823828338284382853828638287382883828938290382913829238293382943829538296382973829838299383003830138302383033830438305383063830738308383093831038311383123831338314383153831638317383183831938320383213832238323383243832538326383273832838329383303833138332383333833438335383363833738338383393834038341383423834338344383453834638347383483834938350383513835238353383543835538356383573835838359383603836138362383633836438365383663836738368383693837038371383723837338374383753837638377383783837938380383813838238383383843838538386383873838838389383903839138392383933839438395383963839738398383993840038401384023840338404384053840638407384083840938410384113841238413384143841538416384173841838419384203842138422384233842438425384263842738428384293843038431384323843338434384353843638437384383843938440384413844238443384443844538446384473844838449384503845138452384533845438455384563845738458384593846038461384623846338464384653846638467384683846938470384713847238473384743847538476384773847838479384803848138482384833848438485384863848738488384893849038491384923849338494384953849638497384983849938500385013850238503385043850538506385073850838509385103851138512385133851438515385163851738518385193852038521385223852338524385253852638527385283852938530385313853238533385343853538536385373853838539385403854138542385433854438545385463854738548385493855038551385523855338554385553855638557385583855938560385613856238563385643856538566385673856838569385703857138572385733857438575385763857738578385793858038581385823858338584385853858638587385883858938590385913859238593385943859538596385973859838599386003860138602386033860438605386063860738608386093861038611386123861338614386153861638617386183861938620386213862238623386243862538626386273862838629386303863138632386333863438635386363863738638386393864038641386423864338644386453864638647386483864938650386513865238653386543865538656386573865838659386603866138662386633866438665386663866738668386693867038671386723867338674386753867638677386783867938680386813868238683386843868538686386873868838689386903869138692386933869438695386963869738698386993870038701387023870338704387053870638707387083870938710387113871238713387143871538716387173871838719387203872138722387233872438725387263872738728387293873038731387323873338734387353873638737387383873938740387413874238743387443874538746387473874838749387503875138752387533875438755387563875738758387593876038761387623876338764387653876638767387683876938770387713877238773387743877538776387773877838779387803878138782387833878438785387863878738788387893879038791387923879338794387953879638797387983879938800388013880238803388043880538806388073880838809388103881138812388133881438815388163881738818388193882038821388223882338824388253882638827388283882938830388313883238833388343883538836388373883838839388403884138842388433884438845388463884738848388493885038851388523885338854388553885638857388583885938860388613886238863388643886538866388673886838869388703887138872388733887438875388763887738878388793888038881388823888338884388853888638887388883888938890388913889238893388943889538896388973889838899389003890138902389033890438905389063890738908389093891038911389123891338914389153891638917389183891938920389213892238923389243892538926389273892838929389303893138932389333893438935389363893738938389393894038941389423894338944389453894638947389483894938950389513895238953389543895538956389573895838959389603896138962389633896438965389663896738968389693897038971389723897338974389753897638977389783897938980389813898238983389843898538986389873898838989389903899138992389933899438995389963899738998389993900039001390023900339004390053900639007390083900939010390113901239013390143901539016390173901839019390203902139022390233902439025390263902739028390293903039031390323903339034390353903639037390383903939040390413904239043390443904539046390473904839049390503905139052390533905439055390563905739058390593906039061390623906339064390653906639067390683906939070390713907239073390743907539076390773907839079390803908139082390833908439085390863908739088390893909039091390923909339094390953909639097390983909939100391013910239103391043910539106391073910839109391103911139112391133911439115391163911739118391193912039121391223912339124391253912639127391283912939130391313913239133391343913539136391373913839139391403914139142391433914439145391463914739148391493915039151391523915339154391553915639157391583915939160391613916239163391643916539166391673916839169391703917139172391733917439175391763917739178391793918039181391823918339184391853918639187391883918939190391913919239193391943919539196391973919839199392003920139202392033920439205392063920739208392093921039211392123921339214392153921639217392183921939220392213922239223392243922539226392273922839229392303923139232392333923439235392363923739238392393924039241392423924339244392453924639247392483924939250392513925239253392543925539256392573925839259392603926139262392633926439265392663926739268392693927039271392723927339274392753927639277392783927939280392813928239283392843928539286392873928839289392903929139292392933929439295392963929739298392993930039301393023930339304393053930639307
  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/{sessionID}": {
  10191. "get": {
  10192. "tags": ["sessions"],
  10193. "operationId": "v2.session.get",
  10194. "parameters": [
  10195. {
  10196. "name": "sessionID",
  10197. "in": "path",
  10198. "schema": {
  10199. "type": "string",
  10200. "pattern": "^ses"
  10201. },
  10202. "required": true
  10203. }
  10204. ],
  10205. "security": [],
  10206. "responses": {
  10207. "200": {
  10208. "description": "Success",
  10209. "content": {
  10210. "application/json": {
  10211. "schema": {
  10212. "type": "object",
  10213. "properties": {
  10214. "data": {
  10215. "$ref": "#/components/schemas/SessionV2Info"
  10216. }
  10217. },
  10218. "required": ["data"],
  10219. "additionalProperties": false
  10220. }
  10221. }
  10222. }
  10223. },
  10224. "400": {
  10225. "description": "InvalidRequestError",
  10226. "content": {
  10227. "application/json": {
  10228. "schema": {
  10229. "$ref": "#/components/schemas/InvalidRequestError"
  10230. }
  10231. }
  10232. }
  10233. },
  10234. "401": {
  10235. "description": "UnauthorizedError",
  10236. "content": {
  10237. "application/json": {
  10238. "schema": {
  10239. "$ref": "#/components/schemas/UnauthorizedError"
  10240. }
  10241. }
  10242. }
  10243. },
  10244. "404": {
  10245. "description": "SessionNotFoundError",
  10246. "content": {
  10247. "application/json": {
  10248. "schema": {
  10249. "anyOf": [
  10250. {
  10251. "$ref": "#/components/schemas/SessionNotFoundError"
  10252. },
  10253. {
  10254. "$ref": "#/components/schemas/SessionNotFoundError"
  10255. }
  10256. ]
  10257. }
  10258. }
  10259. }
  10260. }
  10261. },
  10262. "description": "Retrieve a session by ID.",
  10263. "summary": "Get session",
  10264. "x-codeSamples": [
  10265. {
  10266. "lang": "js",
  10267. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.get({\n ...\n})"
  10268. }
  10269. ]
  10270. }
  10271. },
  10272. "/api/session/{sessionID}/agent": {
  10273. "post": {
  10274. "tags": ["sessions"],
  10275. "operationId": "v2.session.switchAgent",
  10276. "parameters": [
  10277. {
  10278. "name": "sessionID",
  10279. "in": "path",
  10280. "schema": {
  10281. "type": "string",
  10282. "pattern": "^ses"
  10283. },
  10284. "required": true
  10285. }
  10286. ],
  10287. "security": [],
  10288. "responses": {
  10289. "204": {
  10290. "description": "<No Content>"
  10291. },
  10292. "400": {
  10293. "description": "InvalidRequestError",
  10294. "content": {
  10295. "application/json": {
  10296. "schema": {
  10297. "$ref": "#/components/schemas/InvalidRequestError"
  10298. }
  10299. }
  10300. }
  10301. },
  10302. "401": {
  10303. "description": "UnauthorizedError",
  10304. "content": {
  10305. "application/json": {
  10306. "schema": {
  10307. "$ref": "#/components/schemas/UnauthorizedError"
  10308. }
  10309. }
  10310. }
  10311. },
  10312. "404": {
  10313. "description": "SessionNotFoundError",
  10314. "content": {
  10315. "application/json": {
  10316. "schema": {
  10317. "anyOf": [
  10318. {
  10319. "$ref": "#/components/schemas/SessionNotFoundError"
  10320. },
  10321. {
  10322. "$ref": "#/components/schemas/SessionNotFoundError"
  10323. }
  10324. ]
  10325. }
  10326. }
  10327. }
  10328. }
  10329. },
  10330. "description": "Switch the agent used by subsequent provider turns.",
  10331. "summary": "Switch session agent",
  10332. "requestBody": {
  10333. "content": {
  10334. "application/json": {
  10335. "schema": {
  10336. "type": "object",
  10337. "properties": {
  10338. "agent": {
  10339. "type": "string"
  10340. }
  10341. },
  10342. "required": ["agent"],
  10343. "additionalProperties": false
  10344. }
  10345. }
  10346. },
  10347. "required": true
  10348. },
  10349. "x-codeSamples": [
  10350. {
  10351. "lang": "js",
  10352. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.switchAgent({\n ...\n})"
  10353. }
  10354. ]
  10355. }
  10356. },
  10357. "/api/session/{sessionID}/model": {
  10358. "post": {
  10359. "tags": ["sessions"],
  10360. "operationId": "v2.session.switchModel",
  10361. "parameters": [
  10362. {
  10363. "name": "sessionID",
  10364. "in": "path",
  10365. "schema": {
  10366. "type": "string",
  10367. "pattern": "^ses"
  10368. },
  10369. "required": true
  10370. }
  10371. ],
  10372. "security": [],
  10373. "responses": {
  10374. "204": {
  10375. "description": "<No Content>"
  10376. },
  10377. "400": {
  10378. "description": "InvalidRequestError",
  10379. "content": {
  10380. "application/json": {
  10381. "schema": {
  10382. "$ref": "#/components/schemas/InvalidRequestError"
  10383. }
  10384. }
  10385. }
  10386. },
  10387. "401": {
  10388. "description": "UnauthorizedError",
  10389. "content": {
  10390. "application/json": {
  10391. "schema": {
  10392. "$ref": "#/components/schemas/UnauthorizedError"
  10393. }
  10394. }
  10395. }
  10396. },
  10397. "404": {
  10398. "description": "SessionNotFoundError",
  10399. "content": {
  10400. "application/json": {
  10401. "schema": {
  10402. "anyOf": [
  10403. {
  10404. "$ref": "#/components/schemas/SessionNotFoundError"
  10405. },
  10406. {
  10407. "$ref": "#/components/schemas/SessionNotFoundError"
  10408. }
  10409. ]
  10410. }
  10411. }
  10412. }
  10413. }
  10414. },
  10415. "description": "Switch the model used by subsequent provider turns.",
  10416. "summary": "Switch session model",
  10417. "requestBody": {
  10418. "content": {
  10419. "application/json": {
  10420. "schema": {
  10421. "type": "object",
  10422. "properties": {
  10423. "model": {
  10424. "$ref": "#/components/schemas/ModelRef"
  10425. }
  10426. },
  10427. "required": ["model"],
  10428. "additionalProperties": false
  10429. }
  10430. }
  10431. },
  10432. "required": true
  10433. },
  10434. "x-codeSamples": [
  10435. {
  10436. "lang": "js",
  10437. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.switchModel({\n ...\n})"
  10438. }
  10439. ]
  10440. }
  10441. },
  10442. "/api/session/{sessionID}/prompt": {
  10443. "post": {
  10444. "tags": ["sessions"],
  10445. "operationId": "v2.session.prompt",
  10446. "parameters": [
  10447. {
  10448. "name": "sessionID",
  10449. "in": "path",
  10450. "schema": {
  10451. "type": "string",
  10452. "pattern": "^ses"
  10453. },
  10454. "required": true
  10455. }
  10456. ],
  10457. "security": [],
  10458. "responses": {
  10459. "200": {
  10460. "description": "Success",
  10461. "content": {
  10462. "application/json": {
  10463. "schema": {
  10464. "type": "object",
  10465. "properties": {
  10466. "data": {
  10467. "$ref": "#/components/schemas/SessionInputAdmitted"
  10468. }
  10469. },
  10470. "required": ["data"],
  10471. "additionalProperties": false
  10472. }
  10473. }
  10474. }
  10475. },
  10476. "400": {
  10477. "description": "InvalidRequestError",
  10478. "content": {
  10479. "application/json": {
  10480. "schema": {
  10481. "$ref": "#/components/schemas/InvalidRequestError"
  10482. }
  10483. }
  10484. }
  10485. },
  10486. "401": {
  10487. "description": "UnauthorizedError",
  10488. "content": {
  10489. "application/json": {
  10490. "schema": {
  10491. "$ref": "#/components/schemas/UnauthorizedError"
  10492. }
  10493. }
  10494. }
  10495. },
  10496. "404": {
  10497. "description": "SessionNotFoundError",
  10498. "content": {
  10499. "application/json": {
  10500. "schema": {
  10501. "anyOf": [
  10502. {
  10503. "$ref": "#/components/schemas/SessionNotFoundError"
  10504. },
  10505. {
  10506. "$ref": "#/components/schemas/SessionNotFoundError"
  10507. }
  10508. ]
  10509. }
  10510. }
  10511. }
  10512. },
  10513. "409": {
  10514. "description": "ConflictError",
  10515. "content": {
  10516. "application/json": {
  10517. "schema": {
  10518. "$ref": "#/components/schemas/ConflictError"
  10519. }
  10520. }
  10521. }
  10522. }
  10523. },
  10524. "description": "Durably admit one session input and schedule agent-loop execution unless resume is false.",
  10525. "summary": "Send message",
  10526. "requestBody": {
  10527. "content": {
  10528. "application/json": {
  10529. "schema": {
  10530. "type": "object",
  10531. "properties": {
  10532. "id": {
  10533. "type": "string",
  10534. "pattern": "^msg_"
  10535. },
  10536. "prompt": {
  10537. "$ref": "#/components/schemas/Prompt"
  10538. },
  10539. "delivery": {
  10540. "type": "string",
  10541. "enum": ["steer", "queue"]
  10542. },
  10543. "resume": {
  10544. "type": "boolean"
  10545. }
  10546. },
  10547. "required": ["prompt"],
  10548. "additionalProperties": false
  10549. }
  10550. }
  10551. },
  10552. "required": true
  10553. },
  10554. "x-codeSamples": [
  10555. {
  10556. "lang": "js",
  10557. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  10558. }
  10559. ]
  10560. }
  10561. },
  10562. "/api/session/{sessionID}/compact": {
  10563. "post": {
  10564. "tags": ["sessions"],
  10565. "operationId": "v2.session.compact",
  10566. "parameters": [
  10567. {
  10568. "name": "sessionID",
  10569. "in": "path",
  10570. "schema": {
  10571. "type": "string",
  10572. "pattern": "^ses"
  10573. },
  10574. "required": true
  10575. }
  10576. ],
  10577. "security": [],
  10578. "responses": {
  10579. "204": {
  10580. "description": "<No Content>"
  10581. },
  10582. "400": {
  10583. "description": "InvalidRequestError",
  10584. "content": {
  10585. "application/json": {
  10586. "schema": {
  10587. "$ref": "#/components/schemas/InvalidRequestError"
  10588. }
  10589. }
  10590. }
  10591. },
  10592. "401": {
  10593. "description": "UnauthorizedError",
  10594. "content": {
  10595. "application/json": {
  10596. "schema": {
  10597. "$ref": "#/components/schemas/UnauthorizedError"
  10598. }
  10599. }
  10600. }
  10601. },
  10602. "404": {
  10603. "description": "SessionNotFoundError",
  10604. "content": {
  10605. "application/json": {
  10606. "schema": {
  10607. "anyOf": [
  10608. {
  10609. "$ref": "#/components/schemas/SessionNotFoundError"
  10610. },
  10611. {
  10612. "$ref": "#/components/schemas/SessionNotFoundError"
  10613. }
  10614. ]
  10615. }
  10616. }
  10617. }
  10618. },
  10619. "503": {
  10620. "description": "ServiceUnavailableError",
  10621. "content": {
  10622. "application/json": {
  10623. "schema": {
  10624. "$ref": "#/components/schemas/ServiceUnavailableError"
  10625. }
  10626. }
  10627. }
  10628. }
  10629. },
  10630. "description": "Compact a session conversation.",
  10631. "summary": "Compact session",
  10632. "x-codeSamples": [
  10633. {
  10634. "lang": "js",
  10635. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  10636. }
  10637. ]
  10638. }
  10639. },
  10640. "/api/session/{sessionID}/wait": {
  10641. "post": {
  10642. "tags": ["sessions"],
  10643. "operationId": "v2.session.wait",
  10644. "parameters": [
  10645. {
  10646. "name": "sessionID",
  10647. "in": "path",
  10648. "schema": {
  10649. "type": "string",
  10650. "pattern": "^ses"
  10651. },
  10652. "required": true
  10653. }
  10654. ],
  10655. "security": [],
  10656. "responses": {
  10657. "204": {
  10658. "description": "<No Content>"
  10659. },
  10660. "400": {
  10661. "description": "InvalidRequestError",
  10662. "content": {
  10663. "application/json": {
  10664. "schema": {
  10665. "$ref": "#/components/schemas/InvalidRequestError"
  10666. }
  10667. }
  10668. }
  10669. },
  10670. "401": {
  10671. "description": "UnauthorizedError",
  10672. "content": {
  10673. "application/json": {
  10674. "schema": {
  10675. "$ref": "#/components/schemas/UnauthorizedError"
  10676. }
  10677. }
  10678. }
  10679. },
  10680. "404": {
  10681. "description": "SessionNotFoundError",
  10682. "content": {
  10683. "application/json": {
  10684. "schema": {
  10685. "anyOf": [
  10686. {
  10687. "$ref": "#/components/schemas/SessionNotFoundError"
  10688. },
  10689. {
  10690. "$ref": "#/components/schemas/SessionNotFoundError"
  10691. }
  10692. ]
  10693. }
  10694. }
  10695. }
  10696. },
  10697. "503": {
  10698. "description": "ServiceUnavailableError",
  10699. "content": {
  10700. "application/json": {
  10701. "schema": {
  10702. "$ref": "#/components/schemas/ServiceUnavailableError"
  10703. }
  10704. }
  10705. }
  10706. }
  10707. },
  10708. "description": "Wait for a session agent loop to become idle.",
  10709. "summary": "Wait for session",
  10710. "x-codeSamples": [
  10711. {
  10712. "lang": "js",
  10713. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  10714. }
  10715. ]
  10716. }
  10717. },
  10718. "/api/session/{sessionID}/revert/stage": {
  10719. "post": {
  10720. "tags": ["sessions"],
  10721. "operationId": "v2.session.revert.stage",
  10722. "parameters": [
  10723. {
  10724. "name": "sessionID",
  10725. "in": "path",
  10726. "schema": {
  10727. "type": "string",
  10728. "pattern": "^ses"
  10729. },
  10730. "required": true
  10731. }
  10732. ],
  10733. "security": [],
  10734. "responses": {
  10735. "200": {
  10736. "description": "Success",
  10737. "content": {
  10738. "application/json": {
  10739. "schema": {
  10740. "type": "object",
  10741. "properties": {
  10742. "data": {
  10743. "$ref": "#/components/schemas/RevertState"
  10744. }
  10745. },
  10746. "required": ["data"],
  10747. "additionalProperties": false
  10748. }
  10749. }
  10750. }
  10751. },
  10752. "400": {
  10753. "description": "InvalidRequestError",
  10754. "content": {
  10755. "application/json": {
  10756. "schema": {
  10757. "$ref": "#/components/schemas/InvalidRequestError"
  10758. }
  10759. }
  10760. }
  10761. },
  10762. "401": {
  10763. "description": "UnauthorizedError",
  10764. "content": {
  10765. "application/json": {
  10766. "schema": {
  10767. "$ref": "#/components/schemas/UnauthorizedError"
  10768. }
  10769. }
  10770. }
  10771. },
  10772. "404": {
  10773. "description": "MessageNotFoundError | SessionNotFoundError",
  10774. "content": {
  10775. "application/json": {
  10776. "schema": {
  10777. "anyOf": [
  10778. {
  10779. "$ref": "#/components/schemas/MessageNotFoundError"
  10780. },
  10781. {
  10782. "$ref": "#/components/schemas/SessionNotFoundError"
  10783. },
  10784. {
  10785. "$ref": "#/components/schemas/SessionNotFoundError"
  10786. }
  10787. ]
  10788. }
  10789. }
  10790. }
  10791. },
  10792. "500": {
  10793. "description": "UnknownError",
  10794. "content": {
  10795. "application/json": {
  10796. "schema": {
  10797. "$ref": "#/components/schemas/UnknownError1"
  10798. }
  10799. }
  10800. }
  10801. }
  10802. },
  10803. "description": "Stage or move a reversible session boundary and optionally apply its file changes.",
  10804. "summary": "Stage session revert",
  10805. "requestBody": {
  10806. "content": {
  10807. "application/json": {
  10808. "schema": {
  10809. "type": "object",
  10810. "properties": {
  10811. "messageID": {
  10812. "type": "string",
  10813. "pattern": "^msg_"
  10814. },
  10815. "files": {
  10816. "type": "boolean"
  10817. }
  10818. },
  10819. "required": ["messageID"],
  10820. "additionalProperties": false
  10821. }
  10822. }
  10823. },
  10824. "required": true
  10825. },
  10826. "x-codeSamples": [
  10827. {
  10828. "lang": "js",
  10829. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.revert.stage({\n ...\n})"
  10830. }
  10831. ]
  10832. }
  10833. },
  10834. "/api/session/{sessionID}/revert/clear": {
  10835. "post": {
  10836. "tags": ["sessions"],
  10837. "operationId": "v2.session.revert.clear",
  10838. "parameters": [
  10839. {
  10840. "name": "sessionID",
  10841. "in": "path",
  10842. "schema": {
  10843. "type": "string",
  10844. "pattern": "^ses"
  10845. },
  10846. "required": true
  10847. }
  10848. ],
  10849. "security": [],
  10850. "responses": {
  10851. "204": {
  10852. "description": "<No Content>"
  10853. },
  10854. "400": {
  10855. "description": "InvalidRequestError",
  10856. "content": {
  10857. "application/json": {
  10858. "schema": {
  10859. "$ref": "#/components/schemas/InvalidRequestError"
  10860. }
  10861. }
  10862. }
  10863. },
  10864. "401": {
  10865. "description": "UnauthorizedError",
  10866. "content": {
  10867. "application/json": {
  10868. "schema": {
  10869. "$ref": "#/components/schemas/UnauthorizedError"
  10870. }
  10871. }
  10872. }
  10873. },
  10874. "404": {
  10875. "description": "SessionNotFoundError",
  10876. "content": {
  10877. "application/json": {
  10878. "schema": {
  10879. "anyOf": [
  10880. {
  10881. "$ref": "#/components/schemas/SessionNotFoundError"
  10882. },
  10883. {
  10884. "$ref": "#/components/schemas/SessionNotFoundError"
  10885. }
  10886. ]
  10887. }
  10888. }
  10889. }
  10890. },
  10891. "500": {
  10892. "description": "UnknownError",
  10893. "content": {
  10894. "application/json": {
  10895. "schema": {
  10896. "$ref": "#/components/schemas/UnknownError1"
  10897. }
  10898. }
  10899. }
  10900. }
  10901. },
  10902. "summary": "Clear staged revert",
  10903. "x-codeSamples": [
  10904. {
  10905. "lang": "js",
  10906. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.revert.clear({\n ...\n})"
  10907. }
  10908. ]
  10909. }
  10910. },
  10911. "/api/session/{sessionID}/revert/commit": {
  10912. "post": {
  10913. "tags": ["sessions"],
  10914. "operationId": "v2.session.revert.commit",
  10915. "parameters": [
  10916. {
  10917. "name": "sessionID",
  10918. "in": "path",
  10919. "schema": {
  10920. "type": "string",
  10921. "pattern": "^ses"
  10922. },
  10923. "required": true
  10924. }
  10925. ],
  10926. "security": [],
  10927. "responses": {
  10928. "204": {
  10929. "description": "<No Content>"
  10930. },
  10931. "400": {
  10932. "description": "InvalidRequestError",
  10933. "content": {
  10934. "application/json": {
  10935. "schema": {
  10936. "$ref": "#/components/schemas/InvalidRequestError"
  10937. }
  10938. }
  10939. }
  10940. },
  10941. "401": {
  10942. "description": "UnauthorizedError",
  10943. "content": {
  10944. "application/json": {
  10945. "schema": {
  10946. "$ref": "#/components/schemas/UnauthorizedError"
  10947. }
  10948. }
  10949. }
  10950. },
  10951. "404": {
  10952. "description": "SessionNotFoundError",
  10953. "content": {
  10954. "application/json": {
  10955. "schema": {
  10956. "anyOf": [
  10957. {
  10958. "$ref": "#/components/schemas/SessionNotFoundError"
  10959. },
  10960. {
  10961. "$ref": "#/components/schemas/SessionNotFoundError"
  10962. }
  10963. ]
  10964. }
  10965. }
  10966. }
  10967. }
  10968. },
  10969. "summary": "Commit staged revert",
  10970. "x-codeSamples": [
  10971. {
  10972. "lang": "js",
  10973. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.revert.commit({\n ...\n})"
  10974. }
  10975. ]
  10976. }
  10977. },
  10978. "/api/session/{sessionID}/context": {
  10979. "get": {
  10980. "tags": ["sessions"],
  10981. "operationId": "v2.session.context",
  10982. "parameters": [
  10983. {
  10984. "name": "sessionID",
  10985. "in": "path",
  10986. "schema": {
  10987. "type": "string",
  10988. "pattern": "^ses"
  10989. },
  10990. "required": true
  10991. }
  10992. ],
  10993. "security": [],
  10994. "responses": {
  10995. "200": {
  10996. "description": "Success",
  10997. "content": {
  10998. "application/json": {
  10999. "schema": {
  11000. "type": "object",
  11001. "properties": {
  11002. "data": {
  11003. "type": "array",
  11004. "items": {
  11005. "$ref": "#/components/schemas/SessionMessage"
  11006. }
  11007. }
  11008. },
  11009. "required": ["data"],
  11010. "additionalProperties": false
  11011. }
  11012. }
  11013. }
  11014. },
  11015. "400": {
  11016. "description": "InvalidRequestError",
  11017. "content": {
  11018. "application/json": {
  11019. "schema": {
  11020. "$ref": "#/components/schemas/InvalidRequestError"
  11021. }
  11022. }
  11023. }
  11024. },
  11025. "401": {
  11026. "description": "UnauthorizedError",
  11027. "content": {
  11028. "application/json": {
  11029. "schema": {
  11030. "$ref": "#/components/schemas/UnauthorizedError"
  11031. }
  11032. }
  11033. }
  11034. },
  11035. "404": {
  11036. "description": "SessionNotFoundError",
  11037. "content": {
  11038. "application/json": {
  11039. "schema": {
  11040. "anyOf": [
  11041. {
  11042. "$ref": "#/components/schemas/SessionNotFoundError"
  11043. },
  11044. {
  11045. "$ref": "#/components/schemas/SessionNotFoundError"
  11046. }
  11047. ]
  11048. }
  11049. }
  11050. }
  11051. },
  11052. "500": {
  11053. "description": "UnknownError",
  11054. "content": {
  11055. "application/json": {
  11056. "schema": {
  11057. "$ref": "#/components/schemas/UnknownError1"
  11058. }
  11059. }
  11060. }
  11061. }
  11062. },
  11063. "description": "Retrieve the active context messages for a session (all messages after the last compaction).",
  11064. "summary": "Get session context",
  11065. "x-codeSamples": [
  11066. {
  11067. "lang": "js",
  11068. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  11069. }
  11070. ]
  11071. }
  11072. },
  11073. "/api/session/{sessionID}/event": {
  11074. "get": {
  11075. "tags": ["sessions"],
  11076. "operationId": "v2.session.events",
  11077. "parameters": [
  11078. {
  11079. "name": "sessionID",
  11080. "in": "path",
  11081. "schema": {
  11082. "type": "string",
  11083. "pattern": "^ses"
  11084. },
  11085. "required": true
  11086. },
  11087. {
  11088. "name": "after",
  11089. "in": "query",
  11090. "schema": {
  11091. "type": "string"
  11092. },
  11093. "required": false
  11094. }
  11095. ],
  11096. "security": [],
  11097. "responses": {
  11098. "200": {
  11099. "description": "Success",
  11100. "content": {
  11101. "text/event-stream": {
  11102. "schema": {
  11103. "type": "object",
  11104. "properties": {
  11105. "id": {
  11106. "type": "string"
  11107. },
  11108. "event": {
  11109. "type": "string"
  11110. },
  11111. "data": {
  11112. "type": "string",
  11113. "contentSchema": {
  11114. "oneOf": [
  11115. {
  11116. "$ref": "#/components/schemas/SessionNextAgentSwitched"
  11117. },
  11118. {
  11119. "$ref": "#/components/schemas/SessionNextModelSwitched"
  11120. },
  11121. {
  11122. "$ref": "#/components/schemas/SessionNextMoved"
  11123. },
  11124. {
  11125. "$ref": "#/components/schemas/SessionNextPrompted"
  11126. },
  11127. {
  11128. "$ref": "#/components/schemas/SessionNextPromptAdmitted"
  11129. },
  11130. {
  11131. "$ref": "#/components/schemas/SessionNextContextUpdated"
  11132. },
  11133. {
  11134. "$ref": "#/components/schemas/SessionNextSynthetic"
  11135. },
  11136. {
  11137. "$ref": "#/components/schemas/SessionNextShellStarted"
  11138. },
  11139. {
  11140. "$ref": "#/components/schemas/SessionNextShellEnded"
  11141. },
  11142. {
  11143. "$ref": "#/components/schemas/SessionNextStepStarted"
  11144. },
  11145. {
  11146. "$ref": "#/components/schemas/SessionNextStepEnded"
  11147. },
  11148. {
  11149. "$ref": "#/components/schemas/SessionNextStepFailed"
  11150. },
  11151. {
  11152. "$ref": "#/components/schemas/SessionNextTextStarted"
  11153. },
  11154. {
  11155. "$ref": "#/components/schemas/SessionNextTextEnded"
  11156. },
  11157. {
  11158. "$ref": "#/components/schemas/SessionNextToolInputStarted"
  11159. },
  11160. {
  11161. "$ref": "#/components/schemas/SessionNextToolInputEnded"
  11162. },
  11163. {
  11164. "$ref": "#/components/schemas/SessionNextToolCalled"
  11165. },
  11166. {
  11167. "$ref": "#/components/schemas/SessionNextToolProgress"
  11168. },
  11169. {
  11170. "$ref": "#/components/schemas/SessionNextToolSuccess"
  11171. },
  11172. {
  11173. "$ref": "#/components/schemas/SessionNextToolFailed"
  11174. },
  11175. {
  11176. "$ref": "#/components/schemas/SessionNextReasoningStarted"
  11177. },
  11178. {
  11179. "$ref": "#/components/schemas/SessionNextReasoningEnded"
  11180. },
  11181. {
  11182. "$ref": "#/components/schemas/SessionNextRetried"
  11183. },
  11184. {
  11185. "$ref": "#/components/schemas/SessionNextCompactionStarted"
  11186. },
  11187. {
  11188. "$ref": "#/components/schemas/SessionNextCompactionEnded"
  11189. },
  11190. {
  11191. "$ref": "#/components/schemas/SessionNextRevertStaged"
  11192. },
  11193. {
  11194. "$ref": "#/components/schemas/SessionNextRevertCleared"
  11195. },
  11196. {
  11197. "$ref": "#/components/schemas/SessionNextRevertCommitted"
  11198. }
  11199. ]
  11200. },
  11201. "contentMediaType": "application/json"
  11202. }
  11203. },
  11204. "required": ["id", "event", "data"],
  11205. "additionalProperties": false
  11206. },
  11207. "x-effect-stream": {
  11208. "encoding": "sse",
  11209. "causeSchema": {
  11210. "type": "array",
  11211. "items": {
  11212. "anyOf": [
  11213. {
  11214. "type": "object",
  11215. "properties": {
  11216. "_tag": {
  11217. "type": "string",
  11218. "enum": ["Fail"]
  11219. },
  11220. "error": {
  11221. "not": {}
  11222. }
  11223. },
  11224. "required": ["_tag", "error"],
  11225. "additionalProperties": false
  11226. },
  11227. {
  11228. "type": "object",
  11229. "properties": {
  11230. "_tag": {
  11231. "type": "string",
  11232. "enum": ["Die"]
  11233. },
  11234. "defect": {}
  11235. },
  11236. "required": ["_tag", "defect"],
  11237. "additionalProperties": false
  11238. },
  11239. {
  11240. "type": "object",
  11241. "properties": {
  11242. "_tag": {
  11243. "type": "string",
  11244. "enum": ["Interrupt"]
  11245. },
  11246. "fiberId": {
  11247. "anyOf": [
  11248. {
  11249. "type": "number"
  11250. },
  11251. {
  11252. "type": "null"
  11253. }
  11254. ]
  11255. }
  11256. },
  11257. "required": ["_tag", "fiberId"],
  11258. "additionalProperties": false
  11259. }
  11260. ]
  11261. }
  11262. },
  11263. "errorSchema": {
  11264. "not": {}
  11265. },
  11266. "failureEvent": "effect/httpapi/stream/failure"
  11267. }
  11268. }
  11269. }
  11270. },
  11271. "400": {
  11272. "description": "InvalidRequestError",
  11273. "content": {
  11274. "application/json": {
  11275. "schema": {
  11276. "$ref": "#/components/schemas/InvalidRequestError"
  11277. }
  11278. }
  11279. }
  11280. },
  11281. "401": {
  11282. "description": "UnauthorizedError",
  11283. "content": {
  11284. "application/json": {
  11285. "schema": {
  11286. "$ref": "#/components/schemas/UnauthorizedError"
  11287. }
  11288. }
  11289. }
  11290. },
  11291. "404": {
  11292. "description": "SessionNotFoundError",
  11293. "content": {
  11294. "application/json": {
  11295. "schema": {
  11296. "anyOf": [
  11297. {
  11298. "$ref": "#/components/schemas/SessionNotFoundError"
  11299. },
  11300. {
  11301. "$ref": "#/components/schemas/SessionNotFoundError"
  11302. }
  11303. ]
  11304. }
  11305. }
  11306. }
  11307. }
  11308. },
  11309. "description": "Replay durable events after an aggregate sequence, then continue with new durable events.",
  11310. "summary": "Subscribe to session events",
  11311. "x-codeSamples": [
  11312. {
  11313. "lang": "js",
  11314. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.events({\n ...\n})"
  11315. }
  11316. ]
  11317. }
  11318. },
  11319. "/api/session/{sessionID}/interrupt": {
  11320. "post": {
  11321. "tags": ["sessions"],
  11322. "operationId": "v2.session.interrupt",
  11323. "parameters": [
  11324. {
  11325. "name": "sessionID",
  11326. "in": "path",
  11327. "schema": {
  11328. "type": "string",
  11329. "pattern": "^ses"
  11330. },
  11331. "required": true
  11332. }
  11333. ],
  11334. "security": [],
  11335. "responses": {
  11336. "204": {
  11337. "description": "<No Content>"
  11338. },
  11339. "400": {
  11340. "description": "InvalidRequestError",
  11341. "content": {
  11342. "application/json": {
  11343. "schema": {
  11344. "$ref": "#/components/schemas/InvalidRequestError"
  11345. }
  11346. }
  11347. }
  11348. },
  11349. "401": {
  11350. "description": "UnauthorizedError",
  11351. "content": {
  11352. "application/json": {
  11353. "schema": {
  11354. "$ref": "#/components/schemas/UnauthorizedError"
  11355. }
  11356. }
  11357. }
  11358. },
  11359. "404": {
  11360. "description": "SessionNotFoundError",
  11361. "content": {
  11362. "application/json": {
  11363. "schema": {
  11364. "anyOf": [
  11365. {
  11366. "$ref": "#/components/schemas/SessionNotFoundError"
  11367. },
  11368. {
  11369. "$ref": "#/components/schemas/SessionNotFoundError"
  11370. }
  11371. ]
  11372. }
  11373. }
  11374. }
  11375. }
  11376. },
  11377. "description": "Interrupt active execution owned by this OpenCode process. Idle interruption is a no-op.",
  11378. "summary": "Interrupt session execution",
  11379. "x-codeSamples": [
  11380. {
  11381. "lang": "js",
  11382. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.interrupt({\n ...\n})"
  11383. }
  11384. ]
  11385. }
  11386. },
  11387. "/api/session/{sessionID}/message/{messageID}": {
  11388. "get": {
  11389. "tags": ["sessions"],
  11390. "operationId": "v2.session.message",
  11391. "parameters": [
  11392. {
  11393. "name": "sessionID",
  11394. "in": "path",
  11395. "schema": {
  11396. "type": "string",
  11397. "pattern": "^ses"
  11398. },
  11399. "required": true
  11400. },
  11401. {
  11402. "name": "messageID",
  11403. "in": "path",
  11404. "schema": {
  11405. "type": "string",
  11406. "pattern": "^msg_"
  11407. },
  11408. "required": true
  11409. }
  11410. ],
  11411. "security": [],
  11412. "responses": {
  11413. "200": {
  11414. "description": "Success",
  11415. "content": {
  11416. "application/json": {
  11417. "schema": {
  11418. "type": "object",
  11419. "properties": {
  11420. "data": {
  11421. "$ref": "#/components/schemas/SessionMessage"
  11422. }
  11423. },
  11424. "required": ["data"],
  11425. "additionalProperties": false
  11426. }
  11427. }
  11428. }
  11429. },
  11430. "400": {
  11431. "description": "InvalidRequestError",
  11432. "content": {
  11433. "application/json": {
  11434. "schema": {
  11435. "$ref": "#/components/schemas/InvalidRequestError"
  11436. }
  11437. }
  11438. }
  11439. },
  11440. "401": {
  11441. "description": "UnauthorizedError",
  11442. "content": {
  11443. "application/json": {
  11444. "schema": {
  11445. "$ref": "#/components/schemas/UnauthorizedError"
  11446. }
  11447. }
  11448. }
  11449. },
  11450. "404": {
  11451. "description": "SessionNotFoundError | MessageNotFoundError",
  11452. "content": {
  11453. "application/json": {
  11454. "schema": {
  11455. "anyOf": [
  11456. {
  11457. "$ref": "#/components/schemas/MessageNotFoundError"
  11458. },
  11459. {
  11460. "$ref": "#/components/schemas/SessionNotFoundError"
  11461. },
  11462. {
  11463. "$ref": "#/components/schemas/SessionNotFoundError"
  11464. }
  11465. ]
  11466. }
  11467. }
  11468. }
  11469. }
  11470. },
  11471. "description": "Retrieve one projected message owned by the Session.",
  11472. "summary": "Get session message",
  11473. "x-codeSamples": [
  11474. {
  11475. "lang": "js",
  11476. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.message({\n ...\n})"
  11477. }
  11478. ]
  11479. }
  11480. },
  11481. "/api/session/{sessionID}/message": {
  11482. "get": {
  11483. "tags": ["messages"],
  11484. "operationId": "v2.session.messages",
  11485. "parameters": [
  11486. {
  11487. "name": "sessionID",
  11488. "in": "path",
  11489. "schema": {
  11490. "type": "string",
  11491. "pattern": "^ses"
  11492. },
  11493. "required": true
  11494. },
  11495. {
  11496. "name": "limit",
  11497. "in": "query",
  11498. "schema": {
  11499. "type": "number"
  11500. },
  11501. "required": false
  11502. },
  11503. {
  11504. "name": "order",
  11505. "in": "query",
  11506. "schema": {
  11507. "type": "string",
  11508. "enum": ["asc", "desc"]
  11509. },
  11510. "required": false
  11511. },
  11512. {
  11513. "name": "cursor",
  11514. "in": "query",
  11515. "schema": {
  11516. "type": "string",
  11517. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."
  11518. },
  11519. "required": false
  11520. }
  11521. ],
  11522. "security": [],
  11523. "responses": {
  11524. "200": {
  11525. "description": "SessionMessagesResponse",
  11526. "content": {
  11527. "application/json": {
  11528. "schema": {
  11529. "$ref": "#/components/schemas/SessionMessagesResponse"
  11530. }
  11531. }
  11532. }
  11533. },
  11534. "400": {
  11535. "description": "InvalidCursorError | InvalidRequestError",
  11536. "content": {
  11537. "application/json": {
  11538. "schema": {
  11539. "anyOf": [
  11540. {
  11541. "$ref": "#/components/schemas/InvalidCursorError"
  11542. },
  11543. {
  11544. "$ref": "#/components/schemas/InvalidRequestError"
  11545. }
  11546. ]
  11547. }
  11548. }
  11549. }
  11550. },
  11551. "401": {
  11552. "description": "UnauthorizedError",
  11553. "content": {
  11554. "application/json": {
  11555. "schema": {
  11556. "$ref": "#/components/schemas/UnauthorizedError"
  11557. }
  11558. }
  11559. }
  11560. },
  11561. "404": {
  11562. "description": "SessionNotFoundError",
  11563. "content": {
  11564. "application/json": {
  11565. "schema": {
  11566. "anyOf": [
  11567. {
  11568. "$ref": "#/components/schemas/SessionNotFoundError"
  11569. },
  11570. {
  11571. "$ref": "#/components/schemas/SessionNotFoundError"
  11572. }
  11573. ]
  11574. }
  11575. }
  11576. }
  11577. },
  11578. "500": {
  11579. "description": "UnknownError",
  11580. "content": {
  11581. "application/json": {
  11582. "schema": {
  11583. "$ref": "#/components/schemas/UnknownError1"
  11584. }
  11585. }
  11586. }
  11587. }
  11588. },
  11589. "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.",
  11590. "summary": "Get session messages",
  11591. "x-codeSamples": [
  11592. {
  11593. "lang": "js",
  11594. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  11595. }
  11596. ]
  11597. }
  11598. },
  11599. "/api/model": {
  11600. "get": {
  11601. "tags": ["models"],
  11602. "operationId": "v2.model.list",
  11603. "parameters": [
  11604. {
  11605. "name": "location",
  11606. "in": "query",
  11607. "schema": {
  11608. "type": "object",
  11609. "properties": {
  11610. "directory": {
  11611. "type": "string"
  11612. },
  11613. "workspace": {
  11614. "type": "string"
  11615. }
  11616. },
  11617. "additionalProperties": false
  11618. },
  11619. "required": false,
  11620. "style": "deepObject",
  11621. "explode": true
  11622. }
  11623. ],
  11624. "security": [],
  11625. "responses": {
  11626. "200": {
  11627. "description": "Success",
  11628. "content": {
  11629. "application/json": {
  11630. "schema": {
  11631. "type": "object",
  11632. "properties": {
  11633. "location": {
  11634. "$ref": "#/components/schemas/LocationInfo"
  11635. },
  11636. "data": {
  11637. "type": "array",
  11638. "items": {
  11639. "$ref": "#/components/schemas/ModelV2Info"
  11640. }
  11641. }
  11642. },
  11643. "required": ["location", "data"],
  11644. "additionalProperties": false
  11645. }
  11646. }
  11647. }
  11648. },
  11649. "400": {
  11650. "description": "InvalidRequestError",
  11651. "content": {
  11652. "application/json": {
  11653. "schema": {
  11654. "$ref": "#/components/schemas/InvalidRequestError"
  11655. }
  11656. }
  11657. }
  11658. },
  11659. "401": {
  11660. "description": "UnauthorizedError",
  11661. "content": {
  11662. "application/json": {
  11663. "schema": {
  11664. "$ref": "#/components/schemas/UnauthorizedError"
  11665. }
  11666. }
  11667. }
  11668. },
  11669. "503": {
  11670. "description": "ServiceUnavailableError",
  11671. "content": {
  11672. "application/json": {
  11673. "schema": {
  11674. "$ref": "#/components/schemas/ServiceUnavailableError"
  11675. }
  11676. }
  11677. }
  11678. }
  11679. },
  11680. "description": "Retrieve available models ordered by release date.",
  11681. "summary": "List models",
  11682. "x-codeSamples": [
  11683. {
  11684. "lang": "js",
  11685. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.model.list({\n ...\n})"
  11686. }
  11687. ]
  11688. }
  11689. },
  11690. "/api/provider": {
  11691. "get": {
  11692. "tags": ["providers"],
  11693. "operationId": "v2.provider.list",
  11694. "parameters": [
  11695. {
  11696. "name": "location",
  11697. "in": "query",
  11698. "schema": {
  11699. "type": "object",
  11700. "properties": {
  11701. "directory": {
  11702. "type": "string"
  11703. },
  11704. "workspace": {
  11705. "type": "string"
  11706. }
  11707. },
  11708. "additionalProperties": false
  11709. },
  11710. "required": false,
  11711. "style": "deepObject",
  11712. "explode": true
  11713. }
  11714. ],
  11715. "security": [],
  11716. "responses": {
  11717. "200": {
  11718. "description": "Success",
  11719. "content": {
  11720. "application/json": {
  11721. "schema": {
  11722. "type": "object",
  11723. "properties": {
  11724. "location": {
  11725. "$ref": "#/components/schemas/LocationInfo"
  11726. },
  11727. "data": {
  11728. "type": "array",
  11729. "items": {
  11730. "$ref": "#/components/schemas/ProviderV2Info"
  11731. }
  11732. }
  11733. },
  11734. "required": ["location", "data"],
  11735. "additionalProperties": false
  11736. }
  11737. }
  11738. }
  11739. },
  11740. "400": {
  11741. "description": "InvalidRequestError",
  11742. "content": {
  11743. "application/json": {
  11744. "schema": {
  11745. "$ref": "#/components/schemas/InvalidRequestError"
  11746. }
  11747. }
  11748. }
  11749. },
  11750. "401": {
  11751. "description": "UnauthorizedError",
  11752. "content": {
  11753. "application/json": {
  11754. "schema": {
  11755. "$ref": "#/components/schemas/UnauthorizedError"
  11756. }
  11757. }
  11758. }
  11759. },
  11760. "503": {
  11761. "description": "ServiceUnavailableError",
  11762. "content": {
  11763. "application/json": {
  11764. "schema": {
  11765. "$ref": "#/components/schemas/ServiceUnavailableError"
  11766. }
  11767. }
  11768. }
  11769. }
  11770. },
  11771. "description": "Retrieve active AI providers so clients can show provider availability and configuration.",
  11772. "summary": "List providers",
  11773. "x-codeSamples": [
  11774. {
  11775. "lang": "js",
  11776. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.list({\n ...\n})"
  11777. }
  11778. ]
  11779. }
  11780. },
  11781. "/api/provider/{providerID}": {
  11782. "get": {
  11783. "tags": ["providers"],
  11784. "operationId": "v2.provider.get",
  11785. "parameters": [
  11786. {
  11787. "name": "providerID",
  11788. "in": "path",
  11789. "schema": {
  11790. "type": "string"
  11791. },
  11792. "required": true
  11793. },
  11794. {
  11795. "name": "location",
  11796. "in": "query",
  11797. "schema": {
  11798. "type": "object",
  11799. "properties": {
  11800. "directory": {
  11801. "type": "string"
  11802. },
  11803. "workspace": {
  11804. "type": "string"
  11805. }
  11806. },
  11807. "additionalProperties": false
  11808. },
  11809. "required": false,
  11810. "style": "deepObject",
  11811. "explode": true
  11812. }
  11813. ],
  11814. "security": [],
  11815. "responses": {
  11816. "200": {
  11817. "description": "Success",
  11818. "content": {
  11819. "application/json": {
  11820. "schema": {
  11821. "type": "object",
  11822. "properties": {
  11823. "location": {
  11824. "$ref": "#/components/schemas/LocationInfo"
  11825. },
  11826. "data": {
  11827. "$ref": "#/components/schemas/ProviderV2Info"
  11828. }
  11829. },
  11830. "required": ["location", "data"],
  11831. "additionalProperties": false
  11832. }
  11833. }
  11834. }
  11835. },
  11836. "400": {
  11837. "description": "InvalidRequestError",
  11838. "content": {
  11839. "application/json": {
  11840. "schema": {
  11841. "$ref": "#/components/schemas/InvalidRequestError"
  11842. }
  11843. }
  11844. }
  11845. },
  11846. "401": {
  11847. "description": "UnauthorizedError",
  11848. "content": {
  11849. "application/json": {
  11850. "schema": {
  11851. "$ref": "#/components/schemas/UnauthorizedError"
  11852. }
  11853. }
  11854. }
  11855. },
  11856. "404": {
  11857. "description": "ProviderNotFoundError",
  11858. "content": {
  11859. "application/json": {
  11860. "schema": {
  11861. "$ref": "#/components/schemas/ProviderNotFoundError"
  11862. }
  11863. }
  11864. }
  11865. },
  11866. "503": {
  11867. "description": "ServiceUnavailableError",
  11868. "content": {
  11869. "application/json": {
  11870. "schema": {
  11871. "$ref": "#/components/schemas/ServiceUnavailableError"
  11872. }
  11873. }
  11874. }
  11875. }
  11876. },
  11877. "description": "Retrieve a single AI provider so clients can inspect its availability and endpoint settings.",
  11878. "summary": "Get provider",
  11879. "x-codeSamples": [
  11880. {
  11881. "lang": "js",
  11882. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.get({\n ...\n})"
  11883. }
  11884. ]
  11885. }
  11886. },
  11887. "/api/integration": {
  11888. "get": {
  11889. "tags": ["integrations"],
  11890. "operationId": "v2.integration.list",
  11891. "parameters": [
  11892. {
  11893. "name": "location",
  11894. "in": "query",
  11895. "schema": {
  11896. "type": "object",
  11897. "properties": {
  11898. "directory": {
  11899. "type": "string"
  11900. },
  11901. "workspace": {
  11902. "type": "string"
  11903. }
  11904. },
  11905. "additionalProperties": false
  11906. },
  11907. "required": false,
  11908. "style": "deepObject",
  11909. "explode": true
  11910. }
  11911. ],
  11912. "security": [],
  11913. "responses": {
  11914. "200": {
  11915. "description": "Success",
  11916. "content": {
  11917. "application/json": {
  11918. "schema": {
  11919. "type": "object",
  11920. "properties": {
  11921. "location": {
  11922. "$ref": "#/components/schemas/LocationInfo"
  11923. },
  11924. "data": {
  11925. "type": "array",
  11926. "items": {
  11927. "$ref": "#/components/schemas/IntegrationInfo"
  11928. }
  11929. }
  11930. },
  11931. "required": ["location", "data"],
  11932. "additionalProperties": false
  11933. }
  11934. }
  11935. }
  11936. },
  11937. "400": {
  11938. "description": "InvalidRequestError",
  11939. "content": {
  11940. "application/json": {
  11941. "schema": {
  11942. "$ref": "#/components/schemas/InvalidRequestError"
  11943. }
  11944. }
  11945. }
  11946. },
  11947. "401": {
  11948. "description": "UnauthorizedError",
  11949. "content": {
  11950. "application/json": {
  11951. "schema": {
  11952. "$ref": "#/components/schemas/UnauthorizedError"
  11953. }
  11954. }
  11955. }
  11956. }
  11957. },
  11958. "description": "Retrieve available integrations and their authentication methods.",
  11959. "summary": "List integrations",
  11960. "x-codeSamples": [
  11961. {
  11962. "lang": "js",
  11963. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.list({\n ...\n})"
  11964. }
  11965. ]
  11966. }
  11967. },
  11968. "/api/integration/{integrationID}": {
  11969. "get": {
  11970. "tags": ["integrations"],
  11971. "operationId": "v2.integration.get",
  11972. "parameters": [
  11973. {
  11974. "name": "integrationID",
  11975. "in": "path",
  11976. "schema": {
  11977. "type": "string"
  11978. },
  11979. "required": true
  11980. },
  11981. {
  11982. "name": "location",
  11983. "in": "query",
  11984. "schema": {
  11985. "type": "object",
  11986. "properties": {
  11987. "directory": {
  11988. "type": "string"
  11989. },
  11990. "workspace": {
  11991. "type": "string"
  11992. }
  11993. },
  11994. "additionalProperties": false
  11995. },
  11996. "required": false,
  11997. "style": "deepObject",
  11998. "explode": true
  11999. }
  12000. ],
  12001. "security": [],
  12002. "responses": {
  12003. "200": {
  12004. "description": "Success",
  12005. "content": {
  12006. "application/json": {
  12007. "schema": {
  12008. "type": "object",
  12009. "properties": {
  12010. "location": {
  12011. "$ref": "#/components/schemas/LocationInfo"
  12012. },
  12013. "data": {
  12014. "$ref": "#/components/schemas/IntegrationInfo"
  12015. }
  12016. },
  12017. "required": ["location", "data"],
  12018. "additionalProperties": false
  12019. }
  12020. }
  12021. }
  12022. },
  12023. "400": {
  12024. "description": "InvalidRequestError",
  12025. "content": {
  12026. "application/json": {
  12027. "schema": {
  12028. "$ref": "#/components/schemas/InvalidRequestError"
  12029. }
  12030. }
  12031. }
  12032. },
  12033. "401": {
  12034. "description": "UnauthorizedError",
  12035. "content": {
  12036. "application/json": {
  12037. "schema": {
  12038. "$ref": "#/components/schemas/UnauthorizedError"
  12039. }
  12040. }
  12041. }
  12042. }
  12043. },
  12044. "description": "Retrieve one integration and its authentication methods.",
  12045. "summary": "Get integration",
  12046. "x-codeSamples": [
  12047. {
  12048. "lang": "js",
  12049. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.get({\n ...\n})"
  12050. }
  12051. ]
  12052. }
  12053. },
  12054. "/api/integration/{integrationID}/connect/key": {
  12055. "post": {
  12056. "tags": ["integrations"],
  12057. "operationId": "v2.integration.connect.key",
  12058. "parameters": [
  12059. {
  12060. "name": "integrationID",
  12061. "in": "path",
  12062. "schema": {
  12063. "type": "string"
  12064. },
  12065. "required": true
  12066. },
  12067. {
  12068. "name": "location",
  12069. "in": "query",
  12070. "schema": {
  12071. "type": "object",
  12072. "properties": {
  12073. "directory": {
  12074. "type": "string"
  12075. },
  12076. "workspace": {
  12077. "type": "string"
  12078. }
  12079. },
  12080. "additionalProperties": false
  12081. },
  12082. "required": false,
  12083. "style": "deepObject",
  12084. "explode": true
  12085. }
  12086. ],
  12087. "security": [],
  12088. "responses": {
  12089. "204": {
  12090. "description": "<No Content>"
  12091. },
  12092. "400": {
  12093. "description": "InvalidRequestError",
  12094. "content": {
  12095. "application/json": {
  12096. "schema": {
  12097. "anyOf": [
  12098. {
  12099. "$ref": "#/components/schemas/InvalidRequestError"
  12100. },
  12101. {
  12102. "$ref": "#/components/schemas/InvalidRequestError"
  12103. }
  12104. ]
  12105. }
  12106. }
  12107. }
  12108. },
  12109. "401": {
  12110. "description": "UnauthorizedError",
  12111. "content": {
  12112. "application/json": {
  12113. "schema": {
  12114. "$ref": "#/components/schemas/UnauthorizedError"
  12115. }
  12116. }
  12117. }
  12118. }
  12119. },
  12120. "description": "Run a key authentication method and store the resulting credential.",
  12121. "summary": "Connect with key",
  12122. "requestBody": {
  12123. "content": {
  12124. "application/json": {
  12125. "schema": {
  12126. "type": "object",
  12127. "properties": {
  12128. "key": {
  12129. "type": "string"
  12130. },
  12131. "label": {
  12132. "type": "string"
  12133. }
  12134. },
  12135. "required": ["key"],
  12136. "additionalProperties": false
  12137. }
  12138. }
  12139. },
  12140. "required": true
  12141. },
  12142. "x-codeSamples": [
  12143. {
  12144. "lang": "js",
  12145. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.connect.key({\n ...\n})"
  12146. }
  12147. ]
  12148. }
  12149. },
  12150. "/api/integration/{integrationID}/connect/oauth": {
  12151. "post": {
  12152. "tags": ["integrations"],
  12153. "operationId": "v2.integration.connect.oauth",
  12154. "parameters": [
  12155. {
  12156. "name": "integrationID",
  12157. "in": "path",
  12158. "schema": {
  12159. "type": "string"
  12160. },
  12161. "required": true
  12162. },
  12163. {
  12164. "name": "location",
  12165. "in": "query",
  12166. "schema": {
  12167. "type": "object",
  12168. "properties": {
  12169. "directory": {
  12170. "type": "string"
  12171. },
  12172. "workspace": {
  12173. "type": "string"
  12174. }
  12175. },
  12176. "additionalProperties": false
  12177. },
  12178. "required": false,
  12179. "style": "deepObject",
  12180. "explode": true
  12181. }
  12182. ],
  12183. "security": [],
  12184. "responses": {
  12185. "200": {
  12186. "description": "Success",
  12187. "content": {
  12188. "application/json": {
  12189. "schema": {
  12190. "type": "object",
  12191. "properties": {
  12192. "location": {
  12193. "$ref": "#/components/schemas/LocationInfo"
  12194. },
  12195. "data": {
  12196. "$ref": "#/components/schemas/IntegrationAttempt"
  12197. }
  12198. },
  12199. "required": ["location", "data"],
  12200. "additionalProperties": false
  12201. }
  12202. }
  12203. }
  12204. },
  12205. "400": {
  12206. "description": "InvalidRequestError",
  12207. "content": {
  12208. "application/json": {
  12209. "schema": {
  12210. "anyOf": [
  12211. {
  12212. "$ref": "#/components/schemas/InvalidRequestError"
  12213. },
  12214. {
  12215. "$ref": "#/components/schemas/InvalidRequestError"
  12216. }
  12217. ]
  12218. }
  12219. }
  12220. }
  12221. },
  12222. "401": {
  12223. "description": "UnauthorizedError",
  12224. "content": {
  12225. "application/json": {
  12226. "schema": {
  12227. "$ref": "#/components/schemas/UnauthorizedError"
  12228. }
  12229. }
  12230. }
  12231. }
  12232. },
  12233. "description": "Start an OAuth attempt and return the authorization details.",
  12234. "summary": "Begin OAuth connection",
  12235. "requestBody": {
  12236. "content": {
  12237. "application/json": {
  12238. "schema": {
  12239. "type": "object",
  12240. "properties": {
  12241. "methodID": {
  12242. "type": "string"
  12243. },
  12244. "inputs": {
  12245. "type": "object",
  12246. "additionalProperties": {
  12247. "type": "string"
  12248. }
  12249. },
  12250. "label": {
  12251. "type": "string"
  12252. }
  12253. },
  12254. "required": ["methodID", "inputs"],
  12255. "additionalProperties": false
  12256. }
  12257. }
  12258. },
  12259. "required": true
  12260. },
  12261. "x-codeSamples": [
  12262. {
  12263. "lang": "js",
  12264. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.connect.oauth({\n ...\n})"
  12265. }
  12266. ]
  12267. }
  12268. },
  12269. "/api/integration/attempt/{attemptID}": {
  12270. "get": {
  12271. "tags": ["integrations"],
  12272. "operationId": "v2.integration.attempt.status",
  12273. "parameters": [
  12274. {
  12275. "name": "attemptID",
  12276. "in": "path",
  12277. "schema": {
  12278. "type": "string"
  12279. },
  12280. "required": true
  12281. },
  12282. {
  12283. "name": "location",
  12284. "in": "query",
  12285. "schema": {
  12286. "type": "object",
  12287. "properties": {
  12288. "directory": {
  12289. "type": "string"
  12290. },
  12291. "workspace": {
  12292. "type": "string"
  12293. }
  12294. },
  12295. "additionalProperties": false
  12296. },
  12297. "required": false,
  12298. "style": "deepObject",
  12299. "explode": true
  12300. }
  12301. ],
  12302. "security": [],
  12303. "responses": {
  12304. "200": {
  12305. "description": "Success",
  12306. "content": {
  12307. "application/json": {
  12308. "schema": {
  12309. "type": "object",
  12310. "properties": {
  12311. "location": {
  12312. "$ref": "#/components/schemas/LocationInfo"
  12313. },
  12314. "data": {
  12315. "$ref": "#/components/schemas/IntegrationAttemptStatus"
  12316. }
  12317. },
  12318. "required": ["location", "data"],
  12319. "additionalProperties": false
  12320. }
  12321. }
  12322. }
  12323. },
  12324. "400": {
  12325. "description": "InvalidRequestError",
  12326. "content": {
  12327. "application/json": {
  12328. "schema": {
  12329. "$ref": "#/components/schemas/InvalidRequestError"
  12330. }
  12331. }
  12332. }
  12333. },
  12334. "401": {
  12335. "description": "UnauthorizedError",
  12336. "content": {
  12337. "application/json": {
  12338. "schema": {
  12339. "$ref": "#/components/schemas/UnauthorizedError"
  12340. }
  12341. }
  12342. }
  12343. }
  12344. },
  12345. "description": "Poll the current status of an OAuth attempt.",
  12346. "summary": "Get OAuth attempt status",
  12347. "x-codeSamples": [
  12348. {
  12349. "lang": "js",
  12350. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.attempt.status({\n ...\n})"
  12351. }
  12352. ]
  12353. },
  12354. "delete": {
  12355. "tags": ["integrations"],
  12356. "operationId": "v2.integration.attempt.cancel",
  12357. "parameters": [
  12358. {
  12359. "name": "attemptID",
  12360. "in": "path",
  12361. "schema": {
  12362. "type": "string"
  12363. },
  12364. "required": true
  12365. },
  12366. {
  12367. "name": "location",
  12368. "in": "query",
  12369. "schema": {
  12370. "type": "object",
  12371. "properties": {
  12372. "directory": {
  12373. "type": "string"
  12374. },
  12375. "workspace": {
  12376. "type": "string"
  12377. }
  12378. },
  12379. "additionalProperties": false
  12380. },
  12381. "required": false,
  12382. "style": "deepObject",
  12383. "explode": true
  12384. }
  12385. ],
  12386. "security": [],
  12387. "responses": {
  12388. "204": {
  12389. "description": "<No Content>"
  12390. },
  12391. "400": {
  12392. "description": "InvalidRequestError",
  12393. "content": {
  12394. "application/json": {
  12395. "schema": {
  12396. "$ref": "#/components/schemas/InvalidRequestError"
  12397. }
  12398. }
  12399. }
  12400. },
  12401. "401": {
  12402. "description": "UnauthorizedError",
  12403. "content": {
  12404. "application/json": {
  12405. "schema": {
  12406. "$ref": "#/components/schemas/UnauthorizedError"
  12407. }
  12408. }
  12409. }
  12410. }
  12411. },
  12412. "description": "Cancel an OAuth attempt and release its resources.",
  12413. "summary": "Cancel OAuth connection",
  12414. "x-codeSamples": [
  12415. {
  12416. "lang": "js",
  12417. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.attempt.cancel({\n ...\n})"
  12418. }
  12419. ]
  12420. }
  12421. },
  12422. "/api/integration/attempt/{attemptID}/complete": {
  12423. "post": {
  12424. "tags": ["integrations"],
  12425. "operationId": "v2.integration.attempt.complete",
  12426. "parameters": [
  12427. {
  12428. "name": "attemptID",
  12429. "in": "path",
  12430. "schema": {
  12431. "type": "string"
  12432. },
  12433. "required": true
  12434. },
  12435. {
  12436. "name": "location",
  12437. "in": "query",
  12438. "schema": {
  12439. "type": "object",
  12440. "properties": {
  12441. "directory": {
  12442. "type": "string"
  12443. },
  12444. "workspace": {
  12445. "type": "string"
  12446. }
  12447. },
  12448. "additionalProperties": false
  12449. },
  12450. "required": false,
  12451. "style": "deepObject",
  12452. "explode": true
  12453. }
  12454. ],
  12455. "security": [],
  12456. "responses": {
  12457. "204": {
  12458. "description": "<No Content>"
  12459. },
  12460. "400": {
  12461. "description": "InvalidRequestError",
  12462. "content": {
  12463. "application/json": {
  12464. "schema": {
  12465. "anyOf": [
  12466. {
  12467. "$ref": "#/components/schemas/InvalidRequestError"
  12468. },
  12469. {
  12470. "$ref": "#/components/schemas/InvalidRequestError"
  12471. }
  12472. ]
  12473. }
  12474. }
  12475. }
  12476. },
  12477. "401": {
  12478. "description": "UnauthorizedError",
  12479. "content": {
  12480. "application/json": {
  12481. "schema": {
  12482. "$ref": "#/components/schemas/UnauthorizedError"
  12483. }
  12484. }
  12485. }
  12486. }
  12487. },
  12488. "description": "Complete a code-based OAuth attempt and store the resulting credential.",
  12489. "summary": "Complete OAuth connection",
  12490. "requestBody": {
  12491. "content": {
  12492. "application/json": {
  12493. "schema": {
  12494. "type": "object",
  12495. "properties": {
  12496. "code": {
  12497. "type": "string"
  12498. }
  12499. },
  12500. "additionalProperties": false
  12501. }
  12502. }
  12503. },
  12504. "required": true
  12505. },
  12506. "x-codeSamples": [
  12507. {
  12508. "lang": "js",
  12509. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.attempt.complete({\n ...\n})"
  12510. }
  12511. ]
  12512. }
  12513. },
  12514. "/api/credential/{credentialID}": {
  12515. "patch": {
  12516. "tags": ["opencode HttpApi"],
  12517. "operationId": "v2.credential.update",
  12518. "parameters": [
  12519. {
  12520. "name": "credentialID",
  12521. "in": "path",
  12522. "schema": {
  12523. "type": "string"
  12524. },
  12525. "required": true
  12526. },
  12527. {
  12528. "name": "location",
  12529. "in": "query",
  12530. "schema": {
  12531. "type": "object",
  12532. "properties": {
  12533. "directory": {
  12534. "type": "string"
  12535. },
  12536. "workspace": {
  12537. "type": "string"
  12538. }
  12539. },
  12540. "additionalProperties": false
  12541. },
  12542. "required": false,
  12543. "style": "deepObject",
  12544. "explode": true
  12545. }
  12546. ],
  12547. "security": [],
  12548. "responses": {
  12549. "204": {
  12550. "description": "<No Content>"
  12551. },
  12552. "400": {
  12553. "description": "InvalidRequestError",
  12554. "content": {
  12555. "application/json": {
  12556. "schema": {
  12557. "$ref": "#/components/schemas/InvalidRequestError"
  12558. }
  12559. }
  12560. }
  12561. },
  12562. "401": {
  12563. "description": "UnauthorizedError",
  12564. "content": {
  12565. "application/json": {
  12566. "schema": {
  12567. "$ref": "#/components/schemas/UnauthorizedError"
  12568. }
  12569. }
  12570. }
  12571. }
  12572. },
  12573. "description": "Update a stored credential label.",
  12574. "summary": "Update credential",
  12575. "requestBody": {
  12576. "content": {
  12577. "application/json": {
  12578. "schema": {
  12579. "type": "object",
  12580. "properties": {
  12581. "label": {
  12582. "type": "string"
  12583. }
  12584. },
  12585. "required": ["label"],
  12586. "additionalProperties": false
  12587. }
  12588. }
  12589. },
  12590. "required": true
  12591. },
  12592. "x-codeSamples": [
  12593. {
  12594. "lang": "js",
  12595. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.credential.update({\n ...\n})"
  12596. }
  12597. ]
  12598. },
  12599. "delete": {
  12600. "tags": ["opencode HttpApi"],
  12601. "operationId": "v2.credential.remove",
  12602. "parameters": [
  12603. {
  12604. "name": "credentialID",
  12605. "in": "path",
  12606. "schema": {
  12607. "type": "string"
  12608. },
  12609. "required": true
  12610. },
  12611. {
  12612. "name": "location",
  12613. "in": "query",
  12614. "schema": {
  12615. "type": "object",
  12616. "properties": {
  12617. "directory": {
  12618. "type": "string"
  12619. },
  12620. "workspace": {
  12621. "type": "string"
  12622. }
  12623. },
  12624. "additionalProperties": false
  12625. },
  12626. "required": false,
  12627. "style": "deepObject",
  12628. "explode": true
  12629. }
  12630. ],
  12631. "security": [],
  12632. "responses": {
  12633. "204": {
  12634. "description": "<No Content>"
  12635. },
  12636. "400": {
  12637. "description": "InvalidRequestError",
  12638. "content": {
  12639. "application/json": {
  12640. "schema": {
  12641. "$ref": "#/components/schemas/InvalidRequestError"
  12642. }
  12643. }
  12644. }
  12645. },
  12646. "401": {
  12647. "description": "UnauthorizedError",
  12648. "content": {
  12649. "application/json": {
  12650. "schema": {
  12651. "$ref": "#/components/schemas/UnauthorizedError"
  12652. }
  12653. }
  12654. }
  12655. }
  12656. },
  12657. "description": "Remove a stored integration credential.",
  12658. "summary": "Remove credential",
  12659. "x-codeSamples": [
  12660. {
  12661. "lang": "js",
  12662. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.credential.remove({\n ...\n})"
  12663. }
  12664. ]
  12665. }
  12666. },
  12667. "/api/permission/request": {
  12668. "get": {
  12669. "tags": ["permissions"],
  12670. "operationId": "v2.permission.request.list",
  12671. "parameters": [
  12672. {
  12673. "name": "location",
  12674. "in": "query",
  12675. "schema": {
  12676. "type": "object",
  12677. "properties": {
  12678. "directory": {
  12679. "type": "string"
  12680. },
  12681. "workspace": {
  12682. "type": "string"
  12683. }
  12684. },
  12685. "additionalProperties": false
  12686. },
  12687. "required": false,
  12688. "style": "deepObject",
  12689. "explode": true
  12690. }
  12691. ],
  12692. "security": [],
  12693. "responses": {
  12694. "200": {
  12695. "description": "Success",
  12696. "content": {
  12697. "application/json": {
  12698. "schema": {
  12699. "type": "object",
  12700. "properties": {
  12701. "location": {
  12702. "$ref": "#/components/schemas/LocationInfo"
  12703. },
  12704. "data": {
  12705. "type": "array",
  12706. "items": {
  12707. "$ref": "#/components/schemas/PermissionV2Request"
  12708. }
  12709. }
  12710. },
  12711. "required": ["location", "data"],
  12712. "additionalProperties": false
  12713. }
  12714. }
  12715. }
  12716. },
  12717. "400": {
  12718. "description": "InvalidRequestError",
  12719. "content": {
  12720. "application/json": {
  12721. "schema": {
  12722. "$ref": "#/components/schemas/InvalidRequestError"
  12723. }
  12724. }
  12725. }
  12726. },
  12727. "401": {
  12728. "description": "UnauthorizedError",
  12729. "content": {
  12730. "application/json": {
  12731. "schema": {
  12732. "$ref": "#/components/schemas/UnauthorizedError"
  12733. }
  12734. }
  12735. }
  12736. }
  12737. },
  12738. "description": "Retrieve pending permission requests for a location.",
  12739. "summary": "List pending permission requests",
  12740. "x-codeSamples": [
  12741. {
  12742. "lang": "js",
  12743. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.request.list({\n ...\n})"
  12744. }
  12745. ]
  12746. }
  12747. },
  12748. "/api/permission/saved": {
  12749. "get": {
  12750. "tags": ["permissions"],
  12751. "operationId": "v2.permission.saved.list",
  12752. "parameters": [
  12753. {
  12754. "name": "projectID",
  12755. "in": "query",
  12756. "schema": {
  12757. "type": "string"
  12758. },
  12759. "required": false
  12760. }
  12761. ],
  12762. "security": [],
  12763. "responses": {
  12764. "200": {
  12765. "description": "Success",
  12766. "content": {
  12767. "application/json": {
  12768. "schema": {
  12769. "type": "object",
  12770. "properties": {
  12771. "data": {
  12772. "type": "array",
  12773. "items": {
  12774. "$ref": "#/components/schemas/PermissionSavedInfo"
  12775. }
  12776. }
  12777. },
  12778. "required": ["data"],
  12779. "additionalProperties": false
  12780. }
  12781. }
  12782. }
  12783. },
  12784. "400": {
  12785. "description": "InvalidRequestError",
  12786. "content": {
  12787. "application/json": {
  12788. "schema": {
  12789. "$ref": "#/components/schemas/InvalidRequestError"
  12790. }
  12791. }
  12792. }
  12793. },
  12794. "401": {
  12795. "description": "UnauthorizedError",
  12796. "content": {
  12797. "application/json": {
  12798. "schema": {
  12799. "$ref": "#/components/schemas/UnauthorizedError"
  12800. }
  12801. }
  12802. }
  12803. }
  12804. },
  12805. "description": "Retrieve saved permissions, optionally filtered by project.",
  12806. "summary": "List saved permissions",
  12807. "x-codeSamples": [
  12808. {
  12809. "lang": "js",
  12810. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.list({\n ...\n})"
  12811. }
  12812. ]
  12813. }
  12814. },
  12815. "/api/permission/saved/{id}": {
  12816. "delete": {
  12817. "tags": ["permissions"],
  12818. "operationId": "v2.permission.saved.remove",
  12819. "parameters": [
  12820. {
  12821. "name": "id",
  12822. "in": "path",
  12823. "schema": {
  12824. "type": "string"
  12825. },
  12826. "required": true
  12827. }
  12828. ],
  12829. "security": [],
  12830. "responses": {
  12831. "204": {
  12832. "description": "<No Content>"
  12833. },
  12834. "400": {
  12835. "description": "InvalidRequestError",
  12836. "content": {
  12837. "application/json": {
  12838. "schema": {
  12839. "$ref": "#/components/schemas/InvalidRequestError"
  12840. }
  12841. }
  12842. }
  12843. },
  12844. "401": {
  12845. "description": "UnauthorizedError",
  12846. "content": {
  12847. "application/json": {
  12848. "schema": {
  12849. "$ref": "#/components/schemas/UnauthorizedError"
  12850. }
  12851. }
  12852. }
  12853. }
  12854. },
  12855. "description": "Remove a saved permission by ID.",
  12856. "summary": "Remove saved permission",
  12857. "x-codeSamples": [
  12858. {
  12859. "lang": "js",
  12860. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.remove({\n ...\n})"
  12861. }
  12862. ]
  12863. }
  12864. },
  12865. "/api/session/{sessionID}/permission": {
  12866. "post": {
  12867. "tags": ["permissions"],
  12868. "operationId": "v2.session.permission.create",
  12869. "parameters": [
  12870. {
  12871. "name": "sessionID",
  12872. "in": "path",
  12873. "schema": {
  12874. "type": "string",
  12875. "pattern": "^ses"
  12876. },
  12877. "required": true
  12878. }
  12879. ],
  12880. "security": [],
  12881. "responses": {
  12882. "200": {
  12883. "description": "Success",
  12884. "content": {
  12885. "application/json": {
  12886. "schema": {
  12887. "type": "object",
  12888. "properties": {
  12889. "data": {
  12890. "type": "object",
  12891. "properties": {
  12892. "id": {
  12893. "type": "string",
  12894. "pattern": "^per"
  12895. },
  12896. "effect": {
  12897. "$ref": "#/components/schemas/PermissionV2Effect"
  12898. }
  12899. },
  12900. "required": ["id", "effect"],
  12901. "additionalProperties": false
  12902. }
  12903. },
  12904. "required": ["data"],
  12905. "additionalProperties": false
  12906. }
  12907. }
  12908. }
  12909. },
  12910. "400": {
  12911. "description": "InvalidRequestError",
  12912. "content": {
  12913. "application/json": {
  12914. "schema": {
  12915. "$ref": "#/components/schemas/InvalidRequestError"
  12916. }
  12917. }
  12918. }
  12919. },
  12920. "401": {
  12921. "description": "UnauthorizedError",
  12922. "content": {
  12923. "application/json": {
  12924. "schema": {
  12925. "$ref": "#/components/schemas/UnauthorizedError"
  12926. }
  12927. }
  12928. }
  12929. },
  12930. "404": {
  12931. "description": "SessionNotFoundError",
  12932. "content": {
  12933. "application/json": {
  12934. "schema": {
  12935. "anyOf": [
  12936. {
  12937. "$ref": "#/components/schemas/SessionNotFoundError"
  12938. },
  12939. {
  12940. "$ref": "#/components/schemas/SessionNotFoundError"
  12941. }
  12942. ]
  12943. }
  12944. }
  12945. }
  12946. }
  12947. },
  12948. "description": "Evaluate and, when approval is required, create a permission request for a session.",
  12949. "summary": "Create permission request",
  12950. "requestBody": {
  12951. "content": {
  12952. "application/json": {
  12953. "schema": {
  12954. "type": "object",
  12955. "properties": {
  12956. "id": {
  12957. "type": "string",
  12958. "pattern": "^per"
  12959. },
  12960. "action": {
  12961. "type": "string"
  12962. },
  12963. "resources": {
  12964. "type": "array",
  12965. "items": {
  12966. "type": "string"
  12967. }
  12968. },
  12969. "save": {
  12970. "type": "array",
  12971. "items": {
  12972. "type": "string"
  12973. }
  12974. },
  12975. "metadata": {
  12976. "type": "object"
  12977. },
  12978. "source": {
  12979. "$ref": "#/components/schemas/PermissionV2Source"
  12980. },
  12981. "agent": {
  12982. "type": "string"
  12983. }
  12984. },
  12985. "required": ["action", "resources"],
  12986. "additionalProperties": false
  12987. }
  12988. }
  12989. },
  12990. "required": true
  12991. },
  12992. "x-codeSamples": [
  12993. {
  12994. "lang": "js",
  12995. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.create({\n ...\n})"
  12996. }
  12997. ]
  12998. },
  12999. "get": {
  13000. "tags": ["permissions"],
  13001. "operationId": "v2.session.permission.list",
  13002. "parameters": [
  13003. {
  13004. "name": "sessionID",
  13005. "in": "path",
  13006. "schema": {
  13007. "type": "string",
  13008. "pattern": "^ses"
  13009. },
  13010. "required": true
  13011. }
  13012. ],
  13013. "security": [],
  13014. "responses": {
  13015. "200": {
  13016. "description": "Success",
  13017. "content": {
  13018. "application/json": {
  13019. "schema": {
  13020. "type": "object",
  13021. "properties": {
  13022. "data": {
  13023. "type": "array",
  13024. "items": {
  13025. "$ref": "#/components/schemas/PermissionV2Request"
  13026. }
  13027. }
  13028. },
  13029. "required": ["data"],
  13030. "additionalProperties": false
  13031. }
  13032. }
  13033. }
  13034. },
  13035. "400": {
  13036. "description": "InvalidRequestError",
  13037. "content": {
  13038. "application/json": {
  13039. "schema": {
  13040. "$ref": "#/components/schemas/InvalidRequestError"
  13041. }
  13042. }
  13043. }
  13044. },
  13045. "401": {
  13046. "description": "UnauthorizedError",
  13047. "content": {
  13048. "application/json": {
  13049. "schema": {
  13050. "$ref": "#/components/schemas/UnauthorizedError"
  13051. }
  13052. }
  13053. }
  13054. },
  13055. "404": {
  13056. "description": "SessionNotFoundError",
  13057. "content": {
  13058. "application/json": {
  13059. "schema": {
  13060. "anyOf": [
  13061. {
  13062. "$ref": "#/components/schemas/SessionNotFoundError"
  13063. },
  13064. {
  13065. "$ref": "#/components/schemas/SessionNotFoundError"
  13066. }
  13067. ]
  13068. }
  13069. }
  13070. }
  13071. }
  13072. },
  13073. "description": "Retrieve pending permission requests owned by a session.",
  13074. "summary": "List session permission requests",
  13075. "x-codeSamples": [
  13076. {
  13077. "lang": "js",
  13078. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.list({\n ...\n})"
  13079. }
  13080. ]
  13081. }
  13082. },
  13083. "/api/session/{sessionID}/permission/{requestID}": {
  13084. "get": {
  13085. "tags": ["permissions"],
  13086. "operationId": "v2.session.permission.get",
  13087. "parameters": [
  13088. {
  13089. "name": "sessionID",
  13090. "in": "path",
  13091. "schema": {
  13092. "type": "string",
  13093. "pattern": "^ses"
  13094. },
  13095. "required": true
  13096. },
  13097. {
  13098. "name": "requestID",
  13099. "in": "path",
  13100. "schema": {
  13101. "type": "string",
  13102. "pattern": "^per"
  13103. },
  13104. "required": true
  13105. }
  13106. ],
  13107. "security": [],
  13108. "responses": {
  13109. "200": {
  13110. "description": "Success",
  13111. "content": {
  13112. "application/json": {
  13113. "schema": {
  13114. "type": "object",
  13115. "properties": {
  13116. "data": {
  13117. "$ref": "#/components/schemas/PermissionV2Request"
  13118. }
  13119. },
  13120. "required": ["data"],
  13121. "additionalProperties": false
  13122. }
  13123. }
  13124. }
  13125. },
  13126. "400": {
  13127. "description": "InvalidRequestError",
  13128. "content": {
  13129. "application/json": {
  13130. "schema": {
  13131. "$ref": "#/components/schemas/InvalidRequestError"
  13132. }
  13133. }
  13134. }
  13135. },
  13136. "401": {
  13137. "description": "UnauthorizedError",
  13138. "content": {
  13139. "application/json": {
  13140. "schema": {
  13141. "$ref": "#/components/schemas/UnauthorizedError"
  13142. }
  13143. }
  13144. }
  13145. },
  13146. "404": {
  13147. "description": "SessionNotFoundError | PermissionNotFoundError",
  13148. "content": {
  13149. "application/json": {
  13150. "schema": {
  13151. "anyOf": [
  13152. {
  13153. "$ref": "#/components/schemas/PermissionNotFoundError"
  13154. },
  13155. {
  13156. "$ref": "#/components/schemas/SessionNotFoundError"
  13157. },
  13158. {
  13159. "$ref": "#/components/schemas/SessionNotFoundError"
  13160. }
  13161. ]
  13162. }
  13163. }
  13164. }
  13165. }
  13166. },
  13167. "description": "Retrieve a pending permission request owned by a session.",
  13168. "summary": "Get permission request",
  13169. "x-codeSamples": [
  13170. {
  13171. "lang": "js",
  13172. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.get({\n ...\n})"
  13173. }
  13174. ]
  13175. }
  13176. },
  13177. "/api/session/{sessionID}/permission/{requestID}/reply": {
  13178. "post": {
  13179. "tags": ["permissions"],
  13180. "operationId": "v2.session.permission.reply",
  13181. "parameters": [
  13182. {
  13183. "name": "sessionID",
  13184. "in": "path",
  13185. "schema": {
  13186. "type": "string",
  13187. "pattern": "^ses"
  13188. },
  13189. "required": true
  13190. },
  13191. {
  13192. "name": "requestID",
  13193. "in": "path",
  13194. "schema": {
  13195. "type": "string",
  13196. "pattern": "^per"
  13197. },
  13198. "required": true
  13199. }
  13200. ],
  13201. "security": [],
  13202. "responses": {
  13203. "204": {
  13204. "description": "<No Content>"
  13205. },
  13206. "400": {
  13207. "description": "InvalidRequestError",
  13208. "content": {
  13209. "application/json": {
  13210. "schema": {
  13211. "$ref": "#/components/schemas/InvalidRequestError"
  13212. }
  13213. }
  13214. }
  13215. },
  13216. "401": {
  13217. "description": "UnauthorizedError",
  13218. "content": {
  13219. "application/json": {
  13220. "schema": {
  13221. "$ref": "#/components/schemas/UnauthorizedError"
  13222. }
  13223. }
  13224. }
  13225. },
  13226. "404": {
  13227. "description": "SessionNotFoundError | PermissionNotFoundError",
  13228. "content": {
  13229. "application/json": {
  13230. "schema": {
  13231. "anyOf": [
  13232. {
  13233. "$ref": "#/components/schemas/PermissionNotFoundError"
  13234. },
  13235. {
  13236. "$ref": "#/components/schemas/SessionNotFoundError"
  13237. },
  13238. {
  13239. "$ref": "#/components/schemas/SessionNotFoundError"
  13240. }
  13241. ]
  13242. }
  13243. }
  13244. }
  13245. }
  13246. },
  13247. "description": "Respond to a pending permission request owned by a session.",
  13248. "summary": "Reply to pending permission request",
  13249. "requestBody": {
  13250. "content": {
  13251. "application/json": {
  13252. "schema": {
  13253. "type": "object",
  13254. "properties": {
  13255. "reply": {
  13256. "$ref": "#/components/schemas/PermissionV2Reply"
  13257. },
  13258. "message": {
  13259. "type": "string"
  13260. }
  13261. },
  13262. "required": ["reply"],
  13263. "additionalProperties": false
  13264. }
  13265. }
  13266. },
  13267. "required": true
  13268. },
  13269. "x-codeSamples": [
  13270. {
  13271. "lang": "js",
  13272. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.reply({\n ...\n})"
  13273. }
  13274. ]
  13275. }
  13276. },
  13277. "/api/fs/read/*": {
  13278. "get": {
  13279. "tags": ["filesystem"],
  13280. "operationId": "v2.fs.read",
  13281. "parameters": [
  13282. {
  13283. "name": "location",
  13284. "in": "query",
  13285. "schema": {
  13286. "type": "object",
  13287. "properties": {
  13288. "directory": {
  13289. "type": "string"
  13290. },
  13291. "workspace": {
  13292. "type": "string"
  13293. }
  13294. },
  13295. "additionalProperties": false
  13296. },
  13297. "required": false,
  13298. "style": "deepObject",
  13299. "explode": true
  13300. }
  13301. ],
  13302. "security": [],
  13303. "responses": {
  13304. "200": {
  13305. "description": "Success",
  13306. "content": {
  13307. "application/octet-stream": {
  13308. "schema": {
  13309. "type": "string",
  13310. "format": "binary"
  13311. }
  13312. }
  13313. }
  13314. },
  13315. "400": {
  13316. "description": "InvalidRequestError",
  13317. "content": {
  13318. "application/json": {
  13319. "schema": {
  13320. "$ref": "#/components/schemas/InvalidRequestError"
  13321. }
  13322. }
  13323. }
  13324. },
  13325. "401": {
  13326. "description": "UnauthorizedError",
  13327. "content": {
  13328. "application/json": {
  13329. "schema": {
  13330. "$ref": "#/components/schemas/UnauthorizedError"
  13331. }
  13332. }
  13333. }
  13334. }
  13335. },
  13336. "description": "Serve one file relative to the requested location.",
  13337. "summary": "Read file",
  13338. "x-codeSamples": [
  13339. {
  13340. "lang": "js",
  13341. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.read({\n ...\n})"
  13342. }
  13343. ]
  13344. }
  13345. },
  13346. "/api/fs/list": {
  13347. "get": {
  13348. "tags": ["filesystem"],
  13349. "operationId": "v2.fs.list",
  13350. "parameters": [
  13351. {
  13352. "name": "location",
  13353. "in": "query",
  13354. "schema": {
  13355. "type": "object",
  13356. "properties": {
  13357. "directory": {
  13358. "type": "string"
  13359. },
  13360. "workspace": {
  13361. "type": "string"
  13362. }
  13363. },
  13364. "additionalProperties": false
  13365. },
  13366. "required": false,
  13367. "style": "deepObject",
  13368. "explode": true
  13369. },
  13370. {
  13371. "name": "path",
  13372. "in": "query",
  13373. "schema": {
  13374. "type": "string"
  13375. },
  13376. "required": false
  13377. }
  13378. ],
  13379. "security": [],
  13380. "responses": {
  13381. "200": {
  13382. "description": "Success",
  13383. "content": {
  13384. "application/json": {
  13385. "schema": {
  13386. "type": "object",
  13387. "properties": {
  13388. "location": {
  13389. "$ref": "#/components/schemas/LocationInfo"
  13390. },
  13391. "data": {
  13392. "type": "array",
  13393. "items": {
  13394. "$ref": "#/components/schemas/FileSystemEntry"
  13395. }
  13396. }
  13397. },
  13398. "required": ["location", "data"],
  13399. "additionalProperties": false
  13400. }
  13401. }
  13402. }
  13403. },
  13404. "400": {
  13405. "description": "InvalidRequestError",
  13406. "content": {
  13407. "application/json": {
  13408. "schema": {
  13409. "$ref": "#/components/schemas/InvalidRequestError"
  13410. }
  13411. }
  13412. }
  13413. },
  13414. "401": {
  13415. "description": "UnauthorizedError",
  13416. "content": {
  13417. "application/json": {
  13418. "schema": {
  13419. "$ref": "#/components/schemas/UnauthorizedError"
  13420. }
  13421. }
  13422. }
  13423. }
  13424. },
  13425. "description": "List direct children of one directory relative to the requested location.",
  13426. "summary": "List directory",
  13427. "x-codeSamples": [
  13428. {
  13429. "lang": "js",
  13430. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.list({\n ...\n})"
  13431. }
  13432. ]
  13433. }
  13434. },
  13435. "/api/fs/find": {
  13436. "get": {
  13437. "tags": ["filesystem"],
  13438. "operationId": "v2.fs.find",
  13439. "parameters": [
  13440. {
  13441. "name": "location",
  13442. "in": "query",
  13443. "schema": {
  13444. "type": "object",
  13445. "properties": {
  13446. "directory": {
  13447. "type": "string"
  13448. },
  13449. "workspace": {
  13450. "type": "string"
  13451. }
  13452. },
  13453. "additionalProperties": false
  13454. },
  13455. "required": false,
  13456. "style": "deepObject",
  13457. "explode": true
  13458. },
  13459. {
  13460. "name": "query",
  13461. "in": "query",
  13462. "schema": {
  13463. "type": "string"
  13464. },
  13465. "required": true
  13466. },
  13467. {
  13468. "name": "type",
  13469. "in": "query",
  13470. "schema": {
  13471. "type": "string",
  13472. "enum": ["file", "directory"]
  13473. },
  13474. "required": false
  13475. },
  13476. {
  13477. "name": "limit",
  13478. "in": "query",
  13479. "schema": {
  13480. "type": "string"
  13481. },
  13482. "required": false
  13483. }
  13484. ],
  13485. "security": [],
  13486. "responses": {
  13487. "200": {
  13488. "description": "Success",
  13489. "content": {
  13490. "application/json": {
  13491. "schema": {
  13492. "type": "object",
  13493. "properties": {
  13494. "location": {
  13495. "$ref": "#/components/schemas/LocationInfo"
  13496. },
  13497. "data": {
  13498. "type": "array",
  13499. "items": {
  13500. "$ref": "#/components/schemas/FileSystemEntry"
  13501. }
  13502. }
  13503. },
  13504. "required": ["location", "data"],
  13505. "additionalProperties": false
  13506. }
  13507. }
  13508. }
  13509. },
  13510. "400": {
  13511. "description": "InvalidRequestError",
  13512. "content": {
  13513. "application/json": {
  13514. "schema": {
  13515. "$ref": "#/components/schemas/InvalidRequestError"
  13516. }
  13517. }
  13518. }
  13519. },
  13520. "401": {
  13521. "description": "UnauthorizedError",
  13522. "content": {
  13523. "application/json": {
  13524. "schema": {
  13525. "$ref": "#/components/schemas/UnauthorizedError"
  13526. }
  13527. }
  13528. }
  13529. }
  13530. },
  13531. "description": "Find recursively ranked filesystem entries relative to the requested location.",
  13532. "summary": "Find files",
  13533. "x-codeSamples": [
  13534. {
  13535. "lang": "js",
  13536. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.find({\n ...\n})"
  13537. }
  13538. ]
  13539. }
  13540. },
  13541. "/api/command": {
  13542. "get": {
  13543. "tags": ["commands"],
  13544. "operationId": "v2.command.list",
  13545. "parameters": [
  13546. {
  13547. "name": "location",
  13548. "in": "query",
  13549. "schema": {
  13550. "type": "object",
  13551. "properties": {
  13552. "directory": {
  13553. "type": "string"
  13554. },
  13555. "workspace": {
  13556. "type": "string"
  13557. }
  13558. },
  13559. "additionalProperties": false
  13560. },
  13561. "required": false,
  13562. "style": "deepObject",
  13563. "explode": true
  13564. }
  13565. ],
  13566. "security": [],
  13567. "responses": {
  13568. "200": {
  13569. "description": "Success",
  13570. "content": {
  13571. "application/json": {
  13572. "schema": {
  13573. "type": "object",
  13574. "properties": {
  13575. "location": {
  13576. "$ref": "#/components/schemas/LocationInfo"
  13577. },
  13578. "data": {
  13579. "type": "array",
  13580. "items": {
  13581. "$ref": "#/components/schemas/CommandV2Info"
  13582. }
  13583. }
  13584. },
  13585. "required": ["location", "data"],
  13586. "additionalProperties": false
  13587. }
  13588. }
  13589. }
  13590. },
  13591. "400": {
  13592. "description": "InvalidRequestError",
  13593. "content": {
  13594. "application/json": {
  13595. "schema": {
  13596. "$ref": "#/components/schemas/InvalidRequestError"
  13597. }
  13598. }
  13599. }
  13600. },
  13601. "401": {
  13602. "description": "UnauthorizedError",
  13603. "content": {
  13604. "application/json": {
  13605. "schema": {
  13606. "$ref": "#/components/schemas/UnauthorizedError"
  13607. }
  13608. }
  13609. }
  13610. }
  13611. },
  13612. "description": "Retrieve currently registered commands.",
  13613. "summary": "List commands",
  13614. "x-codeSamples": [
  13615. {
  13616. "lang": "js",
  13617. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.command.list({\n ...\n})"
  13618. }
  13619. ]
  13620. }
  13621. },
  13622. "/api/skill": {
  13623. "get": {
  13624. "tags": ["skills"],
  13625. "operationId": "v2.skill.list",
  13626. "parameters": [
  13627. {
  13628. "name": "location",
  13629. "in": "query",
  13630. "schema": {
  13631. "type": "object",
  13632. "properties": {
  13633. "directory": {
  13634. "type": "string"
  13635. },
  13636. "workspace": {
  13637. "type": "string"
  13638. }
  13639. },
  13640. "additionalProperties": false
  13641. },
  13642. "required": false,
  13643. "style": "deepObject",
  13644. "explode": true
  13645. }
  13646. ],
  13647. "security": [],
  13648. "responses": {
  13649. "200": {
  13650. "description": "Success",
  13651. "content": {
  13652. "application/json": {
  13653. "schema": {
  13654. "type": "object",
  13655. "properties": {
  13656. "location": {
  13657. "$ref": "#/components/schemas/LocationInfo"
  13658. },
  13659. "data": {
  13660. "type": "array",
  13661. "items": {
  13662. "$ref": "#/components/schemas/SkillV2Info"
  13663. }
  13664. }
  13665. },
  13666. "required": ["location", "data"],
  13667. "additionalProperties": false
  13668. }
  13669. }
  13670. }
  13671. },
  13672. "400": {
  13673. "description": "InvalidRequestError",
  13674. "content": {
  13675. "application/json": {
  13676. "schema": {
  13677. "$ref": "#/components/schemas/InvalidRequestError"
  13678. }
  13679. }
  13680. }
  13681. },
  13682. "401": {
  13683. "description": "UnauthorizedError",
  13684. "content": {
  13685. "application/json": {
  13686. "schema": {
  13687. "$ref": "#/components/schemas/UnauthorizedError"
  13688. }
  13689. }
  13690. }
  13691. }
  13692. },
  13693. "description": "Retrieve currently registered skills.",
  13694. "summary": "List skills",
  13695. "x-codeSamples": [
  13696. {
  13697. "lang": "js",
  13698. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.skill.list({\n ...\n})"
  13699. }
  13700. ]
  13701. }
  13702. },
  13703. "/api/event": {
  13704. "get": {
  13705. "tags": ["events"],
  13706. "operationId": "v2.event.subscribe",
  13707. "parameters": [],
  13708. "security": [],
  13709. "responses": {
  13710. "200": {
  13711. "description": "Event stream",
  13712. "content": {
  13713. "text/event-stream": {
  13714. "schema": {
  13715. "$ref": "#/components/schemas/V2Event"
  13716. }
  13717. }
  13718. }
  13719. },
  13720. "400": {
  13721. "description": "InvalidRequestError",
  13722. "content": {
  13723. "application/json": {
  13724. "schema": {
  13725. "$ref": "#/components/schemas/InvalidRequestError"
  13726. }
  13727. }
  13728. }
  13729. },
  13730. "401": {
  13731. "description": "UnauthorizedError",
  13732. "content": {
  13733. "application/json": {
  13734. "schema": {
  13735. "$ref": "#/components/schemas/UnauthorizedError"
  13736. }
  13737. }
  13738. }
  13739. }
  13740. },
  13741. "description": "Subscribe to native event payloads for the server.",
  13742. "summary": "Subscribe to events",
  13743. "x-codeSamples": [
  13744. {
  13745. "lang": "js",
  13746. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.event.subscribe({\n ...\n})"
  13747. }
  13748. ]
  13749. }
  13750. },
  13751. "/api/pty": {
  13752. "get": {
  13753. "tags": ["pty"],
  13754. "operationId": "v2.pty.list",
  13755. "parameters": [
  13756. {
  13757. "name": "location",
  13758. "in": "query",
  13759. "schema": {
  13760. "type": "object",
  13761. "properties": {
  13762. "directory": {
  13763. "type": "string"
  13764. },
  13765. "workspace": {
  13766. "type": "string"
  13767. }
  13768. },
  13769. "additionalProperties": false
  13770. },
  13771. "required": false,
  13772. "style": "deepObject",
  13773. "explode": true
  13774. }
  13775. ],
  13776. "security": [],
  13777. "responses": {
  13778. "200": {
  13779. "description": "Success",
  13780. "content": {
  13781. "application/json": {
  13782. "schema": {
  13783. "type": "object",
  13784. "properties": {
  13785. "location": {
  13786. "$ref": "#/components/schemas/LocationInfo"
  13787. },
  13788. "data": {
  13789. "type": "array",
  13790. "items": {
  13791. "$ref": "#/components/schemas/Pty"
  13792. }
  13793. }
  13794. },
  13795. "required": ["location", "data"],
  13796. "additionalProperties": false
  13797. }
  13798. }
  13799. }
  13800. },
  13801. "400": {
  13802. "description": "InvalidRequestError",
  13803. "content": {
  13804. "application/json": {
  13805. "schema": {
  13806. "$ref": "#/components/schemas/InvalidRequestError"
  13807. }
  13808. }
  13809. }
  13810. },
  13811. "401": {
  13812. "description": "UnauthorizedError",
  13813. "content": {
  13814. "application/json": {
  13815. "schema": {
  13816. "$ref": "#/components/schemas/UnauthorizedError"
  13817. }
  13818. }
  13819. }
  13820. }
  13821. },
  13822. "description": "List PTY sessions for a location, including exited sessions retained until removal.",
  13823. "summary": "List PTY sessions",
  13824. "x-codeSamples": [
  13825. {
  13826. "lang": "js",
  13827. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.list({\n ...\n})"
  13828. }
  13829. ]
  13830. },
  13831. "post": {
  13832. "tags": ["pty"],
  13833. "operationId": "v2.pty.create",
  13834. "parameters": [
  13835. {
  13836. "name": "location",
  13837. "in": "query",
  13838. "schema": {
  13839. "type": "object",
  13840. "properties": {
  13841. "directory": {
  13842. "type": "string"
  13843. },
  13844. "workspace": {
  13845. "type": "string"
  13846. }
  13847. },
  13848. "additionalProperties": false
  13849. },
  13850. "required": false,
  13851. "style": "deepObject",
  13852. "explode": true
  13853. }
  13854. ],
  13855. "security": [],
  13856. "responses": {
  13857. "200": {
  13858. "description": "Success",
  13859. "content": {
  13860. "application/json": {
  13861. "schema": {
  13862. "type": "object",
  13863. "properties": {
  13864. "location": {
  13865. "$ref": "#/components/schemas/LocationInfo"
  13866. },
  13867. "data": {
  13868. "$ref": "#/components/schemas/Pty"
  13869. }
  13870. },
  13871. "required": ["location", "data"],
  13872. "additionalProperties": false
  13873. }
  13874. }
  13875. }
  13876. },
  13877. "400": {
  13878. "description": "InvalidRequestError",
  13879. "content": {
  13880. "application/json": {
  13881. "schema": {
  13882. "$ref": "#/components/schemas/InvalidRequestError"
  13883. }
  13884. }
  13885. }
  13886. },
  13887. "401": {
  13888. "description": "UnauthorizedError",
  13889. "content": {
  13890. "application/json": {
  13891. "schema": {
  13892. "$ref": "#/components/schemas/UnauthorizedError"
  13893. }
  13894. }
  13895. }
  13896. }
  13897. },
  13898. "description": "Create a pseudo-terminal session for a location.",
  13899. "summary": "Create PTY session",
  13900. "requestBody": {
  13901. "content": {
  13902. "application/json": {
  13903. "schema": {
  13904. "type": "object",
  13905. "properties": {
  13906. "command": {
  13907. "type": "string"
  13908. },
  13909. "args": {
  13910. "type": "array",
  13911. "items": {
  13912. "type": "string"
  13913. }
  13914. },
  13915. "cwd": {
  13916. "type": "string"
  13917. },
  13918. "title": {
  13919. "type": "string"
  13920. },
  13921. "env": {
  13922. "type": "object",
  13923. "additionalProperties": {
  13924. "type": "string"
  13925. }
  13926. }
  13927. },
  13928. "additionalProperties": false
  13929. }
  13930. }
  13931. },
  13932. "required": true
  13933. },
  13934. "x-codeSamples": [
  13935. {
  13936. "lang": "js",
  13937. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.create({\n ...\n})"
  13938. }
  13939. ]
  13940. }
  13941. },
  13942. "/api/pty/{ptyID}": {
  13943. "get": {
  13944. "tags": ["pty"],
  13945. "operationId": "v2.pty.get",
  13946. "parameters": [
  13947. {
  13948. "name": "ptyID",
  13949. "in": "path",
  13950. "schema": {
  13951. "type": "string",
  13952. "pattern": "^pty"
  13953. },
  13954. "required": true
  13955. },
  13956. {
  13957. "name": "location",
  13958. "in": "query",
  13959. "schema": {
  13960. "type": "object",
  13961. "properties": {
  13962. "directory": {
  13963. "type": "string"
  13964. },
  13965. "workspace": {
  13966. "type": "string"
  13967. }
  13968. },
  13969. "additionalProperties": false
  13970. },
  13971. "required": false,
  13972. "style": "deepObject",
  13973. "explode": true
  13974. }
  13975. ],
  13976. "security": [],
  13977. "responses": {
  13978. "200": {
  13979. "description": "Success",
  13980. "content": {
  13981. "application/json": {
  13982. "schema": {
  13983. "type": "object",
  13984. "properties": {
  13985. "location": {
  13986. "$ref": "#/components/schemas/LocationInfo"
  13987. },
  13988. "data": {
  13989. "$ref": "#/components/schemas/Pty"
  13990. }
  13991. },
  13992. "required": ["location", "data"],
  13993. "additionalProperties": false
  13994. }
  13995. }
  13996. }
  13997. },
  13998. "400": {
  13999. "description": "InvalidRequestError",
  14000. "content": {
  14001. "application/json": {
  14002. "schema": {
  14003. "$ref": "#/components/schemas/InvalidRequestError"
  14004. }
  14005. }
  14006. }
  14007. },
  14008. "401": {
  14009. "description": "UnauthorizedError",
  14010. "content": {
  14011. "application/json": {
  14012. "schema": {
  14013. "$ref": "#/components/schemas/UnauthorizedError"
  14014. }
  14015. }
  14016. }
  14017. },
  14018. "404": {
  14019. "description": "PtyNotFoundError",
  14020. "content": {
  14021. "application/json": {
  14022. "schema": {
  14023. "$ref": "#/components/schemas/PtyNotFoundError"
  14024. }
  14025. }
  14026. }
  14027. }
  14028. },
  14029. "description": "Get one PTY session, including its exit code once exited.",
  14030. "summary": "Get PTY session",
  14031. "x-codeSamples": [
  14032. {
  14033. "lang": "js",
  14034. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.get({\n ...\n})"
  14035. }
  14036. ]
  14037. },
  14038. "put": {
  14039. "tags": ["pty"],
  14040. "operationId": "v2.pty.update",
  14041. "parameters": [
  14042. {
  14043. "name": "ptyID",
  14044. "in": "path",
  14045. "schema": {
  14046. "type": "string",
  14047. "pattern": "^pty"
  14048. },
  14049. "required": true
  14050. },
  14051. {
  14052. "name": "location",
  14053. "in": "query",
  14054. "schema": {
  14055. "type": "object",
  14056. "properties": {
  14057. "directory": {
  14058. "type": "string"
  14059. },
  14060. "workspace": {
  14061. "type": "string"
  14062. }
  14063. },
  14064. "additionalProperties": false
  14065. },
  14066. "required": false,
  14067. "style": "deepObject",
  14068. "explode": true
  14069. }
  14070. ],
  14071. "security": [],
  14072. "responses": {
  14073. "200": {
  14074. "description": "Success",
  14075. "content": {
  14076. "application/json": {
  14077. "schema": {
  14078. "type": "object",
  14079. "properties": {
  14080. "location": {
  14081. "$ref": "#/components/schemas/LocationInfo"
  14082. },
  14083. "data": {
  14084. "$ref": "#/components/schemas/Pty"
  14085. }
  14086. },
  14087. "required": ["location", "data"],
  14088. "additionalProperties": false
  14089. }
  14090. }
  14091. }
  14092. },
  14093. "400": {
  14094. "description": "InvalidRequestError",
  14095. "content": {
  14096. "application/json": {
  14097. "schema": {
  14098. "$ref": "#/components/schemas/InvalidRequestError"
  14099. }
  14100. }
  14101. }
  14102. },
  14103. "401": {
  14104. "description": "UnauthorizedError",
  14105. "content": {
  14106. "application/json": {
  14107. "schema": {
  14108. "$ref": "#/components/schemas/UnauthorizedError"
  14109. }
  14110. }
  14111. }
  14112. },
  14113. "404": {
  14114. "description": "PtyNotFoundError",
  14115. "content": {
  14116. "application/json": {
  14117. "schema": {
  14118. "$ref": "#/components/schemas/PtyNotFoundError"
  14119. }
  14120. }
  14121. }
  14122. }
  14123. },
  14124. "description": "Update the title or viewport size of one PTY session.",
  14125. "summary": "Update PTY session",
  14126. "requestBody": {
  14127. "content": {
  14128. "application/json": {
  14129. "schema": {
  14130. "type": "object",
  14131. "properties": {
  14132. "title": {
  14133. "type": "string"
  14134. },
  14135. "size": {
  14136. "type": "object",
  14137. "properties": {
  14138. "rows": {
  14139. "type": "integer",
  14140. "exclusiveMinimum": 0
  14141. },
  14142. "cols": {
  14143. "type": "integer",
  14144. "exclusiveMinimum": 0
  14145. }
  14146. },
  14147. "required": ["rows", "cols"],
  14148. "additionalProperties": false
  14149. }
  14150. },
  14151. "additionalProperties": false
  14152. }
  14153. }
  14154. },
  14155. "required": true
  14156. },
  14157. "x-codeSamples": [
  14158. {
  14159. "lang": "js",
  14160. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.update({\n ...\n})"
  14161. }
  14162. ]
  14163. },
  14164. "delete": {
  14165. "tags": ["pty"],
  14166. "operationId": "v2.pty.remove",
  14167. "parameters": [
  14168. {
  14169. "name": "ptyID",
  14170. "in": "path",
  14171. "schema": {
  14172. "type": "string",
  14173. "pattern": "^pty"
  14174. },
  14175. "required": true
  14176. },
  14177. {
  14178. "name": "location",
  14179. "in": "query",
  14180. "schema": {
  14181. "type": "object",
  14182. "properties": {
  14183. "directory": {
  14184. "type": "string"
  14185. },
  14186. "workspace": {
  14187. "type": "string"
  14188. }
  14189. },
  14190. "additionalProperties": false
  14191. },
  14192. "required": false,
  14193. "style": "deepObject",
  14194. "explode": true
  14195. }
  14196. ],
  14197. "security": [],
  14198. "responses": {
  14199. "204": {
  14200. "description": "<No Content>"
  14201. },
  14202. "400": {
  14203. "description": "InvalidRequestError",
  14204. "content": {
  14205. "application/json": {
  14206. "schema": {
  14207. "$ref": "#/components/schemas/InvalidRequestError"
  14208. }
  14209. }
  14210. }
  14211. },
  14212. "401": {
  14213. "description": "UnauthorizedError",
  14214. "content": {
  14215. "application/json": {
  14216. "schema": {
  14217. "$ref": "#/components/schemas/UnauthorizedError"
  14218. }
  14219. }
  14220. }
  14221. },
  14222. "404": {
  14223. "description": "PtyNotFoundError",
  14224. "content": {
  14225. "application/json": {
  14226. "schema": {
  14227. "$ref": "#/components/schemas/PtyNotFoundError"
  14228. }
  14229. }
  14230. }
  14231. }
  14232. },
  14233. "description": "Terminate and remove one PTY session.",
  14234. "summary": "Remove PTY session",
  14235. "x-codeSamples": [
  14236. {
  14237. "lang": "js",
  14238. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.remove({\n ...\n})"
  14239. }
  14240. ]
  14241. }
  14242. },
  14243. "/api/pty/{ptyID}/connect-token": {
  14244. "post": {
  14245. "tags": ["pty"],
  14246. "operationId": "v2.pty.connectToken",
  14247. "parameters": [
  14248. {
  14249. "name": "ptyID",
  14250. "in": "path",
  14251. "schema": {
  14252. "type": "string",
  14253. "pattern": "^pty"
  14254. },
  14255. "required": true
  14256. },
  14257. {
  14258. "name": "location",
  14259. "in": "query",
  14260. "schema": {
  14261. "type": "object",
  14262. "properties": {
  14263. "directory": {
  14264. "type": "string"
  14265. },
  14266. "workspace": {
  14267. "type": "string"
  14268. }
  14269. },
  14270. "additionalProperties": false
  14271. },
  14272. "required": false,
  14273. "style": "deepObject",
  14274. "explode": true
  14275. }
  14276. ],
  14277. "security": [],
  14278. "responses": {
  14279. "200": {
  14280. "description": "Success",
  14281. "content": {
  14282. "application/json": {
  14283. "schema": {
  14284. "type": "object",
  14285. "properties": {
  14286. "location": {
  14287. "$ref": "#/components/schemas/LocationInfo"
  14288. },
  14289. "data": {
  14290. "$ref": "#/components/schemas/PtyTicketConnectToken"
  14291. }
  14292. },
  14293. "required": ["location", "data"],
  14294. "additionalProperties": false
  14295. }
  14296. }
  14297. }
  14298. },
  14299. "400": {
  14300. "description": "InvalidRequestError",
  14301. "content": {
  14302. "application/json": {
  14303. "schema": {
  14304. "$ref": "#/components/schemas/InvalidRequestError"
  14305. }
  14306. }
  14307. }
  14308. },
  14309. "401": {
  14310. "description": "UnauthorizedError",
  14311. "content": {
  14312. "application/json": {
  14313. "schema": {
  14314. "$ref": "#/components/schemas/UnauthorizedError"
  14315. }
  14316. }
  14317. }
  14318. },
  14319. "403": {
  14320. "description": "ForbiddenError",
  14321. "content": {
  14322. "application/json": {
  14323. "schema": {
  14324. "$ref": "#/components/schemas/ForbiddenError"
  14325. }
  14326. }
  14327. }
  14328. },
  14329. "404": {
  14330. "description": "PtyNotFoundError",
  14331. "content": {
  14332. "application/json": {
  14333. "schema": {
  14334. "$ref": "#/components/schemas/PtyNotFoundError"
  14335. }
  14336. }
  14337. }
  14338. }
  14339. },
  14340. "description": "Create a short-lived single-use ticket for opening a PTY WebSocket connection.",
  14341. "summary": "Create PTY WebSocket token",
  14342. "x-codeSamples": [
  14343. {
  14344. "lang": "js",
  14345. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.connectToken({\n ...\n})"
  14346. }
  14347. ]
  14348. }
  14349. },
  14350. "/api/pty/{ptyID}/connect": {
  14351. "get": {
  14352. "tags": ["pty"],
  14353. "operationId": "v2.pty.connect",
  14354. "parameters": [
  14355. {
  14356. "name": "ptyID",
  14357. "in": "path",
  14358. "schema": {
  14359. "type": "string",
  14360. "pattern": "^pty"
  14361. },
  14362. "required": true
  14363. },
  14364. {
  14365. "in": "query",
  14366. "name": "location[directory]",
  14367. "schema": {
  14368. "type": "string"
  14369. }
  14370. },
  14371. {
  14372. "in": "query",
  14373. "name": "location[workspace]",
  14374. "schema": {
  14375. "type": "string"
  14376. }
  14377. },
  14378. {
  14379. "in": "query",
  14380. "name": "cursor",
  14381. "schema": {
  14382. "type": "string"
  14383. }
  14384. },
  14385. {
  14386. "in": "query",
  14387. "name": "ticket",
  14388. "schema": {
  14389. "type": "string"
  14390. }
  14391. }
  14392. ],
  14393. "security": [],
  14394. "responses": {
  14395. "200": {
  14396. "description": "Success",
  14397. "content": {
  14398. "application/json": {
  14399. "schema": {
  14400. "type": "boolean"
  14401. }
  14402. }
  14403. }
  14404. },
  14405. "400": {
  14406. "description": "InvalidRequestError",
  14407. "content": {
  14408. "application/json": {
  14409. "schema": {
  14410. "$ref": "#/components/schemas/InvalidRequestError"
  14411. }
  14412. }
  14413. }
  14414. },
  14415. "401": {
  14416. "description": "UnauthorizedError",
  14417. "content": {
  14418. "application/json": {
  14419. "schema": {
  14420. "$ref": "#/components/schemas/UnauthorizedError"
  14421. }
  14422. }
  14423. }
  14424. },
  14425. "403": {
  14426. "description": "ForbiddenError",
  14427. "content": {
  14428. "application/json": {
  14429. "schema": {
  14430. "$ref": "#/components/schemas/ForbiddenError"
  14431. }
  14432. }
  14433. }
  14434. },
  14435. "404": {
  14436. "description": "PtyNotFoundError",
  14437. "content": {
  14438. "application/json": {
  14439. "schema": {
  14440. "$ref": "#/components/schemas/PtyNotFoundError"
  14441. }
  14442. }
  14443. }
  14444. }
  14445. },
  14446. "description": "Establish a WebSocket connection streaming PTY output and accepting terminal input.",
  14447. "summary": "Connect to PTY session",
  14448. "x-codeSamples": [
  14449. {
  14450. "lang": "js",
  14451. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.connect({\n ...\n})"
  14452. }
  14453. ]
  14454. }
  14455. },
  14456. "/api/question/request": {
  14457. "get": {
  14458. "tags": ["session questions"],
  14459. "operationId": "v2.question.request.list",
  14460. "parameters": [
  14461. {
  14462. "name": "location",
  14463. "in": "query",
  14464. "schema": {
  14465. "type": "object",
  14466. "properties": {
  14467. "directory": {
  14468. "type": "string"
  14469. },
  14470. "workspace": {
  14471. "type": "string"
  14472. }
  14473. },
  14474. "additionalProperties": false
  14475. },
  14476. "required": false,
  14477. "style": "deepObject",
  14478. "explode": true
  14479. }
  14480. ],
  14481. "security": [],
  14482. "responses": {
  14483. "200": {
  14484. "description": "Success",
  14485. "content": {
  14486. "application/json": {
  14487. "schema": {
  14488. "type": "object",
  14489. "properties": {
  14490. "location": {
  14491. "$ref": "#/components/schemas/LocationInfo"
  14492. },
  14493. "data": {
  14494. "type": "array",
  14495. "items": {
  14496. "$ref": "#/components/schemas/QuestionV2Request"
  14497. }
  14498. }
  14499. },
  14500. "required": ["location", "data"],
  14501. "additionalProperties": false
  14502. }
  14503. }
  14504. }
  14505. },
  14506. "400": {
  14507. "description": "InvalidRequestError",
  14508. "content": {
  14509. "application/json": {
  14510. "schema": {
  14511. "$ref": "#/components/schemas/InvalidRequestError"
  14512. }
  14513. }
  14514. }
  14515. },
  14516. "401": {
  14517. "description": "UnauthorizedError",
  14518. "content": {
  14519. "application/json": {
  14520. "schema": {
  14521. "$ref": "#/components/schemas/UnauthorizedError"
  14522. }
  14523. }
  14524. }
  14525. }
  14526. },
  14527. "description": "Retrieve pending question requests for a location.",
  14528. "summary": "List pending question requests",
  14529. "x-codeSamples": [
  14530. {
  14531. "lang": "js",
  14532. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.question.request.list({\n ...\n})"
  14533. }
  14534. ]
  14535. }
  14536. },
  14537. "/api/session/{sessionID}/question": {
  14538. "get": {
  14539. "tags": ["session questions"],
  14540. "operationId": "v2.session.question.list",
  14541. "parameters": [
  14542. {
  14543. "name": "sessionID",
  14544. "in": "path",
  14545. "schema": {
  14546. "type": "string",
  14547. "pattern": "^ses"
  14548. },
  14549. "required": true
  14550. }
  14551. ],
  14552. "security": [],
  14553. "responses": {
  14554. "200": {
  14555. "description": "Success",
  14556. "content": {
  14557. "application/json": {
  14558. "schema": {
  14559. "type": "object",
  14560. "properties": {
  14561. "data": {
  14562. "type": "array",
  14563. "items": {
  14564. "$ref": "#/components/schemas/QuestionV2Request"
  14565. }
  14566. }
  14567. },
  14568. "required": ["data"],
  14569. "additionalProperties": false
  14570. }
  14571. }
  14572. }
  14573. },
  14574. "400": {
  14575. "description": "InvalidRequestError",
  14576. "content": {
  14577. "application/json": {
  14578. "schema": {
  14579. "$ref": "#/components/schemas/InvalidRequestError"
  14580. }
  14581. }
  14582. }
  14583. },
  14584. "401": {
  14585. "description": "UnauthorizedError",
  14586. "content": {
  14587. "application/json": {
  14588. "schema": {
  14589. "$ref": "#/components/schemas/UnauthorizedError"
  14590. }
  14591. }
  14592. }
  14593. },
  14594. "404": {
  14595. "description": "SessionNotFoundError",
  14596. "content": {
  14597. "application/json": {
  14598. "schema": {
  14599. "anyOf": [
  14600. {
  14601. "$ref": "#/components/schemas/SessionNotFoundError"
  14602. },
  14603. {
  14604. "$ref": "#/components/schemas/SessionNotFoundError"
  14605. }
  14606. ]
  14607. }
  14608. }
  14609. }
  14610. }
  14611. },
  14612. "description": "Retrieve pending question requests owned by a session.",
  14613. "summary": "List session question requests",
  14614. "x-codeSamples": [
  14615. {
  14616. "lang": "js",
  14617. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.list({\n ...\n})"
  14618. }
  14619. ]
  14620. }
  14621. },
  14622. "/api/session/{sessionID}/question/{requestID}/reply": {
  14623. "post": {
  14624. "tags": ["session questions"],
  14625. "operationId": "v2.session.question.reply",
  14626. "parameters": [
  14627. {
  14628. "name": "sessionID",
  14629. "in": "path",
  14630. "schema": {
  14631. "type": "string",
  14632. "pattern": "^ses"
  14633. },
  14634. "required": true
  14635. },
  14636. {
  14637. "name": "requestID",
  14638. "in": "path",
  14639. "schema": {
  14640. "type": "string",
  14641. "pattern": "^que"
  14642. },
  14643. "required": true
  14644. }
  14645. ],
  14646. "security": [],
  14647. "responses": {
  14648. "204": {
  14649. "description": "<No Content>"
  14650. },
  14651. "400": {
  14652. "description": "InvalidRequestError",
  14653. "content": {
  14654. "application/json": {
  14655. "schema": {
  14656. "$ref": "#/components/schemas/InvalidRequestError"
  14657. }
  14658. }
  14659. }
  14660. },
  14661. "401": {
  14662. "description": "UnauthorizedError",
  14663. "content": {
  14664. "application/json": {
  14665. "schema": {
  14666. "$ref": "#/components/schemas/UnauthorizedError"
  14667. }
  14668. }
  14669. }
  14670. },
  14671. "404": {
  14672. "description": "SessionNotFoundError | QuestionNotFoundError",
  14673. "content": {
  14674. "application/json": {
  14675. "schema": {
  14676. "anyOf": [
  14677. {
  14678. "$ref": "#/components/schemas/QuestionNotFoundError"
  14679. },
  14680. {
  14681. "$ref": "#/components/schemas/SessionNotFoundError"
  14682. },
  14683. {
  14684. "$ref": "#/components/schemas/SessionNotFoundError"
  14685. }
  14686. ]
  14687. }
  14688. }
  14689. }
  14690. }
  14691. },
  14692. "description": "Answer a pending question request owned by a session.",
  14693. "summary": "Reply to pending question request",
  14694. "requestBody": {
  14695. "content": {
  14696. "application/json": {
  14697. "schema": {
  14698. "$ref": "#/components/schemas/QuestionV2Reply"
  14699. }
  14700. }
  14701. },
  14702. "required": true
  14703. },
  14704. "x-codeSamples": [
  14705. {
  14706. "lang": "js",
  14707. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reply({\n ...\n})"
  14708. }
  14709. ]
  14710. }
  14711. },
  14712. "/api/session/{sessionID}/question/{requestID}/reject": {
  14713. "post": {
  14714. "tags": ["session questions"],
  14715. "operationId": "v2.session.question.reject",
  14716. "parameters": [
  14717. {
  14718. "name": "sessionID",
  14719. "in": "path",
  14720. "schema": {
  14721. "type": "string",
  14722. "pattern": "^ses"
  14723. },
  14724. "required": true
  14725. },
  14726. {
  14727. "name": "requestID",
  14728. "in": "path",
  14729. "schema": {
  14730. "type": "string",
  14731. "pattern": "^que"
  14732. },
  14733. "required": true
  14734. }
  14735. ],
  14736. "security": [],
  14737. "responses": {
  14738. "204": {
  14739. "description": "<No Content>"
  14740. },
  14741. "400": {
  14742. "description": "InvalidRequestError",
  14743. "content": {
  14744. "application/json": {
  14745. "schema": {
  14746. "$ref": "#/components/schemas/InvalidRequestError"
  14747. }
  14748. }
  14749. }
  14750. },
  14751. "401": {
  14752. "description": "UnauthorizedError",
  14753. "content": {
  14754. "application/json": {
  14755. "schema": {
  14756. "$ref": "#/components/schemas/UnauthorizedError"
  14757. }
  14758. }
  14759. }
  14760. },
  14761. "404": {
  14762. "description": "SessionNotFoundError | QuestionNotFoundError",
  14763. "content": {
  14764. "application/json": {
  14765. "schema": {
  14766. "anyOf": [
  14767. {
  14768. "$ref": "#/components/schemas/QuestionNotFoundError"
  14769. },
  14770. {
  14771. "$ref": "#/components/schemas/SessionNotFoundError"
  14772. },
  14773. {
  14774. "$ref": "#/components/schemas/SessionNotFoundError"
  14775. }
  14776. ]
  14777. }
  14778. }
  14779. }
  14780. }
  14781. },
  14782. "description": "Reject a pending question request owned by a session.",
  14783. "summary": "Reject pending question request",
  14784. "x-codeSamples": [
  14785. {
  14786. "lang": "js",
  14787. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reject({\n ...\n})"
  14788. }
  14789. ]
  14790. }
  14791. },
  14792. "/api/reference": {
  14793. "get": {
  14794. "tags": ["reference"],
  14795. "operationId": "v2.reference.list",
  14796. "parameters": [
  14797. {
  14798. "name": "location",
  14799. "in": "query",
  14800. "schema": {
  14801. "type": "object",
  14802. "properties": {
  14803. "directory": {
  14804. "type": "string"
  14805. },
  14806. "workspace": {
  14807. "type": "string"
  14808. }
  14809. },
  14810. "additionalProperties": false
  14811. },
  14812. "required": false,
  14813. "style": "deepObject",
  14814. "explode": true
  14815. }
  14816. ],
  14817. "security": [],
  14818. "responses": {
  14819. "200": {
  14820. "description": "Success",
  14821. "content": {
  14822. "application/json": {
  14823. "schema": {
  14824. "type": "object",
  14825. "properties": {
  14826. "location": {
  14827. "$ref": "#/components/schemas/LocationInfo"
  14828. },
  14829. "data": {
  14830. "type": "array",
  14831. "items": {
  14832. "$ref": "#/components/schemas/ReferenceInfo"
  14833. }
  14834. }
  14835. },
  14836. "required": ["location", "data"],
  14837. "additionalProperties": false
  14838. }
  14839. }
  14840. }
  14841. },
  14842. "400": {
  14843. "description": "InvalidRequestError",
  14844. "content": {
  14845. "application/json": {
  14846. "schema": {
  14847. "$ref": "#/components/schemas/InvalidRequestError"
  14848. }
  14849. }
  14850. }
  14851. },
  14852. "401": {
  14853. "description": "UnauthorizedError",
  14854. "content": {
  14855. "application/json": {
  14856. "schema": {
  14857. "$ref": "#/components/schemas/UnauthorizedError"
  14858. }
  14859. }
  14860. }
  14861. }
  14862. },
  14863. "description": "List references available in the requested location.",
  14864. "summary": "List references",
  14865. "x-codeSamples": [
  14866. {
  14867. "lang": "js",
  14868. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.reference.list({\n ...\n})"
  14869. }
  14870. ]
  14871. }
  14872. },
  14873. "/experimental/project/{projectID}/copy": {
  14874. "post": {
  14875. "tags": ["projectCopy"],
  14876. "operationId": "v2.projectCopy.create",
  14877. "parameters": [
  14878. {
  14879. "name": "projectID",
  14880. "in": "path",
  14881. "schema": {
  14882. "type": "string"
  14883. },
  14884. "required": true
  14885. },
  14886. {
  14887. "name": "location",
  14888. "in": "query",
  14889. "schema": {
  14890. "type": "object",
  14891. "properties": {
  14892. "directory": {
  14893. "type": "string"
  14894. },
  14895. "workspace": {
  14896. "type": "string"
  14897. }
  14898. },
  14899. "additionalProperties": false
  14900. },
  14901. "required": false,
  14902. "style": "deepObject",
  14903. "explode": true
  14904. }
  14905. ],
  14906. "responses": {
  14907. "200": {
  14908. "description": "ProjectCopy.Copy",
  14909. "content": {
  14910. "application/json": {
  14911. "schema": {
  14912. "$ref": "#/components/schemas/ProjectCopyCopy"
  14913. }
  14914. }
  14915. }
  14916. },
  14917. "400": {
  14918. "description": "ProjectCopyError | InvalidRequestError",
  14919. "content": {
  14920. "application/json": {
  14921. "schema": {
  14922. "anyOf": [
  14923. {
  14924. "$ref": "#/components/schemas/ProjectCopyError"
  14925. },
  14926. {
  14927. "$ref": "#/components/schemas/InvalidRequestError"
  14928. }
  14929. ]
  14930. }
  14931. }
  14932. }
  14933. }
  14934. },
  14935. "requestBody": {
  14936. "content": {
  14937. "application/json": {
  14938. "schema": {
  14939. "type": "object",
  14940. "properties": {
  14941. "strategy": {
  14942. "type": "string"
  14943. },
  14944. "directory": {
  14945. "type": "string"
  14946. },
  14947. "name": {
  14948. "type": "string"
  14949. }
  14950. },
  14951. "required": ["strategy", "directory"],
  14952. "additionalProperties": false
  14953. }
  14954. }
  14955. }
  14956. },
  14957. "x-codeSamples": [
  14958. {
  14959. "lang": "js",
  14960. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.create({\n ...\n})"
  14961. }
  14962. ]
  14963. },
  14964. "delete": {
  14965. "tags": ["projectCopy"],
  14966. "operationId": "v2.projectCopy.remove",
  14967. "parameters": [
  14968. {
  14969. "name": "projectID",
  14970. "in": "path",
  14971. "schema": {
  14972. "type": "string"
  14973. },
  14974. "required": true
  14975. },
  14976. {
  14977. "name": "location",
  14978. "in": "query",
  14979. "schema": {
  14980. "type": "object",
  14981. "properties": {
  14982. "directory": {
  14983. "type": "string"
  14984. },
  14985. "workspace": {
  14986. "type": "string"
  14987. }
  14988. },
  14989. "additionalProperties": false
  14990. },
  14991. "required": false,
  14992. "style": "deepObject",
  14993. "explode": true
  14994. }
  14995. ],
  14996. "responses": {
  14997. "204": {
  14998. "description": "<No Content>"
  14999. },
  15000. "400": {
  15001. "description": "ProjectCopyError | InvalidRequestError",
  15002. "content": {
  15003. "application/json": {
  15004. "schema": {
  15005. "anyOf": [
  15006. {
  15007. "$ref": "#/components/schemas/ProjectCopyError"
  15008. },
  15009. {
  15010. "$ref": "#/components/schemas/InvalidRequestError"
  15011. }
  15012. ]
  15013. }
  15014. }
  15015. }
  15016. }
  15017. },
  15018. "requestBody": {
  15019. "content": {
  15020. "application/json": {
  15021. "schema": {
  15022. "type": "object",
  15023. "properties": {
  15024. "directory": {
  15025. "type": "string"
  15026. },
  15027. "force": {
  15028. "type": "boolean"
  15029. }
  15030. },
  15031. "required": ["directory", "force"],
  15032. "additionalProperties": false
  15033. }
  15034. }
  15035. }
  15036. },
  15037. "x-codeSamples": [
  15038. {
  15039. "lang": "js",
  15040. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.remove({\n ...\n})"
  15041. }
  15042. ]
  15043. }
  15044. },
  15045. "/experimental/project/{projectID}/copy/refresh": {
  15046. "post": {
  15047. "tags": ["projectCopy"],
  15048. "operationId": "v2.projectCopy.refresh",
  15049. "parameters": [
  15050. {
  15051. "name": "projectID",
  15052. "in": "path",
  15053. "schema": {
  15054. "type": "string"
  15055. },
  15056. "required": true
  15057. },
  15058. {
  15059. "name": "location",
  15060. "in": "query",
  15061. "schema": {
  15062. "type": "object",
  15063. "properties": {
  15064. "directory": {
  15065. "type": "string"
  15066. },
  15067. "workspace": {
  15068. "type": "string"
  15069. }
  15070. },
  15071. "additionalProperties": false
  15072. },
  15073. "required": false,
  15074. "style": "deepObject",
  15075. "explode": true
  15076. }
  15077. ],
  15078. "responses": {
  15079. "204": {
  15080. "description": "<No Content>"
  15081. },
  15082. "400": {
  15083. "description": "ProjectCopyError | InvalidRequestError",
  15084. "content": {
  15085. "application/json": {
  15086. "schema": {
  15087. "anyOf": [
  15088. {
  15089. "$ref": "#/components/schemas/ProjectCopyError"
  15090. },
  15091. {
  15092. "$ref": "#/components/schemas/InvalidRequestError"
  15093. }
  15094. ]
  15095. }
  15096. }
  15097. }
  15098. }
  15099. },
  15100. "x-codeSamples": [
  15101. {
  15102. "lang": "js",
  15103. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.refresh({\n ...\n})"
  15104. }
  15105. ]
  15106. }
  15107. },
  15108. "/pty/{ptyID}/connect": {
  15109. "get": {
  15110. "tags": ["pty"],
  15111. "operationId": "pty.connect",
  15112. "parameters": [
  15113. {
  15114. "name": "ptyID",
  15115. "in": "path",
  15116. "schema": {
  15117. "type": "string",
  15118. "pattern": "^pty"
  15119. },
  15120. "required": true
  15121. },
  15122. {
  15123. "in": "query",
  15124. "name": "directory",
  15125. "schema": {
  15126. "type": "string"
  15127. }
  15128. },
  15129. {
  15130. "in": "query",
  15131. "name": "workspace",
  15132. "schema": {
  15133. "type": "string"
  15134. }
  15135. },
  15136. {
  15137. "in": "query",
  15138. "name": "cursor",
  15139. "schema": {
  15140. "type": "string"
  15141. }
  15142. },
  15143. {
  15144. "in": "query",
  15145. "name": "ticket",
  15146. "schema": {
  15147. "type": "string"
  15148. }
  15149. }
  15150. ],
  15151. "responses": {
  15152. "200": {
  15153. "description": "Connected session",
  15154. "content": {
  15155. "application/json": {
  15156. "schema": {
  15157. "type": "boolean",
  15158. "description": "Connected session"
  15159. }
  15160. }
  15161. }
  15162. },
  15163. "403": {
  15164. "description": "Forbidden",
  15165. "content": {
  15166. "application/json": {
  15167. "schema": {
  15168. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  15169. }
  15170. }
  15171. }
  15172. },
  15173. "404": {
  15174. "description": "Not found",
  15175. "content": {
  15176. "application/json": {
  15177. "schema": {
  15178. "$ref": "#/components/schemas/NotFoundError"
  15179. }
  15180. }
  15181. }
  15182. }
  15183. },
  15184. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  15185. "summary": "Connect to PTY session",
  15186. "x-codeSamples": [
  15187. {
  15188. "lang": "js",
  15189. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  15190. }
  15191. ]
  15192. }
  15193. }
  15194. },
  15195. "components": {
  15196. "schemas": {
  15197. "Event": {
  15198. "anyOf": [
  15199. {
  15200. "$ref": "#/components/schemas/EventModels-devRefreshed"
  15201. },
  15202. {
  15203. "$ref": "#/components/schemas/EventIntegrationUpdated"
  15204. },
  15205. {
  15206. "$ref": "#/components/schemas/EventIntegrationConnectionUpdated"
  15207. },
  15208. {
  15209. "$ref": "#/components/schemas/EventCatalogUpdated"
  15210. },
  15211. {
  15212. "$ref": "#/components/schemas/EventSessionCreated"
  15213. },
  15214. {
  15215. "$ref": "#/components/schemas/EventSessionUpdated"
  15216. },
  15217. {
  15218. "$ref": "#/components/schemas/EventSessionDeleted"
  15219. },
  15220. {
  15221. "$ref": "#/components/schemas/EventMessageUpdated"
  15222. },
  15223. {
  15224. "$ref": "#/components/schemas/EventMessageRemoved"
  15225. },
  15226. {
  15227. "$ref": "#/components/schemas/EventMessagePartUpdated"
  15228. },
  15229. {
  15230. "$ref": "#/components/schemas/EventMessagePartRemoved"
  15231. },
  15232. {
  15233. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  15234. },
  15235. {
  15236. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  15237. },
  15238. {
  15239. "$ref": "#/components/schemas/EventSessionNextMoved"
  15240. },
  15241. {
  15242. "$ref": "#/components/schemas/EventSessionNextPrompted"
  15243. },
  15244. {
  15245. "$ref": "#/components/schemas/EventSessionNextPromptAdmitted"
  15246. },
  15247. {
  15248. "$ref": "#/components/schemas/EventSessionNextContextUpdated"
  15249. },
  15250. {
  15251. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  15252. },
  15253. {
  15254. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  15255. },
  15256. {
  15257. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  15258. },
  15259. {
  15260. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  15261. },
  15262. {
  15263. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  15264. },
  15265. {
  15266. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  15267. },
  15268. {
  15269. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  15270. },
  15271. {
  15272. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  15273. },
  15274. {
  15275. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  15276. },
  15277. {
  15278. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  15279. },
  15280. {
  15281. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  15282. },
  15283. {
  15284. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  15285. },
  15286. {
  15287. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  15288. },
  15289. {
  15290. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  15291. },
  15292. {
  15293. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  15294. },
  15295. {
  15296. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  15297. },
  15298. {
  15299. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  15300. },
  15301. {
  15302. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  15303. },
  15304. {
  15305. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  15306. },
  15307. {
  15308. "$ref": "#/components/schemas/EventSessionNextRetried"
  15309. },
  15310. {
  15311. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  15312. },
  15313. {
  15314. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  15315. },
  15316. {
  15317. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  15318. },
  15319. {
  15320. "$ref": "#/components/schemas/EventSessionNextRevertStaged"
  15321. },
  15322. {
  15323. "$ref": "#/components/schemas/EventSessionNextRevertCleared"
  15324. },
  15325. {
  15326. "$ref": "#/components/schemas/EventSessionNextRevertCommitted"
  15327. },
  15328. {
  15329. "$ref": "#/components/schemas/EventMessagePartDelta"
  15330. },
  15331. {
  15332. "$ref": "#/components/schemas/EventSessionDiff"
  15333. },
  15334. {
  15335. "$ref": "#/components/schemas/EventSessionError"
  15336. },
  15337. {
  15338. "$ref": "#/components/schemas/EventInstallationUpdated"
  15339. },
  15340. {
  15341. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  15342. },
  15343. {
  15344. "$ref": "#/components/schemas/EventFileEdited"
  15345. },
  15346. {
  15347. "$ref": "#/components/schemas/EventReferenceUpdated"
  15348. },
  15349. {
  15350. "$ref": "#/components/schemas/EventPermissionV2Asked"
  15351. },
  15352. {
  15353. "$ref": "#/components/schemas/EventPermissionV2Replied"
  15354. },
  15355. {
  15356. "$ref": "#/components/schemas/EventPluginAdded"
  15357. },
  15358. {
  15359. "$ref": "#/components/schemas/EventProjectDirectoriesUpdated"
  15360. },
  15361. {
  15362. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  15363. },
  15364. {
  15365. "$ref": "#/components/schemas/EventPtyCreated"
  15366. },
  15367. {
  15368. "$ref": "#/components/schemas/EventPtyUpdated"
  15369. },
  15370. {
  15371. "$ref": "#/components/schemas/EventPtyExited"
  15372. },
  15373. {
  15374. "$ref": "#/components/schemas/EventPtyDeleted"
  15375. },
  15376. {
  15377. "$ref": "#/components/schemas/EventQuestionV2Asked"
  15378. },
  15379. {
  15380. "$ref": "#/components/schemas/EventQuestionV2Replied"
  15381. },
  15382. {
  15383. "$ref": "#/components/schemas/EventQuestionV2Rejected"
  15384. },
  15385. {
  15386. "$ref": "#/components/schemas/EventTodoUpdated"
  15387. },
  15388. {
  15389. "$ref": "#/components/schemas/EventLspUpdated"
  15390. },
  15391. {
  15392. "$ref": "#/components/schemas/EventPermissionAsked"
  15393. },
  15394. {
  15395. "$ref": "#/components/schemas/EventPermissionReplied"
  15396. },
  15397. {
  15398. "$ref": "#/components/schemas/Event.tui.prompt.append"
  15399. },
  15400. {
  15401. "$ref": "#/components/schemas/Event.tui.command.execute"
  15402. },
  15403. {
  15404. "$ref": "#/components/schemas/Event.tui.toast.show"
  15405. },
  15406. {
  15407. "$ref": "#/components/schemas/Event.tui.session.select"
  15408. },
  15409. {
  15410. "$ref": "#/components/schemas/EventMcpToolsChanged"
  15411. },
  15412. {
  15413. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  15414. },
  15415. {
  15416. "$ref": "#/components/schemas/EventCommandExecuted"
  15417. },
  15418. {
  15419. "$ref": "#/components/schemas/EventProjectUpdated"
  15420. },
  15421. {
  15422. "$ref": "#/components/schemas/EventSessionStatus"
  15423. },
  15424. {
  15425. "$ref": "#/components/schemas/EventSessionIdle"
  15426. },
  15427. {
  15428. "$ref": "#/components/schemas/EventQuestionAsked"
  15429. },
  15430. {
  15431. "$ref": "#/components/schemas/EventQuestionReplied"
  15432. },
  15433. {
  15434. "$ref": "#/components/schemas/EventQuestionRejected"
  15435. },
  15436. {
  15437. "$ref": "#/components/schemas/EventSessionCompacted"
  15438. },
  15439. {
  15440. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  15441. },
  15442. {
  15443. "$ref": "#/components/schemas/EventWorkspaceReady"
  15444. },
  15445. {
  15446. "$ref": "#/components/schemas/EventWorkspaceFailed"
  15447. },
  15448. {
  15449. "$ref": "#/components/schemas/EventWorkspaceStatus"
  15450. },
  15451. {
  15452. "$ref": "#/components/schemas/EventWorktreeReady"
  15453. },
  15454. {
  15455. "$ref": "#/components/schemas/EventWorktreeFailed"
  15456. },
  15457. {
  15458. "$ref": "#/components/schemas/EventServerConnected"
  15459. },
  15460. {
  15461. "$ref": "#/components/schemas/EventGlobalDisposed"
  15462. },
  15463. {
  15464. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  15465. }
  15466. ]
  15467. },
  15468. "QuestionReplied": {
  15469. "type": "object",
  15470. "properties": {
  15471. "sessionID": {
  15472. "type": "string",
  15473. "pattern": "^ses"
  15474. },
  15475. "requestID": {
  15476. "type": "string",
  15477. "pattern": "^que"
  15478. },
  15479. "answers": {
  15480. "type": "array",
  15481. "items": {
  15482. "$ref": "#/components/schemas/QuestionAnswer"
  15483. }
  15484. }
  15485. },
  15486. "required": ["sessionID", "requestID", "answers"],
  15487. "additionalProperties": false
  15488. },
  15489. "QuestionRejected": {
  15490. "type": "object",
  15491. "properties": {
  15492. "sessionID": {
  15493. "type": "string",
  15494. "pattern": "^ses"
  15495. },
  15496. "requestID": {
  15497. "type": "string",
  15498. "pattern": "^que"
  15499. }
  15500. },
  15501. "required": ["sessionID", "requestID"],
  15502. "additionalProperties": false
  15503. },
  15504. "OAuth": {
  15505. "type": "object",
  15506. "properties": {
  15507. "type": {
  15508. "type": "string",
  15509. "enum": ["oauth"]
  15510. },
  15511. "refresh": {
  15512. "type": "string"
  15513. },
  15514. "access": {
  15515. "type": "string"
  15516. },
  15517. "expires": {
  15518. "type": "integer",
  15519. "minimum": 0
  15520. },
  15521. "accountId": {
  15522. "type": "string"
  15523. },
  15524. "enterpriseUrl": {
  15525. "type": "string"
  15526. }
  15527. },
  15528. "required": ["type", "refresh", "access", "expires"],
  15529. "additionalProperties": false
  15530. },
  15531. "ApiAuth": {
  15532. "type": "object",
  15533. "properties": {
  15534. "type": {
  15535. "type": "string",
  15536. "enum": ["api"]
  15537. },
  15538. "key": {
  15539. "type": "string"
  15540. },
  15541. "metadata": {
  15542. "type": "object",
  15543. "additionalProperties": {
  15544. "type": "string"
  15545. }
  15546. }
  15547. },
  15548. "required": ["type", "key"],
  15549. "additionalProperties": false
  15550. },
  15551. "WellKnownAuth": {
  15552. "type": "object",
  15553. "properties": {
  15554. "type": {
  15555. "type": "string",
  15556. "enum": ["wellknown"]
  15557. },
  15558. "key": {
  15559. "type": "string"
  15560. },
  15561. "token": {
  15562. "type": "string"
  15563. }
  15564. },
  15565. "required": ["type", "key", "token"],
  15566. "additionalProperties": false
  15567. },
  15568. "Auth": {
  15569. "anyOf": [
  15570. {
  15571. "$ref": "#/components/schemas/OAuth"
  15572. },
  15573. {
  15574. "$ref": "#/components/schemas/ApiAuth"
  15575. },
  15576. {
  15577. "$ref": "#/components/schemas/WellKnownAuth"
  15578. }
  15579. ]
  15580. },
  15581. "effect_HttpApiError_BadRequest": {
  15582. "type": "object",
  15583. "properties": {
  15584. "_tag": {
  15585. "type": "string",
  15586. "enum": ["BadRequest"]
  15587. }
  15588. },
  15589. "required": ["_tag"],
  15590. "additionalProperties": false
  15591. },
  15592. "InvalidRequestError": {
  15593. "type": "object",
  15594. "properties": {
  15595. "_tag": {
  15596. "type": "string",
  15597. "enum": ["InvalidRequestError"]
  15598. },
  15599. "message": {
  15600. "type": "string"
  15601. },
  15602. "kind": {
  15603. "type": "string"
  15604. },
  15605. "field": {
  15606. "type": "string"
  15607. }
  15608. },
  15609. "required": ["_tag", "message"],
  15610. "additionalProperties": false
  15611. },
  15612. "MoveSessionError": {
  15613. "type": "object",
  15614. "properties": {
  15615. "name": {
  15616. "type": "string",
  15617. "enum": ["MoveSessionError"]
  15618. },
  15619. "data": {
  15620. "type": "object",
  15621. "properties": {
  15622. "message": {
  15623. "type": "string"
  15624. }
  15625. },
  15626. "required": ["message"],
  15627. "additionalProperties": false
  15628. }
  15629. },
  15630. "required": ["name", "data"],
  15631. "additionalProperties": false
  15632. },
  15633. "SnapshotFileDiff": {
  15634. "type": "object",
  15635. "properties": {
  15636. "file": {
  15637. "type": "string"
  15638. },
  15639. "patch": {
  15640. "type": "string"
  15641. },
  15642. "additions": {
  15643. "type": "number"
  15644. },
  15645. "deletions": {
  15646. "type": "number"
  15647. },
  15648. "status": {
  15649. "type": "string",
  15650. "enum": ["added", "deleted", "modified"]
  15651. }
  15652. },
  15653. "required": ["additions", "deletions"],
  15654. "additionalProperties": false
  15655. },
  15656. "PermissionAction": {
  15657. "type": "string",
  15658. "enum": ["allow", "deny", "ask"]
  15659. },
  15660. "PermissionRule": {
  15661. "type": "object",
  15662. "properties": {
  15663. "permission": {
  15664. "type": "string"
  15665. },
  15666. "pattern": {
  15667. "type": "string"
  15668. },
  15669. "action": {
  15670. "$ref": "#/components/schemas/PermissionAction"
  15671. }
  15672. },
  15673. "required": ["permission", "pattern", "action"],
  15674. "additionalProperties": false
  15675. },
  15676. "PermissionRuleset": {
  15677. "type": "array",
  15678. "items": {
  15679. "$ref": "#/components/schemas/PermissionRule"
  15680. }
  15681. },
  15682. "Session": {
  15683. "type": "object",
  15684. "properties": {
  15685. "id": {
  15686. "type": "string",
  15687. "pattern": "^ses"
  15688. },
  15689. "slug": {
  15690. "type": "string"
  15691. },
  15692. "projectID": {
  15693. "type": "string"
  15694. },
  15695. "workspaceID": {
  15696. "type": "string",
  15697. "pattern": "^wrk"
  15698. },
  15699. "directory": {
  15700. "type": "string"
  15701. },
  15702. "path": {
  15703. "type": "string"
  15704. },
  15705. "parentID": {
  15706. "type": "string",
  15707. "pattern": "^ses"
  15708. },
  15709. "summary": {
  15710. "type": "object",
  15711. "properties": {
  15712. "additions": {
  15713. "type": "number"
  15714. },
  15715. "deletions": {
  15716. "type": "number"
  15717. },
  15718. "files": {
  15719. "type": "number"
  15720. },
  15721. "diffs": {
  15722. "type": "array",
  15723. "items": {
  15724. "$ref": "#/components/schemas/SnapshotFileDiff"
  15725. }
  15726. }
  15727. },
  15728. "required": ["additions", "deletions", "files"],
  15729. "additionalProperties": false
  15730. },
  15731. "cost": {
  15732. "type": "number"
  15733. },
  15734. "tokens": {
  15735. "type": "object",
  15736. "properties": {
  15737. "input": {
  15738. "type": "number"
  15739. },
  15740. "output": {
  15741. "type": "number"
  15742. },
  15743. "reasoning": {
  15744. "type": "number"
  15745. },
  15746. "cache": {
  15747. "type": "object",
  15748. "properties": {
  15749. "read": {
  15750. "type": "number"
  15751. },
  15752. "write": {
  15753. "type": "number"
  15754. }
  15755. },
  15756. "required": ["read", "write"],
  15757. "additionalProperties": false
  15758. }
  15759. },
  15760. "required": ["input", "output", "reasoning", "cache"],
  15761. "additionalProperties": false
  15762. },
  15763. "share": {
  15764. "type": "object",
  15765. "properties": {
  15766. "url": {
  15767. "type": "string"
  15768. }
  15769. },
  15770. "required": ["url"],
  15771. "additionalProperties": false
  15772. },
  15773. "title": {
  15774. "type": "string"
  15775. },
  15776. "agent": {
  15777. "type": "string"
  15778. },
  15779. "model": {
  15780. "type": "object",
  15781. "properties": {
  15782. "id": {
  15783. "type": "string"
  15784. },
  15785. "providerID": {
  15786. "type": "string"
  15787. },
  15788. "variant": {
  15789. "type": "string"
  15790. }
  15791. },
  15792. "required": ["id", "providerID"],
  15793. "additionalProperties": false
  15794. },
  15795. "version": {
  15796. "type": "string"
  15797. },
  15798. "metadata": {
  15799. "type": "object"
  15800. },
  15801. "time": {
  15802. "type": "object",
  15803. "properties": {
  15804. "created": {
  15805. "type": "integer",
  15806. "minimum": 0
  15807. },
  15808. "updated": {
  15809. "type": "integer",
  15810. "minimum": 0
  15811. },
  15812. "compacting": {
  15813. "type": "integer",
  15814. "minimum": 0
  15815. },
  15816. "archived": {
  15817. "type": "number"
  15818. }
  15819. },
  15820. "required": ["created", "updated"],
  15821. "additionalProperties": false
  15822. },
  15823. "permission": {
  15824. "$ref": "#/components/schemas/PermissionRuleset"
  15825. },
  15826. "revert": {
  15827. "type": "object",
  15828. "properties": {
  15829. "messageID": {
  15830. "type": "string",
  15831. "pattern": "^msg"
  15832. },
  15833. "partID": {
  15834. "type": "string",
  15835. "pattern": "^prt"
  15836. },
  15837. "snapshot": {
  15838. "type": "string"
  15839. },
  15840. "diff": {
  15841. "type": "string"
  15842. }
  15843. },
  15844. "required": ["messageID"],
  15845. "additionalProperties": false
  15846. }
  15847. },
  15848. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  15849. "additionalProperties": false
  15850. },
  15851. "OutputFormatText": {
  15852. "type": "object",
  15853. "properties": {
  15854. "type": {
  15855. "type": "string",
  15856. "enum": ["text"]
  15857. }
  15858. },
  15859. "required": ["type"],
  15860. "additionalProperties": false
  15861. },
  15862. "JSONSchema": {
  15863. "type": "object"
  15864. },
  15865. "OutputFormatJsonSchema": {
  15866. "type": "object",
  15867. "properties": {
  15868. "type": {
  15869. "type": "string",
  15870. "enum": ["json_schema"]
  15871. },
  15872. "schema": {
  15873. "$ref": "#/components/schemas/JSONSchema"
  15874. },
  15875. "retryCount": {
  15876. "type": "integer",
  15877. "minimum": 0
  15878. }
  15879. },
  15880. "required": ["type", "schema"],
  15881. "additionalProperties": false
  15882. },
  15883. "OutputFormat": {
  15884. "anyOf": [
  15885. {
  15886. "$ref": "#/components/schemas/OutputFormatText"
  15887. },
  15888. {
  15889. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  15890. }
  15891. ]
  15892. },
  15893. "UserMessage": {
  15894. "type": "object",
  15895. "properties": {
  15896. "id": {
  15897. "type": "string",
  15898. "pattern": "^msg"
  15899. },
  15900. "sessionID": {
  15901. "type": "string",
  15902. "pattern": "^ses"
  15903. },
  15904. "role": {
  15905. "type": "string",
  15906. "enum": ["user"]
  15907. },
  15908. "time": {
  15909. "type": "object",
  15910. "properties": {
  15911. "created": {
  15912. "type": "number",
  15913. "minimum": 0
  15914. }
  15915. },
  15916. "required": ["created"],
  15917. "additionalProperties": false
  15918. },
  15919. "format": {
  15920. "$ref": "#/components/schemas/OutputFormat"
  15921. },
  15922. "summary": {
  15923. "type": "object",
  15924. "properties": {
  15925. "title": {
  15926. "type": "string"
  15927. },
  15928. "body": {
  15929. "type": "string"
  15930. },
  15931. "diffs": {
  15932. "type": "array",
  15933. "items": {
  15934. "$ref": "#/components/schemas/SnapshotFileDiff"
  15935. }
  15936. }
  15937. },
  15938. "required": ["diffs"],
  15939. "additionalProperties": false
  15940. },
  15941. "agent": {
  15942. "type": "string"
  15943. },
  15944. "model": {
  15945. "type": "object",
  15946. "properties": {
  15947. "providerID": {
  15948. "type": "string"
  15949. },
  15950. "modelID": {
  15951. "type": "string"
  15952. },
  15953. "variant": {
  15954. "type": "string"
  15955. }
  15956. },
  15957. "required": ["providerID", "modelID"],
  15958. "additionalProperties": false
  15959. },
  15960. "system": {
  15961. "type": "string"
  15962. },
  15963. "tools": {
  15964. "type": "object",
  15965. "additionalProperties": {
  15966. "type": "boolean"
  15967. }
  15968. }
  15969. },
  15970. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  15971. "additionalProperties": false
  15972. },
  15973. "ProviderAuthError": {
  15974. "type": "object",
  15975. "properties": {
  15976. "name": {
  15977. "type": "string",
  15978. "enum": ["ProviderAuthError"]
  15979. },
  15980. "data": {
  15981. "type": "object",
  15982. "properties": {
  15983. "providerID": {
  15984. "type": "string"
  15985. },
  15986. "message": {
  15987. "type": "string"
  15988. }
  15989. },
  15990. "required": ["providerID", "message"],
  15991. "additionalProperties": false
  15992. }
  15993. },
  15994. "required": ["name", "data"],
  15995. "additionalProperties": false
  15996. },
  15997. "UnknownError": {
  15998. "type": "object",
  15999. "properties": {
  16000. "name": {
  16001. "type": "string",
  16002. "enum": ["UnknownError"]
  16003. },
  16004. "data": {
  16005. "type": "object",
  16006. "properties": {
  16007. "message": {
  16008. "type": "string"
  16009. },
  16010. "ref": {
  16011. "type": "string"
  16012. }
  16013. },
  16014. "required": ["message"],
  16015. "additionalProperties": false
  16016. }
  16017. },
  16018. "required": ["name", "data"],
  16019. "additionalProperties": false
  16020. },
  16021. "MessageOutputLengthError": {
  16022. "type": "object",
  16023. "properties": {
  16024. "name": {
  16025. "type": "string",
  16026. "enum": ["MessageOutputLengthError"]
  16027. },
  16028. "data": {
  16029. "type": "object",
  16030. "properties": {}
  16031. }
  16032. },
  16033. "required": ["name", "data"],
  16034. "additionalProperties": false
  16035. },
  16036. "MessageAbortedError": {
  16037. "type": "object",
  16038. "properties": {
  16039. "name": {
  16040. "type": "string",
  16041. "enum": ["MessageAbortedError"]
  16042. },
  16043. "data": {
  16044. "type": "object",
  16045. "properties": {
  16046. "message": {
  16047. "type": "string"
  16048. }
  16049. },
  16050. "required": ["message"],
  16051. "additionalProperties": false
  16052. }
  16053. },
  16054. "required": ["name", "data"],
  16055. "additionalProperties": false
  16056. },
  16057. "StructuredOutputError": {
  16058. "type": "object",
  16059. "properties": {
  16060. "name": {
  16061. "type": "string",
  16062. "enum": ["StructuredOutputError"]
  16063. },
  16064. "data": {
  16065. "type": "object",
  16066. "properties": {
  16067. "message": {
  16068. "type": "string"
  16069. },
  16070. "retries": {
  16071. "type": "integer",
  16072. "minimum": 0
  16073. }
  16074. },
  16075. "required": ["message", "retries"],
  16076. "additionalProperties": false
  16077. }
  16078. },
  16079. "required": ["name", "data"],
  16080. "additionalProperties": false
  16081. },
  16082. "ContextOverflowError": {
  16083. "type": "object",
  16084. "properties": {
  16085. "name": {
  16086. "type": "string",
  16087. "enum": ["ContextOverflowError"]
  16088. },
  16089. "data": {
  16090. "type": "object",
  16091. "properties": {
  16092. "message": {
  16093. "type": "string"
  16094. },
  16095. "responseBody": {
  16096. "type": "string"
  16097. }
  16098. },
  16099. "required": ["message"],
  16100. "additionalProperties": false
  16101. }
  16102. },
  16103. "required": ["name", "data"],
  16104. "additionalProperties": false
  16105. },
  16106. "ContentFilterError": {
  16107. "type": "object",
  16108. "properties": {
  16109. "name": {
  16110. "type": "string",
  16111. "enum": ["ContentFilterError"]
  16112. },
  16113. "data": {
  16114. "type": "object",
  16115. "properties": {
  16116. "message": {
  16117. "type": "string"
  16118. }
  16119. },
  16120. "required": ["message"],
  16121. "additionalProperties": false
  16122. }
  16123. },
  16124. "required": ["name", "data"],
  16125. "additionalProperties": false
  16126. },
  16127. "APIError": {
  16128. "type": "object",
  16129. "properties": {
  16130. "name": {
  16131. "type": "string",
  16132. "enum": ["APIError"]
  16133. },
  16134. "data": {
  16135. "type": "object",
  16136. "properties": {
  16137. "message": {
  16138. "type": "string"
  16139. },
  16140. "statusCode": {
  16141. "type": "integer",
  16142. "minimum": 0
  16143. },
  16144. "isRetryable": {
  16145. "type": "boolean"
  16146. },
  16147. "responseHeaders": {
  16148. "type": "object",
  16149. "additionalProperties": {
  16150. "type": "string"
  16151. }
  16152. },
  16153. "responseBody": {
  16154. "type": "string"
  16155. },
  16156. "metadata": {
  16157. "type": "object",
  16158. "additionalProperties": {
  16159. "type": "string"
  16160. }
  16161. }
  16162. },
  16163. "required": ["message", "isRetryable"],
  16164. "additionalProperties": false
  16165. }
  16166. },
  16167. "required": ["name", "data"],
  16168. "additionalProperties": false
  16169. },
  16170. "AssistantMessage": {
  16171. "type": "object",
  16172. "properties": {
  16173. "id": {
  16174. "type": "string",
  16175. "pattern": "^msg"
  16176. },
  16177. "sessionID": {
  16178. "type": "string",
  16179. "pattern": "^ses"
  16180. },
  16181. "role": {
  16182. "type": "string",
  16183. "enum": ["assistant"]
  16184. },
  16185. "time": {
  16186. "type": "object",
  16187. "properties": {
  16188. "created": {
  16189. "type": "integer",
  16190. "minimum": 0
  16191. },
  16192. "completed": {
  16193. "type": "integer",
  16194. "minimum": 0
  16195. }
  16196. },
  16197. "required": ["created"],
  16198. "additionalProperties": false
  16199. },
  16200. "error": {
  16201. "anyOf": [
  16202. {
  16203. "$ref": "#/components/schemas/ProviderAuthError"
  16204. },
  16205. {
  16206. "$ref": "#/components/schemas/UnknownError"
  16207. },
  16208. {
  16209. "$ref": "#/components/schemas/MessageOutputLengthError"
  16210. },
  16211. {
  16212. "$ref": "#/components/schemas/MessageAbortedError"
  16213. },
  16214. {
  16215. "$ref": "#/components/schemas/StructuredOutputError"
  16216. },
  16217. {
  16218. "$ref": "#/components/schemas/ContextOverflowError"
  16219. },
  16220. {
  16221. "$ref": "#/components/schemas/ContentFilterError"
  16222. },
  16223. {
  16224. "$ref": "#/components/schemas/APIError"
  16225. }
  16226. ]
  16227. },
  16228. "parentID": {
  16229. "type": "string",
  16230. "pattern": "^msg"
  16231. },
  16232. "modelID": {
  16233. "type": "string"
  16234. },
  16235. "providerID": {
  16236. "type": "string"
  16237. },
  16238. "mode": {
  16239. "type": "string"
  16240. },
  16241. "agent": {
  16242. "type": "string"
  16243. },
  16244. "path": {
  16245. "type": "object",
  16246. "properties": {
  16247. "cwd": {
  16248. "type": "string"
  16249. },
  16250. "root": {
  16251. "type": "string"
  16252. }
  16253. },
  16254. "required": ["cwd", "root"],
  16255. "additionalProperties": false
  16256. },
  16257. "summary": {
  16258. "type": "boolean"
  16259. },
  16260. "cost": {
  16261. "type": "number"
  16262. },
  16263. "tokens": {
  16264. "type": "object",
  16265. "properties": {
  16266. "total": {
  16267. "type": "number"
  16268. },
  16269. "input": {
  16270. "type": "number"
  16271. },
  16272. "output": {
  16273. "type": "number"
  16274. },
  16275. "reasoning": {
  16276. "type": "number"
  16277. },
  16278. "cache": {
  16279. "type": "object",
  16280. "properties": {
  16281. "read": {
  16282. "type": "number"
  16283. },
  16284. "write": {
  16285. "type": "number"
  16286. }
  16287. },
  16288. "required": ["read", "write"],
  16289. "additionalProperties": false
  16290. }
  16291. },
  16292. "required": ["input", "output", "reasoning", "cache"],
  16293. "additionalProperties": false
  16294. },
  16295. "structured": {},
  16296. "variant": {
  16297. "type": "string"
  16298. },
  16299. "finish": {
  16300. "type": "string"
  16301. }
  16302. },
  16303. "required": [
  16304. "id",
  16305. "sessionID",
  16306. "role",
  16307. "time",
  16308. "parentID",
  16309. "modelID",
  16310. "providerID",
  16311. "mode",
  16312. "agent",
  16313. "path",
  16314. "cost",
  16315. "tokens"
  16316. ],
  16317. "additionalProperties": false
  16318. },
  16319. "Message": {
  16320. "anyOf": [
  16321. {
  16322. "$ref": "#/components/schemas/UserMessage"
  16323. },
  16324. {
  16325. "$ref": "#/components/schemas/AssistantMessage"
  16326. }
  16327. ]
  16328. },
  16329. "TextPart": {
  16330. "type": "object",
  16331. "properties": {
  16332. "id": {
  16333. "type": "string",
  16334. "pattern": "^prt"
  16335. },
  16336. "sessionID": {
  16337. "type": "string",
  16338. "pattern": "^ses"
  16339. },
  16340. "messageID": {
  16341. "type": "string",
  16342. "pattern": "^msg"
  16343. },
  16344. "type": {
  16345. "type": "string",
  16346. "enum": ["text"]
  16347. },
  16348. "text": {
  16349. "type": "string"
  16350. },
  16351. "synthetic": {
  16352. "type": "boolean"
  16353. },
  16354. "ignored": {
  16355. "type": "boolean"
  16356. },
  16357. "time": {
  16358. "type": "object",
  16359. "properties": {
  16360. "start": {
  16361. "type": "integer",
  16362. "minimum": 0
  16363. },
  16364. "end": {
  16365. "type": "integer",
  16366. "minimum": 0
  16367. }
  16368. },
  16369. "required": ["start"],
  16370. "additionalProperties": false
  16371. },
  16372. "metadata": {
  16373. "type": "object"
  16374. }
  16375. },
  16376. "required": ["id", "sessionID", "messageID", "type", "text"],
  16377. "additionalProperties": false
  16378. },
  16379. "SubtaskPart": {
  16380. "type": "object",
  16381. "properties": {
  16382. "id": {
  16383. "type": "string",
  16384. "pattern": "^prt"
  16385. },
  16386. "sessionID": {
  16387. "type": "string",
  16388. "pattern": "^ses"
  16389. },
  16390. "messageID": {
  16391. "type": "string",
  16392. "pattern": "^msg"
  16393. },
  16394. "type": {
  16395. "type": "string",
  16396. "enum": ["subtask"]
  16397. },
  16398. "prompt": {
  16399. "type": "string"
  16400. },
  16401. "description": {
  16402. "type": "string"
  16403. },
  16404. "agent": {
  16405. "type": "string"
  16406. },
  16407. "model": {
  16408. "type": "object",
  16409. "properties": {
  16410. "providerID": {
  16411. "type": "string"
  16412. },
  16413. "modelID": {
  16414. "type": "string"
  16415. }
  16416. },
  16417. "required": ["providerID", "modelID"],
  16418. "additionalProperties": false
  16419. },
  16420. "command": {
  16421. "type": "string"
  16422. }
  16423. },
  16424. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  16425. "additionalProperties": false
  16426. },
  16427. "ReasoningPart": {
  16428. "type": "object",
  16429. "properties": {
  16430. "id": {
  16431. "type": "string",
  16432. "pattern": "^prt"
  16433. },
  16434. "sessionID": {
  16435. "type": "string",
  16436. "pattern": "^ses"
  16437. },
  16438. "messageID": {
  16439. "type": "string",
  16440. "pattern": "^msg"
  16441. },
  16442. "type": {
  16443. "type": "string",
  16444. "enum": ["reasoning"]
  16445. },
  16446. "text": {
  16447. "type": "string"
  16448. },
  16449. "metadata": {
  16450. "type": "object"
  16451. },
  16452. "time": {
  16453. "type": "object",
  16454. "properties": {
  16455. "start": {
  16456. "type": "integer",
  16457. "minimum": 0
  16458. },
  16459. "end": {
  16460. "type": "integer",
  16461. "minimum": 0
  16462. }
  16463. },
  16464. "required": ["start"],
  16465. "additionalProperties": false
  16466. }
  16467. },
  16468. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  16469. "additionalProperties": false
  16470. },
  16471. "FilePartSourceText": {
  16472. "type": "object",
  16473. "properties": {
  16474. "value": {
  16475. "type": "string"
  16476. },
  16477. "start": {
  16478. "type": "number"
  16479. },
  16480. "end": {
  16481. "type": "number"
  16482. }
  16483. },
  16484. "required": ["value", "start", "end"],
  16485. "additionalProperties": false
  16486. },
  16487. "FileSource": {
  16488. "type": "object",
  16489. "properties": {
  16490. "text": {
  16491. "$ref": "#/components/schemas/FilePartSourceText"
  16492. },
  16493. "type": {
  16494. "type": "string",
  16495. "enum": ["file"]
  16496. },
  16497. "path": {
  16498. "type": "string"
  16499. }
  16500. },
  16501. "required": ["text", "type", "path"],
  16502. "additionalProperties": false
  16503. },
  16504. "Range": {
  16505. "type": "object",
  16506. "properties": {
  16507. "start": {
  16508. "type": "object",
  16509. "properties": {
  16510. "line": {
  16511. "type": "integer",
  16512. "minimum": 0
  16513. },
  16514. "character": {
  16515. "type": "integer",
  16516. "minimum": 0
  16517. }
  16518. },
  16519. "required": ["line", "character"],
  16520. "additionalProperties": false
  16521. },
  16522. "end": {
  16523. "type": "object",
  16524. "properties": {
  16525. "line": {
  16526. "type": "integer",
  16527. "minimum": 0
  16528. },
  16529. "character": {
  16530. "type": "integer",
  16531. "minimum": 0
  16532. }
  16533. },
  16534. "required": ["line", "character"],
  16535. "additionalProperties": false
  16536. }
  16537. },
  16538. "required": ["start", "end"],
  16539. "additionalProperties": false
  16540. },
  16541. "SymbolSource": {
  16542. "type": "object",
  16543. "properties": {
  16544. "text": {
  16545. "$ref": "#/components/schemas/FilePartSourceText"
  16546. },
  16547. "type": {
  16548. "type": "string",
  16549. "enum": ["symbol"]
  16550. },
  16551. "path": {
  16552. "type": "string"
  16553. },
  16554. "range": {
  16555. "$ref": "#/components/schemas/Range"
  16556. },
  16557. "name": {
  16558. "type": "string"
  16559. },
  16560. "kind": {
  16561. "type": "integer",
  16562. "minimum": 0
  16563. }
  16564. },
  16565. "required": ["text", "type", "path", "range", "name", "kind"],
  16566. "additionalProperties": false
  16567. },
  16568. "ResourceSource": {
  16569. "type": "object",
  16570. "properties": {
  16571. "text": {
  16572. "$ref": "#/components/schemas/FilePartSourceText"
  16573. },
  16574. "type": {
  16575. "type": "string",
  16576. "enum": ["resource"]
  16577. },
  16578. "clientName": {
  16579. "type": "string"
  16580. },
  16581. "uri": {
  16582. "type": "string"
  16583. }
  16584. },
  16585. "required": ["text", "type", "clientName", "uri"],
  16586. "additionalProperties": false
  16587. },
  16588. "FilePartSource": {
  16589. "anyOf": [
  16590. {
  16591. "$ref": "#/components/schemas/FileSource"
  16592. },
  16593. {
  16594. "$ref": "#/components/schemas/SymbolSource"
  16595. },
  16596. {
  16597. "$ref": "#/components/schemas/ResourceSource"
  16598. }
  16599. ]
  16600. },
  16601. "FilePart": {
  16602. "type": "object",
  16603. "properties": {
  16604. "id": {
  16605. "type": "string",
  16606. "pattern": "^prt"
  16607. },
  16608. "sessionID": {
  16609. "type": "string",
  16610. "pattern": "^ses"
  16611. },
  16612. "messageID": {
  16613. "type": "string",
  16614. "pattern": "^msg"
  16615. },
  16616. "type": {
  16617. "type": "string",
  16618. "enum": ["file"]
  16619. },
  16620. "mime": {
  16621. "type": "string"
  16622. },
  16623. "filename": {
  16624. "type": "string"
  16625. },
  16626. "url": {
  16627. "type": "string"
  16628. },
  16629. "source": {
  16630. "$ref": "#/components/schemas/FilePartSource"
  16631. }
  16632. },
  16633. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  16634. "additionalProperties": false
  16635. },
  16636. "ToolStatePending": {
  16637. "type": "object",
  16638. "properties": {
  16639. "status": {
  16640. "type": "string",
  16641. "enum": ["pending"]
  16642. },
  16643. "input": {
  16644. "type": "object"
  16645. },
  16646. "raw": {
  16647. "type": "string"
  16648. }
  16649. },
  16650. "required": ["status", "input", "raw"],
  16651. "additionalProperties": false
  16652. },
  16653. "ToolStateRunning": {
  16654. "type": "object",
  16655. "properties": {
  16656. "status": {
  16657. "type": "string",
  16658. "enum": ["running"]
  16659. },
  16660. "input": {
  16661. "type": "object"
  16662. },
  16663. "title": {
  16664. "type": "string"
  16665. },
  16666. "metadata": {
  16667. "type": "object"
  16668. },
  16669. "time": {
  16670. "type": "object",
  16671. "properties": {
  16672. "start": {
  16673. "type": "integer",
  16674. "minimum": 0
  16675. }
  16676. },
  16677. "required": ["start"],
  16678. "additionalProperties": false
  16679. }
  16680. },
  16681. "required": ["status", "input", "time"],
  16682. "additionalProperties": false
  16683. },
  16684. "ToolStateCompleted": {
  16685. "type": "object",
  16686. "properties": {
  16687. "status": {
  16688. "type": "string",
  16689. "enum": ["completed"]
  16690. },
  16691. "input": {
  16692. "type": "object"
  16693. },
  16694. "output": {
  16695. "type": "string"
  16696. },
  16697. "title": {
  16698. "type": "string"
  16699. },
  16700. "metadata": {
  16701. "type": "object"
  16702. },
  16703. "time": {
  16704. "type": "object",
  16705. "properties": {
  16706. "start": {
  16707. "type": "integer",
  16708. "minimum": 0
  16709. },
  16710. "end": {
  16711. "type": "integer",
  16712. "minimum": 0
  16713. },
  16714. "compacted": {
  16715. "type": "integer",
  16716. "minimum": 0
  16717. }
  16718. },
  16719. "required": ["start", "end"],
  16720. "additionalProperties": false
  16721. },
  16722. "attachments": {
  16723. "type": "array",
  16724. "items": {
  16725. "$ref": "#/components/schemas/FilePart"
  16726. }
  16727. }
  16728. },
  16729. "required": ["status", "input", "output", "title", "metadata", "time"],
  16730. "additionalProperties": false
  16731. },
  16732. "ToolStateError": {
  16733. "type": "object",
  16734. "properties": {
  16735. "status": {
  16736. "type": "string",
  16737. "enum": ["error"]
  16738. },
  16739. "input": {
  16740. "type": "object"
  16741. },
  16742. "error": {
  16743. "type": "string"
  16744. },
  16745. "metadata": {
  16746. "type": "object"
  16747. },
  16748. "time": {
  16749. "type": "object",
  16750. "properties": {
  16751. "start": {
  16752. "type": "integer",
  16753. "minimum": 0
  16754. },
  16755. "end": {
  16756. "type": "integer",
  16757. "minimum": 0
  16758. }
  16759. },
  16760. "required": ["start", "end"],
  16761. "additionalProperties": false
  16762. }
  16763. },
  16764. "required": ["status", "input", "error", "time"],
  16765. "additionalProperties": false
  16766. },
  16767. "ToolState": {
  16768. "anyOf": [
  16769. {
  16770. "$ref": "#/components/schemas/ToolStatePending"
  16771. },
  16772. {
  16773. "$ref": "#/components/schemas/ToolStateRunning"
  16774. },
  16775. {
  16776. "$ref": "#/components/schemas/ToolStateCompleted"
  16777. },
  16778. {
  16779. "$ref": "#/components/schemas/ToolStateError"
  16780. }
  16781. ]
  16782. },
  16783. "ToolPart": {
  16784. "type": "object",
  16785. "properties": {
  16786. "id": {
  16787. "type": "string",
  16788. "pattern": "^prt"
  16789. },
  16790. "sessionID": {
  16791. "type": "string",
  16792. "pattern": "^ses"
  16793. },
  16794. "messageID": {
  16795. "type": "string",
  16796. "pattern": "^msg"
  16797. },
  16798. "type": {
  16799. "type": "string",
  16800. "enum": ["tool"]
  16801. },
  16802. "callID": {
  16803. "type": "string"
  16804. },
  16805. "tool": {
  16806. "type": "string"
  16807. },
  16808. "state": {
  16809. "$ref": "#/components/schemas/ToolState"
  16810. },
  16811. "metadata": {
  16812. "type": "object"
  16813. }
  16814. },
  16815. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  16816. "additionalProperties": false
  16817. },
  16818. "StepStartPart": {
  16819. "type": "object",
  16820. "properties": {
  16821. "id": {
  16822. "type": "string",
  16823. "pattern": "^prt"
  16824. },
  16825. "sessionID": {
  16826. "type": "string",
  16827. "pattern": "^ses"
  16828. },
  16829. "messageID": {
  16830. "type": "string",
  16831. "pattern": "^msg"
  16832. },
  16833. "type": {
  16834. "type": "string",
  16835. "enum": ["step-start"]
  16836. },
  16837. "snapshot": {
  16838. "type": "string"
  16839. }
  16840. },
  16841. "required": ["id", "sessionID", "messageID", "type"],
  16842. "additionalProperties": false
  16843. },
  16844. "StepFinishPart": {
  16845. "type": "object",
  16846. "properties": {
  16847. "id": {
  16848. "type": "string",
  16849. "pattern": "^prt"
  16850. },
  16851. "sessionID": {
  16852. "type": "string",
  16853. "pattern": "^ses"
  16854. },
  16855. "messageID": {
  16856. "type": "string",
  16857. "pattern": "^msg"
  16858. },
  16859. "type": {
  16860. "type": "string",
  16861. "enum": ["step-finish"]
  16862. },
  16863. "reason": {
  16864. "type": "string"
  16865. },
  16866. "snapshot": {
  16867. "type": "string"
  16868. },
  16869. "cost": {
  16870. "type": "number"
  16871. },
  16872. "tokens": {
  16873. "type": "object",
  16874. "properties": {
  16875. "total": {
  16876. "type": "number"
  16877. },
  16878. "input": {
  16879. "type": "number"
  16880. },
  16881. "output": {
  16882. "type": "number"
  16883. },
  16884. "reasoning": {
  16885. "type": "number"
  16886. },
  16887. "cache": {
  16888. "type": "object",
  16889. "properties": {
  16890. "read": {
  16891. "type": "number"
  16892. },
  16893. "write": {
  16894. "type": "number"
  16895. }
  16896. },
  16897. "required": ["read", "write"],
  16898. "additionalProperties": false
  16899. }
  16900. },
  16901. "required": ["input", "output", "reasoning", "cache"],
  16902. "additionalProperties": false
  16903. }
  16904. },
  16905. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  16906. "additionalProperties": false
  16907. },
  16908. "SnapshotPart": {
  16909. "type": "object",
  16910. "properties": {
  16911. "id": {
  16912. "type": "string",
  16913. "pattern": "^prt"
  16914. },
  16915. "sessionID": {
  16916. "type": "string",
  16917. "pattern": "^ses"
  16918. },
  16919. "messageID": {
  16920. "type": "string",
  16921. "pattern": "^msg"
  16922. },
  16923. "type": {
  16924. "type": "string",
  16925. "enum": ["snapshot"]
  16926. },
  16927. "snapshot": {
  16928. "type": "string"
  16929. }
  16930. },
  16931. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  16932. "additionalProperties": false
  16933. },
  16934. "PatchPart": {
  16935. "type": "object",
  16936. "properties": {
  16937. "id": {
  16938. "type": "string",
  16939. "pattern": "^prt"
  16940. },
  16941. "sessionID": {
  16942. "type": "string",
  16943. "pattern": "^ses"
  16944. },
  16945. "messageID": {
  16946. "type": "string",
  16947. "pattern": "^msg"
  16948. },
  16949. "type": {
  16950. "type": "string",
  16951. "enum": ["patch"]
  16952. },
  16953. "hash": {
  16954. "type": "string"
  16955. },
  16956. "files": {
  16957. "type": "array",
  16958. "items": {
  16959. "type": "string"
  16960. }
  16961. }
  16962. },
  16963. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  16964. "additionalProperties": false
  16965. },
  16966. "AgentPart": {
  16967. "type": "object",
  16968. "properties": {
  16969. "id": {
  16970. "type": "string",
  16971. "pattern": "^prt"
  16972. },
  16973. "sessionID": {
  16974. "type": "string",
  16975. "pattern": "^ses"
  16976. },
  16977. "messageID": {
  16978. "type": "string",
  16979. "pattern": "^msg"
  16980. },
  16981. "type": {
  16982. "type": "string",
  16983. "enum": ["agent"]
  16984. },
  16985. "name": {
  16986. "type": "string"
  16987. },
  16988. "source": {
  16989. "type": "object",
  16990. "properties": {
  16991. "value": {
  16992. "type": "string"
  16993. },
  16994. "start": {
  16995. "type": "integer",
  16996. "minimum": 0
  16997. },
  16998. "end": {
  16999. "type": "integer",
  17000. "minimum": 0
  17001. }
  17002. },
  17003. "required": ["value", "start", "end"],
  17004. "additionalProperties": false
  17005. }
  17006. },
  17007. "required": ["id", "sessionID", "messageID", "type", "name"],
  17008. "additionalProperties": false
  17009. },
  17010. "RetryPart": {
  17011. "type": "object",
  17012. "properties": {
  17013. "id": {
  17014. "type": "string",
  17015. "pattern": "^prt"
  17016. },
  17017. "sessionID": {
  17018. "type": "string",
  17019. "pattern": "^ses"
  17020. },
  17021. "messageID": {
  17022. "type": "string",
  17023. "pattern": "^msg"
  17024. },
  17025. "type": {
  17026. "type": "string",
  17027. "enum": ["retry"]
  17028. },
  17029. "attempt": {
  17030. "type": "integer",
  17031. "minimum": 0
  17032. },
  17033. "error": {
  17034. "$ref": "#/components/schemas/APIError"
  17035. },
  17036. "time": {
  17037. "type": "object",
  17038. "properties": {
  17039. "created": {
  17040. "type": "integer",
  17041. "minimum": 0
  17042. }
  17043. },
  17044. "required": ["created"],
  17045. "additionalProperties": false
  17046. }
  17047. },
  17048. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  17049. "additionalProperties": false
  17050. },
  17051. "CompactionPart": {
  17052. "type": "object",
  17053. "properties": {
  17054. "id": {
  17055. "type": "string",
  17056. "pattern": "^prt"
  17057. },
  17058. "sessionID": {
  17059. "type": "string",
  17060. "pattern": "^ses"
  17061. },
  17062. "messageID": {
  17063. "type": "string",
  17064. "pattern": "^msg"
  17065. },
  17066. "type": {
  17067. "type": "string",
  17068. "enum": ["compaction"]
  17069. },
  17070. "auto": {
  17071. "type": "boolean"
  17072. },
  17073. "overflow": {
  17074. "type": "boolean"
  17075. },
  17076. "tail_start_id": {
  17077. "type": "string",
  17078. "pattern": "^msg"
  17079. }
  17080. },
  17081. "required": ["id", "sessionID", "messageID", "type", "auto"],
  17082. "additionalProperties": false
  17083. },
  17084. "Part": {
  17085. "anyOf": [
  17086. {
  17087. "$ref": "#/components/schemas/TextPart"
  17088. },
  17089. {
  17090. "$ref": "#/components/schemas/SubtaskPart"
  17091. },
  17092. {
  17093. "$ref": "#/components/schemas/ReasoningPart"
  17094. },
  17095. {
  17096. "$ref": "#/components/schemas/FilePart"
  17097. },
  17098. {
  17099. "$ref": "#/components/schemas/ToolPart"
  17100. },
  17101. {
  17102. "$ref": "#/components/schemas/StepStartPart"
  17103. },
  17104. {
  17105. "$ref": "#/components/schemas/StepFinishPart"
  17106. },
  17107. {
  17108. "$ref": "#/components/schemas/SnapshotPart"
  17109. },
  17110. {
  17111. "$ref": "#/components/schemas/PatchPart"
  17112. },
  17113. {
  17114. "$ref": "#/components/schemas/AgentPart"
  17115. },
  17116. {
  17117. "$ref": "#/components/schemas/RetryPart"
  17118. },
  17119. {
  17120. "$ref": "#/components/schemas/CompactionPart"
  17121. }
  17122. ]
  17123. },
  17124. "Prompt": {
  17125. "type": "object",
  17126. "properties": {
  17127. "text": {
  17128. "type": "string"
  17129. },
  17130. "files": {
  17131. "type": "array",
  17132. "items": {
  17133. "$ref": "#/components/schemas/PromptFileAttachment"
  17134. }
  17135. },
  17136. "agents": {
  17137. "type": "array",
  17138. "items": {
  17139. "$ref": "#/components/schemas/PromptAgentAttachment"
  17140. }
  17141. }
  17142. },
  17143. "required": ["text"],
  17144. "additionalProperties": false
  17145. },
  17146. "Pty": {
  17147. "type": "object",
  17148. "properties": {
  17149. "id": {
  17150. "type": "string",
  17151. "pattern": "^pty"
  17152. },
  17153. "title": {
  17154. "type": "string"
  17155. },
  17156. "command": {
  17157. "type": "string"
  17158. },
  17159. "args": {
  17160. "type": "array",
  17161. "items": {
  17162. "type": "string"
  17163. }
  17164. },
  17165. "cwd": {
  17166. "type": "string"
  17167. },
  17168. "status": {
  17169. "type": "string",
  17170. "enum": ["running", "exited"]
  17171. },
  17172. "pid": {
  17173. "type": "integer",
  17174. "minimum": 0
  17175. },
  17176. "exitCode": {
  17177. "type": "integer",
  17178. "minimum": 0
  17179. }
  17180. },
  17181. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  17182. "additionalProperties": false
  17183. },
  17184. "Todo": {
  17185. "type": "object",
  17186. "properties": {
  17187. "content": {
  17188. "type": "string",
  17189. "description": "Brief description of the task"
  17190. },
  17191. "status": {
  17192. "type": "string",
  17193. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  17194. },
  17195. "priority": {
  17196. "type": "string",
  17197. "description": "Priority level of the task: high, medium, low"
  17198. }
  17199. },
  17200. "required": ["content", "status", "priority"],
  17201. "additionalProperties": false
  17202. },
  17203. "SessionStatus": {
  17204. "anyOf": [
  17205. {
  17206. "type": "object",
  17207. "properties": {
  17208. "type": {
  17209. "type": "string",
  17210. "enum": ["idle"]
  17211. }
  17212. },
  17213. "required": ["type"],
  17214. "additionalProperties": false
  17215. },
  17216. {
  17217. "type": "object",
  17218. "properties": {
  17219. "type": {
  17220. "type": "string",
  17221. "enum": ["retry"]
  17222. },
  17223. "attempt": {
  17224. "type": "integer",
  17225. "minimum": 0
  17226. },
  17227. "message": {
  17228. "type": "string"
  17229. },
  17230. "action": {
  17231. "type": "object",
  17232. "properties": {
  17233. "reason": {
  17234. "type": "string"
  17235. },
  17236. "provider": {
  17237. "type": "string"
  17238. },
  17239. "title": {
  17240. "type": "string"
  17241. },
  17242. "message": {
  17243. "type": "string"
  17244. },
  17245. "label": {
  17246. "type": "string"
  17247. },
  17248. "link": {
  17249. "type": "string"
  17250. }
  17251. },
  17252. "required": ["reason", "provider", "title", "message", "label"],
  17253. "additionalProperties": false
  17254. },
  17255. "next": {
  17256. "type": "integer",
  17257. "minimum": 0
  17258. }
  17259. },
  17260. "required": ["type", "attempt", "message", "next"],
  17261. "additionalProperties": false
  17262. },
  17263. {
  17264. "type": "object",
  17265. "properties": {
  17266. "type": {
  17267. "type": "string",
  17268. "enum": ["busy"]
  17269. }
  17270. },
  17271. "required": ["type"],
  17272. "additionalProperties": false
  17273. }
  17274. ]
  17275. },
  17276. "QuestionOption": {
  17277. "type": "object",
  17278. "properties": {
  17279. "label": {
  17280. "type": "string",
  17281. "description": "Display text (1-5 words, concise)"
  17282. },
  17283. "description": {
  17284. "type": "string",
  17285. "description": "Explanation of choice"
  17286. }
  17287. },
  17288. "required": ["label", "description"],
  17289. "additionalProperties": false
  17290. },
  17291. "QuestionInfo": {
  17292. "type": "object",
  17293. "properties": {
  17294. "question": {
  17295. "type": "string",
  17296. "description": "Complete question"
  17297. },
  17298. "header": {
  17299. "type": "string",
  17300. "description": "Very short label (max 30 chars)"
  17301. },
  17302. "options": {
  17303. "type": "array",
  17304. "items": {
  17305. "$ref": "#/components/schemas/QuestionOption"
  17306. },
  17307. "description": "Available choices"
  17308. },
  17309. "multiple": {
  17310. "type": "boolean"
  17311. },
  17312. "custom": {
  17313. "type": "boolean"
  17314. }
  17315. },
  17316. "required": ["question", "header", "options"],
  17317. "additionalProperties": false
  17318. },
  17319. "QuestionTool": {
  17320. "type": "object",
  17321. "properties": {
  17322. "messageID": {
  17323. "type": "string",
  17324. "pattern": "^msg"
  17325. },
  17326. "callID": {
  17327. "type": "string"
  17328. }
  17329. },
  17330. "required": ["messageID", "callID"],
  17331. "additionalProperties": false
  17332. },
  17333. "QuestionAnswer": {
  17334. "type": "array",
  17335. "items": {
  17336. "type": "string"
  17337. }
  17338. },
  17339. "GlobalEvent": {
  17340. "type": "object",
  17341. "properties": {
  17342. "directory": {
  17343. "type": "string"
  17344. },
  17345. "project": {
  17346. "type": "string"
  17347. },
  17348. "workspace": {
  17349. "type": "string"
  17350. },
  17351. "payload": {
  17352. "anyOf": [
  17353. {
  17354. "type": "object",
  17355. "properties": {
  17356. "id": {
  17357. "type": "string",
  17358. "pattern": "^evt_"
  17359. },
  17360. "type": {
  17361. "type": "string",
  17362. "enum": ["models-dev.refreshed"]
  17363. },
  17364. "properties": {
  17365. "type": "object",
  17366. "properties": {}
  17367. }
  17368. },
  17369. "required": ["id", "type", "properties"],
  17370. "additionalProperties": false
  17371. },
  17372. {
  17373. "type": "object",
  17374. "properties": {
  17375. "id": {
  17376. "type": "string",
  17377. "pattern": "^evt_"
  17378. },
  17379. "type": {
  17380. "type": "string",
  17381. "enum": ["integration.updated"]
  17382. },
  17383. "properties": {
  17384. "type": "object",
  17385. "properties": {}
  17386. }
  17387. },
  17388. "required": ["id", "type", "properties"],
  17389. "additionalProperties": false
  17390. },
  17391. {
  17392. "type": "object",
  17393. "properties": {
  17394. "id": {
  17395. "type": "string",
  17396. "pattern": "^evt_"
  17397. },
  17398. "type": {
  17399. "type": "string",
  17400. "enum": ["integration.connection.updated"]
  17401. },
  17402. "properties": {
  17403. "type": "object",
  17404. "properties": {
  17405. "integrationID": {
  17406. "type": "string"
  17407. }
  17408. },
  17409. "required": ["integrationID"],
  17410. "additionalProperties": false
  17411. }
  17412. },
  17413. "required": ["id", "type", "properties"],
  17414. "additionalProperties": false
  17415. },
  17416. {
  17417. "type": "object",
  17418. "properties": {
  17419. "id": {
  17420. "type": "string",
  17421. "pattern": "^evt_"
  17422. },
  17423. "type": {
  17424. "type": "string",
  17425. "enum": ["catalog.updated"]
  17426. },
  17427. "properties": {
  17428. "type": "object",
  17429. "properties": {}
  17430. }
  17431. },
  17432. "required": ["id", "type", "properties"],
  17433. "additionalProperties": false
  17434. },
  17435. {
  17436. "type": "object",
  17437. "properties": {
  17438. "id": {
  17439. "type": "string",
  17440. "pattern": "^evt_"
  17441. },
  17442. "type": {
  17443. "type": "string",
  17444. "enum": ["session.created"]
  17445. },
  17446. "properties": {
  17447. "type": "object",
  17448. "properties": {
  17449. "sessionID": {
  17450. "type": "string",
  17451. "pattern": "^ses"
  17452. },
  17453. "info": {
  17454. "$ref": "#/components/schemas/Session"
  17455. }
  17456. },
  17457. "required": ["sessionID", "info"],
  17458. "additionalProperties": false
  17459. }
  17460. },
  17461. "required": ["id", "type", "properties"],
  17462. "additionalProperties": false
  17463. },
  17464. {
  17465. "type": "object",
  17466. "properties": {
  17467. "id": {
  17468. "type": "string",
  17469. "pattern": "^evt_"
  17470. },
  17471. "type": {
  17472. "type": "string",
  17473. "enum": ["session.updated"]
  17474. },
  17475. "properties": {
  17476. "type": "object",
  17477. "properties": {
  17478. "sessionID": {
  17479. "type": "string",
  17480. "pattern": "^ses"
  17481. },
  17482. "info": {
  17483. "$ref": "#/components/schemas/Session"
  17484. }
  17485. },
  17486. "required": ["sessionID", "info"],
  17487. "additionalProperties": false
  17488. }
  17489. },
  17490. "required": ["id", "type", "properties"],
  17491. "additionalProperties": false
  17492. },
  17493. {
  17494. "type": "object",
  17495. "properties": {
  17496. "id": {
  17497. "type": "string",
  17498. "pattern": "^evt_"
  17499. },
  17500. "type": {
  17501. "type": "string",
  17502. "enum": ["session.deleted"]
  17503. },
  17504. "properties": {
  17505. "type": "object",
  17506. "properties": {
  17507. "sessionID": {
  17508. "type": "string",
  17509. "pattern": "^ses"
  17510. },
  17511. "info": {
  17512. "$ref": "#/components/schemas/Session"
  17513. }
  17514. },
  17515. "required": ["sessionID", "info"],
  17516. "additionalProperties": false
  17517. }
  17518. },
  17519. "required": ["id", "type", "properties"],
  17520. "additionalProperties": false
  17521. },
  17522. {
  17523. "type": "object",
  17524. "properties": {
  17525. "id": {
  17526. "type": "string",
  17527. "pattern": "^evt_"
  17528. },
  17529. "type": {
  17530. "type": "string",
  17531. "enum": ["message.updated"]
  17532. },
  17533. "properties": {
  17534. "type": "object",
  17535. "properties": {
  17536. "sessionID": {
  17537. "type": "string",
  17538. "pattern": "^ses"
  17539. },
  17540. "info": {
  17541. "$ref": "#/components/schemas/Message"
  17542. }
  17543. },
  17544. "required": ["sessionID", "info"],
  17545. "additionalProperties": false
  17546. }
  17547. },
  17548. "required": ["id", "type", "properties"],
  17549. "additionalProperties": false
  17550. },
  17551. {
  17552. "type": "object",
  17553. "properties": {
  17554. "id": {
  17555. "type": "string",
  17556. "pattern": "^evt_"
  17557. },
  17558. "type": {
  17559. "type": "string",
  17560. "enum": ["message.removed"]
  17561. },
  17562. "properties": {
  17563. "type": "object",
  17564. "properties": {
  17565. "sessionID": {
  17566. "type": "string",
  17567. "pattern": "^ses"
  17568. },
  17569. "messageID": {
  17570. "type": "string",
  17571. "pattern": "^msg"
  17572. }
  17573. },
  17574. "required": ["sessionID", "messageID"],
  17575. "additionalProperties": false
  17576. }
  17577. },
  17578. "required": ["id", "type", "properties"],
  17579. "additionalProperties": false
  17580. },
  17581. {
  17582. "type": "object",
  17583. "properties": {
  17584. "id": {
  17585. "type": "string",
  17586. "pattern": "^evt_"
  17587. },
  17588. "type": {
  17589. "type": "string",
  17590. "enum": ["message.part.updated"]
  17591. },
  17592. "properties": {
  17593. "type": "object",
  17594. "properties": {
  17595. "sessionID": {
  17596. "type": "string",
  17597. "pattern": "^ses"
  17598. },
  17599. "part": {
  17600. "$ref": "#/components/schemas/Part"
  17601. },
  17602. "time": {
  17603. "type": "number"
  17604. }
  17605. },
  17606. "required": ["sessionID", "part", "time"],
  17607. "additionalProperties": false
  17608. }
  17609. },
  17610. "required": ["id", "type", "properties"],
  17611. "additionalProperties": false
  17612. },
  17613. {
  17614. "type": "object",
  17615. "properties": {
  17616. "id": {
  17617. "type": "string",
  17618. "pattern": "^evt_"
  17619. },
  17620. "type": {
  17621. "type": "string",
  17622. "enum": ["message.part.removed"]
  17623. },
  17624. "properties": {
  17625. "type": "object",
  17626. "properties": {
  17627. "sessionID": {
  17628. "type": "string",
  17629. "pattern": "^ses"
  17630. },
  17631. "messageID": {
  17632. "type": "string",
  17633. "pattern": "^msg"
  17634. },
  17635. "partID": {
  17636. "type": "string",
  17637. "pattern": "^prt"
  17638. }
  17639. },
  17640. "required": ["sessionID", "messageID", "partID"],
  17641. "additionalProperties": false
  17642. }
  17643. },
  17644. "required": ["id", "type", "properties"],
  17645. "additionalProperties": false
  17646. },
  17647. {
  17648. "type": "object",
  17649. "properties": {
  17650. "id": {
  17651. "type": "string",
  17652. "pattern": "^evt_"
  17653. },
  17654. "type": {
  17655. "type": "string",
  17656. "enum": ["session.next.agent.switched"]
  17657. },
  17658. "properties": {
  17659. "type": "object",
  17660. "properties": {
  17661. "timestamp": {
  17662. "type": "number"
  17663. },
  17664. "sessionID": {
  17665. "type": "string",
  17666. "pattern": "^ses"
  17667. },
  17668. "messageID": {
  17669. "type": "string",
  17670. "pattern": "^msg_"
  17671. },
  17672. "agent": {
  17673. "type": "string"
  17674. }
  17675. },
  17676. "required": ["timestamp", "sessionID", "messageID", "agent"],
  17677. "additionalProperties": false
  17678. }
  17679. },
  17680. "required": ["id", "type", "properties"],
  17681. "additionalProperties": false
  17682. },
  17683. {
  17684. "type": "object",
  17685. "properties": {
  17686. "id": {
  17687. "type": "string",
  17688. "pattern": "^evt_"
  17689. },
  17690. "type": {
  17691. "type": "string",
  17692. "enum": ["session.next.model.switched"]
  17693. },
  17694. "properties": {
  17695. "type": "object",
  17696. "properties": {
  17697. "timestamp": {
  17698. "type": "number"
  17699. },
  17700. "sessionID": {
  17701. "type": "string",
  17702. "pattern": "^ses"
  17703. },
  17704. "messageID": {
  17705. "type": "string",
  17706. "pattern": "^msg_"
  17707. },
  17708. "model": {
  17709. "$ref": "#/components/schemas/ModelRef"
  17710. }
  17711. },
  17712. "required": ["timestamp", "sessionID", "messageID", "model"],
  17713. "additionalProperties": false
  17714. }
  17715. },
  17716. "required": ["id", "type", "properties"],
  17717. "additionalProperties": false
  17718. },
  17719. {
  17720. "type": "object",
  17721. "properties": {
  17722. "id": {
  17723. "type": "string",
  17724. "pattern": "^evt_"
  17725. },
  17726. "type": {
  17727. "type": "string",
  17728. "enum": ["session.next.moved"]
  17729. },
  17730. "properties": {
  17731. "type": "object",
  17732. "properties": {
  17733. "timestamp": {
  17734. "type": "number"
  17735. },
  17736. "sessionID": {
  17737. "type": "string",
  17738. "pattern": "^ses"
  17739. },
  17740. "location": {
  17741. "$ref": "#/components/schemas/LocationRef"
  17742. },
  17743. "subdirectory": {
  17744. "type": "string"
  17745. }
  17746. },
  17747. "required": ["timestamp", "sessionID", "location"],
  17748. "additionalProperties": false
  17749. }
  17750. },
  17751. "required": ["id", "type", "properties"],
  17752. "additionalProperties": false
  17753. },
  17754. {
  17755. "type": "object",
  17756. "properties": {
  17757. "id": {
  17758. "type": "string",
  17759. "pattern": "^evt_"
  17760. },
  17761. "type": {
  17762. "type": "string",
  17763. "enum": ["session.next.prompted"]
  17764. },
  17765. "properties": {
  17766. "type": "object",
  17767. "properties": {
  17768. "timestamp": {
  17769. "type": "number"
  17770. },
  17771. "sessionID": {
  17772. "type": "string",
  17773. "pattern": "^ses"
  17774. },
  17775. "messageID": {
  17776. "type": "string",
  17777. "pattern": "^msg_"
  17778. },
  17779. "prompt": {
  17780. "$ref": "#/components/schemas/Prompt"
  17781. },
  17782. "delivery": {
  17783. "type": "string",
  17784. "enum": ["steer", "queue"]
  17785. }
  17786. },
  17787. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  17788. "additionalProperties": false
  17789. }
  17790. },
  17791. "required": ["id", "type", "properties"],
  17792. "additionalProperties": false
  17793. },
  17794. {
  17795. "type": "object",
  17796. "properties": {
  17797. "id": {
  17798. "type": "string",
  17799. "pattern": "^evt_"
  17800. },
  17801. "type": {
  17802. "type": "string",
  17803. "enum": ["session.next.prompt.admitted"]
  17804. },
  17805. "properties": {
  17806. "type": "object",
  17807. "properties": {
  17808. "timestamp": {
  17809. "type": "number"
  17810. },
  17811. "sessionID": {
  17812. "type": "string",
  17813. "pattern": "^ses"
  17814. },
  17815. "messageID": {
  17816. "type": "string",
  17817. "pattern": "^msg_"
  17818. },
  17819. "prompt": {
  17820. "$ref": "#/components/schemas/Prompt"
  17821. },
  17822. "delivery": {
  17823. "type": "string",
  17824. "enum": ["steer", "queue"]
  17825. }
  17826. },
  17827. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  17828. "additionalProperties": false
  17829. }
  17830. },
  17831. "required": ["id", "type", "properties"],
  17832. "additionalProperties": false
  17833. },
  17834. {
  17835. "type": "object",
  17836. "properties": {
  17837. "id": {
  17838. "type": "string",
  17839. "pattern": "^evt_"
  17840. },
  17841. "type": {
  17842. "type": "string",
  17843. "enum": ["session.next.context.updated"]
  17844. },
  17845. "properties": {
  17846. "type": "object",
  17847. "properties": {
  17848. "timestamp": {
  17849. "type": "number"
  17850. },
  17851. "sessionID": {
  17852. "type": "string",
  17853. "pattern": "^ses"
  17854. },
  17855. "messageID": {
  17856. "type": "string",
  17857. "pattern": "^msg_"
  17858. },
  17859. "text": {
  17860. "type": "string"
  17861. }
  17862. },
  17863. "required": ["timestamp", "sessionID", "messageID", "text"],
  17864. "additionalProperties": false
  17865. }
  17866. },
  17867. "required": ["id", "type", "properties"],
  17868. "additionalProperties": false
  17869. },
  17870. {
  17871. "type": "object",
  17872. "properties": {
  17873. "id": {
  17874. "type": "string",
  17875. "pattern": "^evt_"
  17876. },
  17877. "type": {
  17878. "type": "string",
  17879. "enum": ["session.next.synthetic"]
  17880. },
  17881. "properties": {
  17882. "type": "object",
  17883. "properties": {
  17884. "timestamp": {
  17885. "type": "number"
  17886. },
  17887. "sessionID": {
  17888. "type": "string",
  17889. "pattern": "^ses"
  17890. },
  17891. "messageID": {
  17892. "type": "string",
  17893. "pattern": "^msg_"
  17894. },
  17895. "text": {
  17896. "type": "string"
  17897. }
  17898. },
  17899. "required": ["timestamp", "sessionID", "messageID", "text"],
  17900. "additionalProperties": false
  17901. }
  17902. },
  17903. "required": ["id", "type", "properties"],
  17904. "additionalProperties": false
  17905. },
  17906. {
  17907. "type": "object",
  17908. "properties": {
  17909. "id": {
  17910. "type": "string",
  17911. "pattern": "^evt_"
  17912. },
  17913. "type": {
  17914. "type": "string",
  17915. "enum": ["session.next.shell.started"]
  17916. },
  17917. "properties": {
  17918. "type": "object",
  17919. "properties": {
  17920. "timestamp": {
  17921. "type": "number"
  17922. },
  17923. "sessionID": {
  17924. "type": "string",
  17925. "pattern": "^ses"
  17926. },
  17927. "messageID": {
  17928. "type": "string",
  17929. "pattern": "^msg_"
  17930. },
  17931. "callID": {
  17932. "type": "string"
  17933. },
  17934. "command": {
  17935. "type": "string"
  17936. }
  17937. },
  17938. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  17939. "additionalProperties": false
  17940. }
  17941. },
  17942. "required": ["id", "type", "properties"],
  17943. "additionalProperties": false
  17944. },
  17945. {
  17946. "type": "object",
  17947. "properties": {
  17948. "id": {
  17949. "type": "string",
  17950. "pattern": "^evt_"
  17951. },
  17952. "type": {
  17953. "type": "string",
  17954. "enum": ["session.next.shell.ended"]
  17955. },
  17956. "properties": {
  17957. "type": "object",
  17958. "properties": {
  17959. "timestamp": {
  17960. "type": "number"
  17961. },
  17962. "sessionID": {
  17963. "type": "string",
  17964. "pattern": "^ses"
  17965. },
  17966. "callID": {
  17967. "type": "string"
  17968. },
  17969. "output": {
  17970. "type": "string"
  17971. }
  17972. },
  17973. "required": ["timestamp", "sessionID", "callID", "output"],
  17974. "additionalProperties": false
  17975. }
  17976. },
  17977. "required": ["id", "type", "properties"],
  17978. "additionalProperties": false
  17979. },
  17980. {
  17981. "type": "object",
  17982. "properties": {
  17983. "id": {
  17984. "type": "string",
  17985. "pattern": "^evt_"
  17986. },
  17987. "type": {
  17988. "type": "string",
  17989. "enum": ["session.next.step.started"]
  17990. },
  17991. "properties": {
  17992. "type": "object",
  17993. "properties": {
  17994. "timestamp": {
  17995. "type": "number"
  17996. },
  17997. "sessionID": {
  17998. "type": "string",
  17999. "pattern": "^ses"
  18000. },
  18001. "assistantMessageID": {
  18002. "type": "string",
  18003. "pattern": "^msg_"
  18004. },
  18005. "agent": {
  18006. "type": "string"
  18007. },
  18008. "model": {
  18009. "$ref": "#/components/schemas/ModelRef"
  18010. },
  18011. "snapshot": {
  18012. "type": "string"
  18013. }
  18014. },
  18015. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  18016. "additionalProperties": false
  18017. }
  18018. },
  18019. "required": ["id", "type", "properties"],
  18020. "additionalProperties": false
  18021. },
  18022. {
  18023. "type": "object",
  18024. "properties": {
  18025. "id": {
  18026. "type": "string",
  18027. "pattern": "^evt_"
  18028. },
  18029. "type": {
  18030. "type": "string",
  18031. "enum": ["session.next.step.ended"]
  18032. },
  18033. "properties": {
  18034. "type": "object",
  18035. "properties": {
  18036. "timestamp": {
  18037. "type": "number"
  18038. },
  18039. "sessionID": {
  18040. "type": "string",
  18041. "pattern": "^ses"
  18042. },
  18043. "assistantMessageID": {
  18044. "type": "string",
  18045. "pattern": "^msg_"
  18046. },
  18047. "finish": {
  18048. "type": "string"
  18049. },
  18050. "cost": {
  18051. "type": "number"
  18052. },
  18053. "tokens": {
  18054. "type": "object",
  18055. "properties": {
  18056. "input": {
  18057. "type": "number"
  18058. },
  18059. "output": {
  18060. "type": "number"
  18061. },
  18062. "reasoning": {
  18063. "type": "number"
  18064. },
  18065. "cache": {
  18066. "type": "object",
  18067. "properties": {
  18068. "read": {
  18069. "type": "number"
  18070. },
  18071. "write": {
  18072. "type": "number"
  18073. }
  18074. },
  18075. "required": ["read", "write"],
  18076. "additionalProperties": false
  18077. }
  18078. },
  18079. "required": ["input", "output", "reasoning", "cache"],
  18080. "additionalProperties": false
  18081. },
  18082. "snapshot": {
  18083. "type": "string"
  18084. },
  18085. "files": {
  18086. "type": "array",
  18087. "items": {
  18088. "type": "string"
  18089. }
  18090. }
  18091. },
  18092. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  18093. "additionalProperties": false
  18094. }
  18095. },
  18096. "required": ["id", "type", "properties"],
  18097. "additionalProperties": false
  18098. },
  18099. {
  18100. "type": "object",
  18101. "properties": {
  18102. "id": {
  18103. "type": "string",
  18104. "pattern": "^evt_"
  18105. },
  18106. "type": {
  18107. "type": "string",
  18108. "enum": ["session.next.step.failed"]
  18109. },
  18110. "properties": {
  18111. "type": "object",
  18112. "properties": {
  18113. "timestamp": {
  18114. "type": "number"
  18115. },
  18116. "sessionID": {
  18117. "type": "string",
  18118. "pattern": "^ses"
  18119. },
  18120. "assistantMessageID": {
  18121. "type": "string",
  18122. "pattern": "^msg_"
  18123. },
  18124. "error": {
  18125. "$ref": "#/components/schemas/SessionErrorUnknown"
  18126. }
  18127. },
  18128. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  18129. "additionalProperties": false
  18130. }
  18131. },
  18132. "required": ["id", "type", "properties"],
  18133. "additionalProperties": false
  18134. },
  18135. {
  18136. "type": "object",
  18137. "properties": {
  18138. "id": {
  18139. "type": "string",
  18140. "pattern": "^evt_"
  18141. },
  18142. "type": {
  18143. "type": "string",
  18144. "enum": ["session.next.text.started"]
  18145. },
  18146. "properties": {
  18147. "type": "object",
  18148. "properties": {
  18149. "timestamp": {
  18150. "type": "number"
  18151. },
  18152. "sessionID": {
  18153. "type": "string",
  18154. "pattern": "^ses"
  18155. },
  18156. "assistantMessageID": {
  18157. "type": "string",
  18158. "pattern": "^msg_"
  18159. },
  18160. "textID": {
  18161. "type": "string"
  18162. }
  18163. },
  18164. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  18165. "additionalProperties": false
  18166. }
  18167. },
  18168. "required": ["id", "type", "properties"],
  18169. "additionalProperties": false
  18170. },
  18171. {
  18172. "type": "object",
  18173. "properties": {
  18174. "id": {
  18175. "type": "string",
  18176. "pattern": "^evt_"
  18177. },
  18178. "type": {
  18179. "type": "string",
  18180. "enum": ["session.next.text.delta"]
  18181. },
  18182. "properties": {
  18183. "type": "object",
  18184. "properties": {
  18185. "timestamp": {
  18186. "type": "number"
  18187. },
  18188. "sessionID": {
  18189. "type": "string",
  18190. "pattern": "^ses"
  18191. },
  18192. "assistantMessageID": {
  18193. "type": "string",
  18194. "pattern": "^msg_"
  18195. },
  18196. "textID": {
  18197. "type": "string"
  18198. },
  18199. "delta": {
  18200. "type": "string"
  18201. }
  18202. },
  18203. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  18204. "additionalProperties": false
  18205. }
  18206. },
  18207. "required": ["id", "type", "properties"],
  18208. "additionalProperties": false
  18209. },
  18210. {
  18211. "type": "object",
  18212. "properties": {
  18213. "id": {
  18214. "type": "string",
  18215. "pattern": "^evt_"
  18216. },
  18217. "type": {
  18218. "type": "string",
  18219. "enum": ["session.next.text.ended"]
  18220. },
  18221. "properties": {
  18222. "type": "object",
  18223. "properties": {
  18224. "timestamp": {
  18225. "type": "number"
  18226. },
  18227. "sessionID": {
  18228. "type": "string",
  18229. "pattern": "^ses"
  18230. },
  18231. "assistantMessageID": {
  18232. "type": "string",
  18233. "pattern": "^msg_"
  18234. },
  18235. "textID": {
  18236. "type": "string"
  18237. },
  18238. "text": {
  18239. "type": "string"
  18240. }
  18241. },
  18242. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  18243. "additionalProperties": false
  18244. }
  18245. },
  18246. "required": ["id", "type", "properties"],
  18247. "additionalProperties": false
  18248. },
  18249. {
  18250. "type": "object",
  18251. "properties": {
  18252. "id": {
  18253. "type": "string",
  18254. "pattern": "^evt_"
  18255. },
  18256. "type": {
  18257. "type": "string",
  18258. "enum": ["session.next.reasoning.started"]
  18259. },
  18260. "properties": {
  18261. "type": "object",
  18262. "properties": {
  18263. "timestamp": {
  18264. "type": "number"
  18265. },
  18266. "sessionID": {
  18267. "type": "string",
  18268. "pattern": "^ses"
  18269. },
  18270. "assistantMessageID": {
  18271. "type": "string",
  18272. "pattern": "^msg_"
  18273. },
  18274. "reasoningID": {
  18275. "type": "string"
  18276. },
  18277. "providerMetadata": {
  18278. "$ref": "#/components/schemas/LLMProviderMetadata"
  18279. }
  18280. },
  18281. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  18282. "additionalProperties": false
  18283. }
  18284. },
  18285. "required": ["id", "type", "properties"],
  18286. "additionalProperties": false
  18287. },
  18288. {
  18289. "type": "object",
  18290. "properties": {
  18291. "id": {
  18292. "type": "string",
  18293. "pattern": "^evt_"
  18294. },
  18295. "type": {
  18296. "type": "string",
  18297. "enum": ["session.next.reasoning.delta"]
  18298. },
  18299. "properties": {
  18300. "type": "object",
  18301. "properties": {
  18302. "timestamp": {
  18303. "type": "number"
  18304. },
  18305. "sessionID": {
  18306. "type": "string",
  18307. "pattern": "^ses"
  18308. },
  18309. "assistantMessageID": {
  18310. "type": "string",
  18311. "pattern": "^msg_"
  18312. },
  18313. "reasoningID": {
  18314. "type": "string"
  18315. },
  18316. "delta": {
  18317. "type": "string"
  18318. }
  18319. },
  18320. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  18321. "additionalProperties": false
  18322. }
  18323. },
  18324. "required": ["id", "type", "properties"],
  18325. "additionalProperties": false
  18326. },
  18327. {
  18328. "type": "object",
  18329. "properties": {
  18330. "id": {
  18331. "type": "string",
  18332. "pattern": "^evt_"
  18333. },
  18334. "type": {
  18335. "type": "string",
  18336. "enum": ["session.next.reasoning.ended"]
  18337. },
  18338. "properties": {
  18339. "type": "object",
  18340. "properties": {
  18341. "timestamp": {
  18342. "type": "number"
  18343. },
  18344. "sessionID": {
  18345. "type": "string",
  18346. "pattern": "^ses"
  18347. },
  18348. "assistantMessageID": {
  18349. "type": "string",
  18350. "pattern": "^msg_"
  18351. },
  18352. "reasoningID": {
  18353. "type": "string"
  18354. },
  18355. "text": {
  18356. "type": "string"
  18357. },
  18358. "providerMetadata": {
  18359. "$ref": "#/components/schemas/LLMProviderMetadata"
  18360. }
  18361. },
  18362. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  18363. "additionalProperties": false
  18364. }
  18365. },
  18366. "required": ["id", "type", "properties"],
  18367. "additionalProperties": false
  18368. },
  18369. {
  18370. "type": "object",
  18371. "properties": {
  18372. "id": {
  18373. "type": "string",
  18374. "pattern": "^evt_"
  18375. },
  18376. "type": {
  18377. "type": "string",
  18378. "enum": ["session.next.tool.input.started"]
  18379. },
  18380. "properties": {
  18381. "type": "object",
  18382. "properties": {
  18383. "timestamp": {
  18384. "type": "number"
  18385. },
  18386. "sessionID": {
  18387. "type": "string",
  18388. "pattern": "^ses"
  18389. },
  18390. "assistantMessageID": {
  18391. "type": "string",
  18392. "pattern": "^msg_"
  18393. },
  18394. "callID": {
  18395. "type": "string"
  18396. },
  18397. "name": {
  18398. "type": "string"
  18399. }
  18400. },
  18401. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  18402. "additionalProperties": false
  18403. }
  18404. },
  18405. "required": ["id", "type", "properties"],
  18406. "additionalProperties": false
  18407. },
  18408. {
  18409. "type": "object",
  18410. "properties": {
  18411. "id": {
  18412. "type": "string",
  18413. "pattern": "^evt_"
  18414. },
  18415. "type": {
  18416. "type": "string",
  18417. "enum": ["session.next.tool.input.delta"]
  18418. },
  18419. "properties": {
  18420. "type": "object",
  18421. "properties": {
  18422. "timestamp": {
  18423. "type": "number"
  18424. },
  18425. "sessionID": {
  18426. "type": "string",
  18427. "pattern": "^ses"
  18428. },
  18429. "assistantMessageID": {
  18430. "type": "string",
  18431. "pattern": "^msg_"
  18432. },
  18433. "callID": {
  18434. "type": "string"
  18435. },
  18436. "delta": {
  18437. "type": "string"
  18438. }
  18439. },
  18440. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  18441. "additionalProperties": false
  18442. }
  18443. },
  18444. "required": ["id", "type", "properties"],
  18445. "additionalProperties": false
  18446. },
  18447. {
  18448. "type": "object",
  18449. "properties": {
  18450. "id": {
  18451. "type": "string",
  18452. "pattern": "^evt_"
  18453. },
  18454. "type": {
  18455. "type": "string",
  18456. "enum": ["session.next.tool.input.ended"]
  18457. },
  18458. "properties": {
  18459. "type": "object",
  18460. "properties": {
  18461. "timestamp": {
  18462. "type": "number"
  18463. },
  18464. "sessionID": {
  18465. "type": "string",
  18466. "pattern": "^ses"
  18467. },
  18468. "assistantMessageID": {
  18469. "type": "string",
  18470. "pattern": "^msg_"
  18471. },
  18472. "callID": {
  18473. "type": "string"
  18474. },
  18475. "text": {
  18476. "type": "string"
  18477. }
  18478. },
  18479. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  18480. "additionalProperties": false
  18481. }
  18482. },
  18483. "required": ["id", "type", "properties"],
  18484. "additionalProperties": false
  18485. },
  18486. {
  18487. "type": "object",
  18488. "properties": {
  18489. "id": {
  18490. "type": "string",
  18491. "pattern": "^evt_"
  18492. },
  18493. "type": {
  18494. "type": "string",
  18495. "enum": ["session.next.tool.called"]
  18496. },
  18497. "properties": {
  18498. "type": "object",
  18499. "properties": {
  18500. "timestamp": {
  18501. "type": "number"
  18502. },
  18503. "sessionID": {
  18504. "type": "string",
  18505. "pattern": "^ses"
  18506. },
  18507. "assistantMessageID": {
  18508. "type": "string",
  18509. "pattern": "^msg_"
  18510. },
  18511. "callID": {
  18512. "type": "string"
  18513. },
  18514. "tool": {
  18515. "type": "string"
  18516. },
  18517. "input": {
  18518. "type": "object"
  18519. },
  18520. "provider": {
  18521. "type": "object",
  18522. "properties": {
  18523. "executed": {
  18524. "type": "boolean"
  18525. },
  18526. "metadata": {
  18527. "$ref": "#/components/schemas/LLMProviderMetadata"
  18528. }
  18529. },
  18530. "required": ["executed"],
  18531. "additionalProperties": false
  18532. }
  18533. },
  18534. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  18535. "additionalProperties": false
  18536. }
  18537. },
  18538. "required": ["id", "type", "properties"],
  18539. "additionalProperties": false
  18540. },
  18541. {
  18542. "type": "object",
  18543. "properties": {
  18544. "id": {
  18545. "type": "string",
  18546. "pattern": "^evt_"
  18547. },
  18548. "type": {
  18549. "type": "string",
  18550. "enum": ["session.next.tool.progress"]
  18551. },
  18552. "properties": {
  18553. "type": "object",
  18554. "properties": {
  18555. "timestamp": {
  18556. "type": "number"
  18557. },
  18558. "sessionID": {
  18559. "type": "string",
  18560. "pattern": "^ses"
  18561. },
  18562. "assistantMessageID": {
  18563. "type": "string",
  18564. "pattern": "^msg_"
  18565. },
  18566. "callID": {
  18567. "type": "string"
  18568. },
  18569. "structured": {
  18570. "type": "object"
  18571. },
  18572. "content": {
  18573. "type": "array",
  18574. "items": {
  18575. "$ref": "#/components/schemas/LLMToolContent"
  18576. }
  18577. }
  18578. },
  18579. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  18580. "additionalProperties": false
  18581. }
  18582. },
  18583. "required": ["id", "type", "properties"],
  18584. "additionalProperties": false
  18585. },
  18586. {
  18587. "type": "object",
  18588. "properties": {
  18589. "id": {
  18590. "type": "string",
  18591. "pattern": "^evt_"
  18592. },
  18593. "type": {
  18594. "type": "string",
  18595. "enum": ["session.next.tool.success"]
  18596. },
  18597. "properties": {
  18598. "type": "object",
  18599. "properties": {
  18600. "timestamp": {
  18601. "type": "number"
  18602. },
  18603. "sessionID": {
  18604. "type": "string",
  18605. "pattern": "^ses"
  18606. },
  18607. "assistantMessageID": {
  18608. "type": "string",
  18609. "pattern": "^msg_"
  18610. },
  18611. "callID": {
  18612. "type": "string"
  18613. },
  18614. "structured": {
  18615. "type": "object"
  18616. },
  18617. "content": {
  18618. "type": "array",
  18619. "items": {
  18620. "$ref": "#/components/schemas/LLMToolContent"
  18621. }
  18622. },
  18623. "outputPaths": {
  18624. "type": "array",
  18625. "items": {
  18626. "type": "string"
  18627. }
  18628. },
  18629. "result": {},
  18630. "provider": {
  18631. "type": "object",
  18632. "properties": {
  18633. "executed": {
  18634. "type": "boolean"
  18635. },
  18636. "metadata": {
  18637. "$ref": "#/components/schemas/LLMProviderMetadata"
  18638. }
  18639. },
  18640. "required": ["executed"],
  18641. "additionalProperties": false
  18642. }
  18643. },
  18644. "required": [
  18645. "timestamp",
  18646. "sessionID",
  18647. "assistantMessageID",
  18648. "callID",
  18649. "structured",
  18650. "content",
  18651. "provider"
  18652. ],
  18653. "additionalProperties": false
  18654. }
  18655. },
  18656. "required": ["id", "type", "properties"],
  18657. "additionalProperties": false
  18658. },
  18659. {
  18660. "type": "object",
  18661. "properties": {
  18662. "id": {
  18663. "type": "string",
  18664. "pattern": "^evt_"
  18665. },
  18666. "type": {
  18667. "type": "string",
  18668. "enum": ["session.next.tool.failed"]
  18669. },
  18670. "properties": {
  18671. "type": "object",
  18672. "properties": {
  18673. "timestamp": {
  18674. "type": "number"
  18675. },
  18676. "sessionID": {
  18677. "type": "string",
  18678. "pattern": "^ses"
  18679. },
  18680. "assistantMessageID": {
  18681. "type": "string",
  18682. "pattern": "^msg_"
  18683. },
  18684. "callID": {
  18685. "type": "string"
  18686. },
  18687. "error": {
  18688. "$ref": "#/components/schemas/SessionErrorUnknown"
  18689. },
  18690. "result": {},
  18691. "provider": {
  18692. "type": "object",
  18693. "properties": {
  18694. "executed": {
  18695. "type": "boolean"
  18696. },
  18697. "metadata": {
  18698. "$ref": "#/components/schemas/LLMProviderMetadata"
  18699. }
  18700. },
  18701. "required": ["executed"],
  18702. "additionalProperties": false
  18703. }
  18704. },
  18705. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  18706. "additionalProperties": false
  18707. }
  18708. },
  18709. "required": ["id", "type", "properties"],
  18710. "additionalProperties": false
  18711. },
  18712. {
  18713. "type": "object",
  18714. "properties": {
  18715. "id": {
  18716. "type": "string",
  18717. "pattern": "^evt_"
  18718. },
  18719. "type": {
  18720. "type": "string",
  18721. "enum": ["session.next.retried"]
  18722. },
  18723. "properties": {
  18724. "type": "object",
  18725. "properties": {
  18726. "timestamp": {
  18727. "type": "number"
  18728. },
  18729. "sessionID": {
  18730. "type": "string",
  18731. "pattern": "^ses"
  18732. },
  18733. "attempt": {
  18734. "type": "number"
  18735. },
  18736. "error": {
  18737. "$ref": "#/components/schemas/SessionNextRetry_error"
  18738. }
  18739. },
  18740. "required": ["timestamp", "sessionID", "attempt", "error"],
  18741. "additionalProperties": false
  18742. }
  18743. },
  18744. "required": ["id", "type", "properties"],
  18745. "additionalProperties": false
  18746. },
  18747. {
  18748. "type": "object",
  18749. "properties": {
  18750. "id": {
  18751. "type": "string",
  18752. "pattern": "^evt_"
  18753. },
  18754. "type": {
  18755. "type": "string",
  18756. "enum": ["session.next.compaction.started"]
  18757. },
  18758. "properties": {
  18759. "type": "object",
  18760. "properties": {
  18761. "timestamp": {
  18762. "type": "number"
  18763. },
  18764. "sessionID": {
  18765. "type": "string",
  18766. "pattern": "^ses"
  18767. },
  18768. "messageID": {
  18769. "type": "string",
  18770. "pattern": "^msg_"
  18771. },
  18772. "reason": {
  18773. "type": "string",
  18774. "enum": ["auto", "manual"]
  18775. }
  18776. },
  18777. "required": ["timestamp", "sessionID", "messageID", "reason"],
  18778. "additionalProperties": false
  18779. }
  18780. },
  18781. "required": ["id", "type", "properties"],
  18782. "additionalProperties": false
  18783. },
  18784. {
  18785. "type": "object",
  18786. "properties": {
  18787. "id": {
  18788. "type": "string",
  18789. "pattern": "^evt_"
  18790. },
  18791. "type": {
  18792. "type": "string",
  18793. "enum": ["session.next.compaction.delta"]
  18794. },
  18795. "properties": {
  18796. "type": "object",
  18797. "properties": {
  18798. "timestamp": {
  18799. "type": "number"
  18800. },
  18801. "sessionID": {
  18802. "type": "string",
  18803. "pattern": "^ses"
  18804. },
  18805. "messageID": {
  18806. "type": "string",
  18807. "pattern": "^msg_"
  18808. },
  18809. "text": {
  18810. "type": "string"
  18811. }
  18812. },
  18813. "required": ["timestamp", "sessionID", "messageID", "text"],
  18814. "additionalProperties": false
  18815. }
  18816. },
  18817. "required": ["id", "type", "properties"],
  18818. "additionalProperties": false
  18819. },
  18820. {
  18821. "type": "object",
  18822. "properties": {
  18823. "id": {
  18824. "type": "string",
  18825. "pattern": "^evt_"
  18826. },
  18827. "type": {
  18828. "type": "string",
  18829. "enum": ["session.next.compaction.ended"]
  18830. },
  18831. "properties": {
  18832. "type": "object",
  18833. "properties": {
  18834. "timestamp": {
  18835. "type": "number"
  18836. },
  18837. "sessionID": {
  18838. "type": "string",
  18839. "pattern": "^ses"
  18840. },
  18841. "messageID": {
  18842. "type": "string",
  18843. "pattern": "^msg_"
  18844. },
  18845. "reason": {
  18846. "type": "string",
  18847. "enum": ["auto", "manual"]
  18848. },
  18849. "text": {
  18850. "type": "string"
  18851. },
  18852. "recent": {
  18853. "type": "string"
  18854. }
  18855. },
  18856. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  18857. "additionalProperties": false
  18858. }
  18859. },
  18860. "required": ["id", "type", "properties"],
  18861. "additionalProperties": false
  18862. },
  18863. {
  18864. "type": "object",
  18865. "properties": {
  18866. "id": {
  18867. "type": "string",
  18868. "pattern": "^evt_"
  18869. },
  18870. "type": {
  18871. "type": "string",
  18872. "enum": ["session.next.revert.staged"]
  18873. },
  18874. "properties": {
  18875. "type": "object",
  18876. "properties": {
  18877. "timestamp": {
  18878. "type": "number"
  18879. },
  18880. "sessionID": {
  18881. "type": "string",
  18882. "pattern": "^ses"
  18883. },
  18884. "revert": {
  18885. "$ref": "#/components/schemas/RevertState"
  18886. }
  18887. },
  18888. "required": ["timestamp", "sessionID", "revert"],
  18889. "additionalProperties": false
  18890. }
  18891. },
  18892. "required": ["id", "type", "properties"],
  18893. "additionalProperties": false
  18894. },
  18895. {
  18896. "type": "object",
  18897. "properties": {
  18898. "id": {
  18899. "type": "string",
  18900. "pattern": "^evt_"
  18901. },
  18902. "type": {
  18903. "type": "string",
  18904. "enum": ["session.next.revert.cleared"]
  18905. },
  18906. "properties": {
  18907. "type": "object",
  18908. "properties": {
  18909. "timestamp": {
  18910. "type": "number"
  18911. },
  18912. "sessionID": {
  18913. "type": "string",
  18914. "pattern": "^ses"
  18915. }
  18916. },
  18917. "required": ["timestamp", "sessionID"],
  18918. "additionalProperties": false
  18919. }
  18920. },
  18921. "required": ["id", "type", "properties"],
  18922. "additionalProperties": false
  18923. },
  18924. {
  18925. "type": "object",
  18926. "properties": {
  18927. "id": {
  18928. "type": "string",
  18929. "pattern": "^evt_"
  18930. },
  18931. "type": {
  18932. "type": "string",
  18933. "enum": ["session.next.revert.committed"]
  18934. },
  18935. "properties": {
  18936. "type": "object",
  18937. "properties": {
  18938. "timestamp": {
  18939. "type": "number"
  18940. },
  18941. "sessionID": {
  18942. "type": "string",
  18943. "pattern": "^ses"
  18944. },
  18945. "messageID": {
  18946. "type": "string",
  18947. "pattern": "^msg_"
  18948. }
  18949. },
  18950. "required": ["timestamp", "sessionID", "messageID"],
  18951. "additionalProperties": false
  18952. }
  18953. },
  18954. "required": ["id", "type", "properties"],
  18955. "additionalProperties": false
  18956. },
  18957. {
  18958. "type": "object",
  18959. "properties": {
  18960. "id": {
  18961. "type": "string",
  18962. "pattern": "^evt_"
  18963. },
  18964. "type": {
  18965. "type": "string",
  18966. "enum": ["message.part.delta"]
  18967. },
  18968. "properties": {
  18969. "type": "object",
  18970. "properties": {
  18971. "sessionID": {
  18972. "type": "string",
  18973. "pattern": "^ses"
  18974. },
  18975. "messageID": {
  18976. "type": "string",
  18977. "pattern": "^msg"
  18978. },
  18979. "partID": {
  18980. "type": "string",
  18981. "pattern": "^prt"
  18982. },
  18983. "field": {
  18984. "type": "string"
  18985. },
  18986. "delta": {
  18987. "type": "string"
  18988. }
  18989. },
  18990. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  18991. "additionalProperties": false
  18992. }
  18993. },
  18994. "required": ["id", "type", "properties"],
  18995. "additionalProperties": false
  18996. },
  18997. {
  18998. "type": "object",
  18999. "properties": {
  19000. "id": {
  19001. "type": "string",
  19002. "pattern": "^evt_"
  19003. },
  19004. "type": {
  19005. "type": "string",
  19006. "enum": ["session.diff"]
  19007. },
  19008. "properties": {
  19009. "type": "object",
  19010. "properties": {
  19011. "sessionID": {
  19012. "type": "string",
  19013. "pattern": "^ses"
  19014. },
  19015. "diff": {
  19016. "type": "array",
  19017. "items": {
  19018. "$ref": "#/components/schemas/SnapshotFileDiff"
  19019. }
  19020. }
  19021. },
  19022. "required": ["sessionID", "diff"],
  19023. "additionalProperties": false
  19024. }
  19025. },
  19026. "required": ["id", "type", "properties"],
  19027. "additionalProperties": false
  19028. },
  19029. {
  19030. "type": "object",
  19031. "properties": {
  19032. "id": {
  19033. "type": "string",
  19034. "pattern": "^evt_"
  19035. },
  19036. "type": {
  19037. "type": "string",
  19038. "enum": ["session.error"]
  19039. },
  19040. "properties": {
  19041. "type": "object",
  19042. "properties": {
  19043. "sessionID": {
  19044. "type": "string",
  19045. "pattern": "^ses"
  19046. },
  19047. "error": {
  19048. "anyOf": [
  19049. {
  19050. "$ref": "#/components/schemas/ProviderAuthError"
  19051. },
  19052. {
  19053. "$ref": "#/components/schemas/UnknownError"
  19054. },
  19055. {
  19056. "$ref": "#/components/schemas/MessageOutputLengthError"
  19057. },
  19058. {
  19059. "$ref": "#/components/schemas/MessageAbortedError"
  19060. },
  19061. {
  19062. "$ref": "#/components/schemas/StructuredOutputError"
  19063. },
  19064. {
  19065. "$ref": "#/components/schemas/ContextOverflowError"
  19066. },
  19067. {
  19068. "$ref": "#/components/schemas/ContentFilterError"
  19069. },
  19070. {
  19071. "$ref": "#/components/schemas/APIError"
  19072. }
  19073. ]
  19074. }
  19075. },
  19076. "additionalProperties": false
  19077. }
  19078. },
  19079. "required": ["id", "type", "properties"],
  19080. "additionalProperties": false
  19081. },
  19082. {
  19083. "type": "object",
  19084. "properties": {
  19085. "id": {
  19086. "type": "string",
  19087. "pattern": "^evt_"
  19088. },
  19089. "type": {
  19090. "type": "string",
  19091. "enum": ["installation.updated"]
  19092. },
  19093. "properties": {
  19094. "type": "object",
  19095. "properties": {
  19096. "version": {
  19097. "type": "string"
  19098. }
  19099. },
  19100. "required": ["version"],
  19101. "additionalProperties": false
  19102. }
  19103. },
  19104. "required": ["id", "type", "properties"],
  19105. "additionalProperties": false
  19106. },
  19107. {
  19108. "type": "object",
  19109. "properties": {
  19110. "id": {
  19111. "type": "string",
  19112. "pattern": "^evt_"
  19113. },
  19114. "type": {
  19115. "type": "string",
  19116. "enum": ["installation.update-available"]
  19117. },
  19118. "properties": {
  19119. "type": "object",
  19120. "properties": {
  19121. "version": {
  19122. "type": "string"
  19123. }
  19124. },
  19125. "required": ["version"],
  19126. "additionalProperties": false
  19127. }
  19128. },
  19129. "required": ["id", "type", "properties"],
  19130. "additionalProperties": false
  19131. },
  19132. {
  19133. "type": "object",
  19134. "properties": {
  19135. "id": {
  19136. "type": "string",
  19137. "pattern": "^evt_"
  19138. },
  19139. "type": {
  19140. "type": "string",
  19141. "enum": ["file.edited"]
  19142. },
  19143. "properties": {
  19144. "type": "object",
  19145. "properties": {
  19146. "file": {
  19147. "type": "string"
  19148. }
  19149. },
  19150. "required": ["file"],
  19151. "additionalProperties": false
  19152. }
  19153. },
  19154. "required": ["id", "type", "properties"],
  19155. "additionalProperties": false
  19156. },
  19157. {
  19158. "type": "object",
  19159. "properties": {
  19160. "id": {
  19161. "type": "string",
  19162. "pattern": "^evt_"
  19163. },
  19164. "type": {
  19165. "type": "string",
  19166. "enum": ["reference.updated"]
  19167. },
  19168. "properties": {
  19169. "type": "object",
  19170. "properties": {}
  19171. }
  19172. },
  19173. "required": ["id", "type", "properties"],
  19174. "additionalProperties": false
  19175. },
  19176. {
  19177. "type": "object",
  19178. "properties": {
  19179. "id": {
  19180. "type": "string",
  19181. "pattern": "^evt_"
  19182. },
  19183. "type": {
  19184. "type": "string",
  19185. "enum": ["permission.v2.asked"]
  19186. },
  19187. "properties": {
  19188. "type": "object",
  19189. "properties": {
  19190. "id": {
  19191. "type": "string",
  19192. "pattern": "^per"
  19193. },
  19194. "sessionID": {
  19195. "type": "string",
  19196. "pattern": "^ses"
  19197. },
  19198. "action": {
  19199. "type": "string"
  19200. },
  19201. "resources": {
  19202. "type": "array",
  19203. "items": {
  19204. "type": "string"
  19205. }
  19206. },
  19207. "save": {
  19208. "type": "array",
  19209. "items": {
  19210. "type": "string"
  19211. }
  19212. },
  19213. "metadata": {
  19214. "type": "object"
  19215. },
  19216. "source": {
  19217. "$ref": "#/components/schemas/PermissionV2Source"
  19218. }
  19219. },
  19220. "required": ["id", "sessionID", "action", "resources"],
  19221. "additionalProperties": false
  19222. }
  19223. },
  19224. "required": ["id", "type", "properties"],
  19225. "additionalProperties": false
  19226. },
  19227. {
  19228. "type": "object",
  19229. "properties": {
  19230. "id": {
  19231. "type": "string",
  19232. "pattern": "^evt_"
  19233. },
  19234. "type": {
  19235. "type": "string",
  19236. "enum": ["permission.v2.replied"]
  19237. },
  19238. "properties": {
  19239. "type": "object",
  19240. "properties": {
  19241. "sessionID": {
  19242. "type": "string",
  19243. "pattern": "^ses"
  19244. },
  19245. "requestID": {
  19246. "type": "string",
  19247. "pattern": "^per"
  19248. },
  19249. "reply": {
  19250. "$ref": "#/components/schemas/PermissionV2Reply"
  19251. }
  19252. },
  19253. "required": ["sessionID", "requestID", "reply"],
  19254. "additionalProperties": false
  19255. }
  19256. },
  19257. "required": ["id", "type", "properties"],
  19258. "additionalProperties": false
  19259. },
  19260. {
  19261. "type": "object",
  19262. "properties": {
  19263. "id": {
  19264. "type": "string",
  19265. "pattern": "^evt_"
  19266. },
  19267. "type": {
  19268. "type": "string",
  19269. "enum": ["plugin.added"]
  19270. },
  19271. "properties": {
  19272. "type": "object",
  19273. "properties": {
  19274. "id": {
  19275. "type": "string"
  19276. }
  19277. },
  19278. "required": ["id"],
  19279. "additionalProperties": false
  19280. }
  19281. },
  19282. "required": ["id", "type", "properties"],
  19283. "additionalProperties": false
  19284. },
  19285. {
  19286. "type": "object",
  19287. "properties": {
  19288. "id": {
  19289. "type": "string",
  19290. "pattern": "^evt_"
  19291. },
  19292. "type": {
  19293. "type": "string",
  19294. "enum": ["project.directories.updated"]
  19295. },
  19296. "properties": {
  19297. "type": "object",
  19298. "properties": {
  19299. "projectID": {
  19300. "type": "string"
  19301. }
  19302. },
  19303. "required": ["projectID"],
  19304. "additionalProperties": false
  19305. }
  19306. },
  19307. "required": ["id", "type", "properties"],
  19308. "additionalProperties": false
  19309. },
  19310. {
  19311. "type": "object",
  19312. "properties": {
  19313. "id": {
  19314. "type": "string",
  19315. "pattern": "^evt_"
  19316. },
  19317. "type": {
  19318. "type": "string",
  19319. "enum": ["file.watcher.updated"]
  19320. },
  19321. "properties": {
  19322. "type": "object",
  19323. "properties": {
  19324. "file": {
  19325. "type": "string"
  19326. },
  19327. "event": {
  19328. "type": "string",
  19329. "enum": ["add", "change", "unlink"]
  19330. }
  19331. },
  19332. "required": ["file", "event"],
  19333. "additionalProperties": false
  19334. }
  19335. },
  19336. "required": ["id", "type", "properties"],
  19337. "additionalProperties": false
  19338. },
  19339. {
  19340. "type": "object",
  19341. "properties": {
  19342. "id": {
  19343. "type": "string",
  19344. "pattern": "^evt_"
  19345. },
  19346. "type": {
  19347. "type": "string",
  19348. "enum": ["pty.created"]
  19349. },
  19350. "properties": {
  19351. "type": "object",
  19352. "properties": {
  19353. "info": {
  19354. "$ref": "#/components/schemas/Pty"
  19355. }
  19356. },
  19357. "required": ["info"],
  19358. "additionalProperties": false
  19359. }
  19360. },
  19361. "required": ["id", "type", "properties"],
  19362. "additionalProperties": false
  19363. },
  19364. {
  19365. "type": "object",
  19366. "properties": {
  19367. "id": {
  19368. "type": "string",
  19369. "pattern": "^evt_"
  19370. },
  19371. "type": {
  19372. "type": "string",
  19373. "enum": ["pty.updated"]
  19374. },
  19375. "properties": {
  19376. "type": "object",
  19377. "properties": {
  19378. "info": {
  19379. "$ref": "#/components/schemas/Pty"
  19380. }
  19381. },
  19382. "required": ["info"],
  19383. "additionalProperties": false
  19384. }
  19385. },
  19386. "required": ["id", "type", "properties"],
  19387. "additionalProperties": false
  19388. },
  19389. {
  19390. "type": "object",
  19391. "properties": {
  19392. "id": {
  19393. "type": "string",
  19394. "pattern": "^evt_"
  19395. },
  19396. "type": {
  19397. "type": "string",
  19398. "enum": ["pty.exited"]
  19399. },
  19400. "properties": {
  19401. "type": "object",
  19402. "properties": {
  19403. "id": {
  19404. "type": "string",
  19405. "pattern": "^pty"
  19406. },
  19407. "exitCode": {
  19408. "type": "integer",
  19409. "minimum": 0
  19410. }
  19411. },
  19412. "required": ["id", "exitCode"],
  19413. "additionalProperties": false
  19414. }
  19415. },
  19416. "required": ["id", "type", "properties"],
  19417. "additionalProperties": false
  19418. },
  19419. {
  19420. "type": "object",
  19421. "properties": {
  19422. "id": {
  19423. "type": "string",
  19424. "pattern": "^evt_"
  19425. },
  19426. "type": {
  19427. "type": "string",
  19428. "enum": ["pty.deleted"]
  19429. },
  19430. "properties": {
  19431. "type": "object",
  19432. "properties": {
  19433. "id": {
  19434. "type": "string",
  19435. "pattern": "^pty"
  19436. }
  19437. },
  19438. "required": ["id"],
  19439. "additionalProperties": false
  19440. }
  19441. },
  19442. "required": ["id", "type", "properties"],
  19443. "additionalProperties": false
  19444. },
  19445. {
  19446. "type": "object",
  19447. "properties": {
  19448. "id": {
  19449. "type": "string",
  19450. "pattern": "^evt_"
  19451. },
  19452. "type": {
  19453. "type": "string",
  19454. "enum": ["question.v2.asked"]
  19455. },
  19456. "properties": {
  19457. "type": "object",
  19458. "properties": {
  19459. "id": {
  19460. "type": "string",
  19461. "pattern": "^que"
  19462. },
  19463. "sessionID": {
  19464. "type": "string",
  19465. "pattern": "^ses"
  19466. },
  19467. "questions": {
  19468. "type": "array",
  19469. "items": {
  19470. "$ref": "#/components/schemas/QuestionV2Info"
  19471. },
  19472. "description": "Questions to ask"
  19473. },
  19474. "tool": {
  19475. "$ref": "#/components/schemas/QuestionV2Tool"
  19476. }
  19477. },
  19478. "required": ["id", "sessionID", "questions"],
  19479. "additionalProperties": false
  19480. }
  19481. },
  19482. "required": ["id", "type", "properties"],
  19483. "additionalProperties": false
  19484. },
  19485. {
  19486. "type": "object",
  19487. "properties": {
  19488. "id": {
  19489. "type": "string",
  19490. "pattern": "^evt_"
  19491. },
  19492. "type": {
  19493. "type": "string",
  19494. "enum": ["question.v2.replied"]
  19495. },
  19496. "properties": {
  19497. "type": "object",
  19498. "properties": {
  19499. "sessionID": {
  19500. "type": "string",
  19501. "pattern": "^ses"
  19502. },
  19503. "requestID": {
  19504. "type": "string",
  19505. "pattern": "^que"
  19506. },
  19507. "answers": {
  19508. "type": "array",
  19509. "items": {
  19510. "$ref": "#/components/schemas/QuestionV2Answer"
  19511. }
  19512. }
  19513. },
  19514. "required": ["sessionID", "requestID", "answers"],
  19515. "additionalProperties": false
  19516. }
  19517. },
  19518. "required": ["id", "type", "properties"],
  19519. "additionalProperties": false
  19520. },
  19521. {
  19522. "type": "object",
  19523. "properties": {
  19524. "id": {
  19525. "type": "string",
  19526. "pattern": "^evt_"
  19527. },
  19528. "type": {
  19529. "type": "string",
  19530. "enum": ["question.v2.rejected"]
  19531. },
  19532. "properties": {
  19533. "type": "object",
  19534. "properties": {
  19535. "sessionID": {
  19536. "type": "string",
  19537. "pattern": "^ses"
  19538. },
  19539. "requestID": {
  19540. "type": "string",
  19541. "pattern": "^que"
  19542. }
  19543. },
  19544. "required": ["sessionID", "requestID"],
  19545. "additionalProperties": false
  19546. }
  19547. },
  19548. "required": ["id", "type", "properties"],
  19549. "additionalProperties": false
  19550. },
  19551. {
  19552. "type": "object",
  19553. "properties": {
  19554. "id": {
  19555. "type": "string",
  19556. "pattern": "^evt_"
  19557. },
  19558. "type": {
  19559. "type": "string",
  19560. "enum": ["todo.updated"]
  19561. },
  19562. "properties": {
  19563. "type": "object",
  19564. "properties": {
  19565. "sessionID": {
  19566. "type": "string",
  19567. "pattern": "^ses"
  19568. },
  19569. "todos": {
  19570. "type": "array",
  19571. "items": {
  19572. "$ref": "#/components/schemas/Todo"
  19573. }
  19574. }
  19575. },
  19576. "required": ["sessionID", "todos"],
  19577. "additionalProperties": false
  19578. }
  19579. },
  19580. "required": ["id", "type", "properties"],
  19581. "additionalProperties": false
  19582. },
  19583. {
  19584. "type": "object",
  19585. "properties": {
  19586. "id": {
  19587. "type": "string",
  19588. "pattern": "^evt_"
  19589. },
  19590. "type": {
  19591. "type": "string",
  19592. "enum": ["lsp.updated"]
  19593. },
  19594. "properties": {
  19595. "type": "object",
  19596. "properties": {}
  19597. }
  19598. },
  19599. "required": ["id", "type", "properties"],
  19600. "additionalProperties": false
  19601. },
  19602. {
  19603. "type": "object",
  19604. "properties": {
  19605. "id": {
  19606. "type": "string",
  19607. "pattern": "^evt_"
  19608. },
  19609. "type": {
  19610. "type": "string",
  19611. "enum": ["permission.asked"]
  19612. },
  19613. "properties": {
  19614. "type": "object",
  19615. "properties": {
  19616. "id": {
  19617. "type": "string",
  19618. "pattern": "^per"
  19619. },
  19620. "sessionID": {
  19621. "type": "string",
  19622. "pattern": "^ses"
  19623. },
  19624. "permission": {
  19625. "type": "string"
  19626. },
  19627. "patterns": {
  19628. "type": "array",
  19629. "items": {
  19630. "type": "string"
  19631. }
  19632. },
  19633. "metadata": {
  19634. "type": "object"
  19635. },
  19636. "always": {
  19637. "type": "array",
  19638. "items": {
  19639. "type": "string"
  19640. }
  19641. },
  19642. "tool": {
  19643. "type": "object",
  19644. "properties": {
  19645. "messageID": {
  19646. "type": "string"
  19647. },
  19648. "callID": {
  19649. "type": "string"
  19650. }
  19651. },
  19652. "required": ["messageID", "callID"],
  19653. "additionalProperties": false
  19654. }
  19655. },
  19656. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  19657. "additionalProperties": false
  19658. }
  19659. },
  19660. "required": ["id", "type", "properties"],
  19661. "additionalProperties": false
  19662. },
  19663. {
  19664. "type": "object",
  19665. "properties": {
  19666. "id": {
  19667. "type": "string",
  19668. "pattern": "^evt_"
  19669. },
  19670. "type": {
  19671. "type": "string",
  19672. "enum": ["permission.replied"]
  19673. },
  19674. "properties": {
  19675. "type": "object",
  19676. "properties": {
  19677. "sessionID": {
  19678. "type": "string",
  19679. "pattern": "^ses"
  19680. },
  19681. "requestID": {
  19682. "type": "string",
  19683. "pattern": "^per"
  19684. },
  19685. "reply": {
  19686. "type": "string",
  19687. "enum": ["once", "always", "reject"]
  19688. }
  19689. },
  19690. "required": ["sessionID", "requestID", "reply"],
  19691. "additionalProperties": false
  19692. }
  19693. },
  19694. "required": ["id", "type", "properties"],
  19695. "additionalProperties": false
  19696. },
  19697. {
  19698. "type": "object",
  19699. "properties": {
  19700. "id": {
  19701. "type": "string",
  19702. "pattern": "^evt_"
  19703. },
  19704. "type": {
  19705. "type": "string",
  19706. "enum": ["tui.prompt.append"]
  19707. },
  19708. "properties": {
  19709. "type": "object",
  19710. "properties": {
  19711. "text": {
  19712. "type": "string"
  19713. }
  19714. },
  19715. "required": ["text"],
  19716. "additionalProperties": false
  19717. }
  19718. },
  19719. "required": ["id", "type", "properties"],
  19720. "additionalProperties": false
  19721. },
  19722. {
  19723. "type": "object",
  19724. "properties": {
  19725. "id": {
  19726. "type": "string",
  19727. "pattern": "^evt_"
  19728. },
  19729. "type": {
  19730. "type": "string",
  19731. "enum": ["tui.command.execute"]
  19732. },
  19733. "properties": {
  19734. "type": "object",
  19735. "properties": {
  19736. "command": {
  19737. "anyOf": [
  19738. {
  19739. "type": "string",
  19740. "enum": [
  19741. "session.list",
  19742. "session.new",
  19743. "session.share",
  19744. "session.interrupt",
  19745. "session.compact",
  19746. "session.page.up",
  19747. "session.page.down",
  19748. "session.line.up",
  19749. "session.line.down",
  19750. "session.half.page.up",
  19751. "session.half.page.down",
  19752. "session.first",
  19753. "session.last",
  19754. "prompt.clear",
  19755. "prompt.submit",
  19756. "agent.cycle"
  19757. ]
  19758. },
  19759. {
  19760. "type": "string"
  19761. }
  19762. ]
  19763. }
  19764. },
  19765. "required": ["command"],
  19766. "additionalProperties": false
  19767. }
  19768. },
  19769. "required": ["id", "type", "properties"],
  19770. "additionalProperties": false
  19771. },
  19772. {
  19773. "type": "object",
  19774. "properties": {
  19775. "id": {
  19776. "type": "string",
  19777. "pattern": "^evt_"
  19778. },
  19779. "type": {
  19780. "type": "string",
  19781. "enum": ["tui.toast.show"]
  19782. },
  19783. "properties": {
  19784. "type": "object",
  19785. "properties": {
  19786. "title": {
  19787. "type": "string"
  19788. },
  19789. "message": {
  19790. "type": "string"
  19791. },
  19792. "variant": {
  19793. "type": "string",
  19794. "enum": ["info", "success", "warning", "error"]
  19795. },
  19796. "duration": {
  19797. "type": "integer",
  19798. "exclusiveMinimum": 0
  19799. }
  19800. },
  19801. "required": ["message", "variant"],
  19802. "additionalProperties": false
  19803. }
  19804. },
  19805. "required": ["id", "type", "properties"],
  19806. "additionalProperties": false
  19807. },
  19808. {
  19809. "type": "object",
  19810. "properties": {
  19811. "id": {
  19812. "type": "string",
  19813. "pattern": "^evt_"
  19814. },
  19815. "type": {
  19816. "type": "string",
  19817. "enum": ["tui.session.select"]
  19818. },
  19819. "properties": {
  19820. "type": "object",
  19821. "properties": {
  19822. "sessionID": {
  19823. "type": "string",
  19824. "pattern": "^ses",
  19825. "description": "Session ID to navigate to"
  19826. }
  19827. },
  19828. "required": ["sessionID"],
  19829. "additionalProperties": false
  19830. }
  19831. },
  19832. "required": ["id", "type", "properties"],
  19833. "additionalProperties": false
  19834. },
  19835. {
  19836. "type": "object",
  19837. "properties": {
  19838. "id": {
  19839. "type": "string",
  19840. "pattern": "^evt_"
  19841. },
  19842. "type": {
  19843. "type": "string",
  19844. "enum": ["mcp.tools.changed"]
  19845. },
  19846. "properties": {
  19847. "type": "object",
  19848. "properties": {
  19849. "server": {
  19850. "type": "string"
  19851. }
  19852. },
  19853. "required": ["server"],
  19854. "additionalProperties": false
  19855. }
  19856. },
  19857. "required": ["id", "type", "properties"],
  19858. "additionalProperties": false
  19859. },
  19860. {
  19861. "type": "object",
  19862. "properties": {
  19863. "id": {
  19864. "type": "string",
  19865. "pattern": "^evt_"
  19866. },
  19867. "type": {
  19868. "type": "string",
  19869. "enum": ["mcp.browser.open.failed"]
  19870. },
  19871. "properties": {
  19872. "type": "object",
  19873. "properties": {
  19874. "mcpName": {
  19875. "type": "string"
  19876. },
  19877. "url": {
  19878. "type": "string"
  19879. }
  19880. },
  19881. "required": ["mcpName", "url"],
  19882. "additionalProperties": false
  19883. }
  19884. },
  19885. "required": ["id", "type", "properties"],
  19886. "additionalProperties": false
  19887. },
  19888. {
  19889. "type": "object",
  19890. "properties": {
  19891. "id": {
  19892. "type": "string",
  19893. "pattern": "^evt_"
  19894. },
  19895. "type": {
  19896. "type": "string",
  19897. "enum": ["command.executed"]
  19898. },
  19899. "properties": {
  19900. "type": "object",
  19901. "properties": {
  19902. "name": {
  19903. "type": "string"
  19904. },
  19905. "sessionID": {
  19906. "type": "string",
  19907. "pattern": "^ses"
  19908. },
  19909. "arguments": {
  19910. "type": "string"
  19911. },
  19912. "messageID": {
  19913. "type": "string",
  19914. "pattern": "^msg"
  19915. }
  19916. },
  19917. "required": ["name", "sessionID", "arguments", "messageID"],
  19918. "additionalProperties": false
  19919. }
  19920. },
  19921. "required": ["id", "type", "properties"],
  19922. "additionalProperties": false
  19923. },
  19924. {
  19925. "type": "object",
  19926. "properties": {
  19927. "id": {
  19928. "type": "string",
  19929. "pattern": "^evt_"
  19930. },
  19931. "type": {
  19932. "type": "string",
  19933. "enum": ["project.updated"]
  19934. },
  19935. "properties": {
  19936. "type": "object",
  19937. "properties": {
  19938. "id": {
  19939. "type": "string"
  19940. },
  19941. "worktree": {
  19942. "type": "string"
  19943. },
  19944. "vcs": {
  19945. "$ref": "#/components/schemas/ProjectVcs"
  19946. },
  19947. "name": {
  19948. "type": "string"
  19949. },
  19950. "icon": {
  19951. "$ref": "#/components/schemas/ProjectIcon"
  19952. },
  19953. "commands": {
  19954. "$ref": "#/components/schemas/ProjectCommands"
  19955. },
  19956. "time": {
  19957. "$ref": "#/components/schemas/ProjectTime"
  19958. },
  19959. "sandboxes": {
  19960. "type": "array",
  19961. "items": {
  19962. "type": "string"
  19963. }
  19964. }
  19965. },
  19966. "required": ["id", "worktree", "time", "sandboxes"],
  19967. "additionalProperties": false
  19968. }
  19969. },
  19970. "required": ["id", "type", "properties"],
  19971. "additionalProperties": false
  19972. },
  19973. {
  19974. "type": "object",
  19975. "properties": {
  19976. "id": {
  19977. "type": "string",
  19978. "pattern": "^evt_"
  19979. },
  19980. "type": {
  19981. "type": "string",
  19982. "enum": ["session.status"]
  19983. },
  19984. "properties": {
  19985. "type": "object",
  19986. "properties": {
  19987. "sessionID": {
  19988. "type": "string",
  19989. "pattern": "^ses"
  19990. },
  19991. "status": {
  19992. "$ref": "#/components/schemas/SessionStatus"
  19993. }
  19994. },
  19995. "required": ["sessionID", "status"],
  19996. "additionalProperties": false
  19997. }
  19998. },
  19999. "required": ["id", "type", "properties"],
  20000. "additionalProperties": false
  20001. },
  20002. {
  20003. "type": "object",
  20004. "properties": {
  20005. "id": {
  20006. "type": "string",
  20007. "pattern": "^evt_"
  20008. },
  20009. "type": {
  20010. "type": "string",
  20011. "enum": ["session.idle"]
  20012. },
  20013. "properties": {
  20014. "type": "object",
  20015. "properties": {
  20016. "sessionID": {
  20017. "type": "string",
  20018. "pattern": "^ses"
  20019. }
  20020. },
  20021. "required": ["sessionID"],
  20022. "additionalProperties": false
  20023. }
  20024. },
  20025. "required": ["id", "type", "properties"],
  20026. "additionalProperties": false
  20027. },
  20028. {
  20029. "type": "object",
  20030. "properties": {
  20031. "id": {
  20032. "type": "string",
  20033. "pattern": "^evt_"
  20034. },
  20035. "type": {
  20036. "type": "string",
  20037. "enum": ["question.asked"]
  20038. },
  20039. "properties": {
  20040. "type": "object",
  20041. "properties": {
  20042. "id": {
  20043. "type": "string",
  20044. "pattern": "^que"
  20045. },
  20046. "sessionID": {
  20047. "type": "string",
  20048. "pattern": "^ses"
  20049. },
  20050. "questions": {
  20051. "type": "array",
  20052. "items": {
  20053. "$ref": "#/components/schemas/QuestionInfo"
  20054. },
  20055. "description": "Questions to ask"
  20056. },
  20057. "tool": {
  20058. "$ref": "#/components/schemas/QuestionTool"
  20059. }
  20060. },
  20061. "required": ["id", "sessionID", "questions"],
  20062. "additionalProperties": false
  20063. }
  20064. },
  20065. "required": ["id", "type", "properties"],
  20066. "additionalProperties": false
  20067. },
  20068. {
  20069. "type": "object",
  20070. "properties": {
  20071. "id": {
  20072. "type": "string",
  20073. "pattern": "^evt_"
  20074. },
  20075. "type": {
  20076. "type": "string",
  20077. "enum": ["question.replied"]
  20078. },
  20079. "properties": {
  20080. "type": "object",
  20081. "properties": {
  20082. "sessionID": {
  20083. "type": "string",
  20084. "pattern": "^ses"
  20085. },
  20086. "requestID": {
  20087. "type": "string",
  20088. "pattern": "^que"
  20089. },
  20090. "answers": {
  20091. "type": "array",
  20092. "items": {
  20093. "$ref": "#/components/schemas/QuestionAnswer"
  20094. }
  20095. }
  20096. },
  20097. "required": ["sessionID", "requestID", "answers"],
  20098. "additionalProperties": false
  20099. }
  20100. },
  20101. "required": ["id", "type", "properties"],
  20102. "additionalProperties": false
  20103. },
  20104. {
  20105. "type": "object",
  20106. "properties": {
  20107. "id": {
  20108. "type": "string",
  20109. "pattern": "^evt_"
  20110. },
  20111. "type": {
  20112. "type": "string",
  20113. "enum": ["question.rejected"]
  20114. },
  20115. "properties": {
  20116. "type": "object",
  20117. "properties": {
  20118. "sessionID": {
  20119. "type": "string",
  20120. "pattern": "^ses"
  20121. },
  20122. "requestID": {
  20123. "type": "string",
  20124. "pattern": "^que"
  20125. }
  20126. },
  20127. "required": ["sessionID", "requestID"],
  20128. "additionalProperties": false
  20129. }
  20130. },
  20131. "required": ["id", "type", "properties"],
  20132. "additionalProperties": false
  20133. },
  20134. {
  20135. "type": "object",
  20136. "properties": {
  20137. "id": {
  20138. "type": "string",
  20139. "pattern": "^evt_"
  20140. },
  20141. "type": {
  20142. "type": "string",
  20143. "enum": ["session.compacted"]
  20144. },
  20145. "properties": {
  20146. "type": "object",
  20147. "properties": {
  20148. "sessionID": {
  20149. "type": "string",
  20150. "pattern": "^ses"
  20151. }
  20152. },
  20153. "required": ["sessionID"],
  20154. "additionalProperties": false
  20155. }
  20156. },
  20157. "required": ["id", "type", "properties"],
  20158. "additionalProperties": false
  20159. },
  20160. {
  20161. "type": "object",
  20162. "properties": {
  20163. "id": {
  20164. "type": "string",
  20165. "pattern": "^evt_"
  20166. },
  20167. "type": {
  20168. "type": "string",
  20169. "enum": ["vcs.branch.updated"]
  20170. },
  20171. "properties": {
  20172. "type": "object",
  20173. "properties": {
  20174. "branch": {
  20175. "type": "string"
  20176. }
  20177. },
  20178. "additionalProperties": false
  20179. }
  20180. },
  20181. "required": ["id", "type", "properties"],
  20182. "additionalProperties": false
  20183. },
  20184. {
  20185. "type": "object",
  20186. "properties": {
  20187. "id": {
  20188. "type": "string",
  20189. "pattern": "^evt_"
  20190. },
  20191. "type": {
  20192. "type": "string",
  20193. "enum": ["workspace.ready"]
  20194. },
  20195. "properties": {
  20196. "type": "object",
  20197. "properties": {
  20198. "name": {
  20199. "type": "string"
  20200. }
  20201. },
  20202. "required": ["name"],
  20203. "additionalProperties": false
  20204. }
  20205. },
  20206. "required": ["id", "type", "properties"],
  20207. "additionalProperties": false
  20208. },
  20209. {
  20210. "type": "object",
  20211. "properties": {
  20212. "id": {
  20213. "type": "string",
  20214. "pattern": "^evt_"
  20215. },
  20216. "type": {
  20217. "type": "string",
  20218. "enum": ["workspace.failed"]
  20219. },
  20220. "properties": {
  20221. "type": "object",
  20222. "properties": {
  20223. "message": {
  20224. "type": "string"
  20225. }
  20226. },
  20227. "required": ["message"],
  20228. "additionalProperties": false
  20229. }
  20230. },
  20231. "required": ["id", "type", "properties"],
  20232. "additionalProperties": false
  20233. },
  20234. {
  20235. "type": "object",
  20236. "properties": {
  20237. "id": {
  20238. "type": "string",
  20239. "pattern": "^evt_"
  20240. },
  20241. "type": {
  20242. "type": "string",
  20243. "enum": ["workspace.status"]
  20244. },
  20245. "properties": {
  20246. "type": "object",
  20247. "properties": {
  20248. "workspaceID": {
  20249. "type": "string",
  20250. "pattern": "^wrk"
  20251. },
  20252. "status": {
  20253. "type": "string",
  20254. "enum": ["connected", "connecting", "disconnected", "error"]
  20255. }
  20256. },
  20257. "required": ["workspaceID", "status"],
  20258. "additionalProperties": false
  20259. }
  20260. },
  20261. "required": ["id", "type", "properties"],
  20262. "additionalProperties": false
  20263. },
  20264. {
  20265. "type": "object",
  20266. "properties": {
  20267. "id": {
  20268. "type": "string",
  20269. "pattern": "^evt_"
  20270. },
  20271. "type": {
  20272. "type": "string",
  20273. "enum": ["worktree.ready"]
  20274. },
  20275. "properties": {
  20276. "type": "object",
  20277. "properties": {
  20278. "name": {
  20279. "type": "string"
  20280. },
  20281. "branch": {
  20282. "type": "string"
  20283. }
  20284. },
  20285. "required": ["name"],
  20286. "additionalProperties": false
  20287. }
  20288. },
  20289. "required": ["id", "type", "properties"],
  20290. "additionalProperties": false
  20291. },
  20292. {
  20293. "type": "object",
  20294. "properties": {
  20295. "id": {
  20296. "type": "string",
  20297. "pattern": "^evt_"
  20298. },
  20299. "type": {
  20300. "type": "string",
  20301. "enum": ["worktree.failed"]
  20302. },
  20303. "properties": {
  20304. "type": "object",
  20305. "properties": {
  20306. "message": {
  20307. "type": "string"
  20308. }
  20309. },
  20310. "required": ["message"],
  20311. "additionalProperties": false
  20312. }
  20313. },
  20314. "required": ["id", "type", "properties"],
  20315. "additionalProperties": false
  20316. },
  20317. {
  20318. "type": "object",
  20319. "properties": {
  20320. "id": {
  20321. "type": "string",
  20322. "pattern": "^evt_"
  20323. },
  20324. "type": {
  20325. "type": "string",
  20326. "enum": ["server.connected"]
  20327. },
  20328. "properties": {
  20329. "type": "object",
  20330. "properties": {}
  20331. }
  20332. },
  20333. "required": ["id", "type", "properties"],
  20334. "additionalProperties": false
  20335. },
  20336. {
  20337. "type": "object",
  20338. "properties": {
  20339. "id": {
  20340. "type": "string",
  20341. "pattern": "^evt_"
  20342. },
  20343. "type": {
  20344. "type": "string",
  20345. "enum": ["global.disposed"]
  20346. },
  20347. "properties": {
  20348. "type": "object",
  20349. "properties": {}
  20350. }
  20351. },
  20352. "required": ["id", "type", "properties"],
  20353. "additionalProperties": false
  20354. },
  20355. {
  20356. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  20357. },
  20358. {
  20359. "$ref": "#/components/schemas/SyncEventSessionCreated"
  20360. },
  20361. {
  20362. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  20363. },
  20364. {
  20365. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  20366. },
  20367. {
  20368. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  20369. },
  20370. {
  20371. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  20372. },
  20373. {
  20374. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  20375. },
  20376. {
  20377. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  20378. },
  20379. {
  20380. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  20381. },
  20382. {
  20383. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  20384. },
  20385. {
  20386. "$ref": "#/components/schemas/SyncEventSessionNextMoved"
  20387. },
  20388. {
  20389. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  20390. },
  20391. {
  20392. "$ref": "#/components/schemas/SyncEventSessionNextPromptAdmitted"
  20393. },
  20394. {
  20395. "$ref": "#/components/schemas/SyncEventSessionNextContextUpdated"
  20396. },
  20397. {
  20398. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  20399. },
  20400. {
  20401. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  20402. },
  20403. {
  20404. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  20405. },
  20406. {
  20407. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  20408. },
  20409. {
  20410. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  20411. },
  20412. {
  20413. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  20414. },
  20415. {
  20416. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  20417. },
  20418. {
  20419. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  20420. },
  20421. {
  20422. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  20423. },
  20424. {
  20425. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  20426. },
  20427. {
  20428. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  20429. },
  20430. {
  20431. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  20432. },
  20433. {
  20434. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  20435. },
  20436. {
  20437. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  20438. },
  20439. {
  20440. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  20441. },
  20442. {
  20443. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  20444. },
  20445. {
  20446. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  20447. },
  20448. {
  20449. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  20450. },
  20451. {
  20452. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  20453. },
  20454. {
  20455. "$ref": "#/components/schemas/SyncEventSessionNextRevertStaged"
  20456. },
  20457. {
  20458. "$ref": "#/components/schemas/SyncEventSessionNextRevertCleared"
  20459. },
  20460. {
  20461. "$ref": "#/components/schemas/SyncEventSessionNextRevertCommitted"
  20462. }
  20463. ]
  20464. }
  20465. },
  20466. "required": ["directory", "payload"],
  20467. "additionalProperties": false
  20468. },
  20469. "LogLevel": {
  20470. "type": "string",
  20471. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  20472. "description": "Log level"
  20473. },
  20474. "ServerConfig": {
  20475. "type": "object",
  20476. "properties": {
  20477. "port": {
  20478. "type": "integer",
  20479. "exclusiveMinimum": 0
  20480. },
  20481. "hostname": {
  20482. "type": "string"
  20483. },
  20484. "mdns": {
  20485. "type": "boolean"
  20486. },
  20487. "mdnsDomain": {
  20488. "type": "string"
  20489. },
  20490. "cors": {
  20491. "type": "array",
  20492. "items": {
  20493. "type": "string"
  20494. }
  20495. }
  20496. },
  20497. "additionalProperties": false,
  20498. "description": "Server configuration for opencode serve and web commands"
  20499. },
  20500. "PermissionActionConfig": {
  20501. "type": "string",
  20502. "enum": ["ask", "allow", "deny"]
  20503. },
  20504. "PermissionObjectConfig": {
  20505. "type": "object",
  20506. "additionalProperties": {
  20507. "$ref": "#/components/schemas/PermissionActionConfig"
  20508. }
  20509. },
  20510. "PermissionRuleConfig": {
  20511. "anyOf": [
  20512. {
  20513. "$ref": "#/components/schemas/PermissionActionConfig"
  20514. },
  20515. {
  20516. "$ref": "#/components/schemas/PermissionObjectConfig"
  20517. }
  20518. ]
  20519. },
  20520. "PermissionConfig": {
  20521. "anyOf": [
  20522. {
  20523. "$ref": "#/components/schemas/PermissionActionConfig"
  20524. },
  20525. {
  20526. "type": "object",
  20527. "properties": {
  20528. "read": {
  20529. "$ref": "#/components/schemas/PermissionRuleConfig"
  20530. },
  20531. "edit": {
  20532. "$ref": "#/components/schemas/PermissionRuleConfig"
  20533. },
  20534. "glob": {
  20535. "$ref": "#/components/schemas/PermissionRuleConfig"
  20536. },
  20537. "grep": {
  20538. "$ref": "#/components/schemas/PermissionRuleConfig"
  20539. },
  20540. "list": {
  20541. "$ref": "#/components/schemas/PermissionRuleConfig"
  20542. },
  20543. "bash": {
  20544. "$ref": "#/components/schemas/PermissionRuleConfig"
  20545. },
  20546. "task": {
  20547. "$ref": "#/components/schemas/PermissionRuleConfig"
  20548. },
  20549. "external_directory": {
  20550. "$ref": "#/components/schemas/PermissionRuleConfig"
  20551. },
  20552. "todowrite": {
  20553. "$ref": "#/components/schemas/PermissionActionConfig"
  20554. },
  20555. "question": {
  20556. "$ref": "#/components/schemas/PermissionActionConfig"
  20557. },
  20558. "webfetch": {
  20559. "$ref": "#/components/schemas/PermissionActionConfig"
  20560. },
  20561. "websearch": {
  20562. "$ref": "#/components/schemas/PermissionActionConfig"
  20563. },
  20564. "lsp": {
  20565. "$ref": "#/components/schemas/PermissionRuleConfig"
  20566. },
  20567. "doom_loop": {
  20568. "$ref": "#/components/schemas/PermissionActionConfig"
  20569. },
  20570. "skill": {
  20571. "$ref": "#/components/schemas/PermissionRuleConfig"
  20572. }
  20573. },
  20574. "additionalProperties": {
  20575. "$ref": "#/components/schemas/PermissionRuleConfig"
  20576. }
  20577. }
  20578. ]
  20579. },
  20580. "AgentConfig": {
  20581. "type": "object",
  20582. "properties": {
  20583. "model": {
  20584. "type": "string"
  20585. },
  20586. "variant": {
  20587. "type": "string"
  20588. },
  20589. "temperature": {
  20590. "type": "number"
  20591. },
  20592. "top_p": {
  20593. "type": "number"
  20594. },
  20595. "prompt": {
  20596. "type": "string"
  20597. },
  20598. "tools": {
  20599. "type": "object",
  20600. "additionalProperties": {
  20601. "type": "boolean"
  20602. }
  20603. },
  20604. "disable": {
  20605. "type": "boolean"
  20606. },
  20607. "description": {
  20608. "type": "string"
  20609. },
  20610. "mode": {
  20611. "type": "string",
  20612. "enum": ["subagent", "primary", "all"]
  20613. },
  20614. "hidden": {
  20615. "type": "boolean"
  20616. },
  20617. "options": {
  20618. "type": "object"
  20619. },
  20620. "color": {
  20621. "anyOf": [
  20622. {
  20623. "type": "string",
  20624. "pattern": "^#[0-9a-fA-F]{6}$"
  20625. },
  20626. {
  20627. "type": "string",
  20628. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  20629. }
  20630. ],
  20631. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  20632. },
  20633. "steps": {
  20634. "type": "integer",
  20635. "exclusiveMinimum": 0
  20636. },
  20637. "maxSteps": {
  20638. "type": "integer",
  20639. "exclusiveMinimum": 0
  20640. },
  20641. "permission": {
  20642. "$ref": "#/components/schemas/PermissionConfig"
  20643. }
  20644. },
  20645. "additionalProperties": {}
  20646. },
  20647. "ProviderConfig": {
  20648. "type": "object",
  20649. "properties": {
  20650. "api": {
  20651. "type": "string"
  20652. },
  20653. "name": {
  20654. "type": "string"
  20655. },
  20656. "env": {
  20657. "type": "array",
  20658. "items": {
  20659. "type": "string"
  20660. }
  20661. },
  20662. "id": {
  20663. "type": "string"
  20664. },
  20665. "npm": {
  20666. "type": "string"
  20667. },
  20668. "whitelist": {
  20669. "type": "array",
  20670. "items": {
  20671. "type": "string"
  20672. }
  20673. },
  20674. "blacklist": {
  20675. "type": "array",
  20676. "items": {
  20677. "type": "string"
  20678. }
  20679. },
  20680. "options": {
  20681. "type": "object",
  20682. "properties": {
  20683. "apiKey": {
  20684. "type": "string"
  20685. },
  20686. "baseURL": {
  20687. "type": "string"
  20688. },
  20689. "enterpriseUrl": {
  20690. "type": "string"
  20691. },
  20692. "setCacheKey": {
  20693. "type": "boolean"
  20694. },
  20695. "timeout": {
  20696. "anyOf": [
  20697. {
  20698. "type": "integer",
  20699. "exclusiveMinimum": 0
  20700. },
  20701. {
  20702. "type": "boolean",
  20703. "enum": [false]
  20704. }
  20705. ],
  20706. "description": "Timeout in milliseconds for full requests to this provider. Set to false to disable timeout."
  20707. },
  20708. "headerTimeout": {
  20709. "anyOf": [
  20710. {
  20711. "type": "integer",
  20712. "exclusiveMinimum": 0
  20713. },
  20714. {
  20715. "type": "boolean",
  20716. "enum": [false]
  20717. }
  20718. ],
  20719. "description": "Timeout in milliseconds to wait for response headers. Provider integrations may set defaults. Set to false to disable timeout."
  20720. },
  20721. "chunkTimeout": {
  20722. "type": "integer",
  20723. "exclusiveMinimum": 0
  20724. }
  20725. },
  20726. "additionalProperties": {}
  20727. },
  20728. "models": {
  20729. "type": "object",
  20730. "additionalProperties": {
  20731. "type": "object",
  20732. "properties": {
  20733. "id": {
  20734. "type": "string"
  20735. },
  20736. "name": {
  20737. "type": "string"
  20738. },
  20739. "family": {
  20740. "type": "string"
  20741. },
  20742. "release_date": {
  20743. "type": "string"
  20744. },
  20745. "attachment": {
  20746. "type": "boolean"
  20747. },
  20748. "reasoning": {
  20749. "type": "boolean"
  20750. },
  20751. "temperature": {
  20752. "type": "boolean"
  20753. },
  20754. "tool_call": {
  20755. "type": "boolean"
  20756. },
  20757. "interleaved": {
  20758. "anyOf": [
  20759. {
  20760. "type": "boolean",
  20761. "enum": [true]
  20762. },
  20763. {
  20764. "type": "object",
  20765. "properties": {
  20766. "field": {
  20767. "type": "string",
  20768. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  20769. }
  20770. },
  20771. "required": ["field"],
  20772. "additionalProperties": false
  20773. }
  20774. ]
  20775. },
  20776. "cost": {
  20777. "type": "object",
  20778. "properties": {
  20779. "input": {
  20780. "type": "number"
  20781. },
  20782. "output": {
  20783. "type": "number"
  20784. },
  20785. "cache_read": {
  20786. "type": "number"
  20787. },
  20788. "cache_write": {
  20789. "type": "number"
  20790. },
  20791. "context_over_200k": {
  20792. "type": "object",
  20793. "properties": {
  20794. "input": {
  20795. "type": "number"
  20796. },
  20797. "output": {
  20798. "type": "number"
  20799. },
  20800. "cache_read": {
  20801. "type": "number"
  20802. },
  20803. "cache_write": {
  20804. "type": "number"
  20805. }
  20806. },
  20807. "required": ["input", "output"],
  20808. "additionalProperties": false
  20809. }
  20810. },
  20811. "required": ["input", "output"],
  20812. "additionalProperties": false
  20813. },
  20814. "limit": {
  20815. "type": "object",
  20816. "properties": {
  20817. "context": {
  20818. "type": "number"
  20819. },
  20820. "input": {
  20821. "type": "number"
  20822. },
  20823. "output": {
  20824. "type": "number"
  20825. }
  20826. },
  20827. "required": ["context", "output"],
  20828. "additionalProperties": false
  20829. },
  20830. "modalities": {
  20831. "type": "object",
  20832. "properties": {
  20833. "input": {
  20834. "type": "array",
  20835. "items": {
  20836. "type": "string",
  20837. "enum": ["text", "audio", "image", "video", "pdf"]
  20838. }
  20839. },
  20840. "output": {
  20841. "type": "array",
  20842. "items": {
  20843. "type": "string",
  20844. "enum": ["text", "audio", "image", "video", "pdf"]
  20845. }
  20846. }
  20847. },
  20848. "additionalProperties": false
  20849. },
  20850. "experimental": {
  20851. "type": "boolean"
  20852. },
  20853. "status": {
  20854. "type": "string",
  20855. "enum": ["alpha", "beta", "deprecated", "active"]
  20856. },
  20857. "provider": {
  20858. "type": "object",
  20859. "properties": {
  20860. "npm": {
  20861. "type": "string"
  20862. },
  20863. "api": {
  20864. "type": "string"
  20865. }
  20866. },
  20867. "additionalProperties": false
  20868. },
  20869. "options": {
  20870. "type": "object"
  20871. },
  20872. "headers": {
  20873. "type": "object",
  20874. "additionalProperties": {
  20875. "type": "string"
  20876. }
  20877. },
  20878. "variants": {
  20879. "type": "object",
  20880. "additionalProperties": {
  20881. "type": "object",
  20882. "properties": {
  20883. "disabled": {
  20884. "type": "boolean"
  20885. }
  20886. },
  20887. "additionalProperties": {}
  20888. },
  20889. "description": "Variant-specific configuration"
  20890. }
  20891. },
  20892. "additionalProperties": false
  20893. }
  20894. }
  20895. },
  20896. "additionalProperties": false
  20897. },
  20898. "McpLocalConfig": {
  20899. "type": "object",
  20900. "properties": {
  20901. "type": {
  20902. "type": "string",
  20903. "enum": ["local"],
  20904. "description": "Type of MCP server connection"
  20905. },
  20906. "command": {
  20907. "type": "array",
  20908. "items": {
  20909. "type": "string"
  20910. },
  20911. "description": "Command and arguments to run the MCP server"
  20912. },
  20913. "cwd": {
  20914. "type": "string"
  20915. },
  20916. "environment": {
  20917. "type": "object",
  20918. "additionalProperties": {
  20919. "type": "string"
  20920. }
  20921. },
  20922. "enabled": {
  20923. "type": "boolean"
  20924. },
  20925. "timeout": {
  20926. "type": "integer",
  20927. "exclusiveMinimum": 0
  20928. }
  20929. },
  20930. "required": ["type", "command"],
  20931. "additionalProperties": false
  20932. },
  20933. "McpOAuthConfig": {
  20934. "type": "object",
  20935. "properties": {
  20936. "clientId": {
  20937. "type": "string"
  20938. },
  20939. "clientSecret": {
  20940. "type": "string"
  20941. },
  20942. "scope": {
  20943. "type": "string"
  20944. },
  20945. "callbackPort": {
  20946. "type": "integer",
  20947. "minimum": 1,
  20948. "maximum": 65535
  20949. },
  20950. "redirectUri": {
  20951. "type": "string"
  20952. }
  20953. },
  20954. "additionalProperties": false
  20955. },
  20956. "McpRemoteConfig": {
  20957. "type": "object",
  20958. "properties": {
  20959. "type": {
  20960. "type": "string",
  20961. "enum": ["remote"],
  20962. "description": "Type of MCP server connection"
  20963. },
  20964. "url": {
  20965. "type": "string",
  20966. "description": "URL of the remote MCP server"
  20967. },
  20968. "enabled": {
  20969. "type": "boolean"
  20970. },
  20971. "headers": {
  20972. "type": "object",
  20973. "additionalProperties": {
  20974. "type": "string"
  20975. }
  20976. },
  20977. "oauth": {
  20978. "anyOf": [
  20979. {
  20980. "$ref": "#/components/schemas/McpOAuthConfig"
  20981. },
  20982. {
  20983. "type": "boolean",
  20984. "enum": [false]
  20985. }
  20986. ],
  20987. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  20988. },
  20989. "timeout": {
  20990. "type": "integer",
  20991. "exclusiveMinimum": 0
  20992. }
  20993. },
  20994. "required": ["type", "url"],
  20995. "additionalProperties": false
  20996. },
  20997. "LayoutConfig": {
  20998. "type": "string",
  20999. "enum": ["auto", "stretch"],
  21000. "description": "@deprecated Always uses stretch layout."
  21001. },
  21002. "ImageAttachmentConfig": {
  21003. "type": "object",
  21004. "properties": {
  21005. "auto_resize": {
  21006. "type": "boolean"
  21007. },
  21008. "max_width": {
  21009. "type": "integer",
  21010. "exclusiveMinimum": 0
  21011. },
  21012. "max_height": {
  21013. "type": "integer",
  21014. "exclusiveMinimum": 0
  21015. },
  21016. "max_base64_bytes": {
  21017. "type": "integer",
  21018. "exclusiveMinimum": 0
  21019. }
  21020. },
  21021. "additionalProperties": false
  21022. },
  21023. "AttachmentConfig": {
  21024. "type": "object",
  21025. "properties": {
  21026. "image": {
  21027. "$ref": "#/components/schemas/ImageAttachmentConfig"
  21028. }
  21029. },
  21030. "additionalProperties": false
  21031. },
  21032. "Config": {
  21033. "type": "object",
  21034. "properties": {
  21035. "$schema": {
  21036. "type": "string"
  21037. },
  21038. "shell": {
  21039. "type": "string"
  21040. },
  21041. "logLevel": {
  21042. "$ref": "#/components/schemas/LogLevel"
  21043. },
  21044. "server": {
  21045. "$ref": "#/components/schemas/ServerConfig"
  21046. },
  21047. "command": {
  21048. "type": "object",
  21049. "additionalProperties": {
  21050. "type": "object",
  21051. "properties": {
  21052. "template": {
  21053. "type": "string"
  21054. },
  21055. "description": {
  21056. "type": "string"
  21057. },
  21058. "agent": {
  21059. "type": "string"
  21060. },
  21061. "model": {
  21062. "type": "string"
  21063. },
  21064. "variant": {
  21065. "type": "string"
  21066. },
  21067. "subtask": {
  21068. "type": "boolean"
  21069. }
  21070. },
  21071. "required": ["template"],
  21072. "additionalProperties": false
  21073. }
  21074. },
  21075. "skills": {
  21076. "type": "object",
  21077. "properties": {
  21078. "paths": {
  21079. "type": "array",
  21080. "items": {
  21081. "type": "string"
  21082. }
  21083. },
  21084. "urls": {
  21085. "type": "array",
  21086. "items": {
  21087. "type": "string"
  21088. }
  21089. }
  21090. },
  21091. "additionalProperties": false
  21092. },
  21093. "references": {
  21094. "type": "object",
  21095. "additionalProperties": {
  21096. "anyOf": [
  21097. {
  21098. "type": "string"
  21099. },
  21100. {
  21101. "$ref": "#/components/schemas/ConfigV2ReferenceGit"
  21102. },
  21103. {
  21104. "$ref": "#/components/schemas/ConfigV2ReferenceLocal"
  21105. }
  21106. ]
  21107. }
  21108. },
  21109. "reference": {
  21110. "type": "object",
  21111. "additionalProperties": {
  21112. "anyOf": [
  21113. {
  21114. "type": "string"
  21115. },
  21116. {
  21117. "$ref": "#/components/schemas/ConfigV2ReferenceGit"
  21118. },
  21119. {
  21120. "$ref": "#/components/schemas/ConfigV2ReferenceLocal"
  21121. }
  21122. ]
  21123. }
  21124. },
  21125. "watcher": {
  21126. "type": "object",
  21127. "properties": {
  21128. "ignore": {
  21129. "type": "array",
  21130. "items": {
  21131. "type": "string"
  21132. }
  21133. }
  21134. },
  21135. "additionalProperties": false
  21136. },
  21137. "snapshot": {
  21138. "type": "boolean"
  21139. },
  21140. "plugin": {
  21141. "type": "array",
  21142. "items": {
  21143. "anyOf": [
  21144. {
  21145. "type": "string"
  21146. },
  21147. {
  21148. "type": "array",
  21149. "prefixItems": [
  21150. {
  21151. "type": "string"
  21152. },
  21153. {
  21154. "type": "object"
  21155. }
  21156. ],
  21157. "maxItems": 2,
  21158. "minItems": 2
  21159. }
  21160. ]
  21161. }
  21162. },
  21163. "share": {
  21164. "type": "string",
  21165. "enum": ["manual", "auto", "disabled"]
  21166. },
  21167. "autoshare": {
  21168. "type": "boolean"
  21169. },
  21170. "autoupdate": {
  21171. "anyOf": [
  21172. {
  21173. "type": "boolean"
  21174. },
  21175. {
  21176. "type": "string",
  21177. "enum": ["notify"]
  21178. }
  21179. ],
  21180. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  21181. },
  21182. "disabled_providers": {
  21183. "type": "array",
  21184. "items": {
  21185. "type": "string"
  21186. }
  21187. },
  21188. "enabled_providers": {
  21189. "type": "array",
  21190. "items": {
  21191. "type": "string"
  21192. }
  21193. },
  21194. "model": {
  21195. "type": "string"
  21196. },
  21197. "small_model": {
  21198. "type": "string"
  21199. },
  21200. "default_agent": {
  21201. "type": "string"
  21202. },
  21203. "username": {
  21204. "type": "string"
  21205. },
  21206. "mode": {
  21207. "type": "object",
  21208. "properties": {
  21209. "build": {
  21210. "$ref": "#/components/schemas/AgentConfig"
  21211. },
  21212. "plan": {
  21213. "$ref": "#/components/schemas/AgentConfig"
  21214. }
  21215. },
  21216. "additionalProperties": {
  21217. "$ref": "#/components/schemas/AgentConfig"
  21218. }
  21219. },
  21220. "agent": {
  21221. "type": "object",
  21222. "properties": {
  21223. "plan": {
  21224. "$ref": "#/components/schemas/AgentConfig"
  21225. },
  21226. "build": {
  21227. "$ref": "#/components/schemas/AgentConfig"
  21228. },
  21229. "general": {
  21230. "$ref": "#/components/schemas/AgentConfig"
  21231. },
  21232. "explore": {
  21233. "$ref": "#/components/schemas/AgentConfig"
  21234. },
  21235. "title": {
  21236. "$ref": "#/components/schemas/AgentConfig"
  21237. },
  21238. "summary": {
  21239. "$ref": "#/components/schemas/AgentConfig"
  21240. },
  21241. "compaction": {
  21242. "$ref": "#/components/schemas/AgentConfig"
  21243. }
  21244. },
  21245. "additionalProperties": {
  21246. "$ref": "#/components/schemas/AgentConfig"
  21247. }
  21248. },
  21249. "provider": {
  21250. "type": "object",
  21251. "additionalProperties": {
  21252. "$ref": "#/components/schemas/ProviderConfig"
  21253. }
  21254. },
  21255. "mcp": {
  21256. "type": "object",
  21257. "additionalProperties": {
  21258. "anyOf": [
  21259. {
  21260. "$ref": "#/components/schemas/McpLocalConfig"
  21261. },
  21262. {
  21263. "$ref": "#/components/schemas/McpRemoteConfig"
  21264. },
  21265. {
  21266. "type": "object",
  21267. "properties": {
  21268. "enabled": {
  21269. "type": "boolean"
  21270. }
  21271. },
  21272. "required": ["enabled"],
  21273. "additionalProperties": false
  21274. }
  21275. ]
  21276. }
  21277. },
  21278. "formatter": {
  21279. "anyOf": [
  21280. {
  21281. "type": "boolean"
  21282. },
  21283. {
  21284. "type": "object",
  21285. "additionalProperties": {
  21286. "type": "object",
  21287. "properties": {
  21288. "disabled": {
  21289. "type": "boolean"
  21290. },
  21291. "command": {
  21292. "type": "array",
  21293. "items": {
  21294. "type": "string"
  21295. }
  21296. },
  21297. "environment": {
  21298. "type": "object",
  21299. "additionalProperties": {
  21300. "type": "string"
  21301. }
  21302. },
  21303. "extensions": {
  21304. "type": "array",
  21305. "items": {
  21306. "type": "string"
  21307. }
  21308. }
  21309. },
  21310. "additionalProperties": false
  21311. }
  21312. }
  21313. ],
  21314. "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."
  21315. },
  21316. "lsp": {
  21317. "anyOf": [
  21318. {
  21319. "type": "boolean"
  21320. },
  21321. {
  21322. "type": "object",
  21323. "additionalProperties": {
  21324. "anyOf": [
  21325. {
  21326. "type": "object",
  21327. "properties": {
  21328. "disabled": {
  21329. "type": "boolean",
  21330. "enum": [true]
  21331. }
  21332. },
  21333. "required": ["disabled"],
  21334. "additionalProperties": false
  21335. },
  21336. {
  21337. "type": "object",
  21338. "properties": {
  21339. "command": {
  21340. "type": "array",
  21341. "items": {
  21342. "type": "string"
  21343. }
  21344. },
  21345. "extensions": {
  21346. "type": "array",
  21347. "items": {
  21348. "type": "string"
  21349. }
  21350. },
  21351. "disabled": {
  21352. "type": "boolean"
  21353. },
  21354. "env": {
  21355. "type": "object",
  21356. "additionalProperties": {
  21357. "type": "string"
  21358. }
  21359. },
  21360. "initialization": {
  21361. "type": "object"
  21362. }
  21363. },
  21364. "required": ["command"],
  21365. "additionalProperties": false
  21366. }
  21367. ]
  21368. }
  21369. }
  21370. ],
  21371. "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."
  21372. },
  21373. "instructions": {
  21374. "type": "array",
  21375. "items": {
  21376. "type": "string"
  21377. }
  21378. },
  21379. "layout": {
  21380. "$ref": "#/components/schemas/LayoutConfig"
  21381. },
  21382. "permission": {
  21383. "$ref": "#/components/schemas/PermissionConfig"
  21384. },
  21385. "tools": {
  21386. "type": "object",
  21387. "additionalProperties": {
  21388. "type": "boolean"
  21389. }
  21390. },
  21391. "attachment": {
  21392. "$ref": "#/components/schemas/AttachmentConfig"
  21393. },
  21394. "enterprise": {
  21395. "type": "object",
  21396. "properties": {
  21397. "url": {
  21398. "type": "string"
  21399. }
  21400. },
  21401. "additionalProperties": false
  21402. },
  21403. "tool_output": {
  21404. "type": "object",
  21405. "properties": {
  21406. "max_lines": {
  21407. "type": "integer",
  21408. "exclusiveMinimum": 0
  21409. },
  21410. "max_bytes": {
  21411. "type": "integer",
  21412. "exclusiveMinimum": 0
  21413. }
  21414. },
  21415. "additionalProperties": false
  21416. },
  21417. "compaction": {
  21418. "type": "object",
  21419. "properties": {
  21420. "auto": {
  21421. "type": "boolean"
  21422. },
  21423. "prune": {
  21424. "type": "boolean"
  21425. },
  21426. "tail_turns": {
  21427. "type": "integer",
  21428. "minimum": 0
  21429. },
  21430. "preserve_recent_tokens": {
  21431. "type": "integer",
  21432. "minimum": 0
  21433. },
  21434. "reserved": {
  21435. "type": "integer",
  21436. "minimum": 0
  21437. }
  21438. },
  21439. "additionalProperties": false
  21440. },
  21441. "experimental": {
  21442. "type": "object",
  21443. "properties": {
  21444. "disable_paste_summary": {
  21445. "type": "boolean"
  21446. },
  21447. "batch_tool": {
  21448. "type": "boolean"
  21449. },
  21450. "openTelemetry": {
  21451. "type": "boolean"
  21452. },
  21453. "primary_tools": {
  21454. "type": "array",
  21455. "items": {
  21456. "type": "string"
  21457. }
  21458. },
  21459. "continue_loop_on_deny": {
  21460. "type": "boolean"
  21461. },
  21462. "mcp_timeout": {
  21463. "type": "integer",
  21464. "exclusiveMinimum": 0
  21465. },
  21466. "policies": {
  21467. "type": "array",
  21468. "items": {
  21469. "$ref": "#/components/schemas/ConfigV2ExperimentalPolicy"
  21470. }
  21471. }
  21472. },
  21473. "additionalProperties": false
  21474. }
  21475. },
  21476. "additionalProperties": false
  21477. },
  21478. "Model": {
  21479. "type": "object",
  21480. "properties": {
  21481. "id": {
  21482. "type": "string"
  21483. },
  21484. "providerID": {
  21485. "type": "string"
  21486. },
  21487. "api": {
  21488. "type": "object",
  21489. "properties": {
  21490. "id": {
  21491. "type": "string"
  21492. },
  21493. "url": {
  21494. "type": "string"
  21495. },
  21496. "npm": {
  21497. "type": "string"
  21498. }
  21499. },
  21500. "required": ["id", "url", "npm"],
  21501. "additionalProperties": false
  21502. },
  21503. "name": {
  21504. "type": "string"
  21505. },
  21506. "family": {
  21507. "type": "string"
  21508. },
  21509. "capabilities": {
  21510. "type": "object",
  21511. "properties": {
  21512. "temperature": {
  21513. "type": "boolean"
  21514. },
  21515. "reasoning": {
  21516. "type": "boolean"
  21517. },
  21518. "attachment": {
  21519. "type": "boolean"
  21520. },
  21521. "toolcall": {
  21522. "type": "boolean"
  21523. },
  21524. "input": {
  21525. "type": "object",
  21526. "properties": {
  21527. "text": {
  21528. "type": "boolean"
  21529. },
  21530. "audio": {
  21531. "type": "boolean"
  21532. },
  21533. "image": {
  21534. "type": "boolean"
  21535. },
  21536. "video": {
  21537. "type": "boolean"
  21538. },
  21539. "pdf": {
  21540. "type": "boolean"
  21541. }
  21542. },
  21543. "required": ["text", "audio", "image", "video", "pdf"],
  21544. "additionalProperties": false
  21545. },
  21546. "output": {
  21547. "type": "object",
  21548. "properties": {
  21549. "text": {
  21550. "type": "boolean"
  21551. },
  21552. "audio": {
  21553. "type": "boolean"
  21554. },
  21555. "image": {
  21556. "type": "boolean"
  21557. },
  21558. "video": {
  21559. "type": "boolean"
  21560. },
  21561. "pdf": {
  21562. "type": "boolean"
  21563. }
  21564. },
  21565. "required": ["text", "audio", "image", "video", "pdf"],
  21566. "additionalProperties": false
  21567. },
  21568. "interleaved": {
  21569. "anyOf": [
  21570. {
  21571. "type": "boolean"
  21572. },
  21573. {
  21574. "type": "object",
  21575. "properties": {
  21576. "field": {
  21577. "type": "string",
  21578. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  21579. }
  21580. },
  21581. "required": ["field"],
  21582. "additionalProperties": false
  21583. }
  21584. ]
  21585. }
  21586. },
  21587. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  21588. "additionalProperties": false
  21589. },
  21590. "cost": {
  21591. "type": "object",
  21592. "properties": {
  21593. "input": {
  21594. "type": "number"
  21595. },
  21596. "output": {
  21597. "type": "number"
  21598. },
  21599. "cache": {
  21600. "type": "object",
  21601. "properties": {
  21602. "read": {
  21603. "type": "number"
  21604. },
  21605. "write": {
  21606. "type": "number"
  21607. }
  21608. },
  21609. "required": ["read", "write"],
  21610. "additionalProperties": false
  21611. },
  21612. "tiers": {
  21613. "type": "array",
  21614. "items": {
  21615. "type": "object",
  21616. "properties": {
  21617. "input": {
  21618. "type": "number"
  21619. },
  21620. "output": {
  21621. "type": "number"
  21622. },
  21623. "cache": {
  21624. "type": "object",
  21625. "properties": {
  21626. "read": {
  21627. "type": "number"
  21628. },
  21629. "write": {
  21630. "type": "number"
  21631. }
  21632. },
  21633. "required": ["read", "write"],
  21634. "additionalProperties": false
  21635. },
  21636. "tier": {
  21637. "type": "object",
  21638. "properties": {
  21639. "type": {
  21640. "type": "string",
  21641. "enum": ["context"]
  21642. },
  21643. "size": {
  21644. "type": "number"
  21645. }
  21646. },
  21647. "required": ["type", "size"],
  21648. "additionalProperties": false
  21649. }
  21650. },
  21651. "required": ["input", "output", "cache", "tier"],
  21652. "additionalProperties": false
  21653. }
  21654. },
  21655. "experimentalOver200K": {
  21656. "type": "object",
  21657. "properties": {
  21658. "input": {
  21659. "type": "number"
  21660. },
  21661. "output": {
  21662. "type": "number"
  21663. },
  21664. "cache": {
  21665. "type": "object",
  21666. "properties": {
  21667. "read": {
  21668. "type": "number"
  21669. },
  21670. "write": {
  21671. "type": "number"
  21672. }
  21673. },
  21674. "required": ["read", "write"],
  21675. "additionalProperties": false
  21676. }
  21677. },
  21678. "required": ["input", "output", "cache"],
  21679. "additionalProperties": false
  21680. }
  21681. },
  21682. "required": ["input", "output", "cache"],
  21683. "additionalProperties": false
  21684. },
  21685. "limit": {
  21686. "type": "object",
  21687. "properties": {
  21688. "context": {
  21689. "type": "number"
  21690. },
  21691. "input": {
  21692. "type": "number"
  21693. },
  21694. "output": {
  21695. "type": "number"
  21696. }
  21697. },
  21698. "required": ["context", "output"],
  21699. "additionalProperties": false
  21700. },
  21701. "status": {
  21702. "type": "string",
  21703. "enum": ["alpha", "beta", "deprecated", "active"]
  21704. },
  21705. "options": {
  21706. "type": "object"
  21707. },
  21708. "headers": {
  21709. "type": "object",
  21710. "additionalProperties": {
  21711. "type": "string"
  21712. }
  21713. },
  21714. "release_date": {
  21715. "type": "string"
  21716. },
  21717. "variants": {
  21718. "type": "object",
  21719. "additionalProperties": {
  21720. "type": "object"
  21721. }
  21722. }
  21723. },
  21724. "required": [
  21725. "id",
  21726. "providerID",
  21727. "api",
  21728. "name",
  21729. "capabilities",
  21730. "cost",
  21731. "limit",
  21732. "status",
  21733. "options",
  21734. "headers",
  21735. "release_date"
  21736. ],
  21737. "additionalProperties": false
  21738. },
  21739. "Provider": {
  21740. "type": "object",
  21741. "properties": {
  21742. "id": {
  21743. "type": "string"
  21744. },
  21745. "name": {
  21746. "type": "string"
  21747. },
  21748. "source": {
  21749. "type": "string",
  21750. "enum": ["env", "config", "custom", "api"]
  21751. },
  21752. "env": {
  21753. "type": "array",
  21754. "items": {
  21755. "type": "string"
  21756. }
  21757. },
  21758. "key": {
  21759. "type": "string"
  21760. },
  21761. "options": {
  21762. "type": "object"
  21763. },
  21764. "models": {
  21765. "type": "object",
  21766. "additionalProperties": {
  21767. "$ref": "#/components/schemas/Model"
  21768. }
  21769. }
  21770. },
  21771. "required": ["id", "name", "source", "env", "options", "models"],
  21772. "additionalProperties": false
  21773. },
  21774. "ExperimentalCapabilities": {
  21775. "type": "object",
  21776. "properties": {
  21777. "backgroundSubagents": {
  21778. "type": "boolean"
  21779. }
  21780. },
  21781. "required": ["backgroundSubagents"],
  21782. "additionalProperties": false
  21783. },
  21784. "ConsoleState": {
  21785. "type": "object",
  21786. "properties": {
  21787. "consoleManagedProviders": {
  21788. "type": "array",
  21789. "items": {
  21790. "type": "string"
  21791. }
  21792. },
  21793. "activeOrgName": {
  21794. "type": "string"
  21795. },
  21796. "switchableOrgCount": {
  21797. "type": "integer",
  21798. "minimum": 0
  21799. }
  21800. },
  21801. "required": ["consoleManagedProviders", "switchableOrgCount"],
  21802. "additionalProperties": false
  21803. },
  21804. "effect_HttpApiError_InternalServerError": {
  21805. "type": "object",
  21806. "properties": {
  21807. "_tag": {
  21808. "type": "string",
  21809. "enum": ["InternalServerError"]
  21810. }
  21811. },
  21812. "required": ["_tag"],
  21813. "additionalProperties": false
  21814. },
  21815. "ToolListItem": {
  21816. "type": "object",
  21817. "properties": {
  21818. "id": {
  21819. "type": "string"
  21820. },
  21821. "description": {
  21822. "type": "string"
  21823. },
  21824. "parameters": {}
  21825. },
  21826. "required": ["id", "description", "parameters"],
  21827. "additionalProperties": false
  21828. },
  21829. "ToolList": {
  21830. "type": "array",
  21831. "items": {
  21832. "$ref": "#/components/schemas/ToolListItem"
  21833. }
  21834. },
  21835. "ToolIDs": {
  21836. "type": "array",
  21837. "items": {
  21838. "type": "string"
  21839. }
  21840. },
  21841. "WorktreeError": {
  21842. "type": "object",
  21843. "properties": {
  21844. "name": {
  21845. "type": "string",
  21846. "enum": [
  21847. "WorktreeNotGitError",
  21848. "WorktreeNameGenerationFailedError",
  21849. "WorktreeCreateFailedError",
  21850. "WorktreeStartCommandFailedError",
  21851. "WorktreeRemoveFailedError",
  21852. "WorktreeResetFailedError",
  21853. "WorktreeListFailedError"
  21854. ]
  21855. },
  21856. "data": {
  21857. "type": "object",
  21858. "properties": {
  21859. "message": {
  21860. "type": "string"
  21861. }
  21862. },
  21863. "required": ["message"],
  21864. "additionalProperties": false
  21865. }
  21866. },
  21867. "required": ["name", "data"],
  21868. "additionalProperties": false
  21869. },
  21870. "WorktreeCreateInput": {
  21871. "type": "object",
  21872. "properties": {
  21873. "name": {
  21874. "type": "string"
  21875. },
  21876. "startCommand": {
  21877. "type": "string",
  21878. "description": "Additional startup script to run after the project's start command"
  21879. }
  21880. },
  21881. "additionalProperties": false
  21882. },
  21883. "Worktree": {
  21884. "type": "object",
  21885. "properties": {
  21886. "name": {
  21887. "type": "string"
  21888. },
  21889. "branch": {
  21890. "type": "string"
  21891. },
  21892. "directory": {
  21893. "type": "string"
  21894. }
  21895. },
  21896. "required": ["name", "directory"],
  21897. "additionalProperties": false
  21898. },
  21899. "WorktreeRemoveInput": {
  21900. "type": "object",
  21901. "properties": {
  21902. "directory": {
  21903. "type": "string"
  21904. }
  21905. },
  21906. "required": ["directory"],
  21907. "additionalProperties": false
  21908. },
  21909. "WorktreeResetInput": {
  21910. "type": "object",
  21911. "properties": {
  21912. "directory": {
  21913. "type": "string"
  21914. }
  21915. },
  21916. "required": ["directory"],
  21917. "additionalProperties": false
  21918. },
  21919. "ProjectSummary": {
  21920. "type": "object",
  21921. "properties": {
  21922. "id": {
  21923. "type": "string"
  21924. },
  21925. "name": {
  21926. "type": "string"
  21927. },
  21928. "worktree": {
  21929. "type": "string"
  21930. }
  21931. },
  21932. "required": ["id", "worktree"],
  21933. "additionalProperties": false
  21934. },
  21935. "GlobalSession": {
  21936. "type": "object",
  21937. "properties": {
  21938. "id": {
  21939. "type": "string",
  21940. "pattern": "^ses"
  21941. },
  21942. "slug": {
  21943. "type": "string"
  21944. },
  21945. "projectID": {
  21946. "type": "string"
  21947. },
  21948. "workspaceID": {
  21949. "type": "string",
  21950. "pattern": "^wrk"
  21951. },
  21952. "directory": {
  21953. "type": "string"
  21954. },
  21955. "path": {
  21956. "type": "string"
  21957. },
  21958. "parentID": {
  21959. "type": "string",
  21960. "pattern": "^ses"
  21961. },
  21962. "summary": {
  21963. "type": "object",
  21964. "properties": {
  21965. "additions": {
  21966. "type": "number"
  21967. },
  21968. "deletions": {
  21969. "type": "number"
  21970. },
  21971. "files": {
  21972. "type": "number"
  21973. },
  21974. "diffs": {
  21975. "type": "array",
  21976. "items": {
  21977. "$ref": "#/components/schemas/SnapshotFileDiff"
  21978. }
  21979. }
  21980. },
  21981. "required": ["additions", "deletions", "files"],
  21982. "additionalProperties": false
  21983. },
  21984. "cost": {
  21985. "type": "number"
  21986. },
  21987. "tokens": {
  21988. "type": "object",
  21989. "properties": {
  21990. "input": {
  21991. "type": "number"
  21992. },
  21993. "output": {
  21994. "type": "number"
  21995. },
  21996. "reasoning": {
  21997. "type": "number"
  21998. },
  21999. "cache": {
  22000. "type": "object",
  22001. "properties": {
  22002. "read": {
  22003. "type": "number"
  22004. },
  22005. "write": {
  22006. "type": "number"
  22007. }
  22008. },
  22009. "required": ["read", "write"],
  22010. "additionalProperties": false
  22011. }
  22012. },
  22013. "required": ["input", "output", "reasoning", "cache"],
  22014. "additionalProperties": false
  22015. },
  22016. "share": {
  22017. "type": "object",
  22018. "properties": {
  22019. "url": {
  22020. "type": "string"
  22021. }
  22022. },
  22023. "required": ["url"],
  22024. "additionalProperties": false
  22025. },
  22026. "title": {
  22027. "type": "string"
  22028. },
  22029. "agent": {
  22030. "type": "string"
  22031. },
  22032. "model": {
  22033. "type": "object",
  22034. "properties": {
  22035. "id": {
  22036. "type": "string"
  22037. },
  22038. "providerID": {
  22039. "type": "string"
  22040. },
  22041. "variant": {
  22042. "type": "string"
  22043. }
  22044. },
  22045. "required": ["id", "providerID"],
  22046. "additionalProperties": false
  22047. },
  22048. "version": {
  22049. "type": "string"
  22050. },
  22051. "metadata": {
  22052. "type": "object"
  22053. },
  22054. "time": {
  22055. "type": "object",
  22056. "properties": {
  22057. "created": {
  22058. "type": "integer",
  22059. "minimum": 0
  22060. },
  22061. "updated": {
  22062. "type": "integer",
  22063. "minimum": 0
  22064. },
  22065. "compacting": {
  22066. "type": "integer",
  22067. "minimum": 0
  22068. },
  22069. "archived": {
  22070. "type": "number"
  22071. }
  22072. },
  22073. "required": ["created", "updated"],
  22074. "additionalProperties": false
  22075. },
  22076. "permission": {
  22077. "$ref": "#/components/schemas/PermissionRuleset"
  22078. },
  22079. "revert": {
  22080. "type": "object",
  22081. "properties": {
  22082. "messageID": {
  22083. "type": "string",
  22084. "pattern": "^msg"
  22085. },
  22086. "partID": {
  22087. "type": "string",
  22088. "pattern": "^prt"
  22089. },
  22090. "snapshot": {
  22091. "type": "string"
  22092. },
  22093. "diff": {
  22094. "type": "string"
  22095. }
  22096. },
  22097. "required": ["messageID"],
  22098. "additionalProperties": false
  22099. },
  22100. "project": {
  22101. "anyOf": [
  22102. {
  22103. "$ref": "#/components/schemas/ProjectSummary"
  22104. },
  22105. {
  22106. "type": "null"
  22107. }
  22108. ]
  22109. }
  22110. },
  22111. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  22112. "additionalProperties": false
  22113. },
  22114. "McpResource": {
  22115. "type": "object",
  22116. "properties": {
  22117. "name": {
  22118. "type": "string"
  22119. },
  22120. "uri": {
  22121. "type": "string"
  22122. },
  22123. "description": {
  22124. "type": "string"
  22125. },
  22126. "mimeType": {
  22127. "type": "string"
  22128. },
  22129. "client": {
  22130. "type": "string"
  22131. }
  22132. },
  22133. "required": ["name", "uri", "client"],
  22134. "additionalProperties": false
  22135. },
  22136. "Symbol": {
  22137. "type": "object",
  22138. "properties": {
  22139. "name": {
  22140. "type": "string"
  22141. },
  22142. "kind": {
  22143. "type": "integer",
  22144. "minimum": 0
  22145. },
  22146. "location": {
  22147. "type": "object",
  22148. "properties": {
  22149. "uri": {
  22150. "type": "string"
  22151. },
  22152. "range": {
  22153. "$ref": "#/components/schemas/Range"
  22154. }
  22155. },
  22156. "required": ["uri", "range"],
  22157. "additionalProperties": false
  22158. }
  22159. },
  22160. "required": ["name", "kind", "location"],
  22161. "additionalProperties": false
  22162. },
  22163. "FileNode": {
  22164. "type": "object",
  22165. "properties": {
  22166. "name": {
  22167. "type": "string"
  22168. },
  22169. "path": {
  22170. "type": "string"
  22171. },
  22172. "absolute": {
  22173. "type": "string"
  22174. },
  22175. "type": {
  22176. "type": "string",
  22177. "enum": ["file", "directory"]
  22178. },
  22179. "ignored": {
  22180. "type": "boolean"
  22181. }
  22182. },
  22183. "required": ["name", "path", "absolute", "type", "ignored"],
  22184. "additionalProperties": false
  22185. },
  22186. "FileContent": {
  22187. "type": "object",
  22188. "properties": {
  22189. "type": {
  22190. "type": "string",
  22191. "enum": ["text", "binary"]
  22192. },
  22193. "content": {
  22194. "type": "string"
  22195. },
  22196. "diff": {
  22197. "type": "string"
  22198. },
  22199. "patch": {
  22200. "type": "object",
  22201. "properties": {
  22202. "oldFileName": {
  22203. "type": "string"
  22204. },
  22205. "newFileName": {
  22206. "type": "string"
  22207. },
  22208. "oldHeader": {
  22209. "type": "string"
  22210. },
  22211. "newHeader": {
  22212. "type": "string"
  22213. },
  22214. "hunks": {
  22215. "type": "array",
  22216. "items": {
  22217. "type": "object",
  22218. "properties": {
  22219. "oldStart": {
  22220. "type": "integer",
  22221. "minimum": 0
  22222. },
  22223. "oldLines": {
  22224. "type": "integer",
  22225. "minimum": 0
  22226. },
  22227. "newStart": {
  22228. "type": "integer",
  22229. "minimum": 0
  22230. },
  22231. "newLines": {
  22232. "type": "integer",
  22233. "minimum": 0
  22234. },
  22235. "lines": {
  22236. "type": "array",
  22237. "items": {
  22238. "type": "string"
  22239. }
  22240. }
  22241. },
  22242. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  22243. "additionalProperties": false
  22244. }
  22245. },
  22246. "index": {
  22247. "type": "string"
  22248. }
  22249. },
  22250. "required": ["oldFileName", "newFileName", "hunks"],
  22251. "additionalProperties": false
  22252. },
  22253. "encoding": {
  22254. "type": "string",
  22255. "enum": ["base64"]
  22256. },
  22257. "mimeType": {
  22258. "type": "string"
  22259. }
  22260. },
  22261. "required": ["type", "content"],
  22262. "additionalProperties": false
  22263. },
  22264. "File": {
  22265. "type": "object",
  22266. "properties": {
  22267. "path": {
  22268. "type": "string"
  22269. },
  22270. "added": {
  22271. "type": "integer",
  22272. "minimum": 0
  22273. },
  22274. "removed": {
  22275. "type": "integer",
  22276. "minimum": 0
  22277. },
  22278. "status": {
  22279. "type": "string",
  22280. "enum": ["added", "deleted", "modified"]
  22281. }
  22282. },
  22283. "required": ["path", "added", "removed", "status"],
  22284. "additionalProperties": false
  22285. },
  22286. "Path": {
  22287. "type": "object",
  22288. "properties": {
  22289. "home": {
  22290. "type": "string"
  22291. },
  22292. "state": {
  22293. "type": "string"
  22294. },
  22295. "config": {
  22296. "type": "string"
  22297. },
  22298. "worktree": {
  22299. "type": "string"
  22300. },
  22301. "directory": {
  22302. "type": "string"
  22303. }
  22304. },
  22305. "required": ["home", "state", "config", "worktree", "directory"],
  22306. "additionalProperties": false
  22307. },
  22308. "VcsInfo": {
  22309. "type": "object",
  22310. "properties": {
  22311. "branch": {
  22312. "type": "string"
  22313. },
  22314. "default_branch": {
  22315. "type": "string"
  22316. }
  22317. },
  22318. "additionalProperties": false
  22319. },
  22320. "VcsFileStatus": {
  22321. "type": "object",
  22322. "properties": {
  22323. "file": {
  22324. "type": "string"
  22325. },
  22326. "additions": {
  22327. "type": "number"
  22328. },
  22329. "deletions": {
  22330. "type": "number"
  22331. },
  22332. "status": {
  22333. "type": "string",
  22334. "enum": ["added", "deleted", "modified"]
  22335. }
  22336. },
  22337. "required": ["file", "additions", "deletions", "status"],
  22338. "additionalProperties": false
  22339. },
  22340. "VcsFileDiff": {
  22341. "type": "object",
  22342. "properties": {
  22343. "file": {
  22344. "type": "string"
  22345. },
  22346. "patch": {
  22347. "type": "string"
  22348. },
  22349. "additions": {
  22350. "type": "number"
  22351. },
  22352. "deletions": {
  22353. "type": "number"
  22354. },
  22355. "status": {
  22356. "type": "string",
  22357. "enum": ["added", "deleted", "modified"]
  22358. }
  22359. },
  22360. "required": ["file", "additions", "deletions"],
  22361. "additionalProperties": false
  22362. },
  22363. "VcsApplyError": {
  22364. "type": "object",
  22365. "properties": {
  22366. "name": {
  22367. "type": "string",
  22368. "enum": ["VcsApplyError"]
  22369. },
  22370. "data": {
  22371. "type": "object",
  22372. "properties": {
  22373. "message": {
  22374. "type": "string"
  22375. },
  22376. "reason": {
  22377. "type": "string",
  22378. "enum": ["non-git", "not-clean"]
  22379. }
  22380. },
  22381. "required": ["message", "reason"],
  22382. "additionalProperties": false
  22383. }
  22384. },
  22385. "required": ["name", "data"],
  22386. "additionalProperties": false
  22387. },
  22388. "Command": {
  22389. "type": "object",
  22390. "properties": {
  22391. "name": {
  22392. "type": "string"
  22393. },
  22394. "description": {
  22395. "type": "string"
  22396. },
  22397. "agent": {
  22398. "type": "string"
  22399. },
  22400. "model": {
  22401. "type": "string"
  22402. },
  22403. "source": {
  22404. "type": "string",
  22405. "enum": ["command", "mcp", "skill"]
  22406. },
  22407. "template": {
  22408. "type": "string"
  22409. },
  22410. "subtask": {
  22411. "type": "boolean"
  22412. },
  22413. "hints": {
  22414. "type": "array",
  22415. "items": {
  22416. "type": "string"
  22417. }
  22418. }
  22419. },
  22420. "required": ["name", "template", "hints"],
  22421. "additionalProperties": false
  22422. },
  22423. "Agent": {
  22424. "type": "object",
  22425. "properties": {
  22426. "name": {
  22427. "type": "string"
  22428. },
  22429. "description": {
  22430. "type": "string"
  22431. },
  22432. "mode": {
  22433. "type": "string",
  22434. "enum": ["subagent", "primary", "all"]
  22435. },
  22436. "native": {
  22437. "type": "boolean"
  22438. },
  22439. "hidden": {
  22440. "type": "boolean"
  22441. },
  22442. "topP": {
  22443. "type": "number"
  22444. },
  22445. "temperature": {
  22446. "type": "number"
  22447. },
  22448. "color": {
  22449. "type": "string"
  22450. },
  22451. "permission": {
  22452. "$ref": "#/components/schemas/PermissionRuleset"
  22453. },
  22454. "model": {
  22455. "type": "object",
  22456. "properties": {
  22457. "modelID": {
  22458. "type": "string"
  22459. },
  22460. "providerID": {
  22461. "type": "string"
  22462. }
  22463. },
  22464. "required": ["modelID", "providerID"],
  22465. "additionalProperties": false
  22466. },
  22467. "variant": {
  22468. "type": "string"
  22469. },
  22470. "prompt": {
  22471. "type": "string"
  22472. },
  22473. "options": {
  22474. "type": "object"
  22475. },
  22476. "steps": {
  22477. "type": "number"
  22478. }
  22479. },
  22480. "required": ["name", "mode", "permission", "options"],
  22481. "additionalProperties": false
  22482. },
  22483. "LSPStatus": {
  22484. "type": "object",
  22485. "properties": {
  22486. "id": {
  22487. "type": "string"
  22488. },
  22489. "name": {
  22490. "type": "string"
  22491. },
  22492. "root": {
  22493. "type": "string"
  22494. },
  22495. "status": {
  22496. "type": "string",
  22497. "enum": ["connected", "error"]
  22498. }
  22499. },
  22500. "required": ["id", "name", "root", "status"],
  22501. "additionalProperties": false
  22502. },
  22503. "FormatterStatus": {
  22504. "type": "object",
  22505. "properties": {
  22506. "name": {
  22507. "type": "string"
  22508. },
  22509. "extensions": {
  22510. "type": "array",
  22511. "items": {
  22512. "type": "string"
  22513. }
  22514. },
  22515. "enabled": {
  22516. "type": "boolean"
  22517. }
  22518. },
  22519. "required": ["name", "extensions", "enabled"],
  22520. "additionalProperties": false
  22521. },
  22522. "MCPStatusConnected": {
  22523. "type": "object",
  22524. "properties": {
  22525. "status": {
  22526. "type": "string",
  22527. "enum": ["connected"]
  22528. }
  22529. },
  22530. "required": ["status"],
  22531. "additionalProperties": false
  22532. },
  22533. "MCPStatusDisabled": {
  22534. "type": "object",
  22535. "properties": {
  22536. "status": {
  22537. "type": "string",
  22538. "enum": ["disabled"]
  22539. }
  22540. },
  22541. "required": ["status"],
  22542. "additionalProperties": false
  22543. },
  22544. "MCPStatusFailed": {
  22545. "type": "object",
  22546. "properties": {
  22547. "status": {
  22548. "type": "string",
  22549. "enum": ["failed"]
  22550. },
  22551. "error": {
  22552. "type": "string"
  22553. }
  22554. },
  22555. "required": ["status", "error"],
  22556. "additionalProperties": false
  22557. },
  22558. "MCPStatusNeedsAuth": {
  22559. "type": "object",
  22560. "properties": {
  22561. "status": {
  22562. "type": "string",
  22563. "enum": ["needs_auth"]
  22564. }
  22565. },
  22566. "required": ["status"],
  22567. "additionalProperties": false
  22568. },
  22569. "MCPStatusNeedsClientRegistration": {
  22570. "type": "object",
  22571. "properties": {
  22572. "status": {
  22573. "type": "string",
  22574. "enum": ["needs_client_registration"]
  22575. },
  22576. "error": {
  22577. "type": "string"
  22578. }
  22579. },
  22580. "required": ["status", "error"],
  22581. "additionalProperties": false
  22582. },
  22583. "MCPStatus": {
  22584. "anyOf": [
  22585. {
  22586. "$ref": "#/components/schemas/MCPStatusConnected"
  22587. },
  22588. {
  22589. "$ref": "#/components/schemas/MCPStatusDisabled"
  22590. },
  22591. {
  22592. "$ref": "#/components/schemas/MCPStatusFailed"
  22593. },
  22594. {
  22595. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  22596. },
  22597. {
  22598. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  22599. }
  22600. ]
  22601. },
  22602. "McpUnsupportedOAuthError": {
  22603. "type": "object",
  22604. "properties": {
  22605. "error": {
  22606. "type": "string"
  22607. }
  22608. },
  22609. "required": ["error"],
  22610. "additionalProperties": false
  22611. },
  22612. "McpServerNotFoundError": {
  22613. "type": "object",
  22614. "properties": {
  22615. "_tag": {
  22616. "type": "string",
  22617. "enum": ["McpServerNotFoundError"]
  22618. },
  22619. "name": {
  22620. "type": "string"
  22621. },
  22622. "message": {
  22623. "type": "string"
  22624. }
  22625. },
  22626. "required": ["_tag", "name", "message"],
  22627. "additionalProperties": false
  22628. },
  22629. "Project": {
  22630. "type": "object",
  22631. "properties": {
  22632. "id": {
  22633. "type": "string"
  22634. },
  22635. "worktree": {
  22636. "type": "string"
  22637. },
  22638. "vcs": {
  22639. "$ref": "#/components/schemas/ProjectVcs"
  22640. },
  22641. "name": {
  22642. "type": "string"
  22643. },
  22644. "icon": {
  22645. "$ref": "#/components/schemas/ProjectIcon"
  22646. },
  22647. "commands": {
  22648. "$ref": "#/components/schemas/ProjectCommands"
  22649. },
  22650. "time": {
  22651. "$ref": "#/components/schemas/ProjectTime"
  22652. },
  22653. "sandboxes": {
  22654. "type": "array",
  22655. "items": {
  22656. "type": "string"
  22657. }
  22658. }
  22659. },
  22660. "required": ["id", "worktree", "time", "sandboxes"],
  22661. "additionalProperties": false
  22662. },
  22663. "ProjectNotFoundError": {
  22664. "type": "object",
  22665. "properties": {
  22666. "_tag": {
  22667. "type": "string",
  22668. "enum": ["ProjectNotFoundError"]
  22669. },
  22670. "projectID": {
  22671. "type": "string"
  22672. },
  22673. "message": {
  22674. "type": "string"
  22675. }
  22676. },
  22677. "required": ["_tag", "projectID", "message"],
  22678. "additionalProperties": false
  22679. },
  22680. "PtyNotFoundError": {
  22681. "type": "object",
  22682. "properties": {
  22683. "_tag": {
  22684. "type": "string",
  22685. "enum": ["PtyNotFoundError"]
  22686. },
  22687. "ptyID": {
  22688. "type": "string"
  22689. },
  22690. "message": {
  22691. "type": "string"
  22692. }
  22693. },
  22694. "required": ["_tag", "ptyID", "message"],
  22695. "additionalProperties": false
  22696. },
  22697. "PtyForbiddenError": {
  22698. "type": "object",
  22699. "properties": {
  22700. "_tag": {
  22701. "type": "string",
  22702. "enum": ["PtyForbiddenError"]
  22703. },
  22704. "message": {
  22705. "type": "string"
  22706. }
  22707. },
  22708. "required": ["_tag", "message"],
  22709. "additionalProperties": false
  22710. },
  22711. "QuestionRequest": {
  22712. "type": "object",
  22713. "properties": {
  22714. "id": {
  22715. "type": "string",
  22716. "pattern": "^que"
  22717. },
  22718. "sessionID": {
  22719. "type": "string",
  22720. "pattern": "^ses"
  22721. },
  22722. "questions": {
  22723. "type": "array",
  22724. "items": {
  22725. "$ref": "#/components/schemas/QuestionInfo"
  22726. },
  22727. "description": "Questions to ask"
  22728. },
  22729. "tool": {
  22730. "$ref": "#/components/schemas/QuestionTool"
  22731. }
  22732. },
  22733. "required": ["id", "sessionID", "questions"],
  22734. "additionalProperties": false
  22735. },
  22736. "QuestionNotFoundError": {
  22737. "type": "object",
  22738. "properties": {
  22739. "_tag": {
  22740. "type": "string",
  22741. "enum": ["QuestionNotFoundError"]
  22742. },
  22743. "requestID": {
  22744. "type": "string"
  22745. },
  22746. "message": {
  22747. "type": "string"
  22748. }
  22749. },
  22750. "required": ["_tag", "requestID", "message"],
  22751. "additionalProperties": false
  22752. },
  22753. "PermissionRequest": {
  22754. "type": "object",
  22755. "properties": {
  22756. "id": {
  22757. "type": "string",
  22758. "pattern": "^per"
  22759. },
  22760. "sessionID": {
  22761. "type": "string",
  22762. "pattern": "^ses"
  22763. },
  22764. "permission": {
  22765. "type": "string"
  22766. },
  22767. "patterns": {
  22768. "type": "array",
  22769. "items": {
  22770. "type": "string"
  22771. }
  22772. },
  22773. "metadata": {
  22774. "type": "object"
  22775. },
  22776. "always": {
  22777. "type": "array",
  22778. "items": {
  22779. "type": "string"
  22780. }
  22781. },
  22782. "tool": {
  22783. "type": "object",
  22784. "properties": {
  22785. "messageID": {
  22786. "type": "string"
  22787. },
  22788. "callID": {
  22789. "type": "string"
  22790. }
  22791. },
  22792. "required": ["messageID", "callID"],
  22793. "additionalProperties": false
  22794. }
  22795. },
  22796. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  22797. "additionalProperties": false
  22798. },
  22799. "PermissionNotFoundError": {
  22800. "type": "object",
  22801. "properties": {
  22802. "_tag": {
  22803. "type": "string",
  22804. "enum": ["PermissionNotFoundError"]
  22805. },
  22806. "requestID": {
  22807. "type": "string"
  22808. },
  22809. "message": {
  22810. "type": "string"
  22811. }
  22812. },
  22813. "required": ["_tag", "requestID", "message"],
  22814. "additionalProperties": false
  22815. },
  22816. "ProviderAuthMethod": {
  22817. "type": "object",
  22818. "properties": {
  22819. "type": {
  22820. "type": "string",
  22821. "enum": ["oauth", "api"]
  22822. },
  22823. "label": {
  22824. "type": "string"
  22825. },
  22826. "prompts": {
  22827. "type": "array",
  22828. "items": {
  22829. "anyOf": [
  22830. {
  22831. "type": "object",
  22832. "properties": {
  22833. "type": {
  22834. "type": "string",
  22835. "enum": ["text"]
  22836. },
  22837. "key": {
  22838. "type": "string"
  22839. },
  22840. "message": {
  22841. "type": "string"
  22842. },
  22843. "placeholder": {
  22844. "type": "string"
  22845. },
  22846. "when": {
  22847. "type": "object",
  22848. "properties": {
  22849. "key": {
  22850. "type": "string"
  22851. },
  22852. "op": {
  22853. "type": "string",
  22854. "enum": ["eq", "neq"]
  22855. },
  22856. "value": {
  22857. "type": "string"
  22858. }
  22859. },
  22860. "required": ["key", "op", "value"],
  22861. "additionalProperties": false
  22862. }
  22863. },
  22864. "required": ["type", "key", "message"],
  22865. "additionalProperties": false
  22866. },
  22867. {
  22868. "type": "object",
  22869. "properties": {
  22870. "type": {
  22871. "type": "string",
  22872. "enum": ["select"]
  22873. },
  22874. "key": {
  22875. "type": "string"
  22876. },
  22877. "message": {
  22878. "type": "string"
  22879. },
  22880. "options": {
  22881. "type": "array",
  22882. "items": {
  22883. "type": "object",
  22884. "properties": {
  22885. "label": {
  22886. "type": "string"
  22887. },
  22888. "value": {
  22889. "type": "string"
  22890. },
  22891. "hint": {
  22892. "type": "string"
  22893. }
  22894. },
  22895. "required": ["label", "value"],
  22896. "additionalProperties": false
  22897. }
  22898. },
  22899. "when": {
  22900. "type": "object",
  22901. "properties": {
  22902. "key": {
  22903. "type": "string"
  22904. },
  22905. "op": {
  22906. "type": "string",
  22907. "enum": ["eq", "neq"]
  22908. },
  22909. "value": {
  22910. "type": "string"
  22911. }
  22912. },
  22913. "required": ["key", "op", "value"],
  22914. "additionalProperties": false
  22915. }
  22916. },
  22917. "required": ["type", "key", "message", "options"],
  22918. "additionalProperties": false
  22919. }
  22920. ]
  22921. }
  22922. }
  22923. },
  22924. "required": ["type", "label"],
  22925. "additionalProperties": false
  22926. },
  22927. "ProviderAuthAuthorization": {
  22928. "type": "object",
  22929. "properties": {
  22930. "url": {
  22931. "type": "string"
  22932. },
  22933. "method": {
  22934. "type": "string",
  22935. "enum": ["auto", "code"]
  22936. },
  22937. "instructions": {
  22938. "type": "string"
  22939. }
  22940. },
  22941. "required": ["url", "method", "instructions"],
  22942. "additionalProperties": false
  22943. },
  22944. "ProviderAuthError1": {
  22945. "type": "object",
  22946. "properties": {
  22947. "name": {
  22948. "type": "string",
  22949. "enum": [
  22950. "BadRequest",
  22951. "ProviderAuthOauthMissing",
  22952. "ProviderAuthOauthCodeMissing",
  22953. "ProviderAuthOauthCallbackFailed",
  22954. "ProviderAuthValidationFailed"
  22955. ]
  22956. },
  22957. "data": {
  22958. "type": "object",
  22959. "properties": {
  22960. "providerID": {
  22961. "type": "string"
  22962. },
  22963. "field": {
  22964. "type": "string"
  22965. },
  22966. "message": {
  22967. "type": "string"
  22968. },
  22969. "kind": {
  22970. "type": "string"
  22971. }
  22972. },
  22973. "additionalProperties": false
  22974. }
  22975. },
  22976. "required": ["name", "data"],
  22977. "additionalProperties": false
  22978. },
  22979. "NotFoundError": {
  22980. "type": "object",
  22981. "required": ["name", "data"],
  22982. "properties": {
  22983. "name": {
  22984. "type": "string",
  22985. "enum": ["NotFoundError"]
  22986. },
  22987. "data": {
  22988. "type": "object",
  22989. "required": ["message"],
  22990. "properties": {
  22991. "message": {
  22992. "type": "string"
  22993. }
  22994. }
  22995. }
  22996. }
  22997. },
  22998. "TextPartInput": {
  22999. "type": "object",
  23000. "properties": {
  23001. "id": {
  23002. "type": "string",
  23003. "pattern": "^prt"
  23004. },
  23005. "type": {
  23006. "type": "string",
  23007. "enum": ["text"]
  23008. },
  23009. "text": {
  23010. "type": "string"
  23011. },
  23012. "synthetic": {
  23013. "type": "boolean"
  23014. },
  23015. "ignored": {
  23016. "type": "boolean"
  23017. },
  23018. "time": {
  23019. "type": "object",
  23020. "properties": {
  23021. "start": {
  23022. "type": "integer",
  23023. "minimum": 0
  23024. },
  23025. "end": {
  23026. "type": "integer",
  23027. "minimum": 0
  23028. }
  23029. },
  23030. "required": ["start"],
  23031. "additionalProperties": false
  23032. },
  23033. "metadata": {
  23034. "type": "object"
  23035. }
  23036. },
  23037. "required": ["type", "text"],
  23038. "additionalProperties": false
  23039. },
  23040. "FilePartInput": {
  23041. "type": "object",
  23042. "properties": {
  23043. "id": {
  23044. "type": "string",
  23045. "pattern": "^prt"
  23046. },
  23047. "type": {
  23048. "type": "string",
  23049. "enum": ["file"]
  23050. },
  23051. "mime": {
  23052. "type": "string"
  23053. },
  23054. "filename": {
  23055. "type": "string"
  23056. },
  23057. "url": {
  23058. "type": "string"
  23059. },
  23060. "source": {
  23061. "$ref": "#/components/schemas/FilePartSource"
  23062. }
  23063. },
  23064. "required": ["type", "mime", "url"],
  23065. "additionalProperties": false
  23066. },
  23067. "AgentPartInput": {
  23068. "type": "object",
  23069. "properties": {
  23070. "id": {
  23071. "type": "string",
  23072. "pattern": "^prt"
  23073. },
  23074. "type": {
  23075. "type": "string",
  23076. "enum": ["agent"]
  23077. },
  23078. "name": {
  23079. "type": "string"
  23080. },
  23081. "source": {
  23082. "type": "object",
  23083. "properties": {
  23084. "value": {
  23085. "type": "string"
  23086. },
  23087. "start": {
  23088. "type": "integer",
  23089. "minimum": 0
  23090. },
  23091. "end": {
  23092. "type": "integer",
  23093. "minimum": 0
  23094. }
  23095. },
  23096. "required": ["value", "start", "end"],
  23097. "additionalProperties": false
  23098. }
  23099. },
  23100. "required": ["type", "name"],
  23101. "additionalProperties": false
  23102. },
  23103. "SubtaskPartInput": {
  23104. "type": "object",
  23105. "properties": {
  23106. "id": {
  23107. "type": "string",
  23108. "pattern": "^prt"
  23109. },
  23110. "type": {
  23111. "type": "string",
  23112. "enum": ["subtask"]
  23113. },
  23114. "prompt": {
  23115. "type": "string"
  23116. },
  23117. "description": {
  23118. "type": "string"
  23119. },
  23120. "agent": {
  23121. "type": "string"
  23122. },
  23123. "model": {
  23124. "type": "object",
  23125. "properties": {
  23126. "providerID": {
  23127. "type": "string"
  23128. },
  23129. "modelID": {
  23130. "type": "string"
  23131. }
  23132. },
  23133. "required": ["providerID", "modelID"],
  23134. "additionalProperties": false
  23135. },
  23136. "command": {
  23137. "type": "string"
  23138. }
  23139. },
  23140. "required": ["type", "prompt", "description", "agent"],
  23141. "additionalProperties": false
  23142. },
  23143. "SessionBusyError": {
  23144. "type": "object",
  23145. "properties": {
  23146. "_tag": {
  23147. "type": "string",
  23148. "enum": ["SessionBusyError"]
  23149. },
  23150. "sessionID": {
  23151. "type": "string"
  23152. },
  23153. "message": {
  23154. "type": "string"
  23155. }
  23156. },
  23157. "required": ["_tag", "sessionID", "message"],
  23158. "additionalProperties": false
  23159. },
  23160. "EventTuiPromptAppend": {
  23161. "type": "object",
  23162. "properties": {
  23163. "type": {
  23164. "type": "string",
  23165. "enum": ["tui.prompt.append"]
  23166. },
  23167. "properties": {
  23168. "type": "object",
  23169. "properties": {
  23170. "text": {
  23171. "type": "string"
  23172. }
  23173. },
  23174. "required": ["text"],
  23175. "additionalProperties": false
  23176. }
  23177. },
  23178. "required": ["type", "properties"],
  23179. "additionalProperties": false
  23180. },
  23181. "EventTuiCommandExecute": {
  23182. "type": "object",
  23183. "properties": {
  23184. "type": {
  23185. "type": "string",
  23186. "enum": ["tui.command.execute"]
  23187. },
  23188. "properties": {
  23189. "type": "object",
  23190. "properties": {
  23191. "command": {
  23192. "anyOf": [
  23193. {
  23194. "type": "string",
  23195. "enum": [
  23196. "session.list",
  23197. "session.new",
  23198. "session.share",
  23199. "session.interrupt",
  23200. "session.compact",
  23201. "session.page.up",
  23202. "session.page.down",
  23203. "session.line.up",
  23204. "session.line.down",
  23205. "session.half.page.up",
  23206. "session.half.page.down",
  23207. "session.first",
  23208. "session.last",
  23209. "prompt.clear",
  23210. "prompt.submit",
  23211. "agent.cycle"
  23212. ]
  23213. },
  23214. {
  23215. "type": "string"
  23216. }
  23217. ]
  23218. }
  23219. },
  23220. "required": ["command"],
  23221. "additionalProperties": false
  23222. }
  23223. },
  23224. "required": ["type", "properties"],
  23225. "additionalProperties": false
  23226. },
  23227. "EventTuiToastShow": {
  23228. "type": "object",
  23229. "properties": {
  23230. "type": {
  23231. "type": "string",
  23232. "enum": ["tui.toast.show"]
  23233. },
  23234. "properties": {
  23235. "type": "object",
  23236. "properties": {
  23237. "title": {
  23238. "type": "string"
  23239. },
  23240. "message": {
  23241. "type": "string"
  23242. },
  23243. "variant": {
  23244. "type": "string",
  23245. "enum": ["info", "success", "warning", "error"]
  23246. },
  23247. "duration": {
  23248. "type": "integer",
  23249. "exclusiveMinimum": 0
  23250. }
  23251. },
  23252. "required": ["message", "variant"],
  23253. "additionalProperties": false
  23254. }
  23255. },
  23256. "required": ["type", "properties"],
  23257. "additionalProperties": false
  23258. },
  23259. "EventTuiSessionSelect": {
  23260. "type": "object",
  23261. "properties": {
  23262. "type": {
  23263. "type": "string",
  23264. "enum": ["tui.session.select"]
  23265. },
  23266. "properties": {
  23267. "type": "object",
  23268. "properties": {
  23269. "sessionID": {
  23270. "type": "string",
  23271. "pattern": "^ses",
  23272. "description": "Session ID to navigate to"
  23273. }
  23274. },
  23275. "required": ["sessionID"],
  23276. "additionalProperties": false
  23277. }
  23278. },
  23279. "required": ["type", "properties"],
  23280. "additionalProperties": false
  23281. },
  23282. "Workspace": {
  23283. "type": "object",
  23284. "properties": {
  23285. "id": {
  23286. "type": "string",
  23287. "pattern": "^wrk"
  23288. },
  23289. "type": {
  23290. "type": "string"
  23291. },
  23292. "name": {
  23293. "type": "string"
  23294. },
  23295. "branch": {
  23296. "anyOf": [
  23297. {
  23298. "type": "string"
  23299. },
  23300. {
  23301. "type": "null"
  23302. }
  23303. ]
  23304. },
  23305. "directory": {
  23306. "anyOf": [
  23307. {
  23308. "type": "string"
  23309. },
  23310. {
  23311. "type": "null"
  23312. }
  23313. ]
  23314. },
  23315. "extra": {
  23316. "anyOf": [
  23317. {},
  23318. {
  23319. "type": "null"
  23320. }
  23321. ]
  23322. },
  23323. "projectID": {
  23324. "type": "string"
  23325. },
  23326. "timeUsed": {
  23327. "anyOf": [
  23328. {
  23329. "type": "number"
  23330. },
  23331. {
  23332. "type": "string",
  23333. "enum": ["NaN"]
  23334. },
  23335. {
  23336. "type": "string",
  23337. "enum": ["Infinity"]
  23338. },
  23339. {
  23340. "type": "string",
  23341. "enum": ["-Infinity"]
  23342. },
  23343. {
  23344. "type": "string",
  23345. "enum": ["Infinity", "-Infinity", "NaN"]
  23346. }
  23347. ]
  23348. }
  23349. },
  23350. "required": ["id", "type", "name", "projectID", "timeUsed"],
  23351. "additionalProperties": false
  23352. },
  23353. "WorkspaceCreateError": {
  23354. "type": "object",
  23355. "properties": {
  23356. "name": {
  23357. "type": "string",
  23358. "enum": ["WorkspaceCreateError"]
  23359. },
  23360. "data": {
  23361. "type": "object",
  23362. "properties": {
  23363. "message": {
  23364. "type": "string"
  23365. }
  23366. },
  23367. "required": ["message"],
  23368. "additionalProperties": false
  23369. }
  23370. },
  23371. "required": ["name", "data"],
  23372. "additionalProperties": false
  23373. },
  23374. "WorkspaceWarpError": {
  23375. "type": "object",
  23376. "properties": {
  23377. "name": {
  23378. "type": "string",
  23379. "enum": ["WorkspaceWarpError"]
  23380. },
  23381. "data": {
  23382. "type": "object",
  23383. "properties": {
  23384. "message": {
  23385. "type": "string"
  23386. }
  23387. },
  23388. "required": ["message"],
  23389. "additionalProperties": false
  23390. }
  23391. },
  23392. "required": ["name", "data"],
  23393. "additionalProperties": false
  23394. },
  23395. "UnauthorizedError": {
  23396. "type": "object",
  23397. "properties": {
  23398. "_tag": {
  23399. "type": "string",
  23400. "enum": ["UnauthorizedError"]
  23401. },
  23402. "message": {
  23403. "type": "string"
  23404. }
  23405. },
  23406. "required": ["_tag", "message"],
  23407. "additionalProperties": false
  23408. },
  23409. "SessionsResponse": {
  23410. "type": "object",
  23411. "properties": {
  23412. "data": {
  23413. "type": "array",
  23414. "items": {
  23415. "$ref": "#/components/schemas/SessionV2Info"
  23416. }
  23417. },
  23418. "cursor": {
  23419. "type": "object",
  23420. "properties": {
  23421. "previous": {
  23422. "type": "string"
  23423. },
  23424. "next": {
  23425. "type": "string"
  23426. }
  23427. },
  23428. "additionalProperties": false
  23429. }
  23430. },
  23431. "required": ["data", "cursor"],
  23432. "additionalProperties": false
  23433. },
  23434. "InvalidCursorError": {
  23435. "type": "object",
  23436. "properties": {
  23437. "_tag": {
  23438. "type": "string",
  23439. "enum": ["InvalidCursorError"]
  23440. },
  23441. "message": {
  23442. "type": "string"
  23443. }
  23444. },
  23445. "required": ["_tag", "message"],
  23446. "additionalProperties": false
  23447. },
  23448. "SessionNotFoundError": {
  23449. "type": "object",
  23450. "properties": {
  23451. "_tag": {
  23452. "type": "string",
  23453. "enum": ["SessionNotFoundError"]
  23454. },
  23455. "sessionID": {
  23456. "type": "string"
  23457. },
  23458. "message": {
  23459. "type": "string"
  23460. }
  23461. },
  23462. "required": ["_tag", "sessionID", "message"],
  23463. "additionalProperties": false
  23464. },
  23465. "ConflictError": {
  23466. "type": "object",
  23467. "properties": {
  23468. "_tag": {
  23469. "type": "string",
  23470. "enum": ["ConflictError"]
  23471. },
  23472. "message": {
  23473. "type": "string"
  23474. },
  23475. "resource": {
  23476. "type": "string"
  23477. }
  23478. },
  23479. "required": ["_tag", "message"],
  23480. "additionalProperties": false
  23481. },
  23482. "ServiceUnavailableError": {
  23483. "type": "object",
  23484. "properties": {
  23485. "_tag": {
  23486. "type": "string",
  23487. "enum": ["ServiceUnavailableError"]
  23488. },
  23489. "message": {
  23490. "type": "string"
  23491. },
  23492. "service": {
  23493. "type": "string"
  23494. }
  23495. },
  23496. "required": ["_tag", "message"],
  23497. "additionalProperties": false
  23498. },
  23499. "MessageNotFoundError": {
  23500. "type": "object",
  23501. "properties": {
  23502. "_tag": {
  23503. "type": "string",
  23504. "enum": ["MessageNotFoundError"]
  23505. },
  23506. "sessionID": {
  23507. "type": "string"
  23508. },
  23509. "messageID": {
  23510. "type": "string"
  23511. },
  23512. "message": {
  23513. "type": "string"
  23514. }
  23515. },
  23516. "required": ["_tag", "sessionID", "messageID", "message"],
  23517. "additionalProperties": false
  23518. },
  23519. "UnknownError1": {
  23520. "type": "object",
  23521. "properties": {
  23522. "_tag": {
  23523. "type": "string",
  23524. "enum": ["UnknownError"]
  23525. },
  23526. "message": {
  23527. "type": "string"
  23528. },
  23529. "ref": {
  23530. "type": "string"
  23531. }
  23532. },
  23533. "required": ["_tag", "message"],
  23534. "additionalProperties": false
  23535. },
  23536. "SessionMessagesResponse": {
  23537. "type": "object",
  23538. "properties": {
  23539. "data": {
  23540. "type": "array",
  23541. "items": {
  23542. "$ref": "#/components/schemas/SessionMessage"
  23543. }
  23544. },
  23545. "cursor": {
  23546. "type": "object",
  23547. "properties": {
  23548. "previous": {
  23549. "type": "string"
  23550. },
  23551. "next": {
  23552. "type": "string"
  23553. }
  23554. },
  23555. "additionalProperties": false
  23556. }
  23557. },
  23558. "required": ["data", "cursor"],
  23559. "additionalProperties": false
  23560. },
  23561. "ProviderNotFoundError": {
  23562. "type": "object",
  23563. "properties": {
  23564. "_tag": {
  23565. "type": "string",
  23566. "enum": ["ProviderNotFoundError"]
  23567. },
  23568. "providerID": {
  23569. "type": "string"
  23570. },
  23571. "message": {
  23572. "type": "string"
  23573. }
  23574. },
  23575. "required": ["_tag", "providerID", "message"],
  23576. "additionalProperties": false
  23577. },
  23578. "V2Event": {
  23579. "anyOf": [
  23580. {
  23581. "$ref": "#/components/schemas/V2EventModels-devRefreshed"
  23582. },
  23583. {
  23584. "$ref": "#/components/schemas/V2EventIntegrationUpdated"
  23585. },
  23586. {
  23587. "$ref": "#/components/schemas/V2EventIntegrationConnectionUpdated"
  23588. },
  23589. {
  23590. "$ref": "#/components/schemas/V2EventCatalogUpdated"
  23591. },
  23592. {
  23593. "$ref": "#/components/schemas/V2EventSessionCreated"
  23594. },
  23595. {
  23596. "$ref": "#/components/schemas/V2EventSessionUpdated"
  23597. },
  23598. {
  23599. "$ref": "#/components/schemas/V2EventSessionDeleted"
  23600. },
  23601. {
  23602. "$ref": "#/components/schemas/V2EventMessageUpdated"
  23603. },
  23604. {
  23605. "$ref": "#/components/schemas/V2EventMessageRemoved"
  23606. },
  23607. {
  23608. "$ref": "#/components/schemas/V2EventMessagePartUpdated"
  23609. },
  23610. {
  23611. "$ref": "#/components/schemas/V2EventMessagePartRemoved"
  23612. },
  23613. {
  23614. "$ref": "#/components/schemas/V2EventSessionNextAgentSwitched"
  23615. },
  23616. {
  23617. "$ref": "#/components/schemas/V2EventSessionNextModelSwitched"
  23618. },
  23619. {
  23620. "$ref": "#/components/schemas/V2EventSessionNextMoved"
  23621. },
  23622. {
  23623. "$ref": "#/components/schemas/V2EventSessionNextPrompted"
  23624. },
  23625. {
  23626. "$ref": "#/components/schemas/V2EventSessionNextPromptAdmitted"
  23627. },
  23628. {
  23629. "$ref": "#/components/schemas/V2EventSessionNextContextUpdated"
  23630. },
  23631. {
  23632. "$ref": "#/components/schemas/V2EventSessionNextSynthetic"
  23633. },
  23634. {
  23635. "$ref": "#/components/schemas/V2EventSessionNextShellStarted"
  23636. },
  23637. {
  23638. "$ref": "#/components/schemas/V2EventSessionNextShellEnded"
  23639. },
  23640. {
  23641. "$ref": "#/components/schemas/V2EventSessionNextStepStarted"
  23642. },
  23643. {
  23644. "$ref": "#/components/schemas/V2EventSessionNextStepEnded"
  23645. },
  23646. {
  23647. "$ref": "#/components/schemas/V2EventSessionNextStepFailed"
  23648. },
  23649. {
  23650. "$ref": "#/components/schemas/V2EventSessionNextTextStarted"
  23651. },
  23652. {
  23653. "$ref": "#/components/schemas/V2EventSessionNextTextDelta"
  23654. },
  23655. {
  23656. "$ref": "#/components/schemas/V2EventSessionNextTextEnded"
  23657. },
  23658. {
  23659. "$ref": "#/components/schemas/V2EventSessionNextReasoningStarted"
  23660. },
  23661. {
  23662. "$ref": "#/components/schemas/V2EventSessionNextReasoningDelta"
  23663. },
  23664. {
  23665. "$ref": "#/components/schemas/V2EventSessionNextReasoningEnded"
  23666. },
  23667. {
  23668. "$ref": "#/components/schemas/V2EventSessionNextToolInputStarted"
  23669. },
  23670. {
  23671. "$ref": "#/components/schemas/V2EventSessionNextToolInputDelta"
  23672. },
  23673. {
  23674. "$ref": "#/components/schemas/V2EventSessionNextToolInputEnded"
  23675. },
  23676. {
  23677. "$ref": "#/components/schemas/V2EventSessionNextToolCalled"
  23678. },
  23679. {
  23680. "$ref": "#/components/schemas/V2EventSessionNextToolProgress"
  23681. },
  23682. {
  23683. "$ref": "#/components/schemas/V2EventSessionNextToolSuccess"
  23684. },
  23685. {
  23686. "$ref": "#/components/schemas/V2EventSessionNextToolFailed"
  23687. },
  23688. {
  23689. "$ref": "#/components/schemas/V2EventSessionNextRetried"
  23690. },
  23691. {
  23692. "$ref": "#/components/schemas/V2EventSessionNextCompactionStarted"
  23693. },
  23694. {
  23695. "$ref": "#/components/schemas/V2EventSessionNextCompactionDelta"
  23696. },
  23697. {
  23698. "$ref": "#/components/schemas/V2EventSessionNextCompactionEnded"
  23699. },
  23700. {
  23701. "$ref": "#/components/schemas/V2EventSessionNextRevertStaged"
  23702. },
  23703. {
  23704. "$ref": "#/components/schemas/V2EventSessionNextRevertCleared"
  23705. },
  23706. {
  23707. "$ref": "#/components/schemas/V2EventSessionNextRevertCommitted"
  23708. },
  23709. {
  23710. "$ref": "#/components/schemas/V2EventMessagePartDelta"
  23711. },
  23712. {
  23713. "$ref": "#/components/schemas/V2EventSessionDiff"
  23714. },
  23715. {
  23716. "$ref": "#/components/schemas/V2EventSessionError"
  23717. },
  23718. {
  23719. "$ref": "#/components/schemas/V2EventInstallationUpdated"
  23720. },
  23721. {
  23722. "$ref": "#/components/schemas/V2EventInstallationUpdate-available"
  23723. },
  23724. {
  23725. "$ref": "#/components/schemas/V2EventFileEdited"
  23726. },
  23727. {
  23728. "$ref": "#/components/schemas/V2EventReferenceUpdated"
  23729. },
  23730. {
  23731. "$ref": "#/components/schemas/V2EventPermissionV2Asked"
  23732. },
  23733. {
  23734. "$ref": "#/components/schemas/V2EventPermissionV2Replied"
  23735. },
  23736. {
  23737. "$ref": "#/components/schemas/V2EventPluginAdded"
  23738. },
  23739. {
  23740. "$ref": "#/components/schemas/V2EventProjectDirectoriesUpdated"
  23741. },
  23742. {
  23743. "$ref": "#/components/schemas/V2EventFileWatcherUpdated"
  23744. },
  23745. {
  23746. "$ref": "#/components/schemas/V2EventPtyCreated"
  23747. },
  23748. {
  23749. "$ref": "#/components/schemas/V2EventPtyUpdated"
  23750. },
  23751. {
  23752. "$ref": "#/components/schemas/V2EventPtyExited"
  23753. },
  23754. {
  23755. "$ref": "#/components/schemas/V2EventPtyDeleted"
  23756. },
  23757. {
  23758. "$ref": "#/components/schemas/V2EventQuestionV2Asked"
  23759. },
  23760. {
  23761. "$ref": "#/components/schemas/V2EventQuestionV2Replied"
  23762. },
  23763. {
  23764. "$ref": "#/components/schemas/V2EventQuestionV2Rejected"
  23765. },
  23766. {
  23767. "$ref": "#/components/schemas/V2EventTodoUpdated"
  23768. },
  23769. {
  23770. "$ref": "#/components/schemas/V2EventLspUpdated"
  23771. },
  23772. {
  23773. "$ref": "#/components/schemas/V2EventPermissionAsked"
  23774. },
  23775. {
  23776. "$ref": "#/components/schemas/V2EventPermissionReplied"
  23777. },
  23778. {
  23779. "$ref": "#/components/schemas/V2EventTuiPromptAppend"
  23780. },
  23781. {
  23782. "$ref": "#/components/schemas/V2EventTuiCommandExecute"
  23783. },
  23784. {
  23785. "$ref": "#/components/schemas/V2EventTuiToastShow"
  23786. },
  23787. {
  23788. "$ref": "#/components/schemas/V2EventTuiSessionSelect"
  23789. },
  23790. {
  23791. "$ref": "#/components/schemas/V2EventMcpToolsChanged"
  23792. },
  23793. {
  23794. "$ref": "#/components/schemas/V2EventMcpBrowserOpenFailed"
  23795. },
  23796. {
  23797. "$ref": "#/components/schemas/V2EventCommandExecuted"
  23798. },
  23799. {
  23800. "$ref": "#/components/schemas/V2EventProjectUpdated"
  23801. },
  23802. {
  23803. "$ref": "#/components/schemas/V2EventSessionStatus"
  23804. },
  23805. {
  23806. "$ref": "#/components/schemas/V2EventSessionIdle"
  23807. },
  23808. {
  23809. "$ref": "#/components/schemas/V2EventQuestionAsked"
  23810. },
  23811. {
  23812. "$ref": "#/components/schemas/V2EventQuestionReplied"
  23813. },
  23814. {
  23815. "$ref": "#/components/schemas/V2EventQuestionRejected"
  23816. },
  23817. {
  23818. "$ref": "#/components/schemas/V2EventSessionCompacted"
  23819. },
  23820. {
  23821. "$ref": "#/components/schemas/V2EventVcsBranchUpdated"
  23822. },
  23823. {
  23824. "$ref": "#/components/schemas/V2EventWorkspaceReady"
  23825. },
  23826. {
  23827. "$ref": "#/components/schemas/V2EventWorkspaceFailed"
  23828. },
  23829. {
  23830. "$ref": "#/components/schemas/V2EventWorkspaceStatus"
  23831. },
  23832. {
  23833. "$ref": "#/components/schemas/V2EventWorktreeReady"
  23834. },
  23835. {
  23836. "$ref": "#/components/schemas/V2EventWorktreeFailed"
  23837. },
  23838. {
  23839. "$ref": "#/components/schemas/V2EventServerConnected"
  23840. },
  23841. {
  23842. "$ref": "#/components/schemas/V2EventGlobalDisposed"
  23843. }
  23844. ]
  23845. },
  23846. "ForbiddenError": {
  23847. "type": "object",
  23848. "properties": {
  23849. "_tag": {
  23850. "type": "string",
  23851. "enum": ["ForbiddenError"]
  23852. },
  23853. "message": {
  23854. "type": "string"
  23855. }
  23856. },
  23857. "required": ["_tag", "message"],
  23858. "additionalProperties": false
  23859. },
  23860. "ProjectCopyError": {
  23861. "type": "object",
  23862. "properties": {
  23863. "name": {
  23864. "type": "string",
  23865. "enum": ["ProjectCopyError"]
  23866. },
  23867. "data": {
  23868. "type": "object",
  23869. "properties": {
  23870. "message": {
  23871. "type": "string"
  23872. },
  23873. "forceRequired": {
  23874. "type": "boolean"
  23875. }
  23876. },
  23877. "required": ["message"],
  23878. "additionalProperties": false
  23879. }
  23880. },
  23881. "required": ["name", "data"],
  23882. "additionalProperties": false
  23883. },
  23884. "effect_HttpApiError_Forbidden": {
  23885. "type": "object",
  23886. "properties": {
  23887. "_tag": {
  23888. "type": "string",
  23889. "enum": ["Forbidden"]
  23890. }
  23891. },
  23892. "required": ["_tag"],
  23893. "additionalProperties": false
  23894. },
  23895. "Event.tui.prompt.append": {
  23896. "type": "object",
  23897. "properties": {
  23898. "id": {
  23899. "type": "string",
  23900. "pattern": "^evt_"
  23901. },
  23902. "type": {
  23903. "type": "string",
  23904. "enum": ["tui.prompt.append"]
  23905. },
  23906. "properties": {
  23907. "type": "object",
  23908. "properties": {
  23909. "text": {
  23910. "type": "string"
  23911. }
  23912. },
  23913. "required": ["text"],
  23914. "additionalProperties": false
  23915. }
  23916. },
  23917. "required": ["id", "type", "properties"],
  23918. "additionalProperties": false
  23919. },
  23920. "Event.tui.command.execute": {
  23921. "type": "object",
  23922. "properties": {
  23923. "id": {
  23924. "type": "string",
  23925. "pattern": "^evt_"
  23926. },
  23927. "type": {
  23928. "type": "string",
  23929. "enum": ["tui.command.execute"]
  23930. },
  23931. "properties": {
  23932. "type": "object",
  23933. "properties": {
  23934. "command": {
  23935. "anyOf": [
  23936. {
  23937. "type": "string",
  23938. "enum": [
  23939. "session.list",
  23940. "session.new",
  23941. "session.share",
  23942. "session.interrupt",
  23943. "session.compact",
  23944. "session.page.up",
  23945. "session.page.down",
  23946. "session.line.up",
  23947. "session.line.down",
  23948. "session.half.page.up",
  23949. "session.half.page.down",
  23950. "session.first",
  23951. "session.last",
  23952. "prompt.clear",
  23953. "prompt.submit",
  23954. "agent.cycle"
  23955. ]
  23956. },
  23957. {
  23958. "type": "string"
  23959. }
  23960. ]
  23961. }
  23962. },
  23963. "required": ["command"],
  23964. "additionalProperties": false
  23965. }
  23966. },
  23967. "required": ["id", "type", "properties"],
  23968. "additionalProperties": false
  23969. },
  23970. "Event.tui.toast.show": {
  23971. "type": "object",
  23972. "properties": {
  23973. "id": {
  23974. "type": "string",
  23975. "pattern": "^evt_"
  23976. },
  23977. "type": {
  23978. "type": "string",
  23979. "enum": ["tui.toast.show"]
  23980. },
  23981. "properties": {
  23982. "type": "object",
  23983. "properties": {
  23984. "title": {
  23985. "type": "string"
  23986. },
  23987. "message": {
  23988. "type": "string"
  23989. },
  23990. "variant": {
  23991. "type": "string",
  23992. "enum": ["info", "success", "warning", "error"]
  23993. },
  23994. "duration": {
  23995. "type": "integer",
  23996. "exclusiveMinimum": 0
  23997. }
  23998. },
  23999. "required": ["message", "variant"],
  24000. "additionalProperties": false
  24001. }
  24002. },
  24003. "required": ["id", "type", "properties"],
  24004. "additionalProperties": false
  24005. },
  24006. "Event.tui.session.select": {
  24007. "type": "object",
  24008. "properties": {
  24009. "id": {
  24010. "type": "string",
  24011. "pattern": "^evt_"
  24012. },
  24013. "type": {
  24014. "type": "string",
  24015. "enum": ["tui.session.select"]
  24016. },
  24017. "properties": {
  24018. "type": "object",
  24019. "properties": {
  24020. "sessionID": {
  24021. "type": "string",
  24022. "pattern": "^ses",
  24023. "description": "Session ID to navigate to"
  24024. }
  24025. },
  24026. "required": ["sessionID"],
  24027. "additionalProperties": false
  24028. }
  24029. },
  24030. "required": ["id", "type", "properties"],
  24031. "additionalProperties": false
  24032. },
  24033. "CredentialValue": {
  24034. "anyOf": [
  24035. {
  24036. "$ref": "#/components/schemas/CredentialOAuth"
  24037. },
  24038. {
  24039. "$ref": "#/components/schemas/CredentialKey"
  24040. }
  24041. ]
  24042. },
  24043. "IntegrationInputs": {
  24044. "type": "object",
  24045. "additionalProperties": {
  24046. "type": "string"
  24047. }
  24048. },
  24049. "IntegrationMethod": {
  24050. "anyOf": [
  24051. {
  24052. "$ref": "#/components/schemas/IntegrationOAuthMethod"
  24053. },
  24054. {
  24055. "$ref": "#/components/schemas/IntegrationKeyMethod"
  24056. },
  24057. {
  24058. "$ref": "#/components/schemas/IntegrationEnvMethod"
  24059. }
  24060. ]
  24061. },
  24062. "IntegrationRef": {
  24063. "type": "object",
  24064. "properties": {
  24065. "id": {
  24066. "type": "string"
  24067. },
  24068. "name": {
  24069. "type": "string"
  24070. }
  24071. },
  24072. "required": ["id", "name"],
  24073. "additionalProperties": false
  24074. },
  24075. "SkillV2Source": {
  24076. "anyOf": [
  24077. {
  24078. "$ref": "#/components/schemas/SkillV2DirectorySource"
  24079. },
  24080. {
  24081. "$ref": "#/components/schemas/SkillV2UrlSource"
  24082. },
  24083. {
  24084. "$ref": "#/components/schemas/SkillV2EmbeddedSource"
  24085. }
  24086. ]
  24087. },
  24088. "MoveSessionDestination": {
  24089. "type": "object",
  24090. "properties": {
  24091. "directory": {
  24092. "type": "string"
  24093. }
  24094. },
  24095. "required": ["directory"],
  24096. "additionalProperties": false
  24097. },
  24098. "ModelRef": {
  24099. "type": "object",
  24100. "properties": {
  24101. "id": {
  24102. "type": "string"
  24103. },
  24104. "providerID": {
  24105. "type": "string"
  24106. },
  24107. "variant": {
  24108. "type": "string"
  24109. }
  24110. },
  24111. "required": ["id", "providerID"],
  24112. "additionalProperties": false
  24113. },
  24114. "LocationRef": {
  24115. "type": "object",
  24116. "properties": {
  24117. "directory": {
  24118. "type": "string"
  24119. },
  24120. "workspaceID": {
  24121. "type": "string",
  24122. "pattern": "^wrk"
  24123. }
  24124. },
  24125. "required": ["directory"],
  24126. "additionalProperties": false
  24127. },
  24128. "PromptSource": {
  24129. "type": "object",
  24130. "properties": {
  24131. "start": {
  24132. "type": "number"
  24133. },
  24134. "end": {
  24135. "type": "number"
  24136. },
  24137. "text": {
  24138. "type": "string"
  24139. }
  24140. },
  24141. "required": ["start", "end", "text"],
  24142. "additionalProperties": false
  24143. },
  24144. "PromptFileAttachment": {
  24145. "type": "object",
  24146. "properties": {
  24147. "uri": {
  24148. "type": "string"
  24149. },
  24150. "mime": {
  24151. "type": "string"
  24152. },
  24153. "name": {
  24154. "type": "string"
  24155. },
  24156. "description": {
  24157. "type": "string"
  24158. },
  24159. "source": {
  24160. "$ref": "#/components/schemas/PromptSource"
  24161. }
  24162. },
  24163. "required": ["uri", "mime"],
  24164. "additionalProperties": false
  24165. },
  24166. "PromptAgentAttachment": {
  24167. "type": "object",
  24168. "properties": {
  24169. "name": {
  24170. "type": "string"
  24171. },
  24172. "source": {
  24173. "$ref": "#/components/schemas/PromptSource"
  24174. }
  24175. },
  24176. "required": ["name"],
  24177. "additionalProperties": false
  24178. },
  24179. "SessionErrorUnknown": {
  24180. "type": "object",
  24181. "properties": {
  24182. "type": {
  24183. "type": "string",
  24184. "enum": ["unknown"]
  24185. },
  24186. "message": {
  24187. "type": "string"
  24188. }
  24189. },
  24190. "required": ["type", "message"],
  24191. "additionalProperties": false
  24192. },
  24193. "LLMProviderMetadata": {
  24194. "type": "object",
  24195. "additionalProperties": {
  24196. "type": "object"
  24197. }
  24198. },
  24199. "ToolTextContent": {
  24200. "type": "object",
  24201. "properties": {
  24202. "type": {
  24203. "type": "string",
  24204. "enum": ["text"]
  24205. },
  24206. "text": {
  24207. "type": "string"
  24208. }
  24209. },
  24210. "required": ["type", "text"],
  24211. "additionalProperties": false
  24212. },
  24213. "ToolFileContent": {
  24214. "type": "object",
  24215. "properties": {
  24216. "type": {
  24217. "type": "string",
  24218. "enum": ["file"]
  24219. },
  24220. "uri": {
  24221. "type": "string"
  24222. },
  24223. "mime": {
  24224. "type": "string"
  24225. },
  24226. "name": {
  24227. "type": "string"
  24228. }
  24229. },
  24230. "required": ["type", "uri", "mime"],
  24231. "additionalProperties": false
  24232. },
  24233. "LLMToolContent": {
  24234. "anyOf": [
  24235. {
  24236. "$ref": "#/components/schemas/ToolTextContent"
  24237. },
  24238. {
  24239. "$ref": "#/components/schemas/ToolFileContent"
  24240. }
  24241. ]
  24242. },
  24243. "SessionNextRetry_error": {
  24244. "type": "object",
  24245. "properties": {
  24246. "message": {
  24247. "type": "string"
  24248. },
  24249. "statusCode": {
  24250. "type": "number"
  24251. },
  24252. "isRetryable": {
  24253. "type": "boolean"
  24254. },
  24255. "responseHeaders": {
  24256. "type": "object",
  24257. "additionalProperties": {
  24258. "type": "string"
  24259. }
  24260. },
  24261. "responseBody": {
  24262. "type": "string"
  24263. },
  24264. "metadata": {
  24265. "type": "object",
  24266. "additionalProperties": {
  24267. "type": "string"
  24268. }
  24269. }
  24270. },
  24271. "required": ["message", "isRetryable"],
  24272. "additionalProperties": false
  24273. },
  24274. "FileDiff": {
  24275. "type": "object",
  24276. "properties": {
  24277. "path": {
  24278. "type": "string"
  24279. },
  24280. "status": {
  24281. "type": "string",
  24282. "enum": ["added", "modified", "deleted"]
  24283. },
  24284. "additions": {
  24285. "type": "integer",
  24286. "minimum": 0
  24287. },
  24288. "deletions": {
  24289. "type": "integer",
  24290. "minimum": 0
  24291. },
  24292. "patch": {
  24293. "type": "string"
  24294. }
  24295. },
  24296. "required": ["path", "status", "additions", "deletions", "patch"],
  24297. "additionalProperties": false
  24298. },
  24299. "RevertState": {
  24300. "type": "object",
  24301. "properties": {
  24302. "messageID": {
  24303. "type": "string",
  24304. "pattern": "^msg_"
  24305. },
  24306. "partID": {
  24307. "type": "string"
  24308. },
  24309. "snapshot": {
  24310. "type": "string"
  24311. },
  24312. "diff": {
  24313. "type": "string"
  24314. },
  24315. "files": {
  24316. "type": "array",
  24317. "items": {
  24318. "$ref": "#/components/schemas/FileDiff"
  24319. }
  24320. }
  24321. },
  24322. "required": ["messageID"],
  24323. "additionalProperties": false
  24324. },
  24325. "PermissionV2Source": {
  24326. "type": "object",
  24327. "properties": {
  24328. "type": {
  24329. "type": "string",
  24330. "enum": ["tool"]
  24331. },
  24332. "messageID": {
  24333. "type": "string"
  24334. },
  24335. "callID": {
  24336. "type": "string"
  24337. }
  24338. },
  24339. "required": ["type", "messageID", "callID"],
  24340. "additionalProperties": false
  24341. },
  24342. "PermissionV2Reply": {
  24343. "type": "string",
  24344. "enum": ["once", "always", "reject"]
  24345. },
  24346. "QuestionV2Option": {
  24347. "type": "object",
  24348. "properties": {
  24349. "label": {
  24350. "type": "string",
  24351. "description": "Display text (1-5 words, concise)"
  24352. },
  24353. "description": {
  24354. "type": "string",
  24355. "description": "Explanation of choice"
  24356. }
  24357. },
  24358. "required": ["label", "description"],
  24359. "additionalProperties": false
  24360. },
  24361. "QuestionV2Info": {
  24362. "type": "object",
  24363. "properties": {
  24364. "question": {
  24365. "type": "string",
  24366. "description": "Complete question"
  24367. },
  24368. "header": {
  24369. "type": "string",
  24370. "description": "Very short label (max 30 chars)"
  24371. },
  24372. "options": {
  24373. "type": "array",
  24374. "items": {
  24375. "$ref": "#/components/schemas/QuestionV2Option"
  24376. },
  24377. "description": "Available choices"
  24378. },
  24379. "multiple": {
  24380. "type": "boolean"
  24381. },
  24382. "custom": {
  24383. "type": "boolean"
  24384. }
  24385. },
  24386. "required": ["question", "header", "options"],
  24387. "additionalProperties": false
  24388. },
  24389. "QuestionV2Tool": {
  24390. "type": "object",
  24391. "properties": {
  24392. "messageID": {
  24393. "type": "string"
  24394. },
  24395. "callID": {
  24396. "type": "string"
  24397. }
  24398. },
  24399. "required": ["messageID", "callID"],
  24400. "additionalProperties": false
  24401. },
  24402. "QuestionV2Answer": {
  24403. "type": "array",
  24404. "items": {
  24405. "type": "string"
  24406. }
  24407. },
  24408. "ProjectVcs": {
  24409. "type": "string",
  24410. "enum": ["git"]
  24411. },
  24412. "ProjectIcon": {
  24413. "type": "object",
  24414. "properties": {
  24415. "url": {
  24416. "type": "string"
  24417. },
  24418. "override": {
  24419. "type": "string"
  24420. },
  24421. "color": {
  24422. "type": "string"
  24423. }
  24424. },
  24425. "additionalProperties": false
  24426. },
  24427. "ProjectCommands": {
  24428. "type": "object",
  24429. "properties": {
  24430. "start": {
  24431. "type": "string",
  24432. "description": "Startup script to run when creating a new workspace (worktree)"
  24433. }
  24434. },
  24435. "additionalProperties": false
  24436. },
  24437. "ProjectTime": {
  24438. "type": "object",
  24439. "properties": {
  24440. "created": {
  24441. "type": "integer",
  24442. "minimum": 0
  24443. },
  24444. "updated": {
  24445. "type": "integer",
  24446. "minimum": 0
  24447. },
  24448. "initialized": {
  24449. "type": "integer",
  24450. "minimum": 0
  24451. }
  24452. },
  24453. "required": ["created", "updated"],
  24454. "additionalProperties": false
  24455. },
  24456. "EventServerInstanceDisposed": {
  24457. "type": "object",
  24458. "properties": {
  24459. "id": {
  24460. "type": "string"
  24461. },
  24462. "type": {
  24463. "type": "string",
  24464. "enum": ["server.instance.disposed"]
  24465. },
  24466. "properties": {
  24467. "type": "object",
  24468. "properties": {
  24469. "directory": {
  24470. "type": "string"
  24471. }
  24472. },
  24473. "required": ["directory"],
  24474. "additionalProperties": false
  24475. }
  24476. },
  24477. "required": ["id", "type", "properties"],
  24478. "additionalProperties": false
  24479. },
  24480. "SyncEventSessionCreated": {
  24481. "type": "object",
  24482. "properties": {
  24483. "type": {
  24484. "type": "string",
  24485. "enum": ["sync"]
  24486. },
  24487. "id": {
  24488. "type": "string",
  24489. "pattern": "^evt_"
  24490. },
  24491. "syncEvent": {
  24492. "type": "object",
  24493. "properties": {
  24494. "type": {
  24495. "type": "string",
  24496. "enum": ["session.created.1"]
  24497. },
  24498. "id": {
  24499. "type": "string",
  24500. "pattern": "^evt_"
  24501. },
  24502. "seq": {
  24503. "type": "number"
  24504. },
  24505. "aggregateID": {
  24506. "type": "string"
  24507. },
  24508. "data": {
  24509. "type": "object",
  24510. "properties": {
  24511. "sessionID": {
  24512. "type": "string",
  24513. "pattern": "^ses"
  24514. },
  24515. "info": {
  24516. "$ref": "#/components/schemas/Session"
  24517. }
  24518. },
  24519. "required": ["sessionID", "info"],
  24520. "additionalProperties": false
  24521. }
  24522. },
  24523. "required": ["type", "id", "seq", "aggregateID", "data"],
  24524. "additionalProperties": false
  24525. }
  24526. },
  24527. "required": ["type", "id", "syncEvent"],
  24528. "additionalProperties": false
  24529. },
  24530. "SyncEventSessionUpdated": {
  24531. "type": "object",
  24532. "properties": {
  24533. "type": {
  24534. "type": "string",
  24535. "enum": ["sync"]
  24536. },
  24537. "id": {
  24538. "type": "string",
  24539. "pattern": "^evt_"
  24540. },
  24541. "syncEvent": {
  24542. "type": "object",
  24543. "properties": {
  24544. "type": {
  24545. "type": "string",
  24546. "enum": ["session.updated.1"]
  24547. },
  24548. "id": {
  24549. "type": "string",
  24550. "pattern": "^evt_"
  24551. },
  24552. "seq": {
  24553. "type": "number"
  24554. },
  24555. "aggregateID": {
  24556. "type": "string"
  24557. },
  24558. "data": {
  24559. "type": "object",
  24560. "properties": {
  24561. "sessionID": {
  24562. "type": "string",
  24563. "pattern": "^ses"
  24564. },
  24565. "info": {
  24566. "$ref": "#/components/schemas/Session"
  24567. }
  24568. },
  24569. "required": ["sessionID", "info"],
  24570. "additionalProperties": false
  24571. }
  24572. },
  24573. "required": ["type", "id", "seq", "aggregateID", "data"],
  24574. "additionalProperties": false
  24575. }
  24576. },
  24577. "required": ["type", "id", "syncEvent"],
  24578. "additionalProperties": false
  24579. },
  24580. "SyncEventSessionDeleted": {
  24581. "type": "object",
  24582. "properties": {
  24583. "type": {
  24584. "type": "string",
  24585. "enum": ["sync"]
  24586. },
  24587. "id": {
  24588. "type": "string",
  24589. "pattern": "^evt_"
  24590. },
  24591. "syncEvent": {
  24592. "type": "object",
  24593. "properties": {
  24594. "type": {
  24595. "type": "string",
  24596. "enum": ["session.deleted.1"]
  24597. },
  24598. "id": {
  24599. "type": "string",
  24600. "pattern": "^evt_"
  24601. },
  24602. "seq": {
  24603. "type": "number"
  24604. },
  24605. "aggregateID": {
  24606. "type": "string"
  24607. },
  24608. "data": {
  24609. "type": "object",
  24610. "properties": {
  24611. "sessionID": {
  24612. "type": "string",
  24613. "pattern": "^ses"
  24614. },
  24615. "info": {
  24616. "$ref": "#/components/schemas/Session"
  24617. }
  24618. },
  24619. "required": ["sessionID", "info"],
  24620. "additionalProperties": false
  24621. }
  24622. },
  24623. "required": ["type", "id", "seq", "aggregateID", "data"],
  24624. "additionalProperties": false
  24625. }
  24626. },
  24627. "required": ["type", "id", "syncEvent"],
  24628. "additionalProperties": false
  24629. },
  24630. "SyncEventMessageUpdated": {
  24631. "type": "object",
  24632. "properties": {
  24633. "type": {
  24634. "type": "string",
  24635. "enum": ["sync"]
  24636. },
  24637. "id": {
  24638. "type": "string",
  24639. "pattern": "^evt_"
  24640. },
  24641. "syncEvent": {
  24642. "type": "object",
  24643. "properties": {
  24644. "type": {
  24645. "type": "string",
  24646. "enum": ["message.updated.1"]
  24647. },
  24648. "id": {
  24649. "type": "string",
  24650. "pattern": "^evt_"
  24651. },
  24652. "seq": {
  24653. "type": "number"
  24654. },
  24655. "aggregateID": {
  24656. "type": "string"
  24657. },
  24658. "data": {
  24659. "type": "object",
  24660. "properties": {
  24661. "sessionID": {
  24662. "type": "string",
  24663. "pattern": "^ses"
  24664. },
  24665. "info": {
  24666. "$ref": "#/components/schemas/Message"
  24667. }
  24668. },
  24669. "required": ["sessionID", "info"],
  24670. "additionalProperties": false
  24671. }
  24672. },
  24673. "required": ["type", "id", "seq", "aggregateID", "data"],
  24674. "additionalProperties": false
  24675. }
  24676. },
  24677. "required": ["type", "id", "syncEvent"],
  24678. "additionalProperties": false
  24679. },
  24680. "SyncEventMessageRemoved": {
  24681. "type": "object",
  24682. "properties": {
  24683. "type": {
  24684. "type": "string",
  24685. "enum": ["sync"]
  24686. },
  24687. "id": {
  24688. "type": "string",
  24689. "pattern": "^evt_"
  24690. },
  24691. "syncEvent": {
  24692. "type": "object",
  24693. "properties": {
  24694. "type": {
  24695. "type": "string",
  24696. "enum": ["message.removed.1"]
  24697. },
  24698. "id": {
  24699. "type": "string",
  24700. "pattern": "^evt_"
  24701. },
  24702. "seq": {
  24703. "type": "number"
  24704. },
  24705. "aggregateID": {
  24706. "type": "string"
  24707. },
  24708. "data": {
  24709. "type": "object",
  24710. "properties": {
  24711. "sessionID": {
  24712. "type": "string",
  24713. "pattern": "^ses"
  24714. },
  24715. "messageID": {
  24716. "type": "string",
  24717. "pattern": "^msg"
  24718. }
  24719. },
  24720. "required": ["sessionID", "messageID"],
  24721. "additionalProperties": false
  24722. }
  24723. },
  24724. "required": ["type", "id", "seq", "aggregateID", "data"],
  24725. "additionalProperties": false
  24726. }
  24727. },
  24728. "required": ["type", "id", "syncEvent"],
  24729. "additionalProperties": false
  24730. },
  24731. "SyncEventMessagePartUpdated": {
  24732. "type": "object",
  24733. "properties": {
  24734. "type": {
  24735. "type": "string",
  24736. "enum": ["sync"]
  24737. },
  24738. "id": {
  24739. "type": "string",
  24740. "pattern": "^evt_"
  24741. },
  24742. "syncEvent": {
  24743. "type": "object",
  24744. "properties": {
  24745. "type": {
  24746. "type": "string",
  24747. "enum": ["message.part.updated.1"]
  24748. },
  24749. "id": {
  24750. "type": "string",
  24751. "pattern": "^evt_"
  24752. },
  24753. "seq": {
  24754. "type": "number"
  24755. },
  24756. "aggregateID": {
  24757. "type": "string"
  24758. },
  24759. "data": {
  24760. "type": "object",
  24761. "properties": {
  24762. "sessionID": {
  24763. "type": "string",
  24764. "pattern": "^ses"
  24765. },
  24766. "part": {
  24767. "$ref": "#/components/schemas/Part"
  24768. },
  24769. "time": {
  24770. "type": "number"
  24771. }
  24772. },
  24773. "required": ["sessionID", "part", "time"],
  24774. "additionalProperties": false
  24775. }
  24776. },
  24777. "required": ["type", "id", "seq", "aggregateID", "data"],
  24778. "additionalProperties": false
  24779. }
  24780. },
  24781. "required": ["type", "id", "syncEvent"],
  24782. "additionalProperties": false
  24783. },
  24784. "SyncEventMessagePartRemoved": {
  24785. "type": "object",
  24786. "properties": {
  24787. "type": {
  24788. "type": "string",
  24789. "enum": ["sync"]
  24790. },
  24791. "id": {
  24792. "type": "string",
  24793. "pattern": "^evt_"
  24794. },
  24795. "syncEvent": {
  24796. "type": "object",
  24797. "properties": {
  24798. "type": {
  24799. "type": "string",
  24800. "enum": ["message.part.removed.1"]
  24801. },
  24802. "id": {
  24803. "type": "string",
  24804. "pattern": "^evt_"
  24805. },
  24806. "seq": {
  24807. "type": "number"
  24808. },
  24809. "aggregateID": {
  24810. "type": "string"
  24811. },
  24812. "data": {
  24813. "type": "object",
  24814. "properties": {
  24815. "sessionID": {
  24816. "type": "string",
  24817. "pattern": "^ses"
  24818. },
  24819. "messageID": {
  24820. "type": "string",
  24821. "pattern": "^msg"
  24822. },
  24823. "partID": {
  24824. "type": "string",
  24825. "pattern": "^prt"
  24826. }
  24827. },
  24828. "required": ["sessionID", "messageID", "partID"],
  24829. "additionalProperties": false
  24830. }
  24831. },
  24832. "required": ["type", "id", "seq", "aggregateID", "data"],
  24833. "additionalProperties": false
  24834. }
  24835. },
  24836. "required": ["type", "id", "syncEvent"],
  24837. "additionalProperties": false
  24838. },
  24839. "SyncEventSessionNextAgentSwitched": {
  24840. "type": "object",
  24841. "properties": {
  24842. "type": {
  24843. "type": "string",
  24844. "enum": ["sync"]
  24845. },
  24846. "id": {
  24847. "type": "string",
  24848. "pattern": "^evt_"
  24849. },
  24850. "syncEvent": {
  24851. "type": "object",
  24852. "properties": {
  24853. "type": {
  24854. "type": "string",
  24855. "enum": ["session.next.agent.switched.1"]
  24856. },
  24857. "id": {
  24858. "type": "string",
  24859. "pattern": "^evt_"
  24860. },
  24861. "seq": {
  24862. "type": "number"
  24863. },
  24864. "aggregateID": {
  24865. "type": "string"
  24866. },
  24867. "data": {
  24868. "type": "object",
  24869. "properties": {
  24870. "timestamp": {
  24871. "type": "number"
  24872. },
  24873. "sessionID": {
  24874. "type": "string",
  24875. "pattern": "^ses"
  24876. },
  24877. "messageID": {
  24878. "type": "string",
  24879. "pattern": "^msg_"
  24880. },
  24881. "agent": {
  24882. "type": "string"
  24883. }
  24884. },
  24885. "required": ["timestamp", "sessionID", "messageID", "agent"],
  24886. "additionalProperties": false
  24887. }
  24888. },
  24889. "required": ["type", "id", "seq", "aggregateID", "data"],
  24890. "additionalProperties": false
  24891. }
  24892. },
  24893. "required": ["type", "id", "syncEvent"],
  24894. "additionalProperties": false
  24895. },
  24896. "SyncEventSessionNextModelSwitched": {
  24897. "type": "object",
  24898. "properties": {
  24899. "type": {
  24900. "type": "string",
  24901. "enum": ["sync"]
  24902. },
  24903. "id": {
  24904. "type": "string",
  24905. "pattern": "^evt_"
  24906. },
  24907. "syncEvent": {
  24908. "type": "object",
  24909. "properties": {
  24910. "type": {
  24911. "type": "string",
  24912. "enum": ["session.next.model.switched.1"]
  24913. },
  24914. "id": {
  24915. "type": "string",
  24916. "pattern": "^evt_"
  24917. },
  24918. "seq": {
  24919. "type": "number"
  24920. },
  24921. "aggregateID": {
  24922. "type": "string"
  24923. },
  24924. "data": {
  24925. "type": "object",
  24926. "properties": {
  24927. "timestamp": {
  24928. "type": "number"
  24929. },
  24930. "sessionID": {
  24931. "type": "string",
  24932. "pattern": "^ses"
  24933. },
  24934. "messageID": {
  24935. "type": "string",
  24936. "pattern": "^msg_"
  24937. },
  24938. "model": {
  24939. "$ref": "#/components/schemas/ModelRef"
  24940. }
  24941. },
  24942. "required": ["timestamp", "sessionID", "messageID", "model"],
  24943. "additionalProperties": false
  24944. }
  24945. },
  24946. "required": ["type", "id", "seq", "aggregateID", "data"],
  24947. "additionalProperties": false
  24948. }
  24949. },
  24950. "required": ["type", "id", "syncEvent"],
  24951. "additionalProperties": false
  24952. },
  24953. "SyncEventSessionNextMoved": {
  24954. "type": "object",
  24955. "properties": {
  24956. "type": {
  24957. "type": "string",
  24958. "enum": ["sync"]
  24959. },
  24960. "id": {
  24961. "type": "string",
  24962. "pattern": "^evt_"
  24963. },
  24964. "syncEvent": {
  24965. "type": "object",
  24966. "properties": {
  24967. "type": {
  24968. "type": "string",
  24969. "enum": ["session.next.moved.1"]
  24970. },
  24971. "id": {
  24972. "type": "string",
  24973. "pattern": "^evt_"
  24974. },
  24975. "seq": {
  24976. "type": "number"
  24977. },
  24978. "aggregateID": {
  24979. "type": "string"
  24980. },
  24981. "data": {
  24982. "type": "object",
  24983. "properties": {
  24984. "timestamp": {
  24985. "type": "number"
  24986. },
  24987. "sessionID": {
  24988. "type": "string",
  24989. "pattern": "^ses"
  24990. },
  24991. "location": {
  24992. "$ref": "#/components/schemas/LocationRef"
  24993. },
  24994. "subdirectory": {
  24995. "type": "string"
  24996. }
  24997. },
  24998. "required": ["timestamp", "sessionID", "location"],
  24999. "additionalProperties": false
  25000. }
  25001. },
  25002. "required": ["type", "id", "seq", "aggregateID", "data"],
  25003. "additionalProperties": false
  25004. }
  25005. },
  25006. "required": ["type", "id", "syncEvent"],
  25007. "additionalProperties": false
  25008. },
  25009. "SyncEventSessionNextPrompted": {
  25010. "type": "object",
  25011. "properties": {
  25012. "type": {
  25013. "type": "string",
  25014. "enum": ["sync"]
  25015. },
  25016. "id": {
  25017. "type": "string",
  25018. "pattern": "^evt_"
  25019. },
  25020. "syncEvent": {
  25021. "type": "object",
  25022. "properties": {
  25023. "type": {
  25024. "type": "string",
  25025. "enum": ["session.next.prompted.1"]
  25026. },
  25027. "id": {
  25028. "type": "string",
  25029. "pattern": "^evt_"
  25030. },
  25031. "seq": {
  25032. "type": "number"
  25033. },
  25034. "aggregateID": {
  25035. "type": "string"
  25036. },
  25037. "data": {
  25038. "type": "object",
  25039. "properties": {
  25040. "timestamp": {
  25041. "type": "number"
  25042. },
  25043. "sessionID": {
  25044. "type": "string",
  25045. "pattern": "^ses"
  25046. },
  25047. "messageID": {
  25048. "type": "string",
  25049. "pattern": "^msg_"
  25050. },
  25051. "prompt": {
  25052. "$ref": "#/components/schemas/Prompt"
  25053. },
  25054. "delivery": {
  25055. "type": "string",
  25056. "enum": ["steer", "queue"]
  25057. }
  25058. },
  25059. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  25060. "additionalProperties": false
  25061. }
  25062. },
  25063. "required": ["type", "id", "seq", "aggregateID", "data"],
  25064. "additionalProperties": false
  25065. }
  25066. },
  25067. "required": ["type", "id", "syncEvent"],
  25068. "additionalProperties": false
  25069. },
  25070. "SyncEventSessionNextPromptAdmitted": {
  25071. "type": "object",
  25072. "properties": {
  25073. "type": {
  25074. "type": "string",
  25075. "enum": ["sync"]
  25076. },
  25077. "id": {
  25078. "type": "string",
  25079. "pattern": "^evt_"
  25080. },
  25081. "syncEvent": {
  25082. "type": "object",
  25083. "properties": {
  25084. "type": {
  25085. "type": "string",
  25086. "enum": ["session.next.prompt.admitted.1"]
  25087. },
  25088. "id": {
  25089. "type": "string",
  25090. "pattern": "^evt_"
  25091. },
  25092. "seq": {
  25093. "type": "number"
  25094. },
  25095. "aggregateID": {
  25096. "type": "string"
  25097. },
  25098. "data": {
  25099. "type": "object",
  25100. "properties": {
  25101. "timestamp": {
  25102. "type": "number"
  25103. },
  25104. "sessionID": {
  25105. "type": "string",
  25106. "pattern": "^ses"
  25107. },
  25108. "messageID": {
  25109. "type": "string",
  25110. "pattern": "^msg_"
  25111. },
  25112. "prompt": {
  25113. "$ref": "#/components/schemas/Prompt"
  25114. },
  25115. "delivery": {
  25116. "type": "string",
  25117. "enum": ["steer", "queue"]
  25118. }
  25119. },
  25120. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  25121. "additionalProperties": false
  25122. }
  25123. },
  25124. "required": ["type", "id", "seq", "aggregateID", "data"],
  25125. "additionalProperties": false
  25126. }
  25127. },
  25128. "required": ["type", "id", "syncEvent"],
  25129. "additionalProperties": false
  25130. },
  25131. "SyncEventSessionNextContextUpdated": {
  25132. "type": "object",
  25133. "properties": {
  25134. "type": {
  25135. "type": "string",
  25136. "enum": ["sync"]
  25137. },
  25138. "id": {
  25139. "type": "string",
  25140. "pattern": "^evt_"
  25141. },
  25142. "syncEvent": {
  25143. "type": "object",
  25144. "properties": {
  25145. "type": {
  25146. "type": "string",
  25147. "enum": ["session.next.context.updated.1"]
  25148. },
  25149. "id": {
  25150. "type": "string",
  25151. "pattern": "^evt_"
  25152. },
  25153. "seq": {
  25154. "type": "number"
  25155. },
  25156. "aggregateID": {
  25157. "type": "string"
  25158. },
  25159. "data": {
  25160. "type": "object",
  25161. "properties": {
  25162. "timestamp": {
  25163. "type": "number"
  25164. },
  25165. "sessionID": {
  25166. "type": "string",
  25167. "pattern": "^ses"
  25168. },
  25169. "messageID": {
  25170. "type": "string",
  25171. "pattern": "^msg_"
  25172. },
  25173. "text": {
  25174. "type": "string"
  25175. }
  25176. },
  25177. "required": ["timestamp", "sessionID", "messageID", "text"],
  25178. "additionalProperties": false
  25179. }
  25180. },
  25181. "required": ["type", "id", "seq", "aggregateID", "data"],
  25182. "additionalProperties": false
  25183. }
  25184. },
  25185. "required": ["type", "id", "syncEvent"],
  25186. "additionalProperties": false
  25187. },
  25188. "SyncEventSessionNextSynthetic": {
  25189. "type": "object",
  25190. "properties": {
  25191. "type": {
  25192. "type": "string",
  25193. "enum": ["sync"]
  25194. },
  25195. "id": {
  25196. "type": "string",
  25197. "pattern": "^evt_"
  25198. },
  25199. "syncEvent": {
  25200. "type": "object",
  25201. "properties": {
  25202. "type": {
  25203. "type": "string",
  25204. "enum": ["session.next.synthetic.1"]
  25205. },
  25206. "id": {
  25207. "type": "string",
  25208. "pattern": "^evt_"
  25209. },
  25210. "seq": {
  25211. "type": "number"
  25212. },
  25213. "aggregateID": {
  25214. "type": "string"
  25215. },
  25216. "data": {
  25217. "type": "object",
  25218. "properties": {
  25219. "timestamp": {
  25220. "type": "number"
  25221. },
  25222. "sessionID": {
  25223. "type": "string",
  25224. "pattern": "^ses"
  25225. },
  25226. "messageID": {
  25227. "type": "string",
  25228. "pattern": "^msg_"
  25229. },
  25230. "text": {
  25231. "type": "string"
  25232. }
  25233. },
  25234. "required": ["timestamp", "sessionID", "messageID", "text"],
  25235. "additionalProperties": false
  25236. }
  25237. },
  25238. "required": ["type", "id", "seq", "aggregateID", "data"],
  25239. "additionalProperties": false
  25240. }
  25241. },
  25242. "required": ["type", "id", "syncEvent"],
  25243. "additionalProperties": false
  25244. },
  25245. "SyncEventSessionNextShellStarted": {
  25246. "type": "object",
  25247. "properties": {
  25248. "type": {
  25249. "type": "string",
  25250. "enum": ["sync"]
  25251. },
  25252. "id": {
  25253. "type": "string",
  25254. "pattern": "^evt_"
  25255. },
  25256. "syncEvent": {
  25257. "type": "object",
  25258. "properties": {
  25259. "type": {
  25260. "type": "string",
  25261. "enum": ["session.next.shell.started.1"]
  25262. },
  25263. "id": {
  25264. "type": "string",
  25265. "pattern": "^evt_"
  25266. },
  25267. "seq": {
  25268. "type": "number"
  25269. },
  25270. "aggregateID": {
  25271. "type": "string"
  25272. },
  25273. "data": {
  25274. "type": "object",
  25275. "properties": {
  25276. "timestamp": {
  25277. "type": "number"
  25278. },
  25279. "sessionID": {
  25280. "type": "string",
  25281. "pattern": "^ses"
  25282. },
  25283. "messageID": {
  25284. "type": "string",
  25285. "pattern": "^msg_"
  25286. },
  25287. "callID": {
  25288. "type": "string"
  25289. },
  25290. "command": {
  25291. "type": "string"
  25292. }
  25293. },
  25294. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  25295. "additionalProperties": false
  25296. }
  25297. },
  25298. "required": ["type", "id", "seq", "aggregateID", "data"],
  25299. "additionalProperties": false
  25300. }
  25301. },
  25302. "required": ["type", "id", "syncEvent"],
  25303. "additionalProperties": false
  25304. },
  25305. "SyncEventSessionNextShellEnded": {
  25306. "type": "object",
  25307. "properties": {
  25308. "type": {
  25309. "type": "string",
  25310. "enum": ["sync"]
  25311. },
  25312. "id": {
  25313. "type": "string",
  25314. "pattern": "^evt_"
  25315. },
  25316. "syncEvent": {
  25317. "type": "object",
  25318. "properties": {
  25319. "type": {
  25320. "type": "string",
  25321. "enum": ["session.next.shell.ended.1"]
  25322. },
  25323. "id": {
  25324. "type": "string",
  25325. "pattern": "^evt_"
  25326. },
  25327. "seq": {
  25328. "type": "number"
  25329. },
  25330. "aggregateID": {
  25331. "type": "string"
  25332. },
  25333. "data": {
  25334. "type": "object",
  25335. "properties": {
  25336. "timestamp": {
  25337. "type": "number"
  25338. },
  25339. "sessionID": {
  25340. "type": "string",
  25341. "pattern": "^ses"
  25342. },
  25343. "callID": {
  25344. "type": "string"
  25345. },
  25346. "output": {
  25347. "type": "string"
  25348. }
  25349. },
  25350. "required": ["timestamp", "sessionID", "callID", "output"],
  25351. "additionalProperties": false
  25352. }
  25353. },
  25354. "required": ["type", "id", "seq", "aggregateID", "data"],
  25355. "additionalProperties": false
  25356. }
  25357. },
  25358. "required": ["type", "id", "syncEvent"],
  25359. "additionalProperties": false
  25360. },
  25361. "SyncEventSessionNextStepStarted": {
  25362. "type": "object",
  25363. "properties": {
  25364. "type": {
  25365. "type": "string",
  25366. "enum": ["sync"]
  25367. },
  25368. "id": {
  25369. "type": "string",
  25370. "pattern": "^evt_"
  25371. },
  25372. "syncEvent": {
  25373. "type": "object",
  25374. "properties": {
  25375. "type": {
  25376. "type": "string",
  25377. "enum": ["session.next.step.started.1"]
  25378. },
  25379. "id": {
  25380. "type": "string",
  25381. "pattern": "^evt_"
  25382. },
  25383. "seq": {
  25384. "type": "number"
  25385. },
  25386. "aggregateID": {
  25387. "type": "string"
  25388. },
  25389. "data": {
  25390. "type": "object",
  25391. "properties": {
  25392. "timestamp": {
  25393. "type": "number"
  25394. },
  25395. "sessionID": {
  25396. "type": "string",
  25397. "pattern": "^ses"
  25398. },
  25399. "assistantMessageID": {
  25400. "type": "string",
  25401. "pattern": "^msg_"
  25402. },
  25403. "agent": {
  25404. "type": "string"
  25405. },
  25406. "model": {
  25407. "$ref": "#/components/schemas/ModelRef"
  25408. },
  25409. "snapshot": {
  25410. "type": "string"
  25411. }
  25412. },
  25413. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  25414. "additionalProperties": false
  25415. }
  25416. },
  25417. "required": ["type", "id", "seq", "aggregateID", "data"],
  25418. "additionalProperties": false
  25419. }
  25420. },
  25421. "required": ["type", "id", "syncEvent"],
  25422. "additionalProperties": false
  25423. },
  25424. "SyncEventSessionNextStepEnded": {
  25425. "type": "object",
  25426. "properties": {
  25427. "type": {
  25428. "type": "string",
  25429. "enum": ["sync"]
  25430. },
  25431. "id": {
  25432. "type": "string",
  25433. "pattern": "^evt_"
  25434. },
  25435. "syncEvent": {
  25436. "type": "object",
  25437. "properties": {
  25438. "type": {
  25439. "type": "string",
  25440. "enum": ["session.next.step.ended.2"]
  25441. },
  25442. "id": {
  25443. "type": "string",
  25444. "pattern": "^evt_"
  25445. },
  25446. "seq": {
  25447. "type": "number"
  25448. },
  25449. "aggregateID": {
  25450. "type": "string"
  25451. },
  25452. "data": {
  25453. "type": "object",
  25454. "properties": {
  25455. "timestamp": {
  25456. "type": "number"
  25457. },
  25458. "sessionID": {
  25459. "type": "string",
  25460. "pattern": "^ses"
  25461. },
  25462. "assistantMessageID": {
  25463. "type": "string",
  25464. "pattern": "^msg_"
  25465. },
  25466. "finish": {
  25467. "type": "string"
  25468. },
  25469. "cost": {
  25470. "type": "number"
  25471. },
  25472. "tokens": {
  25473. "type": "object",
  25474. "properties": {
  25475. "input": {
  25476. "type": "number"
  25477. },
  25478. "output": {
  25479. "type": "number"
  25480. },
  25481. "reasoning": {
  25482. "type": "number"
  25483. },
  25484. "cache": {
  25485. "type": "object",
  25486. "properties": {
  25487. "read": {
  25488. "type": "number"
  25489. },
  25490. "write": {
  25491. "type": "number"
  25492. }
  25493. },
  25494. "required": ["read", "write"],
  25495. "additionalProperties": false
  25496. }
  25497. },
  25498. "required": ["input", "output", "reasoning", "cache"],
  25499. "additionalProperties": false
  25500. },
  25501. "snapshot": {
  25502. "type": "string"
  25503. },
  25504. "files": {
  25505. "type": "array",
  25506. "items": {
  25507. "type": "string"
  25508. }
  25509. }
  25510. },
  25511. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  25512. "additionalProperties": false
  25513. }
  25514. },
  25515. "required": ["type", "id", "seq", "aggregateID", "data"],
  25516. "additionalProperties": false
  25517. }
  25518. },
  25519. "required": ["type", "id", "syncEvent"],
  25520. "additionalProperties": false
  25521. },
  25522. "SyncEventSessionNextStepFailed": {
  25523. "type": "object",
  25524. "properties": {
  25525. "type": {
  25526. "type": "string",
  25527. "enum": ["sync"]
  25528. },
  25529. "id": {
  25530. "type": "string",
  25531. "pattern": "^evt_"
  25532. },
  25533. "syncEvent": {
  25534. "type": "object",
  25535. "properties": {
  25536. "type": {
  25537. "type": "string",
  25538. "enum": ["session.next.step.failed.2"]
  25539. },
  25540. "id": {
  25541. "type": "string",
  25542. "pattern": "^evt_"
  25543. },
  25544. "seq": {
  25545. "type": "number"
  25546. },
  25547. "aggregateID": {
  25548. "type": "string"
  25549. },
  25550. "data": {
  25551. "type": "object",
  25552. "properties": {
  25553. "timestamp": {
  25554. "type": "number"
  25555. },
  25556. "sessionID": {
  25557. "type": "string",
  25558. "pattern": "^ses"
  25559. },
  25560. "assistantMessageID": {
  25561. "type": "string",
  25562. "pattern": "^msg_"
  25563. },
  25564. "error": {
  25565. "$ref": "#/components/schemas/SessionErrorUnknown"
  25566. }
  25567. },
  25568. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  25569. "additionalProperties": false
  25570. }
  25571. },
  25572. "required": ["type", "id", "seq", "aggregateID", "data"],
  25573. "additionalProperties": false
  25574. }
  25575. },
  25576. "required": ["type", "id", "syncEvent"],
  25577. "additionalProperties": false
  25578. },
  25579. "SyncEventSessionNextTextStarted": {
  25580. "type": "object",
  25581. "properties": {
  25582. "type": {
  25583. "type": "string",
  25584. "enum": ["sync"]
  25585. },
  25586. "id": {
  25587. "type": "string",
  25588. "pattern": "^evt_"
  25589. },
  25590. "syncEvent": {
  25591. "type": "object",
  25592. "properties": {
  25593. "type": {
  25594. "type": "string",
  25595. "enum": ["session.next.text.started.1"]
  25596. },
  25597. "id": {
  25598. "type": "string",
  25599. "pattern": "^evt_"
  25600. },
  25601. "seq": {
  25602. "type": "number"
  25603. },
  25604. "aggregateID": {
  25605. "type": "string"
  25606. },
  25607. "data": {
  25608. "type": "object",
  25609. "properties": {
  25610. "timestamp": {
  25611. "type": "number"
  25612. },
  25613. "sessionID": {
  25614. "type": "string",
  25615. "pattern": "^ses"
  25616. },
  25617. "assistantMessageID": {
  25618. "type": "string",
  25619. "pattern": "^msg_"
  25620. },
  25621. "textID": {
  25622. "type": "string"
  25623. }
  25624. },
  25625. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  25626. "additionalProperties": false
  25627. }
  25628. },
  25629. "required": ["type", "id", "seq", "aggregateID", "data"],
  25630. "additionalProperties": false
  25631. }
  25632. },
  25633. "required": ["type", "id", "syncEvent"],
  25634. "additionalProperties": false
  25635. },
  25636. "SyncEventSessionNextTextEnded": {
  25637. "type": "object",
  25638. "properties": {
  25639. "type": {
  25640. "type": "string",
  25641. "enum": ["sync"]
  25642. },
  25643. "id": {
  25644. "type": "string",
  25645. "pattern": "^evt_"
  25646. },
  25647. "syncEvent": {
  25648. "type": "object",
  25649. "properties": {
  25650. "type": {
  25651. "type": "string",
  25652. "enum": ["session.next.text.ended.1"]
  25653. },
  25654. "id": {
  25655. "type": "string",
  25656. "pattern": "^evt_"
  25657. },
  25658. "seq": {
  25659. "type": "number"
  25660. },
  25661. "aggregateID": {
  25662. "type": "string"
  25663. },
  25664. "data": {
  25665. "type": "object",
  25666. "properties": {
  25667. "timestamp": {
  25668. "type": "number"
  25669. },
  25670. "sessionID": {
  25671. "type": "string",
  25672. "pattern": "^ses"
  25673. },
  25674. "assistantMessageID": {
  25675. "type": "string",
  25676. "pattern": "^msg_"
  25677. },
  25678. "textID": {
  25679. "type": "string"
  25680. },
  25681. "text": {
  25682. "type": "string"
  25683. }
  25684. },
  25685. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  25686. "additionalProperties": false
  25687. }
  25688. },
  25689. "required": ["type", "id", "seq", "aggregateID", "data"],
  25690. "additionalProperties": false
  25691. }
  25692. },
  25693. "required": ["type", "id", "syncEvent"],
  25694. "additionalProperties": false
  25695. },
  25696. "SyncEventSessionNextReasoningStarted": {
  25697. "type": "object",
  25698. "properties": {
  25699. "type": {
  25700. "type": "string",
  25701. "enum": ["sync"]
  25702. },
  25703. "id": {
  25704. "type": "string",
  25705. "pattern": "^evt_"
  25706. },
  25707. "syncEvent": {
  25708. "type": "object",
  25709. "properties": {
  25710. "type": {
  25711. "type": "string",
  25712. "enum": ["session.next.reasoning.started.1"]
  25713. },
  25714. "id": {
  25715. "type": "string",
  25716. "pattern": "^evt_"
  25717. },
  25718. "seq": {
  25719. "type": "number"
  25720. },
  25721. "aggregateID": {
  25722. "type": "string"
  25723. },
  25724. "data": {
  25725. "type": "object",
  25726. "properties": {
  25727. "timestamp": {
  25728. "type": "number"
  25729. },
  25730. "sessionID": {
  25731. "type": "string",
  25732. "pattern": "^ses"
  25733. },
  25734. "assistantMessageID": {
  25735. "type": "string",
  25736. "pattern": "^msg_"
  25737. },
  25738. "reasoningID": {
  25739. "type": "string"
  25740. },
  25741. "providerMetadata": {
  25742. "$ref": "#/components/schemas/LLMProviderMetadata"
  25743. }
  25744. },
  25745. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  25746. "additionalProperties": false
  25747. }
  25748. },
  25749. "required": ["type", "id", "seq", "aggregateID", "data"],
  25750. "additionalProperties": false
  25751. }
  25752. },
  25753. "required": ["type", "id", "syncEvent"],
  25754. "additionalProperties": false
  25755. },
  25756. "SyncEventSessionNextReasoningEnded": {
  25757. "type": "object",
  25758. "properties": {
  25759. "type": {
  25760. "type": "string",
  25761. "enum": ["sync"]
  25762. },
  25763. "id": {
  25764. "type": "string",
  25765. "pattern": "^evt_"
  25766. },
  25767. "syncEvent": {
  25768. "type": "object",
  25769. "properties": {
  25770. "type": {
  25771. "type": "string",
  25772. "enum": ["session.next.reasoning.ended.1"]
  25773. },
  25774. "id": {
  25775. "type": "string",
  25776. "pattern": "^evt_"
  25777. },
  25778. "seq": {
  25779. "type": "number"
  25780. },
  25781. "aggregateID": {
  25782. "type": "string"
  25783. },
  25784. "data": {
  25785. "type": "object",
  25786. "properties": {
  25787. "timestamp": {
  25788. "type": "number"
  25789. },
  25790. "sessionID": {
  25791. "type": "string",
  25792. "pattern": "^ses"
  25793. },
  25794. "assistantMessageID": {
  25795. "type": "string",
  25796. "pattern": "^msg_"
  25797. },
  25798. "reasoningID": {
  25799. "type": "string"
  25800. },
  25801. "text": {
  25802. "type": "string"
  25803. },
  25804. "providerMetadata": {
  25805. "$ref": "#/components/schemas/LLMProviderMetadata"
  25806. }
  25807. },
  25808. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  25809. "additionalProperties": false
  25810. }
  25811. },
  25812. "required": ["type", "id", "seq", "aggregateID", "data"],
  25813. "additionalProperties": false
  25814. }
  25815. },
  25816. "required": ["type", "id", "syncEvent"],
  25817. "additionalProperties": false
  25818. },
  25819. "SyncEventSessionNextToolInputStarted": {
  25820. "type": "object",
  25821. "properties": {
  25822. "type": {
  25823. "type": "string",
  25824. "enum": ["sync"]
  25825. },
  25826. "id": {
  25827. "type": "string",
  25828. "pattern": "^evt_"
  25829. },
  25830. "syncEvent": {
  25831. "type": "object",
  25832. "properties": {
  25833. "type": {
  25834. "type": "string",
  25835. "enum": ["session.next.tool.input.started.1"]
  25836. },
  25837. "id": {
  25838. "type": "string",
  25839. "pattern": "^evt_"
  25840. },
  25841. "seq": {
  25842. "type": "number"
  25843. },
  25844. "aggregateID": {
  25845. "type": "string"
  25846. },
  25847. "data": {
  25848. "type": "object",
  25849. "properties": {
  25850. "timestamp": {
  25851. "type": "number"
  25852. },
  25853. "sessionID": {
  25854. "type": "string",
  25855. "pattern": "^ses"
  25856. },
  25857. "assistantMessageID": {
  25858. "type": "string",
  25859. "pattern": "^msg_"
  25860. },
  25861. "callID": {
  25862. "type": "string"
  25863. },
  25864. "name": {
  25865. "type": "string"
  25866. }
  25867. },
  25868. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  25869. "additionalProperties": false
  25870. }
  25871. },
  25872. "required": ["type", "id", "seq", "aggregateID", "data"],
  25873. "additionalProperties": false
  25874. }
  25875. },
  25876. "required": ["type", "id", "syncEvent"],
  25877. "additionalProperties": false
  25878. },
  25879. "SyncEventSessionNextToolInputEnded": {
  25880. "type": "object",
  25881. "properties": {
  25882. "type": {
  25883. "type": "string",
  25884. "enum": ["sync"]
  25885. },
  25886. "id": {
  25887. "type": "string",
  25888. "pattern": "^evt_"
  25889. },
  25890. "syncEvent": {
  25891. "type": "object",
  25892. "properties": {
  25893. "type": {
  25894. "type": "string",
  25895. "enum": ["session.next.tool.input.ended.1"]
  25896. },
  25897. "id": {
  25898. "type": "string",
  25899. "pattern": "^evt_"
  25900. },
  25901. "seq": {
  25902. "type": "number"
  25903. },
  25904. "aggregateID": {
  25905. "type": "string"
  25906. },
  25907. "data": {
  25908. "type": "object",
  25909. "properties": {
  25910. "timestamp": {
  25911. "type": "number"
  25912. },
  25913. "sessionID": {
  25914. "type": "string",
  25915. "pattern": "^ses"
  25916. },
  25917. "assistantMessageID": {
  25918. "type": "string",
  25919. "pattern": "^msg_"
  25920. },
  25921. "callID": {
  25922. "type": "string"
  25923. },
  25924. "text": {
  25925. "type": "string"
  25926. }
  25927. },
  25928. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  25929. "additionalProperties": false
  25930. }
  25931. },
  25932. "required": ["type", "id", "seq", "aggregateID", "data"],
  25933. "additionalProperties": false
  25934. }
  25935. },
  25936. "required": ["type", "id", "syncEvent"],
  25937. "additionalProperties": false
  25938. },
  25939. "SyncEventSessionNextToolCalled": {
  25940. "type": "object",
  25941. "properties": {
  25942. "type": {
  25943. "type": "string",
  25944. "enum": ["sync"]
  25945. },
  25946. "id": {
  25947. "type": "string",
  25948. "pattern": "^evt_"
  25949. },
  25950. "syncEvent": {
  25951. "type": "object",
  25952. "properties": {
  25953. "type": {
  25954. "type": "string",
  25955. "enum": ["session.next.tool.called.1"]
  25956. },
  25957. "id": {
  25958. "type": "string",
  25959. "pattern": "^evt_"
  25960. },
  25961. "seq": {
  25962. "type": "number"
  25963. },
  25964. "aggregateID": {
  25965. "type": "string"
  25966. },
  25967. "data": {
  25968. "type": "object",
  25969. "properties": {
  25970. "timestamp": {
  25971. "type": "number"
  25972. },
  25973. "sessionID": {
  25974. "type": "string",
  25975. "pattern": "^ses"
  25976. },
  25977. "assistantMessageID": {
  25978. "type": "string",
  25979. "pattern": "^msg_"
  25980. },
  25981. "callID": {
  25982. "type": "string"
  25983. },
  25984. "tool": {
  25985. "type": "string"
  25986. },
  25987. "input": {
  25988. "type": "object"
  25989. },
  25990. "provider": {
  25991. "type": "object",
  25992. "properties": {
  25993. "executed": {
  25994. "type": "boolean"
  25995. },
  25996. "metadata": {
  25997. "$ref": "#/components/schemas/LLMProviderMetadata"
  25998. }
  25999. },
  26000. "required": ["executed"],
  26001. "additionalProperties": false
  26002. }
  26003. },
  26004. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  26005. "additionalProperties": false
  26006. }
  26007. },
  26008. "required": ["type", "id", "seq", "aggregateID", "data"],
  26009. "additionalProperties": false
  26010. }
  26011. },
  26012. "required": ["type", "id", "syncEvent"],
  26013. "additionalProperties": false
  26014. },
  26015. "SyncEventSessionNextToolProgress": {
  26016. "type": "object",
  26017. "properties": {
  26018. "type": {
  26019. "type": "string",
  26020. "enum": ["sync"]
  26021. },
  26022. "id": {
  26023. "type": "string",
  26024. "pattern": "^evt_"
  26025. },
  26026. "syncEvent": {
  26027. "type": "object",
  26028. "properties": {
  26029. "type": {
  26030. "type": "string",
  26031. "enum": ["session.next.tool.progress.1"]
  26032. },
  26033. "id": {
  26034. "type": "string",
  26035. "pattern": "^evt_"
  26036. },
  26037. "seq": {
  26038. "type": "number"
  26039. },
  26040. "aggregateID": {
  26041. "type": "string"
  26042. },
  26043. "data": {
  26044. "type": "object",
  26045. "properties": {
  26046. "timestamp": {
  26047. "type": "number"
  26048. },
  26049. "sessionID": {
  26050. "type": "string",
  26051. "pattern": "^ses"
  26052. },
  26053. "assistantMessageID": {
  26054. "type": "string",
  26055. "pattern": "^msg_"
  26056. },
  26057. "callID": {
  26058. "type": "string"
  26059. },
  26060. "structured": {
  26061. "type": "object"
  26062. },
  26063. "content": {
  26064. "type": "array",
  26065. "items": {
  26066. "$ref": "#/components/schemas/LLMToolContent"
  26067. }
  26068. }
  26069. },
  26070. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  26071. "additionalProperties": false
  26072. }
  26073. },
  26074. "required": ["type", "id", "seq", "aggregateID", "data"],
  26075. "additionalProperties": false
  26076. }
  26077. },
  26078. "required": ["type", "id", "syncEvent"],
  26079. "additionalProperties": false
  26080. },
  26081. "SyncEventSessionNextToolSuccess": {
  26082. "type": "object",
  26083. "properties": {
  26084. "type": {
  26085. "type": "string",
  26086. "enum": ["sync"]
  26087. },
  26088. "id": {
  26089. "type": "string",
  26090. "pattern": "^evt_"
  26091. },
  26092. "syncEvent": {
  26093. "type": "object",
  26094. "properties": {
  26095. "type": {
  26096. "type": "string",
  26097. "enum": ["session.next.tool.success.1"]
  26098. },
  26099. "id": {
  26100. "type": "string",
  26101. "pattern": "^evt_"
  26102. },
  26103. "seq": {
  26104. "type": "number"
  26105. },
  26106. "aggregateID": {
  26107. "type": "string"
  26108. },
  26109. "data": {
  26110. "type": "object",
  26111. "properties": {
  26112. "timestamp": {
  26113. "type": "number"
  26114. },
  26115. "sessionID": {
  26116. "type": "string",
  26117. "pattern": "^ses"
  26118. },
  26119. "assistantMessageID": {
  26120. "type": "string",
  26121. "pattern": "^msg_"
  26122. },
  26123. "callID": {
  26124. "type": "string"
  26125. },
  26126. "structured": {
  26127. "type": "object"
  26128. },
  26129. "content": {
  26130. "type": "array",
  26131. "items": {
  26132. "$ref": "#/components/schemas/LLMToolContent"
  26133. }
  26134. },
  26135. "outputPaths": {
  26136. "type": "array",
  26137. "items": {
  26138. "type": "string"
  26139. }
  26140. },
  26141. "result": {},
  26142. "provider": {
  26143. "type": "object",
  26144. "properties": {
  26145. "executed": {
  26146. "type": "boolean"
  26147. },
  26148. "metadata": {
  26149. "$ref": "#/components/schemas/LLMProviderMetadata"
  26150. }
  26151. },
  26152. "required": ["executed"],
  26153. "additionalProperties": false
  26154. }
  26155. },
  26156. "required": [
  26157. "timestamp",
  26158. "sessionID",
  26159. "assistantMessageID",
  26160. "callID",
  26161. "structured",
  26162. "content",
  26163. "provider"
  26164. ],
  26165. "additionalProperties": false
  26166. }
  26167. },
  26168. "required": ["type", "id", "seq", "aggregateID", "data"],
  26169. "additionalProperties": false
  26170. }
  26171. },
  26172. "required": ["type", "id", "syncEvent"],
  26173. "additionalProperties": false
  26174. },
  26175. "SyncEventSessionNextToolFailed": {
  26176. "type": "object",
  26177. "properties": {
  26178. "type": {
  26179. "type": "string",
  26180. "enum": ["sync"]
  26181. },
  26182. "id": {
  26183. "type": "string",
  26184. "pattern": "^evt_"
  26185. },
  26186. "syncEvent": {
  26187. "type": "object",
  26188. "properties": {
  26189. "type": {
  26190. "type": "string",
  26191. "enum": ["session.next.tool.failed.1"]
  26192. },
  26193. "id": {
  26194. "type": "string",
  26195. "pattern": "^evt_"
  26196. },
  26197. "seq": {
  26198. "type": "number"
  26199. },
  26200. "aggregateID": {
  26201. "type": "string"
  26202. },
  26203. "data": {
  26204. "type": "object",
  26205. "properties": {
  26206. "timestamp": {
  26207. "type": "number"
  26208. },
  26209. "sessionID": {
  26210. "type": "string",
  26211. "pattern": "^ses"
  26212. },
  26213. "assistantMessageID": {
  26214. "type": "string",
  26215. "pattern": "^msg_"
  26216. },
  26217. "callID": {
  26218. "type": "string"
  26219. },
  26220. "error": {
  26221. "$ref": "#/components/schemas/SessionErrorUnknown"
  26222. },
  26223. "result": {},
  26224. "provider": {
  26225. "type": "object",
  26226. "properties": {
  26227. "executed": {
  26228. "type": "boolean"
  26229. },
  26230. "metadata": {
  26231. "$ref": "#/components/schemas/LLMProviderMetadata"
  26232. }
  26233. },
  26234. "required": ["executed"],
  26235. "additionalProperties": false
  26236. }
  26237. },
  26238. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  26239. "additionalProperties": false
  26240. }
  26241. },
  26242. "required": ["type", "id", "seq", "aggregateID", "data"],
  26243. "additionalProperties": false
  26244. }
  26245. },
  26246. "required": ["type", "id", "syncEvent"],
  26247. "additionalProperties": false
  26248. },
  26249. "SyncEventSessionNextRetried": {
  26250. "type": "object",
  26251. "properties": {
  26252. "type": {
  26253. "type": "string",
  26254. "enum": ["sync"]
  26255. },
  26256. "id": {
  26257. "type": "string",
  26258. "pattern": "^evt_"
  26259. },
  26260. "syncEvent": {
  26261. "type": "object",
  26262. "properties": {
  26263. "type": {
  26264. "type": "string",
  26265. "enum": ["session.next.retried.1"]
  26266. },
  26267. "id": {
  26268. "type": "string",
  26269. "pattern": "^evt_"
  26270. },
  26271. "seq": {
  26272. "type": "number"
  26273. },
  26274. "aggregateID": {
  26275. "type": "string"
  26276. },
  26277. "data": {
  26278. "type": "object",
  26279. "properties": {
  26280. "timestamp": {
  26281. "type": "number"
  26282. },
  26283. "sessionID": {
  26284. "type": "string",
  26285. "pattern": "^ses"
  26286. },
  26287. "attempt": {
  26288. "type": "number"
  26289. },
  26290. "error": {
  26291. "$ref": "#/components/schemas/SessionNextRetry_error"
  26292. }
  26293. },
  26294. "required": ["timestamp", "sessionID", "attempt", "error"],
  26295. "additionalProperties": false
  26296. }
  26297. },
  26298. "required": ["type", "id", "seq", "aggregateID", "data"],
  26299. "additionalProperties": false
  26300. }
  26301. },
  26302. "required": ["type", "id", "syncEvent"],
  26303. "additionalProperties": false
  26304. },
  26305. "SyncEventSessionNextCompactionStarted": {
  26306. "type": "object",
  26307. "properties": {
  26308. "type": {
  26309. "type": "string",
  26310. "enum": ["sync"]
  26311. },
  26312. "id": {
  26313. "type": "string",
  26314. "pattern": "^evt_"
  26315. },
  26316. "syncEvent": {
  26317. "type": "object",
  26318. "properties": {
  26319. "type": {
  26320. "type": "string",
  26321. "enum": ["session.next.compaction.started.1"]
  26322. },
  26323. "id": {
  26324. "type": "string",
  26325. "pattern": "^evt_"
  26326. },
  26327. "seq": {
  26328. "type": "number"
  26329. },
  26330. "aggregateID": {
  26331. "type": "string"
  26332. },
  26333. "data": {
  26334. "type": "object",
  26335. "properties": {
  26336. "timestamp": {
  26337. "type": "number"
  26338. },
  26339. "sessionID": {
  26340. "type": "string",
  26341. "pattern": "^ses"
  26342. },
  26343. "messageID": {
  26344. "type": "string",
  26345. "pattern": "^msg_"
  26346. },
  26347. "reason": {
  26348. "type": "string",
  26349. "enum": ["auto", "manual"]
  26350. }
  26351. },
  26352. "required": ["timestamp", "sessionID", "messageID", "reason"],
  26353. "additionalProperties": false
  26354. }
  26355. },
  26356. "required": ["type", "id", "seq", "aggregateID", "data"],
  26357. "additionalProperties": false
  26358. }
  26359. },
  26360. "required": ["type", "id", "syncEvent"],
  26361. "additionalProperties": false
  26362. },
  26363. "SyncEventSessionNextCompactionEnded": {
  26364. "type": "object",
  26365. "properties": {
  26366. "type": {
  26367. "type": "string",
  26368. "enum": ["sync"]
  26369. },
  26370. "id": {
  26371. "type": "string",
  26372. "pattern": "^evt_"
  26373. },
  26374. "syncEvent": {
  26375. "type": "object",
  26376. "properties": {
  26377. "type": {
  26378. "type": "string",
  26379. "enum": ["session.next.compaction.ended.1"]
  26380. },
  26381. "id": {
  26382. "type": "string",
  26383. "pattern": "^evt_"
  26384. },
  26385. "seq": {
  26386. "type": "number"
  26387. },
  26388. "aggregateID": {
  26389. "type": "string"
  26390. },
  26391. "data": {
  26392. "type": "object",
  26393. "properties": {
  26394. "timestamp": {
  26395. "type": "number"
  26396. },
  26397. "sessionID": {
  26398. "type": "string",
  26399. "pattern": "^ses"
  26400. },
  26401. "messageID": {
  26402. "type": "string",
  26403. "pattern": "^msg_"
  26404. },
  26405. "reason": {
  26406. "type": "string",
  26407. "enum": ["auto", "manual"]
  26408. },
  26409. "text": {
  26410. "type": "string"
  26411. },
  26412. "recent": {
  26413. "type": "string"
  26414. }
  26415. },
  26416. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  26417. "additionalProperties": false
  26418. }
  26419. },
  26420. "required": ["type", "id", "seq", "aggregateID", "data"],
  26421. "additionalProperties": false
  26422. }
  26423. },
  26424. "required": ["type", "id", "syncEvent"],
  26425. "additionalProperties": false
  26426. },
  26427. "SyncEventSessionNextRevertStaged": {
  26428. "type": "object",
  26429. "properties": {
  26430. "type": {
  26431. "type": "string",
  26432. "enum": ["sync"]
  26433. },
  26434. "id": {
  26435. "type": "string",
  26436. "pattern": "^evt_"
  26437. },
  26438. "syncEvent": {
  26439. "type": "object",
  26440. "properties": {
  26441. "type": {
  26442. "type": "string",
  26443. "enum": ["session.next.revert.staged.1"]
  26444. },
  26445. "id": {
  26446. "type": "string",
  26447. "pattern": "^evt_"
  26448. },
  26449. "seq": {
  26450. "type": "number"
  26451. },
  26452. "aggregateID": {
  26453. "type": "string"
  26454. },
  26455. "data": {
  26456. "type": "object",
  26457. "properties": {
  26458. "timestamp": {
  26459. "type": "number"
  26460. },
  26461. "sessionID": {
  26462. "type": "string",
  26463. "pattern": "^ses"
  26464. },
  26465. "revert": {
  26466. "$ref": "#/components/schemas/RevertState"
  26467. }
  26468. },
  26469. "required": ["timestamp", "sessionID", "revert"],
  26470. "additionalProperties": false
  26471. }
  26472. },
  26473. "required": ["type", "id", "seq", "aggregateID", "data"],
  26474. "additionalProperties": false
  26475. }
  26476. },
  26477. "required": ["type", "id", "syncEvent"],
  26478. "additionalProperties": false
  26479. },
  26480. "SyncEventSessionNextRevertCleared": {
  26481. "type": "object",
  26482. "properties": {
  26483. "type": {
  26484. "type": "string",
  26485. "enum": ["sync"]
  26486. },
  26487. "id": {
  26488. "type": "string",
  26489. "pattern": "^evt_"
  26490. },
  26491. "syncEvent": {
  26492. "type": "object",
  26493. "properties": {
  26494. "type": {
  26495. "type": "string",
  26496. "enum": ["session.next.revert.cleared.1"]
  26497. },
  26498. "id": {
  26499. "type": "string",
  26500. "pattern": "^evt_"
  26501. },
  26502. "seq": {
  26503. "type": "number"
  26504. },
  26505. "aggregateID": {
  26506. "type": "string"
  26507. },
  26508. "data": {
  26509. "type": "object",
  26510. "properties": {
  26511. "timestamp": {
  26512. "type": "number"
  26513. },
  26514. "sessionID": {
  26515. "type": "string",
  26516. "pattern": "^ses"
  26517. }
  26518. },
  26519. "required": ["timestamp", "sessionID"],
  26520. "additionalProperties": false
  26521. }
  26522. },
  26523. "required": ["type", "id", "seq", "aggregateID", "data"],
  26524. "additionalProperties": false
  26525. }
  26526. },
  26527. "required": ["type", "id", "syncEvent"],
  26528. "additionalProperties": false
  26529. },
  26530. "SyncEventSessionNextRevertCommitted": {
  26531. "type": "object",
  26532. "properties": {
  26533. "type": {
  26534. "type": "string",
  26535. "enum": ["sync"]
  26536. },
  26537. "id": {
  26538. "type": "string",
  26539. "pattern": "^evt_"
  26540. },
  26541. "syncEvent": {
  26542. "type": "object",
  26543. "properties": {
  26544. "type": {
  26545. "type": "string",
  26546. "enum": ["session.next.revert.committed.1"]
  26547. },
  26548. "id": {
  26549. "type": "string",
  26550. "pattern": "^evt_"
  26551. },
  26552. "seq": {
  26553. "type": "number"
  26554. },
  26555. "aggregateID": {
  26556. "type": "string"
  26557. },
  26558. "data": {
  26559. "type": "object",
  26560. "properties": {
  26561. "timestamp": {
  26562. "type": "number"
  26563. },
  26564. "sessionID": {
  26565. "type": "string",
  26566. "pattern": "^ses"
  26567. },
  26568. "messageID": {
  26569. "type": "string",
  26570. "pattern": "^msg_"
  26571. }
  26572. },
  26573. "required": ["timestamp", "sessionID", "messageID"],
  26574. "additionalProperties": false
  26575. }
  26576. },
  26577. "required": ["type", "id", "seq", "aggregateID", "data"],
  26578. "additionalProperties": false
  26579. }
  26580. },
  26581. "required": ["type", "id", "syncEvent"],
  26582. "additionalProperties": false
  26583. },
  26584. "ConfigV2ReferenceGit": {
  26585. "type": "object",
  26586. "properties": {
  26587. "repository": {
  26588. "type": "string"
  26589. },
  26590. "branch": {
  26591. "type": "string"
  26592. },
  26593. "description": {
  26594. "type": "string"
  26595. },
  26596. "hidden": {
  26597. "type": "boolean"
  26598. }
  26599. },
  26600. "required": ["repository"],
  26601. "additionalProperties": false
  26602. },
  26603. "ConfigV2ReferenceLocal": {
  26604. "type": "object",
  26605. "properties": {
  26606. "path": {
  26607. "type": "string"
  26608. },
  26609. "description": {
  26610. "type": "string"
  26611. },
  26612. "hidden": {
  26613. "type": "boolean"
  26614. }
  26615. },
  26616. "required": ["path"],
  26617. "additionalProperties": false
  26618. },
  26619. "PolicyEffect": {
  26620. "type": "string",
  26621. "enum": ["allow", "deny"]
  26622. },
  26623. "ConfigV2ExperimentalPolicy": {
  26624. "type": "object",
  26625. "properties": {
  26626. "action": {
  26627. "type": "string",
  26628. "enum": ["provider.use"]
  26629. },
  26630. "effect": {
  26631. "$ref": "#/components/schemas/PolicyEffect"
  26632. },
  26633. "resource": {
  26634. "type": "string"
  26635. }
  26636. },
  26637. "required": ["action", "effect", "resource"],
  26638. "additionalProperties": false
  26639. },
  26640. "ProjectDirectories": {
  26641. "type": "array",
  26642. "items": {
  26643. "type": "object",
  26644. "properties": {
  26645. "directory": {
  26646. "type": "string"
  26647. },
  26648. "strategy": {
  26649. "type": "string"
  26650. }
  26651. },
  26652. "required": ["directory"],
  26653. "additionalProperties": false
  26654. }
  26655. },
  26656. "PtyTicketConnectToken": {
  26657. "type": "object",
  26658. "properties": {
  26659. "ticket": {
  26660. "type": "string"
  26661. },
  26662. "expires_in": {
  26663. "type": "integer",
  26664. "exclusiveMinimum": 0
  26665. }
  26666. },
  26667. "required": ["ticket", "expires_in"],
  26668. "additionalProperties": false
  26669. },
  26670. "WorkspaceEventConnectionStatus": {
  26671. "type": "object",
  26672. "properties": {
  26673. "workspaceID": {
  26674. "type": "string",
  26675. "pattern": "^wrk"
  26676. },
  26677. "status": {
  26678. "type": "string",
  26679. "enum": ["connected", "connecting", "disconnected", "error"]
  26680. }
  26681. },
  26682. "required": ["workspaceID", "status"],
  26683. "additionalProperties": false
  26684. },
  26685. "LocationInfo": {
  26686. "type": "object",
  26687. "properties": {
  26688. "directory": {
  26689. "type": "string"
  26690. },
  26691. "workspaceID": {
  26692. "type": "string",
  26693. "pattern": "^wrk"
  26694. },
  26695. "project": {
  26696. "type": "object",
  26697. "properties": {
  26698. "id": {
  26699. "type": "string"
  26700. },
  26701. "directory": {
  26702. "type": "string"
  26703. }
  26704. },
  26705. "required": ["id", "directory"],
  26706. "additionalProperties": false
  26707. }
  26708. },
  26709. "required": ["directory", "project"],
  26710. "additionalProperties": false
  26711. },
  26712. "ProviderRequest": {
  26713. "type": "object",
  26714. "properties": {
  26715. "headers": {
  26716. "type": "object",
  26717. "additionalProperties": {
  26718. "type": "string"
  26719. }
  26720. },
  26721. "body": {
  26722. "type": "object"
  26723. }
  26724. },
  26725. "required": ["headers", "body"],
  26726. "additionalProperties": false
  26727. },
  26728. "AgentColor": {
  26729. "anyOf": [
  26730. {
  26731. "type": "string",
  26732. "pattern": "^#[0-9a-fA-F]{6}$"
  26733. },
  26734. {
  26735. "type": "string",
  26736. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  26737. }
  26738. ]
  26739. },
  26740. "PermissionV2Effect": {
  26741. "type": "string",
  26742. "enum": ["allow", "deny", "ask"]
  26743. },
  26744. "PermissionV2Rule": {
  26745. "type": "object",
  26746. "properties": {
  26747. "action": {
  26748. "type": "string"
  26749. },
  26750. "resource": {
  26751. "type": "string"
  26752. },
  26753. "effect": {
  26754. "$ref": "#/components/schemas/PermissionV2Effect"
  26755. }
  26756. },
  26757. "required": ["action", "resource", "effect"],
  26758. "additionalProperties": false
  26759. },
  26760. "PermissionV2Ruleset": {
  26761. "type": "array",
  26762. "items": {
  26763. "$ref": "#/components/schemas/PermissionV2Rule"
  26764. }
  26765. },
  26766. "AgentV2Info": {
  26767. "type": "object",
  26768. "properties": {
  26769. "id": {
  26770. "type": "string"
  26771. },
  26772. "model": {
  26773. "$ref": "#/components/schemas/ModelRef"
  26774. },
  26775. "request": {
  26776. "$ref": "#/components/schemas/ProviderRequest"
  26777. },
  26778. "system": {
  26779. "type": "string"
  26780. },
  26781. "description": {
  26782. "type": "string"
  26783. },
  26784. "mode": {
  26785. "type": "string",
  26786. "enum": ["subagent", "primary", "all"]
  26787. },
  26788. "hidden": {
  26789. "type": "boolean"
  26790. },
  26791. "color": {
  26792. "$ref": "#/components/schemas/AgentColor"
  26793. },
  26794. "steps": {
  26795. "type": "integer",
  26796. "exclusiveMinimum": 0
  26797. },
  26798. "permissions": {
  26799. "$ref": "#/components/schemas/PermissionV2Ruleset"
  26800. }
  26801. },
  26802. "required": ["id", "request", "mode", "hidden", "permissions"],
  26803. "additionalProperties": false
  26804. },
  26805. "SessionV2Info": {
  26806. "type": "object",
  26807. "properties": {
  26808. "id": {
  26809. "type": "string",
  26810. "pattern": "^ses"
  26811. },
  26812. "parentID": {
  26813. "type": "string",
  26814. "pattern": "^ses"
  26815. },
  26816. "projectID": {
  26817. "type": "string"
  26818. },
  26819. "agent": {
  26820. "type": "string"
  26821. },
  26822. "model": {
  26823. "$ref": "#/components/schemas/ModelRef"
  26824. },
  26825. "cost": {
  26826. "type": "number"
  26827. },
  26828. "tokens": {
  26829. "type": "object",
  26830. "properties": {
  26831. "input": {
  26832. "type": "number"
  26833. },
  26834. "output": {
  26835. "type": "number"
  26836. },
  26837. "reasoning": {
  26838. "type": "number"
  26839. },
  26840. "cache": {
  26841. "type": "object",
  26842. "properties": {
  26843. "read": {
  26844. "type": "number"
  26845. },
  26846. "write": {
  26847. "type": "number"
  26848. }
  26849. },
  26850. "required": ["read", "write"],
  26851. "additionalProperties": false
  26852. }
  26853. },
  26854. "required": ["input", "output", "reasoning", "cache"],
  26855. "additionalProperties": false
  26856. },
  26857. "time": {
  26858. "type": "object",
  26859. "properties": {
  26860. "created": {
  26861. "type": "number"
  26862. },
  26863. "updated": {
  26864. "type": "number"
  26865. },
  26866. "archived": {
  26867. "type": "number"
  26868. }
  26869. },
  26870. "required": ["created", "updated"],
  26871. "additionalProperties": false
  26872. },
  26873. "title": {
  26874. "type": "string"
  26875. },
  26876. "location": {
  26877. "$ref": "#/components/schemas/LocationRef"
  26878. },
  26879. "subpath": {
  26880. "type": "string"
  26881. },
  26882. "revert": {
  26883. "$ref": "#/components/schemas/RevertState"
  26884. }
  26885. },
  26886. "required": ["id", "projectID", "cost", "tokens", "time", "title", "location"],
  26887. "additionalProperties": false
  26888. },
  26889. "SessionInputAdmitted": {
  26890. "type": "object",
  26891. "properties": {
  26892. "admittedSeq": {
  26893. "type": "integer",
  26894. "minimum": 0
  26895. },
  26896. "id": {
  26897. "type": "string",
  26898. "pattern": "^msg_"
  26899. },
  26900. "sessionID": {
  26901. "type": "string",
  26902. "pattern": "^ses"
  26903. },
  26904. "prompt": {
  26905. "$ref": "#/components/schemas/Prompt"
  26906. },
  26907. "delivery": {
  26908. "type": "string",
  26909. "enum": ["steer", "queue"]
  26910. },
  26911. "timeCreated": {
  26912. "type": "number"
  26913. },
  26914. "promotedSeq": {
  26915. "type": "integer",
  26916. "minimum": 0
  26917. }
  26918. },
  26919. "required": ["admittedSeq", "id", "sessionID", "prompt", "delivery", "timeCreated"],
  26920. "additionalProperties": false
  26921. },
  26922. "SessionMessageAgentSwitched": {
  26923. "type": "object",
  26924. "properties": {
  26925. "id": {
  26926. "type": "string",
  26927. "pattern": "^msg_"
  26928. },
  26929. "metadata": {
  26930. "type": "object"
  26931. },
  26932. "time": {
  26933. "type": "object",
  26934. "properties": {
  26935. "created": {
  26936. "type": "number"
  26937. }
  26938. },
  26939. "required": ["created"],
  26940. "additionalProperties": false
  26941. },
  26942. "type": {
  26943. "type": "string",
  26944. "enum": ["agent-switched"]
  26945. },
  26946. "agent": {
  26947. "type": "string"
  26948. }
  26949. },
  26950. "required": ["id", "time", "type", "agent"],
  26951. "additionalProperties": false
  26952. },
  26953. "SessionMessageModelSwitched": {
  26954. "type": "object",
  26955. "properties": {
  26956. "id": {
  26957. "type": "string",
  26958. "pattern": "^msg_"
  26959. },
  26960. "metadata": {
  26961. "type": "object"
  26962. },
  26963. "time": {
  26964. "type": "object",
  26965. "properties": {
  26966. "created": {
  26967. "type": "number"
  26968. }
  26969. },
  26970. "required": ["created"],
  26971. "additionalProperties": false
  26972. },
  26973. "type": {
  26974. "type": "string",
  26975. "enum": ["model-switched"]
  26976. },
  26977. "model": {
  26978. "$ref": "#/components/schemas/ModelRef"
  26979. }
  26980. },
  26981. "required": ["id", "time", "type", "model"],
  26982. "additionalProperties": false
  26983. },
  26984. "SessionMessageUser": {
  26985. "type": "object",
  26986. "properties": {
  26987. "id": {
  26988. "type": "string",
  26989. "pattern": "^msg_"
  26990. },
  26991. "metadata": {
  26992. "type": "object"
  26993. },
  26994. "time": {
  26995. "type": "object",
  26996. "properties": {
  26997. "created": {
  26998. "type": "number"
  26999. }
  27000. },
  27001. "required": ["created"],
  27002. "additionalProperties": false
  27003. },
  27004. "text": {
  27005. "type": "string"
  27006. },
  27007. "files": {
  27008. "type": "array",
  27009. "items": {
  27010. "$ref": "#/components/schemas/PromptFileAttachment"
  27011. }
  27012. },
  27013. "agents": {
  27014. "type": "array",
  27015. "items": {
  27016. "$ref": "#/components/schemas/PromptAgentAttachment"
  27017. }
  27018. },
  27019. "type": {
  27020. "type": "string",
  27021. "enum": ["user"]
  27022. }
  27023. },
  27024. "required": ["id", "time", "text", "type"],
  27025. "additionalProperties": false
  27026. },
  27027. "SessionMessageSynthetic": {
  27028. "type": "object",
  27029. "properties": {
  27030. "id": {
  27031. "type": "string",
  27032. "pattern": "^msg_"
  27033. },
  27034. "metadata": {
  27035. "type": "object"
  27036. },
  27037. "time": {
  27038. "type": "object",
  27039. "properties": {
  27040. "created": {
  27041. "type": "number"
  27042. }
  27043. },
  27044. "required": ["created"],
  27045. "additionalProperties": false
  27046. },
  27047. "sessionID": {
  27048. "type": "string",
  27049. "pattern": "^ses"
  27050. },
  27051. "text": {
  27052. "type": "string"
  27053. },
  27054. "type": {
  27055. "type": "string",
  27056. "enum": ["synthetic"]
  27057. }
  27058. },
  27059. "required": ["id", "time", "sessionID", "text", "type"],
  27060. "additionalProperties": false
  27061. },
  27062. "SessionMessageSystem": {
  27063. "type": "object",
  27064. "properties": {
  27065. "id": {
  27066. "type": "string",
  27067. "pattern": "^msg_"
  27068. },
  27069. "metadata": {
  27070. "type": "object"
  27071. },
  27072. "time": {
  27073. "type": "object",
  27074. "properties": {
  27075. "created": {
  27076. "type": "number"
  27077. }
  27078. },
  27079. "required": ["created"],
  27080. "additionalProperties": false
  27081. },
  27082. "type": {
  27083. "type": "string",
  27084. "enum": ["system"]
  27085. },
  27086. "text": {
  27087. "type": "string"
  27088. }
  27089. },
  27090. "required": ["id", "time", "type", "text"],
  27091. "additionalProperties": false
  27092. },
  27093. "SessionMessageShell": {
  27094. "type": "object",
  27095. "properties": {
  27096. "id": {
  27097. "type": "string",
  27098. "pattern": "^msg_"
  27099. },
  27100. "metadata": {
  27101. "type": "object"
  27102. },
  27103. "time": {
  27104. "type": "object",
  27105. "properties": {
  27106. "created": {
  27107. "type": "number"
  27108. },
  27109. "completed": {
  27110. "type": "number"
  27111. }
  27112. },
  27113. "required": ["created"],
  27114. "additionalProperties": false
  27115. },
  27116. "type": {
  27117. "type": "string",
  27118. "enum": ["shell"]
  27119. },
  27120. "callID": {
  27121. "type": "string"
  27122. },
  27123. "command": {
  27124. "type": "string"
  27125. },
  27126. "output": {
  27127. "type": "string"
  27128. }
  27129. },
  27130. "required": ["id", "time", "type", "callID", "command", "output"],
  27131. "additionalProperties": false
  27132. },
  27133. "SessionMessageAssistantText": {
  27134. "type": "object",
  27135. "properties": {
  27136. "type": {
  27137. "type": "string",
  27138. "enum": ["text"]
  27139. },
  27140. "id": {
  27141. "type": "string"
  27142. },
  27143. "text": {
  27144. "type": "string"
  27145. }
  27146. },
  27147. "required": ["type", "id", "text"],
  27148. "additionalProperties": false
  27149. },
  27150. "SessionMessageAssistantReasoning": {
  27151. "type": "object",
  27152. "properties": {
  27153. "type": {
  27154. "type": "string",
  27155. "enum": ["reasoning"]
  27156. },
  27157. "id": {
  27158. "type": "string"
  27159. },
  27160. "text": {
  27161. "type": "string"
  27162. },
  27163. "providerMetadata": {
  27164. "$ref": "#/components/schemas/LLMProviderMetadata"
  27165. }
  27166. },
  27167. "required": ["type", "id", "text"],
  27168. "additionalProperties": false
  27169. },
  27170. "SessionMessageToolStatePending": {
  27171. "type": "object",
  27172. "properties": {
  27173. "status": {
  27174. "type": "string",
  27175. "enum": ["pending"]
  27176. },
  27177. "input": {
  27178. "type": "string"
  27179. }
  27180. },
  27181. "required": ["status", "input"],
  27182. "additionalProperties": false
  27183. },
  27184. "SessionMessageToolStateRunning": {
  27185. "type": "object",
  27186. "properties": {
  27187. "status": {
  27188. "type": "string",
  27189. "enum": ["running"]
  27190. },
  27191. "input": {
  27192. "type": "object"
  27193. },
  27194. "structured": {
  27195. "type": "object"
  27196. },
  27197. "content": {
  27198. "type": "array",
  27199. "items": {
  27200. "$ref": "#/components/schemas/LLMToolContent"
  27201. }
  27202. }
  27203. },
  27204. "required": ["status", "input", "structured", "content"],
  27205. "additionalProperties": false
  27206. },
  27207. "SessionMessageToolStateCompleted": {
  27208. "type": "object",
  27209. "properties": {
  27210. "status": {
  27211. "type": "string",
  27212. "enum": ["completed"]
  27213. },
  27214. "input": {
  27215. "type": "object"
  27216. },
  27217. "attachments": {
  27218. "type": "array",
  27219. "items": {
  27220. "$ref": "#/components/schemas/PromptFileAttachment"
  27221. }
  27222. },
  27223. "content": {
  27224. "type": "array",
  27225. "items": {
  27226. "$ref": "#/components/schemas/LLMToolContent"
  27227. }
  27228. },
  27229. "outputPaths": {
  27230. "type": "array",
  27231. "items": {
  27232. "type": "string"
  27233. }
  27234. },
  27235. "structured": {
  27236. "type": "object"
  27237. },
  27238. "result": {}
  27239. },
  27240. "required": ["status", "input", "content", "structured"],
  27241. "additionalProperties": false
  27242. },
  27243. "SessionMessageToolStateError": {
  27244. "type": "object",
  27245. "properties": {
  27246. "status": {
  27247. "type": "string",
  27248. "enum": ["error"]
  27249. },
  27250. "input": {
  27251. "type": "object"
  27252. },
  27253. "content": {
  27254. "type": "array",
  27255. "items": {
  27256. "$ref": "#/components/schemas/LLMToolContent"
  27257. }
  27258. },
  27259. "structured": {
  27260. "type": "object"
  27261. },
  27262. "error": {
  27263. "$ref": "#/components/schemas/SessionErrorUnknown"
  27264. },
  27265. "result": {}
  27266. },
  27267. "required": ["status", "input", "content", "structured", "error"],
  27268. "additionalProperties": false
  27269. },
  27270. "SessionMessageAssistantTool": {
  27271. "type": "object",
  27272. "properties": {
  27273. "type": {
  27274. "type": "string",
  27275. "enum": ["tool"]
  27276. },
  27277. "id": {
  27278. "type": "string"
  27279. },
  27280. "name": {
  27281. "type": "string"
  27282. },
  27283. "provider": {
  27284. "type": "object",
  27285. "properties": {
  27286. "executed": {
  27287. "type": "boolean"
  27288. },
  27289. "metadata": {
  27290. "$ref": "#/components/schemas/LLMProviderMetadata"
  27291. },
  27292. "resultMetadata": {
  27293. "$ref": "#/components/schemas/LLMProviderMetadata"
  27294. }
  27295. },
  27296. "required": ["executed"],
  27297. "additionalProperties": false
  27298. },
  27299. "state": {
  27300. "anyOf": [
  27301. {
  27302. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  27303. },
  27304. {
  27305. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  27306. },
  27307. {
  27308. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  27309. },
  27310. {
  27311. "$ref": "#/components/schemas/SessionMessageToolStateError"
  27312. }
  27313. ]
  27314. },
  27315. "time": {
  27316. "type": "object",
  27317. "properties": {
  27318. "created": {
  27319. "type": "number"
  27320. },
  27321. "ran": {
  27322. "type": "number"
  27323. },
  27324. "completed": {
  27325. "type": "number"
  27326. },
  27327. "pruned": {
  27328. "type": "number"
  27329. }
  27330. },
  27331. "required": ["created"],
  27332. "additionalProperties": false
  27333. }
  27334. },
  27335. "required": ["type", "id", "name", "state", "time"],
  27336. "additionalProperties": false
  27337. },
  27338. "SessionMessageAssistant": {
  27339. "type": "object",
  27340. "properties": {
  27341. "id": {
  27342. "type": "string",
  27343. "pattern": "^msg_"
  27344. },
  27345. "metadata": {
  27346. "type": "object"
  27347. },
  27348. "time": {
  27349. "type": "object",
  27350. "properties": {
  27351. "created": {
  27352. "type": "number"
  27353. },
  27354. "completed": {
  27355. "type": "number"
  27356. }
  27357. },
  27358. "required": ["created"],
  27359. "additionalProperties": false
  27360. },
  27361. "type": {
  27362. "type": "string",
  27363. "enum": ["assistant"]
  27364. },
  27365. "agent": {
  27366. "type": "string"
  27367. },
  27368. "model": {
  27369. "$ref": "#/components/schemas/ModelRef"
  27370. },
  27371. "content": {
  27372. "type": "array",
  27373. "items": {
  27374. "anyOf": [
  27375. {
  27376. "$ref": "#/components/schemas/SessionMessageAssistantText"
  27377. },
  27378. {
  27379. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  27380. },
  27381. {
  27382. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  27383. }
  27384. ]
  27385. }
  27386. },
  27387. "snapshot": {
  27388. "type": "object",
  27389. "properties": {
  27390. "start": {
  27391. "type": "string"
  27392. },
  27393. "end": {
  27394. "type": "string"
  27395. },
  27396. "files": {
  27397. "type": "array",
  27398. "items": {
  27399. "type": "string"
  27400. }
  27401. }
  27402. },
  27403. "additionalProperties": false
  27404. },
  27405. "finish": {
  27406. "type": "string"
  27407. },
  27408. "cost": {
  27409. "type": "number"
  27410. },
  27411. "tokens": {
  27412. "type": "object",
  27413. "properties": {
  27414. "input": {
  27415. "type": "number"
  27416. },
  27417. "output": {
  27418. "type": "number"
  27419. },
  27420. "reasoning": {
  27421. "type": "number"
  27422. },
  27423. "cache": {
  27424. "type": "object",
  27425. "properties": {
  27426. "read": {
  27427. "type": "number"
  27428. },
  27429. "write": {
  27430. "type": "number"
  27431. }
  27432. },
  27433. "required": ["read", "write"],
  27434. "additionalProperties": false
  27435. }
  27436. },
  27437. "required": ["input", "output", "reasoning", "cache"],
  27438. "additionalProperties": false
  27439. },
  27440. "error": {
  27441. "$ref": "#/components/schemas/SessionErrorUnknown"
  27442. }
  27443. },
  27444. "required": ["id", "time", "type", "agent", "model", "content"],
  27445. "additionalProperties": false
  27446. },
  27447. "SessionMessageCompaction": {
  27448. "type": "object",
  27449. "properties": {
  27450. "type": {
  27451. "type": "string",
  27452. "enum": ["compaction"]
  27453. },
  27454. "reason": {
  27455. "type": "string",
  27456. "enum": ["auto", "manual"]
  27457. },
  27458. "summary": {
  27459. "type": "string"
  27460. },
  27461. "recent": {
  27462. "type": "string"
  27463. },
  27464. "id": {
  27465. "type": "string",
  27466. "pattern": "^msg_"
  27467. },
  27468. "metadata": {
  27469. "type": "object"
  27470. },
  27471. "time": {
  27472. "type": "object",
  27473. "properties": {
  27474. "created": {
  27475. "type": "number"
  27476. }
  27477. },
  27478. "required": ["created"],
  27479. "additionalProperties": false
  27480. }
  27481. },
  27482. "required": ["type", "reason", "summary", "recent", "id", "time"],
  27483. "additionalProperties": false
  27484. },
  27485. "SessionMessage": {
  27486. "anyOf": [
  27487. {
  27488. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  27489. },
  27490. {
  27491. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  27492. },
  27493. {
  27494. "$ref": "#/components/schemas/SessionMessageUser"
  27495. },
  27496. {
  27497. "$ref": "#/components/schemas/SessionMessageSynthetic"
  27498. },
  27499. {
  27500. "$ref": "#/components/schemas/SessionMessageSystem"
  27501. },
  27502. {
  27503. "$ref": "#/components/schemas/SessionMessageShell"
  27504. },
  27505. {
  27506. "$ref": "#/components/schemas/SessionMessageAssistant"
  27507. },
  27508. {
  27509. "$ref": "#/components/schemas/SessionMessageCompaction"
  27510. }
  27511. ]
  27512. },
  27513. "SessionNextAgentSwitched": {
  27514. "type": "object",
  27515. "properties": {
  27516. "id": {
  27517. "type": "string",
  27518. "pattern": "^evt_"
  27519. },
  27520. "metadata": {
  27521. "type": "object"
  27522. },
  27523. "type": {
  27524. "type": "string",
  27525. "enum": ["session.next.agent.switched"]
  27526. },
  27527. "durable": {
  27528. "type": "object",
  27529. "properties": {
  27530. "aggregateID": {
  27531. "type": "string"
  27532. },
  27533. "seq": {
  27534. "anyOf": [
  27535. {
  27536. "type": "number"
  27537. },
  27538. {
  27539. "type": "string",
  27540. "enum": ["NaN"]
  27541. },
  27542. {
  27543. "type": "string",
  27544. "enum": ["Infinity"]
  27545. },
  27546. {
  27547. "type": "string",
  27548. "enum": ["-Infinity"]
  27549. }
  27550. ]
  27551. },
  27552. "version": {
  27553. "anyOf": [
  27554. {
  27555. "type": "number"
  27556. },
  27557. {
  27558. "type": "string",
  27559. "enum": ["NaN"]
  27560. },
  27561. {
  27562. "type": "string",
  27563. "enum": ["Infinity"]
  27564. },
  27565. {
  27566. "type": "string",
  27567. "enum": ["-Infinity"]
  27568. }
  27569. ]
  27570. }
  27571. },
  27572. "required": ["aggregateID", "seq", "version"],
  27573. "additionalProperties": false
  27574. },
  27575. "location": {
  27576. "$ref": "#/components/schemas/LocationRef"
  27577. },
  27578. "data": {
  27579. "type": "object",
  27580. "properties": {
  27581. "timestamp": {
  27582. "type": "number"
  27583. },
  27584. "sessionID": {
  27585. "type": "string",
  27586. "pattern": "^ses"
  27587. },
  27588. "messageID": {
  27589. "type": "string",
  27590. "pattern": "^msg_"
  27591. },
  27592. "agent": {
  27593. "type": "string"
  27594. }
  27595. },
  27596. "required": ["timestamp", "sessionID", "messageID", "agent"],
  27597. "additionalProperties": false
  27598. }
  27599. },
  27600. "required": ["id", "type", "data"],
  27601. "additionalProperties": false
  27602. },
  27603. "SessionNextModelSwitched": {
  27604. "type": "object",
  27605. "properties": {
  27606. "id": {
  27607. "type": "string",
  27608. "pattern": "^evt_"
  27609. },
  27610. "metadata": {
  27611. "type": "object"
  27612. },
  27613. "type": {
  27614. "type": "string",
  27615. "enum": ["session.next.model.switched"]
  27616. },
  27617. "durable": {
  27618. "type": "object",
  27619. "properties": {
  27620. "aggregateID": {
  27621. "type": "string"
  27622. },
  27623. "seq": {
  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. "version": {
  27643. "anyOf": [
  27644. {
  27645. "type": "number"
  27646. },
  27647. {
  27648. "type": "string",
  27649. "enum": ["NaN"]
  27650. },
  27651. {
  27652. "type": "string",
  27653. "enum": ["Infinity"]
  27654. },
  27655. {
  27656. "type": "string",
  27657. "enum": ["-Infinity"]
  27658. }
  27659. ]
  27660. }
  27661. },
  27662. "required": ["aggregateID", "seq", "version"],
  27663. "additionalProperties": false
  27664. },
  27665. "location": {
  27666. "$ref": "#/components/schemas/LocationRef"
  27667. },
  27668. "data": {
  27669. "type": "object",
  27670. "properties": {
  27671. "timestamp": {
  27672. "type": "number"
  27673. },
  27674. "sessionID": {
  27675. "type": "string",
  27676. "pattern": "^ses"
  27677. },
  27678. "messageID": {
  27679. "type": "string",
  27680. "pattern": "^msg_"
  27681. },
  27682. "model": {
  27683. "$ref": "#/components/schemas/ModelRef"
  27684. }
  27685. },
  27686. "required": ["timestamp", "sessionID", "messageID", "model"],
  27687. "additionalProperties": false
  27688. }
  27689. },
  27690. "required": ["id", "type", "data"],
  27691. "additionalProperties": false
  27692. },
  27693. "SessionNextMoved": {
  27694. "type": "object",
  27695. "properties": {
  27696. "id": {
  27697. "type": "string",
  27698. "pattern": "^evt_"
  27699. },
  27700. "metadata": {
  27701. "type": "object"
  27702. },
  27703. "type": {
  27704. "type": "string",
  27705. "enum": ["session.next.moved"]
  27706. },
  27707. "durable": {
  27708. "type": "object",
  27709. "properties": {
  27710. "aggregateID": {
  27711. "type": "string"
  27712. },
  27713. "seq": {
  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. "version": {
  27733. "anyOf": [
  27734. {
  27735. "type": "number"
  27736. },
  27737. {
  27738. "type": "string",
  27739. "enum": ["NaN"]
  27740. },
  27741. {
  27742. "type": "string",
  27743. "enum": ["Infinity"]
  27744. },
  27745. {
  27746. "type": "string",
  27747. "enum": ["-Infinity"]
  27748. }
  27749. ]
  27750. }
  27751. },
  27752. "required": ["aggregateID", "seq", "version"],
  27753. "additionalProperties": false
  27754. },
  27755. "location": {
  27756. "$ref": "#/components/schemas/LocationRef"
  27757. },
  27758. "data": {
  27759. "type": "object",
  27760. "properties": {
  27761. "timestamp": {
  27762. "type": "number"
  27763. },
  27764. "sessionID": {
  27765. "type": "string",
  27766. "pattern": "^ses"
  27767. },
  27768. "location": {
  27769. "$ref": "#/components/schemas/LocationRef"
  27770. },
  27771. "subdirectory": {
  27772. "type": "string"
  27773. }
  27774. },
  27775. "required": ["timestamp", "sessionID", "location"],
  27776. "additionalProperties": false
  27777. }
  27778. },
  27779. "required": ["id", "type", "data"],
  27780. "additionalProperties": false
  27781. },
  27782. "SessionNextPrompted": {
  27783. "type": "object",
  27784. "properties": {
  27785. "id": {
  27786. "type": "string",
  27787. "pattern": "^evt_"
  27788. },
  27789. "metadata": {
  27790. "type": "object"
  27791. },
  27792. "type": {
  27793. "type": "string",
  27794. "enum": ["session.next.prompted"]
  27795. },
  27796. "durable": {
  27797. "type": "object",
  27798. "properties": {
  27799. "aggregateID": {
  27800. "type": "string"
  27801. },
  27802. "seq": {
  27803. "anyOf": [
  27804. {
  27805. "type": "number"
  27806. },
  27807. {
  27808. "type": "string",
  27809. "enum": ["NaN"]
  27810. },
  27811. {
  27812. "type": "string",
  27813. "enum": ["Infinity"]
  27814. },
  27815. {
  27816. "type": "string",
  27817. "enum": ["-Infinity"]
  27818. }
  27819. ]
  27820. },
  27821. "version": {
  27822. "anyOf": [
  27823. {
  27824. "type": "number"
  27825. },
  27826. {
  27827. "type": "string",
  27828. "enum": ["NaN"]
  27829. },
  27830. {
  27831. "type": "string",
  27832. "enum": ["Infinity"]
  27833. },
  27834. {
  27835. "type": "string",
  27836. "enum": ["-Infinity"]
  27837. }
  27838. ]
  27839. }
  27840. },
  27841. "required": ["aggregateID", "seq", "version"],
  27842. "additionalProperties": false
  27843. },
  27844. "location": {
  27845. "$ref": "#/components/schemas/LocationRef"
  27846. },
  27847. "data": {
  27848. "type": "object",
  27849. "properties": {
  27850. "timestamp": {
  27851. "type": "number"
  27852. },
  27853. "sessionID": {
  27854. "type": "string",
  27855. "pattern": "^ses"
  27856. },
  27857. "messageID": {
  27858. "type": "string",
  27859. "pattern": "^msg_"
  27860. },
  27861. "prompt": {
  27862. "$ref": "#/components/schemas/Prompt"
  27863. },
  27864. "delivery": {
  27865. "type": "string",
  27866. "enum": ["steer", "queue"]
  27867. }
  27868. },
  27869. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  27870. "additionalProperties": false
  27871. }
  27872. },
  27873. "required": ["id", "type", "data"],
  27874. "additionalProperties": false
  27875. },
  27876. "SessionNextPromptAdmitted": {
  27877. "type": "object",
  27878. "properties": {
  27879. "id": {
  27880. "type": "string",
  27881. "pattern": "^evt_"
  27882. },
  27883. "metadata": {
  27884. "type": "object"
  27885. },
  27886. "type": {
  27887. "type": "string",
  27888. "enum": ["session.next.prompt.admitted"]
  27889. },
  27890. "durable": {
  27891. "type": "object",
  27892. "properties": {
  27893. "aggregateID": {
  27894. "type": "string"
  27895. },
  27896. "seq": {
  27897. "anyOf": [
  27898. {
  27899. "type": "number"
  27900. },
  27901. {
  27902. "type": "string",
  27903. "enum": ["NaN"]
  27904. },
  27905. {
  27906. "type": "string",
  27907. "enum": ["Infinity"]
  27908. },
  27909. {
  27910. "type": "string",
  27911. "enum": ["-Infinity"]
  27912. }
  27913. ]
  27914. },
  27915. "version": {
  27916. "anyOf": [
  27917. {
  27918. "type": "number"
  27919. },
  27920. {
  27921. "type": "string",
  27922. "enum": ["NaN"]
  27923. },
  27924. {
  27925. "type": "string",
  27926. "enum": ["Infinity"]
  27927. },
  27928. {
  27929. "type": "string",
  27930. "enum": ["-Infinity"]
  27931. }
  27932. ]
  27933. }
  27934. },
  27935. "required": ["aggregateID", "seq", "version"],
  27936. "additionalProperties": false
  27937. },
  27938. "location": {
  27939. "$ref": "#/components/schemas/LocationRef"
  27940. },
  27941. "data": {
  27942. "type": "object",
  27943. "properties": {
  27944. "timestamp": {
  27945. "type": "number"
  27946. },
  27947. "sessionID": {
  27948. "type": "string",
  27949. "pattern": "^ses"
  27950. },
  27951. "messageID": {
  27952. "type": "string",
  27953. "pattern": "^msg_"
  27954. },
  27955. "prompt": {
  27956. "$ref": "#/components/schemas/Prompt"
  27957. },
  27958. "delivery": {
  27959. "type": "string",
  27960. "enum": ["steer", "queue"]
  27961. }
  27962. },
  27963. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  27964. "additionalProperties": false
  27965. }
  27966. },
  27967. "required": ["id", "type", "data"],
  27968. "additionalProperties": false
  27969. },
  27970. "SessionNextContextUpdated": {
  27971. "type": "object",
  27972. "properties": {
  27973. "id": {
  27974. "type": "string",
  27975. "pattern": "^evt_"
  27976. },
  27977. "metadata": {
  27978. "type": "object"
  27979. },
  27980. "type": {
  27981. "type": "string",
  27982. "enum": ["session.next.context.updated"]
  27983. },
  27984. "durable": {
  27985. "type": "object",
  27986. "properties": {
  27987. "aggregateID": {
  27988. "type": "string"
  27989. },
  27990. "seq": {
  27991. "anyOf": [
  27992. {
  27993. "type": "number"
  27994. },
  27995. {
  27996. "type": "string",
  27997. "enum": ["NaN"]
  27998. },
  27999. {
  28000. "type": "string",
  28001. "enum": ["Infinity"]
  28002. },
  28003. {
  28004. "type": "string",
  28005. "enum": ["-Infinity"]
  28006. }
  28007. ]
  28008. },
  28009. "version": {
  28010. "anyOf": [
  28011. {
  28012. "type": "number"
  28013. },
  28014. {
  28015. "type": "string",
  28016. "enum": ["NaN"]
  28017. },
  28018. {
  28019. "type": "string",
  28020. "enum": ["Infinity"]
  28021. },
  28022. {
  28023. "type": "string",
  28024. "enum": ["-Infinity"]
  28025. }
  28026. ]
  28027. }
  28028. },
  28029. "required": ["aggregateID", "seq", "version"],
  28030. "additionalProperties": false
  28031. },
  28032. "location": {
  28033. "$ref": "#/components/schemas/LocationRef"
  28034. },
  28035. "data": {
  28036. "type": "object",
  28037. "properties": {
  28038. "timestamp": {
  28039. "type": "number"
  28040. },
  28041. "sessionID": {
  28042. "type": "string",
  28043. "pattern": "^ses"
  28044. },
  28045. "messageID": {
  28046. "type": "string",
  28047. "pattern": "^msg_"
  28048. },
  28049. "text": {
  28050. "type": "string"
  28051. }
  28052. },
  28053. "required": ["timestamp", "sessionID", "messageID", "text"],
  28054. "additionalProperties": false
  28055. }
  28056. },
  28057. "required": ["id", "type", "data"],
  28058. "additionalProperties": false
  28059. },
  28060. "SessionNextSynthetic": {
  28061. "type": "object",
  28062. "properties": {
  28063. "id": {
  28064. "type": "string",
  28065. "pattern": "^evt_"
  28066. },
  28067. "metadata": {
  28068. "type": "object"
  28069. },
  28070. "type": {
  28071. "type": "string",
  28072. "enum": ["session.next.synthetic"]
  28073. },
  28074. "durable": {
  28075. "type": "object",
  28076. "properties": {
  28077. "aggregateID": {
  28078. "type": "string"
  28079. },
  28080. "seq": {
  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. "version": {
  28100. "anyOf": [
  28101. {
  28102. "type": "number"
  28103. },
  28104. {
  28105. "type": "string",
  28106. "enum": ["NaN"]
  28107. },
  28108. {
  28109. "type": "string",
  28110. "enum": ["Infinity"]
  28111. },
  28112. {
  28113. "type": "string",
  28114. "enum": ["-Infinity"]
  28115. }
  28116. ]
  28117. }
  28118. },
  28119. "required": ["aggregateID", "seq", "version"],
  28120. "additionalProperties": false
  28121. },
  28122. "location": {
  28123. "$ref": "#/components/schemas/LocationRef"
  28124. },
  28125. "data": {
  28126. "type": "object",
  28127. "properties": {
  28128. "timestamp": {
  28129. "type": "number"
  28130. },
  28131. "sessionID": {
  28132. "type": "string",
  28133. "pattern": "^ses"
  28134. },
  28135. "messageID": {
  28136. "type": "string",
  28137. "pattern": "^msg_"
  28138. },
  28139. "text": {
  28140. "type": "string"
  28141. }
  28142. },
  28143. "required": ["timestamp", "sessionID", "messageID", "text"],
  28144. "additionalProperties": false
  28145. }
  28146. },
  28147. "required": ["id", "type", "data"],
  28148. "additionalProperties": false
  28149. },
  28150. "SessionNextShellStarted": {
  28151. "type": "object",
  28152. "properties": {
  28153. "id": {
  28154. "type": "string",
  28155. "pattern": "^evt_"
  28156. },
  28157. "metadata": {
  28158. "type": "object"
  28159. },
  28160. "type": {
  28161. "type": "string",
  28162. "enum": ["session.next.shell.started"]
  28163. },
  28164. "durable": {
  28165. "type": "object",
  28166. "properties": {
  28167. "aggregateID": {
  28168. "type": "string"
  28169. },
  28170. "seq": {
  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. "version": {
  28190. "anyOf": [
  28191. {
  28192. "type": "number"
  28193. },
  28194. {
  28195. "type": "string",
  28196. "enum": ["NaN"]
  28197. },
  28198. {
  28199. "type": "string",
  28200. "enum": ["Infinity"]
  28201. },
  28202. {
  28203. "type": "string",
  28204. "enum": ["-Infinity"]
  28205. }
  28206. ]
  28207. }
  28208. },
  28209. "required": ["aggregateID", "seq", "version"],
  28210. "additionalProperties": false
  28211. },
  28212. "location": {
  28213. "$ref": "#/components/schemas/LocationRef"
  28214. },
  28215. "data": {
  28216. "type": "object",
  28217. "properties": {
  28218. "timestamp": {
  28219. "type": "number"
  28220. },
  28221. "sessionID": {
  28222. "type": "string",
  28223. "pattern": "^ses"
  28224. },
  28225. "messageID": {
  28226. "type": "string",
  28227. "pattern": "^msg_"
  28228. },
  28229. "callID": {
  28230. "type": "string"
  28231. },
  28232. "command": {
  28233. "type": "string"
  28234. }
  28235. },
  28236. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  28237. "additionalProperties": false
  28238. }
  28239. },
  28240. "required": ["id", "type", "data"],
  28241. "additionalProperties": false
  28242. },
  28243. "SessionNextShellEnded": {
  28244. "type": "object",
  28245. "properties": {
  28246. "id": {
  28247. "type": "string",
  28248. "pattern": "^evt_"
  28249. },
  28250. "metadata": {
  28251. "type": "object"
  28252. },
  28253. "type": {
  28254. "type": "string",
  28255. "enum": ["session.next.shell.ended"]
  28256. },
  28257. "durable": {
  28258. "type": "object",
  28259. "properties": {
  28260. "aggregateID": {
  28261. "type": "string"
  28262. },
  28263. "seq": {
  28264. "anyOf": [
  28265. {
  28266. "type": "number"
  28267. },
  28268. {
  28269. "type": "string",
  28270. "enum": ["NaN"]
  28271. },
  28272. {
  28273. "type": "string",
  28274. "enum": ["Infinity"]
  28275. },
  28276. {
  28277. "type": "string",
  28278. "enum": ["-Infinity"]
  28279. }
  28280. ]
  28281. },
  28282. "version": {
  28283. "anyOf": [
  28284. {
  28285. "type": "number"
  28286. },
  28287. {
  28288. "type": "string",
  28289. "enum": ["NaN"]
  28290. },
  28291. {
  28292. "type": "string",
  28293. "enum": ["Infinity"]
  28294. },
  28295. {
  28296. "type": "string",
  28297. "enum": ["-Infinity"]
  28298. }
  28299. ]
  28300. }
  28301. },
  28302. "required": ["aggregateID", "seq", "version"],
  28303. "additionalProperties": false
  28304. },
  28305. "location": {
  28306. "$ref": "#/components/schemas/LocationRef"
  28307. },
  28308. "data": {
  28309. "type": "object",
  28310. "properties": {
  28311. "timestamp": {
  28312. "type": "number"
  28313. },
  28314. "sessionID": {
  28315. "type": "string",
  28316. "pattern": "^ses"
  28317. },
  28318. "callID": {
  28319. "type": "string"
  28320. },
  28321. "output": {
  28322. "type": "string"
  28323. }
  28324. },
  28325. "required": ["timestamp", "sessionID", "callID", "output"],
  28326. "additionalProperties": false
  28327. }
  28328. },
  28329. "required": ["id", "type", "data"],
  28330. "additionalProperties": false
  28331. },
  28332. "SessionNextStepStarted": {
  28333. "type": "object",
  28334. "properties": {
  28335. "id": {
  28336. "type": "string",
  28337. "pattern": "^evt_"
  28338. },
  28339. "metadata": {
  28340. "type": "object"
  28341. },
  28342. "type": {
  28343. "type": "string",
  28344. "enum": ["session.next.step.started"]
  28345. },
  28346. "durable": {
  28347. "type": "object",
  28348. "properties": {
  28349. "aggregateID": {
  28350. "type": "string"
  28351. },
  28352. "seq": {
  28353. "anyOf": [
  28354. {
  28355. "type": "number"
  28356. },
  28357. {
  28358. "type": "string",
  28359. "enum": ["NaN"]
  28360. },
  28361. {
  28362. "type": "string",
  28363. "enum": ["Infinity"]
  28364. },
  28365. {
  28366. "type": "string",
  28367. "enum": ["-Infinity"]
  28368. }
  28369. ]
  28370. },
  28371. "version": {
  28372. "anyOf": [
  28373. {
  28374. "type": "number"
  28375. },
  28376. {
  28377. "type": "string",
  28378. "enum": ["NaN"]
  28379. },
  28380. {
  28381. "type": "string",
  28382. "enum": ["Infinity"]
  28383. },
  28384. {
  28385. "type": "string",
  28386. "enum": ["-Infinity"]
  28387. }
  28388. ]
  28389. }
  28390. },
  28391. "required": ["aggregateID", "seq", "version"],
  28392. "additionalProperties": false
  28393. },
  28394. "location": {
  28395. "$ref": "#/components/schemas/LocationRef"
  28396. },
  28397. "data": {
  28398. "type": "object",
  28399. "properties": {
  28400. "timestamp": {
  28401. "type": "number"
  28402. },
  28403. "sessionID": {
  28404. "type": "string",
  28405. "pattern": "^ses"
  28406. },
  28407. "assistantMessageID": {
  28408. "type": "string",
  28409. "pattern": "^msg_"
  28410. },
  28411. "agent": {
  28412. "type": "string"
  28413. },
  28414. "model": {
  28415. "$ref": "#/components/schemas/ModelRef"
  28416. },
  28417. "snapshot": {
  28418. "type": "string"
  28419. }
  28420. },
  28421. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  28422. "additionalProperties": false
  28423. }
  28424. },
  28425. "required": ["id", "type", "data"],
  28426. "additionalProperties": false
  28427. },
  28428. "SessionNextStepEnded": {
  28429. "type": "object",
  28430. "properties": {
  28431. "id": {
  28432. "type": "string",
  28433. "pattern": "^evt_"
  28434. },
  28435. "metadata": {
  28436. "type": "object"
  28437. },
  28438. "type": {
  28439. "type": "string",
  28440. "enum": ["session.next.step.ended"]
  28441. },
  28442. "durable": {
  28443. "type": "object",
  28444. "properties": {
  28445. "aggregateID": {
  28446. "type": "string"
  28447. },
  28448. "seq": {
  28449. "anyOf": [
  28450. {
  28451. "type": "number"
  28452. },
  28453. {
  28454. "type": "string",
  28455. "enum": ["NaN"]
  28456. },
  28457. {
  28458. "type": "string",
  28459. "enum": ["Infinity"]
  28460. },
  28461. {
  28462. "type": "string",
  28463. "enum": ["-Infinity"]
  28464. }
  28465. ]
  28466. },
  28467. "version": {
  28468. "anyOf": [
  28469. {
  28470. "type": "number"
  28471. },
  28472. {
  28473. "type": "string",
  28474. "enum": ["NaN"]
  28475. },
  28476. {
  28477. "type": "string",
  28478. "enum": ["Infinity"]
  28479. },
  28480. {
  28481. "type": "string",
  28482. "enum": ["-Infinity"]
  28483. }
  28484. ]
  28485. }
  28486. },
  28487. "required": ["aggregateID", "seq", "version"],
  28488. "additionalProperties": false
  28489. },
  28490. "location": {
  28491. "$ref": "#/components/schemas/LocationRef"
  28492. },
  28493. "data": {
  28494. "type": "object",
  28495. "properties": {
  28496. "timestamp": {
  28497. "type": "number"
  28498. },
  28499. "sessionID": {
  28500. "type": "string",
  28501. "pattern": "^ses"
  28502. },
  28503. "assistantMessageID": {
  28504. "type": "string",
  28505. "pattern": "^msg_"
  28506. },
  28507. "finish": {
  28508. "type": "string"
  28509. },
  28510. "cost": {
  28511. "type": "number"
  28512. },
  28513. "tokens": {
  28514. "type": "object",
  28515. "properties": {
  28516. "input": {
  28517. "type": "number"
  28518. },
  28519. "output": {
  28520. "type": "number"
  28521. },
  28522. "reasoning": {
  28523. "type": "number"
  28524. },
  28525. "cache": {
  28526. "type": "object",
  28527. "properties": {
  28528. "read": {
  28529. "type": "number"
  28530. },
  28531. "write": {
  28532. "type": "number"
  28533. }
  28534. },
  28535. "required": ["read", "write"],
  28536. "additionalProperties": false
  28537. }
  28538. },
  28539. "required": ["input", "output", "reasoning", "cache"],
  28540. "additionalProperties": false
  28541. },
  28542. "snapshot": {
  28543. "type": "string"
  28544. },
  28545. "files": {
  28546. "type": "array",
  28547. "items": {
  28548. "type": "string"
  28549. }
  28550. }
  28551. },
  28552. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  28553. "additionalProperties": false
  28554. }
  28555. },
  28556. "required": ["id", "type", "data"],
  28557. "additionalProperties": false
  28558. },
  28559. "SessionNextStepFailed": {
  28560. "type": "object",
  28561. "properties": {
  28562. "id": {
  28563. "type": "string",
  28564. "pattern": "^evt_"
  28565. },
  28566. "metadata": {
  28567. "type": "object"
  28568. },
  28569. "type": {
  28570. "type": "string",
  28571. "enum": ["session.next.step.failed"]
  28572. },
  28573. "durable": {
  28574. "type": "object",
  28575. "properties": {
  28576. "aggregateID": {
  28577. "type": "string"
  28578. },
  28579. "seq": {
  28580. "anyOf": [
  28581. {
  28582. "type": "number"
  28583. },
  28584. {
  28585. "type": "string",
  28586. "enum": ["NaN"]
  28587. },
  28588. {
  28589. "type": "string",
  28590. "enum": ["Infinity"]
  28591. },
  28592. {
  28593. "type": "string",
  28594. "enum": ["-Infinity"]
  28595. }
  28596. ]
  28597. },
  28598. "version": {
  28599. "anyOf": [
  28600. {
  28601. "type": "number"
  28602. },
  28603. {
  28604. "type": "string",
  28605. "enum": ["NaN"]
  28606. },
  28607. {
  28608. "type": "string",
  28609. "enum": ["Infinity"]
  28610. },
  28611. {
  28612. "type": "string",
  28613. "enum": ["-Infinity"]
  28614. }
  28615. ]
  28616. }
  28617. },
  28618. "required": ["aggregateID", "seq", "version"],
  28619. "additionalProperties": false
  28620. },
  28621. "location": {
  28622. "$ref": "#/components/schemas/LocationRef"
  28623. },
  28624. "data": {
  28625. "type": "object",
  28626. "properties": {
  28627. "timestamp": {
  28628. "type": "number"
  28629. },
  28630. "sessionID": {
  28631. "type": "string",
  28632. "pattern": "^ses"
  28633. },
  28634. "assistantMessageID": {
  28635. "type": "string",
  28636. "pattern": "^msg_"
  28637. },
  28638. "error": {
  28639. "$ref": "#/components/schemas/SessionErrorUnknown"
  28640. }
  28641. },
  28642. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  28643. "additionalProperties": false
  28644. }
  28645. },
  28646. "required": ["id", "type", "data"],
  28647. "additionalProperties": false
  28648. },
  28649. "SessionNextTextStarted": {
  28650. "type": "object",
  28651. "properties": {
  28652. "id": {
  28653. "type": "string",
  28654. "pattern": "^evt_"
  28655. },
  28656. "metadata": {
  28657. "type": "object"
  28658. },
  28659. "type": {
  28660. "type": "string",
  28661. "enum": ["session.next.text.started"]
  28662. },
  28663. "durable": {
  28664. "type": "object",
  28665. "properties": {
  28666. "aggregateID": {
  28667. "type": "string"
  28668. },
  28669. "seq": {
  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. "version": {
  28689. "anyOf": [
  28690. {
  28691. "type": "number"
  28692. },
  28693. {
  28694. "type": "string",
  28695. "enum": ["NaN"]
  28696. },
  28697. {
  28698. "type": "string",
  28699. "enum": ["Infinity"]
  28700. },
  28701. {
  28702. "type": "string",
  28703. "enum": ["-Infinity"]
  28704. }
  28705. ]
  28706. }
  28707. },
  28708. "required": ["aggregateID", "seq", "version"],
  28709. "additionalProperties": false
  28710. },
  28711. "location": {
  28712. "$ref": "#/components/schemas/LocationRef"
  28713. },
  28714. "data": {
  28715. "type": "object",
  28716. "properties": {
  28717. "timestamp": {
  28718. "type": "number"
  28719. },
  28720. "sessionID": {
  28721. "type": "string",
  28722. "pattern": "^ses"
  28723. },
  28724. "assistantMessageID": {
  28725. "type": "string",
  28726. "pattern": "^msg_"
  28727. },
  28728. "textID": {
  28729. "type": "string"
  28730. }
  28731. },
  28732. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  28733. "additionalProperties": false
  28734. }
  28735. },
  28736. "required": ["id", "type", "data"],
  28737. "additionalProperties": false
  28738. },
  28739. "SessionNextTextEnded": {
  28740. "type": "object",
  28741. "properties": {
  28742. "id": {
  28743. "type": "string",
  28744. "pattern": "^evt_"
  28745. },
  28746. "metadata": {
  28747. "type": "object"
  28748. },
  28749. "type": {
  28750. "type": "string",
  28751. "enum": ["session.next.text.ended"]
  28752. },
  28753. "durable": {
  28754. "type": "object",
  28755. "properties": {
  28756. "aggregateID": {
  28757. "type": "string"
  28758. },
  28759. "seq": {
  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. "version": {
  28779. "anyOf": [
  28780. {
  28781. "type": "number"
  28782. },
  28783. {
  28784. "type": "string",
  28785. "enum": ["NaN"]
  28786. },
  28787. {
  28788. "type": "string",
  28789. "enum": ["Infinity"]
  28790. },
  28791. {
  28792. "type": "string",
  28793. "enum": ["-Infinity"]
  28794. }
  28795. ]
  28796. }
  28797. },
  28798. "required": ["aggregateID", "seq", "version"],
  28799. "additionalProperties": false
  28800. },
  28801. "location": {
  28802. "$ref": "#/components/schemas/LocationRef"
  28803. },
  28804. "data": {
  28805. "type": "object",
  28806. "properties": {
  28807. "timestamp": {
  28808. "type": "number"
  28809. },
  28810. "sessionID": {
  28811. "type": "string",
  28812. "pattern": "^ses"
  28813. },
  28814. "assistantMessageID": {
  28815. "type": "string",
  28816. "pattern": "^msg_"
  28817. },
  28818. "textID": {
  28819. "type": "string"
  28820. },
  28821. "text": {
  28822. "type": "string"
  28823. }
  28824. },
  28825. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  28826. "additionalProperties": false
  28827. }
  28828. },
  28829. "required": ["id", "type", "data"],
  28830. "additionalProperties": false
  28831. },
  28832. "SessionNextToolInputStarted": {
  28833. "type": "object",
  28834. "properties": {
  28835. "id": {
  28836. "type": "string",
  28837. "pattern": "^evt_"
  28838. },
  28839. "metadata": {
  28840. "type": "object"
  28841. },
  28842. "type": {
  28843. "type": "string",
  28844. "enum": ["session.next.tool.input.started"]
  28845. },
  28846. "durable": {
  28847. "type": "object",
  28848. "properties": {
  28849. "aggregateID": {
  28850. "type": "string"
  28851. },
  28852. "seq": {
  28853. "anyOf": [
  28854. {
  28855. "type": "number"
  28856. },
  28857. {
  28858. "type": "string",
  28859. "enum": ["NaN"]
  28860. },
  28861. {
  28862. "type": "string",
  28863. "enum": ["Infinity"]
  28864. },
  28865. {
  28866. "type": "string",
  28867. "enum": ["-Infinity"]
  28868. }
  28869. ]
  28870. },
  28871. "version": {
  28872. "anyOf": [
  28873. {
  28874. "type": "number"
  28875. },
  28876. {
  28877. "type": "string",
  28878. "enum": ["NaN"]
  28879. },
  28880. {
  28881. "type": "string",
  28882. "enum": ["Infinity"]
  28883. },
  28884. {
  28885. "type": "string",
  28886. "enum": ["-Infinity"]
  28887. }
  28888. ]
  28889. }
  28890. },
  28891. "required": ["aggregateID", "seq", "version"],
  28892. "additionalProperties": false
  28893. },
  28894. "location": {
  28895. "$ref": "#/components/schemas/LocationRef"
  28896. },
  28897. "data": {
  28898. "type": "object",
  28899. "properties": {
  28900. "timestamp": {
  28901. "type": "number"
  28902. },
  28903. "sessionID": {
  28904. "type": "string",
  28905. "pattern": "^ses"
  28906. },
  28907. "assistantMessageID": {
  28908. "type": "string",
  28909. "pattern": "^msg_"
  28910. },
  28911. "callID": {
  28912. "type": "string"
  28913. },
  28914. "name": {
  28915. "type": "string"
  28916. }
  28917. },
  28918. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  28919. "additionalProperties": false
  28920. }
  28921. },
  28922. "required": ["id", "type", "data"],
  28923. "additionalProperties": false
  28924. },
  28925. "SessionNextToolInputEnded": {
  28926. "type": "object",
  28927. "properties": {
  28928. "id": {
  28929. "type": "string",
  28930. "pattern": "^evt_"
  28931. },
  28932. "metadata": {
  28933. "type": "object"
  28934. },
  28935. "type": {
  28936. "type": "string",
  28937. "enum": ["session.next.tool.input.ended"]
  28938. },
  28939. "durable": {
  28940. "type": "object",
  28941. "properties": {
  28942. "aggregateID": {
  28943. "type": "string"
  28944. },
  28945. "seq": {
  28946. "anyOf": [
  28947. {
  28948. "type": "number"
  28949. },
  28950. {
  28951. "type": "string",
  28952. "enum": ["NaN"]
  28953. },
  28954. {
  28955. "type": "string",
  28956. "enum": ["Infinity"]
  28957. },
  28958. {
  28959. "type": "string",
  28960. "enum": ["-Infinity"]
  28961. }
  28962. ]
  28963. },
  28964. "version": {
  28965. "anyOf": [
  28966. {
  28967. "type": "number"
  28968. },
  28969. {
  28970. "type": "string",
  28971. "enum": ["NaN"]
  28972. },
  28973. {
  28974. "type": "string",
  28975. "enum": ["Infinity"]
  28976. },
  28977. {
  28978. "type": "string",
  28979. "enum": ["-Infinity"]
  28980. }
  28981. ]
  28982. }
  28983. },
  28984. "required": ["aggregateID", "seq", "version"],
  28985. "additionalProperties": false
  28986. },
  28987. "location": {
  28988. "$ref": "#/components/schemas/LocationRef"
  28989. },
  28990. "data": {
  28991. "type": "object",
  28992. "properties": {
  28993. "timestamp": {
  28994. "type": "number"
  28995. },
  28996. "sessionID": {
  28997. "type": "string",
  28998. "pattern": "^ses"
  28999. },
  29000. "assistantMessageID": {
  29001. "type": "string",
  29002. "pattern": "^msg_"
  29003. },
  29004. "callID": {
  29005. "type": "string"
  29006. },
  29007. "text": {
  29008. "type": "string"
  29009. }
  29010. },
  29011. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  29012. "additionalProperties": false
  29013. }
  29014. },
  29015. "required": ["id", "type", "data"],
  29016. "additionalProperties": false
  29017. },
  29018. "SessionNextToolCalled": {
  29019. "type": "object",
  29020. "properties": {
  29021. "id": {
  29022. "type": "string",
  29023. "pattern": "^evt_"
  29024. },
  29025. "metadata": {
  29026. "type": "object"
  29027. },
  29028. "type": {
  29029. "type": "string",
  29030. "enum": ["session.next.tool.called"]
  29031. },
  29032. "durable": {
  29033. "type": "object",
  29034. "properties": {
  29035. "aggregateID": {
  29036. "type": "string"
  29037. },
  29038. "seq": {
  29039. "anyOf": [
  29040. {
  29041. "type": "number"
  29042. },
  29043. {
  29044. "type": "string",
  29045. "enum": ["NaN"]
  29046. },
  29047. {
  29048. "type": "string",
  29049. "enum": ["Infinity"]
  29050. },
  29051. {
  29052. "type": "string",
  29053. "enum": ["-Infinity"]
  29054. }
  29055. ]
  29056. },
  29057. "version": {
  29058. "anyOf": [
  29059. {
  29060. "type": "number"
  29061. },
  29062. {
  29063. "type": "string",
  29064. "enum": ["NaN"]
  29065. },
  29066. {
  29067. "type": "string",
  29068. "enum": ["Infinity"]
  29069. },
  29070. {
  29071. "type": "string",
  29072. "enum": ["-Infinity"]
  29073. }
  29074. ]
  29075. }
  29076. },
  29077. "required": ["aggregateID", "seq", "version"],
  29078. "additionalProperties": false
  29079. },
  29080. "location": {
  29081. "$ref": "#/components/schemas/LocationRef"
  29082. },
  29083. "data": {
  29084. "type": "object",
  29085. "properties": {
  29086. "timestamp": {
  29087. "type": "number"
  29088. },
  29089. "sessionID": {
  29090. "type": "string",
  29091. "pattern": "^ses"
  29092. },
  29093. "assistantMessageID": {
  29094. "type": "string",
  29095. "pattern": "^msg_"
  29096. },
  29097. "callID": {
  29098. "type": "string"
  29099. },
  29100. "tool": {
  29101. "type": "string"
  29102. },
  29103. "input": {
  29104. "type": "object"
  29105. },
  29106. "provider": {
  29107. "type": "object",
  29108. "properties": {
  29109. "executed": {
  29110. "type": "boolean"
  29111. },
  29112. "metadata": {
  29113. "$ref": "#/components/schemas/LLMProviderMetadata"
  29114. }
  29115. },
  29116. "required": ["executed"],
  29117. "additionalProperties": false
  29118. }
  29119. },
  29120. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  29121. "additionalProperties": false
  29122. }
  29123. },
  29124. "required": ["id", "type", "data"],
  29125. "additionalProperties": false
  29126. },
  29127. "SessionNextToolProgress": {
  29128. "type": "object",
  29129. "properties": {
  29130. "id": {
  29131. "type": "string",
  29132. "pattern": "^evt_"
  29133. },
  29134. "metadata": {
  29135. "type": "object"
  29136. },
  29137. "type": {
  29138. "type": "string",
  29139. "enum": ["session.next.tool.progress"]
  29140. },
  29141. "durable": {
  29142. "type": "object",
  29143. "properties": {
  29144. "aggregateID": {
  29145. "type": "string"
  29146. },
  29147. "seq": {
  29148. "anyOf": [
  29149. {
  29150. "type": "number"
  29151. },
  29152. {
  29153. "type": "string",
  29154. "enum": ["NaN"]
  29155. },
  29156. {
  29157. "type": "string",
  29158. "enum": ["Infinity"]
  29159. },
  29160. {
  29161. "type": "string",
  29162. "enum": ["-Infinity"]
  29163. }
  29164. ]
  29165. },
  29166. "version": {
  29167. "anyOf": [
  29168. {
  29169. "type": "number"
  29170. },
  29171. {
  29172. "type": "string",
  29173. "enum": ["NaN"]
  29174. },
  29175. {
  29176. "type": "string",
  29177. "enum": ["Infinity"]
  29178. },
  29179. {
  29180. "type": "string",
  29181. "enum": ["-Infinity"]
  29182. }
  29183. ]
  29184. }
  29185. },
  29186. "required": ["aggregateID", "seq", "version"],
  29187. "additionalProperties": false
  29188. },
  29189. "location": {
  29190. "$ref": "#/components/schemas/LocationRef"
  29191. },
  29192. "data": {
  29193. "type": "object",
  29194. "properties": {
  29195. "timestamp": {
  29196. "type": "number"
  29197. },
  29198. "sessionID": {
  29199. "type": "string",
  29200. "pattern": "^ses"
  29201. },
  29202. "assistantMessageID": {
  29203. "type": "string",
  29204. "pattern": "^msg_"
  29205. },
  29206. "callID": {
  29207. "type": "string"
  29208. },
  29209. "structured": {
  29210. "type": "object"
  29211. },
  29212. "content": {
  29213. "type": "array",
  29214. "items": {
  29215. "$ref": "#/components/schemas/LLMToolContent"
  29216. }
  29217. }
  29218. },
  29219. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  29220. "additionalProperties": false
  29221. }
  29222. },
  29223. "required": ["id", "type", "data"],
  29224. "additionalProperties": false
  29225. },
  29226. "SessionNextToolSuccess": {
  29227. "type": "object",
  29228. "properties": {
  29229. "id": {
  29230. "type": "string",
  29231. "pattern": "^evt_"
  29232. },
  29233. "metadata": {
  29234. "type": "object"
  29235. },
  29236. "type": {
  29237. "type": "string",
  29238. "enum": ["session.next.tool.success"]
  29239. },
  29240. "durable": {
  29241. "type": "object",
  29242. "properties": {
  29243. "aggregateID": {
  29244. "type": "string"
  29245. },
  29246. "seq": {
  29247. "anyOf": [
  29248. {
  29249. "type": "number"
  29250. },
  29251. {
  29252. "type": "string",
  29253. "enum": ["NaN"]
  29254. },
  29255. {
  29256. "type": "string",
  29257. "enum": ["Infinity"]
  29258. },
  29259. {
  29260. "type": "string",
  29261. "enum": ["-Infinity"]
  29262. }
  29263. ]
  29264. },
  29265. "version": {
  29266. "anyOf": [
  29267. {
  29268. "type": "number"
  29269. },
  29270. {
  29271. "type": "string",
  29272. "enum": ["NaN"]
  29273. },
  29274. {
  29275. "type": "string",
  29276. "enum": ["Infinity"]
  29277. },
  29278. {
  29279. "type": "string",
  29280. "enum": ["-Infinity"]
  29281. }
  29282. ]
  29283. }
  29284. },
  29285. "required": ["aggregateID", "seq", "version"],
  29286. "additionalProperties": false
  29287. },
  29288. "location": {
  29289. "$ref": "#/components/schemas/LocationRef"
  29290. },
  29291. "data": {
  29292. "type": "object",
  29293. "properties": {
  29294. "timestamp": {
  29295. "type": "number"
  29296. },
  29297. "sessionID": {
  29298. "type": "string",
  29299. "pattern": "^ses"
  29300. },
  29301. "assistantMessageID": {
  29302. "type": "string",
  29303. "pattern": "^msg_"
  29304. },
  29305. "callID": {
  29306. "type": "string"
  29307. },
  29308. "structured": {
  29309. "type": "object"
  29310. },
  29311. "content": {
  29312. "type": "array",
  29313. "items": {
  29314. "$ref": "#/components/schemas/LLMToolContent"
  29315. }
  29316. },
  29317. "outputPaths": {
  29318. "type": "array",
  29319. "items": {
  29320. "type": "string"
  29321. }
  29322. },
  29323. "result": {},
  29324. "provider": {
  29325. "type": "object",
  29326. "properties": {
  29327. "executed": {
  29328. "type": "boolean"
  29329. },
  29330. "metadata": {
  29331. "$ref": "#/components/schemas/LLMProviderMetadata"
  29332. }
  29333. },
  29334. "required": ["executed"],
  29335. "additionalProperties": false
  29336. }
  29337. },
  29338. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  29339. "additionalProperties": false
  29340. }
  29341. },
  29342. "required": ["id", "type", "data"],
  29343. "additionalProperties": false
  29344. },
  29345. "SessionNextToolFailed": {
  29346. "type": "object",
  29347. "properties": {
  29348. "id": {
  29349. "type": "string",
  29350. "pattern": "^evt_"
  29351. },
  29352. "metadata": {
  29353. "type": "object"
  29354. },
  29355. "type": {
  29356. "type": "string",
  29357. "enum": ["session.next.tool.failed"]
  29358. },
  29359. "durable": {
  29360. "type": "object",
  29361. "properties": {
  29362. "aggregateID": {
  29363. "type": "string"
  29364. },
  29365. "seq": {
  29366. "anyOf": [
  29367. {
  29368. "type": "number"
  29369. },
  29370. {
  29371. "type": "string",
  29372. "enum": ["NaN"]
  29373. },
  29374. {
  29375. "type": "string",
  29376. "enum": ["Infinity"]
  29377. },
  29378. {
  29379. "type": "string",
  29380. "enum": ["-Infinity"]
  29381. }
  29382. ]
  29383. },
  29384. "version": {
  29385. "anyOf": [
  29386. {
  29387. "type": "number"
  29388. },
  29389. {
  29390. "type": "string",
  29391. "enum": ["NaN"]
  29392. },
  29393. {
  29394. "type": "string",
  29395. "enum": ["Infinity"]
  29396. },
  29397. {
  29398. "type": "string",
  29399. "enum": ["-Infinity"]
  29400. }
  29401. ]
  29402. }
  29403. },
  29404. "required": ["aggregateID", "seq", "version"],
  29405. "additionalProperties": false
  29406. },
  29407. "location": {
  29408. "$ref": "#/components/schemas/LocationRef"
  29409. },
  29410. "data": {
  29411. "type": "object",
  29412. "properties": {
  29413. "timestamp": {
  29414. "type": "number"
  29415. },
  29416. "sessionID": {
  29417. "type": "string",
  29418. "pattern": "^ses"
  29419. },
  29420. "assistantMessageID": {
  29421. "type": "string",
  29422. "pattern": "^msg_"
  29423. },
  29424. "callID": {
  29425. "type": "string"
  29426. },
  29427. "error": {
  29428. "$ref": "#/components/schemas/SessionErrorUnknown"
  29429. },
  29430. "result": {},
  29431. "provider": {
  29432. "type": "object",
  29433. "properties": {
  29434. "executed": {
  29435. "type": "boolean"
  29436. },
  29437. "metadata": {
  29438. "$ref": "#/components/schemas/LLMProviderMetadata"
  29439. }
  29440. },
  29441. "required": ["executed"],
  29442. "additionalProperties": false
  29443. }
  29444. },
  29445. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  29446. "additionalProperties": false
  29447. }
  29448. },
  29449. "required": ["id", "type", "data"],
  29450. "additionalProperties": false
  29451. },
  29452. "SessionNextReasoningStarted": {
  29453. "type": "object",
  29454. "properties": {
  29455. "id": {
  29456. "type": "string",
  29457. "pattern": "^evt_"
  29458. },
  29459. "metadata": {
  29460. "type": "object"
  29461. },
  29462. "type": {
  29463. "type": "string",
  29464. "enum": ["session.next.reasoning.started"]
  29465. },
  29466. "durable": {
  29467. "type": "object",
  29468. "properties": {
  29469. "aggregateID": {
  29470. "type": "string"
  29471. },
  29472. "seq": {
  29473. "anyOf": [
  29474. {
  29475. "type": "number"
  29476. },
  29477. {
  29478. "type": "string",
  29479. "enum": ["NaN"]
  29480. },
  29481. {
  29482. "type": "string",
  29483. "enum": ["Infinity"]
  29484. },
  29485. {
  29486. "type": "string",
  29487. "enum": ["-Infinity"]
  29488. }
  29489. ]
  29490. },
  29491. "version": {
  29492. "anyOf": [
  29493. {
  29494. "type": "number"
  29495. },
  29496. {
  29497. "type": "string",
  29498. "enum": ["NaN"]
  29499. },
  29500. {
  29501. "type": "string",
  29502. "enum": ["Infinity"]
  29503. },
  29504. {
  29505. "type": "string",
  29506. "enum": ["-Infinity"]
  29507. }
  29508. ]
  29509. }
  29510. },
  29511. "required": ["aggregateID", "seq", "version"],
  29512. "additionalProperties": false
  29513. },
  29514. "location": {
  29515. "$ref": "#/components/schemas/LocationRef"
  29516. },
  29517. "data": {
  29518. "type": "object",
  29519. "properties": {
  29520. "timestamp": {
  29521. "type": "number"
  29522. },
  29523. "sessionID": {
  29524. "type": "string",
  29525. "pattern": "^ses"
  29526. },
  29527. "assistantMessageID": {
  29528. "type": "string",
  29529. "pattern": "^msg_"
  29530. },
  29531. "reasoningID": {
  29532. "type": "string"
  29533. },
  29534. "providerMetadata": {
  29535. "$ref": "#/components/schemas/LLMProviderMetadata"
  29536. }
  29537. },
  29538. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  29539. "additionalProperties": false
  29540. }
  29541. },
  29542. "required": ["id", "type", "data"],
  29543. "additionalProperties": false
  29544. },
  29545. "SessionNextReasoningEnded": {
  29546. "type": "object",
  29547. "properties": {
  29548. "id": {
  29549. "type": "string",
  29550. "pattern": "^evt_"
  29551. },
  29552. "metadata": {
  29553. "type": "object"
  29554. },
  29555. "type": {
  29556. "type": "string",
  29557. "enum": ["session.next.reasoning.ended"]
  29558. },
  29559. "durable": {
  29560. "type": "object",
  29561. "properties": {
  29562. "aggregateID": {
  29563. "type": "string"
  29564. },
  29565. "seq": {
  29566. "anyOf": [
  29567. {
  29568. "type": "number"
  29569. },
  29570. {
  29571. "type": "string",
  29572. "enum": ["NaN"]
  29573. },
  29574. {
  29575. "type": "string",
  29576. "enum": ["Infinity"]
  29577. },
  29578. {
  29579. "type": "string",
  29580. "enum": ["-Infinity"]
  29581. }
  29582. ]
  29583. },
  29584. "version": {
  29585. "anyOf": [
  29586. {
  29587. "type": "number"
  29588. },
  29589. {
  29590. "type": "string",
  29591. "enum": ["NaN"]
  29592. },
  29593. {
  29594. "type": "string",
  29595. "enum": ["Infinity"]
  29596. },
  29597. {
  29598. "type": "string",
  29599. "enum": ["-Infinity"]
  29600. }
  29601. ]
  29602. }
  29603. },
  29604. "required": ["aggregateID", "seq", "version"],
  29605. "additionalProperties": false
  29606. },
  29607. "location": {
  29608. "$ref": "#/components/schemas/LocationRef"
  29609. },
  29610. "data": {
  29611. "type": "object",
  29612. "properties": {
  29613. "timestamp": {
  29614. "type": "number"
  29615. },
  29616. "sessionID": {
  29617. "type": "string",
  29618. "pattern": "^ses"
  29619. },
  29620. "assistantMessageID": {
  29621. "type": "string",
  29622. "pattern": "^msg_"
  29623. },
  29624. "reasoningID": {
  29625. "type": "string"
  29626. },
  29627. "text": {
  29628. "type": "string"
  29629. },
  29630. "providerMetadata": {
  29631. "$ref": "#/components/schemas/LLMProviderMetadata"
  29632. }
  29633. },
  29634. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  29635. "additionalProperties": false
  29636. }
  29637. },
  29638. "required": ["id", "type", "data"],
  29639. "additionalProperties": false
  29640. },
  29641. "SessionNextRetried": {
  29642. "type": "object",
  29643. "properties": {
  29644. "id": {
  29645. "type": "string",
  29646. "pattern": "^evt_"
  29647. },
  29648. "metadata": {
  29649. "type": "object"
  29650. },
  29651. "type": {
  29652. "type": "string",
  29653. "enum": ["session.next.retried"]
  29654. },
  29655. "durable": {
  29656. "type": "object",
  29657. "properties": {
  29658. "aggregateID": {
  29659. "type": "string"
  29660. },
  29661. "seq": {
  29662. "anyOf": [
  29663. {
  29664. "type": "number"
  29665. },
  29666. {
  29667. "type": "string",
  29668. "enum": ["NaN"]
  29669. },
  29670. {
  29671. "type": "string",
  29672. "enum": ["Infinity"]
  29673. },
  29674. {
  29675. "type": "string",
  29676. "enum": ["-Infinity"]
  29677. }
  29678. ]
  29679. },
  29680. "version": {
  29681. "anyOf": [
  29682. {
  29683. "type": "number"
  29684. },
  29685. {
  29686. "type": "string",
  29687. "enum": ["NaN"]
  29688. },
  29689. {
  29690. "type": "string",
  29691. "enum": ["Infinity"]
  29692. },
  29693. {
  29694. "type": "string",
  29695. "enum": ["-Infinity"]
  29696. }
  29697. ]
  29698. }
  29699. },
  29700. "required": ["aggregateID", "seq", "version"],
  29701. "additionalProperties": false
  29702. },
  29703. "location": {
  29704. "$ref": "#/components/schemas/LocationRef"
  29705. },
  29706. "data": {
  29707. "type": "object",
  29708. "properties": {
  29709. "timestamp": {
  29710. "type": "number"
  29711. },
  29712. "sessionID": {
  29713. "type": "string",
  29714. "pattern": "^ses"
  29715. },
  29716. "attempt": {
  29717. "type": "number"
  29718. },
  29719. "error": {
  29720. "$ref": "#/components/schemas/SessionNextRetry_error"
  29721. }
  29722. },
  29723. "required": ["timestamp", "sessionID", "attempt", "error"],
  29724. "additionalProperties": false
  29725. }
  29726. },
  29727. "required": ["id", "type", "data"],
  29728. "additionalProperties": false
  29729. },
  29730. "SessionNextCompactionStarted": {
  29731. "type": "object",
  29732. "properties": {
  29733. "id": {
  29734. "type": "string",
  29735. "pattern": "^evt_"
  29736. },
  29737. "metadata": {
  29738. "type": "object"
  29739. },
  29740. "type": {
  29741. "type": "string",
  29742. "enum": ["session.next.compaction.started"]
  29743. },
  29744. "durable": {
  29745. "type": "object",
  29746. "properties": {
  29747. "aggregateID": {
  29748. "type": "string"
  29749. },
  29750. "seq": {
  29751. "anyOf": [
  29752. {
  29753. "type": "number"
  29754. },
  29755. {
  29756. "type": "string",
  29757. "enum": ["NaN"]
  29758. },
  29759. {
  29760. "type": "string",
  29761. "enum": ["Infinity"]
  29762. },
  29763. {
  29764. "type": "string",
  29765. "enum": ["-Infinity"]
  29766. }
  29767. ]
  29768. },
  29769. "version": {
  29770. "anyOf": [
  29771. {
  29772. "type": "number"
  29773. },
  29774. {
  29775. "type": "string",
  29776. "enum": ["NaN"]
  29777. },
  29778. {
  29779. "type": "string",
  29780. "enum": ["Infinity"]
  29781. },
  29782. {
  29783. "type": "string",
  29784. "enum": ["-Infinity"]
  29785. }
  29786. ]
  29787. }
  29788. },
  29789. "required": ["aggregateID", "seq", "version"],
  29790. "additionalProperties": false
  29791. },
  29792. "location": {
  29793. "$ref": "#/components/schemas/LocationRef"
  29794. },
  29795. "data": {
  29796. "type": "object",
  29797. "properties": {
  29798. "timestamp": {
  29799. "type": "number"
  29800. },
  29801. "sessionID": {
  29802. "type": "string",
  29803. "pattern": "^ses"
  29804. },
  29805. "messageID": {
  29806. "type": "string",
  29807. "pattern": "^msg_"
  29808. },
  29809. "reason": {
  29810. "type": "string",
  29811. "enum": ["auto", "manual"]
  29812. }
  29813. },
  29814. "required": ["timestamp", "sessionID", "messageID", "reason"],
  29815. "additionalProperties": false
  29816. }
  29817. },
  29818. "required": ["id", "type", "data"],
  29819. "additionalProperties": false
  29820. },
  29821. "SessionNextCompactionEnded": {
  29822. "type": "object",
  29823. "properties": {
  29824. "id": {
  29825. "type": "string",
  29826. "pattern": "^evt_"
  29827. },
  29828. "metadata": {
  29829. "type": "object"
  29830. },
  29831. "type": {
  29832. "type": "string",
  29833. "enum": ["session.next.compaction.ended"]
  29834. },
  29835. "durable": {
  29836. "type": "object",
  29837. "properties": {
  29838. "aggregateID": {
  29839. "type": "string"
  29840. },
  29841. "seq": {
  29842. "anyOf": [
  29843. {
  29844. "type": "number"
  29845. },
  29846. {
  29847. "type": "string",
  29848. "enum": ["NaN"]
  29849. },
  29850. {
  29851. "type": "string",
  29852. "enum": ["Infinity"]
  29853. },
  29854. {
  29855. "type": "string",
  29856. "enum": ["-Infinity"]
  29857. }
  29858. ]
  29859. },
  29860. "version": {
  29861. "anyOf": [
  29862. {
  29863. "type": "number"
  29864. },
  29865. {
  29866. "type": "string",
  29867. "enum": ["NaN"]
  29868. },
  29869. {
  29870. "type": "string",
  29871. "enum": ["Infinity"]
  29872. },
  29873. {
  29874. "type": "string",
  29875. "enum": ["-Infinity"]
  29876. }
  29877. ]
  29878. }
  29879. },
  29880. "required": ["aggregateID", "seq", "version"],
  29881. "additionalProperties": false
  29882. },
  29883. "location": {
  29884. "$ref": "#/components/schemas/LocationRef"
  29885. },
  29886. "data": {
  29887. "type": "object",
  29888. "properties": {
  29889. "timestamp": {
  29890. "type": "number"
  29891. },
  29892. "sessionID": {
  29893. "type": "string",
  29894. "pattern": "^ses"
  29895. },
  29896. "messageID": {
  29897. "type": "string",
  29898. "pattern": "^msg_"
  29899. },
  29900. "reason": {
  29901. "type": "string",
  29902. "enum": ["auto", "manual"]
  29903. },
  29904. "text": {
  29905. "type": "string"
  29906. },
  29907. "recent": {
  29908. "type": "string"
  29909. }
  29910. },
  29911. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  29912. "additionalProperties": false
  29913. }
  29914. },
  29915. "required": ["id", "type", "data"],
  29916. "additionalProperties": false
  29917. },
  29918. "SessionNextRevertStaged": {
  29919. "type": "object",
  29920. "properties": {
  29921. "id": {
  29922. "type": "string",
  29923. "pattern": "^evt_"
  29924. },
  29925. "metadata": {
  29926. "type": "object"
  29927. },
  29928. "type": {
  29929. "type": "string",
  29930. "enum": ["session.next.revert.staged"]
  29931. },
  29932. "durable": {
  29933. "type": "object",
  29934. "properties": {
  29935. "aggregateID": {
  29936. "type": "string"
  29937. },
  29938. "seq": {
  29939. "anyOf": [
  29940. {
  29941. "type": "number"
  29942. },
  29943. {
  29944. "type": "string",
  29945. "enum": ["NaN"]
  29946. },
  29947. {
  29948. "type": "string",
  29949. "enum": ["Infinity"]
  29950. },
  29951. {
  29952. "type": "string",
  29953. "enum": ["-Infinity"]
  29954. }
  29955. ]
  29956. },
  29957. "version": {
  29958. "anyOf": [
  29959. {
  29960. "type": "number"
  29961. },
  29962. {
  29963. "type": "string",
  29964. "enum": ["NaN"]
  29965. },
  29966. {
  29967. "type": "string",
  29968. "enum": ["Infinity"]
  29969. },
  29970. {
  29971. "type": "string",
  29972. "enum": ["-Infinity"]
  29973. }
  29974. ]
  29975. }
  29976. },
  29977. "required": ["aggregateID", "seq", "version"],
  29978. "additionalProperties": false
  29979. },
  29980. "location": {
  29981. "$ref": "#/components/schemas/LocationRef"
  29982. },
  29983. "data": {
  29984. "type": "object",
  29985. "properties": {
  29986. "timestamp": {
  29987. "type": "number"
  29988. },
  29989. "sessionID": {
  29990. "type": "string",
  29991. "pattern": "^ses"
  29992. },
  29993. "revert": {
  29994. "$ref": "#/components/schemas/RevertState"
  29995. }
  29996. },
  29997. "required": ["timestamp", "sessionID", "revert"],
  29998. "additionalProperties": false
  29999. }
  30000. },
  30001. "required": ["id", "type", "data"],
  30002. "additionalProperties": false
  30003. },
  30004. "SessionNextRevertCleared": {
  30005. "type": "object",
  30006. "properties": {
  30007. "id": {
  30008. "type": "string",
  30009. "pattern": "^evt_"
  30010. },
  30011. "metadata": {
  30012. "type": "object"
  30013. },
  30014. "type": {
  30015. "type": "string",
  30016. "enum": ["session.next.revert.cleared"]
  30017. },
  30018. "durable": {
  30019. "type": "object",
  30020. "properties": {
  30021. "aggregateID": {
  30022. "type": "string"
  30023. },
  30024. "seq": {
  30025. "anyOf": [
  30026. {
  30027. "type": "number"
  30028. },
  30029. {
  30030. "type": "string",
  30031. "enum": ["NaN"]
  30032. },
  30033. {
  30034. "type": "string",
  30035. "enum": ["Infinity"]
  30036. },
  30037. {
  30038. "type": "string",
  30039. "enum": ["-Infinity"]
  30040. }
  30041. ]
  30042. },
  30043. "version": {
  30044. "anyOf": [
  30045. {
  30046. "type": "number"
  30047. },
  30048. {
  30049. "type": "string",
  30050. "enum": ["NaN"]
  30051. },
  30052. {
  30053. "type": "string",
  30054. "enum": ["Infinity"]
  30055. },
  30056. {
  30057. "type": "string",
  30058. "enum": ["-Infinity"]
  30059. }
  30060. ]
  30061. }
  30062. },
  30063. "required": ["aggregateID", "seq", "version"],
  30064. "additionalProperties": false
  30065. },
  30066. "location": {
  30067. "$ref": "#/components/schemas/LocationRef"
  30068. },
  30069. "data": {
  30070. "type": "object",
  30071. "properties": {
  30072. "timestamp": {
  30073. "type": "number"
  30074. },
  30075. "sessionID": {
  30076. "type": "string",
  30077. "pattern": "^ses"
  30078. }
  30079. },
  30080. "required": ["timestamp", "sessionID"],
  30081. "additionalProperties": false
  30082. }
  30083. },
  30084. "required": ["id", "type", "data"],
  30085. "additionalProperties": false
  30086. },
  30087. "SessionNextRevertCommitted": {
  30088. "type": "object",
  30089. "properties": {
  30090. "id": {
  30091. "type": "string",
  30092. "pattern": "^evt_"
  30093. },
  30094. "metadata": {
  30095. "type": "object"
  30096. },
  30097. "type": {
  30098. "type": "string",
  30099. "enum": ["session.next.revert.committed"]
  30100. },
  30101. "durable": {
  30102. "type": "object",
  30103. "properties": {
  30104. "aggregateID": {
  30105. "type": "string"
  30106. },
  30107. "seq": {
  30108. "anyOf": [
  30109. {
  30110. "type": "number"
  30111. },
  30112. {
  30113. "type": "string",
  30114. "enum": ["NaN"]
  30115. },
  30116. {
  30117. "type": "string",
  30118. "enum": ["Infinity"]
  30119. },
  30120. {
  30121. "type": "string",
  30122. "enum": ["-Infinity"]
  30123. }
  30124. ]
  30125. },
  30126. "version": {
  30127. "anyOf": [
  30128. {
  30129. "type": "number"
  30130. },
  30131. {
  30132. "type": "string",
  30133. "enum": ["NaN"]
  30134. },
  30135. {
  30136. "type": "string",
  30137. "enum": ["Infinity"]
  30138. },
  30139. {
  30140. "type": "string",
  30141. "enum": ["-Infinity"]
  30142. }
  30143. ]
  30144. }
  30145. },
  30146. "required": ["aggregateID", "seq", "version"],
  30147. "additionalProperties": false
  30148. },
  30149. "location": {
  30150. "$ref": "#/components/schemas/LocationRef"
  30151. },
  30152. "data": {
  30153. "type": "object",
  30154. "properties": {
  30155. "timestamp": {
  30156. "type": "number"
  30157. },
  30158. "sessionID": {
  30159. "type": "string",
  30160. "pattern": "^ses"
  30161. },
  30162. "messageID": {
  30163. "type": "string",
  30164. "pattern": "^msg_"
  30165. }
  30166. },
  30167. "required": ["timestamp", "sessionID", "messageID"],
  30168. "additionalProperties": false
  30169. }
  30170. },
  30171. "required": ["id", "type", "data"],
  30172. "additionalProperties": false
  30173. },
  30174. "ModelApi": {
  30175. "anyOf": [
  30176. {
  30177. "type": "object",
  30178. "properties": {
  30179. "id": {
  30180. "type": "string"
  30181. },
  30182. "type": {
  30183. "type": "string",
  30184. "enum": ["aisdk"]
  30185. },
  30186. "package": {
  30187. "type": "string"
  30188. },
  30189. "url": {
  30190. "type": "string"
  30191. },
  30192. "settings": {
  30193. "type": "object"
  30194. }
  30195. },
  30196. "required": ["id", "type", "package"],
  30197. "additionalProperties": false
  30198. },
  30199. {
  30200. "type": "object",
  30201. "properties": {
  30202. "id": {
  30203. "type": "string"
  30204. },
  30205. "type": {
  30206. "type": "string",
  30207. "enum": ["native"]
  30208. },
  30209. "url": {
  30210. "type": "string"
  30211. },
  30212. "settings": {
  30213. "type": "object"
  30214. }
  30215. },
  30216. "required": ["id", "type", "settings"],
  30217. "additionalProperties": false
  30218. }
  30219. ]
  30220. },
  30221. "ModelCapabilities": {
  30222. "type": "object",
  30223. "properties": {
  30224. "tools": {
  30225. "type": "boolean"
  30226. },
  30227. "input": {
  30228. "type": "array",
  30229. "items": {
  30230. "type": "string"
  30231. }
  30232. },
  30233. "output": {
  30234. "type": "array",
  30235. "items": {
  30236. "type": "string"
  30237. }
  30238. }
  30239. },
  30240. "required": ["tools", "input", "output"],
  30241. "additionalProperties": false
  30242. },
  30243. "ModelCost": {
  30244. "type": "object",
  30245. "properties": {
  30246. "tier": {
  30247. "type": "object",
  30248. "properties": {
  30249. "type": {
  30250. "type": "string",
  30251. "enum": ["context"]
  30252. },
  30253. "size": {
  30254. "type": "integer"
  30255. }
  30256. },
  30257. "required": ["type", "size"],
  30258. "additionalProperties": false
  30259. },
  30260. "input": {
  30261. "type": "number"
  30262. },
  30263. "output": {
  30264. "type": "number"
  30265. },
  30266. "cache": {
  30267. "type": "object",
  30268. "properties": {
  30269. "read": {
  30270. "type": "number"
  30271. },
  30272. "write": {
  30273. "type": "number"
  30274. }
  30275. },
  30276. "required": ["read", "write"],
  30277. "additionalProperties": false
  30278. }
  30279. },
  30280. "required": ["input", "output", "cache"],
  30281. "additionalProperties": false
  30282. },
  30283. "ModelV2Info": {
  30284. "type": "object",
  30285. "properties": {
  30286. "id": {
  30287. "type": "string"
  30288. },
  30289. "providerID": {
  30290. "type": "string"
  30291. },
  30292. "family": {
  30293. "type": "string"
  30294. },
  30295. "name": {
  30296. "type": "string"
  30297. },
  30298. "api": {
  30299. "$ref": "#/components/schemas/ModelApi"
  30300. },
  30301. "capabilities": {
  30302. "$ref": "#/components/schemas/ModelCapabilities"
  30303. },
  30304. "request": {
  30305. "type": "object",
  30306. "properties": {
  30307. "headers": {
  30308. "type": "object",
  30309. "additionalProperties": {
  30310. "type": "string"
  30311. }
  30312. },
  30313. "body": {
  30314. "type": "object"
  30315. },
  30316. "variant": {
  30317. "type": "string"
  30318. }
  30319. },
  30320. "required": ["headers", "body"],
  30321. "additionalProperties": false
  30322. },
  30323. "variants": {
  30324. "type": "array",
  30325. "items": {
  30326. "type": "object",
  30327. "properties": {
  30328. "id": {
  30329. "type": "string"
  30330. },
  30331. "headers": {
  30332. "type": "object",
  30333. "additionalProperties": {
  30334. "type": "string"
  30335. }
  30336. },
  30337. "body": {
  30338. "type": "object"
  30339. }
  30340. },
  30341. "required": ["id", "headers", "body"],
  30342. "additionalProperties": false
  30343. }
  30344. },
  30345. "time": {
  30346. "type": "object",
  30347. "properties": {
  30348. "released": {
  30349. "type": "number"
  30350. }
  30351. },
  30352. "required": ["released"],
  30353. "additionalProperties": false
  30354. },
  30355. "cost": {
  30356. "type": "array",
  30357. "items": {
  30358. "$ref": "#/components/schemas/ModelCost"
  30359. }
  30360. },
  30361. "status": {
  30362. "type": "string",
  30363. "enum": ["alpha", "beta", "deprecated", "active"]
  30364. },
  30365. "enabled": {
  30366. "type": "boolean"
  30367. },
  30368. "limit": {
  30369. "type": "object",
  30370. "properties": {
  30371. "context": {
  30372. "type": "integer"
  30373. },
  30374. "input": {
  30375. "type": "integer"
  30376. },
  30377. "output": {
  30378. "type": "integer"
  30379. }
  30380. },
  30381. "required": ["context", "output"],
  30382. "additionalProperties": false
  30383. }
  30384. },
  30385. "required": [
  30386. "id",
  30387. "providerID",
  30388. "name",
  30389. "api",
  30390. "capabilities",
  30391. "request",
  30392. "variants",
  30393. "time",
  30394. "cost",
  30395. "status",
  30396. "enabled",
  30397. "limit"
  30398. ],
  30399. "additionalProperties": false
  30400. },
  30401. "ProviderAISDK": {
  30402. "type": "object",
  30403. "properties": {
  30404. "type": {
  30405. "type": "string",
  30406. "enum": ["aisdk"]
  30407. },
  30408. "package": {
  30409. "type": "string"
  30410. },
  30411. "url": {
  30412. "type": "string"
  30413. },
  30414. "settings": {
  30415. "type": "object"
  30416. }
  30417. },
  30418. "required": ["type", "package"],
  30419. "additionalProperties": false
  30420. },
  30421. "ProviderNative": {
  30422. "type": "object",
  30423. "properties": {
  30424. "type": {
  30425. "type": "string",
  30426. "enum": ["native"]
  30427. },
  30428. "url": {
  30429. "type": "string"
  30430. },
  30431. "settings": {
  30432. "type": "object"
  30433. }
  30434. },
  30435. "required": ["type", "settings"],
  30436. "additionalProperties": false
  30437. },
  30438. "ProviderApi": {
  30439. "anyOf": [
  30440. {
  30441. "$ref": "#/components/schemas/ProviderAISDK"
  30442. },
  30443. {
  30444. "$ref": "#/components/schemas/ProviderNative"
  30445. }
  30446. ]
  30447. },
  30448. "ProviderV2Info": {
  30449. "type": "object",
  30450. "properties": {
  30451. "id": {
  30452. "type": "string"
  30453. },
  30454. "integrationID": {
  30455. "type": "string"
  30456. },
  30457. "name": {
  30458. "type": "string"
  30459. },
  30460. "disabled": {
  30461. "type": "boolean"
  30462. },
  30463. "api": {
  30464. "$ref": "#/components/schemas/ProviderApi"
  30465. },
  30466. "request": {
  30467. "$ref": "#/components/schemas/ProviderRequest"
  30468. }
  30469. },
  30470. "required": ["id", "name", "api", "request"],
  30471. "additionalProperties": false
  30472. },
  30473. "IntegrationWhen": {
  30474. "type": "object",
  30475. "properties": {
  30476. "key": {
  30477. "type": "string"
  30478. },
  30479. "op": {
  30480. "type": "string",
  30481. "enum": ["eq", "neq"]
  30482. },
  30483. "value": {
  30484. "type": "string"
  30485. }
  30486. },
  30487. "required": ["key", "op", "value"],
  30488. "additionalProperties": false
  30489. },
  30490. "IntegrationTextPrompt": {
  30491. "type": "object",
  30492. "properties": {
  30493. "type": {
  30494. "type": "string",
  30495. "enum": ["text"]
  30496. },
  30497. "key": {
  30498. "type": "string"
  30499. },
  30500. "message": {
  30501. "type": "string"
  30502. },
  30503. "placeholder": {
  30504. "type": "string"
  30505. },
  30506. "when": {
  30507. "$ref": "#/components/schemas/IntegrationWhen"
  30508. }
  30509. },
  30510. "required": ["type", "key", "message"],
  30511. "additionalProperties": false
  30512. },
  30513. "IntegrationSelectPrompt": {
  30514. "type": "object",
  30515. "properties": {
  30516. "type": {
  30517. "type": "string",
  30518. "enum": ["select"]
  30519. },
  30520. "key": {
  30521. "type": "string"
  30522. },
  30523. "message": {
  30524. "type": "string"
  30525. },
  30526. "options": {
  30527. "type": "array",
  30528. "items": {
  30529. "type": "object",
  30530. "properties": {
  30531. "label": {
  30532. "type": "string"
  30533. },
  30534. "value": {
  30535. "type": "string"
  30536. },
  30537. "hint": {
  30538. "type": "string"
  30539. }
  30540. },
  30541. "required": ["label", "value"],
  30542. "additionalProperties": false
  30543. }
  30544. },
  30545. "when": {
  30546. "$ref": "#/components/schemas/IntegrationWhen"
  30547. }
  30548. },
  30549. "required": ["type", "key", "message", "options"],
  30550. "additionalProperties": false
  30551. },
  30552. "IntegrationOAuthMethod": {
  30553. "type": "object",
  30554. "properties": {
  30555. "id": {
  30556. "type": "string"
  30557. },
  30558. "type": {
  30559. "type": "string",
  30560. "enum": ["oauth"]
  30561. },
  30562. "label": {
  30563. "type": "string"
  30564. },
  30565. "prompts": {
  30566. "type": "array",
  30567. "items": {
  30568. "anyOf": [
  30569. {
  30570. "$ref": "#/components/schemas/IntegrationTextPrompt"
  30571. },
  30572. {
  30573. "$ref": "#/components/schemas/IntegrationSelectPrompt"
  30574. }
  30575. ]
  30576. }
  30577. }
  30578. },
  30579. "required": ["id", "type", "label"],
  30580. "additionalProperties": false
  30581. },
  30582. "IntegrationKeyMethod": {
  30583. "type": "object",
  30584. "properties": {
  30585. "type": {
  30586. "type": "string",
  30587. "enum": ["key"]
  30588. },
  30589. "label": {
  30590. "type": "string"
  30591. }
  30592. },
  30593. "required": ["type"],
  30594. "additionalProperties": false
  30595. },
  30596. "IntegrationEnvMethod": {
  30597. "type": "object",
  30598. "properties": {
  30599. "type": {
  30600. "type": "string",
  30601. "enum": ["env"]
  30602. },
  30603. "names": {
  30604. "type": "array",
  30605. "items": {
  30606. "type": "string"
  30607. }
  30608. }
  30609. },
  30610. "required": ["type", "names"],
  30611. "additionalProperties": false
  30612. },
  30613. "ConnectionCredentialInfo": {
  30614. "type": "object",
  30615. "properties": {
  30616. "type": {
  30617. "type": "string",
  30618. "enum": ["credential"]
  30619. },
  30620. "id": {
  30621. "type": "string"
  30622. },
  30623. "label": {
  30624. "type": "string"
  30625. }
  30626. },
  30627. "required": ["type", "id", "label"],
  30628. "additionalProperties": false
  30629. },
  30630. "ConnectionEnvInfo": {
  30631. "type": "object",
  30632. "properties": {
  30633. "type": {
  30634. "type": "string",
  30635. "enum": ["env"]
  30636. },
  30637. "name": {
  30638. "type": "string"
  30639. }
  30640. },
  30641. "required": ["type", "name"],
  30642. "additionalProperties": false
  30643. },
  30644. "ConnectionInfo": {
  30645. "anyOf": [
  30646. {
  30647. "$ref": "#/components/schemas/ConnectionCredentialInfo"
  30648. },
  30649. {
  30650. "$ref": "#/components/schemas/ConnectionEnvInfo"
  30651. }
  30652. ]
  30653. },
  30654. "IntegrationInfo": {
  30655. "type": "object",
  30656. "properties": {
  30657. "id": {
  30658. "type": "string"
  30659. },
  30660. "name": {
  30661. "type": "string"
  30662. },
  30663. "methods": {
  30664. "type": "array",
  30665. "items": {
  30666. "$ref": "#/components/schemas/IntegrationMethod"
  30667. }
  30668. },
  30669. "connections": {
  30670. "type": "array",
  30671. "items": {
  30672. "$ref": "#/components/schemas/ConnectionInfo"
  30673. }
  30674. }
  30675. },
  30676. "required": ["id", "name", "methods", "connections"],
  30677. "additionalProperties": false
  30678. },
  30679. "IntegrationAttempt": {
  30680. "type": "object",
  30681. "properties": {
  30682. "attemptID": {
  30683. "type": "string"
  30684. },
  30685. "url": {
  30686. "type": "string"
  30687. },
  30688. "instructions": {
  30689. "type": "string"
  30690. },
  30691. "mode": {
  30692. "type": "string",
  30693. "enum": ["auto", "code"]
  30694. },
  30695. "time": {
  30696. "type": "object",
  30697. "properties": {
  30698. "created": {
  30699. "anyOf": [
  30700. {
  30701. "type": "number"
  30702. },
  30703. {
  30704. "type": "string",
  30705. "enum": ["NaN"]
  30706. },
  30707. {
  30708. "type": "string",
  30709. "enum": ["Infinity"]
  30710. },
  30711. {
  30712. "type": "string",
  30713. "enum": ["-Infinity"]
  30714. },
  30715. {
  30716. "type": "string",
  30717. "enum": ["Infinity", "-Infinity", "NaN"]
  30718. }
  30719. ]
  30720. },
  30721. "expires": {
  30722. "anyOf": [
  30723. {
  30724. "type": "number"
  30725. },
  30726. {
  30727. "type": "string",
  30728. "enum": ["NaN"]
  30729. },
  30730. {
  30731. "type": "string",
  30732. "enum": ["Infinity"]
  30733. },
  30734. {
  30735. "type": "string",
  30736. "enum": ["-Infinity"]
  30737. },
  30738. {
  30739. "type": "string",
  30740. "enum": ["Infinity", "-Infinity", "NaN"]
  30741. }
  30742. ]
  30743. }
  30744. },
  30745. "required": ["created", "expires"],
  30746. "additionalProperties": false
  30747. }
  30748. },
  30749. "required": ["attemptID", "url", "instructions", "mode", "time"],
  30750. "additionalProperties": false
  30751. },
  30752. "IntegrationAttemptStatus": {
  30753. "anyOf": [
  30754. {
  30755. "type": "object",
  30756. "properties": {
  30757. "status": {
  30758. "type": "string",
  30759. "enum": ["pending"]
  30760. },
  30761. "time": {
  30762. "type": "object",
  30763. "properties": {
  30764. "created": {
  30765. "anyOf": [
  30766. {
  30767. "type": "number"
  30768. },
  30769. {
  30770. "type": "string",
  30771. "enum": ["NaN"]
  30772. },
  30773. {
  30774. "type": "string",
  30775. "enum": ["Infinity"]
  30776. },
  30777. {
  30778. "type": "string",
  30779. "enum": ["-Infinity"]
  30780. },
  30781. {
  30782. "type": "string",
  30783. "enum": ["Infinity", "-Infinity", "NaN"]
  30784. }
  30785. ]
  30786. },
  30787. "expires": {
  30788. "anyOf": [
  30789. {
  30790. "type": "number"
  30791. },
  30792. {
  30793. "type": "string",
  30794. "enum": ["NaN"]
  30795. },
  30796. {
  30797. "type": "string",
  30798. "enum": ["Infinity"]
  30799. },
  30800. {
  30801. "type": "string",
  30802. "enum": ["-Infinity"]
  30803. },
  30804. {
  30805. "type": "string",
  30806. "enum": ["Infinity", "-Infinity", "NaN"]
  30807. }
  30808. ]
  30809. }
  30810. },
  30811. "required": ["created", "expires"],
  30812. "additionalProperties": false
  30813. }
  30814. },
  30815. "required": ["status", "time"],
  30816. "additionalProperties": false
  30817. },
  30818. {
  30819. "type": "object",
  30820. "properties": {
  30821. "status": {
  30822. "type": "string",
  30823. "enum": ["complete"]
  30824. },
  30825. "time": {
  30826. "type": "object",
  30827. "properties": {
  30828. "created": {
  30829. "anyOf": [
  30830. {
  30831. "type": "number"
  30832. },
  30833. {
  30834. "type": "string",
  30835. "enum": ["NaN"]
  30836. },
  30837. {
  30838. "type": "string",
  30839. "enum": ["Infinity"]
  30840. },
  30841. {
  30842. "type": "string",
  30843. "enum": ["-Infinity"]
  30844. },
  30845. {
  30846. "type": "string",
  30847. "enum": ["Infinity", "-Infinity", "NaN"]
  30848. }
  30849. ]
  30850. },
  30851. "expires": {
  30852. "anyOf": [
  30853. {
  30854. "type": "number"
  30855. },
  30856. {
  30857. "type": "string",
  30858. "enum": ["NaN"]
  30859. },
  30860. {
  30861. "type": "string",
  30862. "enum": ["Infinity"]
  30863. },
  30864. {
  30865. "type": "string",
  30866. "enum": ["-Infinity"]
  30867. },
  30868. {
  30869. "type": "string",
  30870. "enum": ["Infinity", "-Infinity", "NaN"]
  30871. }
  30872. ]
  30873. }
  30874. },
  30875. "required": ["created", "expires"],
  30876. "additionalProperties": false
  30877. }
  30878. },
  30879. "required": ["status", "time"],
  30880. "additionalProperties": false
  30881. },
  30882. {
  30883. "type": "object",
  30884. "properties": {
  30885. "status": {
  30886. "type": "string",
  30887. "enum": ["failed"]
  30888. },
  30889. "message": {
  30890. "type": "string"
  30891. },
  30892. "time": {
  30893. "type": "object",
  30894. "properties": {
  30895. "created": {
  30896. "anyOf": [
  30897. {
  30898. "type": "number"
  30899. },
  30900. {
  30901. "type": "string",
  30902. "enum": ["NaN"]
  30903. },
  30904. {
  30905. "type": "string",
  30906. "enum": ["Infinity"]
  30907. },
  30908. {
  30909. "type": "string",
  30910. "enum": ["-Infinity"]
  30911. },
  30912. {
  30913. "type": "string",
  30914. "enum": ["Infinity", "-Infinity", "NaN"]
  30915. }
  30916. ]
  30917. },
  30918. "expires": {
  30919. "anyOf": [
  30920. {
  30921. "type": "number"
  30922. },
  30923. {
  30924. "type": "string",
  30925. "enum": ["NaN"]
  30926. },
  30927. {
  30928. "type": "string",
  30929. "enum": ["Infinity"]
  30930. },
  30931. {
  30932. "type": "string",
  30933. "enum": ["-Infinity"]
  30934. },
  30935. {
  30936. "type": "string",
  30937. "enum": ["Infinity", "-Infinity", "NaN"]
  30938. }
  30939. ]
  30940. }
  30941. },
  30942. "required": ["created", "expires"],
  30943. "additionalProperties": false
  30944. }
  30945. },
  30946. "required": ["status", "message", "time"],
  30947. "additionalProperties": false
  30948. },
  30949. {
  30950. "type": "object",
  30951. "properties": {
  30952. "status": {
  30953. "type": "string",
  30954. "enum": ["expired"]
  30955. },
  30956. "time": {
  30957. "type": "object",
  30958. "properties": {
  30959. "created": {
  30960. "anyOf": [
  30961. {
  30962. "type": "number"
  30963. },
  30964. {
  30965. "type": "string",
  30966. "enum": ["NaN"]
  30967. },
  30968. {
  30969. "type": "string",
  30970. "enum": ["Infinity"]
  30971. },
  30972. {
  30973. "type": "string",
  30974. "enum": ["-Infinity"]
  30975. },
  30976. {
  30977. "type": "string",
  30978. "enum": ["Infinity", "-Infinity", "NaN"]
  30979. }
  30980. ]
  30981. },
  30982. "expires": {
  30983. "anyOf": [
  30984. {
  30985. "type": "number"
  30986. },
  30987. {
  30988. "type": "string",
  30989. "enum": ["NaN"]
  30990. },
  30991. {
  30992. "type": "string",
  30993. "enum": ["Infinity"]
  30994. },
  30995. {
  30996. "type": "string",
  30997. "enum": ["-Infinity"]
  30998. },
  30999. {
  31000. "type": "string",
  31001. "enum": ["Infinity", "-Infinity", "NaN"]
  31002. }
  31003. ]
  31004. }
  31005. },
  31006. "required": ["created", "expires"],
  31007. "additionalProperties": false
  31008. }
  31009. },
  31010. "required": ["status", "time"],
  31011. "additionalProperties": false
  31012. }
  31013. ]
  31014. },
  31015. "PermissionV2Request": {
  31016. "type": "object",
  31017. "properties": {
  31018. "id": {
  31019. "type": "string",
  31020. "pattern": "^per"
  31021. },
  31022. "sessionID": {
  31023. "type": "string",
  31024. "pattern": "^ses"
  31025. },
  31026. "action": {
  31027. "type": "string"
  31028. },
  31029. "resources": {
  31030. "type": "array",
  31031. "items": {
  31032. "type": "string"
  31033. }
  31034. },
  31035. "save": {
  31036. "type": "array",
  31037. "items": {
  31038. "type": "string"
  31039. }
  31040. },
  31041. "metadata": {
  31042. "type": "object"
  31043. },
  31044. "source": {
  31045. "$ref": "#/components/schemas/PermissionV2Source"
  31046. }
  31047. },
  31048. "required": ["id", "sessionID", "action", "resources"],
  31049. "additionalProperties": false
  31050. },
  31051. "PermissionSavedInfo": {
  31052. "type": "object",
  31053. "properties": {
  31054. "id": {
  31055. "type": "string"
  31056. },
  31057. "projectID": {
  31058. "type": "string"
  31059. },
  31060. "action": {
  31061. "type": "string"
  31062. },
  31063. "resource": {
  31064. "type": "string"
  31065. }
  31066. },
  31067. "required": ["id", "projectID", "action", "resource"],
  31068. "additionalProperties": false
  31069. },
  31070. "FileSystemEntry": {
  31071. "type": "object",
  31072. "properties": {
  31073. "path": {
  31074. "type": "string"
  31075. },
  31076. "type": {
  31077. "type": "string",
  31078. "enum": ["file", "directory"]
  31079. }
  31080. },
  31081. "required": ["path", "type"],
  31082. "additionalProperties": false
  31083. },
  31084. "CommandV2Info": {
  31085. "type": "object",
  31086. "properties": {
  31087. "name": {
  31088. "type": "string"
  31089. },
  31090. "template": {
  31091. "type": "string"
  31092. },
  31093. "description": {
  31094. "type": "string"
  31095. },
  31096. "agent": {
  31097. "type": "string"
  31098. },
  31099. "model": {
  31100. "$ref": "#/components/schemas/ModelRef"
  31101. },
  31102. "subtask": {
  31103. "type": "boolean"
  31104. }
  31105. },
  31106. "required": ["name", "template"],
  31107. "additionalProperties": false
  31108. },
  31109. "SkillV2Info": {
  31110. "type": "object",
  31111. "properties": {
  31112. "name": {
  31113. "type": "string"
  31114. },
  31115. "description": {
  31116. "type": "string"
  31117. },
  31118. "slash": {
  31119. "type": "boolean"
  31120. },
  31121. "location": {
  31122. "type": "string"
  31123. },
  31124. "content": {
  31125. "type": "string"
  31126. }
  31127. },
  31128. "required": ["name", "location", "content"],
  31129. "additionalProperties": false
  31130. },
  31131. "V2EventModels-devRefreshed": {
  31132. "type": "object",
  31133. "properties": {
  31134. "id": {
  31135. "type": "string",
  31136. "pattern": "^evt_"
  31137. },
  31138. "metadata": {
  31139. "type": "object"
  31140. },
  31141. "durable": {
  31142. "type": "object",
  31143. "properties": {
  31144. "aggregateID": {
  31145. "type": "string"
  31146. },
  31147. "seq": {
  31148. "type": "integer"
  31149. },
  31150. "version": {
  31151. "type": "integer"
  31152. }
  31153. },
  31154. "required": ["aggregateID", "seq", "version"],
  31155. "additionalProperties": false
  31156. },
  31157. "location": {
  31158. "$ref": "#/components/schemas/LocationRef"
  31159. },
  31160. "type": {
  31161. "type": "string",
  31162. "enum": ["models-dev.refreshed"]
  31163. },
  31164. "data": {
  31165. "type": "object",
  31166. "properties": {}
  31167. }
  31168. },
  31169. "required": ["id", "type", "data"],
  31170. "additionalProperties": false
  31171. },
  31172. "V2EventIntegrationUpdated": {
  31173. "type": "object",
  31174. "properties": {
  31175. "id": {
  31176. "type": "string",
  31177. "pattern": "^evt_"
  31178. },
  31179. "metadata": {
  31180. "type": "object"
  31181. },
  31182. "durable": {
  31183. "type": "object",
  31184. "properties": {
  31185. "aggregateID": {
  31186. "type": "string"
  31187. },
  31188. "seq": {
  31189. "type": "integer"
  31190. },
  31191. "version": {
  31192. "type": "integer"
  31193. }
  31194. },
  31195. "required": ["aggregateID", "seq", "version"],
  31196. "additionalProperties": false
  31197. },
  31198. "location": {
  31199. "$ref": "#/components/schemas/LocationRef"
  31200. },
  31201. "type": {
  31202. "type": "string",
  31203. "enum": ["integration.updated"]
  31204. },
  31205. "data": {
  31206. "type": "object",
  31207. "properties": {}
  31208. }
  31209. },
  31210. "required": ["id", "type", "data"],
  31211. "additionalProperties": false
  31212. },
  31213. "V2EventIntegrationConnectionUpdated": {
  31214. "type": "object",
  31215. "properties": {
  31216. "id": {
  31217. "type": "string",
  31218. "pattern": "^evt_"
  31219. },
  31220. "metadata": {
  31221. "type": "object"
  31222. },
  31223. "durable": {
  31224. "type": "object",
  31225. "properties": {
  31226. "aggregateID": {
  31227. "type": "string"
  31228. },
  31229. "seq": {
  31230. "type": "integer"
  31231. },
  31232. "version": {
  31233. "type": "integer"
  31234. }
  31235. },
  31236. "required": ["aggregateID", "seq", "version"],
  31237. "additionalProperties": false
  31238. },
  31239. "location": {
  31240. "$ref": "#/components/schemas/LocationRef"
  31241. },
  31242. "type": {
  31243. "type": "string",
  31244. "enum": ["integration.connection.updated"]
  31245. },
  31246. "data": {
  31247. "type": "object",
  31248. "properties": {
  31249. "integrationID": {
  31250. "type": "string"
  31251. }
  31252. },
  31253. "required": ["integrationID"],
  31254. "additionalProperties": false
  31255. }
  31256. },
  31257. "required": ["id", "type", "data"],
  31258. "additionalProperties": false
  31259. },
  31260. "V2EventCatalogUpdated": {
  31261. "type": "object",
  31262. "properties": {
  31263. "id": {
  31264. "type": "string",
  31265. "pattern": "^evt_"
  31266. },
  31267. "metadata": {
  31268. "type": "object"
  31269. },
  31270. "durable": {
  31271. "type": "object",
  31272. "properties": {
  31273. "aggregateID": {
  31274. "type": "string"
  31275. },
  31276. "seq": {
  31277. "type": "integer"
  31278. },
  31279. "version": {
  31280. "type": "integer"
  31281. }
  31282. },
  31283. "required": ["aggregateID", "seq", "version"],
  31284. "additionalProperties": false
  31285. },
  31286. "location": {
  31287. "$ref": "#/components/schemas/LocationRef"
  31288. },
  31289. "type": {
  31290. "type": "string",
  31291. "enum": ["catalog.updated"]
  31292. },
  31293. "data": {
  31294. "type": "object",
  31295. "properties": {}
  31296. }
  31297. },
  31298. "required": ["id", "type", "data"],
  31299. "additionalProperties": false
  31300. },
  31301. "V2EventSessionCreated": {
  31302. "type": "object",
  31303. "properties": {
  31304. "id": {
  31305. "type": "string",
  31306. "pattern": "^evt_"
  31307. },
  31308. "metadata": {
  31309. "type": "object"
  31310. },
  31311. "durable": {
  31312. "type": "object",
  31313. "properties": {
  31314. "aggregateID": {
  31315. "type": "string"
  31316. },
  31317. "seq": {
  31318. "type": "integer"
  31319. },
  31320. "version": {
  31321. "type": "integer"
  31322. }
  31323. },
  31324. "required": ["aggregateID", "seq", "version"],
  31325. "additionalProperties": false
  31326. },
  31327. "location": {
  31328. "$ref": "#/components/schemas/LocationRef"
  31329. },
  31330. "type": {
  31331. "type": "string",
  31332. "enum": ["session.created"]
  31333. },
  31334. "data": {
  31335. "type": "object",
  31336. "properties": {
  31337. "sessionID": {
  31338. "type": "string",
  31339. "pattern": "^ses"
  31340. },
  31341. "info": {
  31342. "$ref": "#/components/schemas/Session"
  31343. }
  31344. },
  31345. "required": ["sessionID", "info"],
  31346. "additionalProperties": false
  31347. }
  31348. },
  31349. "required": ["id", "type", "data"],
  31350. "additionalProperties": false
  31351. },
  31352. "V2EventSessionUpdated": {
  31353. "type": "object",
  31354. "properties": {
  31355. "id": {
  31356. "type": "string",
  31357. "pattern": "^evt_"
  31358. },
  31359. "metadata": {
  31360. "type": "object"
  31361. },
  31362. "durable": {
  31363. "type": "object",
  31364. "properties": {
  31365. "aggregateID": {
  31366. "type": "string"
  31367. },
  31368. "seq": {
  31369. "type": "integer"
  31370. },
  31371. "version": {
  31372. "type": "integer"
  31373. }
  31374. },
  31375. "required": ["aggregateID", "seq", "version"],
  31376. "additionalProperties": false
  31377. },
  31378. "location": {
  31379. "$ref": "#/components/schemas/LocationRef"
  31380. },
  31381. "type": {
  31382. "type": "string",
  31383. "enum": ["session.updated"]
  31384. },
  31385. "data": {
  31386. "type": "object",
  31387. "properties": {
  31388. "sessionID": {
  31389. "type": "string",
  31390. "pattern": "^ses"
  31391. },
  31392. "info": {
  31393. "$ref": "#/components/schemas/Session"
  31394. }
  31395. },
  31396. "required": ["sessionID", "info"],
  31397. "additionalProperties": false
  31398. }
  31399. },
  31400. "required": ["id", "type", "data"],
  31401. "additionalProperties": false
  31402. },
  31403. "V2EventSessionDeleted": {
  31404. "type": "object",
  31405. "properties": {
  31406. "id": {
  31407. "type": "string",
  31408. "pattern": "^evt_"
  31409. },
  31410. "metadata": {
  31411. "type": "object"
  31412. },
  31413. "durable": {
  31414. "type": "object",
  31415. "properties": {
  31416. "aggregateID": {
  31417. "type": "string"
  31418. },
  31419. "seq": {
  31420. "type": "integer"
  31421. },
  31422. "version": {
  31423. "type": "integer"
  31424. }
  31425. },
  31426. "required": ["aggregateID", "seq", "version"],
  31427. "additionalProperties": false
  31428. },
  31429. "location": {
  31430. "$ref": "#/components/schemas/LocationRef"
  31431. },
  31432. "type": {
  31433. "type": "string",
  31434. "enum": ["session.deleted"]
  31435. },
  31436. "data": {
  31437. "type": "object",
  31438. "properties": {
  31439. "sessionID": {
  31440. "type": "string",
  31441. "pattern": "^ses"
  31442. },
  31443. "info": {
  31444. "$ref": "#/components/schemas/Session"
  31445. }
  31446. },
  31447. "required": ["sessionID", "info"],
  31448. "additionalProperties": false
  31449. }
  31450. },
  31451. "required": ["id", "type", "data"],
  31452. "additionalProperties": false
  31453. },
  31454. "V2EventMessageUpdated": {
  31455. "type": "object",
  31456. "properties": {
  31457. "id": {
  31458. "type": "string",
  31459. "pattern": "^evt_"
  31460. },
  31461. "metadata": {
  31462. "type": "object"
  31463. },
  31464. "durable": {
  31465. "type": "object",
  31466. "properties": {
  31467. "aggregateID": {
  31468. "type": "string"
  31469. },
  31470. "seq": {
  31471. "type": "integer"
  31472. },
  31473. "version": {
  31474. "type": "integer"
  31475. }
  31476. },
  31477. "required": ["aggregateID", "seq", "version"],
  31478. "additionalProperties": false
  31479. },
  31480. "location": {
  31481. "$ref": "#/components/schemas/LocationRef"
  31482. },
  31483. "type": {
  31484. "type": "string",
  31485. "enum": ["message.updated"]
  31486. },
  31487. "data": {
  31488. "type": "object",
  31489. "properties": {
  31490. "sessionID": {
  31491. "type": "string",
  31492. "pattern": "^ses"
  31493. },
  31494. "info": {
  31495. "$ref": "#/components/schemas/Message"
  31496. }
  31497. },
  31498. "required": ["sessionID", "info"],
  31499. "additionalProperties": false
  31500. }
  31501. },
  31502. "required": ["id", "type", "data"],
  31503. "additionalProperties": false
  31504. },
  31505. "V2EventMessageRemoved": {
  31506. "type": "object",
  31507. "properties": {
  31508. "id": {
  31509. "type": "string",
  31510. "pattern": "^evt_"
  31511. },
  31512. "metadata": {
  31513. "type": "object"
  31514. },
  31515. "durable": {
  31516. "type": "object",
  31517. "properties": {
  31518. "aggregateID": {
  31519. "type": "string"
  31520. },
  31521. "seq": {
  31522. "type": "integer"
  31523. },
  31524. "version": {
  31525. "type": "integer"
  31526. }
  31527. },
  31528. "required": ["aggregateID", "seq", "version"],
  31529. "additionalProperties": false
  31530. },
  31531. "location": {
  31532. "$ref": "#/components/schemas/LocationRef"
  31533. },
  31534. "type": {
  31535. "type": "string",
  31536. "enum": ["message.removed"]
  31537. },
  31538. "data": {
  31539. "type": "object",
  31540. "properties": {
  31541. "sessionID": {
  31542. "type": "string",
  31543. "pattern": "^ses"
  31544. },
  31545. "messageID": {
  31546. "type": "string",
  31547. "pattern": "^msg"
  31548. }
  31549. },
  31550. "required": ["sessionID", "messageID"],
  31551. "additionalProperties": false
  31552. }
  31553. },
  31554. "required": ["id", "type", "data"],
  31555. "additionalProperties": false
  31556. },
  31557. "V2EventMessagePartUpdated": {
  31558. "type": "object",
  31559. "properties": {
  31560. "id": {
  31561. "type": "string",
  31562. "pattern": "^evt_"
  31563. },
  31564. "metadata": {
  31565. "type": "object"
  31566. },
  31567. "durable": {
  31568. "type": "object",
  31569. "properties": {
  31570. "aggregateID": {
  31571. "type": "string"
  31572. },
  31573. "seq": {
  31574. "type": "integer"
  31575. },
  31576. "version": {
  31577. "type": "integer"
  31578. }
  31579. },
  31580. "required": ["aggregateID", "seq", "version"],
  31581. "additionalProperties": false
  31582. },
  31583. "location": {
  31584. "$ref": "#/components/schemas/LocationRef"
  31585. },
  31586. "type": {
  31587. "type": "string",
  31588. "enum": ["message.part.updated"]
  31589. },
  31590. "data": {
  31591. "type": "object",
  31592. "properties": {
  31593. "sessionID": {
  31594. "type": "string",
  31595. "pattern": "^ses"
  31596. },
  31597. "part": {
  31598. "$ref": "#/components/schemas/Part"
  31599. },
  31600. "time": {
  31601. "type": "number"
  31602. }
  31603. },
  31604. "required": ["sessionID", "part", "time"],
  31605. "additionalProperties": false
  31606. }
  31607. },
  31608. "required": ["id", "type", "data"],
  31609. "additionalProperties": false
  31610. },
  31611. "V2EventMessagePartRemoved": {
  31612. "type": "object",
  31613. "properties": {
  31614. "id": {
  31615. "type": "string",
  31616. "pattern": "^evt_"
  31617. },
  31618. "metadata": {
  31619. "type": "object"
  31620. },
  31621. "durable": {
  31622. "type": "object",
  31623. "properties": {
  31624. "aggregateID": {
  31625. "type": "string"
  31626. },
  31627. "seq": {
  31628. "type": "integer"
  31629. },
  31630. "version": {
  31631. "type": "integer"
  31632. }
  31633. },
  31634. "required": ["aggregateID", "seq", "version"],
  31635. "additionalProperties": false
  31636. },
  31637. "location": {
  31638. "$ref": "#/components/schemas/LocationRef"
  31639. },
  31640. "type": {
  31641. "type": "string",
  31642. "enum": ["message.part.removed"]
  31643. },
  31644. "data": {
  31645. "type": "object",
  31646. "properties": {
  31647. "sessionID": {
  31648. "type": "string",
  31649. "pattern": "^ses"
  31650. },
  31651. "messageID": {
  31652. "type": "string",
  31653. "pattern": "^msg"
  31654. },
  31655. "partID": {
  31656. "type": "string",
  31657. "pattern": "^prt"
  31658. }
  31659. },
  31660. "required": ["sessionID", "messageID", "partID"],
  31661. "additionalProperties": false
  31662. }
  31663. },
  31664. "required": ["id", "type", "data"],
  31665. "additionalProperties": false
  31666. },
  31667. "V2EventSessionNextAgentSwitched": {
  31668. "type": "object",
  31669. "properties": {
  31670. "id": {
  31671. "type": "string",
  31672. "pattern": "^evt_"
  31673. },
  31674. "metadata": {
  31675. "type": "object"
  31676. },
  31677. "durable": {
  31678. "type": "object",
  31679. "properties": {
  31680. "aggregateID": {
  31681. "type": "string"
  31682. },
  31683. "seq": {
  31684. "type": "integer"
  31685. },
  31686. "version": {
  31687. "type": "integer"
  31688. }
  31689. },
  31690. "required": ["aggregateID", "seq", "version"],
  31691. "additionalProperties": false
  31692. },
  31693. "location": {
  31694. "$ref": "#/components/schemas/LocationRef"
  31695. },
  31696. "type": {
  31697. "type": "string",
  31698. "enum": ["session.next.agent.switched"]
  31699. },
  31700. "data": {
  31701. "type": "object",
  31702. "properties": {
  31703. "timestamp": {
  31704. "type": "number"
  31705. },
  31706. "sessionID": {
  31707. "type": "string",
  31708. "pattern": "^ses"
  31709. },
  31710. "messageID": {
  31711. "type": "string",
  31712. "pattern": "^msg_"
  31713. },
  31714. "agent": {
  31715. "type": "string"
  31716. }
  31717. },
  31718. "required": ["timestamp", "sessionID", "messageID", "agent"],
  31719. "additionalProperties": false
  31720. }
  31721. },
  31722. "required": ["id", "type", "data"],
  31723. "additionalProperties": false
  31724. },
  31725. "V2EventSessionNextModelSwitched": {
  31726. "type": "object",
  31727. "properties": {
  31728. "id": {
  31729. "type": "string",
  31730. "pattern": "^evt_"
  31731. },
  31732. "metadata": {
  31733. "type": "object"
  31734. },
  31735. "durable": {
  31736. "type": "object",
  31737. "properties": {
  31738. "aggregateID": {
  31739. "type": "string"
  31740. },
  31741. "seq": {
  31742. "type": "integer"
  31743. },
  31744. "version": {
  31745. "type": "integer"
  31746. }
  31747. },
  31748. "required": ["aggregateID", "seq", "version"],
  31749. "additionalProperties": false
  31750. },
  31751. "location": {
  31752. "$ref": "#/components/schemas/LocationRef"
  31753. },
  31754. "type": {
  31755. "type": "string",
  31756. "enum": ["session.next.model.switched"]
  31757. },
  31758. "data": {
  31759. "type": "object",
  31760. "properties": {
  31761. "timestamp": {
  31762. "type": "number"
  31763. },
  31764. "sessionID": {
  31765. "type": "string",
  31766. "pattern": "^ses"
  31767. },
  31768. "messageID": {
  31769. "type": "string",
  31770. "pattern": "^msg_"
  31771. },
  31772. "model": {
  31773. "$ref": "#/components/schemas/ModelRef"
  31774. }
  31775. },
  31776. "required": ["timestamp", "sessionID", "messageID", "model"],
  31777. "additionalProperties": false
  31778. }
  31779. },
  31780. "required": ["id", "type", "data"],
  31781. "additionalProperties": false
  31782. },
  31783. "V2EventSessionNextMoved": {
  31784. "type": "object",
  31785. "properties": {
  31786. "id": {
  31787. "type": "string",
  31788. "pattern": "^evt_"
  31789. },
  31790. "metadata": {
  31791. "type": "object"
  31792. },
  31793. "durable": {
  31794. "type": "object",
  31795. "properties": {
  31796. "aggregateID": {
  31797. "type": "string"
  31798. },
  31799. "seq": {
  31800. "type": "integer"
  31801. },
  31802. "version": {
  31803. "type": "integer"
  31804. }
  31805. },
  31806. "required": ["aggregateID", "seq", "version"],
  31807. "additionalProperties": false
  31808. },
  31809. "location": {
  31810. "$ref": "#/components/schemas/LocationRef"
  31811. },
  31812. "type": {
  31813. "type": "string",
  31814. "enum": ["session.next.moved"]
  31815. },
  31816. "data": {
  31817. "type": "object",
  31818. "properties": {
  31819. "timestamp": {
  31820. "type": "number"
  31821. },
  31822. "sessionID": {
  31823. "type": "string",
  31824. "pattern": "^ses"
  31825. },
  31826. "location": {
  31827. "$ref": "#/components/schemas/LocationRef"
  31828. },
  31829. "subdirectory": {
  31830. "type": "string"
  31831. }
  31832. },
  31833. "required": ["timestamp", "sessionID", "location"],
  31834. "additionalProperties": false
  31835. }
  31836. },
  31837. "required": ["id", "type", "data"],
  31838. "additionalProperties": false
  31839. },
  31840. "V2EventSessionNextPrompted": {
  31841. "type": "object",
  31842. "properties": {
  31843. "id": {
  31844. "type": "string",
  31845. "pattern": "^evt_"
  31846. },
  31847. "metadata": {
  31848. "type": "object"
  31849. },
  31850. "durable": {
  31851. "type": "object",
  31852. "properties": {
  31853. "aggregateID": {
  31854. "type": "string"
  31855. },
  31856. "seq": {
  31857. "type": "integer"
  31858. },
  31859. "version": {
  31860. "type": "integer"
  31861. }
  31862. },
  31863. "required": ["aggregateID", "seq", "version"],
  31864. "additionalProperties": false
  31865. },
  31866. "location": {
  31867. "$ref": "#/components/schemas/LocationRef"
  31868. },
  31869. "type": {
  31870. "type": "string",
  31871. "enum": ["session.next.prompted"]
  31872. },
  31873. "data": {
  31874. "type": "object",
  31875. "properties": {
  31876. "timestamp": {
  31877. "type": "number"
  31878. },
  31879. "sessionID": {
  31880. "type": "string",
  31881. "pattern": "^ses"
  31882. },
  31883. "messageID": {
  31884. "type": "string",
  31885. "pattern": "^msg_"
  31886. },
  31887. "prompt": {
  31888. "$ref": "#/components/schemas/Prompt"
  31889. },
  31890. "delivery": {
  31891. "type": "string",
  31892. "enum": ["steer", "queue"]
  31893. }
  31894. },
  31895. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  31896. "additionalProperties": false
  31897. }
  31898. },
  31899. "required": ["id", "type", "data"],
  31900. "additionalProperties": false
  31901. },
  31902. "V2EventSessionNextPromptAdmitted": {
  31903. "type": "object",
  31904. "properties": {
  31905. "id": {
  31906. "type": "string",
  31907. "pattern": "^evt_"
  31908. },
  31909. "metadata": {
  31910. "type": "object"
  31911. },
  31912. "durable": {
  31913. "type": "object",
  31914. "properties": {
  31915. "aggregateID": {
  31916. "type": "string"
  31917. },
  31918. "seq": {
  31919. "type": "integer"
  31920. },
  31921. "version": {
  31922. "type": "integer"
  31923. }
  31924. },
  31925. "required": ["aggregateID", "seq", "version"],
  31926. "additionalProperties": false
  31927. },
  31928. "location": {
  31929. "$ref": "#/components/schemas/LocationRef"
  31930. },
  31931. "type": {
  31932. "type": "string",
  31933. "enum": ["session.next.prompt.admitted"]
  31934. },
  31935. "data": {
  31936. "type": "object",
  31937. "properties": {
  31938. "timestamp": {
  31939. "type": "number"
  31940. },
  31941. "sessionID": {
  31942. "type": "string",
  31943. "pattern": "^ses"
  31944. },
  31945. "messageID": {
  31946. "type": "string",
  31947. "pattern": "^msg_"
  31948. },
  31949. "prompt": {
  31950. "$ref": "#/components/schemas/Prompt"
  31951. },
  31952. "delivery": {
  31953. "type": "string",
  31954. "enum": ["steer", "queue"]
  31955. }
  31956. },
  31957. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  31958. "additionalProperties": false
  31959. }
  31960. },
  31961. "required": ["id", "type", "data"],
  31962. "additionalProperties": false
  31963. },
  31964. "V2EventSessionNextContextUpdated": {
  31965. "type": "object",
  31966. "properties": {
  31967. "id": {
  31968. "type": "string",
  31969. "pattern": "^evt_"
  31970. },
  31971. "metadata": {
  31972. "type": "object"
  31973. },
  31974. "durable": {
  31975. "type": "object",
  31976. "properties": {
  31977. "aggregateID": {
  31978. "type": "string"
  31979. },
  31980. "seq": {
  31981. "type": "integer"
  31982. },
  31983. "version": {
  31984. "type": "integer"
  31985. }
  31986. },
  31987. "required": ["aggregateID", "seq", "version"],
  31988. "additionalProperties": false
  31989. },
  31990. "location": {
  31991. "$ref": "#/components/schemas/LocationRef"
  31992. },
  31993. "type": {
  31994. "type": "string",
  31995. "enum": ["session.next.context.updated"]
  31996. },
  31997. "data": {
  31998. "type": "object",
  31999. "properties": {
  32000. "timestamp": {
  32001. "type": "number"
  32002. },
  32003. "sessionID": {
  32004. "type": "string",
  32005. "pattern": "^ses"
  32006. },
  32007. "messageID": {
  32008. "type": "string",
  32009. "pattern": "^msg_"
  32010. },
  32011. "text": {
  32012. "type": "string"
  32013. }
  32014. },
  32015. "required": ["timestamp", "sessionID", "messageID", "text"],
  32016. "additionalProperties": false
  32017. }
  32018. },
  32019. "required": ["id", "type", "data"],
  32020. "additionalProperties": false
  32021. },
  32022. "V2EventSessionNextSynthetic": {
  32023. "type": "object",
  32024. "properties": {
  32025. "id": {
  32026. "type": "string",
  32027. "pattern": "^evt_"
  32028. },
  32029. "metadata": {
  32030. "type": "object"
  32031. },
  32032. "durable": {
  32033. "type": "object",
  32034. "properties": {
  32035. "aggregateID": {
  32036. "type": "string"
  32037. },
  32038. "seq": {
  32039. "type": "integer"
  32040. },
  32041. "version": {
  32042. "type": "integer"
  32043. }
  32044. },
  32045. "required": ["aggregateID", "seq", "version"],
  32046. "additionalProperties": false
  32047. },
  32048. "location": {
  32049. "$ref": "#/components/schemas/LocationRef"
  32050. },
  32051. "type": {
  32052. "type": "string",
  32053. "enum": ["session.next.synthetic"]
  32054. },
  32055. "data": {
  32056. "type": "object",
  32057. "properties": {
  32058. "timestamp": {
  32059. "type": "number"
  32060. },
  32061. "sessionID": {
  32062. "type": "string",
  32063. "pattern": "^ses"
  32064. },
  32065. "messageID": {
  32066. "type": "string",
  32067. "pattern": "^msg_"
  32068. },
  32069. "text": {
  32070. "type": "string"
  32071. }
  32072. },
  32073. "required": ["timestamp", "sessionID", "messageID", "text"],
  32074. "additionalProperties": false
  32075. }
  32076. },
  32077. "required": ["id", "type", "data"],
  32078. "additionalProperties": false
  32079. },
  32080. "V2EventSessionNextShellStarted": {
  32081. "type": "object",
  32082. "properties": {
  32083. "id": {
  32084. "type": "string",
  32085. "pattern": "^evt_"
  32086. },
  32087. "metadata": {
  32088. "type": "object"
  32089. },
  32090. "durable": {
  32091. "type": "object",
  32092. "properties": {
  32093. "aggregateID": {
  32094. "type": "string"
  32095. },
  32096. "seq": {
  32097. "type": "integer"
  32098. },
  32099. "version": {
  32100. "type": "integer"
  32101. }
  32102. },
  32103. "required": ["aggregateID", "seq", "version"],
  32104. "additionalProperties": false
  32105. },
  32106. "location": {
  32107. "$ref": "#/components/schemas/LocationRef"
  32108. },
  32109. "type": {
  32110. "type": "string",
  32111. "enum": ["session.next.shell.started"]
  32112. },
  32113. "data": {
  32114. "type": "object",
  32115. "properties": {
  32116. "timestamp": {
  32117. "type": "number"
  32118. },
  32119. "sessionID": {
  32120. "type": "string",
  32121. "pattern": "^ses"
  32122. },
  32123. "messageID": {
  32124. "type": "string",
  32125. "pattern": "^msg_"
  32126. },
  32127. "callID": {
  32128. "type": "string"
  32129. },
  32130. "command": {
  32131. "type": "string"
  32132. }
  32133. },
  32134. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  32135. "additionalProperties": false
  32136. }
  32137. },
  32138. "required": ["id", "type", "data"],
  32139. "additionalProperties": false
  32140. },
  32141. "V2EventSessionNextShellEnded": {
  32142. "type": "object",
  32143. "properties": {
  32144. "id": {
  32145. "type": "string",
  32146. "pattern": "^evt_"
  32147. },
  32148. "metadata": {
  32149. "type": "object"
  32150. },
  32151. "durable": {
  32152. "type": "object",
  32153. "properties": {
  32154. "aggregateID": {
  32155. "type": "string"
  32156. },
  32157. "seq": {
  32158. "type": "integer"
  32159. },
  32160. "version": {
  32161. "type": "integer"
  32162. }
  32163. },
  32164. "required": ["aggregateID", "seq", "version"],
  32165. "additionalProperties": false
  32166. },
  32167. "location": {
  32168. "$ref": "#/components/schemas/LocationRef"
  32169. },
  32170. "type": {
  32171. "type": "string",
  32172. "enum": ["session.next.shell.ended"]
  32173. },
  32174. "data": {
  32175. "type": "object",
  32176. "properties": {
  32177. "timestamp": {
  32178. "type": "number"
  32179. },
  32180. "sessionID": {
  32181. "type": "string",
  32182. "pattern": "^ses"
  32183. },
  32184. "callID": {
  32185. "type": "string"
  32186. },
  32187. "output": {
  32188. "type": "string"
  32189. }
  32190. },
  32191. "required": ["timestamp", "sessionID", "callID", "output"],
  32192. "additionalProperties": false
  32193. }
  32194. },
  32195. "required": ["id", "type", "data"],
  32196. "additionalProperties": false
  32197. },
  32198. "V2EventSessionNextStepStarted": {
  32199. "type": "object",
  32200. "properties": {
  32201. "id": {
  32202. "type": "string",
  32203. "pattern": "^evt_"
  32204. },
  32205. "metadata": {
  32206. "type": "object"
  32207. },
  32208. "durable": {
  32209. "type": "object",
  32210. "properties": {
  32211. "aggregateID": {
  32212. "type": "string"
  32213. },
  32214. "seq": {
  32215. "type": "integer"
  32216. },
  32217. "version": {
  32218. "type": "integer"
  32219. }
  32220. },
  32221. "required": ["aggregateID", "seq", "version"],
  32222. "additionalProperties": false
  32223. },
  32224. "location": {
  32225. "$ref": "#/components/schemas/LocationRef"
  32226. },
  32227. "type": {
  32228. "type": "string",
  32229. "enum": ["session.next.step.started"]
  32230. },
  32231. "data": {
  32232. "type": "object",
  32233. "properties": {
  32234. "timestamp": {
  32235. "type": "number"
  32236. },
  32237. "sessionID": {
  32238. "type": "string",
  32239. "pattern": "^ses"
  32240. },
  32241. "assistantMessageID": {
  32242. "type": "string",
  32243. "pattern": "^msg_"
  32244. },
  32245. "agent": {
  32246. "type": "string"
  32247. },
  32248. "model": {
  32249. "$ref": "#/components/schemas/ModelRef"
  32250. },
  32251. "snapshot": {
  32252. "type": "string"
  32253. }
  32254. },
  32255. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  32256. "additionalProperties": false
  32257. }
  32258. },
  32259. "required": ["id", "type", "data"],
  32260. "additionalProperties": false
  32261. },
  32262. "V2EventSessionNextStepEnded": {
  32263. "type": "object",
  32264. "properties": {
  32265. "id": {
  32266. "type": "string",
  32267. "pattern": "^evt_"
  32268. },
  32269. "metadata": {
  32270. "type": "object"
  32271. },
  32272. "durable": {
  32273. "type": "object",
  32274. "properties": {
  32275. "aggregateID": {
  32276. "type": "string"
  32277. },
  32278. "seq": {
  32279. "type": "integer"
  32280. },
  32281. "version": {
  32282. "type": "integer"
  32283. }
  32284. },
  32285. "required": ["aggregateID", "seq", "version"],
  32286. "additionalProperties": false
  32287. },
  32288. "location": {
  32289. "$ref": "#/components/schemas/LocationRef"
  32290. },
  32291. "type": {
  32292. "type": "string",
  32293. "enum": ["session.next.step.ended"]
  32294. },
  32295. "data": {
  32296. "type": "object",
  32297. "properties": {
  32298. "timestamp": {
  32299. "type": "number"
  32300. },
  32301. "sessionID": {
  32302. "type": "string",
  32303. "pattern": "^ses"
  32304. },
  32305. "assistantMessageID": {
  32306. "type": "string",
  32307. "pattern": "^msg_"
  32308. },
  32309. "finish": {
  32310. "type": "string"
  32311. },
  32312. "cost": {
  32313. "type": "number"
  32314. },
  32315. "tokens": {
  32316. "type": "object",
  32317. "properties": {
  32318. "input": {
  32319. "type": "number"
  32320. },
  32321. "output": {
  32322. "type": "number"
  32323. },
  32324. "reasoning": {
  32325. "type": "number"
  32326. },
  32327. "cache": {
  32328. "type": "object",
  32329. "properties": {
  32330. "read": {
  32331. "type": "number"
  32332. },
  32333. "write": {
  32334. "type": "number"
  32335. }
  32336. },
  32337. "required": ["read", "write"],
  32338. "additionalProperties": false
  32339. }
  32340. },
  32341. "required": ["input", "output", "reasoning", "cache"],
  32342. "additionalProperties": false
  32343. },
  32344. "snapshot": {
  32345. "type": "string"
  32346. },
  32347. "files": {
  32348. "type": "array",
  32349. "items": {
  32350. "type": "string"
  32351. }
  32352. }
  32353. },
  32354. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  32355. "additionalProperties": false
  32356. }
  32357. },
  32358. "required": ["id", "type", "data"],
  32359. "additionalProperties": false
  32360. },
  32361. "V2EventSessionNextStepFailed": {
  32362. "type": "object",
  32363. "properties": {
  32364. "id": {
  32365. "type": "string",
  32366. "pattern": "^evt_"
  32367. },
  32368. "metadata": {
  32369. "type": "object"
  32370. },
  32371. "durable": {
  32372. "type": "object",
  32373. "properties": {
  32374. "aggregateID": {
  32375. "type": "string"
  32376. },
  32377. "seq": {
  32378. "type": "integer"
  32379. },
  32380. "version": {
  32381. "type": "integer"
  32382. }
  32383. },
  32384. "required": ["aggregateID", "seq", "version"],
  32385. "additionalProperties": false
  32386. },
  32387. "location": {
  32388. "$ref": "#/components/schemas/LocationRef"
  32389. },
  32390. "type": {
  32391. "type": "string",
  32392. "enum": ["session.next.step.failed"]
  32393. },
  32394. "data": {
  32395. "type": "object",
  32396. "properties": {
  32397. "timestamp": {
  32398. "type": "number"
  32399. },
  32400. "sessionID": {
  32401. "type": "string",
  32402. "pattern": "^ses"
  32403. },
  32404. "assistantMessageID": {
  32405. "type": "string",
  32406. "pattern": "^msg_"
  32407. },
  32408. "error": {
  32409. "$ref": "#/components/schemas/SessionErrorUnknown"
  32410. }
  32411. },
  32412. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  32413. "additionalProperties": false
  32414. }
  32415. },
  32416. "required": ["id", "type", "data"],
  32417. "additionalProperties": false
  32418. },
  32419. "V2EventSessionNextTextStarted": {
  32420. "type": "object",
  32421. "properties": {
  32422. "id": {
  32423. "type": "string",
  32424. "pattern": "^evt_"
  32425. },
  32426. "metadata": {
  32427. "type": "object"
  32428. },
  32429. "durable": {
  32430. "type": "object",
  32431. "properties": {
  32432. "aggregateID": {
  32433. "type": "string"
  32434. },
  32435. "seq": {
  32436. "type": "integer"
  32437. },
  32438. "version": {
  32439. "type": "integer"
  32440. }
  32441. },
  32442. "required": ["aggregateID", "seq", "version"],
  32443. "additionalProperties": false
  32444. },
  32445. "location": {
  32446. "$ref": "#/components/schemas/LocationRef"
  32447. },
  32448. "type": {
  32449. "type": "string",
  32450. "enum": ["session.next.text.started"]
  32451. },
  32452. "data": {
  32453. "type": "object",
  32454. "properties": {
  32455. "timestamp": {
  32456. "type": "number"
  32457. },
  32458. "sessionID": {
  32459. "type": "string",
  32460. "pattern": "^ses"
  32461. },
  32462. "assistantMessageID": {
  32463. "type": "string",
  32464. "pattern": "^msg_"
  32465. },
  32466. "textID": {
  32467. "type": "string"
  32468. }
  32469. },
  32470. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  32471. "additionalProperties": false
  32472. }
  32473. },
  32474. "required": ["id", "type", "data"],
  32475. "additionalProperties": false
  32476. },
  32477. "V2EventSessionNextTextDelta": {
  32478. "type": "object",
  32479. "properties": {
  32480. "id": {
  32481. "type": "string",
  32482. "pattern": "^evt_"
  32483. },
  32484. "metadata": {
  32485. "type": "object"
  32486. },
  32487. "durable": {
  32488. "type": "object",
  32489. "properties": {
  32490. "aggregateID": {
  32491. "type": "string"
  32492. },
  32493. "seq": {
  32494. "type": "integer"
  32495. },
  32496. "version": {
  32497. "type": "integer"
  32498. }
  32499. },
  32500. "required": ["aggregateID", "seq", "version"],
  32501. "additionalProperties": false
  32502. },
  32503. "location": {
  32504. "$ref": "#/components/schemas/LocationRef"
  32505. },
  32506. "type": {
  32507. "type": "string",
  32508. "enum": ["session.next.text.delta"]
  32509. },
  32510. "data": {
  32511. "type": "object",
  32512. "properties": {
  32513. "timestamp": {
  32514. "type": "number"
  32515. },
  32516. "sessionID": {
  32517. "type": "string",
  32518. "pattern": "^ses"
  32519. },
  32520. "assistantMessageID": {
  32521. "type": "string",
  32522. "pattern": "^msg_"
  32523. },
  32524. "textID": {
  32525. "type": "string"
  32526. },
  32527. "delta": {
  32528. "type": "string"
  32529. }
  32530. },
  32531. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  32532. "additionalProperties": false
  32533. }
  32534. },
  32535. "required": ["id", "type", "data"],
  32536. "additionalProperties": false
  32537. },
  32538. "V2EventSessionNextTextEnded": {
  32539. "type": "object",
  32540. "properties": {
  32541. "id": {
  32542. "type": "string",
  32543. "pattern": "^evt_"
  32544. },
  32545. "metadata": {
  32546. "type": "object"
  32547. },
  32548. "durable": {
  32549. "type": "object",
  32550. "properties": {
  32551. "aggregateID": {
  32552. "type": "string"
  32553. },
  32554. "seq": {
  32555. "type": "integer"
  32556. },
  32557. "version": {
  32558. "type": "integer"
  32559. }
  32560. },
  32561. "required": ["aggregateID", "seq", "version"],
  32562. "additionalProperties": false
  32563. },
  32564. "location": {
  32565. "$ref": "#/components/schemas/LocationRef"
  32566. },
  32567. "type": {
  32568. "type": "string",
  32569. "enum": ["session.next.text.ended"]
  32570. },
  32571. "data": {
  32572. "type": "object",
  32573. "properties": {
  32574. "timestamp": {
  32575. "type": "number"
  32576. },
  32577. "sessionID": {
  32578. "type": "string",
  32579. "pattern": "^ses"
  32580. },
  32581. "assistantMessageID": {
  32582. "type": "string",
  32583. "pattern": "^msg_"
  32584. },
  32585. "textID": {
  32586. "type": "string"
  32587. },
  32588. "text": {
  32589. "type": "string"
  32590. }
  32591. },
  32592. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  32593. "additionalProperties": false
  32594. }
  32595. },
  32596. "required": ["id", "type", "data"],
  32597. "additionalProperties": false
  32598. },
  32599. "V2EventSessionNextReasoningStarted": {
  32600. "type": "object",
  32601. "properties": {
  32602. "id": {
  32603. "type": "string",
  32604. "pattern": "^evt_"
  32605. },
  32606. "metadata": {
  32607. "type": "object"
  32608. },
  32609. "durable": {
  32610. "type": "object",
  32611. "properties": {
  32612. "aggregateID": {
  32613. "type": "string"
  32614. },
  32615. "seq": {
  32616. "type": "integer"
  32617. },
  32618. "version": {
  32619. "type": "integer"
  32620. }
  32621. },
  32622. "required": ["aggregateID", "seq", "version"],
  32623. "additionalProperties": false
  32624. },
  32625. "location": {
  32626. "$ref": "#/components/schemas/LocationRef"
  32627. },
  32628. "type": {
  32629. "type": "string",
  32630. "enum": ["session.next.reasoning.started"]
  32631. },
  32632. "data": {
  32633. "type": "object",
  32634. "properties": {
  32635. "timestamp": {
  32636. "type": "number"
  32637. },
  32638. "sessionID": {
  32639. "type": "string",
  32640. "pattern": "^ses"
  32641. },
  32642. "assistantMessageID": {
  32643. "type": "string",
  32644. "pattern": "^msg_"
  32645. },
  32646. "reasoningID": {
  32647. "type": "string"
  32648. },
  32649. "providerMetadata": {
  32650. "$ref": "#/components/schemas/LLMProviderMetadata"
  32651. }
  32652. },
  32653. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  32654. "additionalProperties": false
  32655. }
  32656. },
  32657. "required": ["id", "type", "data"],
  32658. "additionalProperties": false
  32659. },
  32660. "V2EventSessionNextReasoningDelta": {
  32661. "type": "object",
  32662. "properties": {
  32663. "id": {
  32664. "type": "string",
  32665. "pattern": "^evt_"
  32666. },
  32667. "metadata": {
  32668. "type": "object"
  32669. },
  32670. "durable": {
  32671. "type": "object",
  32672. "properties": {
  32673. "aggregateID": {
  32674. "type": "string"
  32675. },
  32676. "seq": {
  32677. "type": "integer"
  32678. },
  32679. "version": {
  32680. "type": "integer"
  32681. }
  32682. },
  32683. "required": ["aggregateID", "seq", "version"],
  32684. "additionalProperties": false
  32685. },
  32686. "location": {
  32687. "$ref": "#/components/schemas/LocationRef"
  32688. },
  32689. "type": {
  32690. "type": "string",
  32691. "enum": ["session.next.reasoning.delta"]
  32692. },
  32693. "data": {
  32694. "type": "object",
  32695. "properties": {
  32696. "timestamp": {
  32697. "type": "number"
  32698. },
  32699. "sessionID": {
  32700. "type": "string",
  32701. "pattern": "^ses"
  32702. },
  32703. "assistantMessageID": {
  32704. "type": "string",
  32705. "pattern": "^msg_"
  32706. },
  32707. "reasoningID": {
  32708. "type": "string"
  32709. },
  32710. "delta": {
  32711. "type": "string"
  32712. }
  32713. },
  32714. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  32715. "additionalProperties": false
  32716. }
  32717. },
  32718. "required": ["id", "type", "data"],
  32719. "additionalProperties": false
  32720. },
  32721. "V2EventSessionNextReasoningEnded": {
  32722. "type": "object",
  32723. "properties": {
  32724. "id": {
  32725. "type": "string",
  32726. "pattern": "^evt_"
  32727. },
  32728. "metadata": {
  32729. "type": "object"
  32730. },
  32731. "durable": {
  32732. "type": "object",
  32733. "properties": {
  32734. "aggregateID": {
  32735. "type": "string"
  32736. },
  32737. "seq": {
  32738. "type": "integer"
  32739. },
  32740. "version": {
  32741. "type": "integer"
  32742. }
  32743. },
  32744. "required": ["aggregateID", "seq", "version"],
  32745. "additionalProperties": false
  32746. },
  32747. "location": {
  32748. "$ref": "#/components/schemas/LocationRef"
  32749. },
  32750. "type": {
  32751. "type": "string",
  32752. "enum": ["session.next.reasoning.ended"]
  32753. },
  32754. "data": {
  32755. "type": "object",
  32756. "properties": {
  32757. "timestamp": {
  32758. "type": "number"
  32759. },
  32760. "sessionID": {
  32761. "type": "string",
  32762. "pattern": "^ses"
  32763. },
  32764. "assistantMessageID": {
  32765. "type": "string",
  32766. "pattern": "^msg_"
  32767. },
  32768. "reasoningID": {
  32769. "type": "string"
  32770. },
  32771. "text": {
  32772. "type": "string"
  32773. },
  32774. "providerMetadata": {
  32775. "$ref": "#/components/schemas/LLMProviderMetadata"
  32776. }
  32777. },
  32778. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  32779. "additionalProperties": false
  32780. }
  32781. },
  32782. "required": ["id", "type", "data"],
  32783. "additionalProperties": false
  32784. },
  32785. "V2EventSessionNextToolInputStarted": {
  32786. "type": "object",
  32787. "properties": {
  32788. "id": {
  32789. "type": "string",
  32790. "pattern": "^evt_"
  32791. },
  32792. "metadata": {
  32793. "type": "object"
  32794. },
  32795. "durable": {
  32796. "type": "object",
  32797. "properties": {
  32798. "aggregateID": {
  32799. "type": "string"
  32800. },
  32801. "seq": {
  32802. "type": "integer"
  32803. },
  32804. "version": {
  32805. "type": "integer"
  32806. }
  32807. },
  32808. "required": ["aggregateID", "seq", "version"],
  32809. "additionalProperties": false
  32810. },
  32811. "location": {
  32812. "$ref": "#/components/schemas/LocationRef"
  32813. },
  32814. "type": {
  32815. "type": "string",
  32816. "enum": ["session.next.tool.input.started"]
  32817. },
  32818. "data": {
  32819. "type": "object",
  32820. "properties": {
  32821. "timestamp": {
  32822. "type": "number"
  32823. },
  32824. "sessionID": {
  32825. "type": "string",
  32826. "pattern": "^ses"
  32827. },
  32828. "assistantMessageID": {
  32829. "type": "string",
  32830. "pattern": "^msg_"
  32831. },
  32832. "callID": {
  32833. "type": "string"
  32834. },
  32835. "name": {
  32836. "type": "string"
  32837. }
  32838. },
  32839. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  32840. "additionalProperties": false
  32841. }
  32842. },
  32843. "required": ["id", "type", "data"],
  32844. "additionalProperties": false
  32845. },
  32846. "V2EventSessionNextToolInputDelta": {
  32847. "type": "object",
  32848. "properties": {
  32849. "id": {
  32850. "type": "string",
  32851. "pattern": "^evt_"
  32852. },
  32853. "metadata": {
  32854. "type": "object"
  32855. },
  32856. "durable": {
  32857. "type": "object",
  32858. "properties": {
  32859. "aggregateID": {
  32860. "type": "string"
  32861. },
  32862. "seq": {
  32863. "type": "integer"
  32864. },
  32865. "version": {
  32866. "type": "integer"
  32867. }
  32868. },
  32869. "required": ["aggregateID", "seq", "version"],
  32870. "additionalProperties": false
  32871. },
  32872. "location": {
  32873. "$ref": "#/components/schemas/LocationRef"
  32874. },
  32875. "type": {
  32876. "type": "string",
  32877. "enum": ["session.next.tool.input.delta"]
  32878. },
  32879. "data": {
  32880. "type": "object",
  32881. "properties": {
  32882. "timestamp": {
  32883. "type": "number"
  32884. },
  32885. "sessionID": {
  32886. "type": "string",
  32887. "pattern": "^ses"
  32888. },
  32889. "assistantMessageID": {
  32890. "type": "string",
  32891. "pattern": "^msg_"
  32892. },
  32893. "callID": {
  32894. "type": "string"
  32895. },
  32896. "delta": {
  32897. "type": "string"
  32898. }
  32899. },
  32900. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  32901. "additionalProperties": false
  32902. }
  32903. },
  32904. "required": ["id", "type", "data"],
  32905. "additionalProperties": false
  32906. },
  32907. "V2EventSessionNextToolInputEnded": {
  32908. "type": "object",
  32909. "properties": {
  32910. "id": {
  32911. "type": "string",
  32912. "pattern": "^evt_"
  32913. },
  32914. "metadata": {
  32915. "type": "object"
  32916. },
  32917. "durable": {
  32918. "type": "object",
  32919. "properties": {
  32920. "aggregateID": {
  32921. "type": "string"
  32922. },
  32923. "seq": {
  32924. "type": "integer"
  32925. },
  32926. "version": {
  32927. "type": "integer"
  32928. }
  32929. },
  32930. "required": ["aggregateID", "seq", "version"],
  32931. "additionalProperties": false
  32932. },
  32933. "location": {
  32934. "$ref": "#/components/schemas/LocationRef"
  32935. },
  32936. "type": {
  32937. "type": "string",
  32938. "enum": ["session.next.tool.input.ended"]
  32939. },
  32940. "data": {
  32941. "type": "object",
  32942. "properties": {
  32943. "timestamp": {
  32944. "type": "number"
  32945. },
  32946. "sessionID": {
  32947. "type": "string",
  32948. "pattern": "^ses"
  32949. },
  32950. "assistantMessageID": {
  32951. "type": "string",
  32952. "pattern": "^msg_"
  32953. },
  32954. "callID": {
  32955. "type": "string"
  32956. },
  32957. "text": {
  32958. "type": "string"
  32959. }
  32960. },
  32961. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  32962. "additionalProperties": false
  32963. }
  32964. },
  32965. "required": ["id", "type", "data"],
  32966. "additionalProperties": false
  32967. },
  32968. "V2EventSessionNextToolCalled": {
  32969. "type": "object",
  32970. "properties": {
  32971. "id": {
  32972. "type": "string",
  32973. "pattern": "^evt_"
  32974. },
  32975. "metadata": {
  32976. "type": "object"
  32977. },
  32978. "durable": {
  32979. "type": "object",
  32980. "properties": {
  32981. "aggregateID": {
  32982. "type": "string"
  32983. },
  32984. "seq": {
  32985. "type": "integer"
  32986. },
  32987. "version": {
  32988. "type": "integer"
  32989. }
  32990. },
  32991. "required": ["aggregateID", "seq", "version"],
  32992. "additionalProperties": false
  32993. },
  32994. "location": {
  32995. "$ref": "#/components/schemas/LocationRef"
  32996. },
  32997. "type": {
  32998. "type": "string",
  32999. "enum": ["session.next.tool.called"]
  33000. },
  33001. "data": {
  33002. "type": "object",
  33003. "properties": {
  33004. "timestamp": {
  33005. "type": "number"
  33006. },
  33007. "sessionID": {
  33008. "type": "string",
  33009. "pattern": "^ses"
  33010. },
  33011. "assistantMessageID": {
  33012. "type": "string",
  33013. "pattern": "^msg_"
  33014. },
  33015. "callID": {
  33016. "type": "string"
  33017. },
  33018. "tool": {
  33019. "type": "string"
  33020. },
  33021. "input": {
  33022. "type": "object"
  33023. },
  33024. "provider": {
  33025. "type": "object",
  33026. "properties": {
  33027. "executed": {
  33028. "type": "boolean"
  33029. },
  33030. "metadata": {
  33031. "$ref": "#/components/schemas/LLMProviderMetadata"
  33032. }
  33033. },
  33034. "required": ["executed"],
  33035. "additionalProperties": false
  33036. }
  33037. },
  33038. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  33039. "additionalProperties": false
  33040. }
  33041. },
  33042. "required": ["id", "type", "data"],
  33043. "additionalProperties": false
  33044. },
  33045. "V2EventSessionNextToolProgress": {
  33046. "type": "object",
  33047. "properties": {
  33048. "id": {
  33049. "type": "string",
  33050. "pattern": "^evt_"
  33051. },
  33052. "metadata": {
  33053. "type": "object"
  33054. },
  33055. "durable": {
  33056. "type": "object",
  33057. "properties": {
  33058. "aggregateID": {
  33059. "type": "string"
  33060. },
  33061. "seq": {
  33062. "type": "integer"
  33063. },
  33064. "version": {
  33065. "type": "integer"
  33066. }
  33067. },
  33068. "required": ["aggregateID", "seq", "version"],
  33069. "additionalProperties": false
  33070. },
  33071. "location": {
  33072. "$ref": "#/components/schemas/LocationRef"
  33073. },
  33074. "type": {
  33075. "type": "string",
  33076. "enum": ["session.next.tool.progress"]
  33077. },
  33078. "data": {
  33079. "type": "object",
  33080. "properties": {
  33081. "timestamp": {
  33082. "type": "number"
  33083. },
  33084. "sessionID": {
  33085. "type": "string",
  33086. "pattern": "^ses"
  33087. },
  33088. "assistantMessageID": {
  33089. "type": "string",
  33090. "pattern": "^msg_"
  33091. },
  33092. "callID": {
  33093. "type": "string"
  33094. },
  33095. "structured": {
  33096. "type": "object"
  33097. },
  33098. "content": {
  33099. "type": "array",
  33100. "items": {
  33101. "$ref": "#/components/schemas/LLMToolContent"
  33102. }
  33103. }
  33104. },
  33105. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  33106. "additionalProperties": false
  33107. }
  33108. },
  33109. "required": ["id", "type", "data"],
  33110. "additionalProperties": false
  33111. },
  33112. "V2EventSessionNextToolSuccess": {
  33113. "type": "object",
  33114. "properties": {
  33115. "id": {
  33116. "type": "string",
  33117. "pattern": "^evt_"
  33118. },
  33119. "metadata": {
  33120. "type": "object"
  33121. },
  33122. "durable": {
  33123. "type": "object",
  33124. "properties": {
  33125. "aggregateID": {
  33126. "type": "string"
  33127. },
  33128. "seq": {
  33129. "type": "integer"
  33130. },
  33131. "version": {
  33132. "type": "integer"
  33133. }
  33134. },
  33135. "required": ["aggregateID", "seq", "version"],
  33136. "additionalProperties": false
  33137. },
  33138. "location": {
  33139. "$ref": "#/components/schemas/LocationRef"
  33140. },
  33141. "type": {
  33142. "type": "string",
  33143. "enum": ["session.next.tool.success"]
  33144. },
  33145. "data": {
  33146. "type": "object",
  33147. "properties": {
  33148. "timestamp": {
  33149. "type": "number"
  33150. },
  33151. "sessionID": {
  33152. "type": "string",
  33153. "pattern": "^ses"
  33154. },
  33155. "assistantMessageID": {
  33156. "type": "string",
  33157. "pattern": "^msg_"
  33158. },
  33159. "callID": {
  33160. "type": "string"
  33161. },
  33162. "structured": {
  33163. "type": "object"
  33164. },
  33165. "content": {
  33166. "type": "array",
  33167. "items": {
  33168. "$ref": "#/components/schemas/LLMToolContent"
  33169. }
  33170. },
  33171. "outputPaths": {
  33172. "type": "array",
  33173. "items": {
  33174. "type": "string"
  33175. }
  33176. },
  33177. "result": {},
  33178. "provider": {
  33179. "type": "object",
  33180. "properties": {
  33181. "executed": {
  33182. "type": "boolean"
  33183. },
  33184. "metadata": {
  33185. "$ref": "#/components/schemas/LLMProviderMetadata"
  33186. }
  33187. },
  33188. "required": ["executed"],
  33189. "additionalProperties": false
  33190. }
  33191. },
  33192. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  33193. "additionalProperties": false
  33194. }
  33195. },
  33196. "required": ["id", "type", "data"],
  33197. "additionalProperties": false
  33198. },
  33199. "V2EventSessionNextToolFailed": {
  33200. "type": "object",
  33201. "properties": {
  33202. "id": {
  33203. "type": "string",
  33204. "pattern": "^evt_"
  33205. },
  33206. "metadata": {
  33207. "type": "object"
  33208. },
  33209. "durable": {
  33210. "type": "object",
  33211. "properties": {
  33212. "aggregateID": {
  33213. "type": "string"
  33214. },
  33215. "seq": {
  33216. "type": "integer"
  33217. },
  33218. "version": {
  33219. "type": "integer"
  33220. }
  33221. },
  33222. "required": ["aggregateID", "seq", "version"],
  33223. "additionalProperties": false
  33224. },
  33225. "location": {
  33226. "$ref": "#/components/schemas/LocationRef"
  33227. },
  33228. "type": {
  33229. "type": "string",
  33230. "enum": ["session.next.tool.failed"]
  33231. },
  33232. "data": {
  33233. "type": "object",
  33234. "properties": {
  33235. "timestamp": {
  33236. "type": "number"
  33237. },
  33238. "sessionID": {
  33239. "type": "string",
  33240. "pattern": "^ses"
  33241. },
  33242. "assistantMessageID": {
  33243. "type": "string",
  33244. "pattern": "^msg_"
  33245. },
  33246. "callID": {
  33247. "type": "string"
  33248. },
  33249. "error": {
  33250. "$ref": "#/components/schemas/SessionErrorUnknown"
  33251. },
  33252. "result": {},
  33253. "provider": {
  33254. "type": "object",
  33255. "properties": {
  33256. "executed": {
  33257. "type": "boolean"
  33258. },
  33259. "metadata": {
  33260. "$ref": "#/components/schemas/LLMProviderMetadata"
  33261. }
  33262. },
  33263. "required": ["executed"],
  33264. "additionalProperties": false
  33265. }
  33266. },
  33267. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  33268. "additionalProperties": false
  33269. }
  33270. },
  33271. "required": ["id", "type", "data"],
  33272. "additionalProperties": false
  33273. },
  33274. "V2EventSessionNextRetried": {
  33275. "type": "object",
  33276. "properties": {
  33277. "id": {
  33278. "type": "string",
  33279. "pattern": "^evt_"
  33280. },
  33281. "metadata": {
  33282. "type": "object"
  33283. },
  33284. "durable": {
  33285. "type": "object",
  33286. "properties": {
  33287. "aggregateID": {
  33288. "type": "string"
  33289. },
  33290. "seq": {
  33291. "type": "integer"
  33292. },
  33293. "version": {
  33294. "type": "integer"
  33295. }
  33296. },
  33297. "required": ["aggregateID", "seq", "version"],
  33298. "additionalProperties": false
  33299. },
  33300. "location": {
  33301. "$ref": "#/components/schemas/LocationRef"
  33302. },
  33303. "type": {
  33304. "type": "string",
  33305. "enum": ["session.next.retried"]
  33306. },
  33307. "data": {
  33308. "type": "object",
  33309. "properties": {
  33310. "timestamp": {
  33311. "type": "number"
  33312. },
  33313. "sessionID": {
  33314. "type": "string",
  33315. "pattern": "^ses"
  33316. },
  33317. "attempt": {
  33318. "type": "number"
  33319. },
  33320. "error": {
  33321. "$ref": "#/components/schemas/SessionNextRetry_error"
  33322. }
  33323. },
  33324. "required": ["timestamp", "sessionID", "attempt", "error"],
  33325. "additionalProperties": false
  33326. }
  33327. },
  33328. "required": ["id", "type", "data"],
  33329. "additionalProperties": false
  33330. },
  33331. "V2EventSessionNextCompactionStarted": {
  33332. "type": "object",
  33333. "properties": {
  33334. "id": {
  33335. "type": "string",
  33336. "pattern": "^evt_"
  33337. },
  33338. "metadata": {
  33339. "type": "object"
  33340. },
  33341. "durable": {
  33342. "type": "object",
  33343. "properties": {
  33344. "aggregateID": {
  33345. "type": "string"
  33346. },
  33347. "seq": {
  33348. "type": "integer"
  33349. },
  33350. "version": {
  33351. "type": "integer"
  33352. }
  33353. },
  33354. "required": ["aggregateID", "seq", "version"],
  33355. "additionalProperties": false
  33356. },
  33357. "location": {
  33358. "$ref": "#/components/schemas/LocationRef"
  33359. },
  33360. "type": {
  33361. "type": "string",
  33362. "enum": ["session.next.compaction.started"]
  33363. },
  33364. "data": {
  33365. "type": "object",
  33366. "properties": {
  33367. "timestamp": {
  33368. "type": "number"
  33369. },
  33370. "sessionID": {
  33371. "type": "string",
  33372. "pattern": "^ses"
  33373. },
  33374. "messageID": {
  33375. "type": "string",
  33376. "pattern": "^msg_"
  33377. },
  33378. "reason": {
  33379. "type": "string",
  33380. "enum": ["auto", "manual"]
  33381. }
  33382. },
  33383. "required": ["timestamp", "sessionID", "messageID", "reason"],
  33384. "additionalProperties": false
  33385. }
  33386. },
  33387. "required": ["id", "type", "data"],
  33388. "additionalProperties": false
  33389. },
  33390. "V2EventSessionNextCompactionDelta": {
  33391. "type": "object",
  33392. "properties": {
  33393. "id": {
  33394. "type": "string",
  33395. "pattern": "^evt_"
  33396. },
  33397. "metadata": {
  33398. "type": "object"
  33399. },
  33400. "durable": {
  33401. "type": "object",
  33402. "properties": {
  33403. "aggregateID": {
  33404. "type": "string"
  33405. },
  33406. "seq": {
  33407. "type": "integer"
  33408. },
  33409. "version": {
  33410. "type": "integer"
  33411. }
  33412. },
  33413. "required": ["aggregateID", "seq", "version"],
  33414. "additionalProperties": false
  33415. },
  33416. "location": {
  33417. "$ref": "#/components/schemas/LocationRef"
  33418. },
  33419. "type": {
  33420. "type": "string",
  33421. "enum": ["session.next.compaction.delta"]
  33422. },
  33423. "data": {
  33424. "type": "object",
  33425. "properties": {
  33426. "timestamp": {
  33427. "type": "number"
  33428. },
  33429. "sessionID": {
  33430. "type": "string",
  33431. "pattern": "^ses"
  33432. },
  33433. "messageID": {
  33434. "type": "string",
  33435. "pattern": "^msg_"
  33436. },
  33437. "text": {
  33438. "type": "string"
  33439. }
  33440. },
  33441. "required": ["timestamp", "sessionID", "messageID", "text"],
  33442. "additionalProperties": false
  33443. }
  33444. },
  33445. "required": ["id", "type", "data"],
  33446. "additionalProperties": false
  33447. },
  33448. "V2EventSessionNextCompactionEnded": {
  33449. "type": "object",
  33450. "properties": {
  33451. "id": {
  33452. "type": "string",
  33453. "pattern": "^evt_"
  33454. },
  33455. "metadata": {
  33456. "type": "object"
  33457. },
  33458. "durable": {
  33459. "type": "object",
  33460. "properties": {
  33461. "aggregateID": {
  33462. "type": "string"
  33463. },
  33464. "seq": {
  33465. "type": "integer"
  33466. },
  33467. "version": {
  33468. "type": "integer"
  33469. }
  33470. },
  33471. "required": ["aggregateID", "seq", "version"],
  33472. "additionalProperties": false
  33473. },
  33474. "location": {
  33475. "$ref": "#/components/schemas/LocationRef"
  33476. },
  33477. "type": {
  33478. "type": "string",
  33479. "enum": ["session.next.compaction.ended"]
  33480. },
  33481. "data": {
  33482. "type": "object",
  33483. "properties": {
  33484. "timestamp": {
  33485. "type": "number"
  33486. },
  33487. "sessionID": {
  33488. "type": "string",
  33489. "pattern": "^ses"
  33490. },
  33491. "messageID": {
  33492. "type": "string",
  33493. "pattern": "^msg_"
  33494. },
  33495. "reason": {
  33496. "type": "string",
  33497. "enum": ["auto", "manual"]
  33498. },
  33499. "text": {
  33500. "type": "string"
  33501. },
  33502. "recent": {
  33503. "type": "string"
  33504. }
  33505. },
  33506. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  33507. "additionalProperties": false
  33508. }
  33509. },
  33510. "required": ["id", "type", "data"],
  33511. "additionalProperties": false
  33512. },
  33513. "V2EventSessionNextRevertStaged": {
  33514. "type": "object",
  33515. "properties": {
  33516. "id": {
  33517. "type": "string",
  33518. "pattern": "^evt_"
  33519. },
  33520. "metadata": {
  33521. "type": "object"
  33522. },
  33523. "durable": {
  33524. "type": "object",
  33525. "properties": {
  33526. "aggregateID": {
  33527. "type": "string"
  33528. },
  33529. "seq": {
  33530. "type": "integer"
  33531. },
  33532. "version": {
  33533. "type": "integer"
  33534. }
  33535. },
  33536. "required": ["aggregateID", "seq", "version"],
  33537. "additionalProperties": false
  33538. },
  33539. "location": {
  33540. "$ref": "#/components/schemas/LocationRef"
  33541. },
  33542. "type": {
  33543. "type": "string",
  33544. "enum": ["session.next.revert.staged"]
  33545. },
  33546. "data": {
  33547. "type": "object",
  33548. "properties": {
  33549. "timestamp": {
  33550. "type": "number"
  33551. },
  33552. "sessionID": {
  33553. "type": "string",
  33554. "pattern": "^ses"
  33555. },
  33556. "revert": {
  33557. "$ref": "#/components/schemas/RevertState"
  33558. }
  33559. },
  33560. "required": ["timestamp", "sessionID", "revert"],
  33561. "additionalProperties": false
  33562. }
  33563. },
  33564. "required": ["id", "type", "data"],
  33565. "additionalProperties": false
  33566. },
  33567. "V2EventSessionNextRevertCleared": {
  33568. "type": "object",
  33569. "properties": {
  33570. "id": {
  33571. "type": "string",
  33572. "pattern": "^evt_"
  33573. },
  33574. "metadata": {
  33575. "type": "object"
  33576. },
  33577. "durable": {
  33578. "type": "object",
  33579. "properties": {
  33580. "aggregateID": {
  33581. "type": "string"
  33582. },
  33583. "seq": {
  33584. "type": "integer"
  33585. },
  33586. "version": {
  33587. "type": "integer"
  33588. }
  33589. },
  33590. "required": ["aggregateID", "seq", "version"],
  33591. "additionalProperties": false
  33592. },
  33593. "location": {
  33594. "$ref": "#/components/schemas/LocationRef"
  33595. },
  33596. "type": {
  33597. "type": "string",
  33598. "enum": ["session.next.revert.cleared"]
  33599. },
  33600. "data": {
  33601. "type": "object",
  33602. "properties": {
  33603. "timestamp": {
  33604. "type": "number"
  33605. },
  33606. "sessionID": {
  33607. "type": "string",
  33608. "pattern": "^ses"
  33609. }
  33610. },
  33611. "required": ["timestamp", "sessionID"],
  33612. "additionalProperties": false
  33613. }
  33614. },
  33615. "required": ["id", "type", "data"],
  33616. "additionalProperties": false
  33617. },
  33618. "V2EventSessionNextRevertCommitted": {
  33619. "type": "object",
  33620. "properties": {
  33621. "id": {
  33622. "type": "string",
  33623. "pattern": "^evt_"
  33624. },
  33625. "metadata": {
  33626. "type": "object"
  33627. },
  33628. "durable": {
  33629. "type": "object",
  33630. "properties": {
  33631. "aggregateID": {
  33632. "type": "string"
  33633. },
  33634. "seq": {
  33635. "type": "integer"
  33636. },
  33637. "version": {
  33638. "type": "integer"
  33639. }
  33640. },
  33641. "required": ["aggregateID", "seq", "version"],
  33642. "additionalProperties": false
  33643. },
  33644. "location": {
  33645. "$ref": "#/components/schemas/LocationRef"
  33646. },
  33647. "type": {
  33648. "type": "string",
  33649. "enum": ["session.next.revert.committed"]
  33650. },
  33651. "data": {
  33652. "type": "object",
  33653. "properties": {
  33654. "timestamp": {
  33655. "type": "number"
  33656. },
  33657. "sessionID": {
  33658. "type": "string",
  33659. "pattern": "^ses"
  33660. },
  33661. "messageID": {
  33662. "type": "string",
  33663. "pattern": "^msg_"
  33664. }
  33665. },
  33666. "required": ["timestamp", "sessionID", "messageID"],
  33667. "additionalProperties": false
  33668. }
  33669. },
  33670. "required": ["id", "type", "data"],
  33671. "additionalProperties": false
  33672. },
  33673. "V2EventMessagePartDelta": {
  33674. "type": "object",
  33675. "properties": {
  33676. "id": {
  33677. "type": "string",
  33678. "pattern": "^evt_"
  33679. },
  33680. "metadata": {
  33681. "type": "object"
  33682. },
  33683. "durable": {
  33684. "type": "object",
  33685. "properties": {
  33686. "aggregateID": {
  33687. "type": "string"
  33688. },
  33689. "seq": {
  33690. "type": "integer"
  33691. },
  33692. "version": {
  33693. "type": "integer"
  33694. }
  33695. },
  33696. "required": ["aggregateID", "seq", "version"],
  33697. "additionalProperties": false
  33698. },
  33699. "location": {
  33700. "$ref": "#/components/schemas/LocationRef"
  33701. },
  33702. "type": {
  33703. "type": "string",
  33704. "enum": ["message.part.delta"]
  33705. },
  33706. "data": {
  33707. "type": "object",
  33708. "properties": {
  33709. "sessionID": {
  33710. "type": "string",
  33711. "pattern": "^ses"
  33712. },
  33713. "messageID": {
  33714. "type": "string",
  33715. "pattern": "^msg"
  33716. },
  33717. "partID": {
  33718. "type": "string",
  33719. "pattern": "^prt"
  33720. },
  33721. "field": {
  33722. "type": "string"
  33723. },
  33724. "delta": {
  33725. "type": "string"
  33726. }
  33727. },
  33728. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  33729. "additionalProperties": false
  33730. }
  33731. },
  33732. "required": ["id", "type", "data"],
  33733. "additionalProperties": false
  33734. },
  33735. "V2EventSessionDiff": {
  33736. "type": "object",
  33737. "properties": {
  33738. "id": {
  33739. "type": "string",
  33740. "pattern": "^evt_"
  33741. },
  33742. "metadata": {
  33743. "type": "object"
  33744. },
  33745. "durable": {
  33746. "type": "object",
  33747. "properties": {
  33748. "aggregateID": {
  33749. "type": "string"
  33750. },
  33751. "seq": {
  33752. "type": "integer"
  33753. },
  33754. "version": {
  33755. "type": "integer"
  33756. }
  33757. },
  33758. "required": ["aggregateID", "seq", "version"],
  33759. "additionalProperties": false
  33760. },
  33761. "location": {
  33762. "$ref": "#/components/schemas/LocationRef"
  33763. },
  33764. "type": {
  33765. "type": "string",
  33766. "enum": ["session.diff"]
  33767. },
  33768. "data": {
  33769. "type": "object",
  33770. "properties": {
  33771. "sessionID": {
  33772. "type": "string",
  33773. "pattern": "^ses"
  33774. },
  33775. "diff": {
  33776. "type": "array",
  33777. "items": {
  33778. "$ref": "#/components/schemas/SnapshotFileDiff"
  33779. }
  33780. }
  33781. },
  33782. "required": ["sessionID", "diff"],
  33783. "additionalProperties": false
  33784. }
  33785. },
  33786. "required": ["id", "type", "data"],
  33787. "additionalProperties": false
  33788. },
  33789. "V2EventSessionError": {
  33790. "type": "object",
  33791. "properties": {
  33792. "id": {
  33793. "type": "string",
  33794. "pattern": "^evt_"
  33795. },
  33796. "metadata": {
  33797. "type": "object"
  33798. },
  33799. "durable": {
  33800. "type": "object",
  33801. "properties": {
  33802. "aggregateID": {
  33803. "type": "string"
  33804. },
  33805. "seq": {
  33806. "type": "integer"
  33807. },
  33808. "version": {
  33809. "type": "integer"
  33810. }
  33811. },
  33812. "required": ["aggregateID", "seq", "version"],
  33813. "additionalProperties": false
  33814. },
  33815. "location": {
  33816. "$ref": "#/components/schemas/LocationRef"
  33817. },
  33818. "type": {
  33819. "type": "string",
  33820. "enum": ["session.error"]
  33821. },
  33822. "data": {
  33823. "type": "object",
  33824. "properties": {
  33825. "sessionID": {
  33826. "type": "string",
  33827. "pattern": "^ses"
  33828. },
  33829. "error": {
  33830. "anyOf": [
  33831. {
  33832. "$ref": "#/components/schemas/ProviderAuthError"
  33833. },
  33834. {
  33835. "$ref": "#/components/schemas/UnknownError"
  33836. },
  33837. {
  33838. "$ref": "#/components/schemas/MessageOutputLengthError"
  33839. },
  33840. {
  33841. "$ref": "#/components/schemas/MessageAbortedError"
  33842. },
  33843. {
  33844. "$ref": "#/components/schemas/StructuredOutputError"
  33845. },
  33846. {
  33847. "$ref": "#/components/schemas/ContextOverflowError"
  33848. },
  33849. {
  33850. "$ref": "#/components/schemas/ContentFilterError"
  33851. },
  33852. {
  33853. "$ref": "#/components/schemas/APIError"
  33854. }
  33855. ]
  33856. }
  33857. },
  33858. "additionalProperties": false
  33859. }
  33860. },
  33861. "required": ["id", "type", "data"],
  33862. "additionalProperties": false
  33863. },
  33864. "V2EventInstallationUpdated": {
  33865. "type": "object",
  33866. "properties": {
  33867. "id": {
  33868. "type": "string",
  33869. "pattern": "^evt_"
  33870. },
  33871. "metadata": {
  33872. "type": "object"
  33873. },
  33874. "durable": {
  33875. "type": "object",
  33876. "properties": {
  33877. "aggregateID": {
  33878. "type": "string"
  33879. },
  33880. "seq": {
  33881. "type": "integer"
  33882. },
  33883. "version": {
  33884. "type": "integer"
  33885. }
  33886. },
  33887. "required": ["aggregateID", "seq", "version"],
  33888. "additionalProperties": false
  33889. },
  33890. "location": {
  33891. "$ref": "#/components/schemas/LocationRef"
  33892. },
  33893. "type": {
  33894. "type": "string",
  33895. "enum": ["installation.updated"]
  33896. },
  33897. "data": {
  33898. "type": "object",
  33899. "properties": {
  33900. "version": {
  33901. "type": "string"
  33902. }
  33903. },
  33904. "required": ["version"],
  33905. "additionalProperties": false
  33906. }
  33907. },
  33908. "required": ["id", "type", "data"],
  33909. "additionalProperties": false
  33910. },
  33911. "V2EventInstallationUpdate-available": {
  33912. "type": "object",
  33913. "properties": {
  33914. "id": {
  33915. "type": "string",
  33916. "pattern": "^evt_"
  33917. },
  33918. "metadata": {
  33919. "type": "object"
  33920. },
  33921. "durable": {
  33922. "type": "object",
  33923. "properties": {
  33924. "aggregateID": {
  33925. "type": "string"
  33926. },
  33927. "seq": {
  33928. "type": "integer"
  33929. },
  33930. "version": {
  33931. "type": "integer"
  33932. }
  33933. },
  33934. "required": ["aggregateID", "seq", "version"],
  33935. "additionalProperties": false
  33936. },
  33937. "location": {
  33938. "$ref": "#/components/schemas/LocationRef"
  33939. },
  33940. "type": {
  33941. "type": "string",
  33942. "enum": ["installation.update-available"]
  33943. },
  33944. "data": {
  33945. "type": "object",
  33946. "properties": {
  33947. "version": {
  33948. "type": "string"
  33949. }
  33950. },
  33951. "required": ["version"],
  33952. "additionalProperties": false
  33953. }
  33954. },
  33955. "required": ["id", "type", "data"],
  33956. "additionalProperties": false
  33957. },
  33958. "V2EventFileEdited": {
  33959. "type": "object",
  33960. "properties": {
  33961. "id": {
  33962. "type": "string",
  33963. "pattern": "^evt_"
  33964. },
  33965. "metadata": {
  33966. "type": "object"
  33967. },
  33968. "durable": {
  33969. "type": "object",
  33970. "properties": {
  33971. "aggregateID": {
  33972. "type": "string"
  33973. },
  33974. "seq": {
  33975. "type": "integer"
  33976. },
  33977. "version": {
  33978. "type": "integer"
  33979. }
  33980. },
  33981. "required": ["aggregateID", "seq", "version"],
  33982. "additionalProperties": false
  33983. },
  33984. "location": {
  33985. "$ref": "#/components/schemas/LocationRef"
  33986. },
  33987. "type": {
  33988. "type": "string",
  33989. "enum": ["file.edited"]
  33990. },
  33991. "data": {
  33992. "type": "object",
  33993. "properties": {
  33994. "file": {
  33995. "type": "string"
  33996. }
  33997. },
  33998. "required": ["file"],
  33999. "additionalProperties": false
  34000. }
  34001. },
  34002. "required": ["id", "type", "data"],
  34003. "additionalProperties": false
  34004. },
  34005. "V2EventReferenceUpdated": {
  34006. "type": "object",
  34007. "properties": {
  34008. "id": {
  34009. "type": "string",
  34010. "pattern": "^evt_"
  34011. },
  34012. "metadata": {
  34013. "type": "object"
  34014. },
  34015. "durable": {
  34016. "type": "object",
  34017. "properties": {
  34018. "aggregateID": {
  34019. "type": "string"
  34020. },
  34021. "seq": {
  34022. "type": "integer"
  34023. },
  34024. "version": {
  34025. "type": "integer"
  34026. }
  34027. },
  34028. "required": ["aggregateID", "seq", "version"],
  34029. "additionalProperties": false
  34030. },
  34031. "location": {
  34032. "$ref": "#/components/schemas/LocationRef"
  34033. },
  34034. "type": {
  34035. "type": "string",
  34036. "enum": ["reference.updated"]
  34037. },
  34038. "data": {
  34039. "type": "object",
  34040. "properties": {}
  34041. }
  34042. },
  34043. "required": ["id", "type", "data"],
  34044. "additionalProperties": false
  34045. },
  34046. "V2EventPermissionV2Asked": {
  34047. "type": "object",
  34048. "properties": {
  34049. "id": {
  34050. "type": "string",
  34051. "pattern": "^evt_"
  34052. },
  34053. "metadata": {
  34054. "type": "object"
  34055. },
  34056. "durable": {
  34057. "type": "object",
  34058. "properties": {
  34059. "aggregateID": {
  34060. "type": "string"
  34061. },
  34062. "seq": {
  34063. "type": "integer"
  34064. },
  34065. "version": {
  34066. "type": "integer"
  34067. }
  34068. },
  34069. "required": ["aggregateID", "seq", "version"],
  34070. "additionalProperties": false
  34071. },
  34072. "location": {
  34073. "$ref": "#/components/schemas/LocationRef"
  34074. },
  34075. "type": {
  34076. "type": "string",
  34077. "enum": ["permission.v2.asked"]
  34078. },
  34079. "data": {
  34080. "type": "object",
  34081. "properties": {
  34082. "id": {
  34083. "type": "string",
  34084. "pattern": "^per"
  34085. },
  34086. "sessionID": {
  34087. "type": "string",
  34088. "pattern": "^ses"
  34089. },
  34090. "action": {
  34091. "type": "string"
  34092. },
  34093. "resources": {
  34094. "type": "array",
  34095. "items": {
  34096. "type": "string"
  34097. }
  34098. },
  34099. "save": {
  34100. "type": "array",
  34101. "items": {
  34102. "type": "string"
  34103. }
  34104. },
  34105. "metadata": {
  34106. "type": "object"
  34107. },
  34108. "source": {
  34109. "$ref": "#/components/schemas/PermissionV2Source"
  34110. }
  34111. },
  34112. "required": ["id", "sessionID", "action", "resources"],
  34113. "additionalProperties": false
  34114. }
  34115. },
  34116. "required": ["id", "type", "data"],
  34117. "additionalProperties": false
  34118. },
  34119. "V2EventPermissionV2Replied": {
  34120. "type": "object",
  34121. "properties": {
  34122. "id": {
  34123. "type": "string",
  34124. "pattern": "^evt_"
  34125. },
  34126. "metadata": {
  34127. "type": "object"
  34128. },
  34129. "durable": {
  34130. "type": "object",
  34131. "properties": {
  34132. "aggregateID": {
  34133. "type": "string"
  34134. },
  34135. "seq": {
  34136. "type": "integer"
  34137. },
  34138. "version": {
  34139. "type": "integer"
  34140. }
  34141. },
  34142. "required": ["aggregateID", "seq", "version"],
  34143. "additionalProperties": false
  34144. },
  34145. "location": {
  34146. "$ref": "#/components/schemas/LocationRef"
  34147. },
  34148. "type": {
  34149. "type": "string",
  34150. "enum": ["permission.v2.replied"]
  34151. },
  34152. "data": {
  34153. "type": "object",
  34154. "properties": {
  34155. "sessionID": {
  34156. "type": "string",
  34157. "pattern": "^ses"
  34158. },
  34159. "requestID": {
  34160. "type": "string",
  34161. "pattern": "^per"
  34162. },
  34163. "reply": {
  34164. "$ref": "#/components/schemas/PermissionV2Reply"
  34165. }
  34166. },
  34167. "required": ["sessionID", "requestID", "reply"],
  34168. "additionalProperties": false
  34169. }
  34170. },
  34171. "required": ["id", "type", "data"],
  34172. "additionalProperties": false
  34173. },
  34174. "V2EventPluginAdded": {
  34175. "type": "object",
  34176. "properties": {
  34177. "id": {
  34178. "type": "string",
  34179. "pattern": "^evt_"
  34180. },
  34181. "metadata": {
  34182. "type": "object"
  34183. },
  34184. "durable": {
  34185. "type": "object",
  34186. "properties": {
  34187. "aggregateID": {
  34188. "type": "string"
  34189. },
  34190. "seq": {
  34191. "type": "integer"
  34192. },
  34193. "version": {
  34194. "type": "integer"
  34195. }
  34196. },
  34197. "required": ["aggregateID", "seq", "version"],
  34198. "additionalProperties": false
  34199. },
  34200. "location": {
  34201. "$ref": "#/components/schemas/LocationRef"
  34202. },
  34203. "type": {
  34204. "type": "string",
  34205. "enum": ["plugin.added"]
  34206. },
  34207. "data": {
  34208. "type": "object",
  34209. "properties": {
  34210. "id": {
  34211. "type": "string"
  34212. }
  34213. },
  34214. "required": ["id"],
  34215. "additionalProperties": false
  34216. }
  34217. },
  34218. "required": ["id", "type", "data"],
  34219. "additionalProperties": false
  34220. },
  34221. "V2EventProjectDirectoriesUpdated": {
  34222. "type": "object",
  34223. "properties": {
  34224. "id": {
  34225. "type": "string",
  34226. "pattern": "^evt_"
  34227. },
  34228. "metadata": {
  34229. "type": "object"
  34230. },
  34231. "durable": {
  34232. "type": "object",
  34233. "properties": {
  34234. "aggregateID": {
  34235. "type": "string"
  34236. },
  34237. "seq": {
  34238. "type": "integer"
  34239. },
  34240. "version": {
  34241. "type": "integer"
  34242. }
  34243. },
  34244. "required": ["aggregateID", "seq", "version"],
  34245. "additionalProperties": false
  34246. },
  34247. "location": {
  34248. "$ref": "#/components/schemas/LocationRef"
  34249. },
  34250. "type": {
  34251. "type": "string",
  34252. "enum": ["project.directories.updated"]
  34253. },
  34254. "data": {
  34255. "type": "object",
  34256. "properties": {
  34257. "projectID": {
  34258. "type": "string"
  34259. }
  34260. },
  34261. "required": ["projectID"],
  34262. "additionalProperties": false
  34263. }
  34264. },
  34265. "required": ["id", "type", "data"],
  34266. "additionalProperties": false
  34267. },
  34268. "V2EventFileWatcherUpdated": {
  34269. "type": "object",
  34270. "properties": {
  34271. "id": {
  34272. "type": "string",
  34273. "pattern": "^evt_"
  34274. },
  34275. "metadata": {
  34276. "type": "object"
  34277. },
  34278. "durable": {
  34279. "type": "object",
  34280. "properties": {
  34281. "aggregateID": {
  34282. "type": "string"
  34283. },
  34284. "seq": {
  34285. "type": "integer"
  34286. },
  34287. "version": {
  34288. "type": "integer"
  34289. }
  34290. },
  34291. "required": ["aggregateID", "seq", "version"],
  34292. "additionalProperties": false
  34293. },
  34294. "location": {
  34295. "$ref": "#/components/schemas/LocationRef"
  34296. },
  34297. "type": {
  34298. "type": "string",
  34299. "enum": ["file.watcher.updated"]
  34300. },
  34301. "data": {
  34302. "type": "object",
  34303. "properties": {
  34304. "file": {
  34305. "type": "string"
  34306. },
  34307. "event": {
  34308. "type": "string",
  34309. "enum": ["add", "change", "unlink"]
  34310. }
  34311. },
  34312. "required": ["file", "event"],
  34313. "additionalProperties": false
  34314. }
  34315. },
  34316. "required": ["id", "type", "data"],
  34317. "additionalProperties": false
  34318. },
  34319. "V2EventPtyCreated": {
  34320. "type": "object",
  34321. "properties": {
  34322. "id": {
  34323. "type": "string",
  34324. "pattern": "^evt_"
  34325. },
  34326. "metadata": {
  34327. "type": "object"
  34328. },
  34329. "durable": {
  34330. "type": "object",
  34331. "properties": {
  34332. "aggregateID": {
  34333. "type": "string"
  34334. },
  34335. "seq": {
  34336. "type": "integer"
  34337. },
  34338. "version": {
  34339. "type": "integer"
  34340. }
  34341. },
  34342. "required": ["aggregateID", "seq", "version"],
  34343. "additionalProperties": false
  34344. },
  34345. "location": {
  34346. "$ref": "#/components/schemas/LocationRef"
  34347. },
  34348. "type": {
  34349. "type": "string",
  34350. "enum": ["pty.created"]
  34351. },
  34352. "data": {
  34353. "type": "object",
  34354. "properties": {
  34355. "info": {
  34356. "$ref": "#/components/schemas/Pty"
  34357. }
  34358. },
  34359. "required": ["info"],
  34360. "additionalProperties": false
  34361. }
  34362. },
  34363. "required": ["id", "type", "data"],
  34364. "additionalProperties": false
  34365. },
  34366. "V2EventPtyUpdated": {
  34367. "type": "object",
  34368. "properties": {
  34369. "id": {
  34370. "type": "string",
  34371. "pattern": "^evt_"
  34372. },
  34373. "metadata": {
  34374. "type": "object"
  34375. },
  34376. "durable": {
  34377. "type": "object",
  34378. "properties": {
  34379. "aggregateID": {
  34380. "type": "string"
  34381. },
  34382. "seq": {
  34383. "type": "integer"
  34384. },
  34385. "version": {
  34386. "type": "integer"
  34387. }
  34388. },
  34389. "required": ["aggregateID", "seq", "version"],
  34390. "additionalProperties": false
  34391. },
  34392. "location": {
  34393. "$ref": "#/components/schemas/LocationRef"
  34394. },
  34395. "type": {
  34396. "type": "string",
  34397. "enum": ["pty.updated"]
  34398. },
  34399. "data": {
  34400. "type": "object",
  34401. "properties": {
  34402. "info": {
  34403. "$ref": "#/components/schemas/Pty"
  34404. }
  34405. },
  34406. "required": ["info"],
  34407. "additionalProperties": false
  34408. }
  34409. },
  34410. "required": ["id", "type", "data"],
  34411. "additionalProperties": false
  34412. },
  34413. "V2EventPtyExited": {
  34414. "type": "object",
  34415. "properties": {
  34416. "id": {
  34417. "type": "string",
  34418. "pattern": "^evt_"
  34419. },
  34420. "metadata": {
  34421. "type": "object"
  34422. },
  34423. "durable": {
  34424. "type": "object",
  34425. "properties": {
  34426. "aggregateID": {
  34427. "type": "string"
  34428. },
  34429. "seq": {
  34430. "type": "integer"
  34431. },
  34432. "version": {
  34433. "type": "integer"
  34434. }
  34435. },
  34436. "required": ["aggregateID", "seq", "version"],
  34437. "additionalProperties": false
  34438. },
  34439. "location": {
  34440. "$ref": "#/components/schemas/LocationRef"
  34441. },
  34442. "type": {
  34443. "type": "string",
  34444. "enum": ["pty.exited"]
  34445. },
  34446. "data": {
  34447. "type": "object",
  34448. "properties": {
  34449. "id": {
  34450. "type": "string",
  34451. "pattern": "^pty"
  34452. },
  34453. "exitCode": {
  34454. "type": "integer",
  34455. "minimum": 0
  34456. }
  34457. },
  34458. "required": ["id", "exitCode"],
  34459. "additionalProperties": false
  34460. }
  34461. },
  34462. "required": ["id", "type", "data"],
  34463. "additionalProperties": false
  34464. },
  34465. "V2EventPtyDeleted": {
  34466. "type": "object",
  34467. "properties": {
  34468. "id": {
  34469. "type": "string",
  34470. "pattern": "^evt_"
  34471. },
  34472. "metadata": {
  34473. "type": "object"
  34474. },
  34475. "durable": {
  34476. "type": "object",
  34477. "properties": {
  34478. "aggregateID": {
  34479. "type": "string"
  34480. },
  34481. "seq": {
  34482. "type": "integer"
  34483. },
  34484. "version": {
  34485. "type": "integer"
  34486. }
  34487. },
  34488. "required": ["aggregateID", "seq", "version"],
  34489. "additionalProperties": false
  34490. },
  34491. "location": {
  34492. "$ref": "#/components/schemas/LocationRef"
  34493. },
  34494. "type": {
  34495. "type": "string",
  34496. "enum": ["pty.deleted"]
  34497. },
  34498. "data": {
  34499. "type": "object",
  34500. "properties": {
  34501. "id": {
  34502. "type": "string",
  34503. "pattern": "^pty"
  34504. }
  34505. },
  34506. "required": ["id"],
  34507. "additionalProperties": false
  34508. }
  34509. },
  34510. "required": ["id", "type", "data"],
  34511. "additionalProperties": false
  34512. },
  34513. "V2EventQuestionV2Asked": {
  34514. "type": "object",
  34515. "properties": {
  34516. "id": {
  34517. "type": "string",
  34518. "pattern": "^evt_"
  34519. },
  34520. "metadata": {
  34521. "type": "object"
  34522. },
  34523. "durable": {
  34524. "type": "object",
  34525. "properties": {
  34526. "aggregateID": {
  34527. "type": "string"
  34528. },
  34529. "seq": {
  34530. "type": "integer"
  34531. },
  34532. "version": {
  34533. "type": "integer"
  34534. }
  34535. },
  34536. "required": ["aggregateID", "seq", "version"],
  34537. "additionalProperties": false
  34538. },
  34539. "location": {
  34540. "$ref": "#/components/schemas/LocationRef"
  34541. },
  34542. "type": {
  34543. "type": "string",
  34544. "enum": ["question.v2.asked"]
  34545. },
  34546. "data": {
  34547. "type": "object",
  34548. "properties": {
  34549. "id": {
  34550. "type": "string",
  34551. "pattern": "^que"
  34552. },
  34553. "sessionID": {
  34554. "type": "string",
  34555. "pattern": "^ses"
  34556. },
  34557. "questions": {
  34558. "type": "array",
  34559. "items": {
  34560. "$ref": "#/components/schemas/QuestionV2Info"
  34561. },
  34562. "description": "Questions to ask"
  34563. },
  34564. "tool": {
  34565. "$ref": "#/components/schemas/QuestionV2Tool"
  34566. }
  34567. },
  34568. "required": ["id", "sessionID", "questions"],
  34569. "additionalProperties": false
  34570. }
  34571. },
  34572. "required": ["id", "type", "data"],
  34573. "additionalProperties": false
  34574. },
  34575. "V2EventQuestionV2Replied": {
  34576. "type": "object",
  34577. "properties": {
  34578. "id": {
  34579. "type": "string",
  34580. "pattern": "^evt_"
  34581. },
  34582. "metadata": {
  34583. "type": "object"
  34584. },
  34585. "durable": {
  34586. "type": "object",
  34587. "properties": {
  34588. "aggregateID": {
  34589. "type": "string"
  34590. },
  34591. "seq": {
  34592. "type": "integer"
  34593. },
  34594. "version": {
  34595. "type": "integer"
  34596. }
  34597. },
  34598. "required": ["aggregateID", "seq", "version"],
  34599. "additionalProperties": false
  34600. },
  34601. "location": {
  34602. "$ref": "#/components/schemas/LocationRef"
  34603. },
  34604. "type": {
  34605. "type": "string",
  34606. "enum": ["question.v2.replied"]
  34607. },
  34608. "data": {
  34609. "type": "object",
  34610. "properties": {
  34611. "sessionID": {
  34612. "type": "string",
  34613. "pattern": "^ses"
  34614. },
  34615. "requestID": {
  34616. "type": "string",
  34617. "pattern": "^que"
  34618. },
  34619. "answers": {
  34620. "type": "array",
  34621. "items": {
  34622. "$ref": "#/components/schemas/QuestionV2Answer"
  34623. }
  34624. }
  34625. },
  34626. "required": ["sessionID", "requestID", "answers"],
  34627. "additionalProperties": false
  34628. }
  34629. },
  34630. "required": ["id", "type", "data"],
  34631. "additionalProperties": false
  34632. },
  34633. "V2EventQuestionV2Rejected": {
  34634. "type": "object",
  34635. "properties": {
  34636. "id": {
  34637. "type": "string",
  34638. "pattern": "^evt_"
  34639. },
  34640. "metadata": {
  34641. "type": "object"
  34642. },
  34643. "durable": {
  34644. "type": "object",
  34645. "properties": {
  34646. "aggregateID": {
  34647. "type": "string"
  34648. },
  34649. "seq": {
  34650. "type": "integer"
  34651. },
  34652. "version": {
  34653. "type": "integer"
  34654. }
  34655. },
  34656. "required": ["aggregateID", "seq", "version"],
  34657. "additionalProperties": false
  34658. },
  34659. "location": {
  34660. "$ref": "#/components/schemas/LocationRef"
  34661. },
  34662. "type": {
  34663. "type": "string",
  34664. "enum": ["question.v2.rejected"]
  34665. },
  34666. "data": {
  34667. "type": "object",
  34668. "properties": {
  34669. "sessionID": {
  34670. "type": "string",
  34671. "pattern": "^ses"
  34672. },
  34673. "requestID": {
  34674. "type": "string",
  34675. "pattern": "^que"
  34676. }
  34677. },
  34678. "required": ["sessionID", "requestID"],
  34679. "additionalProperties": false
  34680. }
  34681. },
  34682. "required": ["id", "type", "data"],
  34683. "additionalProperties": false
  34684. },
  34685. "V2EventTodoUpdated": {
  34686. "type": "object",
  34687. "properties": {
  34688. "id": {
  34689. "type": "string",
  34690. "pattern": "^evt_"
  34691. },
  34692. "metadata": {
  34693. "type": "object"
  34694. },
  34695. "durable": {
  34696. "type": "object",
  34697. "properties": {
  34698. "aggregateID": {
  34699. "type": "string"
  34700. },
  34701. "seq": {
  34702. "type": "integer"
  34703. },
  34704. "version": {
  34705. "type": "integer"
  34706. }
  34707. },
  34708. "required": ["aggregateID", "seq", "version"],
  34709. "additionalProperties": false
  34710. },
  34711. "location": {
  34712. "$ref": "#/components/schemas/LocationRef"
  34713. },
  34714. "type": {
  34715. "type": "string",
  34716. "enum": ["todo.updated"]
  34717. },
  34718. "data": {
  34719. "type": "object",
  34720. "properties": {
  34721. "sessionID": {
  34722. "type": "string",
  34723. "pattern": "^ses"
  34724. },
  34725. "todos": {
  34726. "type": "array",
  34727. "items": {
  34728. "$ref": "#/components/schemas/Todo"
  34729. }
  34730. }
  34731. },
  34732. "required": ["sessionID", "todos"],
  34733. "additionalProperties": false
  34734. }
  34735. },
  34736. "required": ["id", "type", "data"],
  34737. "additionalProperties": false
  34738. },
  34739. "V2EventLspUpdated": {
  34740. "type": "object",
  34741. "properties": {
  34742. "id": {
  34743. "type": "string",
  34744. "pattern": "^evt_"
  34745. },
  34746. "metadata": {
  34747. "type": "object"
  34748. },
  34749. "durable": {
  34750. "type": "object",
  34751. "properties": {
  34752. "aggregateID": {
  34753. "type": "string"
  34754. },
  34755. "seq": {
  34756. "type": "integer"
  34757. },
  34758. "version": {
  34759. "type": "integer"
  34760. }
  34761. },
  34762. "required": ["aggregateID", "seq", "version"],
  34763. "additionalProperties": false
  34764. },
  34765. "location": {
  34766. "$ref": "#/components/schemas/LocationRef"
  34767. },
  34768. "type": {
  34769. "type": "string",
  34770. "enum": ["lsp.updated"]
  34771. },
  34772. "data": {
  34773. "type": "object",
  34774. "properties": {}
  34775. }
  34776. },
  34777. "required": ["id", "type", "data"],
  34778. "additionalProperties": false
  34779. },
  34780. "V2EventPermissionAsked": {
  34781. "type": "object",
  34782. "properties": {
  34783. "id": {
  34784. "type": "string",
  34785. "pattern": "^evt_"
  34786. },
  34787. "metadata": {
  34788. "type": "object"
  34789. },
  34790. "durable": {
  34791. "type": "object",
  34792. "properties": {
  34793. "aggregateID": {
  34794. "type": "string"
  34795. },
  34796. "seq": {
  34797. "type": "integer"
  34798. },
  34799. "version": {
  34800. "type": "integer"
  34801. }
  34802. },
  34803. "required": ["aggregateID", "seq", "version"],
  34804. "additionalProperties": false
  34805. },
  34806. "location": {
  34807. "$ref": "#/components/schemas/LocationRef"
  34808. },
  34809. "type": {
  34810. "type": "string",
  34811. "enum": ["permission.asked"]
  34812. },
  34813. "data": {
  34814. "type": "object",
  34815. "properties": {
  34816. "id": {
  34817. "type": "string",
  34818. "pattern": "^per"
  34819. },
  34820. "sessionID": {
  34821. "type": "string",
  34822. "pattern": "^ses"
  34823. },
  34824. "permission": {
  34825. "type": "string"
  34826. },
  34827. "patterns": {
  34828. "type": "array",
  34829. "items": {
  34830. "type": "string"
  34831. }
  34832. },
  34833. "metadata": {
  34834. "type": "object"
  34835. },
  34836. "always": {
  34837. "type": "array",
  34838. "items": {
  34839. "type": "string"
  34840. }
  34841. },
  34842. "tool": {
  34843. "type": "object",
  34844. "properties": {
  34845. "messageID": {
  34846. "type": "string"
  34847. },
  34848. "callID": {
  34849. "type": "string"
  34850. }
  34851. },
  34852. "required": ["messageID", "callID"],
  34853. "additionalProperties": false
  34854. }
  34855. },
  34856. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  34857. "additionalProperties": false
  34858. }
  34859. },
  34860. "required": ["id", "type", "data"],
  34861. "additionalProperties": false
  34862. },
  34863. "V2EventPermissionReplied": {
  34864. "type": "object",
  34865. "properties": {
  34866. "id": {
  34867. "type": "string",
  34868. "pattern": "^evt_"
  34869. },
  34870. "metadata": {
  34871. "type": "object"
  34872. },
  34873. "durable": {
  34874. "type": "object",
  34875. "properties": {
  34876. "aggregateID": {
  34877. "type": "string"
  34878. },
  34879. "seq": {
  34880. "type": "integer"
  34881. },
  34882. "version": {
  34883. "type": "integer"
  34884. }
  34885. },
  34886. "required": ["aggregateID", "seq", "version"],
  34887. "additionalProperties": false
  34888. },
  34889. "location": {
  34890. "$ref": "#/components/schemas/LocationRef"
  34891. },
  34892. "type": {
  34893. "type": "string",
  34894. "enum": ["permission.replied"]
  34895. },
  34896. "data": {
  34897. "type": "object",
  34898. "properties": {
  34899. "sessionID": {
  34900. "type": "string",
  34901. "pattern": "^ses"
  34902. },
  34903. "requestID": {
  34904. "type": "string",
  34905. "pattern": "^per"
  34906. },
  34907. "reply": {
  34908. "type": "string",
  34909. "enum": ["once", "always", "reject"]
  34910. }
  34911. },
  34912. "required": ["sessionID", "requestID", "reply"],
  34913. "additionalProperties": false
  34914. }
  34915. },
  34916. "required": ["id", "type", "data"],
  34917. "additionalProperties": false
  34918. },
  34919. "V2EventTuiPromptAppend": {
  34920. "type": "object",
  34921. "properties": {
  34922. "id": {
  34923. "type": "string",
  34924. "pattern": "^evt_"
  34925. },
  34926. "metadata": {
  34927. "type": "object"
  34928. },
  34929. "durable": {
  34930. "type": "object",
  34931. "properties": {
  34932. "aggregateID": {
  34933. "type": "string"
  34934. },
  34935. "seq": {
  34936. "type": "integer"
  34937. },
  34938. "version": {
  34939. "type": "integer"
  34940. }
  34941. },
  34942. "required": ["aggregateID", "seq", "version"],
  34943. "additionalProperties": false
  34944. },
  34945. "location": {
  34946. "$ref": "#/components/schemas/LocationRef"
  34947. },
  34948. "type": {
  34949. "type": "string",
  34950. "enum": ["tui.prompt.append"]
  34951. },
  34952. "data": {
  34953. "type": "object",
  34954. "properties": {
  34955. "text": {
  34956. "type": "string"
  34957. }
  34958. },
  34959. "required": ["text"],
  34960. "additionalProperties": false
  34961. }
  34962. },
  34963. "required": ["id", "type", "data"],
  34964. "additionalProperties": false
  34965. },
  34966. "V2EventTuiCommandExecute": {
  34967. "type": "object",
  34968. "properties": {
  34969. "id": {
  34970. "type": "string",
  34971. "pattern": "^evt_"
  34972. },
  34973. "metadata": {
  34974. "type": "object"
  34975. },
  34976. "durable": {
  34977. "type": "object",
  34978. "properties": {
  34979. "aggregateID": {
  34980. "type": "string"
  34981. },
  34982. "seq": {
  34983. "type": "integer"
  34984. },
  34985. "version": {
  34986. "type": "integer"
  34987. }
  34988. },
  34989. "required": ["aggregateID", "seq", "version"],
  34990. "additionalProperties": false
  34991. },
  34992. "location": {
  34993. "$ref": "#/components/schemas/LocationRef"
  34994. },
  34995. "type": {
  34996. "type": "string",
  34997. "enum": ["tui.command.execute"]
  34998. },
  34999. "data": {
  35000. "type": "object",
  35001. "properties": {
  35002. "command": {
  35003. "anyOf": [
  35004. {
  35005. "type": "string",
  35006. "enum": [
  35007. "session.list",
  35008. "session.new",
  35009. "session.share",
  35010. "session.interrupt",
  35011. "session.compact",
  35012. "session.page.up",
  35013. "session.page.down",
  35014. "session.line.up",
  35015. "session.line.down",
  35016. "session.half.page.up",
  35017. "session.half.page.down",
  35018. "session.first",
  35019. "session.last",
  35020. "prompt.clear",
  35021. "prompt.submit",
  35022. "agent.cycle"
  35023. ]
  35024. },
  35025. {
  35026. "type": "string"
  35027. }
  35028. ]
  35029. }
  35030. },
  35031. "required": ["command"],
  35032. "additionalProperties": false
  35033. }
  35034. },
  35035. "required": ["id", "type", "data"],
  35036. "additionalProperties": false
  35037. },
  35038. "V2EventTuiToastShow": {
  35039. "type": "object",
  35040. "properties": {
  35041. "id": {
  35042. "type": "string",
  35043. "pattern": "^evt_"
  35044. },
  35045. "metadata": {
  35046. "type": "object"
  35047. },
  35048. "durable": {
  35049. "type": "object",
  35050. "properties": {
  35051. "aggregateID": {
  35052. "type": "string"
  35053. },
  35054. "seq": {
  35055. "type": "integer"
  35056. },
  35057. "version": {
  35058. "type": "integer"
  35059. }
  35060. },
  35061. "required": ["aggregateID", "seq", "version"],
  35062. "additionalProperties": false
  35063. },
  35064. "location": {
  35065. "$ref": "#/components/schemas/LocationRef"
  35066. },
  35067. "type": {
  35068. "type": "string",
  35069. "enum": ["tui.toast.show"]
  35070. },
  35071. "data": {
  35072. "type": "object",
  35073. "properties": {
  35074. "title": {
  35075. "type": "string"
  35076. },
  35077. "message": {
  35078. "type": "string"
  35079. },
  35080. "variant": {
  35081. "type": "string",
  35082. "enum": ["info", "success", "warning", "error"]
  35083. },
  35084. "duration": {
  35085. "type": "integer",
  35086. "exclusiveMinimum": 0
  35087. }
  35088. },
  35089. "required": ["message", "variant"],
  35090. "additionalProperties": false
  35091. }
  35092. },
  35093. "required": ["id", "type", "data"],
  35094. "additionalProperties": false
  35095. },
  35096. "V2EventTuiSessionSelect": {
  35097. "type": "object",
  35098. "properties": {
  35099. "id": {
  35100. "type": "string",
  35101. "pattern": "^evt_"
  35102. },
  35103. "metadata": {
  35104. "type": "object"
  35105. },
  35106. "durable": {
  35107. "type": "object",
  35108. "properties": {
  35109. "aggregateID": {
  35110. "type": "string"
  35111. },
  35112. "seq": {
  35113. "type": "integer"
  35114. },
  35115. "version": {
  35116. "type": "integer"
  35117. }
  35118. },
  35119. "required": ["aggregateID", "seq", "version"],
  35120. "additionalProperties": false
  35121. },
  35122. "location": {
  35123. "$ref": "#/components/schemas/LocationRef"
  35124. },
  35125. "type": {
  35126. "type": "string",
  35127. "enum": ["tui.session.select"]
  35128. },
  35129. "data": {
  35130. "type": "object",
  35131. "properties": {
  35132. "sessionID": {
  35133. "type": "string",
  35134. "pattern": "^ses",
  35135. "description": "Session ID to navigate to"
  35136. }
  35137. },
  35138. "required": ["sessionID"],
  35139. "additionalProperties": false
  35140. }
  35141. },
  35142. "required": ["id", "type", "data"],
  35143. "additionalProperties": false
  35144. },
  35145. "V2EventMcpToolsChanged": {
  35146. "type": "object",
  35147. "properties": {
  35148. "id": {
  35149. "type": "string",
  35150. "pattern": "^evt_"
  35151. },
  35152. "metadata": {
  35153. "type": "object"
  35154. },
  35155. "durable": {
  35156. "type": "object",
  35157. "properties": {
  35158. "aggregateID": {
  35159. "type": "string"
  35160. },
  35161. "seq": {
  35162. "type": "integer"
  35163. },
  35164. "version": {
  35165. "type": "integer"
  35166. }
  35167. },
  35168. "required": ["aggregateID", "seq", "version"],
  35169. "additionalProperties": false
  35170. },
  35171. "location": {
  35172. "$ref": "#/components/schemas/LocationRef"
  35173. },
  35174. "type": {
  35175. "type": "string",
  35176. "enum": ["mcp.tools.changed"]
  35177. },
  35178. "data": {
  35179. "type": "object",
  35180. "properties": {
  35181. "server": {
  35182. "type": "string"
  35183. }
  35184. },
  35185. "required": ["server"],
  35186. "additionalProperties": false
  35187. }
  35188. },
  35189. "required": ["id", "type", "data"],
  35190. "additionalProperties": false
  35191. },
  35192. "V2EventMcpBrowserOpenFailed": {
  35193. "type": "object",
  35194. "properties": {
  35195. "id": {
  35196. "type": "string",
  35197. "pattern": "^evt_"
  35198. },
  35199. "metadata": {
  35200. "type": "object"
  35201. },
  35202. "durable": {
  35203. "type": "object",
  35204. "properties": {
  35205. "aggregateID": {
  35206. "type": "string"
  35207. },
  35208. "seq": {
  35209. "type": "integer"
  35210. },
  35211. "version": {
  35212. "type": "integer"
  35213. }
  35214. },
  35215. "required": ["aggregateID", "seq", "version"],
  35216. "additionalProperties": false
  35217. },
  35218. "location": {
  35219. "$ref": "#/components/schemas/LocationRef"
  35220. },
  35221. "type": {
  35222. "type": "string",
  35223. "enum": ["mcp.browser.open.failed"]
  35224. },
  35225. "data": {
  35226. "type": "object",
  35227. "properties": {
  35228. "mcpName": {
  35229. "type": "string"
  35230. },
  35231. "url": {
  35232. "type": "string"
  35233. }
  35234. },
  35235. "required": ["mcpName", "url"],
  35236. "additionalProperties": false
  35237. }
  35238. },
  35239. "required": ["id", "type", "data"],
  35240. "additionalProperties": false
  35241. },
  35242. "V2EventCommandExecuted": {
  35243. "type": "object",
  35244. "properties": {
  35245. "id": {
  35246. "type": "string",
  35247. "pattern": "^evt_"
  35248. },
  35249. "metadata": {
  35250. "type": "object"
  35251. },
  35252. "durable": {
  35253. "type": "object",
  35254. "properties": {
  35255. "aggregateID": {
  35256. "type": "string"
  35257. },
  35258. "seq": {
  35259. "type": "integer"
  35260. },
  35261. "version": {
  35262. "type": "integer"
  35263. }
  35264. },
  35265. "required": ["aggregateID", "seq", "version"],
  35266. "additionalProperties": false
  35267. },
  35268. "location": {
  35269. "$ref": "#/components/schemas/LocationRef"
  35270. },
  35271. "type": {
  35272. "type": "string",
  35273. "enum": ["command.executed"]
  35274. },
  35275. "data": {
  35276. "type": "object",
  35277. "properties": {
  35278. "name": {
  35279. "type": "string"
  35280. },
  35281. "sessionID": {
  35282. "type": "string",
  35283. "pattern": "^ses"
  35284. },
  35285. "arguments": {
  35286. "type": "string"
  35287. },
  35288. "messageID": {
  35289. "type": "string",
  35290. "pattern": "^msg"
  35291. }
  35292. },
  35293. "required": ["name", "sessionID", "arguments", "messageID"],
  35294. "additionalProperties": false
  35295. }
  35296. },
  35297. "required": ["id", "type", "data"],
  35298. "additionalProperties": false
  35299. },
  35300. "V2EventProjectUpdated": {
  35301. "type": "object",
  35302. "properties": {
  35303. "id": {
  35304. "type": "string",
  35305. "pattern": "^evt_"
  35306. },
  35307. "metadata": {
  35308. "type": "object"
  35309. },
  35310. "durable": {
  35311. "type": "object",
  35312. "properties": {
  35313. "aggregateID": {
  35314. "type": "string"
  35315. },
  35316. "seq": {
  35317. "type": "integer"
  35318. },
  35319. "version": {
  35320. "type": "integer"
  35321. }
  35322. },
  35323. "required": ["aggregateID", "seq", "version"],
  35324. "additionalProperties": false
  35325. },
  35326. "location": {
  35327. "$ref": "#/components/schemas/LocationRef"
  35328. },
  35329. "type": {
  35330. "type": "string",
  35331. "enum": ["project.updated"]
  35332. },
  35333. "data": {
  35334. "type": "object",
  35335. "properties": {
  35336. "id": {
  35337. "type": "string"
  35338. },
  35339. "worktree": {
  35340. "type": "string"
  35341. },
  35342. "vcs": {
  35343. "$ref": "#/components/schemas/ProjectVcs"
  35344. },
  35345. "name": {
  35346. "type": "string"
  35347. },
  35348. "icon": {
  35349. "$ref": "#/components/schemas/ProjectIcon"
  35350. },
  35351. "commands": {
  35352. "$ref": "#/components/schemas/ProjectCommands"
  35353. },
  35354. "time": {
  35355. "$ref": "#/components/schemas/ProjectTime"
  35356. },
  35357. "sandboxes": {
  35358. "type": "array",
  35359. "items": {
  35360. "type": "string"
  35361. }
  35362. }
  35363. },
  35364. "required": ["id", "worktree", "time", "sandboxes"],
  35365. "additionalProperties": false
  35366. }
  35367. },
  35368. "required": ["id", "type", "data"],
  35369. "additionalProperties": false
  35370. },
  35371. "V2EventSessionStatus": {
  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": ["session.status"]
  35403. },
  35404. "data": {
  35405. "type": "object",
  35406. "properties": {
  35407. "sessionID": {
  35408. "type": "string",
  35409. "pattern": "^ses"
  35410. },
  35411. "status": {
  35412. "$ref": "#/components/schemas/SessionStatus"
  35413. }
  35414. },
  35415. "required": ["sessionID", "status"],
  35416. "additionalProperties": false
  35417. }
  35418. },
  35419. "required": ["id", "type", "data"],
  35420. "additionalProperties": false
  35421. },
  35422. "V2EventSessionIdle": {
  35423. "type": "object",
  35424. "properties": {
  35425. "id": {
  35426. "type": "string",
  35427. "pattern": "^evt_"
  35428. },
  35429. "metadata": {
  35430. "type": "object"
  35431. },
  35432. "durable": {
  35433. "type": "object",
  35434. "properties": {
  35435. "aggregateID": {
  35436. "type": "string"
  35437. },
  35438. "seq": {
  35439. "type": "integer"
  35440. },
  35441. "version": {
  35442. "type": "integer"
  35443. }
  35444. },
  35445. "required": ["aggregateID", "seq", "version"],
  35446. "additionalProperties": false
  35447. },
  35448. "location": {
  35449. "$ref": "#/components/schemas/LocationRef"
  35450. },
  35451. "type": {
  35452. "type": "string",
  35453. "enum": ["session.idle"]
  35454. },
  35455. "data": {
  35456. "type": "object",
  35457. "properties": {
  35458. "sessionID": {
  35459. "type": "string",
  35460. "pattern": "^ses"
  35461. }
  35462. },
  35463. "required": ["sessionID"],
  35464. "additionalProperties": false
  35465. }
  35466. },
  35467. "required": ["id", "type", "data"],
  35468. "additionalProperties": false
  35469. },
  35470. "V2EventQuestionAsked": {
  35471. "type": "object",
  35472. "properties": {
  35473. "id": {
  35474. "type": "string",
  35475. "pattern": "^evt_"
  35476. },
  35477. "metadata": {
  35478. "type": "object"
  35479. },
  35480. "durable": {
  35481. "type": "object",
  35482. "properties": {
  35483. "aggregateID": {
  35484. "type": "string"
  35485. },
  35486. "seq": {
  35487. "type": "integer"
  35488. },
  35489. "version": {
  35490. "type": "integer"
  35491. }
  35492. },
  35493. "required": ["aggregateID", "seq", "version"],
  35494. "additionalProperties": false
  35495. },
  35496. "location": {
  35497. "$ref": "#/components/schemas/LocationRef"
  35498. },
  35499. "type": {
  35500. "type": "string",
  35501. "enum": ["question.asked"]
  35502. },
  35503. "data": {
  35504. "type": "object",
  35505. "properties": {
  35506. "id": {
  35507. "type": "string",
  35508. "pattern": "^que"
  35509. },
  35510. "sessionID": {
  35511. "type": "string",
  35512. "pattern": "^ses"
  35513. },
  35514. "questions": {
  35515. "type": "array",
  35516. "items": {
  35517. "$ref": "#/components/schemas/QuestionInfo"
  35518. },
  35519. "description": "Questions to ask"
  35520. },
  35521. "tool": {
  35522. "$ref": "#/components/schemas/QuestionTool"
  35523. }
  35524. },
  35525. "required": ["id", "sessionID", "questions"],
  35526. "additionalProperties": false
  35527. }
  35528. },
  35529. "required": ["id", "type", "data"],
  35530. "additionalProperties": false
  35531. },
  35532. "V2EventQuestionReplied": {
  35533. "type": "object",
  35534. "properties": {
  35535. "id": {
  35536. "type": "string",
  35537. "pattern": "^evt_"
  35538. },
  35539. "metadata": {
  35540. "type": "object"
  35541. },
  35542. "durable": {
  35543. "type": "object",
  35544. "properties": {
  35545. "aggregateID": {
  35546. "type": "string"
  35547. },
  35548. "seq": {
  35549. "type": "integer"
  35550. },
  35551. "version": {
  35552. "type": "integer"
  35553. }
  35554. },
  35555. "required": ["aggregateID", "seq", "version"],
  35556. "additionalProperties": false
  35557. },
  35558. "location": {
  35559. "$ref": "#/components/schemas/LocationRef"
  35560. },
  35561. "type": {
  35562. "type": "string",
  35563. "enum": ["question.replied"]
  35564. },
  35565. "data": {
  35566. "type": "object",
  35567. "properties": {
  35568. "sessionID": {
  35569. "type": "string",
  35570. "pattern": "^ses"
  35571. },
  35572. "requestID": {
  35573. "type": "string",
  35574. "pattern": "^que"
  35575. },
  35576. "answers": {
  35577. "type": "array",
  35578. "items": {
  35579. "$ref": "#/components/schemas/QuestionAnswer"
  35580. }
  35581. }
  35582. },
  35583. "required": ["sessionID", "requestID", "answers"],
  35584. "additionalProperties": false
  35585. }
  35586. },
  35587. "required": ["id", "type", "data"],
  35588. "additionalProperties": false
  35589. },
  35590. "V2EventQuestionRejected": {
  35591. "type": "object",
  35592. "properties": {
  35593. "id": {
  35594. "type": "string",
  35595. "pattern": "^evt_"
  35596. },
  35597. "metadata": {
  35598. "type": "object"
  35599. },
  35600. "durable": {
  35601. "type": "object",
  35602. "properties": {
  35603. "aggregateID": {
  35604. "type": "string"
  35605. },
  35606. "seq": {
  35607. "type": "integer"
  35608. },
  35609. "version": {
  35610. "type": "integer"
  35611. }
  35612. },
  35613. "required": ["aggregateID", "seq", "version"],
  35614. "additionalProperties": false
  35615. },
  35616. "location": {
  35617. "$ref": "#/components/schemas/LocationRef"
  35618. },
  35619. "type": {
  35620. "type": "string",
  35621. "enum": ["question.rejected"]
  35622. },
  35623. "data": {
  35624. "type": "object",
  35625. "properties": {
  35626. "sessionID": {
  35627. "type": "string",
  35628. "pattern": "^ses"
  35629. },
  35630. "requestID": {
  35631. "type": "string",
  35632. "pattern": "^que"
  35633. }
  35634. },
  35635. "required": ["sessionID", "requestID"],
  35636. "additionalProperties": false
  35637. }
  35638. },
  35639. "required": ["id", "type", "data"],
  35640. "additionalProperties": false
  35641. },
  35642. "V2EventSessionCompacted": {
  35643. "type": "object",
  35644. "properties": {
  35645. "id": {
  35646. "type": "string",
  35647. "pattern": "^evt_"
  35648. },
  35649. "metadata": {
  35650. "type": "object"
  35651. },
  35652. "durable": {
  35653. "type": "object",
  35654. "properties": {
  35655. "aggregateID": {
  35656. "type": "string"
  35657. },
  35658. "seq": {
  35659. "type": "integer"
  35660. },
  35661. "version": {
  35662. "type": "integer"
  35663. }
  35664. },
  35665. "required": ["aggregateID", "seq", "version"],
  35666. "additionalProperties": false
  35667. },
  35668. "location": {
  35669. "$ref": "#/components/schemas/LocationRef"
  35670. },
  35671. "type": {
  35672. "type": "string",
  35673. "enum": ["session.compacted"]
  35674. },
  35675. "data": {
  35676. "type": "object",
  35677. "properties": {
  35678. "sessionID": {
  35679. "type": "string",
  35680. "pattern": "^ses"
  35681. }
  35682. },
  35683. "required": ["sessionID"],
  35684. "additionalProperties": false
  35685. }
  35686. },
  35687. "required": ["id", "type", "data"],
  35688. "additionalProperties": false
  35689. },
  35690. "V2EventVcsBranchUpdated": {
  35691. "type": "object",
  35692. "properties": {
  35693. "id": {
  35694. "type": "string",
  35695. "pattern": "^evt_"
  35696. },
  35697. "metadata": {
  35698. "type": "object"
  35699. },
  35700. "durable": {
  35701. "type": "object",
  35702. "properties": {
  35703. "aggregateID": {
  35704. "type": "string"
  35705. },
  35706. "seq": {
  35707. "type": "integer"
  35708. },
  35709. "version": {
  35710. "type": "integer"
  35711. }
  35712. },
  35713. "required": ["aggregateID", "seq", "version"],
  35714. "additionalProperties": false
  35715. },
  35716. "location": {
  35717. "$ref": "#/components/schemas/LocationRef"
  35718. },
  35719. "type": {
  35720. "type": "string",
  35721. "enum": ["vcs.branch.updated"]
  35722. },
  35723. "data": {
  35724. "type": "object",
  35725. "properties": {
  35726. "branch": {
  35727. "type": "string"
  35728. }
  35729. },
  35730. "additionalProperties": false
  35731. }
  35732. },
  35733. "required": ["id", "type", "data"],
  35734. "additionalProperties": false
  35735. },
  35736. "V2EventWorkspaceReady": {
  35737. "type": "object",
  35738. "properties": {
  35739. "id": {
  35740. "type": "string",
  35741. "pattern": "^evt_"
  35742. },
  35743. "metadata": {
  35744. "type": "object"
  35745. },
  35746. "durable": {
  35747. "type": "object",
  35748. "properties": {
  35749. "aggregateID": {
  35750. "type": "string"
  35751. },
  35752. "seq": {
  35753. "type": "integer"
  35754. },
  35755. "version": {
  35756. "type": "integer"
  35757. }
  35758. },
  35759. "required": ["aggregateID", "seq", "version"],
  35760. "additionalProperties": false
  35761. },
  35762. "location": {
  35763. "$ref": "#/components/schemas/LocationRef"
  35764. },
  35765. "type": {
  35766. "type": "string",
  35767. "enum": ["workspace.ready"]
  35768. },
  35769. "data": {
  35770. "type": "object",
  35771. "properties": {
  35772. "name": {
  35773. "type": "string"
  35774. }
  35775. },
  35776. "required": ["name"],
  35777. "additionalProperties": false
  35778. }
  35779. },
  35780. "required": ["id", "type", "data"],
  35781. "additionalProperties": false
  35782. },
  35783. "V2EventWorkspaceFailed": {
  35784. "type": "object",
  35785. "properties": {
  35786. "id": {
  35787. "type": "string",
  35788. "pattern": "^evt_"
  35789. },
  35790. "metadata": {
  35791. "type": "object"
  35792. },
  35793. "durable": {
  35794. "type": "object",
  35795. "properties": {
  35796. "aggregateID": {
  35797. "type": "string"
  35798. },
  35799. "seq": {
  35800. "type": "integer"
  35801. },
  35802. "version": {
  35803. "type": "integer"
  35804. }
  35805. },
  35806. "required": ["aggregateID", "seq", "version"],
  35807. "additionalProperties": false
  35808. },
  35809. "location": {
  35810. "$ref": "#/components/schemas/LocationRef"
  35811. },
  35812. "type": {
  35813. "type": "string",
  35814. "enum": ["workspace.failed"]
  35815. },
  35816. "data": {
  35817. "type": "object",
  35818. "properties": {
  35819. "message": {
  35820. "type": "string"
  35821. }
  35822. },
  35823. "required": ["message"],
  35824. "additionalProperties": false
  35825. }
  35826. },
  35827. "required": ["id", "type", "data"],
  35828. "additionalProperties": false
  35829. },
  35830. "V2EventWorkspaceStatus": {
  35831. "type": "object",
  35832. "properties": {
  35833. "id": {
  35834. "type": "string",
  35835. "pattern": "^evt_"
  35836. },
  35837. "metadata": {
  35838. "type": "object"
  35839. },
  35840. "durable": {
  35841. "type": "object",
  35842. "properties": {
  35843. "aggregateID": {
  35844. "type": "string"
  35845. },
  35846. "seq": {
  35847. "type": "integer"
  35848. },
  35849. "version": {
  35850. "type": "integer"
  35851. }
  35852. },
  35853. "required": ["aggregateID", "seq", "version"],
  35854. "additionalProperties": false
  35855. },
  35856. "location": {
  35857. "$ref": "#/components/schemas/LocationRef"
  35858. },
  35859. "type": {
  35860. "type": "string",
  35861. "enum": ["workspace.status"]
  35862. },
  35863. "data": {
  35864. "type": "object",
  35865. "properties": {
  35866. "workspaceID": {
  35867. "type": "string",
  35868. "pattern": "^wrk"
  35869. },
  35870. "status": {
  35871. "type": "string",
  35872. "enum": ["connected", "connecting", "disconnected", "error"]
  35873. }
  35874. },
  35875. "required": ["workspaceID", "status"],
  35876. "additionalProperties": false
  35877. }
  35878. },
  35879. "required": ["id", "type", "data"],
  35880. "additionalProperties": false
  35881. },
  35882. "V2EventWorktreeReady": {
  35883. "type": "object",
  35884. "properties": {
  35885. "id": {
  35886. "type": "string",
  35887. "pattern": "^evt_"
  35888. },
  35889. "metadata": {
  35890. "type": "object"
  35891. },
  35892. "durable": {
  35893. "type": "object",
  35894. "properties": {
  35895. "aggregateID": {
  35896. "type": "string"
  35897. },
  35898. "seq": {
  35899. "type": "integer"
  35900. },
  35901. "version": {
  35902. "type": "integer"
  35903. }
  35904. },
  35905. "required": ["aggregateID", "seq", "version"],
  35906. "additionalProperties": false
  35907. },
  35908. "location": {
  35909. "$ref": "#/components/schemas/LocationRef"
  35910. },
  35911. "type": {
  35912. "type": "string",
  35913. "enum": ["worktree.ready"]
  35914. },
  35915. "data": {
  35916. "type": "object",
  35917. "properties": {
  35918. "name": {
  35919. "type": "string"
  35920. },
  35921. "branch": {
  35922. "type": "string"
  35923. }
  35924. },
  35925. "required": ["name"],
  35926. "additionalProperties": false
  35927. }
  35928. },
  35929. "required": ["id", "type", "data"],
  35930. "additionalProperties": false
  35931. },
  35932. "V2EventWorktreeFailed": {
  35933. "type": "object",
  35934. "properties": {
  35935. "id": {
  35936. "type": "string",
  35937. "pattern": "^evt_"
  35938. },
  35939. "metadata": {
  35940. "type": "object"
  35941. },
  35942. "durable": {
  35943. "type": "object",
  35944. "properties": {
  35945. "aggregateID": {
  35946. "type": "string"
  35947. },
  35948. "seq": {
  35949. "type": "integer"
  35950. },
  35951. "version": {
  35952. "type": "integer"
  35953. }
  35954. },
  35955. "required": ["aggregateID", "seq", "version"],
  35956. "additionalProperties": false
  35957. },
  35958. "location": {
  35959. "$ref": "#/components/schemas/LocationRef"
  35960. },
  35961. "type": {
  35962. "type": "string",
  35963. "enum": ["worktree.failed"]
  35964. },
  35965. "data": {
  35966. "type": "object",
  35967. "properties": {
  35968. "message": {
  35969. "type": "string"
  35970. }
  35971. },
  35972. "required": ["message"],
  35973. "additionalProperties": false
  35974. }
  35975. },
  35976. "required": ["id", "type", "data"],
  35977. "additionalProperties": false
  35978. },
  35979. "V2EventServerConnected": {
  35980. "type": "object",
  35981. "properties": {
  35982. "id": {
  35983. "type": "string",
  35984. "pattern": "^evt_"
  35985. },
  35986. "metadata": {
  35987. "type": "object"
  35988. },
  35989. "durable": {
  35990. "type": "object",
  35991. "properties": {
  35992. "aggregateID": {
  35993. "type": "string"
  35994. },
  35995. "seq": {
  35996. "type": "integer"
  35997. },
  35998. "version": {
  35999. "type": "integer"
  36000. }
  36001. },
  36002. "required": ["aggregateID", "seq", "version"],
  36003. "additionalProperties": false
  36004. },
  36005. "location": {
  36006. "$ref": "#/components/schemas/LocationRef"
  36007. },
  36008. "type": {
  36009. "type": "string",
  36010. "enum": ["server.connected"]
  36011. },
  36012. "data": {
  36013. "type": "object",
  36014. "properties": {}
  36015. }
  36016. },
  36017. "required": ["id", "type", "data"],
  36018. "additionalProperties": false
  36019. },
  36020. "V2EventGlobalDisposed": {
  36021. "type": "object",
  36022. "properties": {
  36023. "id": {
  36024. "type": "string",
  36025. "pattern": "^evt_"
  36026. },
  36027. "metadata": {
  36028. "type": "object"
  36029. },
  36030. "durable": {
  36031. "type": "object",
  36032. "properties": {
  36033. "aggregateID": {
  36034. "type": "string"
  36035. },
  36036. "seq": {
  36037. "type": "integer"
  36038. },
  36039. "version": {
  36040. "type": "integer"
  36041. }
  36042. },
  36043. "required": ["aggregateID", "seq", "version"],
  36044. "additionalProperties": false
  36045. },
  36046. "location": {
  36047. "$ref": "#/components/schemas/LocationRef"
  36048. },
  36049. "type": {
  36050. "type": "string",
  36051. "enum": ["global.disposed"]
  36052. },
  36053. "data": {
  36054. "type": "object",
  36055. "properties": {}
  36056. }
  36057. },
  36058. "required": ["id", "type", "data"],
  36059. "additionalProperties": false
  36060. },
  36061. "QuestionV2Request": {
  36062. "type": "object",
  36063. "properties": {
  36064. "id": {
  36065. "type": "string",
  36066. "pattern": "^que"
  36067. },
  36068. "sessionID": {
  36069. "type": "string",
  36070. "pattern": "^ses"
  36071. },
  36072. "questions": {
  36073. "type": "array",
  36074. "items": {
  36075. "$ref": "#/components/schemas/QuestionV2Info"
  36076. },
  36077. "description": "Questions to ask"
  36078. },
  36079. "tool": {
  36080. "$ref": "#/components/schemas/QuestionV2Tool"
  36081. }
  36082. },
  36083. "required": ["id", "sessionID", "questions"],
  36084. "additionalProperties": false
  36085. },
  36086. "QuestionV2Reply": {
  36087. "type": "object",
  36088. "properties": {
  36089. "answers": {
  36090. "type": "array",
  36091. "items": {
  36092. "$ref": "#/components/schemas/QuestionV2Answer"
  36093. },
  36094. "description": "User answers in order of questions (each answer is an array of selected labels)"
  36095. }
  36096. },
  36097. "required": ["answers"],
  36098. "additionalProperties": false
  36099. },
  36100. "ReferenceLocalSource": {
  36101. "type": "object",
  36102. "properties": {
  36103. "type": {
  36104. "type": "string",
  36105. "enum": ["local"]
  36106. },
  36107. "path": {
  36108. "type": "string"
  36109. },
  36110. "description": {
  36111. "type": "string"
  36112. },
  36113. "hidden": {
  36114. "type": "boolean"
  36115. }
  36116. },
  36117. "required": ["type", "path"],
  36118. "additionalProperties": false
  36119. },
  36120. "ReferenceGitSource": {
  36121. "type": "object",
  36122. "properties": {
  36123. "type": {
  36124. "type": "string",
  36125. "enum": ["git"]
  36126. },
  36127. "repository": {
  36128. "type": "string"
  36129. },
  36130. "branch": {
  36131. "type": "string"
  36132. },
  36133. "description": {
  36134. "type": "string"
  36135. },
  36136. "hidden": {
  36137. "type": "boolean"
  36138. }
  36139. },
  36140. "required": ["type", "repository"],
  36141. "additionalProperties": false
  36142. },
  36143. "ReferenceSource": {
  36144. "anyOf": [
  36145. {
  36146. "$ref": "#/components/schemas/ReferenceLocalSource"
  36147. },
  36148. {
  36149. "$ref": "#/components/schemas/ReferenceGitSource"
  36150. }
  36151. ]
  36152. },
  36153. "ReferenceInfo": {
  36154. "type": "object",
  36155. "properties": {
  36156. "name": {
  36157. "type": "string"
  36158. },
  36159. "path": {
  36160. "type": "string"
  36161. },
  36162. "description": {
  36163. "type": "string"
  36164. },
  36165. "hidden": {
  36166. "type": "boolean"
  36167. },
  36168. "source": {
  36169. "$ref": "#/components/schemas/ReferenceSource"
  36170. }
  36171. },
  36172. "required": ["name", "path", "source"],
  36173. "additionalProperties": false
  36174. },
  36175. "ProjectCopyCopy": {
  36176. "type": "object",
  36177. "properties": {
  36178. "directory": {
  36179. "type": "string"
  36180. }
  36181. },
  36182. "required": ["directory"],
  36183. "additionalProperties": false
  36184. },
  36185. "EventModels-devRefreshed": {
  36186. "type": "object",
  36187. "properties": {
  36188. "id": {
  36189. "type": "string",
  36190. "pattern": "^evt_"
  36191. },
  36192. "type": {
  36193. "type": "string",
  36194. "enum": ["models-dev.refreshed"]
  36195. },
  36196. "properties": {
  36197. "type": "object",
  36198. "properties": {}
  36199. }
  36200. },
  36201. "required": ["id", "type", "properties"],
  36202. "additionalProperties": false
  36203. },
  36204. "EventIntegrationUpdated": {
  36205. "type": "object",
  36206. "properties": {
  36207. "id": {
  36208. "type": "string",
  36209. "pattern": "^evt_"
  36210. },
  36211. "type": {
  36212. "type": "string",
  36213. "enum": ["integration.updated"]
  36214. },
  36215. "properties": {
  36216. "type": "object",
  36217. "properties": {}
  36218. }
  36219. },
  36220. "required": ["id", "type", "properties"],
  36221. "additionalProperties": false
  36222. },
  36223. "EventIntegrationConnectionUpdated": {
  36224. "type": "object",
  36225. "properties": {
  36226. "id": {
  36227. "type": "string",
  36228. "pattern": "^evt_"
  36229. },
  36230. "type": {
  36231. "type": "string",
  36232. "enum": ["integration.connection.updated"]
  36233. },
  36234. "properties": {
  36235. "type": "object",
  36236. "properties": {
  36237. "integrationID": {
  36238. "type": "string"
  36239. }
  36240. },
  36241. "required": ["integrationID"],
  36242. "additionalProperties": false
  36243. }
  36244. },
  36245. "required": ["id", "type", "properties"],
  36246. "additionalProperties": false
  36247. },
  36248. "EventCatalogUpdated": {
  36249. "type": "object",
  36250. "properties": {
  36251. "id": {
  36252. "type": "string",
  36253. "pattern": "^evt_"
  36254. },
  36255. "type": {
  36256. "type": "string",
  36257. "enum": ["catalog.updated"]
  36258. },
  36259. "properties": {
  36260. "type": "object",
  36261. "properties": {}
  36262. }
  36263. },
  36264. "required": ["id", "type", "properties"],
  36265. "additionalProperties": false
  36266. },
  36267. "EventSessionCreated": {
  36268. "type": "object",
  36269. "properties": {
  36270. "id": {
  36271. "type": "string",
  36272. "pattern": "^evt_"
  36273. },
  36274. "type": {
  36275. "type": "string",
  36276. "enum": ["session.created"]
  36277. },
  36278. "properties": {
  36279. "type": "object",
  36280. "properties": {
  36281. "sessionID": {
  36282. "type": "string",
  36283. "pattern": "^ses"
  36284. },
  36285. "info": {
  36286. "$ref": "#/components/schemas/Session"
  36287. }
  36288. },
  36289. "required": ["sessionID", "info"],
  36290. "additionalProperties": false
  36291. }
  36292. },
  36293. "required": ["id", "type", "properties"],
  36294. "additionalProperties": false
  36295. },
  36296. "EventSessionUpdated": {
  36297. "type": "object",
  36298. "properties": {
  36299. "id": {
  36300. "type": "string",
  36301. "pattern": "^evt_"
  36302. },
  36303. "type": {
  36304. "type": "string",
  36305. "enum": ["session.updated"]
  36306. },
  36307. "properties": {
  36308. "type": "object",
  36309. "properties": {
  36310. "sessionID": {
  36311. "type": "string",
  36312. "pattern": "^ses"
  36313. },
  36314. "info": {
  36315. "$ref": "#/components/schemas/Session"
  36316. }
  36317. },
  36318. "required": ["sessionID", "info"],
  36319. "additionalProperties": false
  36320. }
  36321. },
  36322. "required": ["id", "type", "properties"],
  36323. "additionalProperties": false
  36324. },
  36325. "EventSessionDeleted": {
  36326. "type": "object",
  36327. "properties": {
  36328. "id": {
  36329. "type": "string",
  36330. "pattern": "^evt_"
  36331. },
  36332. "type": {
  36333. "type": "string",
  36334. "enum": ["session.deleted"]
  36335. },
  36336. "properties": {
  36337. "type": "object",
  36338. "properties": {
  36339. "sessionID": {
  36340. "type": "string",
  36341. "pattern": "^ses"
  36342. },
  36343. "info": {
  36344. "$ref": "#/components/schemas/Session"
  36345. }
  36346. },
  36347. "required": ["sessionID", "info"],
  36348. "additionalProperties": false
  36349. }
  36350. },
  36351. "required": ["id", "type", "properties"],
  36352. "additionalProperties": false
  36353. },
  36354. "EventMessageUpdated": {
  36355. "type": "object",
  36356. "properties": {
  36357. "id": {
  36358. "type": "string",
  36359. "pattern": "^evt_"
  36360. },
  36361. "type": {
  36362. "type": "string",
  36363. "enum": ["message.updated"]
  36364. },
  36365. "properties": {
  36366. "type": "object",
  36367. "properties": {
  36368. "sessionID": {
  36369. "type": "string",
  36370. "pattern": "^ses"
  36371. },
  36372. "info": {
  36373. "$ref": "#/components/schemas/Message"
  36374. }
  36375. },
  36376. "required": ["sessionID", "info"],
  36377. "additionalProperties": false
  36378. }
  36379. },
  36380. "required": ["id", "type", "properties"],
  36381. "additionalProperties": false
  36382. },
  36383. "EventMessageRemoved": {
  36384. "type": "object",
  36385. "properties": {
  36386. "id": {
  36387. "type": "string",
  36388. "pattern": "^evt_"
  36389. },
  36390. "type": {
  36391. "type": "string",
  36392. "enum": ["message.removed"]
  36393. },
  36394. "properties": {
  36395. "type": "object",
  36396. "properties": {
  36397. "sessionID": {
  36398. "type": "string",
  36399. "pattern": "^ses"
  36400. },
  36401. "messageID": {
  36402. "type": "string",
  36403. "pattern": "^msg"
  36404. }
  36405. },
  36406. "required": ["sessionID", "messageID"],
  36407. "additionalProperties": false
  36408. }
  36409. },
  36410. "required": ["id", "type", "properties"],
  36411. "additionalProperties": false
  36412. },
  36413. "EventMessagePartUpdated": {
  36414. "type": "object",
  36415. "properties": {
  36416. "id": {
  36417. "type": "string",
  36418. "pattern": "^evt_"
  36419. },
  36420. "type": {
  36421. "type": "string",
  36422. "enum": ["message.part.updated"]
  36423. },
  36424. "properties": {
  36425. "type": "object",
  36426. "properties": {
  36427. "sessionID": {
  36428. "type": "string",
  36429. "pattern": "^ses"
  36430. },
  36431. "part": {
  36432. "$ref": "#/components/schemas/Part"
  36433. },
  36434. "time": {
  36435. "type": "number"
  36436. }
  36437. },
  36438. "required": ["sessionID", "part", "time"],
  36439. "additionalProperties": false
  36440. }
  36441. },
  36442. "required": ["id", "type", "properties"],
  36443. "additionalProperties": false
  36444. },
  36445. "EventMessagePartRemoved": {
  36446. "type": "object",
  36447. "properties": {
  36448. "id": {
  36449. "type": "string",
  36450. "pattern": "^evt_"
  36451. },
  36452. "type": {
  36453. "type": "string",
  36454. "enum": ["message.part.removed"]
  36455. },
  36456. "properties": {
  36457. "type": "object",
  36458. "properties": {
  36459. "sessionID": {
  36460. "type": "string",
  36461. "pattern": "^ses"
  36462. },
  36463. "messageID": {
  36464. "type": "string",
  36465. "pattern": "^msg"
  36466. },
  36467. "partID": {
  36468. "type": "string",
  36469. "pattern": "^prt"
  36470. }
  36471. },
  36472. "required": ["sessionID", "messageID", "partID"],
  36473. "additionalProperties": false
  36474. }
  36475. },
  36476. "required": ["id", "type", "properties"],
  36477. "additionalProperties": false
  36478. },
  36479. "EventSessionNextAgentSwitched": {
  36480. "type": "object",
  36481. "properties": {
  36482. "id": {
  36483. "type": "string",
  36484. "pattern": "^evt_"
  36485. },
  36486. "type": {
  36487. "type": "string",
  36488. "enum": ["session.next.agent.switched"]
  36489. },
  36490. "properties": {
  36491. "type": "object",
  36492. "properties": {
  36493. "timestamp": {
  36494. "type": "number"
  36495. },
  36496. "sessionID": {
  36497. "type": "string",
  36498. "pattern": "^ses"
  36499. },
  36500. "messageID": {
  36501. "type": "string",
  36502. "pattern": "^msg_"
  36503. },
  36504. "agent": {
  36505. "type": "string"
  36506. }
  36507. },
  36508. "required": ["timestamp", "sessionID", "messageID", "agent"],
  36509. "additionalProperties": false
  36510. }
  36511. },
  36512. "required": ["id", "type", "properties"],
  36513. "additionalProperties": false
  36514. },
  36515. "EventSessionNextModelSwitched": {
  36516. "type": "object",
  36517. "properties": {
  36518. "id": {
  36519. "type": "string",
  36520. "pattern": "^evt_"
  36521. },
  36522. "type": {
  36523. "type": "string",
  36524. "enum": ["session.next.model.switched"]
  36525. },
  36526. "properties": {
  36527. "type": "object",
  36528. "properties": {
  36529. "timestamp": {
  36530. "type": "number"
  36531. },
  36532. "sessionID": {
  36533. "type": "string",
  36534. "pattern": "^ses"
  36535. },
  36536. "messageID": {
  36537. "type": "string",
  36538. "pattern": "^msg_"
  36539. },
  36540. "model": {
  36541. "$ref": "#/components/schemas/ModelRef"
  36542. }
  36543. },
  36544. "required": ["timestamp", "sessionID", "messageID", "model"],
  36545. "additionalProperties": false
  36546. }
  36547. },
  36548. "required": ["id", "type", "properties"],
  36549. "additionalProperties": false
  36550. },
  36551. "EventSessionNextMoved": {
  36552. "type": "object",
  36553. "properties": {
  36554. "id": {
  36555. "type": "string",
  36556. "pattern": "^evt_"
  36557. },
  36558. "type": {
  36559. "type": "string",
  36560. "enum": ["session.next.moved"]
  36561. },
  36562. "properties": {
  36563. "type": "object",
  36564. "properties": {
  36565. "timestamp": {
  36566. "type": "number"
  36567. },
  36568. "sessionID": {
  36569. "type": "string",
  36570. "pattern": "^ses"
  36571. },
  36572. "location": {
  36573. "$ref": "#/components/schemas/LocationRef"
  36574. },
  36575. "subdirectory": {
  36576. "type": "string"
  36577. }
  36578. },
  36579. "required": ["timestamp", "sessionID", "location"],
  36580. "additionalProperties": false
  36581. }
  36582. },
  36583. "required": ["id", "type", "properties"],
  36584. "additionalProperties": false
  36585. },
  36586. "EventSessionNextPrompted": {
  36587. "type": "object",
  36588. "properties": {
  36589. "id": {
  36590. "type": "string",
  36591. "pattern": "^evt_"
  36592. },
  36593. "type": {
  36594. "type": "string",
  36595. "enum": ["session.next.prompted"]
  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. "prompt": {
  36612. "$ref": "#/components/schemas/Prompt"
  36613. },
  36614. "delivery": {
  36615. "type": "string",
  36616. "enum": ["steer", "queue"]
  36617. }
  36618. },
  36619. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  36620. "additionalProperties": false
  36621. }
  36622. },
  36623. "required": ["id", "type", "properties"],
  36624. "additionalProperties": false
  36625. },
  36626. "EventSessionNextPromptAdmitted": {
  36627. "type": "object",
  36628. "properties": {
  36629. "id": {
  36630. "type": "string",
  36631. "pattern": "^evt_"
  36632. },
  36633. "type": {
  36634. "type": "string",
  36635. "enum": ["session.next.prompt.admitted"]
  36636. },
  36637. "properties": {
  36638. "type": "object",
  36639. "properties": {
  36640. "timestamp": {
  36641. "type": "number"
  36642. },
  36643. "sessionID": {
  36644. "type": "string",
  36645. "pattern": "^ses"
  36646. },
  36647. "messageID": {
  36648. "type": "string",
  36649. "pattern": "^msg_"
  36650. },
  36651. "prompt": {
  36652. "$ref": "#/components/schemas/Prompt"
  36653. },
  36654. "delivery": {
  36655. "type": "string",
  36656. "enum": ["steer", "queue"]
  36657. }
  36658. },
  36659. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  36660. "additionalProperties": false
  36661. }
  36662. },
  36663. "required": ["id", "type", "properties"],
  36664. "additionalProperties": false
  36665. },
  36666. "EventSessionNextContextUpdated": {
  36667. "type": "object",
  36668. "properties": {
  36669. "id": {
  36670. "type": "string",
  36671. "pattern": "^evt_"
  36672. },
  36673. "type": {
  36674. "type": "string",
  36675. "enum": ["session.next.context.updated"]
  36676. },
  36677. "properties": {
  36678. "type": "object",
  36679. "properties": {
  36680. "timestamp": {
  36681. "type": "number"
  36682. },
  36683. "sessionID": {
  36684. "type": "string",
  36685. "pattern": "^ses"
  36686. },
  36687. "messageID": {
  36688. "type": "string",
  36689. "pattern": "^msg_"
  36690. },
  36691. "text": {
  36692. "type": "string"
  36693. }
  36694. },
  36695. "required": ["timestamp", "sessionID", "messageID", "text"],
  36696. "additionalProperties": false
  36697. }
  36698. },
  36699. "required": ["id", "type", "properties"],
  36700. "additionalProperties": false
  36701. },
  36702. "EventSessionNextSynthetic": {
  36703. "type": "object",
  36704. "properties": {
  36705. "id": {
  36706. "type": "string",
  36707. "pattern": "^evt_"
  36708. },
  36709. "type": {
  36710. "type": "string",
  36711. "enum": ["session.next.synthetic"]
  36712. },
  36713. "properties": {
  36714. "type": "object",
  36715. "properties": {
  36716. "timestamp": {
  36717. "type": "number"
  36718. },
  36719. "sessionID": {
  36720. "type": "string",
  36721. "pattern": "^ses"
  36722. },
  36723. "messageID": {
  36724. "type": "string",
  36725. "pattern": "^msg_"
  36726. },
  36727. "text": {
  36728. "type": "string"
  36729. }
  36730. },
  36731. "required": ["timestamp", "sessionID", "messageID", "text"],
  36732. "additionalProperties": false
  36733. }
  36734. },
  36735. "required": ["id", "type", "properties"],
  36736. "additionalProperties": false
  36737. },
  36738. "EventSessionNextShellStarted": {
  36739. "type": "object",
  36740. "properties": {
  36741. "id": {
  36742. "type": "string",
  36743. "pattern": "^evt_"
  36744. },
  36745. "type": {
  36746. "type": "string",
  36747. "enum": ["session.next.shell.started"]
  36748. },
  36749. "properties": {
  36750. "type": "object",
  36751. "properties": {
  36752. "timestamp": {
  36753. "type": "number"
  36754. },
  36755. "sessionID": {
  36756. "type": "string",
  36757. "pattern": "^ses"
  36758. },
  36759. "messageID": {
  36760. "type": "string",
  36761. "pattern": "^msg_"
  36762. },
  36763. "callID": {
  36764. "type": "string"
  36765. },
  36766. "command": {
  36767. "type": "string"
  36768. }
  36769. },
  36770. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  36771. "additionalProperties": false
  36772. }
  36773. },
  36774. "required": ["id", "type", "properties"],
  36775. "additionalProperties": false
  36776. },
  36777. "EventSessionNextShellEnded": {
  36778. "type": "object",
  36779. "properties": {
  36780. "id": {
  36781. "type": "string",
  36782. "pattern": "^evt_"
  36783. },
  36784. "type": {
  36785. "type": "string",
  36786. "enum": ["session.next.shell.ended"]
  36787. },
  36788. "properties": {
  36789. "type": "object",
  36790. "properties": {
  36791. "timestamp": {
  36792. "type": "number"
  36793. },
  36794. "sessionID": {
  36795. "type": "string",
  36796. "pattern": "^ses"
  36797. },
  36798. "callID": {
  36799. "type": "string"
  36800. },
  36801. "output": {
  36802. "type": "string"
  36803. }
  36804. },
  36805. "required": ["timestamp", "sessionID", "callID", "output"],
  36806. "additionalProperties": false
  36807. }
  36808. },
  36809. "required": ["id", "type", "properties"],
  36810. "additionalProperties": false
  36811. },
  36812. "EventSessionNextStepStarted": {
  36813. "type": "object",
  36814. "properties": {
  36815. "id": {
  36816. "type": "string",
  36817. "pattern": "^evt_"
  36818. },
  36819. "type": {
  36820. "type": "string",
  36821. "enum": ["session.next.step.started"]
  36822. },
  36823. "properties": {
  36824. "type": "object",
  36825. "properties": {
  36826. "timestamp": {
  36827. "type": "number"
  36828. },
  36829. "sessionID": {
  36830. "type": "string",
  36831. "pattern": "^ses"
  36832. },
  36833. "assistantMessageID": {
  36834. "type": "string",
  36835. "pattern": "^msg_"
  36836. },
  36837. "agent": {
  36838. "type": "string"
  36839. },
  36840. "model": {
  36841. "$ref": "#/components/schemas/ModelRef"
  36842. },
  36843. "snapshot": {
  36844. "type": "string"
  36845. }
  36846. },
  36847. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  36848. "additionalProperties": false
  36849. }
  36850. },
  36851. "required": ["id", "type", "properties"],
  36852. "additionalProperties": false
  36853. },
  36854. "EventSessionNextStepEnded": {
  36855. "type": "object",
  36856. "properties": {
  36857. "id": {
  36858. "type": "string",
  36859. "pattern": "^evt_"
  36860. },
  36861. "type": {
  36862. "type": "string",
  36863. "enum": ["session.next.step.ended"]
  36864. },
  36865. "properties": {
  36866. "type": "object",
  36867. "properties": {
  36868. "timestamp": {
  36869. "type": "number"
  36870. },
  36871. "sessionID": {
  36872. "type": "string",
  36873. "pattern": "^ses"
  36874. },
  36875. "assistantMessageID": {
  36876. "type": "string",
  36877. "pattern": "^msg_"
  36878. },
  36879. "finish": {
  36880. "type": "string"
  36881. },
  36882. "cost": {
  36883. "type": "number"
  36884. },
  36885. "tokens": {
  36886. "type": "object",
  36887. "properties": {
  36888. "input": {
  36889. "type": "number"
  36890. },
  36891. "output": {
  36892. "type": "number"
  36893. },
  36894. "reasoning": {
  36895. "type": "number"
  36896. },
  36897. "cache": {
  36898. "type": "object",
  36899. "properties": {
  36900. "read": {
  36901. "type": "number"
  36902. },
  36903. "write": {
  36904. "type": "number"
  36905. }
  36906. },
  36907. "required": ["read", "write"],
  36908. "additionalProperties": false
  36909. }
  36910. },
  36911. "required": ["input", "output", "reasoning", "cache"],
  36912. "additionalProperties": false
  36913. },
  36914. "snapshot": {
  36915. "type": "string"
  36916. },
  36917. "files": {
  36918. "type": "array",
  36919. "items": {
  36920. "type": "string"
  36921. }
  36922. }
  36923. },
  36924. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  36925. "additionalProperties": false
  36926. }
  36927. },
  36928. "required": ["id", "type", "properties"],
  36929. "additionalProperties": false
  36930. },
  36931. "EventSessionNextStepFailed": {
  36932. "type": "object",
  36933. "properties": {
  36934. "id": {
  36935. "type": "string",
  36936. "pattern": "^evt_"
  36937. },
  36938. "type": {
  36939. "type": "string",
  36940. "enum": ["session.next.step.failed"]
  36941. },
  36942. "properties": {
  36943. "type": "object",
  36944. "properties": {
  36945. "timestamp": {
  36946. "type": "number"
  36947. },
  36948. "sessionID": {
  36949. "type": "string",
  36950. "pattern": "^ses"
  36951. },
  36952. "assistantMessageID": {
  36953. "type": "string",
  36954. "pattern": "^msg_"
  36955. },
  36956. "error": {
  36957. "$ref": "#/components/schemas/SessionErrorUnknown"
  36958. }
  36959. },
  36960. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  36961. "additionalProperties": false
  36962. }
  36963. },
  36964. "required": ["id", "type", "properties"],
  36965. "additionalProperties": false
  36966. },
  36967. "EventSessionNextTextStarted": {
  36968. "type": "object",
  36969. "properties": {
  36970. "id": {
  36971. "type": "string",
  36972. "pattern": "^evt_"
  36973. },
  36974. "type": {
  36975. "type": "string",
  36976. "enum": ["session.next.text.started"]
  36977. },
  36978. "properties": {
  36979. "type": "object",
  36980. "properties": {
  36981. "timestamp": {
  36982. "type": "number"
  36983. },
  36984. "sessionID": {
  36985. "type": "string",
  36986. "pattern": "^ses"
  36987. },
  36988. "assistantMessageID": {
  36989. "type": "string",
  36990. "pattern": "^msg_"
  36991. },
  36992. "textID": {
  36993. "type": "string"
  36994. }
  36995. },
  36996. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  36997. "additionalProperties": false
  36998. }
  36999. },
  37000. "required": ["id", "type", "properties"],
  37001. "additionalProperties": false
  37002. },
  37003. "EventSessionNextTextDelta": {
  37004. "type": "object",
  37005. "properties": {
  37006. "id": {
  37007. "type": "string",
  37008. "pattern": "^evt_"
  37009. },
  37010. "type": {
  37011. "type": "string",
  37012. "enum": ["session.next.text.delta"]
  37013. },
  37014. "properties": {
  37015. "type": "object",
  37016. "properties": {
  37017. "timestamp": {
  37018. "type": "number"
  37019. },
  37020. "sessionID": {
  37021. "type": "string",
  37022. "pattern": "^ses"
  37023. },
  37024. "assistantMessageID": {
  37025. "type": "string",
  37026. "pattern": "^msg_"
  37027. },
  37028. "textID": {
  37029. "type": "string"
  37030. },
  37031. "delta": {
  37032. "type": "string"
  37033. }
  37034. },
  37035. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  37036. "additionalProperties": false
  37037. }
  37038. },
  37039. "required": ["id", "type", "properties"],
  37040. "additionalProperties": false
  37041. },
  37042. "EventSessionNextTextEnded": {
  37043. "type": "object",
  37044. "properties": {
  37045. "id": {
  37046. "type": "string",
  37047. "pattern": "^evt_"
  37048. },
  37049. "type": {
  37050. "type": "string",
  37051. "enum": ["session.next.text.ended"]
  37052. },
  37053. "properties": {
  37054. "type": "object",
  37055. "properties": {
  37056. "timestamp": {
  37057. "type": "number"
  37058. },
  37059. "sessionID": {
  37060. "type": "string",
  37061. "pattern": "^ses"
  37062. },
  37063. "assistantMessageID": {
  37064. "type": "string",
  37065. "pattern": "^msg_"
  37066. },
  37067. "textID": {
  37068. "type": "string"
  37069. },
  37070. "text": {
  37071. "type": "string"
  37072. }
  37073. },
  37074. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  37075. "additionalProperties": false
  37076. }
  37077. },
  37078. "required": ["id", "type", "properties"],
  37079. "additionalProperties": false
  37080. },
  37081. "EventSessionNextReasoningStarted": {
  37082. "type": "object",
  37083. "properties": {
  37084. "id": {
  37085. "type": "string",
  37086. "pattern": "^evt_"
  37087. },
  37088. "type": {
  37089. "type": "string",
  37090. "enum": ["session.next.reasoning.started"]
  37091. },
  37092. "properties": {
  37093. "type": "object",
  37094. "properties": {
  37095. "timestamp": {
  37096. "type": "number"
  37097. },
  37098. "sessionID": {
  37099. "type": "string",
  37100. "pattern": "^ses"
  37101. },
  37102. "assistantMessageID": {
  37103. "type": "string",
  37104. "pattern": "^msg_"
  37105. },
  37106. "reasoningID": {
  37107. "type": "string"
  37108. },
  37109. "providerMetadata": {
  37110. "$ref": "#/components/schemas/LLMProviderMetadata"
  37111. }
  37112. },
  37113. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  37114. "additionalProperties": false
  37115. }
  37116. },
  37117. "required": ["id", "type", "properties"],
  37118. "additionalProperties": false
  37119. },
  37120. "EventSessionNextReasoningDelta": {
  37121. "type": "object",
  37122. "properties": {
  37123. "id": {
  37124. "type": "string",
  37125. "pattern": "^evt_"
  37126. },
  37127. "type": {
  37128. "type": "string",
  37129. "enum": ["session.next.reasoning.delta"]
  37130. },
  37131. "properties": {
  37132. "type": "object",
  37133. "properties": {
  37134. "timestamp": {
  37135. "type": "number"
  37136. },
  37137. "sessionID": {
  37138. "type": "string",
  37139. "pattern": "^ses"
  37140. },
  37141. "assistantMessageID": {
  37142. "type": "string",
  37143. "pattern": "^msg_"
  37144. },
  37145. "reasoningID": {
  37146. "type": "string"
  37147. },
  37148. "delta": {
  37149. "type": "string"
  37150. }
  37151. },
  37152. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  37153. "additionalProperties": false
  37154. }
  37155. },
  37156. "required": ["id", "type", "properties"],
  37157. "additionalProperties": false
  37158. },
  37159. "EventSessionNextReasoningEnded": {
  37160. "type": "object",
  37161. "properties": {
  37162. "id": {
  37163. "type": "string",
  37164. "pattern": "^evt_"
  37165. },
  37166. "type": {
  37167. "type": "string",
  37168. "enum": ["session.next.reasoning.ended"]
  37169. },
  37170. "properties": {
  37171. "type": "object",
  37172. "properties": {
  37173. "timestamp": {
  37174. "type": "number"
  37175. },
  37176. "sessionID": {
  37177. "type": "string",
  37178. "pattern": "^ses"
  37179. },
  37180. "assistantMessageID": {
  37181. "type": "string",
  37182. "pattern": "^msg_"
  37183. },
  37184. "reasoningID": {
  37185. "type": "string"
  37186. },
  37187. "text": {
  37188. "type": "string"
  37189. },
  37190. "providerMetadata": {
  37191. "$ref": "#/components/schemas/LLMProviderMetadata"
  37192. }
  37193. },
  37194. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  37195. "additionalProperties": false
  37196. }
  37197. },
  37198. "required": ["id", "type", "properties"],
  37199. "additionalProperties": false
  37200. },
  37201. "EventSessionNextToolInputStarted": {
  37202. "type": "object",
  37203. "properties": {
  37204. "id": {
  37205. "type": "string",
  37206. "pattern": "^evt_"
  37207. },
  37208. "type": {
  37209. "type": "string",
  37210. "enum": ["session.next.tool.input.started"]
  37211. },
  37212. "properties": {
  37213. "type": "object",
  37214. "properties": {
  37215. "timestamp": {
  37216. "type": "number"
  37217. },
  37218. "sessionID": {
  37219. "type": "string",
  37220. "pattern": "^ses"
  37221. },
  37222. "assistantMessageID": {
  37223. "type": "string",
  37224. "pattern": "^msg_"
  37225. },
  37226. "callID": {
  37227. "type": "string"
  37228. },
  37229. "name": {
  37230. "type": "string"
  37231. }
  37232. },
  37233. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  37234. "additionalProperties": false
  37235. }
  37236. },
  37237. "required": ["id", "type", "properties"],
  37238. "additionalProperties": false
  37239. },
  37240. "EventSessionNextToolInputDelta": {
  37241. "type": "object",
  37242. "properties": {
  37243. "id": {
  37244. "type": "string",
  37245. "pattern": "^evt_"
  37246. },
  37247. "type": {
  37248. "type": "string",
  37249. "enum": ["session.next.tool.input.delta"]
  37250. },
  37251. "properties": {
  37252. "type": "object",
  37253. "properties": {
  37254. "timestamp": {
  37255. "type": "number"
  37256. },
  37257. "sessionID": {
  37258. "type": "string",
  37259. "pattern": "^ses"
  37260. },
  37261. "assistantMessageID": {
  37262. "type": "string",
  37263. "pattern": "^msg_"
  37264. },
  37265. "callID": {
  37266. "type": "string"
  37267. },
  37268. "delta": {
  37269. "type": "string"
  37270. }
  37271. },
  37272. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  37273. "additionalProperties": false
  37274. }
  37275. },
  37276. "required": ["id", "type", "properties"],
  37277. "additionalProperties": false
  37278. },
  37279. "EventSessionNextToolInputEnded": {
  37280. "type": "object",
  37281. "properties": {
  37282. "id": {
  37283. "type": "string",
  37284. "pattern": "^evt_"
  37285. },
  37286. "type": {
  37287. "type": "string",
  37288. "enum": ["session.next.tool.input.ended"]
  37289. },
  37290. "properties": {
  37291. "type": "object",
  37292. "properties": {
  37293. "timestamp": {
  37294. "type": "number"
  37295. },
  37296. "sessionID": {
  37297. "type": "string",
  37298. "pattern": "^ses"
  37299. },
  37300. "assistantMessageID": {
  37301. "type": "string",
  37302. "pattern": "^msg_"
  37303. },
  37304. "callID": {
  37305. "type": "string"
  37306. },
  37307. "text": {
  37308. "type": "string"
  37309. }
  37310. },
  37311. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  37312. "additionalProperties": false
  37313. }
  37314. },
  37315. "required": ["id", "type", "properties"],
  37316. "additionalProperties": false
  37317. },
  37318. "EventSessionNextToolCalled": {
  37319. "type": "object",
  37320. "properties": {
  37321. "id": {
  37322. "type": "string",
  37323. "pattern": "^evt_"
  37324. },
  37325. "type": {
  37326. "type": "string",
  37327. "enum": ["session.next.tool.called"]
  37328. },
  37329. "properties": {
  37330. "type": "object",
  37331. "properties": {
  37332. "timestamp": {
  37333. "type": "number"
  37334. },
  37335. "sessionID": {
  37336. "type": "string",
  37337. "pattern": "^ses"
  37338. },
  37339. "assistantMessageID": {
  37340. "type": "string",
  37341. "pattern": "^msg_"
  37342. },
  37343. "callID": {
  37344. "type": "string"
  37345. },
  37346. "tool": {
  37347. "type": "string"
  37348. },
  37349. "input": {
  37350. "type": "object"
  37351. },
  37352. "provider": {
  37353. "type": "object",
  37354. "properties": {
  37355. "executed": {
  37356. "type": "boolean"
  37357. },
  37358. "metadata": {
  37359. "$ref": "#/components/schemas/LLMProviderMetadata"
  37360. }
  37361. },
  37362. "required": ["executed"],
  37363. "additionalProperties": false
  37364. }
  37365. },
  37366. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  37367. "additionalProperties": false
  37368. }
  37369. },
  37370. "required": ["id", "type", "properties"],
  37371. "additionalProperties": false
  37372. },
  37373. "EventSessionNextToolProgress": {
  37374. "type": "object",
  37375. "properties": {
  37376. "id": {
  37377. "type": "string",
  37378. "pattern": "^evt_"
  37379. },
  37380. "type": {
  37381. "type": "string",
  37382. "enum": ["session.next.tool.progress"]
  37383. },
  37384. "properties": {
  37385. "type": "object",
  37386. "properties": {
  37387. "timestamp": {
  37388. "type": "number"
  37389. },
  37390. "sessionID": {
  37391. "type": "string",
  37392. "pattern": "^ses"
  37393. },
  37394. "assistantMessageID": {
  37395. "type": "string",
  37396. "pattern": "^msg_"
  37397. },
  37398. "callID": {
  37399. "type": "string"
  37400. },
  37401. "structured": {
  37402. "type": "object"
  37403. },
  37404. "content": {
  37405. "type": "array",
  37406. "items": {
  37407. "$ref": "#/components/schemas/LLMToolContent"
  37408. }
  37409. }
  37410. },
  37411. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  37412. "additionalProperties": false
  37413. }
  37414. },
  37415. "required": ["id", "type", "properties"],
  37416. "additionalProperties": false
  37417. },
  37418. "EventSessionNextToolSuccess": {
  37419. "type": "object",
  37420. "properties": {
  37421. "id": {
  37422. "type": "string",
  37423. "pattern": "^evt_"
  37424. },
  37425. "type": {
  37426. "type": "string",
  37427. "enum": ["session.next.tool.success"]
  37428. },
  37429. "properties": {
  37430. "type": "object",
  37431. "properties": {
  37432. "timestamp": {
  37433. "type": "number"
  37434. },
  37435. "sessionID": {
  37436. "type": "string",
  37437. "pattern": "^ses"
  37438. },
  37439. "assistantMessageID": {
  37440. "type": "string",
  37441. "pattern": "^msg_"
  37442. },
  37443. "callID": {
  37444. "type": "string"
  37445. },
  37446. "structured": {
  37447. "type": "object"
  37448. },
  37449. "content": {
  37450. "type": "array",
  37451. "items": {
  37452. "$ref": "#/components/schemas/LLMToolContent"
  37453. }
  37454. },
  37455. "outputPaths": {
  37456. "type": "array",
  37457. "items": {
  37458. "type": "string"
  37459. }
  37460. },
  37461. "result": {},
  37462. "provider": {
  37463. "type": "object",
  37464. "properties": {
  37465. "executed": {
  37466. "type": "boolean"
  37467. },
  37468. "metadata": {
  37469. "$ref": "#/components/schemas/LLMProviderMetadata"
  37470. }
  37471. },
  37472. "required": ["executed"],
  37473. "additionalProperties": false
  37474. }
  37475. },
  37476. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  37477. "additionalProperties": false
  37478. }
  37479. },
  37480. "required": ["id", "type", "properties"],
  37481. "additionalProperties": false
  37482. },
  37483. "EventSessionNextToolFailed": {
  37484. "type": "object",
  37485. "properties": {
  37486. "id": {
  37487. "type": "string",
  37488. "pattern": "^evt_"
  37489. },
  37490. "type": {
  37491. "type": "string",
  37492. "enum": ["session.next.tool.failed"]
  37493. },
  37494. "properties": {
  37495. "type": "object",
  37496. "properties": {
  37497. "timestamp": {
  37498. "type": "number"
  37499. },
  37500. "sessionID": {
  37501. "type": "string",
  37502. "pattern": "^ses"
  37503. },
  37504. "assistantMessageID": {
  37505. "type": "string",
  37506. "pattern": "^msg_"
  37507. },
  37508. "callID": {
  37509. "type": "string"
  37510. },
  37511. "error": {
  37512. "$ref": "#/components/schemas/SessionErrorUnknown"
  37513. },
  37514. "result": {},
  37515. "provider": {
  37516. "type": "object",
  37517. "properties": {
  37518. "executed": {
  37519. "type": "boolean"
  37520. },
  37521. "metadata": {
  37522. "$ref": "#/components/schemas/LLMProviderMetadata"
  37523. }
  37524. },
  37525. "required": ["executed"],
  37526. "additionalProperties": false
  37527. }
  37528. },
  37529. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  37530. "additionalProperties": false
  37531. }
  37532. },
  37533. "required": ["id", "type", "properties"],
  37534. "additionalProperties": false
  37535. },
  37536. "EventSessionNextRetried": {
  37537. "type": "object",
  37538. "properties": {
  37539. "id": {
  37540. "type": "string",
  37541. "pattern": "^evt_"
  37542. },
  37543. "type": {
  37544. "type": "string",
  37545. "enum": ["session.next.retried"]
  37546. },
  37547. "properties": {
  37548. "type": "object",
  37549. "properties": {
  37550. "timestamp": {
  37551. "type": "number"
  37552. },
  37553. "sessionID": {
  37554. "type": "string",
  37555. "pattern": "^ses"
  37556. },
  37557. "attempt": {
  37558. "type": "number"
  37559. },
  37560. "error": {
  37561. "$ref": "#/components/schemas/SessionNextRetry_error"
  37562. }
  37563. },
  37564. "required": ["timestamp", "sessionID", "attempt", "error"],
  37565. "additionalProperties": false
  37566. }
  37567. },
  37568. "required": ["id", "type", "properties"],
  37569. "additionalProperties": false
  37570. },
  37571. "EventSessionNextCompactionStarted": {
  37572. "type": "object",
  37573. "properties": {
  37574. "id": {
  37575. "type": "string",
  37576. "pattern": "^evt_"
  37577. },
  37578. "type": {
  37579. "type": "string",
  37580. "enum": ["session.next.compaction.started"]
  37581. },
  37582. "properties": {
  37583. "type": "object",
  37584. "properties": {
  37585. "timestamp": {
  37586. "type": "number"
  37587. },
  37588. "sessionID": {
  37589. "type": "string",
  37590. "pattern": "^ses"
  37591. },
  37592. "messageID": {
  37593. "type": "string",
  37594. "pattern": "^msg_"
  37595. },
  37596. "reason": {
  37597. "type": "string",
  37598. "enum": ["auto", "manual"]
  37599. }
  37600. },
  37601. "required": ["timestamp", "sessionID", "messageID", "reason"],
  37602. "additionalProperties": false
  37603. }
  37604. },
  37605. "required": ["id", "type", "properties"],
  37606. "additionalProperties": false
  37607. },
  37608. "EventSessionNextCompactionDelta": {
  37609. "type": "object",
  37610. "properties": {
  37611. "id": {
  37612. "type": "string",
  37613. "pattern": "^evt_"
  37614. },
  37615. "type": {
  37616. "type": "string",
  37617. "enum": ["session.next.compaction.delta"]
  37618. },
  37619. "properties": {
  37620. "type": "object",
  37621. "properties": {
  37622. "timestamp": {
  37623. "type": "number"
  37624. },
  37625. "sessionID": {
  37626. "type": "string",
  37627. "pattern": "^ses"
  37628. },
  37629. "messageID": {
  37630. "type": "string",
  37631. "pattern": "^msg_"
  37632. },
  37633. "text": {
  37634. "type": "string"
  37635. }
  37636. },
  37637. "required": ["timestamp", "sessionID", "messageID", "text"],
  37638. "additionalProperties": false
  37639. }
  37640. },
  37641. "required": ["id", "type", "properties"],
  37642. "additionalProperties": false
  37643. },
  37644. "EventSessionNextCompactionEnded": {
  37645. "type": "object",
  37646. "properties": {
  37647. "id": {
  37648. "type": "string",
  37649. "pattern": "^evt_"
  37650. },
  37651. "type": {
  37652. "type": "string",
  37653. "enum": ["session.next.compaction.ended"]
  37654. },
  37655. "properties": {
  37656. "type": "object",
  37657. "properties": {
  37658. "timestamp": {
  37659. "type": "number"
  37660. },
  37661. "sessionID": {
  37662. "type": "string",
  37663. "pattern": "^ses"
  37664. },
  37665. "messageID": {
  37666. "type": "string",
  37667. "pattern": "^msg_"
  37668. },
  37669. "reason": {
  37670. "type": "string",
  37671. "enum": ["auto", "manual"]
  37672. },
  37673. "text": {
  37674. "type": "string"
  37675. },
  37676. "recent": {
  37677. "type": "string"
  37678. }
  37679. },
  37680. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  37681. "additionalProperties": false
  37682. }
  37683. },
  37684. "required": ["id", "type", "properties"],
  37685. "additionalProperties": false
  37686. },
  37687. "EventSessionNextRevertStaged": {
  37688. "type": "object",
  37689. "properties": {
  37690. "id": {
  37691. "type": "string",
  37692. "pattern": "^evt_"
  37693. },
  37694. "type": {
  37695. "type": "string",
  37696. "enum": ["session.next.revert.staged"]
  37697. },
  37698. "properties": {
  37699. "type": "object",
  37700. "properties": {
  37701. "timestamp": {
  37702. "type": "number"
  37703. },
  37704. "sessionID": {
  37705. "type": "string",
  37706. "pattern": "^ses"
  37707. },
  37708. "revert": {
  37709. "$ref": "#/components/schemas/RevertState"
  37710. }
  37711. },
  37712. "required": ["timestamp", "sessionID", "revert"],
  37713. "additionalProperties": false
  37714. }
  37715. },
  37716. "required": ["id", "type", "properties"],
  37717. "additionalProperties": false
  37718. },
  37719. "EventSessionNextRevertCleared": {
  37720. "type": "object",
  37721. "properties": {
  37722. "id": {
  37723. "type": "string",
  37724. "pattern": "^evt_"
  37725. },
  37726. "type": {
  37727. "type": "string",
  37728. "enum": ["session.next.revert.cleared"]
  37729. },
  37730. "properties": {
  37731. "type": "object",
  37732. "properties": {
  37733. "timestamp": {
  37734. "type": "number"
  37735. },
  37736. "sessionID": {
  37737. "type": "string",
  37738. "pattern": "^ses"
  37739. }
  37740. },
  37741. "required": ["timestamp", "sessionID"],
  37742. "additionalProperties": false
  37743. }
  37744. },
  37745. "required": ["id", "type", "properties"],
  37746. "additionalProperties": false
  37747. },
  37748. "EventSessionNextRevertCommitted": {
  37749. "type": "object",
  37750. "properties": {
  37751. "id": {
  37752. "type": "string",
  37753. "pattern": "^evt_"
  37754. },
  37755. "type": {
  37756. "type": "string",
  37757. "enum": ["session.next.revert.committed"]
  37758. },
  37759. "properties": {
  37760. "type": "object",
  37761. "properties": {
  37762. "timestamp": {
  37763. "type": "number"
  37764. },
  37765. "sessionID": {
  37766. "type": "string",
  37767. "pattern": "^ses"
  37768. },
  37769. "messageID": {
  37770. "type": "string",
  37771. "pattern": "^msg_"
  37772. }
  37773. },
  37774. "required": ["timestamp", "sessionID", "messageID"],
  37775. "additionalProperties": false
  37776. }
  37777. },
  37778. "required": ["id", "type", "properties"],
  37779. "additionalProperties": false
  37780. },
  37781. "EventMessagePartDelta": {
  37782. "type": "object",
  37783. "properties": {
  37784. "id": {
  37785. "type": "string",
  37786. "pattern": "^evt_"
  37787. },
  37788. "type": {
  37789. "type": "string",
  37790. "enum": ["message.part.delta"]
  37791. },
  37792. "properties": {
  37793. "type": "object",
  37794. "properties": {
  37795. "sessionID": {
  37796. "type": "string",
  37797. "pattern": "^ses"
  37798. },
  37799. "messageID": {
  37800. "type": "string",
  37801. "pattern": "^msg"
  37802. },
  37803. "partID": {
  37804. "type": "string",
  37805. "pattern": "^prt"
  37806. },
  37807. "field": {
  37808. "type": "string"
  37809. },
  37810. "delta": {
  37811. "type": "string"
  37812. }
  37813. },
  37814. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  37815. "additionalProperties": false
  37816. }
  37817. },
  37818. "required": ["id", "type", "properties"],
  37819. "additionalProperties": false
  37820. },
  37821. "EventSessionDiff": {
  37822. "type": "object",
  37823. "properties": {
  37824. "id": {
  37825. "type": "string",
  37826. "pattern": "^evt_"
  37827. },
  37828. "type": {
  37829. "type": "string",
  37830. "enum": ["session.diff"]
  37831. },
  37832. "properties": {
  37833. "type": "object",
  37834. "properties": {
  37835. "sessionID": {
  37836. "type": "string",
  37837. "pattern": "^ses"
  37838. },
  37839. "diff": {
  37840. "type": "array",
  37841. "items": {
  37842. "$ref": "#/components/schemas/SnapshotFileDiff"
  37843. }
  37844. }
  37845. },
  37846. "required": ["sessionID", "diff"],
  37847. "additionalProperties": false
  37848. }
  37849. },
  37850. "required": ["id", "type", "properties"],
  37851. "additionalProperties": false
  37852. },
  37853. "EventSessionError": {
  37854. "type": "object",
  37855. "properties": {
  37856. "id": {
  37857. "type": "string",
  37858. "pattern": "^evt_"
  37859. },
  37860. "type": {
  37861. "type": "string",
  37862. "enum": ["session.error"]
  37863. },
  37864. "properties": {
  37865. "type": "object",
  37866. "properties": {
  37867. "sessionID": {
  37868. "type": "string",
  37869. "pattern": "^ses"
  37870. },
  37871. "error": {
  37872. "anyOf": [
  37873. {
  37874. "$ref": "#/components/schemas/ProviderAuthError"
  37875. },
  37876. {
  37877. "$ref": "#/components/schemas/UnknownError"
  37878. },
  37879. {
  37880. "$ref": "#/components/schemas/MessageOutputLengthError"
  37881. },
  37882. {
  37883. "$ref": "#/components/schemas/MessageAbortedError"
  37884. },
  37885. {
  37886. "$ref": "#/components/schemas/StructuredOutputError"
  37887. },
  37888. {
  37889. "$ref": "#/components/schemas/ContextOverflowError"
  37890. },
  37891. {
  37892. "$ref": "#/components/schemas/ContentFilterError"
  37893. },
  37894. {
  37895. "$ref": "#/components/schemas/APIError"
  37896. }
  37897. ]
  37898. }
  37899. },
  37900. "additionalProperties": false
  37901. }
  37902. },
  37903. "required": ["id", "type", "properties"],
  37904. "additionalProperties": false
  37905. },
  37906. "EventInstallationUpdated": {
  37907. "type": "object",
  37908. "properties": {
  37909. "id": {
  37910. "type": "string",
  37911. "pattern": "^evt_"
  37912. },
  37913. "type": {
  37914. "type": "string",
  37915. "enum": ["installation.updated"]
  37916. },
  37917. "properties": {
  37918. "type": "object",
  37919. "properties": {
  37920. "version": {
  37921. "type": "string"
  37922. }
  37923. },
  37924. "required": ["version"],
  37925. "additionalProperties": false
  37926. }
  37927. },
  37928. "required": ["id", "type", "properties"],
  37929. "additionalProperties": false
  37930. },
  37931. "EventInstallationUpdate-available": {
  37932. "type": "object",
  37933. "properties": {
  37934. "id": {
  37935. "type": "string",
  37936. "pattern": "^evt_"
  37937. },
  37938. "type": {
  37939. "type": "string",
  37940. "enum": ["installation.update-available"]
  37941. },
  37942. "properties": {
  37943. "type": "object",
  37944. "properties": {
  37945. "version": {
  37946. "type": "string"
  37947. }
  37948. },
  37949. "required": ["version"],
  37950. "additionalProperties": false
  37951. }
  37952. },
  37953. "required": ["id", "type", "properties"],
  37954. "additionalProperties": false
  37955. },
  37956. "EventFileEdited": {
  37957. "type": "object",
  37958. "properties": {
  37959. "id": {
  37960. "type": "string",
  37961. "pattern": "^evt_"
  37962. },
  37963. "type": {
  37964. "type": "string",
  37965. "enum": ["file.edited"]
  37966. },
  37967. "properties": {
  37968. "type": "object",
  37969. "properties": {
  37970. "file": {
  37971. "type": "string"
  37972. }
  37973. },
  37974. "required": ["file"],
  37975. "additionalProperties": false
  37976. }
  37977. },
  37978. "required": ["id", "type", "properties"],
  37979. "additionalProperties": false
  37980. },
  37981. "EventReferenceUpdated": {
  37982. "type": "object",
  37983. "properties": {
  37984. "id": {
  37985. "type": "string",
  37986. "pattern": "^evt_"
  37987. },
  37988. "type": {
  37989. "type": "string",
  37990. "enum": ["reference.updated"]
  37991. },
  37992. "properties": {
  37993. "type": "object",
  37994. "properties": {}
  37995. }
  37996. },
  37997. "required": ["id", "type", "properties"],
  37998. "additionalProperties": false
  37999. },
  38000. "EventPermissionV2Asked": {
  38001. "type": "object",
  38002. "properties": {
  38003. "id": {
  38004. "type": "string",
  38005. "pattern": "^evt_"
  38006. },
  38007. "type": {
  38008. "type": "string",
  38009. "enum": ["permission.v2.asked"]
  38010. },
  38011. "properties": {
  38012. "type": "object",
  38013. "properties": {
  38014. "id": {
  38015. "type": "string",
  38016. "pattern": "^per"
  38017. },
  38018. "sessionID": {
  38019. "type": "string",
  38020. "pattern": "^ses"
  38021. },
  38022. "action": {
  38023. "type": "string"
  38024. },
  38025. "resources": {
  38026. "type": "array",
  38027. "items": {
  38028. "type": "string"
  38029. }
  38030. },
  38031. "save": {
  38032. "type": "array",
  38033. "items": {
  38034. "type": "string"
  38035. }
  38036. },
  38037. "metadata": {
  38038. "type": "object"
  38039. },
  38040. "source": {
  38041. "$ref": "#/components/schemas/PermissionV2Source"
  38042. }
  38043. },
  38044. "required": ["id", "sessionID", "action", "resources"],
  38045. "additionalProperties": false
  38046. }
  38047. },
  38048. "required": ["id", "type", "properties"],
  38049. "additionalProperties": false
  38050. },
  38051. "EventPermissionV2Replied": {
  38052. "type": "object",
  38053. "properties": {
  38054. "id": {
  38055. "type": "string",
  38056. "pattern": "^evt_"
  38057. },
  38058. "type": {
  38059. "type": "string",
  38060. "enum": ["permission.v2.replied"]
  38061. },
  38062. "properties": {
  38063. "type": "object",
  38064. "properties": {
  38065. "sessionID": {
  38066. "type": "string",
  38067. "pattern": "^ses"
  38068. },
  38069. "requestID": {
  38070. "type": "string",
  38071. "pattern": "^per"
  38072. },
  38073. "reply": {
  38074. "$ref": "#/components/schemas/PermissionV2Reply"
  38075. }
  38076. },
  38077. "required": ["sessionID", "requestID", "reply"],
  38078. "additionalProperties": false
  38079. }
  38080. },
  38081. "required": ["id", "type", "properties"],
  38082. "additionalProperties": false
  38083. },
  38084. "EventPluginAdded": {
  38085. "type": "object",
  38086. "properties": {
  38087. "id": {
  38088. "type": "string",
  38089. "pattern": "^evt_"
  38090. },
  38091. "type": {
  38092. "type": "string",
  38093. "enum": ["plugin.added"]
  38094. },
  38095. "properties": {
  38096. "type": "object",
  38097. "properties": {
  38098. "id": {
  38099. "type": "string"
  38100. }
  38101. },
  38102. "required": ["id"],
  38103. "additionalProperties": false
  38104. }
  38105. },
  38106. "required": ["id", "type", "properties"],
  38107. "additionalProperties": false
  38108. },
  38109. "EventProjectDirectoriesUpdated": {
  38110. "type": "object",
  38111. "properties": {
  38112. "id": {
  38113. "type": "string",
  38114. "pattern": "^evt_"
  38115. },
  38116. "type": {
  38117. "type": "string",
  38118. "enum": ["project.directories.updated"]
  38119. },
  38120. "properties": {
  38121. "type": "object",
  38122. "properties": {
  38123. "projectID": {
  38124. "type": "string"
  38125. }
  38126. },
  38127. "required": ["projectID"],
  38128. "additionalProperties": false
  38129. }
  38130. },
  38131. "required": ["id", "type", "properties"],
  38132. "additionalProperties": false
  38133. },
  38134. "EventFileWatcherUpdated": {
  38135. "type": "object",
  38136. "properties": {
  38137. "id": {
  38138. "type": "string",
  38139. "pattern": "^evt_"
  38140. },
  38141. "type": {
  38142. "type": "string",
  38143. "enum": ["file.watcher.updated"]
  38144. },
  38145. "properties": {
  38146. "type": "object",
  38147. "properties": {
  38148. "file": {
  38149. "type": "string"
  38150. },
  38151. "event": {
  38152. "type": "string",
  38153. "enum": ["add", "change", "unlink"]
  38154. }
  38155. },
  38156. "required": ["file", "event"],
  38157. "additionalProperties": false
  38158. }
  38159. },
  38160. "required": ["id", "type", "properties"],
  38161. "additionalProperties": false
  38162. },
  38163. "EventPtyCreated": {
  38164. "type": "object",
  38165. "properties": {
  38166. "id": {
  38167. "type": "string",
  38168. "pattern": "^evt_"
  38169. },
  38170. "type": {
  38171. "type": "string",
  38172. "enum": ["pty.created"]
  38173. },
  38174. "properties": {
  38175. "type": "object",
  38176. "properties": {
  38177. "info": {
  38178. "$ref": "#/components/schemas/Pty"
  38179. }
  38180. },
  38181. "required": ["info"],
  38182. "additionalProperties": false
  38183. }
  38184. },
  38185. "required": ["id", "type", "properties"],
  38186. "additionalProperties": false
  38187. },
  38188. "EventPtyUpdated": {
  38189. "type": "object",
  38190. "properties": {
  38191. "id": {
  38192. "type": "string",
  38193. "pattern": "^evt_"
  38194. },
  38195. "type": {
  38196. "type": "string",
  38197. "enum": ["pty.updated"]
  38198. },
  38199. "properties": {
  38200. "type": "object",
  38201. "properties": {
  38202. "info": {
  38203. "$ref": "#/components/schemas/Pty"
  38204. }
  38205. },
  38206. "required": ["info"],
  38207. "additionalProperties": false
  38208. }
  38209. },
  38210. "required": ["id", "type", "properties"],
  38211. "additionalProperties": false
  38212. },
  38213. "EventPtyExited": {
  38214. "type": "object",
  38215. "properties": {
  38216. "id": {
  38217. "type": "string",
  38218. "pattern": "^evt_"
  38219. },
  38220. "type": {
  38221. "type": "string",
  38222. "enum": ["pty.exited"]
  38223. },
  38224. "properties": {
  38225. "type": "object",
  38226. "properties": {
  38227. "id": {
  38228. "type": "string",
  38229. "pattern": "^pty"
  38230. },
  38231. "exitCode": {
  38232. "type": "integer",
  38233. "minimum": 0
  38234. }
  38235. },
  38236. "required": ["id", "exitCode"],
  38237. "additionalProperties": false
  38238. }
  38239. },
  38240. "required": ["id", "type", "properties"],
  38241. "additionalProperties": false
  38242. },
  38243. "EventPtyDeleted": {
  38244. "type": "object",
  38245. "properties": {
  38246. "id": {
  38247. "type": "string",
  38248. "pattern": "^evt_"
  38249. },
  38250. "type": {
  38251. "type": "string",
  38252. "enum": ["pty.deleted"]
  38253. },
  38254. "properties": {
  38255. "type": "object",
  38256. "properties": {
  38257. "id": {
  38258. "type": "string",
  38259. "pattern": "^pty"
  38260. }
  38261. },
  38262. "required": ["id"],
  38263. "additionalProperties": false
  38264. }
  38265. },
  38266. "required": ["id", "type", "properties"],
  38267. "additionalProperties": false
  38268. },
  38269. "EventQuestionV2Asked": {
  38270. "type": "object",
  38271. "properties": {
  38272. "id": {
  38273. "type": "string",
  38274. "pattern": "^evt_"
  38275. },
  38276. "type": {
  38277. "type": "string",
  38278. "enum": ["question.v2.asked"]
  38279. },
  38280. "properties": {
  38281. "type": "object",
  38282. "properties": {
  38283. "id": {
  38284. "type": "string",
  38285. "pattern": "^que"
  38286. },
  38287. "sessionID": {
  38288. "type": "string",
  38289. "pattern": "^ses"
  38290. },
  38291. "questions": {
  38292. "type": "array",
  38293. "items": {
  38294. "$ref": "#/components/schemas/QuestionV2Info"
  38295. },
  38296. "description": "Questions to ask"
  38297. },
  38298. "tool": {
  38299. "$ref": "#/components/schemas/QuestionV2Tool"
  38300. }
  38301. },
  38302. "required": ["id", "sessionID", "questions"],
  38303. "additionalProperties": false
  38304. }
  38305. },
  38306. "required": ["id", "type", "properties"],
  38307. "additionalProperties": false
  38308. },
  38309. "EventQuestionV2Replied": {
  38310. "type": "object",
  38311. "properties": {
  38312. "id": {
  38313. "type": "string",
  38314. "pattern": "^evt_"
  38315. },
  38316. "type": {
  38317. "type": "string",
  38318. "enum": ["question.v2.replied"]
  38319. },
  38320. "properties": {
  38321. "type": "object",
  38322. "properties": {
  38323. "sessionID": {
  38324. "type": "string",
  38325. "pattern": "^ses"
  38326. },
  38327. "requestID": {
  38328. "type": "string",
  38329. "pattern": "^que"
  38330. },
  38331. "answers": {
  38332. "type": "array",
  38333. "items": {
  38334. "$ref": "#/components/schemas/QuestionV2Answer"
  38335. }
  38336. }
  38337. },
  38338. "required": ["sessionID", "requestID", "answers"],
  38339. "additionalProperties": false
  38340. }
  38341. },
  38342. "required": ["id", "type", "properties"],
  38343. "additionalProperties": false
  38344. },
  38345. "EventQuestionV2Rejected": {
  38346. "type": "object",
  38347. "properties": {
  38348. "id": {
  38349. "type": "string",
  38350. "pattern": "^evt_"
  38351. },
  38352. "type": {
  38353. "type": "string",
  38354. "enum": ["question.v2.rejected"]
  38355. },
  38356. "properties": {
  38357. "type": "object",
  38358. "properties": {
  38359. "sessionID": {
  38360. "type": "string",
  38361. "pattern": "^ses"
  38362. },
  38363. "requestID": {
  38364. "type": "string",
  38365. "pattern": "^que"
  38366. }
  38367. },
  38368. "required": ["sessionID", "requestID"],
  38369. "additionalProperties": false
  38370. }
  38371. },
  38372. "required": ["id", "type", "properties"],
  38373. "additionalProperties": false
  38374. },
  38375. "EventTodoUpdated": {
  38376. "type": "object",
  38377. "properties": {
  38378. "id": {
  38379. "type": "string",
  38380. "pattern": "^evt_"
  38381. },
  38382. "type": {
  38383. "type": "string",
  38384. "enum": ["todo.updated"]
  38385. },
  38386. "properties": {
  38387. "type": "object",
  38388. "properties": {
  38389. "sessionID": {
  38390. "type": "string",
  38391. "pattern": "^ses"
  38392. },
  38393. "todos": {
  38394. "type": "array",
  38395. "items": {
  38396. "$ref": "#/components/schemas/Todo"
  38397. }
  38398. }
  38399. },
  38400. "required": ["sessionID", "todos"],
  38401. "additionalProperties": false
  38402. }
  38403. },
  38404. "required": ["id", "type", "properties"],
  38405. "additionalProperties": false
  38406. },
  38407. "EventLspUpdated": {
  38408. "type": "object",
  38409. "properties": {
  38410. "id": {
  38411. "type": "string",
  38412. "pattern": "^evt_"
  38413. },
  38414. "type": {
  38415. "type": "string",
  38416. "enum": ["lsp.updated"]
  38417. },
  38418. "properties": {
  38419. "type": "object",
  38420. "properties": {}
  38421. }
  38422. },
  38423. "required": ["id", "type", "properties"],
  38424. "additionalProperties": false
  38425. },
  38426. "EventPermissionAsked": {
  38427. "type": "object",
  38428. "properties": {
  38429. "id": {
  38430. "type": "string",
  38431. "pattern": "^evt_"
  38432. },
  38433. "type": {
  38434. "type": "string",
  38435. "enum": ["permission.asked"]
  38436. },
  38437. "properties": {
  38438. "type": "object",
  38439. "properties": {
  38440. "id": {
  38441. "type": "string",
  38442. "pattern": "^per"
  38443. },
  38444. "sessionID": {
  38445. "type": "string",
  38446. "pattern": "^ses"
  38447. },
  38448. "permission": {
  38449. "type": "string"
  38450. },
  38451. "patterns": {
  38452. "type": "array",
  38453. "items": {
  38454. "type": "string"
  38455. }
  38456. },
  38457. "metadata": {
  38458. "type": "object"
  38459. },
  38460. "always": {
  38461. "type": "array",
  38462. "items": {
  38463. "type": "string"
  38464. }
  38465. },
  38466. "tool": {
  38467. "type": "object",
  38468. "properties": {
  38469. "messageID": {
  38470. "type": "string"
  38471. },
  38472. "callID": {
  38473. "type": "string"
  38474. }
  38475. },
  38476. "required": ["messageID", "callID"],
  38477. "additionalProperties": false
  38478. }
  38479. },
  38480. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  38481. "additionalProperties": false
  38482. }
  38483. },
  38484. "required": ["id", "type", "properties"],
  38485. "additionalProperties": false
  38486. },
  38487. "EventPermissionReplied": {
  38488. "type": "object",
  38489. "properties": {
  38490. "id": {
  38491. "type": "string",
  38492. "pattern": "^evt_"
  38493. },
  38494. "type": {
  38495. "type": "string",
  38496. "enum": ["permission.replied"]
  38497. },
  38498. "properties": {
  38499. "type": "object",
  38500. "properties": {
  38501. "sessionID": {
  38502. "type": "string",
  38503. "pattern": "^ses"
  38504. },
  38505. "requestID": {
  38506. "type": "string",
  38507. "pattern": "^per"
  38508. },
  38509. "reply": {
  38510. "type": "string",
  38511. "enum": ["once", "always", "reject"]
  38512. }
  38513. },
  38514. "required": ["sessionID", "requestID", "reply"],
  38515. "additionalProperties": false
  38516. }
  38517. },
  38518. "required": ["id", "type", "properties"],
  38519. "additionalProperties": false
  38520. },
  38521. "EventMcpToolsChanged": {
  38522. "type": "object",
  38523. "properties": {
  38524. "id": {
  38525. "type": "string",
  38526. "pattern": "^evt_"
  38527. },
  38528. "type": {
  38529. "type": "string",
  38530. "enum": ["mcp.tools.changed"]
  38531. },
  38532. "properties": {
  38533. "type": "object",
  38534. "properties": {
  38535. "server": {
  38536. "type": "string"
  38537. }
  38538. },
  38539. "required": ["server"],
  38540. "additionalProperties": false
  38541. }
  38542. },
  38543. "required": ["id", "type", "properties"],
  38544. "additionalProperties": false
  38545. },
  38546. "EventMcpBrowserOpenFailed": {
  38547. "type": "object",
  38548. "properties": {
  38549. "id": {
  38550. "type": "string",
  38551. "pattern": "^evt_"
  38552. },
  38553. "type": {
  38554. "type": "string",
  38555. "enum": ["mcp.browser.open.failed"]
  38556. },
  38557. "properties": {
  38558. "type": "object",
  38559. "properties": {
  38560. "mcpName": {
  38561. "type": "string"
  38562. },
  38563. "url": {
  38564. "type": "string"
  38565. }
  38566. },
  38567. "required": ["mcpName", "url"],
  38568. "additionalProperties": false
  38569. }
  38570. },
  38571. "required": ["id", "type", "properties"],
  38572. "additionalProperties": false
  38573. },
  38574. "EventCommandExecuted": {
  38575. "type": "object",
  38576. "properties": {
  38577. "id": {
  38578. "type": "string",
  38579. "pattern": "^evt_"
  38580. },
  38581. "type": {
  38582. "type": "string",
  38583. "enum": ["command.executed"]
  38584. },
  38585. "properties": {
  38586. "type": "object",
  38587. "properties": {
  38588. "name": {
  38589. "type": "string"
  38590. },
  38591. "sessionID": {
  38592. "type": "string",
  38593. "pattern": "^ses"
  38594. },
  38595. "arguments": {
  38596. "type": "string"
  38597. },
  38598. "messageID": {
  38599. "type": "string",
  38600. "pattern": "^msg"
  38601. }
  38602. },
  38603. "required": ["name", "sessionID", "arguments", "messageID"],
  38604. "additionalProperties": false
  38605. }
  38606. },
  38607. "required": ["id", "type", "properties"],
  38608. "additionalProperties": false
  38609. },
  38610. "EventProjectUpdated": {
  38611. "type": "object",
  38612. "properties": {
  38613. "id": {
  38614. "type": "string",
  38615. "pattern": "^evt_"
  38616. },
  38617. "type": {
  38618. "type": "string",
  38619. "enum": ["project.updated"]
  38620. },
  38621. "properties": {
  38622. "type": "object",
  38623. "properties": {
  38624. "id": {
  38625. "type": "string"
  38626. },
  38627. "worktree": {
  38628. "type": "string"
  38629. },
  38630. "vcs": {
  38631. "$ref": "#/components/schemas/ProjectVcs"
  38632. },
  38633. "name": {
  38634. "type": "string"
  38635. },
  38636. "icon": {
  38637. "$ref": "#/components/schemas/ProjectIcon"
  38638. },
  38639. "commands": {
  38640. "$ref": "#/components/schemas/ProjectCommands"
  38641. },
  38642. "time": {
  38643. "$ref": "#/components/schemas/ProjectTime"
  38644. },
  38645. "sandboxes": {
  38646. "type": "array",
  38647. "items": {
  38648. "type": "string"
  38649. }
  38650. }
  38651. },
  38652. "required": ["id", "worktree", "time", "sandboxes"],
  38653. "additionalProperties": false
  38654. }
  38655. },
  38656. "required": ["id", "type", "properties"],
  38657. "additionalProperties": false
  38658. },
  38659. "EventSessionStatus": {
  38660. "type": "object",
  38661. "properties": {
  38662. "id": {
  38663. "type": "string",
  38664. "pattern": "^evt_"
  38665. },
  38666. "type": {
  38667. "type": "string",
  38668. "enum": ["session.status"]
  38669. },
  38670. "properties": {
  38671. "type": "object",
  38672. "properties": {
  38673. "sessionID": {
  38674. "type": "string",
  38675. "pattern": "^ses"
  38676. },
  38677. "status": {
  38678. "$ref": "#/components/schemas/SessionStatus"
  38679. }
  38680. },
  38681. "required": ["sessionID", "status"],
  38682. "additionalProperties": false
  38683. }
  38684. },
  38685. "required": ["id", "type", "properties"],
  38686. "additionalProperties": false
  38687. },
  38688. "EventSessionIdle": {
  38689. "type": "object",
  38690. "properties": {
  38691. "id": {
  38692. "type": "string",
  38693. "pattern": "^evt_"
  38694. },
  38695. "type": {
  38696. "type": "string",
  38697. "enum": ["session.idle"]
  38698. },
  38699. "properties": {
  38700. "type": "object",
  38701. "properties": {
  38702. "sessionID": {
  38703. "type": "string",
  38704. "pattern": "^ses"
  38705. }
  38706. },
  38707. "required": ["sessionID"],
  38708. "additionalProperties": false
  38709. }
  38710. },
  38711. "required": ["id", "type", "properties"],
  38712. "additionalProperties": false
  38713. },
  38714. "EventQuestionAsked": {
  38715. "type": "object",
  38716. "properties": {
  38717. "id": {
  38718. "type": "string",
  38719. "pattern": "^evt_"
  38720. },
  38721. "type": {
  38722. "type": "string",
  38723. "enum": ["question.asked"]
  38724. },
  38725. "properties": {
  38726. "type": "object",
  38727. "properties": {
  38728. "id": {
  38729. "type": "string",
  38730. "pattern": "^que"
  38731. },
  38732. "sessionID": {
  38733. "type": "string",
  38734. "pattern": "^ses"
  38735. },
  38736. "questions": {
  38737. "type": "array",
  38738. "items": {
  38739. "$ref": "#/components/schemas/QuestionInfo"
  38740. },
  38741. "description": "Questions to ask"
  38742. },
  38743. "tool": {
  38744. "$ref": "#/components/schemas/QuestionTool"
  38745. }
  38746. },
  38747. "required": ["id", "sessionID", "questions"],
  38748. "additionalProperties": false
  38749. }
  38750. },
  38751. "required": ["id", "type", "properties"],
  38752. "additionalProperties": false
  38753. },
  38754. "EventQuestionReplied": {
  38755. "type": "object",
  38756. "properties": {
  38757. "id": {
  38758. "type": "string",
  38759. "pattern": "^evt_"
  38760. },
  38761. "type": {
  38762. "type": "string",
  38763. "enum": ["question.replied"]
  38764. },
  38765. "properties": {
  38766. "type": "object",
  38767. "properties": {
  38768. "sessionID": {
  38769. "type": "string",
  38770. "pattern": "^ses"
  38771. },
  38772. "requestID": {
  38773. "type": "string",
  38774. "pattern": "^que"
  38775. },
  38776. "answers": {
  38777. "type": "array",
  38778. "items": {
  38779. "$ref": "#/components/schemas/QuestionAnswer"
  38780. }
  38781. }
  38782. },
  38783. "required": ["sessionID", "requestID", "answers"],
  38784. "additionalProperties": false
  38785. }
  38786. },
  38787. "required": ["id", "type", "properties"],
  38788. "additionalProperties": false
  38789. },
  38790. "EventQuestionRejected": {
  38791. "type": "object",
  38792. "properties": {
  38793. "id": {
  38794. "type": "string",
  38795. "pattern": "^evt_"
  38796. },
  38797. "type": {
  38798. "type": "string",
  38799. "enum": ["question.rejected"]
  38800. },
  38801. "properties": {
  38802. "type": "object",
  38803. "properties": {
  38804. "sessionID": {
  38805. "type": "string",
  38806. "pattern": "^ses"
  38807. },
  38808. "requestID": {
  38809. "type": "string",
  38810. "pattern": "^que"
  38811. }
  38812. },
  38813. "required": ["sessionID", "requestID"],
  38814. "additionalProperties": false
  38815. }
  38816. },
  38817. "required": ["id", "type", "properties"],
  38818. "additionalProperties": false
  38819. },
  38820. "EventSessionCompacted": {
  38821. "type": "object",
  38822. "properties": {
  38823. "id": {
  38824. "type": "string",
  38825. "pattern": "^evt_"
  38826. },
  38827. "type": {
  38828. "type": "string",
  38829. "enum": ["session.compacted"]
  38830. },
  38831. "properties": {
  38832. "type": "object",
  38833. "properties": {
  38834. "sessionID": {
  38835. "type": "string",
  38836. "pattern": "^ses"
  38837. }
  38838. },
  38839. "required": ["sessionID"],
  38840. "additionalProperties": false
  38841. }
  38842. },
  38843. "required": ["id", "type", "properties"],
  38844. "additionalProperties": false
  38845. },
  38846. "EventVcsBranchUpdated": {
  38847. "type": "object",
  38848. "properties": {
  38849. "id": {
  38850. "type": "string",
  38851. "pattern": "^evt_"
  38852. },
  38853. "type": {
  38854. "type": "string",
  38855. "enum": ["vcs.branch.updated"]
  38856. },
  38857. "properties": {
  38858. "type": "object",
  38859. "properties": {
  38860. "branch": {
  38861. "type": "string"
  38862. }
  38863. },
  38864. "additionalProperties": false
  38865. }
  38866. },
  38867. "required": ["id", "type", "properties"],
  38868. "additionalProperties": false
  38869. },
  38870. "EventWorkspaceReady": {
  38871. "type": "object",
  38872. "properties": {
  38873. "id": {
  38874. "type": "string",
  38875. "pattern": "^evt_"
  38876. },
  38877. "type": {
  38878. "type": "string",
  38879. "enum": ["workspace.ready"]
  38880. },
  38881. "properties": {
  38882. "type": "object",
  38883. "properties": {
  38884. "name": {
  38885. "type": "string"
  38886. }
  38887. },
  38888. "required": ["name"],
  38889. "additionalProperties": false
  38890. }
  38891. },
  38892. "required": ["id", "type", "properties"],
  38893. "additionalProperties": false
  38894. },
  38895. "EventWorkspaceFailed": {
  38896. "type": "object",
  38897. "properties": {
  38898. "id": {
  38899. "type": "string",
  38900. "pattern": "^evt_"
  38901. },
  38902. "type": {
  38903. "type": "string",
  38904. "enum": ["workspace.failed"]
  38905. },
  38906. "properties": {
  38907. "type": "object",
  38908. "properties": {
  38909. "message": {
  38910. "type": "string"
  38911. }
  38912. },
  38913. "required": ["message"],
  38914. "additionalProperties": false
  38915. }
  38916. },
  38917. "required": ["id", "type", "properties"],
  38918. "additionalProperties": false
  38919. },
  38920. "EventWorkspaceStatus": {
  38921. "type": "object",
  38922. "properties": {
  38923. "id": {
  38924. "type": "string",
  38925. "pattern": "^evt_"
  38926. },
  38927. "type": {
  38928. "type": "string",
  38929. "enum": ["workspace.status"]
  38930. },
  38931. "properties": {
  38932. "type": "object",
  38933. "properties": {
  38934. "workspaceID": {
  38935. "type": "string",
  38936. "pattern": "^wrk"
  38937. },
  38938. "status": {
  38939. "type": "string",
  38940. "enum": ["connected", "connecting", "disconnected", "error"]
  38941. }
  38942. },
  38943. "required": ["workspaceID", "status"],
  38944. "additionalProperties": false
  38945. }
  38946. },
  38947. "required": ["id", "type", "properties"],
  38948. "additionalProperties": false
  38949. },
  38950. "EventWorktreeReady": {
  38951. "type": "object",
  38952. "properties": {
  38953. "id": {
  38954. "type": "string",
  38955. "pattern": "^evt_"
  38956. },
  38957. "type": {
  38958. "type": "string",
  38959. "enum": ["worktree.ready"]
  38960. },
  38961. "properties": {
  38962. "type": "object",
  38963. "properties": {
  38964. "name": {
  38965. "type": "string"
  38966. },
  38967. "branch": {
  38968. "type": "string"
  38969. }
  38970. },
  38971. "required": ["name"],
  38972. "additionalProperties": false
  38973. }
  38974. },
  38975. "required": ["id", "type", "properties"],
  38976. "additionalProperties": false
  38977. },
  38978. "EventWorktreeFailed": {
  38979. "type": "object",
  38980. "properties": {
  38981. "id": {
  38982. "type": "string",
  38983. "pattern": "^evt_"
  38984. },
  38985. "type": {
  38986. "type": "string",
  38987. "enum": ["worktree.failed"]
  38988. },
  38989. "properties": {
  38990. "type": "object",
  38991. "properties": {
  38992. "message": {
  38993. "type": "string"
  38994. }
  38995. },
  38996. "required": ["message"],
  38997. "additionalProperties": false
  38998. }
  38999. },
  39000. "required": ["id", "type", "properties"],
  39001. "additionalProperties": false
  39002. },
  39003. "EventServerConnected": {
  39004. "type": "object",
  39005. "properties": {
  39006. "id": {
  39007. "type": "string",
  39008. "pattern": "^evt_"
  39009. },
  39010. "type": {
  39011. "type": "string",
  39012. "enum": ["server.connected"]
  39013. },
  39014. "properties": {
  39015. "type": "object",
  39016. "properties": {}
  39017. }
  39018. },
  39019. "required": ["id", "type", "properties"],
  39020. "additionalProperties": false
  39021. },
  39022. "EventGlobalDisposed": {
  39023. "type": "object",
  39024. "properties": {
  39025. "id": {
  39026. "type": "string",
  39027. "pattern": "^evt_"
  39028. },
  39029. "type": {
  39030. "type": "string",
  39031. "enum": ["global.disposed"]
  39032. },
  39033. "properties": {
  39034. "type": "object",
  39035. "properties": {}
  39036. }
  39037. },
  39038. "required": ["id", "type", "properties"],
  39039. "additionalProperties": false
  39040. },
  39041. "CredentialOAuth": {
  39042. "type": "object",
  39043. "properties": {
  39044. "type": {
  39045. "type": "string",
  39046. "enum": ["oauth"]
  39047. },
  39048. "methodID": {
  39049. "type": "string"
  39050. },
  39051. "refresh": {
  39052. "type": "string"
  39053. },
  39054. "access": {
  39055. "type": "string"
  39056. },
  39057. "expires": {
  39058. "type": "integer",
  39059. "minimum": 0
  39060. },
  39061. "metadata": {
  39062. "type": "object"
  39063. }
  39064. },
  39065. "required": ["type", "methodID", "refresh", "access", "expires"],
  39066. "additionalProperties": false
  39067. },
  39068. "CredentialKey": {
  39069. "type": "object",
  39070. "properties": {
  39071. "type": {
  39072. "type": "string",
  39073. "enum": ["key"]
  39074. },
  39075. "key": {
  39076. "type": "string"
  39077. },
  39078. "metadata": {
  39079. "type": "object"
  39080. }
  39081. },
  39082. "required": ["type", "key"],
  39083. "additionalProperties": false
  39084. },
  39085. "SkillV2DirectorySource": {
  39086. "type": "object",
  39087. "properties": {
  39088. "type": {
  39089. "type": "string",
  39090. "enum": ["directory"]
  39091. },
  39092. "path": {
  39093. "type": "string"
  39094. }
  39095. },
  39096. "required": ["type", "path"],
  39097. "additionalProperties": false
  39098. },
  39099. "SkillV2UrlSource": {
  39100. "type": "object",
  39101. "properties": {
  39102. "type": {
  39103. "type": "string",
  39104. "enum": ["url"]
  39105. },
  39106. "url": {
  39107. "type": "string"
  39108. }
  39109. },
  39110. "required": ["type", "url"],
  39111. "additionalProperties": false
  39112. },
  39113. "SkillV2EmbeddedSource": {
  39114. "type": "object",
  39115. "properties": {
  39116. "type": {
  39117. "type": "string",
  39118. "enum": ["embedded"]
  39119. },
  39120. "skill": {
  39121. "$ref": "#/components/schemas/SkillV2Info"
  39122. }
  39123. },
  39124. "required": ["type", "skill"],
  39125. "additionalProperties": false
  39126. },
  39127. "BadRequestError": {
  39128. "type": "object",
  39129. "required": ["name", "data"],
  39130. "properties": {
  39131. "name": {
  39132. "type": "string",
  39133. "enum": ["BadRequest"]
  39134. },
  39135. "data": {
  39136. "type": "object",
  39137. "required": ["message"],
  39138. "properties": {
  39139. "message": {
  39140. "type": "string"
  39141. },
  39142. "kind": {
  39143. "type": "string",
  39144. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  39145. }
  39146. }
  39147. }
  39148. }
  39149. }
  39150. }
  39151. },
  39152. "security": [],
  39153. "tags": [
  39154. {
  39155. "name": "control",
  39156. "description": "Control plane routes."
  39157. },
  39158. {
  39159. "name": "controlPlane",
  39160. "description": "Control-plane orchestration routes."
  39161. },
  39162. {
  39163. "name": "global",
  39164. "description": "Global server routes."
  39165. },
  39166. {
  39167. "name": "event",
  39168. "description": "Instance event stream route."
  39169. },
  39170. {
  39171. "name": "config",
  39172. "description": "Experimental HttpApi config routes."
  39173. },
  39174. {
  39175. "name": "experimental",
  39176. "description": "Experimental HttpApi read-only routes."
  39177. },
  39178. {
  39179. "name": "file",
  39180. "description": "Experimental HttpApi file routes."
  39181. },
  39182. {
  39183. "name": "instance",
  39184. "description": "Experimental HttpApi instance read routes."
  39185. },
  39186. {
  39187. "name": "mcp",
  39188. "description": "Experimental HttpApi MCP routes."
  39189. },
  39190. {
  39191. "name": "project",
  39192. "description": "Experimental HttpApi project routes."
  39193. },
  39194. {
  39195. "name": "projectCopy",
  39196. "description": "Project copy naming routes."
  39197. },
  39198. {
  39199. "name": "pty",
  39200. "description": "Experimental HttpApi PTY routes."
  39201. },
  39202. {
  39203. "name": "question",
  39204. "description": "Question routes."
  39205. },
  39206. {
  39207. "name": "permission",
  39208. "description": "Experimental HttpApi permission routes."
  39209. },
  39210. {
  39211. "name": "provider",
  39212. "description": "Experimental HttpApi provider routes."
  39213. },
  39214. {
  39215. "name": "session",
  39216. "description": "Experimental HttpApi session routes."
  39217. },
  39218. {
  39219. "name": "sync",
  39220. "description": "Experimental HttpApi sync routes."
  39221. },
  39222. {
  39223. "name": "tui",
  39224. "description": "Experimental HttpApi TUI routes."
  39225. },
  39226. {
  39227. "name": "workspace",
  39228. "description": "Experimental HttpApi workspace routes."
  39229. },
  39230. {
  39231. "name": "opencode HttpApi",
  39232. "description": "Experimental HttpApi surface for selected instance routes."
  39233. },
  39234. {
  39235. "name": "opencode HttpApi",
  39236. "description": "Experimental HttpApi surface for selected instance routes."
  39237. },
  39238. {
  39239. "name": "opencode HttpApi",
  39240. "description": "Experimental HttpApi surface for selected instance routes."
  39241. },
  39242. {
  39243. "name": "sessions",
  39244. "description": "Experimental session routes."
  39245. },
  39246. {
  39247. "name": "messages",
  39248. "description": "Experimental message routes."
  39249. },
  39250. {
  39251. "name": "models",
  39252. "description": "Experimental model routes."
  39253. },
  39254. {
  39255. "name": "providers",
  39256. "description": "Experimental provider routes."
  39257. },
  39258. {
  39259. "name": "integrations",
  39260. "description": "Integration discovery and authentication routes."
  39261. },
  39262. {
  39263. "name": "opencode HttpApi",
  39264. "description": "Experimental HttpApi surface for selected instance routes."
  39265. },
  39266. {
  39267. "name": "permissions",
  39268. "description": "Experimental permission routes."
  39269. },
  39270. {
  39271. "name": "filesystem",
  39272. "description": "Experimental location-scoped filesystem routes."
  39273. },
  39274. {
  39275. "name": "commands",
  39276. "description": "Experimental command routes."
  39277. },
  39278. {
  39279. "name": "skills",
  39280. "description": "Experimental skill routes."
  39281. },
  39282. {
  39283. "name": "events",
  39284. "description": "Experimental event stream route."
  39285. },
  39286. {
  39287. "name": "pty",
  39288. "description": "Experimental location-scoped PTY routes."
  39289. },
  39290. {
  39291. "name": "session questions",
  39292. "description": "Experimental session question routes."
  39293. },
  39294. {
  39295. "name": "reference",
  39296. "description": "Location-scoped project references."
  39297. },
  39298. {
  39299. "name": "projectCopy",
  39300. "description": "Project copy management routes."
  39301. },
  39302. {
  39303. "name": "pty",
  39304. "description": "PTY websocket route."
  39305. }
  39306. ]
  39307. }